fix(88801): 删除校验

This commit is contained in:
yjz
2024-08-20 14:43:25 +08:00
parent 5b406d22c2
commit 1ee45229b2
@@ -309,6 +309,23 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
*/
@Override
public void checkOutOperation(List<String> ids) {
// 查询标准解读流程
List<ProcessStandardInterpret> list1 = processStandardInterpretService.list(
new LambdaQueryWrapper<ProcessStandardInterpret>()
.in(ProcessStandardInterpret::getSplitInfoId, ids));
if (CollectionUtils.isNotEmpty(list1)){
List<String> projectIdList = list1.stream()
.map(ProcessStandardInterpret::getProjectId)
.collect(Collectors.toList());
int count1 = processAllService.count(new LambdaQueryWrapper<ProcessAll>()
.in(ProcessAll::getProjectId, projectIdList)
.ne(ProcessAll::getPrcStatus, ProcessStatusEnum.WITHDRAWN.getValue()));
if (count1 > 0) {
throw new JeroBootException(ResultCommon.SCC_DELETE_STANDARD_ERROR3);
}
}
// 登陆人信息
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
if (sysUser.getRoleIds().contains("admin")){