Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
performance
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zry
performance
Commits
14b96f7c
Commit
14b96f7c
authored
May 10, 2023
by
ruyun.zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
考勤上报继承时更新人员字典
parent
9006f2d6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
performance/Performance.Services/PersonService.cs
+21
-0
No files found.
performance/Performance.Services/PersonService.cs
View file @
14b96f7c
...
...
@@ -37,6 +37,7 @@ public class PersonService : IAutoInjection
private
readonly
PerforHospitalRepository
perforHospitalRepository
;
private
readonly
PerforCofaccountingRepository
perforCofaccountingRepository
;
private
readonly
PerforPerAttendanceIssueRepository
_issueRepository
;
private
readonly
PerforPerAttendanceDeptReportRepository
_deptReportRepository
;
private
readonly
UserService
userService
;
private
readonly
DapperService
dapperService
;
private
readonly
Application
application
;
...
...
@@ -56,6 +57,7 @@ public class PersonService : IAutoInjection
PerforHospitalRepository
perforHospitalRepository
,
PerforCofaccountingRepository
perforCofaccountingRepository
,
PerforPerAttendanceIssueRepository
issueRepository
,
PerforPerAttendanceDeptReportRepository
deptReportRepository
,
UserService
userService
,
DapperService
dapperService
,
IOptions
<
Application
>
application
,
...
...
@@ -74,6 +76,7 @@ public class PersonService : IAutoInjection
this
.
perforHospitalRepository
=
perforHospitalRepository
;
this
.
perforCofaccountingRepository
=
perforCofaccountingRepository
;
_issueRepository
=
issueRepository
;
_deptReportRepository
=
deptReportRepository
;
this
.
userService
=
userService
;
this
.
dapperService
=
dapperService
;
this
.
application
=
application
.
Value
;
...
...
@@ -171,6 +174,24 @@ public void CreateAllotPersons(int hospitalId, int allotId, int prevAllotId = -1
}
}
}
// lcr 2023-05-10 按考勤上报记录最后一次所在科室更新人员字典
var
deptRepors
=
_deptReportRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
prevAllotId
);
if
(
deptRepors
?.
Any
()
==
true
)
{
foreach
(
var
item
in
data
)
{
var
personnel
=
deptRepors
.
Where
(
w
=>
w
.
PersonnelNumber
==
item
.
PersonnelNumber
).
OrderByDescending
(
w
=>
w
.
BeginDate
).
FirstOrDefault
();
if
(
personnel
!=
null
)
{
if
(
personnel
.
UnitType
!=
item
.
UnitType
||
personnel
.
AccountingUnit
!=
item
.
AccountingUnit
||
personnel
.
PermanentStaff
!=
item
.
PermanentStaff
)
{
item
.
UnitType
=
personnel
.
UnitType
;
item
.
AccountingUnit
=
personnel
.
AccountingUnit
;
item
.
PermanentStaff
=
personnel
.
PermanentStaff
;
}
}
}
}
SaveAllotPersons
(
data
);
}
...
...
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