过滤行政科室绩效、行政工勤绩效内容,根据是否需要二次分配划分

parent d2a8c245
...@@ -192,6 +192,8 @@ public List<ResComputeResponse> GetCompute(int allotId, int type) ...@@ -192,6 +192,8 @@ public List<ResComputeResponse> GetCompute(int allotId, int type)
else else
{ {
var compute = _perforRescomputeRepository.GetEntities(t => t.AllotID == allotId && t.AccountType == items.FirstOrDefault(p => p.Value == type).Name); var compute = _perforRescomputeRepository.GetEntities(t => t.AllotID == allotId && t.AccountType == items.FirstOrDefault(p => p.Value == type).Name);
if (type == (int)AccountUnitType.行政工勤)
compute = compute?.Where(w => w.NeedSecondAllot == "否")?.ToList();
if (compute == null || !compute.Any()) return new List<ResComputeResponse>(); if (compute == null || !compute.Any()) return new List<ResComputeResponse>();
...@@ -296,7 +298,7 @@ public List<DeptResponse> GetOfficePerformance(int allotId) ...@@ -296,7 +298,7 @@ public List<DeptResponse> GetOfficePerformance(int allotId)
{ {
var unitType = new List<int> { (int)UnitType.行政后勤 }; var unitType = new List<int> { (int)UnitType.行政后勤 };
var list = perforResaccountRepository.GetEntities(t => unitType.Contains(t.UnitType.Value) && t.AllotID == allotId) var list = perforResaccountRepository.GetEntities(t => unitType.Contains(t.UnitType.Value) && t.AllotID == allotId && t.NeedSecondAllot == "是")
?.OrderBy(t => t.UnitType) ?.OrderBy(t => t.UnitType)
.ThenByDescending(t => t.AccountingUnit); .ThenByDescending(t => t.AccountingUnit);
List<DeptResponse> other = Mapper.Map<List<DeptResponse>>(list); List<DeptResponse> other = Mapper.Map<List<DeptResponse>>(list);
......
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