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
c2ff7db2
Commit
c2ff7db2
authored
Jun 06, 2019
by
李承祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改数据提取中 获取核算单元的sql
parent
f0358673
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
performance/Performance.Repository/Repository/PerforImdataRepository.cs
+13
-4
performance/Performance.Services/ExtractService.cs
+1
-3
No files found.
performance/Performance.Repository/Repository/PerforImdataRepository.cs
View file @
c2ff7db2
...
...
@@ -18,11 +18,20 @@ public PerforImdataRepository(PerformanceDbContext context) : base(context)
{
}
public
IEnumerable
<
im_data
>
GetAccountingUnit
(
List
<
int
>
sheetList
,
List
<
string
>
deptList
,
List
<
int
>
allotList
)
/// <summary>
/// 获取核算单元
/// </summary>
/// <param name="deptList">科室列表</param>
/// <param name="hospitalid">医院id</param>
/// <param name="sheetType">sheet模板类型</param>
/// <returns></returns>
public
IEnumerable
<
im_data
>
GetAccountingUnit
(
int
hospitalid
,
int
sheettype
,
List
<
string
>
deptList
)
{
string
sql
=
"select distinct accountingUnit,department,unittype from im_data "
+
"where sheetid in @sheetList and department in @deptList and allotid in @allotList"
;
return
DapperQuery
(
sql
,
new
{
sheetList
,
deptList
,
allotList
},
1000
*
60
*
5
);
string
sql
=
"select distinct im.accountingUnit,im.department,im.unittype from im_data im "
+
"inner join per_allot allot on im.AllotID = allot.ID "
+
"inner join per_sheet sheet on im.SheetID = sheet.ID "
+
"where allot.hospitalid = @hospitalid and sheet.sheettype = @sheettype and im.department in @deptList"
;
return
DapperQuery
(
sql
,
new
{
hospitalid
,
sheettype
,
deptList
},
1000
*
60
*
5
);
}
}
}
performance/Performance.Services/ExtractService.cs
View file @
c2ff7db2
...
...
@@ -337,9 +337,7 @@ private bool WriteExcel(string newpath, string originalPath, List<PerSheet> shee
//用于查询核算单元
var
deptList
=
dataList
.
Where
(
t
=>
t
.
ColumnName
==
"科室名称"
).
Select
(
t
=>
t
.
Value
.
ToString
()).
Distinct
().
ToList
();
var
sheetIdList
=
perforPersheetRepository
.
GetEntities
(
t
=>
t
.
SheetType
==
(
int
)
sheet
.
SheetType
).
Select
(
t
=>
t
.
ID
).
ToList
();
var
allotIdList
=
perforPerallotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
).
Select
(
t
=>
t
.
ID
).
ToList
();
var
imdata
=
perforImdataRepository
.
GetAccountingUnit
(
sheetIdList
,
deptList
,
allotIdList
);
var
imdata
=
perforImdataRepository
.
GetAccountingUnit
(
hospitalId
,
(
int
)
sheet
.
SheetType
,
deptList
);
//创建数据行
foreach
(
var
pointRow
in
dataList
.
Select
(
t
=>
t
.
RowNumber
).
Distinct
().
OrderBy
(
t
=>
t
))
...
...
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