| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 气体管路产能负载统计Controller |
| | |
| | | /** |
| | | * 获取气体管路产能负载统计详细信息 |
| | | */ |
| | | @Operation(summary = "获取气体管路产能负载统计详细信息", description = "根据id获取") |
| | | @Operation(summary = "获取气体管路产能负载统计详细信息", description = "根据ID查询") |
| | | @RequiresPermissions("aps:apsGasPipingRouteStat:query") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") String id) |
| | |
| | | /** |
| | | * 新增气体管路产能负载统计 |
| | | */ |
| | | @Operation(summary = "新增气体管路产能负载统计", description = "单个新增") |
| | | @Operation(summary = "新增气体管路产能负载统计", description = "新增") |
| | | @RequiresPermissions("aps:apsGasPipingRouteStat:add") |
| | | @Log(title = "气体管路产能负载统计", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | |
| | | /** |
| | | * 修改气体管路产能负载统计 |
| | | */ |
| | | @Operation(summary = "修改气体管路产能负载统计", description = "单个修改") |
| | | @Operation(summary = "修改气体管路产能负载统计", description = "修改") |
| | | @RequiresPermissions("aps:apsGasPipingRouteStat:edit") |
| | | @Log(title = "气体管路产能负载统计", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | |
| | | /** |
| | | * 删除气体管路产能负载统计 |
| | | */ |
| | | @Operation(summary = "删除气体管路产能负载统计", description = "批量删除") |
| | | @Operation(summary = "删除气体管路产能负载统计", description = "删除") |
| | | @RequiresPermissions("aps:apsGasPipingRouteStat:remove") |
| | | @Log(title = "气体管路产能负载统计", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | |
| | | { |
| | | return toAjax(apsGasPipingRouteStatService.deleteApsGasPipingRouteStatByIds(ids)); |
| | | } |
| | | |
| | | /** |
| | | * 生成气体管路产能负载统计数据 |
| | | */ |
| | | @Operation(summary = "生成气体管路产能负载统计数据", description = "根据预测数据和工单数据生成统计数据") |
| | | @RequiresPermissions("aps:apsGasPipingRouteStat:generate") |
| | | @Log(title = "气体管路产能负载统计", businessType = BusinessType.INSERT) |
| | | @PostMapping("/generate") |
| | | public AjaxResult generateGasPipingRouteStatData() |
| | | { |
| | | return toAjax(apsGasPipingRouteStatService.generateGasPipingRouteStatData()); |
| | | } |
| | | |
| | | /** |
| | | * 聚合气体管路产能负载统计数据 |
| | | */ |
| | | @Operation(summary = "聚合气体管路产能负载统计数据", description = "聚合统计数据,支持动态选择行维度(rowGroupBy)进行聚合,如按工序名称、车间、工厂、专业等") |
| | | @RequiresPermissions("aps:apsGasPipingRouteStat:aggregate") |
| | | @PostMapping("/aggregate") |
| | | public AjaxResult aggregateGasPipingRouteStat(@RequestBody Map<String, Object> params) |
| | | { |
| | | return success(apsGasPipingRouteStatService.aggregateGasPipingRouteStat(params)); |
| | | } |
| | | |
| | | @Operation(summary = "计算气体管路产能负载统计", description = "计算") |
| | | @RequiresPermissions("aps:apsGasPipingRouteStat:computeCapacity") |
| | | @PostMapping("/computeCapacity") |
| | | public void computeCapacity() |
| | | @RequiresPermissions("aps:apsGasPipingRouteStat:computeCapacity") |
| | | public AjaxResult computeCapacity() |
| | | { |
| | | apsGasPipingRouteStatService.computeCapacity(); |
| | | try { |
| | | apsGasPipingRouteStatService.saveGasPipingRoutStateList(); |
| | | return AjaxResult.success(); |
| | | } catch (Exception e) { |
| | | logger.error(e.getMessage()); |
| | | return AjaxResult.error("更新失败!"); |
| | | } |
| | | } |
| | | |
| | | @Operation(summary = "获取气体管路产能负载统计", description = "计算") |
| | | @RequiresPermissions("aps:apsGasPipingRouteStat:getCapacityPlanData") |
| | | @PostMapping("/getCapacityPlanData") |
| | | // @RequiresPermissions("aps:apsGasPipingRouteStat:getCapacityPlanData") |
| | | public AjaxResult getCapacityPlanData(@RequestBody ApsGasPipingRouteStat apsGasPipingRouteStat) |
| | | { |
| | | return AjaxResult.success(apsGasPipingRouteStatService.getCapacityPlanData(apsGasPipingRouteStat)); |
| | |
| | | apsGasPipingRouteStatService.exportExcel(response, apsGasPipingRouteStat); |
| | | } |
| | | |
| | | @PostMapping("/saveGasPipingRoutStateList") |
| | | public void saveGasPipingRoutStateList() |
| | | { |
| | | apsGasPipingRouteStatService.saveGasPipingRoutStateList(); |
| | | } |
| | | |
| | | } |