| | |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public ReturnT<String> AgvStart(Task wrkMast) { |
| | | Date now = new Date(); |
| | | LocCache locCache = locCacheService.selectOne(new EntityWrapper<LocCache>().eq("loc_no", wrkMast.getLocNo())); |
| | | if (Objects.isNull(locCache)) { |
| | | throw new CoolException("数据错误,库位不存在!!"); |
| | | } |
| | | if (!locCache.getLocSts().equals(LocStsType.LOC_STS_TYPE_S.type)) { |
| | | throw new CoolException("当前库位状态为:" + LocStsType.LOC_STS_TYPE_S.type + "." + LocStsType.LOC_STS_TYPE_S.desc + ",不是出库预约状态"); |
| | | } |
| | | List<WaitPakin> apallet = waitPakinService.selectList(new EntityWrapper<WaitPakin>().eq("zpallet", wrkMast.getBarcode())); |
| | | if (Objects.isNull(apallet)) { |
| | |
| | | if (Objects.isNull(pakins) || pakins.isEmpty()) { |
| | | throw new CoolException("单据不存在!!"); |
| | | } |
| | | pakins.forEach(orderPakin -> { |
| | | orderPakin.setSettle(4L); |
| | | if (!orderPakinService.updateById(orderPakin)) { |
| | | throw new CoolException("单据修改失败!!"); |
| | | } |
| | | }); |
| | | |
| | | // pakins.forEach(orderPakin -> { |
| | | // orderPakin.setSettle(4L); |
| | | // if (!orderPakinService.updateById(orderPakin)) { |
| | | // throw new CoolException("单据修改失败!!"); |
| | | // } |
| | | // List<OrderDetlPakin> detlPakins = orderDetlPakinService.selectList(new EntityWrapper<OrderDetlPakin>().eq("order_id", orderPakin.getId())); |
| | | // if (Objects.isNull(detlPakins) || detlPakins.isEmpty()) { |
| | | // throw new CoolException("单据明细不存在!!"); |
| | | // } |
| | | // }); |
| | | |
| | | return SUCCESS; |
| | | } |