修改文档对比-修改导出文件的接口
This commit is contained in:
+14
-11
@@ -21,10 +21,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Arrays;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 文档对比信息条款评论表
|
* @Description: 文档对比信息条款评论表
|
||||||
@@ -168,13 +165,19 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void exportResXls(HttpServletResponse response, String infoId, String selectIds, boolean includeComments, String cut) {
|
public void exportResXls(HttpServletResponse response, String infoId, String selectIds, boolean includeComments, String cut) {
|
||||||
LambdaQueryWrapper<SarFileCompareItemComment> queryWrapper = new LambdaQueryWrapper<>();
|
List<SarFileCompareItemComment> list = null;
|
||||||
queryWrapper.eq(SarFileCompareItemComment::getInfoId, infoId);
|
if (includeComments && StringUtils.isEmpty(selectIds)) {
|
||||||
if (!StringUtils.isEmpty(selectIds)) {
|
//只导出全文评论的情况
|
||||||
queryWrapper.in(SarFileCompareItemComment::getId, Arrays.asList(selectIds.split(",")));
|
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);
|
Map<String, SarFileCompareItem> sfcItemMap = SarFileCompareItemServiceImpl.queryMapByInfoId(infoId);
|
||||||
|
|
||||||
OutputStream os = null;
|
OutputStream os = null;
|
||||||
@@ -230,7 +233,7 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
|
|||||||
row.createCell(6).setCellValue(itemComment.getComment());
|
row.createCell(6).setCellValue(itemComment.getComment());
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
if (includeComments) {
|
if (includeComments || StringUtils.isEmpty(selectIds)) {
|
||||||
Row row = sheet.createRow(i);
|
Row row = sheet.createRow(i);
|
||||||
if (CutEnum.CN.getValue().equals(cut)) {
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
row.createCell(0).setCellValue("全文评论");
|
row.createCell(0).setCellValue("全文评论");
|
||||||
|
|||||||
Reference in New Issue
Block a user