Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage

This commit is contained in:
wangzhijiang
2022-08-09 13:48:39 +08:00
7 changed files with 179 additions and 108 deletions
@@ -21,10 +21,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
* @Description: 文档对比信息条款评论表
@@ -168,13 +165,19 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
@Override
public void exportResXls(HttpServletResponse response, String infoId, String selectIds, boolean includeComments, String cut) {
LambdaQueryWrapper<SarFileCompareItemComment> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(SarFileCompareItemComment::getInfoId, infoId);
if (!StringUtils.isEmpty(selectIds)) {
queryWrapper.in(SarFileCompareItemComment::getId, Arrays.asList(selectIds.split(",")));
List<SarFileCompareItemComment> list = null;
if (includeComments && StringUtils.isEmpty(selectIds)) {
//只导出全文评论的情况
list = new ArrayList<>();
} else {
LambdaQueryWrapper<SarFileCompareItemComment> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(SarFileCompareItemComment::getInfoId, infoId);
if (!StringUtils.isEmpty(selectIds)) {
queryWrapper.in(SarFileCompareItemComment::getId, Arrays.asList(selectIds.split(",")));
}
queryWrapper.orderBy(true, true, SarFileCompareItemComment::getCreateTime);
list = this.list(queryWrapper);
}
queryWrapper.orderBy(true, true, SarFileCompareItemComment::getCreateTime);
List<SarFileCompareItemComment> list = this.list(queryWrapper);
Map<String, SarFileCompareItem> sfcItemMap = SarFileCompareItemServiceImpl.queryMapByInfoId(infoId);
OutputStream os = null;
@@ -230,7 +233,7 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
row.createCell(6).setCellValue(itemComment.getComment());
i++;
}
if (includeComments) {
if (includeComments || StringUtils.isEmpty(selectIds)) {
Row row = sheet.createRow(i);
if (CutEnum.CN.getValue().equals(cut)) {
row.createCell(0).setCellValue("全文评论");