From 88955d3be6a16064639f596d4d7987b081a344e2 Mon Sep 17 00:00:00 2001 From: zhoushihao <zsh19950802@163.com> Date: 星期一, 29 七月 2024 14:41:03 +0800 Subject: [PATCH] 大理片笼:调度任务完成开发,待测试 --- hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/controller/BigStorageCageDetailsController.java | 42 +++++++++++++++++++++++++++++++++++++----- 1 files changed, 37 insertions(+), 5 deletions(-) diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/controller/BigStorageCageDetailsController.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/controller/BigStorageCageDetailsController.java index 0fee9b2..77c81be 100644 --- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/controller/BigStorageCageDetailsController.java +++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/controller/BigStorageCageDetailsController.java @@ -1,11 +1,16 @@ 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; @@ -25,27 +30,33 @@ @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,"鏌ヨ澶辫触锛屾棤姝ょ幓鐠僫d",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") @@ -65,10 +76,31 @@ @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)); + } } -- Gitblit v1.8.0