From af84316b74d97ed117063c33c3aaf580d1946a5d Mon Sep 17 00:00:00 2001 From: wjn Date: Fri, 12 Apr 2024 09:51:29 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9SE=E8=A7=A6=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 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/APT.MicroApi/APT.PP.WebApi/Controllers/Api/SEController.cs b/APT.MicroApi/APT.PP.WebApi/Controllers/Api/SEController.cs index d69770f..1095998 100644 --- a/APT.MicroApi/APT.PP.WebApi/Controllers/Api/SEController.cs +++ b/APT.MicroApi/APT.PP.WebApi/Controllers/Api/SEController.cs @@ -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,12 +778,16 @@ 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 => true, new BaseFilter(filter.GetOrgId())); if (config != null) { if (config.DEP_TRAIN_PLAN_START_TIME != null) { startTime = config.DEP_TRAIN_PLAN_START_TIME.Value; + mm = startTime.Month; + dd = startTime.Day; if (config.DEP_TRAIN_PLAN_END_TIME != null) { 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; var existList = GetEntity(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())); From 645cd494cd9c483b246acede18b9f7737567bf2b Mon Sep 17 00:00:00 2001 From: wjn Date: Fri, 12 Apr 2024 11:32:49 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=9F=B9=E8=AE=AD?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E8=A7=A6=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/PF/PFApproveCallBackSEService.cs | 2 +- APT.MicroApi/APT.PP.WebApi/Controllers/Api/SEController.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/APT.BaseData.Services/Services/PF/PFApproveCallBackSEService.cs b/APT.BaseData.Services/Services/PF/PFApproveCallBackSEService.cs index 178802c..5265868 100644 --- a/APT.BaseData.Services/Services/PF/PFApproveCallBackSEService.cs +++ b/APT.BaseData.Services/Services/PF/PFApproveCallBackSEService.cs @@ -51,7 +51,7 @@ namespace APT.BaseData.Services.DomainServices var yearTrainPlanDetail = new List(); var yearTrainPlanContent = new List(); var depPlan = GetEntity(id, new string[] { "Nav_DepTrainPlanDetail.Nav_DepTrainPlanContent" }); - var yearTrainPlan = GetEntity(t => t.PLAN_YEAR == depPlan.PLAN_YEAR&&t.STATUS== PFStandardStatus.Draft); + var yearTrainPlan = GetEntity(t => t.PLAN_YEAR == depPlan.PLAN_YEAR); var addyearTrainPlan = false; if (yearTrainPlan == null) { diff --git a/APT.MicroApi/APT.PP.WebApi/Controllers/Api/SEController.cs b/APT.MicroApi/APT.PP.WebApi/Controllers/Api/SEController.cs index 1095998..1a85246 100644 --- a/APT.MicroApi/APT.PP.WebApi/Controllers/Api/SEController.cs +++ b/APT.MicroApi/APT.PP.WebApi/Controllers/Api/SEController.cs @@ -785,12 +785,12 @@ namespace APT.PP.WebApi.Controllers.Api.PP { 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 {