| | |
| | | //检索库位,选择合适的库位 |
| | | AgvLocMast agvLocMast = agvCommonService.getLocNo(agvBasDevp.getLocType1(),agvBasDevp.getFloor(),false,false); |
| | | //生成工作档 |
| | | AgvWrkMast wrkMast = createWrkMast(1,201L,agvBasDevp.getDevNo(),agvLocMast.getLocNo(),agvBasDevp.getBarcode(),now,userId, agvBasDevp.getLocType2()); |
| | | AgvWrkMast wrkMast = createWrkMast(1,201L,agvBasDevp.getDevNo(),agvLocMast.getLocNo(),agvBasDevp.getBarcode(),now,userId, agvBasDevp.getLocType2(),agvLocMast.getPltType()); |
| | | //标记是否为输送线入库 |
| | | wrkMast.setMk(isConveyor ? "Y" : "N"); |
| | | //生成工作档明细 |
| | |
| | | //String barcode = agvLocDetls.get(0).getSuppCode(); |
| | | String containerCode = taskDto.getLocDtos().get(0).getContainerCode(); |
| | | |
| | | |
| | | AgvLocMast agvLocMast = agvLocMastService.selectById(sourceLocNo); |
| | | //判断是否全板出库 |
| | | int ioType = isPakOut(sourceLocNo,taskDto) ? 101 : 103; |
| | | //生成工作档 |
| | | AgvWrkMast wrkMast = createWrkMast(ioType,wrkSts,sourceLocNo,targetLocNo,containerCode,now,userId,Short.valueOf(containerCode.substring(0,2))); |
| | | AgvWrkMast wrkMast = createWrkMast(ioType,wrkSts,sourceLocNo,targetLocNo,containerCode,now,userId,Short.valueOf(containerCode.substring(0,2)),agvLocMast.getPltType()); |
| | | //生成工作档明细 |
| | | long flowId = snowflakeIdWorker.nextId(); |
| | | taskDto.getLocDtos().forEach(locDto -> { |
| | |
| | | //String barcode = agvLocDetls.get(0).getSuppCode(); |
| | | String containerCode = taskDto.getLocDtos().get(0).getContainerCode(); |
| | | |
| | | |
| | | AgvLocMast agvLocMast = agvLocMastService.selectById(sourceLocNo); |
| | | //判断是否全板出库 |
| | | int ioType = 107; |
| | | //生成工作档 |
| | | AgvWrkMast wrkMast = createWrkMast(ioType,wrkSts,sourceLocNo,targetLocNo,containerCode,now,userId,Short.valueOf(containerCode.substring(0,2))); |
| | | AgvWrkMast wrkMast = createWrkMast(ioType,wrkSts,sourceLocNo,targetLocNo,containerCode,now,userId,Short.valueOf(containerCode.substring(0,2)),agvLocMast.getPltType()); |
| | | //生成工作档明细 |
| | | long flowId = snowflakeIdWorker.nextId(); |
| | | taskDto.getLocDtos().forEach(locDto -> { |
| | |
| | | int containerType = getContainerTypeByloc(taskDto.getLocNo()); |
| | | |
| | | //生成工作档 |
| | | AgvWrkMast wrkMast = createWrkMast(107, 21L,taskDto.getLocNo(),taskDto.getAgvStaNo(),taskDto.getLocDtos().get(0).getContainerCode(),now,userId,containerType); |
| | | AgvWrkMast wrkMast = createWrkMast(107, 21L,taskDto.getLocNo(),taskDto.getAgvStaNo(),taskDto.getLocDtos().get(0).getContainerCode(),now,userId,containerType,null); |
| | | //生成工作档明细 |
| | | taskDto.getLocDtos().forEach(locDto -> { |
| | | //明细档所需参数 |
| | |
| | | Date now = new Date(); |
| | | |
| | | //生成移库工作档 |
| | | AgvWrkMast wrkMast = createWrkMast(11, 21L, sourceLocNo, targetLocNo, sourceLocDetl.getSuppCode(), now, userId,getContainerTypeByloc(sourceLocNo)); |
| | | AgvWrkMast wrkMast = createWrkMast(11, 21L, sourceLocNo, targetLocNo, sourceLocDetl.getSuppCode(), now, userId,getContainerTypeByloc(sourceLocNo),targetLocMast.getPltType()); |
| | | //生成工作党明细 |
| | | createWrkDetlReWrite(sourceLocDetl.getMatnr(),wrkMast.getWrkNo(),null,sourceLocDetl.getBatch(),sourceLocDetl.getAnfme(),sourceLocDetl.getZpallet(),now,userId,sourceLocDetl.getThreeCode(),sourceLocDetl.getDeadTime(),sourceLocDetl.getProcessSts()); |
| | | //修改目标库位状态 |
| | |
| | | String locNo = agvLocMast.getLocNo(); |
| | | |
| | | //生成工作档 |
| | | AgvWrkMast wrkMast = createWrkMast(1,201L,devNo,locNo,containerCode,now,userId, containerType); |
| | | AgvWrkMast wrkMast = createWrkMast(1,201L,devNo,locNo,containerCode,now,userId, containerType,agvLocMast.getPltType()); |
| | | //生成工作档明细 |
| | | long flowId = snowflakeIdWorker.nextId(); |
| | | agvWaitPakinList.forEach(wp -> { |
| | |
| | | } |
| | | agvLocMast = agvCommonService.getLocNo(locType,agvBasDevp.getFloor(),true,true); |
| | | // 生成工作档 10.空板入库 |
| | | createWrkMast(10,201L,agvBasDevp.getDevNo(),agvLocMast.getLocNo(),containerCode,now,userId,containerType); |
| | | createWrkMast(10,201L,agvBasDevp.getDevNo(),agvLocMast.getLocNo(),containerCode,now,userId,containerType,agvLocMast.getPltType()); |
| | | //更新源站点状态 |
| | | updateAgvBasDevp(agvBasDevp,"R",containerType,containerCode); |
| | | } |
| | |
| | | updateAgvLocMast(agvLocMast,"S"); |
| | | return agvLocMast.getLocNo(); |
| | | } |
| | | |
| | | /* |
| | | 空板出库 |
| | | */ |
| | |
| | | throw new CoolException("暂无当前出库站点类型的空货架!"); |
| | | } |
| | | //生成工作档 |
| | | createWrkMast(110,21L,agvLocMast.getLocNo(),agvBasDevp.getDevNo(),agvLocMast.getBarcode(),now,userId,containerType); |
| | | createWrkMast(110,21L,agvLocMast.getLocNo(),agvBasDevp.getDevNo(),agvLocMast.getBarcode(),now,userId,containerType,agvLocMast.getPltType()); |
| | | |
| | | //修改源库位状态 |
| | | updateAgvLocMast(agvLocMast,"R"); |
| | |
| | | wrkDetl.setAppeTime(now); |
| | | wrkDetl.setModiUser(userId); |
| | | wrkDetl.setModiTime(now); |
| | | |
| | | wrkDetl.setThreeCode(csocode); |
| | | wrkDetl.setDeadTime(isoseq); |
| | | if (!agvWrkDetlService.insert(wrkDetl)) { |
| | |
| | | /* |
| | | 生成工作档 |
| | | */ |
| | | private AgvWrkMast createWrkMast(int ioType, long wrkSts, String sourceLocNo, String locNo, String barcode, Date now, Long userId, int containerType){ |
| | | private AgvWrkMast createWrkMast(int ioType, long wrkSts, String sourceLocNo, String locNo, String barcode, Date now, Long userId, int containerType,Integer pltType){ |
| | | AgvWrkMast wrkMast = new AgvWrkMast(); |
| | | //工作状态 |
| | | wrkMast.setWrkSts(wrkSts); |
| | |
| | | wrkMast.setAppeTime(now); |
| | | wrkMast.setModiUser(userId); |
| | | wrkMast.setModiTime(now); |
| | | wrkMast.setPltType(pltType); |
| | | wrkMast.setLogErrMemo("createWaitPainWrkMastStart"); |
| | | |
| | | if (!agvWrkMastService.insertByIncrease(wrkMast)) { |
| | |
| | | |
| | | } |
| | | |
| | | } |
| | | } |