财务全院发放BUG修复

parent 6e414018
......@@ -206,7 +206,7 @@ public ApiResponse AllCompute([FromBody] ComputerRequest request)
// ? _computeService.AllCompute(request.AllotId)
// : _computeService.AllManageCompute(request.AllotId);
var list = _computeService.AllCompute(request.AllotId, isShowManage);
var list = _computeService.AllCompute(request.AllotId, allot.HospitalId, isShowManage);
return new ApiResponse(ResponseType.OK, "ok", list);
}
......@@ -225,7 +225,7 @@ public ApiResponse AllComputeAvg([FromBody] ComputerRequest request)
List<res_baiscnorm> avgs = new List<res_baiscnorm>();
var isShowManage = _computeService.IsShowManage(request.AllotId);
var list = _computeService.AllCompute(request.AllotId, isShowManage);
var list = _computeService.AllCompute(request.AllotId, allot.HospitalId, isShowManage);
if (list != null)
{
......@@ -267,7 +267,7 @@ public ApiResponse AllManageCompute([FromBody] ComputerRequest request)
var allot = _allotService.GetAllot(request.AllotId);
if (null == allot)
throw new PerformanceException("当前绩效记录不存在");
var list = _computeService.AllCompute(request.AllotId, 1);
var list = _computeService.AllCompute(request.AllotId, allot.HospitalId, 1);
return new ApiResponse(ResponseType.OK, "ok", list);
}
......@@ -285,7 +285,7 @@ public ApiResponse AllComputeByPM([FromBody] ComputerRequest request)
throw new PerformanceException("当前绩效记录不存在");
var isShowManage = _computeService.IsShowManage(request.AllotId);
var list = _computeService.AllCompute(request.AllotId, isShowManage);
var list = _computeService.AllCompute(request.AllotId, allot.HospitalId, isShowManage);
if (list == null || !list.Any())
return new ApiResponse(ResponseType.OK, "ok", list);
......
......@@ -451,12 +451,13 @@ public DeptDetailResponse GetDepartmentDetail(int allotId, int accountId, int ty
/// 返回绩效发放列表
/// </summary>
/// <param name="allotId">绩效ID</param>
/// <param name="hospitalId"></param>
/// <param name="isShowManage"> 仅显示管理绩效 isShowManage == 1 </param>
/// <returns></returns>
public List<ComputeResponse> AllCompute(int allotId, int isShowManage)
public List<ComputeResponse> AllCompute(int allotId, int hospitalId, int isShowManage)
{
// 获取一次次绩效结果
var list = GetAllotPerformance(allotId, isShowManage);
var list = GetAllotPerformance(allotId, hospitalId, isShowManage);
// 获取二次绩效结果
var seconds = GetSecondPerformance(allotId);
if (seconds != null)
......@@ -494,9 +495,14 @@ public List<ComputeResponse> AllCompute(int allotId, int isShowManage)
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
private List<ComputeResponse> GetAllotPerformance(int allotId, int isShowManage)
private List<ComputeResponse> GetAllotPerformance(int allotId, int hospitalId, int isShowManage)
{
var mTypes = new[] { AccountUnitType.护士长.ToString(), AccountUnitType.科主任.ToString(), AccountUnitType.行政中层.ToString(), AccountUnitType.行政高层.ToString() };
var mTypes = new List<string> { AccountUnitType.护士长.ToString(), AccountUnitType.科主任.ToString(), AccountUnitType.行政中层.ToString(), AccountUnitType.行政高层.ToString() };
// 获取医院是否开启后勤二次分配
var hospital = hospitalRepository.GetEntity(w => w.ID == hospitalId);
if (hospital?.IsOpenLogisticsSecondAllot != 1)
mTypes.Add(AccountUnitType.行政工勤.ToString());
var types1 = new List<string> { AccountUnitType.护士长.ToString(), AccountUnitType.科主任.ToString() };
var types2 = new List<string> { AccountUnitType.行政中层.ToString(), AccountUnitType.行政高层.ToString() };
// 业务中层人员信息
......@@ -992,7 +998,7 @@ public DeptDataDetails DeptOfficeDetail(int accountId)
{
var account = perforResaccountRepository.GetEntity(t => t.ID == accountId);
var allot = perforPerallotRepository.GetEntity(t => t.ID == account.AllotID);
var computes = _perforRescomputeRepository.GetEntities(t => t.AllotID == account.AllotID && t.UnitType == UnitType.行政后.ToString() && t.AccountingUnit == account.AccountingUnit);
var computes = _perforRescomputeRepository.GetEntities(t => t.AllotID == account.AllotID && t.AccountType == AccountUnitType.行政工.ToString() && t.AccountingUnit == account.AccountingUnit);
var persheet = _perforPerSheetRepository.GetEntities(t => t.AllotID == account.AllotID);
var headers = _perforImheaderRepository.GetEntities(t => t.AllotID == account.AllotID);
var basicData = _perforImDataRepository.GetEntities(t => t.AllotID == account.AllotID && t.AccountingUnit == account.AccountingUnit);
......@@ -1012,7 +1018,7 @@ public DeptDataDetails DeptOfficeDetail(int accountId)
var detail = new DetailDtos
{
ItemName = "行政后勤核算单元绩效测算表",
ItemName = "后勤人员",
IncomeType = 9,
OriginalType = 4,
Amount = account.PerforTotal ?? 0,
......
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