|  |  |  | 
|---|
|  |  |  | throw new CoolException("数据错误:主单不存在!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //TODO /**收货数量累加,1. 会出超收情况 2. 会有收货不足情况*/ | 
|---|
|  |  |  | Double rcptedQty = asnOrder.getQty() + receiptQty; | 
|---|
|  |  |  | Double rcptedQty = Math.round((asnOrder.getQty() + receiptQty) * 10000) / 10000.0; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | asnOrder.setQty(rcptedQty).setExceStatus(AsnExceStatus.ASN_EXCE_STATUS_EXCE_ING.val); | 
|---|
|  |  |  | if (!asnOrderMapper.updateById(asnOrder)) { | 
|---|
|  |  |  | 
|---|
|  |  |  | throw new CoolException("请输入正确的时间格式!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | Double itemRcptQty = dto.getReceiptQty() + orderItem.getQty(); | 
|---|
|  |  |  | Double itemRcptQty = Math.round((dto.getReceiptQty() + orderItem.getQty()) * 10000) / 10000.0; | 
|---|
|  |  |  | Boolean allowOver = false; | 
|---|
|  |  |  | if (!Objects.isNull(config)) { | 
|---|
|  |  |  | if (Boolean.parseBoolean(config.getVal())) { | 
|---|
|  |  |  | 
|---|
|  |  |  | .setProdTime(dto.getProdTime()) | 
|---|
|  |  |  | .setSplrId(companys.getId()) | 
|---|
|  |  |  | .setWeight(dto.getWeigth()) | 
|---|
|  |  |  | .setPlatOrderCode(orderItem.getPlatOrderCode()) | 
|---|
|  |  |  | .setPlatWorkCode(orderItem.getPlatWorkCode()) | 
|---|
|  |  |  | .setProjectCode(orderItem.getProjectCode()) | 
|---|
|  |  |  | //库存单位为最小单位 | 
|---|
|  |  |  | .setUnit(orderItem.getStockUnit()) | 
|---|
|  |  |  | .setStockUnit(orderItem.getStockUnit()) | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (!Objects.isNull(serviceOne)) { | 
|---|
|  |  |  | item.setId(serviceOne.getId()); | 
|---|
|  |  |  | item.setAnfme(item.getAnfme() + serviceOne.getAnfme()); | 
|---|
|  |  |  | Double anfme = Math.round((item.getAnfme() + serviceOne.getAnfme()) * 10000) / 10000.0; | 
|---|
|  |  |  | item.setAnfme(anfme); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //未质检 | 
|---|
|  |  |  | 
|---|
|  |  |  | //        List<Short> asList = Arrays.asList(Short.valueOf(PakinIOStatus.PAKIN_IO_STATUS_DONE.val), Short.valueOf(PakinIOStatus.PAKIN_IO_STATUS_DONE.val)); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | WaitPakin waitPakin = waitPakinService.getOne(new LambdaQueryWrapper<WaitPakin>() | 
|---|
|  |  |  | .eq(!Cools.isEmpty(params.get("barcode")),WaitPakin::getBarcode, params.get("barcode").toString()) | 
|---|
|  |  |  | .eq(!Cools.isEmpty(params.get("code")),WaitPakin::getCode, params.get("code").toString()) | 
|---|
|  |  |  | .eq(!Cools.isEmpty(params.get("barcode")),WaitPakin::getBarcode, params.get("barcode")) | 
|---|
|  |  |  | .eq(!Cools.isEmpty(params.get("code")),WaitPakin::getCode, params.get("code")) | 
|---|
|  |  |  | .eq(WaitPakin::getIoStatus, PakinIOStatus.PAKIN_IO_STATUS_DONE.val)); | 
|---|
|  |  |  | if (Objects.isNull(waitPakin)) { | 
|---|
|  |  |  | return R.error("未找到该容器码的组托明细,请检查组托状态"); | 
|---|
|  |  |  | 
|---|
|  |  |  | if (Objects.isNull(stockItem)) { | 
|---|
|  |  |  | detlsDto.setStockQty(0.0); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | detlsDto.setStockQty(stockItem.getAnfme() + stockItem.getWorkQty()); | 
|---|
|  |  |  | Double anfme = Math.round((stockItem.getAnfme() + stockItem.getWorkQty()) * 10000) / 10000.0; | 
|---|
|  |  |  | detlsDto.setStockQty(anfme); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (!Objects.isNull(asnOrderItem.getPoDetlId())) { | 
|---|