|
|
@ -31,6 +31,7 @@ import com.qs.serve.modules.oms.entity.dto.XltOrderDTO; |
|
|
|
import com.qs.serve.modules.oms.mapper.OmsOrderMapper; |
|
|
|
import com.qs.serve.modules.oms.service.OmsOrderItemService; |
|
|
|
import com.qs.serve.modules.oms.service.OmsOrderOptionsService; |
|
|
|
import com.qs.serve.modules.oms.service.OmsOrderPart1Service; |
|
|
|
import com.qs.serve.modules.oms.service.OmsOrderService; |
|
|
|
import com.qs.serve.modules.oms.utils.OmsOrderUtil; |
|
|
|
import com.qs.serve.modules.seeyon.entity.BaseCreateCallbackBo; |
|
|
@ -69,6 +70,7 @@ public class OmsOrderOptionsServiceImpl implements OmsOrderOptionsService { |
|
|
|
|
|
|
|
private final GoodsImminentBatchService goodsImminentBatchService; |
|
|
|
private final OmsOrderService omsOrderService; |
|
|
|
private final OmsOrderPart1Service omsOrderPart1Service; |
|
|
|
private final OmsOrderItemService omsOrderItemService; |
|
|
|
private final SysUserService sysUserService; |
|
|
|
private final BmsRegionMapper regionMapper; |
|
|
@ -135,6 +137,7 @@ public class OmsOrderOptionsServiceImpl implements OmsOrderOptionsService { |
|
|
|
if (orderItem.getQuantity() > spur) { |
|
|
|
Assert.throwEx(orderItem.getSkuCode() + " 单品库存不足"); |
|
|
|
} |
|
|
|
// 扣减库存
|
|
|
|
imminentBatch.setOrderQuantity(imminentBatch.getOrderQuantity() + orderItem.getQuantity()); |
|
|
|
imminentBatches.add(imminentBatch); |
|
|
|
} |
|
|
@ -363,6 +366,7 @@ public class OmsOrderOptionsServiceImpl implements OmsOrderOptionsService { |
|
|
|
OmsOrder omsOrder = omsOrderService.getById(param.getTargetId()); |
|
|
|
omsOrder.setOrderCheckState(OmsOrderCheckState.Rollback.getCode()); |
|
|
|
omsOrderService.updateById(omsOrder); |
|
|
|
omsOrderPart1Service.releaseInventory(omsOrder.getId()); |
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
@ -380,6 +384,7 @@ public class OmsOrderOptionsServiceImpl implements OmsOrderOptionsService { |
|
|
|
OmsOrder omsOrder = omsOrderService.getById(param.getTargetId()); |
|
|
|
omsOrder.setOrderCheckState(OmsOrderCheckState.Stop.getCode()); |
|
|
|
omsOrderService.updateById(omsOrder); |
|
|
|
omsOrderPart1Service.releaseInventory(omsOrder.getId()); |
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|