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
211d1d75
Commit
211d1d75
authored
Jul 30, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
9e293249
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
695 additions
and
219 deletions
+695
-219
ClassModule.cs
Edu.Module.Course/ClassModule.cs
+1
-205
ChangeClassPlanModule.cs
Edu.Module.EduTask/ChangeClassPlanModule.cs
+417
-2
RB_Class_PlanRepository.cs
Edu.Repository/Course/RB_Class_PlanRepository.cs
+227
-1
RB_Class_RoomRepository.cs
Edu.Repository/Course/RB_Class_RoomRepository.cs
+4
-4
ChangePlanController.cs
Edu.WebApi/Controllers/EduTask/ChangePlanController.cs
+46
-7
No files found.
Edu.Module.Course/ClassModule.cs
View file @
211d1d75
This diff is collapsed.
Click to expand it.
Edu.Module.EduTask/ChangeClassPlanModule.cs
View file @
211d1d75
This diff is collapsed.
Click to expand it.
Edu.Repository/Course/RB_Class_PlanRepository.cs
View file @
211d1d75
This diff is collapsed.
Click to expand it.
Edu.Repository/Course/RB_Class_RoomRepository.cs
View file @
211d1d75
...
@@ -76,10 +76,10 @@ WHERE 1=1
...
@@ -76,10 +76,10 @@ WHERE 1=1
{
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Class_Room_ViewModel
.
Group_Id
),
query
.
Group_Id
);
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Class_Room_ViewModel
.
Group_Id
),
query
.
Group_Id
);
}
}
if
(
query
.
School_Id
>
0
)
//
if (query.School_Id > 0)
{
//
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Class_Room_ViewModel
.
School_Id
),
query
.
School_Id
);
//
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Class_Room_ViewModel.School_Id), query.School_Id);
}
//
}
if
(!
string
.
IsNullOrEmpty
(
query
.
RoomName
))
if
(!
string
.
IsNullOrEmpty
(
query
.
RoomName
))
{
{
builder
.
AppendFormat
(
" AND A.{0} LIKE @RoomName "
,
nameof
(
RB_Class_Room_ViewModel
.
RoomName
));
builder
.
AppendFormat
(
" AND A.{0} LIKE @RoomName "
,
nameof
(
RB_Class_Room_ViewModel
.
RoomName
));
...
...
Edu.WebApi/Controllers/EduTask/ChangePlanController.cs
View file @
211d1d75
...
@@ -49,7 +49,6 @@ namespace Edu.WebApi.Controllers.EduTask
...
@@ -49,7 +49,6 @@ namespace Edu.WebApi.Controllers.EduTask
MoveType
=
base
.
ParmJObj
.
GetInt
(
"MoveType"
),
MoveType
=
base
.
ParmJObj
.
GetInt
(
"MoveType"
),
Remarks
=
base
.
ParmJObj
.
GetStringValue
(
"Remarks"
)
Remarks
=
base
.
ParmJObj
.
GetStringValue
(
"Remarks"
)
};
};
if
(
model
.
ClassId
<=
0
)
if
(
model
.
ClassId
<=
0
)
{
{
return
ApiResult
.
ParamIsNull
(
message
:
"请选择要调整的班级!"
);
return
ApiResult
.
ParamIsNull
(
message
:
"请选择要调整的班级!"
);
...
@@ -58,7 +57,7 @@ namespace Edu.WebApi.Controllers.EduTask
...
@@ -58,7 +57,7 @@ namespace Edu.WebApi.Controllers.EduTask
string
receiptFile
=
string
.
Empty
;
string
receiptFile
=
string
.
Empty
;
try
try
{
{
List
<
string
>
receiptFileList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
string
>>(
base
.
ParmJObj
.
GetStringValue
(
"ReceiptFileList"
));
List
<
string
>
receiptFileList
=
JsonHelper
.
DeserializeObject
<
List
<
string
>>(
base
.
ParmJObj
.
GetStringValue
(
"ReceiptFileList"
));
if
(
receiptFileList
==
null
||
!
receiptFileList
.
Any
())
if
(
receiptFileList
==
null
||
!
receiptFileList
.
Any
())
{
{
receiptFile
=
""
;
receiptFile
=
""
;
...
@@ -69,8 +68,8 @@ namespace Edu.WebApi.Controllers.EduTask
...
@@ -69,8 +68,8 @@ namespace Edu.WebApi.Controllers.EduTask
}
}
if
(
model
.
MoveType
==
1
)
if
(
model
.
MoveType
==
1
)
{
{
model
.
OldChangePlanItemList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
ChangePlanItem
>>(
base
.
ParmJObj
.
GetStringValue
(
"OldChangePlanItemList"
));
model
.
OldChangePlanItemList
=
JsonHelper
.
DeserializeObject
<
List
<
ChangePlanItem
>>(
base
.
ParmJObj
.
GetStringValue
(
"OldChangePlanItemList"
));
model
.
NewChangePlanItemList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
ChangePlanItem
>>(
base
.
ParmJObj
.
GetStringValue
(
"NewChangePlanItemList"
));
model
.
NewChangePlanItemList
=
JsonHelper
.
DeserializeObject
<
List
<
ChangePlanItem
>>(
base
.
ParmJObj
.
GetStringValue
(
"NewChangePlanItemList"
));
}
}
else
else
{
{
...
@@ -83,7 +82,6 @@ namespace Edu.WebApi.Controllers.EduTask
...
@@ -83,7 +82,6 @@ namespace Edu.WebApi.Controllers.EduTask
}
}
model
.
TakeEffectTime
=
Convert
.
ToDateTime
(
takeEffectTime
);
model
.
TakeEffectTime
=
Convert
.
ToDateTime
(
takeEffectTime
);
}
}
model
.
AllChangePlanModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
AllChangePlanItem
>(
base
.
ParmJObj
.
GetStringValue
(
"AllChangePlanItem"
));
model
.
AllChangePlanModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
AllChangePlanItem
>(
base
.
ParmJObj
.
GetStringValue
(
"AllChangePlanItem"
));
}
}
}
}
...
@@ -91,7 +89,9 @@ namespace Edu.WebApi.Controllers.EduTask
...
@@ -91,7 +89,9 @@ namespace Edu.WebApi.Controllers.EduTask
{
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"SetChangeClassPlan"
);
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"SetChangeClassPlan"
);
}
}
if
(
model
.
MoveType
==
1
)
//固定日期
List
<
TimeItem
>
timeList
=
new
List
<
TimeItem
>();
//固定日期
if
(
model
.
MoveType
==
1
)
{
{
if
(
model
.
ChangeType
==
1
)
//调课
if
(
model
.
ChangeType
==
1
)
//调课
{
{
...
@@ -99,6 +99,7 @@ namespace Edu.WebApi.Controllers.EduTask
...
@@ -99,6 +99,7 @@ namespace Edu.WebApi.Controllers.EduTask
{
{
return
ApiResult
.
Failed
(
"排课原次数与现有次数不一致"
);
return
ApiResult
.
Failed
(
"排课原次数与现有次数不一致"
);
}
}
}
}
else
if
(
model
.
ChangeType
==
2
)
else
if
(
model
.
ChangeType
==
2
)
{
{
...
@@ -114,8 +115,31 @@ namespace Edu.WebApi.Controllers.EduTask
...
@@ -114,8 +115,31 @@ namespace Edu.WebApi.Controllers.EduTask
return
ApiResult
.
Failed
(
"请选择教室"
);
return
ApiResult
.
Failed
(
"请选择教室"
);
}
}
}
}
//固定日期上课计划验证冲突
timeList
=
new
List
<
TimeItem
>();
foreach
(
var
item
in
model
.
NewChangePlanItemList
)
{
foreach
(
var
subItem
in
item
.
PlanTimeList
)
{
timeList
.
Add
(
new
TimeItem
{
StartTime
=
Common
.
ConvertHelper
.
FormatDate
(
item
.
ClassDate
)
+
" "
+
subItem
.
StartTime
+
":00"
,
EndTime
=
Common
.
ConvertHelper
.
FormatDate
(
item
.
ClassDate
)
+
" "
+
subItem
.
EndTime
+
":00"
,
});
}
}
if
(
timeList
!=
null
&&
timeList
.
Count
>
0
)
{
//var objList = changeClassPlanModule.GetRepeatListModule(model.ClassId, model.NewChangePlanItemList, timeList);
//if (objList != null && objList.Count > 0)
//{
// return ApiResult.Failed("存在上课计划冲突的数据!", data: objList);
//}
}
}
}
else
//全局修改
//全局修改
else
{
{
if
(
model
.
ChangeType
==
1
)
if
(
model
.
ChangeType
==
1
)
{
{
...
@@ -201,6 +225,11 @@ namespace Edu.WebApi.Controllers.EduTask
...
@@ -201,6 +225,11 @@ namespace Edu.WebApi.Controllers.EduTask
{
{
return
ApiResult
.
Failed
(
"班级信息不存在"
);
return
ApiResult
.
Failed
(
"班级信息不存在"
);
}
}
//var dateList = changeClassPlanModule.GetAllDateAndTimeRepeatListModule(model.ClassId, model.AllChangePlanModel,base.UserInfo);
//if (dateList != null && dateList.Count > 0)
//{
// return ApiResult.Failed("存在上课计划冲突的数据!", data: dateList);
//}
}
}
else
if
(
model
.
ChangeType
==
2
)
else
if
(
model
.
ChangeType
==
2
)
{
{
...
@@ -208,6 +237,11 @@ namespace Edu.WebApi.Controllers.EduTask
...
@@ -208,6 +237,11 @@ namespace Edu.WebApi.Controllers.EduTask
{
{
return
ApiResult
.
Failed
(
"请选择老师"
);
return
ApiResult
.
Failed
(
"请选择老师"
);
}
}
//var teacherlist = changeClassPlanModule.GetAllRepeatListModule(model.ClassId, Common.ConvertHelper.FormatDate(model.TakeEffectTime), TeacherId: model.AllChangePlanModel.TeacherId);
//if (teacherlist != null && teacherlist.Count > 0)
//{
// return ApiResult.Failed("存在上课计划冲突的数据!", data: teacherlist);
//}
}
}
else
if
(
model
.
ChangeType
==
3
)
else
if
(
model
.
ChangeType
==
3
)
{
{
...
@@ -215,6 +249,11 @@ namespace Edu.WebApi.Controllers.EduTask
...
@@ -215,6 +249,11 @@ namespace Edu.WebApi.Controllers.EduTask
{
{
return
ApiResult
.
Failed
(
"请选择教室"
);
return
ApiResult
.
Failed
(
"请选择教室"
);
}
}
//var classroomlist = changeClassPlanModule.GetAllRepeatListModule(model.ClassId, Common.ConvertHelper.FormatDate(model.TakeEffectTime), ClassRoomId: model.AllChangePlanModel.ClassRoomId);
//if (classroomlist != null && classroomlist.Count > 0)
//{
// return ApiResult.Failed("存在上课计划冲突的数据!", data: classroomlist);
//}
}
}
}
}
if
(
model
.
OldChangePlanItemList
!=
null
&&
model
.
OldChangePlanItemList
.
Any
())
if
(
model
.
OldChangePlanItemList
!=
null
&&
model
.
OldChangePlanItemList
.
Any
())
...
...
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