差异评估

This commit is contained in:
CD
2022-10-10 15:24:21 +08:00
parent fdc5c3a3a0
commit 49c1ea3648
2 changed files with 32 additions and 2 deletions
@@ -0,0 +1,21 @@
package com.jero.modules.compare.enums;
public enum AssessConsistencyEnum {
SAME("一致"),
DIFFERENT("差异");
private String value;
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
AssessConsistencyEnum(String value) {
this.value = value;
}
}
@@ -7,6 +7,7 @@ import com.jero.common.constant.enums.CutEnum;
import com.jero.common.exception.JeroBootException;
import com.jero.common.util.oss.CosBootUtil;
import com.jero.modules.compare.entity.*;
import com.jero.modules.compare.enums.AssessConsistencyEnum;
import com.jero.modules.compare.mapper.SarFileCompareItemCommentMapper;
import com.jero.modules.compare.service.ISarFileCompareInfoService;
import com.jero.modules.compare.service.ISarFileCompareItemCommentService;
@@ -182,7 +183,11 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
public List<SarFileCompareItemComment> queryListByInfoId(String infoId,String comment) {
LambdaQueryWrapper<SarFileCompareItemComment> queryWrapper = new LambdaQueryWrapper<>();
if (ObjectUtils.isNotEmpty(comment)) {
queryWrapper.eq(SarFileCompareItemComment::getComment, comment);
if (AssessConsistencyEnum.SAME.getValue().equals(comment)) {
queryWrapper.eq(SarFileCompareItemComment::getComment, comment);
} else if (AssessConsistencyEnum.DIFFERENT.getValue().equals(comment)) {
queryWrapper.ne(SarFileCompareItemComment::getComment, AssessConsistencyEnum.SAME.getValue());
}
}
queryWrapper.eq(SarFileCompareItemComment::getInfoId, infoId);
queryWrapper.orderBy(true, true, SarFileCompareItemComment::getCreateTime);
@@ -203,7 +208,11 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
queryWrapper.in(SarFileCompareItemComment::getId, Arrays.asList(selectIds.split(",")));
}
if (ObjectUtils.isNotEmpty(comment)) {
queryWrapper.eq(SarFileCompareItemComment::getComment, comment);
if (AssessConsistencyEnum.SAME.getValue().equals(comment)) {
queryWrapper.eq(SarFileCompareItemComment::getComment, comment);
} else if (AssessConsistencyEnum.DIFFERENT.getValue().equals(comment)) {
queryWrapper.ne(SarFileCompareItemComment::getComment, AssessConsistencyEnum.SAME.getValue());
}
}
queryWrapper.orderBy(true, true, SarFileCompareItemComment::getCreateTime);
list = this.list(queryWrapper);