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
2a6c8a8f
Commit
2a6c8a8f
authored
May 21, 2020
by
lcx
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2020' into rsk
parents
ea9615ad
b76517c4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
239 additions
and
30 deletions
+239
-30
performance/Performance.Api/Controllers/SecondAllotController.cs
+3
-2
performance/Performance.Api/Template/医院绩效模板.xlsx
+0
-0
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+10
-0
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+20
-0
performance/Performance.DtoModels/PerExcel/ExcelEnum.cs
+8
-2
performance/Performance.DtoModels/PerExcel/PerDataAccountBaisc.cs
+10
-0
performance/Performance.EntityModels/Entity/im_accountbasic.cs
+10
-0
performance/Performance.EntityModels/Entity/res_account.cs
+10
-0
performance/Performance.Services/AllotCompute/ProcessComputService.cs
+4
-4
performance/Performance.Services/AllotCompute/ResultComputeService.cs
+3
-0
performance/Performance.Services/ComputeService.cs
+42
-8
performance/Performance.Services/DFExtractService.cs
+75
-6
performance/Performance.Services/PerExcelService/ComputeEmpolyee/ComputeDirector.cs
+18
-2
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadDeptAccounting.cs
+2
-0
performance/Performance.Services/SecondAllotService.cs
+24
-6
performance/Performance.Services/SheetSevice.cs
+0
-0
No files found.
performance/Performance.Api/Controllers/SecondAllotController.cs
View file @
2a6c8a8f
...
@@ -138,7 +138,8 @@ public ApiResponse SecondDetail([CustomizeValidator(RuleSet = "Refresh"), FromBo
...
@@ -138,7 +138,8 @@ public ApiResponse SecondDetail([CustomizeValidator(RuleSet = "Refresh"), FromBo
[
Route
(
"api/temp/list"
)]
[
Route
(
"api/temp/list"
)]
public
ApiResponse
<
List
<
SecondTempResponse
>>
Temp
([
FromBody
]
AllotDeptRequest
request
)
public
ApiResponse
<
List
<
SecondTempResponse
>>
Temp
([
FromBody
]
AllotDeptRequest
request
)
{
{
var
result
=
secondAllotService
.
GetTemp
(
request
.
HospitalId
,
request
.
Department
);
var
userId
=
claimService
.
GetUserId
();
var
result
=
secondAllotService
.
GetTemp
(
request
.
HospitalId
,
request
.
Department
,
userId
);
return
new
ApiResponse
<
List
<
SecondTempResponse
>>(
ResponseType
.
OK
,
result
);
return
new
ApiResponse
<
List
<
SecondTempResponse
>>(
ResponseType
.
OK
,
result
);
}
}
...
@@ -234,7 +235,7 @@ public ApiResponse SubmitAudit(SubmitAuditRequest request)
...
@@ -234,7 +235,7 @@ public ApiResponse SubmitAudit(SubmitAuditRequest request)
return
new
ApiResponse
(
ResponseType
.
Fail
,
"该绩效已\"审核通过\",无需再次提交"
);
return
new
ApiResponse
(
ResponseType
.
Fail
,
"该绩效已\"审核通过\",无需再次提交"
);
var
userid
=
claimService
.
GetUserId
();
var
userid
=
claimService
.
GetUserId
();
var
result
=
secondAllotService
.
AuditSubmit
(
second
,
request
.
Type
);
var
result
=
secondAllotService
.
AuditSubmit
(
second
,
userid
);
return
result
?
new
ApiResponse
(
ResponseType
.
OK
,
"提交成功"
)
:
new
ApiResponse
(
ResponseType
.
Fail
,
"提交失败"
);
return
result
?
new
ApiResponse
(
ResponseType
.
OK
,
"提交成功"
)
:
new
ApiResponse
(
ResponseType
.
Fail
,
"提交失败"
);
}
}
...
...
performance/Performance.Api/Template/医院绩效模板.xlsx
View file @
2a6c8a8f
No preview for this file type
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
2a6c8a8f
...
@@ -787,6 +787,16 @@
...
@@ -787,6 +787,16 @@
其他绩效2
其他绩效2
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.DtoModels.PerDataAccountBaisc.MedicineExtra"
>
<summary>
药占比奖罚
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataAccountBaisc.MaterialsExtra"
>
<summary>
材料占比奖罚
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataAccountBaisc.Extra"
>
<member
name=
"P:Performance.DtoModels.PerDataAccountBaisc.Extra"
>
<summary>
<summary>
医院奖罚
医院奖罚
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
2a6c8a8f
...
@@ -1477,6 +1477,16 @@
...
@@ -1477,6 +1477,16 @@
其他绩效2
其他绩效2
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.im_accountbasic.MedicineExtra"
>
<summary>
药占比奖罚
</summary>
</member>
<member
name=
"P:Performance.EntityModels.im_accountbasic.MaterialsExtra"
>
<summary>
材料占比奖罚
</summary>
</member>
<member
name=
"P:Performance.EntityModels.im_accountbasic.DoctorExtra"
>
<member
name=
"P:Performance.EntityModels.im_accountbasic.DoctorExtra"
>
<summary>
<summary>
医院奖罚
医院奖罚
...
@@ -3277,6 +3287,16 @@
...
@@ -3277,6 +3287,16 @@
其他绩效2
其他绩效2
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.res_account.MedicineExtra"
>
<summary>
药占比奖罚
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_account.MaterialsExtra"
>
<summary>
材料占比奖罚
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_account.Extra"
>
<member
name=
"P:Performance.EntityModels.res_account.Extra"
>
<summary>
<summary>
医院奖罚
医院奖罚
...
...
performance/Performance.DtoModels/PerExcel/ExcelEnum.cs
View file @
2a6c8a8f
...
@@ -23,10 +23,16 @@ public enum UnitType
...
@@ -23,10 +23,16 @@ public enum UnitType
医技组
=
3
,
医技组
=
3
,
[
Description
(
"专家组"
)]
[
Description
(
"专家组"
)]
专家组
=
4
,
专家组
=
4
,
[
Description
(
"其他"
)]
//
[Description("其他")]
其他
=
5
,
//
其他 = 5,
[
Description
(
"特殊核算组"
)]
[
Description
(
"特殊核算组"
)]
特殊核算组
=
6
,
特殊核算组
=
6
,
[
Description
(
"其他医生组"
)]
其他医生组
=
7
,
[
Description
(
"其他护理组"
)]
其他护理组
=
8
,
[
Description
(
"其他医技组"
)]
其他医技组
=
9
,
}
}
public
enum
SheetType
public
enum
SheetType
...
...
performance/Performance.DtoModels/PerExcel/PerDataAccountBaisc.cs
View file @
2a6c8a8f
...
@@ -69,6 +69,16 @@ public class PerDataAccountBaisc : IPerData
...
@@ -69,6 +69,16 @@ public class PerDataAccountBaisc : IPerData
public
decimal
OtherPerfor2
{
get
;
set
;
}
public
decimal
OtherPerfor2
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 药占比奖罚
/// </summary>
public
decimal
MedicineExtra
{
get
;
set
;
}
/// <summary>
/// 材料占比奖罚
/// </summary>
public
decimal
MaterialsExtra
{
get
;
set
;
}
/// <summary>
/// 医院奖罚
/// 医院奖罚
/// </summary>
/// </summary>
public
decimal
Extra
{
get
;
set
;
}
public
decimal
Extra
{
get
;
set
;
}
...
...
performance/Performance.EntityModels/Entity/im_accountbasic.cs
View file @
2a6c8a8f
...
@@ -107,6 +107,16 @@ public class im_accountbasic
...
@@ -107,6 +107,16 @@ public class im_accountbasic
public
Nullable
<
decimal
>
DoctorOtherPerfor2
{
get
;
set
;
}
public
Nullable
<
decimal
>
DoctorOtherPerfor2
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 药占比奖罚
/// </summary>
public
Nullable
<
decimal
>
MedicineExtra
{
get
;
set
;
}
/// <summary>
/// 材料占比奖罚
/// </summary>
public
Nullable
<
decimal
>
MaterialsExtra
{
get
;
set
;
}
/// <summary>
/// 医院奖罚
/// 医院奖罚
/// </summary>
/// </summary>
public
Nullable
<
decimal
>
DoctorExtra
{
get
;
set
;
}
public
Nullable
<
decimal
>
DoctorExtra
{
get
;
set
;
}
...
...
performance/Performance.EntityModels/Entity/res_account.cs
View file @
2a6c8a8f
...
@@ -102,6 +102,16 @@ public class res_account
...
@@ -102,6 +102,16 @@ public class res_account
public
Nullable
<
decimal
>
OtherPerfor2
{
get
;
set
;
}
public
Nullable
<
decimal
>
OtherPerfor2
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 药占比奖罚
/// </summary>
public
Nullable
<
decimal
>
MedicineExtra
{
get
;
set
;
}
/// <summary>
/// 材料占比奖罚
/// </summary>
public
Nullable
<
decimal
>
MaterialsExtra
{
get
;
set
;
}
/// <summary>
/// 医院奖罚
/// 医院奖罚
/// </summary>
/// </summary>
public
Nullable
<
decimal
>
Extra
{
get
;
set
;
}
public
Nullable
<
decimal
>
Extra
{
get
;
set
;
}
...
...
performance/Performance.Services/AllotCompute/ProcessComputService.cs
View file @
2a6c8a8f
...
@@ -252,7 +252,7 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, List<res_
...
@@ -252,7 +252,7 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, List<res_
var
pairs
=
new
[]
var
pairs
=
new
[]
{
{
new
{
Name
=
"医生组临床科室单元核算表"
,
Data
=
doctorWorkloadData
,
SheetType
=
SheetType
.
ComputeDoctorAccount
,
UnitTypes
=
new
List
<
UnitType
>
{
UnitType
.
医生组
,
UnitType
.
医技组
,
UnitType
.
专家组
,
UnitType
.
其他
}
},
new
{
Name
=
"医生组临床科室单元核算表"
,
Data
=
doctorWorkloadData
,
SheetType
=
SheetType
.
ComputeDoctorAccount
,
UnitTypes
=
new
List
<
UnitType
>
{
UnitType
.
医生组
,
UnitType
.
医技组
,
UnitType
.
专家组
,
UnitType
.
其他
医技组
,
UnitType
.
其他医生组
,
UnitType
.
其他护理组
}
},
new
{
Name
=
"护理组临床科室单元核算表"
,
Data
=
nurseWorkloadData
,
SheetType
=
SheetType
.
ComputeNurseAccount
,
UnitTypes
=
new
List
<
UnitType
>
{
UnitType
.
护理组
}
},
new
{
Name
=
"护理组临床科室单元核算表"
,
Data
=
nurseWorkloadData
,
SheetType
=
SheetType
.
ComputeNurseAccount
,
UnitTypes
=
new
List
<
UnitType
>
{
UnitType
.
护理组
}
},
};
};
List
<
PerSheet
>
result
=
new
List
<
PerSheet
>();
List
<
PerSheet
>
result
=
new
List
<
PerSheet
>();
...
@@ -270,7 +270,7 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, List<res_
...
@@ -270,7 +270,7 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, List<res_
continue
;
continue
;
var
econDoctor
=
economicData
.
FirstOrDefault
(
t
=>
t
.
UnitType
==
unitType
.
ToString
()
&&
t
.
AccountingUnit
==
dept
.
Department
);
var
econDoctor
=
economicData
.
FirstOrDefault
(
t
=>
t
.
UnitType
==
unitType
.
ToString
()
&&
t
.
AccountingUnit
==
dept
.
Department
);
var
workDoctor
=
info
.
Data
.
FirstOrDefault
(
t
=>
t
.
UnitType
==
unitType
.
ToString
()
&&
t
.
AccountingUnit
==
dept
.
Department
);
var
workDoctor
=
info
.
Data
.
FirstOrDefault
(
t
=>
t
.
UnitType
==
unitType
.
ToString
()
&&
t
.
AccountingUnit
==
dept
.
Department
);
if
(
UnitType
.
专家组
==
unitType
||
UnitType
.
其他
==
unitType
)
if
(
UnitType
.
专家组
==
unitType
||
UnitType
.
其他
医技组
==
unitType
||
UnitType
.
其他医生组
==
unitType
||
UnitType
.
其他护理组
==
unitType
)
{
{
econDoctor
=
economicData
.
FirstOrDefault
(
t
=>
t
.
AccountingUnit
==
dept
.
Department
);
econDoctor
=
economicData
.
FirstOrDefault
(
t
=>
t
.
AccountingUnit
==
dept
.
Department
);
workDoctor
=
info
.
Data
.
FirstOrDefault
(
t
=>
t
.
AccountingUnit
==
dept
.
Department
);
workDoctor
=
info
.
Data
.
FirstOrDefault
(
t
=>
t
.
AccountingUnit
==
dept
.
Department
);
...
@@ -298,7 +298,7 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, List<res_
...
@@ -298,7 +298,7 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, List<res_
dept
.
WorkloadFee
=
dept
.
WorkSlopeFactor
*
(
workDoctor
?.
CellValue
??
0
);
dept
.
WorkloadFee
=
dept
.
WorkSlopeFactor
*
(
workDoctor
?.
CellValue
??
0
);
dept
.
PerforFee
=
dept
.
Income
*
(
dept
.
BasicFactor
+
dept
.
SlopeFactor
);
dept
.
PerforFee
=
dept
.
Income
*
(
dept
.
BasicFactor
+
dept
.
SlopeFactor
);
dept
.
PerforTotal
=
dept
.
PerforFee
+
dept
.
WorkloadFee
+
dept
.
OtherPerfor1
+
(
dept
.
MinimumFee
??
0
);
dept
.
PerforTotal
=
dept
.
PerforFee
+
dept
.
WorkloadFee
+
dept
.
OtherPerfor1
+
(
dept
.
MinimumFee
??
0
);
dept
.
RealGiveFee
=
(
dept
.
PerforTotal
*
dept
.
ScoringAverage
+
dept
.
Extra
+
dept
.
OtherPerfor2
)
*
dept
.
AdjustFactor
;
dept
.
RealGiveFee
=
(
dept
.
PerforTotal
*
dept
.
ScoringAverage
+
dept
.
MedicineExtra
+
dept
.
MaterialsExtra
+
dept
.
Extra
+
dept
.
OtherPerfor2
)
*
dept
.
AdjustFactor
;
dept
.
Avg
=
dept
.
ManagerNumber
+
dept
.
Number
==
0
?
0
:
dept
.
PerforTotal
/
(
dept
.
ManagerNumber
+
dept
.
Number
);
dept
.
Avg
=
dept
.
ManagerNumber
+
dept
.
Number
==
0
?
0
:
dept
.
PerforTotal
/
(
dept
.
ManagerNumber
+
dept
.
Number
);
}
}
...
@@ -464,7 +464,7 @@ public void ComputeCustomMinimum(PerExcel excel, List<PerSheet> perSheet, List<r
...
@@ -464,7 +464,7 @@ public void ComputeCustomMinimum(PerExcel excel, List<PerSheet> perSheet, List<r
dept
.
WorkloadFee
=
workload
?.
CellValue
??
0
;
dept
.
WorkloadFee
=
workload
?.
CellValue
??
0
;
dept
.
PerforFee
=
dept
.
Income
*
(
dept
.
BasicFactor
+
dept
.
SlopeFactor
);
dept
.
PerforFee
=
dept
.
Income
*
(
dept
.
BasicFactor
+
dept
.
SlopeFactor
);
dept
.
PerforTotal
=
dept
.
PerforFee
+
dept
.
WorkloadFee
+
dept
.
OtherPerfor1
+
(
dept
.
MinimumFee
??
0
);
dept
.
PerforTotal
=
dept
.
PerforFee
+
dept
.
WorkloadFee
+
dept
.
OtherPerfor1
+
(
dept
.
MinimumFee
??
0
);
dept
.
RealGiveFee
=
(
dept
.
PerforTotal
*
dept
.
ScoringAverage
+
dept
.
Extra
+
dept
.
OtherPerfor2
)
*
dept
.
AdjustFactor
;
dept
.
RealGiveFee
=
(
dept
.
PerforTotal
*
dept
.
ScoringAverage
+
dept
.
MedicineExtra
+
dept
.
MaterialsExtra
+
dept
.
Extra
+
dept
.
OtherPerfor2
)
*
dept
.
AdjustFactor
;
dept
.
Avg
=
dept
.
ManagerNumber
+
dept
.
Number
==
0
?
0
:
dept
.
PerforTotal
/
(
dept
.
ManagerNumber
+
dept
.
Number
);
dept
.
Avg
=
dept
.
ManagerNumber
+
dept
.
Number
==
0
?
0
:
dept
.
PerforTotal
/
(
dept
.
ManagerNumber
+
dept
.
Number
);
totalValue
+=
(
dept
.
PerforTotal
??
0
);
totalValue
+=
(
dept
.
PerforTotal
??
0
);
...
...
performance/Performance.Services/AllotCompute/ResultComputeService.cs
View file @
2a6c8a8f
...
@@ -191,8 +191,11 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
...
@@ -191,8 +191,11 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
resDataList
.
Add
(
res
);
resDataList
.
Add
(
res
);
}
}
if
(
computeEmployees
==
null
||
!
computeEmployees
.
Any
())
continue
;
var
empolyees
=
computeEmployees
.
Where
(
t
=>
t
.
AccountingUnit
==
group
.
AccountingUnit
);
var
empolyees
=
computeEmployees
.
Where
(
t
=>
t
.
AccountingUnit
==
group
.
AccountingUnit
);
if
(
empolyees
==
null
||
!
empolyees
.
Any
())
continue
;
foreach
(
var
empolyee
in
empolyees
)
foreach
(
var
empolyee
in
empolyees
)
{
{
//if (empolyee == null)
//if (empolyee == null)
...
...
performance/Performance.Services/ComputeService.cs
View file @
2a6c8a8f
...
@@ -18,6 +18,7 @@ public class ComputeService : IAutoInjection
...
@@ -18,6 +18,7 @@ public class ComputeService : IAutoInjection
//private readonly PerforResaccountnurseRepository _perforResAccountnurseRepository;
//private readonly PerforResaccountnurseRepository _perforResAccountnurseRepository;
private
readonly
PerforPersheetRepository
_perforPerSheetRepository
;
private
readonly
PerforPersheetRepository
_perforPerSheetRepository
;
private
readonly
PerforImdataRepository
_perforImDataRepository
;
private
readonly
PerforImdataRepository
_perforImDataRepository
;
private
readonly
PerforImheaderRepository
_perforImheaderRepository
;
private
readonly
PerforRescomputeRepository
_perforRescomputeRepository
;
private
readonly
PerforRescomputeRepository
_perforRescomputeRepository
;
private
readonly
PerforResspecialunitRepository
_perforResspecialunitRepository
;
private
readonly
PerforResspecialunitRepository
_perforResspecialunitRepository
;
private
readonly
PerforPeragainallotRepository
_perforPeragainallotRepository
;
private
readonly
PerforPeragainallotRepository
_perforPeragainallotRepository
;
...
@@ -33,6 +34,7 @@ public class ComputeService : IAutoInjection
...
@@ -33,6 +34,7 @@ public class ComputeService : IAutoInjection
//PerforResaccountnurseRepository perforResAccountnurseRepository,
//PerforResaccountnurseRepository perforResAccountnurseRepository,
PerforPersheetRepository
perforPerSheetRepository
,
PerforPersheetRepository
perforPerSheetRepository
,
PerforImdataRepository
perforImDataRepository
,
PerforImdataRepository
perforImDataRepository
,
PerforImheaderRepository
perforImheaderRepository
,
PerforRescomputeRepository
perforRescomputeRepository
,
PerforRescomputeRepository
perforRescomputeRepository
,
PerforResspecialunitRepository
perforResspecialunitRepository
,
PerforResspecialunitRepository
perforResspecialunitRepository
,
PerforPeragainallotRepository
perforPeragainallotRepository
,
PerforPeragainallotRepository
perforPeragainallotRepository
,
...
@@ -48,6 +50,7 @@ public class ComputeService : IAutoInjection
...
@@ -48,6 +50,7 @@ public class ComputeService : IAutoInjection
//this._perforResAccountnurseRepository = perforResAccountnurseRepository;
//this._perforResAccountnurseRepository = perforResAccountnurseRepository;
this
.
_perforPerSheetRepository
=
perforPerSheetRepository
;
this
.
_perforPerSheetRepository
=
perforPerSheetRepository
;
this
.
_perforImDataRepository
=
perforImDataRepository
;
this
.
_perforImDataRepository
=
perforImDataRepository
;
this
.
_perforImheaderRepository
=
perforImheaderRepository
;
this
.
_perforRescomputeRepository
=
perforRescomputeRepository
;
this
.
_perforRescomputeRepository
=
perforRescomputeRepository
;
this
.
_perforResspecialunitRepository
=
perforResspecialunitRepository
;
this
.
_perforResspecialunitRepository
=
perforResspecialunitRepository
;
this
.
_perforPeragainallotRepository
=
perforPeragainallotRepository
;
this
.
_perforPeragainallotRepository
=
perforPeragainallotRepository
;
...
@@ -78,7 +81,14 @@ public List<ResComputeResponse> GetCompute(int allotId, int type)
...
@@ -78,7 +81,14 @@ public List<ResComputeResponse> GetCompute(int allotId, int type)
{
{
{
(
int
)
AccountUnitType
.
科主任
,
new
List
<
string
>{
UnitType
.
医生组
.
ToString
(),
UnitType
.
医技组
.
ToString
()
}
},
{
(
int
)
AccountUnitType
.
科主任
,
new
List
<
string
>{
UnitType
.
医生组
.
ToString
(),
UnitType
.
医技组
.
ToString
()
}
},
{
(
int
)
AccountUnitType
.
护士长
,
new
List
<
string
>{
UnitType
.
护理组
.
ToString
()
}
},
{
(
int
)
AccountUnitType
.
护士长
,
new
List
<
string
>{
UnitType
.
护理组
.
ToString
()
}
},
{
(
int
)
AccountUnitType
.
Null
,
new
List
<
string
>{
UnitType
.
特殊核算组
.
ToString
(),
UnitType
.
其他
.
ToString
()
}
},
{
(
int
)
AccountUnitType
.
Null
,
new
List
<
string
>
{
UnitType
.
特殊核算组
.
ToString
(),
UnitType
.
其他医生组
.
ToString
(),
UnitType
.
其他护理组
.
ToString
(),
UnitType
.
其他医技组
.
ToString
()
}
},
};
};
if
(
pairs
.
Keys
.
Any
(
t
=>
t
==
type
))
if
(
pairs
.
Keys
.
Any
(
t
=>
t
==
type
))
...
@@ -189,7 +199,7 @@ public List<DeptResponse> GetNursePerformance(int allotId)
...
@@ -189,7 +199,7 @@ public List<DeptResponse> GetNursePerformance(int allotId)
/// <returns></returns>
/// <returns></returns>
public
List
<
DeptResponse
>
GetOtherPerformance
(
int
allotId
)
public
List
<
DeptResponse
>
GetOtherPerformance
(
int
allotId
)
{
{
var
unitType
=
new
List
<
int
>
{
(
int
)
UnitType
.
其他
,
(
int
)
UnitType
.
专家组
};
var
unitType
=
new
List
<
int
>
{
(
int
)
UnitType
.
其他
医技组
,
(
int
)
UnitType
.
其他医生组
,
(
int
)
UnitType
.
其他护理组
,
(
int
)
UnitType
.
专家组
};
var
list
=
perforResaccountRepository
.
GetEntities
(
t
=>
unitType
.
Contains
(
t
.
UnitType
.
Value
)
&&
t
.
AllotID
==
allotId
)?.
OrderBy
(
t
=>
t
.
UnitType
).
ThenByDescending
(
t
=>
t
.
AccountingUnit
);
var
list
=
perforResaccountRepository
.
GetEntities
(
t
=>
unitType
.
Contains
(
t
.
UnitType
.
Value
)
&&
t
.
AllotID
==
allotId
)?.
OrderBy
(
t
=>
t
.
UnitType
).
ThenByDescending
(
t
=>
t
.
AccountingUnit
);
List
<
DeptResponse
>
other
=
Mapper
.
Map
<
List
<
DeptResponse
>>(
list
);
List
<
DeptResponse
>
other
=
Mapper
.
Map
<
List
<
DeptResponse
>>(
list
);
other
?.
ForEach
(
t
=>
t
.
UnitName
=
((
UnitType
)
t
.
UnitType
).
ToString
());
other
?.
ForEach
(
t
=>
t
.
UnitName
=
((
UnitType
)
t
.
UnitType
).
ToString
());
...
@@ -385,7 +395,7 @@ public DeptDataDetails DeptDetail(int accountId)
...
@@ -385,7 +395,7 @@ public DeptDataDetails DeptDetail(int accountId)
Detail
=
new
List
<
DetailDtos
>()
Detail
=
new
List
<
DetailDtos
>()
};
};
int
type
=
doctor
.
UnitType
.
Value
;
int
type
=
doctor
.
UnitType
.
Value
;
if
(
type
==
(
int
)
UnitType
.
专家组
||
type
==
(
int
)
UnitType
.
其他
)
if
(
type
==
(
int
)
UnitType
.
专家组
||
type
==
(
int
)
UnitType
.
其他
医技组
||
type
==
(
int
)
UnitType
.
其他医生组
||
type
==
(
int
)
UnitType
.
其他护理组
)
type
=
1
;
type
=
1
;
var
basicData
=
_perforImDataRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
doctor
.
AllotID
&&
t
.
UnitType
==
type
&&
t
.
AccountingUnit
==
doctor
.
AccountingUnit
);
var
basicData
=
_perforImDataRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
doctor
.
AllotID
&&
t
.
UnitType
==
type
&&
t
.
AccountingUnit
==
doctor
.
AccountingUnit
);
var
persheet
=
_perforPerSheetRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
doctor
.
AllotID
);
var
persheet
=
_perforPerSheetRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
doctor
.
AllotID
);
...
@@ -395,6 +405,7 @@ public DeptDataDetails DeptDetail(int accountId)
...
@@ -395,6 +405,7 @@ public DeptDataDetails DeptDetail(int accountId)
var
dataEconomicList
=
basicData
.
Where
(
t
=>
t
.
SheetID
==
sheetEconomic
?.
ID
&&
t
.
UnitType
==
type
&&
t
.
IsTotal
!=
1
&&
t
.
AccountingUnit
==
doctor
.
AccountingUnit
).
ToList
();
var
dataEconomicList
=
basicData
.
Where
(
t
=>
t
.
SheetID
==
sheetEconomic
?.
ID
&&
t
.
UnitType
==
type
&&
t
.
IsTotal
!=
1
&&
t
.
AccountingUnit
==
doctor
.
AccountingUnit
).
ToList
();
var
economic
=
dataEconomicList
?.
Select
(
t
=>
new
DeptDetail
{
ItemName
=
t
.
TypeName
.
Replace
(
$"(
{
typeValue
}
)"
,
""
),
ItemValue
=
t
.
CellValue
??
0
});
var
economic
=
dataEconomicList
?.
Select
(
t
=>
new
DeptDetail
{
ItemName
=
t
.
TypeName
.
Replace
(
$"(
{
typeValue
}
)"
,
""
),
ItemValue
=
t
.
CellValue
??
0
});
var
headers
=
_perforImheaderRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
doctor
.
AllotID
);
Regex
reg
=
new
Regex
(
"[0-9]*"
);
Regex
reg
=
new
Regex
(
"[0-9]*"
);
foreach
(
var
stype
in
sheetType
)
foreach
(
var
stype
in
sheetType
)
{
{
...
@@ -404,19 +415,42 @@ public DeptDataDetails DeptDetail(int accountId)
...
@@ -404,19 +415,42 @@ public DeptDataDetails DeptDetail(int accountId)
var
sheetData
=
basicData
.
Where
(
t
=>
t
.
SheetID
==
sheet
.
ID
).
ToList
();
var
sheetData
=
basicData
.
Where
(
t
=>
t
.
SheetID
==
sheet
.
ID
).
ToList
();
if
(
sheetData
==
null
||
!
sheetData
.
Any
())
continue
;
if
(
sheetData
==
null
||
!
sheetData
.
Any
())
continue
;
var
headerData
=
headers
?.
Where
(
t
=>
t
.
SheetID
==
sheet
.
ID
);
var
item
=
new
DetailDtos
var
item
=
new
DetailDtos
{
{
ItemName
=
sheetName
,
ItemName
=
sheetName
,
IncomeType
=
sheet
.
SheetType
==
(
int
)
SheetType
.
Expend
?
2
:
sheet
.
SheetType
==
(
int
)
SheetType
.
Workload
?
3
:
1
,
IncomeType
=
sheet
.
SheetType
==
(
int
)
SheetType
.
Expend
?
2
:
sheet
.
SheetType
==
(
int
)
SheetType
.
Workload
?
3
:
1
,
Amount
=
(
sheetName
.
Contains
(
"工作量"
)
?
doctor
.
WorkloadFee
:
economic
.
FirstOrDefault
(
t
=>
t
.
ItemName
.
Contains
(
sheetName
))?.
ItemValue
)
??
0
m
,
Amount
=
(
sheet
.
SheetType
==
(
int
)
SheetType
.
Workload
?
doctor
.
WorkloadFee
:
economic
.
FirstOrDefault
(
t
=>
t
.
ItemName
.
Contains
(
sheetName
))?.
ItemValue
)
??
0
m
,
Items
=
sheetData
?.
Select
(
t
=>
new
DetailModule
};
var
items
=
sheetData
?.
Select
(
t
=>
new
DetailModule
{
{
ItemName
=
t
.
TypeName
,
ItemName
=
t
.
TypeName
,
CellValue
=
t
.
CellValue
,
CellValue
=
t
.
CellValue
,
Factor
=
t
.
FactorValue
,
Factor
=
sheet
.
SheetType
==
(
int
)
SheetType
.
Workload
?
t
.
FactorValue
:
t
.
FactorValue
*
100
,
ItemValue
=
t
.
IsFactor
==
1
?
(
t
.
CellValue
*
(
t
.
FactorValue
??
0
))
:
t
.
CellValue
ItemValue
=
t
.
IsFactor
==
1
?
(
t
.
CellValue
*
(
t
.
FactorValue
??
0
))
:
t
.
CellValue
}).
ToList
()
}).
ToList
();
};
if
(
items
!=
null
&&
items
.
Any
())
{
items
=
items
.
GroupBy
(
t
=>
t
.
ItemName
).
Select
(
t
=>
new
DetailModule
{
ItemName
=
t
.
Key
,
CellValue
=
t
.
Sum
(
group
=>
group
.
CellValue
),
Factor
=
t
.
FirstOrDefault
().
Factor
,
ItemValue
=
t
.
Sum
(
group
=>
group
.
ItemValue
),
}).
ToList
();
}
if
(
headerData
!=
null
&&
headerData
.
Any
())
{
items
=
items
?.
OrderBy
(
t
=>
(
headerData
.
FirstOrDefault
(
h
=>
h
.
CellValue
==
t
.
ItemName
)?.
PointCell
)
??
100
)
?.
ThenBy
(
t
=>
t
.
ItemName
).
ToList
();
}
item
.
Items
=
items
;
deptDetails
.
Detail
.
Add
(
item
);
deptDetails
.
Detail
.
Add
(
item
);
}
}
}
}
...
...
performance/Performance.Services/DFExtractService.cs
View file @
2a6c8a8f
...
@@ -409,8 +409,6 @@ private void WriteIncome(ISheet sheet, IPerSheetDataRead sheetRead, List<Account
...
@@ -409,8 +409,6 @@ private void WriteIncome(ISheet sheet, IPerSheetDataRead sheetRead, List<Account
logger
.
LogInformation
(
$"item有
{
itemList
?.
Count
??
0
}
个."
);
logger
.
LogInformation
(
$"item有
{
itemList
?.
Count
??
0
}
个."
);
if
(
itemList
==
null
||
!
itemList
.
Any
())
return
;
if
(
itemList
==
null
||
!
itemList
.
Any
())
return
;
WriteHeaderAndFactor
(
sheet
,
sheetRead
,
itemList
,
isNewTemp
);
//查询数据
//查询数据
var
extractList
=
extracts
.
Where
(
t
=>
module
.
ExtractId
==
t
.
Id
).
ToList
();
var
extractList
=
extracts
.
Where
(
t
=>
module
.
ExtractId
==
t
.
Id
).
ToList
();
if
(
extractList
==
null
||
extractList
.
Count
==
0
)
return
;
if
(
extractList
==
null
||
extractList
.
Count
==
0
)
return
;
...
@@ -428,7 +426,11 @@ private void WriteIncome(ISheet sheet, IPerSheetDataRead sheetRead, List<Account
...
@@ -428,7 +426,11 @@ private void WriteIncome(ISheet sheet, IPerSheetDataRead sheetRead, List<Account
allExtract
.
AddRange
(
result
);
allExtract
.
AddRange
(
result
);
}
}
WriteSheetData
(
sheet
,
sheetRead
,
unitList
,
allExtract
,
itemList
.
Select
(
t
=>
t
.
ItemName
),
isNewTemp
,
true
);
logger
.
LogInformation
(
$"
{
sheet
.
SheetName
}
合计值为: "
+
allExtract
.
Sum
(
t
=>
t
.
Value
));
var
category
=
allExtract
.
Select
(
t
=>
t
.
Category
).
Distinct
().
ToList
();
WriteIncomeHeaderAndFactor
(
sheet
,
sheetRead
,
category
,
isNewTemp
);
WriteSheetData
(
sheet
,
sheetRead
,
unitList
,
allExtract
,
category
,
isNewTemp
,
true
);
logger
.
LogInformation
(
$"
{
sheet
.
SheetName
}
提取结束."
);
logger
.
LogInformation
(
$"
{
sheet
.
SheetName
}
提取结束."
);
}
}
...
@@ -503,6 +505,7 @@ private void WriteWorkload(ISheet sheet, IPerSheetDataRead sheetRead, List<Accou
...
@@ -503,6 +505,7 @@ private void WriteWorkload(ISheet sheet, IPerSheetDataRead sheetRead, List<Accou
var
result
=
QueryDatabase
(
config
,
item
,
Allot
,
moditem
.
ItemName
);
var
result
=
QueryDatabase
(
config
,
item
,
Allot
,
moditem
.
ItemName
);
if
(
result
!=
null
)
if
(
result
!=
null
)
allExtract
.
AddRange
(
result
);
allExtract
.
AddRange
(
result
);
logger
.
LogInformation
(
$"
{
module
.
ModuleName
}
提取
{
moditem
.
ItemName
}
的合计值为: "
+
allExtract
.
Sum
(
t
=>
t
.
Value
));
}
}
}
}
...
@@ -707,9 +710,11 @@ private void WriteHeaderAndFactor(ISheet sheet, IPerSheetDataRead sheetRead, Lis
...
@@ -707,9 +710,11 @@ private void WriteHeaderAndFactor(ISheet sheet, IPerSheetDataRead sheetRead, Lis
logManageService
.
WriteMsg
(
"提取绩效数据"
,
$"写入列头信息 --
{
sheet
.
SheetName
}
"
,
1
,
Allot
.
ID
,
"ReceiveMessage"
);
logManageService
.
WriteMsg
(
"提取绩效数据"
,
$"写入列头信息 --
{
sheet
.
SheetName
}
"
,
1
,
Allot
.
ID
,
"ReceiveMessage"
);
logger
.
LogInformation
(
$"提取绩效数据 提取绩效数据 写入列头信息 --
{
sheet
.
SheetName
}
"
);
logger
.
LogInformation
(
$"提取绩效数据 提取绩效数据 写入列头信息 --
{
sheet
.
SheetName
}
"
);
var
cellItems
=
items
;
var
cellItems
=
new
List
<
mod_item
>();
cellItems
.
AddRange
(
items
);
if
(!
isNewTemp
)
if
(!
isNewTemp
)
{
{
List
<
string
>
original
=
new
List
<
string
>();
#
region
过滤历史模板中已有的列头
#
region
过滤历史模板中已有的列头
//写入列头信息
//写入列头信息
int
cellStartIndex
=
sheetRead
.
Point
.
HeaderFirstCellNum
.
Value
+
4
;
int
cellStartIndex
=
sheetRead
.
Point
.
HeaderFirstCellNum
.
Value
+
4
;
...
@@ -748,6 +753,69 @@ private void WriteHeaderAndFactor(ISheet sheet, IPerSheetDataRead sheetRead, Lis
...
@@ -748,6 +753,69 @@ private void WriteHeaderAndFactor(ISheet sheet, IPerSheetDataRead sheetRead, Lis
#
endregion
#
endregion
}
}
/// <summary>
/// 写入列头
/// </summary>
/// <param name="sheet"></param>
/// <param name="sheetRead"></param>
/// <param name="items">列头数据(列名、系数)</param>
/// <param name="isNewTemp">是否为空白模板</param>
private
void
WriteIncomeHeaderAndFactor
(
ISheet
sheet
,
IPerSheetDataRead
sheetRead
,
List
<
string
>
items
,
bool
isNewTemp
)
{
var
nurseFactor
=
sheet
.
GetRow
(
sheetRead
.
Point
.
AccountingUnit
.
First
(
t
=>
t
.
UnitType
==
"护理组"
).
FactorRow
.
Value
);
var
doctorFactor
=
sheet
.
GetRow
(
sheetRead
.
Point
.
AccountingUnit
.
First
(
t
=>
t
.
UnitType
==
"医生组"
).
FactorRow
.
Value
);
var
technicianFactor
=
sheet
.
GetRow
(
sheetRead
.
Point
.
AccountingUnit
.
First
(
t
=>
t
.
UnitType
==
"医技组"
).
FactorRow
.
Value
);
var
head
=
GetOrCreate
(
sheet
,
sheetRead
.
Point
.
HeaderFirstRowNum
.
Value
);
logManageService
.
WriteMsg
(
"提取绩效数据"
,
$"写入列头信息 --
{
sheet
.
SheetName
}
"
,
1
,
Allot
.
ID
,
"ReceiveMessage"
);
logger
.
LogInformation
(
$"提取绩效数据 提取绩效数据 写入列头信息 --
{
sheet
.
SheetName
}
"
);
logger
.
LogInformation
(
$"
{
sheet
.
SheetName
}
查询出的列头有:"
+
string
.
Join
(
", "
,
items
));
if
(!
isNewTemp
)
{
List
<
string
>
original
=
new
List
<
string
>();
#
region
过滤历史模板中已有的列头
//写入列头信息
int
cellStartIndex
=
sheetRead
.
Point
.
HeaderFirstCellNum
.
Value
+
4
;
for
(
int
i
=
cellStartIndex
;
i
<
head
.
LastCellNum
;
i
++)
{
var
cellvalue
=
head
.
GetCell
(
i
)?.
ToString
();
if
(
string
.
IsNullOrEmpty
(
cellvalue
))
continue
;
items
.
Remove
(
cellvalue
);
}
#
endregion
}
if
(
items
==
null
||
!
items
.
Any
())
return
;
logger
.
LogInformation
(
$"
{
sheet
.
SheetName
}
需要新增的列头有:"
+
string
.
Join
(
", "
,
items
));
#
region
新增模板中不存在的列头
var
lastcellIndex
=
isNewTemp
?
sheetRead
.
Point
.
HeaderFirstCellNum
.
Value
+
4
:
head
.
LastCellNum
;
foreach
(
var
item
in
items
)
{
var
headcell
=
GetOrCreate
(
head
,
lastcellIndex
);
headcell
.
SetCellValue
(
item
);
headcell
.
CellStyle
=
CellStyle
.
CreateCellStyle
(
workbook
,
StyleType
.
列头
);
var
doctorcell
=
GetOrCreate
(
doctorFactor
,
lastcellIndex
);
doctorcell
.
SetCellValue
(
0
);
doctorcell
.
CellStyle
=
CellStyle
.
CreateCellStyle
(
workbook
,
StyleType
.
系数
,
CellFormat
.
百分比
);
var
nursecell
=
GetOrCreate
(
nurseFactor
,
lastcellIndex
);
nursecell
.
SetCellValue
(
0
);
nursecell
.
CellStyle
=
CellStyle
.
CreateCellStyle
(
workbook
,
StyleType
.
系数
,
CellFormat
.
百分比
);
var
techniciancell
=
GetOrCreate
(
technicianFactor
,
lastcellIndex
);
techniciancell
.
SetCellValue
(
0
);
techniciancell
.
CellStyle
=
CellStyle
.
CreateCellStyle
(
workbook
,
StyleType
.
系数
,
CellFormat
.
百分比
);
lastcellIndex
++;
}
#
endregion
}
/// <summary>
/// <summary>
/// 写入数据
/// 写入数据
/// </summary>
/// </summary>
...
@@ -875,7 +943,8 @@ private void WriteWorkHeader(ISheet sheet, IPerSheetDataRead sheetRead, List<mod
...
@@ -875,7 +943,8 @@ private void WriteWorkHeader(ISheet sheet, IPerSheetDataRead sheetRead, List<mod
var
head
=
GetOrCreate
(
sheet
,
sheetRead
.
Point
.
HeaderFirstRowNum
.
Value
+
0
);
var
head
=
GetOrCreate
(
sheet
,
sheetRead
.
Point
.
HeaderFirstRowNum
.
Value
+
0
);
var
factor
=
GetOrCreate
(
sheet
,
sheetRead
.
Point
.
HeaderFirstRowNum
.
Value
+
1
);
var
factor
=
GetOrCreate
(
sheet
,
sheetRead
.
Point
.
HeaderFirstRowNum
.
Value
+
1
);
var
cellItems
=
items
;
var
cellItems
=
new
List
<
mod_item
>();
cellItems
.
AddRange
(
items
);
if
(!
isNewTemp
)
if
(!
isNewTemp
)
{
{
#
region
过滤历史模板中已有的列头
#
region
过滤历史模板中已有的列头
...
@@ -1024,7 +1093,7 @@ private List<ExtractDto> QueryDatabase(sys_hospitalconfig config, mod_extract ex
...
@@ -1024,7 +1093,7 @@ private List<ExtractDto> QueryDatabase(sys_hospitalconfig config, mod_extract ex
item
.
Category
=
category
;
item
.
Category
=
category
;
}
}
}
}
return
result
.
ToList
();
return
result
.
Where
(
t
=>
!
string
.
IsNullOrEmpty
(
t
.
Category
)).
ToList
();
}
}
}
}
return
null
;
return
null
;
...
...
performance/Performance.Services/PerExcelService/ComputeEmpolyee/ComputeDirector.cs
View file @
2a6c8a8f
...
@@ -286,6 +286,9 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
...
@@ -286,6 +286,9 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
new
{
AccountUnitType
=
AccountUnitType
.
科主任
,
UnitType
=
UnitType
.
医生组
},
new
{
AccountUnitType
=
AccountUnitType
.
科主任
,
UnitType
=
UnitType
.
医生组
},
new
{
AccountUnitType
=
AccountUnitType
.
护士长
,
UnitType
=
UnitType
.
护理组
},
new
{
AccountUnitType
=
AccountUnitType
.
护士长
,
UnitType
=
UnitType
.
护理组
},
new
{
AccountUnitType
=
AccountUnitType
.
科主任
,
UnitType
=
UnitType
.
医技组
},
new
{
AccountUnitType
=
AccountUnitType
.
科主任
,
UnitType
=
UnitType
.
医技组
},
new
{
AccountUnitType
=
AccountUnitType
.
科主任
,
UnitType
=
UnitType
.
其他医生组
},
new
{
AccountUnitType
=
AccountUnitType
.
护士长
,
UnitType
=
UnitType
.
其他护理组
},
new
{
AccountUnitType
=
AccountUnitType
.
科主任
,
UnitType
=
UnitType
.
其他医技组
},
};
};
//取出科室
//取出科室
List
<
res_account
>
dataList
=
new
List
<
res_account
>();
List
<
res_account
>
dataList
=
new
List
<
res_account
>();
...
@@ -297,6 +300,13 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
...
@@ -297,6 +300,13 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
var
isBudget
=
budgetService
.
GetAdjustAndGrant
(
allot
,
out
decimal
adjust
,
out
decimal
grant
);
var
isBudget
=
budgetService
.
GetAdjustAndGrant
(
allot
,
out
decimal
adjust
,
out
decimal
grant
);
var
unit
=
new
[]
{
new
{
UnitType
=
UnitType
.
其他医生组
,
NewUnitType
=
UnitType
.
医生组
.
ToString
()
},
new
{
UnitType
=
UnitType
.
其他护理组
,
NewUnitType
=
UnitType
.
护理组
.
ToString
()
},
new
{
UnitType
=
UnitType
.
其他医技组
,
NewUnitType
=
UnitType
.
医技组
.
ToString
()
},
};
var
empDis
=
empolyeeList
.
Select
(
w
=>
new
{
w
.
DoctorName
,
w
.
JobNumber
}).
Distinct
();
var
empDis
=
empolyeeList
.
Select
(
w
=>
new
{
w
.
DoctorName
,
w
.
JobNumber
}).
Distinct
();
foreach
(
var
emp
in
empDis
)
foreach
(
var
emp
in
empDis
)
{
{
...
@@ -305,7 +315,13 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
...
@@ -305,7 +315,13 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
{
{
var
empolyee
=
empolyees
.
ElementAt
(
i
);
var
empolyee
=
empolyees
.
ElementAt
(
i
);
var
resAccount
=
dataList
.
FirstOrDefault
(
t
=>
((
UnitType
)
t
.
UnitType
).
ToString
()
==
empolyee
.
UnitType
&&
t
.
AccountingUnit
==
empolyee
.
AccountingUnit
);
string
unitType
=
empolyee
.
UnitType
;
if
(
unit
.
Select
(
t
=>
t
.
UnitType
.
ToString
()).
Contains
(
empolyee
.
UnitType
))
{
unitType
=
unit
.
FirstOrDefault
(
t
=>
t
.
UnitType
.
ToString
()
==
empolyee
.
UnitType
)?.
NewUnitType
;
}
var
resAccount
=
dataList
.
FirstOrDefault
(
t
=>
((
UnitType
)
t
.
UnitType
).
ToString
()
==
unitType
&&
t
.
AccountingUnit
==
empolyee
.
AccountingUnit
);
if
(
resAccount
==
null
&&
empolyees
.
Count
()
>
1
)
if
(
resAccount
==
null
&&
empolyees
.
Count
()
>
1
)
{
{
// 如果没有找到科室,则找相同用户的其他核算单元类型
// 如果没有找到科室,则找相同用户的其他核算单元类型
...
@@ -345,7 +361,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
...
@@ -345,7 +361,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
var
scale
=
resAccount
.
PerforTotal
*
(
empolyee
.
Scale
??
1
);
var
scale
=
resAccount
.
PerforTotal
*
(
empolyee
.
Scale
??
1
);
var
compute
=
new
ComputeResult
var
compute
=
new
ComputeResult
{
{
UnitType
=
basicRule
.
UnitType
.
ToString
()
,
UnitType
=
empolyee
.
UnitType
,
AccountingUnit
=
empolyee
.
AccountingUnit
,
AccountingUnit
=
empolyee
.
AccountingUnit
,
AccountType
=
basicRule
.
AccountUnitType
.
ToString
(),
AccountType
=
basicRule
.
AccountUnitType
.
ToString
(),
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadDeptAccounting.cs
View file @
2a6c8a8f
...
@@ -71,6 +71,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
...
@@ -71,6 +71,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
unifyUnit
.
MinimumFactor
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"保底绩效系数"
).
PointCell
)?.
NumericCellValue
);
unifyUnit
.
MinimumFactor
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"保底绩效系数"
).
PointCell
)?.
NumericCellValue
);
unifyUnit
.
OtherPerfor1
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"其他绩效1"
).
PointCell
)?.
NumericCellValue
);
unifyUnit
.
OtherPerfor1
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"其他绩效1"
).
PointCell
)?.
NumericCellValue
);
unifyUnit
.
OtherPerfor2
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"其他绩效2"
).
PointCell
)?.
NumericCellValue
);
unifyUnit
.
OtherPerfor2
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"其他绩效2"
).
PointCell
)?.
NumericCellValue
);
unifyUnit
.
MedicineExtra
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"药占比奖罚"
).
PointCell
)?.
NumericCellValue
);
unifyUnit
.
MaterialsExtra
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"材料占比奖罚"
).
PointCell
)?.
NumericCellValue
);
unifyUnit
.
Extra
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"医院奖罚"
).
PointCell
)?.
NumericCellValue
);
unifyUnit
.
Extra
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"医院奖罚"
).
PointCell
)?.
NumericCellValue
);
unifyUnit
.
ScoringAverage
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"考核得分率"
).
PointCell
)?.
NumericCellValue
);
unifyUnit
.
ScoringAverage
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"考核得分率"
).
PointCell
)?.
NumericCellValue
);
unifyUnit
.
AdjustFactor
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"调节系数"
).
PointCell
)?.
NumericCellValue
);
unifyUnit
.
AdjustFactor
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"调节系数"
).
PointCell
)?.
NumericCellValue
);
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
2a6c8a8f
...
@@ -266,7 +266,7 @@ public SecondResponse GetSecondDetail(UseTempRequest request)
...
@@ -266,7 +266,7 @@ public SecondResponse GetSecondDetail(UseTempRequest request)
var
second
=
perforAgsecondallotRepository
.
GetEntity
(
t
=>
t
.
Id
==
request
.
SecondId
);
var
second
=
perforAgsecondallotRepository
.
GetEntity
(
t
=>
t
.
Id
==
request
.
SecondId
);
//获取固定模板列 + 工作量列
//获取固定模板列 + 工作量列
var
headItems
=
GetHeadItems
(
usetemp
.
UseTempId
.
Value
,
usetemp
.
HospitalId
.
Value
,
usetemp
.
Department
,
usetemp
.
UnitType
);
var
headItems
=
GetHeadItems
(
request
.
TempId
,
usetemp
.
HospitalId
.
Value
,
usetemp
.
Department
,
usetemp
.
UnitType
);
var
result
=
new
SecondResponse
();
var
result
=
new
SecondResponse
();
...
@@ -515,12 +515,20 @@ public bool SaveCompute(List<ag_compute> request)
...
@@ -515,12 +515,20 @@ public bool SaveCompute(List<ag_compute> request)
/// </summary>
/// </summary>
/// <param name="userId"></param>
/// <param name="userId"></param>
/// <returns></returns>
/// <returns></returns>
public
List
<
SecondTempResponse
>
GetTemp
(
int
hospitalid
,
string
department
)
public
List
<
SecondTempResponse
>
GetTemp
(
int
hospitalid
,
string
department
,
int
userId
)
{
{
var
temps
=
perforAgtempRepository
.
GetEntities
();
var
temps
=
perforAgtempRepository
.
GetEntities
();
if
(
temps
!=
null
&&
temps
.
Any
())
if
(
temps
!=
null
&&
temps
.
Any
())
{
{
var
useTemp
=
perforAgusetempRepository
.
GetEntity
(
t
=>
t
.
HospitalId
==
hospitalid
&&
t
.
Department
==
department
);
var
userrole
=
userroleRepository
.
GetEntity
(
t
=>
t
.
UserID
==
userId
);
var
role
=
roleRepository
.
GetEntity
(
t
=>
t
.
ID
==
userrole
.
RoleID
);
Expression
<
Func
<
ag_usetemp
,
bool
>>
exp
=
t
=>
t
.
HospitalId
==
hospitalid
&&
t
.
Department
==
department
;
if
(
role
.
Type
==
application
.
DirectorRole
)
exp
=
exp
.
And
(
t
=>
new
List
<
string
>
{
UnitType
.
医生组
.
ToString
(),
UnitType
.
医技组
.
ToString
()
}.
Contains
(
t
.
UnitType
));
else
if
(
role
.
Type
==
application
.
NurseRole
)
exp
=
exp
.
And
(
t
=>
t
.
UnitType
==
UnitType
.
护理组
.
ToString
());
var
useTemp
=
perforAgusetempRepository
.
GetEntity
(
exp
);
var
secondTemps
=
Mapper
.
Map
<
List
<
SecondTempResponse
>>(
temps
);
var
secondTemps
=
Mapper
.
Map
<
List
<
SecondTempResponse
>>(
temps
);
if
(
useTemp
!=
null
)
if
(
useTemp
!=
null
)
secondTemps
.
ForEach
(
t
=>
t
.
IsSelected
=
t
.
Id
==
useTemp
.
UseTempId
);
secondTemps
.
ForEach
(
t
=>
t
.
IsSelected
=
t
.
Id
==
useTemp
.
UseTempId
);
...
@@ -780,13 +788,22 @@ public List<ag_secondallot> AuditList(int userId, int allotId)
...
@@ -780,13 +788,22 @@ public List<ag_secondallot> AuditList(int userId, int allotId)
/// <param name="userId">用户ID</param>
/// <param name="userId">用户ID</param>
/// <param name="secondId">二次绩效ID</param>
/// <param name="secondId">二次绩效ID</param>
/// <returns></returns>
/// <returns></returns>
public
bool
AuditSubmit
(
ag_secondallot
second
,
int
submittype
)
public
bool
AuditSubmit
(
ag_secondallot
second
,
int
userId
)
{
{
var
allot
=
perforPerallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
second
.
AllotId
);
var
allot
=
perforPerallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
second
.
AllotId
);
if
(
allot
==
null
)
if
(
allot
==
null
)
throw
new
PerformanceException
(
"二次绩效无效!"
);
throw
new
PerformanceException
(
"二次绩效无效!"
);
var
temp
=
perforAgusetempRepository
.
GetEntity
(
t
=>
t
.
HospitalId
==
allot
.
HospitalId
);
var
userrole
=
userroleRepository
.
GetEntity
(
t
=>
t
.
UserID
==
userId
);
var
role
=
roleRepository
.
GetEntity
(
t
=>
t
.
ID
==
userrole
.
RoleID
);
Expression
<
Func
<
ag_usetemp
,
bool
>>
exp
=
t
=>
t
.
HospitalId
==
allot
.
HospitalId
&&
t
.
Department
==
second
.
Department
;
if
(
role
.
Type
==
application
.
DirectorRole
)
exp
=
exp
.
And
(
t
=>
new
List
<
string
>
{
UnitType
.
医生组
.
ToString
(),
UnitType
.
医技组
.
ToString
()
}.
Contains
(
t
.
UnitType
));
else
if
(
role
.
Type
==
application
.
NurseRole
)
exp
=
exp
.
And
(
t
=>
t
.
UnitType
==
UnitType
.
护理组
.
ToString
());
var
temp
=
perforAgusetempRepository
.
GetEntity
(
exp
);
if
(
temp
==
null
)
if
(
temp
==
null
)
throw
new
PerformanceException
(
"选择模板不可用,请确定模板及数据是否存在!"
);
throw
new
PerformanceException
(
"选择模板不可用,请确定模板及数据是否存在!"
);
if
(
temp
.
UseTempId
==
6
)
if
(
temp
.
UseTempId
==
6
)
...
@@ -855,7 +872,7 @@ public bool ConfirmAudit(int userId, SecondAuditRequest request)
...
@@ -855,7 +872,7 @@ public bool ConfirmAudit(int userId, SecondAuditRequest request)
var
items
=
perforAgfixatitemRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
request
.
SecondId
);
var
items
=
perforAgfixatitemRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
request
.
SecondId
);
if
(
items
!=
null
&&
items
.
Any
())
if
(
items
!=
null
&&
items
.
Any
())
{
{
var
rowNumbers
=
items
.
Select
(
t
=>
t
.
RowNumber
).
Where
(
t
=>
t
>
0
)?.
Distinct
();
var
rowNumbers
=
items
.
Select
(
t
=>
t
.
RowNumber
).
Where
(
t
=>
t
>
=
0
)?.
Distinct
();
if
(
rowNumbers
!=
null
&&
rowNumbers
.
Any
())
if
(
rowNumbers
!=
null
&&
rowNumbers
.
Any
())
{
{
foreach
(
var
item
in
rowNumbers
)
foreach
(
var
item
in
rowNumbers
)
...
@@ -865,6 +882,7 @@ public bool ConfirmAudit(int userId, SecondAuditRequest request)
...
@@ -865,6 +882,7 @@ public bool ConfirmAudit(int userId, SecondAuditRequest request)
AllotId
=
second
.
AllotId
,
AllotId
=
second
.
AllotId
,
SecondId
=
second
.
Id
,
SecondId
=
second
.
Id
,
Department
=
second
.
Department
,
Department
=
second
.
Department
,
JobNumber
=
items
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"人员工号"
)?.
ItemValue
,
WorkPost
=
items
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"岗位"
)?.
ItemValue
,
WorkPost
=
items
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"岗位"
)?.
ItemValue
,
PersonName
=
items
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"姓名"
)?.
ItemValue
,
PersonName
=
items
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"姓名"
)?.
ItemValue
,
RealGiveFee
=
ConvertHelper
.
TryDecimal
(
items
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"实发绩效工资金额"
)?.
ItemValue
,
0
),
RealGiveFee
=
ConvertHelper
.
TryDecimal
(
items
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"实发绩效工资金额"
)?.
ItemValue
,
0
),
...
...
performance/Performance.Services/SheetSevice.cs
View file @
2a6c8a8f
This diff is collapsed.
Click to expand it.
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