Commit aca0f8ed by ruyun.zhang@suvalue.com

Merge remote-tracking branch 'origin/master'

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