行政工勤更加工号和科室去重

parent 42955baa
...@@ -19,7 +19,7 @@ public List<im_employee_logistics> GetEmployees(int allotId) ...@@ -19,7 +19,7 @@ public List<im_employee_logistics> GetEmployees(int allotId)
return context.Set<im_employee_logistics>() return context.Set<im_employee_logistics>()
.Where(w => w.AllotID == allotId) .Where(w => w.AllotID == allotId)
.ToList() .ToList()
.GroupBy(w => w.PersonnelNumber) .GroupBy(w => new { w.PersonnelNumber, w.AccountingUnit })
.Select(w => w.OrderByDescending(p => p.ID).First()) .Select(w => w.OrderByDescending(p => p.ID).First())
.ToList() .ToList()
?? new List<im_employee_logistics>(); ?? new List<im_employee_logistics>();
......
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