From 6bc7ce4b5bb2cbaf458766ac40d9ba8c5d40133d Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期四, 15 八月 2024 09:12:41 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/HangZhouMes

---
 hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/controller/BigStorageCageDetailsController.java |   40 +++++++++++++++++++++++++++++++++++++---
 1 files changed, 37 insertions(+), 3 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 deed23a..223343a 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,13 +1,19 @@
 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.common.utils.RedisUtil;
 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 javax.annotation.Resource;
 import java.util.List;
 import java.util.Map;
 
@@ -28,13 +34,19 @@
     private BigStorageCageDetailsService bigStorageCageDetailsService;
     @Autowired
     private BigStorageCageService bigStorageCageService;
+    @Resource
+    private RedisUtil redisUtil;
 
 
     @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("鐞嗙墖绗艰鎯呮坊鍔�")
@@ -68,10 +80,32 @@
     @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) {
+        bigStorageCageDetailsService.temperingSwitch(flag);
+        return Result.build(200, "淇敼鎴愬姛", redisUtil.getCacheObject("temperingSwitch"));
+    }
 }
 

--
Gitblit v1.8.0