From ae5a50bf61632154d63c1531cc7f9dfe55d29016 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Fri, 14 May 2021 14:48:06 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=B8=8A=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E7=9A=84=E6=8E=A5=E7=A7=8D=E4=BF=A1=E6=81=AF=EF=BC=8C=E5=90=8C?= =?UTF-8?q?=E6=A0=B7=E5=8A=A0=E5=88=B0=E5=AF=BC=E5=87=BA=E7=9A=84=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E9=87=8C=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EpidemicUserInfoController.java | 5 +++-- .../epidemic/excel/EpidecmicUserNewExcel.java | 2 ++ .../impl/EpidemicUserInfoServiceImpl.java | 22 +++---------------- .../vim/excel/VaccinationInfoExcel.java | 3 ++- .../mapper/epidemic/EpidemicUserInfoDao.xml | 12 +++++++++- 5 files changed, 21 insertions(+), 23 deletions(-) diff --git a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/controller/EpidemicUserInfoController.java b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/controller/EpidemicUserInfoController.java index eedca60..d04b5d7 100644 --- a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/controller/EpidemicUserInfoController.java +++ b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/controller/EpidemicUserInfoController.java @@ -40,6 +40,7 @@ public class EpidemicUserInfoController { @GetMapping("page") public Result> page(@RequestParam Map params) { + // 按人员往返时间倒序排列 PageData page = epidemicUserInfoService.getPageList(params); return new Result>().ok(page); @@ -82,10 +83,10 @@ public class EpidemicUserInfoController { @LogOperation("导出") public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { List list = epidemicUserInfoService.getList(params); + ExcelUtils.exportExcelToTarget(response, null, list, EpidecmicUserNewExcel.class); } - /** * @return io.pingyin.common.utils.Result> * @describe: 接种信息列表 @@ -95,11 +96,11 @@ public class EpidemicUserInfoController { */ @GetMapping("getEpidemicPage") public Result> getEpidemicPage(@RequestParam Map params) { + // 按人员录入时间倒序排列 PageData page = epidemicUserInfoService.getEpidemicPage(params); return new Result>().ok(page); } - @GetMapping("getinfo/{id}") public Result getinfo(@PathVariable("id") Long id) { VaccinationInfoResultDTO data = epidemicUserInfoService.getInfo(id); diff --git a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/excel/EpidecmicUserNewExcel.java b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/excel/EpidecmicUserNewExcel.java index 8d81dbc..35a8311 100644 --- a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/excel/EpidecmicUserNewExcel.java +++ b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/excel/EpidecmicUserNewExcel.java @@ -112,5 +112,7 @@ public class EpidecmicUserNewExcel{ private String destinationAddressName; @Excel(name = "拟去往目的地详细地址") private String destinationAddressDetail; + @Excel(name = "是否接种",replace = { "未接种_0", "接种中_1", "接种完成_2"}) + private Integer vaccinationState; } \ No newline at end of file diff --git a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/service/impl/EpidemicUserInfoServiceImpl.java b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/service/impl/EpidemicUserInfoServiceImpl.java index f4ceb35..4e6de0f 100644 --- a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/service/impl/EpidemicUserInfoServiceImpl.java +++ b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/service/impl/EpidemicUserInfoServiceImpl.java @@ -78,22 +78,6 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl getPageList(Map params) { - // 查询项的年龄段和公司处理为list,用于sql查询,没有改查询条件则删除key,防止sql报错 - if (params.containsKey("age")) { - if (StringUtils.isNotBlank(params.get("age").toString())) { - params.put("age", new ArrayList<>(Arrays.asList(params.get("age").toString().split(",")))); - } else { - params.put("age", null); - } - } - if (params.containsKey("company")) { - if (StringUtils.isNotBlank(params.get("company").toString())) { - params.put("company", new ArrayList<>(Arrays.asList(params.get("company").toString().split(",")))); - } else { - params.put("company", null); - } - } - IPage page = getPage(params); List list = baseDao.getEpidemicUserRecordList(params); for (EpidemicRecordListDTO eru : list) { @@ -383,9 +367,9 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl getList(Map params) { // params.put("deptIdList", SecurityUser.getUser().getDeptIdList()); - params.put("age", new ArrayList<>()); - params.put("company", new ArrayList<>()); - // for (EpidemicRecordListDTO eru : list) { +// params.put("age", new ArrayList<>()); +// params.put("company", new ArrayList<>()); +// for (EpidemicRecordListDTO eru : list) { // eru.setIdCard(idEncrypt(eru.getIdCard())); // eru.setMobile(mobileEncrypt(eru.getMobile())); // eru.setUserName(nameDesensitization(eru.getUserName())); diff --git a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/vim/excel/VaccinationInfoExcel.java b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/vim/excel/VaccinationInfoExcel.java index 9219aef..68d43d6 100644 --- a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/vim/excel/VaccinationInfoExcel.java +++ b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/vim/excel/VaccinationInfoExcel.java @@ -65,5 +65,6 @@ public class VaccinationInfoExcel { private Date updatedTime; @Excel(name = "创建人姓名") private String creatorName; - + @Excel(name = "是否接种",replace = { "未接种_0", "接种中_1", "接种完成_2"}) + private Integer vaccinationState; } \ No newline at end of file diff --git a/epdc-cloud-vim-yushan/src/main/resources/mapper/epidemic/EpidemicUserInfoDao.xml b/epdc-cloud-vim-yushan/src/main/resources/mapper/epidemic/EpidemicUserInfoDao.xml index 9debe5c..e420708 100644 --- a/epdc-cloud-vim-yushan/src/main/resources/mapper/epidemic/EpidemicUserInfoDao.xml +++ b/epdc-cloud-vim-yushan/src/main/resources/mapper/epidemic/EpidemicUserInfoDao.xml @@ -34,7 +34,8 @@ @@ -258,6 +267,7 @@ and i.USER_NAME like '%${userName}%' + ORDER BY i.CREATED_TIME DESC