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
5c9ea246
Commit
5c9ea246
authored
Jun 06, 2023
by
wyc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
科室详情 下载\继承上月
parent
d7397aba
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
6 deletions
+51
-6
performance/Performance.Api/Controllers/ComputeController.cs
+5
-1
performance/Performance.Api/Controllers/ConfigController.cs
+1
-0
performance/Performance.Services/ComputeService.UniteDeptDetail.cs
+17
-2
performance/Performance.Services/ConfigService.cs
+2
-1
performance/Performance.Services/CopyService.cs
+26
-2
No files found.
performance/Performance.Api/Controllers/ComputeController.cs
View file @
5c9ea246
...
@@ -212,7 +212,11 @@ public ApiResponse UniteDeptDetail([FromBody] UniteDeptDetailRequest request)
...
@@ -212,7 +212,11 @@ public ApiResponse UniteDeptDetail([FromBody] UniteDeptDetailRequest request)
return
new
ApiResponse
(
ResponseType
.
OK
,
response
);
return
new
ApiResponse
(
ResponseType
.
OK
,
response
);
}
}
/// <summary>
/// 科室绩效详情下载
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"download/unite/deptdetail"
)]
[
Route
(
"download/unite/deptdetail"
)]
[
HttpPost
]
[
HttpPost
]
public
IActionResult
DownloadUniteDeptdetail
([
FromBody
]
UniteDeptDetailRequest
request
)
public
IActionResult
DownloadUniteDeptdetail
([
FromBody
]
UniteDeptDetailRequest
request
)
...
...
performance/Performance.Api/Controllers/ConfigController.cs
View file @
5c9ea246
...
@@ -905,6 +905,7 @@ public ApiResponse CopyDropDown()
...
@@ -905,6 +905,7 @@ public ApiResponse CopyDropDown()
new
CopyDrop
{
Label
=
"绩效考核"
,
Value
=
"assessType"
},
new
CopyDrop
{
Label
=
"绩效考核"
,
Value
=
"assessType"
},
//new CopyDrop{Label="科室类型",Value="deptTypes"},
//new CopyDrop{Label="科室类型",Value="deptTypes"},
new
CopyDrop
{
Label
=
"二次绩效配置"
,
Value
=
"agains"
},
new
CopyDrop
{
Label
=
"二次绩效配置"
,
Value
=
"agains"
},
new
CopyDrop
{
Label
=
"科室详情设置"
,
Value
=
"deptdetail"
},
};
};
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
}
...
...
performance/Performance.Services/ComputeService.UniteDeptDetail.cs
View file @
5c9ea246
...
@@ -179,6 +179,11 @@ public UniteDeptDetailResponse UniteDeptDetail(int allotId, UnitType unitType, s
...
@@ -179,6 +179,11 @@ public UniteDeptDetailResponse UniteDeptDetail(int allotId, UnitType unitType, s
var
items
=
new
List
<
Dictionary
<
string
,
object
>>();
var
items
=
new
List
<
Dictionary
<
string
,
object
>>();
var
postDatas
=
basicData
.
Where
(
t
=>
t
.
SheetID
==
sheet
.
ID
&&
t
.
IsTotal
!=
1
&&
t
.
UnitType
==
(
int
)
type
);
var
postDatas
=
basicData
.
Where
(
t
=>
t
.
SheetID
==
sheet
.
ID
&&
t
.
IsTotal
!=
1
&&
t
.
UnitType
==
(
int
)
type
);
if
(
postDatas
?.
Any
()
!=
true
)
continue
;
if
(
postDatas
?.
Any
()
!=
true
)
continue
;
var
headersDatas
=
headers
.
Where
(
t
=>
t
.
SheetID
==
sheet
.
ID
&&
t
.
IsTotal
!=
1
).
ToList
();
postDatas
=
from
temp1
in
postDatas
join
temp2
in
headersDatas
on
temp1
.
TypeName
equals
temp2
.
CellValue
orderby
temp2
.
PointCell
ascending
select
temp1
;
foreach
(
var
post
in
postDatas
.
GroupBy
(
t
=>
new
{
t
.
TypeName
}))
foreach
(
var
post
in
postDatas
.
GroupBy
(
t
=>
new
{
t
.
TypeName
}))
{
{
...
@@ -240,7 +245,11 @@ public UniteDeptDetailResponse UniteDeptDetail(int allotId, UnitType unitType, s
...
@@ -240,7 +245,11 @@ public UniteDeptDetailResponse UniteDeptDetail(int allotId, UnitType unitType, s
?
basicData
.
Where
(
t
=>
t
.
SheetID
==
sheet
.
ID
&&
t
.
IsTotal
!=
1
&&
unitTypes
.
Contains
(
t
.
UnitType
.
Value
))
?
basicData
.
Where
(
t
=>
t
.
SheetID
==
sheet
.
ID
&&
t
.
IsTotal
!=
1
&&
unitTypes
.
Contains
(
t
.
UnitType
.
Value
))
:
basicData
.
Where
(
t
=>
t
.
SheetID
==
sheet
.
ID
&&
t
.
IsTotal
!=
1
&&
t
.
UnitType
==
(
int
)
type
);
:
basicData
.
Where
(
t
=>
t
.
SheetID
==
sheet
.
ID
&&
t
.
IsTotal
!=
1
&&
t
.
UnitType
==
(
int
)
type
);
if
(
postDatas
?.
Any
()
!=
true
)
continue
;
if
(
postDatas
?.
Any
()
!=
true
)
continue
;
var
headersDatas
=
headers
.
Where
(
t
=>
t
.
SheetID
==
sheet
.
ID
&&
t
.
IsTotal
!=
1
).
ToList
();
postDatas
=
from
temp1
in
postDatas
join
temp2
in
headersDatas
on
temp1
.
TypeName
equals
temp2
.
CellValue
orderby
temp2
.
PointCell
ascending
select
temp1
;
foreach
(
var
post
in
postDatas
.
GroupBy
(
t
=>
new
{
t
.
TypeName
}))
foreach
(
var
post
in
postDatas
.
GroupBy
(
t
=>
new
{
t
.
TypeName
}))
{
{
if
(
ignore
.
Contains
(
post
.
Key
.
TypeName
))
continue
;
if
(
ignore
.
Contains
(
post
.
Key
.
TypeName
))
continue
;
...
@@ -333,6 +342,12 @@ public UniteDeptDetailResponse UniteDeptDetail(int allotId, UnitType unitType, s
...
@@ -333,6 +342,12 @@ public UniteDeptDetailResponse UniteDeptDetail(int allotId, UnitType unitType, s
var
items
=
new
List
<
Dictionary
<
string
,
object
>>();
var
items
=
new
List
<
Dictionary
<
string
,
object
>>();
var
postDatas
=
basicData
.
Where
(
t
=>
t
.
SheetID
==
sheet
.
ID
&&
t
.
IsTotal
!=
1
&&
t
.
UnitType
==
(
int
)
type
);
var
postDatas
=
basicData
.
Where
(
t
=>
t
.
SheetID
==
sheet
.
ID
&&
t
.
IsTotal
!=
1
&&
t
.
UnitType
==
(
int
)
type
);
var
headersDatas
=
headers
.
Where
(
t
=>
t
.
SheetID
==
sheet
.
ID
&&
t
.
IsTotal
!=
1
).
ToList
();
postDatas
=
from
temp1
in
postDatas
join
temp2
in
headersDatas
on
temp1
.
TypeName
equals
temp2
.
CellValue
orderby
temp2
.
PointCell
ascending
select
temp1
;
foreach
(
var
post
in
postDatas
.
GroupBy
(
t
=>
new
{
t
.
TypeName
}))
foreach
(
var
post
in
postDatas
.
GroupBy
(
t
=>
new
{
t
.
TypeName
}))
{
{
if
(
ignore
.
Contains
(
post
.
Key
.
TypeName
))
continue
;
if
(
ignore
.
Contains
(
post
.
Key
.
TypeName
))
continue
;
...
@@ -704,7 +719,7 @@ int WriteSheetCells(ExcelWorksheet worksheet, int maxColIndex, int rowIndex, Lis
...
@@ -704,7 +719,7 @@ int WriteSheetCells(ExcelWorksheet worksheet, int maxColIndex, int rowIndex, Lis
worksheet
.
SetValue
(
rowIndex
,
colIndex
+
1
,
numericValue
/
100
);
worksheet
.
SetValue
(
rowIndex
,
colIndex
+
1
,
numericValue
/
100
);
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
].
Style
.
Numberformat
.
Format
=
"0.00%"
;
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
].
Style
.
Numberformat
.
Format
=
"0.00%"
;
}
}
else
if
(
double
.
TryParse
(
cellValue
,
out
numericValue
))
else
if
(
double
.
TryParse
(
cellValue
,
out
numericValue
)
&&
cellValue
.
Length
!=
18
)
{
{
worksheet
.
SetValue
(
rowIndex
,
colIndex
+
1
,
numericValue
);
worksheet
.
SetValue
(
rowIndex
,
colIndex
+
1
,
numericValue
);
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
].
Style
.
Numberformat
.
Format
=
"0.00"
;
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
].
Style
.
Numberformat
.
Format
=
"0.00"
;
...
...
performance/Performance.Services/ConfigService.cs
View file @
5c9ea246
...
@@ -741,7 +741,7 @@ public void Copy(per_allot allot)
...
@@ -741,7 +741,7 @@ public void Copy(per_allot allot)
NewCopy
(
new
CopyRequest
()
NewCopy
(
new
CopyRequest
()
{
{
AllotId
=
allot
.
ID
,
AllotId
=
allot
.
ID
,
Type
=
new
[]
{
"personnels"
,
"workItems"
,
"drugTypeDisburses"
,
"drugTypeFactors"
,
"deptTypes"
,
"agains"
,
"accountings"
,
"department"
,
"attendanceType"
,
"assessType"
}
Type
=
new
[]
{
"personnels"
,
"workItems"
,
"drugTypeDisburses"
,
"drugTypeFactors"
,
"deptTypes"
,
"agains"
,
"accountings"
,
"department"
,
"attendanceType"
,
"assessType"
,
"deptdetail"
}
});
});
}
}
...
@@ -771,6 +771,7 @@ public void NewCopy(CopyRequest request)
...
@@ -771,6 +771,7 @@ public void NewCopy(CopyRequest request)
{
"attendanceType"
,
(
allot
,
prevAllotId
)
=>
_copyService
.
Copy_AttendanceType
(
allot
,
prevAllotId
,
delHistotyData
:
true
)
},
{
"attendanceType"
,
(
allot
,
prevAllotId
)
=>
_copyService
.
Copy_AttendanceType
(
allot
,
prevAllotId
,
delHistotyData
:
true
)
},
{
"assessType"
,
(
allot
,
prevAllotId
)
=>
_copyService
.
Copy_AssessType
(
allot
,
prevAllotId
,
delHistotyData
:
true
)
},
{
"assessType"
,
(
allot
,
prevAllotId
)
=>
_copyService
.
Copy_AssessType
(
allot
,
prevAllotId
,
delHistotyData
:
true
)
},
{
"department"
,
(
allot
,
prevAllotId
)
=>
_copyService
.
Copy_DeptDic
(
allot
,
prevAllotId
,
delHistotyData
:
true
)
},
{
"department"
,
(
allot
,
prevAllotId
)
=>
_copyService
.
Copy_DeptDic
(
allot
,
prevAllotId
,
delHistotyData
:
true
)
},
{
"deptdetail"
,
(
allot
,
prevAllotId
)
=>
_copyService
.
Copy_Deptdetail
(
allot
,
prevAllotId
,
delHistotyData
:
true
)
},
};
};
foreach
(
var
item
in
request
.
Type
)
foreach
(
var
item
in
request
.
Type
)
...
...
performance/Performance.Services/CopyService.cs
View file @
5c9ea246
...
@@ -28,6 +28,7 @@ public class CopyService : IAutoInjection
...
@@ -28,6 +28,7 @@ public class CopyService : IAutoInjection
private
readonly
PerforPerAssessSchemeTargetRepository
_perforPerAssessSchemeTargetRepository
;
private
readonly
PerforPerAssessSchemeTargetRepository
_perforPerAssessSchemeTargetRepository
;
private
readonly
PerforPerAssessIssueSchemeRepository
_perforPerAssessIssueSchemeRepository
;
private
readonly
PerforPerAssessIssueSchemeRepository
_perforPerAssessIssueSchemeRepository
;
private
readonly
PerforPerAttendanceDeptRepository
_perforPerAttendanceDeptRepository
;
private
readonly
PerforPerAttendanceDeptRepository
_perforPerAttendanceDeptRepository
;
private
readonly
PerforCofDeptDetailRepository
_perforCofDeptDetailRepository
;
public
CopyService
(
public
CopyService
(
ILogger
<
ConfigService
>
logger
,
ILogger
<
ConfigService
>
logger
,
...
@@ -45,7 +46,8 @@ public class CopyService : IAutoInjection
...
@@ -45,7 +46,8 @@ public class CopyService : IAutoInjection
PerforPerAssessSchemeItemsRepository
perforPerAssessSchemeItemsRepository
,
PerforPerAssessSchemeItemsRepository
perforPerAssessSchemeItemsRepository
,
PerforPerAssessSchemeTargetRepository
perforPerAssessSchemeTargetRepository
,
PerforPerAssessSchemeTargetRepository
perforPerAssessSchemeTargetRepository
,
PerforPerAssessIssueSchemeRepository
perforPerAssessIssueSchemeRepository
,
PerforPerAssessIssueSchemeRepository
perforPerAssessIssueSchemeRepository
,
PerforPerAttendanceDeptRepository
perforPerAttendanceDeptRepository
PerforPerAttendanceDeptRepository
perforPerAttendanceDeptRepository
,
PerforCofDeptDetailRepository
perforCofDeptDetailRepository
)
)
{
{
_logger
=
logger
;
_logger
=
logger
;
...
@@ -64,6 +66,7 @@ PerforPerAttendanceDeptRepository perforPerAttendanceDeptRepository
...
@@ -64,6 +66,7 @@ PerforPerAttendanceDeptRepository perforPerAttendanceDeptRepository
_perforPerAssessSchemeTargetRepository
=
perforPerAssessSchemeTargetRepository
;
_perforPerAssessSchemeTargetRepository
=
perforPerAssessSchemeTargetRepository
;
_perforPerAssessIssueSchemeRepository
=
perforPerAssessIssueSchemeRepository
;
_perforPerAssessIssueSchemeRepository
=
perforPerAssessIssueSchemeRepository
;
_perforPerAttendanceDeptRepository
=
perforPerAttendanceDeptRepository
;
_perforPerAttendanceDeptRepository
=
perforPerAttendanceDeptRepository
;
_perforCofDeptDetailRepository
=
perforCofDeptDetailRepository
;
}
}
...
@@ -259,7 +262,28 @@ public void Copy_DeptDic(per_allot allot, int prevAllotId, bool delHistotyData =
...
@@ -259,7 +262,28 @@ public void Copy_DeptDic(per_allot allot, int prevAllotId, bool delHistotyData =
}
}
}
}
}
}
public
void
Copy_Deptdetail
(
per_allot
allot
,
int
prevAllotId
,
bool
delHistotyData
=
false
)
{
var
flag
=
delHistotyData
;
_logger
.
LogInformation
(
$"copy cof_dept_detail"
);
var
cofDeptDetail
=
_perforCofDeptDetailRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allot
.
ID
);
if
(
delHistotyData
&&
cofDeptDetail
!=
null
&&
cofDeptDetail
.
Any
())
flag
=
_perforCofDeptDetailRepository
.
RemoveRange
(
cofDeptDetail
.
ToArray
());
if
(
flag
||
cofDeptDetail
==
null
||
!
cofDeptDetail
.
Any
())
{
cofDeptDetail
=
_perforCofDeptDetailRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
prevAllotId
)
??
_perforCofDeptDetailRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
-
1
);
if
(
cofDeptDetail
!=
null
&&
cofDeptDetail
.
Any
())
{
var
newCofDeptDetail
=
cofDeptDetail
.
Select
(
t
=>
new
cof_dept_detail
{
AllotId
=
allot
.
ID
,
CreateTime
=
DateTime
.
Now
,
Settings
=
t
.
Settings
,
});
_perforCofDeptDetailRepository
.
AddRange
(
newCofDeptDetail
.
ToArray
());
}
}
}
public
void
Copy_AttendanceType
(
per_allot
allot
,
int
prevAllotId
,
bool
delHistotyData
=
false
)
public
void
Copy_AttendanceType
(
per_allot
allot
,
int
prevAllotId
,
bool
delHistotyData
=
false
)
{
{
var
flag
=
delHistotyData
;
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