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
fdcbd814
Commit
fdcbd814
authored
Mar 31, 2021
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生成绩效结束后,调用存储过程
parent
6d0fa74c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
3 deletions
+38
-3
performance/Performance.Repository/PerforPerAllotRepository.cs
+15
-0
performance/Performance.Services/AllotService.cs
+5
-3
performance/Performance.Services/ReportService.cs
+18
-0
No files found.
performance/Performance.Repository/PerforPerAllotRepository.cs
View file @
fdcbd814
...
@@ -30,6 +30,21 @@ public bool UpdateAllotStates(int allotId, int states, string remark, int genera
...
@@ -30,6 +30,21 @@ public bool UpdateAllotStates(int allotId, int states, string remark, int genera
}
}
/// <summary>
/// <summary>
/// 执行存储过程
/// </summary>
/// <param name="execsql"></param>
/// <param name="param"></param>
/// <returns></returns>
public
bool
ExecProc
(
string
execsql
,
object
param
)
{
using
(
var
connection
=
context
.
Database
.
GetDbConnection
())
{
Execute
(
execsql
,
param
);
}
return
true
;
}
/// <summary>
/// 只支持EXCEL抽取报表数据
/// 只支持EXCEL抽取报表数据
/// </summary>
/// </summary>
/// <param name="import"></param>
/// <param name="import"></param>
...
...
performance/Performance.Services/AllotService.cs
View file @
fdcbd814
...
@@ -442,9 +442,11 @@ public void Generate(per_allot allot, string mail)
...
@@ -442,9 +442,11 @@ public void Generate(per_allot allot, string mail)
perforCofdirectorRepository
.
SupplementaryData
(
allot
.
ID
);
perforCofdirectorRepository
.
SupplementaryData
(
allot
.
ID
);
logManageService
.
WriteMsg
(
"正在生成报表数据"
,
"正在生成报表数据"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
logManageService
.
WriteMsg
(
"正在生成报表数据"
,
"正在生成报表数据"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
var
res
=
reportService
.
ImportData
(
allot
);
//var res = reportService.ImportData(allot);
var
flag
=
reportService
.
UpdateData
(
allot
);
//var flag = reportService.UpdateData(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
});
////发送邮件
////发送邮件
//logManageService.WriteMsg("正在发送邮件", "正在发送邮件", 1, allot.ID, "ReceiveMessage", true);
//logManageService.WriteMsg("正在发送邮件", "正在发送邮件", 1, allot.ID, "ReceiveMessage", true);
...
...
performance/Performance.Services/ReportService.cs
View file @
fdcbd814
using
Microsoft.Extensions.Logging
;
using
Microsoft.Extensions.Logging
;
using
Performance.DtoModels
;
using
Performance.DtoModels
;
using
Performance.EntityModels
;
using
Performance.EntityModels
;
using
Performance.Infrastructure
;
using
Performance.Repository
;
using
Performance.Repository
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
...
@@ -384,5 +385,22 @@ public List<PerReport> MenuReport(ReportRequest request)
...
@@ -384,5 +385,22 @@ public List<PerReport> MenuReport(ReportRequest request)
return
report
;
return
report
;
}
}
/// <summary>
/// 执行存储过程
/// </summary>
/// <param name="allot"></param>
/// <returns></returns>
public
void
ExecProc
(
string
execsql
,
object
param
)
{
try
{
perforPerallotRepository
.
Execute
(
execsql
,
param
);
}
catch
(
Exception
ex
)
{
logger
.
LogError
(
$"执行存储过程时发生异常,sql:
{
execsql
}
;参数:
{
JsonHelper
.
Serialize
(
param
)}
;异常:
{
ex
.
Message
}
;"
);
}
}
}
}
}
}
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