动火作业条件限制,看板排序

This commit is contained in:
何美荣 2026-05-26 14:28:12 +08:00
parent 2f29a634d9
commit c64523714e
2 changed files with 15 additions and 7 deletions

View File

@ -350,11 +350,15 @@ namespace APT.FO.WebApi.Controllers
throw new Exception("动火实际结束时间必须填写");
if (entity.LEAVE_DATE == null)
throw new Exception("离开现场时间必须填写");
//if (monitorFileList == null || !monitorFileList.Any())
// throw new Exception("必须上传完工验收附件");
if (monitorFileList == null || !monitorFileList.Any())
throw new Exception("必须上传完工验收附件");
var detailNeed = detailList.FirstOrDefault(t => (t.JOB_STEP == FOJobStepEnum.Ing && t.IS_CONFIRM_NEW == false) || (t.JOB_STEP == FOJobStepEnum.After && t.IS_CONFIRM_NEW == false));
//if (detailNeed != null)
// throw new Exception("作业中或作业后未全部确认!");
if (detailNeed != null)
throw new Exception("作业中或作业后未全部确认!");
var detailAfterIds = detailList.Where(t => t.JOB_STEP != FOJobStepEnum.Pre).Select(m=>m.ID).ToList();
var fileAfter = detailFileList.FirstOrDefault(t => detailAfterIds.Contains(t.FIRE_JOB_DETAIL_ID));
if(fileAfter == null)
throw new Exception("作业中或作业后必须上传一个附件!");
//作业前不删
var noDeleteIds = detailInfos.Where(t => t.JOB_STEP == FOJobStepEnum.Pre).Select(t => t.ID).ToList();
detailIds = detailIds.Where(t => !noDeleteIds.Contains(t)).ToList();
@ -387,11 +391,15 @@ namespace APT.FO.WebApi.Controllers
throw new Exception("不可动火请稍后再进行验收");
if (entity.ACT_DATE == null)
throw new Exception("动火实际开始时间必须填写");
//if (fireFileList == null || !fireFileList.Any())
// throw new Exception("必须上传现场条件验收附件");
if (fireFileList == null || !fireFileList.Any())
throw new Exception("必须上传现场条件验收附件");
var detailNeed = detailList.FirstOrDefault(t => t.JOB_STEP == FOJobStepEnum.Pre && t.IS_CONFIRM_NEW == false);
if (detailNeed != null)
throw new Exception("作业前未全部确认!");
var detailPreIds = detailList.Where(t => t.JOB_STEP == FOJobStepEnum.Pre).Select(m => m.ID).ToList();
var filePre = detailFileList.FirstOrDefault(t => detailPreIds.Contains(t.FIRE_JOB_DETAIL_ID));
if (filePre == null)
throw new Exception("作业前必须上传一个附件!");
//作业中后不删
var noDeleteIds = detailInfos.Where(t => t.JOB_STEP != FOJobStepEnum.Pre).Select(t => t.ID).ToList();
detailIds = detailIds.Where(t => !noDeleteIds.Contains(t)).ToList();

View File

@ -990,7 +990,7 @@ namespace APT.SC.WebApi.Controllers.Api.BI
riskList.Add(risk);
}
}
result.Data.riskList = riskList;
result.Data.riskList = riskList.OrderBy(t=>t.companyName =="西拓").ThenBy(m => m.companyName == "金能昆仑").ThenBy(x => x.companyName == "路源").ThenBy(x => x.companyName == "邦泰").ToList();
result.Data.riskTypeList = riskTypeList;
return result;