#
luxiaotao1123
2020-12-24 1fe4313bb3326afa12c827e2d620fa735b8e37fb
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -10,6 +10,7 @@
import com.zy.asrs.service.MatCodeService;
import com.zy.asrs.service.MobileService;
import com.zy.asrs.service.WaitPakinService;
import com.zy.asrs.utils.VersionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -35,7 +36,7 @@
            throw new CoolException(BaseRes.PARAM);
        }
        int count = waitPakinService.selectCount(new EntityWrapper<WaitPakin>().
                eq("barcode", param.getBarcode()).eq("status", "N"));
                eq("zpallet", param.getBarcode()).eq("io_status", "N"));
        if (count > 0) {
            throw new CoolException("条码数据已存在");
        }
@@ -44,19 +45,17 @@
            if (Cools.isEmpty(matCode)) {
                throw new CoolException("物料数据错误");
            }
            WaitPakin waitPakin = new WaitPakin(
                    param.getBarcode(),    // 托盘码
                    matCode.getMatNo(),    // 物料编码
                    matCode.getMatName(),    // 物料描述
                    combMat.getCount(),    // 数量
                    matCode.getStr1(),    // 单位
                    "N",    // 状态
                    null,    // 备注
                    new Date(),    // 修改时间
                    userId,    // 修改人员
                    new Date(),    // 添加时间
                    userId    // 创建者
            );
            WaitPakin waitPakin = new WaitPakin();
            waitPakin.setZpallet(param.getBarcode());   // 托盘码
            waitPakin.setStatus("Y");    // 状态
            waitPakin.setAnfme(combMat.getCount());  // 数量
            waitPakin.setIoStatus("N");     // 入出状态
            waitPakin.setAppeUser(userId);
            waitPakin.setAppeTime(new Date());
            waitPakin.setModiUser(userId);
            waitPakin.setModiTime(new Date());
            VersionUtils.setWaitPakIn(waitPakin, matCode);
            if (!waitPakinService.insert(waitPakin)) {
                throw new CoolException("保存数据失败");
            }