Browse Source

Merge remote-tracking branch 'origin/develop' into release_temp

master
yinzuomei 4 years ago
parent
commit
c877702b5b
  1. 6
      epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/EpmetAdminOpenFeignClient.java
  2. 7
      epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallback.java
  3. 18
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/OptionDataResultDTO.java
  4. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/OptionResultDTO.java
  5. 4
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java
  6. 2
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java
  7. 19
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandOptionFormDTO.java
  8. 2
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandResearchAnalysisFormDTO.java
  9. 16
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ActivityStatisticsDTO.java
  10. 20
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyUnitDistributionResultDTO.java
  11. 21
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java
  12. 29
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java
  13. 13
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcResiDemandDictController.java
  14. 11
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyActivityDao.java
  15. 20
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java
  16. 4
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java
  17. 19
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyActivityService.java
  18. 21
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java
  19. 1
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java
  20. 86
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java
  21. 48
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java
  22. 13
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java
  23. 4
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java
  24. 18
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml
  25. 28
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml
  26. 17
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml
  27. 9
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java
  28. 5
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java
  29. 11
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java
  30. 10
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java
  31. 8
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/AgencyService.java
  32. 15
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java
  33. 10
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml
  34. 50
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ResiEventResearchAnalysisFormDTO.java
  35. 11
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/HouseUserDTO.java
  36. 16
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectDataDTO.java
  37. 17
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectInfoIcData.java
  38. 30
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ResiEventResearchAnalysisResDTO.java
  39. 16
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ResiEventController.java
  40. 7
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectCategoryDao.java
  41. 7
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectCategoryService.java
  42. 8
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ResiEventService.java
  43. 11
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectCategoryServiceImpl.java
  44. 8
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java
  45. 37
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java
  46. 7
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectCategoryDao.xml

6
epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/EpmetAdminOpenFeignClient.java

@ -1,6 +1,8 @@
package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.dto.form.DictListFormDTO;
import com.epmet.commons.tools.dto.result.DictListResultDTO;
import com.epmet.commons.tools.dto.result.OptionResultDTO;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.result.CorsConfigResultDTO;
@ -8,6 +10,7 @@ import com.epmet.feign.fallback.EpmetAdminOpenFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
import java.util.Map;
@ -84,4 +87,7 @@ public interface EpmetAdminOpenFeignClient {
*/
@PostMapping("/sys/dict/data/dictmap/{dictType}")
Result<Map<String, String>> dictMap(@PathVariable("dictType") String dictType);
@PostMapping("/sys/dict/data/dictlist")
Result<List<DictListResultDTO>> dictList(@RequestBody DictListFormDTO formDTO);
}

7
epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallback.java

@ -1,6 +1,8 @@
package com.epmet.feign.fallback;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.dto.form.DictListFormDTO;
import com.epmet.commons.tools.dto.result.DictListResultDTO;
import com.epmet.commons.tools.dto.result.OptionResultDTO;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
@ -46,4 +48,9 @@ public class EpmetAdminOpenFeignClientFallback implements EpmetAdminOpenFeignCli
public Result<Map<String, String>> dictMap(String dictType) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_ADMIN_SERVER, "dictMap", dictType);
}
@Override
public Result<List<DictListResultDTO>> dictList(DictListFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_ADMIN_SERVER, "dictList", formDTO);
}
}

18
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/OptionDataResultDTO.java

@ -0,0 +1,18 @@
package com.epmet.commons.tools.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2021/12/8 14:50
*/
@Data
public class OptionDataResultDTO implements Serializable {
private static final long serialVersionUID = 416877704759019210L;
private String label;
private String value;
private String code;
}

1
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/OptionResultDTO.java

@ -18,4 +18,5 @@ public class OptionResultDTO implements Serializable {
private String pValue;
private String sysDictDataId;
private List<OptionResultDTO> children;
private Boolean usableFlag;
}

4
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java

@ -69,7 +69,7 @@ public class IcPartyActivityDTO implements Serializable {
*/
@NotBlank(message = "服务事项不能为空",groups = AddGroup.class)
private String serviceMatter;
private String serviceMatterName;
/**
* 活动标题
*/
@ -97,7 +97,7 @@ public class IcPartyActivityDTO implements Serializable {
* 活动时间
*/
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern="yyyy-MM-dd HH:mm")
private Date activityTime;
/**

2
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java

@ -4,6 +4,7 @@ import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;
@ -16,6 +17,7 @@ import java.util.Date;
@Data
public class PartyActivityFormDTO implements Serializable {
private static final long serialVersionUID = -2510068555703677L;
@NotBlank(message = "组织Id不能为空" )
private String agencyId;
private String unitId;
private String title;

19
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandOptionFormDTO.java

@ -0,0 +1,19 @@
package com.epmet.dto.form.demand;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
@Data
public class DemandOptionFormDTO implements Serializable {
private static final long serialVersionUID = -5335277881919236426L;
public interface AddUserInternalGroup {
}
@NotBlank(message = "token获取客户id不能为空", groups = AddUserInternalGroup.class)
private String customerId;
@NotBlank(message = "查询条件和查看居民详情:query;新增或修改居民信息:addorupdate", groups = AddUserInternalGroup.class)
private String purpose;
}

2
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandResearchAnalysisFormDTO.java

@ -24,7 +24,7 @@ public class DemandResearchAnalysisFormDTO implements Serializable {
private String firstCategoryCode;
@NotBlank(message = "isResiUserId不能为空",groups = AddUserInternalGroup.class)
private String isResiUserId;
private String icResiUserId;
private List<String> epmetUserIdList;

16
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ActivityStatisticsDTO.java

@ -0,0 +1,16 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2021/12/9 16:05
*/
@Data
public class ActivityStatisticsDTO implements Serializable {
private String unitCount;
private String activityCount;
}

20
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyUnitDistributionResultDTO.java

@ -0,0 +1,20 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2021/12/9 10:05
*/
@Data
public class PartyUnitDistributionResultDTO implements Serializable {
private static final long serialVersionUID = -4066938451623510159L;
private String id;
private String name;
private String type;
private String longitude;
private String latitude;
}

21
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java

@ -29,6 +29,7 @@ import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dto.IcPartyActivityDTO;
import com.epmet.dto.form.PartyActivityFormDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.excel.IcPartyActivityExcel;
import com.epmet.service.IcPartyActivityService;
import org.apache.commons.collections4.CollectionUtils;
@ -117,4 +118,24 @@ public class IcPartyActivityController {
public Result importData(@LoginUser TokenDto tokenDto, HttpServletResponse response, @RequestPart("file") MultipartFile file) throws IOException {
return icPartyActivityService.importData(tokenDto, response, file);
}
/**
* @Description 联建活动分类统计
* @Param formDTO
* @Return {@link Result< List< OptionDTO>>}
* @Author zhaoqifeng
* @Date 2021/12/9 16:20
*/
@PostMapping("statistics")
public Result<List<OptionDTO>> statistics(@RequestBody PartyActivityFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return new Result<List<OptionDTO>>().ok(icPartyActivityService.statistics(formDTO));
}
@PostMapping("activitylist")
public Result<PageData<IcPartyActivityDTO>> activityList(@LoginUser TokenDto tokenDto, @RequestBody PartyActivityFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO);
PageData<IcPartyActivityDTO> page = icPartyActivityService.getActivityList(tokenDto, formDTO);
return new Result<PageData<IcPartyActivityDTO>>().ok(page);
}
}

29
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java

@ -19,6 +19,7 @@ package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.dto.result.OptionDataResultDTO;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ExcelUtils;
@ -28,8 +29,10 @@ 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.dto.IcPartyUnitDTO;
import com.epmet.dto.form.PartyActivityFormDTO;
import com.epmet.dto.form.PartyUnitFormDTO;
import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.result.PartyUnitDistributionResultDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.excel.IcPartyUnitExcel;
import com.epmet.service.IcPartyUnitService;
@ -150,4 +153,30 @@ public class IcPartyUnitController {
public Result importData(@LoginUser TokenDto tokenDto, HttpServletResponse response, @RequestPart("file") MultipartFile file) throws IOException {
return icPartyUnitService.importData(tokenDto, response, file);
}
/**
* @Description 按类型统计单位数量
* @Param dto
* @Return {@link Result< List< OptionDataResultDTO>>}
* @Author zhaoqifeng
* @Date 2021/12/8 14:52
*/
@PostMapping("typestatistics")
public Result<List<OptionDataResultDTO>> typeStatistics(@RequestBody PartyActivityFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO);
return new Result<List<OptionDataResultDTO>>().ok(icPartyUnitService.typeStatistics(formDTO));
}
/**
* @Description 联建单位分布
* @Param formDTO
* @Return {@link Result< List< PartyUnitDistributionResultDTO>>}
* @Author zhaoqifeng
* @Date 2021/12/9 10:11
*/
@PostMapping("distribution")
public Result<List<PartyUnitDistributionResultDTO>> distribution(@RequestBody PartyActivityFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO);
return new Result<List<PartyUnitDistributionResultDTO>>().ok(icPartyUnitService.distribution(formDTO));
}
}

13
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcResiDemandDictController.java

@ -132,6 +132,19 @@ public class IcResiDemandDictController {
return new Result<List<OptionResultDTO>>().ok(icResiDemandDictService.getDemandOptions(tokenDto.getCustomerId()));
}
/**
* 服务措施管理界面
*
* @param tokenDto
* @param formDTO
* @return
*/
@PostMapping("option-service")
public Result<List<OptionResultDTO>> getDemandOptionsV2(@LoginUser TokenDto tokenDto,@RequestBody DemandOptionFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
ValidatorUtils.validateEntity(formDTO,DemandOptionFormDTO.AddUserInternalGroup.class);
return new Result<List<OptionResultDTO>>().ok(icResiDemandDictService.getDemandOptionsV2(formDTO));
}
/**
* 居民信息列表需要展示分类名称单独开出来这个接口供user查询

11
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyActivityDao.java

@ -18,6 +18,8 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.form.PartyActivityFormDTO;
import com.epmet.dto.result.ActivityStatisticsDTO;
import com.epmet.entity.IcPartyActivityEntity;
import org.apache.ibatis.annotations.Mapper;
@ -30,4 +32,13 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface IcPartyActivityDao extends BaseDao<IcPartyActivityEntity> {
/**
* @Description 联建活动统计
* @Param formDTO
* @Return {@link ActivityStatisticsDTO}
* @Author zhaoqifeng
* @Date 2021/12/9 16:06
*/
ActivityStatisticsDTO getStatistics(PartyActivityFormDTO formDTO);
}

20
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java

@ -18,6 +18,8 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.commons.tools.dto.result.OptionDataResultDTO;
import com.epmet.dto.result.PartyUnitDistributionResultDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcPartyUnitEntity;
import org.apache.ibatis.annotations.Mapper;
@ -43,4 +45,22 @@ public interface IcPartyUnitDao extends BaseDao<IcPartyUnitEntity> {
List<OptionDTO> selectListByAgencyId(@Param("agencyIds") List<String> agencyIds,
@Param("unitName") String unitName,
@Param("customerId")String customerId);
/**
* 单位分类统计
* @Param agencyId
* @Return {@link java.util.List<com.epmet.commons.tools.dto.result.OptionDataResultDTO>}
* @Author zhaoqifeng
* @Date 2021/12/8 15:25
*/
List<OptionDataResultDTO> getTypeStatistics(@Param("agencyId")String agencyId);
/**
* @Description 联建单位分布
* @Param agencyId
* @Return {@link List< PartyUnitDistributionResultDTO>}
* @Author zhaoqifeng
* @Date 2021/12/9 14:24
*/
List<PartyUnitDistributionResultDTO> getDistribution(@Param("agencyId")String agencyId);
}

4
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcResiDemandDictDao.java

@ -36,8 +36,8 @@ import java.util.Set;
*/
@Mapper
public interface IcResiDemandDictDao extends BaseDao<IcResiDemandDictEntity> {
List<OptionResultDTO> selectDemandOptions(@Param("customerId") String customerId);
List<OptionResultDTO> selectChildDemands(@Param("customerId")String customerId, @Param("parentCode") String parentCode);
List<OptionResultDTO> selectDemandOptions(@Param("customerId") String customerId,@Param("usableFlagFormValue") String usableFlagFormValue);
List<OptionResultDTO> selectChildDemands(@Param("customerId")String customerId, @Param("parentCode") String parentCode,@Param("usableFlagFormValue") String usableFlagFormValue);
String selectCategoryNames(@Param("customerId") String customerId,@Param("codeSet") Set<String> codeSet);

19
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyActivityService.java

@ -23,6 +23,7 @@ import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.IcPartyActivityDTO;
import com.epmet.dto.form.PartyActivityFormDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcPartyActivityEntity;
import org.springframework.web.multipart.MultipartFile;
@ -98,4 +99,22 @@ public interface IcPartyActivityService extends BaseService<IcPartyActivityEntit
* @Date 2021/11/29 11:01
*/
Result importData(TokenDto tokenDto, HttpServletResponse response, MultipartFile file) throws IOException;
/**
* 联建活动统计
* @Param formDTO
* @Return {@link List< OptionDTO>}
* @Author zhaoqifeng
* @Date 2021/12/9 14:55
*/
List<OptionDTO> statistics(PartyActivityFormDTO formDTO);
/**
* 联建活动统计列表
* @Param formDTO
* @Return {@link PageData< IcPartyActivityDTO>}
* @Author zhaoqifeng
* @Date 2021/12/9 16:24
*/
PageData<IcPartyActivityDTO> getActivityList(TokenDto tokenDto, PartyActivityFormDTO formDTO);
}

21
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java

@ -18,12 +18,15 @@
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.dto.result.OptionDataResultDTO;
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.dto.IcPartyUnitDTO;
import com.epmet.dto.form.PartyActivityFormDTO;
import com.epmet.dto.form.PartyUnitFormDTO;
import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.result.PartyUnitDistributionResultDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcPartyUnitEntity;
import org.springframework.web.multipart.MultipartFile;
@ -120,4 +123,22 @@ public interface IcPartyUnitService extends BaseService<IcPartyUnitEntity> {
* @Date 2021/11/29 11:01
*/
Result importData(TokenDto tokenDto, HttpServletResponse response, MultipartFile file) throws IOException;
/**
* @Description 按类型统计单位数量
* @Param formDTO
* @Return {@link List< OptionDataResultDTO>}
* @Author zhaoqifeng
* @Date 2021/12/8 14:56
*/
List<OptionDataResultDTO> typeStatistics(PartyActivityFormDTO formDTO);
/**
* 联建单位分布
* @Param formDTO
* @Return {@link List< PartyUnitDistributionResultDTO>}
* @Author zhaoqifeng
* @Date 2021/12/9 10:10
*/
List<PartyUnitDistributionResultDTO> distribution(PartyActivityFormDTO formDTO);
}

1
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java

@ -86,6 +86,7 @@ public interface IcResiDemandDictService extends BaseService<IcResiDemandDictEnt
*/
List<OptionResultDTO> getDemandOptions(String customerId);
List<OptionResultDTO> getDemandOptionsV2(DemandOptionFormDTO formDTO);
/**
* 居民信息列表需要展示分类名称单独开出来这个接口供user查询
* @param formDTO

86
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java

@ -36,6 +36,7 @@ import com.epmet.dto.IcPartyActivityDTO;
import com.epmet.dto.IcPartyUnitDTO;
import com.epmet.dto.form.PartyActivityFormDTO;
import com.epmet.dto.form.demand.SubCodeFormDTO;
import com.epmet.dto.result.ActivityStatisticsDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcPartyActivityEntity;
import com.epmet.excel.IcPartyActivityImportExcel;
@ -149,7 +150,13 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl<IcPartyActivityD
@Override
public IcPartyActivityDTO get(String id) {
IcPartyActivityEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, IcPartyActivityDTO.class);
SubCodeFormDTO codeFormDTO = new SubCodeFormDTO();
codeFormDTO.setCustomerId(entity.getCustomerId());
codeFormDTO.setParentCategoryCode("1010");
Map<String, String> categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
IcPartyActivityDTO dto = ConvertUtils.sourceToTarget(entity, IcPartyActivityDTO.class);
dto.setServiceMatterName(categoryMap.get(dto.getServiceMatter()));
return dto;
}
@Override
@ -287,4 +294,81 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl<IcPartyActivityD
return new Result().ok(str);
}
/**
* 联建活动统计
*
* @param formDTO
* @Param formDTO
* @Return {@link List< OptionDTO>}
* @Author zhaoqifeng
* @Date 2021/12/9 14:55
*/
@Override
public List<OptionDTO> statistics(PartyActivityFormDTO formDTO) {
List<OptionDTO> list = new ArrayList<>();
if (null == formDTO.getStartTime() && null == formDTO.getEndTime()) {
setDate(formDTO);
}
ActivityStatisticsDTO dto = baseDao.getStatistics(formDTO);
OptionDTO unit = new OptionDTO();
unit.setLabel("组织单位");
unit.setValue(dto.getUnitCount());
list.add(unit);
OptionDTO activity = new OptionDTO();
activity.setLabel("组织活动");
activity.setValue(dto.getActivityCount());
list.add(activity);
return list;
}
/**
* 联建活动统计列表
*
* @param formDTO
* @Param formDTO
* @Return {@link PageData< IcPartyActivityDTO>}
* @Author zhaoqifeng
* @Date 2021/12/9 16:24
*/
@Override
public PageData<IcPartyActivityDTO> getActivityList(TokenDto tokenDto, PartyActivityFormDTO formDTO) {
if (null == formDTO.getStartTime() && null == formDTO.getEndTime()) {
setDate(formDTO);
}
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize());
LambdaQueryWrapper<IcPartyActivityEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(IcPartyActivityEntity::getAgencyId, formDTO.getAgencyId());
wrapper.eq(StringUtils.isNotBlank(formDTO.getServiceMatter()), IcPartyActivityEntity::getServiceMatter, formDTO.getServiceMatter());
wrapper.ge(null != formDTO.getStartTime(),IcPartyActivityEntity::getActivityTime, formDTO.getStartTime());
wrapper.le(null != formDTO.getEndTime(), IcPartyActivityEntity::getActivityTime, formDTO.getEndTime());
wrapper.orderByDesc(IcPartyActivityEntity::getActivityTime);
List<IcPartyActivityEntity> list = baseDao.selectList(wrapper);
List<IcPartyActivityDTO> dtoList = ConvertUtils.sourceToTarget(list, IcPartyActivityDTO.class);
IcPartyUnitDTO unitDTO = new IcPartyUnitDTO();
unitDTO.setAgencyId(formDTO.getAgencyId());
if (CollectionUtils.isNotEmpty(dtoList)) {
Map<String, String> option = icPartyUnitService.option(unitDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
SubCodeFormDTO codeFormDTO = new SubCodeFormDTO();
codeFormDTO.setCustomerId(tokenDto.getCustomerId());
codeFormDTO.setParentCategoryCode("1010");
Map<String, String> categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
dtoList.forEach(dto -> {
dto.setServiceMatterName(categoryMap.get(dto.getServiceMatter()));
dto.setUnitName(option.get(dto.getUnitId()));
});
}
PageInfo<IcPartyActivityDTO> pageInfo = new PageInfo<>(dtoList);
return new PageData<>(dtoList, pageInfo.getTotal());
}
private void setDate(PartyActivityFormDTO formDTO) {
String start = DateUtils.getBeforeNDay(30);
formDTO.setEndTime(DateUtils.parse(start.concat("000000"), DateUtils.DATE_TIME_NO_SPLIT));
String end = DateUtils.format(new Date(), DateUtils.DATE_PATTERN);
formDTO.setEndTime(DateUtils.parse(end.concat(" 23:59:59"), DateUtils.DATE_TIME_PATTERN));
}
}

48
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java

@ -24,7 +24,10 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.dto.form.DictListFormDTO;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.dto.result.DictListResultDTO;
import com.epmet.commons.tools.dto.result.OptionDataResultDTO;
import com.epmet.commons.tools.enums.DictTypeEnum;
import com.epmet.commons.tools.enums.PartyUnitTypeEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode;
@ -37,9 +40,11 @@ import com.epmet.commons.tools.utils.ExcelPoiUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.IcPartyUnitDao;
import com.epmet.dto.IcPartyUnitDTO;
import com.epmet.dto.form.PartyActivityFormDTO;
import com.epmet.dto.form.PartyUnitFormDTO;
import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.form.demand.SubCodeFormDTO;
import com.epmet.dto.result.PartyUnitDistributionResultDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcPartyUnitEntity;
import com.epmet.excel.IcPartyUnitImportExcel;
@ -370,6 +375,49 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
return new Result().ok(str);
}
/**
* @param formDTO
* @Description 按类型统计单位数量
* @Param formDTO
* @Return {@link List<OptionDataResultDTO>}
* @Author zhaoqifeng
* @Date 2021/12/8 14:56
*/
@Override
public List<OptionDataResultDTO> typeStatistics(PartyActivityFormDTO formDTO) {
DictListFormDTO dictFromDTO = new DictListFormDTO();
dictFromDTO.setDictType(DictTypeEnum.PARTY_UNIT_TYPE.getCode());
Result<List<DictListResultDTO>> dictResult = epmetAdminOpenFeignClient.dictList(dictFromDTO);
if (!dictResult.success()) {
throw new EpmetException(dictResult.getCode());
}
List<OptionDataResultDTO> list = baseDao.getTypeStatistics(formDTO.getAgencyId());
Map<String, String> map = list.stream().collect(Collectors.toMap(OptionDataResultDTO::getCode, OptionDataResultDTO::getValue));
return dictResult.getData().stream().map(item -> {
OptionDataResultDTO dto = new OptionDataResultDTO();
dto.setLabel(item.getLabel());
dto.setCode(item.getValue());
dto.setValue(null == map.get(item.getValue())?NumConstant.ZERO_STR:map.get(item.getValue()));
return dto;
}).collect(Collectors.toList());
}
/**
* 联建单位分布
*
* @param formDTO
* @Param formDTO
* @Return {@link List<PartyUnitDistributionResultDTO >}
* @Author zhaoqifeng
* @Date 2021/12/9 10:10
*/
@Override
public List<PartyUnitDistributionResultDTO> distribution(PartyActivityFormDTO formDTO) {
return baseDao.getDistribution(formDTO.getAgencyId());
}
private String getServiceMatter(Map<String, String> map, String matter) {
List<String> matters = Arrays.asList(matter.split(StrConstant.COLON));
List<String> list = matters.stream().map(map::get).collect(Collectors.toList());

13
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java

@ -182,7 +182,18 @@ public class IcResiDemandDictServiceImpl extends BaseServiceImpl<IcResiDemandDic
*/
@Override
public List<OptionResultDTO> getDemandOptions(String customerId) {
return baseDao.selectDemandOptions(customerId);
return baseDao.selectDemandOptions(customerId,null);
}
@Override
public List<OptionResultDTO> getDemandOptionsV2(DemandOptionFormDTO formDTO) {
if ("addorupdate".equals(formDTO.getPurpose())) {
//只查询可用的
return baseDao.selectDemandOptions(formDTO.getCustomerId(), "1");
}
//查询全部
return baseDao.selectDemandOptions(formDTO.getCustomerId(), null);
}
@Override

4
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java

@ -565,7 +565,7 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
@Override
public DemandResearchAnalysisResultDTO queryDemandResearchAnalysis(DemandResearchAnalysisFormDTO formDTO) {
//获取案件居民和及家属列表
Result<IcResiUserBriefDTO> userRes = epmetUserOpenFeignClient.findFamilyMem(formDTO.getIsResiUserId());
Result<IcResiUserBriefDTO> userRes = epmetUserOpenFeignClient.findFamilyMem(formDTO.getIcResiUserId());
if (userRes.success() || null == userRes.getData()) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取居民信息及技术接口异常");
}
@ -574,7 +574,7 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
resultDTO.setEpmetUserIdList(CollectionUtils.isNotEmpty(formDTO.getEpmetUserIdList()) ? formDTO.getEpmetUserIdList() : Collections.emptyList());
//获取当前需求人,相同分类的需求列表。不分页,直接返回所有
List<String> userIds=new ArrayList<>();
userIds.add(formDTO.getIsResiUserId());
userIds.add(formDTO.getIcResiUserId());
if(CollectionUtils.isNotEmpty(formDTO.getEpmetUserIdList())){
userIds.addAll(formDTO.getEpmetUserIdList());
}

18
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml

@ -26,6 +26,24 @@
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<select id="getStatistics" resultType="com.epmet.dto.result.ActivityStatisticsDTO" parameterType="com.epmet.dto.form.PartyActivityFormDTO">
SELECT
count( ID ) AS "activityCount",
COUNT( DISTINCT UNIT_ID ) AS "unitCount"
FROM
ic_party_activity
WHERE DEL_FLAG = '0'
AND (AGENCY_ID = #{agencyId} OR PIDS LIKE concat( '%', #{agencyId}, '%' ))
<if test='null != serviceMatter'>
AND SERVICE_MATTER = #{serviceMatter}
</if>
<if test='null != startTime'>
AND ACTIVITY_TIME &gt;= #{startTime}
</if>
<if test='null != endTime'>
AND ACTIVITY_TIME &lt;= #{endTime}
</if>
</select>
</mapper>

28
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml

@ -46,4 +46,32 @@
</foreach>
</select>
<select id="getTypeStatistics" resultType="com.epmet.commons.tools.dto.result.OptionDataResultDTO">
SELECT
TYPE AS "code",
COUNT( ID ) AS "value"
FROM
ic_party_unit
WHERE
DEL_FLAG = '0'
AND (AGENCY_ID = #{agencyId} OR PIDS LIKE concat( '%', #{agencyId}, '%' ))
GROUP BY
TYPE
</select>
<select id="getDistribution" resultType="com.epmet.dto.result.PartyUnitDistributionResultDTO">
SELECT
ID,
UNIT_NAME AS "name",
TYPE,
LONGITUDE,
LATITUDE
FROM
ic_party_unit
WHERE
DEL_FLAG = '0'
AND (AGENCY_ID = #{agencyId} OR PIDS LIKE concat( '%', #{agencyId}, '%' ))
ORDER BY
ID
</select>
</mapper>

17
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml

@ -24,8 +24,9 @@
<result column="value" property="value"/>
<result column="label" property="label"/>
<result column="PARENT_CODE" property="pValue"/>
<result column="usableFlag" property="usableFlag"/>
<collection property="children" ofType="com.epmet.commons.tools.dto.result.OptionResultDTO"
select="selectChildDemands" column="customerId=customerId,parentCode=value">
select="selectChildDemands" column="customerId=customerId,parentCode=value,usableFlagFormValue=usable_flag_form_value">
</collection>
</resultMap>
<select id="selectDemandOptions" resultMap="DemandResult">
@ -33,13 +34,18 @@
CUSTOMER_ID AS customerId,
CATEGORY_CODE AS "value",
CATEGORY_NAME AS "label",
PARENT_CODE as pValue
PARENT_CODE as pValue,
#{usableFlagFormValue} as usable_flag_form_value,
USABLE_FLAG as usableFlag
FROM
ic_resi_demand_dict
WHERE
DEL_FLAG = 0
AND LEVEL = 1
AND CUSTOMER_ID = #{customerId}
<if test="null !=usableFlagFormValue and usableFlagFormValue!='' ">
and USABLE_FLAG=#{usableFlagFormValue}
</if>
ORDER BY
SORT ASC
</select>
@ -48,7 +54,9 @@
CUSTOMER_ID AS customerId,
CATEGORY_CODE AS "value",
CATEGORY_NAME AS "label",
PARENT_CODE as pValue
PARENT_CODE as pValue,
#{usableFlagFormValue} as usable_flag_form_value,
USABLE_FLAG as usableFlag
FROM
ic_resi_demand_dict
WHERE
@ -56,6 +64,9 @@
AND LEVEL = 2
AND CUSTOMER_ID = #{customerId}
AND PARENT_CODE = #{parentCode}
<if test="null !=usableFlagFormValue and usableFlagFormValue!='' ">
and USABLE_FLAG=#{usableFlagFormValue}
</if>
ORDER BY
SORT ASC
</select>

9
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java

@ -531,4 +531,13 @@ public interface GovOrgOpenFeignClient {
@GetMapping("/gov/org/customergrid/getGridIListByAgency/{agencyId}")
Result<List<CustomerGridDTO>> getGridIListByAgency(@PathVariable("agencyId") String agencyId);
/**
* @Description 查询下级agencyId
* @param orgId
* @author zxc
* @date 2021/12/9 4:42 下午
*/
@PostMapping("/gov/org/agency/getsonagencyid")
Result<List<String>> getSonAgencyId(@RequestParam("orgId")String orgId);
}

5
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java

@ -334,6 +334,11 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getGridIListByAgency", agencyId);
}
@Override
public Result<List<String>> getSonAgencyId(String orgId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getSonAgencyId", orgId);
}
@Override
public Result<String> selectPidsByGridId(String gridId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "selectPidsByGridId", gridId);

11
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java

@ -349,4 +349,15 @@ public class AgencyController {
return new Result<List<BaseInfoFamilyBuildingResultDTO>>().ok(agencyService.baseInfoFamilyBuilding(formDTO));
}
/**
* @Description 查询下级agencyId
* @param orgId
* @author zxc
* @date 2021/12/9 4:42 下午
*/
@PostMapping("getsonagencyid")
public Result<List<String>> getSonAgencyId(@RequestParam("orgId")String orgId){
return new Result<List<String>>().ok(agencyService.getSonAgencyId(orgId));
}
}

10
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java

@ -275,10 +275,12 @@ public interface CustomerAgencyDao extends BaseDao<CustomerAgencyEntity> {
List<MapSonOrgResultDTO> selectSonOrg(@Param("pid")String pid,@Param("type")String type);
/**
* desc获取组织网格树 含直属网格
* @param agencyId
* @return
* @Description 查询下级agencyId
* @param orgId
* @author zxc
* @date 2021/12/9 4:42 下午
*/
AgencyTreeResultDTO getAgencyGridTree(String agencyId);
List<String> getSonAgencyId(@Param("orgId") String orgId);
}

8
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/AgencyService.java

@ -148,4 +148,12 @@ public interface AgencyService {
*/
List<BaseInfoFamilyBuildingResultDTO> baseInfoFamilyBuilding(BaseInfoFamilyBuildingFormDTO formDTO);
/**
* @Description 查询下级agencyId
* @param orgId
* @author zxc
* @date 2021/12/9 4:42 下午
*/
List<String> getSonAgencyId(String orgId);
}

15
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java

@ -621,6 +621,21 @@ public class AgencyServiceImpl implements AgencyService {
return result;
}
/**
* @Description 查询下级agencyId
* @param orgId
* @author zxc
* @date 2021/12/9 4:42 下午
*/
@Override
public List<String> getSonAgencyId(String orgId) {
List<String> result = customerAgencyDao.getSonAgencyId(orgId);
if (CollectionUtils.isNotEmpty(result)){
return result;
}
return new ArrayList<>();
}
private CustomerAgencyEntity constructInsertEntity(AddAgencyV2FormDTO formDTO, CustomerAgencyDTO parent) {
CustomerAgencyEntity insertEntity = ConvertUtils.sourceToTarget(formDTO, CustomerAgencyEntity.class);
insertEntity.setOrganizationName(formDTO.getAgencyName());

10
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml

@ -638,4 +638,14 @@
order by created_time desc
</select>
<!-- 查询下级agencyId -->
<select id="getSonAgencyId" resultType="java.lang.String">
SELECT
ID
FROM customer_agency
WHERE
DEL_FLAG = '0'
AND PID = #{orgId}
</select>
</mapper>

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 icResiUserId;
/**
* 个人档案的这个人对应小程序的人的用户id
*/
private List<String> epmetUserIdList;
@NotBlank(message = "tokenDto中的customerId不能为空",groups = AddUserInternalGroup.class)
private String customerId;
}

11
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/HouseUserDTO.java

@ -0,0 +1,11 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
@Data
public class HouseUserDTO implements Serializable {
private String icResiUserId;
private String icUserName;
}

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

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

@ -2918,7 +2918,13 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
if (!agencyInfo.getLevel().equals(ProjectConstant.ORG_LEVEL_COMMUNITY)){
}else {
Result<List<ProjectDistributionAnalysisRightDTO>> projectCountByGrid = govIssueOpenFeignClient.getProjectCountByGrid(formDTO);
if (!projectCountByGrid.success()){
throw new EpmetException("查询网格项目数失败...");
}
if (CollectionUtils.isNotEmpty(projectCountByGrid.getData())){
orgList = projectCountByGrid.getData();
}
}
return result;
}

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.getIcResiUserId());
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