自动化立体仓库 - WMS系统
zyx
2023-10-24 b885f63a2990ece741fc6db5c55aeeae673062b3
src/main/java/com/zy/asrs/service/impl/AgvWorkServiceImpl.java
@@ -69,7 +69,7 @@
    入库
     */
    @Transactional
    public StartupDto createWaitPainWrkMastStart(List<AgvBasDevp> agvBasDevpList, Long userId) {
    public StartupDto createWaitPainWrkMastStart(List<AgvBasDevp> agvBasDevpList, Long userId, boolean isConveyor) {
        Date now = new Date();
@@ -88,7 +88,9 @@
            AgvLocMast agvLocMast = agvCommonService.getLocNo(agvWaitPakinList, agvBasDevp.getFloor());
            //生成工作档
            //AgvWrkMast wrkMast = createWrkMast(agvBasDevp, agvLocMast, now, userId);
            AgvWrkMast wrkMast = createWrkMast(1,201L,agvBasDevp.getDevNo(),agvLocMast.getLocNo(),agvBasDevp.getBarcode(),now,userId);
            AgvWrkMast wrkMast = createWrkMast(1,201L,agvBasDevp.getDevNo(),agvLocMast.getLocNo(),agvBasDevp.getBarcode(),now,userId, isConveyor);
            //标记是否为输送线入库
            wrkMast.setMk(isConveyor ? "Y" : "N");
            //生成工作档明细
            //createWrkDetlReWrite(agvWaitPakinList,wrkMast,userId);
            agvWaitPakinList.forEach(wp -> {
@@ -134,7 +136,7 @@
            //判断是否全板出库
            int ioType = isPakOut(sourceLocNo,anfme) ?  101 : 103;
            //生成工作档
            AgvWrkMast wrkMast = createWrkMast(ioType,wrkSts,sourceLocNo,targetLocNo,barcode,now,userId);
            AgvWrkMast wrkMast = createWrkMast(ioType,wrkSts,sourceLocNo,targetLocNo,barcode,now,userId,false);
            //生成工作档明细
            createWrkDetlReWrite(mantr,wrkMast.getWrkNo(),orderNo,batch,anfme,barcode,now,userId,csocode,isoseq);
            //修改订单信息
@@ -212,7 +214,7 @@
            Date now = new Date();
            //生成工作党
            AgvWrkMast wrkMast = createWrkMast(107, 21L, locDetl.getLocNo(), agvBasDevp.getDevNo(), agvLocDetl.getSuppCode(), now, userId);
            AgvWrkMast wrkMast = createWrkMast(107, 21L, locDetl.getLocNo(), agvBasDevp.getDevNo(), agvLocDetl.getSuppCode(), now, userId,false);
            //生成工作明细档
            createWrkDetlReWrite(locDetl.getMatnr(),wrkMast.getWrkNo(),null,locDetl.getBatch(),locDetl.getCount(),wrkMast.getBarcode(),now,userId,agvLocDetl.getThreeCode(),agvLocDetl.getDeadTime());
            //修改库位信息
@@ -242,7 +244,7 @@
        Date now = new Date();
        //生成移库工作档
        AgvWrkMast wrkMast = createWrkMast(11, 21L, sourceLocNo, targetLocNo, sourceLocDetl.getSuppCode(), now, userId);
        AgvWrkMast wrkMast = createWrkMast(11, 21L, sourceLocNo, targetLocNo, sourceLocDetl.getSuppCode(), now, userId,false);
        //生成工作党明细
        createWrkDetlReWrite(sourceLocDetl.getMatnr(),wrkMast.getWrkNo(),null,sourceLocDetl.getBatch(),sourceLocDetl.getAnfme(),sourceLocDetl.getZpallet(),now,userId,sourceLocDetl.getThreeCode(),sourceLocDetl.getDeadTime());
        //修改目标库位状态
@@ -265,7 +267,7 @@
        // 检索库位
        AgvLocMast locMast = agvCommonService.getLocNo(null, agvBasDevp.getFloor());
        // 生成工作档 10.空板入库
        createWrkMast(10,201L,agvBasDevp.getDevNo(),locMast.getLocNo(),null,now,userId);
        createWrkMast(10,201L,agvBasDevp.getDevNo(),locMast.getLocNo(),null,now,userId,false);
        //更新源站点状态
        updateAgvBasDevp(agvBasDevp,"R");
        //更新目标库位状态
@@ -296,7 +298,7 @@
                    .eq("station_code", param.getStationCode())
                    .eq("loc_sts", "O"));
            //生成工作档
            createWrkMast(110,21L,locNo,agvBasDevp.getDevNo(),null,now,userId);
            createWrkMast(110,21L,locNo,agvBasDevp.getDevNo(),null,now,userId,false);
            //修改源库位状态
            updateAgvLocMast(agvLocMast,"R");
            //修改目标工作位状态
@@ -592,7 +594,7 @@
    /*
    生成工作档
     */
    private AgvWrkMast createWrkMast(int ioType, long wrkSts, String sourceLocNo, String locNo, String barcode,  Date now, Long userId){
    private AgvWrkMast createWrkMast(int ioType, long wrkSts, String sourceLocNo, String locNo, String barcode,  Date now, Long userId, boolean isConveyor){
        AgvWrkMast wrkMast = new AgvWrkMast();
        //生成工作号
//        int workNo = agvCommonService.getWorkNo(WorkNoType.getWorkNoType(ioType));
@@ -610,6 +612,8 @@
        wrkMast.setLocNo(locNo);
        //容器编码
        wrkMast.setBarcode(barcode);
        //标记是否为输送线入库
        wrkMast.setMk(isConveyor ? "Y" : "N");
        // 满板:Y
        //wrkMast.setFullPlt("Y");
        // 拣料