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
7c42fee2
Commit
7c42fee2
authored
Apr 16, 2021
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改名称、注释部分接口
parent
f6061aaf
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
97 additions
and
109 deletions
+97
-109
performance/Performance.Api/Controllers/ReportController.cs
+23
-23
performance/Performance.Api/wwwroot/Performance.Api.xml
+0
-12
performance/Performance.Repository/PerforPerAllotRepository.cs
+1
-1
performance/Performance.Repository/PerforReportRepository .cs
+26
-26
performance/Performance.Services/ReportService.cs
+47
-47
No files found.
performance/Performance.Api/Controllers/ReportController.cs
View file @
7c42fee2
...
...
@@ -142,29 +142,29 @@ public ApiResponse InpatFeeAvg([CustomizeValidator(RuleSet = "Query"), FromBody]
return
new
ApiResponse
(
ResponseType
.
OK
,
""
,
list
);
}
/// <summary>
/// 科室药占比
/// </summary>
/// <returns></returns>
[
Route
(
"medicine"
)]
[
HttpPost
]
public
ApiResponse
Medicine
([
CustomizeValidator
(
RuleSet
=
"Query"
),
FromBody
]
ReportRequest
request
)
{
var
list
=
reportService
.
Medicine
(
request
.
HospitalId
,
request
.
IsIndex
);
return
new
ApiResponse
(
ResponseType
.
OK
,
""
,
list
);
}
/// <summary>
/// 科室有效收入占比
/// </summary>
/// <returns></returns>
[
Route
(
"income"
)]
[
HttpPost
]
public
ApiResponse
Income
([
CustomizeValidator
(
RuleSet
=
"Query"
),
FromBody
]
ReportRequest
request
)
{
var
list
=
reportService
.
Income
(
request
.
HospitalId
,
request
.
IsIndex
);
return
new
ApiResponse
(
ResponseType
.
OK
,
""
,
list
);
}
///
//
<summary>
///
//
科室药占比
///
//
</summary>
///
//
<returns></returns>
//
[Route("medicine")]
//
[HttpPost]
//
public ApiResponse Medicine([CustomizeValidator(RuleSet = "Query"), FromBody] ReportRequest request)
//
{
//
var list = reportService.Medicine(request.HospitalId, request.IsIndex);
//
return new ApiResponse(ResponseType.OK, "", list);
//
}
///
//
<summary>
///
//
科室有效收入占比
///
//
</summary>
///
//
<returns></returns>
//
[Route("income")]
//
[HttpPost]
//
public ApiResponse Income([CustomizeValidator(RuleSet = "Query"), FromBody] ReportRequest request)
//
{
//
var list = reportService.Income(request.HospitalId, request.IsIndex);
//
return new ApiResponse(ResponseType.OK, "", list);
//
}
/// <summary>
/// 月群体人均绩效
...
...
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
7c42fee2
...
...
@@ -1142,18 +1142,6 @@
</summary>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ReportController.Medicine(Performance.DtoModels.ReportRequest)"
>
<summary>
科室药占比
</summary>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ReportController.Income(Performance.DtoModels.ReportRequest)"
>
<summary>
科室有效收入占比
</summary>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ReportController.AvgPerfor(Performance.DtoModels.ReportRequest)"
>
<summary>
月群体人均绩效
...
...
performance/Performance.Repository/PerforPerAllotRepository.cs
View file @
7c42fee2
...
...
@@ -213,7 +213,7 @@ public IEnumerable<ex_result> QueryIncomeData(int allotid, string source, string
WHERE t1.allotid = @allotid
AND t3.unittype = @unittype
AND t3.accountingunit = @accountingunit
AND
t1.Source like '%
{
source
}
开单%'
AND
(t1.Source like '%
{
source
}
开单%' OR t1.Source like '%
{
source
}
就诊%')
AND T1.IsDelete = 0
ORDER BY t1.doctorname,t1.Category;"
;
return
connection
.
Query
<
ex_result
>(
clear
,
new
{
allotid
,
accountingunit
,
unittype
,
hospitalid
},
commandTimeout
:
60
*
60
);
...
...
performance/Performance.Repository/PerforReportRepository .cs
View file @
7c42fee2
...
...
@@ -59,33 +59,33 @@ public List<PerReport> InpatFeeAvg(int hospitalId, List<string> date)
return
DapperQuery
(
sql
,
new
{
date
,
hospitalId
}).
ToList
();
}
/// <summary>
/// 科室药占比
/// </summary>
/// <returns></returns>
public
List
<
PerReport
>
Medicine
(
int
hospitalId
,
List
<
string
>
date
)
{
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
from per_allot aot join per_sheet sht on aot.id=sht.allotid join im_data dt on dt.sheetid=sht.id
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'))
in @date and hospitalid = @hospitalId group by year,month,accountingunit order by y asc,value desc;"
;
return
DapperQuery
(
sql
,
new
{
hospitalId
,
date
}).
ToList
();
}
//
/// <summary>
//
/// 科室药占比
//
/// </summary>
//
/// <returns></returns>
//
public List<PerReport> Medicine(int hospitalId, List<string> date)
//
{
//
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
//
from per_allot aot join per_sheet sht on aot.id=sht.allotid join im_data dt on dt.sheetid=sht.id
//
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'))
//
in @date and hospitalid = @hospitalId group by year,month,accountingunit order by y asc,value desc;";
//
return DapperQuery(sql, new { hospitalId, date }).ToList();
//
}
/// <summary>
/// 科室有效收入占比
/// </summary>
/// <returns></returns>
public
List
<
PerReport
>
Income
(
int
hospitalId
,
List
<
string
>
date
)
{
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
from per_allot aot join per_sheet sht on aot.id=sht.allotid join im_data dt on dt.sheetid=sht.id
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'))
in @date and hospitalid = @hospitalId group by year,month,accountingunit order by y asc,value desc;"
;
return
DapperQuery
(
sql
,
new
{
hospitalId
,
date
}).
ToList
();
}
//
/// <summary>
//
/// 科室有效收入占比
//
/// </summary>
//
/// <returns></returns>
//
public List<PerReport> Income(int hospitalId, List<string> date)
//
{
//
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
//
from per_allot aot join per_sheet sht on aot.id=sht.allotid join im_data dt on dt.sheetid=sht.id
//
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'))
//
in @date and hospitalid = @hospitalId group by year,month,accountingunit order by y asc,value desc;";
//
return DapperQuery(sql, new { hospitalId, date }).ToList();
//
}
#
region
首页报表
/// <summary>
...
...
performance/Performance.Services/ReportService.cs
View file @
7c42fee2
...
...
@@ -182,53 +182,53 @@ public List<PerReport> InpatFeeAvg(int hospitalId)
return
perforReportRepository
.
InpatFeeAvg
(
hospitalId
,
date
);
}
/// <summary>
/// 科室药占比
/// </summary>
/// <returns></returns>
public
List
<
PerReport
>
Medicine
(
int
hospitalId
,
int
isIndex
)
{
var
states
=
new
List
<
int
>()
{
6
,
8
};
var
allotList
=
perforPerallotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
&&
states
.
Contains
(
t
.
States
));
if
(
allotList
==
null
||
!
allotList
.
Any
())
throw
new
PerformanceException
(
"用户未创建绩效!"
);
var
date
=
new
List
<
string
>();
if
(
isIndex
==
1
)
{
var
allot
=
allotList
.
OrderByDescending
(
t
=>
t
.
Year
).
ThenByDescending
(
t
=>
t
.
Month
).
FirstOrDefault
();
date
.
Add
(
allot
.
Year
+
"-"
+
allot
.
Month
.
ToString
().
PadLeft
(
2
,
'0'
));
}
else
{
date
=
allotList
.
OrderByDescending
(
t
=>
t
.
Year
).
ThenByDescending
(
t
=>
t
.
Month
).
Take
(
6
).
Select
(
t
=>
t
.
Year
+
"-"
+
t
.
Month
.
ToString
().
PadLeft
(
2
,
'0'
)).
ToList
();
}
return
perforReportRepository
.
Medicine
(
hospitalId
,
date
);
}
/// <summary>
/// 科室有效收入占比
/// </summary>
/// <returns></returns>
public
List
<
PerReport
>
Income
(
int
hospitalId
,
int
isIndex
)
{
var
states
=
new
List
<
int
>()
{
6
,
8
};
var
allotList
=
perforPerallotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
&&
states
.
Contains
(
t
.
States
));
if
(
allotList
==
null
||
!
allotList
.
Any
())
throw
new
PerformanceException
(
"用户未创建绩效!"
);
var
date
=
new
List
<
string
>();
if
(
isIndex
==
1
)
{
var
allot
=
allotList
.
OrderByDescending
(
t
=>
t
.
Year
).
ThenByDescending
(
t
=>
t
.
Month
).
FirstOrDefault
();
date
.
Add
(
allot
.
Year
+
"-"
+
allot
.
Month
.
ToString
().
PadLeft
(
2
,
'0'
));
}
else
{
date
=
allotList
.
OrderByDescending
(
t
=>
t
.
Year
).
ThenByDescending
(
t
=>
t
.
Month
).
Take
(
6
).
Select
(
t
=>
t
.
Year
+
"-"
+
t
.
Month
.
ToString
().
PadLeft
(
2
,
'0'
)).
ToList
();
}
return
perforReportRepository
.
Income
(
hospitalId
,
date
);
}
///
//
<summary>
///
//
科室药占比
///
//
</summary>
///
//
<returns></returns>
//
public List<PerReport> Medicine(int hospitalId, int isIndex)
//
{
//
var states = new List<int>() { 6, 8 };
//
var allotList = perforPerallotRepository.GetEntities(t => t.HospitalId == hospitalId && states.Contains(t.States));
//
if (allotList == null || !allotList.Any())
//
throw new PerformanceException("用户未创建绩效!");
//
var date = new List<string>();
//
if (isIndex == 1)
//
{
//
var allot = allotList.OrderByDescending(t => t.Year).ThenByDescending(t => t.Month).FirstOrDefault();
//
date.Add(allot.Year + "-" + allot.Month.ToString().PadLeft(2, '0'));
//
}
//
else
//
{
//
date = allotList.OrderByDescending(t => t.Year).ThenByDescending(t => t.Month).Take(6).Select(t => t.Year + "-" + t.Month.ToString().PadLeft(2, '0')).ToList();
//
}
//
return perforReportRepository.Medicine(hospitalId, date);
//
}
///
//
<summary>
///
//
科室有效收入占比
///
//
</summary>
///
//
<returns></returns>
//
public List<PerReport> Income(int hospitalId, int isIndex)
//
{
//
var states = new List<int>() { 6, 8 };
//
var allotList = perforPerallotRepository.GetEntities(t => t.HospitalId == hospitalId && states.Contains(t.States));
//
if (allotList == null || !allotList.Any())
//
throw new PerformanceException("用户未创建绩效!");
//
var date = new List<string>();
//
if (isIndex == 1)
//
{
//
var allot = allotList.OrderByDescending(t => t.Year).ThenByDescending(t => t.Month).FirstOrDefault();
//
date.Add(allot.Year + "-" + allot.Month.ToString().PadLeft(2, '0'));
//
}
//
else
//
{
//
date = allotList.OrderByDescending(t => t.Year).ThenByDescending(t => t.Month).Take(6).Select(t => t.Year + "-" + t.Month.ToString().PadLeft(2, '0')).ToList();
//
}
//
return perforReportRepository.Income(hospitalId, date);
//
}
/// <summary>
/// 只支持EXCEL抽取报表数据
...
...
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