From 9ce3b0132e37ebf235e50923ca14415aa2bb425d Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 9 Dec 2021 16:48:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=A0=94=E5=88=A4=E5=88=86?= =?UTF-8?q?=E6=9E=90=E8=BF=98=E6=97=A9=E5=91=A2=EF=BC=8C=E8=A6=81=E5=8E=BB?= =?UTF-8?q?=E6=94=B9=E9=9C=80=E6=B1=82=E7=9A=84bug=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-project/gov-project-client/pom.xml | 6 +++ .../ResiEventResearchAnalysisFormDTO.java | 50 +++++++++++++++++++ .../com/epmet/dto/result/ProjectDataDTO.java | 16 ++++++ .../epmet/dto/result/ProjectInfoIcData.java | 17 +++++++ .../ResiEventResearchAnalysisResDTO.java | 30 +++++++++++ .../epmet/controller/ResiEventController.java | 16 ++++++ .../com/epmet/dao/ProjectCategoryDao.java | 7 +++ .../epmet/service/ProjectCategoryService.java | 7 +++ .../com/epmet/service/ResiEventService.java | 8 +++ .../impl/ProjectCategoryServiceImpl.java | 11 ++++ .../service/impl/ResiEventServiceImpl.java | 37 ++++++++++++-- .../resources/mapper/ProjectCategoryDao.xml | 7 +++ 12 files changed, 208 insertions(+), 4 deletions(-) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ResiEventResearchAnalysisFormDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectDataDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectInfoIcData.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ResiEventResearchAnalysisResDTO.java diff --git a/epmet-module/gov-project/gov-project-client/pom.xml b/epmet-module/gov-project/gov-project-client/pom.xml index 6bf188e6e8..57a8d18366 100644 --- a/epmet-module/gov-project/gov-project-client/pom.xml +++ b/epmet-module/gov-project/gov-project-client/pom.xml @@ -23,5 +23,11 @@ 2.0.0 compile + + com.epmet + epmet-user-client + 2.0.0 + compile + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ResiEventResearchAnalysisFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ResiEventResearchAnalysisFormDTO.java new file mode 100644 index 0000000000..e942fe127e --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ResiEventResearchAnalysisFormDTO.java @@ -0,0 +1,50 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.List; + +/** + * 数据分析-个人档案-上报事件详情-研判分析,查看项目通分类+来源于当前上报人上报的所有事件 + * + */ +@Data +public class ResiEventResearchAnalysisFormDTO implements Serializable { + public interface AddUserInternalGroup { + } + + public interface AddUserShowGroup extends CustomerClientShowGroup { + } + + /** + * 当前选中的事件id + */ + @NotBlank(message = "resiEventId不能为空",groups = AddUserInternalGroup.class) + private String resiEventId; + + /** + * 当前选中的事件转为的项目id + */ + @NotBlank(message = "isResiUserId不能为空",groups = AddUserInternalGroup.class) + private String projectId; + + /** + * 个人档案的这个人 + */ + @NotBlank(message = "isResiUserId不能为空",groups = AddUserInternalGroup.class) + private String isResiUserId; + + /** + * 个人档案的这个人,对应小程序的人的用户id + */ + private List epmetUserIdList; + + + + + @NotBlank(message = "tokenDto中的customerId不能为空",groups = AddUserInternalGroup.class) + private String customerId; +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectDataDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectDataDTO.java new file mode 100644 index 0000000000..0f4721dbec --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectDataDTO.java @@ -0,0 +1,16 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * 数据分析-个人档案-上报事件详情-研判分析,查看项目通分类+来源于当前上报人上报的所有事件 + */ +@Data +public class ProjectDataDTO implements Serializable { + private String firstCategoryCode; + private String firstCategoryName; + private List projectList; +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectInfoIcData.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectInfoIcData.java new file mode 100644 index 0000000000..312f8721ab --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectInfoIcData.java @@ -0,0 +1,17 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 数据分析-个人档案-上报事件详情-研判分析,查看项目通分类+来源于当前上报人上报的所有事件 + */ +@Data +public class ProjectInfoIcData implements Serializable { + private static final long serialVersionUID = -1937915930811634827L; + private String projectId; + private String projectTitle; + private String resiEventId; + private String projectStatus; +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ResiEventResearchAnalysisResDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ResiEventResearchAnalysisResDTO.java new file mode 100644 index 0000000000..e432179589 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ResiEventResearchAnalysisResDTO.java @@ -0,0 +1,30 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * 数据分析-个人档案-上报事件详情-研判分析,查看项目通分类+来源于当前上报人上报的所有事件 + * + */ +@Data +public class ResiEventResearchAnalysisResDTO implements Serializable { + + /** + * 居民信息及家属列表 + */ + private String icResiUserId; + private String icUserName; + private String houseId; + private List houseUserList; + + + /** + * 入参中给的,再返回去 + */ + private List epmetUserIdList; + private List projectData; + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ResiEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ResiEventController.java index b3dd410a81..c0fa147ba6 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ResiEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ResiEventController.java @@ -240,4 +240,20 @@ public class ResiEventController { ValidatorUtils.validateEntity(formDTO, PageUserReportEventFormDTO.AddUserInternalGroup.class); return new Result>().ok(resiEventService.pageUserReported(formDTO)); } + + /** + * 数据分析-个人档案-上报事件列表-事件详情研判分析 + * + * @param formDTO + * @return + */ + @PostMapping("research-analysis") + public Result queryResiEventResearchAnalysis(@LoginUser TokenDto tokenDto,@RequestBody ResiEventResearchAnalysisFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + ValidatorUtils.validateEntity(formDTO,ResiEventResearchAnalysisFormDTO.AddUserInternalGroup.class); + if (org.apache.commons.collections4.CollectionUtils.isEmpty(formDTO.getEpmetUserIdList())) { + return new Result<>(); + } + return new Result().ok(resiEventService.queryResiEventResearchAnalysis(formDTO)); + } } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectCategoryDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectCategoryDao.java index cc2d336344..1127a7a099 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectCategoryDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectCategoryDao.java @@ -61,4 +61,11 @@ public interface ProjectCategoryDao extends BaseDao { * @date 2021/5/17 10:47 上午 */ List selectCategoryByIds(@Param("projectIds")List projectIds); + + /** + * + * @param projectId + * @return + */ + List selectListByProjectId(String projectId); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectCategoryService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectCategoryService.java index 37fb5fa984..4d66d39dd0 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectCategoryService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectCategoryService.java @@ -119,4 +119,11 @@ public interface ProjectCategoryService extends BaseService getProjectCategoryList(DelCategoryFormDTO formDTO); + + /** + * 根据项目id,查询所有分类 + * @param projectId + * @return + */ + List getProjectCategoryService(String projectId); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ResiEventService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ResiEventService.java index b73e1f7908..c6e52d4cc3 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ResiEventService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ResiEventService.java @@ -147,4 +147,12 @@ public interface ResiEventService extends BaseService { * @return */ PageData pageUserReported(PageUserReportEventFormDTO formDTO); + + /** + * 数据分析-个人档案-上报事件列表-事件详情研判分析 + * + * @param formDTO + * @return + */ + ResiEventResearchAnalysisResDTO queryResiEventResearchAnalysis(ResiEventResearchAnalysisFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectCategoryServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectCategoryServiceImpl.java index 85a2d6cc7e..ac0a279fb9 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectCategoryServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectCategoryServiceImpl.java @@ -214,4 +214,15 @@ public class ProjectCategoryServiceImpl extends BaseServiceImpl getProjectCategoryService(String projectId) { + return baseDao.selectListByProjectId(projectId); + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java index 01b0377ad3..4be3ddcf79 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java @@ -23,6 +23,7 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.dto.form.FileCommonDTO; 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.page.PageData; import com.epmet.commons.tools.scan.param.ImgScanParamDTO; @@ -38,11 +39,13 @@ import com.epmet.constant.EventConstant; import com.epmet.constant.ResiEventAction; import com.epmet.dao.*; import com.epmet.dto.EventProjectInfoDTO; +import com.epmet.dto.ProjectCategoryDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.entity.*; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient; +import com.epmet.service.ProjectCategoryService; import com.epmet.service.ResiEventService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; @@ -54,10 +57,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.UUID; +import java.util.*; /** * 居民报事表 @@ -90,6 +90,8 @@ public class ResiEventServiceImpl extends BaseServiceImpl(pageInfo.getList(), pageInfo.getTotal()); } + /** + * 数据分析-个人档案-上报事件列表-事件详情研判分析 + * + * @param formDTO + * @return + */ + @Override + public ResiEventResearchAnalysisResDTO queryResiEventResearchAnalysis(ResiEventResearchAnalysisFormDTO formDTO) { + //获取案件居民和及家属列表 + Result userRes = epmetUserOpenFeignClient.findFamilyMem(formDTO.getIsResiUserId()); + if (userRes.success() || null == userRes.getData()) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取居民信息及技术接口异常"); + } + IcResiUserBriefDTO icResiUserDTO = userRes.getData(); + ResiEventResearchAnalysisResDTO resultDTO = ConvertUtils.sourceToTarget(icResiUserDTO, ResiEventResearchAnalysisResDTO.class); + resultDTO.setEpmetUserIdList(!CollectionUtils.isEmpty(formDTO.getEpmetUserIdList()) ? formDTO.getEpmetUserIdList() : Collections.emptyList()); + // 先判断这个项目是否有分类没有直接返回 + List projectCategoryDTOList=projectCategoryService.getProjectCategoryService(formDTO.getProjectId()); + if(CollectionUtils.isEmpty(projectCategoryDTOList)){ + resultDTO.setProjectData(new ArrayList<>()); + return resultDTO; + } + //查询出当前人,在居民端小程序里上报的需求且转了项目的,并且还得排除当前的这个项目 + //todo + return null; + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectCategoryDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectCategoryDao.xml index 49942cdca3..465bd2454a 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectCategoryDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectCategoryDao.xml @@ -50,4 +50,11 @@ ) + \ No newline at end of file