Commit 3c76385c31db1904a6f78f241e7af41009bde38a

Authored by 杨鸣坤
1 parent bc0e0adf

楚江ERP:删除合同v2

... ... @@ -375,6 +375,10 @@ public class ContractDistributorStandardServiceImpl extends
375 375 throw new DefaultClientException("合同不存在!");
376 376 }
377 377
  378 + if (!"DRAFT".equals(data.getStatus())) {
  379 + throw new DefaultClientException("只有草稿合同才能删除!");
  380 + }
  381 +
378 382 Wrapper<ContractDistributorStandard> wrapper = Wrappers.lambdaUpdate(ContractDistributorStandard.class)
379 383 .set(ContractDistributorStandard::getStatus, "DELETED")
380 384 .eq(ContractDistributorStandard::getId, id);
... ...