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
cca4b30b
Commit
cca4b30b
authored
Jul 12, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
parents
a1ac606e
6ed9a120
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
3 deletions
+42
-3
ClassModule.cs
Edu.Module.Course/ClassModule.cs
+29
-0
RB_Change_ClassPlanRepository.cs
Edu.Repository/EduTask/RB_Change_ClassPlanRepository.cs
+1
-1
ClassController.cs
Edu.WebApi/Controllers/Course/ClassController.cs
+9
-0
ChangePlanController.cs
Edu.WebApi/Controllers/EduTask/ChangePlanController.cs
+3
-2
No files found.
Edu.Module.Course/ClassModule.cs
View file @
cca4b30b
...
...
@@ -7,6 +7,7 @@ using Edu.Model.ViewModel.Course;
using
Edu.Model.ViewModel.Reserve
;
using
Edu.Model.ViewModel.User
;
using
Edu.Repository.Course
;
using
Edu.Repository.Finance
;
using
Edu.Repository.Log
;
using
Edu.Repository.Reserve
;
using
Edu.Repository.User
;
...
...
@@ -96,6 +97,10 @@ namespace Edu.Module.Course
/// </summary>
private
readonly
RB_Class_ConfigRepository
class_ConfigRepository
=
new
RB_Class_ConfigRepository
();
/// <summary>
/// 教育月结轧账
/// </summary>
private
readonly
RB_RollingAccountRepository
rollingAccountRepository
=
new
RB_RollingAccountRepository
();
/// <summary>
/// 课程基础配置
...
...
@@ -3170,5 +3175,29 @@ namespace Edu.Module.Course
}
#
endregion
#
region
财务轧账
/// <summary>
/// 验证是否可以修改签到数据
/// </summary>
/// <param name="monthStr"></param>
/// <param name="schoolId"></param>
/// <param name="group_Id"></param>
/// <returns></returns>
public
string
ValidateClassCheckFinance
(
string
monthStr
,
int
schoolId
,
int
group_Id
)
{
var
ralist
=
rollingAccountRepository
.
GetList
(
new
Model
.
ViewModel
.
Finance
.
RB_RollingAccount_Extend
()
{
GroupId
=
group_Id
,
Month
=
monthStr
,
State
=
1
});
if
(
ralist
.
Any
())
{
if
(
ralist
.
Where
(
x
=>
x
.
SchoolIds
==
"-1"
||
(
","
+
x
.
SchoolIds
+
","
).
Contains
(
","
+
schoolId
+
","
)).
Any
())
{
return
"该单据所在交易日期已关帐,无法修改签到数据"
;
}
}
return
""
;
}
#
endregion
}
}
Edu.Repository/EduTask/RB_Change_ClassPlanRepository.cs
View file @
cca4b30b
...
...
@@ -464,7 +464,7 @@ WHERE 1=1
new
Model
.
Entity
.
Log
.
RB_Class_Log
()
{
LogType
=
Common
.
Enum
.
Course
.
ClassLogTypeEnum
.
Class
,
LogContent
=
"从"
+
allChangePlanModel
.
OpenTimeStr
+
"开始
重新排课"
,
LogContent
=
"从"
+
allChangePlanModel
.
OpenTimeStr
+
"开始
"
+
(
Common
.
Plugin
.
EnumHelper
.
ToName
(
allChangePlanModel
.
ClassStyle
))
,
ClassId
=
model
.
ClassId
,
Group_Id
=
model
.
Group_Id
,
School_Id
=
model
.
School_Id
,
...
...
Edu.WebApi/Controllers/Course/ClassController.cs
View file @
cca4b30b
...
...
@@ -912,6 +912,15 @@ namespace Edu.WebApi.Controllers.Course
{
return
ApiResult
.
ParamIsNull
(
message
:
"请选择签到学员!"
);
}
#
region
验证是否已轧账
string
MonthStr
=
list
.
FirstOrDefault
().
ClassDate
.
ToString
(
"yyyy-MM"
);
int
schoolId
=
list
.
FirstOrDefault
().
School_Id
;
string
ValidateMsg
=
classModule
.
ValidateClassCheckFinance
(
MonthStr
,
schoolId
,
base
.
UserInfo
.
Group_Id
);
if
(
ValidateMsg
!=
""
)
{
return
ApiResult
.
Failed
(
ValidateMsg
);
}
#
endregion
//获取班级的学员信息
var
orderGuestList
=
classModule
.
GetOrderGuestListModule
(
new
RB_Order_Guest_ViewModel
{
Group_Id
=
base
.
UserInfo
.
Group_Id
,
ClassId
=
list
.
FirstOrDefault
().
ClassId
,
QEffectStatus
=
1
});
if
(
list
.
Count
()
!=
orderGuestList
.
Where
(
x
=>
x
.
GuestState
==
1
).
Count
())
...
...
Edu.WebApi/Controllers/EduTask/ChangePlanController.cs
View file @
cca4b30b
...
...
@@ -48,6 +48,7 @@ namespace Edu.WebApi.Controllers.EduTask
ChangeType
=
base
.
ParmJObj
.
GetInt
(
"ChangeType"
),
MoveType
=
base
.
ParmJObj
.
GetInt
(
"MoveType"
),
};
var
classModel
=
classModule
.
GetClassModule
(
model
.
ClassId
);
try
{
if
(
model
.
MoveType
==
1
)
...
...
@@ -238,7 +239,7 @@ namespace Edu.WebApi.Controllers.EduTask
{
return
ApiResult
.
Failed
(
"请输入排课信息"
);
}
var
classModel
=
classModule
.
GetClassModule
(
model
.
ClassId
);
if
(
classModel
!=
null
&&
classModel
.
ClassId
>
0
)
{
//获取课时分钟数
model
.
AllChangePlanModel
.
ClassHourMinute
=
classModel
?.
ClassHourMinute
??
0
;
...
...
@@ -304,7 +305,7 @@ namespace Edu.WebApi.Controllers.EduTask
model
.
CreateBy
=
base
.
UserInfo
.
Id
;
model
.
CreateTime
=
DateTime
.
Now
;
model
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
model
.
School_Id
=
base
.
UserInfo
.
School_Id
;
model
.
School_Id
=
classModel
.
School_Id
;
}
model
.
UpdateBy
=
base
.
UserInfo
.
Id
;
model
.
UpdateTime
=
DateTime
.
Now
;
...
...
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