From 2b91b242113bd10f1be241d19ab154e9ad6506cd Mon Sep 17 00:00:00 2001 From: wangfei <3597712270@qq.com> Date: 星期二, 10 六月 2025 14:18:00 +0800 Subject: [PATCH] 国际化命名 --- hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/controller/TemperingGlassInfoController.java | 89 ++++++++++++++++++++++++++++++++++++-------- 1 files changed, 73 insertions(+), 16 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 30648bf..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,27 +1,84 @@ package com.mes.temperingglass.controller; +import com.mes.damage.service.DamageService; +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 org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + /** - * <p> - * 鍓嶇鎺у埗鍣� - * </p> - * - * @author zhoush - * @since 2024-04-07 + * @author SNG-010 */ +@Api(tags = "閽㈠寲鏄剧ず") @RestController @RequestMapping("/temperingGlassInfo") +@Slf4j +// TidyUpGlassModule 閽㈠寲妯″潡 public class TemperingGlassInfoController { - //todo: 瀹炰緥浠g爜 寰呭垹闄� - @ApiOperation("娴嬭瘯") - @GetMapping("/index") - public String index() { - return "hello world"; - } -} + @Autowired + private TemperingGlassInfoService temperingGlassInfoService; + @Autowired + private DamageService damageService; + + @ApiOperation("鏌ヨ閽㈠寲绛夌墖涓殑鐗堝浘淇℃伅,鐘舵�佷负1鐨勪负宸插埌,鐘舵�佷负0鐨勪负绛夊緟涓�") + @GetMapping("/selectWaitingGlass") // 鏌ヨ閽㈠寲绛夌墖涓殑鐗堝浘淇℃伅,鐘舵�佷负1鐨勪负宸插埌,鐘舵�佷负0鐨勪负绛夊緟涓� + public Result <List<TemperingGlassInfo>> selectWaitingGlass() { + List<TemperingGlassInfo> glass = temperingGlassInfoService.selectWaitingGlass(); + log.info("绛夊緟涓殑鐜荤拑淇℃伅{}",glass); + return Result.build(200, "", glass); + } + + @ApiOperation("//閽㈠寲鍚庢樉绀哄嚭鐐夌殑鐗堝浘淇℃伅銆�") + @GetMapping("/selectOutGlass") //閽㈠寲鍚庢樉绀哄嚭鐐夌殑鐗堝浘淇℃伅 + public Result <List<TemperingGlassInfo>> selectOutGlass() { + List<TemperingGlassInfo> glass = temperingGlassInfoService.selectOutGlass(); + log.info("閽㈠寲鍑虹倝鍚庣殑鐜荤拑淇℃伅{}",glass); + return Result.build(200, "", glass); + } + + @ApiOperation("//閽㈠寲鐮存崯鎷胯蛋鏀惧洖") + @PostMapping("/updateTemperingState") //閽㈠寲鍚庢樉绀哄嚭鐐夌殑鐗堝浘淇℃伅 + public Result<List<LoadGlassInfo>> updateTemperingState(@RequestBody DamageRequest damage) { + TemperingGlassInfo temperingGlassInfo=new TemperingGlassInfo(); + temperingGlassInfo.setState(damage.getState()); + temperingGlassInfo.setGlassId(damage.getGlassId()); + int result=temperingGlassInfoService.updateTemperingState(temperingGlassInfo); + 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