From 4e3b8155722b66e25df3c6fd42cc586b68dea391 Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期五, 06 六月 2025 13:55:39 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/controller/TemperingGlassInfoController.java |   49 +++++++++++++++++++++++++++++++++++--------------
 1 files changed, 35 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 4d0abc8..f93875f 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,9 +1,13 @@
 package com.mes.temperingglass.controller;
-import com.mes.damage.entity.Damage;
+
 import com.mes.damage.service.DamageService;
-import com.mes.temperingglass.service.TemperingGlassInfoService;
+import com.mes.glassinfo.entity.GlassInfo;
+import com.mes.glassinfo.entity.LoadGlassInfo;
+import com.mes.temperingglass.eneity.request.DamageRequest;
 import com.mes.temperingglass.entity.TemperingGlassInfo;
+import com.mes.temperingglass.service.TemperingGlassInfoService;
 import com.mes.utils.Result;
+import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -15,6 +19,7 @@
 /**
  * @author SNG-010
  */
+@Api(tags = "閽㈠寲鏄剧ず")
 @RestController
 @RequestMapping("/temperingGlassInfo")
 @Slf4j
@@ -26,6 +31,7 @@
     @Autowired
     private DamageService damageService;
 
+
     @ApiOperation("鏌ヨ閽㈠寲绛夌墖涓殑鐗堝浘淇℃伅,鐘舵�佷负1鐨勪负宸插埌,鐘舵�佷负0鐨勪负绛夊緟涓�")
     @GetMapping("/selectWaitingGlass") // 鏌ヨ閽㈠寲绛夌墖涓殑鐗堝浘淇℃伅,鐘舵�佷负1鐨勪负宸插埌,鐘舵�佷负0鐨勪负绛夊緟涓�
     public Result <List<TemperingGlassInfo>> selectWaitingGlass() {
@@ -33,13 +39,7 @@
         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() {
@@ -48,15 +48,36 @@
         return Result.build(200, "", glass);
     }
 
-    @ApiOperation("//閽㈠寲鐮存崯")
+    @ApiOperation("//閽㈠寲鐮存崯鎷胯蛋鏀惧洖")
     @PostMapping("/updateTemperingState") //閽㈠寲鍚庢樉绀哄嚭鐐夌殑鐗堝浘淇℃伅
-    public Result <Integer> updateTemperingState(@RequestBody  Damage damage) {
-        damageService.insertDamage(damage);
+    public Result<List<LoadGlassInfo>> updateTemperingState(@RequestBody DamageRequest damage) {
         TemperingGlassInfo temperingGlassInfo=new TemperingGlassInfo();
-        temperingGlassInfo.setState(damage.getStatus());
+        temperingGlassInfo.setState(damage.getState());
         temperingGlassInfo.setGlassId(damage.getGlassId());
         int result=temperingGlassInfoService.updateTemperingState(temperingGlassInfo);
-        return Result.build(200, "鐮存崯鎴愬姛", result);
+        if (damage.getState() > 5) {
+            damageService.autoSubmitReport(damage.getGlassId(), damage.getLine()
+                    , damage.getWorkingProcedure(), "閽㈠寲鐐�", damage.getState());
+        }
+        GlassInfo glassInfo = new GlassInfo();
+        glassInfo.setEngineerId(damage.getEngineerId());
+        glassInfo.setTemperingLayoutId(damage.getTemperingLayoutId());
+        List<LoadGlassInfo> glass = temperingGlassInfoService.selectTemperingGlass(glassInfo);
+        return Result.build(200, "鐮存崯鎴愬姛", glass);
+    }
+
+    @ApiOperation("//鏌ヨ褰撳墠宸ョ▼鍙锋墍鏈夌殑鐐夊彿")
+    @PostMapping("/selectTempering") //鏌ヨ褰撳墠宸ョ▼鍙锋墍鏈夌殑鐐夊彿
+    public Result<GlassInfo> selectTempering(@RequestBody GlassInfo glassInfo) {
+        GlassInfo glass = temperingGlassInfoService.selectTempering(glassInfo);
+        return Result.build(200, "鏌ヨ鎴愬姛", glass);
+    }
+
+    @ApiOperation("//鏌ヨ褰撳墠宸ョ▼鍙风殑閽㈠寲鐗堝浘")
+    @PostMapping("/selectTemperingGlass") //鏌ヨ褰撳墠宸ョ▼鍙锋墍鏈夌殑鐐夊彿
+    public Result<List<LoadGlassInfo>> selectTemperingGlass(@RequestBody GlassInfo glassInfo) {
+        List<LoadGlassInfo> glass = temperingGlassInfoService.selectTemperingGlass(glassInfo);
+        return Result.build(200, "鏌ヨ鎴愬姛", glass);
     }
 
 

--
Gitblit v1.8.0