共用科主任BUG修复

parent 84ad6c88
......@@ -19,7 +19,7 @@ public List<im_employee_clinic> GetEmployees(int allotId)
return context.Set<im_employee_clinic>()
.Where(w => w.AllotID == allotId)
.ToList()
.GroupBy(w => w.PersonnelNumber)
.GroupBy(w => new { w.PersonnelNumber, w.UnitType, w.AccountingUnit })
.Select(w => w.OrderByDescending(p => p.ID).First())
.ToList()
?? new List<im_employee_clinic>();
......
......@@ -282,7 +282,7 @@ public int SaveClinicEmployee(PerSheet sheet, per_allot allot, List<per_allot> a
}
}
List<im_employee_clinic> addList = new List<im_employee_clinic>();
foreach (var data in dataList.GroupBy(w => w.PersonnelNumber).Select(w => w.First()))
foreach (var data in dataList.GroupBy(w => new { w.PersonnelNumber, w.UnitType, w.AccountingUnit }).Select(w => w.First()))
{
var imdata = _mapper.Map<im_employee_clinic>(data);
imdata.SheetID = imsheet.ID;
......
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