| | |
| | | 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 org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.sql.Date; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @Api(value="优化管理controller",tags={"优化管理操作接口"}) |
| | |
| | | public class GlassOptimizeController { |
| | | @Autowired |
| | | GlassOptimizeService glassOptimizeService; |
| | | |
| | | //工程信息 |
| | | @ApiOperation("工程信息接口") |
| | | @PostMapping ("/projectInfo/{projectNo}") |
| | | public Result projectInfo( |
| | | @PathVariable String projectNo){ |
| | | return Result.seccess(glassOptimizeService.projectInfoSv(projectNo)); |
| | | } |
| | | |
| | | //工程信息流程卡 |
| | | @ApiOperation("工程信息流程卡接口") |
| | | @PostMapping ("/getProcessCard/{projectNo}") |
| | | public Result getProcessCard( |
| | | @PathVariable String projectNo){ |
| | | return Result.seccess(glassOptimizeService.getProcessCardSv(projectNo)); |
| | | } |
| | | |
| | | //库存信息 |
| | | @ApiOperation("库存信息接口") |
| | | @PostMapping ("/materialStore/{thickness}/{model}") |
| | | public Result materialStore( |
| | | @PathVariable String thickness, |
| | | @PathVariable String model ){ |
| | | return Result.seccess(glassOptimizeService.materialStoreSv(thickness,model)); |
| | | } |
| | | |
| | | |
| | | //工程查询流程卡 |
| | | @ApiOperation("创建工程查询流程卡接口") |
| | |
| | | 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)); |
| | | } |
| | | |
| | | @ApiOperation("模拟计算") |
| | | @PostMapping("/simulationCalculate") |
| | | public Result simulationCalculate(@RequestBody Map<String, Object> object) { |
| | | try { |
| | | return Result.seccess(glassOptimizeService.SimulationCalculation(object)); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return Result.error(); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation("模拟计算保存") |
| | | @PostMapping("/simulationSave") |
| | | public Result simulationSave(@RequestBody Map<String, Object> object) { |
| | | try { |
| | | return Result.seccess(glassOptimizeService.addSimulation(object)); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return Result.error(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @ApiOperation("模拟计算多流程卡") |
| | | @PostMapping("/selectComputeDetailmore") |
| | | public Result selectComputeDetailmore(@RequestBody Map<String, Object> object) { |
| | | try { |
| | | return Result.seccess(glassOptimizeService.SimulationCalculation(object)); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return Result.error(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | //创建工程查询流程卡明细 |
| | | @ApiOperation("创建工程查询流程卡明细") |
| | | @PostMapping ("/getProcessCardDetail/{processId}/{technologyNumber}") |
| | | public Result getProcessCardDetail( |
| | | @PathVariable String processId, |
| | | @PathVariable Integer technologyNumber){ |
| | | return Result.seccess(glassOptimizeService.getProcessCardDetailSv(processId,technologyNumber)); |
| | | } |
| | | |
| | | @ApiOperation("膜系查询") |
| | | @PostMapping ("/selectGlassType") |
| | | public Result selectGlassType(){ |
| | | return Result.seccess(glassOptimizeService.selectGlassTypeSv()); |
| | | } |
| | | |
| | | @ApiOperation("最新工程号查询") |
| | | @PostMapping ("/getProjectId") |
| | | public Result getProjectId(){ |
| | | return Result.seccess(glassOptimizeService.getProjectIdSv()); |
| | | } |
| | | @ApiOperation("创建工程接口") |
| | | @PostMapping("/addProject/{optionVal}/{projectId}/{projectNmae}") |
| | | public Result addProject( |
| | | @PathVariable String optionVal, |
| | | @PathVariable String projectId, |
| | | @PathVariable String projectNmae, |
| | | @RequestBody Map<String,Object> object){ |
| | | return Result.seccess(glassOptimizeService.addProjectSv(optionVal,projectId,projectNmae,object)); |
| | | } |
| | | } |