征求意见最新需求
This commit is contained in:
+18
-8
@@ -137,17 +137,21 @@ public class SarPublicIdeaAllController extends BaseController<SarPublicIdeaAll>
|
||||
}
|
||||
List<GetExcelDto> standExcel=new ArrayList<>();
|
||||
List<GetExcelDto2> standExcel2=new ArrayList<>();
|
||||
int i=0;
|
||||
for (SarPublicIdeaAll sarPublicIdeaAll:data){
|
||||
i++;
|
||||
if ("1".equals(type)) {
|
||||
GetExcelDto2 getExcelDto = GetExcelDto2.builder()
|
||||
.partCode(sarPublicIdeaAll.getPartCode())
|
||||
.oldText(RemoveHtml.getResultsFromHtml(sarPublicIdeaAll.getOldText()))
|
||||
.newText(RemoveHtml.getResultsFromHtml(sarPublicIdeaAll.getNewText()))
|
||||
.reason(sarPublicIdeaAll.getReason())
|
||||
.userName(sarPublicIdeaAll.getUserName())
|
||||
.deptName(sarPublicIdeaAll.getDeptName())
|
||||
.state(map.get(sarPublicIdeaAll.getState()))
|
||||
.cause(sarPublicIdeaAll.getCause())
|
||||
.partName(sarPublicIdeaAll.getChapterName())
|
||||
.num(String.valueOf(i))
|
||||
// .userName(sarPublicIdeaAll.getUserName())
|
||||
// .deptName(sarPublicIdeaAll.getDeptName())
|
||||
// .state(map.get(sarPublicIdeaAll.getState()))
|
||||
// .cause(sarPublicIdeaAll.getCause())
|
||||
.build();
|
||||
standExcel2.add(getExcelDto);
|
||||
}else {
|
||||
@@ -160,24 +164,30 @@ public class SarPublicIdeaAllController extends BaseController<SarPublicIdeaAll>
|
||||
.deptName(sarPublicIdeaAll.getDeptName())
|
||||
.state(map.get(sarPublicIdeaAll.getState()))
|
||||
.cause(sarPublicIdeaAll.getCause())
|
||||
.sourceType(sarPublicIdeaAll.getSourceType())
|
||||
.partName(sarPublicIdeaAll.getChapterName())
|
||||
.num(String.valueOf(i))
|
||||
.build();
|
||||
standExcel.add(getExcelDto);
|
||||
}
|
||||
}
|
||||
|
||||
List<List<String>> headList=new ArrayList<List<String>>();
|
||||
headList.add(Lists.newArrayList("序号"));
|
||||
headList.add(Lists.newArrayList("章节编号"));
|
||||
headList.add(Lists.newArrayList("章节名称"));
|
||||
headList.add(Lists.newArrayList("修改意见内容(包括理由或依据)","修改前"));
|
||||
headList.add(Lists.newArrayList("修改意见内容(包括理由或依据)","修改后"));
|
||||
headList.add(Lists.newArrayList("修改意见内容(包括理由或依据)","修改理由"));
|
||||
headList.add(Lists.newArrayList("提出部门"));
|
||||
headList.add(Lists.newArrayList("提出人"));
|
||||
headList.add(Lists.newArrayList("处理意见"));
|
||||
headList.add(Lists.newArrayList("原因"));
|
||||
if ("1".equals(type)) {
|
||||
EasyExcel.write(response.getOutputStream(), GetExcelDto2.class).head(headList).autoCloseStream(Boolean.FALSE).sheet("sheet1")
|
||||
.doWrite(standExcel2);
|
||||
}else {
|
||||
headList.add(Lists.newArrayList("提出部门"));
|
||||
headList.add(Lists.newArrayList("提出人"));
|
||||
headList.add(Lists.newArrayList("处理意见"));
|
||||
headList.add(Lists.newArrayList("原因"));
|
||||
headList.add(Lists.newArrayList("来源"));
|
||||
EasyExcel.write(response.getOutputStream(), GetExcelDto.class).head(headList).autoCloseStream(Boolean.FALSE).sheet("sheet1")
|
||||
.doWrite(standExcel);
|
||||
}
|
||||
|
||||
@@ -24,8 +24,11 @@ import lombok.NoArgsConstructor;
|
||||
@ColumnWidth(15)
|
||||
public class GetExcelDto {
|
||||
|
||||
// @ExcelProperty("章节编号")
|
||||
private String num;
|
||||
// @ExcelProperty("章节编号")
|
||||
private String partCode;
|
||||
|
||||
private String partName;
|
||||
// @ExcelProperty("修改意见内容(包括理由或依据)")
|
||||
// private String content;
|
||||
private String oldText;
|
||||
@@ -42,6 +45,8 @@ public class GetExcelDto {
|
||||
|
||||
private String cause;
|
||||
|
||||
private String sourceType;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -21,8 +21,11 @@ import lombok.NoArgsConstructor;
|
||||
@ColumnWidth(15)
|
||||
public class GetExcelDto2 {
|
||||
|
||||
private String num;
|
||||
// @ExcelProperty("章节编号")
|
||||
private String partCode;
|
||||
|
||||
private String partName;
|
||||
// @ExcelProperty("修改意见内容(包括理由或依据)")
|
||||
// private String content;
|
||||
private String oldText;
|
||||
@@ -30,14 +33,14 @@ public class GetExcelDto2 {
|
||||
private String newText;
|
||||
|
||||
private String reason;
|
||||
// @ExcelProperty("提出部门")
|
||||
private String deptName;
|
||||
// @ExcelProperty("提出人")
|
||||
private String userName;
|
||||
|
||||
private String state;
|
||||
|
||||
private String cause;
|
||||
//// @ExcelProperty("提出部门")
|
||||
// private String deptName;
|
||||
//// @ExcelProperty("提出人")
|
||||
// private String userName;
|
||||
//
|
||||
// private String state;
|
||||
//
|
||||
// private String cause;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -79,4 +79,7 @@ public class SarPublicIdeaAll extends BaseEntity {
|
||||
@TableField("cause")
|
||||
private String cause;
|
||||
|
||||
@TableField("source_type")
|
||||
private String sourceType;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user