huangjiayang
2025-04-28 636375afceb81bed7c4040c7c42fd328d6433b7b
【UPDATE-BUGFIX】修改获取设计产能数据查询条件
已修改1个文件
14 ■■■■ 文件已修改
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsGasPipingRouteStatServiceImpl.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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())){