Browse Source

事件研判分析还早呢,要去改需求的bug了

master
yinzuomei 4 years ago
parent
commit
9ce3b0132e
  1. 6
      epmet-module/gov-project/gov-project-client/pom.xml
  2. 50
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ResiEventResearchAnalysisFormDTO.java
  3. 16
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectDataDTO.java
  4. 17
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectInfoIcData.java
  5. 30
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ResiEventResearchAnalysisResDTO.java
  6. 16
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ResiEventController.java
  7. 7
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectCategoryDao.java
  8. 7
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectCategoryService.java
  9. 8
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ResiEventService.java
  10. 11
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectCategoryServiceImpl.java
  11. 37
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java
  12. 7
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectCategoryDao.xml

6
epmet-module/gov-project/gov-project-client/pom.xml

@ -23,5 +23,11 @@
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-user-client</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>

50
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<String> epmetUserIdList;
@NotBlank(message = "tokenDto中的customerId不能为空",groups = AddUserInternalGroup.class)
private String customerId;
}

16
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<ProjectInfoIcData> projectList;
}

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

30
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<HouseUserDTO> houseUserList;
/**
* 入参中给的再返回去
*/
private List<String> epmetUserIdList;
private List<ProjectDataDTO> projectData;
}

16
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<PageData<PageUserReportEventResDTO>>().ok(resiEventService.pageUserReported(formDTO));
}
/**
* 数据分析-个人档案-上报事件列表-事件详情研判分析
*
* @param formDTO
* @return
*/
@PostMapping("research-analysis")
public Result<ResiEventResearchAnalysisResDTO> 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<ResiEventResearchAnalysisResDTO>().ok(resiEventService.queryResiEventResearchAnalysis(formDTO));
}
}

7
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectCategoryDao.java

@ -61,4 +61,11 @@ public interface ProjectCategoryDao extends BaseDao<ProjectCategoryEntity> {
* @date 2021/5/17 10:47 上午
*/
List<ProjectCategoryDisPoseResultDTO> selectCategoryByIds(@Param("projectIds")List<String> projectIds);
/**
*
* @param projectId
* @return
*/
List<ProjectCategoryDTO> selectListByProjectId(String projectId);
}

7
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectCategoryService.java

@ -119,4 +119,11 @@ public interface ProjectCategoryService extends BaseService<ProjectCategoryEntit
* @Author sun
**/
List<ProjectCategoryDTO> getProjectCategoryList(DelCategoryFormDTO formDTO);
/**
* 根据项目id查询所有分类
* @param projectId
* @return
*/
List<ProjectCategoryDTO> getProjectCategoryService(String projectId);
}

8
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ResiEventService.java

@ -147,4 +147,12 @@ public interface ResiEventService extends BaseService<ResiEventEntity> {
* @return
*/
PageData<PageUserReportEventResDTO> pageUserReported(PageUserReportEventFormDTO formDTO);
/**
* 数据分析-个人档案-上报事件列表-事件详情研判分析
*
* @param formDTO
* @return
*/
ResiEventResearchAnalysisResDTO queryResiEventResearchAnalysis(ResiEventResearchAnalysisFormDTO formDTO);
}

11
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<ProjectCategoryD
return baseDao.selectProjectCategoryList(formDTO);
}
/**
* 根据项目id查询所有分类
*
* @param projectId
* @return
*/
@Override
public List<ProjectCategoryDTO> getProjectCategoryService(String projectId) {
return baseDao.selectListByProjectId(projectId);
}
}

37
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<ResiEventDao, ResiEven
private ProjectDao projectDao;
@Autowired
private ResiEventReplyDao resiEventReplyDao;
@Autowired
private ProjectCategoryService projectCategoryService;
/**
* @Description 群众直报待处理处理中已办结列表
@ -672,5 +674,32 @@ public class ResiEventServiceImpl extends BaseServiceImpl<ResiEventDao, ResiEven
return new PageData<>(pageInfo.getList(), pageInfo.getTotal());
}
/**
* 数据分析-个人档案-上报事件列表-事件详情研判分析
*
* @param formDTO
* @return
*/
@Override
public ResiEventResearchAnalysisResDTO queryResiEventResearchAnalysis(ResiEventResearchAnalysisFormDTO formDTO) {
//获取案件居民和及家属列表
Result<IcResiUserBriefDTO> 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<ProjectCategoryDTO> projectCategoryDTOList=projectCategoryService.getProjectCategoryService(formDTO.getProjectId());
if(CollectionUtils.isEmpty(projectCategoryDTOList)){
resultDTO.setProjectData(new ArrayList<>());
return resultDTO;
}
//查询出当前人,在居民端小程序里上报的需求且转了项目的,并且还得排除当前的这个项目
//todo
return null;
}
}

7
epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectCategoryDao.xml

@ -50,4 +50,11 @@
)
</select>
<select id="selectListByProjectId" parameterType="java.lang.String" resultMap="com.epmet.dto.ProjectCategoryDTO">
SELECT
*
FROM project_category
WHERE DEL_FLAG = '0'
and PROJECT_ID = #{projectId}
</select>
</mapper>
Loading…
Cancel
Save