|
|
|
@ -12,6 +12,7 @@ import jnpf.engine.entity.FlowTaskNodeEntity;
|
|
|
|
|
import jnpf.engine.service.FlowTaskNodeService;
|
|
|
|
|
import jnpf.engine.service.FlowTaskService;
|
|
|
|
|
import jnpf.exception.DataException;
|
|
|
|
|
import jnpf.model.deliveryorder.DeliveryProductRelationModel;
|
|
|
|
|
import jnpf.model.warehousingstorage.WarehousingStorageProductModel;
|
|
|
|
|
import jnpf.model.yunguan.YunguanPurchaseInBoundModel;
|
|
|
|
|
import jnpf.model.yunguan.YunguanSaleOutBoundModel;
|
|
|
|
@ -244,6 +245,22 @@ public class WarehousingOutboundController {
|
|
|
|
|
if (StringUtil.isNotEmpty(b)){
|
|
|
|
|
return ActionResult.fail(b );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (WarehousingOutboundProductModel model : warehousingOutboundForm.getWarehousingOutboundProductList()){
|
|
|
|
|
QueryWrapper<InventoryEntity> queryWrapper = new QueryWrapper<>();
|
|
|
|
|
queryWrapper.lambda().eq(InventoryEntity::getProductId,model.getProductId());
|
|
|
|
|
queryWrapper.lambda().eq(InventoryEntity::getBatchNumber,model.getBatchNumber());
|
|
|
|
|
queryWrapper.lambda().isNull(InventoryEntity::getDeleteMark);
|
|
|
|
|
InventoryEntity inventoryEntity = inventoryService.getOne(queryWrapper);
|
|
|
|
|
if (ObjectUtil.isNotEmpty(inventoryEntity)) {
|
|
|
|
|
if (inventoryEntity.getInventoryNumber().compareTo(new BigDecimal(model.getOutboundNumber())) == -1){
|
|
|
|
|
return ActionResult.fail("库存数量不足");
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
return ActionResult.fail("库区不存在");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
try{
|
|
|
|
|
warehousingOutboundService.saveOrUpdate(warehousingOutboundForm, id ,true);
|
|
|
|
|
FlowTaskEntity flowTaskEntity = flowTaskService.getById(id);
|
|
|
|
|