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
62d7dd34
Commit
62d7dd34
authored
Jul 09, 2021
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
166d1ad2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
5 deletions
+26
-5
RB_Change_ClassPlan.cs
Edu.Model/Entity/EduTask/RB_Change_ClassPlan.cs
+7
-4
ChangeClassPlanModule.cs
Edu.Module.EduTask/ChangeClassPlanModule.cs
+6
-0
ChangePlanController.cs
Edu.WebApi/Controllers/EduTask/ChangePlanController.cs
+13
-1
No files found.
Edu.Model/Entity/EduTask/RB_Change_ClassPlan.cs
View file @
62d7dd34
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Text
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.EduTask
namespace
Edu.Model.Entity.EduTask
{
{
/// <summary>
/// <summary>
/// 上课计划调整实体类
/// 上课计划调整实体类
/// </summary>
/// </summary>
public
class
RB_Change_ClassPlan
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Change_ClassPlan
{
{
/// <summary>
/// <summary>
/// 主键(调课编号)
/// 主键(调课编号)
...
...
Edu.Module.EduTask/ChangeClassPlanModule.cs
View file @
62d7dd34
...
@@ -38,6 +38,12 @@ namespace Edu.Module.EduTask
...
@@ -38,6 +38,12 @@ namespace Edu.Module.EduTask
}
}
public
bool
UpdateChangeClassPlan
(
int
id
)
{
return
change_ClassPlanRepository
.
UpdateChangeClassPlan
(
id
);
}
/// <summary>
/// <summary>
/// 新增修改调课计划
/// 新增修改调课计划
/// </summary>
/// </summary>
...
...
Edu.WebApi/Controllers/EduTask/ChangePlanController.cs
View file @
62d7dd34
...
@@ -63,7 +63,8 @@ namespace Edu.WebApi.Controllers.EduTask
...
@@ -63,7 +63,8 @@ namespace Edu.WebApi.Controllers.EduTask
}
}
foreach
(
var
item
in
model
.
OldChangePlanItemList
)
foreach
(
var
item
in
model
.
OldChangePlanItemList
)
{
{
if
(
item
.
PlanTimeList
.
Count
()
!=
model
.
NewChangePlanItemList
.
Where
(
x
=>
x
.
ClassDate
==
item
.
ClassDate
).
Count
())
var
newChangePlanModel
=
model
.
NewChangePlanItemList
.
Where
(
x
=>
x
.
ClassPlanId
==
item
.
ClassPlanId
).
FirstOrDefault
();
if
(
item
.
PlanTimeList
.
Count
()
!=
newChangePlanModel
.
PlanTimeList
.
Count
())
{
{
return
ApiResult
.
Failed
(
item
.
ClassDate
.
ToString
(
"yyyy-MM-dd"
)
+
"号的排课原课时数与现有课时数不一致"
);
return
ApiResult
.
Failed
(
item
.
ClassDate
.
ToString
(
"yyyy-MM-dd"
)
+
"号的排课原课时数与现有课时数不一致"
);
}
}
...
@@ -98,5 +99,16 @@ namespace Edu.WebApi.Controllers.EduTask
...
@@ -98,5 +99,16 @@ namespace Edu.WebApi.Controllers.EduTask
bool
flag
=
changeClassPlanModule
.
SetChangeClassPlanModule
(
model
);
bool
flag
=
changeClassPlanModule
.
SetChangeClassPlanModule
(
model
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
}
public
ApiResult
TestUpdateClassPlan
()
{
int
id
=
base
.
ParmJObj
.
GetInt
(
"Id"
);
var
result
=
changeClassPlanModule
.
UpdateChangeClassPlan
(
id
);
return
ApiResult
.
Success
(
""
);
}
}
}
}
}
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