From 815f8cf710a592c7b92942f4b80193c0a91c41b0 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期一, 24 三月 2025 08:14:57 +0800
Subject: [PATCH] 物料关系字段显示修复
---
rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/LocController.java | 30 +++++++++++++++++++++++++++---
1 files changed, 27 insertions(+), 3 deletions(-)
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/LocController.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/LocController.java
index b99f16b..2c900a8 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/LocController.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/LocController.java
@@ -98,14 +98,14 @@
@Transactional(rollbackFor = Exception.class)
public R update(@RequestBody Loc loc) {
loc.setUpdateBy(getLoginUserId());
-
String join = StringUtils.join(loc.getTypeIds(), ",");
loc.setType(join);
-
+ if (Objects.isNull(loc.getTypeIds())) {
+ throw new CoolException("搴撲綅绫诲瀷涓嶈兘涓虹┖锛侊紒");
+ }
if (!locService.updateById(loc)) {
return R.error("Update Fail");
}
-
if (!locService.updateLoc(loc)) {
throw new CoolException("搴撲綅绫诲瀷鍏宠仈鍏崇郴淇敼澶辫触!@锛�");
}
@@ -166,6 +166,8 @@
if (Objects.isNull(locs)) {
throw new CoolException("鍙傛暟涓嶈兘涓虹┖锛侊紒");
}
+ locs.setCreateBy(getLoginUserId());
+ locs.setUpdateBy(getLoginUserId());
return locService.batchBindLocs(locs);
}
@@ -177,9 +179,31 @@
if (Objects.isNull(param)) {
throw new CoolException("鍒濆鍖栦俊鎭笉鑳戒负绌猴紒锛�");
}
+ if (Objects.isNull(param.getWarehouseId())) {
+ throw new CoolException("浠撳簱ID涓嶈兘涓虹┖锛侊紒");
+ }
if (Objects.isNull(param.getAreaId())) {
throw new CoolException("搴撳尯ID涓嶈兘涓虹┖锛侊紒");
}
+ if (Objects.isNull(param.getStartRow())) {
+ throw new CoolException("璧峰鎺掍笉鑳戒负绌猴紒锛�");
+ }
+ if (Objects.isNull(param.getEndRow())) {
+ throw new CoolException("缁堟鎺掍笉鑳戒负绌猴紒锛�");
+ }
+ if (Objects.isNull(param.getStartBay())) {
+ throw new CoolException("璧峰鍒椾笉鑳戒负绌猴紒锛�");
+ }
+ if (Objects.isNull(param.getEndBay())) {
+ throw new CoolException("缁堟鍒椾笉鑳戒负绌猴紒锛�");
+ }
+ if (Objects.isNull(param.getStartLev())) {
+ throw new CoolException("璧峰灞備笉鑳戒负绌猴紒锛�");
+ }
+ if (Objects.isNull(param.getEndLev())) {
+ throw new CoolException("缁堟灞備笉鑳戒负绌猴紒锛�");
+ }
+
return locService.initLocs(param);
}
--
Gitblit v1.9.1