From 81bc2ea3ef16c8d2415050f6dc84d06001b605c3 Mon Sep 17 00:00:00 2001 From: yinq Date: Wed, 3 Jun 2026 18:25:42 +0800 Subject: [PATCH] =?UTF-8?q?1.1.55=20=E5=8F=AA=E8=83=BD=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=9A=82=E5=AD=98=E7=8A=B6=E6=80=81=E7=9A=84=E5=90=88=E5=90=8C?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../erp/service/impl/ErpContractInfoServiceImpl.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ruoyi-modules/ruoyi-oa/src/main/java/org/dromara/oa/erp/service/impl/ErpContractInfoServiceImpl.java b/ruoyi-modules/ruoyi-oa/src/main/java/org/dromara/oa/erp/service/impl/ErpContractInfoServiceImpl.java index 6732d40a..6baf6646 100644 --- a/ruoyi-modules/ruoyi-oa/src/main/java/org/dromara/oa/erp/service/impl/ErpContractInfoServiceImpl.java +++ b/ruoyi-modules/ruoyi-oa/src/main/java/org/dromara/oa/erp/service/impl/ErpContractInfoServiceImpl.java @@ -504,7 +504,15 @@ public class ErpContractInfoServiceImpl implements IErpContractInfoService { @Override public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { if (isValid) { - // TODO 做一些业务上的校验,判断是否需要校验 + List contracts = baseMapper.selectBatchIds(ids); + for (ErpContractInfo contract : contracts) { + if (contract == null) { + continue; + } + if (!OAStatusEnum.DRAFT.getStatus().equals(contract.getContractStatus())) { + throw new ServiceException("只能删除暂存状态的合同"); + } + } } return baseMapper.deleteByIds(ids) > 0; }