From b42580ef3189511064b72ae46c042b81b12e2fbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E7=BE=8E=E8=8D=A3?= <991152047@qq.com> Date: Wed, 10 Apr 2024 14:01:09 +0800 Subject: [PATCH 1/9] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/CrucialLicenseJobOutsourceController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/APT.MicroApi/APT.FO.WebApi/Controllers/CrucialLicenseJobOutsourceController.cs b/APT.MicroApi/APT.FO.WebApi/Controllers/CrucialLicenseJobOutsourceController.cs index a294d06..eb9b15b 100644 --- a/APT.MicroApi/APT.FO.WebApi/Controllers/CrucialLicenseJobOutsourceController.cs +++ b/APT.MicroApi/APT.FO.WebApi/Controllers/CrucialLicenseJobOutsourceController.cs @@ -323,7 +323,7 @@ namespace APT.FO.WebApi.Controllers var curentApprove = appdetails.FirstOrDefault(i => i.APPROVE_USER_ID == applyUserId); if (curentApprove != null) { - var removeApprove = appdetails.Where(i => i.NUM < curentApprove.NUM && i.NODE_APPROVE_STATUS == (int)NodeApproveStatus.Doing); + var removeApprove = appdetails.Where(i => i.NUM < curentApprove.NUM && i.NODE_APPROVE_STATUS == (int)NodeApproveStatus.Doing).ToList(); if (removeApprove != null && removeApprove.Any()) { foreach (var item in removeApprove) From cd190293fa2e01013082fcd294d4a620456fba96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E7=BE=8E=E8=8D=A3?= <991152047@qq.com> Date: Wed, 10 Apr 2024 14:19:50 +0800 Subject: [PATCH 2/9] 1 --- .../Services/PF/PFApproveCallBackService.cs | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/APT.BaseData.Services/Services/PF/PFApproveCallBackService.cs b/APT.BaseData.Services/Services/PF/PFApproveCallBackService.cs index c115016..457f656 100644 --- a/APT.BaseData.Services/Services/PF/PFApproveCallBackService.cs +++ b/APT.BaseData.Services/Services/PF/PFApproveCallBackService.cs @@ -1899,7 +1899,7 @@ namespace APT.BaseData.Services.DomainServices }); } - var user = this.GetEntity(t => t.ENABLE_STATUS == (int)FMEnableStatusEnum.启用 && t.ID == tech.DISCLOSURE_PERSON_ID); + var user = this.GetEntity(t => t.ENABLE_STATUS == (int)FMEnableStatusEnum.启用 && t.ID == entity.APPLY_USER_ID); //发消息 DateTime dtEnd = NotificationTaskService.GetTaskEndTime(FMTASKTYPE.JobSite, entity.ORG_ID.Value, DateTime.Now, null, null); notices.Add(NotificationTaskService.InsertUserNoticeTaskModel("安全技术交底表(外包)", tech.ID, entity.ORG_ID, user.ID, user.NAME, DateTime.Now, @@ -2213,15 +2213,15 @@ namespace APT.BaseData.Services.DomainServices tech.IS_AUTO = (int)ISImportantEnum.是; tech.IS_OUTSOURCE = true; tech.RELATED_ID = entity.RELATED_ID; - if (entity.MONITOR_USER_ID != null) - { - T_FO_TECH_DISCLOSURE_PERSON person = new T_FO_TECH_DISCLOSURE_PERSON(); - person.ORG_ID = entity.ORG_ID; - person.USER_ID = entity.MONITOR_USER_ID; - person.TECH_DISCLOSURE_FROM_ID = tech.ID; - person.CREATER_ID = entity.CREATER_ID; - techUsers.Add(person); - } + //if (entity.MONITOR_USER_ID != null) + //{ + // T_FO_TECH_DISCLOSURE_PERSON person = new T_FO_TECH_DISCLOSURE_PERSON(); + // person.ORG_ID = entity.ORG_ID; + // person.USER_ID = entity.MONITOR_USER_ID; + // person.TECH_DISCLOSURE_FROM_ID = tech.ID; + // person.CREATER_ID = entity.CREATER_ID; + // techUsers.Add(person); + //} if (entity.Nav_CrucialLicensePerson != null && entity.Nav_CrucialLicensePerson.Any()) { entity.Nav_CrucialLicensePerson.ForEach(t => From 35c0580c8c2a1a16f37f65d488c0a007ff5d1796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E7=BE=8E=E8=8D=A3?= <991152047@qq.com> Date: Wed, 10 Apr 2024 14:31:09 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E7=A5=A8=E5=A4=96?= =?UTF-8?q?=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CrucialLicenseJobOutsourceController.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/APT.MicroApi/APT.FO.WebApi/Controllers/CrucialLicenseJobOutsourceController.cs b/APT.MicroApi/APT.FO.WebApi/Controllers/CrucialLicenseJobOutsourceController.cs index eb9b15b..192e0e3 100644 --- a/APT.MicroApi/APT.FO.WebApi/Controllers/CrucialLicenseJobOutsourceController.cs +++ b/APT.MicroApi/APT.FO.WebApi/Controllers/CrucialLicenseJobOutsourceController.cs @@ -338,14 +338,14 @@ namespace APT.FO.WebApi.Controllers appdetails.Where(i => i.NUM == appdetails.Min(x => x.NUM) && i.APPROVE_USER_ID != applyUserId && i.NODE_APPROVE_STATUS == (int)NodeApproveStatus.Doing).ForEach(i => i.IS_CURRENT = true); sendUserIds = appdetails.Where(i => i.NUM == appdetails.Min(x => x.NUM) && i.APPROVE_USER_ID != applyUserId).Select(t => (Guid)t.APPROVE_USER_ID).ToList(); } - //else - //{ - // var appdetailsAll = appdetails; - // var removeTemps = appdetailsAll.FirstOrDefault(i => i.NUM == appdetails.Min(x => x.NUM) && i.APPROVE_USER_ID == applyUserId); - // appdetailsAll.Remove(removeTemps); - // appdetails.Where(i => i.NUM == appdetailsAll.Min(x => x.NUM) && i.NODE_APPROVE_STATUS == (int)NodeApproveStatus.Doing).ForEach(i => i.IS_CURRENT = true); - // sendUserIds = appdetails.Where(i => i.NUM == appdetailsAll.Min(x => x.NUM) && i.NODE_APPROVE_STATUS == (int)NodeApproveStatus.Doing).Select(t => (Guid)t.APPROVE_USER_ID).ToList(); - //} + else + { + var appdetailsAll = appdetails; + var removeTemps = appdetailsAll.FirstOrDefault(i => i.NUM == appdetails.Min(x => x.NUM) && i.APPROVE_USER_ID == applyUserId); + appdetailsAll.Remove(removeTemps); + appdetails.Where(i => i.NUM == appdetailsAll.Min(x => x.NUM) && i.NODE_APPROVE_STATUS == (int)NodeApproveStatus.Doing).ForEach(i => i.IS_CURRENT = true); + sendUserIds = appdetails.Where(i => i.NUM == appdetailsAll.Min(x => x.NUM) && i.NODE_APPROVE_STATUS == (int)NodeApproveStatus.Doing).Select(t => (Guid)t.APPROVE_USER_ID).ToList(); + } if (sendUserIds != null && sendUserIds.Any()) { var sendUserNames = new List(); From 81eb1855efe4b473671f9aba880b22d93422d129 Mon Sep 17 00:00:00 2001 From: wjn Date: Wed, 10 Apr 2024 14:41:45 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E5=A4=84=E7=90=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/PreShiftMeetingRecordController.cs | 7 ++++++- .../APT.HM.WebApi/Controllers/Api/RiskRecordController.cs | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/APT.MicroApi/APT.FO.WebApi/Controllers/PreShiftMeetingRecordController.cs b/APT.MicroApi/APT.FO.WebApi/Controllers/PreShiftMeetingRecordController.cs index 2f793e4..ff06ce4 100644 --- a/APT.MicroApi/APT.FO.WebApi/Controllers/PreShiftMeetingRecordController.cs +++ b/APT.MicroApi/APT.FO.WebApi/Controllers/PreShiftMeetingRecordController.cs @@ -147,7 +147,12 @@ namespace APT.FO.WebApi.Controllers.Api.FO { entity.PRE_MEETING_STATUS = FOPreMeetingStatusEnum.归档; } - sendNotices = NotificationTaskService.InsertUserNoticeTaskModels(title, entity.ID, entity.ORG_ID, userIds, userNames, DateTime.Now, entity.START_TIME.AddHours(1), (int)FMNoticeTypeEnum.消息, "FO003_SHOWPRINT"); + var endTime = DateTime.Now.AddHours(1); + if (entity.START_TIME != DateTime.MinValue) + { + endTime = entity.START_TIME.AddHours(1); + } + sendNotices = NotificationTaskService.InsertUserNoticeTaskModels(title, entity.ID, entity.ORG_ID, userIds, userNames, DateTime.Now, endTime, (int)FMNoticeTypeEnum.消息, "FO003_SHOWPRINT"); var taskId = entity.TaskID; if (taskId == Guid.Empty) { diff --git a/APT.MicroApi/APT.HM.WebApi/Controllers/Api/RiskRecordController.cs b/APT.MicroApi/APT.HM.WebApi/Controllers/Api/RiskRecordController.cs index 9f5f6e6..c195778 100644 --- a/APT.MicroApi/APT.HM.WebApi/Controllers/Api/RiskRecordController.cs +++ b/APT.MicroApi/APT.HM.WebApi/Controllers/Api/RiskRecordController.cs @@ -44,7 +44,7 @@ namespace APT.HM.WebApi.Controllers.Api { return SafeExecute(() => { - var users = entity.Nav_Users; + var users = GetEntities(t=>t.RECORD_ID==entity.ID,new BaseFilter(entity.ORG_ID)); var identifyings = entity.Nav_Identifyings; var files = entity.Nav_Files; var details = entity.Nav_Details; From 9d2218f786abccbaacaa9fc1e2c5d46bf2b7c18f Mon Sep 17 00:00:00 2001 From: wjn Date: Wed, 10 Apr 2024 15:03:00 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ChangeShiftRecordController.cs | 2 +- .../Controllers/TeamActivityController.cs | 45 +++-- .../Controllers/Api/HazardTaskController.cs | 25 ++- .../Controllers/Api/RiskTaskController.cs | 167 +++++++++--------- .../SEController/5SETTrainNotifyController.cs | 2 +- .../Api/SEController/SETestController.cs | 1 - 6 files changed, 128 insertions(+), 114 deletions(-) diff --git a/APT.MicroApi/APT.FO.WebApi/Controllers/ChangeShiftRecordController.cs b/APT.MicroApi/APT.FO.WebApi/Controllers/ChangeShiftRecordController.cs index 7d35bb1..2ea9fba 100644 --- a/APT.MicroApi/APT.FO.WebApi/Controllers/ChangeShiftRecordController.cs +++ b/APT.MicroApi/APT.FO.WebApi/Controllers/ChangeShiftRecordController.cs @@ -44,7 +44,7 @@ namespace APT.FO.WebApi.Controllers.Api.FO throw new Exception("对应岗位人员已填写,请刷新确认!"); } var userID = APT.Infrastructure.Api.AppContext.CurrentSession.UserID; - var afterUsers = entity.Nav_AfterUsers; + var afterUsers = entity.Nav_AfterUsers.Where(t=>t.IS_DELETED==false); if (afterUsers.Count() == 0) { throw new Exception("请选择接班人员!"); diff --git a/APT.MicroApi/APT.FO.WebApi/Controllers/TeamActivityController.cs b/APT.MicroApi/APT.FO.WebApi/Controllers/TeamActivityController.cs index 0bc63b4..5a26eeb 100644 --- a/APT.MicroApi/APT.FO.WebApi/Controllers/TeamActivityController.cs +++ b/APT.MicroApi/APT.FO.WebApi/Controllers/TeamActivityController.cs @@ -92,10 +92,10 @@ namespace APT.FO.WebApi.Controllers.Api.FO if (entity != null && entity.OpType == 0) { - if (files==null||files.Count()==0) - { - throw new Exception("请上传附件!"); - } + if (files == null || files.Count() == 0) + { + throw new Exception("请上传附件!"); + } //通知参会人员签到 var userID = APT.Infrastructure.Api.AppContext.CurrentSession.UserID; var baseFilter = new BaseFilter(entity.ORG_ID); @@ -154,7 +154,25 @@ namespace APT.FO.WebApi.Controllers.Api.FO return true; }); } + /// + /// 更新--已阅 + /// + [HttpPost, Route("TeamActivityUserRead")] + public JsonActionResult TeamActivityUserRead([FromBody] T_FO_TEAM_ACTIVITY entity) + { + return SafeExecute(() => + { + if (entity.TaskID == Guid.Empty) + { + throw new Exception("没有待办任务ID,请刷新重试!"); + } + NotificationTaskService.NotificationTaskFinish(entity.TaskID, () => + { + }); + return true; + }); + } /// /// 更新--保存签到 /// @@ -204,25 +222,6 @@ namespace APT.FO.WebApi.Controllers.Api.FO }); } /// - /// 更新--已阅 - /// - [HttpPost, Route("TeamActivityUserRead")] - public JsonActionResult TeamActivityUserRead([FromBody] T_FO_TEAM_ACTIVITY entity) - { - return SafeExecute(() => - { - if (entity.TaskID == Guid.Empty) - { - throw new Exception("没有待办任务ID,请刷新重试!"); - } - NotificationTaskService.NotificationTaskFinish(entity.TaskID, () => - { - - }); - return true; - }); - } - /// /// 排序分页查询数据 /// /// 分页过滤实体 diff --git a/APT.MicroApi/APT.HM.WebApi/Controllers/Api/HazardTaskController.cs b/APT.MicroApi/APT.HM.WebApi/Controllers/Api/HazardTaskController.cs index 8de8ad4..40f53c1 100644 --- a/APT.MicroApi/APT.HM.WebApi/Controllers/Api/HazardTaskController.cs +++ b/APT.MicroApi/APT.HM.WebApi/Controllers/Api/HazardTaskController.cs @@ -76,7 +76,7 @@ namespace APT.HM.WebApi.Controllers.Api detail.Nav_Identifyings = null; } }); - if (entity.LIABLE_USER_ID == Guid.Empty||entity.LIABLE_USER_ID==null) + if (entity.LIABLE_USER_ID == Guid.Empty || entity.LIABLE_USER_ID == null) { entity.LIABLE_USER_ID = APT.Infrastructure.Api.AppContext.CurrentSession.UserID; } @@ -97,18 +97,27 @@ namespace APT.HM.WebApi.Controllers.Api entity.APPROVECODE = null; //是否需要发审批流,false不发,true的时候默认只发当前审核人 var isSendApprove = false; - var isFinish = Guid.Empty; + //var isFinish = Guid.Empty; + T_FM_NOTIFICATION_TASK task = null; if (entity.PUBLISH != null && entity.PUBLISH.Equals("SaveAndNotify")) { entity.STATUS = FOPreMeetingStatusEnum.审核中; isSendApprove = true; entity.APPROVECODE = DateTime.Now.ToString("yyyyMMddHHmmss"); - isFinish = entity.TaskID; + //isFinish = entity.TaskID; + if (entity.TaskID != Guid.Empty) + { + task = NotificationTaskService.GetEntityTask(entity.TaskID, "HM101_SHOWPRINT"); + if (task.SOURCE_DATA_ID == null) + task.SOURCE_DATA_ID = entity.ID; + } } - MFlowPermitService.InsertApprove(entity.APPROVECODE, "HM102", null, entity.ID, "HM101_SHOWPRINT", isFinish, isSendApprove, () => + MFlowPermitService.InsertApprove(entity.APPROVECODE, "HM102", null, entity.ID, "HM101_SHOWPRINT", null, isSendApprove, () => { if (entity != null) UpdateEntityNoCommit(entity); //保存主表 + if (task != null) + UpdateEntityNoCommit(task); if (files != null && files.Any()) BantchSaveEntityNoCommit(files); //保存子表 if (riskDetail != null && riskDetail.Any()) @@ -234,10 +243,10 @@ namespace APT.HM.WebApi.Controllers.Api hazardRecord.ORG_ID = orgId; hazardRecord.LIABLE_USER_ID = entity.LIABLE_USER_ID; hazardRecord.PLAN_ID = entity.PLAN_ID; - hazardRecord.AREAS = string.Join("、", entity.Nav_Areas.Select(t => t.Nav_Area.NAME)); + hazardRecord.AREAS = string.Join("、", entity.Nav_Areas.Select(t => t.Nav_Area.NAME)); hazardRecord.IDENTIFYINGS = string.Join("、", entity.Nav_Identifyings.Select(t => t.Nav_Identifying.NAME)); hazardRecords.Add(hazardRecord); - noticeTitles.Add("职业危害辨识记录"+DateTime.Now.ToShortDateString()); + noticeTitles.Add("职业危害辨识记录" + DateTime.Now.ToShortDateString()); noticeUserIds.Add((Guid)userID); noticeUserNames.Add(currDetail.FirstOrDefault().Nav_User.NAME); noticeDataIds.Add(hazardRecord.ID); @@ -249,7 +258,7 @@ namespace APT.HM.WebApi.Controllers.Api var dangerDB = this.GetEntities(t => areaList.Contains((Guid)t.AREA_ID) && t.STATUS == (int)HMOperationStepEnum.有效, baseFilter); foreach (var detail in currDetail) { - var dangerDBAreas = dangerDB.Where(t => t.AREA_ID == detail.AREA_ID&& detail.Nav_Identifyings.Select(x=>x.ID).Contains(t.IDENTIFYING_ID)); + var dangerDBAreas = dangerDB.Where(t => t.AREA_ID == detail.AREA_ID && detail.Nav_Identifyings.Select(x => x.ID).Contains(t.IDENTIFYING_ID)); if (dangerDBAreas.Any()) { foreach (var danger in dangerDBAreas) @@ -311,7 +320,7 @@ namespace APT.HM.WebApi.Controllers.Api } if (model.TaskID != null) { - finishNotice = NotificationTaskService.FOGetTaskFinishModel(model.TaskID,model.ID); + finishNotice = NotificationTaskService.FOGetTaskFinishModel(model.TaskID, model.ID); } UnifiedCommit(() => { diff --git a/APT.MicroApi/APT.HM.WebApi/Controllers/Api/RiskTaskController.cs b/APT.MicroApi/APT.HM.WebApi/Controllers/Api/RiskTaskController.cs index db32d8b..6497c6a 100644 --- a/APT.MicroApi/APT.HM.WebApi/Controllers/Api/RiskTaskController.cs +++ b/APT.MicroApi/APT.HM.WebApi/Controllers/Api/RiskTaskController.cs @@ -44,104 +44,111 @@ namespace APT.HM.WebApi.Controllers.Api [HttpPost, Route("FullUpdate")] public JsonActionResult FullUpdate([FromBody] T_HM_RISK_TASK entity) { + return SafeExecute(() => { - return SafeExecute(() => + var files = entity.Nav_Files; + var riskDetail = entity.Nav_Detail; + var identifyings = entity.Nav_Identifyings; + if (identifyings.Count == 0) { - var files = entity.Nav_Files; - var riskDetail = entity.Nav_Detail; - var identifyings = entity.Nav_Identifyings; - if (identifyings.Count == 0) + throw new Exception("请选择辨识对象!"); + } + var areas = entity.Nav_Areas; + List users = new List(); + foreach (var detail in riskDetail) + { + if (detail.AREA_ID == Guid.Empty || detail.AREA_ID == null) { - throw new Exception("请选择辨识对象!"); + throw new Exception("请填写区域!"); } - var areas = entity.Nav_Areas; - List users = new List(); - foreach (var detail in riskDetail) + if (detail.RECORD_USER_ID == Guid.Empty || detail.AREA_ID == null) { - if (detail.AREA_ID == Guid.Empty || detail.AREA_ID == null) + throw new Exception("请选择记录人员!"); + } + if (detail.Nav_Users != null) + { + detail.Nav_Users.ForEach(user => { - throw new Exception("请填写区域!"); - } - if (detail.RECORD_USER_ID == Guid.Empty || detail.AREA_ID == null) - { - throw new Exception("请选择记录人员!"); - } - if (detail.Nav_Users != null) - { - detail.Nav_Users.ForEach(user => + if (user.USER_ID != detail.RECORD_USER_ID) { - if (user.USER_ID != detail.RECORD_USER_ID) - { - user.ROW_NO = 999; - } - }); - users.AddRange(detail.Nav_Users); - detail.Nav_Users = null; - } - }; - if (entity.LIABLE_USER_ID == Guid.Empty || entity.LIABLE_USER_ID == null) - { - entity.LIABLE_USER_ID = APT.Infrastructure.Api.AppContext.CurrentSession.UserID; + user.ROW_NO = 999; + } + }); + users.AddRange(detail.Nav_Users); + detail.Nav_Users = null; } - entity.Nav_Files = null; - entity.Nav_Detail = null; - entity.Nav_Identifyings = null; - entity.Nav_Areas = null; - identifyings?.ForEach(identifying => { identifying.Nav_Identifying = null; identifying.Nav_Task = null; }); - areas?.ForEach(areas => { areas.Nav_Area = null; areas.Nav_Task = null; }); + }; + if (entity.LIABLE_USER_ID == Guid.Empty || entity.LIABLE_USER_ID == null) + { + entity.LIABLE_USER_ID = APT.Infrastructure.Api.AppContext.CurrentSession.UserID; + } + entity.Nav_Files = null; + entity.Nav_Detail = null; + entity.Nav_Identifyings = null; + entity.Nav_Areas = null; + identifyings?.ForEach(identifying => { identifying.Nav_Identifying = null; identifying.Nav_Task = null; }); + areas?.ForEach(areas => { areas.Nav_Area = null; areas.Nav_Task = null; }); - if (entity.INITIATING_DEPARTMENT == null) - { - var user = GetEntity(t => t.ID == APT.Infrastructure.Api.AppContext.CurrentSession.UserID); - if (user != null) - entity.INITIATING_DEPARTMENT = user.DEPARTMENT_ID; - } - var orgId = APT.Infrastructure.Api.AppContext.CurrentSession.OrgId; - entity.STATUS = FOPreMeetingStatusEnum.草稿; - entity.APPROVECODE = null; + if (entity.INITIATING_DEPARTMENT == null) + { + var user = GetEntity(t => t.ID == APT.Infrastructure.Api.AppContext.CurrentSession.UserID); + if (user != null) + entity.INITIATING_DEPARTMENT = user.DEPARTMENT_ID; + } + var orgId = APT.Infrastructure.Api.AppContext.CurrentSession.OrgId; + entity.STATUS = FOPreMeetingStatusEnum.草稿; + entity.APPROVECODE = null; //是否需要发审批流,false不发,true的时候默认只发当前审核人 var isSendApprove = false; - var isFinish = Guid.Empty; - if (entity.PUBLISH != null && entity.PUBLISH.Equals("SaveAndNotify")) + //var isFinish = Guid.Empty; + T_FM_NOTIFICATION_TASK task = null; + if (entity.PUBLISH != null && entity.PUBLISH.Equals("SaveAndNotify")) + { + entity.STATUS = FOPreMeetingStatusEnum.审核中; + isSendApprove = true; + entity.APPROVECODE = DateTime.Now.ToString("yyyyMMddHHmmss"); + //isFinish = entity.TaskID; + if (entity.TaskID != Guid.Empty) { - entity.STATUS = FOPreMeetingStatusEnum.审核中; - isSendApprove = true; - entity.APPROVECODE = DateTime.Now.ToString("yyyyMMddHHmmss"); - isFinish = entity.TaskID; + task = NotificationTaskService.GetEntityTask(entity.TaskID, "HM061_SHOWPRINT"); + if (task.SOURCE_DATA_ID == null) + task.SOURCE_DATA_ID = entity.ID; } - var param = ""; + } + var param = ""; //0908 修改按最高层级触发审批 if (entity.LEVEL.Contains("3")) - { - param = "GS"; - } - else if (entity.LEVEL.Contains("0")) - { - param = "BM"; - } - else - { - param = "CJ"; - } + { + param = "GS"; + } + else if (entity.LEVEL.Contains("0")) + { + param = "BM"; + } + else + { + param = "CJ"; + } - MFlowPermitService.InsertApprove(entity.APPROVECODE, "HM062", param, entity.ID, "HM061_SHOWPRINT", isFinish, isSendApprove, () => - { - if (entity != null) - UpdateEntityNoCommit(entity); //保存主表 - if (files != null && files.Any()) - BantchSaveEntityNoCommit(files); //保存子表 + MFlowPermitService.InsertApprove(entity.APPROVECODE, "HM062", param, entity.ID, "HM061_SHOWPRINT", null, isSendApprove, () => + { + if (entity != null) + UpdateEntityNoCommit(entity); //保存主表 + if (task != null) + UpdateEntityNoCommit(task); + if (files != null && files.Any()) + BantchSaveEntityNoCommit(files); //保存子表 if (identifyings != null && identifyings.Any()) - BantchSaveEntityNoCommit(identifyings); - if (riskDetail != null && riskDetail.Any()) - BantchSaveEntityNoCommit(riskDetail); - if (areas != null && areas.Any()) - BantchSaveEntityNoCommit(areas); - if (users.Any()) - BantchSaveEntityNoCommit(users); //保存孙表 + BantchSaveEntityNoCommit(identifyings); + if (riskDetail != null && riskDetail.Any()) + BantchSaveEntityNoCommit(riskDetail); + if (areas != null && areas.Any()) + BantchSaveEntityNoCommit(areas); + if (users.Any()) + BantchSaveEntityNoCommit(users); //保存孙表 }); - return true; - }); - } + return true; + }); } /// diff --git a/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/5SETTrainNotifyController.cs b/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/5SETTrainNotifyController.cs index 3e4353c..5730953 100644 --- a/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/5SETTrainNotifyController.cs +++ b/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/5SETTrainNotifyController.cs @@ -46,7 +46,7 @@ namespace APT.SC.WebApi.Controllers.Api.SE throw new Exception("通知发送,不可更改"); } var Nav_TrainContentList = entity.Nav_TrainContentList; - if (Nav_TrainContentList.Count()==0) + if (Nav_TrainContentList.Count()==0) { throw new Exception("请选择培训内容"); } diff --git a/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/SETestController.cs b/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/SETestController.cs index d2e02d9..8906473 100644 --- a/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/SETestController.cs +++ b/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/SETestController.cs @@ -8,7 +8,6 @@ using System.Collections.Generic; using System.Linq; using APT.Infrastructure.Core; using APT.BaseData.Domain.ApiModel; - using System.Data; using System.IO; using APT.BaseData.Domain.Entities.FM; From db5b3b174c84e524de954860d0ca961bd6897aaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E7=BE=8E=E8=8D=A3?= <991152047@qq.com> Date: Wed, 10 Apr 2024 15:36:24 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E5=A4=96=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/CrucialLicenseJobOutsourceController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/APT.MicroApi/APT.FO.WebApi/Controllers/CrucialLicenseJobOutsourceController.cs b/APT.MicroApi/APT.FO.WebApi/Controllers/CrucialLicenseJobOutsourceController.cs index 192e0e3..bcacb2b 100644 --- a/APT.MicroApi/APT.FO.WebApi/Controllers/CrucialLicenseJobOutsourceController.cs +++ b/APT.MicroApi/APT.FO.WebApi/Controllers/CrucialLicenseJobOutsourceController.cs @@ -254,7 +254,7 @@ namespace APT.FO.WebApi.Controllers T_FM_NOTIFICATION_TASK finishNotice = null; //细表 List appdetails = new List(); - Expression> express = t => t.FORM_CODE == "FO017" && t.ENABLE_STATUS == (int)FMEnableStatusEnum.启用; + Expression> express = t => t.FORM_CODE == "FO025" && t.ENABLE_STATUS == (int)FMEnableStatusEnum.启用; if (!string.IsNullOrEmpty(param)) express = express.And(t => t.PARAM == param); var approveTemp = this.GetEntity(express, "Nav_ApproveTempDetails", "Nav_ApproveTempDetails.Nav_ApproveRole"); @@ -268,7 +268,7 @@ namespace APT.FO.WebApi.Controllers approve.Nav_ApproveDetails = null; approve.DATA_ID = id; approve.NAME = approveTemp.NAME; - approve.APPROVE_CODE = "FO017_SHOWPRINT"; + approve.APPROVE_CODE = "FO025_SHOWPRINT"; approve.CODE = serialCode; approve.CALLBACK_INTERFACE = approveTemp.CALLBACK_INTERFACE; var approveRoles = approveTemp.Nav_ApproveTempDetails.Where(t => t.APPROVE_ROLE_ID != null).Select(x => (Guid)x.APPROVE_ROLE_ID).Distinct().ToList(); From 2913e7fccd52d62420cd6cbf20ab384bd8ac722d Mon Sep 17 00:00:00 2001 From: wjn Date: Wed, 10 Apr 2024 15:43:18 +0800 Subject: [PATCH 7/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=A1=E6=89=B9?= =?UTF-8?q?=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- APT.BaseData.Services/Services/PF/PFApproveCallBackService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/APT.BaseData.Services/Services/PF/PFApproveCallBackService.cs b/APT.BaseData.Services/Services/PF/PFApproveCallBackService.cs index 457f656..c888f18 100644 --- a/APT.BaseData.Services/Services/PF/PFApproveCallBackService.cs +++ b/APT.BaseData.Services/Services/PF/PFApproveCallBackService.cs @@ -4488,7 +4488,7 @@ namespace APT.BaseData.Services.DomainServices var tempDepartment = GetEntity(t => t.ID == department.PARENT_ID).PARENT_ID; departmentId = GetEntity(t => t.ID == tempDepartment).ID; } - if (department.DEPARTMENT_TYPE == (int)FMDepartmentType.部门) + else if (department.DEPARTMENT_TYPE == (int)FMDepartmentType.部门) { departmentId = department.ID; } From 358b22486515ba521dad1056012c0a20924b0a25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E7=BE=8E=E8=8D=A3?= <991152047@qq.com> Date: Wed, 10 Apr 2024 15:59:51 +0800 Subject: [PATCH 8/9] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/JobActivityRecordController.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/APT.MicroApi/APT.FO.WebApi/Controllers/JobActivityRecordController.cs b/APT.MicroApi/APT.FO.WebApi/Controllers/JobActivityRecordController.cs index 7b6fcd5..4bd4b3f 100644 --- a/APT.MicroApi/APT.FO.WebApi/Controllers/JobActivityRecordController.cs +++ b/APT.MicroApi/APT.FO.WebApi/Controllers/JobActivityRecordController.cs @@ -181,6 +181,12 @@ namespace APT.FO.WebApi.Controllers var measures = entity.Nav_Measure; entity.Nav_Measure = null; entity.DEPARTMENT_ID = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID; + users.ForEach(t => { + t.Nav_User = null; + t.Nav_RelatedUser = null; + t.ORG_ID = entity.ORG_ID; + t.JOB_ACTIVITY_RECORD_ID = entity.ID; + }); if (details != null && details.Any()) { details.ForEach(t => From 668faf0a4061e343e1bca1f9abbe8d5be7a874b3 Mon Sep 17 00:00:00 2001 From: wjn Date: Wed, 10 Apr 2024 16:32:47 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E5=90=8C=E6=AD=A5sms=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/CurrentClassRecord.cs | 67 ++++++++++--------- .../Controllers/TeamActivityController.cs | 2 +- 2 files changed, 35 insertions(+), 34 deletions(-) diff --git a/APT.MicroApi/APT.FO.WebApi/Controllers/CurrentClassRecord.cs b/APT.MicroApi/APT.FO.WebApi/Controllers/CurrentClassRecord.cs index 3d51885..cc9c412 100644 --- a/APT.MicroApi/APT.FO.WebApi/Controllers/CurrentClassRecord.cs +++ b/APT.MicroApi/APT.FO.WebApi/Controllers/CurrentClassRecord.cs @@ -62,6 +62,40 @@ namespace APT.FO.WebApi.Controllers.Api.FO UpdateEntity(finishNotice); throw new Exception("你已提交,不能修改!"); } + var currUser = APT.Infrastructure.Api.AppContext.CurrentSession.UserID; + var currFMUser = GetEntity((Guid)currUser, "Nav_Person.Nav_Post", "Nav_Department.Nav_Parent"); + if (currFMUser != null) + { + var team = GetEntity(t => t.DEPARTMENT_ID == currFMUser.DEPARTMENT_ID); + + if (entity.CLASS_TEAM_ID == Guid.Empty || entity.CLASS_TEAM_ID == null) + { + if (team != null) + { + entity.CLASS_TEAM_ID = team.ID; + } + } + if (entity.CLASS_TEAM_ID == Guid.Empty || entity.DEPARTMENT_POST_ID == null) + { + entity.DEPARTMENT_POST_ID = currFMUser.Nav_Person.POST_ID; + } + if (entity.NAME == null) + { + isManual = true; + entity.NAME = DateTime.Now.ToShortDateString() + team.NAME + "-" + currFMUser.Nav_Person.Nav_Post.NAME + "当班工作记录"; + entity.RECORD_DATE = DateTime.Now; + } + if (entity.CHARGE_USER_ID == null || entity.CHARGE_USER_ID == Guid.Empty) + { + entity.CHARGE_USER_ID = currFMUser.Nav_Department.USER_ID; + } + if (entity.DEPARTMENT_ID == null || entity.DEPARTMENT_ID == Guid.Empty) + { + entity.DEPARTMENT_ID = currFMUser.Nav_Department.Nav_Parent.ID; + } + } + entity.EDITOR_ID = currUser; + var files = entity.Nav_Files; if(files != null) { @@ -79,39 +113,6 @@ namespace APT.FO.WebApi.Controllers.Api.FO T_FO_CURRENT_CLASS_RECORD_USER currUserRecord = null; if (entity.PUBLISH != null && entity.PUBLISH.Equals("SaveAndNotify")) { - var currUser = APT.Infrastructure.Api.AppContext.CurrentSession.UserID; - var currFMUser = GetEntity((Guid)currUser, "Nav_Person.Nav_Post", "Nav_Department.Nav_Parent"); - if (currFMUser != null) - { - var team = GetEntity(t => t.DEPARTMENT_ID == currFMUser.DEPARTMENT_ID); - - if (entity.CLASS_TEAM_ID == Guid.Empty || entity.CLASS_TEAM_ID == null) - { - if (team != null) - { - entity.CLASS_TEAM_ID = team.ID; - } - } - if (entity.CLASS_TEAM_ID == Guid.Empty || entity.DEPARTMENT_POST_ID == null) - { - entity.DEPARTMENT_POST_ID = currFMUser.Nav_Person.POST_ID; - } - if (entity.NAME == null) - { - isManual = true; - entity.NAME = DateTime.Now.ToShortDateString() + team.NAME + "-" + currFMUser.Nav_Person.Nav_Post.NAME + "当班工作记录"; - entity.RECORD_DATE = DateTime.Now; - } - if (entity.CHARGE_USER_ID == null || entity.CHARGE_USER_ID == Guid.Empty) - { - entity.CHARGE_USER_ID = currFMUser.Nav_Department.USER_ID; - } - if (entity.DEPARTMENT_ID == null || entity.DEPARTMENT_ID == Guid.Empty) - { - entity.DEPARTMENT_ID = currFMUser.Nav_Department.Nav_Parent.ID; - } - } - entity.EDITOR_ID = currUser; if (entity.TaskID != Guid.Empty) { finishNotice = NotificationTaskService.FOGetTaskFinishModel(entity.TaskID, entity.ID, "FO005_SHOWPRINT"); diff --git a/APT.MicroApi/APT.FO.WebApi/Controllers/TeamActivityController.cs b/APT.MicroApi/APT.FO.WebApi/Controllers/TeamActivityController.cs index 5a26eeb..9e63afe 100644 --- a/APT.MicroApi/APT.FO.WebApi/Controllers/TeamActivityController.cs +++ b/APT.MicroApi/APT.FO.WebApi/Controllers/TeamActivityController.cs @@ -69,7 +69,7 @@ namespace APT.FO.WebApi.Controllers.Api.FO T_FM_NOTIFICATION_TASK finishTask = null; if (entity.TaskID != Guid.Empty && entity.OpType != null && entity.OpType == 0) { - finishTask = NotificationTaskService.FOGetTaskFinishModel(entity.TaskID, entity.ID); + finishTask = NotificationTaskService.FOGetTaskFinishModel(entity.TaskID, entity.ID, "FO010_SHOWPRINT"); } //事务控制 this.UnifiedCommit(() =>