From c377d90fe2a01c2118f6c69c3c177f75be7c318b Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期五, 29 十一月 2024 15:20:51 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/controller/TemperingGlassInfoController.java |   39 +++++++++++++++++++++++++--------------
 1 files changed, 25 insertions(+), 14 deletions(-)

diff --git a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/controller/TemperingGlassInfoController.java b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/controller/TemperingGlassInfoController.java
index 3496554..cb9a49f 100644
--- a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/controller/TemperingGlassInfoController.java
+++ b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/controller/TemperingGlassInfoController.java
@@ -1,13 +1,13 @@
 package com.mes.temperingglass.controller;
-import com.mes.temperingglass.service.TemperingAgoService;
+import com.mes.damage.entity.Damage;
+import com.mes.damage.service.DamageService;
+import com.mes.temperingglass.service.TemperingGlassInfoService;
 import com.mes.temperingglass.entity.TemperingGlassInfo;
 import com.mes.utils.Result;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
 
@@ -22,29 +22,40 @@
 public class TemperingGlassInfoController {
 
     @Autowired
-    private TemperingAgoService temperingAgoService;
+    private TemperingGlassInfoService temperingGlassInfoService;
+    @Autowired
+    private DamageService damageService;
 
     @ApiOperation("鏌ヨ閽㈠寲绛夌墖涓殑鐗堝浘淇℃伅,鐘舵�佷负1鐨勪负宸插埌,鐘舵�佷负0鐨勪负绛夊緟涓�")
     @GetMapping("/selectWaitingGlass") // 鏌ヨ閽㈠寲绛夌墖涓殑鐗堝浘淇℃伅,鐘舵�佷负1鐨勪负宸插埌,鐘舵�佷负0鐨勪负绛夊緟涓�
     public Result <List<TemperingGlassInfo>> selectWaitingGlass() {
-        List<TemperingGlassInfo> glass = temperingAgoService.selectWaitingGlass();
+        List<TemperingGlassInfo> glass = temperingGlassInfoService.selectWaitingGlass();
         log.info("绛夊緟涓殑鐜荤拑淇℃伅{}",glass);
         return Result.build(200, "", glass);
     }
-//    @ApiOperation("鏌ヨ杩涚倝涓殑閽㈠寲绛夌墖涓殑鐗堝浘淇℃伅,鐘舵�佸叏涓�1鐨勪负宸插埌銆�")
-//    @GetMapping("/selectIntoGlass") // 鏌ヨ杩涚倝涓殑閽㈠寲绛夌墖涓殑鐗堝浘淇℃伅,鐘舵�佸叏涓�1鐨勪负宸插埌銆�
-//    public Result <List<TemperingGlassInfo>> selectIntoGlass() {
-//        List<TemperingGlassInfo> glass = temperingAgoService.selectIntoGlass();
-//        log.info("杩涚倝涓殑鐜荤拑鐗堝浘淇℃伅{}",glass);
-//        return Result.build(200, "", glass);
-//    }
+
     @ApiOperation("//閽㈠寲鍚庢樉绀哄嚭鐐夌殑鐗堝浘淇℃伅銆�")
     @GetMapping("/selectOutGlass") //閽㈠寲鍚庢樉绀哄嚭鐐夌殑鐗堝浘淇℃伅
     public Result <List<TemperingGlassInfo>> selectOutGlass() {
-        List<TemperingGlassInfo> glass = temperingAgoService.selectOutGlass();
+        List<TemperingGlassInfo> glass = temperingGlassInfoService.selectOutGlass();
         log.info("閽㈠寲鍑虹倝鍚庣殑鐜荤拑淇℃伅{}",glass);
         return Result.build(200, "", glass);
     }
 
+    @ApiOperation("//閽㈠寲鐮存崯鎷胯蛋鏀惧洖")
+    @PostMapping("/updateTemperingState") //閽㈠寲鍚庢樉绀哄嚭鐐夌殑鐗堝浘淇℃伅
+    public Result <Integer> updateTemperingState(@RequestBody  Damage damage) {
+        TemperingGlassInfo temperingGlassInfo=new TemperingGlassInfo();
+        temperingGlassInfo.setState(damage.getStatus());
+        temperingGlassInfo.setGlassId(damage.getGlassId());
+        int result=temperingGlassInfoService.updateTemperingState(temperingGlassInfo);
+//        if(damage.getStatus()>5) {
+//            damage.setType(damage.getStatus());
+//            damage.setStatus(1);
+//            damageService.insertDamage(damage);
+//        }
+        return Result.build(200, "鐮存崯鎴愬姛", result);
+    }
+
 
 }

--
Gitblit v1.8.0