修改SE触发

This commit is contained in:
wjn 2024-04-12 09:51:29 +08:00
parent 731843377f
commit af84316b74

View File

@ -644,7 +644,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;
} }
@ -778,12 +778,16 @@ namespace APT.PP.WebApi.Controllers.Api.PP
var dt = DateTime.Now; var dt = DateTime.Now;
DateTime startTime = new DateTime(dt.Year, 1, 1); DateTime startTime = new DateTime(dt.Year, 1, 1);
DateTime endTime = new DateTime(dt.Year, 1, 15); DateTime endTime = new DateTime(dt.Year, 1, 15);
var mm = 12;
var dd = 1;
var config = GetEntity<T_SE_SECONFIG>(t => true, new BaseFilter(filter.GetOrgId())); var config = GetEntity<T_SE_SECONFIG>(t => true, new BaseFilter(filter.GetOrgId()));
if (config != null) if (config != null)
{ {
if (config.DEP_TRAIN_PLAN_START_TIME != null) if (config.DEP_TRAIN_PLAN_START_TIME != null)
{ {
startTime = config.DEP_TRAIN_PLAN_START_TIME.Value; startTime = config.DEP_TRAIN_PLAN_START_TIME.Value;
mm = startTime.Month;
dd = startTime.Day;
if (config.DEP_TRAIN_PLAN_END_TIME != null) if (config.DEP_TRAIN_PLAN_END_TIME != null)
{ {
endTime = config.DEP_TRAIN_PLAN_END_TIME.Value; endTime = config.DEP_TRAIN_PLAN_END_TIME.Value;
@ -794,11 +798,11 @@ namespace APT.PP.WebApi.Controllers.Api.PP
} }
} }
} }
if (dt.DayOfYear != startTime.DayOfYear)
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 &&
t.LAUNCH_TIME.Value.Year == startTime.Year &&
t.LAUNCH_TIME.Value.Month == startTime.Month && t.LAUNCH_TIME.Value.Month == startTime.Month &&
t.LAUNCH_TIME.Value.Day == startTime.Day, t.LAUNCH_TIME.Value.Day == startTime.Day,
new BaseFilter(filter.GetOrgId())); new BaseFilter(filter.GetOrgId()));