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
e24a0b7a
Commit
e24a0b7a
authored
Feb 22, 2022
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/二次分配列头别名' into develop
parents
e36b32f4
e8e35e91
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
114 additions
and
62 deletions
+114
-62
performance/Performance.Api/Controllers/SecondAllotController.cs
+4
-4
performance/Performance.Services/RedistributionService.cs
+110
-58
No files found.
performance/Performance.Api/Controllers/SecondAllotController.cs
View file @
e24a0b7a
...
@@ -634,7 +634,7 @@ public ApiResponse RedistributionCheck([FromBody] SecondComputeDto request)
...
@@ -634,7 +634,7 @@ public ApiResponse RedistributionCheck([FromBody] SecondComputeDto request)
List
<
SecondComputeCheckResultDto
>
result
=
new
List
<
SecondComputeCheckResultDto
>();
List
<
SecondComputeCheckResultDto
>
result
=
new
List
<
SecondComputeCheckResultDto
>();
// 二次分配人员信息 校验
// 二次分配人员信息 校验
var
checkData
=
_redistributionService
.
CheckData
(
second
,
(
ComputeMode
)
request
.
ComputeMode
,
request
.
Body
,
loads
);
var
checkData
=
_redistributionService
.
CheckData
(
allot
,
second
,
(
ComputeMode
)
request
.
ComputeMode
,
request
.
Body
,
loads
);
if
(
checkData
!=
null
&&
checkData
.
Count
>
0
)
if
(
checkData
!=
null
&&
checkData
.
Count
>
0
)
result
.
AddRange
(
checkData
);
result
.
AddRange
(
checkData
);
...
@@ -701,7 +701,7 @@ public ApiResponse RedistributionCompute([FromBody] SecondComputeDto request)
...
@@ -701,7 +701,7 @@ public ApiResponse RedistributionCompute([FromBody] SecondComputeDto request)
}
}
// 二次分配人员信息 校验
// 二次分配人员信息 校验
var
checkDatas
=
_redistributionService
.
CheckData
(
second
,
(
ComputeMode
)
request
.
ComputeMode
,
request
.
Body
,
loads
);
var
checkDatas
=
_redistributionService
.
CheckData
(
allot
,
second
,
(
ComputeMode
)
request
.
ComputeMode
,
request
.
Body
,
loads
);
if
(
checkDatas
!=
null
&&
checkDatas
.
Any
(
w
=>
w
.
Level
==
ResponseType
.
Error
.
ToString
()))
if
(
checkDatas
!=
null
&&
checkDatas
.
Any
(
w
=>
w
.
Level
==
ResponseType
.
Error
.
ToString
()))
return
new
ApiResponse
(
ResponseType
.
Fail
,
"数据验证未通过,请修复后查看计算结果!"
,
checkDatas
.
Where
(
w
=>
w
.
Level
==
ResponseType
.
Error
.
ToString
()));
return
new
ApiResponse
(
ResponseType
.
Fail
,
"数据验证未通过,请修复后查看计算结果!"
,
checkDatas
.
Where
(
w
=>
w
.
Level
==
ResponseType
.
Error
.
ToString
()));
...
@@ -752,7 +752,7 @@ public ApiResponse RedistributionSave([FromBody] SecondComputeDto request)
...
@@ -752,7 +752,7 @@ public ApiResponse RedistributionSave([FromBody] SecondComputeDto request)
var
loads
=
_redistributionService
.
GetWorkLoads
(
allot
.
HospitalId
,
second
.
UnitType
,
second
.
Department
);
var
loads
=
_redistributionService
.
GetWorkLoads
(
allot
.
HospitalId
,
second
.
UnitType
,
second
.
Department
);
var
workloadGroups
=
_redistributionService
.
GetTopWorkloadBodyGroups
(
loads
);
var
workloadGroups
=
_redistributionService
.
GetTopWorkloadBodyGroups
(
loads
);
// 二次分配人员信息 校验
// 二次分配人员信息 校验
var
checkDatas
=
_redistributionService
.
CheckData
(
second
,
(
ComputeMode
)
request
.
ComputeMode
,
request
.
Body
,
loads
);
var
checkDatas
=
_redistributionService
.
CheckData
(
allot
,
second
,
(
ComputeMode
)
request
.
ComputeMode
,
request
.
Body
,
loads
);
if
(
checkDatas
!=
null
&&
checkDatas
.
Any
(
w
=>
w
.
Level
==
ResponseType
.
Error
.
ToString
()))
if
(
checkDatas
!=
null
&&
checkDatas
.
Any
(
w
=>
w
.
Level
==
ResponseType
.
Error
.
ToString
()))
return
new
ApiResponse
(
ResponseType
.
Fail
,
"数据验证未通过,请修复后查看计算结果!"
,
checkDatas
.
Where
(
w
=>
w
.
Level
==
ResponseType
.
Error
.
ToString
()));
return
new
ApiResponse
(
ResponseType
.
Fail
,
"数据验证未通过,请修复后查看计算结果!"
,
checkDatas
.
Where
(
w
=>
w
.
Level
==
ResponseType
.
Error
.
ToString
()));
// 二次分配提交数据格式 校验
// 二次分配提交数据格式 校验
...
@@ -815,7 +815,7 @@ public ApiResponse RedistributionSubmit([FromBody] SecondComputeDto request)
...
@@ -815,7 +815,7 @@ public ApiResponse RedistributionSubmit([FromBody] SecondComputeDto request)
var
workloadGroups
=
_redistributionService
.
GetTopWorkloadBodyGroups
(
loads
);
var
workloadGroups
=
_redistributionService
.
GetTopWorkloadBodyGroups
(
loads
);
// 二次分配人员信息 校验
// 二次分配人员信息 校验
var
checkDatas
=
_redistributionService
.
CheckData
(
second
,
(
ComputeMode
)
request
.
ComputeMode
,
request
.
Body
,
loads
);
var
checkDatas
=
_redistributionService
.
CheckData
(
allot
,
second
,
(
ComputeMode
)
request
.
ComputeMode
,
request
.
Body
,
loads
);
if
(
checkDatas
!=
null
&&
checkDatas
.
Any
(
w
=>
w
.
Level
==
ResponseType
.
Error
.
ToString
()))
if
(
checkDatas
!=
null
&&
checkDatas
.
Any
(
w
=>
w
.
Level
==
ResponseType
.
Error
.
ToString
()))
return
new
ApiResponse
(
ResponseType
.
Fail
,
"数据验证未通过,请修复后查看计算结果!"
,
checkDatas
.
Where
(
w
=>
w
.
Level
==
ResponseType
.
Error
.
ToString
()));
return
new
ApiResponse
(
ResponseType
.
Fail
,
"数据验证未通过,请修复后查看计算结果!"
,
checkDatas
.
Where
(
w
=>
w
.
Level
==
ResponseType
.
Error
.
ToString
()));
...
...
performance/Performance.Services/RedistributionService.cs
View file @
e24a0b7a
...
@@ -25,6 +25,7 @@ public class RedistributionService : IAutoInjection
...
@@ -25,6 +25,7 @@ public class RedistributionService : IAutoInjection
private
readonly
ILogger
<
RedistributionService
>
_logger
;
private
readonly
ILogger
<
RedistributionService
>
_logger
;
private
readonly
SecondAllotDetails
_secondAllotDetails
;
private
readonly
SecondAllotDetails
_secondAllotDetails
;
private
readonly
PerforPerallotRepository
_perallotRepository
;
private
readonly
PerforPerallotRepository
_perallotRepository
;
private
readonly
PerforCofaliasRepository
_cofaliasRepository
;
private
readonly
PerforPeremployeeRepository
_peremployeeRepository
;
private
readonly
PerforPeremployeeRepository
_peremployeeRepository
;
private
readonly
PerforRescomputeRepository
_rescomputeRepository
;
private
readonly
PerforRescomputeRepository
_rescomputeRepository
;
private
readonly
PerforResaccountRepository
_resaccountRepository
;
private
readonly
PerforResaccountRepository
_resaccountRepository
;
...
@@ -44,6 +45,7 @@ public class RedistributionService : IAutoInjection
...
@@ -44,6 +45,7 @@ public class RedistributionService : IAutoInjection
ILogger
<
RedistributionService
>
logger
,
ILogger
<
RedistributionService
>
logger
,
SecondAllotDetails
secondAllotDetails
,
SecondAllotDetails
secondAllotDetails
,
PerforPerallotRepository
perallotRepository
,
PerforPerallotRepository
perallotRepository
,
PerforCofaliasRepository
cofaliasRepository
,
PerforPeremployeeRepository
peremployeeRepository
,
PerforPeremployeeRepository
peremployeeRepository
,
PerforRescomputeRepository
rescomputeRepository
,
PerforRescomputeRepository
rescomputeRepository
,
PerforResaccountRepository
resaccountRepository
,
PerforResaccountRepository
resaccountRepository
,
...
@@ -62,6 +64,7 @@ public class RedistributionService : IAutoInjection
...
@@ -62,6 +64,7 @@ public class RedistributionService : IAutoInjection
_logger
=
logger
;
_logger
=
logger
;
_secondAllotDetails
=
secondAllotDetails
;
_secondAllotDetails
=
secondAllotDetails
;
_perallotRepository
=
perallotRepository
;
_perallotRepository
=
perallotRepository
;
_cofaliasRepository
=
cofaliasRepository
;
_peremployeeRepository
=
peremployeeRepository
;
_peremployeeRepository
=
peremployeeRepository
;
_rescomputeRepository
=
rescomputeRepository
;
_rescomputeRepository
=
rescomputeRepository
;
_resaccountRepository
=
resaccountRepository
;
_resaccountRepository
=
resaccountRepository
;
...
@@ -100,7 +103,7 @@ public SecondDetailDto Load(int secondId, ComputeMode computeMode, EmployeeSourc
...
@@ -100,7 +103,7 @@ public SecondDetailDto Load(int secondId, ComputeMode computeMode, EmployeeSourc
var
loads
=
GetWorkLoads
(
allot
.
HospitalId
,
second
.
UnitType
,
second
.
Department
);
var
loads
=
GetWorkLoads
(
allot
.
HospitalId
,
second
.
UnitType
,
second
.
Department
);
var
employees
=
_peremployeeRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
second
.
AllotId
);
var
employees
=
_peremployeeRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
second
.
AllotId
);
HandsonTableBase
handson
=
GetHandsonTable
(
computeMode
,
loads
);
HandsonTableBase
handson
=
GetHandsonTable
(
allot
,
computeMode
,
loads
);
// 先占位,更加选择加载指定范围数据
// 先占位,更加选择加载指定范围数据
// 加载方式分 保存,上次,字典,测算表
// 加载方式分 保存,上次,字典,测算表
var
loadEmployees
=
LoadEmployees
(
allot
,
second
,
employees
,
overrideMode
,
out
bool
isSave
);
var
loadEmployees
=
LoadEmployees
(
allot
,
second
,
employees
,
overrideMode
,
out
bool
isSave
);
...
@@ -143,20 +146,20 @@ public SecondDetailDto Load(int secondId, ComputeMode computeMode, EmployeeSourc
...
@@ -143,20 +146,20 @@ public SecondDetailDto Load(int secondId, ComputeMode computeMode, EmployeeSourc
/// <param name="computeMode"></param>
/// <param name="computeMode"></param>
/// <param name="loads"></param>
/// <param name="loads"></param>
/// <returns></returns>
/// <returns></returns>
public
HandsonTableBase
GetHandsonTable
(
ComputeMode
computeMode
,
List
<
TitleValue
<
string
,
decimal
?>>
loads
)
public
HandsonTableBase
GetHandsonTable
(
per_allot
allot
,
ComputeMode
computeMode
,
List
<
TitleValue
<
string
,
decimal
?>>
loads
)
{
{
var
(
colHeaderCustoms
,
columnCustoms
)
=
GetCustomColumns
(
computeMode
,
loads
);
var
(
colHeaderCustoms
,
columnCustoms
)
=
GetCustomColumns
(
computeMode
,
loads
);
HandsonTableBase
handson
=
new
HandsonTableBase
();
HandsonTableBase
handson
=
new
HandsonTableBase
();
switch
(
computeMode
)
switch
(
computeMode
)
{
{
case
ComputeMode
.
NotCalculate
:
case
ComputeMode
.
NotCalculate
:
handson
=
ComputeMode_Format1
(
colHeaderCustoms
,
columnCustoms
);
handson
=
ComputeMode_Format1
(
allot
,
colHeaderCustoms
,
columnCustoms
);
break
;
break
;
case
ComputeMode
.
Horizontal
:
case
ComputeMode
.
Horizontal
:
handson
=
ComputeMode_Format2
(
colHeaderCustoms
,
columnCustoms
);
handson
=
ComputeMode_Format2
(
allot
,
colHeaderCustoms
,
columnCustoms
);
break
;
break
;
case
ComputeMode
.
Vertical
:
case
ComputeMode
.
Vertical
:
handson
=
ComputeMode_Format3
(
colHeaderCustoms
,
columnCustoms
,
loads
);
handson
=
ComputeMode_Format3
(
allot
,
colHeaderCustoms
,
columnCustoms
,
loads
);
break
;
break
;
}
}
...
@@ -175,41 +178,53 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute
...
@@ -175,41 +178,53 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute
/*
/*
此处数据需要额外注意,前端显示规则:通过isTrue=true显示,显示名称为label
此处数据需要额外注意,前端显示规则:通过isTrue=true显示,显示名称为label
*/
*/
var
alias
=
_cofaliasRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
allot
.
HospitalId
)
??
new
List
<
cof_alias
>();
Func
<
string
,
string
,
string
>
getAlias
=
(
name
,
def
)
=>
{
try
{
var
aname
=
alias
?.
FirstOrDefault
(
w
=>
name
.
Equals
(
w
.
Name
,
StringComparison
.
OrdinalIgnoreCase
))?.
Alias
??
""
;
return
string
.
IsNullOrEmpty
(
aname
)
?
def
:
aname
;
}
catch
{
}
return
def
;
};
var
maps
=
new
List
<
SecondColumnDictionary
>()
var
maps
=
new
List
<
SecondColumnDictionary
>()
{
{
new
SecondColumnDictionary
(
"人员工号"
,
nameof
(
ag_bodysource
.
WorkNumber
),
true
,
100
,
isNumber
:
false
),
new
SecondColumnDictionary
(
getAlias
(
nameof
(
ag_bodysource
.
WorkNumber
),
"人员工号"
)
,
nameof
(
ag_bodysource
.
WorkNumber
),
true
,
100
,
isNumber
:
false
),
new
SecondColumnDictionary
(
"姓名"
,
nameof
(
ag_bodysource
.
Name
),
true
,
100
,
isNumber
:
false
),
new
SecondColumnDictionary
(
getAlias
(
nameof
(
ag_bodysource
.
Name
),
"姓名"
)
,
nameof
(
ag_bodysource
.
Name
),
true
,
100
,
isNumber
:
false
),
new
SecondColumnDictionary
(
"分配科室"
,
nameof
(
ag_bodysource
.
Department
),
true
,
100
,
isNumber
:
false
),
new
SecondColumnDictionary
(
getAlias
(
nameof
(
ag_bodysource
.
Department
),
"分配科室"
)
,
nameof
(
ag_bodysource
.
Department
),
true
,
100
,
isNumber
:
false
),
new
SecondColumnDictionary
(
"核算单元"
,
nameof
(
ag_bodysource
.
AccountingUnit
),
true
,
100
,
isNumber
:
false
),
new
SecondColumnDictionary
(
getAlias
(
nameof
(
ag_bodysource
.
AccountingUnit
),
"核算单元"
)
,
nameof
(
ag_bodysource
.
AccountingUnit
),
true
,
100
,
isNumber
:
false
),
new
SecondColumnDictionary
(
"职称绩效"
,
nameof
(
ag_bodysource
.
TitlePerformance
),
true
,
299
,
isNumber
:
true
),
new
SecondColumnDictionary
(
getAlias
(
nameof
(
ag_bodysource
.
TitlePerformance
),
"职称绩效"
)
,
nameof
(
ag_bodysource
.
TitlePerformance
),
true
,
299
,
isNumber
:
true
),
new
SecondColumnDictionary
(
"工作量绩效合计"
,
nameof
(
ag_bodysource
.
WorkPerformance
),
true
,
399
),
new
SecondColumnDictionary
(
getAlias
(
nameof
(
ag_bodysource
.
WorkPerformance
),
"工作量绩效合计"
)
,
nameof
(
ag_bodysource
.
WorkPerformance
),
true
,
399
),
new
SecondColumnDictionary
(
"单项奖励合计"
,
nameof
(
ag_bodysource
.
DeptReward
),
true
,
499
),
new
SecondColumnDictionary
(
getAlias
(
nameof
(
ag_bodysource
.
DeptReward
),
"单项奖励合计"
)
,
nameof
(
ag_bodysource
.
DeptReward
),
true
,
499
),
new
SecondColumnDictionary
(
"核算平均前单项合计"
,
nameof
(
ag_bodysource
.
PreDeptReward
),
true
,
599
),
new
SecondColumnDictionary
(
getAlias
(
nameof
(
ag_bodysource
.
PreDeptReward
),
"核算平均前单项合计"
)
,
nameof
(
ag_bodysource
.
PreDeptReward
),
true
,
599
),
new
SecondColumnDictionary
(
"可分配绩效"
,
nameof
(
ag_bodysource
.
DistPerformance
),
true
,
600
),
new
SecondColumnDictionary
(
getAlias
(
nameof
(
ag_bodysource
.
DistPerformance
),
"可分配绩效"
)
,
nameof
(
ag_bodysource
.
DistPerformance
),
true
,
600
),
new
SecondColumnDictionary
(
"医院发放夜班绩效"
,
nameof
(
ag_bodysource
.
NightWorkPerformance
),
true
,
602
),
new
SecondColumnDictionary
(
getAlias
(
nameof
(
ag_bodysource
.
NightWorkPerformance
),
"医院发放夜班绩效"
)
,
nameof
(
ag_bodysource
.
NightWorkPerformance
),
true
,
602
),
//new SecondColumnDictionary("预留比例",nameof(ag_bodysource.ReservedRatio),false,601 ),
//new SecondColumnDictionary("预留比例",nameof(ag_bodysource.ReservedRatio),false,601 ),
//new SecondColumnDictionary("预留金额",nameof(ag_bodysource.ReservedAmount),false,602 ),
//new SecondColumnDictionary("预留金额",nameof(ag_bodysource.ReservedAmount),false,602 ),
new
SecondColumnDictionary
(
"绩效分配合计"
,
nameof
(
ag_bodysource
.
RealAmount
),
true
,
700
,
isNumber
:
true
),
new
SecondColumnDictionary
(
getAlias
(
nameof
(
ag_bodysource
.
RealAmount
),
"绩效分配合计"
)
,
nameof
(
ag_bodysource
.
RealAmount
),
true
,
700
,
isNumber
:
true
),
new
SecondColumnDictionary
(
"医院其他绩效"
,
nameof
(
ag_bodysource
.
OtherPerformance
),
false
,
801
,
color
:
"referto_color"
,
isNumber
:
true
),
new
SecondColumnDictionary
(
getAlias
(
nameof
(
ag_bodysource
.
OtherPerformance
),
"医院其他绩效"
)
,
nameof
(
ag_bodysource
.
OtherPerformance
),
false
,
801
,
color
:
"referto_color"
,
isNumber
:
true
),
new
SecondColumnDictionary
(
"实发绩效"
,
nameof
(
ag_bodysource
.
ReferToRealAmount
),
false
,
802
,
color
:
"referto_color"
,
isNumber
:
true
),
new
SecondColumnDictionary
(
getAlias
(
nameof
(
ag_bodysource
.
ReferToRealAmount
),
"实发绩效"
)
,
nameof
(
ag_bodysource
.
ReferToRealAmount
),
false
,
802
,
color
:
"referto_color"
,
isNumber
:
true
),
new
SecondColumnDictionary
(
"备注"
,
nameof
(
ag_bodysource
.
Remark
),
false
,
803
,
width
:
200
,
isNumber
:
false
),
new
SecondColumnDictionary
(
getAlias
(
nameof
(
ag_bodysource
.
Remark
),
"备注"
)
,
nameof
(
ag_bodysource
.
Remark
),
false
,
803
,
width
:
200
,
isNumber
:
false
),
};
};
// 填报模板不含一下展示信息
// 填报模板不含一下展示信息
if
(
computeMode
!=
ComputeMode
.
NotCalculate
)
if
(
computeMode
!=
ComputeMode
.
NotCalculate
)
{
{
maps
.
Add
(
new
SecondColumnDictionary
(
"领取平均绩效"
,
nameof
(
ag_bodysource
.
Post
),
true
,
100
,
isNumber
:
false
));
maps
.
Add
(
new
SecondColumnDictionary
(
getAlias
(
nameof
(
ag_bodysource
.
Post
),
"领取平均绩效"
)
,
nameof
(
ag_bodysource
.
Post
),
true
,
100
,
isNumber
:
false
));
maps
.
Add
(
new
SecondColumnDictionary
(
"人员系数"
,
nameof
(
ag_bodysource
.
StaffCoefficient
),
false
,
200
,
color
:
"title_color"
,
isNumber
:
true
));
;
maps
.
Add
(
new
SecondColumnDictionary
(
getAlias
(
nameof
(
ag_bodysource
.
StaffCoefficient
),
"人员系数"
),
nameof
(
ag_bodysource
.
StaffCoefficient
),
false
,
200
,
color
:
"title_color"
,
isNumber
:
true
))
;
maps
.
Add
(
new
SecondColumnDictionary
(
"出勤"
,
nameof
(
ag_bodysource
.
ActualAttendance
),
false
,
201
,
color
:
"title_color"
,
isNumber
:
true
));
maps
.
Add
(
new
SecondColumnDictionary
(
getAlias
(
nameof
(
ag_bodysource
.
ActualAttendance
),
"出勤"
)
,
nameof
(
ag_bodysource
.
ActualAttendance
),
false
,
201
,
color
:
"title_color"
,
isNumber
:
true
));
maps
.
Add
(
new
SecondColumnDictionary
(
"职称"
,
nameof
(
ag_bodysource
.
JobTitle
),
false
,
202
,
color
:
"title_color"
,
isNumber
:
false
));
maps
.
Add
(
new
SecondColumnDictionary
(
getAlias
(
nameof
(
ag_bodysource
.
JobTitle
),
"职称"
)
,
nameof
(
ag_bodysource
.
JobTitle
),
false
,
202
,
color
:
"title_color"
,
isNumber
:
false
));
maps
.
Add
(
new
SecondColumnDictionary
(
"职称系数"
,
nameof
(
ag_bodysource
.
TitleCoefficient
),
false
,
203
,
color
:
"title_color"
,
isNumber
:
true
));
maps
.
Add
(
new
SecondColumnDictionary
(
getAlias
(
nameof
(
ag_bodysource
.
TitleCoefficient
),
"职称系数"
)
,
nameof
(
ag_bodysource
.
TitleCoefficient
),
false
,
203
,
color
:
"title_color"
,
isNumber
:
true
));
maps
.
Add
(
new
SecondColumnDictionary
(
"职称绩效得分"
,
nameof
(
ag_bodysource
.
TitlePerformanceScore
),
false
,
204
,
color
:
"title_color"
,
isNumber
:
true
));
maps
.
Add
(
new
SecondColumnDictionary
(
getAlias
(
nameof
(
ag_bodysource
.
TitlePerformanceScore
),
"职称绩效得分"
)
,
nameof
(
ag_bodysource
.
TitlePerformanceScore
),
false
,
204
,
color
:
"title_color"
,
isNumber
:
true
));
}
}
// 工作量
// 工作量
...
@@ -700,27 +715,44 @@ private List<string> LoadEmployees_OfficeExcel(ag_secondallot second)
...
@@ -700,27 +715,44 @@ private List<string> LoadEmployees_OfficeExcel(ag_secondallot second)
/// <param name="colHeaders"></param>
/// <param name="colHeaders"></param>
/// <param name="columns"></param>
/// <param name="columns"></param>
/// <returns></returns>
/// <returns></returns>
private
HandsonTableBase
ComputeMode_Format1
(
List
<
string
>
colHeaders
,
List
<
HandsonColumn
>
columns
)
private
HandsonTableBase
ComputeMode_Format1
(
per_allot
allot
,
List
<
string
>
colHeaders
,
List
<
HandsonColumn
>
columns
)
{
{
HandsonTableBase
handson
=
new
HandsonTableBase
();
var
alias
=
_cofaliasRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
allot
.
HospitalId
)
??
new
List
<
cof_alias
>
();
handson
.
ColHeaders
.
AddRange
(
new
string
[]
{
"工号"
,
"姓名"
,
/* "核算单元", "领取平均绩效",*/
"职称绩效"
,
"工作量绩效工资"
,
});
Func
<
string
,
string
,
string
>
getAlias
=
(
name
,
def
)
=>
handson
.
Columns
.
AddRange
(
{
new
HandsonColumn
[]
try
{
{
new
HandsonColumn
(
nameof
(
ag_bodysource
.
WorkNumber
).
ToLower
()),
var
aname
=
alias
?.
FirstOrDefault
(
w
=>
name
.
Equals
(
w
.
Name
,
StringComparison
.
OrdinalIgnoreCase
))?.
Alias
??
""
;
new
HandsonColumn
(
nameof
(
ag_bodysource
.
Name
).
ToLower
()),
return
string
.
IsNullOrEmpty
(
aname
)
?
def
:
aname
;
//new HandsonColumn(nameof(ag_bodysource.Department).ToLower()),
}
new
HandsonColumn
(
nameof
(
ag_bodysource
.
TitlePerformance
).
ToLower
(),
format
:
DataFormat
.
小数
),
catch
{
}
new
HandsonColumn
(
nameof
(
ag_bodysource
.
WorkPerformance
).
ToLower
(),
format
:
DataFormat
.
小数
),
return
def
;
});
};
HandsonTableBase
handson
=
new
HandsonTableBase
();
handson
.
ColHeaders
.
AddRange
(
new
string
[]
{
getAlias
(
nameof
(
ag_bodysource
.
WorkNumber
),
"工号"
),
getAlias
(
nameof
(
ag_bodysource
.
Name
),
"姓名"
),
getAlias
(
nameof
(
ag_bodysource
.
TitlePerformance
),
"职称绩效"
),
getAlias
(
nameof
(
ag_bodysource
.
WorkPerformance
),
"工作量绩效工资"
),
});
handson
.
Columns
.
AddRange
(
new
HandsonColumn
[]
{
new
HandsonColumn
(
nameof
(
ag_bodysource
.
WorkNumber
).
ToLower
()),
new
HandsonColumn
(
nameof
(
ag_bodysource
.
Name
).
ToLower
()),
new
HandsonColumn
(
nameof
(
ag_bodysource
.
TitlePerformance
).
ToLower
(),
format
:
DataFormat
.
小数
),
new
HandsonColumn
(
nameof
(
ag_bodysource
.
WorkPerformance
).
ToLower
(),
format
:
DataFormat
.
小数
),
});
handson
.
ColHeaders
.
AddRange
(
colHeaders
);
handson
.
ColHeaders
.
AddRange
(
colHeaders
);
handson
.
Columns
.
AddRange
(
columns
);
handson
.
Columns
.
AddRange
(
columns
);
handson
.
ColHeaders
.
AddRange
(
new
string
[]
{
"夜班绩效"
,
});
handson
.
ColHeaders
.
AddRange
(
new
string
[]
{
getAlias
(
nameof
(
ag_bodysource
.
NightWorkPerformance
),
"夜班绩效"
)
});
handson
.
Columns
.
AddRange
(
new
HandsonColumn
[]
{
new
HandsonColumn
(
nameof
(
ag_bodysource
.
NightWorkPerformance
).
ToLower
(),
format
:
DataFormat
.
小数
)
});
handson
.
Columns
.
AddRange
(
new
HandsonColumn
[]
{
new
HandsonColumn
(
nameof
(
ag_bodysource
.
NightWorkPerformance
).
ToLower
(),
format
:
DataFormat
.
小数
)
});
handson
.
ColHeaders
.
AddRange
(
new
string
[]
{
"备注"
,
});
handson
.
ColHeaders
.
AddRange
(
new
string
[]
{
getAlias
(
nameof
(
ag_bodysource
.
Remark
),
"备注"
)
,
});
handson
.
Columns
.
AddRange
(
new
HandsonColumn
[]
{
new
HandsonColumn
(
nameof
(
ag_bodysource
.
Remark
).
ToLower
())
});
handson
.
Columns
.
AddRange
(
new
HandsonColumn
[]
{
new
HandsonColumn
(
nameof
(
ag_bodysource
.
Remark
).
ToLower
())
});
return
handson
;
return
handson
;
...
@@ -731,30 +763,50 @@ private HandsonTableBase ComputeMode_Format1(List<string> colHeaders, List<Hands
...
@@ -731,30 +763,50 @@ private HandsonTableBase ComputeMode_Format1(List<string> colHeaders, List<Hands
/// <param name="colHeaders"></param>
/// <param name="colHeaders"></param>
/// <param name="columns"></param>
/// <param name="columns"></param>
/// <returns></returns>
/// <returns></returns>
private
HandsonTableBase
ComputeMode_Format2
(
List
<
string
>
colHeaders
,
List
<
HandsonColumn
>
columns
)
private
HandsonTableBase
ComputeMode_Format2
(
per_allot
allot
,
List
<
string
>
colHeaders
,
List
<
HandsonColumn
>
columns
)
{
{
HandsonTableBase
handson
=
new
HandsonTableBase
();
var
alias
=
_cofaliasRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
allot
.
HospitalId
)
??
new
List
<
cof_alias
>
();
handson
.
ColHeaders
.
AddRange
(
new
string
[]
{
"工号"
,
"姓名"
,
/*"核算单元",*/
"领取平均绩效"
,
"人员系数"
,
"出勤"
,
"职称"
,
"职称系数"
,
});
Func
<
string
,
string
,
string
>
getAlias
=
(
name
,
def
)
=>
handson
.
Columns
.
AddRange
(
{
new
HandsonColumn
[]
try
{
{
new
HandsonColumn
(
nameof
(
ag_bodysource
.
WorkNumber
).
ToLower
()),
var
aname
=
alias
?.
FirstOrDefault
(
w
=>
name
.
Equals
(
w
.
Name
,
StringComparison
.
OrdinalIgnoreCase
))?.
Alias
??
""
;
new
HandsonColumn
(
nameof
(
ag_bodysource
.
Name
).
ToLower
()),
return
string
.
IsNullOrEmpty
(
aname
)
?
def
:
aname
;
//new HandsonColumn(nameof(ag_bodysource.Department).ToLower()),
}
new
HandsonColumn
(
nameof
(
ag_bodysource
.
Post
).
ToLower
()){
Type
=
"autocomplete"
,
Strict
=
true
,
Source
=
new
string
[]
{
"是"
,
"否"
}
},
catch
{
}
new
HandsonColumn
(
nameof
(
ag_bodysource
.
StaffCoefficient
).
ToLower
(),
format
:
DataFormat
.
小数
),
return
def
;
new
HandsonColumn
(
nameof
(
ag_bodysource
.
ActualAttendance
).
ToLower
(),
format
:
DataFormat
.
小数
1
),
};
new
HandsonColumn
(
nameof
(
ag_bodysource
.
JobTitle
).
ToLower
()),
new
HandsonColumn
(
nameof
(
ag_bodysource
.
TitleCoefficient
).
ToLower
(),
format
:
DataFormat
.
小数
),
HandsonTableBase
handson
=
new
HandsonTableBase
();
});
handson
.
ColHeaders
.
AddRange
(
new
string
[]
{
getAlias
(
nameof
(
ag_bodysource
.
WorkNumber
),
"工号"
),
getAlias
(
nameof
(
ag_bodysource
.
Name
),
"姓名"
),
getAlias
(
nameof
(
ag_bodysource
.
Post
),
"人员系数"
),
getAlias
(
nameof
(
ag_bodysource
.
StaffCoefficient
),
"人员系数"
),
getAlias
(
nameof
(
ag_bodysource
.
ActualAttendance
),
"出勤"
),
getAlias
(
nameof
(
ag_bodysource
.
JobTitle
),
"职称"
),
getAlias
(
nameof
(
ag_bodysource
.
TitleCoefficient
),
"职称系数"
),
});
handson
.
Columns
.
AddRange
(
new
HandsonColumn
[]
{
new
HandsonColumn
(
nameof
(
ag_bodysource
.
WorkNumber
).
ToLower
()),
new
HandsonColumn
(
nameof
(
ag_bodysource
.
Name
).
ToLower
()),
new
HandsonColumn
(
nameof
(
ag_bodysource
.
Post
).
ToLower
()){
Type
=
"autocomplete"
,
Strict
=
true
,
Source
=
new
string
[]
{
"是"
,
"否"
}
},
new
HandsonColumn
(
nameof
(
ag_bodysource
.
StaffCoefficient
).
ToLower
(),
format
:
DataFormat
.
小数
),
new
HandsonColumn
(
nameof
(
ag_bodysource
.
ActualAttendance
).
ToLower
(),
format
:
DataFormat
.
小数
1
),
new
HandsonColumn
(
nameof
(
ag_bodysource
.
JobTitle
).
ToLower
()),
new
HandsonColumn
(
nameof
(
ag_bodysource
.
TitleCoefficient
).
ToLower
(),
format
:
DataFormat
.
小数
),
});
handson
.
ColHeaders
.
AddRange
(
colHeaders
);
handson
.
ColHeaders
.
AddRange
(
colHeaders
);
handson
.
Columns
.
AddRange
(
columns
);
handson
.
Columns
.
AddRange
(
columns
);
handson
.
ColHeaders
.
AddRange
(
new
string
[]
{
"夜班绩效"
,
});
handson
.
ColHeaders
.
AddRange
(
new
string
[]
{
getAlias
(
nameof
(
ag_bodysource
.
NightWorkPerformance
),
"夜班绩效"
)
,
});
handson
.
Columns
.
AddRange
(
new
HandsonColumn
[]
{
new
HandsonColumn
(
nameof
(
ag_bodysource
.
NightWorkPerformance
).
ToLower
(),
format
:
DataFormat
.
小数
)
});
handson
.
Columns
.
AddRange
(
new
HandsonColumn
[]
{
new
HandsonColumn
(
nameof
(
ag_bodysource
.
NightWorkPerformance
).
ToLower
(),
format
:
DataFormat
.
小数
)
});
handson
.
ColHeaders
.
AddRange
(
new
string
[]
{
"备注"
,
});
handson
.
ColHeaders
.
AddRange
(
new
string
[]
{
getAlias
(
nameof
(
ag_bodysource
.
Remark
),
"备注"
)
,
});
handson
.
Columns
.
AddRange
(
new
HandsonColumn
[]
{
new
HandsonColumn
(
nameof
(
ag_bodysource
.
Remark
).
ToLower
())
});
handson
.
Columns
.
AddRange
(
new
HandsonColumn
[]
{
new
HandsonColumn
(
nameof
(
ag_bodysource
.
Remark
).
ToLower
())
});
return
handson
;
return
handson
;
}
}
...
@@ -766,9 +818,9 @@ private HandsonTableBase ComputeMode_Format2(List<string> colHeaders, List<Hands
...
@@ -766,9 +818,9 @@ private HandsonTableBase ComputeMode_Format2(List<string> colHeaders, List<Hands
/// <param name="columns"></param>
/// <param name="columns"></param>
/// <param name="loads"></param>
/// <param name="loads"></param>
/// <returns></returns>
/// <returns></returns>
private
HandsonTableBase
ComputeMode_Format3
(
List
<
string
>
colHeaders
,
List
<
HandsonColumn
>
columns
,
IEnumerable
<
TitleValue
<
string
,
decimal
?>>
loads
)
private
HandsonTableBase
ComputeMode_Format3
(
per_allot
allot
,
List
<
string
>
colHeaders
,
List
<
HandsonColumn
>
columns
,
IEnumerable
<
TitleValue
<
string
,
decimal
?>>
loads
)
{
{
HandsonTableBase
handson
=
ComputeMode_Format2
(
colHeaders
,
columns
);
HandsonTableBase
handson
=
ComputeMode_Format2
(
allot
,
colHeaders
,
columns
);
var
fs
=
handson
.
Columns
.
Select
(
col
=>
var
fs
=
handson
.
Columns
.
Select
(
col
=>
{
{
...
@@ -1384,7 +1436,7 @@ public List<SecondComputeCheckResultDto> CheckFormat(Dictionary<string, object>
...
@@ -1384,7 +1436,7 @@ public List<SecondComputeCheckResultDto> CheckFormat(Dictionary<string, object>
/// <param name="second"></param>
/// <param name="second"></param>
/// <param name="body"></param>
/// <param name="body"></param>
/// <returns></returns>
/// <returns></returns>
public
List
<
SecondComputeCheckResultDto
>
CheckData
(
ag_secondallot
second
,
ComputeMode
computeMode
,
List
<
Dictionary
<
string
,
object
>>
body
,
List
<
TitleValue
<
string
,
decimal
?>>
loads
)
public
List
<
SecondComputeCheckResultDto
>
CheckData
(
per_allot
allot
,
ag_secondallot
second
,
ComputeMode
computeMode
,
List
<
Dictionary
<
string
,
object
>>
body
,
List
<
TitleValue
<
string
,
decimal
?>>
loads
)
{
{
if
(
body
==
null
||
body
.
Count
==
0
)
if
(
body
==
null
||
body
.
Count
==
0
)
throw
new
PerformanceException
(
"分配人员信息不存在!"
);
throw
new
PerformanceException
(
"分配人员信息不存在!"
);
...
@@ -1394,7 +1446,7 @@ public List<SecondComputeCheckResultDto> CheckData(ag_secondallot second, Comput
...
@@ -1394,7 +1446,7 @@ public List<SecondComputeCheckResultDto> CheckData(ag_secondallot second, Comput
var
employees
=
_peremployeeRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
second
.
AllotId
)
var
employees
=
_peremployeeRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
second
.
AllotId
)
?.
Select
(
w
=>
new
{
w
.
PersonnelNumber
,
w
.
DoctorName
,
w
.
AccountingUnit
,
w
.
UnitType
,
w
.
ReservedRatio
});
?.
Select
(
w
=>
new
{
w
.
PersonnelNumber
,
w
.
DoctorName
,
w
.
AccountingUnit
,
w
.
UnitType
,
w
.
ReservedRatio
});
var
handsonTable
=
GetHandsonTable
(
computeMode
,
loads
);
var
handsonTable
=
GetHandsonTable
(
allot
,
computeMode
,
loads
);
var
fixat
=
new
string
[]
{
var
fixat
=
new
string
[]
{
nameof
(
ag_bodysource
.
Id
).
ToLower
(),
nameof
(
ag_bodysource
.
Id
).
ToLower
(),
nameof
(
ag_bodysource
.
SecondId
).
ToLower
(),
nameof
(
ag_bodysource
.
SecondId
).
ToLower
(),
...
...
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