Browse Source

Merge remote-tracking branch 'origin/master' into feature/lc_repeatEvent

feature/syp_points
songyunpeng 5 years ago
parent
commit
bf2f86c2b9
  1. 5
      esua-epdc/epdc-admin/epdc-admin-client/pom.xml
  2. 22
      esua-epdc/epdc-admin/epdc-admin-client/src/main/java/com/elink/esua/epdc/dto/SysDeptDTO.java
  3. 18
      esua-epdc/epdc-admin/epdc-admin-client/src/main/java/com/elink/esua/epdc/dto/epdc/DeptCodeOption.java
  4. 12
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/controller/SysDeptController.java
  5. 5
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/entity/SysDeptEntity.java
  6. 32
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/feign/AnalysisFeignClient.java
  7. 23
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/feign/fallback/AnalysisFeignClientFallback.java
  8. 29
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/SysDeptService.java
  9. 44
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/SysDeptServiceImpl.java
  10. 9
      esua-epdc/epdc-commons/epdc-commons-points-tools/src/main/java/com/elink/esua/epdc/pointcommons/tools/aop/UserBehaviorAop.java
  11. 6
      esua-epdc/epdc-commons/epdc-commons-tools/pom.xml
  12. 216
      esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/constant/EpmetConstant.java
  13. 2
      esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/constant/NumConstant.java
  14. 11
      esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/redis/RedisKeys.java
  15. 3
      esua-epdc/epdc-gateway/src/main/resources/application.yml
  16. 27
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/admin/DeptCodeFormDTO.java
  17. 33
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/admin/DeptCodeTree.java
  18. 6
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/pom.xml
  19. 46
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/jwt/JwtUtils.java
  20. 38
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/admin/controller/AdminAnalysisController.java
  21. 20
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/admin/service/AdminAnalysisService.java
  22. 47
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/admin/service/impl/AdminAnalysisServiceImpl.java
  23. 67
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/properties/EpmetProperties.java
  24. 88
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/utils/EpmetUtils.java
  25. 30
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/application-dev.yml
  26. 6
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/application-prod.yml
  27. 6
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/application-test.yml
  28. 1
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/application.yml
  29. 4
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiWorkUserController.java
  30. 4
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java
  31. 6
      esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/constant/SdsPtgNoticeConstant.java
  32. 13
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/service/impl/GroupBuyInfoServiceImpl.java
  33. 4
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/service/impl/SdsInfoServiceImpl.java
  34. 2
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/groupBuy/GroupBuyInfoDao.xml
  35. 2
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/sds/SdsInfoDao.xml
  36. 2
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml
  37. 4
      esua-epdc/epdc-module/epdc-news/epdc-news-server/src/main/resources/mapper/ModuleCategoryDao.xml
  38. 2
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyTopicUserAttitudeDao.xml
  39. 5
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcScreenResidentInfoByCurrentAddressFormDTO.java
  40. 15
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/EpdcScreenResidentInfoByCurrentAddressResultDTO.java
  41. 2
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/EpdcScreenPopulationInformationController.java
  42. 33
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/PopulationInformationController.java
  43. 12
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/PopulationInformationDao.java
  44. 44
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/EpdcScreenResidentInfoByCurrentAddressExcel.java
  45. 28
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/PopulationInformationService.java
  46. 25
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/PopulationInformationServiceImpl.java
  47. 65
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/PopulationInformationDao.xml

5
esua-epdc/epdc-admin/epdc-admin-client/pom.xml

@ -33,6 +33,11 @@
<artifactId>springfox-swagger-ui</artifactId>
<version>${swagger.version}</version>
</dependency>
<dependency>
<groupId>com.esua.epdc</groupId>
<artifactId>epdc-analysis-client</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
<build>

22
esua-epdc/epdc-admin/epdc-admin-client/src/main/java/com/elink/esua/epdc/dto/SysDeptDTO.java

@ -16,10 +16,7 @@ import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.Date;
@ -67,6 +64,13 @@ public class SysDeptDTO extends TreeNode implements Serializable {
*/
private String partyCode;
/**
* 区域编码
*/
@NotBlank(message = "区域编码不能为空且在50字以内", groups = DefaultGroup.class)
@Size(min = 1, max = 50, message = "区域编码不能为空且在50字以内")
private String areaCode;
public String getPartyCode() {
return partyCode;
}
@ -134,4 +138,14 @@ public class SysDeptDTO extends TreeNode implements Serializable {
public void setPid(Long pid) {
this.pid = pid;
}
public String getAreaCode() {
return areaCode;
}
public void setAreaCode(String areaCode) {
this.areaCode = areaCode;
}
}

18
esua-epdc/epdc-admin/epdc-admin-client/src/main/java/com/elink/esua/epdc/dto/epdc/DeptCodeOption.java

@ -0,0 +1,18 @@
package com.elink.esua.epdc.dto.epdc;
import lombok.Data;
import java.util.List;
/**
* 部门节点
*
* @author work@yujt.net.cn
* @date 2019/11/27 10:03
*/
@Data
public class DeptCodeOption<T> {
private List<T> options;
}

12
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/controller/SysDeptController.java

@ -17,6 +17,7 @@ import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.dto.*;
import com.elink.esua.epdc.dto.epdc.DeptCodeOption;
import com.elink.esua.epdc.dto.epdc.form.UserSysDeptInfoFormDTO;
import com.elink.esua.epdc.dto.epdc.result.UserSysDeptInfoResultDTO;
import com.elink.esua.epdc.service.SysDeptService;
@ -257,4 +258,15 @@ public class SysDeptController {
PageData<CompleteDeptDTO> page = sysDeptService.listCompleteDeptDTO(params);
return new Result<PageData<CompleteDeptDTO>>().ok(page);
}
/**
* @Description 获取部门区域编码树
* @Author songyunpeng
* @Date 2021/1/7
* @Param []
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.epdc.DeptCodeOption>
**/
@GetMapping("getDeptCode")
public Result<DeptCodeOption> getDeptCodeTree(){
return sysDeptService.getDeptCodeTree();
}
}

5
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/entity/SysDeptEntity.java

@ -79,4 +79,9 @@ public class SysDeptEntity extends BaseEntity {
*/
private String partyCode;
/**
* 区域编码
*/
private String areaCode;
}

32
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/feign/AnalysisFeignClient.java

@ -0,0 +1,32 @@
package com.elink.esua.epdc.feign;
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.admin.DeptCodeFormDTO;
import com.elink.esua.epdc.dto.epdc.DeptCodeOption;
import com.elink.esua.epdc.feign.fallback.AnalysisFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
/**
* 数据分析模块调用
*
* @Authorliuchuang
* @Date2020/9/9 15:41
*/
@FeignClient(name = ServiceConstant.EPDC_ANALYSIS_SERVER, fallback = AnalysisFeignClientFallback.class)
public interface AnalysisFeignClient {
/**
* @Description 组织机构编码获取
* @Author songyunpeng
* @Date 2021/1/7
* @Param []
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@GetMapping(value = "analysis/admin/getDeptCode", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<DeptCodeOption> getDeptCode(@RequestBody DeptCodeFormDTO deptCodeFormDTO);
}

23
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/feign/fallback/AnalysisFeignClientFallback.java

@ -0,0 +1,23 @@
package com.elink.esua.epdc.feign.fallback;
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
import com.elink.esua.epdc.commons.tools.utils.ModuleUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.admin.DeptCodeFormDTO;
import com.elink.esua.epdc.dto.epdc.DeptCodeOption;
import com.elink.esua.epdc.feign.AnalysisFeignClient;
import org.springframework.stereotype.Component;
/**
* @Authorsongyunpeg
* @Date2020/9/9 15:42
*/
@Component
public class AnalysisFeignClientFallback implements AnalysisFeignClient {
@Override
public Result<DeptCodeOption> getDeptCode(DeptCodeFormDTO deptCodeFormDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "homePagePlatformSummary",deptCodeFormDTO);
}
}

29
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/SysDeptService.java

@ -12,6 +12,7 @@ import com.elink.esua.epdc.commons.mybatis.service.BaseService;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.*;
import com.elink.esua.epdc.dto.epdc.DeptCodeOption;
import com.elink.esua.epdc.dto.epdc.GridForLeaderRegisterDTO;
import com.elink.esua.epdc.dto.epdc.form.UserSysDeptInfoFormDTO;
import com.elink.esua.epdc.dto.epdc.result.UserSysDeptInfoResultDTO;
@ -114,6 +115,15 @@ public interface SysDeptService extends BaseService<SysDeptEntity> {
*/
Integer getCodeCount(SysDeptDTO dto);
/***
* 校验区域编码是否重复
* @param dto
* @return java.lang.Integer
* @author qushutong
* @date 2019/9/21 14:14
*/
Integer getAreaCodeCount(SysDeptDTO dto);
/**
* 通过网格id集合获取网格长管理的所有网格
*
@ -241,4 +251,23 @@ public interface SysDeptService extends BaseService<SysDeptEntity> {
* @date 2020/1/28 10:40
*/
DeptOption getAllDeptOptionByLoginUser();
/***
* 组装孔村部门编码
* @param
* @return void
* @author qushutong
* @date 2019/12/13 13:54
*/
void packageKcDeptCodeOption();
/**
* @Description 获取部门区域编码树
* @Author songyunpeng
* @Date 2021/1/7
* @Param []
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.epdc.DeptCodeOption>
**/
Result<DeptCodeOption> getDeptCodeTree();
}

44
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/SysDeptServiceImpl.java

@ -29,11 +29,14 @@ import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.utils.TreeUtils;
import com.elink.esua.epdc.dao.SysDeptDao;
import com.elink.esua.epdc.dto.*;
import com.elink.esua.epdc.dto.admin.DeptCodeFormDTO;
import com.elink.esua.epdc.dto.epdc.DeptCodeOption;
import com.elink.esua.epdc.dto.epdc.DeptTreeWithTypeKeyDTO;
import com.elink.esua.epdc.dto.epdc.GridForLeaderRegisterDTO;
import com.elink.esua.epdc.dto.epdc.form.UserSysDeptInfoFormDTO;
import com.elink.esua.epdc.dto.epdc.result.UserSysDeptInfoResultDTO;
import com.elink.esua.epdc.entity.SysDeptEntity;
import com.elink.esua.epdc.feign.AnalysisFeignClient;
import com.elink.esua.epdc.feign.GroupFeignClient;
import com.elink.esua.epdc.rocketmq.dto.OrganizationModifyDTO;
import com.elink.esua.epdc.rocketmq.producer.OrganizationModifyProducer;
@ -69,6 +72,9 @@ public class SysDeptServiceImpl extends BaseServiceImpl<SysDeptDao, SysDeptEntit
@Autowired
private GroupFeignClient groupFeignClient;
@Autowired
private AnalysisFeignClient analysisFeignClient;
@Autowired
private UserDetailRedis userDetailRedis;
@ -321,6 +327,15 @@ public class SysDeptServiceImpl extends BaseServiceImpl<SysDeptDao, SysDeptEntit
return baseDao.selectCount(wrapper);
}
@Override
public Integer getAreaCodeCount(SysDeptDTO dto) {
QueryWrapper<SysDeptEntity> wrapper = new QueryWrapper<>();
wrapper.eq("area_code", dto.getAreaCode());
Long id = dto.getId();
wrapper.ne(id != null, "id", dto.getId());
return baseDao.selectCount(wrapper);
}
@Override
public Result<String> getParentDeptIds(Long deptId) {
return new Result<String>().ok(getPidList(deptId));
@ -891,6 +906,35 @@ public class SysDeptServiceImpl extends BaseServiceImpl<SysDeptDao, SysDeptEntit
return new PageData<>(userDtoList, iPage.getTotal());
}
@Override
public Result<DeptCodeOption> getDeptCodeTree() {
String deptKey = RedisKeys.getAllDeptCodeOptionKey();
Object obj = redisUtils.get(deptKey);
if (null == obj) {
this.packageKcDeptCodeOption();
obj = redisUtils.get(deptKey);
}
//防止列表为空时 redis一直不更新
DeptCodeOption deptCodeOption = (DeptCodeOption)obj;
if(deptCodeOption.getOptions().size()==0){
this.packageKcDeptCodeOption();
obj = redisUtils.get(deptKey);
}
return new Result<DeptCodeOption>().ok((DeptCodeOption)obj);
}
@Override
public void packageKcDeptCodeOption() {
DeptCodeFormDTO deptCodeFormDTO = new DeptCodeFormDTO();
deptCodeFormDTO.setRootAreaCode(EpmetConstant.DEPT_CODE_PY);
deptCodeFormDTO.setRootAreaLevel(EpmetConstant.DEPT_CODE_LEVEL_PY);
Result<DeptCodeOption> deptCodeResult = analysisFeignClient.getDeptCode(deptCodeFormDTO);
if(deptCodeResult.getData()!=null){
DeptCodeOption deptCodeOption = deptCodeResult.getData();
redisUtils.set(RedisKeys.getAllDeptCodeOptionKey(), deptCodeOption);
}
}
/**
*
* 组织机构名称修改发送MQ消息

9
esua-epdc/epdc-commons/epdc-commons-points-tools/src/main/java/com/elink/esua/epdc/pointcommons/tools/aop/UserBehaviorAop.java

@ -8,11 +8,12 @@ import com.elink.esua.epdc.commons.tools.exception.RenException;
import com.elink.esua.epdc.commons.tools.redis.RedisUtils;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.pointcommons.tools.annotation.RecordUserBehavior;
import com.elink.esua.epdc.pointcommons.tools.dto.BehaviorResultDto;
import com.elink.esua.epdc.pointcommons.tools.feign.PointsCommonFeignClient;
import com.elink.esua.epdc.pointcommons.tools.rocketmq.dto.BehaviorDto;
import com.elink.esua.epdc.pointcommons.tools.rocketmq.producer.PointsProducer;
import com.elink.esua.epdc.pointcommons.tools.annotation.RecordUserBehavior;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@ -36,6 +37,7 @@ import java.util.Date;
*/
@Aspect
@Component
@Slf4j
public class UserBehaviorAop {
@ -134,6 +136,7 @@ public class UserBehaviorAop {
Result<BehaviorResultDto> result = pointsFeignClient.getBehaviorCodeInfo(behaviorCode);
BehaviorResultDto behaviorResultDto = result.getData();
if (behaviorResultDto == null) {
log.info("根据行为编码获取编码动作失败!");
return;
}
behaviorRecodingTime = behaviorResultDto.getBehaviorRecordingTime();
@ -154,7 +157,8 @@ public class UserBehaviorAop {
String referenceId = this.covertData(recordUserBehavior.referenceId(), args, argNames);
String userId = this.covertData(recordUserBehavior.userId(), args, argNames);
String gridId = this.covertData(recordUserBehavior.gridId(), args, argNames);
if(StringUtils.isBlank(userId) || StringUtils.isBlank(referenceId)){
if(StringUtils.isBlank(userId) || StringUtils.isBlank(referenceId) || StringUtils.isBlank(gridId)){
log.info("用户ID,业务ID,网格ID转换失败!");
return;
}
BehaviorDto behaviorDto = new BehaviorDto();
@ -163,6 +167,7 @@ public class UserBehaviorAop {
behaviorDto.setUserId(userId);
behaviorDto.setGridId(Long.parseLong(gridId));
behaviorDto.setOperationTime(new Date());
log.info("动作发送信息:动作编码:"+behaviorCode+" 用户ID:"+userId+",业务ID:"+referenceId+",网格ID:"+gridId+",操作时间:"+behaviorDto.getOperationTime());
//发送mq
pointsProducer.sendMessage(RocketMqConstant.MQ_TOPIC_POINTS, RocketMqConstant.MQ_TAG_POINTS, referenceId, JSONObject.toJSONString(behaviorDto));
}

6
esua-epdc/epdc-commons/epdc-commons-tools/pom.xml

@ -107,6 +107,12 @@
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>0.7.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>

216
esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/constant/EpmetConstant.java

@ -0,0 +1,216 @@
package com.elink.esua.epdc.commons.tools.constant;
/**
* 党群e事通接口配置
*
* @Authorliuchuang
* @Date2020/8/20 13:46
*/
public interface EpmetConstant {
/**
* 1首页-平台各类总数上报
*/
String EPMET_KC_SCREEN_COLL_HOMEPAGE_PLATFORM_SUMMARY = "/data/stats/kcscreencoll/homepage/platformsummary";
/**
* 2议题分析-各类总数
*/
String EPMET_KC_SCREEN_COLL_ISSUE_SUMMARY = "/data/stats/kcscreencoll/issue/summary";
/**
* 3议题分析-参与趋势
*/
String EPMET_KC_SCREEN_COLL_ISSUE_TREND = "/data/stats/kcscreencoll/issue/trend";
/**
* 4用户分析-各类总数
*/
String EPMET_KC_SCREEN_COLL_USER_SUMMARY = "/data/stats/kcscreencoll/user/summary";
/**
* 5公益互助-志愿者公益时长排名
*/
String EPMET_KC_SCREEN_COLL_VOLUNTEER_HEART_RANK = "/data/stats/kcscreencoll/volunteer/heartrank";
/**
* 6用户分析-用户趋势
*/
String EPMET_KC_SCREEN_COLL_USER_USER_HEART_RANK = "/data/stats/kcscreencoll/user/userheartrank";
/**
* 7公益互助-活动各类总数
*/
String EPMET_KC_SCREEN_COLL_ACT_SUMMARY = "/data/stats/kcscreencoll/act/summary";
/**
* 8公益互助-活动次数趋势
*/
String EPMET_KC_SCREEN_COLL_ACT_TREND = "/data/stats/kcscreencoll/act/trend";
/**
* 9公益互助-志愿者画像
*/
String EPMET_KC_SCREEN_COLL_ACT_VOLUNTEER_SUMMARY = "/data/stats/kcscreencoll/act/volunteersummary";
/**
* 10项目分析-各类总数
*/
String EPMET_KC_SCREEN_COLL_PROJECT_SUMMARY = "/data/stats/kcscreencoll/project/summary";
/**
* 11项目分析-按分类统计
*/
String EPMET_KC_SCREEN_COLL_PROJECT_CATEGORY_SUMMARY = "/data/stats/kcscreencoll/project/categorysummary";
/**
* 12项目分析-满意度分析
*/
String EPMET_KC_SCREEN_COLL_PROJECT_STATISTIC_ANALYSIS = "/data/stats/kcscreencoll/project/satisanalysis";
/**
* 13党建声音-新闻各类总数汇总
*/
String EPMET_KC_SCREEN_COLL_NEWS_SUMMARY = "/data/stats/kcscreencoll/news/summary";
/**
* 14党建声音-新闻阅读参与趋势
*/
String EPMET_KC_SCREEN_COLL_NEWS_TREND = "/data/stats/kcscreencoll/news/trend";
/**
* 15党建声音-热度新闻排行
*/
String EPMET_KC_SCREEN_COLL_NEWS_HOT_RANK = "/data/stats/kcscreencoll/news/hotrank";
/**
* 16党建声音-新闻按类别统计
*/
String EPMET_KC_SCREEN_COLL_NEWS_CATEGORY_ANALYSIS = "/data/stats/kcscreencoll/news/categoryanalysis";
/**
* 17邻里党群-各类总数汇总
*/
String EPMET_KC_SCREEN_COLL_GROUP_SUMMARY = "/data/stats/kcscreencoll/group/summary";
/**
* 18邻里党群-小组详情
*/
String EPMET_KC_SCREEN_COLL_GROUP_DETAIL = "/data/stats/kcscreencoll/group/detail";
/**
* 19邻里党群-话题参与趋势
*/
String EPMET_KC_SCREEN_COLL_GROUP_TOPIC_TREND = "/data/stats/kcscreencoll/group/topictrend";
/**
* 09党建引领|基层治理-居民党员积分排行榜
*/
String EPMET_KC_SCREEN_COLL_PARTY_USER_RANK_DATA = "/data/stats/screencoll/partyuserrankdata";
/**
* 01党建能力-党员相关指标上报
*/
String EPMET_INDEX_COLLECT_GRID_PARTY_MEMBER_DATA = "/data/stats/indexcollect/gridpartymemberdata";
/**
* 02党建能力-网格相关指标上报
*/
String EPMET_INDEX_COLLECT_GRID_PARTY_ABILITY = "/data/stats/indexcollect/gridpartyability";
/**
* 03党建能力-区街道及社区相关指标
*/
String EPMET_INDEX_COLLECT_ORG_PARTY_ABILITY = "/data/stats/indexcollect/orgpartyability";
/**
* 04服务能力-网格相关指标
*/
String EPMET_INDEX_COLLECT_GRID_SERVICE_ABILITY = "/data/stats/indexcollect/gridserviceability";
/**
* 05服务能力-组织街道|社区|全区相关指标
*/
String EPMET_INDEX_COLLECT_ORG_SERVICE_ABILITY = "/data/stats/indexcollect/orgserviceability";
/**
* 06治理能力-网格相关指标
*/
String EPMET_INDEX_COLLECT_GRID_GOVERN_ABILITY = "/data/stats/indexcollect/gridgovrnability";
/**
* 07治理能力-区街道及社区相关指标
*/
String EPMET_INDEX_COLLECT_ORG_GOVERN_ABILITY = "/data/stats/indexcollect/orggovrnability";
/**
* 08治理能力-部门相关指标
*/
String EPMET_INDEX_COLLECT_DEPT_GOVERN_ABILITY = "/data/stats/indexcollect/deptgovrnability";
/**
* 按月计算指标数据
*/
String EPMET_INDEX_CALCULATE_ALL = "/data/stats/indexcalculate/all";
/**
* 014组织层级
*/
String EPMET_SCREEN_COLL_CUSTOMER_AGENCY = "/data/stats/screencoll/customeragency";
/**
* 015网格信息上传
*/
String EPMET_SCREEN_COLL_CUSTOMER_GRID = "/data/stats/screencoll/customergrid";
/**
* 016部门信息上传
*/
String EPMET_SCREEN_COLL_CUSTOMER_DEPT = "/data/stats/screencoll/customerdept";
/**
* 行政地区编码查询
*/
String EPMET_SCREEN_COLL_DEPT_CODE = "/data/report/screen/agency/areacodedict";
/**
* 行政地区编码查询 - 平阴县
*/
String DEPT_CODE_PY = "370124";
/**
* 行政地区编码查询 - 省级:province; 市级: city; 区县级: district ;街道:street ;社区级community
*/
String DEPT_CODE_LEVEL_PY = "district";
/**
* 接口请求头
*/
String HEARD_KEY_AUTHORIZATION = "Authorization";
/**
* 接口请求头
*/
String HEARD_KEY_ACCESS_TOKEN = "AccessToken";
/**
* 接口请求头
*/
String HEARD_KEY_APP_ID = "AppId";
/**
* AccessToken key客户ID
*/
String ACCESS_TOKEN_KEY_CUSTOMER_ID = "customerId";
/**
* AccessToken key应用ID
*/
String ACCESS_TOKEN_KEY_APP_ID = "appId";
/**
* AccessToken key时间戳
*/
String ACCESS_TOKEN_KEY_TS = "ts";
}

2
esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/constant/NumConstant.java

@ -44,4 +44,6 @@ public interface NumConstant {
String SIX_STR = "6";
String SEVEN_STR = "7";
int TWO_HUNDRED = 200;
}

11
esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/redis/RedisKeys.java

@ -254,4 +254,15 @@ public class RedisKeys {
public static String getPhraseListKey() {
return rootPrefix.concat("heart:phrase:list");
}
/***
* 部门编码所有孔村层级关系
* @param
* @return java.lang.String
* @author qushutong
* @date 2019/12/13 15:03
*/
public static String getAllDeptCodeOptionKey() {
return rootPrefix.concat("options:dept:code:js");
}
}

3
esua-epdc/epdc-gateway/src/main/resources/application.yml

@ -270,7 +270,7 @@ renren:
- /api/work/*/swagger/**
- /api/residentConfig/getResidentConfig #获取居民端配置
- /api/screenPopulationInfo/** #获取居民端配置
- /analysis/admin/getDeptCode #获取组织结构编码
workUrls:
- /api/work/** #工作端接口
- /api/analysis/** #数据端接口
@ -300,3 +300,4 @@ epdc:
- /cloudAnalysis/** #数据端接口
- /api/residentConfig/getResidentConfig #获取居民端配置
- /api/screenPopulationInfo/** #获取居民端配置
- /analysis/admin/getDeptCode #获取组织结构编码

27
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/admin/DeptCodeFormDTO.java

@ -0,0 +1,27 @@
package com.elink.esua.epdc.dto.admin;
import lombok.Data;
import java.io.Serializable;
/**
* @author songyunpeng
* @Description 获取行政区域编码参数
* @create 2021-01-07
*/
@Data
public class DeptCodeFormDTO implements Serializable {
/**
* 部门区域编码
*/
private String rootAreaCode;
/**
* 部门区域级别
*/
private String rootAreaLevel;
}

33
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/admin/DeptCodeTree.java

@ -0,0 +1,33 @@
package com.elink.esua.epdc.dto.admin;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @author songyunpeng
* @Description
* @create 2021-01-07
*/
@Data
public class DeptCodeTree implements Serializable {
/**
* 部门区域编码
*/
private String code;
/**
* 名称
*/
private String name;
/**
* 下一级
*/
private List<DeptCodeTree> children;
}

6
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/pom.xml

@ -136,6 +136,8 @@
<nacos.server-addr>47.105.119.155:8848</nacos.server-addr>
<nacos.ip></nacos.ip>
<nacos.namespace>1da17390-6495-4e16-9ec6-0b8ece18a4a0</nacos.namespace>
<epmet.url>https://epmet-dev.elinkservice.cn/api</epmet.url>
</properties>
</profile>
@ -158,6 +160,8 @@
<nacos.server-addr>47.105.119.155:8848</nacos.server-addr>
<nacos.ip>47.105.119.155</nacos.ip>
<nacos.namespace>1da17390-6495-4e16-9ec6-0b8ece18a4a0</nacos.namespace>
<epmet.url>https://epmet-dev.elinkservice.cn/api</epmet.url>
</properties>
</profile>
@ -179,6 +183,8 @@
<nacos.server-addr>172.16.0.7:10000,172.16.0.7:10001</nacos.server-addr>
<nacos.ip>172.16.0.8</nacos.ip>
<nacos.namespace></nacos.namespace>
<epmet.url>https://epmet-open.elinkservice.cn/api</epmet.url>
</properties>
</profile>
</profiles>

46
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/jwt/JwtUtils.java

@ -0,0 +1,46 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.elink.esua.epdc.jwt;
import com.elink.esua.epdc.properties.EpmetProperties;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Map;
/**
* Jwt工具类
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Component
public class JwtUtils {
@Autowired
private EpmetProperties epmetProperties;
/**
* 生成上报接口accessToken
*
* @param claims
* @return java.lang.String
* @author Liuchuang
* @since 2020/9/7 14:11
*/
public String getEpmetAccessToken(Map<String,Object> claims){
return Jwts.builder()
.setHeaderParam("typ", "JWT")
.setClaims(claims)
.signWith(SignatureAlgorithm.HS512, epmetProperties.getSecret())
.compact();
}
}

38
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/admin/controller/AdminAnalysisController.java

@ -0,0 +1,38 @@
package com.elink.esua.epdc.modules.admin.controller;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.admin.DeptCodeFormDTO;
import com.elink.esua.epdc.dto.epdc.DeptCodeOption;
import com.elink.esua.epdc.modules.admin.service.AdminAnalysisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @Description admin相关
* @Author songyunpeng
* @Date 2020/2/10 16:06
*/
@RestController
@RequestMapping("admin")
public class AdminAnalysisController {
@Autowired
private AdminAnalysisService adminAnalysisService;
/**
* @Description 获取组织机构编码
* @Author songyunpeng
* @Date 2021/1/7
* @Param []
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@GetMapping("getDeptCode")
public Result<DeptCodeOption> getDeptCode(@RequestBody DeptCodeFormDTO deptCodeFormDTO){
DeptCodeOption deptCodeOption = adminAnalysisService.getDeptCode(deptCodeFormDTO);
return new Result().ok(deptCodeOption);
}
}

20
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/admin/service/AdminAnalysisService.java

@ -0,0 +1,20 @@
package com.elink.esua.epdc.modules.admin.service;
import com.elink.esua.epdc.dto.admin.DeptCodeFormDTO;
import com.elink.esua.epdc.dto.epdc.DeptCodeOption;
/**
* @Description admin相关
* @Author songyunpeng
* @Date 2020/2/10 16:06
*/
public interface AdminAnalysisService {
/**
* @Description 获取组织机构编码
* @Author songyunpeng
* @Date 2021/1/7
* @Param []
* @return java.lang.String
**/
DeptCodeOption getDeptCode(DeptCodeFormDTO deptCodeFormDTO);
}

47
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/admin/service/impl/AdminAnalysisServiceImpl.java

@ -0,0 +1,47 @@
package com.elink.esua.epdc.modules.admin.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
import com.elink.esua.epdc.commons.tools.constant.EpmetConstant;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.admin.DeptCodeFormDTO;
import com.elink.esua.epdc.dto.admin.DeptCodeTree;
import com.elink.esua.epdc.dto.epdc.DeptCodeOption;
import com.elink.esua.epdc.dto.issue.result.IssueResultDTO;
import com.elink.esua.epdc.modules.admin.service.AdminAnalysisService;
import com.elink.esua.epdc.modules.issue.dao.IssueAnalysisDao;
import com.elink.esua.epdc.utils.EpmetUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @Description admin相关
* @Author songyunpeng
* @Date 2020/2/10 16:06
*/
@Service
public class AdminAnalysisServiceImpl extends BaseServiceImpl<IssueAnalysisDao, IssueResultDTO> implements AdminAnalysisService {
@Autowired
private EpmetUtils epmetUtils;
@Override
public DeptCodeOption getDeptCode(DeptCodeFormDTO deptCodeFormDTO) {
String dataResult = epmetUtils.httpPost(EpmetConstant.EPMET_SCREEN_COLL_DEPT_CODE, JSONObject.toJSONString(deptCodeFormDTO));
JSONObject jsonObject = JSONObject.parseObject(dataResult);
Result deptCodeTreeResult = JSON.toJavaObject(jsonObject, Result.class );
if(deptCodeTreeResult!=null && deptCodeTreeResult.getData()!=null){
List<DeptCodeTree> deptCodeTreeList = JSONArray.parseArray(JSONObject.toJSONString(deptCodeTreeResult.getData()), DeptCodeTree.class);
DeptCodeOption deptCodeOption = new DeptCodeOption();
deptCodeOption.setOptions(deptCodeTreeList);
return deptCodeOption;
}
return new DeptCodeOption();
}
}

67
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/properties/EpmetProperties.java

@ -0,0 +1,67 @@
package com.elink.esua.epdc.properties;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
/**
* 党群e事通接口配置
*
* @Authorliuchuang
* @Date2020/8/20 13:22
*/
@Configuration
@ConfigurationProperties(prefix = "epmet.config")
public class EpmetProperties {
/**
* 应用ID
*/
private String appId;
/**
* 接口前缀
*/
private String url;
/**
* 生成AccessToken密钥
*/
private String secret;
/**
* 客户ID
*/
private String customerId;
public String getAppId() {
return appId;
}
public void setAppId(String appId) {
this.appId = appId;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getSecret() {
return secret;
}
public void setSecret(String secret) {
this.secret = secret;
}
public String getCustomerId() {
return customerId;
}
public void setCustomerId(String customerId) {
this.customerId = customerId;
}
}

88
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/utils/EpmetUtils.java

@ -0,0 +1,88 @@
package com.elink.esua.epdc.utils;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import com.alibaba.fastjson.JSONObject;
import com.elink.esua.epdc.commons.tools.constant.EpmetConstant;
import com.elink.esua.epdc.commons.tools.constant.NumConstant;
import com.elink.esua.epdc.jwt.JwtUtils;
import com.elink.esua.epdc.properties.EpmetProperties;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.HashMap;
import java.util.Map;
@Component
public class EpmetUtils {
private final Logger logger = LogManager.getLogger(getClass());
@Autowired
private EpmetProperties epmetProperties;
@Autowired
private JwtUtils jwtUtils;
/**
* 大屏数据上报
*
* @param urlSuffix 接口地址后缀
* @param param 入参
* @return java.lang.String
* @author Liuchuang
* @since 2020/9/7 14:07
*/
public String httpPost(String urlSuffix,String param) {
String code = "code";
// 应用ID
String appId = epmetProperties.getAppId();
// 生成AccessToken
String accessToken = getEpmetAccessToken();
// 接口地址
String url = epmetProperties.getUrl().concat(urlSuffix);
HttpResponse response = null;
try {
response = HttpRequest.post(url).body(param)
.header(EpmetConstant.HEARD_KEY_ACCESS_TOKEN, accessToken)
.header(EpmetConstant.HEARD_KEY_APP_ID, appId)
.header("lan", "zh")
.header("Content-Type", "application/json")
.header("Date-Type","real")
.execute();
if (NumConstant.TWO_HUNDRED != response.getStatus()) {
logger.error("数据上报失败, 返回状态:{}, 请求参数:{appId:{}, url:{}, accessToken:{}, param:{}}",
response.getStatus(), appId, url, accessToken, param);
} else {
JSONObject result = JSONObject.parseObject(response.body());
if (!NumConstant.ZERO_STR.equals(result.get(code).toString())) {
logger.info("数据上报失败:{},请求地址:{},请求参数:{}", JSONObject.toJSONString(response.body()), url, param);
}
}
} catch (Exception e) {
e.printStackTrace();
}
return response.body();
}
/**
* 生成上报接口accessToken
*
* @return java.lang.String
* @author Liuchuang
* @since 2020/9/7 14:15
*/
private String getEpmetAccessToken (){
Map<String, Object> accessTokenMap = new HashMap<>(3);
accessTokenMap.put(EpmetConstant.ACCESS_TOKEN_KEY_CUSTOMER_ID, epmetProperties.getCustomerId());
accessTokenMap.put(EpmetConstant.ACCESS_TOKEN_KEY_APP_ID, epmetProperties.getAppId());
accessTokenMap.put(EpmetConstant.ACCESS_TOKEN_KEY_TS, System.currentTimeMillis());
return jwtUtils.getEpmetAccessToken(accessTokenMap);
}
}

30
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/application-dev.yml

@ -5,51 +5,51 @@ spring:
druid:
first: #数据源1
url: jdbc:mysql://rm-m5eguiv2827bdye798o.mysql.rds.aliyuncs.com:10001/js_esua_epdc_admin?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
username: jinshui
username: jinshui_epdc_test
password: jinshui@833066
second: #数据源2
url: jdbc:mysql://rm-m5eguiv2827bdye798o.mysql.rds.aliyuncs.com:10001/js_esua_epdc_api?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
username: jinshui
username: jinshui_epdc_test
password: jinshui@833066
third: #数据源3
url: jdbc:mysql://rm-m5eguiv2827bdye798o.mysql.rds.aliyuncs.com:10001/js_esua_epdc_custom?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
username: jinshui
username: jinshui_epdc_test
password: jinshui@833066
fourth: #数据源4
url: jdbc:mysql://rm-m5eguiv2827bdye798o.mysql.rds.aliyuncs.com:10001/js_esua_epdc_events?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
username: jinshui
username: jinshui_epdc_test
password: jinshui@833066
fifth: #数据源5
url: jdbc:mysql://rm-m5eguiv2827bdye798o.mysql.rds.aliyuncs.com:10001/js_esua_epdc_group?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
username: jinshui
username: jinshui_epdc_test
password: jinshui@833066
sixth: #数据源6
url: jdbc:mysql://rm-m5eguiv2827bdye798o.mysql.rds.aliyuncs.com:10001/js_esua_epdc_job?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
username: jinshui
username: jinshui_epdc_test
password: jinshui@833066
seventh: #数据源7
url: jdbc:mysql://rm-m5eguiv2827bdye798o.mysql.rds.aliyuncs.com:10001/js_esua_epdc_kpi?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
username: jinshui
username: jinshui_epdc_test
password: jinshui@833066
eighth: #数据源8
url: jdbc:mysql://rm-m5eguiv2827bdye798o.mysql.rds.aliyuncs.com:10001/js_esua_epdc_mutuality?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
username: jinshui
username: jinshui_epdc_test
password: jinshui@833066
ninth: #数据源9
url: jdbc:mysql://rm-m5eguiv2827bdye798o.mysql.rds.aliyuncs.com:10001/js_esua_epdc_news?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
username: jinshui
username: jinshui_epdc_test
password: jinshui@833066
tenth: #数据源10
url: jdbc:mysql://rm-m5eguiv2827bdye798o.mysql.rds.aliyuncs.com:10001/js_esua_epdc_points?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
username: jinshui
username: jinshui_epdc_test
password: jinshui@833066
eleventh: #数据源11
url: jdbc:mysql://rm-m5eguiv2827bdye798o.mysql.rds.aliyuncs.com:10001/js_esua_epdc_user?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
username: jinshui
username: jinshui_epdc_test
password: jinshui@833066
twelve: #数据源12
url: jdbc:mysql://rm-m5eguiv2827bdye798o.mysql.rds.aliyuncs.com:10001/js_esua_epdc_analysis?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
username: jinshui
username: jinshui_epdc_test
password: jinshui@833066
initial-size: 10
max-active: 100
@ -73,3 +73,9 @@ spring:
wall:
config:
multi-statement-allow: true
epmet:
config:
secret: 0398b33f845c4768a102d2ab6ebdd00b5fec222e437540428f55d1df53e6be1e
appId: d44a6daaea58be408bb74fe93714710f
customerId: f5ff0770f409981c73adda6ae35143ef
url: @epmet.url@

6
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/application-prod.yml

@ -72,3 +72,9 @@ spring:
wall:
config:
multi-statement-allow: true
epmet:
config:
secret: 0f2ad2929f1e4f778dc1e90a64d154e572af864ea0eb4d73be56480f0af34ba1
appId: f257a3497224ae078af12966b068a81c
customerId: 44876154d10d7cb7affd92000f84f833
url: @epmet.url@

6
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/application-test.yml

@ -73,3 +73,9 @@ spring:
wall:
config:
multi-statement-allow: true
epmet:
config:
secret: 0398b33f845c4768a102d2ab6ebdd00b5fec222e437540428f55d1df53e6be1e
appId: d44a6daaea58be408bb74fe93714710f
customerId: f5ff0770f409981c73adda6ae35143ef
url: @epmet.url@

1
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/application.yml

@ -62,3 +62,4 @@ mybatis-plus:
map-underscore-to-camel-case: true
cache-enabled: false
call-setters-on-nulls: true

4
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiWorkUserController.java

@ -119,7 +119,7 @@ public class ApiWorkUserController {
* @return
*/
@PostMapping("swagger/authenticateResidentPass")
@RecordUserBehavior(behavior = BehaviorEnum.RESIDENT_AUDIT_PASS,referenceId = "#{formDTO.getUserId}",userId = "#{formDTO.getUserId}",gridId = "#{dto.getGridId}")
@RecordUserBehavior(behavior = BehaviorEnum.RESIDENT_AUDIT_PASS,referenceId = "#{formDTO.getUserId}",userId = "#{formDTO.getUserId}",gridId = "#{formDTO.getGridId}")
public Result authenticateResidentPass(@RequestBody EpdcAppAuthenticateResidentFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return workUserService.authenticateResident(formDTO);
@ -133,7 +133,7 @@ public class ApiWorkUserController {
* @return
*/
@PostMapping("swagger/authenticateResidentNoPass")
@RecordUserBehavior(behavior = BehaviorEnum.RESIDENT_AUDIT_NO_PASS,referenceId = "#{formDTO.getUserId}",userId = "#{formDTO.getUserId}",gridId = "#{dto.getGridId}")
@RecordUserBehavior(behavior = BehaviorEnum.RESIDENT_AUDIT_NO_PASS,referenceId = "#{formDTO.getUserId}",userId = "#{formDTO.getUserId}",gridId = "#{formDTO.getGridId}")
public Result authenticateResidentNoPass(@RequestBody EpdcAppAuthenticateResidentFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return workUserService.authenticateResident(formDTO);

4
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java

@ -560,7 +560,7 @@ public interface UserFeignClient {
* @Param [userId]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.epdc.result.EpdcAppUserPointsResultDTO>
**/
@PostMapping(value = "app-user/epdc-app/user/getPointsByUserId/{userId}", consumes = MediaType.APPLICATION_JSON_VALUE)
@GetMapping(value = "app-user/epdc-app/user/getPointsByUserId/{userId}", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<EpdcAppUserPointsResultDTO> getPointsByUserId(@PathVariable String userId);
/**
* @Description 获取用户认证的网格接口
@ -569,7 +569,7 @@ public interface UserFeignClient {
* @Param [userId]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.epdc.result.EpdcAppUserPointsResultDTO>
**/
@PostMapping(value = "app-user/epdc-app/user/getUserGridIdByUserId/{userId}", consumes = MediaType.APPLICATION_JSON_VALUE)
@GetMapping(value = "app-user/epdc-app/user/getUserGridIdByUserId/{userId}", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<Long> getUserGridIdByUserId(@PathVariable String userId);
}

6
esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/constant/SdsPtgNoticeConstant.java

@ -26,7 +26,11 @@ public interface SdsPtgNoticeConstant {
/**
* 消息所属业务类型SDS_PTG
*/
String NOTICE_BUSINESS_TYPE_SDS_PTG= "sds_ptg";
String NOTICE_BUSINESS_TYPE_PTG= "ptg";
/**
* 消息所属业务类型SDS_PTG
*/
String NOTICE_BUSINESS_TYPE_SDS= "sds";
/**
* 我的消息类型1互动通知
*/

13
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/service/impl/GroupBuyInfoServiceImpl.java

@ -42,12 +42,6 @@ import com.elink.esua.epdc.dto.GroupBuyInfoDTO;
import com.elink.esua.epdc.dto.GroupBuyPriceNumberDTO;
import com.elink.esua.epdc.dto.GroupBuySignUpDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcInformationFormDTO;
import com.elink.esua.epdc.dto.form.EpdcAddGroupBuyInfoFormDTO;
import com.elink.esua.epdc.dto.form.EpdcSelectGroupBuyInfoListFormDTO;
import com.elink.esua.epdc.dto.form.GroupBuyTopFormDTO;
import com.elink.esua.epdc.dto.form.SdsPtgShieldFormDTO;
import com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyDetailResultDTO;
import com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyInfoListResultDTO;
import com.elink.esua.epdc.dto.form.*;
import com.elink.esua.epdc.dto.result.*;
import com.elink.esua.epdc.modules.feign.AdminFeignClient;
@ -55,9 +49,8 @@ import com.elink.esua.epdc.modules.feign.ContentSecurityFeignClient;
import com.elink.esua.epdc.modules.groupbuy.dao.GroupBuyInfoDao;
import com.elink.esua.epdc.modules.groupbuy.dao.GroupBuyPriceNumberDao;
import com.elink.esua.epdc.modules.groupbuy.entity.GroupBuyInfoEntity;
import com.elink.esua.epdc.modules.groupbuy.redis.GroupBuyInfoRedis;
import com.elink.esua.epdc.modules.groupbuy.service.GroupBuyEvaluationService;
import com.elink.esua.epdc.modules.groupbuy.entity.GroupBuyPriceNumberEntity;
import com.elink.esua.epdc.modules.groupbuy.service.GroupBuyEvaluationService;
import com.elink.esua.epdc.modules.groupbuy.service.GroupBuyInfoService;
import com.elink.esua.epdc.modules.groupbuy.service.GroupBuySignUpService;
import com.elink.esua.epdc.modules.reportissue.dao.CustomImgDao;
@ -165,7 +158,7 @@ public class GroupBuyInfoServiceImpl extends BaseServiceImpl<GroupBuyInfoDao, Gr
informationFormDTO.setUserId(dto.getUserId());
informationFormDTO.setContent("您的拼团购内容被修改,请注意查看。");
informationFormDTO.setTitle(SdsPtgNoticeConstant.NOTICE_PTG_UPDATE);
informationFormDTO.setBusinessType(SdsPtgNoticeConstant.NOTICE_BUSINESS_TYPE_SDS_PTG);
informationFormDTO.setBusinessType(SdsPtgNoticeConstant.NOTICE_BUSINESS_TYPE_PTG);
informationFormDTO.setBusinessId(entity.getId());
// 发送消息
newsTask.insertUserInformation(informationFormDTO);
@ -345,7 +338,7 @@ public class GroupBuyInfoServiceImpl extends BaseServiceImpl<GroupBuyInfoDao, Gr
informationFormDTO.setUserId(entityDetail.getUserId());
informationFormDTO.setContent("您的拼团购内容被屏蔽,屏蔽原因:"+formDto.getShieldReason());
informationFormDTO.setTitle(SdsPtgNoticeConstant.NOTICE_PTG_DELETE);
informationFormDTO.setBusinessType(SdsPtgNoticeConstant.NOTICE_BUSINESS_TYPE_SDS_PTG);
informationFormDTO.setBusinessType(SdsPtgNoticeConstant.NOTICE_BUSINESS_TYPE_PTG);
informationFormDTO.setBusinessId(entityDetail.getId());
// 发送消息
newsTask.insertUserInformation(informationFormDTO);

4
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/service/impl/SdsInfoServiceImpl.java

@ -135,7 +135,7 @@ public class SdsInfoServiceImpl extends BaseServiceImpl<SdsInfoDao, SdsInfoEntit
informationFormDTO.setUserId(dto.getUserId());
informationFormDTO.setContent("您的顺道捎内容被修改,请注意查看。");
informationFormDTO.setTitle(SdsPtgNoticeConstant.NOTICE_SDS_UPDATE);
informationFormDTO.setBusinessType(SdsPtgNoticeConstant.NOTICE_BUSINESS_TYPE_SDS_PTG);
informationFormDTO.setBusinessType(SdsPtgNoticeConstant.NOTICE_BUSINESS_TYPE_SDS);
informationFormDTO.setBusinessId(entity.getId());
// 发送消息
newsTask.insertUserInformation(informationFormDTO);
@ -276,7 +276,7 @@ public class SdsInfoServiceImpl extends BaseServiceImpl<SdsInfoDao, SdsInfoEntit
informationFormDTO.setUserId(entityDetail.getUserId());
informationFormDTO.setContent("您的顺道捎内容被屏蔽,屏蔽原因:"+formDto.getShieldReason());
informationFormDTO.setTitle(SdsPtgNoticeConstant.NOTICE_SDS_DELETE);
informationFormDTO.setBusinessType(SdsPtgNoticeConstant.NOTICE_BUSINESS_TYPE_SDS_PTG);
informationFormDTO.setBusinessType(SdsPtgNoticeConstant.NOTICE_BUSINESS_TYPE_SDS);
informationFormDTO.setBusinessId(entityDetail.getId());
// 发送消息
newsTask.insertUserInformation(informationFormDTO);

2
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/groupBuy/GroupBuyInfoDao.xml

@ -78,7 +78,7 @@
epdc_custom_img t1
on t.ID = t1.REFERENCE_ID and t1.IMG_TYPE = 'group_buy' and t1.DEL_FLAG = '0'
left join epdc_group_buy_price_number t2 on t.ID = t2.GROUP_BUY_ID and t2.DEL_FLAG = '0'
where t.DEL_FLAG = '0' and t.SHIELD_FLAG = '0'
where t.DEL_FLAG = '0'
and t.ID = #{id}
order by t2.GROUP_BUY_NUMBER,t1.IMG_URL
</select>

2
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/sds/SdsInfoDao.xml

@ -64,7 +64,7 @@
t.CARRY_CONTENT,
t.CARRY_STATUS
from epdc_sds_info t
where t.DEL_FLAG = '0' and t.SHIELD_FLAG = '0' and t.ID = #{id}
where t.DEL_FLAG = '0' and t.ID = #{id}
</select>
<select id="selectListOfOrganizationInfo" resultType="com.elink.esua.epdc.dto.SdsInfoDTO">
SELECT

2
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml

@ -734,7 +734,7 @@
epdc_item_handle_process hp
LEFT JOIN epdc_item_dept itemDept ON hp.ID = itemDept.ITEM_HANDLE_ID
LEFT JOIN epdc_img img ON hp.ID = img.REFERENCE_ID
AND IMG_TYPE = 'itemHandle'
AND IMG_TYPE = 'itemOutHandle'
AND img.DEL_FLAG = '0'
WHERE
hp.DEL_FLAG = '0'

4
esua-epdc/epdc-module/epdc-news/epdc-news-server/src/main/resources/mapper/ModuleCategoryDao.xml

@ -72,8 +72,8 @@
select
CONCAT(PIDS,',',ID)
from epdc_module_category
where CATEGORY_CODE = #{noticeCategoryCode}
</select>
where CATEGORY_CODE = #{noticeCategoryCode} and DEL_FLAG = '0' limit 1
</select>
<select id="getModuleCategoryCodesHierarchy" resultType="java.lang.String">
select
CATEGORY_CODE

2
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyTopicUserAttitudeDao.xml

@ -19,7 +19,7 @@
delete from epdc_party_topic_user_attitude where id = #{id}
</delete>
<select id="getPartyTopicUserAttitudeDTO" resultType="com.elink.esua.epdc.dto.PartyTopicUserAttitudeDTO">
select id from epdc_party_topic_user_attitude where PARTY_TOPIC_ID = #{topicId} and USER_ID = #{userId}
select id from epdc_party_topic_user_attitude where PARTY_TOPIC_ID = #{topicId} and USER_ID = #{userId} and DEL_FLAG = '0' limit 1
</select>

5
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcScreenResidentInfoByCurrentAddressFormDTO.java

@ -28,7 +28,10 @@ public class EpdcScreenResidentInfoByCurrentAddressFormDTO {
/**
* 当前居住地址
*/
@NotBlank(message = "居住地址不能为空")
private String currentAddress;
/**
* 居住人姓名
*/
private String residentName;
}

15
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/EpdcScreenResidentInfoByCurrentAddressResultDTO.java

@ -26,5 +26,20 @@ public class EpdcScreenResidentInfoByCurrentAddressResultDTO {
* 当前居住地址
*/
private String currentAddress;
/**
* 户主姓名
*/
private String houseHeadName;
/**
* 户主电话
*/
private String houseHeadPhone;
/**
* 户主居住地址
*/
private String houseHeadAddress;
}

2
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/EpdcScreenPopulationInformationController.java

@ -65,7 +65,7 @@ public class EpdcScreenPopulationInformationController {
}
/**
* @Description 找人接口
* @Description 找人接口
* @Author songyunpeng
* @Date 2020/9/19
* @Param [dto]

33
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/PopulationInformationController.java

@ -33,6 +33,8 @@ import com.elink.esua.epdc.dto.PopulationInformationDTO;
import com.elink.esua.epdc.dto.SysPopulationSimpleDictDTO;
import com.elink.esua.epdc.dto.SysSimpleDictDTO;
import com.elink.esua.epdc.dto.epdc.form.SysPopulationSimpleDictFormDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcScreenResidentInfoByCurrentAddressResultDTO;
import com.elink.esua.epdc.excel.EpdcScreenResidentInfoByCurrentAddressExcel;
import com.elink.esua.epdc.excel.FamilyInformationExcel;
import com.elink.esua.epdc.excel.PopulationInformationExcel;
import com.elink.esua.epdc.excel.populationMotorVehicleExcel;
@ -189,9 +191,6 @@ public class PopulationInformationController {
ExcelUtils.exportExcelToTarget(response, "家庭信息", list, FamilyInformationExcel.class);
}
/**
* @Description 获取居民信息采集总览数据
* @Author songyunpeng
@ -204,5 +203,33 @@ public class PopulationInformationController {
return populationInformationService.getPopulationInfoOverview();
}
/**
* @Description 以城找人
* @Author songyunpeng
* @Date 2020/9/19
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.epdc.result.EpdcScreenPopulationInfoByHouseResultDTO>>
**/
@GetMapping("selectPeopleByCurrentAddress")
public Result<PageData<EpdcScreenResidentInfoByCurrentAddressResultDTO>> selectPeopleByCurrentAddress(@RequestParam Map<String, Object> params){
List<EpdcScreenResidentInfoByCurrentAddressResultDTO> pointDeptStatisticsResultDTOS = populationInformationService.selectPeopleByCurrentAddressForPc(params);
Integer total = populationInformationService.selectCountPeopleByCurrentAddressForPc(params);
PageData<EpdcScreenResidentInfoByCurrentAddressResultDTO> page = new PageData<>(pointDeptStatisticsResultDTOS,total);
return new Result<PageData<EpdcScreenResidentInfoByCurrentAddressResultDTO>>().ok(page);
}
/**
* @Description 以城找人 - 导出
* @Author songyunpeng
* @Date 2020/8/28
* @Param [params, response]
* @return void
**/
@GetMapping("selectPeopleByCurrentAddress/export")
public void selectPeopleByCurrentAddressExport(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<EpdcScreenResidentInfoByCurrentAddressResultDTO> pointDeptStatisticsResultDTOS = populationInformationService.selectPeopleByCurrentAddressExportList(params);
ExcelUtils.exportExcelToTarget(response, "居民信息", pointDeptStatisticsResultDTOS, EpdcScreenResidentInfoByCurrentAddressExcel.class);
}
}

12
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/PopulationInformationDao.java

@ -174,7 +174,7 @@ public interface PopulationInformationDao extends BaseDao<PopulationInformationE
**/
Integer selectCountPeopleByHouse(EpdcScreenPopulationInfoByHouseFormDTO dto);
/**
* @Description 找人
* @Description 找人
* @Author songyunpeng
* @Date 2020/9/19
* @Param [dto]
@ -182,11 +182,19 @@ public interface PopulationInformationDao extends BaseDao<PopulationInformationE
**/
List<EpdcScreenResidentInfoByCurrentAddressResultDTO> selectPeopleByCurrentAddress(EpdcScreenResidentInfoByCurrentAddressFormDTO dto);
/**
* @Description 找人 - count
* @Description 找人 - count
* @Author songyunpeng
* @Date 2020/9/19
* @Param [dto]
* @return java.lang.Integer
**/
Integer selectCountPeopleByCurrentAddress(EpdcScreenResidentInfoByCurrentAddressFormDTO dto);
/**
* @Description 以城找人 - 导出
* @Author songyunpeng
* @Date 2021/1/5
* @Param [params]
* @return java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenResidentInfoByCurrentAddressResultDTO>
**/
List<EpdcScreenResidentInfoByCurrentAddressResultDTO> selectPeopleByCurrentAddressExportList(Map<String, Object> params);
}

44
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/EpdcScreenResidentInfoByCurrentAddressExcel.java

@ -0,0 +1,44 @@
package com.elink.esua.epdc.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
/**
* @author songyunpeng
* @Description 大屏以人找人结果
* @create 2020-09-14
*/
@Data
public class EpdcScreenResidentInfoByCurrentAddressExcel {
/**
* 居住人姓名
*/
@Excel(name = "姓名")
private String residentName;
/**
* 当前居住地址
*/
@Excel(name = "现居住地")
private String currentAddress;
/**
* 户主姓名
*/
@Excel(name = "户主姓名")
private String houseHeadName;
/**
* 户主电话
*/
@Excel(name = "户主电话")
private String houseHeadPhone;
/**
* 户主居住地址
*/
@Excel(name = "户主居住地址")
private String houseHeadAddress;
}

28
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/PopulationInformationService.java

@ -210,11 +210,37 @@ public interface PopulationInformationService extends BaseService<PopulationInfo
**/
PageData<EpdcScreenPopulationInfoByHouseResultDTO> selectPeopleByHouse(EpdcScreenPopulationInfoByHouseFormDTO dto);
/**
* @Description 一人找人
* @Description 以城找人
* @Author songyunpeng
* @Date 2020/9/19
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.epdc.form.EpdcScreenResidentInfoByCurrentAddressFormDTO>
**/
PageData<EpdcScreenResidentInfoByCurrentAddressResultDTO> selectPeopleByCurrentAddress(EpdcScreenResidentInfoByCurrentAddressFormDTO dto);
/**
* @Description 以城找人 - pc
* @Author songyunpeng
* @Date 2021/1/4
* @Param [params]
* @return java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenResidentInfoByCurrentAddressResultDTO>
**/
List<EpdcScreenResidentInfoByCurrentAddressResultDTO> selectPeopleByCurrentAddressForPc(Map<String, Object> params);
/**
* 以城找人 - pc导出
*
* @param params
* @return java.util.List<PopulationInformationDTO>
* @author generator
* @date 2020-08-19
*/
List<EpdcScreenResidentInfoByCurrentAddressResultDTO> selectPeopleByCurrentAddressExportList(Map<String, Object> params);
/**
* @Description 以城找人 - pc - count
* @Author songyunpeng
* @Date 2021/1/4
* @Param [params]
* @return java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenResidentInfoByCurrentAddressResultDTO>
**/
Integer selectCountPeopleByCurrentAddressForPc(Map<String, Object> params);
}

25
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/PopulationInformationServiceImpl.java

@ -532,6 +532,31 @@ public class PopulationInformationServiceImpl extends BaseServiceImpl<Population
return new PageData<>(list, baseDao.selectCountPeopleByCurrentAddress(dto));
}
@Override
public List<EpdcScreenResidentInfoByCurrentAddressResultDTO> selectPeopleByCurrentAddressForPc(Map<String, Object> params) {
EpdcScreenResidentInfoByCurrentAddressFormDTO formDTO = new EpdcScreenResidentInfoByCurrentAddressFormDTO();
int pageIndex = (Integer.parseInt(params.get("page")+"")- NumConstant.ONE) * Integer.parseInt(params.get("limit")+"");
formDTO.setPageIndex(pageIndex);
formDTO.setPageSize(Integer.parseInt(params.get("limit")+""));
formDTO.setCurrentAddress(params.get("houseAddress")==null?null:String.valueOf(params.get("houseAddress")));
return baseDao.selectPeopleByCurrentAddress(formDTO);
}
@Override
public List<EpdcScreenResidentInfoByCurrentAddressResultDTO> selectPeopleByCurrentAddressExportList(Map<String, Object> params) {
return baseDao.selectPeopleByCurrentAddressExportList(params);
}
@Override
public Integer selectCountPeopleByCurrentAddressForPc(Map<String, Object> params) {
EpdcScreenResidentInfoByCurrentAddressFormDTO formDTO = new EpdcScreenResidentInfoByCurrentAddressFormDTO();
int pageIndex = (Integer.parseInt(params.get("page")+"")- NumConstant.ONE) * Integer.parseInt(params.get("limit")+"");
formDTO.setPageIndex(pageIndex);
formDTO.setPageSize(Integer.parseInt(params.get("limit")+""));
formDTO.setCurrentAddress(params.get("houseAddress")==null?null:String.valueOf(params.get("houseAddress")));
return baseDao.selectCountPeopleByCurrentAddress(formDTO);
}
private void setHouseUse(String houseUse, HousingInfo housingInfo) {
switch (houseUse) {
case HouseUseConstant.RENT:

65
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/PopulationInformationDao.xml

@ -455,19 +455,31 @@
</select>
<select id="selectPeopleByCurrentAddress"
resultType="com.elink.esua.epdc.dto.epdc.result.EpdcScreenResidentInfoByCurrentAddressResultDTO">
select
t.ID as populationId,
2 as identityFlag,
t.RESIDENTS_NAME as residentName,
t.CURRENT_ADDRESS as currentAddress
from epdc_population_information t
left join epdc_house_resident ehr on t.ID = ehr.RESIDENT_ID
where t.DEL_FLAG = '0'
and ehr.DEL_FLAG = '0' and ehr.IS_HOUSE_HEAD = '0'
<if test="currentAddress!=null and currentAddress!=''">
and CURRENT_ADDRESS like concat('%', #{currentAddress}, '%')
</if>
LIMIT #{pageIndex},#{pageSize}
select t.ID as populationId,
2 as identityFlag,
t.RESIDENTS_NAME as residentName,
t.CURRENT_ADDRESS as currentAddress,
hh.RESIDENTS_NAME as houseHeadName,
hh.RESIDENTS_PHONE as houseHeadPhone,
GROUP_CONCAT(distinct ehi.HOUSE_ADDRESS) as houseHeadAddress
from epdc_population_information t
left join epdc_house_resident ehr on t.ID = ehr.RESIDENT_ID
left join epdc_population_information hh on hh.ID = ehr.HOUSE_HEAD_ID
left join epdc_house_resident hhehr on hh.ID = hhehr.RESIDENT_ID
left join epdc_housing_information ehi on hhehr.HOUSE_ID = ehi.ID
where t.DEL_FLAG = '0'
and ehr.DEL_FLAG = '0'
and ehr.IS_HOUSE_HEAD = '0'
and hh.DEL_FLAG = '0'
and hhehr.DEL_FLAG ='0' and ehi.DEL_FLAG = '0'
<if test="currentAddress!=null and currentAddress!=''">
and t.CURRENT_ADDRESS like concat('%', #{currentAddress}, '%')
</if>
<if test="residentName!=null and residentName!=''">
and t.RESIDENTS_NAME like concat('%', #{residentName}, '%')
</if>
group by t.ID
LIMIT #{pageIndex},#{pageSize}
</select>
<select id="selectCountPeopleByCurrentAddress" resultType="java.lang.Integer">
select
@ -479,6 +491,33 @@
<if test="currentAddress!=null and currentAddress!=''">
and CURRENT_ADDRESS like concat('%', #{currentAddress}, '%')
</if>
<if test="residentName!=null and residentName!=''">
and t.RESIDENTS_NAME like concat('%', #{residentName}, '%')
</if>
</select>
<select id="selectPeopleByCurrentAddressExportList"
resultType="com.elink.esua.epdc.dto.epdc.result.EpdcScreenResidentInfoByCurrentAddressResultDTO">
select t.ID as populationId,
2 as identityFlag,
t.RESIDENTS_NAME as residentName,
t.CURRENT_ADDRESS as currentAddress,
hh.RESIDENTS_NAME as houseHeadName,
hh.RESIDENTS_PHONE as houseHeadPhone,
GROUP_CONCAT(distinct ehi.HOUSE_ADDRESS) as houseHeadAddress
from epdc_population_information t
left join epdc_house_resident ehr on t.ID = ehr.RESIDENT_ID
left join epdc_population_information hh on hh.ID = ehr.HOUSE_HEAD_ID
left join epdc_house_resident hhehr on hh.ID = hhehr.RESIDENT_ID
left join epdc_housing_information ehi on hhehr.HOUSE_ID = ehi.ID
where t.DEL_FLAG = '0'
and ehr.DEL_FLAG = '0'
and ehr.IS_HOUSE_HEAD = '0'
and hh.DEL_FLAG = '0'
and hhehr.DEL_FLAG ='0' and ehi.DEL_FLAG = '0'
<if test="houseAddress!=null and houseAddress!=''">
and t.CURRENT_ADDRESS like concat('%', #{houseAddress}, '%')
</if>
group by t.ID
</select>

Loading…
Cancel
Save