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
be626822
Commit
be626822
authored
Sep 12, 2023
by
wyc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
管理详情设置继承上月
parent
2649e6db
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
2 deletions
+29
-2
performance/Performance.Api/Controllers/ConfigController.cs
+1
-0
performance/Performance.Services/ConfigService.cs
+2
-1
performance/Performance.Services/CopyService.cs
+26
-1
No files found.
performance/Performance.Api/Controllers/ConfigController.cs
View file @
be626822
...
...
@@ -906,6 +906,7 @@ public ApiResponse CopyDropDown()
//new CopyDrop{Label="科室类型",Value="deptTypes"},
new
CopyDrop
{
Label
=
"二次绩效配置"
,
Value
=
"agains"
},
new
CopyDrop
{
Label
=
"科室详情设置"
,
Value
=
"deptdetail"
},
new
CopyDrop
{
Label
=
"管理详情设置"
,
Value
=
"empdetail"
},
};
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
...
...
performance/Performance.Services/ConfigService.cs
View file @
be626822
...
...
@@ -741,7 +741,7 @@ public void Copy(per_allot allot)
NewCopy
(
new
CopyRequest
()
{
AllotId
=
allot
.
ID
,
Type
=
new
[]
{
"personnels"
,
"workItems"
,
"drugTypeDisburses"
,
"drugTypeFactors"
,
"deptTypes"
,
"agains"
,
"accountings"
,
"department"
,
"attendanceType"
,
"assessType"
,
"deptdetail"
}
Type
=
new
[]
{
"personnels"
,
"workItems"
,
"drugTypeDisburses"
,
"drugTypeFactors"
,
"deptTypes"
,
"agains"
,
"accountings"
,
"department"
,
"attendanceType"
,
"assessType"
,
"deptdetail"
,
"Copy_Empdetail"
}
});
}
...
...
@@ -772,6 +772,7 @@ public void NewCopy(CopyRequest request)
{
"assessType"
,
(
allot
,
prevAllotId
)
=>
_copyService
.
Copy_AssessType
(
allot
,
prevAllotId
,
delHistotyData
:
true
)
},
{
"department"
,
(
allot
,
prevAllotId
)
=>
_copyService
.
Copy_DeptDic
(
allot
,
prevAllotId
,
delHistotyData
:
true
)
},
{
"deptdetail"
,
(
allot
,
prevAllotId
)
=>
_copyService
.
Copy_Deptdetail
(
allot
,
prevAllotId
,
delHistotyData
:
true
)
},
{
"empdetail"
,
(
allot
,
prevAllotId
)
=>
_copyService
.
Copy_Empdetail
(
allot
,
prevAllotId
,
delHistotyData
:
true
)
},
};
foreach
(
var
item
in
request
.
Type
)
...
...
performance/Performance.Services/CopyService.cs
View file @
be626822
...
...
@@ -29,6 +29,7 @@ public class CopyService : IAutoInjection
private
readonly
PerforPerAssessIssueSchemeRepository
_perforPerAssessIssueSchemeRepository
;
private
readonly
PerforPerAttendanceDeptRepository
_perforPerAttendanceDeptRepository
;
private
readonly
PerforCofDeptDetailRepository
_perforCofDeptDetailRepository
;
private
readonly
PerforCofEmpDetailRepository
_perforCofEmpDetailRepository
;
public
CopyService
(
ILogger
<
ConfigService
>
logger
,
...
...
@@ -47,7 +48,8 @@ public class CopyService : IAutoInjection
PerforPerAssessSchemeTargetRepository
perforPerAssessSchemeTargetRepository
,
PerforPerAssessIssueSchemeRepository
perforPerAssessIssueSchemeRepository
,
PerforPerAttendanceDeptRepository
perforPerAttendanceDeptRepository
,
PerforCofDeptDetailRepository
perforCofDeptDetailRepository
PerforCofDeptDetailRepository
perforCofDeptDetailRepository
,
PerforCofEmpDetailRepository
perforCofEmpDetailRepository
)
{
_logger
=
logger
;
...
...
@@ -67,6 +69,7 @@ PerforCofDeptDetailRepository perforCofDeptDetailRepository
_perforPerAssessIssueSchemeRepository
=
perforPerAssessIssueSchemeRepository
;
_perforPerAttendanceDeptRepository
=
perforPerAttendanceDeptRepository
;
_perforCofDeptDetailRepository
=
perforCofDeptDetailRepository
;
_perforCofEmpDetailRepository
=
perforCofEmpDetailRepository
;
}
...
...
@@ -284,6 +287,28 @@ public void Copy_Deptdetail(per_allot allot, int prevAllotId, bool delHistotyDat
}
}
}
public
void
Copy_Empdetail
(
per_allot
allot
,
int
prevAllotId
,
bool
delHistotyData
=
false
)
{
var
flag
=
delHistotyData
;
_logger
.
LogInformation
(
$"copy cof_emp_detail"
);
var
cofDeptDetail
=
_perforCofEmpDetailRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allot
.
ID
);
if
(
delHistotyData
&&
cofDeptDetail
!=
null
&&
cofDeptDetail
.
Any
())
flag
=
_perforCofEmpDetailRepository
.
RemoveRange
(
cofDeptDetail
.
ToArray
());
if
(
flag
||
cofDeptDetail
==
null
||
!
cofDeptDetail
.
Any
())
{
cofDeptDetail
=
_perforCofEmpDetailRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
prevAllotId
)
??
_perforCofEmpDetailRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
-
1
);
if
(
cofDeptDetail
!=
null
&&
cofDeptDetail
.
Any
())
{
var
newCofDeptDetail
=
cofDeptDetail
.
Select
(
t
=>
new
cof_emp_detail
{
AllotId
=
allot
.
ID
,
CreateTime
=
DateTime
.
Now
,
Settings
=
t
.
Settings
,
});
_perforCofEmpDetailRepository
.
AddRange
(
newCofDeptDetail
.
ToArray
());
}
}
}
public
void
Copy_AttendanceType
(
per_allot
allot
,
int
prevAllotId
,
bool
delHistotyData
=
false
)
{
var
flag
=
delHistotyData
;
...
...
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