From 8d90833250abee5951572659e9a192f2487cd704 Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期一, 03 十一月 2025 09:30:52 +0800
Subject: [PATCH] 标准wms2.0
---
src/main/java/com/zy/asrs/service/impl/NodeServiceImpl.java | 36 +++++++++++++++++-------------------
1 files changed, 17 insertions(+), 19 deletions(-)
diff --git a/src/main/java/com/zy/asrs/service/impl/NodeServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/NodeServiceImpl.java
index bd47225..467ecd8 100644
--- a/src/main/java/com/zy/asrs/service/impl/NodeServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/NodeServiceImpl.java
@@ -12,18 +12,15 @@
import com.zy.asrs.entity.param.InitPakoutParam;
import com.zy.asrs.entity.param.MatnrDto;
import com.zy.asrs.entity.param.PakinParam;
-import com.zy.asrs.entity.result.Pakin;
import com.zy.asrs.mapper.NodeMapper;
import com.zy.asrs.service.ManLocDetlService;
import com.zy.asrs.service.MatService;
import com.zy.asrs.service.NodeService;
import com.zy.asrs.utils.SaasUtils;
-import com.zy.asrs.utils.VersionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
-import java.beans.Transient;
import java.util.Date;
import java.util.List;
@@ -37,6 +34,7 @@
private SnowflakeIdWorker snowflakeIdWorker;
@Autowired
private ManLocDetlService manLocDetlService;
+
@Override
public Node getTop() {
Node top = this.selectOne(new EntityWrapper<Node>().eq("type", 0).eq("level", 0));
@@ -115,11 +113,11 @@
manLocDetl.setCreateTime(now);
manLocDetl.setModiTime(now);
manLocDetl.setCreateBy(userId);
- SaasUtils.insertLog(0,manLocDetl.getLocNo(),manLocDetl.getMatnr(), manLocDetl.getAnfme());
+ SaasUtils.insertLog(0, manLocDetl.getLocNo(), manLocDetl.getMatnr(), manLocDetl.getAnfme());
manLocDetlService.insert(manLocDetl);
- }else {
+ } else {
check.setAnfme(dto.getCount() + check.getAnfme());
- manLocDetlService.update(check,new EntityWrapper<ManLocDetl>()
+ manLocDetlService.update(check, new EntityWrapper<ManLocDetl>()
.eq("loc_no", node.getUuid())
.eq("matnr", dto.getMatnr()));
}
@@ -141,25 +139,25 @@
Node node = nodeService.selectOne(new EntityWrapper<Node>()
.eq("id", param.getNodeId()));
if (node == null) {
- return R.error("鎵句笉鍒拌搴撲綅,璇疯仈绯荤鐞嗗憳:" + param.getNodeId() );
+ return R.error("鎵句笉鍒拌搴撲綅,璇疯仈绯荤鐞嗗憳:" + param.getNodeId());
}
if (manLocDetl == null) {
- return R.error("鐗╂枡:"+ param.getMatnr() + " 鍦ㄥ簱浣嶄腑涓嶅瓨鍦�");
+ return R.error("鐗╂枡:" + param.getMatnr() + " 鍦ㄥ簱浣嶄腑涓嶅瓨鍦�");
}
if (manLocDetl.getAnfme() - param.getCount() < 0) {
- return R.error("鐗╂枡:"+ param.getMatnr() + " 鍦ㄥ簱浣嶄腑鏁伴噺涓嶈冻");
+ return R.error("鐗╂枡:" + param.getMatnr() + " 鍦ㄥ簱浣嶄腑鏁伴噺涓嶈冻");
} else if (manLocDetl.getAnfme() - param.getCount() == 0) {
- SaasUtils.insertLog(1,manLocDetl.getLocNo(), manLocDetl.getMatnr(),param.getCount());
+ SaasUtils.insertLog(1, manLocDetl.getLocNo(), manLocDetl.getMatnr(), param.getCount());
manLocDetlService.delete(new EntityWrapper<ManLocDetl>()
- .eq("loc_no",node.getUuid())
- .eq("matnr",param.getMatnr()));
+ .eq("loc_no", node.getUuid())
+ .eq("matnr", param.getMatnr()));
} else {
manLocDetl.setAnfme(manLocDetl.getAnfme() - param.getCount());
- manLocDetlService.update(manLocDetl,new EntityWrapper<ManLocDetl>()
- .eq("loc_no",node.getUuid())
- .eq("matnr",param.getMatnr()));
- SaasUtils.insertLog(1,manLocDetl.getLocNo(), manLocDetl.getMatnr(),param.getCount());
+ manLocDetlService.update(manLocDetl, new EntityWrapper<ManLocDetl>()
+ .eq("loc_no", node.getUuid())
+ .eq("matnr", param.getMatnr()));
+ SaasUtils.insertLog(1, manLocDetl.getLocNo(), manLocDetl.getMatnr(), param.getCount());
}
}
}
@@ -187,11 +185,11 @@
source.setLocNo(targetNode.getUuid());
source.setNodeId(targetNode.getId());
- SaasUtils.insertLog(2,source.getLocNo(), source.getMatnr(), source.getAnfme());
+ SaasUtils.insertLog(2, source.getLocNo(), source.getMatnr(), source.getAnfme());
manLocDetlService.insert(source);
- }else {
+ } else {
check.setAnfme(check.getAnfme() + source.getAnfme());
- manLocDetlService.update(check,new EntityWrapper<ManLocDetl>()
+ manLocDetlService.update(check, new EntityWrapper<ManLocDetl>()
.eq("loc_no", targetNode.getUuid())
.eq("matnr", check.getMatnr()));
manLocDetlService.delete(new EntityWrapper<ManLocDetl>()
--
Gitblit v1.9.1