科室BUG修复

parent 43b58563
......@@ -805,7 +805,7 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
}
else if (sheet.SheetType == (int)SheetType.AccountAdjustLaterOtherFee)
{
sheettype = 9;
sheettype = 5;
amount = Math.Round(basicData.Where(t => t.SheetID == sheet.ID && t.UnitType == type && t.IsTotal == 1)?.FirstOrDefault()?.CellValue ?? 0, 0);
}
......
......@@ -111,9 +111,9 @@ public List<SecondListResponse> GetSecondList(int userId)
var allotListId = allotList.Select(t => t.ID).ToList();
Expression<Func<ag_secondallot, bool>> exp = t => allotListId.Contains(t.AllotId.Value) && t.Department == user.Department;
if (role.Type == application.DirectorRole)
exp = exp.And(t => new List<string> { UnitType.医生组.ToString(), UnitType.医技组.ToString() }.Contains(t.UnitType));
exp = exp.And(t => new List<string> { UnitType.医生组.ToString(), UnitType.其他医生组.ToString(), UnitType.其他医技组.ToString(), UnitType.医技组.ToString() }.Contains(t.UnitType));
else if (role.Type == application.NurseRole)
exp = exp.And(t => t.UnitType == UnitType.护理组.ToString());
exp = exp.And(t => t.UnitType == UnitType.护理组.ToString() || t.UnitType == UnitType.其他护理组.ToString());
else if (role.Type == application.SpecialRole)
exp = exp.And(t => t.UnitType == UnitType.特殊核算组.ToString());
else if (role.Type == application.OfficeRole)
......@@ -1468,8 +1468,7 @@ public List<ag_othersource> OtherList(int secondId, int userId)
if (second == null) throw new PerformanceException("二次绩效信息无效!");
var employees = personService.GetPersons(second.AllotId.Value, userId);
if (employees == null || !employees.Any(t => t.UnitType == second.UnitType)) return new List<ag_othersource>();
employees = employees.Where(t => t.UnitType == second.UnitType).ToList();
employees = employees?.Where(t => t.UnitType == second.UnitType).ToList();
List<ag_othersource> result = null;
var otherSecondList = perforAgothersourceRepository.GetEntities(t => t.SecondId == secondId);
......@@ -1479,6 +1478,8 @@ public List<ag_othersource> OtherList(int secondId, int userId)
}
else
{
if (employees == null || !employees.Any(t => t.UnitType == second.UnitType))
return new List<ag_othersource>();
result = employees.Select(t => new ag_othersource
{
SecondId = secondId,
......@@ -1551,6 +1552,8 @@ public List<ag_othersource> OtherAutoComplete(SecondEmpRequest request, int user
/// <param name="isTitlePerformance">是否补全职称绩效</param>
private void SupplementSecondDetail(ag_secondallot second, List<per_employee> employees, List<ag_othersource> result, bool isTitlePerformance = true)
{
if (employees == null || !employees.Any(t => t.UnitType == second.UnitType))
return;
// 补充医院其他绩效 及 预留比例
var perapramounts = perapramountRepository.GetEntities(t => t.AllotId == second.AllotId);
Func<per_employee, decimal?> getAprAmount = (t) => perapramounts
......
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