自动化立体仓库 - WMS系统
#
luxiaotao1123
2022-04-01 3e15d77853350f82e2a8d22e3e488c6667753891
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -12,6 +12,7 @@
import com.zy.asrs.service.*;
import com.zy.asrs.utils.VersionUtils;
import com.zy.common.model.DetlDto;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -24,6 +25,7 @@
 * 移动端服务核心类
 * Created by vincent on 2020/6/28
 */
@Slf4j
@Service
public class MobileServiceImpl implements MobileService {
@@ -45,7 +47,7 @@
        // 判断是否有相同条码的数据
        if (waitPakinService.selectCount(new EntityWrapper<WaitPakin>().
                eq("zpallet", param.getBarcode()).eq("io_status", "N")) > 0) {
            throw new CoolException("条码数据已存在");
            throw new CoolException(param.getBarcode() + "数据正在进行入库");
        }
        Date now = new Date();
@@ -68,7 +70,7 @@
            for (DetlDto detlDto : detlDtos) {
                MatCode matCode = matCodeService.selectById(detlDto.getMatnr());
                if (Cools.isEmpty(matCode)) {
                    throw new CoolException("物料数据错误");
                    throw new CoolException(detlDto.getMatnr() + "商品档案不存在");
                }
                WaitPakin waitPakin = new WaitPakin();
                waitPakin.setZpallet(param.getBarcode());   // 托盘码
@@ -81,7 +83,7 @@
                waitPakin.setModiTime(now);
                VersionUtils.setWaitPakIn(waitPakin, matCode);
                if (!waitPakinService.insert(waitPakin)) {
                    throw new CoolException("保存数据失败");
                    throw new CoolException("保存入库通知档失败");
                }
            }
        // 关联组托
@@ -116,7 +118,7 @@
            for (DetlDto detlDto : detlDtos) {
                MatCode matCode = matCodeService.selectById(detlDto.getMatnr());
                if (Cools.isEmpty(matCode)) {
                    throw new CoolException("物料数据错误");
                    throw new CoolException(detlDto.getMatnr() + "商品档案不存在");
                }
                WaitPakin waitPakin = new WaitPakin();
                waitPakin.setOrderNo(order.getOrderNo());   // 单据编号
@@ -131,7 +133,7 @@
                waitPakin.setModiTime(now);
                VersionUtils.setWaitPakIn(waitPakin, matCode);
                if (!waitPakinService.insert(waitPakin)) {
                    throw new CoolException("保存数据失败");
                    throw new CoolException("保存入库通知档失败");
                }
            }