From 2f9b947344a9218390b30dd2d5d141c1f6d319b9 Mon Sep 17 00:00:00 2001
From: huang <1532065656@qq.com>
Date: 星期五, 07 十一月 2025 08:17:41 +0800
Subject: [PATCH] 仓储异常情况断联,任务无法执行,添加clear按钮可手动清除异常状态任务,
---
hangzhoumesParent/moduleService/GlassStorageModule/src/main/java/com/mes/rawglassstation/controller/RawGlassStorageStationController.java | 20 ++++++++++++++++++--
1 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/hangzhoumesParent/moduleService/GlassStorageModule/src/main/java/com/mes/rawglassstation/controller/RawGlassStorageStationController.java b/hangzhoumesParent/moduleService/GlassStorageModule/src/main/java/com/mes/rawglassstation/controller/RawGlassStorageStationController.java
index b94c59a..00ea66c 100644
--- a/hangzhoumesParent/moduleService/GlassStorageModule/src/main/java/com/mes/rawglassstation/controller/RawGlassStorageStationController.java
+++ b/hangzhoumesParent/moduleService/GlassStorageModule/src/main/java/com/mes/rawglassstation/controller/RawGlassStorageStationController.java
@@ -3,6 +3,8 @@
import com.mes.rawglassstation.service.RawGlassStorageStationService;
import com.mes.utils.Result;
import io.swagger.annotations.ApiOperation;
+import org.springframework.context.MessageSource;
+import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -19,15 +21,29 @@
@Resource RawGlassStorageStationService rawGlassStorageStationService;
+ // 鍥介檯璇█搴�
+ @Resource
+ private MessageSource messageSource;
+
@ApiOperation("宸ヤ綅鐘舵��")
@PostMapping("/updateSlotState")
@ResponseBody
public Result<Boolean> updateSlotState(@RequestParam(value = "state")int enableState, @RequestParam(value = "slot")int slot) {
boolean result = rawGlassStorageStationService.updateSlotState(slot, enableState);
+ String enable = messageSource.getMessage(
+ "rawglass.enable",
+ null,
+ LocaleContextHolder.getLocale()
+ );
+ String disable = messageSource.getMessage(
+ "rawglass.disable",
+ null,
+ LocaleContextHolder.getLocale()
+ );
if (enableState == 1) {
- return Result.build(200, "鍚敤", result);
+ return Result.build(200, enable, result);
} else {
- return Result.build(200, "绂佺敤", result);
+ return Result.build(200, disable, result);
}
}
}
--
Gitblit v1.8.0