1.1.55 只能删除暂存状态的合同。

dev
yinq 4 weeks ago
parent 72316a4264
commit 81bc2ea3ef

@ -504,7 +504,15 @@ public class ErpContractInfoServiceImpl implements IErpContractInfoService {
@Override
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
if (isValid) {
// TODO 做一些业务上的校验,判断是否需要校验
List<ErpContractInfo> 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;
}

Loading…
Cancel
Save