From 256c59555e2a5dffdd6d127a519d4f0944b80e7f Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期三, 14 五月 2025 16:29:38 +0800
Subject: [PATCH] #物料表动态字段搜索

---
 rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/BasStationController.java |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/BasStationController.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/BasStationController.java
index 6bea7f0..f9fa107 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/BasStationController.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/BasStationController.java
@@ -10,6 +10,7 @@
 import com.vincent.rsf.server.common.domain.KeyValVo;
 import com.vincent.rsf.server.common.domain.PageParam;
 import com.vincent.rsf.server.manager.entity.BasStation;
+import com.vincent.rsf.server.manager.enums.StaUseStatusType;
 import com.vincent.rsf.server.manager.service.BasStationService;
 import com.vincent.rsf.server.system.controller.BaseController;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -80,6 +81,10 @@
         basStation.setCreateTime(new Date());
         basStation.setUpdateBy(getLoginUserId());
         basStation.setUpdateTime(new Date());
+        BasStation serviceOne = basStationService.getOne(new LambdaQueryWrapper<BasStation>().eq(BasStation::getStationName, basStation.getStationName()));
+        if (!Cools.isEmpty(serviceOne)) {
+            return R.error(basStation.getStationName()+"绔欏凡琚垵濮嬪寲");
+        }
         if (!basStationService.save(basStation)) {
             return R.error("淇濆瓨澶辫触");
         }
@@ -95,6 +100,9 @@
         if (null !=basStation.getAreaIds()){
             basStation.setCrossZoneArea(Arrays.toString(basStation.getAreaIds()));
         }
+        if (null !=basStation.getUseStatus() && basStation.getUseStatus().equals(StaUseStatusType.TYPE_O.type)){
+            basStation.setBarcode(null);
+        }
         if (!basStationService.updateById(basStation)) {
             return R.error("鏇存柊澶辫触");
         }

--
Gitblit v1.9.1