diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcVaccineListResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcVaccineListResultDTO.java index 8118bd73be..8bed50f2b5 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcVaccineListResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcVaccineListResultDTO.java @@ -30,11 +30,6 @@ public class IcVaccineListResultDTO implements Serializable { */ @ExcelIgnore private String agencyId; - /** - * 居民端小程序的用户id、数字社区的icResiUserId、其他情况无值 - */ - @ExcelIgnore - private String userId; /** * 居民端小程序的人:resi;数字社区的居民:icresi;未关联上的:other @@ -68,15 +63,15 @@ public class IcVaccineListResultDTO implements Serializable { */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") @ColumnWidth(25) - @ExcelProperty(value = "检测时间",order = 4) - private Date natTime; + @ExcelProperty(value = "接种时间",order = 4) + private Date inoculateTime; /** * 检测结果 */ @ColumnWidth(20) - @ExcelProperty(value = "检测结果",order = 5) - private String natResult; + @ExcelProperty(value = "接种地点",order = 5) + private String inoculateAddress; /** * 是否客户下居民(0:否 1:是) @@ -88,8 +83,8 @@ public class IcVaccineListResultDTO implements Serializable { * 检测地点 */ @ColumnWidth(30) - @ExcelProperty(value = "检测地点",order = 7) - private String natAddress; + @ExcelProperty(value = "疫苗厂家",order = 7) + private String manufacturer; } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNatController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNatController.java index e2d6b7344f..f5125d4161 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNatController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNatController.java @@ -246,7 +246,7 @@ public class IcNatController implements ResultDataResolver { response.addHeader(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS, "Content-Disposition"); //response.setHeader(HttpHeaders.CONTENT_TYPE, "application/vnd.ms-excel"); response.setHeader(HttpHeaders.CONTENT_TYPE, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); - response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + URLEncoder.encode("社区自组织导入模板", "UTF-8") + ".xlsx"); + response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + URLEncoder.encode("核酸检测导入模板", "UTF-8") + ".xlsx"); InputStream is = this.getClass().getClassLoader().getResourceAsStream("excel/ic_nat.xlsx"); try { diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcVaccineController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcVaccineController.java index 79c5fcc3d6..2f02950d92 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcVaccineController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcVaccineController.java @@ -62,11 +62,11 @@ public class IcVaccineController implements ResultDataResolver { /** * @Author sun - * @Description 【核酸】核酸检测信息列表 + * @Description 【疫苗】疫苗接种信息列表 **/ @NoRepeatSubmit - @PostMapping("natlist") - public Result> natList(@LoginUser TokenDto tokenDto, @RequestBody VaccineListFormDTO formDTO) { + @PostMapping("vaccine-list") + public Result> vaccineList(@LoginUser TokenDto tokenDto, @RequestBody VaccineListFormDTO formDTO) { formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setUserId(tokenDto.getUserId()); return new Result>().ok(icVaccineService.icVaccineList(formDTO)); @@ -74,7 +74,7 @@ public class IcVaccineController implements ResultDataResolver { /** * @Author zxc - * @Description 【核酸】核酸检测信息同步 + * @Description 【疫苗】疫苗接种信息同步 **/ @NoRepeatSubmit @PostMapping("synchro") @@ -88,7 +88,7 @@ public class IcVaccineController implements ResultDataResolver { /** * @Author zxc - * @Description 【核酸】核酸检测信息取消同步 + * @Description 【疫苗】疫苗接种信息取消同步 **/ @NoRepeatSubmit @PostMapping("cancelsynchro") @@ -130,7 +130,7 @@ public class IcVaccineController implements ResultDataResolver { os = new FileOutputStream(fileSavePath.toString()); IOUtils.copy(is, os); } catch (Exception e) { - e.printStackTrace(); + log.error("importExcel exception", e); } finally { org.apache.poi.util.IOUtils.closeQuietly(is); org.apache.poi.util.IOUtils.closeQuietly(os); @@ -163,7 +163,7 @@ public class IcVaccineController implements ResultDataResolver { response.setCharacterEncoding("UTF-8"); response.addHeader(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS, "Content-Disposition"); response.setHeader(HttpHeaders.CONTENT_TYPE, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); - response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + URLEncoder.encode("社区自组织导入模板", "UTF-8") + ".xlsx"); + response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + URLEncoder.encode("疫苗接种导入模板", "UTF-8") + ".xlsx"); InputStream is = this.getClass().getClassLoader().getResourceAsStream("excel/ic_vaccine.xlsx"); try { @@ -179,7 +179,7 @@ public class IcVaccineController implements ResultDataResolver { /** * @Author sun - * @Description 【核酸】核酸检测信息列表 + * @Description 【疫苗】疫苗接种信息列表 **/ @NoRepeatSubmit @PostMapping("export") diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcVaccineService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcVaccineService.java index 3d04c02d99..c57de776d2 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcVaccineService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcVaccineService.java @@ -2,14 +2,11 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; -import com.epmet.dto.form.MyNatListFormDTO; import com.epmet.dto.form.VaccineListFormDTO; import com.epmet.dto.result.IcVaccineListResultDTO; -import com.epmet.dto.result.MyNatListResultDTO; import com.epmet.entity.IcVaccineEntity; import java.nio.file.Path; -import java.util.List; /** * 疫苗接种记录 @@ -19,12 +16,6 @@ import java.util.List; */ public interface IcVaccineService extends BaseService { - /** - * @Author sun - * @Description 核酸检测-居民端我的上报 - **/ - List myNatList(MyNatListFormDTO formDTO); - /** * @Author sun * @Description 【核酸】核酸检测信息列表 diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java index 38792782af..8e565aaed1 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java @@ -13,19 +13,18 @@ import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.feign.ResultDataResolver; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; -import com.epmet.commons.tools.utils.*; +import com.epmet.commons.tools.utils.EpmetRequestHolder; +import com.epmet.commons.tools.utils.FileUtils; +import com.epmet.commons.tools.utils.Result; import com.epmet.constants.ImportTaskConstants; -import com.epmet.dao.*; -import com.epmet.dto.form.*; -import com.epmet.dao.*; -import com.epmet.dto.IcNatDTO; -import com.epmet.dto.IcNoticeDTO; -import com.epmet.dto.form.AddIcNatFormDTO; +import com.epmet.dao.IcResiUserDao; +import com.epmet.dao.IcVaccineDao; +import com.epmet.dao.IcVaccineRelationDao; import com.epmet.dto.form.ImportTaskCommonFormDTO; -import com.epmet.dto.form.MyNatListFormDTO; -import com.epmet.dto.form.SendNoticeFormDTO; -import com.epmet.dto.result.*; -import com.epmet.entity.IcNatRelationEntity; +import com.epmet.dto.form.VaccineListFormDTO; +import com.epmet.dto.result.IcVaccineListResultDTO; +import com.epmet.dto.result.LoginUserDetailsResultDTO; +import com.epmet.dto.result.UploadImgResultDTO; import com.epmet.entity.IcResiUserEntity; import com.epmet.entity.IcVaccineEntity; import com.epmet.entity.IcVaccineRelationEntity; @@ -33,9 +32,7 @@ import com.epmet.excel.data.IcNatImportExcelData; import com.epmet.excel.data.IcVaccineImportExcelData; import com.epmet.excel.handler.IcVaccineExcelImportListener; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; -import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.feign.OssFeignClient; -import com.epmet.service.IcNoticeService; import com.epmet.service.IcVaccineService; import com.epmet.service.UserService; import com.github.pagehelper.PageHelper; @@ -70,38 +67,14 @@ public class IcVaccineServiceImpl extends BaseServiceImpl myNatList(MyNatListFormDTO formDTO) { - //1.根据token信息查询居民身份证号 - UserBaseInfoResultDTO dto = userBaseInfoDao.selectListByUserIdList(formDTO.getUserId()); - if (null != dto) { - formDTO.setIdCard(dto.getIdNum()); - } - //2.查询当前人员创建的或该身份证号录入的核算检测数据(居民端录入、数字平台录入、数字平台导入、数字平台同步的) - List resultList = baseDao.getMyNatList(formDTO); - return resultList; - } - /** * @Author sun * @Description 【疫苗】本组织及下级疫苗接种信息列表 diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.38__ic_vaccine.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.38__ic_vaccine.sql new file mode 100644 index 0000000000..825a0cd8c4 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.38__ic_vaccine.sql @@ -0,0 +1,41 @@ +#添加 疫苗接种相关表 +CREATE TABLE `ic_vaccine` ( + `ID` varchar(64) NOT NULL COMMENT '唯一标识', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id customer.id', + `NAME` varchar(64) NOT NULL COMMENT '姓名', + `MOBILE` varchar(11) NOT NULL COMMENT '手机号', + `ID_CARD` varchar(18) NOT NULL COMMENT '身份证号', + `IS_RESI_USER` varchar(1) NOT NULL DEFAULT '0' COMMENT '是否客户下居民(0:否 1:是)', + `USER_TYPE` varchar(32) NOT NULL COMMENT '数据来源【导入的:import;】', + `INOCULATE_TIME` datetime NOT NULL COMMENT '接种时间', + `INOCULATE_ADDRESS` varchar(32) NOT NULL DEFAULT '' COMMENT '接种地点', + `MANUFACTURER` varchar(32) NOT NULL DEFAULT '' COMMENT '疫苗厂家', + `FIELD1` varchar(32) DEFAULT NULL COMMENT '预留字段1', + `FIELD2` varchar(255) DEFAULT NULL COMMENT '预留字段2', + `FIELD3` varchar(255) DEFAULT NULL COMMENT '预留字段3', + `REMARK` varchar(255) DEFAULT NULL COMMENT '备注', + `DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', + `REVISION` int(2) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE, + KEY `idx_ic_card` (`ID_CARD`) USING BTREE +) COMMENT='疫苗接种记录'; + +CREATE TABLE `ic_vaccine_relation` ( + `ID` varchar(64) NOT NULL COMMENT 'ID', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `AGENCY_ID` varchar(64) NOT NULL COMMENT '居民端上报时存储用户所在网格的组织id.居民信息的人存储居民所在组织id.单个新增或者导入的存储登录用户所属的组织id', + `PIDS` varchar(255) NOT NULL COMMENT '组织pids,包含当前agencyId值', + `IC_VACCINE_ID` varchar(64) NOT NULL COMMENT '疫苗记录表Id(ic_vaccine.id)', + `USER_TYPE` varchar(32) NOT NULL COMMENT '关系数据的绑定途径【\r\n数字社区录入:icresi;\r\n导入的:import;\r\n同步的:synchro】', + `DEL_FLAG` int(1) NOT NULL COMMENT '删除标识', + `REVISION` int(2) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) COMMENT='疫苗接种记录关系表';