护理部审核、预算管理合计值

parent 307abdc3
......@@ -331,8 +331,7 @@ public ApiResponse SubmitAudit(SubmitAuditRequest request)
[Route("/api/second/audit/list")]
public ApiResponse<List<ag_secondallot>> AuditList([FromBody] AllotDeptRequest request)
{
var userid = claimService.GetUserId();
var list = secondAllotService.AuditList(userid, request.AllotId);
var list = secondAllotService.AuditList(request.AllotId);
return new ApiResponse<List<ag_secondallot>>(ResponseType.OK, "审核列表", list);
}
......@@ -355,6 +354,18 @@ public ApiResponse AuditResult([FromBody] SecondAuditRequest request)
/// <summary>
/// 护理部二次绩效审核列表
/// </summary>
/// <returns></returns>
[HttpPost]
[Route("/api/second/audit/nursingdept/list")]
public ApiResponse<List<ag_secondallot>> NursingDeptlist([FromBody] AllotDeptRequest request)
{
var list = secondAllotService.NursingDeptlist(request.AllotId);
return new ApiResponse<List<ag_secondallot>>(ResponseType.OK, "审核列表", list);
}
/// <summary>
/// 护理部二次绩效审核结果;驳回、成功
/// </summary>
/// <returns></returns>
......
......@@ -1168,6 +1168,12 @@
</summary>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.SecondAllotController.NursingDeptlist(Performance.DtoModels.AllotDeptRequest)">
<summary>
护理部二次绩效审核列表
</summary>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.SecondAllotController.NursingDeptAuditResult(Performance.DtoModels.SecondAuditRequest)">
<summary>
护理部二次绩效审核结果;驳回、成功
......
......@@ -2817,6 +2817,11 @@
是否开启科室CMI占比 1 启用 2 禁用
</summary>
</member>
<member name="P:Performance.DtoModels.HospitalResponse.IsOpenNursingDeptAudit">
<summary>
是否开启护理部审核 1 启用 2 禁用
</summary>
</member>
<member name="P:Performance.DtoModels.IncomeResponse.SheetNameKeyword">
<summary>
关键字匹配
......
......@@ -857,6 +857,11 @@
备注
</summary>
</member>
<member name="P:Performance.EntityModels.ag_secondallot.NursingDeptStatus">
<summary>
护理部审核状态 2 等待审核 3 审核通过 4 驳回
</summary>
</member>
<member name="P:Performance.EntityModels.ag_secondallot.NursingDeptAuditTime">
<summary>
护理部审核时间
......@@ -5012,6 +5017,11 @@
是否开启科室CMI占比 1 启用 2 禁用
</summary>
</member>
<member name="P:Performance.EntityModels.sys_hospital.IsOpenNursingDeptAudit">
<summary>
是否开启护理部审核 1 启用 2 禁用
</summary>
</member>
<member name="T:Performance.EntityModels.sys_hospitalconfig">
<summary>
......
......@@ -23,5 +23,9 @@ public class HospitalResponse
/// 是否开启科室CMI占比 1 启用 2 禁用
/// </summary>
public int IsOpenCMIPercent { get; set; }
/// <summary>
/// 是否开启护理部审核 1 启用 2 禁用
/// </summary>
public int IsOpenNursingDeptAudit { get; set; }
}
}
......@@ -87,6 +87,11 @@ public class ag_secondallot
public string Remark { get; set; }
/// <summary>
/// 护理部审核状态 2 等待审核 3 审核通过 4 驳回
/// </summary>
public Nullable<int> NursingDeptStatus { get; set; }
/// <summary>
/// 护理部审核时间
/// </summary>
public Nullable<DateTime> NursingDeptAuditTime { get; set; }
......
......@@ -90,5 +90,10 @@ public class sys_hospital
/// 是否开启科室CMI占比 1 启用 2 禁用
/// </summary>
public Nullable<int> IsOpenCMIPercent { get; set; }
/// <summary>
/// 是否开启护理部审核 1 启用 2 禁用
/// </summary>
public Nullable<int> IsOpenNursingDeptAudit { get; set; }
}
}
......@@ -350,12 +350,12 @@ public per_budget_result Collect(int hospitalid, int year, int month)
///绩效总金额
private decimal GetTheNewPerformance(int hospitalid, int year, int month)
{
string sql = @"select sum(realgivefee) from (
select realgivefee from res_compute t1
string sql = @"select ifnull(sum(fee),0) as fee from (
select realgivefee as fee 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
select AssessLaterPerforTotal as fee from res_account t1
join per_allot t2 on t1.allotid=t2.id
where hospitalid=@hospitalid and year=@year and month=@month
) tab";
......@@ -364,13 +364,13 @@ union all
///医疗收入
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";
string sql = @"select ifnull(sum(cellvalue),0) as fee 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)
string sql = @"select ifnull(sum(cellvalue),0) as fee
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";
......@@ -379,7 +379,7 @@ private decimal GetMedicineProportion(int hospitalid, int year, int month)
///材料支出
private decimal GetMaterialCosts(int hospitalid, int year, int month)
{
string sql = @"select sum(CellValue)
string sql = @"select ifnull(sum(cellvalue),0) as fee
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";
......
......@@ -1212,21 +1212,18 @@ public bool DeleteWorkType(WorkloadRequest request)
/// </summary>
/// <param name="userId">用户ID</param>
/// <returns></returns>
public List<ag_secondallot> AuditList(int userId, int allotId)
public List<ag_secondallot> AuditList(int allotId)
{
//var hospital = perforUserhospitalRepository.GetEntities(t => t.UserID == userId);
//var allotList = perforPerallotRepository.GetEntities(t => hospital.Select(h => h.HospitalID).Contains(t.HospitalId));
//if (allotList != null && allotList.Count > 0)
//{
// var allotIds = allotList.Select(t => t.ID);
// return perforAgsecondallotRepository.GetEntities(t => allotIds.Contains(t.AllotId.Value) && t.Status == 2);
//}
//return null;
var allot = perforPerallotRepository.GetEntity(t => t.ID == allotId);
if (allot == null)
throw new PerformanceException("所选绩效不存在!");
var accountUnit = perforResaccountRepository.GetEntities(t => t.AllotID == allotId && !new int[] { (int)UnitType.行政高层, (int)UnitType.行政中层 }.Contains(t.UnitType.Value));
return SecondList(allot, accountUnit);
}
private List<ag_secondallot> SecondList(per_allot allot, List<res_account> accountUnit)
{
if (accountUnit == null || !accountUnit.Any()) return new List<ag_secondallot>();
var secondList = perforAgsecondallotRepository.GetEntities(t => t.AllotId == allot.ID && t.Year == allot.Year && t.Month == allot.Month);
......@@ -1236,7 +1233,7 @@ public List<ag_secondallot> AuditList(int userId, int allotId)
if (second != null) return second;
return new ag_secondallot
{
AllotId = allotId,
AllotId = allot.ID,
Year = allot.Year,
Month = allot.Month,
UnitType = ((UnitType)t.UnitType).ToString(),
......@@ -1253,6 +1250,21 @@ public List<ag_secondallot> AuditList(int userId, int allotId)
}
/// <summary>
/// 护理部二次绩效考核列表
/// </summary>
/// <param name="userId">用户ID</param>
/// <returns></returns>
public List<ag_secondallot> NursingDeptlist(int allotId)
{
var allot = perforPerallotRepository.GetEntity(t => t.ID == allotId);
if (allot == null)
throw new PerformanceException("所选绩效不存在!");
var types = new int[] { (int)UnitType.其他护理组, (int)UnitType.护理组 };
var accountUnit = perforResaccountRepository.GetEntities(t => t.AllotID == allotId && types.Contains(t.UnitType.Value));
return SecondList(allot, accountUnit);
}
/// <summary>
/// 提交审核
/// </summary>
/// <param name="userId">用户ID</param>
......@@ -1417,13 +1429,13 @@ public bool NursingDeptAudit(int userId, SecondAuditRequest request)
throw new PerformanceException("二次分配绩效无效");
if (request.IsPass == 1)
{
second.Status = 3;
second.NursingDeptStatus = 3;
second.NursingDeptRemark = $"护理部审核通过;{request.Remark}";
}
else
{
second.UseTempId = null;
second.Status = 4;
second.NursingDeptStatus = 4;
second.NursingDeptRemark = $"护理部驳回;驳回原因:{request.Remark}";
}
second.NursingDeptAuditUser = userId;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment