Browse Source

Merge remote-tracking branch 'origin/dev_epidemic_situation' into dev_epidemic_situation

master
wangxianzhang 3 years ago
parent
commit
3ca5b4b944
  1. 17
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcVaccineListResultDTO.java
  2. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNatController.java
  3. 16
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcVaccineController.java
  4. 9
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcVaccineService.java
  5. 47
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java
  6. 41
      epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.38__ic_vaccine.sql

17
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;
}

2
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 {

16
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<PageData<IcVaccineListResultDTO>> natList(@LoginUser TokenDto tokenDto, @RequestBody VaccineListFormDTO formDTO) {
@PostMapping("vaccine-list")
public Result<PageData<IcVaccineListResultDTO>> vaccineList(@LoginUser TokenDto tokenDto, @RequestBody VaccineListFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
return new Result<PageData<IcVaccineListResultDTO>>().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")

9
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<IcVaccineEntity> {
/**
* @Author sun
* @Description 核酸检测-居民端我的上报
**/
List<MyNatListResultDTO> myNatList(MyNatListFormDTO formDTO);
/**
* @Author sun
* @Description 核酸核酸检测信息列表

47
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<IcVaccineDao, IcVaccin
@Autowired
private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient;
@Autowired
private IcNoticeService icNoticeService;
@Autowired
private OssFeignClient ossFeignClient;
@Autowired
private UserBaseInfoDao userBaseInfoDao;
@Autowired
private IcNatRelationDao icNatRelationDao;
@Autowired
private IcVaccineDao icVaccineDao;
@Autowired
private IcVaccineRelationDao icVaccineRelationDao;
@Autowired
private IcResiUserDao icResiUserDao;
@Autowired
private UserService userService;
/**
* @Author sun
* @Description 疫苗接种-居民端我的上报
**/
@Override
public List<MyNatListResultDTO> myNatList(MyNatListFormDTO formDTO) {
//1.根据token信息查询居民身份证号
UserBaseInfoResultDTO dto = userBaseInfoDao.selectListByUserIdList(formDTO.getUserId());
if (null != dto) {
formDTO.setIdCard(dto.getIdNum());
}
//2.查询当前人员创建的或该身份证号录入的核算检测数据(居民端录入、数字平台录入、数字平台导入、数字平台同步的)
List<MyNatListResultDTO> resultList = baseDao.getMyNatList(formDTO);
return resultList;
}
/**
* @Author sun
* @Description 疫苗本组织及下级疫苗接种信息列表

41
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='疫苗接种记录关系表';
Loading…
Cancel
Save