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
9ef31386
Commit
9ef31386
authored
May 07, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
622ed4f0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
7 deletions
+64
-7
RB_Duty_Content_ViewModel.cs
Edu.Model/ViewModel/Duty/RB_Duty_Content_ViewModel.cs
+5
-0
DutyPlanModule.cs
Edu.Module.Duty/DutyPlanModule.cs
+59
-7
No files found.
Edu.Model/ViewModel/Duty/RB_Duty_Content_ViewModel.cs
View file @
9ef31386
...
...
@@ -20,5 +20,10 @@ namespace Edu.Model.ViewModel.Duty
/// 值班计划编号【查询使用】
/// </summary>
public
string
QPlanIds
{
get
;
set
;
}
/// <summary>
/// 是否可以修改和删除(1-可修改可删除)
/// </summary>
public
int
IsOperate
{
get
;
set
;
}
}
}
Edu.Module.Duty/DutyPlanModule.cs
View file @
9ef31386
...
...
@@ -137,10 +137,14 @@ namespace Edu.Module.Duty
subItem
.
DutyItemList
=
new
List
<
RB_Duty_Item_ViewModel
>();
foreach
(
var
dItem
in
dutyContentList
.
Where
(
qitem
=>
qitem
.
PlanId
==
item
.
Id
&&
qitem
.
PlanShift
==
subItem
.
Shift
))
{
subItem
.
DutyItemList
.
Add
(
new
RB_Duty_Item_ViewModel
var
dutyItem
=
dutyItemList
?.
Where
(
qitem
=>
qitem
.
Shifts
.
Contains
(
subItem
.
Shift
.
ToString
())
&&
qitem
.
Id
==
dItem
.
ItemId
&&
qitem
.
ItemSchools
.
Contains
(
item
.
School_Id
.
ToString
()))?.
FirstOrDefault
();
if
(
dutyItem
!=
null
)
{
ItemName
=
dutyItemList
.
Where
(
qitem
=>
qitem
.
Id
==
dItem
.
ItemId
)?.
FirstOrDefault
()?.
ItemName
??
""
});
subItem
.
DutyItemList
.
Add
(
new
RB_Duty_Item_ViewModel
{
ItemName
=
dutyItem
?.
ItemName
??
""
});
}
}
}
else
...
...
@@ -578,13 +582,61 @@ namespace Edu.Module.Duty
pList
.
Add
(
pObj
);
}
}
result
.
Add
(
"WorkList"
,
pList
);
//突发事项列表
result
.
Add
(
"EmergenciesList"
,
contentList
?.
Where
(
qitem
=>
qitem
.
PlanType
==
3
)?.
ToList
()
??
new
List
<
RB_Duty_Content_ViewModel
>());
List
<
object
>
EmergenciesList
=
new
List
<
object
>();
foreach
(
var
item
in
model
.
PlanDetails
)
{
if
(
item
.
Id
!=
currentModel
.
Id
)
{
var
tempEmergenciesList
=
contentList
?.
Where
(
qitem
=>
qitem
.
PlanType
==
3
&&
qitem
.
PlanId
==
item
.
PlanId
&&
qitem
.
PlanShift
==
item
.
Shift
)?.
ToList
()
??
new
List
<
RB_Duty_Content_ViewModel
>();
if
(
tempEmergenciesList
!=
null
&&
tempEmergenciesList
.
Count
>
0
)
{
tempEmergenciesList
.
ForEach
(
item
=>
item
.
IsOperate
=
0
);
EmergenciesList
.
AddRange
(
tempEmergenciesList
);
}
}
else
{
var
tempEmergenciesList
=
contentList
?.
Where
(
qitem
=>
qitem
.
PlanType
==
3
&&
qitem
.
PlanId
==
item
.
PlanId
&&
qitem
.
PlanShift
==
item
.
Shift
)?.
ToList
()
??
new
List
<
RB_Duty_Content_ViewModel
>();
if
(
tempEmergenciesList
!=
null
&&
tempEmergenciesList
.
Count
>
0
)
{
tempEmergenciesList
.
ForEach
(
item
=>
item
.
IsOperate
=
1
);
EmergenciesList
.
AddRange
(
tempEmergenciesList
);
}
}
}
result
.
Add
(
"EmergenciesList"
,
EmergenciesList
);
//交接事项
result
.
Add
(
"HandoverList"
,
contentList
?.
Where
(
qitem
=>
qitem
.
PlanType
==
2
)?.
ToList
()
??
new
List
<
RB_Duty_Content_ViewModel
>());
List
<
object
>
HandoverList
=
new
List
<
object
>();
foreach
(
var
item
in
model
.
PlanDetails
)
{
if
(
item
.
Id
!=
currentModel
.
Id
)
{
if
(
item
.
Status
==
2
)
{
var
tempHandOverList
=
contentList
?.
Where
(
qitem
=>
qitem
.
PlanType
==
2
&&
qitem
.
PlanId
==
item
.
PlanId
&&
qitem
.
PlanShift
==
item
.
Shift
)?.
ToList
()
??
new
List
<
RB_Duty_Content_ViewModel
>();
if
(
tempHandOverList
!=
null
&&
tempHandOverList
.
Count
>
0
)
{
tempHandOverList
.
ForEach
(
item
=>
item
.
IsOperate
=
0
);
HandoverList
.
AddRange
(
tempHandOverList
);
}
}
}
else
{
var
tempHandOverList
=
contentList
?.
Where
(
qitem
=>
qitem
.
PlanType
==
2
&&
qitem
.
PlanId
==
item
.
PlanId
&&
qitem
.
PlanShift
==
item
.
Shift
)?.
ToList
()
??
new
List
<
RB_Duty_Content_ViewModel
>();
if
(
tempHandOverList
!=
null
&&
tempHandOverList
.
Count
>
0
)
{
tempHandOverList
.
ForEach
(
item
=>
item
.
IsOperate
=
1
);
HandoverList
.
AddRange
(
tempHandOverList
);
}
}
}
result
.
Add
(
"HandoverList"
,
HandoverList
);
result
.
Add
(
"ReciveMan"
,
nextModel
?.
DutyManName
??
""
);
result
.
Add
(
"GiveMan"
,
previousModel
?.
DutyManName
??
""
);
...
...
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