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
b8248656
Commit
b8248656
authored
Nov 10, 2021
by
钟博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改下发功能
parent
8c17444c
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
72 additions
and
111 deletions
+72
-111
performance/Performance.Api/Controllers/AllotController.cs
+6
-2
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+2
-2
performance/Performance.DtoModels/Request/AllotRequest.cs
+2
-0
performance/Performance.DtoModels/Response/IssuedPromptResponse.cs
+2
-2
performance/Performance.Services/AllotCompute/ResultComputeService.cs
+54
-99
performance/Performance.Services/EmployeeService.cs
+6
-6
No files found.
performance/Performance.Api/Controllers/AllotController.cs
View file @
b8248656
...
@@ -423,14 +423,18 @@ public ApiResponse Issued([FromBody] AllotRequest request)
...
@@ -423,14 +423,18 @@ public ApiResponse Issued([FromBody] AllotRequest request)
var
allot
=
_allotService
.
GetAllot
(
request
.
ID
);
var
allot
=
_allotService
.
GetAllot
(
request
.
ID
);
if
(
null
==
allot
)
if
(
null
==
allot
)
throw
new
PerformanceException
(
"当前绩效记录不存在"
);
throw
new
PerformanceException
(
"当前绩效记录不存在"
);
_allotService
.
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
GenerateSucceed
,
EnumHelper
.
GetDescription
(
AllotStates
.
GenerateSucceed
));
// 科室下发
// 科室下发
bool
isIssued
=
false
;
bool
isIssued
=
false
;
var
result
=
_resultComputeService
.
IssuedPrompt
(
allot
,
request
,
ref
isIssued
);
var
result
=
_resultComputeService
.
IssuedPrompt
(
allot
,
request
,
ref
isIssued
);
//绩效划拨,下发驳回
//绩效
状态修改;绩效
划拨,下发驳回
if
(
request
.
isIssued
==
1
&&
isIssued
)
if
(
request
.
isIssued
==
1
&&
isIssued
)
{
_allotService
.
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
GenerateSucceed
,
EnumHelper
.
GetDescription
(
AllotStates
.
GenerateSucceed
));
costTransferService
.
RejectedApplicat
(
allot
.
ID
);
costTransferService
.
RejectedApplicat
(
allot
.
ID
);
}
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
}
...
...
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
b8248656
...
@@ -3492,9 +3492,9 @@
...
@@ -3492,9 +3492,9 @@
有效收入占比
有效收入占比
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.DtoModels.IssuedPromptResponse.Status"
>
<member
name=
"P:Performance.DtoModels.IssuedPromptResponse.
Issue
Status"
>
<summary>
<summary>
1
修改 2 删除
1
删除 2 驳回 3 修改 4 新增
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.DtoModels.MenuResponse.MenuName"
>
<member
name=
"P:Performance.DtoModels.MenuResponse.MenuName"
>
...
...
performance/Performance.DtoModels/Request/AllotRequest.cs
View file @
b8248656
...
@@ -37,6 +37,8 @@ public class AllotRequest
...
@@ -37,6 +37,8 @@ public class AllotRequest
public
int
isIssued
{
get
;
set
;
}
public
int
isIssued
{
get
;
set
;
}
public
string
SearchQuery
{
get
;
set
;
}
public
string
SearchQuery
{
get
;
set
;
}
public
int
?
QueryStatus
{
get
;
set
;
}
}
}
public
class
AllotRequestValidator
:
AbstractValidator
<
AllotRequest
>
public
class
AllotRequestValidator
:
AbstractValidator
<
AllotRequest
>
...
...
performance/Performance.DtoModels/Response/IssuedPromptResponse.cs
View file @
b8248656
...
@@ -7,11 +7,11 @@ namespace Performance.DtoModels
...
@@ -7,11 +7,11 @@ namespace Performance.DtoModels
{
{
public
class
IssuedPromptResponse
:
ag_secondallot
public
class
IssuedPromptResponse
:
ag_secondallot
{
{
public
decimal
?
Diff
{
get
;
set
;
}
public
string
StatusRemake
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 1 删除 2 驳回 3 修改 4 新增
/// 1 删除 2 驳回 3 修改 4 新增
/// </summary>
/// </summary>
public
new
int
Status
{
get
;
set
;
}
public
new
int
Issue
Status
{
get
;
set
;
}
}
}
}
}
performance/Performance.Services/AllotCompute/ResultComputeService.cs
View file @
b8248656
...
@@ -627,6 +627,7 @@ public void GenerateSecondAllot(per_allot allot)
...
@@ -627,6 +627,7 @@ public void GenerateSecondAllot(per_allot allot)
var
second
=
tempSecond
?.
FirstOrDefault
(
f
=>
f
.
UnitType
==
item
.
UnitType
&&
f
.
Department
==
item
.
Department
);
var
second
=
tempSecond
?.
FirstOrDefault
(
f
=>
f
.
UnitType
==
item
.
UnitType
&&
f
.
Department
==
item
.
Department
);
if
(
second
==
null
)
if
(
second
==
null
)
{
{
item
.
PreRealGiveFee
=
0
;
delSecond
.
Add
(
item
);
delSecond
.
Add
(
item
);
}
}
}
}
...
@@ -649,12 +650,8 @@ public void GenerateSecondAllot(per_allot allot)
...
@@ -649,12 +650,8 @@ public void GenerateSecondAllot(per_allot allot)
*/
*/
}
}
/*
if
(
delSecond
.
Any
())
if
(
delSecond
.
Any
())
{
perforAgsecondallotRepository
.
UpdateRange
(
delSecond
.
ToArray
());
perforAgsecondallotRepository.RemoveRange(delSecond.ToArray());
}
*/
}
}
...
@@ -664,131 +661,89 @@ public List<IssuedPromptResponse> IssuedPrompt(per_allot allot, AllotRequest req
...
@@ -664,131 +661,89 @@ public List<IssuedPromptResponse> IssuedPrompt(per_allot allot, AllotRequest req
List
<
ag_secondallot
>
tempSecond
=
new
List
<
ag_secondallot
>();
List
<
ag_secondallot
>
tempSecond
=
new
List
<
ag_secondallot
>();
var
promptSeconds
=
new
List
<
IssuedPromptResponse
>();
var
promptSeconds
=
new
List
<
IssuedPromptResponse
>();
var
types
=
new
List
<
int
>
{
(
int
)
UnitType
.
行政高层
,
(
int
)
UnitType
.
行政中层
,
(
int
)
UnitType
.
行政后勤
};
var
accountUnit
=
perforResaccountRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
&&
!
types
.
Contains
(
t
.
UnitType
.
Value
));
// 查询需要进行二次分配的行政后勤科室
var
xzAccountUnit
=
perforResaccountRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
&&
t
.
UnitType
.
Value
==
(
int
)
UnitType
.
行政后勤
&&
t
.
NeedSecondAllot
==
"是"
);
if
(
xzAccountUnit
!=
null
&&
xzAccountUnit
.
Count
>
0
)
(
accountUnit
??
new
List
<
res_account
>()).
AddRange
(
xzAccountUnit
);
var
specialList
=
perforResspecialunitRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
if
(
accountUnit
!=
null
)
{
foreach
(
var
item
in
accountUnit
)
{
if
(!
tempSecond
.
Any
(
f
=>
f
.
UnitType
==
((
UnitType
)
item
.
UnitType
).
ToString
()
&&
f
.
Department
==
item
.
AccountingUnit
))
{
tempSecond
.
Add
(
new
ag_secondallot
{
AllotId
=
allot
.
ID
,
Year
=
allot
.
Year
,
Month
=
allot
.
Month
,
UnitType
=
((
UnitType
)
item
.
UnitType
).
ToString
(),
Department
=
item
.
AccountingUnit
,
NightShiftWorkPerforFee
=
item
.
NightShiftWorkPerforFee
,
PreRealGiveFee
=
item
.
RealGiveFee
,
});
}
}
}
if
(
specialList
!=
null
)
{
foreach
(
var
item
in
specialList
.
Select
(
w
=>
new
{
w
.
AccountingUnit
,
w
.
NightShiftWorkPerforFee
,
w
.
RealGiveFee
}).
Distinct
())
{
if
(!
tempSecond
.
Any
(
f
=>
f
.
UnitType
==
UnitType
.
特殊核算组
.
ToString
()
&&
f
.
Department
==
item
.
AccountingUnit
))
{
tempSecond
.
Add
(
new
ag_secondallot
{
AllotId
=
allot
.
ID
,
Year
=
allot
.
Year
,
Month
=
allot
.
Month
,
UnitType
=
UnitType
.
特殊核算组
.
ToString
(),
Department
=
item
.
AccountingUnit
,
NightShiftWorkPerforFee
=
item
.
NightShiftWorkPerforFee
,
PreRealGiveFee
=
item
.
RealGiveFee
,
});
}
}
}
var
secondList
=
perforAgsecondallotRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allot
.
ID
&&
t
.
Year
==
allot
.
Year
&&
t
.
Month
==
allot
.
Month
);
var
secondList
=
perforAgsecondallotRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allot
.
ID
&&
t
.
Year
==
allot
.
Year
&&
t
.
Month
==
allot
.
Month
);
if
(
secondList
==
null
||
!
secondList
.
Any
())
return
new
List
<
IssuedPromptResponse
>();
var
IsOpen
=
hospitalRepository
.
GetEntity
(
t
=>
t
.
ID
==
allot
.
HospitalId
).
IsOpenNursingDeptAudit
==
1
;
var
status
=
new
[]
{
2
,
3
};
foreach
(
var
item
in
secondList
)
foreach
(
var
item
in
secondList
)
{
{
var
second
=
secondList
?.
FirstOrDefault
(
f
=>
f
.
UnitType
==
item
.
UnitType
&&
f
.
Department
==
item
.
Department
);
var
second
=
secondList
?.
FirstOrDefault
(
f
=>
f
.
UnitType
==
item
.
UnitType
&&
f
.
Department
==
item
.
Department
);
if
((
item
.
RealGiveFee
??
0
)
!=
(
item
.
PreRealGiveFee
??
0
)
&&
second
.
Status
>
1
)
var
isDiffer
=
(
item
.
RealGiveFee
??
0
)
>
0
&&
(
item
.
PreRealGiveFee
??
0
)
>
0
&&
((
item
.
RealGiveFee
??
0
)
!=
(
item
.
PreRealGiveFee
??
0
));
if
((
item
.
RealGiveFee
??
0
)
==
0
&&
(
item
.
PreRealGiveFee
??
0
)
>
0
)
{
{
var
promptSecond
=
Mapper
.
Map
<
IssuedPromptResponse
>(
item
);
var
promptSecond
=
Mapper
.
Map
<
IssuedPromptResponse
>(
item
);
promptSecond
.
Diff
=
(
item
.
RealGiveFee
??
0
)
-
(
item
.
PreRealGiveFee
??
0
);
promptSecond
.
RealGiveFee
=
item
.
PreRealGiveFee
;
promptSecond
.
Status
=
1
;
promptSecond
.
StatusRemake
=
""
;
promptSecond
.
IssueStatus
=
4
;
promptSeconds
.
Add
(
promptSecond
);
promptSeconds
.
Add
(
promptSecond
);
}
}
else
if
(
isDiffer
&&
!
status
.
Contains
(
item
.
Status
.
Value
)
&&
(
IsOpen
==
true
?
!
status
.
Contains
(
item
.
NursingDeptStatus
.
Value
):
true
))
{
var
promptSecond
=
Mapper
.
Map
<
IssuedPromptResponse
>(
item
);
promptSecond
.
StatusRemake
=
$@"未提交科室实发绩效变更,原金额:
{
item
.
RealGiveFee
??
0
}
"
;
promptSecond
.
IssueStatus
=
3
;
promptSecond
.
RealGiveFee
=
item
.
PreRealGiveFee
;
promptSeconds
.
Add
(
promptSecond
);
}
}
else
if
(
isDiffer
&&
status
.
Contains
(
item
.
Status
.
Value
)
&&
(
IsOpen
==
true
?
status
.
Contains
(
item
.
NursingDeptStatus
.
Value
):
true
))
if
(
secondList
!=
null
&&
secondList
.
Any
())
{
{
foreach
(
var
item
in
secondList
)
var
promptSecond
=
Mapper
.
Map
<
IssuedPromptResponse
>(
item
);
promptSecond
.
StatusRemake
=
$@"已提交或已审核科室实发绩效变更驳回,原金额:
{
item
.
RealGiveFee
??
0
}
"
;
promptSecond
.
IssueStatus
=
2
;
promptSecond
.
RealGiveFee
=
item
.
PreRealGiveFee
;
promptSecond
.
Status
=
4
;
promptSecond
.
Remark
=
"科室绩效结果发生变更,需要重新提交"
;
if
(
IsOpen
)
{
{
var
second
=
tempSecond
?.
FirstOrDefault
(
f
=>
f
.
UnitType
==
item
.
UnitType
&&
f
.
Department
==
item
.
Department
);
promptSecond
.
NursingDeptStatus
=
4
;
if
(
second
==
null
)
promptSecond
.
NursingDeptRemark
=
"科室绩效结果发生变更,需要重新提交"
;
}
promptSeconds
.
Add
(
promptSecond
);
}
else
if
((
item
.
RealGiveFee
??
0
)
>=
0
&&
(
item
.
PreRealGiveFee
??
0
)
==
0
)
{
{
var
promptSecond
=
Mapper
.
Map
<
IssuedPromptResponse
>(
item
);
var
promptSecond
=
Mapper
.
Map
<
IssuedPromptResponse
>(
item
);
promptSecond
.
Diff
=
(
item
.
RealGiveFee
??
0
)
-
(
item
.
PreRealGiveFee
??
0
)
;
promptSecond
.
StatusRemake
=
""
;
promptSecond
.
Status
=
1
;
promptSecond
.
Issue
Status
=
1
;
promptSeconds
.
Add
(
promptSecond
);
promptSeconds
.
Add
(
promptSecond
);
}
}
}
}
}
if
(!
string
.
IsNullOrEmpty
(
request
.
SearchQuery
))
if
(!
string
.
IsNullOrEmpty
(
request
.
SearchQuery
))
promptSeconds
=
promptSeconds
.
Where
(
t
=>
t
.
Department
.
Contains
(
request
.
SearchQuery
))?.
ToList
();
promptSeconds
=
promptSeconds
?.
FindAll
(
t
=>
t
.
Department
.
Contains
(
request
.
SearchQuery
));
if
(!
string
.
IsNullOrEmpty
(
request
.
QueryStatus
.
ToString
()))
promptSeconds
=
promptSeconds
?.
FindAll
(
t
=>
t
.
IssueStatus
==
request
.
QueryStatus
);
if
(
request
.
isIssued
==
1
)
if
(
request
.
isIssued
==
1
)
isIssued
=
Issued
(
promptSeconds
,
secondList
);
return
promptSeconds
;
}
public
bool
Issued
(
List
<
IssuedPromptResponse
>
issueds
,
List
<
ag_secondallot
>
secondallots
)
{
{
if
(
issueds
==
null
||
!
issueds
.
Any
()
||
secondallots
==
null
||
!
secondallots
.
Any
())
return
true
;
if
(
promptSeconds
.
Any
(
t
=>
t
.
IssueStatus
!=
1
))
if
(
issueds
.
Any
(
w
=>
w
.
Status
==
1
))
{
{
var
updSecondQuery
=
issueds
.
Where
(
t
=>
t
.
Status
==
1
);
var
updSecondQuery
=
promptSeconds
.
Where
(
t
=>
t
.
IssueStatus
!=
1
);
var
updSeconds
=
secondList
.
Where
(
w
=>
updSecondQuery
.
Select
(
t
=>
t
.
Id
).
Contains
(
w
.
Id
))
??
new
List
<
ag_secondallot
>();
var
updSeconds
=
secondallots
.
Where
(
w
=>
updSecondQuery
.
Select
(
t
=>
t
.
Id
).
Contains
(
w
.
Id
))
??
new
List
<
ag_secondallot
>();
updSeconds
.
ToList
().
ForEach
(
t
=>
t
.
RealGiveFee
=
t
.
PreRealGiveFee
);
foreach
(
var
item
in
updSeconds
)
{
item
.
Status
=
4
;
item
.
Remark
=
"科室绩效结果发生变更,需要重新提交"
;
item
.
NursingDeptStatus
=
4
;
item
.
NursingDeptRemark
=
"科室绩效结果发生变更,需要重新提交"
;
item
.
RealGiveFee
=
item
.
PreRealGiveFee
;
}
perforAgsecondallotRepository
.
UpdateRange
(
updSeconds
.
ToArray
());
perforAgsecondallotRepository
.
UpdateRange
(
updSeconds
.
ToArray
());
foreach
(
var
item
in
updSeconds
.
Where
(
w
=>
w
.
Status
==
4
))
{
// 自动驳回,需要清空该科室历史数据
var
histories
=
perforAgcomputeRepository
.
GetEntities
(
w
=>
w
.
SecondId
==
item
.
Id
);
if
(
histories
!=
null
&&
histories
.
Any
())
perforAgcomputeRepository
.
RemoveRange
(
histories
.
ToArray
());
}
}
}
if
(
promptSeconds
.
Any
(
t
=>
t
.
IssueStatus
==
1
))
if
(
issueds
.
Any
(
w
=>
w
.
Status
==
2
))
{
{
//删除
//删除
var
delSecondQuery
=
issueds
.
Where
(
t
=>
t
.
Status
==
2
);
var
delSecondQuery
=
promptSeconds
.
Where
(
t
=>
t
.
IssueStatus
==
1
);
var
delSecond
=
second
allots
.
Where
(
w
=>
delSecondQuery
.
Select
(
t
=>
t
.
Id
).
Contains
(
w
.
Id
))
??
new
List
<
ag_secondallot
>();
var
delSecond
=
second
List
.
Where
(
w
=>
delSecondQuery
.
Select
(
t
=>
t
.
Id
).
Contains
(
w
.
Id
))
??
new
List
<
ag_secondallot
>();
//delSecond.ToList().ForEach(t => t.RealGiveFee = t.PreRealGiveFee);
perforAgsecondallotRepository
.
RemoveRange
(
delSecond
.
ToArray
());
perforAgsecondallotRepository
.
RemoveRange
(
delSecond
.
ToArray
());
}
}
return
true
;
isIssued
=
true
;
}
return
promptSeconds
.
OrderBy
(
t
=>
t
.
IssueStatus
).
ToList
();
}
}
}
}
}
}
performance/Performance.Services/EmployeeService.cs
View file @
b8248656
...
@@ -1117,21 +1117,21 @@ public class ComparisonConfig
...
@@ -1117,21 +1117,21 @@ public class ComparisonConfig
{
{
public
static
List
<
Heads
>
DeptHeads
{
get
;
}
=
new
List
<
Heads
>
public
static
List
<
Heads
>
DeptHeads
{
get
;
}
=
new
List
<
Heads
>
{
{
new
Heads
{
Cloumon
=
"
科室类
别"
,
Name
=
nameof
(
view_check_dept
.
UnitType
)},
new
Heads
{
Cloumon
=
"
核算单元组
别"
,
Name
=
nameof
(
view_check_dept
.
UnitType
)},
new
Heads
{
Cloumon
=
"核算单元"
,
Name
=
nameof
(
view_check_dept
.
AccountingUnit
)},
new
Heads
{
Cloumon
=
"核算单元"
,
Name
=
nameof
(
view_check_dept
.
AccountingUnit
)},
new
Heads
{
Cloumon
=
"
预发绩效
"
,
Name
=
nameof
(
view_check_dept
.
RealGiveFeeExecl
)},
new
Heads
{
Cloumon
=
"
测算表实发
"
,
Name
=
nameof
(
view_check_dept
.
RealGiveFeeExecl
)},
new
Heads
{
Cloumon
=
"
实发绩效
"
,
Name
=
nameof
(
view_check_dept
.
RealGiveFeeCompute
)},
new
Heads
{
Cloumon
=
"
软件实发
"
,
Name
=
nameof
(
view_check_dept
.
RealGiveFeeCompute
)},
new
Heads
{
Cloumon
=
"差额"
,
Name
=
nameof
(
view_check_dept
.
Diff
)},
new
Heads
{
Cloumon
=
"差额"
,
Name
=
nameof
(
view_check_dept
.
Diff
)},
};
};
public
static
List
<
Heads
>
EmpHeads
{
get
;
}
=
new
List
<
Heads
>
public
static
List
<
Heads
>
EmpHeads
{
get
;
}
=
new
List
<
Heads
>
{
{
new
Heads
{
Cloumon
=
"
科室类
别"
,
Name
=
nameof
(
view_check_emp
.
UnitType
)},
new
Heads
{
Cloumon
=
"
核算单元组
别"
,
Name
=
nameof
(
view_check_emp
.
UnitType
)},
new
Heads
{
Cloumon
=
"核算单元"
,
Name
=
nameof
(
view_check_emp
.
AccountingUnit
)},
new
Heads
{
Cloumon
=
"核算单元"
,
Name
=
nameof
(
view_check_emp
.
AccountingUnit
)},
new
Heads
{
Cloumon
=
"人员工号"
,
Name
=
nameof
(
view_check_emp
.
JobNumber
)},
new
Heads
{
Cloumon
=
"人员工号"
,
Name
=
nameof
(
view_check_emp
.
JobNumber
)},
new
Heads
{
Cloumon
=
"姓名"
,
Name
=
nameof
(
view_check_emp
.
EmployeeName
)},
new
Heads
{
Cloumon
=
"姓名"
,
Name
=
nameof
(
view_check_emp
.
EmployeeName
)},
new
Heads
{
Cloumon
=
"
预发绩效
"
,
Name
=
nameof
(
view_check_emp
.
RealGiveFeeExecl
)},
new
Heads
{
Cloumon
=
"
测算表实发
"
,
Name
=
nameof
(
view_check_emp
.
RealGiveFeeExecl
)},
new
Heads
{
Cloumon
=
"
实发绩效
"
,
Name
=
nameof
(
view_check_emp
.
RealGiveFeeCompute
)},
new
Heads
{
Cloumon
=
"
软件实发
"
,
Name
=
nameof
(
view_check_emp
.
RealGiveFeeCompute
)},
new
Heads
{
Cloumon
=
"差额"
,
Name
=
nameof
(
view_check_emp
.
Diff
)},
new
Heads
{
Cloumon
=
"差额"
,
Name
=
nameof
(
view_check_emp
.
Diff
)},
};
};
}
}
...
...
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