|  |  |  | 
|---|
|  |  |  | 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())) { | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //未质检 | 
|---|
|  |  |  | 
|---|
|  |  |  | 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())) { | 
|---|