合并冲突报错修复

parent beed87e6
......@@ -322,13 +322,13 @@ private List<ExtractTransDto> StandDataFormat(int hospitalId, int allotId, List<
DoctorName = item.DoctorName,
PersonnelNumber = item.PersonnelNumber,
Value = item.Fee ?? 0,
OutDoctorAccounting = firstDic?.OutDoctorAccounting?.AccountingUnit,
OutNurseAccounting = firstDic?.OutNurseAccounting?.AccountingUnit,
OutTechnicAccounting = firstDic?.OutTechnicAccounting?.AccountingUnit,
InpatDoctorAccounting = firstDic?.InpatDoctorAccounting?.AccountingUnit,
InpatNurseAccounting = firstDic?.InpatNurseAccounting?.AccountingUnit,
InpatTechnicAccounting = firstDic?.InpatTechnicAccounting?.AccountingUnit,
SpecialAccounting = firstDic?.SpecialAccounting?.AccountingUnit ?? dept,
OutDoctorAccounting = firstDic?.OutDoctorAccounting,
OutNurseAccounting = firstDic?.OutNurseAccounting,
OutTechnicAccounting = firstDic?.OutTechnicAccounting,
InpatDoctorAccounting = firstDic?.InpatDoctorAccounting,
InpatNurseAccounting = firstDic?.InpatNurseAccounting,
InpatTechnicAccounting = firstDic?.InpatTechnicAccounting,
SpecialAccounting = firstDic?.SpecialAccounting ?? dept,
EName = types.FirstOrDefault(w => w.Id == item.TypeId)?.EName,
};
data.Add(d);
......
......@@ -423,7 +423,7 @@ public IEnumerable<DeptdicResponse> GetDepartments(int allotId)
var allot = perallotRepository.GetEntity(t => t.ID == allotId);
if (allot == null || !depts.Any()) return null;
Func<per_dept_dic, Deptdic> getDeptdic = (dic) => new Deptdic { Id = dic?.Id ?? 0, IsVerify = dic?.IsVerify ?? 1, AccountingUnit = dic?.AccountingUnit, VerifyMessage = dic?.VerifyMessage, };
Func<per_dept_dic, string> getDeptdic = (dic) => dic?.AccountingUnit;
var result = depts.GroupBy(t => new { t.HISDeptName, t.Department }).Select(t => new DeptdicResponse
{
AllotId = allotId,
......@@ -442,34 +442,6 @@ public IEnumerable<DeptdicResponse> GetDepartments(int allotId)
IsVerify = t.Min(w => w.IsVerify) ?? 1,
});
}
var dic = dics.FirstOrDefault(group => group.Department == department && group.HISDeptName == hISDeptName && group.UnitType == unitType.ToString() && group.Source == source);
if (dic == null)
dic = dics.FirstOrDefault(group => group.Department == department && group.HISDeptName == hISDeptName && group.UnitType == unitType.ToString());
return dic?.AccountingUnit;
}
var result = depts
.GroupBy(t => new { t.HISDeptName, t.Department })
.Select(t => new DeptdicResponse
{
HospitalId = hospitalId,
HISDeptName = t.Key.HISDeptName,
Department = t.Key.Department,
OutDoctorAccounting = GetDeptdic(t.ToList(), t.Key.Department, t.Key.HISDeptName, UnitType.医生组, "门诊"),
OutNurseAccounting = GetDeptdic(t.ToList(), t.Key.Department, t.Key.HISDeptName, UnitType.护理组, "门诊"),
OutTechnicAccounting = GetDeptdic(t.ToList(), t.Key.Department, t.Key.HISDeptName, UnitType.医技组, "门诊"),
InpatDoctorAccounting = GetDeptdic(t.ToList(), t.Key.Department, t.Key.HISDeptName, UnitType.医生组, "住院"),
InpatNurseAccounting = GetDeptdic(t.ToList(), t.Key.Department, t.Key.HISDeptName, UnitType.护理组, "住院"),
InpatTechnicAccounting = GetDeptdic(t.ToList(), t.Key.Department, t.Key.HISDeptName, UnitType.医技组, "住院"),
LogisticsAccounting = GetDeptdic(t.ToList(), t.Key.Department, t.Key.HISDeptName, UnitType.行政后勤),
SpecialAccounting = GetDeptdic(t.ToList(), t.Key.Department, t.Key.HISDeptName, UnitType.特殊核算组),
CreateTime = t.Max(group => group.CreateTime),
IsVerify = t.Min(w => w.IsVerify) ?? 1,
});
return result.OrderBy(w => w.IsVerify).ThenByDescending(t => t.CreateTime).ThenBy(t => t.Department);
}
......
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