二次科室重复记录只取一条作为有效数据

parent 9093a810
...@@ -560,7 +560,21 @@ private List<ComputeResponse> GetSecondPerformance(int allotId) ...@@ -560,7 +560,21 @@ private List<ComputeResponse> GetSecondPerformance(int allotId)
var again = _perforAgcomputeRepository.GetEntities(t => t.AllotId == allotId); var again = _perforAgcomputeRepository.GetEntities(t => t.AllotId == allotId);
if (again != null && again.Any()) if (again != null && again.Any())
{ {
var group = again var disAgains = again.Select(w => new
{
w.AllotId,
w.SecondId,
w.UnitType,
w.Department,
w.WorkPost,
w.JobNumber,
w.PersonName,
w.PerforSumFee,
w.OthePerfor,
w.NightWorkPerfor,
w.RealGiveFee
}).Distinct();
var group = disAgains
.GroupBy(t => new { t.UnitType, t.Department, t.WorkPost, t.JobNumber, t.PersonName }) .GroupBy(t => new { t.UnitType, t.Department, t.WorkPost, t.JobNumber, t.PersonName })
.Select(t => .Select(t =>
{ {
......
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