|
|
@ -153,15 +153,7 @@ public class InvPreInProductsController {
|
|
|
|
InvProductEntity invProductEntity = invProductService.selectById(id);
|
|
|
|
InvProductEntity invProductEntity = invProductService.selectById(id);
|
|
|
|
if (invProductEntity != null) {
|
|
|
|
if (invProductEntity != null) {
|
|
|
|
invProductService.deleteById(id);
|
|
|
|
invProductService.deleteById(id);
|
|
|
|
FilterInvProductDetailRequest detailRequest = new FilterInvProductDetailRequest();
|
|
|
|
invProductDetailService.deleteByOrderIdFk(invProductEntity.getOrderIdFk());
|
|
|
|
detailRequest.setSupId(invProductEntity.getSupId());
|
|
|
|
|
|
|
|
if (StrUtil.isEmpty(invProductEntity.getBatchNo())) {
|
|
|
|
|
|
|
|
detailRequest.setBatchNo("empty");
|
|
|
|
|
|
|
|
} else
|
|
|
|
|
|
|
|
detailRequest.setBatchNo(invProductEntity.getBatchNo());
|
|
|
|
|
|
|
|
detailRequest.setProductIdFk(invProductEntity.getRelIdFk());
|
|
|
|
|
|
|
|
detailRequest.setInvStorageCode(invProductEntity.getInvStorageCode());
|
|
|
|
|
|
|
|
invProductDetailService.deleteByProductId(detailRequest);
|
|
|
|
|
|
|
|
return ResultVOUtils.success("删除成功");
|
|
|
|
return ResultVOUtils.success("删除成功");
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
return ResultVOUtils.error(500, "删除失败!");
|
|
|
|
return ResultVOUtils.error(500, "删除失败!");
|
|
|
|