| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.math.BigDecimal; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | |
| | | Double itemRcptQty = dto.getReceiptQty() + orderItem.getQty(); |
| | | orderItem.setQty(itemRcptQty) |
| | | .setSplrBatch(dto.getSplrBatch()) |
| | | .setUpdateBy(loginUserId) |
| | | .setStockUnit(dto.getStockUnit()) |
| | | .setProdTime(dto.getProdTime()); |
| | | |
| | |
| | | if (!warehouseAreasItemService.saveOrUpdate(item)) { |
| | | throw new CoolException("收货失败!!"); |
| | | } |
| | | |
| | | } |
| | | |
| | | // if (!warehouseAreasItemService.saveBatch(allOrders)) { |
| | | // throw new CoolException("收货失败!!"); |
| | | // } |
| | | // //获取采购数量 |
| | | |
| | | AsnOrder order = asnOrderMapper.getOne(new LambdaQueryWrapper<AsnOrder>().eq(AsnOrder::getCode, asnCode)); |
| | | if (order.getQty().compareTo(order.getAnfme()) >= 0.00) { |
| | | order.setExceStatus(AsnExceStatus.ASN_EXCE_STATUS_TASK_DONE.val).setRleStatus(Short.valueOf("1")); |
| | | |
| | | if (!asnOrderMapper.updateById(order)) { |
| | | throw new CoolException("订单状态修改失败!!"); |
| | | } |
| | | } |
| | | |
| | | |
| | | //获取采购数量 |
| | | // double purQty = receipts.stream().mapToDouble(ReceiptDetlsDto::getPurQty).sum(); |
| | | // |
| | | |
| | | // BigDecimal subtract = BigDecimal.valueOf(receiptQty).subtract(BigDecimal.valueOf(purQty)); |
| | | // //判断已收货数量是否小于等于采购数量 |
| | | // if (subtract.compareTo(new BigDecimal("0.0")) <= 0) { |