|
|
@@ -450,6 +450,10 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
|
|
|
|
|
|
@Override
|
|
|
public boolean deleteByPrimaryKey(Long id) {
|
|
|
+ Product productTemp = getMapper().selectByPrimaryKey(id);
|
|
|
+ if (ObjectUtils.isEmpty(productTemp)){
|
|
|
+ throw new BizException(BizExceptionCode.ORDER_NOT_EXITTS);
|
|
|
+ }
|
|
|
//校验物料是否已经在使用状态(采购单、销售单、BOM、出入库单)
|
|
|
validProductOperation(id, BizExceptionCode.BIZ_RELDELETE_DELETEPROD);
|
|
|
//校验是否存在关联单据
|