| | |
| | | package com.mes.bigstorage.controller; |
| | | |
| | | |
| | | import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | | import com.mes.bigstorage.service.BigStorageCageDetailsService; |
| | | import io.swagger.annotations.ApiModel; |
| | | 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.GetMapping; |
| | | 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; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author zhoush |
| | | * @since 2024-03-27 |
| | | */ |
| | | @ApiModel(description = "理片笼详情") |
| | | @Api(description = "理片笼详情") |
| | | @RestController |
| | | @RequestMapping("/bigStorageCageDetails") |
| | | public class BigStorageCageDetailsController { |
| | | |
| | | @Autowired |
| | | private BigStorageCageDetailsService bigStorageCageDetailsService; |
| | | @Autowired |
| | | private BigStorageCageService bigStorageCageService; |
| | | |
| | | @ApiOperation("理片笼详情") |
| | | @GetMapping("/bigStorageCageDetails") |
| | | public List<BigStorageCageDetails> bigStorageCageDetails() { |
| | | return bigStorageCageDetailsService.list(); |
| | | |
| | | @ApiOperation("玻璃详情查询") |
| | | @PostMapping("/selectBigStorageCageDetails") |
| | | public Result selectBigStorageCageDetails(@RequestBody Map map) { |
| | | List<BigStorageCageDetails> bigStorageCageDetails=bigStorageCageDetailsService.selectBigStorageCageDetails(map.get("glassId").toString()); |
| | | 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,"添加成功",bigStorageCageService.querybigStorageCageDetail()); |
| | | } |
| | | |
| | | @ApiOperation("理片笼详情删除") |
| | | @PostMapping("/deleteBigStorageCageDetails") |
| | | public Result deleteBigStorageCageDetails(@RequestBody BigStorageCageDetails bigStorageCageDetails) { |
| | | bigStorageCageDetailsService.deleteBigStorageCageDetails(bigStorageCageDetails); |
| | | return Result.build(200,"删除成功",bigStorageCageService.querybigStorageCageDetail()); |
| | | } |
| | | |
| | | @ApiOperation("理片笼任务破损0/拿走1") |
| | | @PostMapping("/damageBigStorageCageDetails") |
| | | public Result damageBigStorageCageDetails(@RequestBody BigStorageCageDetails bigStorageCageDetails,int status) { |
| | | bigStorageCageDetailsService.damageBigStorageCageDetails(bigStorageCageDetails.getGlassId(),status); |
| | | return Result.build(200,"破损/拿走成功",1); |
| | | } |
| | | |
| | | @ApiOperation("理片笼任务完成") |
| | | @PostMapping("/finishBigStorageCageDetails") |
| | | public Result finishBigStorageCageDetails(@RequestBody BigStorageCageDetails bigStorageCageDetails) { |
| | | bigStorageCageDetailsService.finishBigStorageCageDetails(bigStorageCageDetails); |
| | | return Result.build(200,"任务完成成功",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()); |
| | | } |
| | | } |
| | | |