From fc5d0f58474d0d102d4e036f16553b1d1eb925cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E7=BE=8E=E8=8D=A3?= <10755671+mei-rong-he@user.noreply.gitee.com> Date: Thu, 20 Nov 2025 00:29:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=AF=E8=A7=86=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Api/SecurityInspectionNoticeController.cs | 1324 ++++++++++------- 1 file changed, 803 insertions(+), 521 deletions(-) diff --git a/APT.MicroApi/APT.SK.WebApi/Controllers/Api/SecurityInspectionNoticeController.cs b/APT.MicroApi/APT.SK.WebApi/Controllers/Api/SecurityInspectionNoticeController.cs index a294faf..cc26c09 100644 --- a/APT.MicroApi/APT.SK.WebApi/Controllers/Api/SecurityInspectionNoticeController.cs +++ b/APT.MicroApi/APT.SK.WebApi/Controllers/Api/SecurityInspectionNoticeController.cs @@ -8,6 +8,8 @@ using APT.BaseData.Services.DomainServices; using APT.BaseData.Services.Services.FM; using APT.Infrastructure.Core; using APT.MS.Domain.Entities.BS; +using APT.MS.Domain.Entities.FO; +using APT.MS.Domain.Entities.HM; using APT.MS.Domain.Entities.SC.PE; using APT.MS.Domain.Entities.SK; using APT.MS.Domain.Enums; @@ -97,6 +99,11 @@ namespace APT.SK.WebApi.Controllers.Api public List logList { get; set; } } public class OperateLogList { + + [Description("数据ID")] + public Guid? ID { get; set; } + [Description("表单编号")] + public string CODE { get; set; } [Description("待办名称")] public string NAME { get; set; } [Description("待办人")] @@ -109,8 +116,8 @@ namespace APT.SK.WebApi.Controllers.Api [Description("处理状态")] public int STATUS { get; set; } + } - } /// /// 安全检查通知 /// @@ -1598,16 +1605,8 @@ namespace APT.SK.WebApi.Controllers.Api return result; //throw new Exception("生产单元,检查层级,检查类型,检查周期都不能为空"); } - var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID; var departId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID; - var postId = this.GetEntity(t => t.ID == loginUserId && t.Nav_Person != null, "Nav_Person")?.Nav_Person?.POST_ID; - if (postId == null) - { - result.ErrorMessage = "发起人岗位未配置,请到用户列表确认岗位"; - return result; - //throw new Exception("发起人岗位未配置,请到用户列表确认岗位"); - } - var checkSet = this.GetEntity(t => t.PRODUCTION_UNIT_ID == entity.PRODUCTION_UNIT_ID && t.CHECK_CYCLE == entity.PLANCHECKFREQUENCY && t.CHECK_TYPE == entity.DEPARTMENT_TYPE && t.DEPARTMENT_ID == Guid.Parse(departId.ToString()) && t.POST_ID == postId); + var checkSet = this.GetEntity(t => t.PRODUCTION_UNIT_ID == entity.PRODUCTION_UNIT_ID && t.CHECK_CYCLE == entity.PLANCHECKFREQUENCY && t.CHECK_TYPE == entity.DEPARTMENT_TYPE && t.DEPARTMENT_ID == Guid.Parse(departId.ToString())); if (checkSet == null) { result.ErrorMessage = "未找到对应的检查清单,请手动添加检查内容"; @@ -1661,26 +1660,58 @@ namespace APT.SK.WebApi.Controllers.Api } else { - Guid? safeNoticeId = null; + Guid? safeNoticeId = null; + Guid? handId = null; + Guid? confirmId = null; List safeRecordIds = new List(); Guid? safeRecordSumId = null; - Guid? dangerReportId = null; - Guid? rectifyNoticeId = null; - List rectifyRecordIds = new List(); + Guid? dangerReportId = null; + List rectifyNoticeIds = new List(); + List rectifyRecordIds = new List(); + var sourceIds = new List(); + T_SK_HIDDEN_DANGER_REPORT dangerReport = null; + T_SK_HIDDEN_DANGER_HAND_REPORT hand = null; + List rectifyRecords = new List(); Guid Keyword = new Guid(filter.Keyword); + //检查通知 var check = GetEntity(Keyword); if (check == null) { - return result; + //手动隐患上报 + hand = GetEntity(Keyword); + if (hand == null) + return result; + else + { + handId = hand.ID; + sourceIds.Add(hand.ID); + var confirm = GetEntity(e => e.HIDDEN_DANGER_HAND_REPORT_ID != null && e.HIDDEN_DANGER_HAND_REPORT_ID == hand.ID); + if (confirm != null) + { + confirmId = confirm.ID; + sourceIds.Add(confirm.ID); + rectifyNoticeIds = GetEntities(e => e.HIDDEN_DANGER_CONFIRM_ID != null && e.HIDDEN_DANGER_CONFIRM_ID == confirm.ID, filter).Select(t => t.ID).ToList(); + if (rectifyNoticeIds != null && rectifyNoticeIds.Any()) + { + sourceIds.AddRange(rectifyNoticeIds); + rectifyRecords = GetEntities(e => e.HIDDEN_DANGER_RECTIFY_NOTICE_ID != null && rectifyNoticeIds.Contains((Guid)e.HIDDEN_DANGER_RECTIFY_NOTICE_ID), filter).ToList(); + rectifyRecordIds = rectifyRecords.Select(m => m.ID).ToList(); + sourceIds.AddRange(rectifyRecordIds); + } + else + { + rectifyRecords = GetEntities(e => e.HIDDEN_DANGER_CONFIRM_ID != null && e.HIDDEN_DANGER_CONFIRM_ID == confirm.ID, filter).ToList(); + rectifyRecordIds = rectifyRecords.Select(m => m.ID).ToList(); + sourceIds.AddRange(rectifyRecordIds); + } + } + GetAutoNext(sourceIds, check, safeNoticeId, hand, handId, confirmId, safeRecordIds, safeRecordSumId, dangerReportId, dangerReport, rectifyNoticeIds, rectifyRecordIds, rectifyRecords, ref result); + } } else { - //ID - var sourceIds = new List(); safeNoticeId = check.ID; - sourceIds.Add(check.ID); - T_SK_HIDDEN_DANGER_REPORT dangerReport = null; - List rectifyRecords = new List(); + sourceIds.Add(check.ID); safeRecordIds = GetEntities(e => e.SECURITY_INSPECTION_NOTICE_ID != null && e.SECURITY_INSPECTION_NOTICE_ID == check.ID, filter).Select(m=>m.ID).ToList(); sourceIds.AddRange(safeRecordIds); var recordSum= GetEntity(e => e.SECURITY_INSPECTION_NOTICE_ID != null && e.SECURITY_INSPECTION_NOTICE_ID == check.ID); @@ -1693,12 +1724,11 @@ namespace APT.SK.WebApi.Controllers.Api { dangerReportId = dangerReport.ID; sourceIds.Add(dangerReport.ID); - var rectifyNotice = GetEntity(e => e.HIDDEN_DANGER_REPORT_ID != null && e.HIDDEN_DANGER_REPORT_ID == dangerReport.ID); - if (rectifyNotice != null) + rectifyNoticeIds = GetEntities(e => e.HIDDEN_DANGER_REPORT_ID != null && e.HIDDEN_DANGER_REPORT_ID == dangerReport.ID,filter).Select(t=>t.ID).ToList(); + if (rectifyNoticeIds != null && rectifyNoticeIds.Any()) { - rectifyNoticeId = rectifyNotice.ID; - sourceIds.Add(rectifyNotice.ID); - rectifyRecords = GetEntities(e => e.HIDDEN_DANGER_RECTIFY_NOTICE_ID != null && e.HIDDEN_DANGER_RECTIFY_NOTICE_ID == rectifyNotice.ID, filter).ToList(); + sourceIds.AddRange(rectifyNoticeIds); + rectifyRecords = GetEntities(e => e.HIDDEN_DANGER_RECTIFY_NOTICE_ID != null && rectifyNoticeIds.Contains((Guid)e.HIDDEN_DANGER_RECTIFY_NOTICE_ID), filter).ToList(); rectifyRecordIds = rectifyRecords.Select(m => m.ID).ToList(); sourceIds.AddRange(rectifyRecordIds); } @@ -1710,333 +1740,386 @@ namespace APT.SK.WebApi.Controllers.Api } } } - var approveIds = new List(); - var approves = new List(); - if (sourceIds != null && sourceIds.Any()) + GetAutoNext(sourceIds,check, safeNoticeId,hand, handId, confirmId, safeRecordIds, safeRecordSumId, dangerReportId, dangerReport, rectifyNoticeIds, rectifyRecordIds, rectifyRecords, ref result); + } + return result; + } + }); + } + private void GetAutoNext(List sourceIds, T_SK_SECURITY_INSPECTION_NOTICE check, Guid? safeNoticeId, T_SK_HIDDEN_DANGER_HAND_REPORT hand,Guid? handId, Guid? confirmId, List safeRecordIds, Guid? safeRecordSumId, Guid? dangerReportId, T_SK_HIDDEN_DANGER_REPORT dangerReport, List rectifyNoticeIds, List rectifyRecordIds, List rectifyRecords, ref List result) + { + var approveIds = new List(); + var approves = new List(); + if (sourceIds != null && sourceIds.Any()) + { + approves = GetEntities(e => sourceIds.Contains(e.DATA_ID), null, null).ToList(); + approveIds = approves.Select(m => m.ID).ToList(); + } + var tasks = GetEntities(e => e.SOURCE_DATA_ID != null && (sourceIds.Contains(e.SOURCE_DATA_ID.Value) || approveIds.Contains(e.SOURCE_DATA_ID.Value)), null, null).OrderBy(t => t.CREATE_TIME).ThenBy(m => m.MODIFY_TIME).ToList(); + var users = GetEntities(e => e.ENABLE_STATUS == 0, new BaseFilter(check.ORG_ID), null).ToList(); + var departs = GetEntities(e => e.ENABLE_STATUS == 0, new BaseFilter(check.ORG_ID), null).ToList(); + List formCodes = new List { "SK006", "SK014", "SK022", "SK018" }; + var approveTemps = GetEntities(e => formCodes.Contains(e.FORM_CODE), new BaseFilter(check.ORG_ID), "Nav_ApproveTempDetails.Nav_ApproveRole").ToList(); + if (check != null) + { + var checkUser = users.FirstOrDefault(t => t.ID == check.APPLY_USER_ID); + #region 安全检查通知 + OperateLog noticeLog = new OperateLog(); + noticeLog.FORM_NAME = "安全检查通知"; + noticeLog.logList = new List(); + if (safeNoticeId != null) + { + //发起 + var temp1 = tasks.FirstOrDefault(t => t.SOURCE_DATA_ID == safeNoticeId && !t.NOTICE_TITLE.Contains("确认")); + if (temp1 != null) + { + OperateLogList start = new OperateLogList(); + start.ID = safeNoticeId; + start.CODE = "SK006_SHOWPRINT"; + start.USER_NAME = temp1.USER_NAME; + start.NAME = temp1.NOTICE_STATUS == 4 ? "安全检查通知(系统归档)" : "安全检查通知"; + start.DEAL_DATE = temp1.TASK_DT; + start.CREATE_TIME = temp1.CREATE_TIME; + start.STATUS = temp1.NOTICE_STATUS == 1 ? 5 : temp1.NOTICE_STATUS == 2 ? 10 : temp1.NOTICE_STATUS == 4 ? 15 : (temp1.NOTICE_STATUS == 0 && temp1.TASK_ENDDT >= DateTime.Now) ? 16 : (temp1.TASK_ENDDT < DateTime.Now && temp1.NOTICE_STATUS == 0) ? 20 : 0; + noticeLog.logList.Add(start); + } + else + { + //手动发起的检查通知 + OperateLogList start = new OperateLogList(); + start.ID = check.ID; + start.CODE = "SK006_SHOWPRINT"; + start.USER_NAME = checkUser.NAME; + start.NAME = check.STATUS == PFStandardStatus.Close ? "安全检查通知(系统归档)" : "安全检查通知"; + start.DEAL_DATE = check.STATUS == PFStandardStatus.Draft ? null : check.MODIFY_TIME; + start.CREATE_TIME = check.CREATE_TIME; + start.STATUS = check.STATUS == PFStandardStatus.Close ? 15 : check.STATUS == PFStandardStatus.Draft ? 0 : 5; + noticeLog.logList.Add(start); + } + //审批 + var approveTemp = approves.FirstOrDefault(t => t.DATA_ID == safeNoticeId); + if (approveTemp == null) + { + //判断发起人层级,取审批模板 + var departFirst = departs.FirstOrDefault(t => t.ID == check.APPLY_DEPARTMENT_ID); + var param = Enum.GetName(typeof(SKDepartmentTypeEnum), departFirst.DEPARTMENT_TYPE); + if (departFirst.DEPARTMENT_STATUS != 1) { - approves = GetEntities(e => sourceIds.Contains(e.DATA_ID), null, null).ToList(); - approveIds = approves.Select(m => m.ID).ToList(); + param = "公司级"; } - var tasks = GetEntities(e => e.SOURCE_DATA_ID != null && (sourceIds.Contains(e.SOURCE_DATA_ID.Value) || approveIds.Contains(e.SOURCE_DATA_ID.Value)), null, null).OrderBy(t => t.CREATE_TIME).ThenBy(m=>m.MODIFY_TIME).ToList(); - var users = GetEntities(e => e.ENABLE_STATUS == 0, new BaseFilter(check.ORG_ID), null).ToList(); - var checkUser = users.FirstOrDefault(t => t.ID == check.APPLY_USER_ID); - var departs = GetEntities(e => e.ENABLE_STATUS == 0, new BaseFilter(check.ORG_ID), null).ToList(); - ListformCodes=new List { "SK006","SK014","SK022"}; - var approveTemps = GetEntities(e => formCodes.Contains(e.FORM_CODE), new BaseFilter(check.ORG_ID), "Nav_ApproveTempDetails.Nav_ApproveRole").ToList(); - #region 安全检查通知 - OperateLog noticeLog = new OperateLog(); - noticeLog.FORM_NAME = "安全检查通知"; - noticeLog.logList = new List(); - if (safeNoticeId != null) + var approveTempFirst = approveTemps.FirstOrDefault(t => t.PARAM == param && t.FORM_CODE == "SK006"); + if (approveTempFirst != null && approveTempFirst.Nav_ApproveTempDetails != null && approveTempFirst.Nav_ApproveTempDetails.Any()) { - //发起 - var temp1 = tasks.FirstOrDefault(t => t.SOURCE_DATA_ID == safeNoticeId && !t.NOTICE_TITLE.Contains("确认")); - if (temp1 != null) - { - OperateLogList start = new OperateLogList(); - start.USER_NAME = temp1.USER_NAME; - start.NAME =temp1.NOTICE_STATUS==4? "安全检查通知(系统归档)" : "安全检查通知"; - start.DEAL_DATE = temp1.TASK_DT; - start.CREATE_TIME = temp1.CREATE_TIME; - start.STATUS = temp1.NOTICE_STATUS == 1 ? 5 : temp1.NOTICE_STATUS == 2 ? 10 : temp1.NOTICE_STATUS == 4 ? 15 : 0; - noticeLog.logList.Add(start); - } - else - { - //手动发起的检查通知 - OperateLogList start = new OperateLogList(); - start.USER_NAME = checkUser.NAME; - start.NAME = check.STATUS == PFStandardStatus.Close? "安全检查通知(系统归档)" : "安全检查通知"; - start.DEAL_DATE = check.STATUS == PFStandardStatus.Draft ? null:check.MODIFY_TIME; - start.CREATE_TIME = check.CREATE_TIME; - start.STATUS = check.STATUS == PFStandardStatus.Close? 15 :check.STATUS == PFStandardStatus.Draft? 0 : 5; - noticeLog.logList.Add(start); - } - //审批 - var approveTemp = approves.FirstOrDefault(t => t.DATA_ID == safeNoticeId); - if (approveTemp == null) - { - //判断发起人层级,取审批模板 - var departFirst = departs.FirstOrDefault(t => t.ID == check.APPLY_DEPARTMENT_ID); - var param = Enum.GetName(typeof(SKDepartmentTypeEnum), departFirst.DEPARTMENT_TYPE); - if (departFirst.DEPARTMENT_STATUS != 1) - { - param = "公司级"; - } - var approveTempFirst = approveTemps.FirstOrDefault(t => t.PARAM == param && t.FORM_CODE == "SK006"); - if (approveTempFirst != null && approveTempFirst.Nav_ApproveTempDetails != null && approveTempFirst.Nav_ApproveTempDetails.Any()) - { - foreach (var item in approveTempFirst.Nav_ApproveTempDetails.OrderBy(t=>t.NUM)) - { - OperateLogList start1 = new OperateLogList(); - start1.USER_NAME = item.Nav_ApproveRole.NAME; - start1.NAME = "安全检查通知审批"; - start1.DEAL_DATE = null; - start1.CREATE_TIME = null; - start1.STATUS = 0; - noticeLog.logList.Add(start1); - } - } - else - { - OperateLogList start1 = new OperateLogList(); - start1.USER_NAME = "审批人"; - start1.NAME = "安全检查通知审批"; - start1.DEAL_DATE = null; - start1.CREATE_TIME = null; - start1.STATUS = 0; - noticeLog.logList.Add(start1); - } - } - else - { - var tempApprove = tasks.Where(t => t.SOURCE_DATA_ID == approveTemp.ID).OrderBy(t => t.MODIFY_TIME).ThenBy(m=>m.CREATE_TIME).ToList(); - if (tempApprove != null && tempApprove.Any()) - { - foreach (var item in tempApprove) - { - OperateLogList start1 = new OperateLogList(); - start1.USER_NAME = item.USER_NAME; - start1.NAME = item.NOTICE_TITLE.Contains("驳回") ? "安全检查通知已被驳回" : "安全检查通知审批"; - start1.DEAL_DATE = item.TASK_DT; - start1.CREATE_TIME = item.CREATE_TIME; - start1.STATUS = item.NOTICE_STATUS == 1 ? 5 : item.NOTICE_STATUS == 2 ? 10 : item.NOTICE_STATUS == 4 ? 15 : 0; - noticeLog.logList.Add(start1); - } - } - } - var temp2 = tasks.Where(t => t.SOURCE_DATA_ID == safeNoticeId && t.NOTICE_TITLE.Contains("确认")).OrderBy(m=>m.MODIFY_TIME).ThenBy(n=>n.CREATE_TIME).ToList(); - if (temp2 != null && temp2.Any()) - { - foreach (var item in temp2) - { - OperateLogList start1 = new OperateLogList(); - start1.USER_NAME = item.USER_NAME; - start1.NAME = "安全检查通知确认"; - start1.DEAL_DATE = item.TASK_DT; - start1.CREATE_TIME = item.CREATE_TIME; - start1.STATUS = item.NOTICE_STATUS == 1 ? 5 : item.NOTICE_STATUS == 2 ? 10 : item.NOTICE_STATUS == 4 ? 15 : 0; - noticeLog.logList.Add(start1); - } - } - else + foreach (var item in approveTempFirst.Nav_ApproveTempDetails.OrderBy(t => t.NUM)) { OperateLogList start1 = new OperateLogList(); - start1.USER_NAME = "检查人"; - start1.NAME = "安全检查通知确认"; + start1.ID = null; + start1.CODE = "SK006_SHOWPRINT"; + start1.USER_NAME = item.Nav_ApproveRole.NAME; + start1.NAME = "安全检查通知审批"; start1.DEAL_DATE = null; start1.CREATE_TIME = null; start1.STATUS = 0; noticeLog.logList.Add(start1); } } - result.Add(noticeLog); - #endregion - #region 安全检查记录 - OperateLog recordLog = new OperateLog(); - recordLog.FORM_NAME = "安全检查记录"; - recordLog.logList = new List(); - if (safeRecordIds != null && safeRecordIds.Any()) - { - //发起 - var itemps = tasks.Where(t => t.SOURCE_DATA_ID!=null && safeRecordIds.Contains((Guid)t.SOURCE_DATA_ID)).OrderBy(m=>m.MODIFY_TIME).ThenBy(n=>n.CREATE_TIME).ToList(); - if (itemps != null && itemps.Any()) - { - foreach (var temp1 in itemps) - { - OperateLogList start = new OperateLogList(); - start.USER_NAME = temp1.USER_NAME; - start.NAME = temp1.NOTICE_STATUS== 4? "安全检查记录(系统归档)" : "安全检查记录"; - start.DEAL_DATE = temp1.TASK_DT; - start.CREATE_TIME = temp1.CREATE_TIME; - start.STATUS = temp1.NOTICE_STATUS == 1 ? 5 : temp1.NOTICE_STATUS == 2 ? 10 : temp1.NOTICE_STATUS == 4 ? 15 : 0; - recordLog.logList.Add(start); - } - } - else - { - OperateLogList start1 = new OperateLogList(); - start1.USER_NAME = "检查人"; - start1.NAME = "安全检查记录"; - start1.DEAL_DATE = null; - start1.CREATE_TIME = null; - start1.STATUS = 0; - recordLog.logList.Add(start1); - } - } else { OperateLogList start1 = new OperateLogList(); - start1.USER_NAME = "检查人"; - start1.NAME = "安全检查记录"; + start1.ID = null; + start1.CODE = "SK006_SHOWPRINT"; + start1.USER_NAME = "审批人"; + start1.NAME = "安全检查通知审批"; start1.DEAL_DATE = null; start1.CREATE_TIME = null; start1.STATUS = 0; - recordLog.logList.Add(start1); + noticeLog.logList.Add(start1); } - result.Add(recordLog); - #endregion - #region 安全检查记录汇总 - OperateLog recordSumLog = new OperateLog(); - recordSumLog.FORM_NAME = "安全检查记录汇总"; - recordSumLog.logList = new List(); - if (safeRecordSumId != null) + } + else + { + var tempApprove = tasks.Where(t => t.SOURCE_DATA_ID == approveTemp.ID).OrderBy(t => t.MODIFY_TIME).ThenBy(m => m.CREATE_TIME).ToList(); + if (tempApprove != null && tempApprove.Any()) { - //发起 - var temp1 = tasks.FirstOrDefault(t => t.SOURCE_DATA_ID == safeRecordSumId && !t.NOTICE_TITLE.Contains("确认")); - OperateLogList start = new OperateLogList(); - start.USER_NAME = temp1.USER_NAME; - start.NAME = "安全检查记录汇总"; - start.DEAL_DATE = temp1.TASK_DT; - start.CREATE_TIME = temp1.CREATE_TIME; - start.STATUS = temp1.NOTICE_STATUS == 1 ? 5 : temp1.NOTICE_STATUS == 2 ? 10 : temp1.NOTICE_STATUS == 4 ? 15 : 0; - recordSumLog.logList.Add(start); - //确认 - var temp2 = tasks.Where(t => t.SOURCE_DATA_ID == safeRecordSumId && t.NOTICE_TITLE.Contains("确认")).OrderBy(m => m.MODIFY_TIME).ThenBy(n => n.CREATE_TIME).ToList(); - if (temp2 != null && temp2.Any()) - { - foreach (var item in temp2) - { - OperateLogList start1 = new OperateLogList(); - start1.USER_NAME = item.USER_NAME; - start1.NAME = "安全检查记录汇总确认"; - start1.DEAL_DATE = item.TASK_DT; - start1.CREATE_TIME = item.CREATE_TIME; - start1.STATUS = item.NOTICE_STATUS == 1 ? 5 : item.NOTICE_STATUS == 2 ? 10 : item.NOTICE_STATUS == 4 ? 15 : 0; - recordSumLog.logList.Add(start1); - } - } - else + foreach (var item in tempApprove) { OperateLogList start1 = new OperateLogList(); - start1.USER_NAME = "检查人"; + start1.ID = approveTemp.DATA_ID; + start1.CODE = "SK006_SHOWPRINT"; + start1.USER_NAME = item.USER_NAME; + start1.NAME = item.NOTICE_TITLE.Contains("驳回") ? "安全检查通知已被驳回" : "安全检查通知审批"; + start1.DEAL_DATE = item.TASK_DT; + start1.CREATE_TIME = item.CREATE_TIME; + start1.STATUS = item.NOTICE_STATUS == 1 ? 5 : item.NOTICE_STATUS == 2 ? 10 : item.NOTICE_STATUS == 4 ? 15 : (item.NOTICE_STATUS == 0 && item.TASK_ENDDT >= DateTime.Now) ? 16 : (item.TASK_ENDDT < DateTime.Now && item.NOTICE_STATUS == 0) ? 20 : 0; + noticeLog.logList.Add(start1); + } + } + } + var temp2 = tasks.Where(t => t.SOURCE_DATA_ID == safeNoticeId && t.NOTICE_TITLE.Contains("确认")).OrderBy(m => m.MODIFY_TIME).ThenBy(n => n.CREATE_TIME).ToList(); + if (temp2 != null && temp2.Any()) + { + var temp3 = temp2.Where(t => t.NOTICE_STATUS == 1).OrderBy(m => m.MODIFY_TIME).ToList(); + if (temp3 != null && temp3.Any()) + { + foreach (var item in temp3) + { + OperateLogList start1 = new OperateLogList(); + start1.ID = safeNoticeId; + start1.CODE = "SK006_SHOWPRINT"; + start1.USER_NAME = item.USER_NAME; + start1.NAME = "安全检查通知确认"; + start1.DEAL_DATE = item.TASK_DT; + start1.CREATE_TIME = item.CREATE_TIME; + start1.STATUS = item.NOTICE_STATUS == 1 ? 5 : item.NOTICE_STATUS == 2 ? 10 : item.NOTICE_STATUS == 4 ? 15 : (item.NOTICE_STATUS == 0 && item.TASK_ENDDT >= DateTime.Now) ? 16 : (item.TASK_ENDDT < DateTime.Now && item.NOTICE_STATUS == 0) ? 20 : 0; + noticeLog.logList.Add(start1); + } + } + var temp4 = temp2.Where(t => t.NOTICE_STATUS != 1).OrderByDescending(n => n.NOTICE_STATUS).ThenBy(m => m.MODIFY_TIME).ToList(); + if (temp4 != null && temp4.Any()) + { + foreach (var item in temp4) + { + OperateLogList start1 = new OperateLogList(); + start1.ID = safeNoticeId; + start1.CODE = "SK006_SHOWPRINT"; + start1.USER_NAME = item.USER_NAME; + start1.NAME = "安全检查通知确认"; + start1.DEAL_DATE = item.TASK_DT; + start1.CREATE_TIME = item.CREATE_TIME; + start1.STATUS = item.NOTICE_STATUS == 1 ? 5 : item.NOTICE_STATUS == 2 ? 10 : item.NOTICE_STATUS == 4 ? 15 : (item.NOTICE_STATUS == 0 && item.TASK_ENDDT >= DateTime.Now) ? 16 : (item.TASK_ENDDT < DateTime.Now && item.NOTICE_STATUS == 0) ? 20 : 0; + noticeLog.logList.Add(start1); + } + } + } + else + { + OperateLogList start1 = new OperateLogList(); + start1.ID = null; + start1.CODE = "SK006_SHOWPRINT"; + start1.USER_NAME = "检查人"; + start1.NAME = "安全检查通知确认"; + start1.DEAL_DATE = null; + start1.CREATE_TIME = null; + start1.STATUS = 0; + noticeLog.logList.Add(start1); + } + } + result.Add(noticeLog); + #endregion + #region 安全检查记录 + OperateLog recordLog = new OperateLog(); + recordLog.FORM_NAME = "安全检查记录"; + recordLog.logList = new List(); + if (safeRecordIds != null && safeRecordIds.Any()) + { + //发起 + var itemps = tasks.Where(t => t.SOURCE_DATA_ID != null && safeRecordIds.Contains((Guid)t.SOURCE_DATA_ID)).OrderBy(m => m.MODIFY_TIME).ThenBy(n => n.CREATE_TIME).ToList(); + if (itemps != null && itemps.Any()) + { + var temp2 = itemps.Where(t => t.NOTICE_STATUS == 1).OrderBy(m => m.MODIFY_TIME).ToList(); + if (temp2 != null && temp2.Any()) + { + foreach (var temp1 in temp2) + { + OperateLogList start = new OperateLogList(); + start.ID = temp1.SOURCE_DATA_ID; + start.CODE = "SK010_SHOWPRINT"; + start.USER_NAME = temp1.USER_NAME; + start.NAME = temp1.NOTICE_STATUS == 4 ? "安全检查记录(系统归档)" : "安全检查记录"; + start.DEAL_DATE = temp1.TASK_DT; + start.CREATE_TIME = temp1.CREATE_TIME; + start.STATUS = temp1.NOTICE_STATUS == 1 ? 5 : temp1.NOTICE_STATUS == 2 ? 10 : temp1.NOTICE_STATUS == 4 ? 15 : (temp1.NOTICE_STATUS == 0 && temp1.TASK_ENDDT >= DateTime.Now) ? 16 : (temp1.TASK_ENDDT < DateTime.Now && temp1.NOTICE_STATUS == 0) ? 20 : 0; + recordLog.logList.Add(start); + } + } + var temp3 = itemps.Where(t => t.NOTICE_STATUS != 1).OrderByDescending(n => n.NOTICE_STATUS).ThenBy(m => m.MODIFY_TIME).ToList(); + if (temp3 != null && temp3.Any()) + { + foreach (var temp1 in temp3) + { + OperateLogList start = new OperateLogList(); + start.ID = temp1.SOURCE_DATA_ID; + start.CODE = "SK010_SHOWPRINT"; + start.USER_NAME = temp1.USER_NAME; + start.NAME = temp1.NOTICE_STATUS == 4 ? "安全检查记录(系统归档)" : "安全检查记录"; + start.DEAL_DATE = temp1.TASK_DT; + start.CREATE_TIME = temp1.CREATE_TIME; + start.STATUS = temp1.NOTICE_STATUS == 1 ? 5 : temp1.NOTICE_STATUS == 2 ? 10 : temp1.NOTICE_STATUS == 4 ? 15 : (temp1.NOTICE_STATUS == 0 && temp1.TASK_ENDDT >= DateTime.Now) ? 16 : (temp1.TASK_ENDDT < DateTime.Now && temp1.NOTICE_STATUS == 0) ? 20 : 0; + recordLog.logList.Add(start); + } + } + } + else + { + OperateLogList start1 = new OperateLogList(); + start1.ID = null; + start1.CODE = "SK010_SHOWPRINT"; + start1.USER_NAME = "检查人"; + start1.NAME = "安全检查记录"; + start1.DEAL_DATE = null; + start1.CREATE_TIME = null; + start1.STATUS = 0; + recordLog.logList.Add(start1); + } + } + else + { + OperateLogList start1 = new OperateLogList(); + start1.ID = null; + start1.CODE = "SK010_SHOWPRINT"; + start1.USER_NAME = "检查人"; + start1.NAME = "安全检查记录"; + start1.DEAL_DATE = null; + start1.CREATE_TIME = null; + start1.STATUS = 0; + recordLog.logList.Add(start1); + } + result.Add(recordLog); + #endregion + #region 安全检查记录汇总 + OperateLog recordSumLog = new OperateLog(); + recordSumLog.FORM_NAME = "安全检查记录汇总"; + recordSumLog.logList = new List(); + if (safeRecordSumId != null) + { + //发起 + var temp1 = tasks.FirstOrDefault(t => t.SOURCE_DATA_ID == safeRecordSumId && !t.NOTICE_TITLE.Contains("确认")); + OperateLogList start = new OperateLogList(); + start.ID = safeRecordSumId; + start.CODE = "SK012_SHOWPRINT"; + start.USER_NAME = temp1.USER_NAME; + start.NAME = "安全检查记录汇总"; + start.DEAL_DATE = temp1.TASK_DT; + start.CREATE_TIME = temp1.CREATE_TIME; + start.STATUS = temp1.NOTICE_STATUS == 1 ? 5 : temp1.NOTICE_STATUS == 2 ? 10 : temp1.NOTICE_STATUS == 4 ? 15 : (temp1.NOTICE_STATUS == 0 && temp1.TASK_ENDDT >= DateTime.Now) ? 16 : (temp1.TASK_ENDDT < DateTime.Now && temp1.NOTICE_STATUS == 0) ? 20 : 0; + recordSumLog.logList.Add(start); + //确认 + var temp2 = tasks.Where(t => t.SOURCE_DATA_ID == safeRecordSumId && t.NOTICE_TITLE.Contains("确认")).OrderBy(m => m.MODIFY_TIME).ThenBy(n => n.CREATE_TIME).ToList(); + if (temp2 != null && temp2.Any()) + { + var temp3 = temp2.Where(t => t.NOTICE_STATUS == 1).OrderBy(m => m.MODIFY_TIME).ToList(); + if (temp3 != null && temp3.Any()) + { + foreach (var item in temp3) + { + OperateLogList start1 = new OperateLogList(); + start1.ID = safeRecordSumId; + start1.CODE = "SK012_SHOWPRINT"; + start1.USER_NAME = item.USER_NAME; start1.NAME = "安全检查记录汇总确认"; - start1.DEAL_DATE = null; - start1.CREATE_TIME = null; - start1.STATUS = 0; + start1.DEAL_DATE = item.TASK_DT; + start1.CREATE_TIME = item.CREATE_TIME; + start1.STATUS = item.NOTICE_STATUS == 1 ? 5 : item.NOTICE_STATUS == 2 ? 10 : item.NOTICE_STATUS == 4 ? 15 : (item.NOTICE_STATUS == 0 && item.TASK_ENDDT >= DateTime.Now) ? 16 : (item.TASK_ENDDT < DateTime.Now && item.NOTICE_STATUS == 0) ? 20 : 0; recordSumLog.logList.Add(start1); } } - else + var temp4 = temp2.Where(t => t.NOTICE_STATUS != 1).OrderByDescending(n => n.NOTICE_STATUS).ThenBy(m => m.MODIFY_TIME).ToList(); + if (temp4 != null && temp4.Any()) { - OperateLogList start = new OperateLogList(); - start.USER_NAME = checkUser != null ? checkUser.NAME : "班长/安全员"; - start.NAME = "安全检查记录汇总"; - start.DEAL_DATE = null; - start.CREATE_TIME = null; - start.STATUS = 0; - recordSumLog.logList.Add(start); - OperateLogList start1 = new OperateLogList(); - start1.USER_NAME = "检查人"; - start1.NAME = "安全检查记录汇总确认"; - start1.DEAL_DATE = null; - start1.CREATE_TIME = null; - start1.STATUS = 0; - recordSumLog.logList.Add(start1); - } - result.Add(recordSumLog); - #endregion - - #region 隐患上报 - OperateLog hiddenReportLog = new OperateLog(); - hiddenReportLog.FORM_NAME = "隐患上报"; - hiddenReportLog.logList = new List(); - if (dangerReportId != null) - { - //发起 - var temp1 = tasks.FirstOrDefault(t => t.SOURCE_DATA_ID == dangerReportId && !t.NOTICE_TITLE.Contains("确认")); - if (temp1 != null) - { - OperateLogList start = new OperateLogList(); - start.USER_NAME = temp1.USER_NAME; - start.NAME = "隐患上报"; - start.DEAL_DATE = temp1.TASK_DT; - start.CREATE_TIME = temp1.CREATE_TIME; - start.STATUS = temp1.NOTICE_STATUS == 1 ? 5 : temp1.NOTICE_STATUS == 2 ? 10 : temp1.NOTICE_STATUS == 4 ? 15 : 0; - hiddenReportLog.logList.Add(start); - } - else - { - OperateLogList start = new OperateLogList(); - start.USER_NAME = "上报人"; - start.NAME = "隐患上报"; - start.DEAL_DATE = null; - start.CREATE_TIME = null; - start.STATUS = 0; - hiddenReportLog.logList.Add(start); - } - //审批 - var approveTemp = approves.FirstOrDefault(t => t.DATA_ID == dangerReportId); - if (approveTemp == null) - { - //判断发起人层级,取审批模板 - var departFirst = departs.FirstOrDefault(t => t.ID == dangerReport.APPLY_DEPARTMENT_ID); - var param = Enum.GetName(typeof(SKDepartmentTypeEnum), departFirst.DEPARTMENT_TYPE); - if (departFirst.DEPARTMENT_STATUS != 1) - { - param = "公司级"; - } - var approveTempFirst = approveTemps.FirstOrDefault(t => t.PARAM == param && t.FORM_CODE == "SK014"); - if (approveTempFirst != null && approveTempFirst.Nav_ApproveTempDetails != null && approveTempFirst.Nav_ApproveTempDetails.Any()) - { - foreach (var item in approveTempFirst.Nav_ApproveTempDetails.OrderBy(t => t.NUM)) - { - OperateLogList start1 = new OperateLogList(); - start1.USER_NAME = item.Nav_ApproveRole.NAME; - start1.NAME = "隐患上报审批"; - start1.DEAL_DATE = null; - start1.CREATE_TIME = null; - start1.STATUS = 0; - hiddenReportLog.logList.Add(start1); - } - } - else - { - OperateLogList start1 = new OperateLogList(); - start1.USER_NAME = "审批人"; - start1.NAME = "隐患上报审批"; - start1.DEAL_DATE = null; - start1.CREATE_TIME = null; - start1.STATUS = 0; - hiddenReportLog.logList.Add(start1); - } - } - else - { - var tempApprove = tasks.Where(t => t.SOURCE_DATA_ID == approveTemp.ID).OrderBy(t => t.MODIFY_TIME).ThenBy(m => m.CREATE_TIME).ToList(); - if (tempApprove != null && tempApprove.Any()) - { - foreach (var item in tempApprove) - { - OperateLogList start1 = new OperateLogList(); - start1.USER_NAME = item.USER_NAME; - start1.NAME = item.NOTICE_TITLE.Contains("驳回") ? "隐患上报已被驳回" : "隐患上报审批"; - start1.DEAL_DATE = item.TASK_DT; - start1.CREATE_TIME = item.CREATE_TIME; - start1.STATUS = item.NOTICE_STATUS == 1 ? 5 : item.NOTICE_STATUS == 2 ? 10 : item.NOTICE_STATUS == 4 ? 15 : 0; - hiddenReportLog.logList.Add(start1); - } - } - } - var temp2 = tasks.Where(t => t.SOURCE_DATA_ID == dangerReportId && t.NOTICE_TITLE.Contains("确认")).OrderBy(m=>m.MODIFY_TIME).ThenBy(n=>n.CREATE_TIME).ToList(); - if (temp2 != null && temp2.Any()) - { - foreach (var item in temp2) - { - OperateLogList start1 = new OperateLogList(); - start1.USER_NAME = item.USER_NAME; - start1.NAME = "隐患上报确认"; - start1.DEAL_DATE = item.TASK_DT; - start1.CREATE_TIME = item.CREATE_TIME; - start1.STATUS = item.NOTICE_STATUS == 1 ? 5 : item.NOTICE_STATUS == 2 ? 10 : item.NOTICE_STATUS == 4 ? 15 : 0; - hiddenReportLog.logList.Add(start1); - } - } - else + foreach (var item in temp4) { OperateLogList start1 = new OperateLogList(); - start1.USER_NAME = "整改责任人"; - start1.NAME = "隐患上报确认"; + start1.ID = safeRecordSumId; + start1.CODE = "SK012_SHOWPRINT"; + start1.USER_NAME = item.USER_NAME; + start1.NAME = "安全检查记录汇总确认"; + start1.DEAL_DATE = item.TASK_DT; + start1.CREATE_TIME = item.CREATE_TIME; + start1.STATUS = item.NOTICE_STATUS == 1 ? 5 : item.NOTICE_STATUS == 2 ? 10 : item.NOTICE_STATUS == 4 ? 15 : (item.NOTICE_STATUS == 0 && item.TASK_ENDDT >= DateTime.Now) ? 16 : (item.TASK_ENDDT < DateTime.Now && item.NOTICE_STATUS == 0) ? 20 : 0; + recordSumLog.logList.Add(start1); + } + } + } + else + { + OperateLogList start1 = new OperateLogList(); + start1.ID = null; + start1.CODE = "SK012_SHOWPRINT"; + start1.USER_NAME = "检查人"; + start1.NAME = "安全检查记录汇总确认"; + start1.DEAL_DATE = null; + start1.CREATE_TIME = null; + start1.STATUS = 0; + recordSumLog.logList.Add(start1); + } + } + else + { + OperateLogList start = new OperateLogList(); + start.ID = null; + start.CODE = "SK012_SHOWPRINT"; + start.USER_NAME = checkUser != null ? checkUser.NAME : "班长/安全员"; + start.NAME = "安全检查记录汇总"; + start.DEAL_DATE = null; + start.CREATE_TIME = null; + start.STATUS = 0; + recordSumLog.logList.Add(start); + OperateLogList start1 = new OperateLogList(); + start1.ID = null; + start1.CODE = "SK012_SHOWPRINT"; + start1.USER_NAME = "检查人"; + start1.NAME = "安全检查记录汇总确认"; + start1.DEAL_DATE = null; + start1.CREATE_TIME = null; + start1.STATUS = 0; + recordSumLog.logList.Add(start1); + } + result.Add(recordSumLog); + #endregion + + #region 隐患上报 + OperateLog hiddenReportLog = new OperateLog(); + hiddenReportLog.FORM_NAME = "隐患上报"; + hiddenReportLog.logList = new List(); + if (dangerReportId != null) + { + //发起 + var temp1 = tasks.FirstOrDefault(t => t.SOURCE_DATA_ID == dangerReportId && !t.NOTICE_TITLE.Contains("确认")); + if (temp1 != null) + { + OperateLogList start = new OperateLogList(); + start.ID = dangerReportId; + start.CODE = "SK014_SHOWPRINT"; + start.USER_NAME = temp1.USER_NAME; + start.NAME = "隐患上报"; + start.DEAL_DATE = temp1.TASK_DT; + start.CREATE_TIME = temp1.CREATE_TIME; + start.STATUS = temp1.NOTICE_STATUS == 1 ? 5 : temp1.NOTICE_STATUS == 2 ? 10 : temp1.NOTICE_STATUS == 4 ? 15 : (temp1.NOTICE_STATUS == 0 && temp1.TASK_ENDDT >= DateTime.Now) ? 16 : (temp1.TASK_ENDDT < DateTime.Now && temp1.NOTICE_STATUS == 0) ? 20 : 0; + hiddenReportLog.logList.Add(start); + } + else + { + OperateLogList start = new OperateLogList(); + start.ID = null; + start.CODE = "SK014_SHOWPRINT"; + start.USER_NAME = "上报人"; + start.NAME = "隐患上报"; + start.DEAL_DATE = null; + start.CREATE_TIME = null; + start.STATUS = 0; + hiddenReportLog.logList.Add(start); + } + //审批 + var approveTemp = approves.FirstOrDefault(t => t.DATA_ID == dangerReportId); + if (approveTemp == null) + { + //判断发起人层级,取审批模板 + var departFirst = departs.FirstOrDefault(t => t.ID == dangerReport.APPLY_DEPARTMENT_ID); + var param = Enum.GetName(typeof(SKDepartmentTypeEnum), departFirst.DEPARTMENT_TYPE); + if (departFirst.DEPARTMENT_STATUS != 1) + { + param = "公司级"; + } + var approveTempFirst = approveTemps.FirstOrDefault(t => t.PARAM == param && t.FORM_CODE == "SK014"); + if (approveTempFirst != null && approveTempFirst.Nav_ApproveTempDetails != null && approveTempFirst.Nav_ApproveTempDetails.Any()) + { + foreach (var item in approveTempFirst.Nav_ApproveTempDetails.OrderBy(t => t.NUM)) + { + OperateLogList start1 = new OperateLogList(); + start1.ID = null; + start1.CODE = "SK014_SHOWPRINT"; + start1.USER_NAME = item.Nav_ApproveRole.NAME; + start1.NAME = "隐患上报审批"; start1.DEAL_DATE = null; start1.CREATE_TIME = null; start1.STATUS = 0; @@ -2045,80 +2128,206 @@ namespace APT.SK.WebApi.Controllers.Api } else { - OperateLogList start = new OperateLogList(); - start.USER_NAME = "上报人"; - start.NAME = "隐患上报"; - start.DEAL_DATE = null; - start.CREATE_TIME = null; - start.STATUS = 0; - hiddenReportLog.logList.Add(start); - OperateLogList start2 = new OperateLogList(); - start2.USER_NAME = "审批人"; - start2.NAME = "隐患上报审批"; - start2.DEAL_DATE = null; - start2.CREATE_TIME = null; - start2.STATUS = 0; - hiddenReportLog.logList.Add(start2); OperateLogList start1 = new OperateLogList(); - start1.USER_NAME = "整改责任人"; - start1.NAME = "隐患上报确认"; + start1.ID = null; + start1.CODE = "SK014_SHOWPRINT"; + start1.USER_NAME = "审批人"; + start1.NAME = "隐患上报审批"; start1.DEAL_DATE = null; start1.CREATE_TIME = null; start1.STATUS = 0; hiddenReportLog.logList.Add(start1); } - result.Add(hiddenReportLog); - #endregion - - #region 隐患整改通知 - OperateLog rectifyNoticeLog = new OperateLog(); - rectifyNoticeLog.FORM_NAME = "隐患整改通知"; - rectifyNoticeLog.logList = new List(); - if (rectifyNoticeId != null) + } + else + { + var tempApprove = tasks.Where(t => t.SOURCE_DATA_ID == approveTemp.ID).OrderBy(t => t.MODIFY_TIME).ThenBy(m => m.CREATE_TIME).ToList(); + if (tempApprove != null && tempApprove.Any()) { - //发起 - var temp1 = tasks.FirstOrDefault(t => t.SOURCE_DATA_ID == rectifyNoticeId && !t.NOTICE_TITLE.Contains("确认")); - OperateLogList start = new OperateLogList(); - start.USER_NAME = temp1.USER_NAME; - start.NAME = "隐患整改通知"; - start.DEAL_DATE = temp1.TASK_DT; - start.CREATE_TIME = temp1.CREATE_TIME; - start.STATUS = temp1.NOTICE_STATUS == 1 ? 5 : temp1.NOTICE_STATUS == 2 ? 10 : temp1.NOTICE_STATUS == 4 ? 15 : 0; - rectifyNoticeLog.logList.Add(start); - var temp2 = tasks.Where(t => t.SOURCE_DATA_ID == rectifyNoticeId && t.NOTICE_TITLE.Contains("确认")).OrderBy(m => m.MODIFY_TIME).ThenBy(n => n.CREATE_TIME).ToList(); - if (temp2 != null && temp2.Any()) + foreach (var item in tempApprove) { - foreach (var item in temp2) + OperateLogList start1 = new OperateLogList(); + start1.ID = approveTemp.DATA_ID; + start1.CODE = "SK014_SHOWPRINT"; + start1.USER_NAME = item.USER_NAME; + start1.NAME = item.NOTICE_TITLE.Contains("驳回") ? "隐患上报已被驳回" : "隐患上报审批"; + start1.DEAL_DATE = item.TASK_DT; + start1.CREATE_TIME = item.CREATE_TIME; + start1.STATUS = item.NOTICE_STATUS == 1 ? 5 : item.NOTICE_STATUS == 2 ? 10 : item.NOTICE_STATUS == 4 ? 15 : (item.NOTICE_STATUS == 0 && item.TASK_ENDDT >= DateTime.Now) ? 16 : (item.TASK_ENDDT < DateTime.Now && item.NOTICE_STATUS == 0) ? 20 : 0; + hiddenReportLog.logList.Add(start1); + } + } + } + var temp2 = tasks.Where(t => t.SOURCE_DATA_ID == dangerReportId && t.NOTICE_TITLE.Contains("确认")).OrderBy(m => m.MODIFY_TIME).ThenBy(n => n.CREATE_TIME).ToList(); + if (temp2 != null && temp2.Any()) + { + var temp3 = temp2.Where(t => t.NOTICE_STATUS == 1).OrderBy(m => m.MODIFY_TIME).ToList(); + if (temp3 != null && temp3.Any()) + { + foreach (var item in temp3) + { + OperateLogList start1 = new OperateLogList(); + start1.ID = dangerReportId; + start1.CODE = "SK014_SHOWPRINT"; + start1.USER_NAME = item.USER_NAME; + start1.NAME = "隐患上报确认"; + start1.DEAL_DATE = item.TASK_DT; + start1.CREATE_TIME = item.CREATE_TIME; + start1.STATUS = item.NOTICE_STATUS == 1 ? 5 : item.NOTICE_STATUS == 2 ? 10 : item.NOTICE_STATUS == 4 ? 15 : (item.NOTICE_STATUS == 0 && item.TASK_ENDDT >= DateTime.Now) ? 16 : (item.TASK_ENDDT < DateTime.Now && item.NOTICE_STATUS == 0) ? 20 : 0; + hiddenReportLog.logList.Add(start1); + } + } + + var temp4 = temp2.Where(t => t.NOTICE_STATUS != 1).OrderByDescending(n => n.NOTICE_STATUS).ThenBy(m => m.MODIFY_TIME).ToList(); + if (temp3 != null && temp3.Any()) + { + foreach (var item in temp4) + { + OperateLogList start1 = new OperateLogList(); + start1.ID = dangerReportId; + start1.CODE = "SK014_SHOWPRINT"; + start1.USER_NAME = item.USER_NAME; + start1.NAME = "隐患上报确认"; + start1.DEAL_DATE = item.TASK_DT; + start1.CREATE_TIME = item.CREATE_TIME; + start1.STATUS = item.NOTICE_STATUS == 1 ? 5 : item.NOTICE_STATUS == 2 ? 10 : item.NOTICE_STATUS == 4 ? 15 : (item.NOTICE_STATUS == 0 && item.TASK_ENDDT >= DateTime.Now) ? 16 : (item.TASK_ENDDT < DateTime.Now && item.NOTICE_STATUS == 0) ? 20 : 0; + hiddenReportLog.logList.Add(start1); + } + } + } + else + { + OperateLogList start1 = new OperateLogList(); + start1.ID = null; + start1.CODE = "SK014_SHOWPRINT"; + start1.USER_NAME = "整改责任人"; + start1.NAME = "隐患上报确认"; + start1.DEAL_DATE = null; + start1.CREATE_TIME = null; + start1.STATUS = 0; + hiddenReportLog.logList.Add(start1); + } + } + else + { + OperateLogList start = new OperateLogList(); + start.ID = null; + start.CODE = "SK014_SHOWPRINT"; + start.USER_NAME = "上报人"; + start.NAME = "隐患上报"; + start.DEAL_DATE = null; + start.CREATE_TIME = null; + start.STATUS = 0; + hiddenReportLog.logList.Add(start); + OperateLogList start2 = new OperateLogList(); + start2.ID = null; + start2.CODE = "SK014_SHOWPRINT"; + start2.USER_NAME = "审批人"; + start2.NAME = "隐患上报审批"; + start2.DEAL_DATE = null; + start2.CREATE_TIME = null; + start2.STATUS = 0; + hiddenReportLog.logList.Add(start2); + OperateLogList start1 = new OperateLogList(); + start1.ID = null; + start1.CODE = "SK014_SHOWPRINT"; + start1.USER_NAME = "整改责任人"; + start1.NAME = "隐患上报确认"; + start1.DEAL_DATE = null; + start1.CREATE_TIME = null; + start1.STATUS = 0; + hiddenReportLog.logList.Add(start1); + } + result.Add(hiddenReportLog); + #endregion + } + if (hand != null) + { + var handUser = users.FirstOrDefault(t => t.ID == hand.APPLY_USER_ID); + #region 手动隐患上报 + OperateLog handLog = new OperateLog(); + handLog.FORM_NAME = "安全检查记录"; + handLog.logList = new List(); + if (handId != null) + { + OperateLogList start = new OperateLogList(); + start.ID = handId; + start.CODE = "SK016_SHOWPRINT"; + start.USER_NAME = handUser.NAME; + start.NAME = "手动隐患上报"; + start.DEAL_DATE = hand.STATUS == PFStandardStatus.Draft ? null : hand.MODIFY_TIME; + start.CREATE_TIME = check.CREATE_TIME; + start.STATUS = hand.STATUS == PFStandardStatus.Draft ? 16 : 5; + handLog.logList.Add(start); + } + #endregion + #region 隐患确认单 + #endregion + } + #region 隐患整改通知 + + if (rectifyNoticeIds != null && rectifyNoticeIds.Any()) + { + //发起 + var items = tasks.Where(t => t.SOURCE_DATA_ID != null && rectifyNoticeIds.Contains((Guid)t.SOURCE_DATA_ID) && !t.NOTICE_TITLE.Contains("确认")).OrderByDescending(m => m.NOTICE_STATUS = 1).ThenBy(n => n.MODIFY_TIME).ToList(); + if (items != null && items.Any()) + { + foreach (var temp1 in items) + { + //发起 + OperateLog rectifyNoticeLog = new OperateLog(); + rectifyNoticeLog.FORM_NAME = "隐患整改通知"; + rectifyNoticeLog.logList = new List(); + OperateLogList start = new OperateLogList(); + start.ID = temp1.SOURCE_DATA_ID; + start.CODE = "SK020_SHOWPRINT"; + start.USER_NAME = temp1.USER_NAME; + start.NAME = "隐患整改通知"; + start.DEAL_DATE = temp1.TASK_DT; + start.CREATE_TIME = temp1.CREATE_TIME; + start.STATUS = temp1.NOTICE_STATUS == 1 ? 5 : temp1.NOTICE_STATUS == 2 ? 10 : temp1.NOTICE_STATUS == 4 ? 15 : (temp1.NOTICE_STATUS == 0 && temp1.TASK_ENDDT >= DateTime.Now) ? 16 : (temp1.TASK_ENDDT < DateTime.Now && temp1.NOTICE_STATUS == 0) ? 20 : 0; + rectifyNoticeLog.logList.Add(start); + var temp2 = tasks.Where(t => t.SOURCE_DATA_ID == temp1.SOURCE_DATA_ID && t.NOTICE_TITLE.Contains("确认")).OrderBy(m => m.MODIFY_TIME).ThenBy(n => n.CREATE_TIME).ToList(); + if (temp2 != null && temp2.Any()) + { + var temp3 = temp2.Where(t => t.NOTICE_STATUS == 1).OrderBy(m => m.MODIFY_TIME).ToList(); + if (temp3 != null && temp3.Any()) + { + foreach (var item in temp3) { OperateLogList start1 = new OperateLogList(); + start1.ID = temp1.SOURCE_DATA_ID; + start1.CODE = "SK020_SHOWPRINT"; start1.USER_NAME = item.USER_NAME; start1.NAME = "隐患整改通知确认"; start1.DEAL_DATE = item.TASK_DT; start1.CREATE_TIME = item.CREATE_TIME; - start1.STATUS = item.NOTICE_STATUS == 1 ? 5 : item.NOTICE_STATUS == 2 ? 10 : item.NOTICE_STATUS == 4 ? 15 : 0; + start1.STATUS = item.NOTICE_STATUS == 1 ? 5 : item.NOTICE_STATUS == 2 ? 10 : item.NOTICE_STATUS == 4 ? 15 : (item.NOTICE_STATUS == 0 && item.TASK_ENDDT >= DateTime.Now) ? 16 : (item.TASK_ENDDT < DateTime.Now && item.NOTICE_STATUS == 0) ? 20 : 0; rectifyNoticeLog.logList.Add(start1); } } - else + var temp4 = temp2.Where(t => t.NOTICE_STATUS != 1).OrderByDescending(m => m.NOTICE_STATUS).ThenBy(n => n.MODIFY_TIME).ToList(); + if (temp4 != null && temp4.Any()) { - OperateLogList start1 = new OperateLogList(); - start1.USER_NAME = "整改责任人"; - start1.NAME = "隐患整改通知确认"; - start1.DEAL_DATE = null; - start1.CREATE_TIME = null; - start1.STATUS = 0; - rectifyNoticeLog.logList.Add(start1); + foreach (var item in temp4) + { + OperateLogList start1 = new OperateLogList(); + start1.ID = temp1.SOURCE_DATA_ID; + start1.CODE = "SK020_SHOWPRINT"; + start1.USER_NAME = item.USER_NAME; + start1.NAME = "隐患整改通知确认"; + start1.DEAL_DATE = item.TASK_DT; + start1.CREATE_TIME = item.CREATE_TIME; + start1.STATUS = item.NOTICE_STATUS == 1 ? 5 : item.NOTICE_STATUS == 2 ? 10 : item.NOTICE_STATUS == 4 ? 15 : (item.NOTICE_STATUS == 0 && item.TASK_ENDDT >= DateTime.Now) ? 16 : (item.TASK_ENDDT < DateTime.Now && item.NOTICE_STATUS == 0) ? 20 : 0; + rectifyNoticeLog.logList.Add(start1); + } } } - else { - OperateLogList start = new OperateLogList(); - start.USER_NAME = "安全员/上报人"; - start.NAME = "隐患整改通知"; - start.DEAL_DATE = null; - start.CREATE_TIME = null; - start.STATUS = 0; - rectifyNoticeLog.logList.Add(start); + else + { OperateLogList start1 = new OperateLogList(); + start1.ID = null; + start1.CODE = "SK020_SHOWPRINT"; start1.USER_NAME = "整改责任人"; start1.NAME = "隐患整改通知确认"; start1.DEAL_DATE = null; @@ -2127,163 +2336,236 @@ namespace APT.SK.WebApi.Controllers.Api rectifyNoticeLog.logList.Add(start1); } result.Add(rectifyNoticeLog); - #endregion + } + } + else + { + OperateLog rectifyNoticeLog = new OperateLog(); + rectifyNoticeLog.FORM_NAME = "隐患整改通知"; + rectifyNoticeLog.logList = new List(); + OperateLogList start = new OperateLogList(); + start.ID = null; + start.CODE = "SK020_SHOWPRINT"; + start.USER_NAME = "安全员/上报人"; + start.NAME = "隐患整改通知"; + start.DEAL_DATE = null; + start.CREATE_TIME = null; + start.STATUS = 0; + rectifyNoticeLog.logList.Add(start); + OperateLogList start1 = new OperateLogList(); + start1.ID = null; + start1.CODE = "SK020_SHOWPRINT"; + start1.USER_NAME = "整改责任人"; + start1.NAME = "隐患整改通知确认"; + start1.DEAL_DATE = null; + start1.CREATE_TIME = null; + start1.STATUS = 0; + rectifyNoticeLog.logList.Add(start1); + result.Add(rectifyNoticeLog); + } + } + else + { + OperateLog rectifyNoticeLog = new OperateLog(); + rectifyNoticeLog.FORM_NAME = "隐患整改通知"; + rectifyNoticeLog.logList = new List(); + OperateLogList start = new OperateLogList(); + start.ID = null; + start.CODE = "SK020_SHOWPRINT"; + start.USER_NAME = "安全员/上报人"; + start.NAME = "隐患整改通知"; + start.DEAL_DATE = null; + start.CREATE_TIME = null; + start.STATUS = 0; + rectifyNoticeLog.logList.Add(start); + OperateLogList start1 = new OperateLogList(); + start1.ID = null; + start1.CODE = "SK020_SHOWPRINT"; + start1.USER_NAME = "整改责任人"; + start1.NAME = "隐患整改通知确认"; + start1.DEAL_DATE = null; + start1.CREATE_TIME = null; + start1.STATUS = 0; + rectifyNoticeLog.logList.Add(start1); + result.Add(rectifyNoticeLog); + } + #endregion - #region 隐患整改记录 - if (rectifyRecordIds != null && rectifyRecordIds.Any()) + #region 隐患整改记录 + if (rectifyRecordIds != null && rectifyRecordIds.Any()) + { + //发起 + var items = tasks.Where(t => t.SOURCE_DATA_ID != null && rectifyRecordIds.Contains((Guid)t.SOURCE_DATA_ID) && !t.NOTICE_TITLE.Contains("确认") && !t.NOTICE_TITLE.Contains("验收")).OrderByDescending(m => m.NOTICE_STATUS = 1).ThenBy(n => n.MODIFY_TIME).ToList(); + if (items != null && items.Any()) + { + foreach (var temp1 in items) + { + OperateLog refRecordLog = new OperateLog(); + refRecordLog.FORM_NAME = "隐患整改记录"; + refRecordLog.logList = new List(); + OperateLogList start = new OperateLogList(); + start.ID = temp1.SOURCE_DATA_ID; + start.CODE = "SK022_SHOWPRINT"; + start.USER_NAME = temp1.USER_NAME; + start.NAME = "隐患整改记录"; + start.DEAL_DATE = temp1.TASK_DT; + start.CREATE_TIME = temp1.CREATE_TIME; + start.STATUS = temp1.NOTICE_STATUS == 1 ? 5 : temp1.NOTICE_STATUS == 2 ? 10 : temp1.NOTICE_STATUS == 4 ? 15 : (temp1.NOTICE_STATUS == 0 && temp1.TASK_ENDDT >= DateTime.Now) ? 16 : (temp1.TASK_ENDDT < DateTime.Now && temp1.NOTICE_STATUS == 0) ? 20 : 0; + refRecordLog.logList.Add(start); + //验收 + var temp2 = tasks.FirstOrDefault(t => t.SOURCE_DATA_ID != null && t.SOURCE_DATA_ID == temp1.SOURCE_DATA_ID && t.NOTICE_TITLE.Contains("验收")); + if (temp2 != null) { - //发起 - var items = tasks.Where(t =>t.SOURCE_DATA_ID!=null && rectifyRecordIds.Contains((Guid)t.SOURCE_DATA_ID) && !t.NOTICE_TITLE.Contains("确认") && !t.NOTICE_TITLE.Contains("验收")).OrderBy(m=>m.MODIFY_TIME).ThenBy(n=>n.CREATE_TIME).ToList(); - if (items != null && items.Any()) - { - foreach (var temp1 in items) - { - OperateLog refRecordLog = new OperateLog(); - refRecordLog.FORM_NAME = "隐患整改记录"; - refRecordLog.logList = new List(); - OperateLogList start = new OperateLogList(); - start.USER_NAME = temp1.USER_NAME; - start.NAME = "隐患整改记录"; - start.DEAL_DATE = temp1.TASK_DT; - start.CREATE_TIME = temp1.CREATE_TIME; - start.STATUS = temp1.NOTICE_STATUS == 1 ? 5 : temp1.NOTICE_STATUS == 2 ? 10 : temp1.NOTICE_STATUS == 4 ? 15 : 0; - refRecordLog.logList.Add(start); - //验收 - var temp2 = tasks.FirstOrDefault(t => t.SOURCE_DATA_ID!=null && t.SOURCE_DATA_ID == temp1.SOURCE_DATA_ID && t.NOTICE_TITLE.Contains("验收")); - if (temp2 != null) - { - OperateLogList start1 = new OperateLogList(); - start1.USER_NAME = temp2.USER_NAME; - start1.NAME = "隐患整改记录验收"; - start1.DEAL_DATE = temp2.TASK_DT; - start1.CREATE_TIME = temp2.CREATE_TIME; - start1.STATUS = temp2.NOTICE_STATUS == 1 ? 5 : temp2.NOTICE_STATUS == 2 ? 10 : temp2.NOTICE_STATUS == 4 ? 15 : 0; - refRecordLog.logList.Add(start1); - } - else - { - OperateLogList start1 = new OperateLogList(); - start1.USER_NAME = "验收人"; - start1.NAME = "隐患整改记录验收"; - start1.DEAL_DATE = null; - start1.CREATE_TIME = null; - start1.STATUS = 0; - refRecordLog.logList.Add(start1); - } - //审批 - var approveTemp = approves.FirstOrDefault(t => t.DATA_ID == temp1.SOURCE_DATA_ID); - if (approveTemp == null) - { - //判断重大还是一般,取审批模板 - var recordFirst = rectifyRecords.FirstOrDefault(t => t.ID == temp1.SOURCE_DATA_ID); - var param = recordFirst.HIDDEN_LEVEL.GetDescription(); - var approveTempFirst = approveTemps.FirstOrDefault(t => t.PARAM == param && t.FORM_CODE == "SK022"); - if (approveTempFirst != null && approveTempFirst.Nav_ApproveTempDetails != null && approveTempFirst.Nav_ApproveTempDetails.Any()) - { - foreach (var item in approveTempFirst.Nav_ApproveTempDetails.OrderBy(t => t.NUM)) - { - OperateLogList start1 = new OperateLogList(); - start1.USER_NAME = item.Nav_ApproveRole.NAME; - start1.NAME = "隐患整改记录审批"; - start1.DEAL_DATE = null; - start1.CREATE_TIME = null; - start1.STATUS = 0; - refRecordLog.logList.Add(start1); - } - } - else - { - OperateLogList start1 = new OperateLogList(); - start1.USER_NAME = "审批人"; - start1.NAME = "隐患整改记录审批"; - start1.DEAL_DATE = null; - start1.CREATE_TIME = null; - start1.STATUS = 0; - refRecordLog.logList.Add(start1); - } - } - else - { - var tempApprove = tasks.Where(t => t.SOURCE_DATA_ID == approveTemp.ID).OrderBy(t => t.MODIFY_TIME).ThenBy(m => m.CREATE_TIME).ToList(); - if (tempApprove != null && tempApprove.Any()) - { - foreach (var item in tempApprove) - { - OperateLogList start1 = new OperateLogList(); - start1.USER_NAME = item.USER_NAME; - start1.NAME = item.NOTICE_TITLE.Contains("驳回") ? "隐患整改记录已被驳回" : "隐患整改记录审批"; - start1.DEAL_DATE = item.TASK_DT; - start1.CREATE_TIME = item.CREATE_TIME; - start1.STATUS = item.NOTICE_STATUS == 1 ? 5 : item.NOTICE_STATUS == 2 ? 10 : item.NOTICE_STATUS == 4 ? 15 : 0; - refRecordLog.logList.Add(start1); - } - } - } - result.Add(refRecordLog); - } - } - else - { - OperateLog refRecordLog = new OperateLog(); - refRecordLog.FORM_NAME = "隐患整改记录"; - refRecordLog.logList = new List(); - OperateLogList start = new OperateLogList(); - start.USER_NAME = "整改落实人"; - start.NAME = "隐患整改记录"; - start.DEAL_DATE = null; - start.CREATE_TIME = null; - start.STATUS = 0; - refRecordLog.logList.Add(start); - OperateLogList start1 = new OperateLogList(); - start1.USER_NAME = "验收人"; - start1.NAME = "隐患整改记录验收"; - start1.DEAL_DATE = null; - start1.CREATE_TIME = null; - start1.STATUS = 0; - refRecordLog.logList.Add(start1); - OperateLogList start2 = new OperateLogList(); - start2.USER_NAME = "审批人"; - start2.NAME = "隐患整改记录审批"; - start2.DEAL_DATE = null; - start2.CREATE_TIME = null; - start2.STATUS = 0; - refRecordLog.logList.Add(start2); - result.Add(refRecordLog); - } + OperateLogList start1 = new OperateLogList(); + start1.ID = temp1.SOURCE_DATA_ID; + start1.CODE = "SK022_SHOWPRINT"; + start1.USER_NAME = temp2.USER_NAME; + start1.NAME = "隐患整改记录验收"; + start1.DEAL_DATE = temp2.TASK_DT; + start1.CREATE_TIME = temp2.CREATE_TIME; + start1.STATUS = temp2.NOTICE_STATUS == 1 ? 5 : temp2.NOTICE_STATUS == 2 ? 10 : temp2.NOTICE_STATUS == 4 ? 15 : (temp2.NOTICE_STATUS == 0 && temp2.TASK_ENDDT >= DateTime.Now) ? 16 : (temp2.TASK_ENDDT < DateTime.Now && temp2.NOTICE_STATUS == 0) ? 20 : 0; + refRecordLog.logList.Add(start1); } else { - OperateLog refRecordLog = new OperateLog(); - refRecordLog.FORM_NAME = "隐患整改记录"; - refRecordLog.logList = new List(); - OperateLogList start = new OperateLogList(); - start.USER_NAME = "整改落实人"; - start.NAME = "隐患整改记录"; - start.DEAL_DATE = null; - start.CREATE_TIME = null; - start.STATUS = 0; - refRecordLog.logList.Add(start); OperateLogList start1 = new OperateLogList(); + start1.ID = null; + start1.CODE = "SK022_SHOWPRINT"; start1.USER_NAME = "验收人"; start1.NAME = "隐患整改记录验收"; start1.DEAL_DATE = null; start1.CREATE_TIME = null; start1.STATUS = 0; refRecordLog.logList.Add(start1); - OperateLogList start2 = new OperateLogList(); - start2.USER_NAME = "审批人"; - start2.NAME = "隐患整改记录审批"; - start2.DEAL_DATE = null; - start2.CREATE_TIME = null; - start2.STATUS = 0; - refRecordLog.logList.Add(start2); - result.Add(refRecordLog); } - #endregion - } - return result; - } - }); + //审批 + var approveTemp = approves.FirstOrDefault(t => t.DATA_ID == temp1.SOURCE_DATA_ID); + if (approveTemp == null) + { + //判断重大还是一般,取审批模板 + var recordFirst = rectifyRecords.FirstOrDefault(t => t.ID == temp1.SOURCE_DATA_ID); + var param = recordFirst.HIDDEN_LEVEL.GetDescription(); + var approveTempFirst = approveTemps.FirstOrDefault(t => t.PARAM == param && t.FORM_CODE == "SK022"); + if (approveTempFirst != null && approveTempFirst.Nav_ApproveTempDetails != null && approveTempFirst.Nav_ApproveTempDetails.Any()) + { + foreach (var item in approveTempFirst.Nav_ApproveTempDetails.OrderBy(t => t.NUM)) + { + OperateLogList start1 = new OperateLogList(); + start1.ID = null; + start1.CODE = "SK022_SHOWPRINT"; + start1.USER_NAME = item.Nav_ApproveRole.NAME; + start1.NAME = "隐患整改记录审批"; + start1.DEAL_DATE = null; + start1.CREATE_TIME = null; + start1.STATUS = 0; + refRecordLog.logList.Add(start1); + } + } + else + { + OperateLogList start1 = new OperateLogList(); + start1.ID = null; + start1.CODE = "SK022_SHOWPRINT"; + start1.USER_NAME = "审批人"; + start1.NAME = "隐患整改记录审批"; + start1.DEAL_DATE = null; + start1.CREATE_TIME = null; + start1.STATUS = 0; + refRecordLog.logList.Add(start1); + } + } + else + { + var tempApprove = tasks.Where(t => t.SOURCE_DATA_ID == approveTemp.ID).OrderBy(t => t.MODIFY_TIME).ThenBy(m => m.CREATE_TIME).ToList(); + if (tempApprove != null && tempApprove.Any()) + { + foreach (var item in tempApprove) + { + OperateLogList start1 = new OperateLogList(); + start1.ID = approveTemp.DATA_ID; + start1.CODE = "SK022_SHOWPRINT"; + start1.USER_NAME = item.USER_NAME; + start1.NAME = item.NOTICE_TITLE.Contains("驳回") ? "隐患整改记录已被驳回" : "隐患整改记录审批"; + start1.DEAL_DATE = item.TASK_DT; + start1.CREATE_TIME = item.CREATE_TIME; + start1.STATUS = item.NOTICE_STATUS == 1 ? 5 : item.NOTICE_STATUS == 2 ? 10 : item.NOTICE_STATUS == 4 ? 15 : (item.NOTICE_STATUS == 0 && item.TASK_ENDDT >= DateTime.Now) ? 16 : (item.TASK_ENDDT < DateTime.Now && item.NOTICE_STATUS == 0) ? 20 : 0; + refRecordLog.logList.Add(start1); + } + } + } + result.Add(refRecordLog); + } + } + else + { + OperateLog refRecordLog = new OperateLog(); + refRecordLog.FORM_NAME = "隐患整改通知"; + refRecordLog.logList = new List(); + OperateLogList start = new OperateLogList(); + start.ID = null; + start.CODE = "SK022_SHOWPRINT"; + start.USER_NAME = "整改落实人"; + start.NAME = "隐患整改记录"; + start.DEAL_DATE = null; + start.CREATE_TIME = null; + start.STATUS = 0; + refRecordLog.logList.Add(start); + OperateLogList start1 = new OperateLogList(); + start1.ID = null; + start1.CODE = "SK022_SHOWPRINT"; + start1.USER_NAME = "验收人"; + start1.NAME = "隐患整改记录验收"; + start1.DEAL_DATE = null; + start1.CREATE_TIME = null; + start1.STATUS = 0; + refRecordLog.logList.Add(start1); + OperateLogList start2 = new OperateLogList(); + start2.ID = null; + start2.CODE = "SK022_SHOWPRINT"; + start2.USER_NAME = "审批人"; + start2.NAME = "隐患整改记录审批"; + start2.DEAL_DATE = null; + start2.CREATE_TIME = null; + start2.STATUS = 0; + refRecordLog.logList.Add(start2); + result.Add(refRecordLog); + } + } + else + { + OperateLog refRecordLog = new OperateLog(); + refRecordLog.FORM_NAME = "隐患整改记录"; + refRecordLog.logList = new List(); + OperateLogList start = new OperateLogList(); + start.ID = null; + start.CODE = "SK022_SHOWPRINT"; + start.USER_NAME = "整改落实人"; + start.NAME = "隐患整改记录"; + start.DEAL_DATE = null; + start.CREATE_TIME = null; + start.STATUS = 0; + refRecordLog.logList.Add(start); + OperateLogList start1 = new OperateLogList(); + start1.ID = null; + start1.CODE = "SK022_SHOWPRINT"; + start1.USER_NAME = "验收人"; + start1.NAME = "隐患整改记录验收"; + start1.DEAL_DATE = null; + start1.CREATE_TIME = null; + start1.STATUS = 0; + refRecordLog.logList.Add(start1); + OperateLogList start2 = new OperateLogList(); + start2.ID = null; + start2.CODE = "SK022_SHOWPRINT"; + start2.USER_NAME = "审批人"; + start2.NAME = "隐患整改记录审批"; + start2.DEAL_DATE = null; + start2.CREATE_TIME = null; + start2.STATUS = 0; + refRecordLog.logList.Add(start2); + result.Add(refRecordLog); + } + #endregion } } }