From 4d1334368c7f09cb19d8b711eb87f0e0144ac73b Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 29 Mar 2022 15:18:38 +0800 Subject: [PATCH 01/75] =?UTF-8?q?=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/model/ImportHouseInfoListener.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportHouseInfoListener.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportHouseInfoListener.java index 31640c8206..4cd6ae33d6 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportHouseInfoListener.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportHouseInfoListener.java @@ -139,10 +139,11 @@ public class ImportHouseInfoListener extends AnalysisEventListener Date: Tue, 29 Mar 2022 17:00:54 +0800 Subject: [PATCH 02/75] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E8=BF=90=E8=90=A5?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=20=E7=BD=91=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/commons/tools/utils/ExcelUtils.java | 10 ++++++++-- .../commons/tools/utils/excel/ExportMultiView.java | 9 +++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ExcelUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ExcelUtils.java index 90b840f4f7..9bc34d0a39 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ExcelUtils.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ExcelUtils.java @@ -132,14 +132,20 @@ public class ExcelUtils { return response.getOutputStream(); } + /** + * desc:easypoi导出多个sheet + * @param fileName + * @param list + * @param response + * @throws Exception + */ public static void exportMultiSheetExcel(String fileName, List list, HttpServletResponse response) throws Exception { List> excel = new ArrayList<>(); for(ExportMultiView view :list){ Map sheet = new HashMap<>(); sheet.put("title",view.getExportParams()); sheet.put("entity",view.getCls()); - List dataList = view.getDataList(); - sheet.put("data", dataList); + sheet.put("data", view.getDataList()); excel.add(sheet); } Workbook workbook = ExcelExportUtil.exportExcel(excel, ExcelType.XSSF); diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/excel/ExportMultiView.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/excel/ExportMultiView.java index 815585a1e3..ff69b2c4b0 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/excel/ExportMultiView.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/excel/ExportMultiView.java @@ -16,8 +16,17 @@ import java.util.List; @Data @AllArgsConstructor public class ExportMultiView { + /** + * 导出的参数 比如设置表头 + */ private ExportParams exportParams; + /** + * 要导出的数据列 + */ private List dataList; + /** + * excel对应的类 + */ private Class cls; } From 33e464cc2f8225cc5340119bbf1b4c064e181384 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Tue, 29 Mar 2022 17:53:03 +0800 Subject: [PATCH 03/75] =?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/java/com/epmet/dto/form/SendNoticeFormDTO.java | 1 + .../src/main/java/com/epmet/controller/IcNoticeController.java | 1 + 2 files changed, 2 insertions(+) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/SendNoticeFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/SendNoticeFormDTO.java index 0d038cf71a..c4113e4f9b 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/SendNoticeFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/SendNoticeFormDTO.java @@ -18,6 +18,7 @@ import java.util.List; public class SendNoticeFormDTO implements Serializable { private static final long serialVersionUID = 4800907725063604885L; private String customerId; + private String staffId; /** * 用户列表 */ diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNoticeController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNoticeController.java index eb40b5fe23..b0b8a31553 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNoticeController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNoticeController.java @@ -74,6 +74,7 @@ public class IcNoticeController { public Result sendNotice(@LoginUser TokenDto tokenDto, @RequestBody SendNoticeFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO, DefaultGroup.class); formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); icNoticeService.sendNotice(formDTO); return new Result(); } From da247b3beb09d3fd50981cc5e91a1cc56ed5e412 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 29 Mar 2022 17:57:49 +0800 Subject: [PATCH 04/75] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E7=BB=84=E7=BB=87like=E5=90=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluationindex/impl/EvaluationIndexServiceImpl.java | 2 +- .../resources/mapper/evaluationindex/EvaluationIndexDao.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java index 66f964c3d9..02d9687ec1 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java @@ -189,7 +189,7 @@ public class EvaluationIndexServiceImpl implements EvaluationIndexService { List gridList = new ArrayList<>(); List finalAgencyGridList = agencyGridList; if (isGetSubAllGrid && OrgLevelEnum.STREET.getCode().equals(dto.getLevel())){ - gridList = evaluationIndexDao.getSubAllGridByAgencyPath(dto.getPids().concat(StrConstant.COLON).concat(dto.getAgencyId())); + gridList = evaluationIndexDao.getSubAllGridByAgencyPath(dto.getAgencyId()); List allGridList = new ArrayList<>(); gridList.forEach(gr->{ ScreenAgencyOrGridListDTO.AgencyGrid org = new ScreenAgencyOrGridListDTO.AgencyGrid(); diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/evaluationindex/EvaluationIndexDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/evaluationindex/EvaluationIndexDao.xml index d6bd5022b9..b66738866f 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/evaluationindex/EvaluationIndexDao.xml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/evaluationindex/EvaluationIndexDao.xml @@ -227,7 +227,7 @@ screen_customer_grid WHERE del_flag = '0' - AND all_parent_ids LIKE concat(#{fullAgencyPath},'%') + AND all_parent_ids LIKE concat('%',#{fullAgencyPath},'%') order by parentAgencyId,gridName From 04fe3352698cb7de97167d0131d0315ef0323e8a Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 29 Mar 2022 17:58:44 +0800 Subject: [PATCH 05/75] =?UTF-8?q?=E8=A1=8C=E7=A8=8B=E4=B8=8A=E6=8A=A5?= =?UTF-8?q?=E5=8F=91=E9=80=81=E9=80=9A=E7=9F=A5=EF=BC=8C=E6=A0=B8=E7=AE=97?= =?UTF-8?q?=E5=85=B3=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/constant/IcResiUserConstant.java | 1 + .../epmet/dto/form/IcTripReportFormDTO.java | 70 +++++++++++++--- .../IcTripReportRecordController.java | 17 ++-- .../service/IcTripReportRecordService.java | 4 +- .../impl/IcTripReportRecordServiceImpl.java | 82 +++++++++++++++++-- 5 files changed, 144 insertions(+), 30 deletions(-) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/constant/IcResiUserConstant.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/constant/IcResiUserConstant.java index aedf4def93..4d956d1fca 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/constant/IcResiUserConstant.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/constant/IcResiUserConstant.java @@ -13,4 +13,5 @@ public interface IcResiUserConstant { */ String USER_TYPE_RESI="resi"; String USER_TYPE_IC_RESI="icresi"; + String USER_TYPE_OTHER="other"; } 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 0088bb3183..45fc03e76b 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 @@ -9,7 +9,9 @@ import org.springframework.format.annotation.DateTimeFormat; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; import java.io.Serializable; +import java.util.ArrayList; import java.util.Date; +import java.util.List; /** * 行程上报居民端入参 @@ -22,6 +24,12 @@ public class IcTripReportFormDTO implements Serializable { public interface ResiUserRequired extends CustomerClientShowGroup { } + public interface PcInternalGroup { + } + public interface PcRequired extends CustomerClientShowGroup { + } + public interface IcResiInternalGroup { + } /** * 客户Id */ @@ -30,49 +38,54 @@ public class IcTripReportFormDTO implements Serializable { /** * 姓名 */ - @NotBlank(message = "姓名不能为空", groups = {ResiUserRequired.class}) + @NotBlank(message = "姓名不能为空", groups = {ResiUserRequired.class,PcRequired.class}) private String name; /** * 手机号 */ - @NotBlank(message = "手机号不能为空", groups = {ResiUserRequired.class}) + @NotBlank(message = "手机号不能为空", groups = {ResiUserRequired.class,PcRequired.class}) private String mobile; /** * 身份证号 */ - @NotBlank(message = "身份证号不能为空", groups = {ResiUserRequired.class}) + @NotBlank(message = "身份证号不能为空", groups = {ResiUserRequired.class,PcRequired.class}) private String idCard; + /** + * 是否添加到核算检测关注名单,true加入;默认false不加入 + */ + @NotNull(message = "是否添加到核算检测关注名单", groups = {PcRequired.class}) + private Boolean heSuanCheck; /** * 现居地编码 */ - @NotBlank(message = "现居地编码不能为空", groups = {ResiUserRequired.class}) + @NotBlank(message = "现居地编码不能为空", groups = {ResiUserRequired.class,PcRequired.class}) private String presentAddressCode; /** * 现居地名称eg:山东省青岛市黄岛区玫瑰山路社区 */ - @NotBlank(message = "现居地名称不能为空", groups = {ResiUserRequired.class}) + @NotBlank(message = "现居地名称不能为空", groups = {ResiUserRequired.class,PcRequired.class}) private String presentAddress; /** * 详细地址 */ - @NotBlank(message = "详细地址不能为空", groups = {ResiUserRequired.class}) + @NotBlank(message = "详细地址不能为空", groups = {ResiUserRequired.class,PcRequired.class}) private String detailAddress; /** * 来源地区编码 */ - @NotBlank(message = "来自地区编码不能为空", groups = {ResiUserRequired.class}) + @NotBlank(message = "来自地区编码不能为空", groups = {ResiUserRequired.class,PcRequired.class}) private String sourceAddressCode; /** * 来源地区地址 */ - @NotBlank(message = "来自地区名称不能为空", groups = {ResiUserRequired.class}) + @NotBlank(message = "来自地区名称不能为空", groups = {ResiUserRequired.class,PcRequired.class}) private String sourceAddress; /** @@ -80,7 +93,7 @@ public class IcTripReportFormDTO implements Serializable { */ @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") - @NotNull(message = "来到本地时间不能为空", groups = {ResiUserRequired.class}) + @NotNull(message = "来到本地时间不能为空", groups = {ResiUserRequired.class,PcRequired.class}) private Date arriveDate; /** @@ -93,23 +106,56 @@ public class IcTripReportFormDTO implements Serializable { /** * 备注信息 */ - @Length(max = 500, message = "备注最多可输入500字", groups = {ResiUserRequired.class}) + @Length(max = 500, message = "备注最多可输入500字", groups = {ResiUserRequired.class,PcRequired.class}) private String remark; - @NotBlank(message = "网格不能为空", groups = {ResiUserInternalGroup.class}) + /** + * userType=icresi时,必填,取值居民所属的网格ID; + * 居民端小程序上报前端赋值当前用户所在的网格id + */ + @NotBlank(message = "网格不能为空", groups = {ResiUserInternalGroup.class,IcResiInternalGroup.class}) private String gridId; - //后端自己赋值 /** * 用户id + * 居民端上报时后端自己赋值 + * pc录入如果是从居民信息选择,此列有值 */ + @NotBlank(message = "userId不能为空", groups = {IcResiInternalGroup.class}) private String userId; /** * 居民端小程序的人:resi;数字社区的居民:icresi;未关联上的:other + * 居民端上报是后端赋值; + * pc录入是前端赋值 */ + @NotBlank(message = "数字社区的居民:icresi;其他:other", groups = {PcInternalGroup.class}) private String userType; + /** + * userType=icresi时,必填。 + * 居民所属的组织id + */ + @NotBlank(message = "agencyId不能为空", groups = {IcResiInternalGroup.class}) + private String agencyId; + + /** + * pc录入时用 + */ + private String currentStaffId; + + /** + * pc录入时用 + * 通知渠道 0小程序通知,1短信通知 + */ + private List channel = new ArrayList<>(); + /** + * pc录入时用 + * 通知内容 + */ + private String content = ""; + + } 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 45fe80dc05..0e7ee6b100 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 @@ -8,7 +8,6 @@ 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.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.constant.IcResiUserConstant; @@ -59,16 +58,20 @@ public class IcTripReportRecordController { /** * pc: 行程上报-新增 - * @param dto + * @param formDTO * @return */ @NoRepeatSubmit @PostMapping("save") - public Result save(@RequestBody IcTripReportRecordDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - icTripReportRecordService.save(dto); - return new Result(); + public Result save(@LoginUser TokenDto tokenDto,@RequestBody IcTripReportFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setCurrentStaffId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO,IcTripReportFormDTO.PcRequired.class,IcTripReportFormDTO.PcInternalGroup.class); + if(IcResiUserConstant.USER_TYPE_IC_RESI.equals(formDTO.getUserType())){ + ValidatorUtils.validateEntity(formDTO,IcTripReportFormDTO.IcResiInternalGroup.class); + } + String id=icTripReportRecordService.save(formDTO); + return new Result().ok(id); } @NoRepeatSubmit 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 001b3d65e4..5c8142cfbe 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 @@ -50,14 +50,14 @@ public interface IcTripReportRecordService extends BaseService page(PageTripReportFormDTO formDTO) { //1.获取工作人员缓存信息 - CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId()); - if (null == staffInfo) { - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "查询工作人员缓存信息异常", EpmetErrorCode.SERVER_ERROR.getMsg()); - } + CustomerStaffInfoCacheResult staffInfo=queryCurrentStaff(formDTO.getCustomerId(),formDTO.getUserId()); formDTO.setAgencyId(staffInfo.getAgencyId()); //2.按条件查询业务数据 PageInfo data = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.isPage()) @@ -86,6 +84,14 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl list(Map params) { List entityList = baseDao.selectList(getWrapper(params)); @@ -108,11 +114,69 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl NumConstant.ZERO && StringUtils.isNotBlank(formDTO.getContent())) { + SendNoticeFormDTO dto = new SendNoticeFormDTO(); + List userList = new ArrayList<>(); + //注意这里的userId是指的pc平台的居民 + userList.add(ConvertUtils.sourceToTarget(formDTO, SendNoticeFormDTO.UserListBean.class)); + dto.setCustomerId(formDTO.getCustomerId()); + dto.setUserList(userList); + dto.setChannel(formDTO.getChannel()); + //通知来源 0 行程上报,1 疫苗接种,2 核酸检测 + dto.setOrigin(NumConstant.ZERO_STR); + dto.setContent(formDTO.getContent()); + dto.setOrgName(agencyInfoCache.getOrganizationName()); + icNoticeService.sendNotice(dto); + } + return entity.getId(); + } + + /** + * 加入核算检测关注 + * @param formDTO + */ + private void vaccinationAdd(IcTripReportFormDTO formDTO) { + VaccinationAddFormDTO vaccinationAddFormDTO=new VaccinationAddFormDTO(); + vaccinationAddFormDTO.setCustomerId(formDTO.getCustomerId()); + vaccinationAddFormDTO.setUserId(formDTO.getCurrentStaffId()); + List list =new ArrayList<>(); + IcEpidemicSpecialAttentionDTO dto=new IcEpidemicSpecialAttentionDTO(); + dto.setName(formDTO.getName()); + dto.setIdCard(formDTO.getIdCard()); + dto.setMobile(formDTO.getMobile()); + //避免再发通知,赋值个空集合吧 + dto.setChannel(Collections.emptyList()); + //关注类型,核酸检测:2,疫苗接种:1;行程上报:0 + dto.setAttentionType(NumConstant.ZERO); + list.add(dto); + vaccinationAddFormDTO.setList(list); + epidemicSpecialAttentionService.vaccinationAdd( vaccinationAddFormDTO); } @Override From c6c33d25908e5b34dcdd774ca2b464ef02566123 Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Tue, 29 Mar 2022 18:32:50 +0800 Subject: [PATCH 06/75] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E6=A0=B8?= =?UTF-8?q?=E9=85=B8=E6=A3=80=E6=B5=8B=E4=BF=A1=E6=81=AFexcel=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=8E=BB=E9=87=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dao/IcNatDao.java | 6 ++++++ .../epmet/service/impl/IcNatServiceImpl.java | 10 +++++++++- .../migration/V0.0.28__nat_add_uniquekey.sql | 1 + .../src/main/resources/mapper/IcNatDao.xml | 18 ++++++++++++++++++ 4 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.28__nat_add_uniquekey.sql 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 4ac7359f2e..97b365bb6f 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 @@ -36,4 +36,10 @@ public interface IcNatDao extends BaseDao { * @Description 删除/取消同步操作--物理删除业务数据 **/ int delById(@Param("icNatId") String icNatId); + + /** + * 插入或者更新 + * @param e + */ + void insertOrUpdate(IcNatEntity e); } 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 a7ef5cf7f4..dad0b433d5 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 @@ -2,6 +2,7 @@ package com.epmet.service.impl; import com.alibaba.excel.EasyExcel; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.constant.NumConstant; @@ -372,6 +373,13 @@ public class IcNatServiceImpl extends BaseServiceImpl imp * @param entities */ public void batchPersist(List entities) { - insertBatch(entities); + //insertBatch(entities); + String currentUserId = EpmetRequestHolder.getHeader(AppClientConstant.USER_ID); + entities.forEach(e -> { + String id = IdWorker.getIdStr(e); + e.setId(id); + e.setUpdatedBy(currentUserId); + baseDao.insertOrUpdate(e); + }); } } diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.28__nat_add_uniquekey.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.28__nat_add_uniquekey.sql new file mode 100644 index 0000000000..5cf24b3bec --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.28__nat_add_uniquekey.sql @@ -0,0 +1 @@ +alter table ic_nat add index unq_nat(ID_CARD, NAT_TIME) \ 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 1f325c92e3..28b4129229 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 @@ -67,4 +67,22 @@ DELETE FROM ic_nat WHERE id = #{icNatId} + + INSERT INTO epmet_user.ic_nat + (ID, CUSTOMER_ID, AGENCY_ID, PIDS, USER_ID, + USER_TYPE, NAME, MOBILE, ID_CARD, NAT_TIME, NAT_RESULT, NAT_ADDRESS, FILE_NAME, ATTACHMENT_TYPE, ATTACHMENT_URL, + DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME) + VALUES (#{id}, #{customerId}, #{agencyId}, #{pids}, #{userId}, + #{userType}, #{name}, #{mobile}, #{idCard}, #{natTime}, + #{natResult}, #{natAddress}, #{fileName}, #{attachmentType}, #{attachmentUrl}, + #{delFlag}, #{revision}, #{createdBy}, #{createdTime}, #{updatedBy}, + #{updatedTime}) + ON DUPLICATE KEY update + NAME=#{name}, + MOBILE=#{mobile}, + NAT_ADDRESS=#{natAddress}, + NAT_RESULT=#{natResult}, + UPDATED_BY=#{updatedBy}, + UPDATED_TIME=NOW() + From 7bf892d3b0a5377e6453b1f79e92ebbce90dbad7 Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Tue, 29 Mar 2022 18:51:01 +0800 Subject: [PATCH 07/75] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/db/migration/V0.0.28__nat_add_uniquekey.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.28__nat_add_uniquekey.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.28__nat_add_uniquekey.sql index 5cf24b3bec..76b6b17b34 100644 --- a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.28__nat_add_uniquekey.sql +++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.28__nat_add_uniquekey.sql @@ -1 +1 @@ -alter table ic_nat add index unq_nat(ID_CARD, NAT_TIME) \ No newline at end of file +alter table ic_nat add unique index unq_nat(ID_CARD, NAT_TIME) \ No newline at end of file From 227a37c16d5dcd3471547af905b8d7b05459c987 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 29 Mar 2022 19:57:38 +0800 Subject: [PATCH 08/75] =?UTF-8?q?=E8=A1=8C=E7=A8=8B=E4=B8=8A=E6=8A=A5?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/constant/IcResiUserConstant.java | 5 +- .../com/epmet/dto/IcTripReportRecordDTO.java | 2 +- .../epmet/dto/form/IcTripReportFormDTO.java | 39 +++++---- .../IcTripReportRecordController.java | 77 ++++++++++++----- .../com/epmet/dao/IcTripReportRecordDao.java | 9 ++ .../entity/IcTripReportRecordEntity.java | 2 +- .../service/IcTripReportRecordService.java | 16 +--- .../impl/IcTripReportRecordServiceImpl.java | 80 ++++++++++++------ .../migration/V0.0.28__modify_trip_report.sql | 2 + .../excel/trip_report_import_template.xlsx | Bin 0 -> 9319 bytes .../mapper/IcTripReportRecordDao.xml | 11 +++ 11 files changed, 166 insertions(+), 77 deletions(-) create mode 100644 epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.28__modify_trip_report.sql create mode 100644 epmet-user/epmet-user-server/src/main/resources/excel/trip_report_import_template.xlsx diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/constant/IcResiUserConstant.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/constant/IcResiUserConstant.java index 4d956d1fca..84a00be746 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/constant/IcResiUserConstant.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/constant/IcResiUserConstant.java @@ -9,9 +9,10 @@ public interface IcResiUserConstant { String IC_RESI_USER = "ic_resi_user"; /** - * 居民端小程序的人:resi;数字社区的居民:icresi;未关联上的:other + * 居民端小程序的人:resi;数字社区的居民:icresi;单独录入:input; 导入:import */ String USER_TYPE_RESI="resi"; String USER_TYPE_IC_RESI="icresi"; - String USER_TYPE_OTHER="other"; + String USER_TYPE_INPUT="input"; + String USER_TYPE_IMPORT="import"; } 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 1b7fc83684..deb2abaed1 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 @@ -64,7 +64,7 @@ public class IcTripReportRecordDTO implements Serializable { private String userId; /** - * 居民端小程序的人:resi;数字社区的居民:icresi;未关联上的:other + * 居民端小程序的人:resi;数字社区的居民:icresi;单独录入:input; 导入:import */ private String userType; 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 45fc03e76b..f8d6f90ef7 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 @@ -24,12 +24,19 @@ public class IcTripReportFormDTO implements Serializable { public interface ResiUserRequired extends CustomerClientShowGroup { } - public interface PcInternalGroup { + public interface PcAddOrUpdateInternalGroup { } - public interface PcRequired extends CustomerClientShowGroup { + public interface PcAddRequired extends CustomerClientShowGroup { } public interface IcResiInternalGroup { } + + public interface PcUpdateRequired extends CustomerClientShowGroup { + } + + @NotBlank(message = "主键不能为空", groups = {PcUpdateRequired.class}) + private String id; + /** * 客户Id */ @@ -38,54 +45,54 @@ public class IcTripReportFormDTO implements Serializable { /** * 姓名 */ - @NotBlank(message = "姓名不能为空", groups = {ResiUserRequired.class,PcRequired.class}) + @NotBlank(message = "姓名不能为空", groups = {ResiUserRequired.class,PcAddRequired.class,PcUpdateRequired.class}) private String name; /** * 手机号 */ - @NotBlank(message = "手机号不能为空", groups = {ResiUserRequired.class,PcRequired.class}) + @NotBlank(message = "手机号不能为空", groups = {ResiUserRequired.class,PcAddRequired.class,PcUpdateRequired.class}) private String mobile; /** * 身份证号 */ - @NotBlank(message = "身份证号不能为空", groups = {ResiUserRequired.class,PcRequired.class}) + @NotBlank(message = "身份证号不能为空", groups = {ResiUserRequired.class,PcAddRequired.class,PcUpdateRequired.class}) private String idCard; /** * 是否添加到核算检测关注名单,true加入;默认false不加入 */ - @NotNull(message = "是否添加到核算检测关注名单", groups = {PcRequired.class}) + @NotNull(message = "是否添加到核算检测关注名单", groups = {PcAddRequired.class,PcUpdateRequired.class}) private Boolean heSuanCheck; /** * 现居地编码 */ - @NotBlank(message = "现居地编码不能为空", groups = {ResiUserRequired.class,PcRequired.class}) + @NotBlank(message = "现居地编码不能为空", groups = {ResiUserRequired.class,PcAddRequired.class,PcUpdateRequired.class}) private String presentAddressCode; /** * 现居地名称eg:山东省青岛市黄岛区玫瑰山路社区 */ - @NotBlank(message = "现居地名称不能为空", groups = {ResiUserRequired.class,PcRequired.class}) + @NotBlank(message = "现居地名称不能为空", groups = {ResiUserRequired.class,PcAddRequired.class,PcUpdateRequired.class}) private String presentAddress; /** * 详细地址 */ - @NotBlank(message = "详细地址不能为空", groups = {ResiUserRequired.class,PcRequired.class}) + @NotBlank(message = "详细地址不能为空", groups = {ResiUserRequired.class,PcAddRequired.class,PcUpdateRequired.class}) private String detailAddress; /** * 来源地区编码 */ - @NotBlank(message = "来自地区编码不能为空", groups = {ResiUserRequired.class,PcRequired.class}) + @NotBlank(message = "来自地区编码不能为空", groups = {ResiUserRequired.class,PcAddRequired.class,PcUpdateRequired.class}) private String sourceAddressCode; /** * 来源地区地址 */ - @NotBlank(message = "来自地区名称不能为空", groups = {ResiUserRequired.class,PcRequired.class}) + @NotBlank(message = "来自地区名称不能为空", groups = {ResiUserRequired.class,PcAddRequired.class,PcUpdateRequired.class}) private String sourceAddress; /** @@ -93,7 +100,7 @@ public class IcTripReportFormDTO implements Serializable { */ @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") - @NotNull(message = "来到本地时间不能为空", groups = {ResiUserRequired.class,PcRequired.class}) + @NotNull(message = "来到本地时间不能为空", groups = {ResiUserRequired.class,PcAddRequired.class,PcUpdateRequired.class}) private Date arriveDate; /** @@ -106,7 +113,7 @@ public class IcTripReportFormDTO implements Serializable { /** * 备注信息 */ - @Length(max = 500, message = "备注最多可输入500字", groups = {ResiUserRequired.class,PcRequired.class}) + @Length(max = 500, message = "备注最多可输入500字", groups = {ResiUserRequired.class,PcAddRequired.class,PcUpdateRequired.class}) private String remark; @@ -127,11 +134,11 @@ public class IcTripReportFormDTO implements Serializable { private String userId; /** - * 居民端小程序的人:resi;数字社区的居民:icresi;未关联上的:other - * 居民端上报是后端赋值; + * 居民端小程序的人:resi;数字社区的居民:icresi;单独录入:input; 导入:import + * 居民端上报是后端赋值;导入后端赋值 * pc录入是前端赋值 */ - @NotBlank(message = "数字社区的居民:icresi;其他:other", groups = {PcInternalGroup.class}) + @NotBlank(message = "数字社区的居民:icresi;其他:other", groups = {PcAddOrUpdateInternalGroup.class}) private String userType; /** 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 0e7ee6b100..36d1c39e53 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 @@ -6,19 +6,24 @@ 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.DefaultGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.constant.IcResiUserConstant; 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.service.IcTripReportRecordService; +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang3.ArrayUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpHeaders; import org.springframework.web.bind.annotation.*; +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.io.InputStream; +import java.net.URLEncoder; import java.util.List; @@ -50,12 +55,6 @@ public class IcTripReportRecordController { return new Result>().ok(page); } - @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) - public Result get(@PathVariable("id") String id){ - IcTripReportRecordDTO data = icTripReportRecordService.get(id); - return new Result().ok(data); - } - /** * pc: 行程上报-新增 * @param formDTO @@ -66,7 +65,7 @@ public class IcTripReportRecordController { public Result save(@LoginUser TokenDto tokenDto,@RequestBody IcTripReportFormDTO formDTO){ formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setCurrentStaffId(tokenDto.getUserId()); - ValidatorUtils.validateEntity(formDTO,IcTripReportFormDTO.PcRequired.class,IcTripReportFormDTO.PcInternalGroup.class); + ValidatorUtils.validateEntity(formDTO,IcTripReportFormDTO.PcAddRequired.class,IcTripReportFormDTO.PcAddOrUpdateInternalGroup.class); if(IcResiUserConstant.USER_TYPE_IC_RESI.equals(formDTO.getUserType())){ ValidatorUtils.validateEntity(formDTO,IcTripReportFormDTO.IcResiInternalGroup.class); } @@ -74,20 +73,35 @@ public class IcTripReportRecordController { return new Result().ok(id); } + /** + * pc: 行程上报-修改 + * @param formDTO + * @return + */ @NoRepeatSubmit @PostMapping("update") - public Result update(@RequestBody IcTripReportRecordDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - icTripReportRecordService.update(dto); - return new Result(); + public Result update(@LoginUser TokenDto tokenDto,@RequestBody IcTripReportFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setCurrentStaffId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO,IcTripReportFormDTO.PcUpdateRequired.class,IcTripReportFormDTO.PcAddOrUpdateInternalGroup.class); + if(IcResiUserConstant.USER_TYPE_IC_RESI.equals(formDTO.getUserType())){ + ValidatorUtils.validateEntity(formDTO,IcTripReportFormDTO.IcResiInternalGroup.class); + } + return new Result().ok(icTripReportRecordService.update(formDTO)); } + /** + * pc:行程上报-删除 + * + * @param ids + * @return + */ @PostMapping("delete") - public Result delete(@RequestBody String[] ids){ - //效验数据 - AssertUtils.isArrayEmpty(ids, "id"); - icTripReportRecordService.delete(ids); + public Result delete(@LoginUser TokenDto tokenDto, @RequestBody String[] ids) { + if (ArrayUtils.isEmpty(ids)) { + return new Result(); + } + icTripReportRecordService.delete(tokenDto.getCustomerId(),tokenDto.getUserId(),ids); return new Result(); } @@ -119,4 +133,29 @@ public class IcTripReportRecordController { return new Result>().ok(icTripReportRecordService.resiList(formDTO)); } + /** + * pc:行程上报-下载模板 + * @param response + * @throws IOException + */ + @RequestMapping(value = "template-download", method = {RequestMethod.GET, RequestMethod.POST}) + public void downloadTemplate(HttpServletResponse response) throws IOException { + response.setCharacterEncoding("UTF-8"); + response.addHeader(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS, "Content-Disposition"); + //response.setHeader(HttpHeaders.CONTENT_TYPE, "application/vnd.ms-excel"); + response.setHeader(HttpHeaders.CONTENT_TYPE, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + URLEncoder.encode("行程上报导入模板", "UTF-8") + ".xlsx"); + + InputStream is = this.getClass().getClassLoader().getResourceAsStream("excel/trip_report_import_template.xlsx"); + try { + ServletOutputStream os = response.getOutputStream(); + IOUtils.copy(is, os); + } finally { + if (is != null) { + is.close(); + } + } + } + + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcTripReportRecordDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcTripReportRecordDao.java index e310dbc208..6d98de7a80 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcTripReportRecordDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcTripReportRecordDao.java @@ -33,4 +33,13 @@ public interface IcTripReportRecordDao extends BaseDao * @return */ List pageList(PageTripReportFormDTO formDTO); + + /** + * pc:行程上报-删除 + * @param userId + * @param agencyId + * @param ids + * @return + */ + int batchDel(@Param("userId")String userId,@Param("agencyId")String agencyId, @Param("ids")String[] ids); } \ No newline at end of file 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 a74f25b6f4..0b7d4fd4fd 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 @@ -62,7 +62,7 @@ public class IcTripReportRecordEntity extends BaseEpmetEntity { private String userId; /** - * 居民端小程序的人:resi;数字社区的居民:icresi;未关联上的:other + * 居民端小程序的人:resi;数字社区的居民:icresi;单独录入:input; 导入:import */ private String userType; 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 5c8142cfbe..bc19691e60 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 @@ -39,16 +39,6 @@ public interface IcTripReportRecordService extends BaseService list(Map params); - /** - * 单条查询 - * - * @param id - * @return IcTripReportRecordDTO - * @author generator - * @date 2022-03-25 - */ - IcTripReportRecordDTO get(String id); - /** * pc: 行程上报-新增 * @@ -67,17 +57,17 @@ public interface IcTripReportRecordService extends BaseService implements IcTripReportRecordService { @Autowired @@ -108,12 +110,6 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl NumConstant.ZERO && StringUtils.isNotBlank(formDTO.getContent())) { - SendNoticeFormDTO dto = new SendNoticeFormDTO(); - List userList = new ArrayList<>(); - //注意这里的userId是指的pc平台的居民 - userList.add(ConvertUtils.sourceToTarget(formDTO, SendNoticeFormDTO.UserListBean.class)); - dto.setCustomerId(formDTO.getCustomerId()); - dto.setUserList(userList); - dto.setChannel(formDTO.getChannel()); - //通知来源 0 行程上报,1 疫苗接种,2 核酸检测 - dto.setOrigin(NumConstant.ZERO_STR); - dto.setContent(formDTO.getContent()); - dto.setOrgName(agencyInfoCache.getOrganizationName()); - icNoticeService.sendNotice(dto); + sendNotice(formDTO,agencyInfoCache.getOrganizationName()); } return entity.getId(); } /** - * 加入核算检测关注 + * 行程上报-发送通知 + * @param formDTO + */ + private void sendNotice(IcTripReportFormDTO formDTO,String agencyName) { + SendNoticeFormDTO dto = new SendNoticeFormDTO(); + List userList = new ArrayList<>(); + //注意这里的userId是指的pc平台的居民 + userList.add(ConvertUtils.sourceToTarget(formDTO, SendNoticeFormDTO.UserListBean.class)); + dto.setCustomerId(formDTO.getCustomerId()); + dto.setUserList(userList); + dto.setChannel(formDTO.getChannel()); + //通知来源 0 行程上报,1 疫苗接种,2 核酸检测 + dto.setOrigin(NumConstant.ZERO_STR); + dto.setContent(formDTO.getContent()); + dto.setOrgName(agencyName); + icNoticeService.sendNotice(dto); + } + + /** + * 行程上报-加入核算检测关注 * @param formDTO */ private void vaccinationAdd(IcTripReportFormDTO formDTO) { @@ -181,16 +185,42 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl NumConstant.ZERO && StringUtils.isNotBlank(formDTO.getContent())) { + sendNotice(formDTO,agencyInfoCache.getOrganizationName()); + } + return entity.getId(); } @Override @Transactional(rollbackFor = Exception.class) - public void delete(String[] ids) { - // 逻辑删除(@TableLogic 注解) - baseDao.deleteBatchIds(Arrays.asList(ids)); + public void delete(String customerId, String userId, String[] ids) { + CustomerStaffInfoCacheResult staffInfo=queryCurrentStaff(customerId,userId); + baseDao.batchDel(userId,staffInfo.getAgencyId(),ids); } /** 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.28__modify_trip_report.sql new file mode 100644 index 0000000000..d28bc06972 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.28__modify_trip_report.sql @@ -0,0 +1,2 @@ +alter table ic_trip_report_record MODIFY COLUMN PIDS VARCHAR(255) COMMENT 'agency_id的所有上级'; +alter table ic_trip_report_record MODIFY COLUMN USER_TYPE VARCHAR(32) NOT NULL COMMENT '居民端小程序的人:resi;数字社区的居民:icresi;单独录入:input; 导入:import'; \ No newline at end of file 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 new file mode 100644 index 0000000000000000000000000000000000000000..f13d7ec77d97db25035a97f95e3d4ec74c12d1c0 GIT binary patch literal 9319 zcmaJ{1yo$ivc=uqb%KQ;!QBZS+}+*XfO1fA^{)o~^g-WBPukYX+KyKGNeu1j2dJN7d`gk+ zOu#@uj37WjNdFYmv9_jhwlGhLY!d^eM-#g8c|@wP8plAUOhn`BOaU#f4^L#V&?bZK zvon4Ge&l7bREM%uZ#cD*zlUQ$9Vw`_b<#RqYqo<_lSYwF;#ZvF6=p%&me@Z$UQmN1U;;xSmFV4u8I{C_H3hGN>oESj9WynJvbG)n zEiOmVT7Oaj9%5FXan7hrm<}8b^a@`@?t5k1V*rL?mHVoDxec=NvA`BpF`zr{J4ssf zr}@uUTO32TNB3a*^BnPWkZrih%;_VpDCZ95+!^b#5XPtsb0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wF2vxk{}dH4^e{?C!W + + + update ic_trip_report_record set del_flag='1',UPDATED_BY=#{userId},UPDATED_TIME=NOW() + WHERE USER_TYPE !='resi' + AND AGENCY_ID=#{agencyId} + AND ( + + id=#{id} + + ) + \ No newline at end of file From 8f93f6e1a99f0c87efc58adc7c01465c5ec1cf81 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 29 Mar 2022 21:21:09 +0800 Subject: [PATCH 09/75] =?UTF-8?q?=E8=BF=90=E8=90=A5=E7=AB=AF=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=AF=BC=E5=87=BA=20=E5=AD=94=E6=9D=91=E7=9A=84?= =?UTF-8?q?=E7=BA=A7=E5=88=AB=E4=B8=8D=E5=AF=B9=20=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/evaluationindex/ScreenAgencyOrGridListDTO.java | 3 ++- .../epmet/dataaggre/excel/CustomerDataManageExcel.java | 4 ++-- .../service/datastats/impl/DataStatsServiceImpl.java | 9 +++------ .../evaluationindex/impl/EvaluationIndexServiceImpl.java | 9 ++++----- .../evaluationindex/screen/impl/AgencyServiceImpl.java | 2 ++ 5 files changed, 13 insertions(+), 14 deletions(-) diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/evaluationindex/ScreenAgencyOrGridListDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/evaluationindex/ScreenAgencyOrGridListDTO.java index 87e494d0b9..76adaddc40 100644 --- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/evaluationindex/ScreenAgencyOrGridListDTO.java +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/evaluationindex/ScreenAgencyOrGridListDTO.java @@ -3,6 +3,7 @@ package com.epmet.dataaggre.dto.evaluationindex; import lombok.Data; import java.io.Serializable; +import java.util.ArrayList; import java.util.List; /** @@ -19,7 +20,7 @@ public class ScreenAgencyOrGridListDTO implements Serializable { /** * 所有下级网格列表 */ - private List allGridList; + private List allGridList = new ArrayList<>(); @Data public static class AgencyGrid { diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/excel/CustomerDataManageExcel.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/excel/CustomerDataManageExcel.java index 024562fdf4..80cbe66693 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/excel/CustomerDataManageExcel.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/excel/CustomerDataManageExcel.java @@ -11,7 +11,7 @@ import lombok.Data; @Data public class CustomerDataManageExcel { - @Excel(name = "组织",width = 20) + @Excel(name = "组织",width = 25) private String orgName; @Excel(name = "用户数",width = 10) @@ -35,7 +35,7 @@ public class CustomerDataManageExcel { @Excel(name = "项目数",width = 10) private Integer projectCount; - @Excel(name = "结案项目数",width = 10) + @Excel(name = "结案项目数",width = 12) private Integer closedProjectCount; @Excel(name = "巡查人数",width = 10) diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java index afa93f3853..baa5fa3ba5 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java @@ -1887,20 +1887,16 @@ public class DataStatsServiceImpl implements DataStatsService, ResultDataResolve String fileName = excelName(formDTO); ExportParams exportParams = new ExportParams(fileName,fileName); - //exportParams.setAutoSize(true); List exportList = new ArrayList<>(); List excelList = ConvertUtils.sourceToTarget(result, CustomerDataManageExcel.class); exportList.add(new ExportMultiView(exportParams,excelList,CustomerDataManageExcel.class)); - if (formDTO.isExport()){ + if (CollectionUtils.isNotEmpty(operateExport.getAllGridList())){ List gridResult = operateExport.getAllGridList(); setTotal(gridResult); ExportParams exportParams2 = new ExportParams(fileName,"网格数据"); - //exportParams2.setAutoSize(true); List excelList2 = ConvertUtils.sourceToTarget(gridResult, CustomerDataManageExcel.class); exportList.add(new ExportMultiView(exportParams2,excelList2,CustomerDataManageExcel.class)); } - //ExcelUtils.exportExcelToTargetDisposeAll(response,fileName,result, CustomerDataManageExcel.class); - ExcelUtils.exportMultiSheetExcel(fileName, exportList, response); } @@ -2008,7 +2004,8 @@ public class DataStatsServiceImpl implements DataStatsService, ResultDataResolve //获取组织级别数据 CustomerDataManageResultDTO resultDTO = getDataManageResultDTO(formDTO, startTimeForm, agencyGrid.getAgencyGridList(),agencyGrid.getLevel()); resultDTO.setTotal(idList.size()); - if (formDTO.isExport()){ + //网格List不为空则 查询网格数据 (仅限查询组织id为街道级别时) + if (CollectionUtils.isNotEmpty(resultDTO.getAllGridList())){ formDTO.setDataType(OrgTypeEnum.GRID.getCode()); idList = agencyGrid.getAllGridList().stream().map(ScreenAgencyOrGridListDTO.AgencyGrid::getOrgId).collect(Collectors.toList()); formDTO.setIdList(idList); diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java index 02d9687ec1..3ff3400113 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java @@ -1,7 +1,6 @@ package com.epmet.dataaggre.service.evaluationindex.impl; import com.epmet.commons.dynamic.datasource.annotation.DataSource; -import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.enums.OrgLevelEnum; import com.epmet.commons.tools.exception.RenException; import com.epmet.dataaggre.constant.DataSourceConstant; @@ -187,8 +186,8 @@ public class EvaluationIndexServiceImpl implements EvaluationIndexService { //2.根据组织级别判断查询直属组织或网格列表 List agencyList = new ArrayList<>(); List gridList = new ArrayList<>(); - List finalAgencyGridList = agencyGridList; - if (isGetSubAllGrid && OrgLevelEnum.STREET.getCode().equals(dto.getLevel())){ + //孔村和组织级别为街道的查询下级所有网格 + if (isGetSubAllGrid && OrgLevelEnum.STREET.getCode().equals(dto.getLevel()) || "1234085031077498881".equals(agencyId)){ gridList = evaluationIndexDao.getSubAllGridByAgencyPath(dto.getAgencyId()); List allGridList = new ArrayList<>(); gridList.forEach(gr->{ @@ -213,7 +212,7 @@ public class EvaluationIndexServiceImpl implements EvaluationIndexService { ScreenAgencyOrGridListDTO.AgencyGrid org = new ScreenAgencyOrGridListDTO.AgencyGrid(); org.setOrgId(gr.getAgencyId()); org.setOrgName(gr.getAgencyName()); - finalAgencyGridList.add(org); + agencyGridList.add(org); }); } else { //2-2.直属下级网格列表 @@ -222,7 +221,7 @@ public class EvaluationIndexServiceImpl implements EvaluationIndexService { ScreenAgencyOrGridListDTO.AgencyGrid org = new ScreenAgencyOrGridListDTO.AgencyGrid(); org.setOrgId(gr.getGridId()); org.setOrgName(gr.getGridName()); - finalAgencyGridList.add(org); + agencyGridList.add(org); }); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java index 0c27cbc878..cf4e4359c4 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java @@ -561,6 +561,8 @@ public class AgencyServiceImpl implements AgencyService { return nodes.get(0); } + + private void convertOrgTreeNode(List nodeList, ScreenCustomerAgencyDTO currentAgency) { OrgTreeNode orgTreeNode = ConvertUtils.sourceToTarget(currentAgency, OrgTreeNode.class); orgTreeNode.setOrgId(currentAgency.getAgencyId()); From 0319f4a3d81aa0a11ac7fb33070e14d206d5c2a6 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 29 Mar 2022 21:32:25 +0800 Subject: [PATCH 10/75] =?UTF-8?q?=E8=BF=90=E8=90=A5=E7=AB=AF=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=AF=BC=E5=87=BA=20=E5=AD=94=E6=9D=91=E7=9A=84?= =?UTF-8?q?=E7=BA=A7=E5=88=AB=E4=B8=8D=E5=AF=B9=20=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E7=9A=84bug=20up?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluationindex/impl/EvaluationIndexServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java index 3ff3400113..1d5998dcdd 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java @@ -187,7 +187,7 @@ public class EvaluationIndexServiceImpl implements EvaluationIndexService { List agencyList = new ArrayList<>(); List gridList = new ArrayList<>(); //孔村和组织级别为街道的查询下级所有网格 - if (isGetSubAllGrid && OrgLevelEnum.STREET.getCode().equals(dto.getLevel()) || "1234085031077498881".equals(agencyId)){ + if (isGetSubAllGrid && (OrgLevelEnum.STREET.getCode().equals(dto.getLevel()) || "1234085031077498881".equals(agencyId))){ gridList = evaluationIndexDao.getSubAllGridByAgencyPath(dto.getAgencyId()); List allGridList = new ArrayList<>(); gridList.forEach(gr->{ From 792f9b84e923606d7f19ee46671d5e76c63c8f9c Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 29 Mar 2022 21:55:02 +0800 Subject: [PATCH 11/75] =?UTF-8?q?=E8=BF=90=E8=90=A5=E7=AB=AF=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=AF=BC=E5=87=BA=20=E5=AD=94=E6=9D=91=E7=9A=84?= =?UTF-8?q?=E7=BA=A7=E5=88=AB=E4=B8=8D=E5=AF=B9=20=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E7=9A=84bug=20heihei?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataaggre/service/datastats/impl/DataStatsServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java index baa5fa3ba5..e55db49a65 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java @@ -2005,7 +2005,7 @@ public class DataStatsServiceImpl implements DataStatsService, ResultDataResolve CustomerDataManageResultDTO resultDTO = getDataManageResultDTO(formDTO, startTimeForm, agencyGrid.getAgencyGridList(),agencyGrid.getLevel()); resultDTO.setTotal(idList.size()); //网格List不为空则 查询网格数据 (仅限查询组织id为街道级别时) - if (CollectionUtils.isNotEmpty(resultDTO.getAllGridList())){ + if (CollectionUtils.isNotEmpty(agencyGrid.getAllGridList())){ formDTO.setDataType(OrgTypeEnum.GRID.getCode()); idList = agencyGrid.getAllGridList().stream().map(ScreenAgencyOrGridListDTO.AgencyGrid::getOrgId).collect(Collectors.toList()); formDTO.setIdList(idList); From d847bbe737cb0471258f310135d07f0a16868148 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 29 Mar 2022 22:27:44 +0800 Subject: [PATCH 12/75] =?UTF-8?q?=E8=BF=90=E8=90=A5=E7=AB=AF=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=AF=BC=E5=87=BA=20=E5=AD=94=E6=9D=91=E7=9A=84?= =?UTF-8?q?=E7=BA=A7=E5=88=AB=E4=B8=8D=E5=AF=B9=20=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E7=9A=84bug=E6=8E=92=E9=99=A4=E5=85=9A=E6=80=BB=E6=94=AF?= =?UTF-8?q?=E8=BF=99..?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluationindex/impl/EvaluationIndexServiceImpl.java | 2 +- .../resources/mapper/evaluationindex/EvaluationIndexDao.xml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java index 1d5998dcdd..7fa4518b2d 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java @@ -202,7 +202,7 @@ public class EvaluationIndexServiceImpl implements EvaluationIndexService { //2-1.直属下级组织列表 //2.判断客户是否存在子客户 List list = customerRelation.haveSubCustomer(dto.getCustomerId()); - if (!CollectionUtils.isNotEmpty(list)) { + if (CollectionUtils.isEmpty(list)) { agencyList = evaluationIndexDao.getSubAgencyListByAgency(agencyId, null, null); } else { list.add(dto.getCustomerId()); diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/evaluationindex/EvaluationIndexDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/evaluationindex/EvaluationIndexDao.xml index b66738866f..70c5f2d7d6 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/evaluationindex/EvaluationIndexDao.xml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/evaluationindex/EvaluationIndexDao.xml @@ -165,6 +165,11 @@ AND parent_area_code = #{areaCode} + + + AND PIDS like concat(#{agencyId},'%') + AND LEVEL = 'community' + AND pid = #{agencyId} From 4714470319d40ff79933381a6ce43da6434bf438 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Wed, 30 Mar 2022 09:14:12 +0800 Subject: [PATCH 13/75] =?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 --- .../service/impl/IcNoticeServiceImpl.java | 44 +++++++++++++------ .../service/impl/IcResiUserServiceImpl.java | 4 +- .../main/resources/mapper/IcResiUserDao.xml | 2 +- 3 files changed, 34 insertions(+), 16 deletions(-) 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 9b3698798d..3a224d8540 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 @@ -5,14 +5,17 @@ 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.*; +import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.enums.ChannelEnum; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.SmsTemplateConstant; import com.epmet.constant.UserMessageTypeConstant; import com.epmet.dao.IcNoticeDao; import com.epmet.dto.IcNoticeDTO; +import com.epmet.dto.UserBaseInfoDTO; import com.epmet.dto.form.IcNoticeFormDTO; import com.epmet.dto.form.ProjectSendMsgFormDTO; import com.epmet.dto.form.SendNoticeFormDTO; @@ -20,6 +23,7 @@ import com.epmet.dto.form.UserMessageFormDTO; import com.epmet.entity.IcNoticeEntity; import com.epmet.feign.MessageFeignClient; import com.epmet.service.IcNoticeService; +import com.epmet.service.UserBaseInfoService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import lombok.extern.slf4j.Slf4j; @@ -44,6 +48,8 @@ public class IcNoticeServiceImpl extends BaseServiceImpl page(IcNoticeFormDTO formDTO) { @@ -123,8 +129,14 @@ public class IcNoticeServiceImpl extends BaseServiceImpl entityList = formDTO.getUserList().stream().map(item -> { IcNoticeEntity entity = new IcNoticeEntity(); entity.setCustomerId(formDTO.getCustomerId()); @@ -134,7 +146,7 @@ public class IcNoticeServiceImpl extends BaseServiceImpl smsList = new ArrayList<>(); entityList.forEach(item -> { - if (StringUtils.isNotBlank(item.getUserId())) { - UserMessageFormDTO messageFormDTO = new UserMessageFormDTO(); - messageFormDTO.setCustomerId(item.getCustomerId()); - messageFormDTO.setApp(AppClientConstant.APP_GOV); - messageFormDTO.setGridId(StrConstant.STAR); - messageFormDTO.setUserId(item.getUserId()); - messageFormDTO.setTitle("您有一条通知消息!"); - messageFormDTO.setMessageContent(item.getContent()); - messageFormDTO.setReadFlag(Constant.UNREAD); - messageFormDTO.setMessageType(UserMessageTypeConstant.ANTIEPIDEMIC); - messageFormDTO.setTargetId(item.getId()); - msgList.add(messageFormDTO); + if (StringUtils.isNotBlank(item.getIdCard())) { + //根据身份证获取居民ID + List userList = userBaseInfoService.getCommonIdNumUser(item.getCustomerId(), item.getIdCard()); + if (CollectionUtils.isNotEmpty(userList)) { + userList.forEach(user -> { + UserMessageFormDTO messageFormDTO = new UserMessageFormDTO(); + messageFormDTO.setCustomerId(item.getCustomerId()); + messageFormDTO.setApp(AppClientConstant.APP_GOV); + messageFormDTO.setGridId(StrConstant.STAR); + messageFormDTO.setUserId(user.getUserId()); + messageFormDTO.setTitle("您有一条通知消息!"); + messageFormDTO.setMessageContent(item.getContent()); + messageFormDTO.setReadFlag(Constant.UNREAD); + messageFormDTO.setMessageType(UserMessageTypeConstant.ANTIEPIDEMIC); + messageFormDTO.setTargetId(item.getId()); + msgList.add(messageFormDTO); + }); + } } //TODO 短信消息 if (StringUtils.isNotBlank(item.getMobile())) { 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 b100c64741..e243b38459 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 @@ -1267,7 +1267,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl houseInfoMap = houseInfoDTOList.stream().collect(Collectors.toMap(HouseInfoDTO::getHomeId, Function.identity())); if (houseInfoMap.containsKey(result.getHomeId()) && null != houseInfoMap.get(result.getHomeId())) { HouseInfoDTO houseInfoDTO = houseInfoMap.get(result.getHomeId()); - result.setHomeId(houseInfoDTO.getAllName()); + result.setHouseName(houseInfoDTO.getAllName()); } } return result; 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 2b040cd4cd..c68d4e504e 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 @@ -690,7 +690,7 @@ AND MOBILE LIKE concat( '%', #{mobile}, '%' ) - AND ID_CARD LIKE concat( '%', #{idCard}, '%' ) + AND a.ID_CARD LIKE concat( '%', #{idCard}, '%' ) ) t WHERE From b8f4b60278fda772ad70c37a6dab9e7c82393cfa Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Wed, 30 Mar 2022 09:25:56 +0800 Subject: [PATCH 14/75] =?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 --- .../main/java/com/epmet/service/impl/IcResiUserServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 e243b38459..e7d124a71d 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 @@ -1300,7 +1300,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl houseIds = new HashSet<>(); houseIds.add(result.getHomeId()); - Result> houseInfoRes=govOrgOpenFeignClient.queryListHouseInfo(new HashSet<>(houseIds),formDTO.getCustomerId()); + Result> houseInfoRes = govOrgOpenFeignClient.queryListHouseInfo(houseIds, formDTO.getCustomerId()); List houseInfoDTOList = houseInfoRes.success() && !CollectionUtils.isEmpty(houseInfoRes.getData()) ? houseInfoRes.getData() : new ArrayList<>(); Map houseInfoMap = houseInfoDTOList.stream().collect(Collectors.toMap(HouseInfoDTO::getHomeId, Function.identity())); if (houseInfoMap.containsKey(result.getHomeId()) && null != houseInfoMap.get(result.getHomeId())) { From ecd57d1f14bfba1b140feaaf1df8f0da3714148c Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Wed, 30 Mar 2022 09:30:07 +0800 Subject: [PATCH 15/75] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E6=A0=B8=E9=85=B8?= =?UTF-8?q?=E6=A3=80=E6=B5=8B=E7=9A=84=E7=B1=BB=E5=9E=8Bother->import?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/excel/handler/IcNatExcelImportListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/handler/IcNatExcelImportListener.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/handler/IcNatExcelImportListener.java index f6c83e9440..ebfb593947 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/handler/IcNatExcelImportListener.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/handler/IcNatExcelImportListener.java @@ -70,7 +70,7 @@ public class IcNatExcelImportListener implements ReadListener Date: Wed, 30 Mar 2022 09:32:20 +0800 Subject: [PATCH 16/75] =?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 17/75] =?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 18/75] =?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 19/75] =?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 20/75] =?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 21/75] =?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 22/75] =?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 23/75] =?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 24/75] =?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 25/75] =?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 26/75] =?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 27/75] =?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 28/75] =?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 29/75] =?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 30/75] =?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 31/75] =?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 32/75] =?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 33/75] =?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 34/75] =?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(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Vl>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 35/75] 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 36/75] =?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 37/75] =?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 38/75] =?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 39/75] 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 40/75] 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 41/75] =?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 42/75] =?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 43/75] 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 44/75] 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 45/75] =?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`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@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 46/75] =?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 ( From b527890173471190f62da3ae294557449afbe425 Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Thu, 31 Mar 2022 09:55:19 +0800 Subject: [PATCH 47/75] =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E6=A0=B7=E4=BE=8B?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/excel/ic_nat.xlsx | Bin 9114 -> 9157 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/resources/excel/ic_nat.xlsx b/epmet-user/epmet-user-server/src/main/resources/excel/ic_nat.xlsx index 4d7df5944a91e416a31a21891975ba1778567252..d74d726f950651308593eff7a73765535b44aff8 100644 GIT binary patch delta 4467 zcmV-(5sdDdN5x05lK}+=gf<8>lb8V>f5A_~AQZ;$CjJi%_ZHetvyrwtXm--X#2Sq^ z0&g9$Py%Q-|9WY=%^E#;1HSM5-uHOLdav5(1FVysE>W5g6oKZQkh&?+Q@x3oC~}@@ z!P-tki4Ne9XfHOj_u>#Ko^9&Eb*qn*zh!p&cH1D<@0fJ*_L4o!Tr%8&xy&kM`e-@0&%&DY5 zm@v~Z?wl?7B%a-SC(p*d?~^_sV}$%Ee!0JU97m0%9{!30stUm=x4?X7tDfm*FPZ+_ zg+qa7N^p&#CM$?2w4qa|lk%M3Gu+l2RAnT~Vv@(%vQAetT~I<^2iA}Jq3!gb!V0(Y zU&K7E$%{&nl@cC5^WQqM1`d6xT_u`H|PP{GZn}!I;1|athBHfrZjx> z_~yg0CnpaHcQ#ZiCejdL*GCRbBN4N76{4?S7Vn10QJSPN;Uc9W+EIm0rmtU3wnE;i zHKp1ChE#=Ut#vl`e>@efX+o4MGMd89Qpkj8c$F(pWs;KEIwjoe_|k*6R?BT-@sn z`-AEmRglkOfBS*5)mnqPfg2!4xPb!dg0F&{0F3C|6n}WgxiW+AUpSEnPc3HwZ>S6|6~Mb>{zw zdLB}5^+`` zOt%=9*`Z;6XgEJKEcOf@$f-3!yS$*uSVIK;P;0^mn%am?6ESNex=qBqjp#KI=WRs4 ziCDA|e?g6C1PZ~t5U8=*!qkBdYImFKvkGAfgNOB}iJDcY=Y$QLh!c{Tc5|Xod;gM0Rt(9#=Rk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-1xa-G!ik*sttdR8wm zERkLiff7|<2|%KYL<`m)B@(VZe|eBIKDI)QpT2xNes~f~gr-~z_)!IkL?cUY5J&Vz zNj8yN!$+4Fwx0EZ20X48^1y3a`~N&0KmU0w7nQ?F3w+KnEmi^-6Nrkyq?@xup`4?kyZMJnl1Mxq>c z{26PKN@CKqH~H}R?4v&_2@E1}VAV>3=Je^uXUFeO?mva3Kl$MAOrXe_x>UzZPq5$v zTm(-@=}z@#F#>Gk8<7W1)4rJEEcwIgkD10Iccc!ys<-%VW#mkoZ1ye9zm)!x-yk# z85OkUyMdUOU_iopChJ4x!ncLaH@d^V?5N56 z@8YLXz(@41x14)^guCdd$@@3a(?cZv+lSGcAw2Q}|CLeTbkv{jY&F~4JEp$Ys&2K` zjGA3vYuC57*Xl-hYkS*lSM_T5XAm*yH|%a4YR1g(*bSXt;D`PoTJOO_N&aBq^z7MR zvTIk`@o(8dI43tk7w!tEu~hln$+eEkeIV*%xIk?HEjFSOvftR-{6A1j0|XQR000O8 zhfd-^44Vt35&-}Jpp)Jh9Dk6_O2a@Dh4+H*5N2;Dx)6~`y7LM20fuC30?kawjH0_l z=t6=&&_xx4C|z{nqAseo38gQSnIvyvBnx5a@_yer9Jr`|6%36_5^zvF!tDDt!R~2LRn(3~N zlj=UzX}eJtQ~9!Po)brMwUJq_Cz_{)if8{6wjZ{C0kb0-uLT0-9h1}_KLJgX6d*GJ zag#_OlLb}jiE%NL;2=~1<&!lbKnD{9004MwFOw}J9Fv$K4gr~yry({0z?0q~EgKA* z3#AeP005u?000yK0000000031AOHXWw38+xCmUY#E+=ma005~^000dD0000000031 zAOHXW8k1-uIs)ehlcXXw0S=SeB0vK88Iv3%I{`G4SR)}EkxzneQ3C(~=?4G+7ytkO e000000RSKX003YFlYRsmldmHX27Mm@0002I$43?b From ba47901de89a8db8923d20283bdec16e072aff6d Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 31 Mar 2022 10:36:07 +0800 Subject: [PATCH 48/75] =?UTF-8?q?=E5=8F=82=E6=95=B0=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=EF=BC=8C=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 | 4 + .../epmet/dto/form/IcTripReportFormDTO.java | 4 +- .../IcTripReportRecordController.java | 76 ++++++++++- .../excel/data/IcTripReportExcelData.java | 75 +++++++++++ .../IcTripReportExcelImportListener.java | 113 ++++++++++++++++ .../service/IcTripReportRecordService.java | 7 + .../impl/IcTripReportRecordServiceImpl.java | 124 +++++++++++++++++- 7 files changed, 396 insertions(+), 7 deletions(-) create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/excel/data/IcTripReportExcelData.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/excel/handler/IcTripReportExcelImportListener.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 46b99ffea4..e15f7f5057 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 @@ -22,6 +22,10 @@ public interface ImportTaskConstants { * 核酸检测 */ String BIZ_TYPE_IC_NAT = "ic_nat"; + /** + * 行程上报 + */ + String BIZ_TYPE_IC_TRIP_REPORT = "ic_trip_report"; /** * 处理状态:处理中 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 3de314d424..d9a7f4d565 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 @@ -74,7 +74,7 @@ public class IcTripReportFormDTO implements Serializable { /** * 现居地编码路径:"presentAddressPathCode":"37,3702,370203,370203026,370203026002" */ - @NotBlank(message = "现居地编码不能为空", groups = {ResiUserRequired.class}) + @NotBlank(message = "现居地编码路径不能为空", groups = {ResiUserRequired.class}) private String presentAddressPathCode; /** @@ -98,7 +98,7 @@ public class IcTripReportFormDTO implements Serializable { /** * 来源地编码路径: "sourceAddressPathCode": "37,3702,370203,370203026,370203026002" */ - @NotBlank(message = "来自地区编码不能为空", groups = {ResiUserRequired.class}) + @NotBlank(message = "来自地编码路径不能为空", groups = {ResiUserRequired.class}) private String sourceAddressPathCode; /** 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 4b4fff68f8..4c06646ee1 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 @@ -5,18 +5,30 @@ 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.AppClientConstant; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.dto.form.PageFormDTO; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; +import com.epmet.commons.tools.exception.ExceptionUtils; +import com.epmet.commons.tools.feign.ResultDataResolver; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.EpmetRequestHolder; import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.FileUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.constant.IcResiUserConstant; +import com.epmet.constants.ImportTaskConstants; import com.epmet.dto.IcTripReportRecordDTO; import com.epmet.dto.form.IcTripReportFormDTO; +import com.epmet.dto.form.ImportTaskCommonFormDTO; import com.epmet.dto.form.MyReportedTripFormDTO; import com.epmet.dto.form.PageTripReportFormDTO; +import com.epmet.dto.result.ImportTaskCommonResultDTO; +import com.epmet.feign.EpmetCommonServiceOpenFeignClient; import com.epmet.service.IcTripReportRecordService; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; @@ -25,28 +37,34 @@ import org.apache.commons.lang3.ArrayUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpHeaders; import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletResponse; +import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.net.URLEncoder; +import java.nio.file.Path; import java.util.List; +import java.util.UUID; /** * 行程上报信息 * * @author generator generator@elink-cn.com - * @since v1.0.0 2022-03-25 + * @since v10.0 2022-03-25 */ @Slf4j @RestController @RequestMapping("tripreport") -public class IcTripReportRecordController { +public class IcTripReportRecordController implements ResultDataResolver { @Autowired private IcTripReportRecordService icTripReportRecordService; + @Autowired + private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient; /** * pc: 行程上报-列表 @@ -203,4 +221,58 @@ public class IcTripReportRecordController { } } } + + + /** + * 导入excel + * @return + */ + @PostMapping("import") + public Result importExcel(MultipartFile file) { + String userId = EpmetRequestHolder.getHeader(AppClientConstant.USER_ID); + + // 1.暂存文件 + String originalFilename = file.getOriginalFilename(); + String extName = originalFilename.substring(originalFilename.lastIndexOf(".")); + + Path fileSavePath; + try { + Path importPath = FileUtils.getAndCreateDirUnderEpmetFilesDir("ic_trip_preport", "import"); + fileSavePath = importPath.resolve(UUID.randomUUID().toString().concat(extName)); + } catch (IOException e) { + String errorMsg = ExceptionUtils.getErrorStackTrace(e); + log.error("【行程上报导入】创建临时存储文件失败:{}", errorMsg); + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "文件上传失败", "文件上传失败"); + } + + InputStream is = null; + FileOutputStream os = null; + + try { + is = file.getInputStream(); + os = new FileOutputStream(fileSavePath.toString()); + IOUtils.copy(is, os); + } catch (Exception e) { + e.printStackTrace(); + } finally { + org.apache.poi.util.IOUtils.closeQuietly(is); + org.apache.poi.util.IOUtils.closeQuietly(os); + } + + // 2.生成导入任务记录 + ImportTaskCommonFormDTO importTaskForm = new ImportTaskCommonFormDTO(); + importTaskForm.setOperatorId(userId); + importTaskForm.setBizType(ImportTaskConstants.BIZ_TYPE_IC_TRIP_REPORT); + importTaskForm.setOriginFileName(originalFilename); + + ImportTaskCommonResultDTO rstData = getResultDataOrThrowsException(commonServiceOpenFeignClient.createImportTask(importTaskForm), + ServiceConstant.EPMET_COMMON_SERVICE, + EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), + "excel行程上报导入错误", + "行程上报导入失败"); + + // 3.执行导入 + icTripReportRecordService.execAsyncExcelImport(fileSavePath, rstData.getTaskId()); + return new Result(); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/data/IcTripReportExcelData.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/data/IcTripReportExcelData.java new file mode 100644 index 0000000000..f6f2a86e42 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/data/IcTripReportExcelData.java @@ -0,0 +1,75 @@ +package com.epmet.excel.data; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.util.Date; + + +/** + * 行程上报excel数据 + */ +@Data +public class IcTripReportExcelData { + @NotBlank(message = "姓名为必填项") + @ExcelProperty("姓名") + private String name; + + @NotBlank(message = "身份证号为必填项") + @ExcelProperty("身份证号") + private String idCard; + + @NotBlank(message = "手机号为必填项") + @ExcelProperty("手机号") + private String mobile; + + @NotBlank(message = "现居地为必填项") + @ExcelProperty("现居地(格式:省-市-区-街道-社区)") + private String presentAddress; + + @NotBlank(message = "详细地址为必填项") + @ExcelProperty("详细地址") + private String detailAddress; + + @NotBlank(message = "来自地区为必填项") + @ExcelProperty("来自地区(格式:省-市-区-街道-社区)") + private String sourceAddress; + + @NotNull(message = "来到本地时间为必填项") + @ExcelProperty("来到本地时间(格式:2022-01-01)") + private Date arriveDate; + + @ExcelProperty("离开本地时间(格式:2022-01-01)") + private Date leaveDate; + + /** + * 备注信息 + */ + @Length(max = 500,message = "备注不能超过500字") + @ExcelProperty("备注(500字以内)") + private String remark; + + @Data + public static class ErrorRow { + + @ExcelProperty("姓名") + @ColumnWidth(20) + private String name; + + @ColumnWidth(20) + @ExcelProperty("身份证号") + private String idCard; + + @ExcelProperty("手机号") + @ColumnWidth(20) + private String mobile; + + @ColumnWidth(60) + @ExcelProperty("错误信息") + private String errorInfo; + } +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/handler/IcTripReportExcelImportListener.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/handler/IcTripReportExcelImportListener.java new file mode 100644 index 0000000000..e0531d7303 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/handler/IcTripReportExcelImportListener.java @@ -0,0 +1,113 @@ +package com.epmet.excel.handler; + +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.read.listener.ReadListener; +import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +import com.epmet.commons.tools.exception.ExceptionUtils; +import com.epmet.commons.tools.exception.ValidateException; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.constant.IcResiUserConstant; +import com.epmet.entity.IcTripReportRecordEntity; +import com.epmet.excel.data.IcTripReportExcelData; +import com.epmet.service.impl.IcTripReportRecordServiceImpl; +import lombok.extern.slf4j.Slf4j; + +import java.util.ArrayList; +import java.util.List; + + +/** + * 行程上报excel导入监听器 + */ +@Slf4j +public class IcTripReportExcelImportListener implements ReadListener { + + + /** + * 最大条数阈值 + */ + public static final int MAX_THRESHOLD = 2; + /** + * 当前操作用户 + */ + private CustomerStaffInfoCacheResult staffInfo; + + /** + * 数据 + */ + private List datas = new ArrayList<>(); + + /** + * 错误项列表 + */ + private List errorRows = new ArrayList<>(); + + private IcTripReportRecordServiceImpl tripReportRecordService; + + public IcTripReportExcelImportListener(CustomerStaffInfoCacheResult staffInfo, IcTripReportRecordServiceImpl tripReportRecordService) { + this.staffInfo = staffInfo; + this.tripReportRecordService = tripReportRecordService; + } + + @Override + public void invoke(IcTripReportExcelData data, AnalysisContext context) { + + try { + // 先校验数据 + ValidatorUtils.validateEntity(data); + + IcTripReportRecordEntity tripReportRecordEntity = ConvertUtils.sourceToTarget(data, IcTripReportRecordEntity.class); + tripReportRecordEntity.setAgencyId(staffInfo.getAgencyId()); + tripReportRecordEntity.setPids(staffInfo.getAgencyPIds()); + tripReportRecordEntity.setUserType(IcResiUserConstant.USER_TYPE_IMPORT); + datas.add(tripReportRecordEntity); + + if (datas.size() == MAX_THRESHOLD) { + execPersist(); + } + } catch (Exception e) { + String errorMsg = null; + if (e instanceof ValidateException) { + errorMsg = ((ValidateException) e).getMsg(); + } else { + errorMsg = "未知错误"; + log.error("【行程上报导入】出错:{}", ExceptionUtils.getErrorStackTrace(e)); + } + + IcTripReportExcelData.ErrorRow errorRow = new IcTripReportExcelData.ErrorRow(); + errorRow.setName(data.getName()); + errorRow.setMobile(data.getMobile()); + errorRow.setIdCard(data.getIdCard()); + errorRow.setErrorInfo(errorMsg); + errorRows.add(errorRow); + } + } + + @Override + public void doAfterAllAnalysed(AnalysisContext context) { + // 最后几条达不到阈值,这里必须再调用一次 + execPersist(); + } + + /** + * 执行持久化 + */ + private void execPersist() { + try { + if (datas != null && datas.size() > 0) { + tripReportRecordService.batchPersist(datas); + } + } finally { + datas.clear(); + } + } + + /** + * 获取错误行 + * @return + */ + public List getErrorRows() { + return errorRows; + } +} 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 a7f961542d..66ec0d9f9e 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 @@ -9,6 +9,7 @@ import com.epmet.dto.form.PageTripReportFormDTO; import com.epmet.dto.result.TripListDTO; import com.epmet.entity.IcTripReportRecordEntity; +import java.nio.file.Path; import java.util.List; import java.util.Map; @@ -93,4 +94,10 @@ public interface IcTripReportRecordService extends BaseService tripList(String customerId, String idCard); + + /** + * 执行Excel导入 + * @param filePath + */ + void execAsyncExcelImport(Path filePath, String importTaskId); } \ 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 5c42a0d00e..e8597fed16 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,28 +1,38 @@ package com.epmet.service.impl; +import com.alibaba.excel.EasyExcel; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; 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.exception.ExceptionUtils; +import com.epmet.commons.tools.feign.ResultDataResolver; 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.DateUtils; +import com.epmet.commons.tools.utils.*; import com.epmet.constant.IcResiUserConstant; +import com.epmet.constants.ImportTaskConstants; 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.dto.result.UploadImgResultDTO; import com.epmet.entity.IcTripReportRecordEntity; +import com.epmet.excel.data.IcTripReportExcelData; +import com.epmet.excel.handler.IcTripReportExcelImportListener; +import com.epmet.feign.EpmetCommonServiceOpenFeignClient; +import com.epmet.feign.OssFeignClient; import com.epmet.service.IcEpidemicSpecialAttentionService; import com.epmet.service.IcNoticeService; import com.epmet.service.IcTripReportRecordService; @@ -32,11 +42,21 @@ 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.fileupload.FileItem; +import org.apache.commons.fileupload.FileItemFactory; +import org.apache.commons.fileupload.disk.DiskFileItemFactory; import org.apache.commons.lang3.StringUtils; +import org.apache.http.entity.ContentType; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.multipart.commons.CommonsMultipartFile; +import java.io.IOException; +import java.io.OutputStream; +import java.nio.file.Files; +import java.nio.file.Path; import java.util.*; import java.util.stream.Collectors; @@ -48,7 +68,7 @@ import java.util.stream.Collectors; */ @Slf4j @Service -public class IcTripReportRecordServiceImpl extends BaseServiceImpl implements IcTripReportRecordService { +public class IcTripReportRecordServiceImpl extends BaseServiceImpl implements IcTripReportRecordService, ResultDataResolver { @Autowired private UserBaseInfoDao userBaseInfoDao; //关注 @@ -57,6 +77,11 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl errorRows = listener.getErrorRows(); + + // 生成并上传错误文件 + try { + // 文件生成 + Path errorDescDir = FileUtils.getAndCreateDirUnderEpmetFilesDir("ic_trip_preport", "import", "error_des"); + String fileName = UUID.randomUUID().toString().concat(".xlsx"); + errorDescFile = errorDescDir.resolve(fileName); + + FileItemFactory factory = new DiskFileItemFactory(16, errorDescDir.toFile()); + FileItem fileItem = factory.createItem("file", ContentType.APPLICATION_OCTET_STREAM.toString(), true, fileName); + OutputStream os = fileItem.getOutputStream(); + + EasyExcel.write(os, IcTripReportExcelData.ErrorRow.class).sheet("导入失败列表").doWrite(errorRows); + + // 文件上传oss + Result errorDesFileUploadResult = ossFeignClient.uploadImportTaskDescFile(new CommonsMultipartFile(fileItem)); + if (errorDesFileUploadResult.success()) { + errorDesFileUrl = errorDesFileUploadResult.getData().getUrl(); + } + } finally { + if (Files.exists(errorDescFile)) { + Files.delete(errorDescFile); + } + } + ImportTaskCommonFormDTO importFinishTaskForm = new ImportTaskCommonFormDTO(); + importFinishTaskForm.setTaskId(importTaskId); + importFinishTaskForm.setProcessStatus(errorRows.size() <= 0 ? ImportTaskConstants.PROCESS_STATUS_FINISHED_SUCCESS : ImportTaskConstants.PROCESS_STATUS_FINISHED_FAIL); + importFinishTaskForm.setOperatorId(userId); + importFinishTaskForm.setResultDesc(""); + importFinishTaskForm.setResultDescFilePath(errorDesFileUrl); + + Result result = commonServiceOpenFeignClient.finishImportTask(importFinishTaskForm); + if (!result.success()) { + log.error("【行程上报导入】finishImportTask失败"); + } + } catch (Exception e) { + String errorMsg = ExceptionUtils.getErrorStackTrace(e); + log.error("【行程上报导入】出错:{}", errorMsg); + + ImportTaskCommonFormDTO importFinishTaskForm = new ImportTaskCommonFormDTO(); + importFinishTaskForm.setTaskId(importTaskId); + importFinishTaskForm.setProcessStatus(ImportTaskConstants.PROCESS_STATUS_FINISHED_FAIL); + importFinishTaskForm.setOperatorId(userId); + importFinishTaskForm.setResultDesc("导入失败"); + + Result result = commonServiceOpenFeignClient.finishImportTask(importFinishTaskForm); + if (!result.success()) { + log.error("【行程上报导入】导入记录状态修改为'完成'失败"); + } + } finally { + // 删除临时文件 + if (Files.exists(filePath)) { + try { + Files.delete(filePath); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + + } + + /** + * 批量持久化 + * @param entities + */ + public void batchPersist(List entities) { + String currentUserId = EpmetRequestHolder.getHeader(AppClientConstant.USER_ID); + entities.forEach(e -> { + String id = IdWorker.getIdStr(e); + e.setId(id); + e.setUpdatedBy(currentUserId); + baseDao.insert(e); + }); + } } \ No newline at end of file From 4f7bc79e97c0107f60f64a7dd6a5048f548a3627 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 31 Mar 2022 10:47:48 +0800 Subject: [PATCH 49/75] excel --- .../epmet/controller/IcTripReportRecordController.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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 4c06646ee1..98e5e9bd47 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 @@ -15,10 +15,7 @@ import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.feign.ResultDataResolver; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; -import com.epmet.commons.tools.utils.EpmetRequestHolder; -import com.epmet.commons.tools.utils.ExcelUtils; -import com.epmet.commons.tools.utils.FileUtils; -import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.utils.*; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.constant.IcResiUserConstant; import com.epmet.constants.ImportTaskConstants; @@ -46,6 +43,7 @@ import java.io.IOException; import java.io.InputStream; import java.net.URLEncoder; import java.nio.file.Path; +import java.util.Date; import java.util.List; import java.util.UUID; @@ -202,7 +200,8 @@ public class IcTripReportRecordController implements ResultDataResolver { int pageNo = formDTO.getPageNo(); try { // 这里 需要指定写用哪个class去写 - String fileName = "行程上报.xlsx"; + String today= DateUtils.format(new Date(),DateUtils.DATE_PATTERN_MMDD); + String fileName = "行程上报信息".concat(today); excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), IcTripReportRecordDTO.class).build(); WriteSheet writeSheet = EasyExcel.writerSheet("Sheet1").build(); PageData data = null; From 0d1f3b77c051370f429ca36dbb09253a55db14da Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Thu, 31 Mar 2022 10:55:09 +0800 Subject: [PATCH 50/75] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E6=A0=B8=E9=85=B8?= =?UTF-8?q?=E6=A3=80=E6=B5=8B=EF=BC=9A=E6=B2=A1=E6=9C=89=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=EF=BC=8C=E8=B5=8B=E5=80=BC=E7=A9=BA=E4=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/excel/handler/IcNatExcelImportListener.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/handler/IcNatExcelImportListener.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/handler/IcNatExcelImportListener.java index ebfb593947..1d06cd6b0d 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/handler/IcNatExcelImportListener.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/handler/IcNatExcelImportListener.java @@ -60,7 +60,8 @@ public class IcNatExcelImportListener implements ReadListener Date: Thu, 31 Mar 2022 11:03:27 +0800 Subject: [PATCH 51/75] =?UTF-8?q?=E4=BA=BA=E5=91=98=E9=A2=84=E8=AD=A6?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/StatsResiWarnServiceImpl.java | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StatsResiWarnServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StatsResiWarnServiceImpl.java index 8a1648fdb4..aca5ac654b 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StatsResiWarnServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StatsResiWarnServiceImpl.java @@ -172,7 +172,23 @@ public class StatsResiWarnServiceImpl implements StatsResiWarnService { //根据buildingID,tableName he columnName获取名字 //限制条数 一栋楼内最多显示1000 即可 - PageHelper.startPage(NumConstant.ONE,NumConstant.ONE_THOUSAND,false).doSelectPage(()->{ + for (String s : buildingIdList) { + PageHelper.startPage(NumConstant.ONE,NumConstant.ONE_HUNDRED,false).doSelectPage(()->{ + List dtos = icStatsResiWarnDao.userWarnListDTO(customerId, Arrays.asList(s), icResiCategoryWarnConfigDTO.getTableName(), icResiCategoryWarnConfigDTO.getColumnName()); + if (!CollectionUtils.isEmpty(dtos)){ + Map> groupByBuild = dtos.stream().collect(Collectors.groupingBy(UserWarnNameListResultDTO::getBuildingId)); + result.forEach(item->{ + item.setConfigId(configId); + groupByBuild.forEach((k,v) -> { + if (item.getBuildingId().equals(k)){ + item.setUserList(v); + } + }); + }); + } + }); + } + /*PageHelper.startPage(NumConstant.ONE,NumConstant.ONE_THOUSAND,false).doSelectPage(()->{ List dtos = icStatsResiWarnDao.userWarnListDTO(customerId, buildingIdList, icResiCategoryWarnConfigDTO.getTableName(), icResiCategoryWarnConfigDTO.getColumnName()); if (!CollectionUtils.isEmpty(dtos)){ Map> groupByBuild = dtos.stream().collect(Collectors.groupingBy(UserWarnNameListResultDTO::getBuildingId)); @@ -185,7 +201,7 @@ public class StatsResiWarnServiceImpl implements StatsResiWarnService { }); }); } - }); + });*/ return mapResult; } From 360bd920de363603849a602749ff416aec2df307 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 31 Mar 2022 11:12:27 +0800 Subject: [PATCH 52/75] customerId --- .../IcTripReportExcelImportListener.java | 5 ++++- .../impl/IcTripReportRecordServiceImpl.java | 2 +- .../excel/trip_report_import_template.xlsx | Bin 9304 -> 9231 bytes 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/handler/IcTripReportExcelImportListener.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/handler/IcTripReportExcelImportListener.java index e0531d7303..20e9ed3dc5 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/handler/IcTripReportExcelImportListener.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/handler/IcTripReportExcelImportListener.java @@ -32,6 +32,7 @@ public class IcTripReportExcelImportListener implements ReadListener0O|=OB#J=X zEPLBp#6PlK((?2;Nhv{a;OL#%Z)d&r@}Rry9ehyMG>8@iWnhGr%4{3-v|i=cC<~Dr z$vbPHK}QH^*DK=V)}he_hbdd*{cfBG$U zT)gou;F6FltRZsABgX?UcV{9xA*DDY-QIU2Kne^UXfQEgT2TD$jo@|ovtd+bPOak6 zrJYW3=WHn^@$5bXbvE{WU-Z=&Bju;~<^Jw*Ts2o__$vXZt)*bX1CQ3XM`b?tR)ebX ztePBSpveX@OC#76=u3I7Zf@5rE!38zEOS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VXG%7dsPX*HM=w5-=kKavU7tYoW>x}F6Lq^8N7XI z&wxR7vQ-3aWFnpld`$(8k;zM~ZAK3D=PB)Y(6Zxl(K}|WdqxC^_a}^g3-BA0c$f0? zsY>SYlfM4)d1SsuNO7$&J?ha#U2VO9`gwi?v8w@iiq! z2h>kPblFxPD)NutZ*J|^ErhQh^ZM|2O)#PCA+W)wl$t3AX|HIjfq}0_iHb=~0V09c z8fc7C)Y9l8>iXB=Phjv9LDN&_dJ=+CG#jTfA%qoe&nZqQ!iq+7X8(`3A_z4l*hT|T zWda6t7gUtM0(}IPB8+518?mvX)wyU`{*yC*sq{ApK%9SbB^trS$M^qb(f{GU{;H(^ z6-nqUC?|S}i;Cbg8qXy~hzFx@z<1HI+=2w}(JtKb3Xh2YdpO9~-wWyP;(|ho80ruZ e(*33BzsdWbX2!qP{QD3%dWl!Vlz From 3e304056f0e8c87f73b5c2a3237c32b32501dabe Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 31 Mar 2022 11:16:57 +0800 Subject: [PATCH 53/75] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E4=B8=8A=E6=8A=A5=E8=80=97=E6=97=B6log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/DataReportingServiceImpl.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java index 0752b72424..e7a0d926c0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java @@ -137,11 +137,14 @@ public class DataReportingServiceImpl implements DataReportingService { public List getEventInfo(EventInfoFormDTO formDTO) { List list; //根据入参,获取项目 + long start = System.currentTimeMillis(); List projectList = screenProjectDataService.getProjectList(formDTO.getCustomerId(), formDTO.getProjectId(), formDTO.getPageNo(), formDTO.getPageSize()); + log.error("事件上报-查询项目列表耗时:{}ms",System.currentTimeMillis()-start + "\n项目数:" + formDTO.getProjectId().size()); //项目列表为空,返回空数组 if(CollectionUtils.isEmpty(projectList)) { return Collections.emptyList(); } + start = System.currentTimeMillis(); Map epmetCodeMap = new HashMap<>(); Result parentCustomer = operCrmOpenFeignClient.getExternalAndParentCustomerId(formDTO.getCustomerId()); if (StringUtils.isNotBlank(parentCustomer.getData())) { @@ -194,6 +197,7 @@ public class DataReportingServiceImpl implements DataReportingService { return dto; }).collect(Collectors.toList()); } + log.error("事件上报-组装数据耗时:{}ms",System.currentTimeMillis()-start); return list.stream().collect(collectingAndThen(toCollection(() -> new TreeSet<>(Comparator.comparing(EventInfoResultDTO::getId))), ArrayList::new)); } From 7dddebd243c1b56aff073e2ab0c33bd1fed239cb Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 31 Mar 2022 11:49:09 +0800 Subject: [PATCH 54/75] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E4=B8=8A=E6=8A=A5=E8=80=97=E6=97=B6log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/DataReportingServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java index e7a0d926c0..3bc6b5969d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java @@ -139,7 +139,7 @@ public class DataReportingServiceImpl implements DataReportingService { //根据入参,获取项目 long start = System.currentTimeMillis(); List projectList = screenProjectDataService.getProjectList(formDTO.getCustomerId(), formDTO.getProjectId(), formDTO.getPageNo(), formDTO.getPageSize()); - log.error("事件上报-查询项目列表耗时:{}ms",System.currentTimeMillis()-start + "\n项目数:" + formDTO.getProjectId().size()); + log.error("事件上报-查询项目列表耗时:{}ms",System.currentTimeMillis()-start); //项目列表为空,返回空数组 if(CollectionUtils.isEmpty(projectList)) { return Collections.emptyList(); From a899d1107c3c8ed7ed85a8ec796e5df6be61a889 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 31 Mar 2022 13:37:56 +0800 Subject: [PATCH 55/75] 2 --- .../service/impl/IcEpidemicSpecialAttentionServiceImpl.java | 2 +- .../com/epmet/service/impl/IcTripReportRecordServiceImpl.java | 2 +- 2 files 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 83d2ed51cf..9b142bbf85 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 @@ -437,7 +437,7 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl(); } //关注类型,核酸检测:2,疫苗接种:1,行程上报:0 - return baseDao.getIdCardList(customerId,idCardSet,NumConstant.ZERO); + return baseDao.getIdCardList(customerId,idCardSet,NumConstant.TWO); } /** 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 27e2ab4f7a..e2c5ed7213 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 @@ -217,7 +217,7 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl Date: Thu, 31 Mar 2022 14:03:50 +0800 Subject: [PATCH 56/75] =?UTF-8?q?=E6=89=B9=E9=87=8F=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/form/SendNoticeFormDTO.java | 1 - 1 file changed, 1 deletion(-) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/SendNoticeFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/SendNoticeFormDTO.java index c4113e4f9b..bd24801531 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/SendNoticeFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/SendNoticeFormDTO.java @@ -42,7 +42,6 @@ public class SendNoticeFormDTO implements Serializable { /** * 组织名 */ - @NotNull(message = "组织名不能为空", groups = DefaultGroup.class) private String orgName; @NoArgsConstructor From b49d1bfec645b94eabf2762e63299e40bae47cce Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 31 Mar 2022 16:10:02 +0800 Subject: [PATCH 57/75] =?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 --- .../dto/form/EpidemicPreventionFormDTO.java | 3 +++ .../main/resources/mapper/IcResiUserDao.xml | 24 +++++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EpidemicPreventionFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EpidemicPreventionFormDTO.java index d848f1e545..9685df941a 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EpidemicPreventionFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EpidemicPreventionFormDTO.java @@ -64,4 +64,7 @@ public class EpidemicPreventionFormDTO extends PageFormDTO implements Serializab * 核酸检测次数 */ private Integer natCount; + + private String startDate; + private String endDate; } 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 ca26c6bf4e..425a17d3c3 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 @@ -656,8 +656,28 @@ IFNULL( c.count, 0 ) AS natCount FROM ic_resi_user a - LEFT JOIN ( SELECT ID_CARD, count( id ) AS count FROM ic_resi_vaccine WHERE DEL_FLAG = '0' AND CUSTOMER_ID = #{customerId} GROUP BY ID_CARD ) b ON a.ID_CARD = b.ID_CARD - LEFT JOIN ( SELECT ID_CARD, count( id ) AS count FROM ic_nat WHERE DEL_FLAG = '0' AND CUSTOMER_ID = #{customerId} GROUP BY ID_CARD ) c ON a.ID_CARD = c.ID_CARD + LEFT JOIN ( + SELECT ID_CARD, count( id ) AS count + FROM ic_resi_vaccine + WHERE DEL_FLAG = '0' AND CUSTOMER_ID = #{customerId} + + AND DATE_FORMAT(INOCULATE_TIME,"%Y-%m-%d") > #{startDate} + + + AND DATE_FORMAT(INOCULATE_TIME,"%Y-%m-%d") < #{endDate} + + GROUP BY ID_CARD ) b ON a.ID_CARD = b.ID_CARD + LEFT JOIN ( + SELECT ID_CARD, count( id ) AS count + FROM ic_nat + WHERE DEL_FLAG = '0' AND CUSTOMER_ID = #{customerId} + + AND DATE_FORMAT(NAT_TIME,"%Y-%m-%d") > #{startDate} + + + AND DATE_FORMAT(NAT_TIME,"%Y-%m-%d") < #{endDate} + + GROUP BY ID_CARD ) c ON a.ID_CARD = c.ID_CARD WHERE a.DEL_FLAG = '0' From aaa632d56c309ce65d1e737e78a87d21110be5e1 Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 31 Mar 2022 16:15:51 +0800 Subject: [PATCH 58/75] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E5=88=86=E6=9E=90=E6=B7=BB=E5=8A=A0=20=E8=AF=9D=E9=A2=98Id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/CategoryProjectResultDTO.java | 2 ++ .../dataaggre/dao/govissue/IssueDao.java | 18 +++++++++---- .../service/govissue/GovIssueService.java | 7 +++++ .../govissue/impl/GovIssueServiceImpl.java | 9 +++++++ .../impl/GovProjectServiceImpl.java | 27 ++++++++++++++----- .../resources/mapper/govissue/IssueDao.xml | 17 +++++++++++- 6 files changed, 67 insertions(+), 13 deletions(-) diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/CategoryProjectResultDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/CategoryProjectResultDTO.java index 5386febe19..8dc9102b84 100644 --- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/CategoryProjectResultDTO.java +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/CategoryProjectResultDTO.java @@ -54,6 +54,8 @@ public class CategoryProjectResultDTO implements Serializable { //二级分类code @JsonIgnore private String categoryCode; + + private String topicId; } } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govissue/IssueDao.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govissue/IssueDao.java index 17d16fd72d..39b9184284 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govissue/IssueDao.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govissue/IssueDao.java @@ -39,15 +39,15 @@ import java.util.List; public interface IssueDao extends BaseDao { /** - * @Description 查询议题【表决中、已关闭】 + * @Description 查询议题【表决中、已关闭】 * @Param gridIds * @author zxc * @date 2020/12/25 下午2:19 */ - List issueStatusClosedOrVoting(@Param("gridIds") List gridIds, @Param("issueStatus")String issueStatus); + List issueStatusClosedOrVoting(@Param("gridIds") List gridIds, @Param("issueStatus") String issueStatus); /** - * @Description 查询已转项目议题 + * @Description 查询已转项目议题 * @Param gridIds * @author zxc * @date 2020/12/25 下午5:27 @@ -72,7 +72,7 @@ public interface IssueDao extends BaseDao { **/ List selectClosedListGov(ClosedIssueListFormDTO fromDTO); - Integer selectIssueCount(@Param("gridIds") List gridIds,@Param("issueType")String issueType); + Integer selectIssueCount(@Param("gridIds") List gridIds, @Param("issueType") String issueType); List selectShiftProjectIssueList(@Param("customerId") String customerId, @Param("gridId") String gridId); @@ -81,4 +81,12 @@ public interface IssueDao extends BaseDao { * @author sun **/ List getCategoryList(@Param("customerId") String customerId, @Param("level") String level, @Param("isDisable") String isDisable); -} \ No newline at end of file + + /** + * desc:根据议题id获取对应的话题id + * + * @param ids + * @return + */ + List selectIssueTopicIdType(@Param("ids") List ids); +} diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/GovIssueService.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/GovIssueService.java index 3e87ea18d3..93001af72b 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/GovIssueService.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/GovIssueService.java @@ -52,4 +52,11 @@ public interface GovIssueService { * @author sun **/ List categoryList(String customerId, String level, String isDisable); + + /** + * desc:根据id 获取议题的话题的话题Id + * @param collect + * @return + */ + List selectIssueTopicIdType(List collect); } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/impl/GovIssueServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/impl/GovIssueServiceImpl.java index 5556d2d3f0..761adb17b2 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/impl/GovIssueServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/impl/GovIssueServiceImpl.java @@ -333,4 +333,13 @@ public class GovIssueServiceImpl implements GovIssueService { return issueDao.getCategoryList(customerId, level, isDisable); } + @Override + public List selectIssueTopicIdType(List ids) { + List dtoList = issueDao.selectIssueTopicIdType(ids); + if (CollectionUtils.isEmpty(dtoList)){ + return new ArrayList<>(); + } + return dtoList; + } + } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java index 6cd219c759..3c4ea9f65c 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java @@ -13,6 +13,7 @@ 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.security.dto.TokenDto; +import com.epmet.commons.tools.security.user.LoginUserUtil; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; @@ -23,7 +24,6 @@ import com.epmet.dataaggre.dto.datastats.result.FactAgencyProjectResultDTO; import com.epmet.dataaggre.dto.govissue.IssueProjectCategoryDictDTO; import com.epmet.dataaggre.dto.govissue.result.IssueInfoDTO; import com.epmet.dataaggre.dto.govissue.result.IssueListResultDTO; -import com.epmet.dataaggre.dto.govorg.result.GridsInfoListResultDTO; import com.epmet.dataaggre.dto.govproject.ProjectDTO; import com.epmet.dataaggre.dto.govproject.ProjectRelatedPersonnelDTO; import com.epmet.dataaggre.dto.govproject.ResiEventDTO; @@ -80,6 +80,8 @@ public class GovProjectServiceImpl implements GovProjectService { private EvaluationIndexService evaluationIndexService; @Autowired private EpmetUserService epmetUserService; + @Autowired + private LoginUserUtil loginUserUtil; /** * @Description 查询项目信息 @@ -415,13 +417,13 @@ public class GovProjectServiceImpl implements GovProjectService { formDTO.setToDateId(DateUtils.dateOrmonthId(formDTO.getDateId(), "date", 1)); //1.查询客户下分类信息 List categoryList = govIssueService.categoryList(formDTO.getCustomerId(), null, null); - List categoreCodeList = categoryList.stream().filter(ca -> ca.getParentCategoryCode().equals(formDTO.getCategoryCode())).map(m -> m.getCategoryCode()).collect(Collectors.toList()); + List categoreCodeList = categoryList.stream().filter(ca -> ca.getParentCategoryCode().equals(formDTO.getCategoryCode())).map(IssueProjectCategoryDictDTO::getCategoryCode).collect(Collectors.toList()); formDTO.setCategoreCodeList(categoreCodeList); //2.查询组织及下级截止某一天的某个一级分类下的项目列表 PageInfo result = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> projectDao.categoryProjectList(formDTO)); - if (org.springframework.util.CollectionUtils.isEmpty(result.getList())) { + if (CollectionUtils.isEmpty(result.getList())) { return resultDTO; } resultDTO.setTotal((int) result.getTotal()); @@ -431,7 +433,7 @@ public class GovProjectServiceImpl implements GovProjectService { List list = projectDao.getCategoryList(projectIds); //4.查询来源事件的项目上报的组织信息 - List eventIds = result.getList().stream().filter(re -> "resi_event".equals(re.getOrigin())).map(m -> m.getOriginId()).collect(Collectors.toList()); + List eventIds = result.getList().stream().filter(re -> "resi_event".equals(re.getOrigin())).map(CategoryProjectResultDTO.Project::getOriginId).collect(Collectors.toList()); List eventOrgList = projectDao.getEventOrgList(eventIds); Map eventMap = eventOrgList.stream().collect(Collectors.toMap(ResiEventReportOrgDTO::getResiEventId, Function.identity())); @@ -439,11 +441,19 @@ public class GovProjectServiceImpl implements GovProjectService { List eventUser = projectDao.getEventList(projectIds); List topicUser = projectDao.getTopicUser(projectIds); + //市北客户查询 下议题区分下来源 设置topicId + Map issueTopicSourceMap = new HashMap<>(); + if (CustomerIdConstant.SHI_BEI_CUSTOMER_ID.equals(loginUserUtil.getLoginUserCustomerId())){ + issueTopicSourceMap = govIssueService.selectIssueTopicIdType(result.getList().stream() + .filter(re -> "issue".equals(re.getOrigin())) + .map(CategoryProjectResultDTO.Project::getOriginId) + .collect(Collectors.toList())).stream().collect(Collectors.toMap(IssueInfoDTO::getIssueId,IssueInfoDTO::getTopicId)); + } + //5.封装数据 //组织或网格id->组织或网格名称 Map map = new HashMap<>(); - result.getList().forEach(re -> { - //所属组织 + for (CategoryProjectResultDTO.Project re : result.getList()) {//所属组织 if ("issue".equals(re.getOrigin())) { if (map.containsKey(re.getGridId())) { re.setOrgName(map.get(re.getGridId())); @@ -454,6 +464,9 @@ public class GovProjectServiceImpl implements GovProjectService { map.put(re.getGridId(), gridInfo.getGridName()); } } + //市北议题来源的设置话题Id + re.setTopicId(issueTopicSourceMap.get(re.getOriginId())); + } else if ("agency".equals(re.getOrigin())) { if (map.containsKey(re.getAgencyId())) { re.setOrgName(map.get(re.getAgencyId())); @@ -518,7 +531,7 @@ public class GovProjectServiceImpl implements GovProjectService { re.setUserId(to.getUserId()); } }); - }); + } resultDTO.setList(result.getList()); return resultDTO; diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueDao.xml index 90ecda4b20..495473205c 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueDao.xml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueDao.xml @@ -139,5 +139,20 @@ ORDER BY category_code + - \ No newline at end of file + From f1d8b445f28183eb132a122169a204fb174e364b Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 31 Mar 2022 16:16:11 +0800 Subject: [PATCH 59/75] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/IcNatRelationDTO.java | 82 +++++++++++++++++++ .../controller/IcNatRelationController.java | 24 ++++++ .../java/com/epmet/dao/IcNatRelationDao.java | 16 ++++ .../com/epmet/entity/IcNatRelationEntity.java | 52 ++++++++++++ .../epmet/service/IcNatRelationService.java | 14 ++++ .../impl/IcNatRelationServiceImpl.java | 19 +++++ .../resources/mapper/IcNatRelationDao.xml | 7 ++ 7 files changed, 214 insertions(+) create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcNatRelationDTO.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNatRelationController.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcNatRelationDao.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcNatRelationEntity.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcNatRelationService.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatRelationServiceImpl.java create mode 100644 epmet-user/epmet-user-server/src/main/resources/mapper/IcNatRelationDao.xml diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcNatRelationDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcNatRelationDTO.java new file mode 100644 index 0000000000..eade3aac7b --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcNatRelationDTO.java @@ -0,0 +1,82 @@ +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 核酸记录关系表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-31 + */ +@Data +public class IcNatRelationDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 居民端上报时存储用户所在网格的组织id.居民信息的人存储居民所在组织id.单个新增或者导入的存储登录用户所属的组织id + */ + private String agencyId; + + /** + * 组织pids,包含当前agencyId值 + */ + private String pids; + + /** + * 核酸记录表Id(ic_nat.id) + */ + private String icNatId; + + /** + * 关系数据的绑定途径【居民端录入:resi; +数字社区录入:icresi; +导入的:import; +同步的:synchro】 + */ + private String userType; + + /** + * 删除标识 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNatRelationController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNatRelationController.java new file mode 100644 index 0000000000..9fb17bbd23 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNatRelationController.java @@ -0,0 +1,24 @@ +package com.epmet.controller; + +import com.epmet.service.IcNatRelationService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + + +/** + * 核酸记录关系表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-31 + */ +@RestController +@RequestMapping("icNatRelation") +public class IcNatRelationController { + + @Autowired + private IcNatRelationService icNatRelationService; + + + +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcNatRelationDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcNatRelationDao.java new file mode 100644 index 0000000000..27b20bcfaf --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcNatRelationDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcNatRelationEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 核酸记录关系表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-31 + */ +@Mapper +public interface IcNatRelationDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcNatRelationEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcNatRelationEntity.java new file mode 100644 index 0000000000..7da911ee59 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcNatRelationEntity.java @@ -0,0 +1,52 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 核酸记录关系表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-31 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_nat_relation") +public class IcNatRelationEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 居民端上报时存储用户所在网格的组织id.居民信息的人存储居民所在组织id.单个新增或者导入的存储登录用户所属的组织id + */ + private String agencyId; + + /** + * 组织pids,包含当前agencyId值 + */ + private String pids; + + /** + * 核酸记录表Id(ic_nat.id) + */ + private String icNatId; + + /** + * 关系数据的绑定途径【居民端录入:resi; + 数字社区录入:icresi; + 导入的:import; + 同步的:synchro】 + */ + private String userType; + +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcNatRelationService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcNatRelationService.java new file mode 100644 index 0000000000..4d918aaea3 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcNatRelationService.java @@ -0,0 +1,14 @@ +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.IcNatRelationEntity; + +/** + * 核酸记录关系表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-31 + */ +public interface IcNatRelationService extends BaseService { + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatRelationServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatRelationServiceImpl.java new file mode 100644 index 0000000000..91e27f25a4 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatRelationServiceImpl.java @@ -0,0 +1,19 @@ +package com.epmet.service.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.dao.IcNatRelationDao; +import com.epmet.entity.IcNatRelationEntity; +import com.epmet.service.IcNatRelationService; +import org.springframework.stereotype.Service; + +/** + * 核酸记录关系表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-31 + */ +@Service +public class IcNatRelationServiceImpl extends BaseServiceImpl implements IcNatRelationService { + + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcNatRelationDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcNatRelationDao.xml new file mode 100644 index 0000000000..b9ebe8f3b0 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcNatRelationDao.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file From 71a0ed557578b1da2a30372c364b9db60a785029 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 31 Mar 2022 16:21:23 +0800 Subject: [PATCH 60/75] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/IcNatDTO.java | 5 +++++ .../src/main/java/com/epmet/entity/IcNatEntity.java | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcNatDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcNatDTO.java index 9c98833ed4..de70acadb5 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcNatDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcNatDTO.java @@ -41,6 +41,11 @@ public class IcNatDTO implements Serializable { */ private String pids; + /** + * 是否客户下居民(0:否 1:是) + */ + private String isResiUser; + /** * 居民端小程序的用户id、数字社区的icResiUserId、其他情况无值 */ diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcNatEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcNatEntity.java index 1fee4076a4..44833b62d3 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcNatEntity.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcNatEntity.java @@ -39,6 +39,11 @@ public class IcNatEntity extends BaseEpmetEntity { */ private String pids; + /** + * 是否客户下居民(0:否 1:是) + */ + private String isResiUser; + /** * 居民端小程序的用户id、数字社区的icResiUserId、其他情况无值 */ From d15d15b2cc6c8760a74c12c922e5a970058236de Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 31 Mar 2022 16:47:27 +0800 Subject: [PATCH 61/75] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=AD=9B=E9=80=89?= =?UTF-8?q?=E4=BA=BA=E5=91=98=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/EpidemicPreventionFormDTO.java | 16 +++- .../IcEpidemicPreventionController.java | 7 ++ .../java/com/epmet/dao/IcResiUserDao.java | 3 + .../com/epmet/service/IcResiUserService.java | 1 + .../service/impl/IcResiUserServiceImpl.java | 13 ++++ .../main/resources/mapper/IcResiUserDao.xml | 73 +++++++++++++++++++ 6 files changed, 111 insertions(+), 2 deletions(-) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EpidemicPreventionFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EpidemicPreventionFormDTO.java index 9685df941a..83d22c6a13 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EpidemicPreventionFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EpidemicPreventionFormDTO.java @@ -56,6 +56,16 @@ public class EpidemicPreventionFormDTO extends PageFormDTO implements Serializab * 身份证 */ private String idCard; + + /** + * 开始日期 + */ + private String startDate; + + /** + * 结束日期 + */ + private String endDate; /** * 疫苗接种次数 */ @@ -65,6 +75,8 @@ public class EpidemicPreventionFormDTO extends PageFormDTO implements Serializab */ private Integer natCount; - private String startDate; - private String endDate; + /** + * 关注类型,核酸检测:2,疫苗接种:1 + */ + private Integer attentionType; } 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 10394a9987..de3612756d 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 @@ -64,6 +64,13 @@ public class IcEpidemicPreventionController{ return new Result>().ok(result); } + @PostMapping("user-list") + public Result> userList(@LoginUser TokenDto tokenDto, @RequestBody EpidemicPreventionFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + PageData result = icResiUserService.userList(formDTO); + return new Result>().ok(result); + } + /** * 居民防疫信息详情 * @Param formDTO diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java index ddd9d8ff20..c6e23272e5 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java @@ -280,4 +280,7 @@ public interface IcResiUserDao extends BaseDao { */ List getEpidemicPreventionList(EpidemicPreventionFormDTO formDTO); + List natList(EpidemicPreventionFormDTO formDTO); + List vaccineList(EpidemicPreventionFormDTO formDTO); + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java index ef3c99338a..fd3e49415d 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java @@ -226,6 +226,7 @@ public interface IcResiUserService extends BaseService { * @Date 2022/3/29 14:27 */ PageData epidemicPreventionList(EpidemicPreventionFormDTO formDTO); + PageData userList(EpidemicPreventionFormDTO formDTO); /** * 居民防疫信息详情 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 2b02a65fb5..d98de8312d 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 @@ -1278,6 +1278,19 @@ public class IcResiUserServiceImpl extends BaseServiceImpl(list, pageInfo.getTotal()); } + @Override + public PageData userList(EpidemicPreventionFormDTO formDTO) { + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); + List list = new ArrayList<>(); + if (formDTO.getAttentionType().equals(NumConstant.TWO)){ + list = baseDao.natList(formDTO); + }else if (formDTO.getAttentionType().equals(NumConstant.ONE)){ + list = baseDao.vaccineList(formDTO); + } + PageInfo pageInfo = new PageInfo<>(list); + return new PageData<>(list, pageInfo.getTotal()); + } + /** * 居民防疫信息详情 * 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 425a17d3c3..03e32c884a 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 @@ -724,4 +724,77 @@ ORDER BY `NAME` + + + From 05493fa1375aa677d0d6b82adbc2a25048819571 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 31 Mar 2022 17:09:51 +0800 Subject: [PATCH 62/75] =?UTF-8?q?=E9=87=87=E9=9B=86=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=90=8D=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/db/migration/V0.0.34__modify_collect.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.34__modify_collect.sql diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.34__modify_collect.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.34__modify_collect.sql new file mode 100644 index 0000000000..a958e05946 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.34__modify_collect.sql @@ -0,0 +1,4 @@ +alter TABLE ic_resi_collect add COLUMN `VILLAGE_NAME` varchar(64) DEFAULT NULL COMMENT '所属小区名称' AFTER VILLAGE_ID; +alter TABLE ic_resi_collect add COLUMN `BUILD_NAME` varchar(64) DEFAULT NULL COMMENT '所属楼宇名称' AFTER BUILD_ID; +alter TABLE ic_resi_collect add COLUMN `UNIT_NAME` varchar(64) DEFAULT NULL COMMENT '单元名' AFTER UNIT_ID; +alter TABLE ic_resi_collect add COLUMN `HOME_NAME` varchar(64) DEFAULT NULL COMMENT '房间名' AFTER HOME_ID; \ No newline at end of file From 6108624ed5c27b11ae94aa32ed9f4e149b675112 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 31 Mar 2022 17:21:09 +0800 Subject: [PATCH 63/75] =?UTF-8?q?=E9=87=87=E9=9B=86=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=90=8D=E5=AD=97=20v1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dto/form/ResiCollectFormDTO.java | 9 +++++++++ .../java/com/epmet/dto/result/LatestCollectResDTO.java | 9 +++++++++ .../main/java/com/epmet/entity/IcResiCollectEntity.java | 5 ++++- .../com/epmet/service/impl/IcResiCollectServiceImpl.java | 4 ++++ 4 files changed, 26 insertions(+), 1 deletion(-) 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 index fdd712970f..9778cb6a17 100644 --- 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 @@ -52,24 +52,32 @@ public class ResiCollectFormDTO implements Serializable { */ @NotBlank(message = "小区不能为空", groups = InternalShowGroup.class) private String villageId; + @NotBlank(message = "小区名不能为空", groups = InternalShowGroup.class) + private String villageName; /** * 所属楼宇Id */ @NotBlank(message = "楼栋不能为空", groups = InternalShowGroup.class) private String buildId; + @NotBlank(message = "楼栋名不能为空",groups = InternalShowGroup.class) + private String buildName; /** * 单元id */ @NotBlank(message = "单元不能为空", groups = InternalShowGroup.class) private String unitId; + @NotBlank(message = "单元名不能为空",groups = InternalShowGroup.class) + private String unitName; /** * 所属家庭Id */ @NotBlank(message = "家庭不能为空", groups = InternalShowGroup.class) private String homeId; + @NotBlank(message = "家庭名不能为空",groups = InternalShowGroup.class) + private String homeName; /** * 详细地址 @@ -102,4 +110,5 @@ public class ResiCollectFormDTO implements Serializable { @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 index f7d698badd..70247e24cd 100644 --- 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 @@ -59,6 +59,11 @@ public class LatestCollectResDTO implements Serializable { */ private Integer totalResi; + private String villageName; + private String buildName; + private String unitName; + private String homeName; + @Valid private List memberList; @@ -78,5 +83,9 @@ public class LatestCollectResDTO implements Serializable { this.houseHolderName=""; this.totalResi=0; this.memberList=new ArrayList<>(); + this.villageName=""; + this.buildName=""; + this.unitName=""; + this.homeName=""; } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiCollectEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiCollectEntity.java index 1123bca8b8..8b6a20d87b 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiCollectEntity.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiCollectEntity.java @@ -82,5 +82,8 @@ public class IcResiCollectEntity extends BaseEpmetEntity { * 居住成员人数 */ private Integer totalResi; - + private String villageName; + private String buildName; + private String unitName; + private String homeName; } 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 c73a39d794..5fb9b80a4b 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 @@ -230,5 +230,9 @@ public class IcResiCollectServiceImpl extends BaseServiceImpl Date: Thu, 31 Mar 2022 17:33:31 +0800 Subject: [PATCH 64/75] =?UTF-8?q?y=E4=B8=9A=E5=8A=A1=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E5=BC=95=E8=B5=B7=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/exception/EpmetErrorCode.java | 2 +- .../com/epmet/dto/form/AddIcNatFormDTO.java | 5 +- .../com/epmet/dto/form/MyNatListFormDTO.java | 4 ++ .../epmet/dto/result/NatListResultDTO.java | 4 ++ .../src/main/java/com/epmet/dao/IcNatDao.java | 10 +++- .../epmet/service/impl/IcNatServiceImpl.java | 47 ++++++++++++------- 6 files changed, 52 insertions(+), 20 deletions(-) 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 bf8bcdc86b..e0623c7648 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,7 +251,7 @@ public enum EpmetErrorCode { ORG_EDIT_FAILED(8920,"编辑失败"), ORG_DEL_FAILED(8921,"删除失败"), NEIGHBORHOOD_DEL_FAILED(8922,""), - IC_NAT_IDCARD_NATTIME(8923,"核酸检测时间已存在相同记录"), + IC_NAT_IDCARD_NATTIME(8923,"已存在相同记录"), //通用错误码 start 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 b67375b5c5..9472ea4314 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 @@ -80,11 +80,14 @@ public class AddIcNatFormDTO implements Serializable { * 附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) */ private String attachmentType; - /** * 附件地址 */ private String attachmentUrl; + /** + * 是否客户下居民(0:否 1:是) + */ + private String isResiUser = "0"; /** * 通知渠道 0小程序通知,1短信通知,多选是数组 */ 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 157bc89a27..0272a30799 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 @@ -38,6 +38,10 @@ public class MyNatListFormDTO extends PageFormDTO { * 手机号 */ private String mobile; + /** + * 是否客户下居民(0:否 1:是) + */ + private String isResiUser; /** * 检测开始时间yyyy-MM-dd HH:mm */ diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/NatListResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/NatListResultDTO.java index a65563bb5b..5a8d622f7d 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/NatListResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/NatListResultDTO.java @@ -35,6 +35,10 @@ public class NatListResultDTO implements Serializable { */ @ExcelIgnore private String userId; + /** + * 是否客户下居民(0:否 1:是) + */ + private String isResiUser; /** * 居民端小程序的人:resi;数字社区的居民:icresi;未关联上的:other */ 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 22afc94f76..550e1371fb 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 @@ -28,10 +28,16 @@ public interface IcNatDao extends BaseDao { /** * @Author sun - * @Description 【核酸】核酸检测信息列表 + * @Description 【核酸】本辖区核酸检测信息列表 **/ List getNatList(MyNatListFormDTO formDTO); + /** + * @Author sun + * @Description 【核酸】客户下核酸检测信息列表 + **/ + List getCustomerNatList(MyNatListFormDTO formDTO); + /** * @Author sun * @Description 删除/取消同步操作--物理删除业务数据 @@ -48,5 +54,5 @@ public interface IcNatDao extends BaseDao { * @Author sun * @Description 按条件查询业务数据 **/ - IcNatDTO getNatDTO(@Param("customerId") String customerId, @Param("icNatId") String icNatId, @Param("idCard") String idCard, @Param("natTime") String natTime); + IcNatDTO getNatDTO(@Param("customerId") String customerId, @Param("icNatId") String icNatId, @Param("idCard") String idCard, @Param("natTime") String natTime, @Param("natResult") String natResult); } 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 f07bb78df9..d4a334a24e 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 @@ -3,6 +3,7 @@ package com.epmet.service.impl; import com.alibaba.excel.EasyExcel; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.IdWorker; +import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.constant.NumConstant; @@ -20,12 +21,14 @@ 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.IcNatRelationDao; import com.epmet.dao.UserBaseInfoDao; import com.epmet.dto.IcNatDTO; import com.epmet.dto.IcNoticeDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.entity.IcNatEntity; +import com.epmet.entity.IcNatRelationEntity; import com.epmet.excel.data.IcNatImportExcelData; import com.epmet.excel.handler.IcNatExcelImportListener; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; @@ -69,18 +72,16 @@ public class IcNatServiceImpl extends BaseServiceImpl imp @Autowired private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient; - @Autowired private EpmetUserOpenFeignClient epmetUserOpenFeignClient; - @Autowired private IcNoticeService icNoticeService; - @Autowired private OssFeignClient ossFeignClient; - @Autowired private UserBaseInfoDao userBaseInfoDao; + @Autowired + private IcNatRelationDao icNatRelationDao; /** * @Author sun @@ -90,7 +91,7 @@ public class IcNatServiceImpl extends BaseServiceImpl imp @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)); + IcNatDTO icNatDTO = baseDao.getNatDTO(formDTO.getCustomerId(), null, formDTO.getIdCard(), DateUtils.format(formDTO.getNatTime(), DateUtils.DATE_TIME_PATTERN_END_WITH_MINUTE), formDTO.getNatResult()); if (null != icNatDTO) { throw new RenException(EpmetErrorCode.IC_NAT_IDCARD_NATTIME.getCode(), EpmetErrorCode.IC_NAT_IDCARD_NATTIME.getMsg()); } @@ -99,10 +100,17 @@ public class IcNatServiceImpl extends BaseServiceImpl imp if (null == agencyInfo) { throw new RenException(String.format("获取组织缓存信息失败%s", formDTO.getAgencyId())); } - //2.新增核酸记录表数据 + //2.新增核酸基础信息数据 IcNatEntity entity = ConvertUtils.sourceToTarget(formDTO, IcNatEntity.class); - entity.setPids(agencyInfo.getPids()); + if(StringUtils.isNotBlank(formDTO.getUserId())){ + entity.setIsResiUser("1"); + } insert(entity); + //3.核酸记录关系表新增与组织的关系数据 + IcNatRelationEntity relationEntity = ConvertUtils.sourceToTarget(formDTO, IcNatRelationEntity.class); + relationEntity.setIcNatId(entity.getId()); + relationEntity.setPids(StringUtils.isNotBlank(agencyInfo.getPids())?agencyInfo.getPids()+":"+formDTO.getAgencyId():agencyInfo.getPids()); + icNatRelationDao.insert(relationEntity); //3.新增通知表信息 if (formDTO.getChannel().size() > NumConstant.ZERO) { @@ -129,32 +137,39 @@ public class IcNatServiceImpl extends BaseServiceImpl imp //1.根据token信息查询居民身份证号 UserBaseInfoResultDTO dto = userBaseInfoDao.selectListByUserIdList(formDTO.getUserId()); formDTO.setIdCard(dto.getIdNum()); - //2.查询当前人员创建的或该身份证号录入的核算检测数据(居民端录入、数字平台录入、数字平台导入) + //2.查询当前人员创建的或该身份证号录入的核算检测数据(居民端录入、数字平台录入、数字平台导入、数字平台同步的) List resultList = baseDao.getMyNatList(formDTO); return resultList; } /** * @Author sun - * @Description 【核酸】核酸检测信息列表 + * @Description 【核酸】本组织及下级核酸检测信息列表 * * @return*/ @Override public PageData natList(MyNatListFormDTO formDTO) { - //1.根据orgType值判断是查询当前组织下还是整个客户下数据 + //1.根据是查询客户数据还是本辖区数据走不同逻辑 if ("current".equals(formDTO.getOrgType())) { - //获取工作人员缓存信息 + //本辖区数据 + //2.获取工作人员缓存信息 CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId()); if (null == staffInfo) { throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", formDTO.getUserId())); } formDTO.setAgencyId(staffInfo.getAgencyId()); + //3.按条件查询业务数据 + PageInfo data = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.isPage()) + .doSelectPageInfo(() -> baseDao.getNatList(formDTO)); + return new PageData(data.getList(),data.getTotal()); + } else if ("current".equals(formDTO.getOrgType())) { + //客户下数据 + PageInfo data = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.isPage()) + .doSelectPageInfo(() -> baseDao.getCustomerNatList(formDTO)); + return new PageData(data.getList(),data.getTotal()); } - //2.按条件查询业务数据 - PageInfo data = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.isPage()) - .doSelectPageInfo(() -> baseDao.getNatList(formDTO)); - return new PageData(data.getList(),data.getTotal()); + return new PageData(new ArrayList(), 0); } /** @@ -189,7 +204,7 @@ public class IcNatServiceImpl extends BaseServiceImpl imp @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)); + IcNatDTO icNatDTO = baseDao.getNatDTO(formDTO.getCustomerId(), formDTO.getIcNatId(), formDTO.getIdCard(), DateUtils.format(formDTO.getNatTime(), DateUtils.DATE_TIME_PATTERN_END_WITH_MINUTE), formDTO.getNatResult()); if (null != icNatDTO) { throw new RenException(EpmetErrorCode.IC_NAT_IDCARD_NATTIME.getCode(), EpmetErrorCode.IC_NAT_IDCARD_NATTIME.getMsg()); } From a49b6672d001b8111652b4bf523190814d214f77 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 1 Apr 2022 09:18:37 +0800 Subject: [PATCH 65/75] =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E5=BC=95=E8=B5=B7=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/IcNatServiceImpl.java | 22 ++++++-- .../src/main/resources/mapper/IcNatDao.xml | 50 +++++++++++++++++-- 2 files changed, 63 insertions(+), 9 deletions(-) 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 d4a334a24e..734d31b40c 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 @@ -90,7 +90,7 @@ public class IcNatServiceImpl extends BaseServiceImpl imp @Override @Transactional(rollbackFor = Exception.class) public void add(AddIcNatFormDTO formDTO) { - //0.先根据身份证号和检查时间校验数据是否存在 + //0.先根据身份证号和检查时间以及检测结果校验数据是否存在 IcNatDTO icNatDTO = baseDao.getNatDTO(formDTO.getCustomerId(), null, formDTO.getIdCard(), DateUtils.format(formDTO.getNatTime(), DateUtils.DATE_TIME_PATTERN_END_WITH_MINUTE), formDTO.getNatResult()); if (null != icNatDTO) { throw new RenException(EpmetErrorCode.IC_NAT_IDCARD_NATTIME.getCode(), EpmetErrorCode.IC_NAT_IDCARD_NATTIME.getMsg()); @@ -161,12 +161,12 @@ public class IcNatServiceImpl extends BaseServiceImpl imp //3.按条件查询业务数据 PageInfo data = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.isPage()) .doSelectPageInfo(() -> baseDao.getNatList(formDTO)); - return new PageData(data.getList(),data.getTotal()); + return new PageData(data.getList(), data.getTotal()); } else if ("current".equals(formDTO.getOrgType())) { //客户下数据 PageInfo data = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.isPage()) .doSelectPageInfo(() -> baseDao.getCustomerNatList(formDTO)); - return new PageData(data.getList(),data.getTotal()); + return new PageData(data.getList(), data.getTotal()); } return new PageData(new ArrayList(), 0); @@ -203,12 +203,12 @@ public class IcNatServiceImpl extends BaseServiceImpl imp @Override @Transactional(rollbackFor = Exception.class) public void edit(AddIcNatFormDTO formDTO) { - //0.先根据身份证号和检测时间校验除当前数据是否还存在相同数据 + //0.先根据身份证号和检测时间以及检测结果校验除当前数据是否还存在相同数据 IcNatDTO icNatDTO = baseDao.getNatDTO(formDTO.getCustomerId(), formDTO.getIcNatId(), formDTO.getIdCard(), DateUtils.format(formDTO.getNatTime(), DateUtils.DATE_TIME_PATTERN_END_WITH_MINUTE), formDTO.getNatResult()); if (null != icNatDTO) { throw new RenException(EpmetErrorCode.IC_NAT_IDCARD_NATTIME.getCode(), EpmetErrorCode.IC_NAT_IDCARD_NATTIME.getMsg()); } - //1.更新核酸记录表数据 + //1.更新核酸记录基础信息表数据 IcNatEntity entity = ConvertUtils.sourceToTarget(formDTO, IcNatEntity.class); entity.setId(formDTO.getIcNatId()); if (!updateById(entity)) { @@ -216,6 +216,17 @@ public class IcNatServiceImpl extends BaseServiceImpl imp throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "核酸记录修改失败"); } + //2.更新与组织的关系表数据 + AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(formDTO.getAgencyId()); + if (null == agencyInfo) { + throw new RenException(String.format("获取组织缓存信息失败%s", formDTO.getAgencyId())); + } + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcNatRelationEntity::getIcNatId, formDTO.getIcNatId()); + IcNatRelationEntity relationEntity = ConvertUtils.sourceToTarget(formDTO, IcNatRelationEntity.class); + relationEntity.setPids(StringUtils.isNotBlank(agencyInfo.getPids()) ? agencyInfo.getPids() + ":" + formDTO.getAgencyId() : agencyInfo.getPids()); + icNatRelationDao.update(relationEntity, wrapper); + //3.新增通知表信息 if (CollectionUtils.isNotEmpty(formDTO.getChannel())) { SendNoticeFormDTO dto = new SendNoticeFormDTO(); @@ -229,6 +240,7 @@ public class IcNatServiceImpl extends BaseServiceImpl imp dto.setStaffId(formDTO.getStaffId()); icNoticeService.sendNotice(dto); } + } /** 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 06cbc05a85..0c011b7e19 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 @@ -31,10 +31,52 @@ + + SELECT id, - agency_id, user_id, user_type, `name`, From e04ba69cd0a6973340f1a106ac08af2e66c16adf Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 1 Apr 2022 11:23:48 +0800 Subject: [PATCH 69/75] isPage --- .../main/java/com/epmet/commons/tools/dto/form/PageFormDTO.java | 2 +- .../java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/PageFormDTO.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/PageFormDTO.java index fe22284567..982f3e02a9 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/PageFormDTO.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/PageFormDTO.java @@ -33,7 +33,7 @@ public class PageFormDTO implements Serializable { */ private Integer offset; - private boolean isPage = true; + private Boolean isPage; public Integer getOffset() { return (pageNo-1)*pageSize; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java index 331552e4a3..b5ee1a460b 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java @@ -689,7 +689,7 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl result = null; List list = null; - if (params.isPage()){ + if (params.getIsPage()){ Page objects = PageHelper.startPage(params.getPageNo(), params.getPageSize()).doSelectPage(() -> { baseDao.selectList(wrapper); }); From 07a60f36ad6de164661889679d1a640fca479bd4 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 1 Apr 2022 13:53:03 +0800 Subject: [PATCH 70/75] isPage --- .../java/com/epmet/service/impl/ImportTaskServiceImpl.java | 2 +- .../controller/IcEpidemicSpecialAttentionController.java | 2 +- .../java/com/epmet/controller/IcFollowUpRecordController.java | 2 +- .../src/main/java/com/epmet/controller/IcNatController.java | 2 +- .../java/com/epmet/controller/IcResiCollectController.java | 2 +- .../com/epmet/controller/IcTripReportRecordController.java | 2 +- .../com/epmet/controller/PatrolRoutineWorkController.java | 2 +- .../service/impl/IcEpidemicSpecialAttentionServiceImpl.java | 4 ++-- .../com/epmet/service/impl/IcFollowUpRecordServiceImpl.java | 2 +- .../main/java/com/epmet/service/impl/IcNatServiceImpl.java | 4 ++-- .../java/com/epmet/service/impl/IcResiCollectServiceImpl.java | 2 +- .../com/epmet/service/impl/IcTripReportRecordServiceImpl.java | 2 +- .../com/epmet/service/impl/PatrolRoutineWorkServiceImpl.java | 2 +- 13 files changed, 15 insertions(+), 15 deletions(-) diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ImportTaskServiceImpl.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ImportTaskServiceImpl.java index cb28fecad8..795f553af5 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ImportTaskServiceImpl.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ImportTaskServiceImpl.java @@ -98,7 +98,7 @@ public class ImportTaskServiceImpl implements ImportTaskService { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(ImportTaskEntity::getOperatorId,param.getOperatorId()) .orderByDesc(ImportTaskEntity::getStartTime); - Page page = PageHelper.startPage(param.getPageNo(), param.getPageSize(), param.isPage()).doSelectPage(() -> { + Page page = PageHelper.startPage(param.getPageNo(), param.getPageSize(), param.getIsPage()).doSelectPage(() -> { importRecordDao.selectList(queryWrapper); }); List list = new ArrayList<>(); 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 1017075ac6..b2d1ea6249 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 @@ -169,7 +169,7 @@ public class IcEpidemicSpecialAttentionController { ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class); formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setUserId(tokenDto.getUserId()); - formDTO.setPage(false); + formDTO.setIsPage(false); PageData pageData = icEpidemicSpecialAttentionService.vaccinationList(formDTO); // 关注类型,核酸检测:2,疫苗接种:1,行程上报:0 if (formDTO.getAttentionType().equals(NumConstant.ONE)){ 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 b03ad85ed0..7b0b375207 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 @@ -105,7 +105,7 @@ public class IcFollowUpRecordController { public void export(@LoginUser TokenDto tokenDto, @RequestBody PageFollowUpFormDTO formDTO, HttpServletResponse response) { formDTO.setCustomerId(tokenDto.getCustomerId()); //formDTO.setCustomerId("45687aa479955f9d06204d415238f7cc"); - formDTO.setPage(false); + formDTO.setIsPage(false); ExcelWriter excelWriter = null; formDTO.setPageSize(NumConstant.TEN_THOUSAND); 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 4de76d5b64..fb21ddae55 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 @@ -260,7 +260,7 @@ public class IcNatController implements ResultDataResolver { //formDTO.setCustomerId("45687aa479955f9d06204d415238f7cc"); //formDTO.setUserId("73ae6280e46a6653a5605d51d5462725"); - formDTO.setPage(false); + formDTO.setIsPage(false); ExcelWriter excelWriter = null; formDTO.setPageSize(NumConstant.TEN_THOUSAND); 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 ccf831e0aa..c25f04bc2b 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 @@ -92,7 +92,7 @@ public class IcResiCollectController { //tokenDto.setCustomerId("45687aa479955f9d06204d415238f7cc"); formDTO.setUserId(tokenDto.getUserId()); formDTO.setCustomerId(tokenDto.getCustomerId()); - formDTO.setPage(false); + formDTO.setIsPage(false); PageData collectList = icResiCollectService.getCollectList(formDTO); List list =new ArrayList<>(); 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 98e5e9bd47..e50ed23b70 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 @@ -194,7 +194,7 @@ public class IcTripReportRecordController implements ResultDataResolver { formDTO.setUserId(tokenDto.getUserId()); // formDTO.setCustomerId("45687aa479955f9d06204d415238f7cc"); // formDTO.setUserId("35005df15fb0f7c791344f0b424870b7"); - formDTO.setPage(false); + formDTO.setIsPage(false); ExcelWriter excelWriter = null; formDTO.setPageSize(NumConstant.TEN_THOUSAND); int pageNo = formDTO.getPageNo(); diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/PatrolRoutineWorkController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/PatrolRoutineWorkController.java index 41f14362ee..f018a32789 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/PatrolRoutineWorkController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/PatrolRoutineWorkController.java @@ -43,7 +43,7 @@ public class PatrolRoutineWorkController { @NoRepeatSubmit @PostMapping("selectList") public Result> gridUserWork(@RequestBody PatrolQueryFormDTO formDTO){ - formDTO.setPage(false); + formDTO.setIsPage(false); Page data = gridUserWorkService.listPage(formDTO); return new Result().ok(data.getResult()); } 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 9b142bbf85..bd9faff62b 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 @@ -140,7 +140,7 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.vaccinationList(formDTO)); result.setList(pageInfo.getList()); result.setTotal(Integer.valueOf(String.valueOf(pageInfo.getTotal()))); @@ -150,7 +150,7 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.natList(formDTO)); result.setList(pageInfo.getList()); result.setTotal(Integer.valueOf(String.valueOf(pageInfo.getTotal()))); 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 eb9255a8ec..1e3c46f9f1 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 @@ -48,7 +48,7 @@ public class IcFollowUpRecordServiceImpl extends BaseServiceImpl data = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.isPage()) + PageInfo data = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()) .doSelectPageInfo(() -> baseDao.selectList(wrapper)); List list=ConvertUtils.sourceToTarget(data.getList(),IcFollowUpRecordDTO.class); return new PageData(list,data.getTotal()); 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 f80c0624f2..a71f480f26 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 @@ -161,12 +161,12 @@ public class IcNatServiceImpl extends BaseServiceImpl imp } formDTO.setAgencyId(staffInfo.getAgencyId()); //3.按条件查询业务数据 - PageInfo data = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.isPage()) + PageInfo data = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()) .doSelectPageInfo(() -> baseDao.getNatList(formDTO)); return new PageData(data.getList(), data.getTotal()); } else if ("all".equals(formDTO.getOrgType())) { //客户下数据 - PageInfo data = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.isPage()) + PageInfo data = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()) .doSelectPageInfo(() -> baseDao.getCustomerNatList(formDTO)); return new PageData(data.getList(), data.getTotal()); } 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 8f348ab680..b0befce180 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 @@ -102,7 +102,7 @@ public class IcResiCollectServiceImpl extends BaseServiceImpl pageList = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.getCollectList(formDTO)); result.setList(pageList.getList()); result.setTotal(Integer.parseInt(String.valueOf(pageList.getTotal()))); 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 e2c5ed7213..9fc799e122 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 @@ -93,7 +93,7 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl data = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.isPage()) + PageInfo data = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()) .doSelectPageInfo(() -> baseDao.pageList(formDTO)); List list = data.getList(); //3.查询最近一次通知时间、核算检测关注名单 diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/PatrolRoutineWorkServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/PatrolRoutineWorkServiceImpl.java index df3d1c3418..78d860fe7e 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/PatrolRoutineWorkServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/PatrolRoutineWorkServiceImpl.java @@ -172,7 +172,7 @@ public class PatrolRoutineWorkServiceImpl extends BaseServiceImpl listPage(PatrolQueryFormDTO formDTO) { - return PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.isPage()) + return PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()) .doSelectPage(() -> baseDao.selectList(formDTO)); } From 7038f5459b11c8710db64b85a719d682e8f7c0d4 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 1 Apr 2022 13:58:49 +0800 Subject: [PATCH 71/75] =?UTF-8?q?db=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V0.0.35__new_ic_nat.sql | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.35__new_ic_nat.sql diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.35__new_ic_nat.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.35__new_ic_nat.sql new file mode 100644 index 0000000000..e556fc6c2c --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.35__new_ic_nat.sql @@ -0,0 +1,46 @@ +-- ---------------------------- +-- Table structure for ic_nat +-- ---------------------------- +DROP TABLE IF EXISTS `ic_nat`; +CREATE TABLE `ic_nat` ( + `ID` varchar(64) NOT NULL COMMENT 'ID', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `IS_RESI_USER` varchar(1) NOT NULL DEFAULT '0' COMMENT '是否客户下居民(0:否 1:是)', + `USER_ID` varchar(64) DEFAULT NULL COMMENT '居民端小程序的用户id、数字社区的icResiUserId、其他情况无值', + `USER_TYPE` varchar(32) NOT NULL COMMENT '数据来源【居民端小程序的人:resi;\r\n数字社区的居民:icresi;\r\n导入的:import;\r\n同步的: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_nat_relation +-- ---------------------------- +CREATE TABLE `ic_nat_relation` ( + `ID` varchar(64) NOT NULL COMMENT 'ID', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `AGENCY_ID` varchar(64) NOT NULL COMMENT '居民端上报时存储用户所在网格的组织id.居民信息的人存储居民所在组织id.单个新增或者导入的存储登录用户所属的组织id', + `PIDS` varchar(255) NOT NULL COMMENT '组织pids,包含当前agencyId值', + `IC_NAT_ID` varchar(64) DEFAULT NULL COMMENT '核酸记录表Id(ic_nat.id)', + `USER_TYPE` varchar(32) NOT NULL COMMENT '关系数据的绑定途径【居民端录入:resi;\r\n数字社区录入:icresi;\r\n导入的:import;\r\n同步的:synchro】', + `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='核酸记录关系表'; \ No newline at end of file From 48251d9ac08c0513fd08e1de0d9ef6637dd7a0b5 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 1 Apr 2022 14:00:19 +0800 Subject: [PATCH 72/75] =?UTF-8?q?db=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/db/migration/V0.0.35__new_ic_nat.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.35__new_ic_nat.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.35__new_ic_nat.sql index e556fc6c2c..8001d9769d 100644 --- a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.35__new_ic_nat.sql +++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.35__new_ic_nat.sql @@ -34,7 +34,7 @@ CREATE TABLE `ic_nat_relation` ( `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', `AGENCY_ID` varchar(64) NOT NULL COMMENT '居民端上报时存储用户所在网格的组织id.居民信息的人存储居民所在组织id.单个新增或者导入的存储登录用户所属的组织id', `PIDS` varchar(255) NOT NULL COMMENT '组织pids,包含当前agencyId值', - `IC_NAT_ID` varchar(64) DEFAULT NULL COMMENT '核酸记录表Id(ic_nat.id)', + `IC_NAT_ID` varchar(64) NOT NULL COMMENT '核酸记录表Id(ic_nat.id)', `USER_TYPE` varchar(32) NOT NULL COMMENT '关系数据的绑定途径【居民端录入:resi;\r\n数字社区录入:icresi;\r\n导入的:import;\r\n同步的:synchro】', `DEL_FLAG` int(11) NOT NULL COMMENT '删除标识', `REVISION` int(11) NOT NULL COMMENT '乐观锁', From 6a82bf0a53340a871a04565faa317946c04e33f0 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 1 Apr 2022 14:13:35 +0800 Subject: [PATCH 73/75] =?UTF-8?q?=E4=B9=9D=E5=B0=8F=E5=9C=BA=E6=89=80?= =?UTF-8?q?=E5=B7=A1=E6=9F=A5-=E5=B7=A1=E6=9F=A5=E7=9B=91=E7=AE=A1?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/AddPlacePatrolRecordFormDTO.java | 5 +++- .../IcPlacePatrolRecordController.java | 13 +++++++++ .../service/IcPlacePatrolRecordService.java | 2 ++ .../impl/IcPlacePatrolRecordServiceImpl.java | 29 ++++++++++++------- 4 files changed, 38 insertions(+), 11 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolRecordFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolRecordFormDTO.java index cb8b6b2724..4a861062c2 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolRecordFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolRecordFormDTO.java @@ -122,6 +122,9 @@ public class AddPlacePatrolRecordFormDTO implements Serializable { //token中userId private String staffId; - public interface Add {} + @NotBlank(message = "placePatrolRecordId不能为空", groups = {Update.class}) + private String placePatrolRecordId; + public interface Add {} + public interface Update {} } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolRecordController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolRecordController.java index 0d2c02a3d6..bd232e2ca7 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolRecordController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolRecordController.java @@ -60,6 +60,19 @@ public class IcPlacePatrolRecordController { return new Result(); } + /** + * @Author sun + * @Description 新增场所巡查记录 + **/ + @PostMapping("update") + public Result update(@LoginUser TokenDto tokenDto, @RequestBody AddPlacePatrolRecordFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, AddPlacePatrolRecordFormDTO.Add.class,AddPlacePatrolRecordFormDTO.Update.class); + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); + placePatrolRecordService.update(formDTO); + return new Result(); + } + /** * @Author sun * @Description 删除场所巡查记录 diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlacePatrolRecordService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlacePatrolRecordService.java index 3b0c2c6e12..464059ac3d 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlacePatrolRecordService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlacePatrolRecordService.java @@ -38,6 +38,8 @@ public interface IcPlacePatrolRecordService extends BaseService Date: Fri, 1 Apr 2022 14:27:24 +0800 Subject: [PATCH 74/75] =?UTF-8?q?=E9=BB=98=E8=AE=A4true?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/commons/tools/dto/form/PageFormDTO.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/PageFormDTO.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/PageFormDTO.java index 982f3e02a9..723f5d062c 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/PageFormDTO.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/PageFormDTO.java @@ -33,7 +33,7 @@ public class PageFormDTO implements Serializable { */ private Integer offset; - private Boolean isPage; + private Boolean isPage = true; public Integer getOffset() { return (pageNo-1)*pageSize; From cf1ad4719a74829cdd304f648e9484613d85ca56 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 1 Apr 2022 15:13:43 +0800 Subject: [PATCH 75/75] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E6=A0=B8=E9=85=B8?= =?UTF-8?q?=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/NatListCommonExcelResultDTO.java | 27 +++++++++++++++++++ .../epmet/dto/result/NatListResultDTO.java | 23 +++++++++------- .../com/epmet/controller/IcNatController.java | 27 +++++++++++++------ .../src/main/resources/logback-spring.xml | 1 - 4 files changed, 59 insertions(+), 19 deletions(-) create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/NatListCommonExcelResultDTO.java diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/NatListCommonExcelResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/NatListCommonExcelResultDTO.java new file mode 100644 index 0000000000..15452546c4 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/NatListCommonExcelResultDTO.java @@ -0,0 +1,27 @@ +package com.epmet.dto.result; + +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 lombok.Data; + +/** + * @Description 核酸检测-我的上报记录 + * @Author sun + */ +@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 44) +@Data +public class NatListCommonExcelResultDTO extends NatListResultDTO{ + private static final long serialVersionUID = 1L; + + /** + * 是否客户下居民(0:否 1:是) + */ + @ColumnWidth(20) + @ExcelProperty(value = "本辖区居民",order = 6) + private String isResiUser; + + + +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/NatListResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/NatListResultDTO.java index 5a8d622f7d..cbeb66e482 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/NatListResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/NatListResultDTO.java @@ -35,10 +35,7 @@ public class NatListResultDTO implements Serializable { */ @ExcelIgnore private String userId; - /** - * 是否客户下居民(0:否 1:是) - */ - private String isResiUser; + /** * 居民端小程序的人:resi;数字社区的居民:icresi;未关联上的:other */ @@ -49,21 +46,21 @@ public class NatListResultDTO implements Serializable { * 姓名 */ @ColumnWidth(20) - @ExcelProperty("姓名") + @ExcelProperty(value = "姓名",order = 1) private String name; /** * 手机号 */ @ColumnWidth(20) - @ExcelProperty("手机号") + @ExcelProperty(value = "手机号",order = 2) private String mobile; /** * 身份证号 */ @ColumnWidth(25) - @ExcelProperty("身份证号") + @ExcelProperty(value = "身份证号",order = 3) private String idCard; /** @@ -71,21 +68,27 @@ public class NatListResultDTO implements Serializable { */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") @ColumnWidth(25) - @ExcelProperty("检测时间") + @ExcelProperty(value = "检测时间",order = 4) private Date natTime; /** * 检测结果 */ @ColumnWidth(20) - @ExcelProperty("检测结果") + @ExcelProperty(value = "检测结果",order = 5) private String natResult; + /** + * 是否客户下居民(0:否 1:是) + */ + @ExcelIgnore + private String isResiUser; + /** * 检测地点 */ @ColumnWidth(30) - @ExcelProperty("检测地点") + @ExcelProperty(value = "检测地点",order = 7) private String natAddress; 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 fb21ddae55..22e99e4e9e 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 @@ -14,10 +14,7 @@ import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.feign.ResultDataResolver; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; -import com.epmet.commons.tools.utils.EpmetRequestHolder; -import com.epmet.commons.tools.utils.ExcelUtils; -import com.epmet.commons.tools.utils.FileUtils; -import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.utils.*; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.constants.ImportTaskConstants; import com.epmet.dto.IcNatDTO; @@ -26,6 +23,7 @@ import com.epmet.dto.form.ImportTaskCommonFormDTO; import com.epmet.dto.form.MyNatListFormDTO; import com.epmet.dto.result.ImportTaskCommonResultDTO; import com.epmet.dto.result.MyNatListResultDTO; +import com.epmet.dto.result.NatListCommonExcelResultDTO; import com.epmet.dto.result.NatListResultDTO; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; import com.epmet.service.IcNatService; @@ -268,15 +266,28 @@ public class IcNatController implements ResultDataResolver { try { // 这里 需要指定写用哪个class去写 String fileName = "核酸检测信息.xlsx"; - excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response),NatListResultDTO.class).build(); + if ("all".equals(formDTO.getOrgType())) { + excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), NatListResultDTO.class).build(); + }else { + excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), NatListCommonExcelResultDTO.class).build(); + } + WriteSheet writeSheet = EasyExcel.writerSheet("Sheet1").build(); PageData data = null; do { data = icNucleinService.natList(formDTO); - data.getList().forEach(o->o.setNatResult(NumConstant.ONE_STR.equals(o.getNatResult())?"阳性":"阴性")); + data.getList().forEach(o-> { + o.setNatResult(NumConstant.ONE_STR.equals(o.getNatResult()) ? "阳性" : "阴性"); + o.setIsResiUser(NumConstant.ONE_STR.equals(o.getNatResult()) ? "是" : "否"); + }); formDTO.setPageNo(++pageNo); - excelWriter.write(data.getList(), writeSheet); - } while (CollectionUtils.isNotEmpty(data.getList()) && data.getList().size()==formDTO.getPageSize()); + if ("current".equals(formDTO.getOrgType())) { + List list = ConvertUtils.sourceToTarget(data.getList(), NatListResultDTO.class); + excelWriter.write(list, writeSheet); + }else{ + excelWriter.write(data.getList(), writeSheet); + } + } while (CollectionUtils.isNotEmpty(data.getList()) && data.getList().size() == formDTO.getPageSize()); }catch (Exception e){ log.error("export exception", e); diff --git a/epmet-user/epmet-user-server/src/main/resources/logback-spring.xml b/epmet-user/epmet-user-server/src/main/resources/logback-spring.xml index 6b7089434f..c2a982739d 100644 --- a/epmet-user/epmet-user-server/src/main/resources/logback-spring.xml +++ b/epmet-user/epmet-user-server/src/main/resources/logback-spring.xml @@ -142,7 +142,6 @@ -