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
4ee3d9fd
Commit
4ee3d9fd
authored
Jun 08, 2022
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
清理无效数据
parent
f7c427b1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
15 deletions
+35
-15
performance/Performance.Services/AllotService.cs
+2
-1
performance/Performance.Services/DapperService.cs
+33
-14
No files found.
performance/Performance.Services/AllotService.cs
View file @
4ee3d9fd
...
@@ -447,9 +447,10 @@ public void Generate(per_allot allot)
...
@@ -447,9 +447,10 @@ public void Generate(per_allot allot)
//resultComputeService.SaveReserved(allot, allot.HospitalId);
//resultComputeService.SaveReserved(allot, allot.HospitalId);
// 科室创建但不下发
// 科室创建但不下发
resultComputeService
.
GenerateSecondAllot
(
allot
);
resultComputeService
.
GenerateSecondAllot
(
allot
);
_service
.
FreezeAllotSync
(
allot
.
ID
);
_service
.
FreezeAllotSync
(
allot
.
ID
);
_service
.
SecondUseTempRestoreSync
();
_service
.
SecondUseTempRestoreSync
();
_service
.
ClearAllotSync
();
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
绩效结果解析成功
,
EnumHelper
.
GetDescription
(
AllotStates
.
绩效结果解析成功
),
generate
);
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
绩效结果解析成功
,
EnumHelper
.
GetDescription
(
AllotStates
.
绩效结果解析成功
),
generate
);
perforCofdirectorRepository
.
SupplementaryData
(
allot
.
ID
);
perforCofdirectorRepository
.
SupplementaryData
(
allot
.
ID
);
...
...
performance/Performance.Services/DapperService.cs
View file @
4ee3d9fd
...
@@ -58,29 +58,48 @@ public void FreezeAllot(int allotId)
...
@@ -58,29 +58,48 @@ public void FreezeAllot(int allotId)
/// <param name="allotId"></param>
/// <param name="allotId"></param>
public
void
SecondUseTempRestoreSync
()
public
void
SecondUseTempRestoreSync
()
{
{
Task
.
Factory
.
StartNew
(()
=>
SecondUseTempRestore
());
Task
.
Factory
.
StartNew
(()
=>
{
using
(
var
connection
=
new
MySqlConnection
(
_options
.
Value
.
PerformanceConnectionString
))
{
if
(
connection
.
State
!=
ConnectionState
.
Open
)
connection
.
Open
();
try
{
string
sql
=
$@"call proc_second_restore()"
;
connection
.
Execute
(
sql
,
commandTimeout
:
60
*
60
);
}
catch
(
Exception
)
{
throw
;
}
}
});
}
}
#
endregion
#
region
清理无效绩效数据
/// <summary>
/// <summary>
///
数据静态存储
///
清理无效绩效数据
/// </summary>
/// </summary>
/// <param name="allotId"></param>
/// <param name="allotId"></param>
/// <returns></returns>
public
void
ClearAllotSync
()
public
void
SecondUseTempRestore
()
{
{
using
(
var
connection
=
new
MySqlConnection
(
_options
.
Value
.
PerformanceConnectionString
))
Task
.
Factory
.
StartNew
(()
=>
{
{
if
(
connection
.
State
!=
ConnectionState
.
Open
)
connection
.
Open
();
using
(
var
connection
=
new
MySqlConnection
(
_options
.
Value
.
PerformanceConnectionString
))
try
{
{
string
sql
=
$@"call proc_second_restore()"
;
if
(
connection
.
State
!=
ConnectionState
.
Open
)
connection
.
Open
();
connection
.
Execute
(
sql
,
commandTimeout
:
60
*
60
);
try
{
string
sql
=
$@"call proc_clear_allot()"
;
connection
.
Execute
(
sql
,
commandTimeout
:
60
*
60
);
}
catch
(
Exception
)
{
throw
;
}
}
}
catch
(
Exception
)
});
{
throw
;
}
}
}
}
#
endregion
#
endregion
}
}
...
...
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