diff --git a/APT.MicroApi/APT.FO.WebApi/Controllers/ChangeShiftRecordController.cs b/APT.MicroApi/APT.FO.WebApi/Controllers/ChangeShiftRecordController.cs index 3d4e2ee..7d35bb1 100644 --- a/APT.MicroApi/APT.FO.WebApi/Controllers/ChangeShiftRecordController.cs +++ b/APT.MicroApi/APT.FO.WebApi/Controllers/ChangeShiftRecordController.cs @@ -202,7 +202,7 @@ namespace APT.FO.WebApi.Controllers.Api.FO var admiId = this.GetEntity(t => t.CODE.Contains("admin") && t.ENABLE_STATUS == 0)?.ID; var currDep = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID.Value; var tempDep = GetEntity(currDep); - if (tempDep.DEPARTMENT_TYPE == (int)FMDepartmentType.班组) + if (tempDep!=null&& tempDep.DEPARTMENT_TYPE == (int)FMDepartmentType.班组) { currDep = (Guid)tempDep.PARENT_ID; } diff --git a/APT.MicroApi/APT.FO.WebApi/Controllers/PreShiftMeetingRecordController.cs b/APT.MicroApi/APT.FO.WebApi/Controllers/PreShiftMeetingRecordController.cs index 8ec3f24..97af734 100644 --- a/APT.MicroApi/APT.FO.WebApi/Controllers/PreShiftMeetingRecordController.cs +++ b/APT.MicroApi/APT.FO.WebApi/Controllers/PreShiftMeetingRecordController.cs @@ -50,12 +50,6 @@ namespace APT.FO.WebApi.Controllers.Api.FO var userID = APT.Infrastructure.Api.AppContext.CurrentSession.UserID; T_FM_NOTIFICATION_TASK finishNotice = null; List sendNotices = null; - var isRepeat = GetCount(t => t.NAME == entity.NAME && t.PRE_MEETING_STATUS > 0 && t.CLASS_ID == entity.CLASS_ID, new BaseFilter(entity.ORG_ID)); - if (isRepeat > 0) - { - throw new Exception("检测到班前会议数据重复,请联系管理员!"); - } - if (entity.PRE_MEETING_STATUS >= FOPreMeetingStatusEnum.签到中) { throw new Exception("你已提交,请勿重复提交!"); @@ -90,6 +84,11 @@ namespace APT.FO.WebApi.Controllers.Api.FO { entity.NAME = DateTime.Now.Date.ToString("yyyyMMdd") + TeamName + "-班前会议"; } + var isRepeat = GetCount(t => t.NAME == entity.NAME && t.PRE_MEETING_STATUS > 0 && t.CLASS_ID == entity.CLASS_ID&&t.USER_ID==entity.USER_ID, new BaseFilter(entity.ORG_ID)); + if (isRepeat > 0) + { + throw new Exception("检测到班前会议数据重复,请联系管理员!"); + } //20230913新增同步人员排班 List addSchedulings = new List(); List delSchedulings = new List(); diff --git a/APT.MicroApi/APT.PF.WebApi/Controllers/Api/LoginController.cs b/APT.MicroApi/APT.PF.WebApi/Controllers/Api/LoginController.cs index 446a51f..6e455ea 100644 --- a/APT.MicroApi/APT.PF.WebApi/Controllers/Api/LoginController.cs +++ b/APT.MicroApi/APT.PF.WebApi/Controllers/Api/LoginController.cs @@ -199,6 +199,15 @@ namespace APT.PF.WebApiControllers.Api.PF { try { + string telnetCode = Request.Headers["Tenant"]; + if (string.IsNullOrEmpty(telnetCode)) + { + throw new Exception("企业信息未成功加载,请重试!"); + } + if (filter == null) + { + throw new Exception("参数为空,请重试!"); + } var md5SuperPwd = DataHelper.MD5(SUPER_PASSWORD); UserLoginBaseModel result = new UserLoginModel(); string userId = filter == null ? string.Empty : filter.Keyword; diff --git a/APT.MicroApi/APT.PF.WebApi/Controllers/Api/TokenController.cs b/APT.MicroApi/APT.PF.WebApi/Controllers/Api/TokenController.cs index c46b1aa..36a7f73 100644 --- a/APT.MicroApi/APT.PF.WebApi/Controllers/Api/TokenController.cs +++ b/APT.MicroApi/APT.PF.WebApi/Controllers/Api/TokenController.cs @@ -69,7 +69,6 @@ namespace APT.PF.WebApi.Controllers.Api.FM return BadRequest(new { error = "error VERIFY_CODE ", error_description = "验证码不正确" }); } } - filter.OrgId = new Guid(request.orgId); } else { diff --git a/APT.MicroApi/APT.PP.WebApi/Controllers/Api/SEController.cs b/APT.MicroApi/APT.PP.WebApi/Controllers/Api/SEController.cs index 90b0419..d69770f 100644 --- a/APT.MicroApi/APT.PP.WebApi/Controllers/Api/SEController.cs +++ b/APT.MicroApi/APT.PP.WebApi/Controllers/Api/SEController.cs @@ -966,6 +966,13 @@ namespace APT.PP.WebApi.Controllers.Api.PP notify.Nav_LaunchUser = null; notify.Nav_RecordUser = null; }; + var notifyids = notifys.Select(t=>t.ID).ToList(); + var finishNotifys1 = GetEntities(t => notifyids.Contains((Guid)t.SOURCE_DATA_ID)&&t.NOTICE_STATUS==0, new BaseFilter(orgId)); + + foreach (var notify1 in finishNotifys1) + { + notify1.NOTICE_STATUS = 4; + } SendNotices = NotificationTaskService.InsertUserNoticeTaskModels(allSendTitles, allSendDataIds, orgId, allSendUserIds, allSendUserNames, DateTime.Now, DateTime.Now.AddDays(10), (int)FMNoticeTypeEnum.消息, "SE018"); UnifiedCommit(() => { @@ -979,6 +986,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP BantchAddEntityNoCommit(joinUsers); if (files.Any()) BantchAddEntityNoCommit(files); + if(finishNotifys1.Any()) + BantchUpdateEntity(finishNotifys1); }); } return true;