From 5c39e4c29a317bc40f3a68831aee63c4e17969e9 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 30 Mar 2022 09:32:20 +0800 Subject: [PATCH 01/31] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E5=8F=98=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dto/form/AddIcNatFormDTO.java | 1 + .../java/com/epmet/controller/IcNatController.java | 2 ++ .../java/com/epmet/service/impl/IcNatServiceImpl.java | 10 ++-------- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/AddIcNatFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/AddIcNatFormDTO.java index 73928633fb..eb43d0ddd9 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/AddIcNatFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/AddIcNatFormDTO.java @@ -92,6 +92,7 @@ public class AddIcNatFormDTO implements Serializable { //token中信息 private String customerId; + private String staffId; } 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 95814147cb..df82899915 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 @@ -75,6 +75,7 @@ public class IcNatController implements ResultDataResolver { public Result add(@LoginUser TokenDto tokenDto, @RequestBody AddIcNatFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO, AddIcNatFormDTO.Nat.class); formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); icNucleinService.add(formDTO); return new Result(); } @@ -122,6 +123,7 @@ public class IcNatController implements ResultDataResolver { @PostMapping("edit") public Result edit(@LoginUser TokenDto tokenDto, @RequestBody AddIcNatFormDTO formDTO) { formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); icNucleinService.edit(formDTO); return new Result(); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java index dad0b433d5..f9f4fa77d4 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java @@ -105,7 +105,7 @@ public class IcNatServiceImpl extends BaseServiceImpl imp dto.setChannel(formDTO.getChannel()); dto.setOrigin("2"); dto.setContent(formDTO.getContent()); - dto.setOrgName(agencyInfo.getOrganizationName()); + dto.setStaffId(formDTO.getStaffId()); icNoticeService.sendNotice(dto); } @@ -186,12 +186,6 @@ public class IcNatServiceImpl extends BaseServiceImpl imp //3.新增通知表信息 if (CollectionUtils.isNotEmpty(formDTO.getChannel())) { - IcNatEntity icNatEntity = baseDao.selectById(formDTO.getIcNatId()); - //1.获取所填居民所属组织缓存信息 - AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(icNatEntity.getAgencyId()); - if (null == agencyInfo) { - throw new RenException(String.format("获取组织缓存信息失败%s", icNatEntity.getAgencyId())); - } SendNoticeFormDTO dto = new SendNoticeFormDTO(); List userList = new ArrayList<>(); userList.add(ConvertUtils.sourceToTarget(formDTO, SendNoticeFormDTO.UserListBean.class)); @@ -200,7 +194,7 @@ public class IcNatServiceImpl extends BaseServiceImpl imp dto.setChannel(formDTO.getChannel()); dto.setOrigin("2"); dto.setContent(formDTO.getContent()); - dto.setOrgName(agencyInfo.getOrganizationName()); + dto.setStaffId(formDTO.getStaffId()); icNoticeService.sendNotice(dto); } } From 52535d85b3327042cef88c4f366e7ea42d9ce35a Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Wed, 30 Mar 2022 09:40:36 +0800 Subject: [PATCH 02/31] =?UTF-8?q?=E9=98=B2=E7=96=AB=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/IcEpidemicPreventionController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicPreventionController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicPreventionController.java index 7ed8b936e2..cbb43300fa 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicPreventionController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicPreventionController.java @@ -72,7 +72,8 @@ public class IcEpidemicPreventionController{ * @Date 2022/3/29 16:13 */ @PostMapping("detail") - public Result detail(@RequestBody EpidemicPreventionFormDTO formDTO) { + public Result detail(@LoginUser TokenDto tokenDto, @RequestBody EpidemicPreventionFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); EpidemicPreventionResultDTO result = icResiUserService.getEpidemicPreventionDetail(formDTO); return new Result().ok(result); } From 97865cbc524cff7db62b80ce1f4a4c4b34730dc8 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 30 Mar 2022 09:44:21 +0800 Subject: [PATCH 03/31] =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E5=8F=98=E5=8A=A8-?= =?UTF-8?q?=E5=B1=85=E6=B0=91=E7=AB=AF=E6=A0=B8=E7=AE=97=E6=88=91=E7=9A=84?= =?UTF-8?q?=E4=B8=8A=E6=8A=A5=E5=85=81=E8=AE=B8=E7=BB=99=E5=88=AB=E4=BA=BA?= =?UTF-8?q?=E4=B8=8A=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dto/form/MyNatListFormDTO.java | 3 --- .../main/java/com/epmet/controller/IcNatController.java | 2 +- .../java/com/epmet/service/impl/IcNatServiceImpl.java | 9 ++++++++- .../src/main/resources/mapper/IcNatDao.xml | 7 ++++++- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/MyNatListFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/MyNatListFormDTO.java index e9620dc5d2..157bc89a27 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/MyNatListFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/MyNatListFormDTO.java @@ -14,8 +14,6 @@ import javax.validation.constraints.NotBlank; public class MyNatListFormDTO extends PageFormDTO { private static final long serialVersionUID = 9156247659994638103L; - public interface MyNat extends CustomerClientShowGroup { - } public interface Detail extends CustomerClientShowGroup { } public interface Del extends CustomerClientShowGroup { @@ -26,7 +24,6 @@ public class MyNatListFormDTO extends PageFormDTO { /** * 身份证号 */ - @NotBlank(message = "身份证号不能为空", groups = MyNat.class) private String idCard; /** * 当前组织:current 根组织:all 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 df82899915..1c82388e65 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 @@ -87,8 +87,8 @@ public class IcNatController implements ResultDataResolver { @NoRepeatSubmit @PostMapping("mynatlist") public Result> myNatList(@LoginUser TokenDto tokenDto, @RequestBody MyNatListFormDTO formDTO) { - ValidatorUtils.validateEntity(formDTO, MyNatListFormDTO.MyNat.class); formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); return new Result>().ok(icNucleinService.myNatList(formDTO)); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java index f9f4fa77d4..e610c12fd3 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java @@ -20,6 +20,7 @@ import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; import com.epmet.commons.tools.utils.*; import com.epmet.constants.ImportTaskConstants; import com.epmet.dao.IcNatDao; +import com.epmet.dao.UserBaseInfoDao; import com.epmet.dto.IcNatDTO; import com.epmet.dto.IcNoticeDTO; import com.epmet.dto.form.*; @@ -78,6 +79,9 @@ public class IcNatServiceImpl extends BaseServiceImpl imp @Autowired private OssFeignClient ossFeignClient; + @Autowired + private UserBaseInfoDao userBaseInfoDao; + /** * @Author sun * @Description 核酸检测-上报核酸记录 @@ -117,7 +121,10 @@ public class IcNatServiceImpl extends BaseServiceImpl imp **/ @Override public List myNatList(MyNatListFormDTO formDTO) { - //1.根据身份证号查询该人员所有核酸记录(居民端录入、数字平台录入、数字平台导入) + //1.根据token信息查询居民身份证号 + UserBaseInfoResultDTO dto = userBaseInfoDao.selectListByUserIdList(formDTO.getUserId()); + formDTO.setIdCard(dto.getIdNum()); + //2.查询当前人员创建的或该身份证号录入的核算检测数据(居民端录入、数字平台录入、数字平台导入) List resultList = baseDao.getMyNatList(formDTO); return resultList; } diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcNatDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcNatDao.xml index 28b4129229..84e3739081 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcNatDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcNatDao.xml @@ -21,7 +21,12 @@ WHERE del_flag = '0' AND customer_id = #{customerId} - AND id_card = #{idCard} + AND ( + CREATED_BY = #{userId} + + OR id_card = #{idCard} + + ) ORDER BY nat_time DESC From 4ff7ff324406cda17636e030c2358e9f1b8b40db Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 30 Mar 2022 09:46:23 +0800 Subject: [PATCH 04/31] =?UTF-8?q?=E9=9A=8F=E8=AE=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/IcFollowUpRecordDTO.java | 52 ++++++++++- .../epmet/dto/form/PageFollowUpFormDTO.java | 28 ++++++ .../IcFollowUpRecordController.java | 91 +++++++++++++++++-- .../IcTripReportRecordController.java | 2 +- .../epmet/entity/IcFollowUpRecordEntity.java | 4 + .../service/IcFollowUpRecordService.java | 9 +- .../impl/IcFollowUpRecordServiceImpl.java | 35 +++++-- 7 files changed, 200 insertions(+), 21 deletions(-) create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PageFollowUpFormDTO.java diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcFollowUpRecordDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcFollowUpRecordDTO.java index ae5c05bede..954d7508d6 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcFollowUpRecordDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcFollowUpRecordDTO.java @@ -1,8 +1,18 @@ package com.epmet.dto; +import com.alibaba.excel.annotation.ExcelIgnore; +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.hibernate.validator.constraints.Length; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; import java.io.Serializable; import java.util.Date; -import lombok.Data; /** @@ -15,75 +25,115 @@ import lombok.Data; public class IcFollowUpRecordDTO implements Serializable { private static final long serialVersionUID = 1L; + public interface AddInternalGroup { + } + public interface AddUserRequired extends CustomerClientShowGroup { + } + /** * 主键ID */ + @ExcelIgnore private String id; /** * 客户Id */ + @ExcelIgnore private String customerId; /** * 姓名 */ + @ColumnWidth(20) + @ExcelProperty("姓名") + @NotBlank(message = "姓名不能为空", groups = {AddUserRequired.class}) private String name; /** * 手机号 */ + @ColumnWidth(20) + @ExcelProperty("手机号") + @NotBlank(message = "手机号不能为空", groups = {AddUserRequired.class}) private String mobile; /** * 身份证号 */ + @ColumnWidth(25) + @ExcelProperty("身份证号") + @NotBlank(message = "身份证号不能为空", groups = {AddUserRequired.class}) private String idCard; /** * 0行程上报,1疫苗接种,2核酸检测 */ + @ColumnWidth(25) + @ExcelProperty("来源") + @NotBlank(message = "origin不能为空:0行程上报,1疫苗接种,2核酸检测", groups = {AddInternalGroup.class}) private String origin; /** * 随访时间 */ + @ColumnWidth(25) + @ExcelProperty("随访时间") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @NotNull(message = "随访时间不能为空", groups = {AddUserRequired.class}) private Date visitTime; /** * 随访内容 */ + @ColumnWidth(200) + @ExcelProperty("随访内容") + @NotBlank(message = "随访内容不能为空", groups = {AddUserRequired.class}) + @Length(message = "随访内容最多输入1000字", groups = {AddUserRequired.class}) private String content; + /** + * 工作人员所属组织id + */ + @ExcelIgnore + private String agencyId; + /** * 删除标识 1删除;0未删除 */ + @ExcelIgnore private String delFlag; /** * 乐观锁 */ + @ExcelIgnore private Integer revision; /** * 创建人 */ + @ExcelIgnore private String createdBy; /** * 创建时间 */ + @ExcelIgnore private Date createdTime; /** * 更新人 */ + @ExcelIgnore private String updatedBy; /** * 更新时间 */ + @ExcelIgnore private Date updatedTime; } \ No newline at end of file diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PageFollowUpFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PageFollowUpFormDTO.java new file mode 100644 index 0000000000..ab4a416d9e --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PageFollowUpFormDTO.java @@ -0,0 +1,28 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + + +@Data +public class PageFollowUpFormDTO extends PageFormDTO { + + /** + * 身份证号 + */ + @NotBlank(message = "身份证号不能为空", groups = {AddUserShowGroup.class}) + private String idCard; + + @NotBlank(message = "身份证号不能为空", groups = {AddUserShowGroup.class}) + private String name; + + /** + * 0行程上报,1疫苗接种,2核酸检测 + */ + @NotBlank(message = "origin不能为空:0行程上报,1疫苗接种,2核酸检测", groups = {AddUserInternalGroup.class}) + private String origin; + + private String customerId; +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcFollowUpRecordController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcFollowUpRecordController.java index 2e717fbe8d..e30af61242 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcFollowUpRecordController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcFollowUpRecordController.java @@ -1,19 +1,30 @@ package com.epmet.controller; +import com.alibaba.excel.EasyExcel; +import com.alibaba.excel.ExcelWriter; +import com.alibaba.excel.write.metadata.WriteSheet; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.dto.form.PageFormDTO; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcFollowUpRecordDTO; +import com.epmet.dto.form.PageFollowUpFormDTO; +import com.epmet.dto.result.NatListResultDTO; import com.epmet.service.IcFollowUpRecordService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; -import java.util.Map; +import javax.servlet.http.HttpServletResponse; /** @@ -22,6 +33,7 @@ import java.util.Map; * @author generator generator@elink-cn.com * @since v1.0.0 2022-03-25 */ +@Slf4j @RestController @RequestMapping("followup") public class IcFollowUpRecordController { @@ -29,9 +41,16 @@ public class IcFollowUpRecordController { @Autowired private IcFollowUpRecordService icFollowUpRecordService; - @RequestMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = icFollowUpRecordService.page(params); + /** + * 随访记录-列表 + * @param formDTO + * @return + */ + @PostMapping("page") + public Result> page(@LoginUser TokenDto tokenDto, @RequestBody PageFollowUpFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserShowGroup.class,PageFormDTO.AddUserInternalGroup.class); + PageData page = icFollowUpRecordService.page(formDTO); return new Result>().ok(page); } @@ -41,11 +60,17 @@ public class IcFollowUpRecordController { return new Result().ok(data); } + /** + * 随访记录-新增 + * @param dto + * @return + */ @NoRepeatSubmit @PostMapping("save") - public Result save(@RequestBody IcFollowUpRecordDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + public Result save(@LoginUser TokenDto tokenDto, @RequestBody IcFollowUpRecordDTO dto){ + dto.setCustomerId(tokenDto.getCustomerId()); + dto.setCreatedBy(tokenDto.getUserId()); + ValidatorUtils.validateEntity(dto, IcFollowUpRecordDTO.AddUserRequired.class,IcFollowUpRecordDTO.AddInternalGroup.class); icFollowUpRecordService.save(dto); return new Result(); } @@ -67,6 +92,56 @@ public class IcFollowUpRecordController { return new Result(); } + /** + * 随访记录-导出 + * 目前是导出个人 + * @param tokenDto + * @param formDTO + * @param response + */ + @NoRepeatSubmit + @PostMapping("export") + public void export(@LoginUser TokenDto tokenDto, @RequestBody PageFollowUpFormDTO formDTO, HttpServletResponse response) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + //formDTO.setCustomerId("45687aa479955f9d06204d415238f7cc"); + formDTO.setPage(false); + ExcelWriter excelWriter = null; + formDTO.setPageSize(NumConstant.TEN_THOUSAND); + int pageNo = formDTO.getPageNo(); + try { + //导出文件名:张三随访记录0330 + String fileName = "随访记录.xlsx"; + excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), NatListResultDTO.class).build(); + WriteSheet writeSheet = EasyExcel.writerSheet("Sheet1").build(); + PageData data = null; + do { + data = icFollowUpRecordService.page(formDTO); + data.getList().forEach(o->{ + //0行程上报,1疫苗接种,2核酸检测 + switch(o.getOrigin()){ + case NumConstant.ZERO_STR: + o.setOrigin("行程上报"); + break; + case NumConstant.ONE_STR: + o.setOrigin("疫苗接种"); + break; + case NumConstant.TWO_STR: + o.setOrigin("核酸检测"); + break; + } + }); + formDTO.setPageNo(++pageNo); + excelWriter.write(data.getList(), writeSheet); + } while (CollectionUtils.isNotEmpty(data.getList()) && data.getList().size()==formDTO.getPageSize()); + }catch (Exception e){ + log.error("export exception", e); + }finally { + // 千万别忘记finish 会帮忙关闭流 + if (excelWriter != null) { + excelWriter.finish(); + } + } + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcTripReportRecordController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcTripReportRecordController.java index 36d1c39e53..a426f2b302 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcTripReportRecordController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcTripReportRecordController.java @@ -46,7 +46,7 @@ public class IcTripReportRecordController { * @param formDTO * @return */ - @RequestMapping("page") + @PostMapping("page") public Result> page(@LoginUser TokenDto tokenDto,@RequestBody PageTripReportFormDTO formDTO){ formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setUserId(tokenDto.getUserId()); diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcFollowUpRecordEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcFollowUpRecordEntity.java index 4d9e6de99e..8f976d02b2 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcFollowUpRecordEntity.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcFollowUpRecordEntity.java @@ -56,4 +56,8 @@ public class IcFollowUpRecordEntity extends BaseEpmetEntity { */ private String content; + /** + * 工作人员所属组织id + */ + private String agencyId; } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcFollowUpRecordService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcFollowUpRecordService.java index 7183ae1e4d..7bdc1a1da5 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcFollowUpRecordService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcFollowUpRecordService.java @@ -3,6 +3,7 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcFollowUpRecordDTO; +import com.epmet.dto.form.PageFollowUpFormDTO; import com.epmet.entity.IcFollowUpRecordEntity; import java.util.List; @@ -17,14 +18,14 @@ import java.util.Map; public interface IcFollowUpRecordService extends BaseService { /** - * 默认分页 + * 随访记录-列表 * - * @param params + * @param formDTO * @return PageData * @author generator * @date 2022-03-25 */ - PageData page(Map params); + PageData page(PageFollowUpFormDTO formDTO); /** * 默认查询 @@ -47,7 +48,7 @@ public interface IcFollowUpRecordService extends BaseService implements IcFollowUpRecordService { + /** + * 随访记录-列表 + * @param formDTO + * @return + */ @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( - getPage(params, FieldConstant.CREATED_TIME, false), - getWrapper(params) - ); - return getPageData(page, IcFollowUpRecordDTO.class); + public PageData page(PageFollowUpFormDTO formDTO) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(formDTO.getIdCard()),IcFollowUpRecordEntity::getIdCard,formDTO.getIdCard()) + .eq(StringUtils.isNotBlank(formDTO.getName()),IcFollowUpRecordEntity::getName,formDTO.getName()) + .eq(IcFollowUpRecordEntity::getOrigin,formDTO.getOrigin()) + .eq(IcFollowUpRecordEntity::getCustomerId,formDTO.getCustomerId()) + .orderByDesc(IcFollowUpRecordEntity::getCreatedTime); + PageInfo data = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.isPage()) + .doSelectPageInfo(() -> baseDao.selectList(wrapper)); + return new PageData(data.getList(),data.getTotal()); } @Override @@ -62,7 +78,12 @@ public class IcFollowUpRecordServiceImpl extends BaseServiceImpl Date: Wed, 30 Mar 2022 09:47:37 +0800 Subject: [PATCH 05/31] =?UTF-8?q?=E9=9A=8F=E8=AE=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/IcFollowUpRecordDTO.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcFollowUpRecordDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcFollowUpRecordDTO.java index 954d7508d6..aba428a576 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcFollowUpRecordDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcFollowUpRecordDTO.java @@ -3,6 +3,8 @@ package com.epmet.dto; import com.alibaba.excel.annotation.ExcelIgnore; import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.HeadStyle; +import com.alibaba.excel.enums.poi.FillPatternTypeEnum; import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; @@ -21,6 +23,7 @@ import java.util.Date; * @author generator generator@elink-cn.com * @since v1.0.0 2022-03-25 */ +@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 44) @Data public class IcFollowUpRecordDTO implements Serializable { From 616dddf622a318a6a166c15e122034ab0ce01fbe Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 30 Mar 2022 09:50:32 +0800 Subject: [PATCH 06/31] =?UTF-8?q?29=E8=84=9A=E6=9C=AC=EF=BC=8C=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E6=96=B9=E6=B3=95=E4=BC=A0=E5=85=A5staffId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/IcTripReportRecordServiceImpl.java | 8 ++++---- ...fy_trip_report.sql => V0.0.29__modify_trip_report.sql} | 0 2 files changed, 4 insertions(+), 4 deletions(-) rename epmet-user/epmet-user-server/src/main/resources/db/migration/{V0.0.28__modify_trip_report.sql => V0.0.29__modify_trip_report.sql} (100%) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java index e1c58337fa..5396bc8307 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java @@ -137,7 +137,7 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl NumConstant.ZERO && StringUtils.isNotBlank(formDTO.getContent())) { - sendNotice(formDTO,agencyInfoCache.getOrganizationName()); + sendNotice(formDTO); } return entity.getId(); } @@ -146,7 +146,7 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl userList = new ArrayList<>(); //注意这里的userId是指的pc平台的居民 @@ -157,7 +157,7 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl NumConstant.ZERO && StringUtils.isNotBlank(formDTO.getContent())) { - sendNotice(formDTO,agencyInfoCache.getOrganizationName()); + sendNotice(formDTO); } return entity.getId(); } diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.28__modify_trip_report.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.29__modify_trip_report.sql similarity index 100% rename from epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.28__modify_trip_report.sql rename to epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.29__modify_trip_report.sql From 9238f2493927858bb0a6c9a6b7eb648490e93f7a Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 30 Mar 2022 10:09:06 +0800 Subject: [PATCH 07/31] =?UTF-8?q?=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/constants/ImportTaskConstants.java | 3 + .../dto/IcEpidemicSpecialAttentionDTO.java | 2 +- .../form/CancelAttentionPackageFormDTO.java | 2 +- .../dto/form/VaccinationListFormDTO.java | 2 +- .../com/epmet/enums/AttentionTypeEnum.java | 46 ++++ .../java/com/epmet/enums/ChannelEnum.java | 44 ++++ .../IcEpidemicSpecialAttentionController.java | 52 +++- .../IcEpidemicSpecialAttentionEntity.java | 2 +- .../excel/ImportEpidemicSpecialAttention.java | 66 +++++ .../EpidemicSpecialAttentionErrorModel.java | 29 +++ .../IcEpidemicSpecialAttentionService.java | 12 + ...IcEpidemicSpecialAttentionServiceImpl.java | 228 +++++++++++++++++- 12 files changed, 478 insertions(+), 10 deletions(-) create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/enums/AttentionTypeEnum.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/enums/ChannelEnum.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/excel/ImportEpidemicSpecialAttention.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/excel/error/EpidemicSpecialAttentionErrorModel.java diff --git a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/constants/ImportTaskConstants.java b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/constants/ImportTaskConstants.java index 8e7ef7eedb..46b99ffea4 100644 --- a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/constants/ImportTaskConstants.java +++ b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/constants/ImportTaskConstants.java @@ -15,6 +15,9 @@ public interface ImportTaskConstants { String BIZ_TYPE_COMMUNITY_SELF_ORG = "community_self_org"; String BIZ_TYPE_PARTY_UNIT = "party_unit"; String BIZ_TYPE_PARTY_ACTIVITY = "party_activity"; + String BIZ_TYPE_ATTENTION_NAT = "attention_nat"; + String BIZ_TYPE_ATTENTION_VACCINATION = "attention_vaccination"; + String BIZ_TYPE_ATTENTION_TRIP_REPORT = "attention_vaccination"; /** * 核酸检测 */ diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcEpidemicSpecialAttentionDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcEpidemicSpecialAttentionDTO.java index 43a40b0d90..8234693f38 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcEpidemicSpecialAttentionDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcEpidemicSpecialAttentionDTO.java @@ -55,7 +55,7 @@ public class IcEpidemicSpecialAttentionDTO implements Serializable { private Integer isAttention; /** - * 关注类型,核酸检测:2,疫苗接种:1 + * 关注类型,核酸检测:2,疫苗接种:1,行程上报:0 */ @NotNull(message = "attentionType不能为空",groups = {IcEpidemicSpecialAttentionAdd.class,IcEpidemicSpecialAttentionUpdate.class}) private Integer attentionType; diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CancelAttentionPackageFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CancelAttentionPackageFormDTO.java index f0c8f9a900..183c59195f 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CancelAttentionPackageFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CancelAttentionPackageFormDTO.java @@ -28,7 +28,7 @@ public class CancelAttentionPackageFormDTO implements Serializable { private List idCards; /** - * 关注类型,核酸检测:2,疫苗接种:1 + * 关注类型,核酸检测:2,疫苗接种:1,行程上报:0 */ @NotNull(message = "attentionType不能为空",groups = CancelAttentionPackageForm.class) private Integer attentionType ; diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VaccinationListFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VaccinationListFormDTO.java index ec8d2a3932..fc69f5da84 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VaccinationListFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VaccinationListFormDTO.java @@ -20,7 +20,7 @@ public class VaccinationListFormDTO extends PageFormDTO implements Serializable public interface VaccinationListForm{} /** - * 关注类型,核酸检测:2,疫苗接种:1 + * 关注类型,核酸检测:2,疫苗接种:1,行程上报:0 */ @NotNull(message = "attentionType不能为空",groups = VaccinationListForm.class) private Integer attentionType; diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/enums/AttentionTypeEnum.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/enums/AttentionTypeEnum.java new file mode 100644 index 0000000000..3e40404466 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/enums/AttentionTypeEnum.java @@ -0,0 +1,46 @@ +package com.epmet.enums; + +import com.epmet.commons.tools.constant.NumConstant; +import lombok.Data; +import org.apache.commons.lang3.StringUtils; + +/** + * @Author zxc + * @DateTime 2022/3/29 16:17 + * @DESC + */ +public enum AttentionTypeEnum { + + XCSB(0,"行程上报"), + YMJZ(1,"疫苗接种"), + NAT(2,"核酸检测") + ; + + private Integer key; + private String value; + + AttentionTypeEnum(Integer key, String value) { + this.key = key; + this.value = value; + } + + public static Integer getKeyByValue(String value){ + if (StringUtils.isBlank(value)){ + return NumConstant.ZERO; + } + for (AttentionTypeEnum a : AttentionTypeEnum.values()) { + if (a.getValue().equals(value)){ + return a.getKey(); + } + } + return NumConstant.ZERO; + } + + public Integer getKey() { + return key; + } + + public String getValue() { + return value; + } +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/enums/ChannelEnum.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/enums/ChannelEnum.java new file mode 100644 index 0000000000..d0df62c66f --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/enums/ChannelEnum.java @@ -0,0 +1,44 @@ +package com.epmet.enums; + +import com.epmet.commons.tools.constant.NumConstant; +import org.apache.commons.lang3.StringUtils; + +/** + * @Author zxc + * @DateTime 2022/3/29 16:35 + * @DESC + */ +public enum ChannelEnum { + + MINI("0","小程序"), + MSG("1","短信") + ; + + private String key; + private String value; + + ChannelEnum(String key, String value) { + this.key = key; + this.value = value; + } + + public static String getKeyByValue(String value){ + if (StringUtils.isBlank(value)){ + return NumConstant.ONE_STR; + } + for (ChannelEnum a : ChannelEnum.values()) { + if (a.getValue().equals(value)){ + return a.getKey(); + } + } + return NumConstant.ONE_STR; + } + + public String getKey() { + return key; + } + + public String getValue() { + return value; + } +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicSpecialAttentionController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicSpecialAttentionController.java index 8035d509b3..c642775fac 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicSpecialAttentionController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicSpecialAttentionController.java @@ -4,23 +4,28 @@ import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.dto.form.PageFormDTO; +import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; -import com.epmet.commons.tools.utils.ExcelPoiUtils; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.constants.ImportTaskConstants; import com.epmet.dto.IcEpidemicSpecialAttentionDTO; import com.epmet.dto.form.*; +import com.epmet.dto.result.ImportTaskCommonResultDTO; import com.epmet.excel.NatExportExcel; -import com.epmet.excel.UserResiRegisterVisitExcel; import com.epmet.excel.VaccinationExportExcel; +import com.epmet.feign.EpmetCommonServiceOpenFeignClient; import com.epmet.service.IcEpidemicSpecialAttentionService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.io.FilenameUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; +import java.io.InputStream; /** @@ -31,10 +36,13 @@ import javax.servlet.http.HttpServletResponse; */ @RestController @RequestMapping("icEpidemicSpecialAttention") +@Slf4j public class IcEpidemicSpecialAttentionController { @Autowired private IcEpidemicSpecialAttentionService icEpidemicSpecialAttentionService; + @Autowired + private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient; /** * Desc: 【疫苗接种关注名单,疫苗接种关注名单】列表 @@ -102,8 +110,42 @@ public class IcEpidemicSpecialAttentionController { * @date 2022/3/28 13:40 */ @PostMapping("vaccination-import") - public Result vaccinationImport(@LoginUser TokenDto tokenDTO, @RequestParam("file") MultipartFile file,@RequestParam("attentionType")Integer attentionType){ - + public Result vaccinationImport(@LoginUser TokenDto tokenDto, @RequestParam("file") MultipartFile file,@RequestParam("attentionType")Integer attentionType){ + if (file.isEmpty()) { + throw new EpmetException("请上传文件"); + } + // 校验文件类型 + String extension = FilenameUtils.getExtension(file.getOriginalFilename()); + if (!"xls".equals(extension) && !"xlsx".equals(extension)) { + throw new EpmetException("文件类型不匹配"); + } + // 关注类型,核酸检测:2,疫苗接种:1,行程上报:0 + ImportTaskCommonFormDTO importTaskForm = new ImportTaskCommonFormDTO(); + importTaskForm.setOriginFileName(file.getOriginalFilename()); + importTaskForm.setOperatorId(tokenDto.getUserId()); + if (attentionType.equals(NumConstant.ONE)){ + importTaskForm.setBizType(ImportTaskConstants.BIZ_TYPE_ATTENTION_VACCINATION); + }else if (attentionType.equals(NumConstant.TWO)){ + importTaskForm.setBizType(ImportTaskConstants.BIZ_TYPE_ATTENTION_NAT); + }else if (attentionType.equals(NumConstant.ZERO)){ + importTaskForm.setBizType(ImportTaskConstants.BIZ_TYPE_ATTENTION_TRIP_REPORT); + } + Result result = commonServiceOpenFeignClient.createImportTask(importTaskForm); + if (!result.success()) { + throw new EpmetException(9999,"存在进行中的导入"); + } + InputStream inputStream = null; + try { + inputStream = file.getInputStream(); + }catch (Exception e){ + ImportTaskCommonFormDTO input = new ImportTaskCommonFormDTO(); + input.setOperatorId(tokenDto.getUserId()); + input.setTaskId(result.getData().getTaskId()); + input.setProcessStatus(ImportTaskConstants.PROCESS_STATUS_FINISHED_FAIL); + commonServiceOpenFeignClient.finishImportTask(input); + log.error("读取文件失败"); + } + icEpidemicSpecialAttentionService.importFile(tokenDto,inputStream,attentionType,result.getData().getTaskId()); return new Result(); } @@ -122,7 +164,7 @@ public class IcEpidemicSpecialAttentionController { formDTO.setUserId(tokenDto.getUserId()); formDTO.setPage(false); PageData pageData = icEpidemicSpecialAttentionService.vaccinationList(formDTO); - // 关注类型,核酸检测:2,疫苗接种:1 + // 关注类型,核酸检测:2,疫苗接种:1,行程上报:0 if (formDTO.getAttentionType().equals(NumConstant.ONE)){ ExcelUtils.exportExcelToTarget(response, null, pageData.getList(), VaccinationExportExcel.class); }else { diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcEpidemicSpecialAttentionEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcEpidemicSpecialAttentionEntity.java index 3ade140ffa..52e6ff132f 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcEpidemicSpecialAttentionEntity.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcEpidemicSpecialAttentionEntity.java @@ -47,7 +47,7 @@ public class IcEpidemicSpecialAttentionEntity extends BaseEpmetEntity { private Integer isAttention; /** - * 关注类型,核酸检测:2,疫苗接种:1 + * 关注类型,核酸检测:2,疫苗接种:1,行程上报:0 */ private Integer attentionType; diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/ImportEpidemicSpecialAttention.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/ImportEpidemicSpecialAttention.java new file mode 100644 index 0000000000..2f690d2d7c --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/ImportEpidemicSpecialAttention.java @@ -0,0 +1,66 @@ +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import cn.afterturn.easypoi.excel.annotation.ExcelIgnore; +import com.epmet.commons.tools.utils.ExcelVerifyInfo; +import lombok.Data; + +import java.util.List; + +/** + * @Author zxc + * @DateTime 2022/3/29 15:47 + * @DESC + */ +@Data +public class ImportEpidemicSpecialAttention extends ExcelVerifyInfo { + + /** + * 姓名 + */ + @Excel(name = "姓名") + private String name; + + /** + * 手机号 + */ + @Excel(name = "手机号") + private String mobile; + + /** + * 身份证号 + */ + @Excel(name = "身份证号") + private String idCard; + + /** + * 原因 + */ + @Excel(name = "关注原因") + private String reason; + + /** + * 备注 + */ + @Excel(name = "备注") + private String remark; + + @ExcelIgnore + private Integer attentionType; + + @Excel(name = "通知内容") + private String content; + + @Excel(name = "通知渠道") + private String channelString; + + @ExcelIgnore + private List channel; + + @ExcelIgnore + private Boolean addStatus = false; + + @ExcelIgnore + private Integer num; + +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/error/EpidemicSpecialAttentionErrorModel.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/error/EpidemicSpecialAttentionErrorModel.java new file mode 100644 index 0000000000..ef007cfa4c --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/error/EpidemicSpecialAttentionErrorModel.java @@ -0,0 +1,29 @@ +package com.epmet.excel.error; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +/** + * @Author zxc + * @DateTime 2022/3/29 16:57 + * @DESC + */ +@Data +public class EpidemicSpecialAttentionErrorModel { + + @Excel(name = "行号",width = 10) + private Integer num; + + @Excel(name = "姓名",width = 20) + private String name; + + @Excel(name = "电话",width = 20) + private String mobile; + + @Excel(name = "身份证",width = 30) + private String idCard; + + @Excel(name = "错误信息", width = 200) + private String errorMsg; + +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcEpidemicSpecialAttentionService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcEpidemicSpecialAttentionService.java index 8883fa0f28..65e9434140 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcEpidemicSpecialAttentionService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcEpidemicSpecialAttentionService.java @@ -2,12 +2,14 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.IcEpidemicSpecialAttentionDTO; import com.epmet.dto.form.CancelAttentionPackageFormDTO; import com.epmet.dto.form.VaccinationAddFormDTO; import com.epmet.dto.form.VaccinationListFormDTO; import com.epmet.entity.IcEpidemicSpecialAttentionEntity; +import java.io.InputStream; import java.util.List; import java.util.Map; import java.util.Set; @@ -113,6 +115,16 @@ public interface IcEpidemicSpecialAttentionService extends BaseService implements IcEpidemicSpecialAttentionService { + @Autowired + private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient; + @Autowired + private OssFeignClient ossFeignClient; + @Override public PageData page(Map params) { IPage page = baseDao.selectPage( @@ -106,7 +144,7 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.vaccinationList(formDTO)); @@ -214,6 +252,148 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl errorInfo = new ArrayList<>(); + + try { + List list = ExcelPoiUtils.importExcel(inputStream, 0,1,ImportEpidemicSpecialAttention.class); + if (CollectionUtils.isEmpty(list)){ + closeTask(taskId,tokenDto.getUserId(), ImportTaskConstants.PROCESS_STATUS_FINISHED_FAIL,""); + return; + } + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId()); + if (null == staffInfo){ + throw new EpmetException("未查询到工作人员信息"+tokenDto.getUserId()); + } + AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(staffInfo.getAgencyId()); + if (null == agencyInfo){ + throw new EpmetException("未查询到组织信息"+staffInfo.getAgencyId()); + } + for (int i = 0; i < list.size(); i++) { + list.get(i).setNum(i+1); + list.get(i).setAttentionType(attentionType); + list.get(i).setChannel(getChannel(list.get(i).getChannelString())); + if (StringUtils.isBlank(list.get(i).getName()) && !list.get(i).getAddStatus()){ + errorInfo.add(getErrorInfo(list.get(i), "姓名不能为空",i)); + list.get(i).setAddStatus(true); + continue; + } + if (StringUtils.isBlank(list.get(i).getIdCard()) && !list.get(i).getAddStatus()){ + errorInfo.add(getErrorInfo(list.get(i), "身份证号不能为空",i)); + list.get(i).setAddStatus(true); + continue; + } + if (StringUtils.isBlank(list.get(i).getMobile()) && !list.get(i).getAddStatus()){ + errorInfo.add(getErrorInfo(list.get(i), "电话不能为空",i)); + list.get(i).setAddStatus(true); + continue; + } + } + Map groupByIdCard = list.stream().collect(Collectors.groupingBy(ImportEpidemicSpecialAttention::getIdCard, Collectors.counting())); + groupByIdCard.forEach((idCard,count) -> { + if (Integer.valueOf(count.toString()).compareTo(1) != 0){ + for (ImportEpidemicSpecialAttention i : list) { + if (idCard.equals(i.getIdCard()) && !i.getAddStatus()){ + errorInfo.add(getErrorInfo(i,"数据重复",i.getNum())); + i.setAddStatus(true); + } + } + } + }); + List idCards = list.stream().map(m -> m.getIdCard()).collect(Collectors.toList()); + List existList = baseDao.getExistList(attentionType, idCards); + if (CollectionUtils.isNotEmpty(existList)){ + for (String s : existList) { + for (int i = NumConstant.ZERO; i < list.size(); i++) { + if (s.equals(list.get(i).getIdCard()) && !list.get(i).getAddStatus()){ + errorInfo.add(getErrorInfo(list.get(i),"数据已存在",list.get(i).getNum())); + list.get(i).setAddStatus(true); + continue; + } + } + } + } + Map> groupByStatus = list.stream().collect(Collectors.groupingBy(ImportEpidemicSpecialAttention::getAddStatus)); + List needInsert = groupByStatus.get(false); + if (CollectionUtils.isNotEmpty(needInsert)){ + List entities = ConvertUtils.sourceToTarget(needInsert, IcEpidemicSpecialAttentionEntity.class); + entities.forEach(e -> { + e.setIsAttention(NumConstant.ONE); + e.setOrgId(agencyInfo.getId()); + e.setPid(agencyInfo.getPid()); + e.setPids(agencyInfo.getPids()); + e.setCustomerId(tokenDto.getCustomerId()); + }); + insertBatch(entities); + } + if (CollectionUtils.isNotEmpty(errorInfo)){ + String url = importOssUpload(errorInfo, EpidemicSpecialAttentionErrorModel.class); + closeTask(taskId,tokenDto.getUserId(),ImportTaskConstants.PROCESS_STATUS_FINISHED_FAIL,url); + }else { + closeTask(taskId,tokenDto.getUserId(),ImportTaskConstants.PROCESS_STATUS_FINISHED_SUCCESS,""); + } + }catch (Exception e){ + log.error(e.getMessage()); + closeTask(taskId,tokenDto.getUserId(),ImportTaskConstants.PROCESS_STATUS_FINISHED_FAIL,""); + } + } + + public List getChannel(String channelString){ + List result = new ArrayList<>(); + if (StringUtils.isBlank(channelString)){ + return result; + } + String[] split = channelString.split(","); + for (String s : split) { + result.add(ChannelEnum.getKeyByValue(s)); + } + return result; + } + + /** + * Desc: 关闭任务 + * @param taskId + * @param userId + * @param status + * @param url + * @author zxc + * @date 2022/3/30 09:05 + */ + public void closeTask(String taskId,String userId,String status,String url){ + ImportTaskCommonFormDTO input = new ImportTaskCommonFormDTO(); + input.setOperatorId(userId); + input.setTaskId(taskId); + input.setProcessStatus(status); + input.setResultDescFilePath(url); + commonServiceOpenFeignClient.finishImportTask(input); + } + + /** + * Desc: 构造错误信息 + * @param dto + * @param info + * @param num + * @author zxc + * @date 2022/3/29 17:17 + */ + public EpidemicSpecialAttentionErrorModel getErrorInfo(ImportEpidemicSpecialAttention dto,String info,Integer num){ + EpidemicSpecialAttentionErrorModel result = ConvertUtils.sourceToTarget(dto, EpidemicSpecialAttentionErrorModel.class); + result.setErrorMsg(info); + result.setNum(num); + return result; + } + /** * 传入身份证集合,返回已经关注的身份证号列表 * @@ -229,4 +409,50 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl String importOssUpload(Collection errorRows, Class tClass) throws IOException { + Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams("导入失败的数据列表","导入失败的数据列表"), + tClass, errorRows); + + // 文件名 + String resultDescFileName = UUID.randomUUID().toString().concat(".xls"); + + FileItemFactory factory = new DiskFileItemFactory(16, null); + FileItem fileItem = factory.createItem("file", ContentType.APPLICATION_OCTET_STREAM.toString(), true, resultDescFileName); + OutputStream os = fileItem.getOutputStream(); + Result uploadResult = null; + try { + workbook.write(os); + uploadResult = ossFeignClient.uploadImportTaskDescFile(new CommonsMultipartFile(fileItem)); + } catch (Exception e) { + String errormsg = ExceptionUtils.getErrorStackTrace(e); + log.error("上传错误描述文件:{}", errormsg); + } finally { + try { + os.close(); + } catch (IOException e) { + String errormsg = ExceptionUtils.getErrorStackTrace(e); + log.error("上传错误描述文件关闭输出流:{}", errormsg); + } + try { + fileItem.delete(); + } catch (Exception e) { + String errormsg = ExceptionUtils.getErrorStackTrace(e); + log.error("上传错误描述文件删除临时文件:{}", errormsg); + } + } + + if (uploadResult == null || !uploadResult.success()) { + log.error("调用OSS上传结果描述文件失败"); + return null; + } + return uploadResult.getData().getUrl(); + } + } \ No newline at end of file From e189e381dce4dd0bd54440e10fd1b46152c0d3a9 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 30 Mar 2022 10:41:04 +0800 Subject: [PATCH 08/31] =?UTF-8?q?=E8=A1=8C=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/IcEpidemicSpecialAttentionServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java index 5162220bd0..735d2ee679 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java @@ -285,17 +285,17 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl Date: Wed, 30 Mar 2022 10:42:10 +0800 Subject: [PATCH 09/31] =?UTF-8?q?=E9=9A=8F=E8=AE=BF=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/commons/tools/utils/DateUtils.java | 2 +- .../com/epmet/controller/IcFollowUpRecordController.java | 8 +++++--- .../epmet/service/impl/IcFollowUpRecordServiceImpl.java | 7 ++++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java index f956423f3a..a28a038f7b 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java @@ -60,7 +60,7 @@ public class DateUtils { public static final String DATE_PATTERN_YYYY_MM = "yyyy-MM"; public static final String WEEK_TYPE_ENGLISH = "english"; public static final String WEEK_TYPE_CHINESE = "chinese"; - + public static final String DATE_PATTERN_MMDD = "MMdd"; /** * 日期格式化 日期格式为:yyyy-MM-dd * @param date 日期 diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcFollowUpRecordController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcFollowUpRecordController.java index e30af61242..b03ad85ed0 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcFollowUpRecordController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcFollowUpRecordController.java @@ -9,6 +9,7 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.dto.form.PageFormDTO; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; @@ -17,7 +18,6 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcFollowUpRecordDTO; import com.epmet.dto.form.PageFollowUpFormDTO; -import com.epmet.dto.result.NatListResultDTO; import com.epmet.service.IcFollowUpRecordService; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; @@ -25,6 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; +import java.util.Date; /** @@ -111,8 +112,9 @@ public class IcFollowUpRecordController { int pageNo = formDTO.getPageNo(); try { //导出文件名:张三随访记录0330 - String fileName = "随访记录.xlsx"; - excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), NatListResultDTO.class).build(); + String today= DateUtils.format(new Date(),DateUtils.DATE_PATTERN_MMDD); + String fileName = formDTO.getName().concat("随访记录").concat(today).concat(".xlsx"); + excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), IcFollowUpRecordDTO.class).build(); WriteSheet writeSheet = EasyExcel.writerSheet("Sheet1").build(); PageData data = null; do { diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcFollowUpRecordServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcFollowUpRecordServiceImpl.java index 1dbf6a3eb5..eb9255a8ec 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcFollowUpRecordServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcFollowUpRecordServiceImpl.java @@ -47,10 +47,11 @@ public class IcFollowUpRecordServiceImpl extends BaseServiceImpl data = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.isPage()) + .orderByDesc(IcFollowUpRecordEntity::getVisitTime); + PageInfo data = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.isPage()) .doSelectPageInfo(() -> baseDao.selectList(wrapper)); - return new PageData(data.getList(),data.getTotal()); + List list=ConvertUtils.sourceToTarget(data.getList(),IcFollowUpRecordDTO.class); + return new PageData(list,data.getTotal()); } @Override From 67b311d76954eca9e7f0ae28077e4b1c255adea2 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 30 Mar 2022 10:43:59 +0800 Subject: [PATCH 10/31] =?UTF-8?q?=E5=8F=82=E6=95=B0=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/form/AddIcNatFormDTO.java | 6 +++++- .../src/main/java/com/epmet/controller/IcNatController.java | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/AddIcNatFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/AddIcNatFormDTO.java index eb43d0ddd9..b67375b5c5 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/AddIcNatFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/AddIcNatFormDTO.java @@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; import java.io.Serializable; import java.util.ArrayList; import java.util.Date; @@ -20,10 +21,13 @@ public class AddIcNatFormDTO implements Serializable { public interface Nat extends CustomerClientShowGroup { } + public interface Edit extends CustomerClientShowGroup { + } /** * 核酸记录Id,修改时使用 */ + @NotBlank(message = "组织Id不能为空", groups = Edit.class) private String icNatId; /** * 当前网格所属组织Id @@ -57,7 +61,7 @@ public class AddIcNatFormDTO implements Serializable { /** * 检测时间 */ - //@NotBlank(message = "检测时间不能为空", groups = Nat.class) + @NotNull(message = "检测时间不能为空", groups = Nat.class) @JsonFormat(pattern="yyyy-MM-dd HH:mm") private Date natTime; /** 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 1c82388e65..d6ff6b6af7 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 @@ -122,6 +122,7 @@ public class IcNatController implements ResultDataResolver { @NoRepeatSubmit @PostMapping("edit") public Result edit(@LoginUser TokenDto tokenDto, @RequestBody AddIcNatFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, AddIcNatFormDTO.Edit.class); formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setStaffId(tokenDto.getUserId()); icNucleinService.edit(formDTO); From 89c23cda09343e7a5441c740e4fe8d31c305c9c5 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Wed, 30 Mar 2022 11:18:23 +0800 Subject: [PATCH 11/31] =?UTF-8?q?=E9=98=B2=E7=96=AB=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IcEpidemicPreventionController.java | 3 +- .../java/com/epmet/service/IcNatService.java | 2 +- .../epmet/service/IcResiVaccineService.java | 11 ++++++ .../service/IcTripReportRecordService.java | 11 ++++++ .../epmet/service/impl/IcNatServiceImpl.java | 3 +- .../service/impl/IcResiUserServiceImpl.java | 14 +++++-- .../impl/IcResiVaccineServiceImpl.java | 37 ++++++++++++++++++- .../impl/IcTripReportRecordServiceImpl.java | 32 ++++++++++++++++ 8 files changed, 105 insertions(+), 8 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicPreventionController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicPreventionController.java index cbb43300fa..10394a9987 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicPreventionController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicPreventionController.java @@ -79,7 +79,8 @@ public class IcEpidemicPreventionController{ } @PostMapping("info") - public Result info(@RequestBody EpidemicPreventionFormDTO formDTO) { + public Result info(@LoginUser TokenDto tokenDto, @RequestBody EpidemicPreventionFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); EpidemicPreventionInfoDTO result = icResiUserService.getEpidemicPreventionInfo(formDTO); return new Result().ok(result); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcNatService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcNatService.java index 4956c96493..e7239524bb 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcNatService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcNatService.java @@ -77,5 +77,5 @@ public interface IcNatService extends BaseService { * @Author zhaoqifeng * @Date 2022/3/29 16:29 */ - List getNatList(String idCard); + List getNatList(String customerId, String idCard); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiVaccineService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiVaccineService.java index 44207d875f..c1b2ea0655 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiVaccineService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiVaccineService.java @@ -3,6 +3,7 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcResiVaccineDTO; +import com.epmet.dto.result.VaccineListDTO; import com.epmet.entity.IcResiVaccineEntity; import java.util.List; @@ -75,4 +76,14 @@ public interface IcResiVaccineService extends BaseService { * @date 2022-03-28 */ void delete(String[] ids); + + /** + * 获取居民疫苗接种信息 + * + * @Param idCard + * @Return {@link List< VaccineListDTO>} + * @Author zhaoqifeng + * @Date 2022/3/30 10:24 + */ + List getVaccineList(String customerId, String idCard); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcTripReportRecordService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcTripReportRecordService.java index bc19691e60..a7f961542d 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcTripReportRecordService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcTripReportRecordService.java @@ -6,6 +6,7 @@ import com.epmet.dto.IcTripReportRecordDTO; import com.epmet.dto.form.IcTripReportFormDTO; import com.epmet.dto.form.MyReportedTripFormDTO; import com.epmet.dto.form.PageTripReportFormDTO; +import com.epmet.dto.result.TripListDTO; import com.epmet.entity.IcTripReportRecordEntity; import java.util.List; @@ -82,4 +83,14 @@ public interface IcTripReportRecordService extends BaseService resiList(MyReportedTripFormDTO formDTO); + + /** + * 获取居民行程信息 + * + * @Param idCard + * @Return {@link List< TripListDTO>} + * @Author zhaoqifeng + * @Date 2022/3/30 10:31 + */ + List tripList(String customerId, String idCard); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java index e610c12fd3..9efdb959ce 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java @@ -342,8 +342,9 @@ public class IcNatServiceImpl extends BaseServiceImpl imp * @Date 2022/3/29 16:29 */ @Override - public List getNatList(String idCard) { + public List getNatList(String customerId, String idCard) { LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcNatEntity::getCustomerId, customerId); wrapper.eq(IcNatEntity::getIdCard, idCard); wrapper.orderByDesc(IcNatEntity::getNatTime); List list = baseDao.selectList(wrapper); diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java index e7d124a71d..2b02a65fb5 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java @@ -120,6 +120,10 @@ public class IcResiUserServiceImpl extends BaseServiceImpl getWrapper(Map params){ String id = (String)params.get(FieldConstant.ID_HUMP); @@ -1326,10 +1330,14 @@ public class IcResiUserServiceImpl extends BaseServiceImpl natList = icNatService.getNatList(icResiUser.getIdCard()); + List natList = icNatService.getNatList(formDTO.getCustomerId(), icResiUser.getIdCard()); result.setNatList(natList); - //TODO 疫苗接种 - //TODO 行程信息 + //疫苗接种 + List vaccineList = icResiVaccineService.getVaccineList(formDTO.getCustomerId(), icResiUser.getIdCard()); + result.setVaccineList(vaccineList); + //行程信息 + List tripList = icTripReportRecordService.tripList(formDTO.getCustomerId(), icResiUser.getIdCard()); + result.setTripList(tripList); } return result; } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiVaccineServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiVaccineServiceImpl.java index c8c586137a..2f5f0b0928 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiVaccineServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiVaccineServiceImpl.java @@ -1,23 +1,28 @@ package com.epmet.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.DateUtils; import com.epmet.dao.IcResiVaccineDao; import com.epmet.dto.IcResiVaccineDTO; +import com.epmet.dto.result.VaccineListDTO; import com.epmet.entity.IcResiVaccineEntity; import com.epmet.service.IcResiVaccineService; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.Arrays; +import java.util.Collections; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** * 居民疫苗情况 @@ -80,4 +85,32 @@ public class IcResiVaccineServiceImpl extends BaseServiceImpl} + * @Author zhaoqifeng + * @Date 2022/3/30 10:24 + */ + @Override + public List getVaccineList(String customerId, String idCard) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcResiVaccineEntity::getCustomerId, customerId); + wrapper.eq(IcResiVaccineEntity::getIdCard, idCard); + wrapper.orderByDesc(IcResiVaccineEntity::getInoculateTime); + List list = baseDao.selectList(wrapper); + if (CollectionUtils.isEmpty(list)) { + return Collections.emptyList(); + } + return list.stream().map(item -> { + VaccineListDTO dto = new VaccineListDTO(); + dto.setAddress(item.getInoculateAddress()); + dto.setManufactor(item.getManufacturer()); + dto.setVaccinateTime(DateUtils.format(item.getInoculateTime(), DateUtils.DATE_TIME_PATTERN_END_WITH_MINUTE)); + return dto; + }).collect(Collectors.toList()); + } + } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java index 5396bc8307..fc08974191 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java @@ -1,5 +1,6 @@ package com.epmet.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; @@ -13,12 +14,14 @@ import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; import com.epmet.commons.tools.redis.common.bean.GridInfoCache; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.IcResiUserConstant; import com.epmet.dao.IcTripReportRecordDao; import com.epmet.dao.UserBaseInfoDao; import com.epmet.dto.IcEpidemicSpecialAttentionDTO; import com.epmet.dto.IcTripReportRecordDTO; import com.epmet.dto.form.*; +import com.epmet.dto.result.TripListDTO; import com.epmet.entity.IcTripReportRecordEntity; import com.epmet.service.IcEpidemicSpecialAttentionService; import com.epmet.service.IcNoticeService; @@ -263,5 +266,34 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl} + * @Author zhaoqifeng + * @Date 2022/3/30 10:31 + */ + @Override + public List tripList(String customerId, String idCard) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcTripReportRecordEntity::getCustomerId, customerId); + wrapper.eq(IcTripReportRecordEntity::getIdCard, idCard); + wrapper.orderByDesc(IcTripReportRecordEntity::getArriveDate); + List list = baseDao.selectList(wrapper); + if (CollectionUtils.isEmpty(list)) { + return Collections.emptyList(); + } + return list.stream().map(item -> { + TripListDTO dto = new TripListDTO(); + dto.setArrivalTime(DateUtils.format(item.getArriveDate(), DateUtils.DATE_PATTERN)); + dto.setFromRegion(item.getSourceAddress()); + dto.setLeaveTime(DateUtils.format(item.getLeaveDate(), DateUtils.DATE_PATTERN)); + dto.setRemark(item.getRemark()); + return dto; + }).collect(Collectors.toList()); + } + } \ No newline at end of file From d41357ac75421aca202441000842a3e2d1f4d465 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 30 Mar 2022 11:29:47 +0800 Subject: [PATCH 12/31] =?UTF-8?q?=E8=A1=8C=E7=A8=8B=E4=B8=8A=E6=8A=A5?= =?UTF-8?q?=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/IcTripReportRecordDTO.java | 57 +++++++++++++++++-- .../IcTripReportRecordController.java | 45 +++++++++++++++ .../dao/IcEpidemicSpecialAttentionDao.java | 3 +- .../IcEpidemicSpecialAttentionService.java | 3 +- .../com/epmet/service/IcNoticeService.java | 3 +- ...IcEpidemicSpecialAttentionServiceImpl.java | 10 +--- .../service/impl/IcNoticeServiceImpl.java | 2 +- .../impl/IcTripReportRecordServiceImpl.java | 17 +++++- .../mapper/IcTripReportRecordDao.xml | 8 +-- 9 files changed, 122 insertions(+), 26 deletions(-) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java index deb2abaed1..0bf1d81e58 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java @@ -1,5 +1,10 @@ package com.epmet.dto; +import com.alibaba.excel.annotation.ExcelIgnore; +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.HeadStyle; +import com.alibaba.excel.enums.poi.FillPatternTypeEnum; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; @@ -13,6 +18,7 @@ import java.util.Date; * @author generator generator@elink-cn.com * @since v1.0.0 2022-03-25 */ +@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 44) @Data public class IcTripReportRecordDTO implements Serializable { @@ -21,137 +27,180 @@ public class IcTripReportRecordDTO implements Serializable { /** * 主键ID */ + @ExcelIgnore private String id; /** * 居民端用户所在网格id,数字社区居民所属网格id */ + @ExcelIgnore private String gridId; /** * 居民端上报的:存储用户所在网格的组织id; */ + @ExcelIgnore private String agencyId; /** * agency_id的所有上级 */ + @ExcelIgnore private String pids; /** * 客户Id */ + @ExcelIgnore private String customerId; /** * 姓名 */ + @ColumnWidth(15) + @ExcelProperty("姓名") private String name; /** * 手机号 */ + @ColumnWidth(15) + @ExcelProperty("手机号") private String mobile; /** * 身份证号 */ + @ColumnWidth(22) + @ExcelProperty("身份证号") private String idCard; /** * 用户id */ + @ExcelIgnore private String userId; /** * 居民端小程序的人:resi;数字社区的居民:icresi;单独录入:input; 导入:import */ + @ExcelIgnore private String userType; /** * 现居地编码 */ + @ExcelIgnore private String presentAddressCode; /** * 现居地名称eg:山东省青岛市黄岛区玫瑰山路社区 */ + @ColumnWidth(50) + @ExcelProperty("现居地") private String presentAddress; /** * 详细地址 */ + @ColumnWidth(35) + @ExcelProperty("详细地址") private String detailAddress; /** * 来源地区编码 */ + @ExcelIgnore private String sourceAddressCode; /** * 来源地区地址 */ + @ColumnWidth(50) + @ExcelProperty("来自地区") private String sourceAddress; /** * 到达日期 */ + @ColumnWidth(25) + @ExcelProperty("来到本地时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date arriveDate; /** * 离开日期 */ + @ColumnWidth(25) + @ExcelProperty("离开本地时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date leaveDate; + /** + * pc行程上报-列表返参:最近一次通知时间 + */ + @ColumnWidth(25) + @ExcelProperty("最近一次通知时间") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date latestNoticeTime; + /** * 备注信息 */ + @ColumnWidth(100) + @ExcelProperty("备注") private String remark; /** * 删除标识 1删除;0未删除 */ + @ExcelIgnore private String delFlag; /** * 乐观锁 */ + @ExcelIgnore private Integer revision; /** * 创建人 */ + @ExcelIgnore private String createdBy; /** * 创建时间 */ + @ExcelIgnore @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date createdTime; /** * 更新人 */ + @ExcelIgnore private String updatedBy; /** * 更新时间 */ + @ExcelIgnore @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date updatedTime; + @ExcelIgnore @JsonFormat(pattern = "yyyy-MM-dd HH:mm") private Date reportTime; - /** - * pc行程上报-列表返参:最近一次通知时间 - */ - private Date latestNoticeTime; /** * pc行程上报-列表返参:是否加入核酸检测关注名单:true:已加入;false:未加入 */ + @ExcelIgnore private Boolean heSuanCheck; + + @ColumnWidth(20) + @ExcelProperty("核算检测关注名单") + private String heSuanCheckDesc; } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcTripReportRecordController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcTripReportRecordController.java index a426f2b302..4b4fff68f8 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcTripReportRecordController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcTripReportRecordController.java @@ -1,10 +1,15 @@ package com.epmet.controller; +import com.alibaba.excel.EasyExcel; +import com.alibaba.excel.ExcelWriter; +import com.alibaba.excel.write.metadata.WriteSheet; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.dto.form.PageFormDTO; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.constant.IcResiUserConstant; @@ -13,6 +18,8 @@ import com.epmet.dto.form.IcTripReportFormDTO; import com.epmet.dto.form.MyReportedTripFormDTO; import com.epmet.dto.form.PageTripReportFormDTO; import com.epmet.service.IcTripReportRecordService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.ArrayUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -33,6 +40,7 @@ import java.util.List; * @author generator generator@elink-cn.com * @since v1.0.0 2022-03-25 */ +@Slf4j @RestController @RequestMapping("tripreport") public class IcTripReportRecordController { @@ -157,5 +165,42 @@ public class IcTripReportRecordController { } } + /** + * pc:行程上报-导出 + * @param tokenDto + * @param formDTO + * @param response + */ + @NoRepeatSubmit + @PostMapping("export") + public void export(@LoginUser TokenDto tokenDto, @RequestBody PageTripReportFormDTO formDTO, HttpServletResponse response) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + // formDTO.setCustomerId("45687aa479955f9d06204d415238f7cc"); + // formDTO.setUserId("35005df15fb0f7c791344f0b424870b7"); + formDTO.setPage(false); + ExcelWriter excelWriter = null; + formDTO.setPageSize(NumConstant.TEN_THOUSAND); + int pageNo = formDTO.getPageNo(); + try { + // 这里 需要指定写用哪个class去写 + String fileName = "行程上报.xlsx"; + excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), IcTripReportRecordDTO.class).build(); + WriteSheet writeSheet = EasyExcel.writerSheet("Sheet1").build(); + PageData data = null; + do { + data = icTripReportRecordService.page(formDTO); + formDTO.setPageNo(++pageNo); + excelWriter.write(data.getList(), writeSheet); + } while (CollectionUtils.isNotEmpty(data.getList()) && data.getList().size() == formDTO.getPageSize()); + } catch (Exception e) { + log.error("export exception", e); + } finally { + // 千万别忘记finish 会帮忙关闭流 + if (excelWriter != null) { + excelWriter.finish(); + } + } + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcEpidemicSpecialAttentionDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcEpidemicSpecialAttentionDao.java index 6115d34c1b..ba1564855e 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcEpidemicSpecialAttentionDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcEpidemicSpecialAttentionDao.java @@ -8,7 +8,6 @@ import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; -import java.util.Set; /** * 疫情特别关注 @@ -60,5 +59,5 @@ public interface IcEpidemicSpecialAttentionDao extends BaseDao getIdCardList(@Param("customerId") String customerId,@Param("idCardSet") Set idCardSet, @Param("attentionType") Integer attentionType); + List getIdCardList(@Param("customerId") String customerId,@Param("idCardSet") List idCardSet, @Param("attentionType") Integer attentionType); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcEpidemicSpecialAttentionService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcEpidemicSpecialAttentionService.java index 65e9434140..75658ca720 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcEpidemicSpecialAttentionService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcEpidemicSpecialAttentionService.java @@ -12,7 +12,6 @@ import com.epmet.entity.IcEpidemicSpecialAttentionEntity; import java.io.InputStream; import java.util.List; import java.util.Map; -import java.util.Set; /** * 疫情特别关注 @@ -130,5 +129,5 @@ public interface IcEpidemicSpecialAttentionService extends BaseService getHeSuanIdCardList(String customerId,Set idCardSet); + List getHeSuanIdCardList(String customerId,List idCardSet); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcNoticeService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcNoticeService.java index 13529cadbf..3f72855558 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcNoticeService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcNoticeService.java @@ -10,7 +10,6 @@ import com.epmet.entity.IcNoticeEntity; import java.util.Date; import java.util.List; import java.util.Map; -import java.util.Set; /** * 防疫通知 @@ -104,5 +103,5 @@ public interface IcNoticeService extends BaseService { * @param idCardSet * @return */ - Map getUserLatestNoticeTime(String customerId,Set idCardSet); + Map getUserLatestNoticeTime(String customerId,List idCardSet); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java index 735d2ee679..1b8f844b6b 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java @@ -17,7 +17,6 @@ import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.utils.ExcelPoiUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.constants.ImportTaskConstants; @@ -30,7 +29,6 @@ import com.epmet.dto.form.VaccinationListFormDTO; import com.epmet.dto.result.UploadImgResultDTO; import com.epmet.dto.result.VaccinationListResultDTO; import com.epmet.entity.IcEpidemicSpecialAttentionEntity; -import com.epmet.enums.AttentionTypeEnum; import com.epmet.enums.ChannelEnum; import com.epmet.excel.ImportEpidemicSpecialAttention; import com.epmet.excel.error.EpidemicSpecialAttentionErrorModel; @@ -54,13 +52,9 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.commons.CommonsMultipartFile; import java.io.IOException; +import java.io.InputStream; import java.io.OutputStream; import java.util.*; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Map; import java.util.stream.Collectors; /** @@ -401,7 +395,7 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl getHeSuanIdCardList(String customerId,Set idCardSet) { + public List getHeSuanIdCardList(String customerId,List idCardSet) { if(CollectionUtils.isEmpty(idCardSet)){ return new ArrayList<>(); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNoticeServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNoticeServiceImpl.java index 3a224d8540..c306bec8aa 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNoticeServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNoticeServiceImpl.java @@ -225,7 +225,7 @@ public class IcNoticeServiceImpl extends BaseServiceImpl getUserLatestNoticeTime(String customerId,Set idCardSet) { + public Map getUserLatestNoticeTime(String customerId,List idCardSet) { Map map=new HashMap<>(); for(String idCard:idCardSet) { LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java index 5396bc8307..ed11229fe7 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java @@ -27,6 +27,7 @@ import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.collections4.ListUtils; import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -69,14 +70,24 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl list = data.getList(); //3.查询最近一次通知时间、核算检测关注名单 if (CollectionUtils.isNotEmpty(list)) { - Set idCardSet = list.stream().map(m -> m.getIdCard()).collect(Collectors.toSet()); - Map latestNotice = icNoticeService.getUserLatestNoticeTime(formDTO.getCustomerId(),idCardSet); - List gzIdCardList = epidemicSpecialAttentionService.getHeSuanIdCardList(formDTO.getCustomerId(),idCardSet); + Map latestNotice = new HashMap<>(); + List gzIdCardList = new ArrayList<>(); + List idCardList = list.stream().map(m -> m.getIdCard()).distinct().collect(Collectors.toList()); + //如果不分页可能会有很多个身份证号 + List> partionList = ListUtils.partition(idCardList, NumConstant.ONE_HUNDRED); + partionList.forEach(l -> { + Map map = icNoticeService.getUserLatestNoticeTime(formDTO.getCustomerId(), l); + List gzIdCards = epidemicSpecialAttentionService.getHeSuanIdCardList(formDTO.getCustomerId(), l); + latestNotice.putAll(map); + gzIdCardList.addAll(gzIdCards); + }); for (IcTripReportRecordDTO dto : list) { //默认未加入 dto.setHeSuanCheck(false); + dto.setHeSuanCheckDesc("未加入"); if (CollectionUtils.isNotEmpty(gzIdCardList) && gzIdCardList.contains(dto.getIdCard())) { dto.setHeSuanCheck(true); + dto.setHeSuanCheckDesc("已加入"); } if (MapUtils.isNotEmpty(latestNotice) && latestNotice.containsKey(dto.getIdCard())) { dto.setLatestNoticeTime(latestNotice.get(dto.getIdCard())); diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml index 85343a5257..0e55cceb05 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml @@ -47,11 +47,11 @@ AND SOURCE_ADDRESS_CODE like concat(#{sourceAddressCode},'%') - - AND ARRIVE_DATE = ]]> #{startTime} + + AND ARRIVE_DATE = ]]> #{startDate} - - AND ARRIVE_DATE #{endTime} + + AND ARRIVE_DATE #{endDate} ORDER BY r.CREATED_TIME DESC From 939bacdaf8a1f354fd49e2aeeb8ef66a0d0323e6 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Wed, 30 Mar 2022 13:54:21 +0800 Subject: [PATCH 13/31] =?UTF-8?q?=E7=96=AB=E8=8B=97=E6=8E=A5=E7=A7=8D?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V0.0.30__add_vaccine.sql | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.30__add_vaccine.sql diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.30__add_vaccine.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.30__add_vaccine.sql new file mode 100644 index 0000000000..a41ed606c6 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.30__add_vaccine.sql @@ -0,0 +1,21 @@ +CREATE TABLE `ic_resi_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 '身份证号', + `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', + `REMAEK` varchar(255) DEFAULT NULL COMMENT '备注', + `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', + `REVISION` int(11) 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 +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='居民疫苗情况'; \ No newline at end of file From 565e715f5b80498ce6dc91204a303a4e24fd5ea7 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 30 Mar 2022 14:05:26 +0800 Subject: [PATCH 14/31] =?UTF-8?q?=E8=A1=8C=E7=A8=8B=E5=B1=B1=E5=8C=85?= =?UTF-8?q?=E5=8A=A0=E5=85=A5=E5=85=B3=E6=B3=A8=EF=BC=9A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/IcEpidemicSpecialAttentionServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java index 1b8f844b6b..07eb77199e 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java @@ -399,8 +399,8 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl(); } - //关注类型,核酸检测:2,疫苗接种:1 - return baseDao.getIdCardList(customerId,idCardSet,NumConstant.TWO); + //关注类型,核酸检测:2,疫苗接种:1,行程上报:0 + return baseDao.getIdCardList(customerId,idCardSet,NumConstant.ZERO); } /** From 2a2328e9f301270acad705d8126082350d722761 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 30 Mar 2022 14:10:02 +0800 Subject: [PATCH 15/31] =?UTF-8?q?=E5=8A=A0=E4=B8=8A=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IcEpidemicSpecialAttentionController.java | 4 +- .../IcEpidemicSpecialAttentionService.java | 2 +- ...IcEpidemicSpecialAttentionServiceImpl.java | 49 ++++++++++++++++--- 3 files changed, 45 insertions(+), 10 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicSpecialAttentionController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicSpecialAttentionController.java index c642775fac..8a2cd30ea8 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicSpecialAttentionController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicSpecialAttentionController.java @@ -83,9 +83,9 @@ public class IcEpidemicSpecialAttentionController { */ @PostMapping("vaccination-update") @NoRepeatSubmit - public Result vaccinationUpdate(@RequestBody IcEpidemicSpecialAttentionDTO formDTO){ + public Result vaccinationUpdate(@RequestBody IcEpidemicSpecialAttentionDTO formDTO,@LoginUser TokenDto tokenDto){ ValidatorUtils.validateEntity(formDTO, IcEpidemicSpecialAttentionDTO.IcEpidemicSpecialAttentionUpdate.class); - icEpidemicSpecialAttentionService.vaccinationUpdate(formDTO); + icEpidemicSpecialAttentionService.vaccinationUpdate(formDTO,tokenDto); return new Result(); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcEpidemicSpecialAttentionService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcEpidemicSpecialAttentionService.java index 75658ca720..8a6eb03f04 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcEpidemicSpecialAttentionService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcEpidemicSpecialAttentionService.java @@ -104,7 +104,7 @@ public interface IcEpidemicSpecialAttentionService extends BaseService page(Map params) { @@ -207,7 +207,19 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl needSedNotice = formDTO.getList().stream().filter(l -> CollectionUtils.isNotEmpty(l.getChannel())).collect(Collectors.toList()); + if (CollectionUtils.isNotEmpty(needSedNotice)) { + SendNoticeFormDTO dto = new SendNoticeFormDTO(); + List userListBeans = ConvertUtils.sourceToTarget(needSedNotice, SendNoticeFormDTO.UserListBean.class); + dto.setCustomerId(formDTO.getCustomerId()); + dto.setUserList(userListBeans); + dto.setChannel(needSedNotice.get(NumConstant.ZERO).getChannel()); + dto.setOrigin(needSedNotice.get(NumConstant.ZERO).getAttentionType().toString()); + dto.setContent(needSedNotice.get(NumConstant.ZERO).getContent()); + dto.setStaffId(formDTO.getUserId()); + noticeService.sendNotice(dto); + } } /** @@ -220,7 +232,7 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl w = new LambdaQueryWrapper<>(); IcEpidemicSpecialAttentionEntity e = new IcEpidemicSpecialAttentionEntity(); w.eq(IcEpidemicSpecialAttentionEntity::getIdCard,formDTO.getIdCard()) @@ -229,7 +241,17 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl needSendList = needInsert.stream().filter(l -> CollectionUtils.isNotEmpty(l.getChannel())).collect(Collectors.toList()); + if (CollectionUtils.isNotEmpty(needSendList)) { + SendNoticeFormDTO dto = new SendNoticeFormDTO(); + List userListBeans = ConvertUtils.sourceToTarget(needSendList, SendNoticeFormDTO.UserListBean.class); + dto.setCustomerId(tokenDto.getCustomerId()); + dto.setUserList(userListBeans); + dto.setChannel(needSendList.get(NumConstant.ZERO).getChannel()); + dto.setOrigin(needSendList.get(NumConstant.ZERO).getAttentionType().toString()); + dto.setContent(needSendList.get(NumConstant.ZERO).getContent()); + dto.setStaffId(tokenDto.getUserId()); + noticeService.sendNotice(dto); + } } if (CollectionUtils.isNotEmpty(errorInfo)){ String url = importOssUpload(errorInfo, EpidemicSpecialAttentionErrorModel.class); From 897f131872c5e8daa92cda03628a139c9e986ce3 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 30 Mar 2022 14:18:00 +0800 Subject: [PATCH 16/31] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E5=8F=91=E9=80=81=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/IcEpidemicSpecialAttentionServiceImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java index 915f32b18e..ada415e5d3 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java @@ -299,7 +299,7 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl needSendList = needInsert.stream().filter(l -> CollectionUtils.isNotEmpty(l.getChannel())).collect(Collectors.toList()); + // send msg 产品说导入不用发通知 + /*List needSendList = needInsert.stream().filter(l -> CollectionUtils.isNotEmpty(l.getChannel())).collect(Collectors.toList()); if (CollectionUtils.isNotEmpty(needSendList)) { SendNoticeFormDTO dto = new SendNoticeFormDTO(); List userListBeans = ConvertUtils.sourceToTarget(needSendList, SendNoticeFormDTO.UserListBean.class); @@ -364,7 +364,7 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl Date: Wed, 30 Mar 2022 14:28:53 +0800 Subject: [PATCH 17/31] =?UTF-8?q?emm=20=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/IcEpidemicSpecialAttentionDao.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml index 67f80a3905..f0c645f1b2 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml @@ -24,7 +24,7 @@ a.MOBILE, a.ID_CARD, a.REMARK, - IFNULL((SELECT DATE_FORMAT(CREATED_TIME,'%Y-%m-%d %H:%i:%s') FROM ic_notice WHERE DEL_FLAG = '0' AND ORIGIN = '1' AND ID_CARD = #{idCard} ORDER BY CREATED_TIME LIMIT 1),'') AS lastInformTime, + IFNULL((SELECT DATE_FORMAT(CREATED_TIME,'%Y-%m-%d %H:%i:%s') FROM ic_notice WHERE DEL_FLAG = '0' AND ORIGIN = #{attentionType} AND ID_CARD = a.ID_CARD ORDER BY CREATED_TIME DESC LIMIT 1),'') AS lastInformTime, COUNT(v.ID) AS vaccinationCount FROM ic_epidemic_special_attention a LEFT JOIN ic_resi_vaccine v ON (v.ID_CARD = a.ID_CARD AND v.DEL_FLAG = '0') @@ -54,7 +54,7 @@ a.ID_CARD, a.REMARK, a.REASON, - IFNULL((SELECT DATE_FORMAT(CREATED_TIME,'%Y-%m-%d %H:%i:%s') FROM ic_notice WHERE DEL_FLAG = '0' AND ORIGIN = '1' AND ID_CARD = #{idCard} ORDER BY CREATED_TIME LIMIT 1),'') AS lastInformTime + IFNULL((SELECT DATE_FORMAT(CREATED_TIME,'%Y-%m-%d %H:%i:%s') FROM ic_notice WHERE DEL_FLAG = '0' AND ORIGIN = #{attentionType} AND ID_CARD = a.ID_CARD ORDER BY CREATED_TIME DESC LIMIT 1),'') AS lastInformTime FROM ic_epidemic_special_attention a WHERE a.DEL_FLAG = 0 AND a.ORG_ID = #{orgId} From 81a89a7211c725b8958f11c26a9b2fc447b201b0 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 30 Mar 2022 15:39:17 +0800 Subject: [PATCH 18/31] =?UTF-8?q?=E6=9D=A5=E8=87=AA=E5=9C=B0=E5=8C=BA?= =?UTF-8?q?=E7=BC=96=E7=A0=81=E3=80=81=E7=8E=B0=E5=B1=85=E5=9C=B0=E7=BC=96?= =?UTF-8?q?=E7=A0=81=E5=8F=AF=E7=A9=BA=E3=80=82/epmetuser/icresiuser/deman?= =?UTF-8?q?dusers=E8=BF=94=E5=9B=9EhouseId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/result/HouseInfoDTO.java | 6 ++++++ .../java/com/epmet/controller/HouseController.java | 12 ++++++++++++ .../main/java/com/epmet/service/HouseService.java | 3 ++- .../com/epmet/service/impl/HouseServiceImpl.java | 14 ++++++++++++++ .../src/main/resources/mapper/IcHouseDao.xml | 3 ++- .../com/epmet/dto/form/IcTripReportFormDTO.java | 4 ++-- .../com/epmet/dto/result/DemandUserResDTO.java | 1 + .../migration/V0.0.31__modifty_trip_reportv2.sql | 2 ++ .../src/main/resources/mapper/IcResiUserDao.xml | 3 ++- 9 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.31__modifty_trip_reportv2.sql diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseInfoDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseInfoDTO.java index 3a3ca19096..087970e1ea 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseInfoDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseInfoDTO.java @@ -78,4 +78,10 @@ public class HouseInfoDTO implements Serializable { private String allName; private String customerId; + + private String agencyId; + /** + * eg:市北区-阜新路街道-南宁社区 + */ + private String agencyPathName; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java index ab86eb425b..9aac6abbd4 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java @@ -291,4 +291,16 @@ public class HouseController implements ResultDataResolver { return new Result(); } + /** + * 获取房屋信息 + * @param houseId + * @return + */ + @PostMapping("gethouseinfo/{houseId}") + public Result getHouseInfo(@LoginUser TokenDto tokenDto,@PathVariable("houseId") String houseId){ + if(StringUtils.isBlank(houseId)){ + return new Result<>(); + } + return new Result().ok(houseService.getHouseInfoDTO(tokenDto.getCustomerId(),houseId)); + } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java index 74d38894e4..a651ed1615 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java @@ -26,7 +26,6 @@ import com.epmet.dto.result.HouseInfoDTO; import com.epmet.dto.result.IcNeighborHoodResultDTO; import com.epmet.dto.result.ImportTaskCommonResultDTO; import com.epmet.excel.IcHouseExcel; -import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; import java.io.InputStream; @@ -78,4 +77,6 @@ public interface HouseService { * @date 2022/3/1 4:57 下午 */ void allDelete(NeighborHoodManageDelFormDTO formDTO); + + HouseInfoDTO getHouseInfoDTO(String customerId,String houseId); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java index 36ace6672d..594e5dda67 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java @@ -13,7 +13,9 @@ import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.feign.ResultDataResolver; +import com.epmet.commons.tools.redis.common.CustomerOrgRedis; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; +import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.CustomerGridConstant; @@ -455,4 +457,16 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { } } } + + @Override + public HouseInfoDTO getHouseInfoDTO(String customerId, String houseId) { + HouseInfoDTO houseInfo = icHouseRedis.getHouseInfo(houseId, customerId); + if (null != houseInfo && StringUtils.isNotBlank(houseInfo.getAgencyId())) { + AgencyInfoCache agencyInfoCache = CustomerOrgRedis.getAgencyInfo(houseInfo.getAgencyId()); + houseInfo.setAgencyPathName(agencyInfoCache.getAllParentName().concat(StrConstant.HYPHEN).concat(agencyInfoCache.getOrganizationName())); + } else { + houseInfo.setAgencyPathName(StrConstant.EPMETY_STR); + } + return houseInfo; + } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml index b8f3bfef66..f5476ed398 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml @@ -368,7 +368,8 @@ IFNULL(ib.LONGITUDE,'') as buildingLongitude, IFNULL(ib.LATITUDE,'') as buildingLatitude, ih.CUSTOMER_ID AS customerId, - concat(IFNULL(n.NEIGHBOR_HOOD_NAME,''),IFNULL(ib.BUILDING_NAME,''),IFNULL(u.UNIT_NAME,''),IFNULL(ih.HOUSE_NAME,'')) AS allName + concat(IFNULL(n.NEIGHBOR_HOOD_NAME,''),IFNULL(ib.BUILDING_NAME,''),IFNULL(u.UNIT_NAME,''),IFNULL(ih.HOUSE_NAME,'')) AS allName, + n.AGENCY_ID as agencyId FROM ic_house ih left JOIN ic_neighbor_hood n ON ( ih.NEIGHBOR_HOOD_ID = n.id AND n.DEL_FLAG = '0') left JOIN ic_building ib ON ( ih.BUILDING_ID = ib.id AND ib.DEL_FLAG = '0') diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcTripReportFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcTripReportFormDTO.java index f8d6f90ef7..9c085f2e07 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcTripReportFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcTripReportFormDTO.java @@ -68,7 +68,7 @@ public class IcTripReportFormDTO implements Serializable { /** * 现居地编码 */ - @NotBlank(message = "现居地编码不能为空", groups = {ResiUserRequired.class,PcAddRequired.class,PcUpdateRequired.class}) + @NotBlank(message = "现居地编码不能为空", groups = {ResiUserRequired.class}) private String presentAddressCode; /** @@ -86,7 +86,7 @@ public class IcTripReportFormDTO implements Serializable { /** * 来源地区编码 */ - @NotBlank(message = "来自地区编码不能为空", groups = {ResiUserRequired.class,PcAddRequired.class,PcUpdateRequired.class}) + @NotBlank(message = "来自地区编码不能为空", groups = {ResiUserRequired.class}) private String sourceAddressCode; /** diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/DemandUserResDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/DemandUserResDTO.java index 19b5c8c792..73b7d77ca6 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/DemandUserResDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/DemandUserResDTO.java @@ -13,4 +13,5 @@ public class DemandUserResDTO implements Serializable { private String gridId; private String idCard; private String agencyId; + private String houseId; } diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.31__modifty_trip_reportv2.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.31__modifty_trip_reportv2.sql new file mode 100644 index 0000000000..a7e6ad6382 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.31__modifty_trip_reportv2.sql @@ -0,0 +1,2 @@ +alter table ic_trip_report_record MODIFY COLUMN PRESENT_ADDRESS_CODE VARCHAR(32) COMMENT '现居地编码'; +alter table ic_trip_report_record MODIFY COLUMN SOURCE_ADDRESS_CODE VARCHAR(32) COMMENT '来源地区编码'; \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml index c68d4e504e..60b7cce24b 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml @@ -302,7 +302,8 @@ concat(ir.`NAME`,'(',ir.MOBILE,')')as label, ir.grid_id as gridId, ir.ID_CARD as idCard, - ir.AGENCY_ID as agencyId + ir.AGENCY_ID as agencyId, + ir.HOME_ID as houseId FROM ic_resi_user ir WHERE From 09d8095a8de4eacca1a4a9fa9cb8b00687191c65 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 30 Mar 2022 15:39:36 +0800 Subject: [PATCH 19/31] =?UTF-8?q?emm=20=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IcEpidemicSpecialAttentionController.java | 25 ++++++++++++ .../java/com/epmet/excel/NatImportExcel.java | 30 ++++++++++++++ .../epmet/excel/VaccinationImportExcel.java | 27 +++++++++++++ ...IcEpidemicSpecialAttentionServiceImpl.java | 38 +++++++++--------- .../excel/attention_nat_template.xlsx | Bin 0 -> 8687 bytes .../excel/attention_vaccination_template.xlsx | Bin 0 -> 8691 bytes .../mapper/IcEpidemicSpecialAttentionDao.xml | 4 +- 7 files changed, 104 insertions(+), 20 deletions(-) create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/excel/NatImportExcel.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/excel/VaccinationImportExcel.java create mode 100644 epmet-user/epmet-user-server/src/main/resources/excel/attention_nat_template.xlsx create mode 100644 epmet-user/epmet-user-server/src/main/resources/excel/attention_vaccination_template.xlsx diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicSpecialAttentionController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicSpecialAttentionController.java index 8a2cd30ea8..1017075ac6 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicSpecialAttentionController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicSpecialAttentionController.java @@ -1,5 +1,6 @@ package com.epmet.controller; +import cn.afterturn.easypoi.excel.entity.TemplateExportParams; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.constant.NumConstant; @@ -7,6 +8,7 @@ import com.epmet.commons.tools.dto.form.PageFormDTO; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.ExcelPoiUtils; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; @@ -15,7 +17,9 @@ import com.epmet.dto.IcEpidemicSpecialAttentionDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.ImportTaskCommonResultDTO; import com.epmet.excel.NatExportExcel; +import com.epmet.excel.NatImportExcel; import com.epmet.excel.VaccinationExportExcel; +import com.epmet.excel.VaccinationImportExcel; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; import com.epmet.service.IcEpidemicSpecialAttentionService; import lombok.extern.slf4j.Slf4j; @@ -26,6 +30,9 @@ import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; import java.io.InputStream; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; /** @@ -173,4 +180,22 @@ public class IcEpidemicSpecialAttentionController { } + @PostMapping("export-template") + public void exportTemplate(HttpServletResponse response, @RequestBody VaccinationListFormDTO formDTO) throws Exception { + TemplateExportParams templatePath = new TemplateExportParams(); + String fileName = ""; + Map map = new HashMap<>(); + // 关注类型,核酸检测:2,疫苗接种:1,行程上报:0 + if (formDTO.getAttentionType().equals(NumConstant.ONE)){ + templatePath.setTemplateUrl("excel/attention_vaccination_template.xlsx"); + fileName = "疫苗接种关注名单导入模板"; + map.put("maplist",new ArrayList()); + }else if (formDTO.getAttentionType().equals(NumConstant.TWO)){ + templatePath.setTemplateUrl("excel/attention_nat_template.xlsx"); + fileName = "核酸检测关注名单导入模板"; + map.put("maplist",new ArrayList()); + } + ExcelPoiUtils.exportExcel(templatePath ,map,fileName,response); + } + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/NatImportExcel.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/NatImportExcel.java new file mode 100644 index 0000000000..e332fe88df --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/NatImportExcel.java @@ -0,0 +1,30 @@ +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import com.epmet.commons.tools.utils.ExcelVerifyInfo; +import lombok.Data; + +/** + * @Author zxc + * @DateTime 2022/3/29 10:24 + * @DESC + */ +@Data +public class NatImportExcel extends ExcelVerifyInfo { + + @Excel(name = "姓名") + private String name; + + @Excel(name = "电话") + private String mobile; + + @Excel(name = "身份证") + private String idCard; + + @Excel(name = "备注") + private String remark; + + @Excel(name = "关注原因") + private String reason; + +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/VaccinationImportExcel.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/VaccinationImportExcel.java new file mode 100644 index 0000000000..b7349e4d03 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/VaccinationImportExcel.java @@ -0,0 +1,27 @@ +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import com.epmet.commons.tools.utils.ExcelVerifyInfo; +import lombok.Data; + +/** + * @Author zxc + * @DateTime 2022/3/29 10:24 + * @DESC + */ +@Data +public class VaccinationImportExcel extends ExcelVerifyInfo { + + @Excel(name = "姓名") + private String name; + + @Excel(name = "电话") + private String mobile; + + @Excel(name = "身份证") + private String idCard; + + @Excel(name = "备注") + private String remark; + +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java index ada415e5d3..83d2ed51cf 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java @@ -316,26 +316,28 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl groupByIdCard = list.stream().collect(Collectors.groupingBy(ImportEpidemicSpecialAttention::getIdCard, Collectors.counting())); - groupByIdCard.forEach((idCard,count) -> { - if (Integer.valueOf(count.toString()).compareTo(1) != 0){ - for (ImportEpidemicSpecialAttention i : list) { - if (idCard.equals(i.getIdCard()) && !i.getAddStatus()){ - errorInfo.add(getErrorInfo(i,"数据重复",i.getNum())); - i.setAddStatus(true); + if (list.size() > errorInfo.size()){ + Map groupByIdCard = list.stream().collect(Collectors.groupingBy(ImportEpidemicSpecialAttention::getIdCard, Collectors.counting())); + groupByIdCard.forEach((idCard,count) -> { + if (Integer.valueOf(count.toString()).compareTo(1) != 0){ + for (ImportEpidemicSpecialAttention i : list) { + if (idCard.equals(i.getIdCard()) && !i.getAddStatus()){ + errorInfo.add(getErrorInfo(i,"数据重复",i.getNum())); + i.setAddStatus(true); + } } } - } - }); - List idCards = list.stream().map(m -> m.getIdCard()).collect(Collectors.toList()); - List existList = baseDao.getExistList(attentionType, idCards); - if (CollectionUtils.isNotEmpty(existList)){ - for (String s : existList) { - for (int i = NumConstant.ZERO; i < list.size(); i++) { - if (s.equals(list.get(i).getIdCard()) && !list.get(i).getAddStatus()){ - errorInfo.add(getErrorInfo(list.get(i),"数据已存在",list.get(i).getNum())); - list.get(i).setAddStatus(true); - continue; + }); + List idCards = list.stream().map(m -> m.getIdCard()).collect(Collectors.toList()); + List existList = baseDao.getExistList(attentionType, idCards); + if (CollectionUtils.isNotEmpty(existList)){ + for (String s : existList) { + for (int i = NumConstant.ZERO; i < list.size(); i++) { + if (s.equals(list.get(i).getIdCard()) && !list.get(i).getAddStatus()){ + errorInfo.add(getErrorInfo(list.get(i),"数据已存在",list.get(i).getNum())); + list.get(i).setAddStatus(true); + continue; + } } } } diff --git a/epmet-user/epmet-user-server/src/main/resources/excel/attention_nat_template.xlsx b/epmet-user/epmet-user-server/src/main/resources/excel/attention_nat_template.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..1ef3866f47ab3a671c92e9d54a8eedd98caedc6e GIT binary patch literal 8687 zcma)i1ymGV^Y_vqAR!^$uylifbax|-q;xDu2#9odH-dmPNK1EjgCO1A&9~_PeS99? zINv>IjCwf4J$pV5(~9g01uqzdjeLQ z*=8B^sEy%kdIkrQOE~LO84rFD$3kwJ28Zp#?n@5 zTn*}JVPQZ7pe(h81#zwxyaU7eh4WGoR5&hVASUIiL+GYS2u!7)n4evRtOLysUZCA6 ztx16t?W?lw90+gABx8Rh4)`1&&}t*1nR!a(<%7|0LUmfRJ8@fGR3*Ya0P=p#yuz)ruY%bD zIjO>p_sca~Z#ZwRtdC&+iSAp23lmB(y7XXl(f*FEp$*9R5#HFyKDjm~RM88GTj5pr z<<~$OwI~Jw9Zw$-G)$hpv>dD>;VKe(z3}J?5_k@}u8YB=)I`wx2&+?wNrWPr7z*kj z0pXYo!{@k;}rTbu>HAND%r&qXG?VtA(g-b>8zNB@C z9%GXNdiw1su_dQ`e5m@Ku4F)9Aw~Hfii_7XJG^6#^TeA&OAG3i7gFee*`78}uwkEt zLciE|Us!n>D-8QfGmbJVyuzY!!wHiBq}FC^u10so($RmI7SLkb6)nrn7WMgGF7@UvbBZwfWGBq* z&$^OZkNnV-SdwdDpkF6xefI+UMCmP3qf@&;?3mNmuCSCHKk-NSSJT1lc9wUT4+bSouP;Py+0ymxmhPrEBxT=4ONqgC~==9ajUv&RtQJh(ntax-;308WaPVvoX z0TbkqUyMRosskduN6_d5P#+(;YsDza1nP?v>#T6&W}7%_@+^r7dMNb>50xmCd?{Su zg?-Z1cWr4pFPluCbX_S7o)5E27`4wIXbt8imw{v{2Zdw#Z(bBSq_hl2ajEr(@}c5W z5DE0%X5^Nmt+(Hq1W@EcNh#!Y%)3YSukhwHKaeimxK0I};+EBjA{C?cX|*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FK%tphyySoI~GPUwo=|2vld$0GhGI5&>6-|RoZ`1J`+?5F$F ziv4Z&_YD3Qx>lWx2t9{^ErFxnj$_eGVxRPSvZhPlgBa8JS{Ok~Yp2y`_I=jOa!Jxb z$P8*bq!^fAXgr*FO>Sk(s9?fLi9mnDHUZW8>hLu~R+#NkT_h-Cltcy1;b9%Yj3z*O zq6VDG5!NKj5MQsBeA>XCDiR!OM}_GeAeyK3dJ4}r`dz}-FxUOLpVLa=#iGF6Ermj; z%&_jCV^qljO&q}Wb zQ;%u6ft=p)@3IB;k9REyVl>tfWFixblO_7+8lZCTau-U>2ojP`GSHKQlz|@5 ztlHpJqenMZjGEBx0Y!LIC6ZJ;4lz}rG!-YHxPvm@HN>NgLmo&@^k(h$?_0R(Tcnqj zQnV1+aCtgZXl1A~)X(0pkp>8=@z`P1m86CvMFEK8lv`bX`YGALqN{GQ&TRX!n*<)` z1i5Xxx7Qs+XNPMEGGQ>az)7<;oH*fn3&@2OwW-F;oQ)R(1hC30YJS?zf)IltSp z_M7*_tN&}o{4?mw67=lzJLtE+e10vN{}t?cP5y4r!JgaSH0giFd#Or48~=_+@prfX z)2LrU^ip;G;~o5z(tid0mj?UN{iVG4$9?{(Wc+deOKkjKgMJp=ez)gA!#$~HPxa=1 zIs6l)lcx&xSAlx@qAx4ibDZBOVd4DE?ceI!%YI&-VgB@Ej`^#fe>>5FD2-o8S+vK`V(>d?{0sTp_i}x@(A;%1KlTG^C|A%Vf$Y% z{j8Y&ZqGAJ^LvJ$o&VBL|M})G71U?n-?OIvZ@z!@R0V0sUyBv_>3;;!Pj*vy&wl?8 D>6X_X literal 0 HcmV?d00001 diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml index f0c645f1b2..f63c49b783 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml @@ -25,9 +25,9 @@ a.ID_CARD, a.REMARK, IFNULL((SELECT DATE_FORMAT(CREATED_TIME,'%Y-%m-%d %H:%i:%s') FROM ic_notice WHERE DEL_FLAG = '0' AND ORIGIN = #{attentionType} AND ID_CARD = a.ID_CARD ORDER BY CREATED_TIME DESC LIMIT 1),'') AS lastInformTime, - COUNT(v.ID) AS vaccinationCount + IFNULL(v.vaccinationCount,0) AS vaccinationCount FROM ic_epidemic_special_attention a - LEFT JOIN ic_resi_vaccine v ON (v.ID_CARD = a.ID_CARD AND v.DEL_FLAG = '0') + LEFT JOIN (SELECT id_card ,count(1) AS vaccinationCount FROM ic_resi_vaccine WHERE DEL_FLAG = 0 GROUP BY ID_CARD) v ON (v.ID_CARD = a.ID_CARD) WHERE a.DEL_FLAG = 0 AND a.ORG_ID = #{orgId} AND ATTENTION_TYPE = #{attentionType} From 400038da9798ee772248b76c13da17f911f848fe Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 30 Mar 2022 15:48:25 +0800 Subject: [PATCH 20/31] SOURCE_ADDRESS --- .../main/java/com/epmet/dto/form/PageTripReportFormDTO.java | 5 ++++- .../src/main/resources/mapper/IcTripReportRecordDao.xml | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PageTripReportFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PageTripReportFormDTO.java index b5c4aa2462..af23243c03 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PageTripReportFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PageTripReportFormDTO.java @@ -28,7 +28,10 @@ public class PageTripReportFormDTO extends PageFormDTO implements Serializable { * 来源地区编码 */ private String sourceAddressCode; - + /** + * 来源地区名称 + */ + private String sourceAddress; /** * 来到本地时间 */ diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml index 0e55cceb05..f667e9826d 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml @@ -47,6 +47,9 @@ AND SOURCE_ADDRESS_CODE like concat(#{sourceAddressCode},'%') + + AND SOURCE_ADDRESS like concat('%',#{sourceAddress},'%') + AND ARRIVE_DATE = ]]> #{startDate} From bc4a7d39e60229df99b17f16177b2832af523e1a Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 30 Mar 2022 15:52:50 +0800 Subject: [PATCH 21/31] =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E8=B0=83=E6=95=B4-?= =?UTF-8?q?=E5=BD=95=E5=85=A5=E6=95=B0=E6=8D=AE=E5=90=8C=E4=B8=80=E8=BA=AB?= =?UTF-8?q?=E4=BB=BD=E8=AF=81=E5=8F=B7=E7=9B=B8=E5=90=8C=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E5=8F=AA=E8=83=BD=E5=AD=98=E5=9C=A8=E4=B8=80?= =?UTF-8?q?=E6=9D=A1=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/exception/EpmetErrorCode.java | 1 + .../src/main/java/com/epmet/dao/IcNatDao.java | 7 ++++++ .../epmet/service/impl/IcNatServiceImpl.java | 10 ++++++++ .../db/migration/V0.0.31__update_ic_nat.sql | 3 +++ .../src/main/resources/mapper/IcNatDao.xml | 25 +++++++++++++++++++ 5 files changed, 46 insertions(+) create mode 100644 epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.31__update_ic_nat.sql diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index 4614beb5ba..bf8bcdc86b 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -251,6 +251,7 @@ public enum EpmetErrorCode { ORG_EDIT_FAILED(8920,"编辑失败"), ORG_DEL_FAILED(8921,"删除失败"), NEIGHBORHOOD_DEL_FAILED(8922,""), + IC_NAT_IDCARD_NATTIME(8923,"核酸检测时间已存在相同记录"), //通用错误码 start diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcNatDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcNatDao.java index 97b365bb6f..22afc94f76 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcNatDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcNatDao.java @@ -1,6 +1,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.IcNatDTO; import com.epmet.dto.form.MyNatListFormDTO; import com.epmet.dto.result.MyNatListResultDTO; import com.epmet.dto.result.NatListResultDTO; @@ -42,4 +43,10 @@ public interface IcNatDao extends BaseDao { * @param e */ void insertOrUpdate(IcNatEntity e); + + /** + * @Author sun + * @Description 按条件查询业务数据 + **/ + IcNatDTO getNatDTO(@Param("customerId") String customerId, @Param("icNatId") String icNatId, @Param("idCard") String idCard, @Param("natTime") String natTime); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java index 9efdb959ce..f07bb78df9 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java @@ -89,6 +89,11 @@ public class IcNatServiceImpl extends BaseServiceImpl imp @Override @Transactional(rollbackFor = Exception.class) public void add(AddIcNatFormDTO formDTO) { + //0.先根据身份证号和检查时间校验数据是否存在 + IcNatDTO icNatDTO = baseDao.getNatDTO(formDTO.getCustomerId(), null, formDTO.getIdCard(), DateUtils.format(formDTO.getNatTime(), DateUtils.DATE_TIME_PATTERN_END_WITH_MINUTE)); + if (null != icNatDTO) { + throw new RenException(EpmetErrorCode.IC_NAT_IDCARD_NATTIME.getCode(), EpmetErrorCode.IC_NAT_IDCARD_NATTIME.getMsg()); + } //1.获取所填居民所属组织缓存信息 AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(formDTO.getAgencyId()); if (null == agencyInfo) { @@ -183,6 +188,11 @@ public class IcNatServiceImpl extends BaseServiceImpl imp @Override @Transactional(rollbackFor = Exception.class) public void edit(AddIcNatFormDTO formDTO) { + //0.先根据身份证号和检测时间校验除当前数据是否还存在相同数据 + IcNatDTO icNatDTO = baseDao.getNatDTO(formDTO.getCustomerId(), formDTO.getIcNatId(), formDTO.getIdCard(), DateUtils.format(formDTO.getNatTime(), DateUtils.DATE_TIME_PATTERN_END_WITH_MINUTE)); + if (null != icNatDTO) { + throw new RenException(EpmetErrorCode.IC_NAT_IDCARD_NATTIME.getCode(), EpmetErrorCode.IC_NAT_IDCARD_NATTIME.getMsg()); + } //1.更新核酸记录表数据 IcNatEntity entity = ConvertUtils.sourceToTarget(formDTO, IcNatEntity.class); entity.setId(formDTO.getIcNatId()); diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.31__update_ic_nat.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.31__update_ic_nat.sql new file mode 100644 index 0000000000..30d6bd9ac1 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.31__update_ic_nat.sql @@ -0,0 +1,3 @@ + ALTER TABLE `ic_nat` + DROP INDEX `unq_nat` , + ADD UNIQUE INDEX `unq_nat` (`ID_CARD`, `NAT_TIME`, `AGENCY_ID`) USING BTREE ; \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcNatDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcNatDao.xml index 84e3739081..06cbc05a85 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcNatDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcNatDao.xml @@ -68,6 +68,31 @@ ORDER BY nat_time DESC + + DELETE FROM ic_nat WHERE id = #{icNatId} From cb1fcb38568fe0179b00d09771871eb2f19ae5a4 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Wed, 30 Mar 2022 15:55:54 +0800 Subject: [PATCH 22/31] =?UTF-8?q?=E9=98=B2=E7=96=AB=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IcResiUserDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml index 60b7cce24b..ca26c6bf4e 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml @@ -673,7 +673,7 @@ AND GRID_ID = #{gridId} - AND NEIGHBOR_HOOD_ID = #{neighborId} + AND VILLAGE_ID = #{neighborId} AND BUILD_ID = #{buildingId} From 83df65997d60eef74da002d0cac4c5ca5a7cdfc3 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 30 Mar 2022 16:09:32 +0800 Subject: [PATCH 23/31] =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{V0.0.31__update_ic_nat.sql => V0.0.32__update_ic_nat.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename epmet-user/epmet-user-server/src/main/resources/db/migration/{V0.0.31__update_ic_nat.sql => V0.0.32__update_ic_nat.sql} (100%) diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.31__update_ic_nat.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.32__update_ic_nat.sql similarity index 100% rename from epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.31__update_ic_nat.sql rename to epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.32__update_ic_nat.sql From 132790c43a665b2e31423b820499a84089663d4a Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 30 Mar 2022 16:20:13 +0800 Subject: [PATCH 24/31] gethouseinfo --- .../src/main/java/com/epmet/dto/result/HouseInfoDTO.java | 7 +++++++ .../main/java/com/epmet/service/impl/HouseServiceImpl.java | 4 +++- .../src/main/resources/mapper/IcHouseDao.xml | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseInfoDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseInfoDTO.java index 087970e1ea..ae5a6d07ba 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseInfoDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseInfoDTO.java @@ -79,9 +79,16 @@ public class HouseInfoDTO implements Serializable { private String customerId; + /** + * 小区所在的组织id + */ private String agencyId; /** * eg:市北区-阜新路街道-南宁社区 */ private String agencyPathName; + /** + * 组织的area_code + */ + private String areaCode; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java index 594e5dda67..210f8e8b49 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java @@ -463,9 +463,11 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { HouseInfoDTO houseInfo = icHouseRedis.getHouseInfo(houseId, customerId); if (null != houseInfo && StringUtils.isNotBlank(houseInfo.getAgencyId())) { AgencyInfoCache agencyInfoCache = CustomerOrgRedis.getAgencyInfo(houseInfo.getAgencyId()); - houseInfo.setAgencyPathName(agencyInfoCache.getAllParentName().concat(StrConstant.HYPHEN).concat(agencyInfoCache.getOrganizationName())); + houseInfo.setAgencyPathName(StringUtils.isNotBlank(agencyInfoCache.getAllParentName())?agencyInfoCache.getAllParentName().concat(StrConstant.HYPHEN).concat(agencyInfoCache.getOrganizationName()):agencyInfoCache.getOrganizationName()); + houseInfo.setAreaCode(StringUtils.isNotBlank(agencyInfoCache.getAreaCode())?agencyInfoCache.getAreaCode():StrConstant.EPMETY_STR); } else { houseInfo.setAgencyPathName(StrConstant.EPMETY_STR); + houseInfo.setAreaCode(StrConstant.EPMETY_STR); } return houseInfo; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml index f5476ed398..f3698b35ed 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml @@ -368,7 +368,7 @@ IFNULL(ib.LONGITUDE,'') as buildingLongitude, IFNULL(ib.LATITUDE,'') as buildingLatitude, ih.CUSTOMER_ID AS customerId, - concat(IFNULL(n.NEIGHBOR_HOOD_NAME,''),IFNULL(ib.BUILDING_NAME,''),IFNULL(u.UNIT_NAME,''),IFNULL(ih.HOUSE_NAME,'')) AS allName, + concat(IFNULL(n.NEIGHBOR_HOOD_NAME,''),IFNULL(ib.BUILDING_NAME,''),IFNULL(u.UNIT_NAME,''),IFNULL(ih.DOOR_NAME,'')) AS allName, n.AGENCY_ID as agencyId FROM ic_house ih left JOIN ic_neighbor_hood n ON ( ih.NEIGHBOR_HOOD_ID = n.id AND n.DEL_FLAG = '0') From fc0a9d37e0b465536f3ccbb0cc367959cbcf7947 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 30 Mar 2022 16:43:49 +0800 Subject: [PATCH 25/31] fff --- .../service/impl/IcTripReportRecordServiceImpl.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java index e098beaac6..5c42a0d00e 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java @@ -151,7 +151,7 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl NumConstant.ZERO && StringUtils.isNotBlank(formDTO.getContent())) { - sendNotice(formDTO); + sendNotice(formDTO,agencyInfoCache.getOrganizationName()); } return entity.getId(); } @@ -160,7 +160,7 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl userList = new ArrayList<>(); //注意这里的userId是指的pc平台的居民 @@ -171,7 +171,8 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl NumConstant.ZERO && StringUtils.isNotBlank(formDTO.getContent())) { - sendNotice(formDTO); + sendNotice(formDTO,agencyInfoCache.getOrganizationName()); } return entity.getId(); } From a757870ae2231190f5df119203be4a6f3867eeed Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 30 Mar 2022 16:55:34 +0800 Subject: [PATCH 26/31] =?UTF-8?q?=E9=83=BD=E6=94=B9=E6=88=90=E6=A8=A1?= =?UTF-8?q?=E7=B3=8A=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/IcEpidemicSpecialAttentionDao.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml index f63c49b783..f2757d0b9f 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml @@ -32,13 +32,13 @@ AND a.ORG_ID = #{orgId} AND ATTENTION_TYPE = #{attentionType} - AND a.`NAME` = #{name} + AND a.`NAME` LIKE CONCAT('%',#{name},'%') - AND a.MOBILE = #{mobile} + AND a.MOBILE LIKE CONCAT('%',#{mobile},'%') - AND a.ID_CARD = #{idCard} + AND a.ID_CARD LIKE CONCAT('%',#{idCard},'%') HAVING vaccinationCount = #{vaccinationCount} @@ -60,13 +60,13 @@ AND a.ORG_ID = #{orgId} AND ATTENTION_TYPE = #{attentionType} - AND a.`NAME` = #{name} + AND a.`NAME` LIKE CONCAT('%',#{name},'%') - AND a.MOBILE = #{mobile} + AND a.MOBILE LIKE CONCAT('%',#{mobile},'%') - AND a.ID_CARD = #{idCard} + AND a.ID_CARD LIKE CONCAT('%',#{idCard},'%') AND a.REASON LIKE CONCAT('%',#{reason},'%') From 1d630b952aac651ac086dc64ee8e676fd4f56d76 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Wed, 30 Mar 2022 17:11:54 +0800 Subject: [PATCH 27/31] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/commons/tools/enums/ChannelEnum.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/ChannelEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/ChannelEnum.java index 389338f717..c1305d0e5a 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/ChannelEnum.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/ChannelEnum.java @@ -1,6 +1,6 @@ package com.epmet.commons.tools.enums; -import com.epmet.commons.tools.exception.EpmetErrorCode; +import java.util.Objects; /** * @author Administrator @@ -22,11 +22,11 @@ public enum ChannelEnum { public static String getName(String code) { ChannelEnum[] houseTypeEnums = values(); for (ChannelEnum houseTypeEnum : houseTypeEnums) { - if (houseTypeEnum.getCode() == code) { + if (Objects.equals(houseTypeEnum.getCode(), code)) { return houseTypeEnum.getName(); } } - return EpmetErrorCode.SERVER_ERROR.getMsg(); + return null; } public static String getCode(String name) { From 16eb18ddc6cc8934f4facb466b2bdb822edd387b Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 30 Mar 2022 18:10:17 +0800 Subject: [PATCH 28/31] pathCode --- .../com/epmet/dto/form/AreaCodeFormDTO.java | 9 +++ .../epmet/dto/result/AreaCodeResultDTO.java | 11 +++ .../epmet/controller/AreaCodeController.java | 12 +++ .../main/java/com/epmet/dao/AreaCodeDao.java | 11 +++ .../com/epmet/service/AreaCodeService.java | 4 + .../service/impl/AreaCodeServiceImpl.java | 30 +++++++ .../src/main/resources/mapper/AreaCodeDao.xml | 81 +++++++++++++++++++ .../com/epmet/dto/IcTripReportRecordDTO.java | 12 +++ .../epmet/dto/form/IcTripReportFormDTO.java | 12 +++ .../entity/IcTripReportRecordEntity.java | 10 +++ .../V0.0.33__modify_trip_reportv3.sql | 2 + 11 files changed, 194 insertions(+) create mode 100644 epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/form/AreaCodeFormDTO.java create mode 100644 epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/result/AreaCodeResultDTO.java create mode 100644 epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.33__modify_trip_reportv3.sql diff --git a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/form/AreaCodeFormDTO.java b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/form/AreaCodeFormDTO.java new file mode 100644 index 0000000000..bc88cf3a28 --- /dev/null +++ b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/form/AreaCodeFormDTO.java @@ -0,0 +1,9 @@ +package com.epmet.dto.form; + +import lombok.Data; + +@Data +public class AreaCodeFormDTO { + private String parentAreaCode; + private String parentLevel; +} diff --git a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/result/AreaCodeResultDTO.java b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/result/AreaCodeResultDTO.java new file mode 100644 index 0000000000..7b09f4f020 --- /dev/null +++ b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/result/AreaCodeResultDTO.java @@ -0,0 +1,11 @@ +package com.epmet.dto.result; + +import lombok.Data; + +@Data +public class AreaCodeResultDTO { + private String areaCode; + private String parentCode; + private String areaName; + private String level; +} diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/AreaCodeController.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/AreaCodeController.java index df821f7410..7bf4e537f8 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/AreaCodeController.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/AreaCodeController.java @@ -28,7 +28,9 @@ import com.epmet.dto.AreaCodeDTO; import com.epmet.dto.form.AddAreaCodeDictFormDTO; import com.epmet.dto.form.AddAreaCodeFormDTO; import com.epmet.dto.form.AreaCodeDictFormDTO; +import com.epmet.dto.form.AreaCodeFormDTO; import com.epmet.dto.result.AreaCodeDictResultDTO; +import com.epmet.dto.result.AreaCodeResultDTO; import com.epmet.service.AreaCodeService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -121,4 +123,14 @@ public class AreaCodeController { ValidatorUtils.validateEntity(formDTO); return new Result().ok(areaCodeService.addAreaCode(formDTO)); } + + /** + * 行政地区编码逐级查询 + * @param formDTO + * @return + */ + @PostMapping(value = "nextarea") + public Result> nextArea(@RequestBody AreaCodeFormDTO formDTO){ + return new Result>().ok(areaCodeService.nextArea(formDTO)); + } } \ No newline at end of file diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/AreaCodeDao.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/AreaCodeDao.java index 54b89ee82f..730689599c 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/AreaCodeDao.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/AreaCodeDao.java @@ -19,6 +19,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.AreaCodeDTO; +import com.epmet.dto.result.AreaCodeResultDTO; import com.epmet.entity.AreaCodeEntity; import org.apache.ibatis.annotations.Mapper; @@ -40,4 +41,14 @@ public interface AreaCodeDao extends BaseDao { AreaCodeDTO selectByCityCode(String cityCode); AreaCodeDTO selectMaxCounty(String cityCode); + + List selectProvince(); + + List selectCity(String pCode); + + List selectDistrict(String pCode); + + List selectStreet(String pCode); + + List selectCommunity(String pCode); } \ No newline at end of file diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/AreaCodeService.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/AreaCodeService.java index 99c25ab2f2..e452332fea 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/AreaCodeService.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/AreaCodeService.java @@ -23,7 +23,9 @@ import com.epmet.dto.AreaCodeDTO; import com.epmet.dto.form.AddAreaCodeDictFormDTO; import com.epmet.dto.form.AddAreaCodeFormDTO; import com.epmet.dto.form.AreaCodeDictFormDTO; +import com.epmet.dto.form.AreaCodeFormDTO; import com.epmet.dto.result.AreaCodeDictResultDTO; +import com.epmet.dto.result.AreaCodeResultDTO; import com.epmet.entity.AreaCodeEntity; import java.util.List; @@ -123,4 +125,6 @@ public interface AreaCodeService extends BaseService { * @Date 2021/4/13 14:40 **/ String addAreaCode(AddAreaCodeFormDTO formDTO); + + List nextArea(AreaCodeFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java index 0de5ddac2b..0f2c1861a7 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java @@ -38,7 +38,9 @@ import com.epmet.dto.AreaCodeDTO; import com.epmet.dto.form.AddAreaCodeDictFormDTO; import com.epmet.dto.form.AddAreaCodeFormDTO; import com.epmet.dto.form.AreaCodeDictFormDTO; +import com.epmet.dto.form.AreaCodeFormDTO; import com.epmet.dto.result.AreaCodeDictResultDTO; +import com.epmet.dto.result.AreaCodeResultDTO; import com.epmet.entity.AreaCodeEntity; import com.epmet.redis.AreaCodeRedis; import com.epmet.service.AreaCodeChildService; @@ -688,6 +690,34 @@ public class AreaCodeServiceImpl extends BaseServiceImpl nextArea(AreaCodeFormDTO formDTO) { + if(StringUtils.isBlank(formDTO.getParentAreaCode())&&StringUtils.isBlank(formDTO.getParentLevel())){ + return baseDao.selectProvince(); + } + List list=new ArrayList<>(); + switch (formDTO.getParentLevel()) { + case AreaCodeConstant.PROVINCE: + list = baseDao.selectCity(formDTO.getParentAreaCode()); + break; + case AreaCodeConstant.CITY: + list = baseDao.selectDistrict(formDTO.getParentAreaCode()); + break; + case AreaCodeConstant.DISTRICT: + list = baseDao.selectStreet(formDTO.getParentAreaCode()); + break; + case AreaCodeConstant.STREET: + list = baseDao.selectCommunity(formDTO.getParentAreaCode()); + break; + case AreaCodeConstant.COMMUNITY: + log.info("社区无下级"); + break; + default: + log.warn("parentLevel错误:"+formDTO.getParentLevel()); + } + return list; + } + private String addDistrictAreaCode(String cityCode, String countyName) { AreaCodeDTO city = baseDao.selectByCityCode(cityCode); diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/AreaCodeDao.xml b/epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/AreaCodeDao.xml index 9eaffba75a..a40099f378 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/AreaCodeDao.xml +++ b/epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/AreaCodeDao.xml @@ -27,4 +27,85 @@ order by ac.COUNTY_CODE desc limit 1 + + + + + + + \ No newline at end of file diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java index 0bf1d81e58..47d23549da 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java @@ -93,6 +93,12 @@ public class IcTripReportRecordDTO implements Serializable { @ExcelIgnore private String presentAddressCode; + /** + * 现居地编码路径:"presentAddressPathCode":"37,3702,370203,370203026,370203026002" + */ + @ExcelIgnore + private String presentAddressPathCode; + /** * 现居地名称eg:山东省青岛市黄岛区玫瑰山路社区 */ @@ -113,6 +119,12 @@ public class IcTripReportRecordDTO implements Serializable { @ExcelIgnore private String sourceAddressCode; + /** + * 来源地编码路径: "sourceAddressPathCode": "37,3702,370203,370203026,370203026002" + */ + @ExcelIgnore + private String sourceAddressPathCode; + /** * 来源地区地址 */ diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcTripReportFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcTripReportFormDTO.java index 9c085f2e07..3de314d424 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcTripReportFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcTripReportFormDTO.java @@ -71,6 +71,12 @@ public class IcTripReportFormDTO implements Serializable { @NotBlank(message = "现居地编码不能为空", groups = {ResiUserRequired.class}) private String presentAddressCode; + /** + * 现居地编码路径:"presentAddressPathCode":"37,3702,370203,370203026,370203026002" + */ + @NotBlank(message = "现居地编码不能为空", groups = {ResiUserRequired.class}) + private String presentAddressPathCode; + /** * 现居地名称eg:山东省青岛市黄岛区玫瑰山路社区 */ @@ -89,6 +95,12 @@ public class IcTripReportFormDTO implements Serializable { @NotBlank(message = "来自地区编码不能为空", groups = {ResiUserRequired.class}) private String sourceAddressCode; + /** + * 来源地编码路径: "sourceAddressPathCode": "37,3702,370203,370203026,370203026002" + */ + @NotBlank(message = "来自地区编码不能为空", groups = {ResiUserRequired.class}) + private String sourceAddressPathCode; + /** * 来源地区地址 */ diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcTripReportRecordEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcTripReportRecordEntity.java index 0b7d4fd4fd..f14eb97013 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcTripReportRecordEntity.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcTripReportRecordEntity.java @@ -71,6 +71,11 @@ public class IcTripReportRecordEntity extends BaseEpmetEntity { */ private String presentAddressCode; + /** + * 现居地编码路径:"presentAddressPathCode":"37,3702,370203,370203026,370203026002" + */ + private String presentAddressPathCode; + /** * 现居地名称eg:山东省青岛市黄岛区玫瑰山路社区 */ @@ -86,6 +91,11 @@ public class IcTripReportRecordEntity extends BaseEpmetEntity { */ private String sourceAddressCode; + /** + * 来源地编码路径: "sourceAddressPathCode": "37,3702,370203,370203026,370203026002" + */ + private String sourceAddressPathCode; + /** * 来源地区地址 */ diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.33__modify_trip_reportv3.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.33__modify_trip_reportv3.sql new file mode 100644 index 0000000000..927c2f9a35 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.33__modify_trip_reportv3.sql @@ -0,0 +1,2 @@ +alter table ic_trip_report_record add column PRESENT_ADDRESS_PATH_CODE VARCHAR(255) COMMENT '现居地编码全路径' AFTER PRESENT_ADDRESS_CODE; +alter table ic_trip_report_record add column SOURCE_ADDRESS_PATH_CODE VARCHAR(255) COMMENT '来源地区编码全路径' AFTER SOURCE_ADDRESS_CODE; \ No newline at end of file From 0b6330bec5e1fbf6dd344380bee0bb4453074a05 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 31 Mar 2022 09:15:21 +0800 Subject: [PATCH 29/31] nextarea --- .../src/main/java/com/epmet/dao/AreaCodeDao.java | 9 +++++---- .../java/com/epmet/service/impl/AreaCodeServiceImpl.java | 1 + .../src/main/resources/mapper/AreaCodeDao.xml | 8 ++++---- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/AreaCodeDao.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/AreaCodeDao.java index 730689599c..bfe5c8139e 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/AreaCodeDao.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/AreaCodeDao.java @@ -22,6 +22,7 @@ import com.epmet.dto.AreaCodeDTO; import com.epmet.dto.result.AreaCodeResultDTO; import com.epmet.entity.AreaCodeEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -44,11 +45,11 @@ public interface AreaCodeDao extends BaseDao { List selectProvince(); - List selectCity(String pCode); + List selectCity(@Param("pCode")String pCode); - List selectDistrict(String pCode); + List selectDistrict(@Param("pCode")String pCode); - List selectStreet(String pCode); + List selectStreet(@Param("pCode")String pCode); - List selectCommunity(String pCode); + List selectCommunity(@Param("pCode")String pCode); } \ No newline at end of file diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java index 0f2c1861a7..f300c4bb4e 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java @@ -711,6 +711,7 @@ public class AreaCodeServiceImpl extends BaseServiceImpl - SELECT DISTINCT ac.city_code AS areaCode, ac.city_name AS areaName, @@ -58,7 +58,7 @@ ORDER BY ac.city_code ASC - SELECT DISTINCT ac.county_code AS areaCode, ac.county_name AS areaName, @@ -74,7 +74,7 @@ ORDER BY ac.county_code ASC - SELECT ac.`code` AS areaCode, ac.`name` AS areaName, @@ -91,7 +91,7 @@ ORDER BY ac.`code` ASC - SELECT ac.`code` AS areaCode, ac.`name` AS areaName, From 10e22e375685aa6f7aae48cda9aed1f0f62a0b85 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 31 Mar 2022 09:29:50 +0800 Subject: [PATCH 30/31] =?UTF-8?q?=E8=A1=8C=E7=A8=8B=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../excel/trip_report_import_template.xlsx | Bin 9319 -> 9304 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/resources/excel/trip_report_import_template.xlsx b/epmet-user/epmet-user-server/src/main/resources/excel/trip_report_import_template.xlsx index f13d7ec77d97db25035a97f95e3d4ec74c12d1c0..587ecda2e01dbc2cdc40e208af3d235f159e129e 100644 GIT binary patch delta 4665 zcmZ8lXEfZ6v)zCS|r9HRLdd%mkX|IQ2rL!gWNKZSaGx5&H^3WjWz zPe=?sjJ`d-Kw8x*5#sT6=dM)qBIW(XDb2~s&)pHnk*=xJIY z>`C&wEm?yR*NIo9A4K(lchvRXDG%0tyr3UAa0G&+It|^2ARWApDsS1!!^wRcDFUK_ z@hAdTIcyUP5K8!HH*KR@G$Z+gp zxWo1NKd!R{NM#EeuCc%@wdC0H=12Y8XZ53fL>4M*oESzycx6Wpc<}9 zco3LuV?A>B9Avfw*>wun1GQTGgR9K0oONiw<)0}(U*|xkaN9?R!j)vM(fIP>h6T|& ziqayPDZQd#F#{Brh4f~98&Y+8@B`=))YPW9yHw>ZsrWBp$hy+-q!xSk z9$IGl;B>_1QnTJaZ@87(y*O0mVF4gE&PQX7nUTES#KVt?8`Lx?nray59_Q@i{x>Oew`dIM ze~PQ7eoVwui|%liBqRdvG23N#LXOmBa>dn=KJC4`t#MJ^!5u0g{C2aJCg#B+0dK2) zRa>Xts<+Ud2sCwpcXD0)2`8&Z(NVGOU;0FjLifEx|2QaCO6gdqcxHR>e3DL(UWHtx zQJeMZ#T72vw`bWZYKQE}jFO}t-ewal!f!-Q` zKolSlD9B6L9~JE7>@O7b)N96i-e-Q65nyk)iL!5yCu-uhMQJ~9edk3$*bY+?d)X~X z)U5iAh;Ndss(W9A!>TaYGmGHycV|KJ8qZZ{s+87%J|>jz#h7aHts-YX8m`+uft7RCvyz^}$1i5m4s4GPp8hDGn zuhR%cEfdJAqAFismNz_OG!_^h;NN#}R%6S;kAHbEpgV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ehm?Weje}Yp>EFnL|)(N1pdJ9h3g$S@8tJ-PRE}8k-SE+5&b(%9yD@w;KEx0Rh9~W zlizC=gfB#V3>SzEphZd)2khtjHvbP$O9KQH000080EbTEKu|){H`-CC{t(`_suQnX3yKn&Cb z&{ib{UZ%%M-U1gSK&E4seBtx^&N-isZEfv|-6%Y^TD0yuIwC6=6)dOXR_o5Xjvm~< zC*45>>X}Z}Y`Bi4qo)={YsT$c8l`_;f#*6@M>WrD-j!uqsadv3SKOxMaPrV?*`~*j zt#z3;Tb5a+HOunshOA&*l5Ml@phCrcLrz+7qZ|3FUI`K-2Wmf((?pn?f)s@Y>Rz< zC+0!8$3{blH?EoX>|{Rei%Dvks7jHnuBrqpgRm(SNqVrEMg2F{dqEm&F-H*GXF2e z53{x!uLT0K9+STw6_b1*Dg+uF005IfA{LXtAQ}NaliMJZ1^IPv3oMg!Ayfh7lgJ@J z2NVPV0C;RKlfWY!li&vglP@9)0cMjrA~peylW`&~8&E>iS02BZK00000 z0096X0002Mler=%9Fs<5*lTKmo;*t|L4FHIwTjAskdKTsArb004do000;O0000000031AOHXWVFZ(a1R54l YO9ci10000H01*HO1ONa^AOHXW097x Date: Thu, 31 Mar 2022 09:53:59 +0800 Subject: [PATCH 31/31] =?UTF-8?q?=E5=8F=96=E6=B6=88=E5=85=B3=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/IcEpidemicSpecialAttentionDao.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml index f2757d0b9f..1510da99b8 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml @@ -7,7 +7,8 @@ UPDATE ic_epidemic_special_attention SET UPDATED_TIME = NOW(), - IS_ATTENTION = 0 + IS_ATTENTION = 0, + del_flag = 1 WHERE del_flag = 0 AND attention_type = #{attentionType} AND id_card IN (