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
5867b3c6
Commit
5867b3c6
authored
May 31, 2021
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改医院其他绩效来源,不在使用per_apr_amount中accountingunit
parent
4f68ede6
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
145 additions
and
113 deletions
+145
-113
performance/Performance.Api/Controllers/ComputeController.cs
+1
-3
performance/Performance.Api/Program.cs
+1
-0
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+1
-1
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+10
-5
performance/Performance.EntityModels/Entity/per_apr_amount.cs
+6
-6
performance/Performance.EntityModels/Other/view_per_apr_amount.cs
+14
-0
performance/Performance.Repository/Repository/PerforPerapramountRepository.cs
+34
-1
performance/Performance.Services/ComputeService.cs
+12
-62
performance/Performance.Services/EmployeeService.cs
+44
-13
performance/Performance.Services/SecondAllot/SecondAllotDetails.cs
+2
-2
performance/Performance.Services/SecondAllot/SecondAllotService.cs
+1
-1
performance/Performance.Services/SecondAllotService.cs
+19
-19
No files found.
performance/Performance.Api/Controllers/ComputeController.cs
View file @
5867b3c6
...
...
@@ -405,9 +405,7 @@ public ApiResponse<res_baiscnorm> EditHospitalAvg([FromBody] ComputerAvgRequest
[
HttpPost
]
public
ApiResponse
OtherPerStats
(
int
allotId
)
{
var
employee
=
_employeeService
.
GetAprList
(
allotId
,
_claim
.
GetUserId
());
var
relust
=
_computeService
.
GetOtherPerStats
(
employee
);
var
relust
=
_employeeService
.
GetOtherPerStats
(
allotId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
relust
);
}
...
...
performance/Performance.Api/Program.cs
View file @
5867b3c6
...
...
@@ -42,6 +42,7 @@ public static void Main(string[] args)
.
ConfigureLogging
(
logging
=>
{
logging
.
ClearProviders
();
logging
.
AddConsole
();
logging
.
SetMinimumLevel
(
LogLevel
.
Trace
);
})
.
UseNLog
()
...
...
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
5867b3c6
...
...
@@ -1831,7 +1831,7 @@
</member>
<member
name=
"P:Performance.DtoModels.AccoungingRequest.Type"
>
<summary>
1 返回accounting列表 2 返回核算单元
类型 3 返回核算单元
1 返回accounting列表 2 返回核算单元
3 返回核算单元类型
</summary>
</member>
<member
name=
"P:Performance.DtoModels.AccoungingRequest.UnitType"
>
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
5867b3c6
...
...
@@ -4361,11 +4361,6 @@
录入科室
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_apr_amount.AccountingUnit"
>
<summary>
核算单元
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_apr_amount.Status"
>
<summary>
状态 1 未提交 2 等待审核 3 审核通过 4 驳回
...
...
@@ -7326,5 +7321,15 @@
费用
</summary>
</member>
<member
name=
"P:Performance.EntityModels.view_per_apr_amount.UnitType"
>
<summary>
核算单元组别
</summary>
</member>
<member
name=
"P:Performance.EntityModels.view_per_apr_amount.AccountingUnit"
>
<summary>
核算单元
</summary>
</member>
</members>
</doc>
performance/Performance.EntityModels/Entity/per_apr_amount.cs
View file @
5867b3c6
...
...
@@ -50,12 +50,12 @@ public class per_apr_amount
/// 录入科室
/// </summary>
public
string
TypeInDepartment
{
get
;
set
;
}
/// <summary>
/// 核算单元
/// </summary>
public
string
AccountingUnit
{
get
;
set
;
}
///
//
<summary>
///
//
核算单元
///
//
</summary>
//
public string AccountingUnit { get; set; }
/// <summary>
/// 状态 1 未提交 2 等待审核 3 审核通过 4 驳回
/// </summary>
...
...
performance/Performance.EntityModels/Other/view_per_apr_amount.cs
0 → 100644
View file @
5867b3c6
namespace
Performance.EntityModels
{
public
class
view_per_apr_amount
:
per_apr_amount
{
/// <summary>
/// 核算单元组别
/// </summary>
public
string
UnitType
{
get
;
set
;
}
/// <summary>
/// 核算单元
/// </summary>
public
string
AccountingUnit
{
get
;
set
;
}
}
}
performance/Performance.Repository/Repository/PerforPerapramountRepository.cs
View file @
5867b3c6
...
...
@@ -4,6 +4,8 @@
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
Performance.EntityModels
;
namespace
Performance.Repository
...
...
@@ -13,8 +15,39 @@ namespace Performance.Repository
/// </summary>
public
partial
class
PerforPerapramountRepository
:
PerforRepository
<
per_apr_amount
>
{
public
PerforPerapramountRepository
(
PerformanceDbContext
context
)
:
base
(
context
)
public
PerforPerapramountRepository
(
PerformanceDbContext
context
)
:
base
(
context
)
{
}
public
List
<
view_per_apr_amount
>
GetFullAmount
(
Func
<
per_apr_amount
,
bool
>
predicate
)
{
var
employees
=
this
.
context
.
Set
<
per_employee
>().
AsEnumerable
();
var
amounts
=
this
.
context
.
Set
<
per_apr_amount
>().
Where
(
predicate
);
var
res
=
amounts
.
Join
(
employees
,
outer
=>
new
{
outer
.
AllotId
,
outer
.
PersonnelNumber
},
inner
=>
new
{
AllotId
=
inner
.
AllotId
??
0
,
inner
.
PersonnelNumber
},
(
outer
,
inner
)
=>
new
view_per_apr_amount
{
Id
=
outer
.
Id
,
AllotId
=
outer
.
AllotId
,
PersonnelNumber
=
outer
.
PersonnelNumber
,
DoctorName
=
outer
.
DoctorName
,
PerforType
=
outer
.
PerforType
,
Amount
=
outer
.
Amount
,
AccountingUnit
=
inner
.
AccountingUnit
,
UnitType
=
inner
.
UnitType
,
TypeInDepartment
=
outer
.
TypeInDepartment
,
Status
=
outer
.
Status
,
AuditTime
=
outer
.
AuditTime
,
AuditUser
=
outer
.
AuditUser
,
CreateDate
=
outer
.
CreateDate
,
CreateUser
=
outer
.
CreateUser
,
Remark
=
outer
.
Remark
,
IsVerify
=
outer
.
IsVerify
,
VerifyMessage
=
outer
.
VerifyMessage
,
});
return
res
.
ToList
()
??
new
List
<
view_per_apr_amount
>();
}
}
}
performance/Performance.Services/ComputeService.cs
View file @
5867b3c6
...
...
@@ -468,25 +468,16 @@ public List<DeptResponse> GetOfficePerformance(int allotId)
public
List
<
DeptResponse
>
GetAdminPerformance
(
int
allotId
)
{
var
result
=
new
List
<
DeptResponse
>();
var
amounts
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Status
==
3
)
??
new
List
<
per_apr_amount
>();
var
employees
=
perforPeremployeeRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
)
??
new
List
<
per_employee
>();
// 获取各科室 医院其他绩效
var
otherPerformances
=
amounts
.
Join
(
employees
,
outer
=>
new
{
outer
.
AccountingUnit
,
outer
.
PersonnelNumber
},
inner
=>
new
{
inner
.
AccountingUnit
,
inner
.
PersonnelNumber
},
(
outer
,
inner
)
=>
new
{
AccountingUnit
=
outer
.
AccountingUnit
,
UnitType
=
inner
.
UnitType
,
PersonnelNumber
=
inner
.
PersonnelNumber
,
PersonnelName
=
outer
.
DoctorName
,
Amount
=
outer
.
Amount
})?.
GroupBy
(
t
=>
new
{
t
.
AccountingUnit
,
t
.
UnitType
}).
Select
(
t
=>
new
{
AccountingUnit
=
t
.
Key
.
AccountingUnit
,
UnitType
=
t
.
Key
.
UnitType
==
"行政后勤"
?
"行政工勤"
:
t
.
Key
.
UnitType
,
Amount
=
t
.
Sum
(
s
=>
s
.
Amount
)
});
var
amounts
=
perapramountRepository
.
GetFullAmount
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Status
==
3
);
var
otherPerformances
=
amounts
.
GroupBy
(
t
=>
new
{
t
.
AccountingUnit
,
t
.
UnitType
}).
Select
(
t
=>
new
{
AccountingUnit
=
t
.
Key
.
AccountingUnit
,
UnitType
=
t
.
Key
.
UnitType
==
"行政后勤"
?
"行政工勤"
:
t
.
Key
.
UnitType
,
Amount
=
t
.
Sum
(
s
=>
s
.
Amount
)
}).
ToList
();
var
clinicalTypes
=
new
UnitType
[]
{
UnitType
.
医生组
,
UnitType
.
其他医生组
,
UnitType
.
医技组
,
UnitType
.
其他医技组
,
UnitType
.
护理组
,
UnitType
.
其他护理组
,
UnitType
.
特殊核算组
};
var
clinicalTypesString
=
clinicalTypes
.
Select
(
w
=>
w
.
ToString
()).
ToList
();
...
...
@@ -891,18 +882,16 @@ public List<ComputeResponse> AddAprAmount(int allotId, List<ComputeResponse> com
if
(
computes
==
null
||
!
computes
.
Any
())
return
computes
;
var
list
=
perapramountRepository
.
Get
Entities
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Status
==
3
);
var
list
=
perapramountRepository
.
Get
FullAmount
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Status
==
3
);
if
(
list
==
null
||
!
list
.
Any
())
return
computes
;
List
<
string
>
uses
=
new
List
<
string
>();
foreach
(
var
item
in
computes
.
GroupBy
(
w
=>
new
{
w
.
AccountingUnit
,
w
.
JobNumber
}))
foreach
(
var
item
in
computes
.
Where
(
w
=>
!
string
.
IsNullOrEmpty
(
w
.
JobNumber
)).
GroupBy
(
w
=>
new
{
w
.
AccountingUnit
,
w
.
JobNumber
}))
{
// 补充过一次就不在补充了
var
emp
=
computes
.
Where
(
w
=>
w
.
AccountingUnit
==
item
.
Key
.
AccountingUnit
&&
w
.
JobNumber
==
item
.
Key
.
JobNumber
)
.
OrderByDescending
(
w
=>
w
.
Source
).
FirstOrDefault
();
var
apramount
=
list
.
Where
(
t
=>
t
.
AccountingUnit
==
emp
.
AccountingUnit
&&
!
string
.
IsNullOrEmpty
(
t
.
PersonnelNumber
)
&&
emp
.
JobNumber
?.
Trim
()
==
t
.
PersonnelNumber
?.
Trim
());
var
emp
=
computes
.
Where
(
w
=>
w
.
AccountingUnit
==
item
.
Key
.
AccountingUnit
&&
w
.
JobNumber
==
item
.
Key
.
JobNumber
).
OrderByDescending
(
w
=>
w
.
Source
).
FirstOrDefault
();
var
apramount
=
list
.
Where
(
t
=>
t
.
AccountingUnit
==
emp
.
AccountingUnit
&&
emp
.
JobNumber
?.
Trim
()
==
t
.
PersonnelNumber
?.
Trim
());
// 如果医院其他绩效 已经被使用,则不再多次带出,防止单个人多次出现造成金额叠加
var
tag
=
$"
{(
emp
.
AccountingUnit
??
""
)}
-
{(
emp
.
JobNumber
??
""
)}
"
;
if
(
apramount
!=
null
&&
!
uses
.
Contains
(
tag
))
...
...
@@ -1791,45 +1780,6 @@ public res_baiscnorm EditHospitalAvg(ComputerAvgRequest request)
}
}
public
List
<
Dictionary
<
string
,
string
>>
GetOtherPerStats
(
List
<
per_apr_amount
>
employees
)
{
var
others
=
new
List
<
Dictionary
<
string
,
string
>>();
if
(
employees
==
null
)
return
others
;
var
perForType
=
employees
.
Where
(
c
=>
c
.
Status
==
3
).
Select
(
t
=>
t
.
PerforType
).
Distinct
();
var
doctorNum
=
employees
.
Where
(
c
=>
c
.
Status
==
3
).
Select
(
t
=>
t
.
PersonnelNumber
).
Distinct
().
ToList
();
if
(!
doctorNum
.
Any
())
return
others
;
foreach
(
var
num
in
doctorNum
)
{
var
dicData
=
new
Dictionary
<
string
,
string
>();
var
amount
=
employees
.
Find
(
t
=>
t
.
PersonnelNumber
==
num
);
if
(
amount
==
null
)
continue
;
dicData
.
Add
(
"核算单元"
,
amount
?.
AccountingUnit
??
""
);
dicData
.
Add
(
"工号"
,
amount
?.
PersonnelNumber
??
""
);
dicData
.
Add
(
"人员姓名"
,
amount
?.
DoctorName
??
""
);
foreach
(
var
type
in
perForType
)
{
var
emp
=
employees
.
Where
(
t
=>
t
.
PerforType
==
type
&&
t
.
PersonnelNumber
==
num
)?.
ToList
();
if
(!
emp
.
Any
())
dicData
.
Add
(
type
,
"0"
);
else
dicData
.
Add
(
type
,
Math
.
Round
(
Convert
.
ToDecimal
(
emp
?.
Sum
(
c
=>
c
.
Amount
))).
ToString
());
}
var
sum
=
employees
.
Where
(
c
=>
c
.
PersonnelNumber
==
num
)?.
Sum
(
t
=>
t
.
Amount
);
dicData
.
Add
(
"合计"
,
Math
.
Round
(
Convert
.
ToDecimal
(
sum
),
0
).
ToString
());
others
.
Add
(
dicData
);
}
return
others
;
}
private
decimal
GetDecimal
(
decimal
?
value
,
decimal
_
=
0
)
{
if
(!
value
.
HasValue
)
...
...
performance/Performance.Services/EmployeeService.cs
View file @
5867b3c6
...
...
@@ -402,9 +402,9 @@ public List<per_apr_amount> GetAprList(int allotId, int userId)
return
list
;
}
public
List
<
per_apr_amount
>
GetAprList
(
int
allotId
,
string
department
)
public
List
<
view_
per_apr_amount
>
GetAprList
(
int
allotId
,
string
department
)
{
var
list
=
perapramountRepository
.
Get
Entities
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Amount
.
HasValue
&&
t
.
Amount
!=
0
&&
(
t
.
TypeInDepartment
??
""
)
==
department
);
var
list
=
perapramountRepository
.
Get
FullAmount
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Amount
.
HasValue
&&
t
.
Amount
!=
0
&&
(
t
.
TypeInDepartment
??
""
)
==
department
);
if
(
list
!=
null
&&
list
.
Any
())
list
=
list
.
OrderBy
(
t
=>
t
.
DoctorName
).
ToList
();
...
...
@@ -439,7 +439,7 @@ public bool UpdateApr(per_apr_amount request)
data
.
DoctorName
=
request
.
DoctorName
;
data
.
PerforType
=
request
.
PerforType
;
data
.
TypeInDepartment
=
request
.
TypeInDepartment
;
data
.
AccountingUnit
=
request
.
AccountingUnit
;
//
data.AccountingUnit = request.AccountingUnit;
data
.
Amount
=
request
.
Amount
;
return
perapramountRepository
.
Update
(
data
);
...
...
@@ -557,7 +557,7 @@ public void ImpoerAprEmployees(int allotid, string path, int userid)
PerforType
=
dict
[
"绩效类型"
]
<
0
?
""
:
row
.
GetCell
(
dict
[
"绩效类型"
]).
GetValue
(),
Amount
=
dict
[
"金额"
]
<
0
?
0
:
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
dict
[
"金额"
]).
GetValue
(),
0
),
TypeInDepartment
=
dict
[
"录入科室"
]
<
0
?
""
:
row
.
GetCell
(
dict
[
"录入科室"
]).
GetValue
(),
AccountingUnit
=
dict
[
"核算单元"
]
<
0
?
""
:
row
.
GetCell
(
dict
[
"核算单元"
]).
GetValue
(),
//
AccountingUnit = dict["核算单元"] < 0 ? "" : row.GetCell(dict["核算单元"]).GetValue(),
AllotId
=
allotid
,
CreateDate
=
createtime
,
CreateUser
=
userid
,
...
...
@@ -575,11 +575,11 @@ public void ImpoerAprEmployees(int allotid, string path, int userid)
if
(
entities
.
Any
(
w
=>
string
.
IsNullOrEmpty
(
w
.
TypeInDepartment
)
&&
w
.
Amount
!=
0
))
throw
new
PerformanceException
(
"文件中存在“录入科室”为空的数据"
);
var
employees
=
peremployeeRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
allotid
);
foreach
(
var
item
in
entities
.
Where
(
w
=>
!
string
.
IsNullOrEmpty
(
w
.
PersonnelNumber
)))
{
item
.
AccountingUnit
=
employees
?.
FirstOrDefault
(
w
=>
w
.
PersonnelNumber
==
item
.
PersonnelNumber
)?.
AccountingUnit
??
""
;
}
//
var employees = peremployeeRepository.GetEntities(w => w.AllotId == allotid);
//
foreach (var item in entities.Where(w => !string.IsNullOrEmpty(w.PersonnelNumber)))
//
{
//
item.AccountingUnit = employees?.FirstOrDefault(w => w.PersonnelNumber == item.PersonnelNumber)?.AccountingUnit ?? "";
//
}
perapramountRepository
.
AddRange
(
entities
.
ToArray
());
}
}
...
...
@@ -599,17 +599,17 @@ public void ImpoerAprEmployees(int allotid, string path, int userid)
/// <param name="allotId"></param>
/// <param name="jobNumber"></param>
/// <returns></returns>
public
per_apr_amount
GetEmployeeMessage
(
int
allotId
,
string
personnelNumber
,
int
userId
)
public
view_
per_apr_amount
GetEmployeeMessage
(
int
allotId
,
string
personnelNumber
,
int
userId
)
{
if
(
string
.
IsNullOrEmpty
(
personnelNumber
))
return
new
per_apr_amount
();
if
(
string
.
IsNullOrEmpty
(
personnelNumber
))
return
new
view_
per_apr_amount
();
var
user
=
userRepository
.
GetEntity
(
w
=>
w
.
ID
==
userId
&&
w
.
IsDelete
==
1
);
if
(
user
==
null
)
throw
new
PerformanceException
(
"操作用户不存在或用户信息错误!"
);
var
employee
=
peremployeeRepository
.
GetEntity
(
w
=>
w
.
AllotId
==
allotId
&&
w
.
PersonnelNumber
.
Trim
()
==
personnelNumber
.
Trim
());
if
(
employee
==
null
)
return
new
per_apr_amount
();
if
(
employee
==
null
)
return
new
view_
per_apr_amount
();
return
new
per_apr_amount
return
new
view_
per_apr_amount
{
AllotId
=
allotId
,
PersonnelNumber
=
employee
.
PersonnelNumber
,
...
...
@@ -690,5 +690,36 @@ public List<TitleValue> GetPerforTypeDict(int allotId)
}
#
endregion
public
List
<
Dictionary
<
string
,
string
>>
GetOtherPerStats
(
int
allotId
)
{
var
others
=
new
List
<
Dictionary
<
string
,
string
>>();
var
aprAmountList
=
perapramountRepository
.
GetFullAmount
(
w
=>
w
.
AllotId
==
allotId
&&
w
.
Status
==
3
);
var
perForType
=
aprAmountList
.
Select
(
t
=>
t
.
PerforType
).
Distinct
();
foreach
(
var
num
in
aprAmountList
.
Select
(
t
=>
t
.
PersonnelNumber
).
Distinct
())
{
var
dicData
=
new
Dictionary
<
string
,
string
>();
var
amount
=
aprAmountList
.
FirstOrDefault
(
t
=>
t
.
PersonnelNumber
==
num
);
if
(
amount
==
null
)
continue
;
dicData
.
Add
(
"核算单元"
,
amount
?.
AccountingUnit
??
""
);
dicData
.
Add
(
"工号"
,
amount
?.
PersonnelNumber
??
""
);
dicData
.
Add
(
"人员姓名"
,
amount
?.
DoctorName
??
""
);
foreach
(
var
type
in
perForType
)
{
var
emp
=
aprAmountList
.
Where
(
t
=>
t
.
PerforType
==
type
&&
t
.
PersonnelNumber
==
num
);
dicData
.
Add
(
type
,
Math
.
Round
(
emp
?.
Sum
(
c
=>
c
.
Amount
)
??
0
).
ToString
());
}
var
sum
=
aprAmountList
.
Where
(
c
=>
c
.
PersonnelNumber
==
num
)?.
Sum
(
t
=>
t
.
Amount
);
dicData
.
Add
(
"合计"
,
Math
.
Round
(
sum
??
0
,
0
).
ToString
());
others
.
Add
(
dicData
);
}
return
others
;
}
}
}
performance/Performance.Services/SecondAllot/SecondAllotDetails.cs
View file @
5867b3c6
...
...
@@ -481,7 +481,7 @@ private void SupplementOtherPerfor(ag_secondallot secondAllot, List<BodyItem> bo
{
if
(
bodyItems
==
null
||
!
bodyItems
.
Any
(
w
=>
w
.
RowNumber
>
-
1
))
return
;
var
perapramounts
=
perapramountRepository
.
Get
Entities
(
t
=>
t
.
AllotId
==
secondAllot
.
AllotId
&&
t
.
Status
==
3
);
var
perapramounts
=
perapramountRepository
.
Get
FullAmount
(
t
=>
t
.
AllotId
==
secondAllot
.
AllotId
&&
t
.
Status
==
3
);
if
(
perapramounts
==
null
||
!
perapramounts
.
Any
())
return
;
var
rowNumberList
=
bodyItems
.
Where
(
w
=>
w
.
RowNumber
>
-
1
).
Select
(
w
=>
w
.
RowNumber
).
Distinct
().
OrderBy
(
t
=>
t
).
ToList
();
...
...
@@ -808,7 +808,7 @@ public List<ag_othersource> GetOtherTempDetails(int userId, int secondId, int is
private
void
SupplementSecondDetail
(
ag_secondallot
second
,
List
<
per_employee
>
employees
,
List
<
ag_othersource
>
result
,
bool
isTitlePerformance
=
true
)
{
// 补充医院其他绩效 及 预留比例
var
perapramounts
=
perapramountRepository
.
Get
Entities
(
t
=>
t
.
AllotId
==
second
.
AllotId
&&
t
.
Status
==
3
);
var
perapramounts
=
perapramountRepository
.
Get
FullAmount
(
t
=>
t
.
AllotId
==
second
.
AllotId
&&
t
.
Status
==
3
);
var
distPerformance
=
rescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
second
.
AllotId
);
foreach
(
var
item
in
result
)
...
...
performance/Performance.Services/SecondAllot/SecondAllotService.cs
View file @
5867b3c6
...
...
@@ -185,7 +185,7 @@ private void SupplementOtherPerfor(ag_secondallot secondAllot, List<ag_bodysourc
{
if
(
bodyItems
==
null
||
!
bodyItems
.
Any
(
w
=>
w
.
RowNumber
>
-
1
))
return
;
var
perapramounts
=
perapramountRepository
.
Get
Entities
(
t
=>
t
.
AllotId
==
secondAllot
.
AllotId
&&
t
.
Status
==
3
);
var
perapramounts
=
perapramountRepository
.
Get
FullAmount
(
t
=>
t
.
AllotId
==
secondAllot
.
AllotId
&&
t
.
Status
==
3
);
if
(
perapramounts
==
null
||
!
perapramounts
.
Any
())
return
;
foreach
(
var
rowitem
in
bodyItems
)
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
5867b3c6
...
...
@@ -2145,7 +2145,7 @@ public List<SecPrintResponse> Print(int secondId)
}
// 补充医院其他绩效 及 预留比例
var
perapramounts
=
perapramountRepository
.
Get
Entities
(
t
=>
t
.
AllotId
==
second
.
AllotId
&&
t
.
Status
==
3
);
var
perapramounts
=
perapramountRepository
.
Get
FullAmount
(
t
=>
t
.
AllotId
==
second
.
AllotId
&&
t
.
Status
==
3
);
var
employees
=
personService
.
GetPerEmployee
(
second
.
AllotId
.
Value
);
// 补充字典中该科室不存在,但有其它绩效的人员信息
...
...
@@ -2314,26 +2314,26 @@ private List<SecondPerforResponse> GetAllotPerformance(int allotId, List<res_com
}).
ToList
();
}
public
List
<
SecondPerforResponse
>
AddAprAmount
(
int
allotId
,
List
<
SecondPerforResponse
>
computes
)
{
if
(
computes
==
null
||
!
computes
.
Any
())
return
computes
;
//
public List<SecondPerforResponse> AddAprAmount(int allotId, List<SecondPerforResponse> computes)
//
{
//
if (computes == null || !computes.Any())
//
return computes;
var
list
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Status
==
3
);
if
(
list
==
null
||
!
list
.
Any
())
return
computes
;
//
var list = perapramountRepository.GetEntities(t => t.AllotId == allotId && t.Status == 3);
//
if (list == null || !list.Any())
//
return computes;
foreach
(
var
item
in
computes
.
GroupBy
(
w
=>
new
{
w
.
AccountingUnit
,
w
.
JobNumber
}))
{
// 补充过一次就不在补充了
var
emp
=
computes
.
Where
(
w
=>
w
.
AccountingUnit
==
item
.
Key
.
AccountingUnit
&&
w
.
JobNumber
==
item
.
Key
.
JobNumber
)
.
OrderByDescending
(
w
=>
w
.
Source
).
FirstOrDefault
();
var
apramount
=
list
.
Where
(
t
=>
t
.
AccountingUnit
==
emp
.
AccountingUnit
&&
!
string
.
IsNullOrEmpty
(
t
.
PersonnelNumber
)
&&
emp
.
JobNumber
?.
Trim
()
==
t
.
PersonnelNumber
?.
Trim
());
emp
.
OthePerfor
=
apramount
?.
Sum
(
w
=>
w
.
Amount
)
??
0
;
}
//
foreach (var item in computes.GroupBy(w => new { w.AccountingUnit, w.JobNumber }))
//
{
//
// 补充过一次就不在补充了
//
var emp = computes.Where(w => w.AccountingUnit == item.Key.AccountingUnit && w.JobNumber == item.Key.JobNumber)
//
.OrderByDescending(w => w.Source).FirstOrDefault();
//
var apramount = list.Where(t => t.AccountingUnit == emp.AccountingUnit
//
&& !string.IsNullOrEmpty(t.PersonnelNumber) && emp.JobNumber?.Trim() == t.PersonnelNumber?.Trim());
//
emp.OthePerfor = apramount?.Sum(w => w.Amount) ?? 0;
//
}
return
computes
;
}
//
return computes;
//
}
}
}
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