| | |
| | | wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3()); |
| | | } |
| | | try { |
| | | if (!Cools.isEmpty(orderDetlPakin)) { |
| | | if (!orderDetlPakinService.increaseQtyByOrderNo(wrkDetl.getOrderNo(), |
| | | wrkDetl.getMatnr(), |
| | | orderDetlPakin.getBatch(), wrkDetl.getBrand(), wrkDetl.getStandby1(), |
| | | wrkDetl.getStandby2(), wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3(), |
| | | wrkDetl.getAnfme())) { |
| | | // exceptionHandle("全板入库 ===>> 更新订单完成数量失败;[workNo={0}],[locNo={1}]", |
| | | // wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("全板入库 ===>> 更新订单完成数量失败; [workNo=" + wrkMast.getWrkNo() |
| | | + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | if (!Cools.isEmpty(orderDetlPakin)) { |
| | | if (!orderDetlPakinService.increaseQtyByOrderNo(wrkDetl.getOrderNo(), |
| | | wrkDetl.getMatnr(), |
| | | orderDetlPakin.getBatch(), wrkDetl.getBrand(), wrkDetl.getStandby1(), |
| | | wrkDetl.getStandby2(), wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3(), |
| | | wrkDetl.getAnfme())) { |
| | | // exceptionHandle("全板入库 ===>> 更新订单完成数量失败;[workNo={0}],[locNo={1}]", |
| | | // wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("全板入库 ===>> 更新订单完成数量失败; [workNo=" + wrkMast.getWrkNo() |
| | | + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } catch (Exception ignore) { |
| | | |
| | | } |
| | | } |
| | | // 修改库位状态 S ====>> F |
| | |
| | | } |
| | | } |
| | | |
| | | String agvSta = null; |
| | | if (wrkMast.getIoType().equals(TaskIOType.MERGE_IN.type)) { |
| | | agvSta = wrkMast.getPauseMk(); |
| | | } |
| | | List<BasStationDetl> basStationDetls = basStationDetlService.selectList(new EntityWrapper<BasStationDetl>().eq("dev_no", agvSta)); |
| | | if (Objects.isNull(basStationDetls) || basStationDetls.isEmpty()) { |
| | | // . 删除缓存站点明细 |
| | | if (!Objects.isNull(agvSta)) { |
| | | // 修改目标站点信息 |
| | | BasStation station = basStationService.selectOne(new EntityWrapper<BasStation>().eq("dev_no", agvSta)); |
| | | if (Objects.isNull(station)) { |
| | | throw new CoolException("站点不存在!!"); |
| | | } |
| | | basStationDetlService.delete(new EntityWrapper<BasStationDetl>() |
| | | .eq("dev_no", station.getDevNo())); |
| | | station.setLocSts(LocStsType.LOC_STS_TYPE_D.type); |
| | | if (!basStationService.updateById(station)) { |
| | | throw new CoolException("站点状态更新失败!!"); |
| | | } |
| | | } |
| | | } |
| | | // String agvSta = null; |
| | | // if (wrkMast.getIoType().equals(TaskIOType.MERGE_IN.type)) { |
| | | // agvSta = wrkMast.getPauseMk(); |
| | | // } |
| | | // List<BasStationDetl> basStationDetls = basStationDetlService.selectList(new EntityWrapper<BasStationDetl>().eq("dev_no", agvSta)); |
| | | // if (Objects.isNull(basStationDetls) || basStationDetls.isEmpty()) { |
| | | // // . 删除缓存站点明细 |
| | | // if (!Objects.isNull(agvSta)) { |
| | | // // 修改目标站点信息 |
| | | // BasStation station = basStationService.selectOne(new EntityWrapper<BasStation>().eq("dev_no", agvSta)); |
| | | // if (Objects.isNull(station)) { |
| | | // throw new CoolException("站点不存在!!"); |
| | | // } |
| | | // basStationDetlService.delete(new EntityWrapper<BasStationDetl>() |
| | | // .eq("dev_no", station.getDevNo())); |
| | | // station.setLocSts(LocStsType.LOC_STS_TYPE_D.type); |
| | | // if (!basStationService.updateById(station)) { |
| | | // throw new CoolException("站点状态更新失败!!"); |
| | | // } |
| | | // } |
| | | // } |
| | | break; |
| | | // 盘点入库 |
| | | case 57: |
| | |
| | | } |
| | | return SUCCESS; |
| | | } |
| | | |
| | | if (wrkMast.getTaskType().equals("agv_back")) { |
| | | wrkMast.setWrkSts(TaskStatusType.AGV_INVENTORY_UPDATED_IN.type); |
| | | wrkMast.setModiTime(new Date()); |
| | |
| | | } |
| | | return SUCCESS; |
| | | } |
| | | |
| | | LocCache locCache = locCacheService.selectOne(new EntityWrapper<LocCache>().eq("loc_no", wrkMast.getLocNo())); |
| | | if (!Objects.isNull(wrkMast.getSourceStaNo())) { |
| | | BasStation station = basStationService.selectOne(new EntityWrapper<BasStation>() |
| | |
| | | station.setLocSts(LocStsType.LOC_STS_TYPE_O.type); |
| | | } |
| | | station.setBarcode(""); |
| | | // basStationService.updateById(station); |
| | | if (!basStationService.updateById(station)) { |
| | | throw new CoolException("站点状态修改失败!!"); |
| | | } |
| | | |
| | | basStationDetlService.delete(new EntityWrapper<BasStationDetl>().eq("dev_no", station.getDevNo())); |
| | | } |
| | | } |