guoyujie
2025-10-14 81cad8df0f1b33700e7fc80f271eda7f1180efb0
north-glass-erp/src/main/java/com/example/erp/controller/pp/GlassOptimizeController.java
@@ -33,10 +33,18 @@
    private UserService userService;
    //工程信息
    @ApiOperation("工程信息接口")
    @PostMapping  ("/projectInfo/{projectNo}")
    @PostMapping  ("/projectInfo/{projectNo}/{username}")
    public Result projectInfo(
            @PathVariable String projectNo){
        return Result.seccess(glassOptimizeService.projectInfoSv(projectNo));
            @PathVariable String projectNo,@PathVariable String username){
        return Result.seccess(glassOptimizeService.projectInfoSv(projectNo,username));
    }
    // 优化信息传入
    @ApiOperation("优化传入信息接口")
    @PostMapping  ("/optimizeInfo/{projectNo}/{username}")
    public Result optimizeInfo(@PathVariable String projectNo,@PathVariable String username){
        return Result.seccess(glassOptimizeService.optimizeInfoSv(projectNo,username));
    }
    //工程信息流程卡
@@ -53,8 +61,8 @@
    public Result materialStore(
            @PathVariable  String thickness,
            @PathVariable  String model,@PathVariable  String projectNumber,
            @RequestParam(name = "type", required = false) Integer type ){
        return Result.seccess(glassOptimizeService.materialStoreSv(thickness,model,projectNumber,type));
            @RequestParam(name = "type", required = false) Integer type,@RequestParam(name = "username", required = false) String username  ){
        return Result.seccess(glassOptimizeService.materialStoreSv(thickness,model,projectNumber,type,username));
    }
@@ -83,6 +91,16 @@
        return Result.seccess(glassOptimizeService.getProjectListSv());
    }
    @ApiOperation("根据工程卡号工程查询流程卡")
    @PostMapping  ("/getProjectByProjectNo/{projectNo}")
    public Result getProjectByProjectNo(
            @PathVariable String projectNo
    ){
        return Result.seccess(glassOptimizeService.getProjectByProjectNoSv(projectNo));
    }
    //工程管理查询
    @ApiOperation("工程管理查询接口")
    @PostMapping("/optimizeProjectMange/{startSelectTime}/{endSelectTime}")
@@ -101,7 +119,7 @@
            @PathVariable Integer state,
            @PathVariable Integer states,
            @PathVariable Integer code
    ) {
    ) throws JsonProcessingException {
        if (glassOptimizeService.updateProjectState(projectNumber, state,states,code)) {
            return Result.seccess();
        } else {
@@ -156,6 +174,7 @@
    @ApiOperation("模拟计算保存")
    @PostMapping("/simulationSave")
    public Result simulationSave(@RequestBody Map<String, Object> object) {
        System.out.println("接收到的模拟计算保存数据: " + object);
        try {
            return Result.seccess(glassOptimizeService.addSimulation(object));
        } catch (Exception e) {
@@ -236,12 +255,39 @@
        return  Result.seccess(glassOptimizeService.saveOptimizeResult(object,projectId));
    }
    @ApiOperation("查询报告数据接口")
    @PostMapping("/getReportData/{processId}")
    public Result getReportData(@PathVariable String processId){
        return  Result.seccess(glassOptimizeService.getReportDataSv(processId));
    }
    @ApiOperation("查询物料信息接口")
    @PostMapping("/materialInfo/{processId}")
    public Result materialInfo(
            @PathVariable String processId){
        return  Result.seccess(glassOptimizeService.getMaterialInfoSv(processId));
    }
    @ApiOperation("查询产品列表接口")
    @PostMapping("/getProductList/{processId}")
    public Result getProductList(
            @PathVariable String processId){
        return  Result.seccess(glassOptimizeService.getProductListSv(processId));
    }
    @ApiOperation("查询优化结果接口")
    @PostMapping("/selectOptimizeResult/{processId}")
    public Result selectOptimizeResult(
            @PathVariable String processId){
        return  Result.seccess(glassOptimizeService.selectOptimizeResult(processId));
    }
    @ApiOperation("查询优化结果信息接口")
    @PostMapping("/getOptimizeInfo/{processId}")
    public Result getOptimizeInfo(
            @PathVariable String processId){
        return  Result.seccess(glassOptimizeService.getOptimizeInfoSv(processId));
    }
    @ApiOperation("更新优化结果接口")
@@ -271,15 +317,15 @@
        return new ResponseEntity<>(optContent.getBytes(), headers, HttpStatus.OK);
    }
    @PostMapping("/getConfiguration/{type}")
    public Result getConfiguration(@PathVariable String type) {
        return Result.seccess(glassOptimizeService.getConfiguration(type));
    @PostMapping("/getConfiguration/{type}/{username}")
    public Result getConfiguration(@PathVariable String type,@PathVariable String username) {
        return Result.seccess(glassOptimizeService.getConfiguration(type,username));
    }
    @ApiOperation("修片磨量修改")
    @PostMapping("/saveConfiguration/{type}")
    public Result saveConfiguration(@PathVariable String type, @RequestBody Map<String,Object>  object){
        return Result.seccess(glassOptimizeService.saveConfiguration(object,type));
    @PostMapping("/saveConfiguration/{type}/{username}")
    public Result saveConfiguration(@PathVariable String type,@PathVariable String username, @RequestBody Map<String,Object>  object){
        return Result.seccess(glassOptimizeService.saveConfiguration(object,type,username));
    }
    @ApiOperation("模拟排版")
@@ -356,7 +402,11 @@
        return Result.seccess(glassOptimizeService.getProcessCardMpThirdParty(projectNo));
    }
    @ApiOperation("mes工程任务下发接口")
    @PostMapping("/getIssuingProjects")
    public Result issuingProjects(@RequestBody String projectNo) throws JsonProcessingException {
        return Result.seccess(glassOptimizeService.issuingProjects(projectNo));
    }