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
d30ad5a2
Commit
d30ad5a2
authored
Jan 28, 2023
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '渝北事务冲突修复' into develop
parents
514b3f85
9d103148
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
30 deletions
+50
-30
performance/Performance.Services/AllotCompute/ResultComputeService.cs
+2
-2
performance/Performance.Services/AllotService.cs
+17
-9
performance/Performance.Services/DapperService.cs
+29
-17
performance/Performance.Services/SecondAllotService.cs
+2
-2
No files found.
performance/Performance.Services/AllotCompute/ResultComputeService.cs
View file @
d30ad5a2
...
@@ -700,8 +700,8 @@ public bool IssuedChangeSecond(per_allot allot, List<ag_secondallot> secondList)
...
@@ -700,8 +700,8 @@ public bool IssuedChangeSecond(per_allot allot, List<ag_secondallot> secondList)
second
.
NursingDeptRemark
=
"科室绩效结果发生变更,需要重新提交"
;
second
.
NursingDeptRemark
=
"科室绩效结果发生变更,需要重新提交"
;
}
}
_service
.
FreezeAllotSync
(
allot
.
ID
);
_service
.
FreezeAllotSync
(
allot
.
ID
);
_service
.
SecondUseTempRestore
Sync
();
_service
.
SecondUseTempRestore
();
_service
.
RestoreSecondAllot
Async
();
_service
.
RestoreSecondAllot
();
}
}
}
}
perforAgsecondallotRepository
.
UpdateRange
(
updSeconds
.
ToArray
());
perforAgsecondallotRepository
.
UpdateRange
(
updSeconds
.
ToArray
());
...
...
performance/Performance.Services/AllotService.cs
View file @
d30ad5a2
...
@@ -353,7 +353,7 @@ public void Generate(per_allot allot)
...
@@ -353,7 +353,7 @@ public void Generate(per_allot allot)
// return;
// return;
//}
//}
}
}
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
正在生成绩效
,
EnumHelper
.
GetDescription
(
AllotStates
.
正在生成绩效
));
_service
.
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
正在生成绩效
,
EnumHelper
.
GetDescription
(
AllotStates
.
正在生成绩效
));
//保底绩效计算需分两次进行;
//保底绩效计算需分两次进行;
//第一次计算包含(保底绩效临床医生人均绩效、保底绩效医技医生人均绩效、保底绩效护士人均绩效)得出科室业绩绩效;
//第一次计算包含(保底绩效临床医生人均绩效、保底绩效医技医生人均绩效、保底绩效护士人均绩效)得出科室业绩绩效;
...
@@ -450,17 +450,25 @@ public void Generate(per_allot allot)
...
@@ -450,17 +450,25 @@ 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);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"验证科室核算单元&工号"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
// 验证科室核算单元、工号
_allotRepository
.
AccoungtingVerify
(
allot
.
ID
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"待下发科室准备"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
// 科室创建但不下发
// 科室创建但不下发
resultComputeService
.
GenerateSecondAllot
(
allot
);
resultComputeService
.
GenerateSecondAllot
(
allot
);
_service
.
SecondUseTempRestore
();
_service
.
RestoreSecondAllot
();
_service
.
ClearAllot
();
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"绩效数据存储"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
_service
.
FreezeAllotSync
(
allot
.
ID
);
_service
.
FreezeAllotSync
(
allot
.
ID
);
_service
.
SecondUseTempRestoreSync
();
_service
.
RestoreSecondAllotAsync
();
_service
.
ClearAllotSync
();
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
绩效结果解析成功
,
EnumHelper
.
GetDescription
(
AllotStates
.
绩效结果解析成功
),
generate
);
logManageService
.
WriteMsg
(
"绩效生成结束"
,
"绩效生成成功"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
_service
.
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
绩效结果解析成功
,
EnumHelper
.
GetDescription
(
AllotStates
.
绩效结果解析成功
),
generate
);
logManageService
.
WriteMsg
(
"额外操作"
,
"补充费用占比类型"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
perforCofdirectorRepository
.
SupplementaryData
(
allot
.
ID
);
perforCofdirectorRepository
.
SupplementaryData
(
allot
.
ID
);
// 验证科室核算单元、工号
logManageService
.
WriteMsg
(
"额外操作"
,
"补全支出费用类别"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
_allotRepository
.
AccoungtingVerify
(
allot
.
ID
);
//补全支出费用类别
//补全支出费用类别
configService
.
SaveDrugtypeDisburse
(
allot
.
ID
);
configService
.
SaveDrugtypeDisburse
(
allot
.
ID
);
//logManageService.WriteMsg("正在生成报表数据", "正在生成报表数据", 1, allot.ID, "ReceiveMessage", true);
//logManageService.WriteMsg("正在生成报表数据", "正在生成报表数据", 1, allot.ID, "ReceiveMessage", true);
...
@@ -473,12 +481,12 @@ public void Generate(per_allot allot)
...
@@ -473,12 +481,12 @@ public void Generate(per_allot allot)
//logManageService.WriteMsg("正在发送邮件", "正在发送邮件", 1, allot.ID, "ReceiveMessage", true);
//logManageService.WriteMsg("正在发送邮件", "正在发送邮件", 1, allot.ID, "ReceiveMessage", true);
//SendEmail(allot, mail, 1, time);
//SendEmail(allot, mail, 1, time);
//logdbug.Add(allot.ID, "绩效开始执行", "绩效生成成功");
//logdbug.Add(allot.ID, "绩效开始执行", "绩效生成成功");
logManageService
.
WriteMsg
(
"
绩效生成结束"
,
"绩效生成成功
"
,
5
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
logManageService
.
WriteMsg
(
"
操作结束"
,
"操作结束
"
,
5
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
logManageService
.
WriteMsg
(
"绩效生成失败"
,
ex
.
Message
,
4
,
allot
.
ID
,
"ReceiveMessage"
);
logManageService
.
WriteMsg
(
"绩效生成失败"
,
ex
.
Message
,
4
,
allot
.
ID
,
"ReceiveMessage"
);
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
绩效解析失败
,
EnumHelper
.
GetDescription
(
AllotStates
.
绩效解析失败
));
_service
.
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
绩效解析失败
,
EnumHelper
.
GetDescription
(
AllotStates
.
绩效解析失败
));
//SendEmail(allot, mail, 2, time);
//SendEmail(allot, mail, 2, time);
//throw ex;
//throw ex;
}
}
...
...
performance/Performance.Services/DapperService.cs
View file @
d30ad5a2
...
@@ -30,7 +30,15 @@ public DapperService(IOptions<AppConnection> options)
...
@@ -30,7 +30,15 @@ public DapperService(IOptions<AppConnection> options)
/// <returns></returns>
/// <returns></returns>
public
void
FreezeAllotSync
(
int
allotId
)
public
void
FreezeAllotSync
(
int
allotId
)
{
{
Task
.
Factory
.
StartNew
(()
=>
FreezeAllot
(
allotId
));
Task
.
Factory
.
StartNew
(()
=>
{
using
(
var
connection
=
new
MySqlConnection
(
_options
.
Value
.
PerformanceConnectionString
))
{
if
(
connection
.
State
!=
ConnectionState
.
Open
)
connection
.
Open
();
string
sql
=
$@"call proc_freeze_allot(
{
allotId
}
)"
;
connection
.
Execute
(
sql
,
commandTimeout
:
60
*
60
);
}
});
}
}
/// <summary>
/// <summary>
...
@@ -80,25 +88,24 @@ decimal QueryDiff(int allotId)
...
@@ -80,25 +88,24 @@ decimal QueryDiff(int allotId)
/// 二次分配模板修复
/// 二次分配模板修复
/// </summary>
/// </summary>
/// <param name="allotId"></param>
/// <param name="allotId"></param>
public
void
SecondUseTempRestore
Sync
()
public
void
SecondUseTempRestore
()
{
{
Task
.
Factory
.
StartNew
(()
=>
try
{
{
using
(
var
connection
=
new
MySqlConnection
(
_options
.
Value
.
PerformanceConnectionString
))
using
(
var
connection
=
new
MySqlConnection
(
_options
.
Value
.
PerformanceConnectionString
))
{
{
if
(
connection
.
State
!=
ConnectionState
.
Open
)
connection
.
Open
();
if
(
connection
.
State
!=
ConnectionState
.
Open
)
connection
.
Open
();
try
{
string
sql
=
$@"call proc_second_restore()"
;
string
sql
=
$@"call proc_second_restore()"
;
connection
.
Execute
(
sql
,
commandTimeout
:
60
*
60
);
connection
.
Execute
(
sql
,
commandTimeout
:
60
*
60
);
}
}
}
catch
(
Exception
)
catch
(
Exception
)
{
{
throw
;
throw
;
}
}
}
}
});
}
#
endregion
#
endregion
#
region
清理无效绩效数据
#
region
清理无效绩效数据
...
@@ -106,25 +113,22 @@ public void SecondUseTempRestoreSync()
...
@@ -106,25 +113,22 @@ public void SecondUseTempRestoreSync()
/// 清理无效绩效数据
/// 清理无效绩效数据
/// </summary>
/// </summary>
/// <param name="allotId"></param>
/// <param name="allotId"></param>
public
void
ClearAllot
Sync
()
public
void
ClearAllot
()
{
{
Task
.
Factory
.
StartNew
(()
=>
try
{
{
using
(
var
connection
=
new
MySqlConnection
(
_options
.
Value
.
PerformanceConnectionString
))
using
(
var
connection
=
new
MySqlConnection
(
_options
.
Value
.
PerformanceConnectionString
))
{
{
if
(
connection
.
State
!=
ConnectionState
.
Open
)
connection
.
Open
();
if
(
connection
.
State
!=
ConnectionState
.
Open
)
connection
.
Open
();
try
{
string
sql
=
$@"call proc_clear_allot()"
;
string
sql
=
$@"call proc_clear_allot()"
;
connection
.
Execute
(
sql
,
commandTimeout
:
60
*
60
);
connection
.
Execute
(
sql
,
commandTimeout
:
60
*
60
);
}
}
}
catch
(
Exception
)
catch
(
Exception
)
{
{
throw
;
throw
;
}
}
}
}
});
}
#
endregion
#
endregion
public
void
SyncDataToResult
(
int
allotId
)
public
void
SyncDataToResult
(
int
allotId
)
...
@@ -252,9 +256,7 @@ Deptdic GetDeptdic(List<per_dept_dic> dics, string department, string hISDeptNam
...
@@ -252,9 +256,7 @@ Deptdic GetDeptdic(List<per_dept_dic> dics, string department, string hISDeptNam
/// 科室改名历史数据处理
/// 科室改名历史数据处理
/// </summary>
/// </summary>
/// <param name="allotId"></param>
/// <param name="allotId"></param>
public
Task
RestoreSecondAllotAsync
()
public
void
RestoreSecondAllot
()
{
return
Task
.
Factory
.
StartNew
(()
=>
{
{
using
(
var
connection
=
new
MySqlConnection
(
_options
.
Value
.
PerformanceConnectionString
))
using
(
var
connection
=
new
MySqlConnection
(
_options
.
Value
.
PerformanceConnectionString
))
{
{
...
@@ -269,7 +271,6 @@ public Task RestoreSecondAllotAsync()
...
@@ -269,7 +271,6 @@ public Task RestoreSecondAllotAsync()
throw
;
throw
;
}
}
}
}
});
}
}
public
IEnumerable
<
dynamic
>
QuerySecondPrintHead
(
int
allotId
,
string
unitType
,
string
accountingUnit
)
public
IEnumerable
<
dynamic
>
QuerySecondPrintHead
(
int
allotId
,
string
unitType
,
string
accountingUnit
)
...
@@ -312,5 +313,16 @@ public IEnumerable<dynamic> QueryView(string viewName,int allotID)
...
@@ -312,5 +313,16 @@ public IEnumerable<dynamic> QueryView(string viewName,int allotID)
return
connection
.
Query
(
sql
,
new
{
allotID
},
commandTimeout
:
60
*
60
);
return
connection
.
Query
(
sql
,
new
{
allotID
},
commandTimeout
:
60
*
60
);
}
}
}
}
public
int
UpdateAllotStates
(
int
allotId
,
int
states
,
string
remark
,
int
generate
=
0
)
{
using
(
var
connection
=
new
MySqlConnection
(
_options
.
Value
.
PerformanceConnectionString
))
{
if
(
connection
.
State
!=
ConnectionState
.
Open
)
connection
.
Open
();
string
sql
=
$@"update per_allot set States=@states,Remark=@remark,Generate = @generate where Id = @allotId"
;
return
connection
.
Execute
(
sql
,
new
{
allotId
,
states
,
remark
,
generate
},
commandTimeout
:
60
*
60
);
}
}
}
}
}
}
performance/Performance.Services/SecondAllotService.cs
View file @
d30ad5a2
...
@@ -1740,8 +1740,8 @@ public bool ConfirmAudit(int userId, SecondAuditRequest request)
...
@@ -1740,8 +1740,8 @@ public bool ConfirmAudit(int userId, SecondAuditRequest request)
agsecondallotRepository
.
DeleteComputeHistory
(
request
.
SecondId
);
agsecondallotRepository
.
DeleteComputeHistory
(
request
.
SecondId
);
if
(
request
.
IsPass
==
1
)
if
(
request
.
IsPass
==
1
)
_service
.
FreezeAllotSync
(
second
.
AllotId
.
Value
);
_service
.
FreezeAllotSync
(
second
.
AllotId
.
Value
);
_service
.
SecondUseTempRestore
Sync
();
_service
.
SecondUseTempRestore
();
_service
.
RestoreSecondAllot
Async
();
_service
.
RestoreSecondAllot
();
return
result
;
return
result
;
}
}
...
...
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