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
e2effe5c
Commit
e2effe5c
authored
Oct 14, 2020
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fixed/bug2' into v2020calculate
parents
f8fa0eb2
e25beb2e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
98 deletions
+3
-98
performance/Performance.Services/AllotCompute/ResultComputeService.cs
+3
-3
performance/Performance.Services/SecondAllotService.cs
+0
-95
No files found.
performance/Performance.Services/AllotCompute/ResultComputeService.cs
View file @
e2effe5c
...
...
@@ -548,16 +548,16 @@ public void GenerateSecondAllot(per_allot allot)
NursingDeptStatus
=
1
,
});
}
else
if
(
Math
.
Round
((
second
.
RealGiveFee
??
0
)
-
(
item
.
RealGiveFee
??
0
))
>=
0.5
m
)
else
{
second
.
RealGiveFee
=
item
.
RealGiveFee
;
if
(
second
.
Status
>
1
)
if
(
Math
.
Round
((
second
.
RealGiveFee
??
0
)
-
(
item
.
RealGiveFee
??
0
))
>=
0.5
m
&&
second
.
Status
>
1
)
{
second
.
Status
=
4
;
second
.
Remark
=
"科室绩效结果发生变更,需要重新提交"
;
second
.
NursingDeptStatus
=
4
;
second
.
NursingDeptRemark
=
"科室绩效结果发生变更,需要重新提交"
;
}
second
.
RealGiveFee
=
item
.
RealGiveFee
;
updSecond
.
Add
(
second
);
}
}
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
e2effe5c
...
...
@@ -120,101 +120,6 @@ public List<SecondListResponse> GetSecondList(int userId)
exp
=
exp
.
And
(
t
=>
t
.
UnitType
==
UnitType
.
行政后勤
.
ToString
());
var
secondList
=
perforAgsecondallotRepository
.
GetEntities
(
exp
);
//各科室绩效分配结果
var
accountList
=
perforResaccountRepository
.
GetEntities
(
t
=>
allotListId
.
Contains
(
t
.
AllotID
.
Value
)
&&
t
.
AccountingUnit
==
user
.
Department
);
//取得未生成二次绩效的绩效id
var
exceptListId
=
secondList
==
null
?
allotListId
:
allotListId
.
Except
(
secondList
.
Select
(
t
=>
t
.
AllotId
.
Value
));
var
specialList
=
resspecialunitRepository
.
GetEntities
(
t
=>
allotListId
.
Contains
(
t
.
AllotID
.
Value
)
&&
t
.
AccountingUnit
==
user
.
Department
);
#
region
初始化二次绩效
List
<
ag_secondallot
>
newSecond
=
new
List
<
ag_secondallot
>();
foreach
(
var
item
in
exceptListId
)
{
var
allot
=
allotList
.
FirstOrDefault
(
t
=>
t
.
ID
==
item
);
if
(
allot
==
null
)
continue
;
res_account
account
=
null
;
res_specialunit
special
=
null
;
if
(
role
.
Type
==
application
.
DirectorRole
)
account
=
accountList
?.
FirstOrDefault
(
t
=>
t
.
AllotID
==
item
&&
(
t
.
UnitType
==
(
int
)
UnitType
.
医生组
||
t
.
UnitType
==
(
int
)
UnitType
.
医技组
));
else
if
(
role
.
Type
==
application
.
NurseRole
)
account
=
accountList
?.
FirstOrDefault
(
t
=>
t
.
AllotID
==
item
&&
t
.
UnitType
==
(
int
)
UnitType
.
护理组
);
else
if
(
role
.
Type
==
application
.
SpecialRole
)
special
=
specialList
?.
FirstOrDefault
(
t
=>
t
.
AllotID
==
item
);
else
if
(
role
.
Type
==
application
.
OfficeRole
)
account
=
accountList
?.
FirstOrDefault
(
t
=>
t
.
AllotID
==
item
&&
t
.
UnitType
==
(
int
)
UnitType
.
行政后勤
);
if
(
account
==
null
&&
special
==
null
)
continue
;
// 医生组护理组特殊核算组
var
realGiveFee
=
role
.
Type
==
application
.
SpecialRole
?
special
.
RealGiveFee
:
account
.
RealGiveFee
;
// 行政后勤则取考核前绩效
if
(
role
.
Type
==
application
.
OfficeRole
)
realGiveFee
=
account
.
PerforTotal
;
var
second
=
new
ag_secondallot
{
AllotId
=
item
,
Year
=
allot
.
Year
,
Month
=
allot
.
Month
,
Department
=
user
.
Department
,
UnitType
=
role
.
Type
==
application
.
SpecialRole
?
UnitType
.
特殊核算组
.
ToString
()
:
((
UnitType
)
account
.
UnitType
).
ToString
(),
RealGiveFee
=
realGiveFee
,
Status
=
1
};
newSecond
.
Add
(
second
);
}
if
(
secondList
!=
null
&&
secondList
.
Any
())
{
var
fixatitems
=
new
List
<
ag_fixatitem
>();
foreach
(
var
item
in
secondList
.
Select
(
t
=>
t
.
AllotId
.
Value
))
{
var
allot
=
allotList
.
FirstOrDefault
(
t
=>
t
.
ID
==
item
);
if
(
allot
==
null
)
continue
;
res_account
account
=
null
;
res_specialunit
special
=
null
;
if
(
role
.
Type
==
application
.
DirectorRole
)
account
=
accountList
?.
FirstOrDefault
(
t
=>
t
.
AllotID
==
item
&&
(
t
.
UnitType
==
(
int
)
UnitType
.
医生组
||
t
.
UnitType
==
(
int
)
UnitType
.
医技组
));
else
if
(
role
.
Type
==
application
.
NurseRole
)
account
=
accountList
?.
FirstOrDefault
(
t
=>
t
.
AllotID
==
item
&&
t
.
UnitType
==
(
int
)
UnitType
.
护理组
);
else
if
(
role
.
Type
==
application
.
SpecialRole
)
special
=
specialList
?.
FirstOrDefault
(
t
=>
t
.
AllotID
==
item
);
else
if
(
role
.
Type
==
application
.
OfficeRole
)
account
=
accountList
?.
FirstOrDefault
(
t
=>
t
.
AllotID
==
item
&&
t
.
UnitType
==
(
int
)
UnitType
.
行政后勤
);
if
(
account
==
null
&&
special
==
null
)
continue
;
// 医生组护理组特殊核算组
var
realGiveFee
=
role
.
Type
==
application
.
SpecialRole
?
special
.
RealGiveFee
:
account
.
RealGiveFee
;
// 行政后勤则取考核前绩效
if
(
role
.
Type
==
application
.
OfficeRole
)
realGiveFee
=
account
.
PerforTotal
;
var
second
=
secondList
.
FirstOrDefault
(
t
=>
t
.
AllotId
==
item
);
second
.
RealGiveFee
=
realGiveFee
;
var
fixatitem
=
perforAgfixatitemRepository
.
GetEntity
(
t
=>
t
.
SecondId
==
second
.
Id
&&
t
.
AllotId
==
second
.
AllotId
&&
t
.
RowNumber
==
-
1
&&
t
.
ItemName
==
"可分配绩效"
);
if
(
fixatitem
!=
null
)
{
fixatitem
.
ItemValue
=
realGiveFee
.
ToString
();
fixatitems
.
Add
(
fixatitem
);
}
}
perforAgsecondallotRepository
.
UpdateRange
(
secondList
.
ToArray
());
perforAgfixatitemRepository
.
UpdateRange
(
fixatitems
.
ToArray
());
}
#
endregion
if
(
newSecond
.
Count
>
0
)
{
perforAgsecondallotRepository
.
AddRange
(
newSecond
.
ToArray
());
if
(
secondList
==
null
)
secondList
=
newSecond
;
else
secondList
.
AddRange
(
newSecond
);
}
var
list
=
Mapper
.
Map
<
List
<
SecondListResponse
>>(
secondList
);
list
?.
ForEach
(
t
=>
t
.
IsArchive
=
allotList
.
FirstOrDefault
(
a
=>
a
.
ID
==
t
.
AllotId
).
States
==
8
?
1
:
0
);
return
list
;
...
...
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