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
bd7ce160
Commit
bd7ce160
authored
Dec 21, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
教育调整
parent
4e26bced
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
81 additions
and
7 deletions
+81
-7
RB_Teaching_Rewards_Rate_ViewModel.cs
...el/ViewModel/Course/RB_Teaching_Rewards_Rate_ViewModel.cs
+1
-1
TeachingRewardsModule.cs
Edu.Module.Course/TeachingRewardsModule.cs
+49
-1
RB_ClassRepository.cs
Edu.Repository/Course/RB_ClassRepository.cs
+1
-1
TeachingRewardsController.cs
Edu.WebApi/Controllers/Course/TeachingRewardsController.cs
+30
-4
No files found.
Edu.Model/ViewModel/Course/RB_Teaching_Rewards_Rate_ViewModel.cs
View file @
bd7ce160
...
@@ -15,7 +15,7 @@ namespace Edu.Model.ViewModel.Course
...
@@ -15,7 +15,7 @@ namespace Edu.Model.ViewModel.Course
public
List
<
RB_Teaching_Rewards_Rate_ViewModel
>
FullClassList
{
get
;
set
;
}
public
List
<
RB_Teaching_Rewards_Rate_ViewModel
>
FullClassList
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 增加课时费
/// 增加课时费
/奖金
/// </summary>
/// </summary>
public
decimal
ClassMoney
{
get
;
set
;
}
public
decimal
ClassMoney
{
get
;
set
;
}
...
...
Edu.Module.Course/TeachingRewardsModule.cs
View file @
bd7ce160
...
@@ -558,6 +558,19 @@ namespace Edu.Module.Course
...
@@ -558,6 +558,19 @@ namespace Edu.Module.Course
{
{
LogHelper
.
Write
(
ex
,
"SetTeachingBonusAdd"
);
LogHelper
.
Write
(
ex
,
"SetTeachingBonusAdd"
);
teaching_BonusDetailRepository
.
DBSession
.
Rollback
();
teaching_BonusDetailRepository
.
DBSession
.
Rollback
();
#
region
取消创建的奖励
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Teaching_Bonus_ViewModel
.
State
),
BonusStateEnum
.
Cancel
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Teaching_Bonus_ViewModel
.
Id
),
FiledValue
=
bonusId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
teaching_BonusRepository
.
Update
(
keyValues
,
wheres
);
#
endregion
return
"出错了,请联系管理员"
;
return
"出错了,请联系管理员"
;
}
}
}
}
...
@@ -982,7 +995,7 @@ namespace Edu.Module.Course
...
@@ -982,7 +995,7 @@ namespace Edu.Module.Course
//获取班级类型
//获取班级类型
var
list
=
teaching_Rewards_BaseRepository
.
GetList
(
new
RB_Teaching_Rewards_Base_ViewModel
()
{
Group_Id
=
classModel
.
Group_Id
});
var
list
=
teaching_Rewards_BaseRepository
.
GetList
(
new
RB_Teaching_Rewards_Base_ViewModel
()
{
Group_Id
=
classModel
.
Group_Id
});
var
baseModel
=
list
.
Where
(
x
=>
(
","
+
x
.
ClassTypeIds
+
","
).
Contains
(
","
+
classModel
.
ClassType
+
","
)).
FirstOrDefault
();
var
baseModel
=
list
.
Where
(
x
=>
(
","
+
x
.
ClassTypeIds
+
","
).
Contains
(
","
+
classModel
.
ClassType
+
","
)).
FirstOrDefault
();
if
(
baseModel
==
null
)
{
return
"班级类型
为
匹配到"
;
}
if
(
baseModel
==
null
)
{
return
"班级类型
未
匹配到"
;
}
var
typeModel
=
class_TypeRepository
.
GetEntity
(
classModel
.
ClassType
);
var
typeModel
=
class_TypeRepository
.
GetEntity
(
classModel
.
ClassType
);
//获取奖金 课时费 比例
//获取奖金 课时费 比例
...
@@ -1252,6 +1265,41 @@ namespace Edu.Module.Course
...
@@ -1252,6 +1265,41 @@ namespace Edu.Module.Course
return
msg
;
return
msg
;
}
}
/// <summary>
/// 发送绩效通知
/// </summary>
/// <param name="perfId"></param>
/// <param name="userInfo"></param>
/// <returns></returns>
public
string
SetTeachingPerfPush
(
int
perfId
,
UserInfo
userInfo
)
{
var
perfModel
=
teaching_PerfRepository
.
GetEntity
(
perfId
);
if
(
perfModel
==
null
||
perfModel
.
Status
!=
0
)
{
return
"绩效不存在"
;
}
if
(
perfModel
.
PerfState
!=
PerfStateEnum
.
Confirmed
)
{
return
"绩效状态不正确"
;
}
var
teacherModel
=
teacherRepository
.
GetTeacherList
(
perfModel
.
TeacherId
.
ToString
()).
FirstOrDefault
();
if
(
teacherModel
==
null
)
{
return
"教师不存在"
;
}
//给教师发送通知
//写入日志
changeLogRepository
.
Insert
(
new
Model
.
Entity
.
Log
.
RB_User_ChangeLog
()
{
Id
=
0
,
Type
=
1
,
CreateBy
=
userInfo
.
Id
,
CreateTime
=
DateTime
.
Now
,
Group_Id
=
userInfo
.
Group_Id
,
LogContent
=
"发送教师绩效通知【"
+
perfId
+
"】"
,
School_Id
=
userInfo
.
School_Id
,
SourceId
=
0
});
return
""
;
}
#
endregion
#
endregion
}
}
}
}
Edu.Repository/Course/RB_ClassRepository.cs
View file @
bd7ce160
...
@@ -221,7 +221,6 @@ WHERE 1=1
...
@@ -221,7 +221,6 @@ WHERE 1=1
"
);
"
);
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Class_ViewModel
.
Status
),
0
);
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Class_ViewModel
.
Status
),
0
);
builder
.
AppendFormat
(
" AND A.{0} in(1,2) "
,
nameof
(
RB_Class_ViewModel
.
ClassStatus
));
builder
.
AppendFormat
(
" AND A.{0} in(1,2) "
,
nameof
(
RB_Class_ViewModel
.
ClassStatus
));
builder
.
AppendFormat
(
" AND A.{0} >='{1}' "
,
nameof
(
RB_Class_ViewModel
.
EndOrderTime
),
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
));
if
(
query
!=
null
)
if
(
query
!=
null
)
{
{
if
(
query
.
Group_Id
>
0
)
if
(
query
.
Group_Id
>
0
)
...
@@ -270,6 +269,7 @@ WHERE 1=1
...
@@ -270,6 +269,7 @@ WHERE 1=1
if
(
query
.
Q_CanApply
==
1
)
if
(
query
.
Q_CanApply
==
1
)
{
{
builder
.
AppendFormat
(
" AND (IFNULL(A.ClassPersion,0)-IFNULL(t.GuestNum,0))>0 "
);
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"
));
}
}
}
}
builder
.
AppendFormat
(
" order by A.{0} asc"
,
nameof
(
RB_Class_ViewModel
.
OpenTime
));
builder
.
AppendFormat
(
" order by A.{0} asc"
,
nameof
(
RB_Class_ViewModel
.
OpenTime
));
...
...
Edu.WebApi/Controllers/Course/TeachingRewardsController.cs
View file @
bd7ce160
...
@@ -438,10 +438,10 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -438,10 +438,10 @@ namespace Edu.WebApi.Controllers.Course
{
{
return
ApiResult
.
ParamIsNull
(
"请选择月份"
);
return
ApiResult
.
ParamIsNull
(
"请选择月份"
);
}
}
//
if (Convert.ToDateTime(dmodel.Month) >= Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM")))
if
(
Convert
.
ToDateTime
(
dmodel
.
Month
)
>=
Convert
.
ToDateTime
(
DateTime
.
Now
.
ToString
(
"yyyy-MM"
)))
//
{
{
//
return ApiResult.ParamIsNull("只能选择之前月份");
return
ApiResult
.
ParamIsNull
(
"只能选择之前月份"
);
//
}
}
if
(
string
.
IsNullOrEmpty
(
dmodel
.
TeacherIds
))
if
(
string
.
IsNullOrEmpty
(
dmodel
.
TeacherIds
))
{
{
return
ApiResult
.
ParamIsNull
(
"请选择老师"
);
return
ApiResult
.
ParamIsNull
(
"请选择老师"
);
...
@@ -714,6 +714,32 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -714,6 +714,32 @@ namespace Edu.WebApi.Controllers.Course
}
}
}
}
/// <summary>
/// 绩效消息推送
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetTeachingPerfPush
()
{
var
userInfo
=
base
.
UserInfo
;
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
int
PerfId
=
parms
.
GetInt
(
"PerfId"
,
0
);
if
(
PerfId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
string
msg
=
teachingRewardsModule
.
SetTeachingPerfPush
(
PerfId
,
userInfo
);
if
(
msg
==
""
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
(
msg
);
}
}
#
endregion
#
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