This commit is contained in:
wyw 2024-04-12 14:20:31 +08:00
commit 2315fa58c9
2 changed files with 10 additions and 6 deletions

View File

@ -51,7 +51,7 @@ namespace APT.BaseData.Services.DomainServices
var yearTrainPlanDetail = new List<T_SE_YEAR_TRAIN_PLAN_DETAIL>();
var yearTrainPlanContent = new List<T_SE_YEAR_TRAIN_PLAN_CONTENT>();
var depPlan = GetEntity<T_SE_DEP_TRAIN_PLAN>(id, new string[] { "Nav_DepTrainPlanDetail.Nav_DepTrainPlanContent" });
var yearTrainPlan = GetEntity<T_SE_YEAR_TRAIN_PLAN>(t => t.PLAN_YEAR == depPlan.PLAN_YEAR&&t.STATUS== PFStandardStatus.Draft);
var yearTrainPlan = GetEntity<T_SE_YEAR_TRAIN_PLAN>(t => t.PLAN_YEAR == depPlan.PLAN_YEAR);
var addyearTrainPlan = false;
if (yearTrainPlan == null)
{

View File

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