Commit 0a7eef76 by 钟博

Merge branch 'hotfix/医院其他绩效统计表bug'

parents 2b44bef5 48ecc275
......@@ -542,9 +542,9 @@ public ApiResponse GetAccountingList([FromBody] AccoungingRequest request)
case 1:
default: //返回accounting列表
return new ApiResponse(ResponseType.OK, "ok", list);
case 2: //返回核算单元类型
case 3: //返回核算单元类型
return new ApiResponse(ResponseType.OK, "ok", list.Select(t => new TitleValue { Title = t.UnitType, Value = t.UnitType }).ToDistinct());
case 3: //返回核算单元
case 2: //返回核算单元
return new ApiResponse(ResponseType.OK, "ok", list.Select(t => new TitleValue { Title = t.AccountingUnit, Value = t.AccountingUnit }).ToDistinct());
}
}
......
......@@ -8,7 +8,7 @@ public class AccoungingRequest
public int AllotId { get; set; }
/// <summary>
/// 1 返回accounting列表 2 返回核算单元类型 3 返回核算单元
/// 1 返回accounting列表 2 返回核算单元 3 返回核算单元类型
/// </summary>
public int Type { get; set; }
......
......@@ -1791,7 +1791,7 @@ public res_baiscnorm EditHospitalAvg(ComputerAvgRequest request)
if (!emp.Any())
dicData.Add(type, "0");
else
dicData.Add(type, Math.Round(Convert.ToDecimal(emp?.First()?.Amount), 0).ToString());
dicData.Add(type, Math.Round(Convert.ToDecimal(emp?.Sum(c=>c.Amount))).ToString());
}
var sum = employees.Where(c => c.PersonnelNumber == num)?.Sum(t => t.Amount);
......
......@@ -646,10 +646,10 @@ public List<cof_accounting> GetAccountingList(AccoungingRequest request)
switch (request.Type)
{
case 1: //返回accounting列表
case 2: //返回核算单元类型
case 3: //返回核算单元类型
default:
return cofaccountingRepository.GetEntities(t => t.AllotId == request.AllotId);
case 3: //返回核算单元
case 2: //返回核算单元
return cofaccountingRepository.GetEntities(t => t.AllotId == request.AllotId && t.UnitType == request.UnitType);
}
}
......
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