sfd
2025-05-22 e5a96bc789ca0252e31fd2e01bec5e471a02c0d6
aps-modules/aps-core/src/main/java/com/aps/core/controller/ApsGasPipingRouteStatController.java
@@ -16,6 +16,7 @@
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
/**
 * 气体管路产能负载统计Controller
@@ -62,7 +63,7 @@
    /**
     * 获取气体管路产能负载统计详细信息
     */
    @Operation(summary = "获取气体管路产能负载统计详细信息", description = "根据id获取")
    @Operation(summary = "获取气体管路产能负载统计详细信息", description = "根据ID查询")
    @RequiresPermissions("aps:apsGasPipingRouteStat:query")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") String id)
@@ -73,7 +74,7 @@
    /**
     * 新增气体管路产能负载统计
     */
    @Operation(summary = "新增气体管路产能负载统计", description = "单个新增")
    @Operation(summary = "新增气体管路产能负载统计", description = "新增")
    @RequiresPermissions("aps:apsGasPipingRouteStat:add")
    @Log(title = "气体管路产能负载统计", businessType = BusinessType.INSERT)
    @PostMapping
@@ -85,7 +86,7 @@
    /**
     * 修改气体管路产能负载统计
     */
    @Operation(summary = "修改气体管路产能负载统计", description = "单个修改")
    @Operation(summary = "修改气体管路产能负载统计", description = "修改")
    @RequiresPermissions("aps:apsGasPipingRouteStat:edit")
    @Log(title = "气体管路产能负载统计", businessType = BusinessType.UPDATE)
    @PutMapping
@@ -97,7 +98,7 @@
    /**
     * 删除气体管路产能负载统计
     */
    @Operation(summary = "删除气体管路产能负载统计", description = "批量删除")
    @Operation(summary = "删除气体管路产能负载统计", description = "删除")
    @RequiresPermissions("aps:apsGasPipingRouteStat:remove")
    @Log(title = "气体管路产能负载统计", businessType = BusinessType.DELETE)
   @DeleteMapping("/{ids}")
@@ -105,18 +106,47 @@
    {
        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 = "计算")
    @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 = "计算")
    @PostMapping("/getCapacityPlanData")
   // @RequiresPermissions("aps:apsGasPipingRouteStat:getCapacityPlanData")
    public AjaxResult getCapacityPlanData(@RequestBody ApsGasPipingRouteStat apsGasPipingRouteStat)
    {
        return AjaxResult.success(apsGasPipingRouteStatService.getCapacityPlanData(apsGasPipingRouteStat));
@@ -130,4 +160,10 @@
        apsGasPipingRouteStatService.exportExcel(response, apsGasPipingRouteStat);
    }
    @PostMapping("/saveGasPipingRoutStateList")
    public void saveGasPipingRoutStateList()
    {
        apsGasPipingRouteStatService.saveGasPipingRoutStateList();
    }
}