修改培训触发

This commit is contained in:
wjn 2024-04-15 09:03:08 +08:00
parent 739a4f424e
commit dec4a57364

View File

@ -274,10 +274,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
mm = config.SAFE_SERVEY_TRIGGER_TIME.Value.Month; mm = config.SAFE_SERVEY_TRIGGER_TIME.Value.Month;
dd = config.SAFE_SERVEY_TRIGGER_TIME.Value.Day; dd = config.SAFE_SERVEY_TRIGGER_TIME.Value.Day;
} }
if (mm != dt.Month || dd != dt.Day) if (!(mm == dt.Month && dd == dt.Day))
{
return; return;
}
var data = GetEntity<T_SE_SAFE_SURVEY>(t => t.LAUNCH_TIME != null && var data = GetEntity<T_SE_SAFE_SURVEY>(t => t.LAUNCH_TIME != null &&
t.LAUNCH_TIME.Value.Year == dt.Year && t.LAUNCH_TIME.Value.Year == dt.Year &&
t.LAUNCH_TIME.Value.Month == dt.Month && 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; mm = config.TRAIN_SURVEY_TRIGGER_TIME.Value.Month;
dd = config.TRAIN_SURVEY_TRIGGER_TIME.Value.Day; dd = config.TRAIN_SURVEY_TRIGGER_TIME.Value.Day;
} }
if (mm != dt.Month || dd != dt.Day) if (!(mm == dt.Month && dd == dt.Day))
{ {
return; return;
} }
@ -644,7 +642,7 @@ namespace APT.PP.WebApi.Controllers.Api.PP
mm = config.DEP_TRAIN_PLAN_END_TIME.Value.Month; mm = config.DEP_TRAIN_PLAN_END_TIME.Value.Month;
dd = config.DEP_TRAIN_PLAN_END_TIME.Value.Day; 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; 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; return;
var existList = GetEntity<T_SE_DEP_TRAIN_PLAN>(t => t.PLAN_YEAR == dt.Year && var existList = GetEntity<T_SE_DEP_TRAIN_PLAN>(t => t.PLAN_YEAR == dt.Year &&
t.LAUNCH_TIME != null && t.LAUNCH_TIME != null &&
@ -849,7 +846,7 @@ namespace APT.PP.WebApi.Controllers.Api.PP
}; };
datas.Add(record); 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(() => UnifiedCommit(() =>
{ {
if (datas != null && datas.Any()) if (datas != null && datas.Any())