征求意见最新需求
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;
|
||||
|
||||
}
|
||||
|
||||
+4
-4
@@ -6,7 +6,7 @@
|
||||
SELECT sar_public_idea_all.id,sar_public_idea_all.reason,ts_institution.name as dept_name,ts_institution.name as department,sar_public_idea_all.old_text,
|
||||
sar_public_idea_all.new_text,ts_user.INSTITUTION_ID as dept_id,sar_public_idea_all.part_code,sar_public_idea_all.user_name,
|
||||
sar_public_idea_all.user_id,sar_public_idea_all.content,sar_public_idea_all.idea_id,sar_public_idea_all.cid,
|
||||
sar_public_idea_all.chapter_name as chapterName,sar_public_idea_all.wk_flag,sar_public_idea_all.cause
|
||||
sar_public_idea_all.chapter_name as chapterName,sar_public_idea_all.wk_flag,sar_public_idea_all.cause, sar_public_idea_all.state,sar_public_idea_all.source_type as sourceType
|
||||
FROM sar_public_idea
|
||||
INNER JOIN sar_public_idea_all on sar_public_idea_all.idea_id = sar_public_idea.id
|
||||
left join ts_user on ts_user.USID = sar_public_idea_all.user_id
|
||||
@@ -35,7 +35,7 @@
|
||||
sar_public_idea_all.wk_flag,sar_public_idea_all.new_text,ts_user.INSTITUTION_ID as dept_id,
|
||||
sar_public_idea_all.part_code,sar_public_idea_all.user_name,
|
||||
sar_public_idea_all.user_id,sar_public_idea_all.content,sar_public_idea_all.idea_id,sar_public_idea_all.cid,
|
||||
sar_public_idea_all.chapter_name as chapterName,sar_public_idea_all.cause
|
||||
sar_public_idea_all.chapter_name as chapterName,sar_public_idea_all.cause , sar_public_idea_all.state,sar_public_idea_all.source_type as sourceType
|
||||
FROM (sar_public_idea_all,(SELECT @i:=0)j)
|
||||
left join ts_user on sar_public_idea_all.user_id=ts_user.USID
|
||||
left join ts_institution on ts_institution.id=ts_user.INSTITUTION_ID
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
<select id="getPublicAllIdea" resultType="com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll">
|
||||
SELECT sar_public_idea_all.id,reason,ts_institution.name as
|
||||
deptName,old_text,new_text,dept_id,part_code,user_name,user_id,content,idea_id,cid,chapter_name,wk_flag,sar_public_idea_all.state,sar_public_idea_all.cause
|
||||
deptName,old_text,new_text,dept_id,part_code,user_name,user_id,content,idea_id,cid,chapter_name,wk_flag,sar_public_idea_all.state,sar_public_idea_all.cause,sar_public_idea_all.source_type as sourceType
|
||||
FROM sar_public_idea_all
|
||||
left join ts_user on ts_user.USID=sar_public_idea_all.user_id
|
||||
left join ts_institution on ts_institution.id=ts_user.INSTITUTION_ID
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
<select id="getPublicAllIdeaExport" resultType="com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll">
|
||||
SELECT sar_public_idea_all.id,reason,ts_institution.name as
|
||||
deptName,old_text,new_text,dept_id,part_code,user_name,user_id,content,idea_id,cid,chapter_name,wk_flag,sar_public_idea_all.state,sar_public_idea_all.cause
|
||||
deptName,old_text,new_text,dept_id,part_code,user_name,user_id,content,idea_id,cid,chapter_name,wk_flag,sar_public_idea_all.state,sar_public_idea_all.cause,sar_public_idea_all.source_type as sourceType
|
||||
FROM sar_public_idea_all
|
||||
left join ts_user on ts_user.USID=sar_public_idea_all.user_id
|
||||
left join ts_institution on ts_institution.id=ts_user.INSTITUTION_ID
|
||||
|
||||
Reference in New Issue
Block a user