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
57d4bd8c
Commit
57d4bd8c
authored
May 07, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
982b291a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
DutyPlanController.cs
Edu.WebApi/Controllers/Duty/DutyPlanController.cs
+13
-2
No files found.
Edu.WebApi/Controllers/Duty/DutyPlanController.cs
View file @
57d4bd8c
...
...
@@ -93,7 +93,7 @@ namespace Edu.WebApi.Controllers.Duty
[
HttpPost
]
public
ApiResult
GetMyDutyPlanPage
()
{
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
7
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
query
=
new
RB_Duty_Plan_ViewModel
()
{
School_Id
=
base
.
ParmJObj
.
GetInt
(
"School_Id"
),
...
...
@@ -108,6 +108,7 @@ namespace Edu.WebApi.Controllers.Duty
{
item
.
CreateByName
=
UserReidsCache
.
GetUserLoginInfo
(
item
.
CreateBy
)?.
AccountName
??
""
;
}
//当前班次
var
currentModel
=
new
RB_Duty_PlanDetails_ViewModel
();
//上一个班次
...
...
@@ -117,7 +118,17 @@ namespace Edu.WebApi.Controllers.Duty
if
(
item
.
PlanDetails
!=
null
&&
item
.
PlanDetails
.
Count
>
0
)
{
//当前值班人员索引
int
currentIndex
=
item
.
PlanDetails
.
FindIndex
(
qitem
=>
qitem
.
DutyMan
==
base
.
UserInfo
.
Id
);
int
currentIndex
=
0
;
var
currentDayNow
=
Convert
.
ToDateTime
(
Common
.
ConvertHelper
.
FormatDate
(
item
.
Date
)
+
" "
+
DateTime
.
Now
.
ToString
(
"HH:mm:ss"
));
for
(
var
i
=
0
;
i
<
item
.
PlanDetails
.
Count
;
i
++)
{
var
sStartTime
=
Convert
.
ToDateTime
(
Common
.
ConvertHelper
.
FormatDate
(
item
.
Date
)
+
" "
+
item
.
PlanDetails
[
i
].
StartTime
);
var
sEndTime
=
Convert
.
ToDateTime
(
Common
.
ConvertHelper
.
FormatDate
(
item
.
Date
)
+
" "
+
item
.
PlanDetails
[
i
].
EndTime
);
if
(
currentDayNow
>=
sStartTime
&&
currentDayNow
<=
sEndTime
&&
item
.
PlanDetails
[
i
].
DutyMan
==
base
.
UserInfo
.
Id
)
{
currentIndex
=
i
;
}
}
//上一个班次索引
int
previousIndex
=
currentIndex
-
1
;
//下一个班次索引
...
...
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