| | |
| | | //检索库位,选择合适的库位 |
| | | 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"); |
| | | //生成工作档明细 |
| | |
| | | //判断是否全板出库 |
| | | 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)),null); |
| | | //生成工作档明细 |
| | | taskDto.getLocDtos().forEach(locDto -> { |
| | | if (!BaseController.isJSON(locDto.getOrderNo())) { |
| | |
| | | //判断是否全板出库 |
| | | 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)),null); |
| | | //生成工作档明细 |
| | | taskDto.getLocDtos().forEach(locDto -> { |
| | | if (!BaseController.isJSON(locDto.getOrderNo())) { |
| | |
| | | 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(), |
| | |
| | | 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()); |
| | | //生成工作档明细 |
| | | agvWaitPakinList.forEach(wp -> { |
| | | createWrkDetlReWrite(wp.getMatnr(),wrkMast.getWrkNo(),wp.getOrderNo(),wp.getBatch(),wp.getAnfme(),wp.getSuppCode(),now,userId,wp.getThreeCode(),wp.getDeadTime(),wp.getProcessSts()); |
| | |
| | | } |
| | | 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); |
| | | } |
| | |
| | | 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"); |
| | |
| | | /* |
| | | 生成工作档 |
| | | */ |
| | | 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)) { |
| | | throw new CoolException("保存工作档失败"); |