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
aca713f3
Commit
aca713f3
authored
May 10, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
9a308c62
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
87 additions
and
61 deletions
+87
-61
DutyPlanModule.cs
Edu.Module.Duty/DutyPlanModule.cs
+78
-31
DutyPlanController.cs
Edu.WebApi/Controllers/Duty/DutyPlanController.cs
+9
-30
No files found.
Edu.Module.Duty/DutyPlanModule.cs
View file @
aca713f3
This diff is collapsed.
Click to expand it.
Edu.WebApi/Controllers/Duty/DutyPlanController.cs
View file @
aca713f3
...
@@ -127,43 +127,22 @@ namespace Edu.WebApi.Controllers.Duty
...
@@ -127,43 +127,22 @@ namespace Edu.WebApi.Controllers.Duty
//当前班次
//当前班次
var
currentModel
=
new
RB_Duty_PlanDetails_ViewModel
();
var
currentModel
=
new
RB_Duty_PlanDetails_ViewModel
();
//上一个班次(交班)
//上一个班次(交班)
var
previousModel
=
new
RB_Duty_PlanDetails_ViewModel
();
var
previousModel
=
new
List
<
RB_Duty_PlanDetails_ViewModel
>
();
//下一个班次(接班)
//下一个班次(接班)
var
nextModel
=
new
RB_Duty_PlanDetails_ViewModel
();
var
nextModel
=
new
List
<
RB_Duty_PlanDetails_ViewModel
>();
//当前值班人员索引
var
dic
=
dutyPlanModule
.
CalcCurrentDutyManIndexModule_V3
(
item
);
int
currentIndex
=
0
;
//当前班次
if
(
item
.
PlanDetails
!=
null
&&
item
.
PlanDetails
.
Count
>
0
)
currentModel
=
dic
[
"current"
].
FirstOrDefault
();
{
currentIndex
=
dutyPlanModule
.
CalcCurrentDutyManIndexModule_V2
(
item
);
//上一个班次索引
int
previousIndex
=
currentIndex
-
1
;
//下一个班次索引
int
nextIndex
=
currentIndex
+
1
;
//当前班次
currentModel
=
item
.
PlanDetails
[
currentIndex
];
//上一个班次
if
(
previousIndex
>=
0
)
{
previousModel
=
item
.
PlanDetails
[
previousIndex
];
}
//下一个班次
if
(
nextIndex
<
item
.
PlanDetails
.
Count
)
{
nextModel
=
item
.
PlanDetails
[
nextIndex
];
}
}
string
jiaoBanMan
=
""
;
//交班人
string
jiaoBanMan
=
""
;
//交班人
string
jieBanMan
=
""
;
//接班人
string
jieBanMan
=
""
;
//接班人
if
(
nextModel
!=
null
&&
nextModel
.
Id
>
0
)
if
(
dic
[
"next"
]
!=
null
&&
dic
[
"next"
].
Count
>
0
)
{
{
jieBanMan
=
nextModel
?.
DutyManName
??
""
;
jieBanMan
=
string
.
Join
(
","
,
dic
[
"next"
].
Select
(
qitem
=>
qitem
.
DutyManName
))
;
}
}
if
(
previousModel
!=
null
&&
previousModel
.
Id
>
0
)
if
(
dic
[
"previous"
]
!=
null
&&
dic
[
"previous"
].
Count
>
0
)
{
{
jiaoBanMan
=
previousModel
?.
DutyManName
??
""
;
jiaoBanMan
=
string
.
Join
(
","
,
dic
[
"previous"
].
Select
(
qitem
=>
qitem
.
DutyManName
));
;
}
}
if
(
currentModel
.
Status
==
Common
.
Enum
.
Duty
.
DutyStatusEnum
.
NoStart
)
if
(
currentModel
.
Status
==
Common
.
Enum
.
Duty
.
DutyStatusEnum
.
NoStart
)
{
{
...
...
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