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
04fbbe1f
Commit
04fbbe1f
authored
Jun 30, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
98d30c10
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
40 deletions
+14
-40
DutyPlanModule.cs
Edu.Module.Duty/DutyPlanModule.cs
+9
-39
RB_Duty_ContentRepository.cs
Edu.Repository/Duty/RB_Duty_ContentRepository.cs
+4
-0
DutyPlanController.cs
Edu.WebApi/Controllers/Duty/DutyPlanController.cs
+1
-1
No files found.
Edu.Module.Duty/DutyPlanModule.cs
View file @
04fbbe1f
...
...
@@ -771,46 +771,15 @@ namespace Edu.Module.Duty
//当前班次
var
currentModel
=
new
RB_Duty_PlanDetails_ViewModel
();
List
<
RB_Duty_Content_ViewModel
>
otherContentList
=
new
List
<
RB_Duty_Content_ViewModel
>();
otherContentList
=
duty_ContentRepository
.
GetDutyContentListRepository
(
new
RB_Duty_Content_ViewModel
()
{
HandoverDlandetails
=
model
.
DetailId
.
ToString
()
});
if
(
model
.
PlanDetails
!=
null
&&
model
.
PlanDetails
.
Count
>
0
)
{
//查找当前人员索引
int
currentIndex
=
CalcCurrentDutyManIndexModule_V2
(
model
);
//currentIndex == 0 &&
if
(
Common
.
ConvertHelper
.
FormatDate
(
model
.
Date
)==
Common
.
ConvertHelper
.
FormatDate
(
DateTime
.
Now
))
{
var
yestoday
=
model
.
Date
.
AddDays
(-
1
);
List
<
RB_Duty_PlanDetails_ViewModel
>
y_PlanDetails
=
new
List
<
RB_Duty_PlanDetails_ViewModel
>();
var
yestodayList
=
GetMyDutyPlanPageModule
(
1
,
1000
,
out
_
,
new
RB_Duty_Plan_ViewModel
()
{
QStartDate
=
Common
.
ConvertHelper
.
FormatDate
(
yestoday
),
QEndDate
=
Common
.
ConvertHelper
.
FormatDate
(
yestoday
),
Group_Id
=
model
.
Group_Id
});
foreach
(
var
yItem
in
yestodayList
)
{
if
(
yItem
.
PlanDetails
!=
null
&&
yItem
.
PlanDetails
.
Count
>
0
)
{
y_PlanDetails
.
AddRange
(
yItem
.
PlanDetails
);
}
}
if
(
y_PlanDetails
!=
null
&&
y_PlanDetails
.
Count
>
0
)
{
string
maxTime
=
y_PlanDetails
.
Max
(
qitem
=>
qitem
.
StartTime
);
if
(!
string
.
IsNullOrEmpty
(
maxTime
))
{
var
tempContent
=
y_PlanDetails
.
Where
(
qitem
=>
qitem
.
StartTime
==
maxTime
)?.
FirstOrDefault
();
if
(
tempContent
!=
null
)
{
otherContentList
=
duty_ContentRepository
.
GetDutyContentListRepository
(
new
RB_Duty_Content_ViewModel
()
{
PlanId
=
Convert
.
ToInt32
(
tempContent
.
PlanId
),
PlanShift
=
Convert
.
ToInt32
(
tempContent
.
Shift
),
PlanType
=
2
});
}
}
}
}
//当前班次
currentModel
=
model
.
PlanDetails
[
currentIndex
];
}
...
...
@@ -1271,6 +1240,7 @@ namespace Edu.Module.Duty
item
.
PlanId
,
item
.
Shift
,
item
.
DutyMan
,
item
.
DutyManName
,
item
.
ConfigStartTime
,
item
.
ConfigEndTime
,
item
.
ShiftName
,
...
...
@@ -1292,7 +1262,7 @@ namespace Edu.Module.Duty
/// <param name="message"></param>
/// <returns></returns>
[
TransactionCallHandler
]
public
virtual
bool
DutyCheckModule
(
int
Id
,
int
Shift
,
int
DutyMan
,
int
Status
,
List
<
RB_Duty_Content_ViewModel
>
worklist
,
string
Handover
Shift
,
out
string
message
)
public
virtual
bool
DutyCheckModule
(
int
Id
,
int
Shift
,
int
DutyMan
,
int
Status
,
List
<
RB_Duty_Content_ViewModel
>
worklist
,
string
Handover
Dlandetails
,
out
string
message
)
{
message
=
""
;
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
...
...
@@ -1373,9 +1343,9 @@ namespace Edu.Module.Duty
{
flag
=
duty_ContentRepository
.
InsertBatch
(
worklist
);
}
if
(!
string
.
IsNullOrEmpty
(
Handover
Shift
))
if
(!
string
.
IsNullOrEmpty
(
Handover
Dlandetails
))
{
flag
=
duty_ContentRepository
.
UpdateHandoverShiftRepository
(
Handover
Shift
,
new
RB_Duty_Content_ViewModel
()
flag
=
duty_ContentRepository
.
UpdateHandoverShiftRepository
(
Handover
Dlandetails
,
new
RB_Duty_Content_ViewModel
()
{
PlanId
=
Id
,
PlanShift
=
Shift
,
...
...
Edu.Repository/Duty/RB_Duty_ContentRepository.cs
View file @
04fbbe1f
...
...
@@ -51,6 +51,10 @@ WHERE 1=1
{
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_Duty_Content_ViewModel
.
PlanType
),
query
.
PlanType
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
HandoverDlandetails
))
{
builder
.
AppendFormat
(
@" AND FIND_IN_SET('{0}', A.HandoverDlandetails)>0 "
,
query
.
HandoverDlandetails
);
}
}
return
Get
<
RB_Duty_Content_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
...
...
Edu.WebApi/Controllers/Duty/DutyPlanController.cs
View file @
04fbbe1f
...
...
@@ -411,7 +411,7 @@ namespace Edu.WebApi.Controllers.Duty
});
}
}
var
flag
=
dutyPlanModule
.
DutyCheckModule
(
Id
,
Shift
,
base
.
UserInfo
.
Id
,
Status
,
list
,
HandoverShift
,
out
string
message
);
var
flag
=
dutyPlanModule
.
DutyCheckModule
(
Id
,
Shift
,
base
.
UserInfo
.
Id
,
Status
,
list
,
HandoverDlandetails
,
out
string
message
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
(
message
:
message
);
}
...
...
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