|
|
@@ -261,8 +261,6 @@ public class InboundPurchaseReturnService extends BaseService<Inbound> {
|
|
|
else {
|
|
|
//region 根据id查询 此条入库单的数据还未更改前的数据
|
|
|
InboundResponse inboundResponse = inboundMapper.selectById(inboundVO.getIntoId());
|
|
|
- BigDecimal sumQty = inboundVO.getItemList().stream().map(InboundItemVO::getIntoingQty).reduce(BigDecimal.ZERO, BigDecimal::add).setScale(6, BigDecimal.ROUND_HALF_UP);
|
|
|
- BigDecimal sumAmt = inboundVO.getItemList().stream().map(InboundItemVO::getIntoingAmt).reduce(BigDecimal.ZERO, BigDecimal::add).setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
|
//endregion
|
|
|
|
|
|
//region 已入库编辑
|
|
|
@@ -366,8 +364,8 @@ public class InboundPurchaseReturnService extends BaseService<Inbound> {
|
|
|
//region 修改入库总单
|
|
|
Inbound inbound = new Inbound();
|
|
|
inbound.setIntoId(inboundVO.getIntoId());
|
|
|
- inbound.setIntoQty(sumQty);
|
|
|
- inbound.setIntoAmt(sumAmt);
|
|
|
+ inbound.setIntoQty(inboundVO.getIntoingQty());
|
|
|
+ inbound.setIntoAmt(inboundVO.getIntoingAmt());
|
|
|
//修改
|
|
|
inboundMapper.update(inbound,
|
|
|
new UpdateWrapper<Inbound>().lambda().eq(Inbound::getIntoId, UUID.fromString(inbound.getIntoId()))
|
|
|
@@ -387,9 +385,6 @@ public class InboundPurchaseReturnService extends BaseService<Inbound> {
|
|
|
inventoryService.operatingInventoryInformation(map);
|
|
|
//endregion
|
|
|
}
|
|
|
- else{
|
|
|
- throw new BaseBusinessException(ResponseCodeEnum.OPERATE_FAIL.getCode(), ErrorCodeEnum.FLG_HANDLE_SETTING_NOT_ENABLED_INTO.getMessage());
|
|
|
- }
|
|
|
//endregion
|
|
|
|
|
|
//region 入库中编辑
|
|
|
@@ -458,17 +453,14 @@ public class InboundPurchaseReturnService extends BaseService<Inbound> {
|
|
|
//region 修改入库总单
|
|
|
Inbound inbound = new Inbound();
|
|
|
inbound.setIntoId(inboundVO.getIntoId());
|
|
|
- inbound.setIntoingQty(sumQty);
|
|
|
- inbound.setIntoingAmt(sumAmt);
|
|
|
+ inbound.setIntoingQty(inboundVO.getIntoingQty());
|
|
|
+ inbound.setIntoingAmt(inboundVO.getIntoingAmt());
|
|
|
//修改
|
|
|
inboundMapper.update(inbound,
|
|
|
new UpdateWrapper<Inbound>().lambda().eq(Inbound::getIntoId, UUID.fromString(inbound.getIntoId()))
|
|
|
);
|
|
|
//endregion
|
|
|
}
|
|
|
- else{
|
|
|
- throw new BaseBusinessException(ResponseCodeEnum.OPERATE_FAIL.getCode(), ErrorCodeEnum.FLG_HANDLE_SETTING_NOT_ENABLED_INTO.getMessage());
|
|
|
- }
|
|
|
//endregion
|
|
|
}
|
|
|
//endregion
|