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
8626d680
Commit
8626d680
authored
Jul 13, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
5eb7bb12
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
15 deletions
+25
-15
ClassModule.cs
Edu.Module.Course/ClassModule.cs
+23
-12
ClassController.cs
Edu.WebApi/Controllers/Course/ClassController.cs
+2
-3
No files found.
Edu.Module.Course/ClassModule.cs
View file @
8626d680
...
...
@@ -1055,20 +1055,31 @@ namespace Edu.Module.Course
/// <param name="ClassPlanId"></param>
/// <param name="UserInfo">用户信息</param>
/// <returns></returns>
public
bool
RemoveClassPlanModule
(
int
ClassPlanId
,
UserInfo
UserInfo
)
[
TransactionCallHandler
]
public
virtual
bool
RemoveClassPlanModule
(
int
ClassPlanId
,
UserInfo
UserInfo
,
out
string
message
)
{
bool
flag
=
false
;
message
=
""
;
var
planModel
=
class_PlanRepository
.
GetEntity
(
ClassPlanId
);
classLogRepository
.
AddClassLogRepository
(
new
Model
.
Entity
.
Log
.
RB_Class_Log
()
{
LogType
=
Common
.
Enum
.
Course
.
ClassLogTypeEnum
.
Class
,
LogContent
=
"删除【"
+
Common
.
ConvertHelper
.
FormatDate
(
planModel
?.
ClassDate
)
+
"】上课计划"
,
ClassId
=
planModel
.
ClassId
,
CreateBy
=
UserInfo
.
Id
,
Group_Id
=
UserInfo
.
Group_Id
,
School_Id
=
UserInfo
.
School_Id
,
});
UpdateClassEndDateModule
(
planModel
.
ClassId
);
return
class_PlanRepository
.
DeleteOne
(
new
WhereHelper
(
nameof
(
RB_Class_Plan_ViewModel
.
ClassPlanId
),
ClassPlanId
));
if
(
planModel
!=
null
)
{
classLogRepository
.
AddClassLogRepository
(
new
Model
.
Entity
.
Log
.
RB_Class_Log
()
{
LogType
=
Common
.
Enum
.
Course
.
ClassLogTypeEnum
.
Class
,
LogContent
=
"删除【"
+
Common
.
ConvertHelper
.
FormatDate
(
planModel
?.
ClassDate
)
+
"】上课计划"
,
ClassId
=
planModel
.
ClassId
,
CreateBy
=
UserInfo
.
Id
,
Group_Id
=
UserInfo
.
Group_Id
,
School_Id
=
UserInfo
.
School_Id
,
});
flag
=
UpdateClassEndDateModule
(
planModel
.
ClassId
);
flag
=
class_PlanRepository
.
DeleteOne
(
new
WhereHelper
(
nameof
(
RB_Class_Plan_ViewModel
.
ClassPlanId
),
ClassPlanId
));
}
else
{
message
=
"此上课计划不存在,请刷新后再试!"
;
}
return
flag
;
}
/// <summary>
...
...
Edu.WebApi/Controllers/Course/ClassController.cs
View file @
8626d680
...
...
@@ -637,9 +637,8 @@ namespace Edu.WebApi.Controllers.Course
public
ApiResult
RemoveClassPlan
()
{
var
ClassPlanId
=
base
.
ParmJObj
.
GetInt
(
"ClassPlanId"
);
var
flag
=
classModule
.
RemoveClassPlanModule
(
ClassPlanId
,
base
.
UserInfo
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
var
flag
=
classModule
.
RemoveClassPlanModule
(
ClassPlanId
,
base
.
UserInfo
,
out
string
message
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
(
message
:
message
);
}
/// <summary>
...
...
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