| | |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R wavePickItems(WavePickItemsParams params) { |
| | | public synchronized R wavePickItems(WavePickItemsParams params) { |
| | | if (Objects.isNull(params.getBarcode())) { |
| | | return R.error("托盘码不能为空!!"); |
| | | } |
| | |
| | | if (!Boolean.parseBoolean(config.getVal())) { |
| | | Double v = Math.round((item.getQty() + taskItem.getAnfme()) * 1000000) / 1000000.0; |
| | | if (item.getAnfme().compareTo(v) < 0.0) { |
| | | |
| | | throw new CoolException("前当物料已超出可拣范围,请核对后再操作!!"); |
| | | } |
| | | } |
| | |
| | | Purchase purchase = purchaseService.getOne(new LambdaQueryWrapper<Purchase>() |
| | | .eq(Purchase::getCode, list.stream().findFirst().get().getPoCode())); |
| | | if (!Objects.isNull(purchase)) { |
| | | Double qty = Math.round((purchase.getQty() - sum) * 100) / 100.0; |
| | | Double qty = Math.round((purchase.getQty() - sum) * 1000000) / 1000000.0; |
| | | purchase.setQty(qty) |
| | | .setExceStatus(POExceStatus.PO_EXCE_STATUS_EXCE_ING.val); |
| | | |
| | |
| | | p1.getUnit(), |
| | | p1.getTrackCode(), |
| | | p1.getFieldsIndex(), |
| | | Math.round((p1.getAnfme() + p2.getAnfme()) * 100) / 100.0, |
| | | Math.round((p1.getAnfme() + p2.getAnfme())* 1000000) / 1000000.0, |
| | | p1.getWorkQty(), |
| | | p1.getTenantId(), |
| | | p1.getStatus(), |
| | |
| | | |
| | | Double sum = locItems.stream().mapToDouble(LocItem::getAnfme).sum(); |
| | | |
| | | locRevise.setAnfme(Math.round((sum + locRevise.getAnfme()) * 100) / 100.0); |
| | | locRevise.setAnfme(Math.round((sum + locRevise.getAnfme()) * 1000000) / 1000000.0); |
| | | }); |
| | | |
| | | locRevise.setExceStatus(CommonExceStatus.COMMON_EXCE_STATUS_UN_EXCE.val); |