Commit 9e183ed8 by lcx

二次绩效其他工作量绩效,为null时默认值为0;抽取前检验方法不全

parent fc1d3331
......@@ -592,6 +592,11 @@ public HandsonTable GetOtherTempData(int userId, int secondId, int isArchive, in
realAmount = details?.Sum(t => t.RealAmount);
if (details == null || !details.Any()) return result;
details.ForEach(t =>
{
if (!t.OtherPerformance.HasValue) t.OtherPerformance = 0;
});
List<HandsonRowData> rowDatas = new List<HandsonRowData>();
int i = 1;
foreach (var item in details)
......
......@@ -658,19 +658,19 @@ public string Judge(int allotId, int hospitalId, int useTemplate, ref bool isSin
#region 检查是否有新增的科室或费用类别
public void CheckHasNewDepartmentOrCategory(int allotId)
public Dictionary<string, object> CheckHasNewDepartmentOrCategory(int allotId)
{
var allot = perallotRepository.GetEntity(t => t.ID == allotId);
var allotList = perallotRepository.GetEntities(t => t.HospitalId == allot.HospitalId && new int[] { (int)AllotStates.GenerateSucceed, (int)AllotStates.Archive }.Contains(t.States));
var prevAllot = allotList?.OrderByDescending(t => t.Year).ThenByDescending(t => t.Month).First();
if (prevAllot != null) return;
if (prevAllot != null) return null;
var modDics = moddicRepository.GetEntities(t => t.HospitalId == allot.HospitalId && t.Type == "checksql");
if (modDics == null || !modDics.Any()) return;
if (modDics == null || !modDics.Any()) return null;
var hospitalconfigs = hospitalconfigRepository.GetEntities(t => modDics.Select(s => s.ConfigId).Distinct().Contains(t.Id));
if (hospitalconfigs == null || !hospitalconfigs.Any()) return;
if (hospitalconfigs == null || !hospitalconfigs.Any()) return null;
var sheets = persheetRepository.GetEntities(t => t.AllotID == prevAllot.ID && t.SheetType == (int)SheetType.Income);
var importdata = imdataRepository.GetEntities(t => sheets.Select(s => s.ID).Contains(t.SheetID.Value));
......@@ -690,7 +690,24 @@ public void CheckHasNewDepartmentOrCategory(int allotId)
if (sheet == null) continue;
var sheetdata = importdata.Where(t => t.SheetID == sheet.ID)?.ToList() ?? new List<im_data>();
var departments = sheetdata.Select(t => t.Department).Distinct();
var noExistedDepartment = data.Select(t => t.Department).Distinct().Except(departments);
var typenames = sheetdata.Select(t => t.TypeName).Distinct();
var noExistedTypename = data.Select(t => t.Category).Distinct().Except(typenames);
StringBuilder stringBuilder = new StringBuilder();
if (noExistedDepartment != null && noExistedDepartment.Any())
stringBuilder.AppendLine($"新增科室:{string.Join(",", noExistedDepartment)}");
if (noExistedTypename != null && noExistedTypename.Any())
stringBuilder.AppendLine($"新增费用类型:{string.Join(",", noExistedTypename)}");
paramtemers.Add(dic.Remark, stringBuilder.ToString());
}
return paramtemers;
}
#endregion 检查是否有新增的科室或费用类别
......
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