| | |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 气体管路产能规划Controller |
| | |
| | | * 查询气体管路产能规划列表 |
| | | */ |
| | | @Operation(summary = "查询气体管路产能规划列表", description = "分页查询") |
| | | @RequiresPermissions("aps:gasPipelineCapacityPlan:list") |
| | | // @RequiresPermissions("aps:gasPipelineCapacityPlan:list") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ApsGasPipelineCapacityPlan apsGasPipelineCapacityPlan) { |
| | | // startPage(); |
| | |
| | | ApsGasPipelineCapacityPlan apsGasPipelineCapacityPlanTemp = new ApsGasPipelineCapacityPlan(); |
| | | apsGasPipelineCapacityPlanTemp.setProcessName(apsStandardProcessTemp.getProcessName()); |
| | | apsGasPipelineCapacityPlanTemp.setOrgCode(apsStandardProcessTemp.getPlant()); |
| | | apsGasPipelineCapacityPlanTemp.setWorkshop(apsStandardProcessTemp.getWorkShop()); |
| | | list.add(apsGasPipelineCapacityPlanTemp); |
| | | } |
| | | } else { |
| | | list.forEach(item -> { |
| | | processList.stream().filter(p -> Objects.equals(p.getPlant(), item.getOrgCode())) |
| | | .filter(p -> Objects.equals(p.getProcessName(), item.getProcessName())) |
| | | .findFirst().ifPresent(p -> { |
| | | item.setWorkshop(p.getWorkShop()); |
| | | }); |
| | | }); |
| | | } |
| | | if (processList.size() > list.size()) { |
| | | List<String> newProcess = new ArrayList<>(); |
| | | List<ApsStandardProcess> newProcess = new ArrayList<>(); |
| | | for (ApsStandardProcess apsStandardProcessTemp : processList) { |
| | | boolean flag = true; |
| | | for (ApsGasPipelineCapacityPlan temp : list) { |
| | |
| | | } |
| | | } |
| | | if (flag) { |
| | | newProcess.add(apsStandardProcessTemp.getProcessName()); |
| | | newProcess.add(apsStandardProcessTemp); |
| | | } |
| | | } |
| | | for (String processName : newProcess) { |
| | | for (ApsStandardProcess processName : newProcess) { |
| | | ApsGasPipelineCapacityPlan apsGasPipelineCapacityPlanTemp = new ApsGasPipelineCapacityPlan(); |
| | | apsGasPipelineCapacityPlanTemp.setProcessName(processName); |
| | | apsGasPipelineCapacityPlanTemp.setProcessName(processName.getProcessName()); |
| | | apsGasPipelineCapacityPlanTemp.setOrgCode(processName.getPlant()); |
| | | apsGasPipelineCapacityPlanTemp.setWorkshop(processName.getWorkShop()); |
| | | list.add(apsGasPipelineCapacityPlanTemp); |
| | | } |
| | | } |
| | |
| | | // 格式:yyyy-MM |
| | | @RequestParam String date, |
| | | @RequestParam String factory, |
| | | @RequestParam String major, |
| | | // 格式:yyyy-MM |
| | | @RequestParam String toStart, |
| | | // 格式:yyyy-MM |
| | | @RequestParam String toEnd) { |
| | | apsGasPipelineCapacityPlanService.copyPlan(date, factory, toStart, toEnd); |
| | | apsGasPipelineCapacityPlanService.copyPlan(date, factory, major, toStart, toEnd); |
| | | return success(); |
| | | } |
| | | |