工作票

This commit is contained in:
何美荣 2025-11-22 22:17:03 +08:00
parent 9d9feb0dec
commit 2536139cd1
2 changed files with 11 additions and 11 deletions

View File

@ -48,9 +48,9 @@ namespace APT.FO.WebApi.Controllers
var id = filter.FilterGroup.Rules.FirstOrDefault(t => t.Field == "ID").Value.ToString(); var id = filter.FilterGroup.Rules.FirstOrDefault(t => t.Field == "ID").Value.ToString();
if (string.IsNullOrEmpty(id)) if (string.IsNullOrEmpty(id))
this.ThrowError("060010"); this.ThrowError("060010");
var entity = this.GetEntity<T_FO_FIRE_JOB>(id, "Nav_ApplyUser", "Nav_Company", "Nav_ApplyDepartment", "Nav_OperationStep", "Nav_ProductionUnit", "Nav_FireUser.Nav_UserSignFiles.Nav_ImgFile.Nav_File", "Nav_FireDepartment", var entity = this.GetEntity<T_FO_FIRE_JOB>(id, "Nav_ApplyUser", "Nav_Company", "Nav_ApplyDepartment", "Nav_OperationStep", "Nav_ProductionUnit", "Nav_FireUser.Nav_UserSignFiles.Nav_ImgFile", "Nav_FireDepartment",
"Nav_SafeUser.Nav_UserSignFiles.Nav_ImgFile.Nav_File", "Nav_Area", "Nav_Type", "Nav_MonitorUser", "Nav_Risks", "Nav_Files.Nav_ImgFile.Nav_File", "Nav_Users.Nav_UserType", "Nav_Users.Nav_User", "Nav_Users.Nav_UserFiles.Nav_ImgFile.Nav_File", "Nav_SafeUser.Nav_UserSignFiles.Nav_ImgFile", "Nav_Area", "Nav_Type", "Nav_MonitorUser.Nav_UserSignFiles.Nav_ImgFile", "Nav_Risks", "Nav_Files.Nav_ImgFile", "Nav_Users.Nav_UserType", "Nav_Users.Nav_User.Nav_UserSignFiles.Nav_ImgFile", "Nav_Users.Nav_UserFiles.Nav_ImgFile",
"Nav_FireFiles.Nav_ImgFile.Nav_File", "Nav_MonitorFiles.Nav_ImgFile.Nav_File", "Nav_DispatchUser"); "Nav_FireFiles.Nav_ImgFile", "Nav_MonitorFiles.Nav_ImgFile", "Nav_DispatchUser.Nav_UserSignFiles.Nav_ImgFile");
if (entity != null) if (entity != null)
{ {
var details = this.GetEntities<T_FO_FIRE_JOB_DETAIL>(t => t.FIRE_JOB_ID == entity.ID, new BaseFilter(entity.ORG_ID), "Nav_DetailFiles.Nav_ImgFile.Nav_File").ToList(); var details = this.GetEntities<T_FO_FIRE_JOB_DETAIL>(t => t.FIRE_JOB_ID == entity.ID, new BaseFilter(entity.ORG_ID), "Nav_DetailFiles.Nav_ImgFile.Nav_File").ToList();
@ -279,7 +279,7 @@ namespace APT.FO.WebApi.Controllers
throw new Exception("动火实际结束时间必须填写"); throw new Exception("动火实际结束时间必须填写");
if (entity.LEAVE_DATE == null) if (entity.LEAVE_DATE == null)
throw new Exception("离开现场时间必须填写"); throw new Exception("离开现场时间必须填写");
if (entity.Nav_MonitorFiles == null|| !entity.Nav_MonitorFiles.Any()) if (monitorFileList == null || !monitorFileList.Any())
throw new Exception("必须上传完工验收附件,如照片视频等"); 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)); 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) if (detailNeed != null)
@ -311,7 +311,7 @@ namespace APT.FO.WebApi.Controllers
throw new Exception("不可动火请稍后再进行验收"); throw new Exception("不可动火请稍后再进行验收");
if (entity.ACT_DATE == null) if (entity.ACT_DATE == null)
throw new Exception("动火实际开始时间必须填写"); throw new Exception("动火实际开始时间必须填写");
if (entity.Nav_FireFiles == null || !entity.Nav_FireFiles.Any()) if (fireFileList == null || !fireFileList.Any())
throw new Exception("必须上传现场条件验收附件,如照片视频等"); throw new Exception("必须上传现场条件验收附件,如照片视频等");
var detailNeed = detailList.FirstOrDefault(t => t.JOB_STEP == FOJobStepEnum.Pre && t.IS_CONFIRM_NEW == false); var detailNeed = detailList.FirstOrDefault(t => t.JOB_STEP == FOJobStepEnum.Pre && t.IS_CONFIRM_NEW == false);
if (detailNeed != null) if (detailNeed != null)

View File

@ -46,10 +46,10 @@ namespace APT.FO.WebApi.Controllers
var id = filter.FilterGroup.Rules.FirstOrDefault(t => t.Field == "ID").Value.ToString(); var id = filter.FilterGroup.Rules.FirstOrDefault(t => t.Field == "ID").Value.ToString();
if (string.IsNullOrEmpty(id)) if (string.IsNullOrEmpty(id))
this.ThrowError("060010"); this.ThrowError("060010");
var entity = this.GetEntity<T_FO_FIRE_JOB_WB>(id, "Nav_ApplyUser", "Nav_Company", "Nav_ApplyDepartment", "Nav_OperationStep", "Nav_ProductionUnit", "Nav_FireUser.Nav_ImgFile.Nav_File", var entity = this.GetEntity<T_FO_FIRE_JOB_WB>(id, "Nav_ApplyUser", "Nav_Company", "Nav_ApplyDepartment", "Nav_Related", "Nav_OperationStep", "Nav_ProductionUnit", "Nav_FireUser.Nav_ImgFile",
"Nav_SafeUser.Nav_ImgFile.Nav_File", "Nav_Area", "Nav_Type", "Nav_MonitorUser", "Nav_Risks", "Nav_Files.Nav_ImgFile.Nav_File", "Nav_Users.Nav_UserType", "Nav_Users.Nav_UserFiles.Nav_ImgFile.Nav_File", "Nav_SafeUser.Nav_ImgFile", "Nav_Area", "Nav_Type", "Nav_MonitorUser.Nav_UserSignFiles.Nav_ImgFile", "Nav_Risks", "Nav_Files.Nav_ImgFile", "Nav_Users.Nav_UserType", "Nav_Users.Nav_UserFiles.Nav_ImgFile",
"Nav_Users.Nav_Signs.Nav_ImgFile.Nav_File", "Nav_Users.Nav_Signs.Nav_ImgFile", "Nav_Users.Nav_User",
"Nav_FireFiles.Nav_ImgFile.Nav_File", "Nav_MonitorFiles.Nav_ImgFile.Nav_File"); "Nav_FireFiles.Nav_ImgFile", "Nav_MonitorFiles.Nav_ImgFile");
if (entity != null) if (entity != null)
{ {
var details = this.GetEntities<T_FO_FIRE_JOB_WB_DETAIL>(t => t.FIRE_JOB_WB_ID == entity.ID, new BaseFilter(entity.ORG_ID), "Nav_DetailFiles.Nav_ImgFile.Nav_File").ToList(); var details = this.GetEntities<T_FO_FIRE_JOB_WB_DETAIL>(t => t.FIRE_JOB_WB_ID == entity.ID, new BaseFilter(entity.ORG_ID), "Nav_DetailFiles.Nav_ImgFile.Nav_File").ToList();
@ -302,7 +302,7 @@ namespace APT.FO.WebApi.Controllers
throw new Exception("动火实际结束时间必须填写"); throw new Exception("动火实际结束时间必须填写");
if (entity.LEAVE_DATE == null) if (entity.LEAVE_DATE == null)
throw new Exception("离开现场时间必须填写"); throw new Exception("离开现场时间必须填写");
if (entity.Nav_MonitorFiles == null || !entity.Nav_MonitorFiles.Any()) if (monitorFileList == null || !monitorFileList.Any())
throw new Exception("必须上传完工验收附件,如照片视频等"); 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)); 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) if (detailNeed != null)
@ -325,7 +325,7 @@ namespace APT.FO.WebApi.Controllers
throw new Exception("不可动火请稍后再进行验收"); throw new Exception("不可动火请稍后再进行验收");
if (entity.ACT_DATE == null) if (entity.ACT_DATE == null)
throw new Exception("动火实际开始时间必须填写"); throw new Exception("动火实际开始时间必须填写");
if (entity.Nav_FireFiles == null || !entity.Nav_FireFiles.Any()) if (fireFileList == null || !fireFileList.Any())
throw new Exception("必须上传现场条件验收附件,如照片视频等"); throw new Exception("必须上传现场条件验收附件,如照片视频等");
var detailNeed = detailList.FirstOrDefault(t => t.JOB_STEP == FOJobStepEnum.Pre && t.IS_CONFIRM_NEW == false); var detailNeed = detailList.FirstOrDefault(t => t.JOB_STEP == FOJobStepEnum.Pre && t.IS_CONFIRM_NEW == false);
if (detailNeed != null) if (detailNeed != null)