diff --git a/APT.MicroApi/APT.PP.WebApi/Controllers/Api/SEController.cs b/APT.MicroApi/APT.PP.WebApi/Controllers/Api/SEController.cs index 1a85246..00ead2b 100644 --- a/APT.MicroApi/APT.PP.WebApi/Controllers/Api/SEController.cs +++ b/APT.MicroApi/APT.PP.WebApi/Controllers/Api/SEController.cs @@ -274,10 +274,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP mm = config.SAFE_SERVEY_TRIGGER_TIME.Value.Month; dd = config.SAFE_SERVEY_TRIGGER_TIME.Value.Day; } - if (mm != dt.Month || dd != dt.Day) - { + if (!(mm == dt.Month && dd == dt.Day)) return; - } var data = GetEntity(t => t.LAUNCH_TIME != null && t.LAUNCH_TIME.Value.Year == dt.Year && t.LAUNCH_TIME.Value.Month == dt.Month && @@ -411,7 +409,7 @@ namespace APT.PP.WebApi.Controllers.Api.PP mm = config.TRAIN_SURVEY_TRIGGER_TIME.Value.Month; dd = config.TRAIN_SURVEY_TRIGGER_TIME.Value.Day; } - if (mm != dt.Month || dd != dt.Day) + if (!(mm == dt.Month && dd == dt.Day)) { return; } @@ -644,7 +642,7 @@ namespace APT.PP.WebApi.Controllers.Api.PP mm = config.DEP_TRAIN_PLAN_END_TIME.Value.Month; dd = config.DEP_TRAIN_PLAN_END_TIME.Value.Day; } - if (mm != dt.Month && dd != dt.Day) + if (!(mm == dt.Month && dd == dt.Day)) { return true; } @@ -798,8 +796,7 @@ namespace APT.PP.WebApi.Controllers.Api.PP } } } - - if (mm != dt.Month && dd != dt.Day) + if (!(mm == dt.Month && dd == dt.Day)) return; var existList = GetEntity(t => t.PLAN_YEAR == dt.Year && t.LAUNCH_TIME != null && @@ -849,7 +846,7 @@ namespace APT.PP.WebApi.Controllers.Api.PP }; datas.Add(record); }); - var sendNotices = NotificationTaskService.InsertUserNoticeTaskModels(allSendUserTitles, allSendDataIds, filter.GetOrgId(), allSendUserIds, allSendUserNames, DateTime.Now, DateTime.Now.AddDays(1), 0, "SE010"); + var sendNotices = NotificationTaskService.InsertUserNoticeTaskModels(allSendUserTitles, allSendDataIds, filter.GetOrgId(), allSendUserIds, allSendUserNames, DateTime.Now, DateTime.Now.AddDays(7), 0, "SE010"); UnifiedCommit(() => { if (datas != null && datas.Any())