标准征求意见流程,意见处理节点添加来源,导出
This commit is contained in:
@@ -75,6 +75,8 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
|||||||
|
|
||||||
//标准征求意见导出
|
//标准征求意见导出
|
||||||
addInterceptor.excludePathPatterns("/api/slrs/sar-public-idea-all/tuallStand");
|
addInterceptor.excludePathPatterns("/api/slrs/sar-public-idea-all/tuallStand");
|
||||||
|
// 标准征求意见流程意见导出
|
||||||
|
addInterceptor.excludePathPatterns("/api/slrs/sar-public-idea-all/tuallStandYJCL");
|
||||||
//标准法规清单导出
|
//标准法规清单导出
|
||||||
addInterceptor.excludePathPatterns("/api/sarLawsAttrDetailedList/sar-laws-attr-detailed-list/ExportLawsById");
|
addInterceptor.excludePathPatterns("/api/sarLawsAttrDetailedList/sar-laws-attr-detailed-list/ExportLawsById");
|
||||||
//标准法规清单车型导出
|
//标准法规清单车型导出
|
||||||
|
|||||||
+66
@@ -9,6 +9,7 @@ import com.adc.da.slrs.sarStandIdea.service.Impl.SarPublicIdeaAllServiceImpl;
|
|||||||
import com.adc.da.utils.removeHtml.RemoveHtml;
|
import com.adc.da.utils.removeHtml.RemoveHtml;
|
||||||
import com.alibaba.excel.EasyExcel;
|
import com.alibaba.excel.EasyExcel;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
@@ -211,4 +212,69 @@ public class SarPublicIdeaAllController extends BaseController<SarPublicIdeaAll>
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "导出全部意见-标准意见征求流程-意见处理节点")
|
||||||
|
@PostMapping("/tuallStandYJCL")
|
||||||
|
public void getAllStandYJCL(HttpServletResponse response, @RequestBody Map<String, String> params){
|
||||||
|
try {
|
||||||
|
JSONArray jsonArray = JSON.parseArray(params.get("json"));
|
||||||
|
List<SarPublicIdeaAll> data = sarPublicIdeaAllImpl.getPublicAllIdeaYJCL(jsonArray);
|
||||||
|
|
||||||
|
response.setContentType("application/vnd.ms-excel");
|
||||||
|
response.setCharacterEncoding("utf-8");
|
||||||
|
String textName="流程意见详情";
|
||||||
|
|
||||||
|
Map<String,String> map=new HashMap<>();
|
||||||
|
map.put("1","上报");
|
||||||
|
map.put("2","处理后上报");
|
||||||
|
map.put("3","不上报");
|
||||||
|
String fileName = URLEncoder.encode(textName, "UTF-8").replaceAll("\\+", "%20");
|
||||||
|
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
|
||||||
|
|
||||||
|
List<GetExcelDto> standExcel=new ArrayList<>();
|
||||||
|
int i=0;
|
||||||
|
for (SarPublicIdeaAll sarPublicIdeaAll:data){
|
||||||
|
i++;
|
||||||
|
GetExcelDto getExcelDto = GetExcelDto.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())
|
||||||
|
.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("原因"));
|
||||||
|
headList.add(Lists.newArrayList("来源"));
|
||||||
|
EasyExcel.write(response.getOutputStream(), GetExcelDto.class).head(headList).autoCloseStream(Boolean.FALSE).sheet("sheet1")
|
||||||
|
.doWrite(standExcel);
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
response.reset();
|
||||||
|
response.setContentType("application/json");
|
||||||
|
response.setCharacterEncoding("utf-8");
|
||||||
|
try {
|
||||||
|
response.getWriter().println(JSON.toJSONString(Result.error()));
|
||||||
|
} catch (IOException ioException) {
|
||||||
|
ioException.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
@@ -5,10 +5,12 @@ import com.adc.da.slrs.sarStandIdea.entity.DelStandDto;
|
|||||||
import com.adc.da.slrs.sarStandIdea.entity.DetAllStandDto;
|
import com.adc.da.slrs.sarStandIdea.entity.DetAllStandDto;
|
||||||
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll;
|
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll;
|
||||||
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAllSUD;
|
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAllSUD;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -27,4 +29,5 @@ public interface ISarPublicIdeaAllService extends IService<SarPublicIdeaAll> {
|
|||||||
String delete(DelStandDto delStandDto);
|
String delete(DelStandDto delStandDto);
|
||||||
String del(String id);
|
String del(String id);
|
||||||
String checkIsShow(DetAllStandDto detAllStandDto);
|
String checkIsShow(DetAllStandDto detAllStandDto);
|
||||||
|
List<SarPublicIdeaAll> getPublicAllIdeaYJCL(JSONArray info);
|
||||||
}
|
}
|
||||||
|
|||||||
+25
@@ -8,6 +8,9 @@ import com.adc.da.slrs.sarStandIdea.service.ISarPublicIdeaAllService;
|
|||||||
import com.adc.da.sys.entity.LoginInfoEO;
|
import com.adc.da.sys.entity.LoginInfoEO;
|
||||||
import com.adc.da.util.LoginUserUtil;
|
import com.adc.da.util.LoginUserUtil;
|
||||||
import com.adc.da.util.UUIDUtils;
|
import com.adc.da.util.UUIDUtils;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@@ -162,4 +165,26 @@ public class SarPublicIdeaAllServiceImpl extends ServiceImpl<SarPublicIdeaAllDao
|
|||||||
sarPublicIdeaAllDao.deleteById(id);
|
sarPublicIdeaAllDao.deleteById(id);
|
||||||
return "删除成功";
|
return "删除成功";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<SarPublicIdeaAll> getPublicAllIdeaYJCL(JSONArray info) {
|
||||||
|
List<SarPublicIdeaAll> publicList = new ArrayList<>();
|
||||||
|
|
||||||
|
for (Object object : info) {
|
||||||
|
JSONObject jsonObject = (JSONObject) object;
|
||||||
|
SarPublicIdeaAll sarPublicIdeaAll = new SarPublicIdeaAll();
|
||||||
|
sarPublicIdeaAll.setPartCode(jsonObject.getString("chapterNumber"));
|
||||||
|
sarPublicIdeaAll.setOldText(jsonObject.getString("oldText"));
|
||||||
|
sarPublicIdeaAll.setNewText(jsonObject.getString("newText"));
|
||||||
|
sarPublicIdeaAll.setReason(jsonObject.getString("reason")); // 修改理由
|
||||||
|
sarPublicIdeaAll.setUserName(jsonObject.getString("responUserName"));
|
||||||
|
sarPublicIdeaAll.setDeptName(jsonObject.getString("department"));
|
||||||
|
sarPublicIdeaAll.setState(jsonObject.getString("state")); // 处理意见
|
||||||
|
sarPublicIdeaAll.setCause(jsonObject.getString("cause")); // 原因
|
||||||
|
sarPublicIdeaAll.setSourceType(jsonObject.getString("sourceType"));
|
||||||
|
sarPublicIdeaAll.setChapterName(jsonObject.getString("chapterName"));
|
||||||
|
|
||||||
|
publicList.add(sarPublicIdeaAll);
|
||||||
|
}
|
||||||
|
return publicList;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user