|
@@ -0,0 +1,192 @@
|
|
|
+package com.bofeng.controller;
|
|
|
+
|
|
|
+import com.bofeng.word.WordUtils;
|
|
|
+import com.google.common.collect.Lists;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import java.io.IOException;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+@RestController
|
|
|
+public class EpiLYExportController {
|
|
|
+
|
|
|
+ @ApiOperation("导出单个健康及旅居申报表")
|
|
|
+ @GetMapping("/whepi/export/lyReport")
|
|
|
+ public @ResponseBody
|
|
|
+ void exportSellPlan(HttpServletRequest request, HttpServletResponse response) {
|
|
|
+ Map<String, Object> map = new HashMap<String, Object>();
|
|
|
+ map.put("userName", "张山");
|
|
|
+ map.put("workPlace", "武汉");
|
|
|
+ map.put("telPhone", "13245452345");
|
|
|
+ map.put("isLeave", "是");
|
|
|
+ map.put("trip", "北京、上海、武汉");
|
|
|
+ map.put("backTime", "2020-03-10");
|
|
|
+ map.put("vehicle", "火箭");
|
|
|
+
|
|
|
+ Map<String, Object> rt = new HashMap<String, Object>();
|
|
|
+ map.put("rt", rt);
|
|
|
+ rt.put("d1", "02-20");
|
|
|
+ rt.put("d2", "02-21");
|
|
|
+ rt.put("d3", "02-22");
|
|
|
+ rt.put("d4", "02-23");
|
|
|
+ rt.put("d5", "02-24");
|
|
|
+ rt.put("t1", "-");
|
|
|
+ rt.put("t2", "37.0");
|
|
|
+ rt.put("t3", "36.6");
|
|
|
+ rt.put("t4", "36.6");
|
|
|
+ rt.put("t5", "36.8");
|
|
|
+
|
|
|
+ map.put("otherSymptom", "ee");
|
|
|
+ map.put("isTrue", "否");
|
|
|
+
|
|
|
+ WordUtils.exportWord("word/健康及旅居申报表_20200221.docx", "temp", "健康及旅居申报表.docx", map, request, response);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("导出多个健康及旅居申报表")
|
|
|
+ @GetMapping("/whepi/export/lyReports")
|
|
|
+ public @ResponseBody
|
|
|
+ void exportSellPlan2(HttpServletRequest request, HttpServletResponse response) {
|
|
|
+
|
|
|
+ List<Map<String, Object>> list = Lists.newArrayList();
|
|
|
+ for (int i = 0; i < 5; i++) {
|
|
|
+ Map<String, Object> map = new HashMap<String, Object>();
|
|
|
+ map.put("userName", "张山");
|
|
|
+ map.put("workPlace", "武汉");
|
|
|
+ map.put("telPhone", "13245452345");
|
|
|
+ map.put("isLeave", "是");
|
|
|
+ map.put("trip", "北京、上海、武汉");
|
|
|
+ map.put("backTime", "2020-03-10");
|
|
|
+ map.put("vehicle", "火箭");
|
|
|
+
|
|
|
+ Map<String, Object> rt = new HashMap<String, Object>();
|
|
|
+ map.put("rt", rt);
|
|
|
+ rt.put("d1", "02-20");
|
|
|
+ rt.put("d2", "02-21");
|
|
|
+ rt.put("d3", "02-22");
|
|
|
+ rt.put("d4", "02-23");
|
|
|
+ rt.put("d5", "02-24");
|
|
|
+ rt.put("t1", "-");
|
|
|
+ rt.put("t2", "37.0");
|
|
|
+ rt.put("t3", "36.6");
|
|
|
+ rt.put("t4", "36.6");
|
|
|
+ rt.put("t5", "36.8");
|
|
|
+
|
|
|
+ map.put("otherSymptom", "ee");
|
|
|
+ map.put("isTrue", "否");
|
|
|
+ list.add(map);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ WordUtils.exportWord("word/健康及旅居申报表_20200221.docx", "temp", "健康及旅居申报表.docx", list, request, response);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("导出单个隔离人员解除隔离审批表")
|
|
|
+ @GetMapping("/whepi/export/lyApprove")
|
|
|
+ public @ResponseBody
|
|
|
+ void lyApprove(HttpServletRequest request, HttpServletResponse response) {
|
|
|
+ Map<String, Object> map = new HashMap<String, Object>();
|
|
|
+ map.put("userName", "张山");
|
|
|
+ map.put("gander", "男");
|
|
|
+ map.put("org", "研发部");
|
|
|
+ map.put("bAddr", "北京");
|
|
|
+ map.put("backDate", "2020-03-10");
|
|
|
+
|
|
|
+ Map<String, Object> rt = new HashMap<String, Object>();
|
|
|
+ map.put("rt", rt);
|
|
|
+ rt.put("d1", "02-20");
|
|
|
+ rt.put("d2", "02-21");
|
|
|
+ rt.put("d3", "02-22");
|
|
|
+ rt.put("d4", "02-23");
|
|
|
+ rt.put("d5", "02-24");
|
|
|
+ rt.put("d6", "02-25");
|
|
|
+ rt.put("d7", "02-26");
|
|
|
+ rt.put("d8", "02-27");
|
|
|
+ rt.put("d9", "02-28");
|
|
|
+ rt.put("d10", "02-29");
|
|
|
+ rt.put("d11", "03-01");
|
|
|
+ rt.put("d12", "03-02");
|
|
|
+ rt.put("d13", "03-03");
|
|
|
+ rt.put("d14", "03-04");
|
|
|
+ rt.put("d15", "03-05");
|
|
|
+ rt.put("t1", "-");
|
|
|
+ rt.put("t2", "37.0");
|
|
|
+ rt.put("t3", "36.6");
|
|
|
+ rt.put("t4", "36.6");
|
|
|
+ rt.put("t5", "36.8");
|
|
|
+ rt.put("t6", "-");
|
|
|
+ rt.put("t7", "37.0");
|
|
|
+ rt.put("t8", "36.6");
|
|
|
+ rt.put("t9", "36.6");
|
|
|
+ rt.put("t10", "36.8");
|
|
|
+ rt.put("t11", "-");
|
|
|
+ rt.put("t12", "37.0");
|
|
|
+ rt.put("t13", "36.6");
|
|
|
+ rt.put("t14", "36.6");
|
|
|
+ rt.put("t15", "36.8");
|
|
|
+
|
|
|
+ map.put("otherSymptom", "无");
|
|
|
+
|
|
|
+ WordUtils.exportWord("word/隔离人员解除隔离审批表_20200221.docx", "temp", "隔离人员解除隔离审批表.docx", map, request, response);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("导出多个隔离人员解除隔离审批表")
|
|
|
+ @GetMapping("/whepi/export/lyApproves")
|
|
|
+ public @ResponseBody
|
|
|
+ void lyApproves(HttpServletRequest request, HttpServletResponse response) {
|
|
|
+
|
|
|
+ List<Map<String, Object>> list = Lists.newArrayList();
|
|
|
+ for (int i = 0; i < 5; i++) {
|
|
|
+ Map<String, Object> map = new HashMap<String, Object>();
|
|
|
+ map.put("userName", "张山");
|
|
|
+ map.put("gander", "男");
|
|
|
+ map.put("org", "研发部");
|
|
|
+ map.put("bAddr", "北京");
|
|
|
+ map.put("backDate", "2020-03-10");
|
|
|
+
|
|
|
+ Map<String, Object> rt = new HashMap<String, Object>();
|
|
|
+ map.put("rt", rt);
|
|
|
+ rt.put("d1", "02-20");
|
|
|
+ rt.put("d2", "02-21");
|
|
|
+ rt.put("d3", "02-22");
|
|
|
+ rt.put("d4", "02-23");
|
|
|
+ rt.put("d5", "02-24");
|
|
|
+ rt.put("d6", "02-25");
|
|
|
+ rt.put("d7", "02-26");
|
|
|
+ rt.put("d8", "02-27");
|
|
|
+ rt.put("d9", "02-28");
|
|
|
+ rt.put("d10", "02-29");
|
|
|
+ rt.put("d11", "03-01");
|
|
|
+ rt.put("d12", "03-02");
|
|
|
+ rt.put("d13", "03-03");
|
|
|
+ rt.put("d14", "03-04");
|
|
|
+ rt.put("d15", "03-05");
|
|
|
+ rt.put("t1", "-");
|
|
|
+ rt.put("t2", "37.0");
|
|
|
+ rt.put("t3", "36.6");
|
|
|
+ rt.put("t4", "36.6");
|
|
|
+ rt.put("t5", "36.8");
|
|
|
+ rt.put("t6", "-");
|
|
|
+ rt.put("t7", "37.0");
|
|
|
+ rt.put("t8", "36.6");
|
|
|
+ rt.put("t9", "36.6");
|
|
|
+ rt.put("t10", "36.8");
|
|
|
+ rt.put("t11", "-");
|
|
|
+ rt.put("t12", "37.0");
|
|
|
+ rt.put("t13", "36.6");
|
|
|
+ rt.put("t14", "36.6");
|
|
|
+ rt.put("t15", "36.8");
|
|
|
+
|
|
|
+ map.put("otherSymptom", "无");
|
|
|
+ list.add(map);
|
|
|
+ }
|
|
|
+
|
|
|
+ WordUtils.exportWord("word/隔离人员解除隔离审批表_20200221.docx", "temp", "隔离人员解除隔离审批表.docx", list, request, response);
|
|
|
+ }
|
|
|
+}
|