| | |
| | | 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<>(); |
| | |
| | | } |
| | | //获取工序计划产能数据 |
| | | 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); |
| | | }); |
| | |
| | | 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())){ |