From 410dd207f4da38f435cab8575732084c20c25eaf Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 29 Mar 2022 09:28:43 +0800 Subject: [PATCH 1/7] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/UserBadgeServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java index 8854f92192..a808b172e7 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java @@ -279,7 +279,8 @@ public class UserBadgeServiceImpl implements UserBadgeService { userBadgeDao.insertUserBadgeCertificateRecord(form); //TODO 站内信发送 String badgeName = badgeDao.selectBadgeName(form.getCustomerId(), form.getBadgeId()); - String msg = String.format(BadgeConstant.MESSAGE_CONTENT, userBaseInfoResultDTOS.get(NumConstant.ZERO).getDistrict().concat(userBaseInfoResultDTOS.get(NumConstant.ZERO).getRealName()), badgeName); + String s = StringUtils.isBlank(userBaseInfoResultDTOS.get(NumConstant.ZERO).getDistrict()) ? userBaseInfoResultDTOS.get(NumConstant.ZERO).getRealName() : userBaseInfoResultDTOS.get(NumConstant.ZERO).getDistrict().concat(userBaseInfoResultDTOS.get(NumConstant.ZERO).getRealName()); + String msg = String.format(BadgeConstant.MESSAGE_CONTENT, s, badgeName); // 记录待审核id,和消息类型 sendMessage(BadgeConstant.AUTH_TITLE,msg,form.getGridId(),form.getUserId(),form.getCustomerId(), UserMessageTypeConstant.BADGE_AUTH_APPLY, From f0c358fdb9399083c50dd321977e970b5c57aa05 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 29 Mar 2022 10:20:37 +0800 Subject: [PATCH 2/7] update --- .../dto/IcEpidemicSpecialAttentionDTO.java | 25 ++++++++++++++----- .../epmet/dto/form/VaccinationAddFormDTO.java | 2 -- .../IcEpidemicSpecialAttentionController.java | 12 ++++----- ...IcEpidemicSpecialAttentionServiceImpl.java | 13 ++++++++-- 4 files changed, 35 insertions(+), 17 deletions(-) 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 cceed0a556..43a40b0d90 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 @@ -2,6 +2,8 @@ package com.epmet.dto; import java.io.Serializable; import java.util.Date; +import java.util.List; + import lombok.Data; import javax.validation.constraints.NotBlank; @@ -19,7 +21,8 @@ public class IcEpidemicSpecialAttentionDTO implements Serializable { private static final long serialVersionUID = 1L; - public interface IcEpidemicSpecialAttention{} + public interface IcEpidemicSpecialAttentionUpdate{} + public interface IcEpidemicSpecialAttentionAdd{} /** * ID @@ -49,30 +52,30 @@ public class IcEpidemicSpecialAttentionDTO implements Serializable { /** * 是否关注 1:关注,0:取消关注 */ - @NotNull(message = "isAttention不能为空",groups = IcEpidemicSpecialAttention.class) private Integer isAttention; /** * 关注类型,核酸检测:2,疫苗接种:1 */ - private Integer attentionType; + @NotNull(message = "attentionType不能为空",groups = {IcEpidemicSpecialAttentionAdd.class,IcEpidemicSpecialAttentionUpdate.class}) + private Integer attentionType; /** * 姓名 */ - @NotBlank(message = "name不能为空",groups = IcEpidemicSpecialAttention.class) + @NotBlank(message = "name不能为空",groups = IcEpidemicSpecialAttentionAdd.class) private String name; /** * 手机号 */ - @NotBlank(message = "mobile不能为空",groups = IcEpidemicSpecialAttention.class) + @NotBlank(message = "mobile不能为空",groups = IcEpidemicSpecialAttentionAdd.class) private String mobile; /** * 身份证号 */ - @NotBlank(message = "idCard不能为空",groups = IcEpidemicSpecialAttention.class) + @NotBlank(message = "idCard不能为空",groups = {IcEpidemicSpecialAttentionAdd.class,IcEpidemicSpecialAttentionUpdate.class}) private String idCard; /** @@ -115,4 +118,14 @@ public class IcEpidemicSpecialAttentionDTO implements Serializable { */ private Date updatedTime; + /** + * 通知渠道 0小程序通知,1短信通知 + */ + private List channel; + + /** + * 通知内容 + */ + private String content; + } \ No newline at end of file diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VaccinationAddFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VaccinationAddFormDTO.java index 2bc2194083..9206dbac24 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VaccinationAddFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VaccinationAddFormDTO.java @@ -21,8 +21,6 @@ public class VaccinationAddFormDTO implements Serializable { private static final long serialVersionUID = -4786942219804246138L; - public interface VaccinationAddForm{} - @Valid private List list; 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 42fcc20c23..14c48ce05e 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 @@ -6,11 +6,7 @@ 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.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.UpdateGroup; -import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.IcEpidemicSpecialAttentionDTO; import com.epmet.dto.form.*; import com.epmet.service.IcEpidemicSpecialAttentionService; @@ -19,8 +15,6 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; -import java.util.List; -import java.util.Map; /** @@ -58,8 +52,9 @@ public class IcEpidemicSpecialAttentionController { * @date 2022/3/28 13:35 */ @PostMapping("vaccination-add") + @NoRepeatSubmit public Result vaccinationAdd(@RequestBody VaccinationAddFormDTO formDTO,@LoginUser TokenDto tokenDto){ - ValidatorUtils.validateEntity(formDTO, VaccinationAddFormDTO.VaccinationAddForm.class); + ValidatorUtils.validateEntity(formDTO, IcEpidemicSpecialAttentionDTO.IcEpidemicSpecialAttentionAdd.class); formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setUserId(tokenDto.getUserId()); icEpidemicSpecialAttentionService.vaccinationAdd(formDTO); @@ -73,7 +68,9 @@ public class IcEpidemicSpecialAttentionController { * @date 2022/3/28 13:45 */ @PostMapping("vaccination-update") + @NoRepeatSubmit public Result vaccinationUpdate(@RequestBody IcEpidemicSpecialAttentionDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, IcEpidemicSpecialAttentionDTO.IcEpidemicSpecialAttentionUpdate.class); icEpidemicSpecialAttentionService.vaccinationUpdate(formDTO); return new Result(); } @@ -85,6 +82,7 @@ public class IcEpidemicSpecialAttentionController { * @date 2022/3/28 13:51 */ @PostMapping("cancel-attention") + @NoRepeatSubmit public Result cancelAttention(@RequestBody CancelAttentionPackageFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO, CancelAttentionPackageFormDTO.CancelAttentionPackageForm.class); icEpidemicSpecialAttentionService.cancelAttention(formDTO); 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 aac9eceb61..dc72e683ea 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 @@ -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.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; @@ -169,7 +170,6 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl { - e.setIsAttention(NumConstant.ONE); e.setOrgId(agencyInfo.getId()); e.setPid(agencyInfo.getPid()); @@ -189,8 +189,17 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl w = new LambdaQueryWrapper<>(); + IcEpidemicSpecialAttentionEntity e = new IcEpidemicSpecialAttentionEntity(); + w.eq(IcEpidemicSpecialAttentionEntity::getIdCard,formDTO.getIdCard()) + .eq(IcEpidemicSpecialAttentionEntity::getAttentionType,formDTO.getAttentionType()); + e.setMobile(formDTO.getMobile()); + e.setReason(formDTO.getReason()); + e.setRemark(formDTO.getRemark()); + update(e,w); + //TODO 通知 } /** From a1409758c84c6f74fcc7b9d3dcef4d763a847e1e Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 29 Mar 2022 10:53:36 +0800 Subject: [PATCH 3/7] export --- .../IcEpidemicSpecialAttentionController.java | 19 ++++++++-- .../java/com/epmet/excel/NatExportExcel.java | 35 +++++++++++++++++++ .../epmet/excel/VaccinationExportExcel.java | 35 +++++++++++++++++++ 3 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/excel/NatExportExcel.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/excel/VaccinationExportExcel.java 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 14c48ce05e..a995ff482f 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 @@ -2,13 +2,19 @@ package com.epmet.controller; 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.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.dto.IcEpidemicSpecialAttentionDTO; import com.epmet.dto.form.*; +import com.epmet.excel.NatExportExcel; +import com.epmet.excel.UserResiRegisterVisitExcel; +import com.epmet.excel.VaccinationExportExcel; import com.epmet.service.IcEpidemicSpecialAttentionService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -102,7 +108,7 @@ public class IcEpidemicSpecialAttentionController { } /** - * Desc: 【疫苗接种关注名单】导出 + * Desc: 【疫苗接种关注名单,核酸检测关注名单】导出 * @param response * @param formDTO * @param tokenDto @@ -110,10 +116,19 @@ public class IcEpidemicSpecialAttentionController { * @date 2022/3/28 13:57 */ @PostMapping("vaccination-export") - public void vaccinationExport(HttpServletResponse response,@RequestBody VaccinationListFormDTO formDTO, @LoginUser TokenDto tokenDto){ + public void vaccinationExport(HttpServletResponse response,@RequestBody VaccinationListFormDTO formDTO, @LoginUser TokenDto tokenDto) throws Exception { ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class); formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setUserId(tokenDto.getUserId()); + formDTO.setPage(false); + PageData pageData = icEpidemicSpecialAttentionService.vaccinationList(formDTO); + // 关注类型,核酸检测:2,疫苗接种:1 + if (formDTO.getAttentionType().equals(NumConstant.ONE)){ + ExcelUtils.exportExcelToTarget(response, null, pageData.getList(), VaccinationExportExcel.class); + }else { + ExcelUtils.exportExcelToTarget(response, null, pageData.getList(), NatExportExcel.class); + } + } /** diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/NatExportExcel.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/NatExportExcel.java new file mode 100644 index 0000000000..cc3d827af0 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/NatExportExcel.java @@ -0,0 +1,35 @@ +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +/** + * @Author zxc + * @DateTime 2022/3/29 10:24 + * @DESC + */ +@Data +public class NatExportExcel { + + @Excel(name = "排序",width = 10) + private Integer sort; + + @Excel(name = "姓名",width = 20) + private String name; + + @Excel(name = "电话",width = 20) + private String mobile; + + @Excel(name = "身份证",width = 30) + private String idCard; + + @Excel(name = "备注",width = 40) + private String remark; + + @Excel(name = "关注原因",width = 40) + private String reason; + + @Excel(name = "最近一次通知时间",width = 20) + private String lastInformTime; + +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/VaccinationExportExcel.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/VaccinationExportExcel.java new file mode 100644 index 0000000000..65534756cd --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/VaccinationExportExcel.java @@ -0,0 +1,35 @@ +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +/** + * @Author zxc + * @DateTime 2022/3/29 10:24 + * @DESC + */ +@Data +public class VaccinationExportExcel { + + @Excel(name = "排序",width = 10) + private Integer sort; + + @Excel(name = "姓名",width = 20) + private String name; + + @Excel(name = "电话",width = 20) + private String mobile; + + @Excel(name = "身份证",width = 30) + private String idCard; + + @Excel(name = "备注",width = 40) + private String remark; + + @Excel(name = "接种针次",width = 10) + private Integer vaccinationCount; + + @Excel(name = "最近一次通知时间",width = 20) + private String lastInformTime; + +} From c6f48c7461b08b4754f63fd34d64de9130b00320 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 29 Mar 2022 10:56:08 +0800 Subject: [PATCH 4/7] export --- .../IcEpidemicSpecialAttentionController.java | 17 ----------------- 1 file changed, 17 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 a995ff482f..ad948c1999 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 @@ -143,21 +143,4 @@ public class IcEpidemicSpecialAttentionController { return new Result(); } - /** - * Desc: 【核酸检测关注名单】导出 - * @param response - * @param formDTO - * @param tokenDto - * @author zxc - * @date 2022/3/28 13:59 - */ - @PostMapping("nat-export") - public void natExport(HttpServletResponse response,@RequestBody NatListFormDTO formDTO,@LoginUser TokenDto tokenDto){ - ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class); - formDTO.setCustomerId(tokenDto.getCustomerId()); - formDTO.setUserId(tokenDto.getUserId()); - - } - - } From 50c39d2cf29306c77db8469938b2c25a87656c38 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 29 Mar 2022 11:14:14 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IcEpidemicSpecialAttentionController.java | 16 ++-------------- 1 file changed, 2 insertions(+), 14 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 ad948c1999..8035d509b3 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 @@ -96,13 +96,13 @@ public class IcEpidemicSpecialAttentionController { } /** - * Desc: 【疫苗接种关注名单】导入 + * Desc: 【疫苗接种关注名单,核酸检测关注名单】导入 * @param * @author zxc * @date 2022/3/28 13:40 */ @PostMapping("vaccination-import") - public Result vaccinationImport(@LoginUser TokenDto tokenDTO, @RequestParam("file") MultipartFile file){ + public Result vaccinationImport(@LoginUser TokenDto tokenDTO, @RequestParam("file") MultipartFile file,@RequestParam("attentionType")Integer attentionType){ return new Result(); } @@ -131,16 +131,4 @@ public class IcEpidemicSpecialAttentionController { } - /** - * Desc: 【核酸检测关注名单】导入 - * @param - * @author zxc - * @date 2022/3/28 13:40 - */ - @PostMapping("nat-import") - public Result natImport(@LoginUser TokenDto tokenDTO, @RequestParam("file") MultipartFile file){ - - return new Result(); - } - } From bf070bc979279110dc65464407db8e5917e07db2 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 29 Mar 2022 13:34:14 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E5=B1=85=E6=B0=91?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E7=99=BB=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/IcResiCollectFormDTO.java | 4 +- .../dto/form/IcResiCollectMemFormDTO.java | 10 +- .../dto/form/LatestSubmitCollectFormDTO.java | 22 ++++ .../epmet/dto/form/ResiCollectFormDTO.java | 105 ++++++++++++++++++ .../epmet/dto/result/LatestCollectResDTO.java | 82 ++++++++++++++ .../controller/IcResiCollectController.java | 32 ++++++ .../java/com/epmet/dao/IcResiCollectDao.java | 10 +- .../java/com/epmet/dao/IcResiMemberDao.java | 7 +- .../epmet/service/IcResiCollectService.java | 17 ++- .../impl/IcResiCollectServiceImpl.java | 93 +++++++++++++++- .../resources/mapper/IcResiCollectDao.xml | 32 +++++- .../main/resources/mapper/IcResiMemberDao.xml | 17 ++- 12 files changed, 414 insertions(+), 17 deletions(-) create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/LatestSubmitCollectFormDTO.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ResiCollectFormDTO.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/LatestCollectResDTO.java diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiCollectFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiCollectFormDTO.java index 21f2244129..9acd851ab3 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiCollectFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiCollectFormDTO.java @@ -82,9 +82,9 @@ public class IcResiCollectFormDTO implements Serializable { private String address; /** - * 1自由0租住 + * 1自有0租住 */ - @NotBlank(message = "房子属于自由还是组织?", groups = {InternalShowGroup.class, ExternalShowGroup.class}) + @NotBlank(message = "房子属于自有还是租住?", groups = {InternalShowGroup.class, ExternalShowGroup.class}) private String houseType; /** diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiCollectMemFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiCollectMemFormDTO.java index 2dccf23b59..a3fca9b02b 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiCollectMemFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiCollectMemFormDTO.java @@ -2,6 +2,7 @@ package com.epmet.dto.form; import lombok.Data; +import javax.validation.constraints.NotBlank; import java.io.Serializable; /** @@ -17,13 +18,13 @@ public class IcResiCollectMemFormDTO implements Serializable { /** * 居住成员1姓名 */ - // @NotBlank(message = "姓名不能为空", groups = {IcResiCollectFormDTO.InternalShowGroup.class, IcResiCollectFormDTO.ExternalShowGroup.class}) + @NotBlank(message = "姓名不能为空", groups = {ResiCollectFormDTO.InternalShowGroup.class, IcResiCollectFormDTO.ExternalShowGroup.class}) private String name; /** * 居住成员1身份证号 */ - // @NotBlank(message = "身份证号不能为空", groups = {IcResiCollectFormDTO.InternalShowGroup.class, IcResiCollectFormDTO.ExternalShowGroup.class}) + @NotBlank(message = "身份证号不能为空", groups = {ResiCollectFormDTO.InternalShowGroup.class, IcResiCollectFormDTO.ExternalShowGroup.class}) private String idNum; /** @@ -43,4 +44,9 @@ public class IcResiCollectMemFormDTO implements Serializable { */ // @NotNull(message = "疫苗接种情况不能为空", groups = {IcResiCollectFormDTO.InternalShowGroup.class, IcResiCollectFormDTO.ExternalShowGroup.class}) private Integer ymjz; + + /** + * 社区居民信息登记-查询返参用 + */ + private String id; } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/LatestSubmitCollectFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/LatestSubmitCollectFormDTO.java new file mode 100644 index 0000000000..547e469085 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/LatestSubmitCollectFormDTO.java @@ -0,0 +1,22 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 社区居民信息登记-查询 + */ +@Data +public class LatestSubmitCollectFormDTO implements Serializable { + public interface AddUserInternalGroup { + } + + @NotBlank(message = "userId不能为空", groups = AddUserInternalGroup.class) + private String userId; + @NotBlank(message = "customerId不能为空", groups = AddUserInternalGroup.class) + private String customerId; + @NotBlank(message = "gridId不能为空", groups = AddUserInternalGroup.class) + private String gridId; +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ResiCollectFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ResiCollectFormDTO.java new file mode 100644 index 0000000000..fdd712970f --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ResiCollectFormDTO.java @@ -0,0 +1,105 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.Valid; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.List; + +/** + * 社区居民信息登记-提交 入参 + */ +@Data +public class ResiCollectFormDTO implements Serializable { + + private static final long serialVersionUID = -4026681095438180447L; + + public interface AddUserInternalGroup { + } + + public interface InternalShowGroup extends CustomerClientShowGroup { + } + + /** + * 客户Id customer.id + */ + @NotBlank(message = "customerId不能为空", groups = AddUserInternalGroup.class) + private String customerId; + + /** + * 网格ID_后端接口赋值 + */ + @NotBlank(message = "gridId不能为空", groups = AddUserInternalGroup.class) + private String gridId; + + /** + * 组织Id_后端接口赋值 + */ + @NotBlank(message = "agencyId不能为空", groups = AddUserInternalGroup.class) + private String agencyId; + + /** + * 组织的pid_后端接口赋值 + */ + private String pids; + + /** + * 所属小区ID + */ + @NotBlank(message = "小区不能为空", groups = InternalShowGroup.class) + private String villageId; + + /** + * 所属楼宇Id + */ + @NotBlank(message = "楼栋不能为空", groups = InternalShowGroup.class) + private String buildId; + + /** + * 单元id + */ + @NotBlank(message = "单元不能为空", groups = InternalShowGroup.class) + private String unitId; + + /** + * 所属家庭Id + */ + @NotBlank(message = "家庭不能为空", groups = InternalShowGroup.class) + private String homeId; + + /** + * 详细地址 + */ + @NotBlank(message = "家庭地址不能为空", groups = {InternalShowGroup.class}) + private String address; + + /** + * 1自有0租住 + */ + @NotBlank(message = "房子属于自有还是租住?", groups = {InternalShowGroup.class}) + private String houseType; + + /** + * 户主姓名 + */ + @NotBlank(message = "户主姓名不能为空", groups = {InternalShowGroup.class}) + private String houseHolderName; + + /** + * 居住成员人数 + */ + @NotNull(message = "居住成员人数不能为空", groups = {InternalShowGroup.class}) + private Integer totalResi; + + @Valid + @NotEmpty(message = "成员信息不能为空", groups = {InternalShowGroup.class}) + private List memberList; + + @NotBlank(message = "userId不能为空", groups = AddUserInternalGroup.class) + private String userId; + +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/LatestCollectResDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/LatestCollectResDTO.java new file mode 100644 index 0000000000..f7d698badd --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/LatestCollectResDTO.java @@ -0,0 +1,82 @@ +package com.epmet.dto.result; + +import com.epmet.dto.form.IcResiCollectMemFormDTO; +import lombok.Data; + +import javax.validation.Valid; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * 社区居民信息登记-返参 + */ +@Data +public class LatestCollectResDTO implements Serializable { + private String resiCollectId; + private String agencyId; + private String agencyName; + private String pids; + private String gridId; + private String customerId; + /** + * 所属小区ID + */ + private String villageId; + + /** + * 所属楼宇Id + */ + private String buildId; + + /** + * 单元id + */ + private String unitId; + + /** + * 所属家庭Id + */ + private String homeId; + + /** + * 详细地址 + */ + private String address; + + /** + * 1自有0租住 + */ + private String houseType; + + /** + * 户主姓名 + */ + private String houseHolderName; + + /** + * 居住成员人数 + */ + private Integer totalResi; + + @Valid + private List memberList; + + public LatestCollectResDTO() { + this.resiCollectId = ""; + this.agencyId = ""; + this.agencyName = ""; + this.pids = ""; + this.gridId = ""; + this.customerId = ""; + this.villageId = ""; + this.buildId = ""; + this.unitId=""; + this.homeId=""; + this.address=""; + this.houseType=""; + this.houseHolderName=""; + this.totalResi=0; + this.memberList=new ArrayList<>(); + } +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiCollectController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiCollectController.java index 7b8df6ad1d..ccf831e0aa 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiCollectController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiCollectController.java @@ -11,9 +11,12 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.form.CollectListFormDTO; import com.epmet.dto.form.IcResiCollectFormDTO; +import com.epmet.dto.form.LatestSubmitCollectFormDTO; +import com.epmet.dto.form.ResiCollectFormDTO; import com.epmet.dto.result.CollectListExcelResultDTO; import com.epmet.dto.result.CollectListMemberExcelResultDTO; import com.epmet.dto.result.CollectListResultDTO; +import com.epmet.dto.result.LatestCollectResDTO; import com.epmet.service.IcResiCollectService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; @@ -108,4 +111,33 @@ public class IcResiCollectController { ExcelUtils.exportExcelToTarget(response, null, list, CollectListExcelResultDTO.class); } + /** + * 居民端小程序:社区居民信息登记-提交 + * + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("save-resi") + public Result saveResi(@LoginUser TokenDto tokenDto, @RequestBody ResiCollectFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO, ResiCollectFormDTO.InternalShowGroup.class, ResiCollectFormDTO.AddUserInternalGroup.class); + icResiCollectService.saveResi(formDTO); + return new Result(); + } + + /** + * 居民端小程序:社区居民信息登记-查询 + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("latest-submit") + public Result latestSubmit(@LoginUser TokenDto tokenDto, @RequestBody LatestSubmitCollectFormDTO formDTO){ + formDTO.setUserId(tokenDto.getUserId()); + formDTO.setCustomerId(tokenDto.getCustomerId()); + ValidatorUtils.validateEntity(formDTO,LatestSubmitCollectFormDTO.AddUserInternalGroup.class); + return new Result().ok(icResiCollectService.latestSubmit(formDTO)); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiCollectDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiCollectDao.java index f70f0e04ff..2602b5858a 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiCollectDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiCollectDao.java @@ -23,7 +23,8 @@ public interface IcResiCollectDao extends BaseDao { int updateRec(@Param("id") String id, @Param("houseType") String houseType, @Param("houseHolderName") String houseHolderName, - @Param("totalResi") Integer totalResi); + @Param("totalResi") Integer totalResi, + @Param("updatedBy") String updatedBy); /** * Desc: 查询采集居民信息 @@ -33,4 +34,11 @@ public interface IcResiCollectDao extends BaseDao { */ List getCollectList(CollectListFormDTO formDTO); + /** + * 我上次提交的主表记录 + * @param customerId + * @param userId + * @return + */ + String selectLastSubmitId(@Param("customerId") String customerId, @Param("userId") String userId); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiMemberDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiMemberDao.java index e4748e01b2..e61539e1da 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiMemberDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiMemberDao.java @@ -1,8 +1,12 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.form.IcResiCollectMemFormDTO; import com.epmet.entity.IcResiMemberEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 居民信息成员表 @@ -12,5 +16,6 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcResiMemberDao extends BaseDao { - + + List selectMySubmit(@Param("latestResiCollectId") String latestResiCollectId, @Param("userId")String userId); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiCollectService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiCollectService.java index 4c0bca4fa5..9129b34675 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiCollectService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiCollectService.java @@ -4,11 +4,12 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.form.CollectListFormDTO; import com.epmet.dto.form.IcResiCollectFormDTO; +import com.epmet.dto.form.LatestSubmitCollectFormDTO; +import com.epmet.dto.form.ResiCollectFormDTO; import com.epmet.dto.result.CollectListResultDTO; +import com.epmet.dto.result.LatestCollectResDTO; import com.epmet.entity.IcResiCollectEntity; -import java.util.List; - /** * 居民信息采集表 * @@ -36,4 +37,16 @@ public interface IcResiCollectService extends BaseService { */ PageData getCollectList(CollectListFormDTO formDTO); + /** + * 居民端小程序:社区居民信息登记-提交 + * @param formDTO + */ + void saveResi(ResiCollectFormDTO formDTO); + + /** + * 居民端小程序:社区居民信息登记-查询 + * @param formDTO + * @return + */ + LatestCollectResDTO latestSubmit(LatestSubmitCollectFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiCollectServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiCollectServiceImpl.java index b1895b608a..3343e5c4fc 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiCollectServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiCollectServiceImpl.java @@ -2,26 +2,30 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.page.PageData; +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.redis.common.bean.GridInfoCache; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dao.IcResiCollectDao; import com.epmet.dao.IcResiMemberDao; import com.epmet.dto.IcNeighborHoodDTO; -import com.epmet.dto.form.CollectListFormDTO; -import com.epmet.dto.form.IcResiCollectFormDTO; +import com.epmet.dto.form.*; import com.epmet.dto.result.CollectListResultDTO; +import com.epmet.dto.result.LatestCollectResDTO; import com.epmet.entity.IcResiCollectEntity; import com.epmet.entity.IcResiMemberEntity; import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.service.IcResiCollectService; -import org.apache.commons.collections4.MapUtils; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; +import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -71,7 +75,7 @@ public class IcResiCollectServiceImpl extends BaseServiceImpl newMemberList = ConvertUtils.sourceToTarget(formDTO.getMemberList(), IcResiMemberEntity.class); //查询之前录入的成员表 Map memMap = queryOriginMem(origin.getId()); @@ -145,4 +149,85 @@ public class IcResiCollectServiceImpl extends BaseServiceImpl memberList = ConvertUtils.sourceToTarget(formDTO.getMemberList(), IcResiMemberEntity.class); + memberList.forEach(mem -> { + if (StringUtils.isNotBlank(mem.getName()) || StringUtils.isNotBlank(mem.getIdNum())) { + mem.setCustomerId(formDTO.getCustomerId()); + //姓名或份身份证号不为空时插入 + mem.setIcResiCollectId(insert.getId()); + icResiMemberDao.insert(mem); + } + }); + } else { + //更新主表 + baseDao.updateRec(origin.getId(), formDTO.getHouseType(), formDTO.getHouseHolderName(), formDTO.getTotalResi(),formDTO.getUserId()); + List newMemberList = ConvertUtils.sourceToTarget(formDTO.getMemberList(), IcResiMemberEntity.class); + //查询之前录入的成员表 + Map memMap = queryOriginMem(origin.getId()); + saveOrUpdateMem(newMemberList, memMap,origin.getId()); + } + } + + /** + * 居民端小程序:社区居民信息登记-查询 + * + * @param formDTO + * @return + */ + @Override + public LatestCollectResDTO latestSubmit(LatestSubmitCollectFormDTO formDTO) { + //张三、李四都住101房间 + //张三先登记了填写了2个成员的信息 + //李四登记后,会更新这2个成员的信息 + //李四下次进入页面,展示这2个成员。 + LatestCollectResDTO resDTO = new LatestCollectResDTO(); + GridInfoCache gridInfoCache = CustomerOrgRedis.getGridInfo(formDTO.getGridId()); + if (null == gridInfoCache) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "查询网格信息异常", EpmetErrorCode.SERVER_ERROR.getMsg()); + } + + resDTO.setCustomerId(gridInfoCache.getCustomerId()); + resDTO.setGridId(formDTO.getGridId()); + AgencyInfoCache agencyInfoCache = CustomerOrgRedis.getAgencyInfo(gridInfoCache.getPid()); + resDTO.setAgencyId(gridInfoCache.getPid()); + resDTO.setPids(null != agencyInfoCache ? agencyInfoCache.getPids() : StrConstant.EPMETY_STR); + resDTO.setAgencyName(gridInfoCache.getAgencyName()); + String latestResiCollectId = baseDao.selectLastSubmitId(formDTO.getCustomerId(), formDTO.getUserId()); + if (StringUtils.isNotBlank(latestResiCollectId)) { + resDTO.setResiCollectId(latestResiCollectId); + //之前提交过 + IcResiCollectEntity entity = baseDao.selectById(latestResiCollectId); + if (null != entity) { + setCollectValue(resDTO, entity); + } + List memberList = icResiMemberDao.selectMySubmit(latestResiCollectId, formDTO.getUserId()); + resDTO.setMemberList(memberList); + } + return resDTO; + } + + private void setCollectValue(LatestCollectResDTO resDTO, IcResiCollectEntity entity) { + resDTO.setVillageId(entity.getVillageId()); + resDTO.setBuildId(entity.getBuildId()); + resDTO.setUnitId(entity.getUnitId()); + resDTO.setHomeId(entity.getHomeId()); + resDTO.setAddress(entity.getAddress()); + resDTO.setHouseType(entity.getHouseType()); + resDTO.setHouseHolderName(entity.getHouseHolderName()); + resDTO.setTotalResi(entity.getTotalResi()); + } } diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectDao.xml index 0be0e43c13..98725fa04e 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectDao.xml @@ -55,11 +55,35 @@ UPDATE ic_resi_collect - SET UPDATED_TIME = NOW(), - HOUSE_TYPE = #{houseType}, - HOUSE_HOLDER_NAME = #{houseHolderName}, - TOTAL_RESI = #{totalResi} + SET + + HOUSE_TYPE = #{houseType}, + + + HOUSE_HOLDER_NAME = #{houseHolderName}, + + + TOTAL_RESI = #{totalResi}, + + + UPDATED_BY = #{updatedBy}, + + UPDATED_TIME = NOW() WHERE id = #{id} + + \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiMemberDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiMemberDao.xml index 6423f7ecff..b76345774c 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiMemberDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiMemberDao.xml @@ -4,5 +4,20 @@ - + \ No newline at end of file From 4f2536d50a23a8815a47ea8ae1c31555bb8c7301 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 29 Mar 2022 13:40:02 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E3=80=90=E6=A0=B8=E9=85=B8=E3=80=91?= =?UTF-8?q?=E6=A0=B8=E9=85=B8=E6=A3=80=E6=B5=8B=E3=80=81=E9=80=9A=E7=9F=A5?= =?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.27__ic_nat.sql | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.27__ic_nat.sql diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.27__ic_nat.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.27__ic_nat.sql new file mode 100644 index 0000000000..13ebf841e6 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.27__ic_nat.sql @@ -0,0 +1,47 @@ +CREATE TABLE `ic_nat` ( + `ID` varchar(64) NOT NULL COMMENT 'ID', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `AGENCY_ID` varchar(64) NOT NULL COMMENT '居民端上报时存储用户所在网格的组织id.居民信息的人存储居民所在组织id.单个新增或者导入的存储登录用户所属的组织id', + `PIDS` varchar(255) NOT NULL COMMENT '组织pids', + `USER_ID` varchar(64) DEFAULT NULL COMMENT '居民端小程序的用户id、数字社区的icResiUserId、其他情况无值', + `USER_TYPE` varchar(32) NOT NULL COMMENT '居民端小程序的人:resi;数字社区的居民:icresi;导入的:import;同步的:synchro', + `NAME` varchar(64) NOT NULL COMMENT '人员姓名', + `MOBILE` varchar(11) NOT NULL COMMENT '手机号', + `ID_CARD` varchar(18) NOT NULL COMMENT '身份证号', + `NAT_TIME` datetime NOT NULL COMMENT '检测时间,精确到分钟', + `NAT_RESULT` varchar(1) DEFAULT NULL COMMENT '检测结果(0:阴性 1:阳性)', + `NAT_ADDRESS` varchar(128) DEFAULT NULL COMMENT '检测地点', + `FILE_NAME` varchar(255) DEFAULT NULL COMMENT '文件名', + `ATTACHMENT_TYPE` varchar(64) NOT NULL COMMENT '附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc))', + `ATTACHMENT_URL` varchar(255) NOT NULL COMMENT '附件地址', + `DEL_FLAG` int(11) NOT NULL COMMENT '删除标识', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='核酸上报记录'; + +-- ---------------------------- +-- Table structure for ic_notice +-- ---------------------------- + +CREATE TABLE `ic_notice` ( + `ID` varchar(64) NOT NULL COMMENT '唯一标识', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id customer.id', + `CHANNEL` varchar(10) NOT NULL COMMENT '通知渠道 0小程序通知,1短信通知', + `ORIGIN` varchar(64) NOT NULL COMMENT '通知来源 0行程上报,1疫苗接种,2核酸检测', + `USER_ID` varchar(64) DEFAULT NULL COMMENT '用户ID 居民端用户时有值', + `MOBILE` varchar(11) NOT NULL COMMENT '手机号', + `ID_CARD` varchar(64) NOT NULL COMMENT '被通知人身份证号', + `CONTENT` varchar(500) NOT NULL COMMENT '通知内容', + `ORG_NAME` varchar(64) DEFAULT NULL COMMENT '发送通知的社区', + `DEL_FLAG` int(11) NOT NULL COMMENT '删除标识:0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='防疫通知'; \ No newline at end of file