自动化立体仓库 - WMS系统
luxiaotao1123
2022-04-22 adf3a1c6591b8db2c47f45c2ac2370e66d505edb
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -16,6 +16,7 @@
import com.zy.common.model.*;
import com.zy.common.model.enums.WorkNoType;
import com.zy.common.service.CommonService;
import com.zy.common.web.WcsController;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -65,6 +66,8 @@
    private OrderService orderService;
    @Autowired
    private OrderDetlService orderDetlService;
    @Autowired
    private WcsController wcsController;
    @Override
    @Transactional
@@ -663,7 +666,7 @@
            locDetl.setAppeUser(userId);
            locDetl.setAppeTime(now);
            if (!locDetlService.insert(locDetl)) {
                throw new CoolException("保存库存明细失败");
                throw new CoolException("添加" + locDetl.getLocNo() + "库位," + locDetl.getMatnr() + "商品," + locDetl.getBatch() + "批号库存明细失败");
            }
            // 保存调整记录
            AdjDetl adjDetl = new AdjDetl();
@@ -856,4 +859,14 @@
        }
    }
    @Override
    public StartupDto createWaitPainWrkMastStart(List<WaitPakin> list, Long userId) {
        if (Cools.isEmpty(list)) {
            throw new CoolException("入库通知档不能为空");
        }
        LocTypeDto locTypeDto = new LocTypeDto();
        locTypeDto.setLocType1((short) 1);
        return wcsController.startupFullPutStore(301, list.get(0).getZpallet(), locTypeDto, list);
    }
}