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
2421a324
Commit
2421a324
authored
Jun 29, 2021
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
125 新增一列仅展示 可分配+医院其他绩效参考结果,带出工作量
parent
be4f69ee
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
189 additions
and
15 deletions
+189
-15
performance/Performance.Api/Controllers/SecondAllotController.cs
+12
-0
performance/Performance.Api/wwwroot/Performance.Api.xml
+6
-0
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+26
-1
performance/Performance.EntityModels/Entity/ag_bodysource.cs
+6
-1
performance/Performance.EntityModels/Entity/ag_workload.cs
+5
-0
performance/Performance.EntityModels/Other/view_second_workload_result.cs
+27
-0
performance/Performance.Repository/PerforPerAllotRepository.cs
+51
-0
performance/Performance.Services/RedistributionService.cs
+42
-13
performance/Performance.Services/SecondAllotService.cs
+14
-0
No files found.
performance/Performance.Api/Controllers/SecondAllotController.cs
View file @
2421a324
...
@@ -298,6 +298,18 @@ public ApiResponse WorkTypeList([FromBody] WorkloadRequest request, int secondId
...
@@ -298,6 +298,18 @@ public ApiResponse WorkTypeList([FromBody] WorkloadRequest request, int secondId
}
}
/// <summary>
/// <summary>
/// 获取二次分配 提取工作量带出字典
/// </summary>
/// <returns></returns>
[
Route
(
"api/second/worktype/map/{secondId}"
)]
[
HttpPost
]
public
ApiResponse
WorkloadMap
(
int
secondId
)
{
var
result
=
secondAllotService
.
WorkloadMap
(
secondId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
/// <summary>
/// 保存二次绩效工作量类型
/// 保存二次绩效工作量类型
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
...
...
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
2421a324
...
@@ -1501,6 +1501,12 @@
...
@@ -1501,6 +1501,12 @@
</summary>
</summary>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.WorkloadMap(System.Int32)"
>
<summary>
获取二次分配 提取工作量带出字典
</summary>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.SingleSave(Performance.EntityModels.ag_workload_type,System.Int32)"
>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.SingleSave(Performance.EntityModels.ag_workload_type,System.Int32)"
>
<summary>
<summary>
保存二次绩效工作量类型
保存二次绩效工作量类型
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
2421a324
...
@@ -511,7 +511,7 @@
...
@@ -511,7 +511,7 @@
</member>
</member>
<member
name=
"P:Performance.EntityModels.ag_bodysource.RealAmount"
>
<member
name=
"P:Performance.EntityModels.ag_bodysource.RealAmount"
>
<summary>
<summary>
实发绩效
工资金额
实发绩效
(不含医院其他绩效)
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.ag_bodysource.Signature"
>
<member
name=
"P:Performance.EntityModels.ag_bodysource.Signature"
>
...
@@ -529,6 +529,11 @@
...
@@ -529,6 +529,11 @@
预留金额
预留金额
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.ag_bodysource.ReferToRealAmount"
>
<summary>
实发绩效(参考,含医院其他绩效)
</summary>
</member>
<member
name=
"T:Performance.EntityModels.ag_compute"
>
<member
name=
"T:Performance.EntityModels.ag_compute"
>
<summary>
<summary>
二次绩效结果表
二次绩效结果表
...
@@ -1379,6 +1384,11 @@
...
@@ -1379,6 +1384,11 @@
1、单项奖励 2、工作量占比 ..(自定义占比)
1、单项奖励 2、工作量占比 ..(自定义占比)
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.ag_workload.SourceCategory"
>
<summary>
工作量来源类型
</summary>
</member>
<member
name=
"T:Performance.EntityModels.ag_workload_source"
>
<member
name=
"T:Performance.EntityModels.ag_workload_source"
>
<summary>
<summary>
...
@@ -7454,5 +7464,20 @@
...
@@ -7454,5 +7464,20 @@
是否被使用 默认false
是否被使用 默认false
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.view_second_workload_result.UnitType"
>
<summary>
核算单元组别
</summary>
</member>
<member
name=
"P:Performance.EntityModels.view_second_workload_result.AccountingUnit"
>
<summary>
核算单元
</summary>
</member>
<member
name=
"P:Performance.EntityModels.view_second_workload_result.HISDeptName"
>
<summary>
统计的HIS的原始科室名称
</summary>
</member>
</members>
</members>
</doc>
</doc>
performance/Performance.EntityModels/Entity/ag_bodysource.cs
View file @
2421a324
...
@@ -127,7 +127,7 @@ public class ag_bodysource
...
@@ -127,7 +127,7 @@ public class ag_bodysource
public
Nullable
<
decimal
>
NightWorkPerformance
{
get
;
set
;
}
public
Nullable
<
decimal
>
NightWorkPerformance
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 实发绩效
工资金额
/// 实发绩效
(不含医院其他绩效)
/// </summary>
/// </summary>
public
Nullable
<
decimal
>
RealAmount
{
get
;
set
;
}
public
Nullable
<
decimal
>
RealAmount
{
get
;
set
;
}
...
@@ -145,5 +145,10 @@ public class ag_bodysource
...
@@ -145,5 +145,10 @@ public class ag_bodysource
/// 预留金额
/// 预留金额
/// </summary>
/// </summary>
public
Nullable
<
decimal
>
ReservedAmount
{
get
;
set
;
}
public
Nullable
<
decimal
>
ReservedAmount
{
get
;
set
;
}
/// <summary>
/// 实发绩效(参考,含医院其他绩效)
/// </summary>
public
Nullable
<
decimal
>
ReferToRealAmount
{
get
;
set
;
}
}
}
}
}
performance/Performance.EntityModels/Entity/ag_workload.cs
View file @
2421a324
...
@@ -60,5 +60,10 @@ public class ag_workload
...
@@ -60,5 +60,10 @@ public class ag_workload
/// 1、单项奖励 2、工作量占比 ..(自定义占比)
/// 1、单项奖励 2、工作量占比 ..(自定义占比)
/// </summary>
/// </summary>
public
int
WorkTypeId
{
get
;
set
;
}
public
int
WorkTypeId
{
get
;
set
;
}
/// <summary>
/// 工作量来源类型
/// </summary>
public
string
SourceCategory
{
get
;
set
;
}
}
}
}
}
performance/Performance.EntityModels/Other/view_second_workload_result.cs
0 → 100644
View file @
2421a324
namespace
Performance.EntityModels
{
public
class
view_second_workload_result
{
public
int
HospitalId
{
get
;
set
;
}
public
int
AllotId
{
get
;
set
;
}
/// <summary>
/// 核算单元组别
/// </summary>
public
string
UnitType
{
get
;
set
;
}
/// <summary>
/// 核算单元
/// </summary>
public
string
AccountingUnit
{
get
;
set
;
}
/// <summary>
/// 统计的HIS的原始科室名称
/// </summary>
public
string
HISDeptName
{
get
;
set
;
}
public
string
ItemId
{
get
;
set
;
}
public
string
ItemName
{
get
;
set
;
}
public
decimal
?
FactorValue
{
get
;
set
;
}
public
string
PersonnelNumber
{
get
;
set
;
}
public
string
DoctorName
{
get
;
set
;
}
public
string
Category
{
get
;
set
;
}
public
decimal
Value
{
get
;
set
;
}
}
}
performance/Performance.Repository/PerforPerAllotRepository.cs
View file @
2421a324
...
@@ -229,5 +229,55 @@ public IEnumerable<ex_result> QueryIncomeData(int allotid, string source, string
...
@@ -229,5 +229,55 @@ public IEnumerable<ex_result> QueryIncomeData(int allotid, string source, string
}
}
}
}
}
}
/// <summary>
/// 二次分配按工号带出带出工作量
/// </summary>
/// <param name="allotid"></param>
/// <param name="unittype"></param>
/// <param name="accountingunit"></param>
/// <returns></returns>
public
IEnumerable
<
view_second_workload_result
>
GetSecondWorkload
(
int
allotid
,
string
unittype
,
string
accountingunit
)
{
using
(
var
connection
=
context
.
Database
.
GetDbConnection
())
{
if
(
connection
.
State
!=
ConnectionState
.
Open
)
connection
.
Open
();
try
{
string
query
=
$@"SELECT * FROM view_second_workload_result WHERE AllotId = @allotid AND UnitType = @unittype AND AccountingUnit = @accountingunit"
;
return
connection
.
Query
<
view_second_workload_result
>(
query
,
new
{
allotid
,
unittype
,
accountingunit
},
commandTimeout
:
60
*
60
);
}
catch
(
Exception
ex
)
{
throw
ex
;
}
}
}
/// <summary>
/// 查询HIS提取数据,工作量字典
/// </summary>
/// <param name="allotid"></param>
/// <param name="unittype"></param>
/// <param name="accountingunit"></param>
/// <returns></returns>
public
IEnumerable
<
string
>
GetSecondWorkloadMaps
(
int
allotid
,
string
unittype
,
string
accountingunit
)
{
using
(
var
connection
=
context
.
Database
.
GetDbConnection
())
{
if
(
connection
.
State
!=
ConnectionState
.
Open
)
connection
.
Open
();
try
{
string
query
=
$@"SELECT DISTINCT Category FROM view_second_workload_his his
INNER JOIN per_dept_dic dic ON his.HospitalId = dic.HospitalId and his.UnitType = dic.UnitType and his.Department = dic.HISDeptName
WHERE AllotId = @allotid AND dic.UnitType = @unittype AND dic.AccountingUnit = @accountingunit"
;
return
connection
.
Query
<
string
>(
query
,
new
{
allotid
,
unittype
,
accountingunit
},
commandTimeout
:
60
*
60
);
}
catch
(
Exception
ex
)
{
throw
ex
;
}
}
}
}
}
}
}
\ No newline at end of file
performance/Performance.Services/RedistributionService.cs
View file @
2421a324
...
@@ -96,7 +96,7 @@ public SecondDetailDto Load(int secondId, ComputeMode computeMode, EmployeeSourc
...
@@ -96,7 +96,7 @@ public SecondDetailDto Load(int secondId, ComputeMode computeMode, EmployeeSourc
HandsonTableBase
handson
=
GetHandsonTable
(
computeMode
,
loads
);
HandsonTableBase
handson
=
GetHandsonTable
(
computeMode
,
loads
);
// 先占位,更加选择加载指定范围数据
// 先占位,更加选择加载指定范围数据
// 加载方式分 保存,上次,字典,测算表
// 加载方式分 保存,上次,字典,测算表
var
loadEmployees
=
LoadEmployees
(
allot
,
second
,
overrideMode
);
var
loadEmployees
=
LoadEmployees
(
allot
,
second
,
overrideMode
,
out
bool
isSave
);
// 设置固定信息默认值
// 设置固定信息默认值
foreach
(
var
item
in
loadEmployees
)
foreach
(
var
item
in
loadEmployees
)
{
{
...
@@ -106,7 +106,7 @@ public SecondDetailDto Load(int secondId, ComputeMode computeMode, EmployeeSourc
...
@@ -106,7 +106,7 @@ public SecondDetailDto Load(int secondId, ComputeMode computeMode, EmployeeSourc
}
}
// 加载已保存工作量数据
// 加载已保存工作量数据
handson
.
Data
=
LoadWorkload
(
allot
,
second
,
loadEmployees
);
handson
.
Data
=
LoadWorkload
(
allot
,
second
,
loadEmployees
,
isSave
);
// 设置工作量考核等分默认值
// 设置工作量考核等分默认值
foreach
(
var
item
in
handson
.
Data
)
foreach
(
var
item
in
handson
.
Data
)
...
@@ -179,13 +179,15 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute
...
@@ -179,13 +179,15 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute
new
SecondColumnDictionary
(
"单项奖励合计"
,
nameof
(
ag_bodysource
.
DeptReward
),
true
,
499
),
new
SecondColumnDictionary
(
"单项奖励合计"
,
nameof
(
ag_bodysource
.
DeptReward
),
true
,
499
),
new
SecondColumnDictionary
(
"可分配绩效"
,
nameof
(
ag_bodysource
.
DistPerformance
),
true
,
500
),
new
SecondColumnDictionary
(
"可分配绩效"
,
nameof
(
ag_bodysource
.
DistPerformance
),
true
,
500
),
new
SecondColumnDictionary
(
"医院其他绩效"
,
nameof
(
ag_bodysource
.
OtherPerformance
),
true
,
501
),
new
SecondColumnDictionary
(
"医院发放夜班绩效"
,
nameof
(
ag_bodysource
.
NightWorkPerformance
),
true
,
502
),
new
SecondColumnDictionary
(
"医院发放夜班绩效"
,
nameof
(
ag_bodysource
.
NightWorkPerformance
),
true
,
502
),
//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
),
new
SecondColumnDictionary
(
"绩效分配合计"
,
nameof
(
ag_bodysource
.
RealAmount
),
true
,
700
),
new
SecondColumnDictionary
(
"医院其他绩效"
,
nameof
(
ag_bodysource
.
OtherPerformance
),
false
,
801
,
color
:
"referto_color"
),
new
SecondColumnDictionary
(
"实发绩效"
,
nameof
(
ag_bodysource
.
ReferToRealAmount
),
false
,
802
,
color
:
"referto_color"
),
};
};
// 工作量
// 工作量
...
@@ -230,8 +232,9 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute
...
@@ -230,8 +232,9 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute
/// <param name="allot"></param>
/// <param name="allot"></param>
/// <param name="second"></param>
/// <param name="second"></param>
/// <param name="loadEmployees"></param>
/// <param name="loadEmployees"></param>
/// <param name="isSave">True 加载已保存数据 False 加载工作量自动带出</param>
/// <returns></returns>
/// <returns></returns>
private
List
<
Dictionary
<
string
,
object
>>
LoadWorkload
(
per_allot
allot
,
ag_secondallot
second
,
List
<
ag_bodysource
>
loadEmployees
)
private
List
<
Dictionary
<
string
,
object
>>
LoadWorkload
(
per_allot
allot
,
ag_secondallot
second
,
List
<
ag_bodysource
>
loadEmployees
,
bool
isSave
=
true
)
{
{
List
<
Dictionary
<
string
,
object
>>
result
=
new
List
<
Dictionary
<
string
,
object
>>();
List
<
Dictionary
<
string
,
object
>>
result
=
new
List
<
Dictionary
<
string
,
object
>>();
var
status
=
(
new
int
[]
{
(
int
)
SecondAllotStatus
.
WaitReview
,
(
int
)
SecondAllotStatus
.
PassAudit
});
var
status
=
(
new
int
[]
{
(
int
)
SecondAllotStatus
.
WaitReview
,
(
int
)
SecondAllotStatus
.
PassAudit
});
...
@@ -261,12 +264,21 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute
...
@@ -261,12 +264,21 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute
if
(
workloads
!=
null
&&
workloads
.
Any
())
if
(
workloads
!=
null
&&
workloads
.
Any
())
{
{
/* isSave 为True时,没必要查询数据 */
var
secondWorkload
=
isSave
?
new
List
<
view_second_workload_result
>()
:
GetSecondWorkloadByValue
(
second
.
AllotId
.
Value
,
second
.
UnitType
,
second
.
Department
);
foreach
(
var
employee
in
loadEmployees
)
foreach
(
var
employee
in
loadEmployees
)
{
{
var
dict
=
JsonHelper
.
Deserialize
<
Dictionary
<
string
,
object
>>(
JsonHelper
.
Serialize
(
employee
));
var
dict
=
JsonHelper
.
Deserialize
<
Dictionary
<
string
,
object
>>(
JsonHelper
.
Serialize
(
employee
));
foreach
(
var
workitem
in
workloads
)
foreach
(
var
workitem
in
workloads
)
{
{
var
value
=
bodyDynamic
?.
FirstOrDefault
(
w
=>
w
.
BodyId
==
employee
.
Id
&&
w
.
WorkloadId
==
workitem
.
Id
)?.
Value
;
/* 如果是已保存数据,则加载原始数据,否则加载工作量自动带出 */
var
value
=
isSave
?
bodyDynamic
?.
FirstOrDefault
(
w
=>
w
.
BodyId
==
employee
.
Id
&&
w
.
WorkloadId
==
workitem
.
Id
)?.
Value
:
secondWorkload
.
FirstOrDefault
(
w
=>
w
.
PersonnelNumber
==
employee
.
WorkNumber
&&
w
.
DoctorName
==
employee
.
Name
&&
workitem
.
ItemId
.
EqualsIgnoreCase
(
w
.
ItemId
))?.
Value
;
dict
.
AddOrUpdate
(
workitem
.
ItemId
,
value
);
dict
.
AddOrUpdate
(
workitem
.
ItemId
,
value
);
}
}
result
.
Add
(
dict
);
result
.
Add
(
dict
);
...
@@ -350,17 +362,17 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute
...
@@ -350,17 +362,17 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute
/// <param name="secondId"></param>
/// <param name="secondId"></param>
/// <param name="mode"></param>
/// <param name="mode"></param>
/// <returns></returns>
/// <returns></returns>
private
List
<
ag_bodysource
>
LoadEmployees
(
per_allot
allot
,
ag_secondallot
second
,
EmployeeSource
mode
)
private
List
<
ag_bodysource
>
LoadEmployees
(
per_allot
allot
,
ag_secondallot
second
,
EmployeeSource
mode
,
out
bool
isSave
)
{
{
var
employees
=
_peremployeeRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
second
.
AllotId
);
var
employees
=
_peremployeeRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
second
.
AllotId
);
isSave
=
false
;
// 默认流程
// 默认流程
if
(
mode
==
EmployeeSource
.
Initial
)
if
(
mode
==
EmployeeSource
.
Initial
)
{
{
var
saveDatas
=
_agbodysourceRepository
.
GetEntities
(
w
=>
w
.
SecondId
==
second
.
Id
);
var
saveDatas
=
_agbodysourceRepository
.
GetEntities
(
w
=>
w
.
SecondId
==
second
.
Id
);
isSave
=
(
saveDatas
!=
null
&&
saveDatas
.
Count
>
0
);
// 数据带出顺序 1 已保存 2 上次 3 科室字典(或EXCEL行政工勤)
// 数据带出顺序 1 已保存 2 上次 3 科室字典(或EXCEL行政工勤)
if
(
saveDatas
!=
null
)
if
(
isSave
)
return
saveDatas
;
return
saveDatas
;
var
prevSecond
=
LoadEmployees_PrevSecondAllot
(
allot
,
second
);
var
prevSecond
=
LoadEmployees_PrevSecondAllot
(
allot
,
second
);
List
<
string
>
numbers
=
prevSecond
?.
Where
(
w
=>
!
string
.
IsNullOrEmpty
(
w
.
WorkNumber
)).
Select
(
w
=>
w
.
WorkNumber
).
ToList
()
??
new
List
<
string
>();
List
<
string
>
numbers
=
prevSecond
?.
Where
(
w
=>
!
string
.
IsNullOrEmpty
(
w
.
WorkNumber
)).
Select
(
w
=>
w
.
WorkNumber
).
ToList
()
??
new
List
<
string
>();
...
@@ -1119,14 +1131,17 @@ private void realAmountCalculate(List<Dictionary<string, object>> rows)
...
@@ -1119,14 +1131,17 @@ private void realAmountCalculate(List<Dictionary<string, object>> rows)
{
{
foreach
(
var
row
in
rows
)
foreach
(
var
row
in
rows
)
{
{
// 总绩效 = 夜班工作量绩效 + 医院其他绩效
var
row_ShifaAmountOfPerformancePay
=
GetDecimal2
(
row
,
nameof
(
ag_bodysource
.
NightWorkPerformance
))
+
GetDecimal2
(
row
,
nameof
(
ag_bodysource
.
OtherPerformance
));
// ReservedAmount 年度考核发放金额 DistPerformance 可分配绩效
// ReservedAmount 年度考核发放金额 DistPerformance 可分配绩效
var
reservedAmount
=
GetDecimal2
(
row
,
nameof
(
ag_bodysource
.
DistPerformance
))
*
GetDecimal2
(
row
,
nameof
(
ag_bodysource
.
ReservedRatio
));
var
reservedAmount
=
GetDecimal2
(
row
,
nameof
(
ag_bodysource
.
DistPerformance
))
*
GetDecimal2
(
row
,
nameof
(
ag_bodysource
.
ReservedRatio
));
row
.
AddOrUpdate
(
nameof
(
ag_bodysource
.
ReservedAmount
),
reservedAmount
);
row
.
AddOrUpdate
(
nameof
(
ag_bodysource
.
ReservedAmount
),
reservedAmount
);
var
realAmount
=
GetDecimal2
(
row
,
nameof
(
ag_bodysource
.
DistPerformance
))
-
GetDecimal2
(
row
,
nameof
(
ag_bodysource
.
ReservedAmount
))
+
row_ShifaAmountOfPerformancePay
;
// 实发绩效 = 可分配绩效 - 预留绩效 + 夜班工作量绩效
var
realAmount
=
GetDecimal2
(
row
,
nameof
(
ag_bodysource
.
DistPerformance
))
-
GetDecimal2
(
row
,
nameof
(
ag_bodysource
.
ReservedAmount
))
+
GetDecimal2
(
row
,
nameof
(
ag_bodysource
.
NightWorkPerformance
));
row
.
AddOrUpdate
(
nameof
(
ag_bodysource
.
RealAmount
),
realAmount
);
row
.
AddOrUpdate
(
nameof
(
ag_bodysource
.
RealAmount
),
realAmount
);
// 参考(实发绩效 = 实发绩效 + 医院其他绩效)
var
referToRealAmount
=
realAmount
+
GetDecimal2
(
row
,
nameof
(
ag_bodysource
.
OtherPerformance
));
row
.
AddOrUpdate
(
nameof
(
ag_bodysource
.
ReferToRealAmount
),
referToRealAmount
);
}
}
}
}
...
@@ -1302,6 +1317,7 @@ public object RedistributionEmployee(SecondEmployeeDto request)
...
@@ -1302,6 +1317,7 @@ public object RedistributionEmployee(SecondEmployeeDto request)
};
};
}
}
}
}
var
secondWorkload
=
GetSecondWorkloadByValue
(
second
.
AllotId
.
Value
,
second
.
UnitType
,
second
.
Department
);
var
monthDays
=
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
);
var
monthDays
=
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
);
foreach
(
var
employee
in
employees
)
foreach
(
var
employee
in
employees
)
{
{
...
@@ -1329,7 +1345,15 @@ public object RedistributionEmployee(SecondEmployeeDto request)
...
@@ -1329,7 +1345,15 @@ public object RedistributionEmployee(SecondEmployeeDto request)
{
{
item
.
AddOrUpdate
(
score
.
Title
,
100
);
item
.
AddOrUpdate
(
score
.
Title
,
100
);
}
}
// 工作量带出
if
(
secondWorkload
!=
null
&&
secondWorkload
.
Any
())
{
var
workload
=
secondWorkload
.
FirstOrDefault
(
w
=>
w
.
DoctorName
==
employee
.
DoctorName
&&
w
.
PersonnelNumber
==
employee
.
PersonnelNumber
&&
loads
.
Select
(
score
=>
score
.
Title
).
Contains
(
w
.
ItemId
));
if
(
workload
!=
null
)
item
.
AddOrUpdate
(
workload
.
ItemId
,
workload
.
Value
);
}
}
}
result
.
Add
(
item
);
result
.
Add
(
item
);
}
}
}
}
...
@@ -1337,5 +1361,10 @@ public object RedistributionEmployee(SecondEmployeeDto request)
...
@@ -1337,5 +1361,10 @@ public object RedistributionEmployee(SecondEmployeeDto request)
return
new
{
employees
.
CurrentPage
,
employees
.
TotalPages
,
employees
.
PageSize
,
employees
.
TotalCount
,
list
=
result
};
return
new
{
employees
.
CurrentPage
,
employees
.
TotalPages
,
employees
.
PageSize
,
employees
.
TotalCount
,
list
=
result
};
}
}
#
endregion
#
endregion
private
IEnumerable
<
view_second_workload_result
>
GetSecondWorkloadByValue
(
int
allotid
,
string
unittype
,
string
accountingunit
)
{
return
_perallotRepository
.
GetSecondWorkload
(
allotid
,
unittype
,
accountingunit
);
}
}
}
}
}
performance/Performance.Services/SecondAllotService.cs
View file @
2421a324
...
@@ -1054,6 +1054,20 @@ public List<TitleValue<int>> WorkTypeList(WorkloadRequest request, int secondId)
...
@@ -1054,6 +1054,20 @@ public List<TitleValue<int>> WorkTypeList(WorkloadRequest request, int secondId)
}
}
/// <summary>
/// <summary>
/// 获取二次分配 提取工作量带出字典
/// </summary>
/// <param name="secondId"></param>
/// <returns></returns>
public
List
<
string
>
WorkloadMap
(
int
secondId
)
{
var
second
=
agsecondallotRepository
.
GetEntity
(
t
=>
t
.
Id
==
secondId
);
if
(
second
==
null
)
throw
new
PerformanceException
(
"参数错误"
);
var
worktypes
=
perallotRepository
.
GetSecondWorkloadMaps
(
second
.
AllotId
.
Value
,
second
.
UnitType
,
second
.
Department
);
return
(
worktypes
!=
null
&&
worktypes
.
Any
())
?
worktypes
.
ToList
()
:
new
List
<
string
>();
}
/// <summary>
/// 保存工作量类型
/// 保存工作量类型
/// </summary>
/// </summary>
/// <param name="secondId"></param>
/// <param name="secondId"></param>
...
...
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