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
1c72cf76
Commit
1c72cf76
authored
Oct 12, 2020
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预算管理带出值,护理部审核
parent
9bde245c
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
179 additions
and
7 deletions
+179
-7
performance/Performance.Api/Controllers/BudgetController.cs
+28
-6
performance/Performance.Api/Controllers/SecondAllotController.cs
+14
-0
performance/Performance.Api/wwwroot/Performance.Api.xml
+13
-0
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+15
-0
performance/Performance.DtoModels/Request/BudgetRequest.cs
+4
-0
performance/Performance.EntityModels/Entity/ag_secondallot.cs
+15
-0
performance/Performance.Repository/BaseRepository.cs
+4
-0
performance/Performance.Services/BudgetService.cs
+56
-0
performance/Performance.Services/ComputeService.cs
+1
-1
performance/Performance.Services/SecondAllotService.cs
+29
-0
No files found.
performance/Performance.Api/Controllers/BudgetController.cs
View file @
1c72cf76
...
@@ -30,7 +30,7 @@ public BudgetController(ClaimService claim, BudgetService budgetService)
...
@@ -30,7 +30,7 @@ public BudgetController(ClaimService claim, BudgetService budgetService)
/// <returns></returns>
/// <returns></returns>
[
HttpPost
]
[
HttpPost
]
[
Route
(
"query"
)]
[
Route
(
"query"
)]
public
ApiResponse
<
List
<
BudgetResponse
>>
Query
([
FromBody
]
BudgetRequest
request
)
public
ApiResponse
<
List
<
BudgetResponse
>>
Query
([
FromBody
]
BudgetRequest
request
)
{
{
if
(
request
.
HospitalId
==
0
||
request
.
Year
==
0
)
if
(
request
.
HospitalId
==
0
||
request
.
Year
==
0
)
return
new
ApiResponse
<
List
<
BudgetResponse
>>(
ResponseType
.
ParameterError
,
"参数无效"
);
return
new
ApiResponse
<
List
<
BudgetResponse
>>(
ResponseType
.
ParameterError
,
"参数无效"
);
...
@@ -47,7 +47,7 @@ public ApiResponse<List<BudgetResponse>> Query([FromBody]BudgetRequest request)
...
@@ -47,7 +47,7 @@ public ApiResponse<List<BudgetResponse>> Query([FromBody]BudgetRequest request)
/// <returns></returns>
/// <returns></returns>
[
HttpPost
]
[
HttpPost
]
[
Route
(
"save/{mainYear}"
)]
[
Route
(
"save/{mainYear}"
)]
public
ApiResponse
Save
(
int
mainYear
,
[
FromBody
]
List
<
BudgetResponse
>
request
)
public
ApiResponse
Save
(
int
mainYear
,
[
FromBody
]
List
<
BudgetResponse
>
request
)
{
{
var
userId
=
claim
.
GetUserId
();
var
userId
=
claim
.
GetUserId
();
var
result
=
false
;
var
result
=
false
;
...
@@ -65,7 +65,7 @@ public ApiResponse Save(int mainYear, [FromBody]List<BudgetResponse> request)
...
@@ -65,7 +65,7 @@ public ApiResponse Save(int mainYear, [FromBody]List<BudgetResponse> request)
/// <returns></returns>
/// <returns></returns>
[
HttpPost
]
[
HttpPost
]
[
Route
(
"modify"
)]
[
Route
(
"modify"
)]
public
ApiResponse
Modify
([
FromBody
]
List
<
BudgetResponse
>
request
)
public
ApiResponse
Modify
([
FromBody
]
List
<
BudgetResponse
>
request
)
{
{
//var result = budgetService.ModifyBudgetData(request);
//var result = budgetService.ModifyBudgetData(request);
//return result ? new ApiResponse(ResponseType.OK, "修改成功") : new ApiResponse(ResponseType.Fail, "修改失败");
//return result ? new ApiResponse(ResponseType.OK, "修改成功") : new ApiResponse(ResponseType.Fail, "修改失败");
...
@@ -79,7 +79,7 @@ public ApiResponse Modify([FromBody]List<BudgetResponse> request)
...
@@ -79,7 +79,7 @@ public ApiResponse Modify([FromBody]List<BudgetResponse> request)
/// <returns></returns>
/// <returns></returns>
[
HttpPost
]
[
HttpPost
]
[
Route
(
"result/query"
)]
[
Route
(
"result/query"
)]
public
ApiResponse
<
List
<
per_budget_result
>>
Result
([
FromBody
]
BudgetRequest
request
)
public
ApiResponse
<
List
<
per_budget_result
>>
Result
([
FromBody
]
BudgetRequest
request
)
{
{
if
(
request
.
HospitalId
==
0
||
request
.
Year
==
0
)
if
(
request
.
HospitalId
==
0
||
request
.
Year
==
0
)
return
new
ApiResponse
<
List
<
per_budget_result
>>(
ResponseType
.
ParameterError
,
"参数无效"
);
return
new
ApiResponse
<
List
<
per_budget_result
>>(
ResponseType
.
ParameterError
,
"参数无效"
);
...
@@ -95,7 +95,7 @@ public ApiResponse<List<per_budget_result>> Result([FromBody]BudgetRequest reque
...
@@ -95,7 +95,7 @@ public ApiResponse<List<per_budget_result>> Result([FromBody]BudgetRequest reque
/// <returns></returns>
/// <returns></returns>
[
HttpPost
]
[
HttpPost
]
[
Route
(
"result/ratio"
)]
[
Route
(
"result/ratio"
)]
public
ApiResponse
<
List
<
BudgetRatioResponse
>>
Ratio
([
FromBody
]
BudgetRequest
request
)
public
ApiResponse
<
List
<
BudgetRatioResponse
>>
Ratio
([
FromBody
]
BudgetRequest
request
)
{
{
if
(
request
.
HospitalId
==
0
||
request
.
Year
==
0
)
if
(
request
.
HospitalId
==
0
||
request
.
Year
==
0
)
return
new
ApiResponse
<
List
<
BudgetRatioResponse
>>(
ResponseType
.
ParameterError
,
"参数无效"
);
return
new
ApiResponse
<
List
<
BudgetRatioResponse
>>(
ResponseType
.
ParameterError
,
"参数无效"
);
...
@@ -111,7 +111,7 @@ public ApiResponse<List<BudgetRatioResponse>> Ratio([FromBody]BudgetRequest requ
...
@@ -111,7 +111,7 @@ public ApiResponse<List<BudgetRatioResponse>> Ratio([FromBody]BudgetRequest requ
/// <returns></returns>
/// <returns></returns>
[
HttpPost
]
[
HttpPost
]
[
Route
(
"result/save"
)]
[
Route
(
"result/save"
)]
public
ApiResponse
ResultSave
([
FromBody
]
List
<
per_budget_result
>
request
)
public
ApiResponse
ResultSave
([
FromBody
]
List
<
per_budget_result
>
request
)
{
{
var
userId
=
claim
.
GetUserId
();
var
userId
=
claim
.
GetUserId
();
var
result
=
budgetService
.
SaveBudgetRatio
(
request
,
userId
);
var
result
=
budgetService
.
SaveBudgetRatio
(
request
,
userId
);
...
@@ -143,5 +143,26 @@ public ApiResponse CancelResult(int id)
...
@@ -143,5 +143,26 @@ public ApiResponse CancelResult(int id)
var
result
=
budgetService
.
CancelResult
(
id
);
var
result
=
budgetService
.
CancelResult
(
id
);
return
result
?
new
ApiResponse
(
ResponseType
.
OK
,
"操作成功"
)
:
new
ApiResponse
(
ResponseType
.
Fail
,
"操作失败"
);
return
result
?
new
ApiResponse
(
ResponseType
.
OK
,
"操作成功"
)
:
new
ApiResponse
(
ResponseType
.
Fail
,
"操作失败"
);
}
}
/// <summary>
/// 统计指定月份绩效信息
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
HttpPost
]
[
Route
(
"result/collect"
)]
public
ApiResponse
Collect
([
FromBody
]
BudgetCollectRequest
request
)
{
var
result
=
budgetService
.
Collect
(
request
.
HospitalId
,
request
.
Year
,
request
.
Month
);
return
new
ApiResponse
(
ResponseType
.
OK
,
new
{
result
.
Year
,
result
.
Month
,
result
.
MedicalIncome
,
result
.
TheNewPerformance
,
result
.
MedicineProportion
,
result
.
MaterialCosts
,
});
}
}
}
}
}
\ No newline at end of file
performance/Performance.Api/Controllers/SecondAllotController.cs
View file @
1c72cf76
...
@@ -352,6 +352,20 @@ public ApiResponse AuditResult([FromBody] SecondAuditRequest request)
...
@@ -352,6 +352,20 @@ public ApiResponse AuditResult([FromBody] SecondAuditRequest request)
}
}
return
result
?
new
ApiResponse
(
ResponseType
.
OK
,
"操作成功"
)
:
new
ApiResponse
(
ResponseType
.
Fail
,
"操作失败"
);
return
result
?
new
ApiResponse
(
ResponseType
.
OK
,
"操作成功"
)
:
new
ApiResponse
(
ResponseType
.
Fail
,
"操作失败"
);
}
}
/// <summary>
/// 护理部二次绩效审核结果;驳回、成功
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
Route
(
"/api/second/audit/nursingdept/result"
)]
public
ApiResponse
NursingDeptAuditResult
([
FromBody
]
SecondAuditRequest
request
)
{
var
userid
=
claimService
.
GetUserId
();
var
result
=
secondAllotService
.
NursingDeptAudit
(
userid
,
request
);
return
result
?
new
ApiResponse
(
ResponseType
.
OK
,
"操作成功"
)
:
new
ApiResponse
(
ResponseType
.
Fail
,
"操作失败"
);
}
#
endregion
#
endregion
#
region
二次绩效其他绩效
#
region
二次绩效其他绩效
...
...
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
1c72cf76
...
@@ -276,6 +276,13 @@
...
@@ -276,6 +276,13 @@
<param
name=
"id"
></param>
<param
name=
"id"
></param>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.BudgetController.Collect(Performance.DtoModels.Request.BudgetCollectRequest)"
>
<summary>
统计指定月份绩效信息
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ComputeController.GetCompute(Performance.DtoModels.ComputerRequest)"
>
<member
name=
"M:Performance.Api.Controllers.ComputeController.GetCompute(Performance.DtoModels.ComputerRequest)"
>
<summary>
<summary>
获取绩效发放列表
获取绩效发放列表
...
@@ -1161,6 +1168,12 @@
...
@@ -1161,6 +1168,12 @@
</summary>
</summary>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.NursingDeptAuditResult(Performance.DtoModels.SecondAuditRequest)"
>
<summary>
护理部二次绩效审核结果;驳回、成功
</summary>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.OtherList(Performance.DtoModels.AgOtherRequest)"
>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.OtherList(Performance.DtoModels.AgOtherRequest)"
>
<summary>
<summary>
二次绩效其他绩效详情
二次绩效其他绩效详情
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
1c72cf76
...
@@ -857,6 +857,21 @@
...
@@ -857,6 +857,21 @@
备注
备注
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.ag_secondallot.NursingDeptAuditTime"
>
<summary>
护理部审核时间
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_secondallot.NursingDeptAuditUser"
>
<summary>
护理部审核人
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_secondallot.NursingDeptRemark"
>
<summary>
护理部备注
</summary>
</member>
<member
name=
"T:Performance.EntityModels.ag_temp"
>
<member
name=
"T:Performance.EntityModels.ag_temp"
>
<summary>
<summary>
二次绩效模板
二次绩效模板
...
...
performance/Performance.DtoModels/Request/BudgetRequest.cs
View file @
1c72cf76
...
@@ -10,4 +10,8 @@ public class BudgetRequest
...
@@ -10,4 +10,8 @@ public class BudgetRequest
public
int
Year
{
get
;
set
;
}
public
int
Year
{
get
;
set
;
}
}
}
public
class
BudgetCollectRequest
:
BudgetRequest
{
public
int
Month
{
get
;
set
;
}
}
}
}
performance/Performance.EntityModels/Entity/ag_secondallot.cs
View file @
1c72cf76
...
@@ -85,5 +85,20 @@ public class ag_secondallot
...
@@ -85,5 +85,20 @@ public class ag_secondallot
/// 备注
/// 备注
/// </summary>
/// </summary>
public
string
Remark
{
get
;
set
;
}
public
string
Remark
{
get
;
set
;
}
/// <summary>
/// 护理部审核时间
/// </summary>
public
Nullable
<
DateTime
>
NursingDeptAuditTime
{
get
;
set
;
}
/// <summary>
/// 护理部审核人
/// </summary>
public
Nullable
<
int
>
NursingDeptAuditUser
{
get
;
set
;
}
/// <summary>
/// 护理部备注
/// </summary>
public
string
NursingDeptRemark
{
get
;
set
;
}
}
}
}
}
performance/Performance.Repository/BaseRepository.cs
View file @
1c72cf76
...
@@ -35,6 +35,10 @@ public IEnumerable<T> DapperQuery<T>(string sql, object param) where T : class,
...
@@ -35,6 +35,10 @@ public IEnumerable<T> DapperQuery<T>(string sql, object param) where T : class,
{
{
return
context
.
Database
.
GetDbConnection
().
Query
<
T
>(
sql
,
param
);
return
context
.
Database
.
GetDbConnection
().
Query
<
T
>(
sql
,
param
);
}
}
public
T
DapperQueryFirstOrDefault
<
T
>(
string
sql
,
object
param
)
{
return
context
.
Database
.
GetDbConnection
().
QueryFirstOrDefault
<
T
>(
sql
,
param
);
}
public
IEnumerable
<
T
>
DapperQuery
<
T
>(
string
sql
,
object
param
,
int
?
commandTimeout
=
null
)
public
IEnumerable
<
T
>
DapperQuery
<
T
>(
string
sql
,
object
param
,
int
?
commandTimeout
=
null
)
{
{
...
...
performance/Performance.Services/BudgetService.cs
View file @
1c72cf76
...
@@ -329,5 +329,61 @@ public bool GetAdjustAndGrant(per_allot allot, out decimal adjust, out decimal g
...
@@ -329,5 +329,61 @@ public bool GetAdjustAndGrant(per_allot allot, out decimal adjust, out decimal g
grant
=
result
.
Grant
.
Value
/
100
;
grant
=
result
.
Grant
.
Value
/
100
;
return
true
;
return
true
;
}
}
/// <summary>
/// 统计指定月份绩效信息
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public
per_budget_result
Collect
(
int
hospitalid
,
int
year
,
int
month
)
{
return
new
per_budget_result
{
Year
=
year
,
Month
=
month
,
MedicalIncome
=
GetMedicalIncome
(
hospitalid
,
year
,
month
),
TheNewPerformance
=
GetTheNewPerformance
(
hospitalid
,
year
,
month
),
MedicineProportion
=
GetMedicineProportion
(
hospitalid
,
year
,
month
),
MaterialCosts
=
GetMaterialCosts
(
hospitalid
,
year
,
month
),
};
}
///绩效总金额
private
decimal
GetTheNewPerformance
(
int
hospitalid
,
int
year
,
int
month
)
{
string
sql
=
@"select sum(realgivefee) from (
select realgivefee from res_compute t1
join per_allot t2 on t1.allotid=t2.id
where hospitalid=@hospitalid and year=@year and month=@month and accounttype in ('护士长','科主任','行政中层','行政高层')
union all
select realgivefee from ag_compute t1
join per_allot t2 on t1.allotid=t2.id
where hospitalid=@hospitalid and year=@year and month=@month
) tab"
;
return
perbudgetresultRepository
.
DapperQueryFirstOrDefault
<
decimal
>(
sql
,
new
{
hospitalid
,
year
,
month
});
}
///医疗收入
private
decimal
GetMedicalIncome
(
int
hospitalid
,
int
year
,
int
month
)
{
string
sql
=
@"select sum(cellvalue) from report_original_income t1 where hospitalid=@hospitalid and year=@year and month=@month"
;
return
perbudgetresultRepository
.
DapperQueryFirstOrDefault
<
decimal
>(
sql
,
new
{
hospitalid
,
year
,
month
});
}
///药品收入
private
decimal
GetMedicineProportion
(
int
hospitalid
,
int
year
,
int
month
)
{
string
sql
=
@"select sum(CellValue)
from report_original_income t1
join cof_drugtype t2 on t1.allotid = t2.allotid and t2.chargetype = '药费'
where hospitalid=@hospitalid and year=@year and month=@month"
;
return
perbudgetresultRepository
.
DapperQueryFirstOrDefault
<
decimal
>(
sql
,
new
{
hospitalid
,
year
,
month
});
}
///材料支出
private
decimal
GetMaterialCosts
(
int
hospitalid
,
int
year
,
int
month
)
{
string
sql
=
@"select sum(CellValue)
from report_original_income t1
join cof_drugtype t2 on t1.allotid = t2.allotid and t2.chargetype = '材料费'
where hospitalid=@hospitalid and year=@year and month=@month"
;
return
perbudgetresultRepository
.
DapperQueryFirstOrDefault
<
decimal
>(
sql
,
new
{
hospitalid
,
year
,
month
});
}
}
}
}
}
performance/Performance.Services/ComputeService.cs
View file @
1c72cf76
...
@@ -474,7 +474,7 @@ private List<ComputeResponse> GetAllotPerformance(int allotId, int isShowManage)
...
@@ -474,7 +474,7 @@ private List<ComputeResponse> GetAllotPerformance(int allotId, int isShowManage)
var
types2
=
new
List
<
string
>
{
AccountUnitType
.
行政中层
.
ToString
(),
AccountUnitType
.
行政高层
.
ToString
()
};
var
types2
=
new
List
<
string
>
{
AccountUnitType
.
行政中层
.
ToString
(),
AccountUnitType
.
行政高层
.
ToString
()
};
// 一次绩效 获取特定人员绩效结果
// 一次绩效 获取特定人员绩效结果
var
allot
=
_perforRescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
mTypes
.
Contains
(
t
.
AccountType
))?.
OrderByDescending
(
t
=>
t
.
AccountingUnit
);
var
allot
=
_perforRescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
mTypes
.
Contains
(
t
.
AccountType
))?.
OrderByDescending
(
t
=>
t
.
AccountingUnit
);
var
apramounts
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
);
//
var apramounts = perapramountRepository.GetEntities(t => t.AllotId == allotId);
return
allot
?.
Select
(
t
=>
return
allot
?.
Select
(
t
=>
{
{
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
1c72cf76
...
@@ -1402,6 +1402,35 @@ public bool ConfirmAudit(int userId, SecondAuditRequest request)
...
@@ -1402,6 +1402,35 @@ public bool ConfirmAudit(int userId, SecondAuditRequest request)
#
endregion
#
endregion
return
result
;
return
result
;
}
}
/// <summary>
/// 护理部审核
/// </summary>
/// <param name="userId">用户ID</param>
/// <param name="secondId">二次绩效ID</param>
/// <param name="ispass">1、审核通过 2、驳回</param>
/// <returns></returns>
public
bool
NursingDeptAudit
(
int
userId
,
SecondAuditRequest
request
)
{
var
second
=
perforAgsecondallotRepository
.
GetEntity
(
t
=>
t
.
Id
==
request
.
SecondId
);
if
(
second
==
null
)
throw
new
PerformanceException
(
"二次分配绩效无效"
);
if
(
request
.
IsPass
==
1
)
{
second
.
Status
=
3
;
second
.
NursingDeptRemark
=
$"护理部审核通过;
{
request
.
Remark
}
"
;
}
else
{
second
.
UseTempId
=
null
;
second
.
Status
=
4
;
second
.
NursingDeptRemark
=
$"护理部驳回;驳回原因:
{
request
.
Remark
}
"
;
}
second
.
NursingDeptAuditUser
=
userId
;
second
.
NursingDeptAuditTime
=
DateTime
.
Now
;
return
perforAgsecondallotRepository
.
Update
(
second
);
}
#
endregion
#
endregion
#
region
common
#
region
common
...
...
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