| | |
| | | package com.example.erp.controller.pp; |
| | | |
| | | import cn.dev33.satoken.annotation.SaCheckPermission; |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.pp.OptimizeProjectMange; |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.service.pp.GlassOptimizeService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | @Autowired |
| | | GlassOptimizeService glassOptimizeService; |
| | | |
| | | //工程信息 |
| | | @ApiOperation("创建工程查询流程卡接口") |
| | | @PostMapping ("/projectInfo/{projectNo}") |
| | | public Result projectInfo( |
| | | @PathVariable String projectNo){ |
| | | return Result.seccess(glassOptimizeService.projectInfoSv(projectNo)); |
| | | } |
| | | |
| | | |
| | | //工程查询流程卡 |
| | | @ApiOperation("创建工程查询流程卡接口") |
| | | @PostMapping ("/getFlowCardList/{optionVal}/{radio}") |
| | |
| | | @PathVariable String optionVal, |
| | | @PathVariable Integer radio){ |
| | | return Result.seccess(glassOptimizeService.getFlowCardList(optionVal,radio)); |
| | | } |
| | | |
| | | //工程查询流程卡 |
| | | @ApiOperation("工程查询流程卡") |
| | | @PostMapping ("/getProjectList") |
| | | public Result getProjectList(){ |
| | | return Result.seccess(glassOptimizeService.getProjectListSv()); |
| | | } |
| | | |
| | | //工程管理查询 |
| | |
| | | @RequestBody OptimizeProjectMange optimizeProjectMange) { |
| | | return Result.seccess(glassOptimizeService.OptimizeProjectMange(startSelectTime,endSelectTime,optimizeProjectMange)); |
| | | } |
| | | |
| | | //修改工程状态 |
| | | @ApiOperation("修改工程状态接口") |
| | | @PostMapping("/updateProjectState/{projectNumber}/{state}") |
| | | public Result updateProjectState( |
| | | @PathVariable String projectNumber, |
| | | @PathVariable Integer state |
| | | ) { |
| | | if (glassOptimizeService.updateProjectState(projectNumber, state)) { |
| | | return Result.seccess(); |
| | | } else { |
| | | throw new ServiceException(Constants.Code_500, "修改失败"); |
| | | |
| | | } |
| | | } |
| | | |
| | | //删除工程 |
| | | @ApiOperation("工程管理删除接口") |
| | | @PostMapping("/deleteProject/{projectNumber}") |
| | | public Result deleteProject( |
| | | @PathVariable String projectNumber){ |
| | | return Result.seccess(glassOptimizeService.deleteProject(projectNumber)); |
| | | } |
| | | |
| | | //模拟计算工程号查询 |
| | | @ApiOperation("模拟计算工程号查询") |
| | | @PostMapping ("/selectProjectCompute/{projectNumber}") |
| | | public Result selectProjectCompute( |
| | | @PathVariable String projectNumber){ |
| | | return Result.seccess(glassOptimizeService.selectProjectComputeSv(projectNumber)); |
| | | } |
| | | |
| | | //模拟计算流程卡详情 |
| | | @ApiOperation("模拟计算流程卡详情") |
| | | @PostMapping ("/selectComputeDetail/{processId}") |
| | | public Result selectComputeDetail( |
| | | @PathVariable String processId){ |
| | | return Result.seccess(glassOptimizeService.selectComputeDetailSv(processId)); |
| | | } |
| | | |
| | | } |