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
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
96 additions
and
108 deletions
+96
-108
performance/Performance.Api/Controllers/ReportController.cs
+22
-22
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]
...
@@ -142,29 +142,29 @@ public ApiResponse InpatFeeAvg([CustomizeValidator(RuleSet = "Query"), FromBody]
return
new
ApiResponse
(
ResponseType
.
OK
,
""
,
list
);
return
new
ApiResponse
(
ResponseType
.
OK
,
""
,
list
);
}
}
/// <summary>
///
//
<summary>
/// 科室药占比
///
//
科室药占比
/// </summary>
///
//
</summary>
/// <returns></returns>
///
//
<returns></returns>
[
Route
(
"medicine"
)]
//
[Route("medicine")]
[
HttpPost
]
//
[HttpPost]
public
ApiResponse
Medicine
([
CustomizeValidator
(
RuleSet
=
"Query"
),
FromBody
]
ReportRequest
request
)
//
public ApiResponse Medicine([CustomizeValidator(RuleSet = "Query"), FromBody] ReportRequest request)
{
//
{
var
list
=
reportService
.
Medicine
(
request
.
HospitalId
,
request
.
IsIndex
);
//
var list = reportService.Medicine(request.HospitalId, request.IsIndex);
return
new
ApiResponse
(
ResponseType
.
OK
,
""
,
list
);
//
return new ApiResponse(ResponseType.OK, "", list);
}
//
}
/// <summary>
///
//
<summary>
/// 科室有效收入占比
///
//
科室有效收入占比
/// </summary>
///
//
</summary>
/// <returns></returns>
///
//
<returns></returns>
[
Route
(
"income"
)]
//
[Route("income")]
[
HttpPost
]
//
[HttpPost]
public
ApiResponse
Income
([
CustomizeValidator
(
RuleSet
=
"Query"
),
FromBody
]
ReportRequest
request
)
//
public ApiResponse Income([CustomizeValidator(RuleSet = "Query"), FromBody] ReportRequest request)
{
//
{
var
list
=
reportService
.
Income
(
request
.
HospitalId
,
request
.
IsIndex
);
//
var list = reportService.Income(request.HospitalId, request.IsIndex);
return
new
ApiResponse
(
ResponseType
.
OK
,
""
,
list
);
//
return new ApiResponse(ResponseType.OK, "", list);
}
//
}
/// <summary>
/// <summary>
/// 月群体人均绩效
/// 月群体人均绩效
...
...
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
7c42fee2
...
@@ -1142,18 +1142,6 @@
...
@@ -1142,18 +1142,6 @@
</summary>
</summary>
<returns></returns>
<returns></returns>
</member>
</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)"
>
<member
name=
"M:Performance.Api.Controllers.ReportController.AvgPerfor(Performance.DtoModels.ReportRequest)"
>
<summary>
<summary>
月群体人均绩效
月群体人均绩效
...
...
performance/Performance.Repository/PerforPerAllotRepository.cs
View file @
7c42fee2
...
@@ -213,7 +213,7 @@ public IEnumerable<ex_result> QueryIncomeData(int allotid, string source, string
...
@@ -213,7 +213,7 @@ public IEnumerable<ex_result> QueryIncomeData(int allotid, string source, string
WHERE t1.allotid = @allotid
WHERE t1.allotid = @allotid
AND t3.unittype = @unittype
AND t3.unittype = @unittype
AND t3.accountingunit = @accountingunit
AND t3.accountingunit = @accountingunit
AND
t1.Source like '%
{
source
}
开单%'
AND
(t1.Source like '%
{
source
}
开单%' OR t1.Source like '%
{
source
}
就诊%')
AND T1.IsDelete = 0
AND T1.IsDelete = 0
ORDER BY t1.doctorname,t1.Category;"
;
ORDER BY t1.doctorname,t1.Category;"
;
return
connection
.
Query
<
ex_result
>(
clear
,
new
{
allotid
,
accountingunit
,
unittype
,
hospitalid
},
commandTimeout
:
60
*
60
);
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)
...
@@ -59,33 +59,33 @@ public List<PerReport> InpatFeeAvg(int hospitalId, List<string> date)
return
DapperQuery
(
sql
,
new
{
date
,
hospitalId
}).
ToList
();
return
DapperQuery
(
sql
,
new
{
date
,
hospitalId
}).
ToList
();
}
}
/// <summary>
//
/// <summary>
/// 科室药占比
//
/// 科室药占比
/// </summary>
//
/// </summary>
/// <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(cd.id is null,0,cellvalue)) / sum(cellvalue))*100,2) value
//
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
//
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
//
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 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();
}
//
}
/// <summary>
//
/// <summary>
/// 科室有效收入占比
//
/// 科室有效收入占比
/// </summary>
//
/// </summary>
/// <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(cd.id is null,cellvalue,0)) / sum(cellvalue))*100,2) value
//
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
//
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 ('药费','材料费')
//
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'))
//
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();
}
//
}
#
region
首页报表
#
region
首页报表
/// <summary>
/// <summary>
...
...
performance/Performance.Services/ReportService.cs
View file @
7c42fee2
...
@@ -182,53 +182,53 @@ public List<PerReport> InpatFeeAvg(int hospitalId)
...
@@ -182,53 +182,53 @@ public List<PerReport> InpatFeeAvg(int hospitalId)
return
perforReportRepository
.
InpatFeeAvg
(
hospitalId
,
date
);
return
perforReportRepository
.
InpatFeeAvg
(
hospitalId
,
date
);
}
}
/// <summary>
///
//
<summary>
/// 科室药占比
///
//
科室药占比
/// </summary>
///
//
</summary>
/// <returns></returns>
///
//
<returns></returns>
public
List
<
PerReport
>
Medicine
(
int
hospitalId
,
int
isIndex
)
//
public List<PerReport> Medicine(int hospitalId, int isIndex)
{
//
{
var
states
=
new
List
<
int
>()
{
6
,
8
};
//
var states = new List<int>() { 6, 8 };
var
allotList
=
perforPerallotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
&&
states
.
Contains
(
t
.
States
));
//
var allotList = perforPerallotRepository.GetEntities(t => t.HospitalId == hospitalId && states.Contains(t.States));
if
(
allotList
==
null
||
!
allotList
.
Any
())
//
if (allotList == null || !allotList.Any())
throw
new
PerformanceException
(
"用户未创建绩效!"
);
//
throw new PerformanceException("用户未创建绩效!");
var
date
=
new
List
<
string
>();
//
var date = new List<string>();
if
(
isIndex
==
1
)
//
if (isIndex == 1)
{
//
{
var
allot
=
allotList
.
OrderByDescending
(
t
=>
t
.
Year
).
ThenByDescending
(
t
=>
t
.
Month
).
FirstOrDefault
();
//
var allot = allotList.OrderByDescending(t => t.Year).ThenByDescending(t => t.Month).FirstOrDefault();
date
.
Add
(
allot
.
Year
+
"-"
+
allot
.
Month
.
ToString
().
PadLeft
(
2
,
'0'
));
//
date.Add(allot.Year + "-" + allot.Month.ToString().PadLeft(2, '0'));
}
//
}
else
//
else
{
//
{
date
=
allotList
.
OrderByDescending
(
t
=>
t
.
Year
).
ThenByDescending
(
t
=>
t
.
Month
).
Take
(
6
).
Select
(
t
=>
t
.
Year
+
"-"
+
t
.
Month
.
ToString
().
PadLeft
(
2
,
'0'
)).
ToList
();
//
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
);
//
return perforReportRepository.Medicine(hospitalId, date);
}
//
}
/// <summary>
///
//
<summary>
/// 科室有效收入占比
///
//
科室有效收入占比
/// </summary>
///
//
</summary>
/// <returns></returns>
///
//
<returns></returns>
public
List
<
PerReport
>
Income
(
int
hospitalId
,
int
isIndex
)
//
public List<PerReport> Income(int hospitalId, int isIndex)
{
//
{
var
states
=
new
List
<
int
>()
{
6
,
8
};
//
var states = new List<int>() { 6, 8 };
var
allotList
=
perforPerallotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
&&
states
.
Contains
(
t
.
States
));
//
var allotList = perforPerallotRepository.GetEntities(t => t.HospitalId == hospitalId && states.Contains(t.States));
if
(
allotList
==
null
||
!
allotList
.
Any
())
//
if (allotList == null || !allotList.Any())
throw
new
PerformanceException
(
"用户未创建绩效!"
);
//
throw new PerformanceException("用户未创建绩效!");
var
date
=
new
List
<
string
>();
//
var date = new List<string>();
if
(
isIndex
==
1
)
//
if (isIndex == 1)
{
//
{
var
allot
=
allotList
.
OrderByDescending
(
t
=>
t
.
Year
).
ThenByDescending
(
t
=>
t
.
Month
).
FirstOrDefault
();
//
var allot = allotList.OrderByDescending(t => t.Year).ThenByDescending(t => t.Month).FirstOrDefault();
date
.
Add
(
allot
.
Year
+
"-"
+
allot
.
Month
.
ToString
().
PadLeft
(
2
,
'0'
));
//
date.Add(allot.Year + "-" + allot.Month.ToString().PadLeft(2, '0'));
}
//
}
else
//
else
{
//
{
date
=
allotList
.
OrderByDescending
(
t
=>
t
.
Year
).
ThenByDescending
(
t
=>
t
.
Month
).
Take
(
6
).
Select
(
t
=>
t
.
Year
+
"-"
+
t
.
Month
.
ToString
().
PadLeft
(
2
,
'0'
)).
ToList
();
//
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
);
//
return perforReportRepository.Income(hospitalId, date);
}
//
}
/// <summary>
/// <summary>
/// 只支持EXCEL抽取报表数据
/// 只支持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