自动化立体仓库 - WMS系统
#
18516761980
2021-12-06 7203d67cfa3a2fc1cab9b8985dfd35c1797207b1
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());