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
dccc03bb
Commit
dccc03bb
authored
May 27, 2021
by
lcx
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into feature/核算单元组别功能修复
parents
d9945f8a
d00173d0
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
118 additions
and
64 deletions
+118
-64
performance/Performance.Api/Controllers/AllotController.cs
+2
-10
performance/Performance.DtoModels/Response/DeptDetailResponse.cs
+3
-0
performance/Performance.Services/ComputeService.cs
+39
-13
performance/Performance.Services/PersonService.cs
+4
-2
performance/Performance.Services/SecondAllot/SecondAllotDetails.cs
+34
-31
performance/Performance.Services/SecondAllotService.cs
+36
-8
No files found.
performance/Performance.Api/Controllers/AllotController.cs
View file @
dccc03bb
...
@@ -313,16 +313,8 @@ public ApiResponse GenerateReport([CustomizeValidator(RuleSet = "Delete"), FromB
...
@@ -313,16 +313,8 @@ public ApiResponse GenerateReport([CustomizeValidator(RuleSet = "Delete"), FromB
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
AccountingVerify
([
FromRoute
]
int
allotId
)
public
ApiResponse
AccountingVerify
([
FromRoute
]
int
allotId
)
{
{
_backgroundTaskQueue
.
QueueBackgroundWorkItem
(
async
token
=>
_allotService
.
AccoungtingVerify
(
allotId
);
{
return
new
ApiResponse
(
ResponseType
.
OK
,
"核算单元及组别数据验证结束,请刷新页面。"
);
using
(
var
scope
=
_serviceScopeFactory
.
CreateScope
())
{
var
scopedServices
=
scope
.
ServiceProvider
.
GetRequiredService
<
AllotService
>();
scopedServices
.
AccoungtingVerify
(
allotId
);
await
Task
.
Delay
(
TimeSpan
.
FromSeconds
(
5
),
token
);
}
});
return
new
ApiResponse
(
ResponseType
.
OK
,
"核算单元及组别数据验证任务开始"
);
}
}
/*
/*
...
...
performance/Performance.DtoModels/Response/DeptDetailResponse.cs
View file @
dccc03bb
...
@@ -90,6 +90,9 @@ public class DetailModule
...
@@ -90,6 +90,9 @@ public class DetailModule
/// <summary> 结算值 </summary>
/// <summary> 结算值 </summary>
public
decimal
?
ItemValue
{
get
;
set
;
}
public
decimal
?
ItemValue
{
get
;
set
;
}
public
decimal
?
OtherPerfor
{
get
;
set
;
}
public
decimal
?
Attendance
{
get
;
set
;
}
public
decimal
?
PostCoefficient
{
get
;
set
;
}
}
}
public
class
DetailModuleExtend
:
DetailModule
public
class
DetailModuleExtend
:
DetailModule
...
...
performance/Performance.Services/ComputeService.cs
View file @
dccc03bb
...
@@ -761,12 +761,13 @@ public List<ComputeResponse> AllCompute(int allotId, int hospitalId, int isShowM
...
@@ -761,12 +761,13 @@ public List<ComputeResponse> AllCompute(int allotId, int hospitalId, int isShowM
item
.
ReservedRatio
=
empDic
?.
FirstOrDefault
(
w
=>
w
.
PersonnelNumber
==
item
.
JobNumber
)?.
ReservedRatio
??
0
;
item
.
ReservedRatio
=
empDic
?.
FirstOrDefault
(
w
=>
w
.
PersonnelNumber
==
item
.
JobNumber
)?.
ReservedRatio
??
0
;
item
.
ReservedRatioFee
=
Math
.
Round
(
real
*
(
item
.
ReservedRatio
??
0
),
2
,
MidpointRounding
.
AwayFromZero
);
item
.
ReservedRatioFee
=
Math
.
Round
(
real
*
(
item
.
ReservedRatio
??
0
),
2
,
MidpointRounding
.
AwayFromZero
);
item
.
RealGiveFee
=
Math
.
Round
(
item
.
ShouldGiveFee
-
(
item
.
ReservedRatioFee
??
0
)
??
0
,
2
,
MidpointRounding
.
AwayFromZero
);
item
.
RealGiveFee
=
Math
.
Round
(
item
.
ShouldGiveFee
-
(
item
.
ReservedRatioFee
??
0
)
??
0
,
2
,
MidpointRounding
.
AwayFromZero
);
// 姓名始终按人员字典显示
item
.
EmployeeName
=
empDic
?.
FirstOrDefault
(
w
=>
w
.
PersonnelNumber
==
item
.
JobNumber
)?.
DoctorName
??
""
;
// 人员信息使用人员字典中数据
// 人员信息使用人员字典中数据
if
(
isEmpDic
)
if
(
isEmpDic
)
{
{
item
.
AccountingUnit
=
empDic
?.
FirstOrDefault
(
w
=>
w
.
PersonnelNumber
==
item
.
JobNumber
)?.
AccountingUnit
??
""
;
item
.
AccountingUnit
=
empDic
?.
FirstOrDefault
(
w
=>
w
.
PersonnelNumber
==
item
.
JobNumber
)?.
AccountingUnit
??
""
;
item
.
UnitType
=
empDic
?.
FirstOrDefault
(
w
=>
w
.
PersonnelNumber
==
item
.
JobNumber
)?.
UnitType
??
""
;
item
.
UnitType
=
empDic
?.
FirstOrDefault
(
w
=>
w
.
PersonnelNumber
==
item
.
JobNumber
)?.
UnitType
??
""
;
item
.
EmployeeName
=
empDic
?.
FirstOrDefault
(
w
=>
w
.
PersonnelNumber
==
item
.
JobNumber
)?.
DoctorName
??
""
;
}
}
}
}
}
}
...
@@ -898,10 +899,8 @@ public List<ComputeResponse> AddAprAmount(int allotId, List<ComputeResponse> com
...
@@ -898,10 +899,8 @@ public List<ComputeResponse> AddAprAmount(int allotId, List<ComputeResponse> com
foreach
(
var
item
in
computes
.
GroupBy
(
w
=>
new
{
w
.
AccountingUnit
,
w
.
JobNumber
}))
foreach
(
var
item
in
computes
.
GroupBy
(
w
=>
new
{
w
.
AccountingUnit
,
w
.
JobNumber
}))
{
{
// 补充过一次就不在补充了
// 补充过一次就不在补充了
var
emp
=
computes
.
Where
(
w
=>
w
.
AccountingUnit
==
item
.
Key
.
AccountingUnit
&&
w
.
JobNumber
==
item
.
Key
.
JobNumber
)
var
emp
=
computes
.
Where
(
w
=>
w
.
AccountingUnit
==
item
.
Key
.
AccountingUnit
&&
w
.
JobNumber
==
item
.
Key
.
JobNumber
).
OrderByDescending
(
w
=>
w
.
Source
).
FirstOrDefault
();
.
OrderByDescending
(
w
=>
w
.
Source
).
FirstOrDefault
();
var
apramount
=
list
.
Where
(
t
=>
t
.
AccountingUnit
==
emp
.
AccountingUnit
&&
!
string
.
IsNullOrEmpty
(
t
.
PersonnelNumber
)
&&
emp
.
JobNumber
?.
Trim
()
==
t
.
PersonnelNumber
?.
Trim
());
var
apramount
=
list
.
Where
(
t
=>
t
.
AccountingUnit
==
emp
.
AccountingUnit
&&
!
string
.
IsNullOrEmpty
(
t
.
PersonnelNumber
)
&&
emp
.
JobNumber
?.
Trim
()
==
t
.
PersonnelNumber
?.
Trim
());
// 如果医院其他绩效 已经被使用,则不再多次带出,防止单个人多次出现造成金额叠加
// 如果医院其他绩效 已经被使用,则不再多次带出,防止单个人多次出现造成金额叠加
var
tag
=
$"
{(
emp
.
AccountingUnit
??
""
)}
-
{(
emp
.
JobNumber
??
""
)}
"
;
var
tag
=
$"
{(
emp
.
AccountingUnit
??
""
)}
-
{(
emp
.
JobNumber
??
""
)}
"
;
if
(
apramount
!=
null
&&
!
uses
.
Contains
(
tag
))
if
(
apramount
!=
null
&&
!
uses
.
Contains
(
tag
))
...
@@ -1374,12 +1373,6 @@ public DeptDataDetails DeptOfficeDetail(int accountId)
...
@@ -1374,12 +1373,6 @@ public DeptDataDetails DeptOfficeDetail(int accountId)
Detail
=
new
List
<
DetailDtos
>()
Detail
=
new
List
<
DetailDtos
>()
};
};
var
sheetType
=
new
List
<
int
>
{
(
int
)
SheetType
.
AccountExtra
,
(
int
)
SheetType
.
AccountDrugAssess
,
(
int
)
SheetType
.
AccountMaterialsAssess
,
(
int
)
SheetType
.
AccountScoreAverage
,
(
int
)
SheetType
.
AccountAdjustLaterOtherFee
};
var
detail
=
new
DetailDtos
var
detail
=
new
DetailDtos
{
{
ItemName
=
"后勤人员"
,
ItemName
=
"后勤人员"
,
...
@@ -1397,7 +1390,10 @@ public DeptDataDetails DeptOfficeDetail(int accountId)
...
@@ -1397,7 +1390,10 @@ public DeptDataDetails DeptOfficeDetail(int accountId)
{
{
JobNumber
=
item
.
JobNumber
,
JobNumber
=
item
.
JobNumber
,
ItemName
=
item
.
EmployeeName
,
ItemName
=
item
.
EmployeeName
,
ItemValue
=
Math
.
Round
(
item
.
PerforTotal
??
0
,
2
)
ItemValue
=
Math
.
Round
(
item
.
PerforTotal
??
0
,
2
),
OtherPerfor
=
item
.
OtherPerfor
,
Attendance
=
item
.
Attendance
,
PostCoefficient
=
item
.
PostCoefficient
,
});
});
}
}
}
}
...
@@ -1406,6 +1402,11 @@ public DeptDataDetails DeptOfficeDetail(int accountId)
...
@@ -1406,6 +1402,11 @@ public DeptDataDetails DeptOfficeDetail(int accountId)
if
(
basicData
==
null
||
!
basicData
.
Any
())
return
deptDetails
;
if
(
basicData
==
null
||
!
basicData
.
Any
())
return
deptDetails
;
var
sheetType
=
new
List
<
int
>
{
(
int
)
SheetType
.
AccountExtra
,
(
int
)
SheetType
.
AccountDrugAssess
,
(
int
)
SheetType
.
AccountMaterialsAssess
,
(
int
)
SheetType
.
AccountScoreAverage
,
(
int
)
SheetType
.
AccountAdjustLaterOtherFee
};
int
groupBasis
=
0
;
int
groupBasis
=
0
;
foreach
(
var
stype
in
sheetType
)
foreach
(
var
stype
in
sheetType
)
{
{
...
@@ -1427,6 +1428,31 @@ public DeptDataDetails DeptOfficeDetail(int accountId)
...
@@ -1427,6 +1428,31 @@ public DeptDataDetails DeptOfficeDetail(int accountId)
}
}
}
}
}
}
// 特殊 6.11个人岗位系数
var
postSheet
=
persheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
(
int
)
SheetType
.
PersonPostCoefficient
);
if
(
postSheet
!=
null
)
{
groupBasis
++;
var
postDatas
=
basicData
?.
Where
(
w
=>
w
.
SheetID
==
postSheet
.
ID
&&
w
.
AccountingUnit
==
account
?.
AccountingUnit
);
foreach
(
var
post
in
postDatas
?.
GroupBy
(
w
=>
new
{
w
.
JobNumber
}))
{
var
amount
=
post
.
FirstOrDefault
(
w
=>
w
.
IsTotal
==
1
)?.
CellValue
??
0
;
var
items
=
post
.
Where
(
w
=>
w
.
SheetID
==
postSheet
.
ID
&&
w
.
IsTotal
!=
1
)?.
Select
(
t
=>
new
DetailModule
{
ItemName
=
t
.
TypeName
,
CellValue
=
t
.
CellValue
,
Factor
=
t
.
FactorValue
,
ItemValue
=
t
.
IsFactor
==
1
?
(
t
.
CellValue
*
(
t
.
FactorValue
??
0
))
:
t
.
CellValue
,
}).
ToList
();
if
(
items
!=
null
&&
items
.
Count
>
0
)
{
var
itemName
=
$"个人系数(
{
post
.
Key
.
JobNumber
}
{
post
.
FirstOrDefault
()?.
EmployeeName
}
)"
;
var
item
=
new
DetailDtos
{
ItemName
=
itemName
,
IncomeType
=
5
,
OriginalType
=
postSheet
.
SheetType
??
0
,
Amount
=
amount
,
GroupBasis
=
groupBasis
,
Items
=
items
};
deptDetails
.
Detail
.
Add
(
item
);
}
}
}
// 展示额外处理,根据禅道057
// 展示额外处理,根据禅道057
deptDetails
.
Pandect
.
ScoringAverage
=
deptDetails
.
Detail
?.
FirstOrDefault
(
w
=>
w
.
OriginalType
==
(
int
)
SheetType
.
AccountScoreAverage
)?.
Amount
??
deptDetails
.
Pandect
.
ScoringAverage
;
deptDetails
.
Pandect
.
ScoringAverage
=
deptDetails
.
Detail
?.
FirstOrDefault
(
w
=>
w
.
OriginalType
==
(
int
)
SheetType
.
AccountScoreAverage
)?.
Amount
??
deptDetails
.
Pandect
.
ScoringAverage
;
deptDetails
.
Pandect
.
Extra
=
deptDetails
.
Detail
?.
FirstOrDefault
(
w
=>
w
.
OriginalType
==
(
int
)
SheetType
.
AccountExtra
)?.
Amount
??
deptDetails
.
Pandect
.
Extra
;
deptDetails
.
Pandect
.
Extra
=
deptDetails
.
Detail
?.
FirstOrDefault
(
w
=>
w
.
OriginalType
==
(
int
)
SheetType
.
AccountExtra
)?.
Amount
??
deptDetails
.
Pandect
.
Extra
;
...
@@ -1791,7 +1817,7 @@ public res_baiscnorm EditHospitalAvg(ComputerAvgRequest request)
...
@@ -1791,7 +1817,7 @@ public res_baiscnorm EditHospitalAvg(ComputerAvgRequest request)
if
(!
emp
.
Any
())
if
(!
emp
.
Any
())
dicData
.
Add
(
type
,
"0"
);
dicData
.
Add
(
type
,
"0"
);
else
else
dicData
.
Add
(
type
,
Math
.
Round
(
Convert
.
ToDecimal
(
emp
?.
Sum
(
c
=>
c
.
Amount
))).
ToString
());
dicData
.
Add
(
type
,
Math
.
Round
(
Convert
.
ToDecimal
(
emp
?.
Sum
(
c
=>
c
.
Amount
))).
ToString
());
}
}
var
sum
=
employees
.
Where
(
c
=>
c
.
PersonnelNumber
==
num
)?.
Sum
(
t
=>
t
.
Amount
);
var
sum
=
employees
.
Where
(
c
=>
c
.
PersonnelNumber
==
num
)?.
Sum
(
t
=>
t
.
Amount
);
...
...
performance/Performance.Services/PersonService.cs
View file @
dccc03bb
...
@@ -464,8 +464,10 @@ public bool UpdateDeptDic(DeptdicResponse request)
...
@@ -464,8 +464,10 @@ public bool UpdateDeptDic(DeptdicResponse request)
/// <returns></returns>
/// <returns></returns>
public
bool
DeleteDeptDic
(
DeptdicResponse
request
)
public
bool
DeleteDeptDic
(
DeptdicResponse
request
)
{
{
var
deptdics
=
perdeptdicRepository
.
GetEntities
(
t
=>
(
t
.
HISDeptName
??
""
)
==
request
.
HISDeptName
if
(
request
==
null
)
&&
(
t
.
Department
??
""
)
==
request
.
Department
&&
t
.
HospitalId
==
request
.
HospitalId
);
throw
new
PerformanceException
(
"科室记录不存在!"
);
var
deptdics
=
perdeptdicRepository
.
GetEntities
(
t
=>
t
.
HISDeptName
==
request
.
HISDeptName
&&
t
.
Department
==
request
.
Department
&&
t
.
HospitalId
==
request
.
HospitalId
);
if
(
deptdics
==
null
||
!
deptdics
.
Any
())
if
(
deptdics
==
null
||
!
deptdics
.
Any
())
throw
new
PerformanceException
(
"科室记录不存在!"
);
throw
new
PerformanceException
(
"科室记录不存在!"
);
...
...
performance/Performance.Services/SecondAllot/SecondAllotDetails.cs
View file @
dccc03bb
...
@@ -820,43 +820,46 @@ private void SupplementSecondDetail(ag_secondallot second, List<per_employee> em
...
@@ -820,43 +820,46 @@ private void SupplementSecondDetail(ag_secondallot second, List<per_employee> em
{
{
item
.
WorkPerformance
=
distPerformance
?.
Where
(
w
=>
w
.
AccountingUnit
==
item
.
Department
&&
w
.
JobNumber
?.
Trim
()
==
item
.
WorkNumber
?.
Trim
())?.
Sum
(
w
=>
w
.
GiveFee
);
item
.
WorkPerformance
=
distPerformance
?.
Where
(
w
=>
w
.
AccountingUnit
==
item
.
Department
&&
w
.
JobNumber
?.
Trim
()
==
item
.
WorkNumber
?.
Trim
())?.
Sum
(
w
=>
w
.
GiveFee
);
if
(
string
.
IsNullOrEmpty
(
item
.
WorkNumber
))
if
(
string
.
IsNullOrEmpty
(
item
.
WorkNumber
))
item
.
WorkPerformance
=
distPerformance
?.
Where
(
w
=>
w
.
AccountingUnit
==
item
.
Department
&&
w
.
JobNumber
?.
Trim
()
==
item
.
WorkNumber
?.
Trim
()
&&
w
.
EmployeeName
?.
Trim
()
==
item
.
Name
?.
Trim
()
)?.
Sum
(
w
=>
w
.
GiveFee
);
item
.
WorkPerformance
=
distPerformance
?.
Where
(
w
=>
w
.
AccountingUnit
==
item
.
Department
&&
w
.
JobNumber
?.
Trim
()
==
item
.
WorkNumber
?.
Trim
())?.
Sum
(
w
=>
w
.
GiveFee
);
}
}
// 必须是相同核算单元类型才能带出医院其他绩效
if
(
second
.
UnitType
==
UnitType
.
行政后勤
.
ToString
())
if
(
second
.
UnitType
.
Replace
(
"其他"
,
""
).
Replace
(
"医技"
,
"医生"
)
{
==
empl
.
UnitType
.
Replace
(
"其他"
,
""
).
Replace
(
"医技"
,
"医生"
))
if
(
string
.
IsNullOrEmpty
(
item
.
WorkNumber
))
{
var
hasAmountData
=
perapramounts
?.
Where
(
w
=>
w
.
AccountingUnit
==
second
.
Department
&&
w
.
PersonnelNumber
?.
Trim
()
==
item
.
WorkNumber
?.
Trim
()
&&
w
.
DoctorName
?.
Trim
()
==
item
.
Name
?.
Trim
());
if
(
hasAmountData
==
null
||
!
hasAmountData
.
Any
())
continue
;
item
.
OtherPerformance
=
hasAmountData
.
Sum
(
w
=>
w
.
Amount
);
perapramounts
.
RemoveAll
(
w
=>
w
.
AccountingUnit
==
second
.
Department
&&
w
.
PersonnelNumber
?.
Trim
()
==
item
.
WorkNumber
?.
Trim
()
&&
w
.
DoctorName
?.
Trim
()
==
item
.
Name
?.
Trim
());
}
else
{
var
hasAmountData
=
perapramounts
?.
Where
(
w
=>
w
.
AccountingUnit
==
second
.
Department
&&
w
.
PersonnelNumber
?.
Trim
()
==
item
.
WorkNumber
?.
Trim
());
if
(
hasAmountData
==
null
||
!
hasAmountData
.
Any
())
continue
;
item
.
OtherPerformance
=
hasAmountData
.
Sum
(
w
=>
w
.
Amount
);
perapramounts
.
RemoveAll
(
w
=>
w
.
AccountingUnit
==
second
.
Department
&&
w
.
PersonnelNumber
?.
Trim
()
==
item
.
WorkNumber
?.
Trim
());
}
}
else
if
(!
string
.
IsNullOrEmpty
(
empl
?.
AccountingUnit
))
{
{
if
(
s
tring
.
IsNullOrEmpty
(
item
.
WorkNumber
))
if
(
s
econd
.
UnitType
==
UnitType
.
行政后勤
.
ToString
(
))
{
{
var
hasAmountData
=
perapramounts
?.
Where
(
w
=>
w
.
AccountingUnit
==
second
.
Department
&&
w
.
PersonnelNumber
?.
Trim
()
==
item
.
WorkNumber
?.
Trim
()
&&
w
.
DoctorName
?.
Trim
()
==
item
.
Name
?.
Trim
());
if
(
string
.
IsNullOrEmpty
(
item
.
WorkNumber
))
if
(
hasAmountData
==
null
||
!
hasAmountData
.
Any
())
continue
;
{
item
.
OtherPerformance
=
hasAmountData
.
Sum
(
w
=>
w
.
Amount
);
var
hasAmountData
=
perapramounts
?.
Where
(
w
=>
w
.
AccountingUnit
==
second
.
Department
&&
w
.
PersonnelNumber
?.
Trim
()
==
item
.
WorkNumber
?.
Trim
());
perapramounts
.
RemoveAll
(
w
=>
w
.
AccountingUnit
==
second
.
Department
&&
w
.
PersonnelNumber
?.
Trim
()
==
item
.
WorkNumber
?.
Trim
()
&&
w
.
DoctorName
?.
Trim
()
==
item
.
Name
?.
Trim
());
if
(
hasAmountData
==
null
||
!
hasAmountData
.
Any
())
continue
;
item
.
OtherPerformance
=
hasAmountData
.
Sum
(
w
=>
w
.
Amount
);
perapramounts
.
RemoveAll
(
w
=>
w
.
AccountingUnit
==
second
.
Department
&&
w
.
PersonnelNumber
?.
Trim
()
==
item
.
WorkNumber
?.
Trim
());
}
else
{
var
hasAmountData
=
perapramounts
?.
Where
(
w
=>
w
.
AccountingUnit
==
second
.
Department
&&
w
.
PersonnelNumber
?.
Trim
()
==
item
.
WorkNumber
?.
Trim
());
if
(
hasAmountData
==
null
||
!
hasAmountData
.
Any
())
continue
;
item
.
OtherPerformance
=
hasAmountData
.
Sum
(
w
=>
w
.
Amount
);
perapramounts
.
RemoveAll
(
w
=>
w
.
AccountingUnit
==
second
.
Department
&&
w
.
PersonnelNumber
?.
Trim
()
==
item
.
WorkNumber
?.
Trim
());
}
}
}
else
else
if
(!
string
.
IsNullOrEmpty
(
empl
?.
AccountingUnit
))
{
{
var
hasAmountData
=
perapramounts
?.
Where
(
w
=>
w
.
AccountingUnit
==
second
.
Department
&&
w
.
PersonnelNumber
?.
Trim
()
==
item
.
WorkNumber
?.
Trim
());
if
(
string
.
IsNullOrEmpty
(
item
.
WorkNumber
))
if
(
hasAmountData
==
null
||
!
hasAmountData
.
Any
())
continue
;
{
item
.
OtherPerformance
=
hasAmountData
.
Sum
(
w
=>
w
.
Amount
);
var
hasAmountData
=
perapramounts
?.
Where
(
w
=>
w
.
AccountingUnit
==
second
.
Department
&&
w
.
PersonnelNumber
?.
Trim
()
==
item
.
WorkNumber
?.
Trim
());
perapramounts
.
RemoveAll
(
w
=>
w
.
AccountingUnit
==
second
.
Department
&&
w
.
PersonnelNumber
?.
Trim
()
==
item
.
WorkNumber
?.
Trim
());
if
(
hasAmountData
==
null
||
!
hasAmountData
.
Any
())
continue
;
item
.
OtherPerformance
=
hasAmountData
.
Sum
(
w
=>
w
.
Amount
);
perapramounts
.
RemoveAll
(
w
=>
w
.
AccountingUnit
==
second
.
Department
&&
w
.
PersonnelNumber
?.
Trim
()
==
item
.
WorkNumber
?.
Trim
());
}
else
{
var
hasAmountData
=
perapramounts
?.
Where
(
w
=>
w
.
AccountingUnit
==
second
.
Department
&&
w
.
PersonnelNumber
?.
Trim
()
==
item
.
WorkNumber
?.
Trim
());
if
(
hasAmountData
==
null
||
!
hasAmountData
.
Any
())
continue
;
item
.
OtherPerformance
=
hasAmountData
.
Sum
(
w
=>
w
.
Amount
);
perapramounts
.
RemoveAll
(
w
=>
w
.
AccountingUnit
==
second
.
Department
&&
w
.
PersonnelNumber
?.
Trim
()
==
item
.
WorkNumber
?.
Trim
());
}
}
}
}
}
}
}
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
dccc03bb
...
@@ -2082,14 +2082,13 @@ public List<SecPrintResponse> Print(int secondId)
...
@@ -2082,14 +2082,13 @@ public List<SecPrintResponse> Print(int secondId)
//var computes = agcomputeRepository.GetEntities(t => t.SecondId == secondId);
//var computes = agcomputeRepository.GetEntities(t => t.SecondId == secondId);
//if (computes == null || !computes.Any())
//if (computes == null || !computes.Any())
// return new List<SecPrintResponse>();
// return new List<SecPrintResponse>();
List
<
SecPrintResponse
>
result
=
new
List
<
SecPrintResponse
>();
if
(
second
.
UseTempId
.
HasValue
&&
second
.
UseTempId
==
6
)
if
(
second
.
UseTempId
.
HasValue
&&
second
.
UseTempId
==
6
)
{
{
var
data
=
agothersourceRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
secondId
);
var
data
=
agothersourceRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
secondId
);
if
(
data
==
null
||
!
data
.
Any
())
return
new
List
<
SecPrintResponse
>();
if
(
data
==
null
||
!
data
.
Any
())
return
new
List
<
SecPrintResponse
>();
var
result
=
Mapper
.
Map
<
List
<
SecPrintResponse
>>(
data
);
result
=
Mapper
.
Map
<
List
<
SecPrintResponse
>>(
data
);
return
result
.
OrderBy
(
t
=>
t
.
JobNumber
).
ThenBy
(
t
=>
t
.
PersonName
).
ToList
();
}
}
else
if
(
second
.
UseTempId
.
HasValue
&&
(
new
int
[]
{
9
,
10
}).
Contains
(
second
.
UseTempId
.
Value
))
else
if
(
second
.
UseTempId
.
HasValue
&&
(
new
int
[]
{
9
,
10
}).
Contains
(
second
.
UseTempId
.
Value
))
{
{
...
@@ -2099,7 +2098,7 @@ public List<SecPrintResponse> Print(int secondId)
...
@@ -2099,7 +2098,7 @@ public List<SecPrintResponse> Print(int secondId)
var
bodyDynamic
=
agworkloadsourceRepository
.
GetEntities
(
t
=>
data
.
Select
(
w
=>
w
.
Id
).
Contains
(
t
.
BodyId
));
var
bodyDynamic
=
agworkloadsourceRepository
.
GetEntities
(
t
=>
data
.
Select
(
w
=>
w
.
Id
).
Contains
(
t
.
BodyId
));
if
(
data
==
null
||
!
data
.
Any
())
return
new
List
<
SecPrintResponse
>();
if
(
data
==
null
||
!
data
.
Any
())
return
new
List
<
SecPrintResponse
>();
var
result
=
data
.
Select
(
w
=>
new
SecPrintResponse
result
=
data
.
Select
(
w
=>
new
SecPrintResponse
{
{
JobNumber
=
w
.
WorkNumber
,
JobNumber
=
w
.
WorkNumber
,
PersonName
=
w
.
Name
,
PersonName
=
w
.
Name
,
...
@@ -2113,8 +2112,6 @@ public List<SecPrintResponse> Print(int secondId)
...
@@ -2113,8 +2112,6 @@ public List<SecPrintResponse> Print(int secondId)
OtherPerformance
=
w
.
OtherPerformance
,
OtherPerformance
=
w
.
OtherPerformance
,
NightWorkPerformance
=
w
.
NightWorkPerformance
,
NightWorkPerformance
=
w
.
NightWorkPerformance
,
}).
ToList
();
}).
ToList
();
return
result
.
OrderBy
(
t
=>
t
.
JobNumber
).
ThenBy
(
t
=>
t
.
PersonName
).
ToList
();
}
}
else
else
{
{
...
@@ -2124,7 +2121,7 @@ public List<SecPrintResponse> Print(int secondId)
...
@@ -2124,7 +2121,7 @@ public List<SecPrintResponse> Print(int secondId)
if
(
fixaitems
==
null
||
!
fixaitems
.
Any
(
t
=>
t
.
RowNumber
.
HasValue
&&
t
.
RowNumber
!=
-
1
))
return
new
List
<
SecPrintResponse
>();
if
(
fixaitems
==
null
||
!
fixaitems
.
Any
(
t
=>
t
.
RowNumber
.
HasValue
&&
t
.
RowNumber
!=
-
1
))
return
new
List
<
SecPrintResponse
>();
var
rownumbers
=
fixaitems
.
Where
(
t
=>
t
.
RowNumber
.
HasValue
&&
t
.
RowNumber
!=
-
1
).
Select
(
t
=>
t
.
RowNumber
.
Value
).
Distinct
().
OrderBy
(
t
=>
t
).
ToList
();
var
rownumbers
=
fixaitems
.
Where
(
t
=>
t
.
RowNumber
.
HasValue
&&
t
.
RowNumber
!=
-
1
).
Select
(
t
=>
t
.
RowNumber
.
Value
).
Distinct
().
OrderBy
(
t
=>
t
).
ToList
();
var
result
=
new
List
<
SecPrintResponse
>();
foreach
(
var
rownumber
in
rownumbers
)
foreach
(
var
rownumber
in
rownumbers
)
{
{
var
distperfor
=
ConvertHelper
.
To
<
decimal
?>(
fixaitems
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
rownumber
&&
t
.
ItemName
==
"可分配绩效"
)?.
ItemValue
);
var
distperfor
=
ConvertHelper
.
To
<
decimal
?>(
fixaitems
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
rownumber
&&
t
.
ItemName
==
"可分配绩效"
)?.
ItemValue
);
...
@@ -2145,8 +2142,39 @@ public List<SecPrintResponse> Print(int secondId)
...
@@ -2145,8 +2142,39 @@ public List<SecPrintResponse> Print(int secondId)
sec
.
NightWorkPerformance
=
nightworkperfor
;
sec
.
NightWorkPerformance
=
nightworkperfor
;
result
.
Add
(
sec
);
result
.
Add
(
sec
);
}
}
return
result
.
OrderBy
(
t
=>
t
.
RowNumber
).
ToList
();
}
}
// 补充医院其他绩效 及 预留比例
var
perapramounts
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
second
.
AllotId
&&
t
.
Status
==
3
);
var
employees
=
personService
.
GetPerEmployee
(
second
.
AllotId
.
Value
);
// 补充字典中该科室不存在,但有其它绩效的人员信息
if
(
perapramounts
!=
null
&&
perapramounts
.
Any
(
t
=>
t
.
AccountingUnit
==
second
.
Department
))
{
var
groupData
=
perapramounts
.
Where
(
t
=>
t
.
AccountingUnit
==
second
.
Department
).
GroupBy
(
t
=>
t
.
PersonnelNumber
)
.
Select
(
t
=>
new
SecPrintResponse
{
JobNumber
=
t
.
Key
,
PersonName
=
t
.
FirstOrDefault
(
w
=>
!
string
.
IsNullOrEmpty
(
w
.
DoctorName
))?.
DoctorName
,
OtherPerformance
=
t
.
Sum
(
w
=>
w
.
Amount
),
RealAmount
=
t
.
Sum
(
w
=>
w
.
Amount
),
});
foreach
(
var
item
in
groupData
)
{
if
(!
result
.
Any
(
w
=>
w
.
JobNumber
==
item
.
JobNumber
))
{
per_employee
employee
=
employees
?.
FirstOrDefault
(
t
=>
t
.
PersonnelNumber
==
item
.
JobNumber
);
if
(
employee
!=
null
&&
employee
.
UnitType
==
second
.
UnitType
)
{
item
.
Department
=
employee
.
AccountingUnit
;
item
.
WorkPost
=
employee
.
JobTitle
;
result
.
Add
(
item
);
}
}
}
}
return
result
.
OrderBy
(
t
=>
t
.
JobNumber
).
ThenBy
(
t
=>
t
.
PersonName
).
ToList
();
}
}
#
endregion
打印
#
endregion
打印
...
...
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