From 636375afceb81bed7c4040c7c42fd328d6433b7b Mon Sep 17 00:00:00 2001 From: huangjiayang <5265313@qq.com> Date: 星期一, 28 四月 2025 20:12:59 +0800 Subject: [PATCH] 【UPDATE-BUGFIX】修改获取设计产能数据查询条件 --- aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsGasPipingRouteStatServiceImpl.java | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsGasPipingRouteStatServiceImpl.java b/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsGasPipingRouteStatServiceImpl.java index 73cdfbd..59d3d7b 100644 --- a/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsGasPipingRouteStatServiceImpl.java +++ b/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsGasPipingRouteStatServiceImpl.java @@ -235,6 +235,8 @@ public JSONObject getCapacityPlanData(ApsGasPipingRouteStat apsGasPipingRouteStat) { JSONObject result = new JSONObject(); HashSet<String> startPlanTimeSet = new HashSet<>(); + YearMonth yearMonth = YearMonth.parse(apsGasPipingRouteStat.getSearchEndDate()); + int daysInMonth = yearMonth.lengthOfMonth(); //宸ュ簭鍒嗙粍缁熻 LinkedHashMap<String, List<ApsResourceDateStat>> processMap = new LinkedHashMap<>(); List<HashMap<String, List<ApsResourceDateStat>>> processList = new ArrayList<>(); @@ -249,7 +251,15 @@ } //鑾峰彇宸ュ簭璁″垝浜ц兘鏁版嵁 HashMap<String, ApsGasPipelineCapacityPlan> apsGasPipingPlanMap = new HashMap<>(); - List<ApsGasPipelineCapacityPlan> apsGasPipelineCapacityPlanList = apsGasPipelineCapacityPlanMapper.selectApsGasPipelineCapacityPlanList(new ApsGasPipelineCapacityPlan()); + ApsGasPipelineCapacityPlan searchCapacityPlan = new ApsGasPipelineCapacityPlan(); + searchCapacityPlan.setMajor(apsGasPipingRouteStat.getMajor().equals("gas")?"姘旀煖":"绠¤矾"); + if("day".equals(apsGasPipingRouteStat.getSearchType())){ + searchCapacityPlan.setYear(yearMonth.getYear()+""); + searchCapacityPlan.setMonth(yearMonth.getMonth()+""); + }else if("month".equals(apsGasPipingRouteStat.getSearchType())){ + searchCapacityPlan.setYear(yearMonth.getYear()+""); + } + List<ApsGasPipelineCapacityPlan> apsGasPipelineCapacityPlanList = apsGasPipelineCapacityPlanMapper.selectApsGasPipelineCapacityPlanList(searchCapacityPlan); apsGasPipelineCapacityPlanList.forEach(apsGasPipelineCapacityPlan -> { apsGasPipingPlanMap.put(apsGasPipelineCapacityPlan.getProcessName(),apsGasPipelineCapacityPlan); }); @@ -257,8 +267,6 @@ DateTimeFormatter formatter = null; List<ApsGasPipingRouteStat> apsGasPipingRouteStats; SimpleDateFormat simpleDateFormat = null; - YearMonth yearMonth = YearMonth.parse(apsGasPipingRouteStat.getSearchEndDate()); - int daysInMonth = yearMonth.lengthOfMonth(); apsGasPipingRouteStat.setSearchStartDate(apsGasPipingRouteStat.getSearchStartDate()+"-01 00:00:00"); apsGasPipingRouteStat.setSearchEndDate(apsGasPipingRouteStat.getSearchEndDate()+"-"+ daysInMonth +" 23:59:59"); if("day".equals(apsGasPipingRouteStat.getSearchType())){ -- Gitblit v1.9.3