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
eaae5321
Commit
eaae5321
authored
Sep 27, 2019
by
李承祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报表sql修改
parent
08a9f0b6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
performance/Performance.Repository/PerforReportRepository .cs
+8
-8
No files found.
performance/Performance.Repository/PerforReportRepository .cs
View file @
eaae5321
...
@@ -64,11 +64,11 @@ public List<PerReport> InpatFeeAvg(int hospitalId, List<string> date)
...
@@ -64,11 +64,11 @@ public List<PerReport> InpatFeeAvg(int hospitalId, List<string> date)
/// <returns></returns>
/// <returns></returns>
public
List
<
PerReport
>
Medicine
(
int
hospitalId
,
List
<
string
>
date
)
public
List
<
PerReport
>
Medicine
(
int
hospitalId
,
List
<
string
>
date
)
{
{
string
sql
=
@"select accountingunit x,concat(year,'-',lpad(month,2,'0')) y,round((sum(if(
dt.TypeName in
string
sql
=
@"select accountingunit x,concat(year,'-',lpad(month,2,'0')) y,round((sum(if(
cd.id is null,0,cellvalue)) / sum(cellvalue))*100,2) value
(select charge from cof_drugtype where allotid = aot.id and chargetype = '药品'),cellvalue,0)) / sum(cellvalue))*100,2) value from per_allot aot
from per_allot aot join per_sheet sht on aot.id=sht.allotid join im_data dt on dt.sheetid=sht.id
join per_sheet sht on aot.id=sht.allotid join im_data dt on dt.sheetid=sht.id
where unittype=1 and sheettype=3
left join cof_drugtype cd on cd.allotid=dt.allotid and cd.charge=dt.TypeName and cd.chargetype in ('药品')
where unittype=1 and sheettype=3
and sheetname like '%就诊收入' and ifnull(accountingunit,'') not in ('') and concat(year,'-',lpad(month,2,'0'))
and sheetname like '%就诊收入' and ifnull(accountingunit,'') not in ('') and concat(year,'-',lpad(month,2,'0'))
in @date group by year,month,accountingunit order by y asc,value desc;"
;
in @date
and hospitalid = @hospitalId
group by year,month,accountingunit order by y asc,value desc;"
;
return
DapperQuery
(
sql
,
new
{
hospitalId
,
date
}).
ToList
();
return
DapperQuery
(
sql
,
new
{
hospitalId
,
date
}).
ToList
();
}
}
...
@@ -78,10 +78,10 @@ public List<PerReport> Medicine(int hospitalId, List<string> date)
...
@@ -78,10 +78,10 @@ public List<PerReport> Medicine(int hospitalId, List<string> date)
/// <returns></returns>
/// <returns></returns>
public
List
<
PerReport
>
Income
(
int
hospitalId
,
List
<
string
>
date
)
public
List
<
PerReport
>
Income
(
int
hospitalId
,
List
<
string
>
date
)
{
{
string
sql
=
@"select accountingunit x,concat(year,'-',lpad(month,2,'0')) y,round((sum(if(
dt.TypeName not in
string
sql
=
@"select accountingunit x,concat(year,'-',lpad(month,2,'0')) y,round((sum(if(
cd.id is null,cellvalue,0)) / sum(cellvalue))*100,2) value
(select charge from cof_drugtype where allotid = aot.id),cellvalue,0)) / sum(cellvalue))*100,2) value from per_allot aot
from per_allot aot join per_sheet sht on aot.id=sht.allotid join im_data dt on dt.sheetid=sht.id
join per_sheet sht on aot.id=sht.allotid join im_data dt on dt.sheetid=sht.id where unittype=1 and sheettype=3
left join cof_drugtype cd on cd.allotid=dt.allotid and cd.charge=dt.TypeName and cd.chargetype in ('药品','耗材')
and sheetname like '%就诊收入' and ifnull(accountingunit,'') not in ('') and concat(year,'-',lpad(month,2,'0'))
where unittype=1 and sheettype=3
and sheetname like '%就诊收入' and ifnull(accountingunit,'') not in ('') and concat(year,'-',lpad(month,2,'0'))
in @date and hospitalid = @hospitalId group by year,month,accountingunit order by y asc,value desc;"
;
in @date and hospitalid = @hospitalId group by year,month,accountingunit order by y asc,value desc;"
;
return
DapperQuery
(
sql
,
new
{
hospitalId
,
date
}).
ToList
();
return
DapperQuery
(
sql
,
new
{
hospitalId
,
date
}).
ToList
();
}
}
...
...
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