From a840e7934946d6aeae1e2abd61f5fd024c2868d8 Mon Sep 17 00:00:00 2001
From: tzsk <Administrator@qq.com>
Date: 星期日, 07 四月 2024 08:23:52 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java | 45 ++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 44 insertions(+), 1 deletions(-)
diff --git a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
index 541d386..354b926 100644
--- a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -96,7 +96,8 @@
boolean hasContainerCode = false;
int containerCodeCount = 0;//鏂欑鐮佹暟閲�
for (CombParam.CombMat combMat : param.getCombMats()) {
- if (combMat.getContainerCode() != null) {
+ if(!Cools.isEmpty(combMat.getContainerCode())){
+ //if (combMat.getContainerCode() != null) {
hasContainerCode = true;
containerCodeCount++;
continue;
@@ -615,6 +616,48 @@
});
}
+ @Override
+ public void nodePakinNoComb(CombParam param) {
+ if(Cools.isEmpty(param.getLocno())){
+ throw new CoolException("搴撲綅鍙锋湭濉啓锛屾棤娉曞叆搴�");
+ }
+ param.getCombMats().forEach(combMat -> {
+ Wrapper<ManLocDetl> wrapper = new EntityWrapper<ManLocDetl>().eq("loc_no", param.getLocno()).eq("matnr",combMat.getMatnr());
+ Utils.wapperSetCondition(wrapper,"container_code",combMat.getContainerCode());
+ Utils.wapperSetCondition(wrapper,"batch",combMat.getBatch());
+ Utils.wapperSetCondition(wrapper,"csocode",combMat.getCsocode());
+ Utils.wapperSetCondition(wrapper,"isoseq",combMat.getIsoseq());
+ ManLocDetl manLocDetl = manLocDetlService.selectOne(wrapper);
+ if(Cools.isEmpty(manLocDetl)){
+ saveManlocDetl(combMat,param.getLocno());
+ }else{
+ manLocDetl.setAnfme(manLocDetl.getAnfme() + combMat.getAnfme());
+ manLocDetlService.update(manLocDetl,wrapper);
+ }
+ //鐢熸垚骞冲簱鍏ュ嚭搴撴棩蹇�
+ SaasUtils.insertLog(0,param.getLocno(),combMat.getMatnr(), combMat.getAnfme(),"");
+ });
+
+ }
+
+ private boolean saveManlocDetl(CombParam.CombMat combMat, String locNo){
+ Node node = nodeService.selectOne(new EntityWrapper<Node>()
+ .eq("name", locNo));
+ Mat mat = matService.selectByMatnr(combMat.getMatnr());
+ ManLocDetl manLocDetl = new ManLocDetl();
+ BeanUtils.copyProperties(mat,manLocDetl);
+ manLocDetl.setAnfme(combMat.getAnfme());
+ manLocDetl.setNodeId(node.getId());
+ manLocDetl.setContainerCode(combMat.getContainerCode());
+ manLocDetl.setCsocode(combMat.getCsocode());
+ manLocDetl.setIsoseq(combMat.getIsoseq());
+ manLocDetl.setCreateTime(new Date());
+ manLocDetl.setModiTime(new Date());
+ manLocDetl.setLocNo(locNo);
+ manLocDetl.setStatus(1);
+ return manLocDetlService.insert(manLocDetl);
+ }
+
private void saveManlocDetl(WaitPakin waitPakin, Date now, String locNo){
Node node = nodeService.selectOne(new EntityWrapper<Node>()
--
Gitblit v1.9.1