From dec4a57364d3db07feb17dba687b036cc9ddfcc1 Mon Sep 17 00:00:00 2001 From: wjn Date: Mon, 15 Apr 2024 09:03:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9F=B9=E8=AE=AD=E8=A7=A6?= =?UTF-8?q?=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../APT.PP.WebApi/Controllers/Api/SEController.cs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) 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())