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
e64f459f
Commit
e64f459f
authored
Dec 25, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
我的教师奖励
parent
4a6fc200
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
577 additions
and
30 deletions
+577
-30
RB_Teaching_BonusDetail_ViewModel.cs
...del/ViewModel/Course/RB_Teaching_BonusDetail_ViewModel.cs
+10
-0
TeachingRewardsModule.cs
Edu.Module.Course/TeachingRewardsModule.cs
+166
-3
RB_Teaching_BonusDetailRepository.cs
Edu.Repository/Course/RB_Teaching_BonusDetailRepository.cs
+103
-9
RB_Teaching_BonusRepository.cs
Edu.Repository/Course/RB_Teaching_BonusRepository.cs
+19
-0
RB_Teaching_PerfRepository.cs
Edu.Repository/Course/RB_Teaching_PerfRepository.cs
+79
-0
TeachingRewardsController.cs
Edu.WebApi/Controllers/Course/TeachingRewardsController.cs
+182
-0
WorkFlowController.cs
Edu.WebApi/Controllers/User/WorkFlowController.cs
+18
-18
No files found.
Edu.Model/ViewModel/Course/RB_Teaching_BonusDetail_ViewModel.cs
View file @
e64f459f
...
@@ -25,5 +25,15 @@ namespace Edu.Model.ViewModel.Course
...
@@ -25,5 +25,15 @@ namespace Edu.Model.ViewModel.Course
/// 代课课时
/// 代课课时
/// </summary>
/// </summary>
public
int
DCourseHour
{
get
;
set
;
}
public
int
DCourseHour
{
get
;
set
;
}
/// <summary>
/// 月份
/// </summary>
public
string
Month
{
get
;
set
;
}
/// <summary>
/// 奖金确认 1是
/// </summary>
public
int
Q_BonusConfirm
{
get
;
set
;
}
}
}
}
}
\ No newline at end of file
Edu.Module.Course/TeachingRewardsModule.cs
View file @
e64f459f
...
@@ -94,6 +94,10 @@ namespace Edu.Module.Course
...
@@ -94,6 +94,10 @@ namespace Edu.Module.Course
/// 集团
/// 集团
/// </summary>
/// </summary>
private
readonly
RB_GroupRepository
groupRepository
=
new
RB_GroupRepository
();
private
readonly
RB_GroupRepository
groupRepository
=
new
RB_GroupRepository
();
/// <summary>
/// 账户
/// </summary>
private
readonly
RB_AccountRepository
accountRepository
=
new
RB_AccountRepository
();
#
region
教务配置
#
region
教务配置
...
@@ -364,6 +368,30 @@ namespace Edu.Module.Course
...
@@ -364,6 +368,30 @@ namespace Edu.Module.Course
return
list
;
return
list
;
}
}
/// <summary>
/// 获取我的教师奖励
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="count"></param>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Teaching_BonusDetail_ViewModel
>
GetMyTeachingBonusDetailPageList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Teaching_BonusDetail_ViewModel
dmodel
)
{
var
list
=
teaching_BonusDetailRepository
.
GetPageList
(
pageIndex
,
pageSize
,
out
count
,
dmodel
);
return
list
;
}
/// <summary>
/// 获取累积金额
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public
decimal
GetTeachingBonusDetailTotalMoney
(
RB_Teaching_BonusDetail_ViewModel
dmodel
)
{
return
teaching_BonusDetailRepository
.
GetTeachingBonusDetailTotalMoney
(
dmodel
);
}
/// <summary>
/// <summary>
/// 获取教师奖励统计
/// 获取教师奖励统计
/// </summary>
/// </summary>
...
@@ -725,9 +753,7 @@ namespace Edu.Module.Course
...
@@ -725,9 +753,7 @@ namespace Edu.Module.Course
}
}
}
}
return
msg
;
return
msg
;
}
}
/// <summary>
/// <summary>
/// 获取列表
/// 获取列表
...
@@ -780,6 +806,30 @@ namespace Edu.Module.Course
...
@@ -780,6 +806,30 @@ namespace Edu.Module.Course
return
list
;
return
list
;
}
}
/// <summary>
/// 获取课时费上涨历史记录
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="count"></param>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Teaching_Perf_ViewModel
>
GetMyTeachingBonusHistoryPageList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Teaching_Perf_ViewModel
dmodel
)
{
var
list
=
teaching_PerfRepository
.
GetPageList
(
pageIndex
,
pageSize
,
out
count
,
demodel
:
dmodel
);
return
list
;
}
/// <summary>
/// 获取累积金额
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public
decimal
GetMyTeachingPerfTotalMoney
(
RB_Teaching_Perf_ViewModel
dmodel
)
{
return
teaching_PerfRepository
.
GetMyTeachingPerfTotalMoney
(
dmodel
);
}
/// <summary>
/// <summary>
/// 设置教师绩效备注
/// 设置教师绩效备注
/// </summary>
/// </summary>
...
@@ -1361,5 +1411,118 @@ namespace Edu.Module.Course
...
@@ -1361,5 +1411,118 @@ namespace Edu.Module.Course
}
}
#
endregion
#
endregion
#
region
我的统计
/// <summary>
/// 获取教师id
/// </summary>
/// <param name="accountId"></param>
/// <returns></returns>
public
int
GetAccountTeacherId
(
int
accountId
)
{
var
accountModel
=
accountRepository
.
GetEntity
(
accountId
);
if
(
accountModel
.
AccountType
!=
Common
.
Enum
.
User
.
AccountTypeEnum
.
Teacher
)
{
return
0
;
}
return
accountModel
.
AccountId
;
}
/// <summary>
/// 获取教师课时费统计
/// </summary>
/// <param name="monthNum"></param>
/// <param name="userInfo"></param>
/// <returns></returns>
public
ApiResult
GetMyTeachingBonusStatistics
(
int
monthNum
,
UserInfo
userInfo
)
{
//查询教师信息
var
accountModel
=
accountRepository
.
GetEntity
(
userInfo
.
Id
);
if
(
accountModel
.
AccountType
!=
Common
.
Enum
.
User
.
AccountTypeEnum
.
Teacher
)
{
return
ApiResult
.
Failed
(
"不是教师端,无法查询"
);
}
var
teacherModel
=
teacherRepository
.
GetEntity
(
accountModel
.
AccountId
);
if
(
teacherModel
==
null
)
{
return
ApiResult
.
Failed
(
"教师不存在"
);
}
//基础配置
var
configModel
=
class_ConfigRepository
.
GetClassConfigRepository
(
new
RB_Class_Config_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
});
decimal
unitPrice
=
(
configModel
?.
BasicHourFee
??
0
)
+
(
teacherModel
?.
BaseHourFee
??
0
);
//当前课时单价 (不包括班级挑动)
//提成总金额
decimal
TotalMoney
=
teaching_BonusDetailRepository
.
GetTeachingBonusTotalMoney
(
teacherModel
.
TId
,
userInfo
.
Group_Id
);
//课时费确认的最后一个月
string
LastlyMonth
=
teaching_BonusDetailRepository
.
GetTeachingBonusLastlyMonth
(
teacherModel
.
TId
,
userInfo
.
Group_Id
);
//获取最近几月的走势图
List
<
string
>
MList
=
new
List
<
string
>();
for
(
var
i
=
1
;
i
<=
monthNum
;
i
++)
{
MList
.
Add
(
DateTime
.
Now
.
AddMonths
(
0
-
i
).
ToString
(
"yyyy-MM"
));
}
string
monthStr
=
"'"
+
string
.
Join
(
"','"
,
MList
)
+
"'"
;
var
LastlyChart
=
teaching_BonusRepository
.
GetTeachingBonusLastlyChart
(
teacherModel
.
TId
,
userInfo
.
Group_Id
,
monthStr
);
//获取当月趋势
string
StartTime
=
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
);
string
EndTime
=
DateTime
.
Now
.
AddMonths
(
1
).
AddDays
(-
1
).
ToString
(
"yyyy-MM-dd"
);
var
plist
=
class_PlanRepository
.
GetClassPlanList_V2
(
new
RB_Class_Plan_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
,
Q_TeacherIds
=
teacherModel
.
TId
.
ToString
(),
StartTime
=
StartTime
,
EndTime
=
EndTime
});
//查询所有课程的上课时间
List
<
RB_Class_Time_ViewModel
>
timeList
=
new
List
<
RB_Class_Time_ViewModel
>();
List
<
RB_Class_Type_ViewModel
>
typeList
=
new
List
<
RB_Class_Type_ViewModel
>();
if
(
plist
.
Any
())
{
string
pids
=
string
.
Join
(
","
,
plist
.
Select
(
x
=>
x
.
ClassPlanId
));
timeList
=
class_TimeRepository
.
GetClassTimeListRepository
(
new
RB_Class_Time_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
,
QClassPlanIds
=
pids
});
string
classTypeIds
=
string
.
Join
(
","
,
plist
.
Select
(
x
=>
x
.
ClassType
).
Distinct
());
typeList
=
class_TypeRepository
.
GetClassTypeListRepository
(
new
RB_Class_Type_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
,
Q_CTypeIds
=
classTypeIds
});
}
decimal
NowMonthMoney
=
0
;
foreach
(
var
item
in
plist
)
{
//查询课时
var
ctimelist
=
timeList
.
Where
(
x
=>
x
.
ClassPlanId
==
item
.
ClassPlanId
).
ToList
();
int
minute
=
0
;
string
nowTime
=
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
);
foreach
(
var
qitem
in
ctimelist
)
{
var
ts
=
Convert
.
ToDateTime
(
nowTime
+
" "
+
qitem
.
EndTime
)
-
Convert
.
ToDateTime
(
nowTime
+
" "
+
qitem
.
StartTime
);
minute
+=
(
int
)
ts
.
TotalMinutes
;
}
int
ksNum
=
(
configModel
?.
BasicMinutes
??
0
)
==
0
?
0
:
minute
/
configModel
.
BasicMinutes
;
// 未达到一课时时间 算不算一课时
//查询课单价
var
typeModel
=
typeList
.
Where
(
x
=>
x
.
CTypeId
==
item
.
ClassType
).
FirstOrDefault
();
decimal
unitPrice1
=
configModel
.
BasicHourFee
+
(
typeModel
?.
AddHourFee
??
0
)
+
(
teacherModel
?.
BaseHourFee
??
0
);
NowMonthMoney
+=
ksNum
*
unitPrice1
;
}
List
<
RB_Teaching_Bonus_ViewModel
>
LastlyChartList
=
new
List
<
RB_Teaching_Bonus_ViewModel
>()
{
new
RB_Teaching_Bonus_ViewModel
(){
Month
=
DateTime
.
Now
.
ToString
(
"yyyy-MM"
),
Money
=
NowMonthMoney
}
};
foreach
(
var
item
in
MList
)
{
var
chartModel
=
LastlyChart
.
Where
(
x
=>
x
.
Month
==
item
).
FirstOrDefault
();
if
(
chartModel
==
null
)
{
LastlyChartList
.
Add
(
new
RB_Teaching_Bonus_ViewModel
()
{
Month
=
item
,
Money
=
0
});
}
else
{
LastlyChartList
.
Add
(
chartModel
);
}
}
return
ApiResult
.
Success
(
""
,
new
{
TotalMoney
,
UnitPrice
=
unitPrice
,
teacherModel
.
BaseStuNum
,
LastlyMonth
,
LastlyChartList
=
LastlyChartList
.
Select
(
x
=>
new
{
x
.
Month
,
x
.
Money
})
});
}
#
endregion
}
}
}
}
Edu.Repository/Course/RB_Teaching_BonusDetailRepository.cs
View file @
e64f459f
...
@@ -66,38 +66,49 @@ namespace Edu.Repository.Course
...
@@ -66,38 +66,49 @@ namespace Edu.Repository.Course
/// <returns></returns>
/// <returns></returns>
public
List
<
RB_Teaching_BonusDetail_ViewModel
>
GetPageList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Teaching_BonusDetail_ViewModel
demodel
)
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"
;
string
where
=
$@" 1=1 and
bd.
Status=0"
;
if
(
demodel
.
Group_Id
>
0
)
if
(
demodel
.
Group_Id
>
0
)
{
{
where
+=
$@" and
{
nameof
(
RB_Teaching_BonusDetail
.
Group_Id
)}
=
{
demodel
.
Group_Id
}
"
;
where
+=
$@" and
bd.
{
nameof
(
RB_Teaching_BonusDetail
.
Group_Id
)}
=
{
demodel
.
Group_Id
}
"
;
}
}
if
(
demodel
.
School_Id
>
0
)
if
(
demodel
.
School_Id
>
0
)
{
{
where
+=
$@" and
{
nameof
(
RB_Teaching_BonusDetail
.
School_Id
)}
=
{
demodel
.
School_Id
}
"
;
where
+=
$@" and
bd.
{
nameof
(
RB_Teaching_BonusDetail
.
School_Id
)}
=
{
demodel
.
School_Id
}
"
;
}
}
if
(
demodel
.
BonusId
>
0
)
if
(
demodel
.
BonusId
>
0
)
{
{
where
+=
$@" and
{
nameof
(
RB_Teaching_BonusDetail
.
BonusId
)}
=
{
demodel
.
BonusId
}
"
;
where
+=
$@" and
bd.
{
nameof
(
RB_Teaching_BonusDetail
.
BonusId
)}
=
{
demodel
.
BonusId
}
"
;
}
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
BonusIds
))
if
(!
string
.
IsNullOrEmpty
(
demodel
.
BonusIds
))
{
{
where
+=
$@" and
{
nameof
(
RB_Teaching_BonusDetail
.
BonusId
)}
in(
{
demodel
.
BonusIds
}
)"
;
where
+=
$@" and bd.
{
nameof
(
RB_Teaching_BonusDetail
.
BonusId
)}
in(
{
demodel
.
BonusIds
}
)"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
Month
))
{
where
+=
$@" and b.
{
nameof
(
RB_Teaching_Bonus
.
Month
)}
='
{
demodel
.
Month
}
'"
;
}
}
if
(
demodel
.
TeacherId
>
0
)
if
(
demodel
.
TeacherId
>
0
)
{
{
where
+=
$@" and
{
nameof
(
RB_Teaching_BonusDetail
.
TeacherId
)}
=
{
demodel
.
TeacherId
}
"
;
where
+=
$@" and
bd.
{
nameof
(
RB_Teaching_BonusDetail
.
TeacherId
)}
=
{
demodel
.
TeacherId
}
"
;
}
}
if
(
demodel
.
ClassId
>
0
)
if
(
demodel
.
ClassId
>
0
)
{
{
where
+=
$@" and
{
nameof
(
RB_Teaching_BonusDetail
.
ClassId
)}
=
{
demodel
.
ClassId
}
"
;
where
+=
$@" and
bd.
{
nameof
(
RB_Teaching_BonusDetail
.
ClassId
)}
=
{
demodel
.
ClassId
}
"
;
}
}
if
(
demodel
.
Type
>
0
)
if
(
demodel
.
Type
>
0
)
{
{
where
+=
$@" and
{
nameof
(
RB_Teaching_BonusDetail
.
Type
)}
=
{
demodel
.
Type
}
"
;
where
+=
$@" and bd.
{
nameof
(
RB_Teaching_BonusDetail
.
Type
)}
=
{
demodel
.
Type
}
"
;
}
if
(
demodel
.
Q_BonusConfirm
==
1
)
{
where
+=
$@" and b.State =2"
;
}
}
string
sql
=
$@" select * from RB_Teaching_BonusDetail where
{
where
}
order by Id desc"
;
string
sql
=
$@" select bd.*,c.ClassName from RB_Teaching_BonusDetail bd
inner join rb_teaching_bonus b on bd.BonusId = b.Id
left join rb_class c on bd.ClassId = c.ClassId
where
{
where
}
order by bd.Id desc"
;
return
GetPage
<
RB_Teaching_BonusDetail_ViewModel
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
return
GetPage
<
RB_Teaching_BonusDetail_ViewModel
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
}
}
...
@@ -196,5 +207,88 @@ GROUP BY b.TeacherId,t.TeacherName,b.UnitPrice
...
@@ -196,5 +207,88 @@ GROUP BY b.TeacherId,t.TeacherName,b.UnitPrice
"
;
"
;
return
Get
<
RB_Teaching_BonusDetail_ViewModel
>(
sql
).
ToList
();
return
Get
<
RB_Teaching_BonusDetail_ViewModel
>(
sql
).
ToList
();
}
}
/// <summary>
/// 获取课时费奖励总金额
/// </summary>
/// <param name="id"></param>
/// <param name="group_Id"></param>
/// <returns></returns>
public
decimal
GetTeachingBonusTotalMoney
(
int
id
,
int
group_Id
)
{
string
sql
=
$@" select SUM(bd.Money) AS Money
from RB_Teaching_BonusDetail bd
INNER JOIN rb_teaching_bonus b on bd.BonusId = b.Id
where bd.Status=0 and bd.Group_Id =
{
group_Id
}
AND b.State=2 AND bd.TeacherId =
{
id
}
"
;
var
obj
=
ExecuteScalar
(
sql
);
return
obj
==
null
?
0
:
Convert
.
ToInt32
(
obj
);
}
/// <summary>
/// 获取课时费发放的最后一个月
/// </summary>
/// <param name="id"></param>
/// <param name="group_Id"></param>
/// <returns></returns>
public
string
GetTeachingBonusLastlyMonth
(
int
id
,
int
group_Id
)
{
string
sql
=
$@"select b.`Month`
from RB_Teaching_BonusDetail bd
INNER JOIN rb_teaching_bonus b on bd.BonusId = b.Id
where bd.Status=0 and bd.Group_Id =
{
group_Id
}
AND b.State=2 AND bd.TeacherId =
{
id
}
ORDER BY bd.CreateTime DESC LIMIT 1"
;
var
obj
=
ExecuteScalar
(
sql
);
return
obj
==
null
?
""
:
obj
.
ToString
();
}
/// <summary>
/// 获取累积金额
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public
decimal
GetTeachingBonusDetailTotalMoney
(
RB_Teaching_BonusDetail_ViewModel
demodel
)
{
string
where
=
$@" 1=1 and bd.Status=0"
;
if
(
demodel
.
Group_Id
>
0
)
{
where
+=
$@" and bd.
{
nameof
(
RB_Teaching_BonusDetail
.
Group_Id
)}
=
{
demodel
.
Group_Id
}
"
;
}
if
(
demodel
.
School_Id
>
0
)
{
where
+=
$@" and bd.
{
nameof
(
RB_Teaching_BonusDetail
.
School_Id
)}
=
{
demodel
.
School_Id
}
"
;
}
if
(
demodel
.
BonusId
>
0
)
{
where
+=
$@" and bd.
{
nameof
(
RB_Teaching_BonusDetail
.
BonusId
)}
=
{
demodel
.
BonusId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
BonusIds
))
{
where
+=
$@" and bd.
{
nameof
(
RB_Teaching_BonusDetail
.
BonusId
)}
in(
{
demodel
.
BonusIds
}
)"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
Month
))
{
where
+=
$@" and b.
{
nameof
(
RB_Teaching_Bonus
.
Month
)}
='
{
demodel
.
Month
}
'"
;
}
if
(
demodel
.
TeacherId
>
0
)
{
where
+=
$@" and bd.
{
nameof
(
RB_Teaching_BonusDetail
.
TeacherId
)}
=
{
demodel
.
TeacherId
}
"
;
}
if
(
demodel
.
ClassId
>
0
)
{
where
+=
$@" and bd.
{
nameof
(
RB_Teaching_BonusDetail
.
ClassId
)}
=
{
demodel
.
ClassId
}
"
;
}
if
(
demodel
.
Type
>
0
)
{
where
+=
$@" and bd.
{
nameof
(
RB_Teaching_BonusDetail
.
Type
)}
=
{
demodel
.
Type
}
"
;
}
string
sql
=
$@" select sum(bd.Money) as Money from RB_Teaching_BonusDetail bd
inner join rb_teaching_bonus b on bd.BonusId = b.Id
where
{
where
}
"
;
var
obj
=
ExecuteScalar
(
sql
);
return
obj
==
null
?
0
:
Convert
.
ToDecimal
(
obj
);
}
}
}
}
}
Edu.Repository/Course/RB_Teaching_BonusRepository.cs
View file @
e64f459f
using
Edu.Common.Enum
;
using
Edu.Common.Enum
;
using
Edu.Model.Entity.Course
;
using
Edu.Model.Entity.Course
;
using
Edu.Model.ViewModel.Course
;
using
Edu.Model.ViewModel.Course
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
...
@@ -83,5 +84,23 @@ namespace Edu.Repository.Course
...
@@ -83,5 +84,23 @@ namespace Edu.Repository.Course
string
sql
=
$@" select * from RB_Teaching_Bonus where
{
where
}
order by Id desc"
;
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
();
return
GetPage
<
RB_Teaching_Bonus_ViewModel
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
}
}
/// <summary>
/// 获取教师最近几月的走势图
/// </summary>
/// <param name="id"></param>
/// <param name="group_Id"></param>
/// <param name="monthStr"></param>
/// <returns></returns>
public
List
<
RB_Teaching_Bonus_ViewModel
>
GetTeachingBonusLastlyChart
(
int
id
,
int
group_Id
,
string
monthStr
)
{
string
sql
=
$@"select b.`Month`,SUM(bd.Money) AS Money
from RB_Teaching_BonusDetail bd
INNER JOIN rb_teaching_bonus b on bd.BonusId = b.Id
where bd.`Status`=0 AND bd.Group_Id =
{
group_Id
}
AND b.State=2 AND bd.TeacherId =
{
id
}
AND b.`Month` in (
{
monthStr
}
)
GROUP BY b.`Month` ORDER BY b.`Month` DESC"
;
return
Get
<
RB_Teaching_Bonus_ViewModel
>(
sql
).
ToList
();
}
}
}
}
}
Edu.Repository/Course/RB_Teaching_PerfRepository.cs
View file @
e64f459f
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
using
Edu.Model.Entity.Course
;
using
Edu.Model.Entity.Course
;
using
Edu.Model.Entity.User
;
using
Edu.Model.Entity.User
;
using
Edu.Model.ViewModel.Course
;
using
Edu.Model.ViewModel.Course
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
...
@@ -166,5 +167,83 @@ left join rb_class c on p.ClassId = c.ClassId
...
@@ -166,5 +167,83 @@ left join rb_class c on p.ClassId = c.ClassId
where
{
where
}
order by p.Id desc"
;
where
{
where
}
order by p.Id desc"
;
return
GetPage
<
RB_Teaching_Perf_ViewModel
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
return
GetPage
<
RB_Teaching_Perf_ViewModel
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
}
}
/// <summary>
/// 获取统计金额
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public
decimal
GetMyTeachingPerfTotalMoney
(
RB_Teaching_Perf_ViewModel
demodel
)
{
string
where
=
$@" 1=1 and p.Status =0"
;
if
(
demodel
.
Group_Id
>
0
)
{
where
+=
$@" and p.
{
nameof
(
RB_Teaching_Perf
.
Group_Id
)}
=
{
demodel
.
Group_Id
}
"
;
}
if
(
demodel
.
School_Id
>
0
)
{
where
+=
$@" and p.
{
nameof
(
RB_Teaching_Perf
.
School_Id
)}
=
{
demodel
.
School_Id
}
"
;
}
if
(
demodel
.
ClassId
>
0
)
{
where
+=
$@" and p.
{
nameof
(
RB_Teaching_Perf
.
ClassId
)}
=
{
demodel
.
ClassId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
ClassName
))
{
where
+=
$@" and c.
{
nameof
(
RB_Class
.
ClassName
)}
like '%
{
demodel
.
ClassName
}
%'"
;
}
if
(
demodel
.
TeacherId
>
0
)
{
where
+=
$@" and p.
{
nameof
(
RB_Teaching_Perf
.
TeacherId
)}
=
{
demodel
.
TeacherId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
TeacherName
))
{
where
+=
$@" and t.
{
nameof
(
RB_Teacher
.
TeacherName
)}
like '%
{
demodel
.
TeacherName
}
%'"
;
}
if
(
demodel
.
PerfState
>
0
)
{
where
+=
$@" and p.
{
nameof
(
RB_Teaching_Perf
.
PerfState
)}
=
{(
int
)
demodel
.
PerfState
}
"
;
}
if
(
demodel
.
Q_IsCreateFinance
==
1
)
{
where
+=
$@" and p.
{
nameof
(
RB_Teaching_Perf
.
FinanceId
)}
>0"
;
}
else
if
(
demodel
.
Q_IsCreateFinance
==
2
)
{
where
+=
$@" and p.
{
nameof
(
RB_Teaching_Perf
.
FinanceId
)}
=0"
;
}
if
(
demodel
.
Q_IsComfirm
==
1
)
{
where
+=
$@" and p.
{
nameof
(
RB_Teaching_Perf
.
PerfState
)}
=2"
;
}
else
if
(
demodel
.
Q_IsComfirm
==
2
)
{
where
+=
$@" and p.
{
nameof
(
RB_Teaching_Perf
.
PerfState
)}
in(1,3)"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
StartTime
))
{
where
+=
$@" and p.
{
nameof
(
RB_Teaching_Perf
.
EndDate
)}
>='
{
demodel
.
StartTime
}
'"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
EndTime
))
{
where
+=
$@" and p.
{
nameof
(
RB_Teaching_Perf
.
EndDate
)}
<='
{
demodel
.
EndTime
}
23:59:59'"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
OPStartTime
))
{
where
+=
$@" and p.
{
nameof
(
RB_Teaching_Perf
.
ConfirmDate
)}
>='
{
demodel
.
OPStartTime
}
'"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
OPEndTime
))
{
where
+=
$@" and p.
{
nameof
(
RB_Teaching_Perf
.
ConfirmDate
)}
<='
{
demodel
.
OPEndTime
}
23:59:59'"
;
}
string
sql
=
$@" select sum(p.Money) as Money from RB_Teaching_Perf p
left join rb_teacher t on p.TeacherId = t.TId
left join rb_class c on p.ClassId = c.ClassId
where
{
where
}
"
;
var
obj
=
ExecuteScalar
(
sql
);
return
obj
==
null
?
0
:
Convert
.
ToDecimal
(
obj
);
}
}
}
}
}
Edu.WebApi/Controllers/Course/TeachingRewardsController.cs
View file @
e64f459f
...
@@ -741,5 +741,187 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -741,5 +741,187 @@ namespace Edu.WebApi.Controllers.Course
}
}
#
endregion
#
endregion
#
region
我的统计
/// <summary>
/// 获取我的教师奖励统计
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetMyTeachingBonusStatistics
()
{
var
userInfo
=
base
.
UserInfo
;
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
int
MonthNum
=
parms
.
GetInt
(
"MonthNum"
,
6
);
//
if
(
MonthNum
<
1
)
{
return
ApiResult
.
ParamIsNull
();
}
return
teachingRewardsModule
.
GetMyTeachingBonusStatistics
(
MonthNum
,
userInfo
);
}
/// <summary>
/// 获取历史课时费上涨分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetMyTeachingBonusHistoryPageList
()
{
var
userInfo
=
base
.
UserInfo
;
var
pageModel
=
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
dmodel
=
JsonHelper
.
DeserializeObject
<
RB_Teaching_Perf_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
dmodel
.
Group_Id
=
userInfo
.
Group_Id
;
dmodel
.
Q_IsComfirm
=
1
;
dmodel
.
TeacherId
=
teachingRewardsModule
.
GetAccountTeacherId
(
userInfo
.
Id
);
if
(
dmodel
.
TeacherId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"非教师,无法查询"
);
}
var
list
=
teachingRewardsModule
.
GetMyTeachingBonusHistoryPageList
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
count
,
dmodel
);
pageModel
.
Count
=
Convert
.
ToInt32
(
count
);
pageModel
.
PageData
=
list
.
Select
(
x
=>
new
{
x
.
Id
,
x
.
BaseHourFee
,
x
.
AddHourFee
,
x
.
BaseStuNum
,
x
.
AddStuNum
,
x
.
ClassName
,
x
.
ConfirmDate
,
ConfirmDateStr
=
x
.
ConfirmDate
.
HasValue
?
x
.
ConfirmDate
.
Value
.
ToString
(
"yyyy-MM-dd"
)
:
""
,
x
.
FullClassRate
,
x
.
AvgCheckRate
,
x
.
ClassHours
});
return
ApiResult
.
Success
(
""
,
pageModel
);
}
/// <summary>
/// 获取我的教师奖励明细
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetMyTeachingBonusDetailList
()
{
var
userInfo
=
base
.
UserInfo
;
var
pageModel
=
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
dmodel
=
JsonHelper
.
DeserializeObject
<
RB_Teaching_BonusDetail_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
dmodel
.
Group_Id
=
userInfo
.
Group_Id
;
if
(
string
.
IsNullOrEmpty
(
dmodel
.
Month
))
{
return
ApiResult
.
ParamIsNull
(
"请传递期数"
);
}
dmodel
.
Q_BonusConfirm
=
1
;
dmodel
.
Month
=
Convert
.
ToDateTime
(
dmodel
.
Month
).
ToString
(
"yyyy-MM"
);
dmodel
.
TeacherId
=
teachingRewardsModule
.
GetAccountTeacherId
(
userInfo
.
Id
);
if
(
dmodel
.
TeacherId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"非教师,无法查询"
);
}
var
list
=
teachingRewardsModule
.
GetMyTeachingBonusDetailPageList
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
count
,
dmodel
);
decimal
TotalMoney
=
teachingRewardsModule
.
GetTeachingBonusDetailTotalMoney
(
dmodel
);
return
ApiResult
.
Success
(
""
,
new
{
List
=
list
.
Select
(
x
=>
new
{
x
.
Id
,
Date
=
x
.
Date
.
ToString
(
"yyyy-MM-dd"
),
x
.
ClassId
,
x
.
ClassName
,
x
.
Type
,
x
.
CourseHour
,
x
.
UnitPrice
,
x
.
CheckInNum
,
x
.
Money
}),
TotalMoney
});
}
/// <summary>
/// 教师绩效分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetMyTeachingPerfPageList
()
{
var
userInfo
=
base
.
UserInfo
;
var
pageModel
=
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
dmodel
=
JsonHelper
.
DeserializeObject
<
RB_Teaching_Perf_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
dmodel
.
Group_Id
=
userInfo
.
Group_Id
;
dmodel
.
Q_IsComfirm
=
1
;
dmodel
.
TeacherId
=
teachingRewardsModule
.
GetAccountTeacherId
(
userInfo
.
Id
);
if
(
dmodel
.
TeacherId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"非教师,无法查询"
);
}
var
list
=
teachingRewardsModule
.
GetTeachingPerfPageList
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
count
,
dmodel
);
decimal
TotalMoney
=
teachingRewardsModule
.
GetMyTeachingPerfTotalMoney
(
dmodel
);
pageModel
.
Count
=
Convert
.
ToInt32
(
count
);
pageModel
.
PageData
=
new
{
List
=
list
.
Select
(
x
=>
new
{
x
.
Id
,
x
.
BaseHourFee
,
x
.
AddHourFee
,
x
.
BaseStuNum
,
x
.
AddStuNum
,
x
.
ClassName
,
x
.
ClassPeopelNum
,
x
.
EndDate
,
x
.
ConfirmDate
,
x
.
FullClassRate
,
x
.
AvgCheckRate
,
x
.
ClassHours
,
x
.
UnitPrice
,
x
.
Money
,
x
.
PerfState
,
PerfStateName
=
x
.
PerfState
.
ToName
(),
JJList
=
x
.
JJList
.
OrderBy
(
z
=>
z
.
StartValue
).
Select
(
z
=>
new
{
z
.
Id
,
z
.
StartValue
,
z
.
EndValue
,
FullClassList
=
z
.
FullClassList
.
OrderBy
(
y
=>
y
.
StartValue
).
Select
(
y
=>
new
{
y
.
Id
,
y
.
StartValue
,
y
.
EndValue
,
y
.
ClassMoney
,
y
.
PeopelNum
})
}),
JJFullRate
=
GetFullRateList
(
x
.
JJList
).
Select
(
y
=>
new
{
y
.
Id
,
y
.
StartValue
,
y
.
EndValue
}),
KSList
=
x
.
KSList
.
OrderBy
(
z
=>
z
.
StartValue
).
Select
(
z
=>
new
{
z
.
Id
,
z
.
StartValue
,
z
.
EndValue
,
FullClassList
=
z
.
FullClassList
.
OrderBy
(
y
=>
y
.
StartValue
).
Select
(
y
=>
new
{
y
.
Id
,
y
.
StartValue
,
y
.
EndValue
,
y
.
ClassMoney
,
y
.
PeopelNum
})
}),
KSFullRate
=
GetFullRateList
(
x
.
KSList
).
Select
(
y
=>
new
{
y
.
Id
,
y
.
StartValue
,
y
.
EndValue
}),
}),
TotalMoney
};
return
ApiResult
.
Success
(
""
,
pageModel
);
}
#
endregion
}
}
}
}
Edu.WebApi/Controllers/User/WorkFlowController.cs
View file @
e64f459f
...
@@ -39,7 +39,7 @@ namespace Edu.WebApi.Controllers.User
...
@@ -39,7 +39,7 @@ namespace Edu.WebApi.Controllers.User
/// 获取审批流程模板
/// 获取审批流程模板
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
public
ApiResult
AuditWorkFlowTemplate
()
public
ApiResult
Get
AuditWorkFlowTemplate
()
{
{
int
empId
=
Convert
.
ToInt32
(
RequestParm
.
Uid
);
int
empId
=
Convert
.
ToInt32
(
RequestParm
.
Uid
);
List
<
Rb_Workflow_Template_Extend
>
wfTemplateList
=
workFlowModule
.
GetTemplateByEmpId
(
empId
);
List
<
Rb_Workflow_Template_Extend
>
wfTemplateList
=
workFlowModule
.
GetTemplateByEmpId
(
empId
);
...
@@ -150,7 +150,7 @@ namespace Edu.WebApi.Controllers.User
...
@@ -150,7 +150,7 @@ namespace Edu.WebApi.Controllers.User
List
<
string
>
resultImgList
=
new
List
<
string
>();
List
<
string
>
resultImgList
=
new
List
<
string
>();
foreach
(
var
item
in
imgList
)
foreach
(
var
item
in
imgList
)
{
{
resultImgList
.
Add
(
Config
.
GetOssFileUrl
+
item
);
resultImgList
.
Add
(
item
);
}
}
FormDataModel
image
=
new
FormDataModel
()
FormDataModel
image
=
new
FormDataModel
()
{
{
...
@@ -501,7 +501,7 @@ namespace Edu.WebApi.Controllers.User
...
@@ -501,7 +501,7 @@ namespace Edu.WebApi.Controllers.User
List
<
string
>
resultImgList
=
new
List
<
string
>();
List
<
string
>
resultImgList
=
new
List
<
string
>();
foreach
(
var
item
in
imgList
)
foreach
(
var
item
in
imgList
)
{
{
resultImgList
.
Add
(
Config
.
GetOssFileUrl
+
item
);
resultImgList
.
Add
(
item
);
}
}
FormDataModel
image
=
new
FormDataModel
()
FormDataModel
image
=
new
FormDataModel
()
{
{
...
@@ -587,7 +587,7 @@ namespace Edu.WebApi.Controllers.User
...
@@ -587,7 +587,7 @@ namespace Edu.WebApi.Controllers.User
List
<
string
>
resultImgList
=
new
List
<
string
>();
List
<
string
>
resultImgList
=
new
List
<
string
>();
foreach
(
var
item
in
imgList
)
foreach
(
var
item
in
imgList
)
{
{
resultImgList
.
Add
(
Config
.
GetOssFileUrl
+
item
);
resultImgList
.
Add
(
item
);
}
}
FormDataModel
image
=
new
FormDataModel
()
FormDataModel
image
=
new
FormDataModel
()
{
{
...
@@ -619,7 +619,7 @@ namespace Edu.WebApi.Controllers.User
...
@@ -619,7 +619,7 @@ namespace Edu.WebApi.Controllers.User
/// 计算时长
/// 计算时长
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
public
ApiResult
CalculateDuration
()
public
ApiResult
Get
CalculateDuration
()
{
{
int
empId
=
Convert
.
ToInt32
(
RequestParm
.
Uid
);
int
empId
=
Convert
.
ToInt32
(
RequestParm
.
Uid
);
Rb_Workflow_Askforleave_Extend
askforleave
=
JsonConvert
.
DeserializeObject
<
Rb_Workflow_Askforleave_Extend
>(
RequestParm
.
Msg
.
ToString
());
Rb_Workflow_Askforleave_Extend
askforleave
=
JsonConvert
.
DeserializeObject
<
Rb_Workflow_Askforleave_Extend
>(
RequestParm
.
Msg
.
ToString
());
...
@@ -846,7 +846,7 @@ namespace Edu.WebApi.Controllers.User
...
@@ -846,7 +846,7 @@ namespace Edu.WebApi.Controllers.User
}
}
TempleteId
=
askmodel
.
TemplateId
??
0
;
TempleteId
=
askmodel
.
TemplateId
??
0
;
Proposer
=
askmodel
.
EmName
;
Proposer
=
askmodel
.
EmName
;
ProposerPhoto
=
Config
.
GetFileUrl
(
askmodel
.
EmPhoto
)
;
ProposerPhoto
=
askmodel
.
EmPhoto
;
StatusStr
=
askmodel
.
Status
.
ToName
();
StatusStr
=
askmodel
.
Status
.
ToName
();
Status
=
(
int
)
askmodel
.
Status
;
Status
=
(
int
)
askmodel
.
Status
;
CreateBy
=
askmodel
.
CreateBy
??
0
;
CreateBy
=
askmodel
.
CreateBy
??
0
;
...
@@ -907,7 +907,7 @@ namespace Edu.WebApi.Controllers.User
...
@@ -907,7 +907,7 @@ namespace Edu.WebApi.Controllers.User
List
<
string
>
ImageList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
askmodel
.
Image
);
List
<
string
>
ImageList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
askmodel
.
Image
);
for
(
var
i
=
0
;
i
<
ImageList
.
Count
;
i
++)
for
(
var
i
=
0
;
i
<
ImageList
.
Count
;
i
++)
{
{
ImageList
[
i
]
=
Config
.
GetFileUrl
(
ImageList
[
i
])
;
ImageList
[
i
]
=
ImageList
[
i
]
;
}
}
aimodel
=
new
AuditInfoModel
()
aimodel
=
new
AuditInfoModel
()
{
{
...
@@ -937,7 +937,7 @@ namespace Edu.WebApi.Controllers.User
...
@@ -937,7 +937,7 @@ namespace Edu.WebApi.Controllers.User
}
}
TempleteId
=
evemodel
.
TemplateId
??
0
;
TempleteId
=
evemodel
.
TemplateId
??
0
;
Proposer
=
evemodel
.
EmName
;
Proposer
=
evemodel
.
EmName
;
ProposerPhoto
=
Config
.
GetFileUrl
(
evemodel
.
EmPhoto
)
;
ProposerPhoto
=
evemodel
.
EmPhoto
;
StatusStr
=
evemodel
.
Status
.
ToName
();
StatusStr
=
evemodel
.
Status
.
ToName
();
Status
=
(
int
)
evemodel
.
Status
;
Status
=
(
int
)
evemodel
.
Status
;
CreateBy
=
evemodel
.
CreateBy
??
0
;
CreateBy
=
evemodel
.
CreateBy
??
0
;
...
@@ -1063,7 +1063,7 @@ namespace Edu.WebApi.Controllers.User
...
@@ -1063,7 +1063,7 @@ namespace Edu.WebApi.Controllers.User
}
}
TempleteId
=
gooutmodel
.
TemplateId
??
0
;
TempleteId
=
gooutmodel
.
TemplateId
??
0
;
Proposer
=
gooutmodel
.
EmName
;
Proposer
=
gooutmodel
.
EmName
;
ProposerPhoto
=
Config
.
GetFileUrl
(
gooutmodel
.
EmPhoto
)
;
ProposerPhoto
=
gooutmodel
.
EmPhoto
;
StatusStr
=
gooutmodel
.
Status
.
ToName
();
StatusStr
=
gooutmodel
.
Status
.
ToName
();
Status
=
(
int
)
gooutmodel
.
Status
;
Status
=
(
int
)
gooutmodel
.
Status
;
CreateBy
=
gooutmodel
.
CreateBy
??
0
;
CreateBy
=
gooutmodel
.
CreateBy
??
0
;
...
@@ -1118,7 +1118,7 @@ namespace Edu.WebApi.Controllers.User
...
@@ -1118,7 +1118,7 @@ namespace Edu.WebApi.Controllers.User
List
<
string
>
ImageList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
gooutmodel
.
Image
);
List
<
string
>
ImageList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
gooutmodel
.
Image
);
for
(
var
i
=
0
;
i
<
ImageList
.
Count
;
i
++)
for
(
var
i
=
0
;
i
<
ImageList
.
Count
;
i
++)
{
{
ImageList
[
i
]
=
Config
.
GetFileUrl
(
ImageList
[
i
])
;
ImageList
[
i
]
=
ImageList
[
i
]
;
}
}
aimodel
=
new
AuditInfoModel
()
aimodel
=
new
AuditInfoModel
()
{
{
...
@@ -1150,7 +1150,7 @@ namespace Edu.WebApi.Controllers.User
...
@@ -1150,7 +1150,7 @@ namespace Edu.WebApi.Controllers.User
ReissuecardType
=
ReissueCardmodel
.
ReissuecardType
.
HasValue
?
ReissueCardmodel
.
ReissuecardType
.
Value
.
ToString
()
:
""
;
ReissuecardType
=
ReissueCardmodel
.
ReissuecardType
.
HasValue
?
ReissueCardmodel
.
ReissuecardType
.
Value
.
ToString
()
:
""
;
TempleteId
=
ReissueCardmodel
.
TemplateId
??
0
;
TempleteId
=
ReissueCardmodel
.
TemplateId
??
0
;
Proposer
=
ReissueCardmodel
.
EmName
;
Proposer
=
ReissueCardmodel
.
EmName
;
ProposerPhoto
=
Config
.
GetFileUrl
(
ReissueCardmodel
.
EmPhoto
)
;
ProposerPhoto
=
ReissueCardmodel
.
EmPhoto
;
StatusStr
=
ReissueCardmodel
.
Status
.
ToName
();
StatusStr
=
ReissueCardmodel
.
Status
.
ToName
();
Status
=
(
int
)
ReissueCardmodel
.
Status
;
Status
=
(
int
)
ReissueCardmodel
.
Status
;
CreateBy
=
ReissueCardmodel
.
CreateBy
??
0
;
CreateBy
=
ReissueCardmodel
.
CreateBy
??
0
;
...
@@ -1197,7 +1197,7 @@ namespace Edu.WebApi.Controllers.User
...
@@ -1197,7 +1197,7 @@ namespace Edu.WebApi.Controllers.User
List
<
string
>
ImageList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
ReissueCardmodel
.
Image
);
List
<
string
>
ImageList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
ReissueCardmodel
.
Image
);
for
(
var
i
=
0
;
i
<
ImageList
.
Count
;
i
++)
for
(
var
i
=
0
;
i
<
ImageList
.
Count
;
i
++)
{
{
ImageList
[
i
]
=
Config
.
GetFileUrl
(
ImageList
[
i
])
;
ImageList
[
i
]
=
ImageList
[
i
]
;
}
}
aimodel
=
new
AuditInfoModel
()
aimodel
=
new
AuditInfoModel
()
{
{
...
@@ -1270,7 +1270,7 @@ namespace Edu.WebApi.Controllers.User
...
@@ -1270,7 +1270,7 @@ namespace Edu.WebApi.Controllers.User
StatusColor
=
GetStatusColor
(
y
.
AuditStatus
),
StatusColor
=
GetStatusColor
(
y
.
AuditStatus
),
y
.
Description
,
y
.
Description
,
Image
=
GetImagePath
(
y
.
Image
),
Image
=
GetImagePath
(
y
.
Image
),
AuditEmPhoto
=
y
.
AuditEmPhoto
==
""
?
""
:
Config
.
GetFileUrl
(
y
.
AuditEmPhoto
)
,
AuditEmPhoto
=
y
.
AuditEmPhoto
==
""
?
""
:
y
.
AuditEmPhoto
,
AuditTime
=
y
.
AuditStatus
==
WFRrocessStatus
.
NotAudit
?
""
:
y
.
AuditStatus
==
WFRrocessStatus
.
Rejected
?
""
:
y
.
UpdateTime
.
HasValue
?
y
.
UpdateTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm"
)
:
""
,
AuditTime
=
y
.
AuditStatus
==
WFRrocessStatus
.
NotAudit
?
""
:
y
.
AuditStatus
==
WFRrocessStatus
.
Rejected
?
""
:
y
.
UpdateTime
.
HasValue
?
y
.
UpdateTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm"
)
:
""
,
CareOfList
=
JsonConvert
.
DeserializeObject
<
List
<
SetCareOfModel
>>(
y
.
CareOfRemarks
??
""
)
CareOfList
=
JsonConvert
.
DeserializeObject
<
List
<
SetCareOfModel
>>(
y
.
CareOfRemarks
??
""
)
})
})
...
@@ -1284,7 +1284,7 @@ namespace Edu.WebApi.Controllers.User
...
@@ -1284,7 +1284,7 @@ namespace Edu.WebApi.Controllers.User
CopyToPeopleList
=
CopyToPeopleList
.
Select
(
x
=>
new
CopyToPeopleList
=
CopyToPeopleList
.
Select
(
x
=>
new
{
{
x
.
EmName
,
x
.
EmName
,
EmPhoto
=
x
.
EmPhoto
==
""
?
""
:
Config
.
GetFileUrl
(
x
.
EmPhoto
)
,
EmPhoto
=
x
.
EmPhoto
==
""
?
""
:
x
.
EmPhoto
,
x
.
EmployeeId
x
.
EmployeeId
})
})
});
});
...
@@ -1302,7 +1302,7 @@ namespace Edu.WebApi.Controllers.User
...
@@ -1302,7 +1302,7 @@ namespace Edu.WebApi.Controllers.User
List
<
string
>
pathList
=
new
List
<
string
>();
List
<
string
>
pathList
=
new
List
<
string
>();
foreach
(
string
item
in
pathstr
)
foreach
(
string
item
in
pathstr
)
{
{
string
Newpath
=
Config
.
GetFileUrl
(
item
)
;
string
Newpath
=
item
;
pathList
.
Add
(
Newpath
);
pathList
.
Add
(
Newpath
);
}
}
return
JsonConvert
.
SerializeObject
(
pathList
);
return
JsonConvert
.
SerializeObject
(
pathList
);
...
@@ -1441,7 +1441,7 @@ namespace Edu.WebApi.Controllers.User
...
@@ -1441,7 +1441,7 @@ namespace Edu.WebApi.Controllers.User
/// 我的审批
/// 我的审批
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
public
ApiResult
MyAudit
()
public
ApiResult
Get
MyAudit
()
{
{
int
empId
=
Convert
.
ToInt32
(
RequestParm
.
Uid
);
int
empId
=
Convert
.
ToInt32
(
RequestParm
.
Uid
);
JObject
parm
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
JObject
parm
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
...
@@ -1481,7 +1481,7 @@ namespace Edu.WebApi.Controllers.User
...
@@ -1481,7 +1481,7 @@ namespace Edu.WebApi.Controllers.User
/// 我发起的审批
/// 我发起的审批
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
public
ApiResult
MyInitiateAudit
()
public
ApiResult
Get
MyInitiateAudit
()
{
{
int
empId
=
Convert
.
ToInt32
(
RequestParm
.
Uid
);
int
empId
=
Convert
.
ToInt32
(
RequestParm
.
Uid
);
JObject
parm
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
JObject
parm
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
...
@@ -1539,7 +1539,7 @@ namespace Edu.WebApi.Controllers.User
...
@@ -1539,7 +1539,7 @@ namespace Edu.WebApi.Controllers.User
/// 抄送我的审批
/// 抄送我的审批
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
public
ApiResult
CopyToMyAudit
()
public
ApiResult
Get
CopyToMyAudit
()
{
{
int
empId
=
Convert
.
ToInt32
(
RequestParm
.
Uid
);
int
empId
=
Convert
.
ToInt32
(
RequestParm
.
Uid
);
JObject
parm
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
JObject
parm
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
...
...
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