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
aecd0673
Commit
aecd0673
authored
3 years ago
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
老师课时制单 调整
parent
fd4bdc92
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
161 additions
and
2 deletions
+161
-2
RB_Teaching_Bonus.cs
Edu.Model/Entity/Course/RB_Teaching_Bonus.cs
+5
-0
RB_Order_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Order_ViewModel.cs
+5
-0
SellCommissionModule.cs
Edu.Module.Course/SellCommissionModule.cs
+1
-0
TeachingRewardsModule.cs
Edu.Module.Course/TeachingRewardsModule.cs
+90
-1
RB_OrderRepository.cs
Edu.Repository/Course/RB_OrderRepository.cs
+5
-1
OrderController.cs
Edu.WebApi/Controllers/Course/OrderController.cs
+1
-0
TeachingRewardsController.cs
Edu.WebApi/Controllers/Course/TeachingRewardsController.cs
+54
-0
No files found.
Edu.Model/Entity/Course/RB_Teaching_Bonus.cs
View file @
aecd0673
...
@@ -71,5 +71,10 @@ namespace Edu.Model.Entity.Course
...
@@ -71,5 +71,10 @@ namespace Edu.Model.Entity.Course
/// 更新时间
/// 更新时间
/// </summary>
/// </summary>
public
DateTime
UpdateTime
{
get
;
set
;
}
public
DateTime
UpdateTime
{
get
;
set
;
}
/// <summary>
/// 已发放人员列表
/// </summary>
public
string
EmpIds
{
get
;
set
;
}
}
}
}
}
This diff is collapsed.
Click to expand it.
Edu.Model/ViewModel/Course/RB_Order_ViewModel.cs
View file @
aecd0673
...
@@ -39,6 +39,11 @@ namespace Edu.Model.ViewModel.Course
...
@@ -39,6 +39,11 @@ namespace Edu.Model.ViewModel.Course
/// </summary>
/// </summary>
public
string
ClassName
{
get
;
set
;
}
public
string
ClassName
{
get
;
set
;
}
/// <summary>
/// 班号
/// </summary>
public
string
ClassNo
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 班级所属学校
/// 班级所属学校
/// </summary>
/// </summary>
...
...
This diff is collapsed.
Click to expand it.
Edu.Module.Course/SellCommissionModule.cs
View file @
aecd0673
...
@@ -1683,6 +1683,7 @@ namespace Edu.Module.Course
...
@@ -1683,6 +1683,7 @@ namespace Edu.Module.Course
{
{
var
model
=
sell_Commission_PeriodsRepository
.
GetEntity
(
periodId
);
var
model
=
sell_Commission_PeriodsRepository
.
GetEntity
(
periodId
);
if
(
model
==
null
)
{
return
"周期不存在"
;
}
if
(
model
==
null
)
{
return
"周期不存在"
;
}
if
(
model
.
Group_Id
!=
userInfo
.
Group_Id
)
{
return
"集团不正确"
;
}
List
<
int
>
EmpIdList
=
new
List
<
int
>();
List
<
int
>
EmpIdList
=
new
List
<
int
>();
if
(!
string
.
IsNullOrEmpty
(
model
.
EmpIds
))
if
(!
string
.
IsNullOrEmpty
(
model
.
EmpIds
))
{
{
...
...
This diff is collapsed.
Click to expand it.
Edu.Module.Course/TeachingRewardsModule.cs
View file @
aecd0673
...
@@ -850,7 +850,7 @@ namespace Edu.Module.Course
...
@@ -850,7 +850,7 @@ namespace Edu.Module.Course
}
}
}
}
return
msg
;
return
msg
;
}
}
/// <summary>
/// <summary>
/// 获取列表
/// 获取列表
...
@@ -1860,5 +1860,94 @@ namespace Edu.Module.Course
...
@@ -1860,5 +1860,94 @@ namespace Edu.Module.Course
}
}
}
}
#
endregion
#
endregion
#
region
课时费发放
/// <summary>
/// 获取课时费发放人员情况
/// </summary>
/// <param name="periodId"></param>
/// <param name="userInfo"></param>
/// <returns></returns>
public
object
GetTeachingRewardsSendEmployeeList
(
int
periodId
,
UserInfo
userInfo
)
{
var
model
=
teaching_BonusRepository
.
GetEntity
<
RB_Teaching_Bonus_ViewModel
>(
periodId
);
if
(
model
==
null
)
{
return
"周期不存在"
;
}
List
<
int
>
EmpIdList
=
new
List
<
int
>();
if
(!
string
.
IsNullOrEmpty
(
model
.
EmpIds
))
{
EmpIdList
=
JsonHelper
.
DeserializeObject
<
List
<
int
>>(
"["
+
model
.
EmpIds
+
"]"
);
}
string
bonusIds
=
periodId
.
ToString
();
//获取所有的明细
var
dlist
=
teaching_BonusDetailRepository
.
GetList
(
new
RB_Teaching_BonusDetail_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
,
BonusIds
=
bonusIds
});
//获取所有的教师
string
teacherIds
=
model
.
TeacherIds
;
var
tlist
=
teacherRepository
.
GetTeacherListRepository
(
new
RB_Teacher_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
,
QTIds
=
teacherIds
});
string
[]
teacherIdArr
=
model
.
TeacherIds
.
Split
(
","
);
List
<
object
>
RList
=
new
List
<
object
>();
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
.
TeacherId
==
teacherId
).
Sum
(
x
=>
x
.
Money
);
RList
.
Add
(
new
{
TeacherId
=
teacherId
,
TeacherName
=
teacherName
,
Money
=
money
,
IsGiveOut
=
EmpIdList
.
Contains
(
teacherId
)
?
1
:
2
});
}
return
RList
;
}
/// <summary>
/// 设置用户已发放
/// </summary>
/// <param name="periodId"></param>
/// <param name="empIds"></param>
/// <param name="userInfo"></param>
/// <returns></returns>
public
string
SetTeachingRewardsSendEmployee
(
int
periodId
,
string
empIds
,
UserInfo
userInfo
)
{
var
model
=
teaching_BonusRepository
.
GetEntity
(
periodId
);
if
(
model
==
null
)
{
return
"周期不存在"
;
}
if
(
model
.
Group_Id
!=
userInfo
.
Group_Id
)
{
return
"集团不正确"
;
}
List
<
int
>
EmpIdList
=
new
List
<
int
>();
if
(!
string
.
IsNullOrEmpty
(
model
.
EmpIds
))
{
EmpIdList
=
JsonHelper
.
DeserializeObject
<
List
<
int
>>(
"["
+
model
.
EmpIds
+
"]"
);
}
List
<
int
>
NewIdList
=
JsonHelper
.
DeserializeObject
<
List
<
int
>>(
"["
+
empIds
+
"]"
);
foreach
(
var
item
in
NewIdList
)
{
if
(
EmpIdList
.
Contains
(
item
))
{
return
"用户ID"
+
item
+
"已发放了提成,无法重复发放"
;
}
}
EmpIdList
.
AddRange
(
NewIdList
);
string
empids2
=
string
.
Join
(
","
,
EmpIdList
);
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Teaching_Bonus_ViewModel
.
EmpIds
),
empids2
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Teaching_Bonus_ViewModel
.
Id
),
FiledValue
=
periodId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
bool
flag
=
teaching_BonusRepository
.
Update
(
keyValues
,
wheres
);
return
flag
?
""
:
"出错了,请联系管理员"
;
}
#
endregion
}
}
}
}
This diff is collapsed.
Click to expand it.
Edu.Repository/Course/RB_OrderRepository.cs
View file @
aecd0673
...
@@ -193,6 +193,10 @@ ORDER BY {orderBy}
...
@@ -193,6 +193,10 @@ ORDER BY {orderBy}
{
{
where
+=
$@" and c.
{
nameof
(
RB_Class
.
ClassName
)}
like '%
{
demodel
.
ClassName
}
%'"
;
where
+=
$@" and c.
{
nameof
(
RB_Class
.
ClassName
)}
like '%
{
demodel
.
ClassName
}
%'"
;
}
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
ClassNo
))
{
where
+=
$@" and c.
{
nameof
(
RB_Class
.
ClassNo
)}
=
{
demodel
.
ClassNo
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
GuestName
))
if
(!
string
.
IsNullOrEmpty
(
demodel
.
GuestName
))
{
{
if
(
demodel
.
Group_Id
>
0
)
if
(
demodel
.
Group_Id
>
0
)
...
@@ -244,7 +248,7 @@ ORDER BY {orderBy}
...
@@ -244,7 +248,7 @@ ORDER BY {orderBy}
}
}
string
sql
=
$@"
string
sql
=
$@"
select o.*,c.ClassName,c.School_Id as ClassSchoolId,t.TeacherName,t.TeacherIcon,IFNULL(course.CourseName,'') AS CourseName,C.OpenTime
select o.*,c.ClassName,c.
ClassNo,c.
School_Id as ClassSchoolId,t.TeacherName,t.TeacherIcon,IFNULL(course.CourseName,'') AS CourseName,C.OpenTime
from RB_Order o
from RB_Order o
left join rb_class c on o.ClassId = c.ClassId
left join rb_class c on o.ClassId = c.ClassId
left join rb_teacher t on c.Teacher_Id = t.TId
left join rb_teacher t on c.Teacher_Id = t.TId
...
...
This diff is collapsed.
Click to expand it.
Edu.WebApi/Controllers/Course/OrderController.cs
View file @
aecd0673
...
@@ -1333,6 +1333,7 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -1333,6 +1333,7 @@ namespace Edu.WebApi.Controllers.Course
{
{
x
.
OrderId
,
x
.
OrderId
,
x
.
ClassId
,
x
.
ClassId
,
x
.
ClassNo
,
x
.
OrderType
,
x
.
OrderType
,
x
.
SourceId
,
x
.
SourceId
,
x
.
ClassSchoolId
,
x
.
ClassSchoolId
,
...
...
This diff is collapsed.
Click to expand it.
Edu.WebApi/Controllers/Course/TeachingRewardsController.cs
View file @
aecd0673
...
@@ -1014,5 +1014,59 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -1014,5 +1014,59 @@ namespace Edu.WebApi.Controllers.Course
}
}
#
endregion
#
endregion
#
region
课时费发放
/// <summary>
/// 获取提成可发放人员列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetTeachingRewardsSendEmployeeList
()
{
var
userInfo
=
base
.
UserInfo
;
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
int
PeriodId
=
parms
.
GetInt
(
"PeriodId"
,
0
);
//期数id
if
(
PeriodId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
var
list
=
teachingRewardsModule
.
GetTeachingRewardsSendEmployeeList
(
PeriodId
,
userInfo
);
return
ApiResult
.
Success
(
""
,
list
);
}
/// <summary>
/// 设置提成发放人员
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetTeachingRewardsSendEmployee
()
{
var
userInfo
=
base
.
UserInfo
;
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
int
PeriodId
=
parms
.
GetInt
(
"PeriodId"
,
0
);
//期数id
string
EmpIds
=
parms
.
GetStringValue
(
"EmpIds"
);
//人员列表
if
(
PeriodId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
if
(
string
.
IsNullOrEmpty
(
EmpIds
))
{
return
ApiResult
.
ParamIsNull
(
"请传递用户id"
);
}
string
msg
=
teachingRewardsModule
.
SetTeachingRewardsSendEmployee
(
PeriodId
,
EmpIds
,
userInfo
);
if
(
msg
==
""
)
{
return
ApiResult
.
Success
(
""
);
}
else
{
return
ApiResult
.
Failed
(
msg
);
}
}
#
endregion
}
}
}
}
This diff is collapsed.
Click to expand it.
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