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
26ddecb1
Commit
26ddecb1
authored
Sep 18, 2020
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
科室二次分配门诊收入
parent
af3f79e1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
114 additions
and
8 deletions
+114
-8
performance/Performance.Api/Controllers/PersonController.cs
+12
-0
performance/Performance.Api/wwwroot/Performance.Api.xml
+6
-0
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+5
-0
performance/Performance.DtoModels/Response/DeptIncomeResponse.cs
+19
-0
performance/Performance.Repository/PerforPerAllotRepository.cs
+34
-0
performance/Performance.Services/PersonService.cs
+38
-8
No files found.
performance/Performance.Api/Controllers/PersonController.cs
View file @
26ddecb1
...
...
@@ -169,5 +169,17 @@ public ApiResponse DeptWorkloadDetail([CustomizeValidator(RuleSet = "Select"), F
var
data
=
personService
.
DeptWorkloadDetail
(
request
,
claimService
.
GetUserId
());
return
new
ApiResponse
(
ResponseType
.
OK
,
data
);
}
/// <summary>
/// 门诊开单收入详情
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
Route
(
"dept/incomedetail"
)]
public
ApiResponse
DeptIncomeDetail
([
CustomizeValidator
(
RuleSet
=
"Select"
),
FromBody
]
WorkDetailRequest
request
)
{
var
data
=
personService
.
DeptIncomeDetail
(
request
,
claimService
.
GetUserId
());
return
new
ApiResponse
(
ResponseType
.
OK
,
data
);
}
}
}
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
26ddecb1
...
...
@@ -941,6 +941,12 @@
</summary>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.PersonController.DeptIncomeDetail(Performance.DtoModels.WorkDetailRequest)"
>
<summary>
门诊开单收入详情
</summary>
<returns></returns>
</member>
<member
name=
"T:Performance.Api.Controllers.ReportController"
>
<summary>
报表
...
...
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
26ddecb1
...
...
@@ -2489,6 +2489,11 @@
<member
name=
"P:Performance.DtoModels.DetailModuleExtend.ItemValue2"
>
<summary>
结算值
</summary>
</member>
<member
name=
"T:Performance.DtoModels.DeptIncomeResponse"
>
<summary>
查看科室绩效详情
</summary>
</member>
<member
name=
"P:Performance.DtoModels.DeptResponse.ID"
>
<summary>
...
...
performance/Performance.DtoModels/Response/DeptIncomeResponse.cs
0 → 100644
View file @
26ddecb1
using
FluentValidation
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.DtoModels
{
/// <summary>
/// 查看科室绩效详情
/// </summary>
public
class
DeptIncomeResponse
{
public
string
Department
{
get
;
set
;
}
public
string
DoctorName
{
get
;
set
;
}
public
string
PersonnelNumber
{
get
;
set
;
}
public
string
Category
{
get
;
set
;
}
public
decimal
Fee
{
get
;
set
;
}
}
}
performance/Performance.Repository/PerforPerAllotRepository.cs
View file @
26ddecb1
...
...
@@ -174,5 +174,39 @@ public IEnumerable<report_original_workload> QueryWorkloadData(int allotid, stri
}
}
}
/// <summary>
/// 查询门诊收入数据
/// </summary>
/// <param name="allotid"></param>
public
IEnumerable
<
ex_result
>
QueryIncomeData
(
int
hospitalId
,
int
allotid
,
string
accountingunit
,
string
[]
unittype
)
{
using
(
var
connection
=
context
.
Database
.
GetDbConnection
())
{
if
(
connection
.
State
!=
ConnectionState
.
Open
)
connection
.
Open
();
try
{
string
clear
=
@"SELECT t3.AccountingUnit Department,t1.DoctorName,t1.PersonnelNumber,t1.Category,ifnull(t1.Fee,0) Fee
FROM
ex_result t1
JOIN per_employee t2 on t1.doctorname = t2.doctorname and t1.personnelnumber = t2.personnelnumber
JOIN per_dept_dic t3 ON t1.Department = t3.Department
WHERE
t1.allotid = @allotid
AND t3.HospitalId = @hospitalId
AND t3.Source = '门诊'
AND t3.accountingunit = @accountingunit
AND t1.Source like '%门诊开单%'
AND t2.unittype in @unittype
AND t2.allotid = @allotid
ORDER BY fee DESC,CONVERT ( t1.doctorname USING gbk );"
;
return
connection
.
Query
<
ex_result
>(
clear
,
new
{
hospitalId
,
allotid
,
accountingunit
,
unittype
},
commandTimeout
:
60
*
60
);
}
catch
(
Exception
ex
)
{
throw
ex
;
}
}
}
}
}
performance/Performance.Services/PersonService.cs
View file @
26ddecb1
...
...
@@ -494,14 +494,44 @@ public object DeptWorkloadDetail(WorkDetailRequest request, int userId)
var
data
=
perallotRepository
.
QueryWorkloadData
(
request
.
AllotId
,
request
.
AccountingUnit
,
unittype
);
if
(
data
!=
null
&&
data
.
Any
())
{
return
data
.
GroupBy
(
t
=>
new
{
t
.
Department
,
t
.
DoctorName
,
t
.
PersonnelNumber
,
t
.
Category
}).
Select
(
t
=>
new
{
t
.
Key
.
Department
,
t
.
Key
.
DoctorName
,
t
.
Key
.
PersonnelNumber
,
t
.
Key
.
Category
,
Fee
=
t
.
Sum
(
group
=>
group
.
Fee
??
0
)
}).
OrderBy
(
t
=>
t
.
PersonnelNumber
).
ThenBy
(
t
=>
t
.
Category
);
return
data
.
GroupBy
(
t
=>
new
{
t
.
Department
,
t
.
DoctorName
,
t
.
PersonnelNumber
,
t
.
Category
})
.
Select
(
t
=>
new
DeptIncomeResponse
{
Department
=
t
.
Key
.
Department
,
DoctorName
=
t
.
Key
.
DoctorName
,
PersonnelNumber
=
t
.
Key
.
PersonnelNumber
,
Category
=
t
.
Key
.
Category
,
Fee
=
t
.
Sum
(
group
=>
group
.
Fee
??
0
)
}).
OrderBy
(
t
=>
t
.
PersonnelNumber
).
ThenBy
(
t
=>
t
.
Category
);
}
return
new
string
[]
{
};
}
/// <summary>
/// 科室工作量数据详情
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public
object
DeptIncomeDetail
(
WorkDetailRequest
request
,
int
userId
)
{
var
(
dept
,
unittype
)
=
GetDeptByUser
(
userId
);
var
allot
=
perallotRepository
.
GetEntity
(
w
=>
w
.
ID
==
request
.
AllotId
);
if
(
allot
==
null
)
return
null
;
var
data
=
perallotRepository
.
QueryIncomeData
(
allot
.
HospitalId
,
request
.
AllotId
,
request
.
AccountingUnit
,
unittype
);
if
(
data
!=
null
&&
data
.
Any
())
{
return
data
.
GroupBy
(
t
=>
new
{
t
.
Department
,
t
.
DoctorName
,
t
.
PersonnelNumber
,
t
.
Category
})
.
Select
(
t
=>
new
DeptIncomeResponse
{
Department
=
t
.
Key
.
Department
,
DoctorName
=
t
.
Key
.
DoctorName
,
PersonnelNumber
=
t
.
Key
.
PersonnelNumber
,
Category
=
t
.
Key
.
Category
,
Fee
=
t
.
Sum
(
group
=>
group
.
Fee
??
0
)
}).
OrderBy
(
t
=>
t
.
PersonnelNumber
).
ThenBy
(
t
=>
t
.
Category
);
}
return
new
string
[]
{
};
...
...
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