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
56d78a8f
Commit
56d78a8f
authored
Dec 31, 2021
by
lcx
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into feature/抽取配置优化
parents
11ad72b5
e2f79e1f
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
167 additions
and
99 deletions
+167
-99
performance/Performance.Api/Controllers/AllotController.cs
+34
-8
performance/Performance.Api/Controllers/ModExtractController.cs
+22
-19
performance/Performance.Repository/PerforCofdirectorRepository.cs
+1
-0
performance/Performance.Repository/PerforPerAllotRepository.cs
+1
-4
performance/Performance.Services/AllotCompute/ResultComputeService.cs
+86
-62
performance/Performance.Services/AllotService.cs
+8
-2
performance/Performance.Services/ComputeService.cs
+2
-2
performance/Performance.Services/ExtractExcelService/DictionaryService.cs
+2
-1
performance/Performance.Services/SecondAllotService.cs
+1
-1
performance/Performance.Services/UnitTypeUtil.cs
+10
-0
No files found.
performance/Performance.Api/Controllers/AllotController.cs
View file @
56d78a8f
...
@@ -297,7 +297,15 @@ public ApiResponse GenerateReport([CustomizeValidator(RuleSet = "Delete"), FromB
...
@@ -297,7 +297,15 @@ public ApiResponse GenerateReport([CustomizeValidator(RuleSet = "Delete"), FromB
if
(
null
==
allot
||
!
states
.
Contains
(
allot
.
States
))
if
(
null
==
allot
||
!
states
.
Contains
(
allot
.
States
))
throw
new
PerformanceException
(
"当前绩效暂未生成,无法统计报表数据。"
);
throw
new
PerformanceException
(
"当前绩效暂未生成,无法统计报表数据。"
);
//_publishEndpoint.Publish(allot).Wait();
_backgroundTaskQueue
.
QueueBackgroundWorkItem
(
async
token
=>
{
using
(
var
scope
=
_serviceScopeFactory
.
CreateScope
())
{
var
scopedServices
=
scope
.
ServiceProvider
.
GetRequiredService
<
AllotService
>();
scopedServices
.
GenerateReport
(
allot
);
await
Task
.
Delay
(
TimeSpan
.
FromSeconds
(
5
),
token
);
}
});
return
new
ApiResponse
(
ResponseType
.
OK
,
"统计报表数据任务开始"
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"统计报表数据任务开始"
);
}
}
...
@@ -417,18 +425,36 @@ public ApiResponse Issued([FromBody] AllotRequest request)
...
@@ -417,18 +425,36 @@ public ApiResponse Issued([FromBody] AllotRequest request)
if
(
null
==
allot
)
if
(
null
==
allot
)
throw
new
PerformanceException
(
"当前绩效记录不存在"
);
throw
new
PerformanceException
(
"当前绩效记录不存在"
);
// 科室下发
var
seconds
=
_resultComputeService
.
GetSeconds
(
allot
);
bool
isIssued
=
false
;
if
(
request
.
isIssued
==
1
)
var
result
=
_resultComputeService
.
IssuedPrompt
(
allot
,
request
,
ref
isIssued
);
{
// 确认下发
//绩效状态修改;绩效划拨,下发驳回
var
isIssued
=
_resultComputeService
.
IssuedChangeSecond
(
allot
,
seconds
);
if
(
request
.
isIssued
==
1
&&
isIssued
)
if
(
isIssued
)
{
{
_allotService
.
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
GenerateSucceed
,
EnumHelper
.
GetDescription
(
AllotStates
.
GenerateSucceed
));
_allotService
.
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
GenerateSucceed
,
EnumHelper
.
GetDescription
(
AllotStates
.
GenerateSucceed
));
costTransferService
.
RejectedApplicat
(
allot
.
ID
);
costTransferService
.
RejectedApplicat
(
allot
.
ID
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"下发成功"
);
}
else
{
return
new
ApiResponse
(
ResponseType
.
Fail
,
"下发失败"
);
}
}
}
else
{
// 获取二次分配差异数据
var
orgChangeSecond
=
_resultComputeService
.
GetChangeSecond
(
seconds
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
if
(!
string
.
IsNullOrEmpty
(
request
.
SearchQuery
))
orgChangeSecond
=
orgChangeSecond
?.
Where
(
t
=>
t
.
Department
.
Contains
(
request
.
SearchQuery
)).
ToList
()
??
new
List
<
IssuedPromptResponse
>();
if
(!
string
.
IsNullOrEmpty
(
request
.
QueryStatus
.
ToString
()))
orgChangeSecond
=
orgChangeSecond
?.
Where
(
t
=>
t
.
IssueStatus
==
request
.
QueryStatus
).
ToList
()
??
new
List
<
IssuedPromptResponse
>();
orgChangeSecond
.
ForEach
(
item
=>
item
.
UnitType
=
UnitTypeUtil
.
GetOffice
(
item
.
UnitType
));
orgChangeSecond
=
orgChangeSecond
?.
OrderBy
(
t
=>
t
.
IssueStatus
).
ToList
();
return
new
ApiResponse
(
ResponseType
.
OK
,
orgChangeSecond
);
}
}
}
/// <summary>
/// <summary>
...
...
performance/Performance.Api/Controllers/ModExtractController.cs
View file @
56d78a8f
...
@@ -20,6 +20,7 @@ public class ModExtractController : Controller
...
@@ -20,6 +20,7 @@ public class ModExtractController : Controller
private
readonly
AllotService
_allotService
;
private
readonly
AllotService
_allotService
;
private
readonly
CustomExtractService
_extractService
;
private
readonly
CustomExtractService
_extractService
;
private
readonly
IServiceScopeFactory
_serviceScopeFactory
;
private
readonly
IServiceScopeFactory
_serviceScopeFactory
;
private
readonly
IBackgroundTaskQueue
_backgroundTaskQueue
;
private
readonly
IHubNotificationQueue
_notificationQueue
;
private
readonly
IHubNotificationQueue
_notificationQueue
;
public
ModExtractController
(
public
ModExtractController
(
...
@@ -27,12 +28,14 @@ public class ModExtractController : Controller
...
@@ -27,12 +28,14 @@ public class ModExtractController : Controller
AllotService
allotService
,
AllotService
allotService
,
CustomExtractService
extractService
,
CustomExtractService
extractService
,
IServiceScopeFactory
serviceScopeFactory
,
IServiceScopeFactory
serviceScopeFactory
,
IBackgroundTaskQueue
backgroundTaskQueue
,
IHubNotificationQueue
notificationQueue
)
IHubNotificationQueue
notificationQueue
)
{
{
_claim
=
claim
;
_claim
=
claim
;
_allotService
=
allotService
;
_allotService
=
allotService
;
_extractService
=
extractService
;
_extractService
=
extractService
;
_serviceScopeFactory
=
serviceScopeFactory
;
_serviceScopeFactory
=
serviceScopeFactory
;
_backgroundTaskQueue
=
backgroundTaskQueue
;
_notificationQueue
=
notificationQueue
;
_notificationQueue
=
notificationQueue
;
}
}
...
@@ -43,27 +46,27 @@ public ApiResponse CustomExtract(int allotId)
...
@@ -43,27 +46,27 @@ public ApiResponse CustomExtract(int allotId)
if
(!
_extractService
.
CheckConfigScript
(
userId
,
allotId
))
if
(!
_extractService
.
CheckConfigScript
(
userId
,
allotId
))
return
new
ApiResponse
(
ResponseType
.
Fail
,
"未配置自定义抽取,请联系绩效管理人员。"
);
return
new
ApiResponse
(
ResponseType
.
Fail
,
"未配置自定义抽取,请联系绩效管理人员。"
);
//
_backgroundTaskQueue.QueueBackgroundWorkItem(async token =>
_backgroundTaskQueue
.
QueueBackgroundWorkItem
(
async
token
=>
//
{
{
//
using (var scope = _serviceScopeFactory.CreateScope())
using
(
var
scope
=
_serviceScopeFactory
.
CreateScope
())
//
{
{
//
var scopedServices = scope.ServiceProvider.GetRequiredService<CustomExtractService>();
var
scopedServices
=
scope
.
ServiceProvider
.
GetRequiredService
<
CustomExtractService
>();
//
var scopedAllotService = scope.ServiceProvider.GetRequiredService<AllotService>();
var
scopedAllotService
=
scope
.
ServiceProvider
.
GetRequiredService
<
AllotService
>();
//
var scopedQueue = scope.ServiceProvider.GetRequiredService<IHubNotificationQueue>();
var
scopedQueue
=
scope
.
ServiceProvider
.
GetRequiredService
<
IHubNotificationQueue
>();
//
if (scopedServices.ExtractData(userId, allotId, out string resultFilePath))
if
(
scopedServices
.
ExtractData
(
userId
,
allotId
,
out
string
resultFilePath
))
//
{
{
//
scopedAllotService.UpdateAllotCustomExtractPath(allotId, resultFilePath);
scopedAllotService
.
UpdateAllotCustomExtractPath
(
allotId
,
resultFilePath
);
//
scopedQueue.Send(new Notification(allotId, "CustomDowoload", new CustomDownloadContent("自定义数据提取数据成功,是否立即下载", allotId)));
scopedQueue
.
Send
(
new
Notification
(
allotId
,
"CustomDowoload"
,
new
CustomDownloadContent
(
"自定义数据提取数据成功,是否立即下载"
,
allotId
)));
//
}
}
//
else
else
//
{
{
//
scopedQueue.Send(new Notification(allotId, "Notification", new TextContent("自定义数据提取数据失败", NotificationLevel.ERR)));
scopedQueue
.
Send
(
new
Notification
(
allotId
,
"Notification"
,
new
TextContent
(
"自定义数据提取数据失败"
,
NotificationLevel
.
ERR
)));
//
}
}
//
await Task.Delay(TimeSpan.FromSeconds(5), token);
await
Task
.
Delay
(
TimeSpan
.
FromSeconds
(
5
),
token
);
//
}
}
//
});
});
_notificationQueue
.
Send
(
new
Notification
(
allotId
,
"Notification"
,
new
TextContent
(
"自定义数据提取任务开始执行"
)));
_notificationQueue
.
Send
(
new
Notification
(
allotId
,
"Notification"
,
new
TextContent
(
"自定义数据提取任务开始执行"
)));
...
...
performance/Performance.Repository/PerforCofdirectorRepository.cs
View file @
56d78a8f
...
@@ -76,6 +76,7 @@ public int DeleteAllotData(int allotId)
...
@@ -76,6 +76,7 @@ public int DeleteAllotData(int allotId)
"im_employee_logistics"
,
"im_employee_logistics"
,
"im_header"
,
"im_header"
,
"im_specialunit"
,
"im_specialunit"
,
"his_data"
,
"log_check"
,
"log_check"
,
"per_employee"
,
"per_employee"
,
"per_sheet"
,
"per_sheet"
,
...
...
performance/Performance.Repository/PerforPerAllotRepository.cs
View file @
56d78a8f
...
@@ -123,10 +123,7 @@ public void ClearResultData(int allotid)
...
@@ -123,10 +123,7 @@ public void ClearResultData(int allotid)
if
(
connection
.
State
!=
ConnectionState
.
Open
)
connection
.
Open
();
if
(
connection
.
State
!=
ConnectionState
.
Open
)
connection
.
Open
();
try
try
{
{
string
update
=
"update ex_result set isdelete = 1 where allotid = @allotid "
;
string
clear
=
"delete from ex_result where allotid = @allotid;"
;
connection
.
Execute
(
update
,
new
{
allotid
},
commandTimeout
:
60
*
60
);
string
clear
=
"delete from ex_result where allotid = @allotid and isdelete = 1 and createtime < (select min(createtime) from (select distinct createtime from ex_result where allotid = @allotid and isdelete = 1 order by createtime desc limit 4) t);"
;
connection
.
Execute
(
clear
,
new
{
allotid
},
commandTimeout
:
60
*
60
);
connection
.
Execute
(
clear
,
new
{
allotid
},
commandTimeout
:
60
*
60
);
}
}
catch
(
Exception
)
catch
(
Exception
)
...
...
performance/Performance.Services/AllotCompute/ResultComputeService.cs
View file @
56d78a8f
...
@@ -656,23 +656,86 @@ public void GenerateSecondAllot(per_allot allot)
...
@@ -656,23 +656,86 @@ public void GenerateSecondAllot(per_allot allot)
}
}
/// <summary>
/// 获取所有二次分配记录
/// </summary>
/// <param name="allot"></param>
/// <returns></returns>
public
List
<
ag_secondallot
>
GetSeconds
(
per_allot
allot
)
{
return
perforAgsecondallotRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allot
.
ID
&&
t
.
Year
==
allot
.
Year
&&
t
.
Month
==
allot
.
Month
);
}
public
List
<
IssuedPromptResponse
>
IssuedPrompt
(
per_allot
allot
,
AllotRequest
request
,
ref
bool
isIssued
)
/// <summary>
/// 确认下发
/// </summary>
/// <param name="allot"></param>
/// <param name="secondList"></param>
/// <returns></returns>
public
bool
IssuedChangeSecond
(
per_allot
allot
,
List
<
ag_secondallot
>
secondList
)
{
{
List
<
ag_secondallot
>
tempSecond
=
new
List
<
ag_secondallot
>();
try
var
promptSeconds
=
new
List
<
IssuedPromptResponse
>();
{
var
promptSeconds
=
GetChangeSecond
(
secondList
);
var
hospital
=
hospitalRepository
.
GetEntity
(
t
=>
t
.
ID
==
allot
.
HospitalId
);
var
secondList
=
perforAgsecondallotRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allot
.
ID
&&
t
.
Year
==
allot
.
Year
&&
t
.
Month
==
allot
.
Month
);
if
(
secondList
==
null
||
secondList
.
Count
()
==
0
)
if
(
secondList
==
null
||
!
secondList
.
Any
())
return
true
;
if
(
promptSeconds
.
Any
(
t
=>
t
.
IssueStatus
!=
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
>();
foreach
(
var
item
in
updSecondQuery
)
{
var
second
=
secondList
.
FirstOrDefault
(
c
=>
c
.
Id
==
item
.
Id
);
second
.
RealGiveFee
=
second
.
PreRealGiveFee
??
0
;
if
(
item
.
IssueStatus
==
2
)
{
second
.
Status
=
4
;
second
.
Remark
=
"科室绩效结果发生变更,需要重新提交"
;
if
(
hospital
.
IsOpenNursingDeptAudit
==
1
)
{
second
.
NursingDeptStatus
=
4
;
second
.
NursingDeptRemark
=
"科室绩效结果发生变更,需要重新提交"
;
}
}
}
perforAgsecondallotRepository
.
UpdateRange
(
updSeconds
.
ToArray
());
}
//if (promptSeconds.Any(t => t.IssueStatus == 1))
//{
// //删除
// var delSecondQuery = promptSeconds.Where(t => t.IssueStatus == 1);
// var delSecond = secondList.Where(w => delSecondQuery.Select(t => t.Id).Contains(w.Id)) ?? new List<ag_secondallot>();
// perforAgsecondallotRepository.RemoveRange(delSecond.ToArray());
//}
return
true
;
}
catch
(
Exception
)
{
return
false
;
}
}
/// <summary>
/// 获取二次分配差异数据
/// </summary>
/// <param name="secondList"></param>
/// <returns></returns>
public
List
<
IssuedPromptResponse
>
GetChangeSecond
(
List
<
ag_secondallot
>
secondList
)
{
if
(
secondList
==
null
||
secondList
.
Count
()
==
0
)
return
new
List
<
IssuedPromptResponse
>();
return
new
List
<
IssuedPromptResponse
>();
var
IsOpen
=
hospitalRepository
.
GetEntity
(
t
=>
t
.
ID
==
allot
.
HospitalId
).
IsOpenNursingDeptAudit
==
1
;
var
promptSeconds
=
new
List
<
IssuedPromptResponse
>()
;
var
status
=
new
[]
{
2
,
3
};
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
isDiffer
=
(
item
.
RealGiveFee
??
0
)
!=
(
item
.
PreRealGiveFee
??
0
);
var
isDiffer
=
(
item
.
RealGiveFee
??
0
)
!=
(
item
.
PreRealGiveFee
??
0
);
if
((
item
.
RealGiveFee
??
0
)
==
0
&&
(
item
.
PreRealGiveFee
??
0
)
>
0
)
if
((
item
.
RealGiveFee
??
0
)
==
0
&&
(
item
.
PreRealGiveFee
??
0
)
>
0
)
...
@@ -683,76 +746,37 @@ public List<IssuedPromptResponse> IssuedPrompt(per_allot allot, AllotRequest req
...
@@ -683,76 +746,37 @@ public List<IssuedPromptResponse> IssuedPrompt(per_allot allot, AllotRequest req
promptSecond
.
IssueStatus
=
4
;
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
))
else
if
(
isDiffer
)
{
if
(
status
.
Contains
(
item
.
Status
.
Value
))
{
{
var
promptSecond
=
_mapper
.
Map
<
IssuedPromptResponse
>(
item
);
var
promptSecond
=
_mapper
.
Map
<
IssuedPromptResponse
>(
item
);
promptSecond
.
StatusRemake
=
$@"未提交科室实发绩效变更,原金额:
{
item
.
RealGiveFee
??
0
}
"
;
promptSecond
.
StatusRemake
=
$@"已提交或已审核科室实发绩效变更驳回,原金额:
{
item
.
RealGiveFee
??
0
:
0.
##
}
"
;
promptSecond
.
IssueStatus
=
3
;
promptSecond
.
RealGiveFee
=
item
.
PreRealGiveFee
;
promptSecond
.
RealGiveFee
=
item
.
PreRealGiveFee
;
promptSecond
.
IssueStatus
=
2
;
promptSeconds
.
Add
(
promptSecond
);
promptSeconds
.
Add
(
promptSecond
);
}
}
else
if
(
isDiffer
&&
status
.
Contains
(
item
.
Status
.
Value
)
&&
(
IsOpen
==
true
?
status
.
Contains
(
item
.
NursingDeptStatus
.
Value
):
true
))
else
{
{
var
promptSecond
=
_mapper
.
Map
<
IssuedPromptResponse
>(
item
);
var
promptSecond
=
_mapper
.
Map
<
IssuedPromptResponse
>(
item
);
promptSecond
.
StatusRemake
=
$@"已提交或已审核科室实发绩效变更驳回,原金额:
{
item
.
RealGiveFee
??
0
}
"
;
promptSecond
.
StatusRemake
=
$@"未提交科室实发绩效变更,原金额:
{
item
.
RealGiveFee
??
0
:
0.
##
}
"
;
promptSecond
.
IssueStatus
=
2
;
promptSecond
.
RealGiveFee
=
item
.
PreRealGiveFee
;
promptSecond
.
RealGiveFee
=
item
.
PreRealGiveFee
;
promptSecond
.
IssueStatus
=
3
;
promptSecond
.
Status
=
4
;
promptSecond
.
Remark
=
"科室绩效结果发生变更,需要重新提交"
;
if
(
IsOpen
)
{
promptSecond
.
NursingDeptStatus
=
4
;
promptSecond
.
NursingDeptRemark
=
"科室绩效结果发生变更,需要重新提交"
;
}
promptSeconds
.
Add
(
promptSecond
);
promptSeconds
.
Add
(
promptSecond
);
}
}
else
if
((
item
.
RealGiveFee
??
0
)
>=
0
&&
(
item
.
PreRealGiveFee
??
0
)
==
0
)
}
else
if
((
item
.
PreRealGiveFee
??
0
)
==
0
)
{
{
var
promptSecond
=
_mapper
.
Map
<
IssuedPromptResponse
>(
item
);
var
promptSecond
=
_mapper
.
Map
<
IssuedPromptResponse
>(
item
);
promptSecond
.
StatusRemake
=
""
;
promptSecond
.
StatusRemake
=
$"科室下发金额:
{
item
.
PreRealGiveFee
??
0
:
0.
##
}
,原金额:
{
item
.
RealGiveFee
??
0
:
0.
##
}
"
;
promptSecond
.
RealGiveFee
=
item
.
PreRealGiveFee
;
promptSecond
.
IssueStatus
=
1
;
promptSecond
.
IssueStatus
=
1
;
promptSeconds
.
Add
(
promptSecond
);
promptSeconds
.
Add
(
promptSecond
);
}
}
}
}
promptSeconds
.
ForEach
(
item
=>
item
.
RealGiveFee
=
item
.
RealGiveFee
.
HasValue
?
item
.
RealGiveFee
.
Value
:
0
);
return
promptSeconds
;
if
(!
string
.
IsNullOrEmpty
(
request
.
SearchQuery
))
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
(
promptSeconds
.
Any
(
t
=>
t
.
IssueStatus
!=
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
>();
updSeconds
.
ToList
().
ForEach
(
t
=>
{
var
second
=
updSecondQuery
.
FirstOrDefault
(
c
=>
c
.
Id
==
t
.
Id
);
t
.
RealGiveFee
=
t
.
PreRealGiveFee
;
t
.
Status
=
second
.
Status
;
t
.
Remark
=
second
.
Remark
;
t
.
NursingDeptStatus
=
second
.
NursingDeptStatus
;
t
.
NursingDeptRemark
=
second
.
NursingDeptRemark
;
});
perforAgsecondallotRepository
.
UpdateRange
(
updSeconds
.
ToArray
());
}
if
(
promptSeconds
.
Any
(
t
=>
t
.
IssueStatus
==
1
))
{
//删除
var
delSecondQuery
=
promptSeconds
.
Where
(
t
=>
t
.
IssueStatus
==
1
);
var
delSecond
=
secondList
.
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
());
}
isIssued
=
true
;
}
return
promptSeconds
.
OrderBy
(
t
=>
t
.
IssueStatus
).
ToList
();
}
}
}
}
}
}
performance/Performance.Services/AllotService.cs
View file @
56d78a8f
...
@@ -450,7 +450,7 @@ public void Generate(per_allot allot)
...
@@ -450,7 +450,7 @@ public void Generate(per_allot allot)
//logManageService.WriteMsg("正在生成绩效", "保存预留绩效金额", 1, allot.ID, "ReceiveMessage", true);
//logManageService.WriteMsg("正在生成绩效", "保存预留绩效金额", 1, allot.ID, "ReceiveMessage", true);
//resultComputeService.SaveReserved(allot, allot.HospitalId);
//resultComputeService.SaveReserved(allot, allot.HospitalId);
// 科室下发
// 科室
创建但不
下发
resultComputeService
.
GenerateSecondAllot
(
allot
);
resultComputeService
.
GenerateSecondAllot
(
allot
);
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
GenerateAccomplish
,
EnumHelper
.
GetDescription
(
AllotStates
.
GenerateAccomplish
),
generate
);
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
GenerateAccomplish
,
EnumHelper
.
GetDescription
(
AllotStates
.
GenerateAccomplish
),
generate
);
...
@@ -465,7 +465,6 @@ public void Generate(per_allot allot)
...
@@ -465,7 +465,6 @@ public void Generate(per_allot allot)
//logManageService.WriteMsg("正在生成报表数据", $"报表数据生成完成;受影响:{res}行", 1, allot.ID, "ReceiveMessage", true);
//logManageService.WriteMsg("正在生成报表数据", $"报表数据生成完成;受影响:{res}行", 1, allot.ID, "ReceiveMessage", true);
//reportService.ExecProc("call proc_report_performance(@hospitalid, @year, @month);", new { allot.HospitalId, allot.Year, allot.Month });
//reportService.ExecProc("call proc_report_performance(@hospitalid, @year, @month);", new { allot.HospitalId, allot.Year, allot.Month });
////发送邮件
////发送邮件
//logManageService.WriteMsg("正在发送邮件", "正在发送邮件", 1, allot.ID, "ReceiveMessage", true);
//logManageService.WriteMsg("正在发送邮件", "正在发送邮件", 1, allot.ID, "ReceiveMessage", true);
//SendEmail(allot, mail, 1, time);
//SendEmail(allot, mail, 1, time);
...
@@ -487,8 +486,15 @@ public void Generate(per_allot allot)
...
@@ -487,8 +486,15 @@ public void Generate(per_allot allot)
/// <param name="allot"></param>
/// <param name="allot"></param>
public
void
GenerateReport
(
per_allot
allot
)
public
void
GenerateReport
(
per_allot
allot
)
{
{
try
{
reportService
.
ExecProc
(
"call proc_report_performance(@hospitalid, @year, @month);"
,
new
{
allot
.
HospitalId
,
allot
.
Year
,
allot
.
Month
});
reportService
.
ExecProc
(
"call proc_report_performance(@hospitalid, @year, @month);"
,
new
{
allot
.
HospitalId
,
allot
.
Year
,
allot
.
Month
});
}
}
catch
(
Exception
ex
)
{
_logger
.
LogError
(
$"
{
allot
.
Year
}
年
{
allot
.
Month
}
月绩效报表生成失败。 allotid:
{
allot
.
ID
}
。"
+
ex
.
Message
);
}
}
/// <summary>
/// <summary>
/// 验证科室核算单元、工号
/// 验证科室核算单元、工号
...
...
performance/Performance.Services/ComputeService.cs
View file @
56d78a8f
...
@@ -2123,12 +2123,12 @@ public class ComputeConfig
...
@@ -2123,12 +2123,12 @@ public class ComputeConfig
new
cof_alias
{
Alias
=
"员工号"
,
Name
=
nameof
(
view_allot_sign_emp
.
JobNumber
),
States
=
1
},
new
cof_alias
{
Alias
=
"员工号"
,
Name
=
nameof
(
view_allot_sign_emp
.
JobNumber
),
States
=
1
},
new
cof_alias
{
Alias
=
"人员姓名"
,
Name
=
nameof
(
view_allot_sign_emp
.
EmployeeName
),
States
=
1
},
new
cof_alias
{
Alias
=
"人员姓名"
,
Name
=
nameof
(
view_allot_sign_emp
.
EmployeeName
),
States
=
1
},
new
cof_alias
{
Alias
=
"职
务"
,
Name
=
nameof
(
view_allot_sign_emp
.
JobTitle
),
States
=
1
},
new
cof_alias
{
Alias
=
"职
称"
,
Name
=
nameof
(
view_allot_sign_emp
.
TitlePosition
),
States
=
1
},
new
cof_alias
{
Alias
=
"批次"
,
Name
=
nameof
(
view_allot_sign_emp
.
Batch
),
States
=
1
},
new
cof_alias
{
Alias
=
"批次"
,
Name
=
nameof
(
view_allot_sign_emp
.
Batch
),
States
=
1
},
new
cof_alias
{
Alias
=
"银行卡号"
,
Name
=
nameof
(
view_allot_sign_emp
.
BankCard
),
States
=
1
},
new
cof_alias
{
Alias
=
"银行卡号"
,
Name
=
nameof
(
view_allot_sign_emp
.
BankCard
),
States
=
1
},
new
cof_alias
{
Alias
=
"正式/临聘"
,
Name
=
nameof
(
view_allot_sign_emp
.
JobCategory
),
States
=
1
},
new
cof_alias
{
Alias
=
"正式/临聘"
,
Name
=
nameof
(
view_allot_sign_emp
.
JobCategory
),
States
=
1
},
//new cof_alias{ Alias = "职务", Name = nameof(view_allot_sign_emp.Duty), States = 1},
//new cof_alias{ Alias = "职务", Name = nameof(view_allot_sign_emp.Duty), States = 1},
new
cof_alias
{
Alias
=
"职
称"
,
Name
=
nameof
(
view_allot_sign_emp
.
TitlePosition
),
States
=
1
},
new
cof_alias
{
Alias
=
"职
务"
,
Name
=
nameof
(
view_allot_sign_emp
.
Duty
),
States
=
1
},
new
cof_alias
{
Alias
=
"调节后业绩绩效"
,
Name
=
nameof
(
view_allot_sign_emp
.
PerforSumFee
),
States
=
1
},
new
cof_alias
{
Alias
=
"调节后业绩绩效"
,
Name
=
nameof
(
view_allot_sign_emp
.
PerforSumFee
),
States
=
1
},
new
cof_alias
{
Alias
=
"调节后实发管理绩效"
,
Name
=
nameof
(
view_allot_sign_emp
.
PerforManagementFee
),
States
=
1
},
new
cof_alias
{
Alias
=
"调节后实发管理绩效"
,
Name
=
nameof
(
view_allot_sign_emp
.
PerforManagementFee
),
States
=
1
},
...
...
performance/Performance.Services/ExtractExcelService/DictionaryService.cs
View file @
56d78a8f
...
@@ -232,7 +232,8 @@ private void HisData(per_allot allot, sys_hospitalconfig config, his_script scri
...
@@ -232,7 +232,8 @@ private void HisData(per_allot allot, sys_hospitalconfig config, his_script scri
var
data
=
queryService
.
QueryData
<
HisData
>(
config
,
script
.
ExecScript
,
allot
,
isSingle
);
var
data
=
queryService
.
QueryData
<
HisData
>(
config
,
script
.
ExecScript
,
allot
,
isSingle
);
if
(
data
==
null
||
!
data
.
Any
())
return
;
if
(
data
==
null
||
!
data
.
Any
())
return
;
var
hisdata
=
hisdataRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allot
.
ID
&&
t
.
SourceType
==
script
.
SourceType
&&
t
.
Category
==
script
.
Category
);
var
hisdata
=
hisdataRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
allot
.
HospitalId
&&
t
.
Year
==
allot
.
Year
&&
t
.
Month
==
allot
.
Month
&&
t
.
SourceType
==
script
.
SourceType
&&
t
.
Category
==
script
.
Category
);
if
(
hisdata
!=
null
&&
hisdata
.
Any
())
if
(
hisdata
!=
null
&&
hisdata
.
Any
())
{
{
hisdataRepository
.
RemoveRange
(
hisdata
.
ToArray
());
hisdataRepository
.
RemoveRange
(
hisdata
.
ToArray
());
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
56d78a8f
...
@@ -1450,7 +1450,7 @@ private List<ag_secondallot> GetNotAuditSeconds(int hospitalId, ag_workload_type
...
@@ -1450,7 +1450,7 @@ private List<ag_secondallot> GetNotAuditSeconds(int hospitalId, ag_workload_type
/**
/**
* 添加数据时注意避免给已经提交过的数据添加,否则会造成提交时的数据和显示数据不一致
* 添加数据时注意避免给已经提交过的数据添加,否则会造成提交时的数据和显示数据不一致
*/
*/
return
agsecondallotRepository
.
GetEntities
(
t
=>
allots
.
Select
(
w
=>
w
.
ID
).
Contains
(
t
.
AllotId
.
Value
)
&&
t
.
Department
==
type
.
Department
&&
t
.
UnitType
==
type
.
UnitType
&&
!
IsAudit
(
t
.
Status
))
??
seconds
;
return
agsecondallotRepository
.
GetEntities
(
t
=>
allots
.
Select
(
w
=>
w
.
ID
).
Contains
(
t
.
AllotId
.
Value
)
&&
t
.
Department
==
type
.
Department
&&
t
.
UnitType
==
type
.
UnitType
&&
!
new
int
[]
{
2
,
3
}.
Contains
(
t
.
Status
??
1
))
??
seconds
;
}
}
/// <summary>
/// <summary>
...
...
performance/Performance.Services/UnitTypeUtil.cs
View file @
56d78a8f
...
@@ -31,6 +31,16 @@ public static bool IsOffice(string unit)
...
@@ -31,6 +31,16 @@ public static bool IsOffice(string unit)
}
}
/// <summary>
/// <summary>
/// 获得标准名 行政后勤/工勤
/// </summary>
/// <param name="unit"></param>
/// <returns></returns>
public
static
string
GetOffice
(
string
unit
)
{
return
string
.
IsNullOrEmpty
(
unit
)
?
""
:
unit
.
Replace
(
"行政后勤"
,
"行政工勤"
);
}
/// <summary>
/// 核算单元类型是否相同
/// 核算单元类型是否相同
/// </summary>
/// </summary>
/// <param name="left"></param>
/// <param name="left"></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