| | |
| | | package com.mes.bigstorage.controller; |
| | | |
| | | import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | | import com.mes.bigstorage.service.BigStorageCageDetailsService; |
| | | import com.mes.bigstorage.service.BigStorageCageService; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | |
| | | @Autowired |
| | | private BigStorageCageDetailsService bigStorageCageDetailsService; |
| | | @Autowired |
| | | private BigStorageCageService bigStorageCageService; |
| | | |
| | | |
| | | @ApiOperation("玻璃详情查询") |
| | | @PostMapping("/selectBigStorageCageDetails") |
| | | public Result selectBigStorageCageDetails(@RequestBody Map map) { |
| | | List<BigStorageCageDetails> bigStorageCageDetails=bigStorageCageDetailsService.selectBigStorageCageDetails(map.get("glassId").toString()); |
| | | return Result.build(200,"查询成功",bigStorageCageDetails); |
| | | if (bigStorageCageDetails.size()>0){ |
| | | return Result.build(200,"查询成功",bigStorageCageDetails); |
| | | }else{ |
| | | return Result.build(200,"查询失败,无此玻璃id",bigStorageCageDetails); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation("理片笼详情添加") |
| | | @PostMapping("/insertBigStorageCageDetails") |
| | | public Result insertBigStorageCageDetails(@RequestBody BigStorageCageDetails bigStorageCageDetails) { |
| | | bigStorageCageDetailsService.insertBigStorageCageDetails(bigStorageCageDetails); |
| | | return Result.build(200,"添加成功",1); |
| | | return Result.build(200,"添加成功",bigStorageCageService.querybigStorageCageDetail()); |
| | | } |
| | | |
| | | @ApiOperation("理片笼详情删除") |
| | | @PostMapping("/deleteBigStorageCageDetails") |
| | | public Result deleteBigStorageCageDetails(@RequestBody BigStorageCageDetails bigStorageCageDetails) { |
| | | bigStorageCageDetailsService.deleteBigStorageCageDetails(bigStorageCageDetails); |
| | | return Result.build(200,"删除成功",1); |
| | | return Result.build(200,"删除成功",bigStorageCageService.querybigStorageCageDetail()); |
| | | } |
| | | |
| | | @ApiOperation("理片笼任务破损0/拿走1") |
| | |
| | | @ApiOperation("理片笼任务出片") |
| | | @PostMapping("/outBigStorageCageDetails") |
| | | public Result outBigStorageCageDetails(@RequestBody BigStorageCageDetails bigStorageCageDetails) { |
| | | |
| | | bigStorageCageDetailsService.outBigStorageCageDetails(bigStorageCageDetails); |
| | | return Result.build(200,"出片添加成功",1); |
| | | } |
| | | |
| | | @ApiOperation("指定钢化") |
| | | @PostMapping("/TemperingGlass") |
| | | public Result temperingGlass(@RequestBody BigStorageCageDetails bigStorageCageDetails) { |
| | | boolean result = bigStorageCageDetailsService.temperingGlass(bigStorageCageDetails.getTemperingLayoutId().toString(), bigStorageCageDetails.getEngineerId()); |
| | | if (result == true) { |
| | | return Result.build(200, "指定钢化成功", 1); |
| | | } else { |
| | | return Result.build(200, "已存在钢化任务,请等待钢化完成再指定钢化", 1); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation("钢化查询") |
| | | @PostMapping("/selectTemperingGlass") |
| | | public Result selectTemperingGlass() { |
| | | return Result.build(200, "查询成功", bigStorageCageDetailsService.selectTemperingGlass()); |
| | | } |
| | | |
| | | @ApiOperation("是否钢化开关") |
| | | @PostMapping("/temperingSwitch") |
| | | public Result temperingSwitch(Boolean flag) { |
| | | return Result.build(200, "查询成功", bigStorageCageDetailsService.temperingSwitch(flag)); |
| | | } |
| | | } |
| | | |