|
@@ -573,6 +573,12 @@ public class ContractInventoryFormServiceImpl extends BaseServiceImpl<ContractIn
|
|
|
if (total > 0) {
|
|
|
throw new ServiceException("当前节点下有子节点已经被变更,不能删除");
|
|
|
}
|
|
|
+ //校验是否被材料关联
|
|
|
+ int count = Math.toIntExact(formMaterialService.count(new LambdaQueryWrapper<InventoryFormMaterial>()
|
|
|
+ .eq(InventoryFormMaterial::getContractFormId, id)));
|
|
|
+ if (count > 0){
|
|
|
+ throw new ServiceException("当前清单已经关联材料,请取消关联后再删除");
|
|
|
+ }
|
|
|
baseMapper.updateNode(id,contractId);
|
|
|
}
|
|
|
|