From 4ec829bcbe9d8370476b71c9692eb7b3ef6e5e6f Mon Sep 17 00:00:00 2001
From: 18516761980 <4761516tqsxp>
Date: 星期三, 26 一月 2022 17:37:41 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 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 52ccdc3..813c865 100644
--- a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -16,7 +16,9 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
+import java.text.SimpleDateFormat;
import java.util.Date;
+import java.util.Random;
/**
* 绉诲姩绔湇鍔℃牳蹇冪被
@@ -53,15 +55,21 @@
Date now = new Date();
if (Cools.isEmpty(param.getBillNo())) {
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
+ Random rand = new Random();
+ Integer r = rand.nextInt(900)+ 100;
+ String billNo = sdf.format(new Date()) + r;
+ Integer seqNo=0;
for (CombParam.CombMat combMat : param.getCombMats()) {
MatCode matCode = matCodeService.selectOne(new EntityWrapper<MatCode>().eq("mat_no", combMat.getMatNo()));
if (Cools.isEmpty(matCode)) {
throw new CoolException("鐗╂枡鏁版嵁閿欒");
}
+ seqNo++;
PltBarcode pltBarcode = new PltBarcode();
pltBarcode.setBarcode(param.getBarcode());
- pltBarcode.setBillNo("");
- pltBarcode.setSeqNo(0);
+ pltBarcode.setBillNo(billNo);
+ pltBarcode.setSeqNo(seqNo);
pltBarcode.setBillType(5);
pltBarcode.setMatNo(matCode.getMatNo());
pltBarcode.setMatName(matCode.getMatName());
@@ -69,6 +77,8 @@
pltBarcode.setUnit(matCode.getUnit());
pltBarcode.setSpecs(matCode.getSpecs());
pltBarcode.setSize(matCode.getSize());
+ pltBarcode.setSupplier(combMat.getSupplier());
+ pltBarcode.setMemo(combMat.getMemo());
pltBarcode.setColor(matCode.getColor());
pltBarcode.setLinkErp(0);
pltBarcode.setModiUser(userId);
--
Gitblit v1.9.1