Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
Education
Commits
d49a93e3
Commit
d49a93e3
authored
Dec 14, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
教师奖励
parent
58053a1f
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
554 additions
and
2 deletions
+554
-2
BonusStateEnum.cs
Edu.Common/Enum/Course/BonusStateEnum.cs
+35
-0
RB_Teaching_Bonus.cs
Edu.Model/Entity/Course/RB_Teaching_Bonus.cs
+75
-0
RB_Teaching_BonusDetail.cs
Edu.Model/Entity/Course/RB_Teaching_BonusDetail.cs
+101
-0
RB_Teaching_BonusDetail_ViewModel.cs
...del/ViewModel/Course/RB_Teaching_BonusDetail_ViewModel.cs
+21
-0
RB_Teaching_Bonus_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Teaching_Bonus_ViewModel.cs
+22
-0
RB_Teacher_ViewModel.cs
Edu.Model/ViewModel/User/RB_Teacher_ViewModel.cs
+5
-0
TeachingRewardsModule.cs
Edu.Module.Course/TeachingRewardsModule.cs
+58
-1
RB_ClassRepository.cs
Edu.Repository/Course/RB_ClassRepository.cs
+2
-0
RB_Teaching_BonusDetailRepository.cs
Edu.Repository/Course/RB_Teaching_BonusDetailRepository.cs
+103
-0
RB_Teaching_BonusRepository.cs
Edu.Repository/Course/RB_Teaching_BonusRepository.cs
+87
-0
RB_TeacherRepository.cs
Edu.Repository/User/RB_TeacherRepository.cs
+4
-0
OrderController.cs
Edu.WebApi/Controllers/Course/OrderController.cs
+1
-1
TeachingRewardsController.cs
Edu.WebApi/Controllers/Course/TeachingRewardsController.cs
+40
-0
No files found.
Edu.Common/Enum/Course/BonusStateEnum.cs
0 → 100644
View file @
d49a93e3
using
Edu.Common.Plugin
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Common.Enum.Course
{
/// <summary>
/// 教师奖金状态枚举
/// </summary>
public
enum
BonusStateEnum
{
/// <summary>
/// 待确认
/// </summary>
[
EnumField
(
"待确认"
)]
Wait
=
1
,
/// <summary>
/// 已确认
/// </summary>
[
EnumField
(
"已确认"
)]
Confirmed
=
2
,
/// <summary>
/// 取消
/// </summary>
[
EnumField
(
"取消"
)]
Cancel
=
3
,
/// <summary>
/// 生成中
/// </summary>
[
EnumField
(
"生成中"
)]
Create
=
4
}
}
Edu.Model/Entity/Course/RB_Teaching_Bonus.cs
0 → 100644
View file @
d49a93e3
using
Edu.Common.Enum
;
using
Edu.Common.Enum.Course
;
using
System
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Course
{
/// <summary>
/// 教师奖励实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Teaching_Bonus
{
/// <summary>
/// 主键
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 月份
/// </summary>
public
string
Month
{
get
;
set
;
}
/// <summary>
/// 教师ids
/// </summary>
public
string
TeacherIds
{
get
;
set
;
}
/// <summary>
/// 总金额
/// </summary>
public
decimal
Money
{
get
;
set
;
}
/// <summary>
/// 财务单据id
/// </summary>
public
int
FinanceId
{
get
;
set
;
}
/// <summary>
/// 状态 枚举 1待确认 2已确认 3取消 4生成中
/// </summary>
public
BonusStateEnum
State
{
get
;
set
;
}
/// <summary>
/// 集团编号
/// </summary>
public
int
Group_Id
{
get
;
set
;
}
/// <summary>
/// 学校编号
/// </summary>
public
int
School_Id
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateTime
{
get
;
set
;
}
/// <summary>
/// 修改人
/// </summary>
public
int
UpdateBy
{
get
;
set
;
}
/// <summary>
/// 更新时间
/// </summary>
public
DateTime
UpdateTime
{
get
;
set
;
}
}
}
Edu.Model/Entity/Course/RB_Teaching_BonusDetail.cs
0 → 100644
View file @
d49a93e3
using
Edu.Common.Enum
;
using
Edu.Common.Enum.Course
;
using
System
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Course
{
/// <summary>
/// 教师奖励明细实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Teaching_BonusDetail
{
/// <summary>
/// 主键
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
int
BonusId
{
get
;
set
;
}
/// <summary>
/// 日期
/// </summary>
public
DateTime
Date
{
get
;
set
;
}
/// <summary>
/// 教师id
/// </summary>
public
int
TeacherId
{
get
;
set
;
}
/// <summary>
/// 班级id
/// </summary>
public
int
ClassId
{
get
;
set
;
}
/// <summary>
/// 类型 1带班 2代课
/// </summary>
public
int
Type
{
get
;
set
;
}
/// <summary>
/// 课时
/// </summary>
public
int
CourseHour
{
get
;
set
;
}
/// <summary>
/// 课时费
/// </summary>
public
decimal
UnitPrice
{
get
;
set
;
}
/// <summary>
/// 签到人数
/// </summary>
public
int
CheckInNum
{
get
;
set
;
}
/// <summary>
/// 小计金额
/// </summary>
public
decimal
Money
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </summary>
public
int
Status
{
get
;
set
;
}
/// <summary>
/// 集团编号
/// </summary>
public
int
Group_Id
{
get
;
set
;
}
/// <summary>
/// 学校编号
/// </summary>
public
int
School_Id
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateTime
{
get
;
set
;
}
/// <summary>
/// 修改人
/// </summary>
public
int
UpdateBy
{
get
;
set
;
}
/// <summary>
/// 更新时间
/// </summary>
public
DateTime
UpdateTime
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Course/RB_Teaching_BonusDetail_ViewModel.cs
0 → 100644
View file @
d49a93e3
using
System
;
using
System.Collections.Generic
;
namespace
Edu.Model.ViewModel.Course
{
/// <summary>
/// 教师奖金明细实体类
/// </summary>
[
Serializable
]
public
class
RB_Teaching_BonusDetail_ViewModel
:
Entity
.
Course
.
RB_Teaching_BonusDetail
{
/// <summary>
/// 奖励ids
/// </summary>
public
string
BonusIds
{
get
;
set
;
}
/// <summary>
/// 教师名称
/// </summary>
public
string
TeacherName
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Model/ViewModel/Course/RB_Teaching_Bonus_ViewModel.cs
0 → 100644
View file @
d49a93e3
using
System
;
using
System.Collections.Generic
;
namespace
Edu.Model.ViewModel.Course
{
/// <summary>
/// 教师奖金实体类
/// </summary>
[
Serializable
]
public
class
RB_Teaching_Bonus_ViewModel
:
Entity
.
Course
.
RB_Teaching_Bonus
{
/// <summary>
/// 教师id
/// </summary>
public
int
TeacherId
{
get
;
set
;
}
/// <summary>
/// 教师列表
/// </summary>
public
List
<
RB_Teaching_BonusDetail_ViewModel
>
TeacherList
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Model/ViewModel/User/RB_Teacher_ViewModel.cs
View file @
d49a93e3
...
...
@@ -74,5 +74,10 @@ namespace Edu.Model.ViewModel.User
/// 岗位名称
/// </summary>
public
string
PostName
{
get
;
set
;
}
/// <summary>
/// 教师ids
/// </summary>
public
string
TeacherIds
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Module.Course/TeachingRewardsModule.cs
View file @
d49a93e3
...
...
@@ -38,9 +38,21 @@ namespace Edu.Module.Course
/// 用户日志
/// </summary>
private
readonly
RB_User_ChangeLogRepository
changeLogRepository
=
new
RB_User_ChangeLogRepository
();
/// <summary>
/// 教师奖励
/// </summary>
private
readonly
RB_Teaching_BonusRepository
teaching_BonusRepository
=
new
RB_Teaching_BonusRepository
();
/// <summary>
/// 教师奖励明细
/// </summary>
private
readonly
RB_Teaching_BonusDetailRepository
teaching_BonusDetailRepository
=
new
RB_Teaching_BonusDetailRepository
();
/// <summary>
/// 教师
/// </summary>
private
readonly
RB_TeacherRepository
teacherRepository
=
new
RB_TeacherRepository
();
#
region
教务配置
/// <summary>
/// 获取教务奖励列表
/// </summary>
...
...
@@ -249,5 +261,50 @@ namespace Edu.Module.Course
BasicHour
=
model
?.
BasicHour
??
0
};
}
#
endregion
#
region
教师奖励
/// <summary>
/// 获取讲师奖励分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="count"></param>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Teaching_Bonus_ViewModel
>
GetTeachingBonusPageList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Teaching_Bonus_ViewModel
dmodel
)
{
var
list
=
teaching_BonusRepository
.
GetPageList
(
pageIndex
,
pageSize
,
out
count
,
dmodel
);
if
(
list
.
Any
())
{
string
bonusIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
Id
));
//获取所有的明细
var
dlist
=
teaching_BonusDetailRepository
.
GetList
(
new
RB_Teaching_BonusDetail_ViewModel
()
{
Group_Id
=
dmodel
.
Group_Id
,
BonusIds
=
bonusIds
});
//获取所有的教师
string
teacherIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
TeacherIds
));
var
tlist
=
teacherRepository
.
GetTeacherListRepository
(
new
RB_Teacher_ViewModel
()
{
Group_Id
=
dmodel
.
Group_Id
,
TeacherIds
=
teacherIds
});
foreach
(
var
item
in
list
)
{
item
.
TeacherList
=
new
List
<
RB_Teaching_BonusDetail_ViewModel
>();
string
[]
teacherIdArr
=
item
.
TeacherIds
.
Split
(
","
);
foreach
(
var
qitem
in
teacherIdArr
)
{
int
teacherId
=
Convert
.
ToInt32
(
qitem
);
string
teacherName
=
tlist
.
Where
(
x
=>
x
.
TId
==
teacherId
).
FirstOrDefault
()?.
TeacherName
??
""
;
//教师累计奖励金额
decimal
money
=
dlist
.
Where
(
x
=>
x
.
BonusId
==
item
.
Id
&&
x
.
TeacherId
==
teacherId
).
Sum
(
x
=>
x
.
Money
);
item
.
TeacherList
.
Add
(
new
RB_Teaching_BonusDetail_ViewModel
()
{
TeacherId
=
teacherId
,
TeacherName
=
teacherName
,
Money
=
money
});
}
}
}
return
list
;
}
#
endregion
}
}
Edu.Repository/Course/RB_ClassRepository.cs
View file @
d49a93e3
using
Edu.Common.Enum
;
using
Edu.Model.Entity.Course
;
using
Edu.Model.ViewModel.Course
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
...
...
@@ -190,6 +191,7 @@ WHERE 1=1
if
(
query
.
Q_CanApply
==
1
)
{
builder
.
AppendFormat
(
" AND (IFNULL(A.ClassPersion,0)-IFNULL(t.GuestNum,0))>0 "
);
builder
.
AppendFormat
(
" AND A.{0} >='{1}' "
,
nameof
(
RB_Class_ViewModel
.
EndOrderTime
),
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
));
}
}
return
GetPage
<
RB_Class_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
...
...
Edu.Repository/Course/RB_Teaching_BonusDetailRepository.cs
0 → 100644
View file @
d49a93e3
using
Edu.Common.Enum
;
using
Edu.Model.Entity.Course
;
using
Edu.Model.ViewModel.Course
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
VT.FW.DB.Dapper
;
namespace
Edu.Repository.Course
{
/// <summary>
/// 教务奖励明细仓储层
/// </summary>
public
class
RB_Teaching_BonusDetailRepository
:
BaseRepository
<
RB_Teaching_BonusDetail
>
{
/// <summary>
/// 获取列表
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public
List
<
RB_Teaching_BonusDetail_ViewModel
>
GetList
(
RB_Teaching_BonusDetail_ViewModel
demodel
)
{
string
where
=
$@" 1=1 and Status=0"
;
if
(
demodel
.
Group_Id
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Teaching_BonusDetail
.
Group_Id
)}
=
{
demodel
.
Group_Id
}
"
;
}
if
(
demodel
.
School_Id
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Teaching_BonusDetail
.
School_Id
)}
=
{
demodel
.
School_Id
}
"
;
}
if
(
demodel
.
BonusId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Teaching_BonusDetail
.
BonusId
)}
=
{
demodel
.
BonusId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
BonusIds
))
{
where
+=
$@" and
{
nameof
(
RB_Teaching_BonusDetail
.
BonusId
)}
in(
{
demodel
.
BonusIds
}
)"
;
}
if
(
demodel
.
TeacherId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Teaching_BonusDetail
.
TeacherId
)}
=
{
demodel
.
TeacherId
}
"
;
}
if
(
demodel
.
ClassId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Teaching_BonusDetail
.
ClassId
)}
=
{
demodel
.
ClassId
}
"
;
}
if
(
demodel
.
Type
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Teaching_BonusDetail
.
Type
)}
=
{
demodel
.
Type
}
"
;
}
string
sql
=
$@" select * from RB_Teaching_BonusDetail where
{
where
}
order by Id desc"
;
return
Get
<
RB_Teaching_BonusDetail_ViewModel
>(
sql
).
ToList
();
}
/// <summary>
/// 获取分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="count"></param>
/// <param name="demodel"></param>
/// <returns></returns>
public
List
<
RB_Teaching_BonusDetail_ViewModel
>
GetPageList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Teaching_BonusDetail_ViewModel
demodel
)
{
string
where
=
$@" 1=1 and Status=0"
;
if
(
demodel
.
Group_Id
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Teaching_BonusDetail
.
Group_Id
)}
=
{
demodel
.
Group_Id
}
"
;
}
if
(
demodel
.
School_Id
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Teaching_BonusDetail
.
School_Id
)}
=
{
demodel
.
School_Id
}
"
;
}
if
(
demodel
.
BonusId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Teaching_BonusDetail
.
BonusId
)}
=
{
demodel
.
BonusId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
BonusIds
))
{
where
+=
$@" and
{
nameof
(
RB_Teaching_BonusDetail
.
BonusId
)}
in(
{
demodel
.
BonusIds
}
)"
;
}
if
(
demodel
.
TeacherId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Teaching_BonusDetail
.
TeacherId
)}
=
{
demodel
.
TeacherId
}
"
;
}
if
(
demodel
.
ClassId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Teaching_BonusDetail
.
ClassId
)}
=
{
demodel
.
ClassId
}
"
;
}
if
(
demodel
.
Type
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Teaching_BonusDetail
.
Type
)}
=
{
demodel
.
Type
}
"
;
}
string
sql
=
$@" select * from RB_Teaching_BonusDetail where
{
where
}
order by Id desc"
;
return
GetPage
<
RB_Teaching_BonusDetail_ViewModel
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
}
}
}
Edu.Repository/Course/RB_Teaching_BonusRepository.cs
0 → 100644
View file @
d49a93e3
using
Edu.Common.Enum
;
using
Edu.Model.Entity.Course
;
using
Edu.Model.ViewModel.Course
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
VT.FW.DB.Dapper
;
namespace
Edu.Repository.Course
{
/// <summary>
/// 教务奖励仓储层
/// </summary>
public
class
RB_Teaching_BonusRepository
:
BaseRepository
<
RB_Teaching_Bonus
>
{
/// <summary>
/// 获取列表
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public
List
<
RB_Teaching_Bonus_ViewModel
>
GetList
(
RB_Teaching_Bonus_ViewModel
demodel
)
{
string
where
=
$@" 1=1"
;
if
(
demodel
.
Group_Id
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Teaching_Bonus
.
Group_Id
)}
=
{
demodel
.
Group_Id
}
"
;
}
if
(
demodel
.
School_Id
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Teaching_Bonus
.
School_Id
)}
=
{
demodel
.
School_Id
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
Month
))
{
where
+=
$@" and
{
nameof
(
RB_Teaching_Bonus
.
Month
)}
='
{
demodel
.
Month
}
'"
;
}
if
(
demodel
.
TeacherId
>
0
)
{
where
+=
$@" and FIND_IN_SET('
{
demodel
.
TeacherId
}
',
{
nameof
(
RB_Teaching_Bonus
.
TeacherIds
)}
)"
;
}
if
(
demodel
.
State
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Teaching_Bonus
.
State
)}
=
{(
int
)
demodel
.
State
}
"
;
}
string
sql
=
$@" select * from RB_Teaching_Bonus where
{
where
}
order by Id desc"
;
return
Get
<
RB_Teaching_Bonus_ViewModel
>(
sql
).
ToList
();
}
/// <summary>
/// 获取分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="count"></param>
/// <param name="demodel"></param>
/// <returns></returns>
public
List
<
RB_Teaching_Bonus_ViewModel
>
GetPageList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Teaching_Bonus_ViewModel
demodel
)
{
string
where
=
$@" 1=1"
;
if
(
demodel
.
Group_Id
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Teaching_Bonus
.
Group_Id
)}
=
{
demodel
.
Group_Id
}
"
;
}
if
(
demodel
.
School_Id
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Teaching_Bonus
.
School_Id
)}
=
{
demodel
.
School_Id
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
Month
))
{
where
+=
$@" and
{
nameof
(
RB_Teaching_Bonus
.
Month
)}
='
{
demodel
.
Month
}
'"
;
}
if
(
demodel
.
TeacherId
>
0
)
{
where
+=
$@" and FIND_IN_SET('
{
demodel
.
TeacherId
}
',
{
nameof
(
RB_Teaching_Bonus
.
TeacherIds
)}
)"
;
}
if
(
demodel
.
State
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Teaching_Bonus
.
State
)}
=
{(
int
)
demodel
.
State
}
"
;
}
string
sql
=
$@" select * from RB_Teaching_Bonus where
{
where
}
order by Id desc"
;
return
GetPage
<
RB_Teaching_Bonus_ViewModel
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
}
}
}
Edu.Repository/User/RB_TeacherRepository.cs
View file @
d49a93e3
...
...
@@ -69,6 +69,10 @@ WHERE 1=1
{
builder
.
AppendFormat
(
" AND t.{0}={1} "
,
nameof
(
RB_Teacher_ViewModel
.
TId
),
query
.
TId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
TeacherIds
))
{
builder
.
AppendFormat
(
" AND t.{0} in({1}) "
,
nameof
(
RB_Teacher_ViewModel
.
TId
),
query
.
TeacherIds
);
}
}
return
Get
<
RB_Teacher_ViewModel
>(
builder
.
ToString
(),
parameters
).
ToList
();
}
...
...
Edu.WebApi/Controllers/Course/OrderController.cs
View file @
d49a93e3
...
...
@@ -349,7 +349,7 @@ namespace Edu.WebApi.Controllers.Course
JObject
prams
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
int
OrderId
=
prams
.
GetInt
(
"OrderId"
,
0
);
if
(
OrderId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
return
ApiResult
.
ParamIsNull
(
"订单号不存在"
);
}
bool
flag
=
orderModule
.
CancelClassOrder
(
OrderId
,
userInfo
);
...
...
Edu.WebApi/Controllers/Course/TeachingRewardsController.cs
View file @
d49a93e3
...
...
@@ -194,5 +194,45 @@ namespace Edu.WebApi.Controllers.Course
}
#
endregion
#
region
教师奖励
/// <summary>
/// 教师奖励分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetTeachingBonusPageList
()
{
var
userInfo
=
base
.
UserInfo
;
var
pageModel
=
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
dmodel
=
JsonHelper
.
DeserializeObject
<
RB_Teaching_Bonus_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
dmodel
.
Group_Id
=
userInfo
.
Group_Id
;
var
list
=
teachingRewardsModule
.
GetTeachingBonusPageList
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
count
,
dmodel
);
pageModel
.
Count
=
Convert
.
ToInt32
(
count
);
pageModel
.
PageData
=
list
.
Select
(
x
=>
new
{
x
.
Id
,
x
.
Month
,
x
.
Money
,
x
.
FinanceId
,
x
.
State
,
StateName
=
x
.
State
.
ToName
(),
x
.
UpdateBy
,
UpdateByName
=
UserReidsCache
.
GetUserLoginInfo
(
x
.
UpdateBy
)?.
AccountName
??
""
,
UpdateTime
=
x
.
UpdateTime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
TeacherList
=
x
.
TeacherList
.
Select
(
z
=>
new
{
z
.
TeacherId
,
z
.
TeacherName
,
z
.
Money
})
});
return
ApiResult
.
Success
(
""
,
pageModel
);
}
#
endregion
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment