|
|
@ -7,8 +7,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.kms.system.service.SysUserService; |
|
|
|
import com.kms.yxgh.base.DfException; |
|
|
|
import com.kms.yxgh.base.SzException; |
|
|
|
import com.kms.yxgh.base.enums.YhRecordStatus; |
|
|
|
import com.kms.yxgh.common.ApprovalStatusEnum; |
|
|
|
import com.kms.yxgh.common.dto.*; |
|
|
|
import com.kms.yxgh.common.service.ApprovalBusinessService; |
|
|
@ -98,14 +98,20 @@ public class SzYhRecordService extends BaseService<SzYhRecordMapper, SzYhRecord> |
|
|
|
if (CollectionUtil.isEmpty(ids)) { |
|
|
|
return false; |
|
|
|
} |
|
|
|
Wrapper<SzYhRecord> wp = Wrappers.<SzYhRecord>lambdaQuery() |
|
|
|
.in(SzYhRecord::getId, ids) |
|
|
|
.notIn(SzYhRecord::getStatus, ApprovalStatusEnum.SUBMITTING.getValue(), ApprovalStatusEnum.REJECT.getValue()); |
|
|
|
if (this.getBaseMapper().selectCount(wp) > 0) { |
|
|
|
throw new DfException("已确认的记录不能删除"); |
|
|
|
} |
|
|
|
return removeByIds(ids); |
|
|
|
} |
|
|
|
|
|
|
|
private boolean checkStatus(String id) { |
|
|
|
Wrapper<SzYhRecord> wp = Wrappers.<SzYhRecord>lambdaQuery() |
|
|
|
.eq(SzYhRecord::getId, id) |
|
|
|
.eq(SzYhRecord::getStatus, YhRecordStatus.CONFIRMED.getValue()); |
|
|
|
return !(this.getBaseMapper().selectCount(wp) > 0); |
|
|
|
.in(SzYhRecord::getStatus, ApprovalStatusEnum.SUBMITTING.getValue(), ApprovalStatusEnum.REJECT.getValue()); |
|
|
|
return this.getBaseMapper().selectCount(wp) > 0; |
|
|
|
} |
|
|
|
|
|
|
|
private boolean exist(String id) { |
|
|
|