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
ac99d873
Commit
ac99d873
authored
Oct 26, 2021
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二次分配审核和护理部审核通过同步数据调整
parent
ea8747c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
89 additions
and
76 deletions
+89
-76
performance/Performance.Services/SecondAllotService.cs
+89
-76
No files found.
performance/Performance.Services/SecondAllotService.cs
View file @
ac99d873
...
...
@@ -1703,108 +1703,118 @@ public bool ConfirmAudit(int userId, SecondAuditRequest request)
if
(
histories
!=
null
&&
histories
.
Any
())
agcomputeRepository
.
RemoveRange
(
histories
.
ToArray
());
#
region
添加至二次绩效汇总
if
(
request
.
IsPass
==
1
)
SyncSecondComputeData
(
second
);
if
(
result
&&
request
.
IsPass
==
1
)
{
// 护理部审核
var
allot
=
perallotRepository
.
GetEntity
(
w
=>
w
.
ID
==
second
.
AllotId
);
if
(
allot
==
null
)
return
true
;
return
result
;
}
var
hospital
=
hospitalRepository
.
GetEntity
(
w
=>
w
.
ID
==
allot
.
HospitalId
);
if
(
hospital
==
null
)
return
true
;
/// <summary>
/// 审核结束 添加至二次绩效汇总
/// </summary>
/// <param name="second"></param>
/// <param name="isPass"></param>
/// <returns></returns>
private
bool
SyncSecondComputeData
(
ag_secondallot
second
)
{
// 护理部及二次分配审核同时审核完成
var
allot
=
perallotRepository
.
GetEntity
(
w
=>
w
.
ID
==
second
.
AllotId
);
if
(
allot
==
null
)
return
true
;
if
(
hospital
.
IsOpenNursingDeptAudit
==
1
&&
second
.
NursingDeptStatus
!=
3
&&
new
string
[]
{
UnitType
.
护理组
.
ToString
(),
UnitType
.
其他护理组
.
ToString
()
}.
Contains
(
second
.
UnitType
))
return
true
;
var
hospital
=
hospitalRepository
.
GetEntity
(
w
=>
w
.
ID
==
allot
.
HospitalId
);
if
(
hospital
==
null
)
return
true
;
var
computes
=
new
List
<
ag_compute
>();
if
(
hospital
.
IsOpenNursingDeptAudit
==
1
&&
second
.
NursingDeptStatus
!=
3
&&
new
string
[]
{
UnitType
.
护理组
.
ToString
(),
UnitType
.
其他护理组
.
ToString
()
}.
Contains
(
second
.
UnitType
))
return
true
;
var
(
tempId
,
name
)
=
GetUsingTempId
(
hospital
.
ID
,
second
);
if
(
second
.
Status
!=
3
)
return
true
;
if
(
new
int
[]
{
(
int
)
Temp
.
crosswise
,
(
int
)
Temp
.
lengthways
}.
Contains
(
tempId
))
{
var
items
=
agfixatitemRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
request
.
SecondId
);
if
(
items
!=
null
&&
items
.
Any
())
{
var
rowNumbers
=
items
.
Select
(
t
=>
t
.
RowNumber
).
Where
(
t
=>
t
>=
0
)?.
Distinct
();
if
(
rowNumbers
!=
null
&&
rowNumbers
.
Any
())
{
foreach
(
var
item
in
rowNumbers
)
{
var
perforsumfee
=
ConvertHelper
.
TryDecimal
(
items
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"可分配绩效"
)?.
ItemValue
,
0
);
var
nightworkperfor
=
ConvertHelper
.
TryDecimal
(
items
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"夜班工作量绩效"
)?.
ItemValue
,
0
);
computes
.
Add
(
new
ag_compute
{
AllotId
=
second
.
AllotId
,
SecondId
=
second
.
Id
,
UnitType
=
second
.
UnitType
,
Department
=
second
.
Department
,
JobNumber
=
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
,
PerforSumFee
=
perforsumfee
,
OthePerfor
=
ConvertHelper
.
TryDecimal
(
items
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"医院其他绩效"
)?.
ItemValue
,
0
),
NightWorkPerfor
=
nightworkperfor
,
RealGiveFee
=
perforsumfee
+
nightworkperfor
,
});
}
}
}
}
else
if
(
tempId
==
(
int
)
Temp
.
other
)
var
computes
=
new
List
<
ag_compute
>();
var
(
tempId
,
name
)
=
GetUsingTempId
(
hospital
.
ID
,
second
);
if
(
new
int
[]
{
(
int
)
Temp
.
crosswise
,
(
int
)
Temp
.
lengthways
}.
Contains
(
tempId
))
{
var
items
=
agfixatitemRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
second
.
Id
);
if
(
items
!=
null
&&
items
.
Any
())
{
var
others
=
agothersourceRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
request
.
SecondId
);
if
(
others
!=
null
&&
oth
ers
.
Any
())
var
rowNumbers
=
items
.
Select
(
t
=>
t
.
RowNumber
).
Where
(
t
=>
t
>=
0
)?.
Distinct
(
);
if
(
rowNumbers
!=
null
&&
rowNumb
ers
.
Any
())
{
foreach
(
var
item
in
oth
ers
)
foreach
(
var
item
in
rowNumb
ers
)
{
var
perforsumfee
=
ConvertHelper
.
TryDecimal
(
items
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"可分配绩效"
)?.
ItemValue
,
0
);
var
nightworkperfor
=
ConvertHelper
.
TryDecimal
(
items
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"夜班工作量绩效"
)?.
ItemValue
,
0
);
computes
.
Add
(
new
ag_compute
{
AllotId
=
second
.
AllotId
,
SecondId
=
second
.
Id
,
UnitType
=
second
.
UnitType
,
Department
=
second
.
Department
,
WorkPost
=
item
.
WorkPost
,
JobNumber
=
item
.
WorkNumber
,
PersonName
=
item
.
Nam
e
,
PerforSumFee
=
item
.
DistPerformanc
e
,
OthePerfor
=
item
.
OtherPerformance
,
NightWorkPerfor
=
item
.
NightWorkPerformance
,
RealGiveFee
=
item
.
RealAmount
,
JobNumber
=
items
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"人员工号"
)?.
ItemValue
,
WorkPost
=
items
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"岗位"
)?.
ItemValue
,
PersonName
=
item
s
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"姓名"
)?.
ItemValu
e
,
PerforSumFee
=
perforsumfe
e
,
OthePerfor
=
ConvertHelper
.
TryDecimal
(
items
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"医院其他绩效"
)?.
ItemValue
,
0
)
,
NightWorkPerfor
=
nightworkperfor
,
RealGiveFee
=
perforsumfee
+
nightworkperfor
,
});
}
}
}
else
}
else
if
(
tempId
==
(
int
)
Temp
.
other
)
{
var
others
=
agothersourceRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
second
.
Id
);
if
(
others
!=
null
&&
others
.
Any
())
{
var
bodys
=
agbodysourceRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
request
.
SecondId
);
if
(
bodys
!=
null
&&
bodys
.
Any
())
foreach
(
var
item
in
others
)
{
foreach
(
var
item
in
bodys
)
computes
.
Add
(
new
ag_compute
{
computes
.
Add
(
new
ag_compute
{
AllotId
=
second
.
AllotId
,
SecondId
=
second
.
Id
,
UnitType
=
second
.
UnitType
,
Department
=
second
.
Department
,
WorkPost
=
item
.
JobTitle
,
JobNumber
=
item
.
WorkNumber
,
PersonName
=
item
.
Name
,
PerforSumFee
=
item
.
DistPerformance
,
OthePerfor
=
item
.
OtherPerformance
,
NightWorkPerfor
=
item
.
NightWorkPerformance
,
RealGiveFee
=
item
.
RealAmount
,
});
}
AllotId
=
second
.
AllotId
,
SecondId
=
second
.
Id
,
UnitType
=
second
.
UnitType
,
Department
=
second
.
Department
,
WorkPost
=
item
.
WorkPost
,
JobNumber
=
item
.
WorkNumber
,
PersonName
=
item
.
Name
,
PerforSumFee
=
item
.
DistPerformance
,
OthePerfor
=
item
.
OtherPerformance
,
NightWorkPerfor
=
item
.
NightWorkPerformance
,
RealGiveFee
=
item
.
RealAmount
,
});
}
}
agcomputeRepository
.
AddRange
(
computes
.
ToArray
());
}
else
{
var
bodys
=
agbodysourceRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
second
.
Id
);
if
(
bodys
!=
null
&&
bodys
.
Any
())
{
foreach
(
var
item
in
bodys
)
{
computes
.
Add
(
new
ag_compute
{
AllotId
=
second
.
AllotId
,
SecondId
=
second
.
Id
,
UnitType
=
second
.
UnitType
,
Department
=
second
.
Department
,
WorkPost
=
item
.
JobTitle
,
JobNumber
=
item
.
WorkNumber
,
PersonName
=
item
.
Name
,
PerforSumFee
=
item
.
DistPerformance
,
OthePerfor
=
item
.
OtherPerformance
,
NightWorkPerfor
=
item
.
NightWorkPerformance
,
RealGiveFee
=
item
.
RealAmount
,
});
}
}
}
agcomputeRepository
.
AddRange
(
computes
.
ToArray
());
#
endregion
添加至二次绩效汇总
return
result
;
return
true
;
}
/// <summary>
...
...
@@ -1834,6 +1844,9 @@ public bool NursingDeptAudit(int userId, SecondAuditRequest request)
second
.
NursingDeptAuditUser
=
userId
;
second
.
NursingDeptAuditTime
=
DateTime
.
Now
;
if
(
request
.
IsPass
==
1
)
SyncSecondComputeData
(
second
);
return
agsecondallotRepository
.
Update
(
second
);
}
...
...
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