Browse Source

Merge remote-tracking branch 'origin/dev_temp' into dev_temp

# Conflicts:
#	epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java
#	epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java
dev_shibei_match
zxc 5 years ago
parent
commit
dcd3478239
  1. 36
      epmet-auth/pom.xml
  2. 2
      epmet-auth/src/main/java/com/epmet/controller/SsoController.java
  3. 10
      epmet-auth/src/main/java/com/epmet/dto/form/SsoLoginOperFormDTO.java
  4. 1
      epmet-auth/src/main/java/com/epmet/dto/result/UserTokenResultDTO.java
  5. 3
      epmet-auth/src/main/java/com/epmet/service/SsoService.java
  6. 3
      epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java
  7. 14
      epmet-auth/src/main/resources/bootstrap.yml
  8. 2
      epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/DemoApp.java
  9. 18
      epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/jcet/JcetApiService.java
  10. 14
      epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/pyld/PyldApiService.java
  11. 2
      epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/constants/PyldConstants.java
  12. 11
      epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/properties/ThirdplatProps.java
  13. 23
      epmet-gateway/src/main/java/com/epmet/auth/InternalAuthProcessor.java
  14. 5
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/AgencyAndNumFormDTO.java
  15. 5
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ContactMassLineChartFormDTO.java
  16. 3
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/FineExampleFormDTO.java
  17. 5
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ParymemberFormDTO.java
  18. 19
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ScreenProjectDetailFormDTO.java
  19. 21
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ScreenProjectDistributionFormDTO.java
  20. 124
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ScreenProjectDetailResultDTO.java
  21. 32
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ScreenProjectDistributionResultDTO.java
  22. 7
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordRankResultDTO.java
  23. 10
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordTrendResultDTO.java
  24. 5
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassRootsGovernController.java
  25. 3
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassrootsPartyDevController.java
  26. 7
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/PartyMemberLeadController.java
  27. 76
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java
  28. 1
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java
  29. 2
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenOrgRankDataDao.java
  30. 3
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyLinkMassesDataDao.java
  31. 4
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java
  32. 13
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPioneerDataDao.java
  33. 24
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectDataDao.java
  34. 12
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPublicPartiTotalDataDao.java
  35. 12
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenUserJoinDao.java
  36. 5
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenUserTotalDataDao.java
  37. 2
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java
  38. 9
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java
  39. 6
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectService.java
  40. 13
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java
  41. 64
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java
  42. 27
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassrootsPartyDevServiceImpl.java
  43. 121
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/PartyMemberLeadServiceImpl.java
  44. 18
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java
  45. 49
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectServiceImpl.java
  46. 3
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenCustomerWorkRecordDictServiceImpl.java
  47. 26
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java
  48. 3
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.java
  49. 16
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java
  50. 33
      epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml
  51. 30
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml
  52. 32
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml
  53. 37
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml
  54. 33
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml
  55. 37
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml
  56. 85
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml
  57. 39
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml
  58. 29
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml
  59. 15
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml
  60. 172
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectDataDTO.java
  61. 91
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectImgDataDTO.java
  62. 136
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectProcessAttachmentDTO.java
  63. 146
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectProcessDTO.java
  64. 112
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/ScreenProjectDataInfoFormDTO.java
  65. 20
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/ScreenProjectProcessFormDTO.java
  66. 37
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java
  67. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/crm/CustomerRelationDao.java
  68. 39
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectDataDao.java
  69. 33
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectImgDataDao.java
  70. 33
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectProcessAttachmentDao.java
  71. 35
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectProcessDao.java
  72. 142
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectDataEntity.java
  73. 61
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectImgDataEntity.java
  74. 106
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectProcessAttachmentEntity.java
  75. 110
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectProcessEntity.java
  76. 21
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerRelationServiceImpl.java
  77. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java
  78. 99
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectDataService.java
  79. 96
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectImgDataService.java
  80. 95
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectProcessAttachmentService.java
  81. 99
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectProcessService.java
  82. 222
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java
  83. 99
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectImgDataServiceImpl.java
  84. 98
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectProcessAttachmentServiceImpl.java
  85. 156
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectProcessServiceImpl.java
  86. 16
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/crm/CustomerRelationDao.xml
  87. 43
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml
  88. 21
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectImgDataDao.xml
  89. 30
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectProcessAttachmentDao.xml
  90. 13
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectProcessDao.xml
  91. 1
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/topic/TopicDao.xml
  92. 40
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java
  93. 2
      epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/AreaCodeChildDao.xml
  94. 2
      epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/AreaCodeDao.xml
  95. 4
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueResultDTO.java
  96. 3
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java
  97. 6
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java
  98. 2
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java
  99. 9
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java
  100. 36
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectInfoDTO.java

36
epmet-auth/pom.xml

@ -200,9 +200,13 @@
</dingTalk.robot.secret>
<!--第三方平台,酒城e通-->
<thirdplat.jcet.domain>http://101.206.141.251:21006</thirdplat.jcet.domain>
<thirdplat.jcet.appkey>soXDEoM1</thirdplat.jcet.appkey>
<thirdplat.jcet.appsecret>V7ea0KnlYt7eSyzc</thirdplat.jcet.appsecret>
<thirdplat.jcet.c.domain>http://101.206.141.251:21006</thirdplat.jcet.c.domain>
<thirdplat.jcet.c.appkey>soXDEoM1</thirdplat.jcet.c.appkey>
<thirdplat.jcet.c.appsecret>V7ea0KnlYt7eSyzc</thirdplat.jcet.c.appsecret>
<thirdplat.jcet.g.domain>http://101.206.141.219:21006</thirdplat.jcet.g.domain>
<thirdplat.jcet.g.appkey>xSMONWwP</thirdplat.jcet.g.appkey>
<thirdplat.jcet.g.appsecret>UUCnxLyXiB4eBF4p</thirdplat.jcet.g.appsecret>
</properties>
</profile>
<profile>
@ -249,9 +253,13 @@
</dingTalk.robot.secret>
<!--第三方平台,酒城e通-->
<thirdplat.jcet.domain>http://101.206.141.251:21006</thirdplat.jcet.domain>
<thirdplat.jcet.appkey>soXDEoM1</thirdplat.jcet.appkey>
<thirdplat.jcet.appsecret>V7ea0KnlYt7eSyzc</thirdplat.jcet.appsecret>
<thirdplat.jcet.c.domain>http://101.206.141.251:21006</thirdplat.jcet.c.domain>
<thirdplat.jcet.c.appkey>soXDEoM1</thirdplat.jcet.c.appkey>
<thirdplat.jcet.c.appsecret>V7ea0KnlYt7eSyzc</thirdplat.jcet.c.appsecret>
<thirdplat.jcet.g.domain>http://101.206.141.219:21006</thirdplat.jcet.g.domain>
<thirdplat.jcet.g.appkey>xSMONWwP</thirdplat.jcet.g.appkey>
<thirdplat.jcet.g.appsecret>UUCnxLyXiB4eBF4p</thirdplat.jcet.g.appsecret>
</properties>
</profile>
<profile>
@ -293,9 +301,13 @@
</dingTalk.robot.secret>
<!--第三方平台,酒城e通-->
<thirdplat.jcet.domain>http://101.206.141.251:21006</thirdplat.jcet.domain>
<thirdplat.jcet.appkey>soXDEoM1</thirdplat.jcet.appkey>
<thirdplat.jcet.appsecret>V7ea0KnlYt7eSyzc</thirdplat.jcet.appsecret>
<thirdplat.jcet.c.domain>http://101.206.141.251:21006</thirdplat.jcet.c.domain>
<thirdplat.jcet.c.appkey>soXDEoM1</thirdplat.jcet.c.appkey>
<thirdplat.jcet.c.appsecret>V7ea0KnlYt7eSyzc</thirdplat.jcet.c.appsecret>
<thirdplat.jcet.g.domain>http://101.206.141.219:21006</thirdplat.jcet.g.domain>
<thirdplat.jcet.g.appkey>xSMONWwP</thirdplat.jcet.g.appkey>
<thirdplat.jcet.g.appsecret>UUCnxLyXiB4eBF4p</thirdplat.jcet.g.appsecret>
</properties>
</profile>
@ -341,9 +353,9 @@
</dingTalk.robot.secret>
<!--第三方平台,酒城e通-->
<thirdplat.jcet.domain>https://jcytc.lzjczl.com:21009</thirdplat.jcet.domain>
<thirdplat.jcet.appkey>2cy0a9lA</thirdplat.jcet.appkey>
<thirdplat.jcet.appsecret>6hU3PQgxLcXr27SE</thirdplat.jcet.appsecret>
<thirdplat.jcet.c.domain>https://jcytc.lzjczl.com:21009</thirdplat.jcet.c.domain>
<thirdplat.jcet.c.appkey>2cy0a9lA</thirdplat.jcet.c.appkey>
<thirdplat.jcet.c.appsecret>6hU3PQgxLcXr27SE</thirdplat.jcet.c.appsecret>
</properties>
</profile>
</profiles>

2
epmet-auth/src/main/java/com/epmet/controller/SsoController.java

@ -51,7 +51,7 @@ public class SsoController {
@PostMapping("oper/third/login")
public Result<UserTokenResultDTO> thirdLoginOper(@RequestBody SsoLoginOperFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, SsoLoginOperFormDTO.ThirdPlatformLoginForm.class);
return new Result<UserTokenResultDTO>().ok(ssoService.thirdLoginOper(formDTO));
return new Result<UserTokenResultDTO>().ok(ssoService.thirdLoginOperWork(formDTO));
}
@PostMapping("test")

10
epmet-auth/src/main/java/com/epmet/dto/form/SsoLoginOperFormDTO.java

@ -3,17 +3,15 @@ package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/1/18 下午4:43
*/
@Data
public class SsoLoginOperFormDTO extends LoginCommonFormDTO implements Serializable {
public class SsoLoginOperFormDTO extends LoginCommonFormDTO {
private static final long serialVersionUID = 8711491709544498082L;
private static final long serialVersionUID = -4215746830030486659L;
public interface ThirdPlatformLoginForm {
}
@ -25,10 +23,10 @@ public class SsoLoginOperFormDTO extends LoginCommonFormDTO implements Serializa
private String thirdToken;
/**
* 上游系统token
* 上游系统标识
*
* @see com.epmet.enums.ThirdPlatformEnum
*/
@NotBlank(message = "token不能为空", groups = {ThirdPlatformLoginForm.class})
@NotBlank(message = "平台标识不能为空", groups = {ThirdPlatformLoginForm.class})
private String platform;
}

1
epmet-auth/src/main/java/com/epmet/dto/result/UserTokenResultDTO.java

@ -17,4 +17,5 @@ public class UserTokenResultDTO implements Serializable {
* 令牌
*/
private String token;
private String customerId;
}

3
epmet-auth/src/main/java/com/epmet/service/SsoService.java

@ -33,6 +33,7 @@ public interface SsoService {
* @Description 4自动进入组织-返回token
**/
UserTokenResultDTO enterOrg(SsoEnteOrgFormDTO formDTO);
/**
* desc: sso登陆运营端
*
@ -41,5 +42,5 @@ public interface SsoService {
* @author LiuJanJun
* @date 2021/2/24 1:28 下午
*/
UserTokenResultDTO thirdLoginOper(SsoLoginOperFormDTO formDTO);
UserTokenResultDTO thirdLoginOperWork(SsoLoginOperFormDTO formDTO);
}

3
epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java

@ -133,7 +133,7 @@ public class SsoServiceImpl implements SsoService {
}
@Override
public UserTokenResultDTO thirdLoginOper(SsoLoginOperFormDTO formDTO) {
public UserTokenResultDTO thirdLoginOperWork(SsoLoginOperFormDTO formDTO) {
ThirdPlatUserInfo thirdUser;
try {
ThirdPlatformEnum platformEnum = ThirdPlatformEnum.getEnum(formDTO.getPlatform());
@ -176,6 +176,7 @@ public class SsoServiceImpl implements SsoService {
this.disposeTokenDto(formDTO.getApp(), formDTO.getClient(), epmetUser.getUserId(), token, thirdUser.getCustomerId());
UserTokenResultDTO userTokenResultDTO = new UserTokenResultDTO();
userTokenResultDTO.setToken(token);
userTokenResultDTO.setCustomerId(thirdUser.getCustomerId());
return userTokenResultDTO;
}

14
epmet-auth/src/main/resources/bootstrap.yml

@ -135,12 +135,16 @@ shutdown:
# 调用第三方平台相关参数
thirdplat:
jcet:
domain: @thirdplat.jcet.domain@
appkey: @thirdplat.jcet.appkey@
appsecret: @thirdplat.jcet.appsecret@
jcetCend:
domain: @thirdplat.jcet.c.domain@
appkey: @thirdplat.jcet.c.appkey@
appsecret: @thirdplat.jcet.c.appsecret@
jcetGend:
domain: @thirdplat.jcet.g.domain@
appkey: @thirdplat.jcet.g.appkey@
appsecret: @thirdplat.jcet.g.appsecret@
pyld:
domain: https://epmet-ext9.elinkservice.cn/platform
appId: 7a5aec009ba4eba8e254ee64fe3775e1
appKey: 14faef9af508d1c253b720ea5a43f9de
appSecret: 38e7c2604c8dd33c445705d25eebbfc12a2f7ed8a87111e9e10a40312d3a1595
appSecret: 38e7c2604c8dd33c445705d25eebbfc12a2f7ed8a87111e9e10a40312d3a1595

2
epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/DemoApp.java

@ -20,7 +20,7 @@ public class DemoApp {
//ssoToken.setSsoToken("wxz");
SsoTicketFormDTO ssoTicket = new SsoTicketFormDTO();
ssoTicket.setSsoTicket("wxz");
ssoTicket.setSsoTicket("ssoTicket-jGOAW66udmRtUWBKgs3q7k1w7prGxd5I");
int bodyLength = JSON.toJSONString(ssoTicket).getBytes("utf-8").length;

18
epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/jcet/JcetApiService.java

@ -25,11 +25,13 @@ public class JcetApiService extends AbstractApiService {
Logger logger = LoggerFactory.getLogger(getClass());
private JcetThirdplatProps jcetThirdplatProps;
private JcetThirdplatProps jcetThirdplatCendProps;
private JcetThirdplatProps jcetThirdplatGendProps;
public JcetApiService(ThirdplatProps props) {
this.thirdplatProps = props;
jcetThirdplatProps = props.getJcet();
jcetThirdplatCendProps = props.getJcetCend();
jcetThirdplatGendProps = props.getJcetGend();
}
/**
@ -47,12 +49,12 @@ public class JcetApiService extends AbstractApiService {
SsoTicketFormDTO ssoTicket = new SsoTicketFormDTO();
ssoTicket.setSsoTicket(ticket);
String domain = jcetThirdplatProps.getDomain();
String domain = jcetThirdplatCendProps.getDomain();
Result<String> result = HttpClientManager.getInstance().sendPost(
domain.concat(JcetConstants.URL_GET_USER_BY_TICKET),
domain.startsWith("https://"),
JSON.toJSONString(ssoTicket),
getHeaders(ssoTicket));
getHeaders(ssoTicket, jcetThirdplatCendProps.getAppkey(), jcetThirdplatCendProps.getAppsecret()));
try {
logger.info("【请求酒城e通第三方平台】getUserInfoByTicket()接口返回:{}", result.getData());
@ -102,15 +104,15 @@ public class JcetApiService extends AbstractApiService {
* @return
* @throws UnsupportedEncodingException
*/
private Map<String, Object> getHeaders(Object contentObject) throws UnsupportedEncodingException {
private Map<String, Object> getHeaders(Object contentObject, String appKey, String appSecret) throws UnsupportedEncodingException {
int bodyLength = JSON.toJSONString(contentObject).getBytes(StandardCharsets.UTF_8).length;
Map<String, Object> headers = new HashMap();
long timestamp = System.currentTimeMillis();
headers.put(JcetConstants.PLAT_HEADER_OPEN_TIMESTAMP, String.valueOf(timestamp));
headers.put(JcetConstants.PLAT_HEADER_OPEN_APP_ID, jcetThirdplatProps.getAppkey());
String encryptContent = jcetThirdplatProps.getAppkey() + timestamp + bodyLength;
headers.put(JcetConstants.PLAT_HEADER_OPEN_SIGN, SignUtils.generate(encryptContent, jcetThirdplatProps.getAppsecret()));
headers.put(JcetConstants.PLAT_HEADER_OPEN_APP_ID, appKey);
String encryptContent = appKey + timestamp + bodyLength;
headers.put(JcetConstants.PLAT_HEADER_OPEN_SIGN, SignUtils.generate(encryptContent, appSecret));
return headers;
}

14
epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/pyld/PyldApiService.java

@ -22,6 +22,12 @@ import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.Map;
/**
* desc: 平阴联动指挥平台sso登陆服务类 接入文档http://note.youdao.com/noteshare?id=167ad65365f9eccf7925e8c2629d2021&sub=555AE50510344CB5AACD5C06B9AA3B3B
*
* @author LiuJanJun
* @date 2021/2/25 1:43 下午
*/
@Service
public class PyldApiService extends AbstractApiService {
@ -59,9 +65,7 @@ public class PyldApiService extends AbstractApiService {
buildHeaders());
logger.info("【请求平阴联动指挥平台第三方平台】getUserInfoByTicket()接口返回:{}", result.getData());
logger.info("【请求平阴联动指挥平台第三方平台】getUserInfoByTicket()接口结束<<<<<<<<<<<<");
PyldUserInfoResultDTO resultDTO = this.parseResult(result);
ThirdPlatUserInfo userInfo = new ThirdPlatUserInfo();
@ -71,7 +75,6 @@ public class PyldApiService extends AbstractApiService {
}
/**
* 构建请求头信息
*
@ -113,11 +116,8 @@ public class PyldApiService extends AbstractApiService {
}
PyldUserInfoResultDTO userInfo = data.getObject("userInfo", PyldUserInfoResultDTO.class);
if (userInfo == null || StringUtils.isBlank(userInfo.getMobile()) || StringUtils.isBlank(userInfo.getReserved())) {
throw new RenException(EpmetErrorCode.THIRD_PLAT_REQUEST_ERROR.getCode(),
EpmetErrorCode.THIRD_PLAT_REQUEST_ERROR.getMsg().concat(":").concat(PyldConstants.REPONSE_USER_NOT_LOGIN));
throw new RenException(EpmetErrorCode.THIRD_PLAT_REQUEST_ERROR.getCode(), PyldConstants.REPONSE_USER_NOT_LOGIN);
}
return userInfo;
}
}

2
epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/constants/PyldConstants.java

@ -14,5 +14,5 @@ public interface PyldConstants {
String PLAT_PARAM_MANAGEMENTKEY = "managementKey";
String PLAT_PARAM_MANAGEMENTKEY_VALUE = "epmet_work";
String REPONSE_USER_NOT_LOGIN = "用户未登陆";
String REPONSE_USER_NOT_LOGIN = "token失效,请重新登陆";
}

11
epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/properties/ThirdplatProps.java

@ -6,10 +6,13 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
@Data
@ConfigurationProperties(prefix = "thirdplat")
public class ThirdplatProps {
/**
* 泸州 酒城e通
*/
private JcetThirdplatProps jcet;
// C端
private JcetThirdplatProps jcetCend;
// G端
private JcetThirdplatProps jcetGend;
/**
* 平阴联动指挥平台
*/

23
epmet-gateway/src/main/java/com/epmet/auth/InternalAuthProcessor.java

@ -111,17 +111,24 @@ public class InternalAuthProcessor extends AuthProcessor {
builder.header(AppClientConstant.APP,baseTokenDto.getApp());
builder.header(AppClientConstant.CLIENT,baseTokenDto.getClient());
builder.header(AppClientConstant.USER_ID,baseTokenDto.getUserId());
if (StringUtils.isNotBlank(baseTokenDto.getCustomerId())) {
builder.header(AppClientConstant.CUSTOMER_ID,baseTokenDto.getCustomerId());
}
if (StringUtils.equalsAny(baseTokenDto.getApp(), AppClientConstant.APP_GOV, AppClientConstant.APP_RESI)) {//工作端/居民端
if(StringUtils.isNotBlank(customerId)){
exchange.getRequest().mutate().header(AppClientConstant.CUSTOMER_ID, customerId);
if(StringUtils.isNotBlank(customerId)){
if (StringUtils.equalsAny(baseTokenDto.getApp(), AppClientConstant.APP_GOV, AppClientConstant.APP_RESI, "public")) {//工作端/居民端
builder.header(AppClientConstant.CUSTOMER_ID, customerId);
}
} else if (StringUtils.equals(baseTokenDto.getApp(), "public")) {//公众号端
exchange.getRequest().mutate().header(AppClientConstant.CUSTOMER_ID, customerId);
}
//if (StringUtils.isNotBlank(baseTokenDto.getCustomerId())) {
// builder.header(AppClientConstant.CUSTOMER_ID,baseTokenDto.getCustomerId());
//}
//
//if (StringUtils.equalsAny(baseTokenDto.getApp(), AppClientConstant.APP_GOV, AppClientConstant.APP_RESI)) {//工作端/居民端
// if(StringUtils.isNotBlank(customerId)){
// exchange.getRequest().mutate().header(AppClientConstant.CUSTOMER_ID, customerId);
// }
//} else if (StringUtils.equals(baseTokenDto.getApp(), "public")) {//公众号端
// exchange.getRequest().mutate().header(AppClientConstant.CUSTOMER_ID, customerId);
//}
ServerHttpRequest build = exchange.getRequest().mutate().build();
return exchange.mutate().request(build).build();
}

5
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/AgencyAndNumFormDTO.java

@ -25,4 +25,9 @@ public class AgencyAndNumFormDTO implements Serializable {
* */
@NotBlank(message = "机关Id不能为空" , groups = AgencyFormDTO.CommonAgencyIdGroup.class)
private String agencyId;
/**
* 目前只有平阴在传默认赋值370124
*/
private String areaCode;
}

5
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ContactMassLineChartFormDTO.java

@ -21,4 +21,9 @@ public class ContactMassLineChartFormDTO implements Serializable {
*/
@NotBlank(message = "机关ID不能为空",groups = {ContactMassLineChart.class})
private String agencyId;
/**
* 目前只有平阴在传默认赋值370124
*/
private String areaCode;
}

3
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/FineExampleFormDTO.java

@ -3,6 +3,7 @@ package com.epmet.evaluationindex.screen.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
@ -21,4 +22,6 @@ public class FineExampleFormDTO implements Serializable {
*/
@NotBlank(message = "机关ID不能为空",groups = {FineExample.class})
private String agencyId;
private String customerId;
}

5
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ParymemberFormDTO.java

@ -21,4 +21,9 @@ public class ParymemberFormDTO implements Serializable {
*/
@NotBlank(message = "机关ID不能为空",groups = {Parymember.class})
private String agencyId;
/**
* 目前只有平阴在传默认赋值370124
*/
private String areaCode;
}

19
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ScreenProjectDetailFormDTO.java

@ -0,0 +1,19 @@
package com.epmet.evaluationindex.screen.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @description:
* @author: liushaowen
* @date: 2021/2/24 16:12
*/
@Data
public class ScreenProjectDetailFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
@NotBlank(message = "projectId不能为空")
private String projectId;
}

21
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ScreenProjectDistributionFormDTO.java

@ -0,0 +1,21 @@
package com.epmet.evaluationindex.screen.dto.form;
import lombok.Data;
import java.io.Serializable;
/**
* @description:
* @author: liushaowen
* @date: 2021/2/24 15:22
*/
@Data
public class ScreenProjectDistributionFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
private String areaCode;
private String level;
private String agencyId;
}

124
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ScreenProjectDetailResultDTO.java

@ -0,0 +1,124 @@
package com.epmet.evaluationindex.screen.dto.result;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* @description:
* @author: liushaowen
* @date: 2021/2/24 16:15
*/
@Data
public class ScreenProjectDetailResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 项目id
*/
private String projectId;
/**
* 议题内容其实就是项目内容
*/
private String projectContent;
/**
* 上报时间对应的是立项时间;格式yyyy-MM-dd HH:mm
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private String reportTime;
/**
* 所属类别名称
*/
private String categoryName;
/**
* 上报人名
*/
private String reportUserName;
/**
* 上报人电话
*/
private String mobile;
/**
* 上报位置
*/
private String reportAddress;
/**
* 图片列表
*/
private List<String> imgList;
/**
* 处理进展列表(返回的是按时间升序的集合)
*/
private List<processDTO> processList;
@Data
public static class processDTO{
@JsonIgnore
private String processId;
/**
* 处理部门名称
*/
private String handleDeptName;
/**
* 公开处理意见
*/
private String suggestion;
/**
* 处理时间yyyy-MM-dd HH:mm:ss
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date reponseTime;
/**
* 关闭close; 回应 response结案closed_case退回return部门流转transfer创建项目created
*/
private String operation;
/**
* 被吹哨部门如果是多个以逗号隔开返给前端
*/
private String whistleDeptName;
private List<AttachmentDTO> attachments;
@Data
public static class AttachmentDTO{
@JsonInclude(JsonInclude.Include.NON_NULL)
/**
* 文件名
*/
private String fileName;
@JsonInclude(JsonInclude.Include.NON_NULL)
/**
* 附件名uuid随机生成
*/
private String attachmentName;
@JsonInclude(JsonInclude.Include.NON_NULL)
/**
* 附件大小 字节为单位
*/
private String attachmentSize;
@JsonInclude(JsonInclude.Include.NON_NULL)
/**
* 文件格式JPGPNGJPEGBMPGIFPDFPPTPPTXDOCDOCXXLSXLSXMP3WMAM4AMP4AVIMOVRMVBRMWMV
*/
private String attachmentFormat;
@JsonInclude(JsonInclude.Include.NON_NULL)
/**
* 文件类型图片 - image 视频 - video 语音 - voice 文档 - doc
*/
private String attachmentType;
/**
* url地址
*/
private String attachmentUrl;
@JsonInclude(JsonInclude.Include.NON_NULL)
/**
* 语音或视频时长
*/
private String duration;
}
}
}

32
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ScreenProjectDistributionResultDTO.java

@ -0,0 +1,32 @@
package com.epmet.evaluationindex.screen.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @description:
* @author: liushaowen
* @date: 2021/2/24 15:26
*/
@Data
public class ScreenProjectDistributionResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键id
*/
private String id;
/**
* 项目标题
*/
private String projectTitle;
/**
* 项目等级 1:红色事件2黄色事件3绿色事件
*/
private String level;
/**
* 经纬度
*/
private String longitude;
private String latitude;
}

7
epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordRankResultDTO.java

@ -4,6 +4,7 @@ import lombok.AllArgsConstructor;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
@ -29,4 +30,10 @@ public class WorkRecordRankResultDTO implements Serializable {
*下级排行列表
*/
private List<WorkRecordSubRank> subRankList;
public WorkRecordRankResultDTO() {
this.participateTotal=0;
this.participateUserTotal=0;
this.subRankList=new ArrayList<>();
}
}

10
epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordTrendResultDTO.java

@ -1,10 +1,10 @@
package com.epmet.plugins.result;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
@ -18,17 +18,17 @@ public class WorkRecordTrendResultDTO implements Serializable {
* 横轴 过去十二个月份
* ['1月', '2月', '3月', '4月', '5月','6月','7月','8月','9月','10月','11月','12月']
*/
private List<String> xAxis;
private List<String> xAxis = new ArrayList<>();
/**
* 资源标签名
* ['三会一课', '主题党日', '三述专题', '志愿服务', '党内关怀']
*/
private List<String> legend;
private List<String> legend = new ArrayList<>();
/**
*各项资源对应数据对象
*/
private List<WorkRecordTrendResultDTO.SeriesResultDTO> series;
private List<WorkRecordTrendResultDTO.SeriesResultDTO> series = new ArrayList<>();
@Data
public static class SeriesResultDTO {
@ -40,7 +40,7 @@ public class WorkRecordTrendResultDTO implements Serializable {
/**
* 各项资源对应12月份数据
*/
private List<Integer> data;
private List<Integer> data = new ArrayList<>();
/**
* 数据对应的月份Id
*/

5
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassRootsGovernController.java

@ -8,10 +8,7 @@ import com.epmet.evaluationindex.screen.dto.form.AgencyFormDTO;
import com.epmet.evaluationindex.screen.dto.form.AgencyNumTypeParamFormDTO;
import com.epmet.evaluationindex.screen.dto.result.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;

3
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassrootsPartyDevController.java

@ -10,6 +10,7 @@ import com.epmet.evaluationindex.screen.dto.result.BranchBuildRankResultDTO;
import com.epmet.evaluationindex.screen.dto.result.BranchBuildTrendResultDTO;
import com.epmet.evaluationindex.screen.dto.result.PartymemberAgeDistributionResultDTO;
import com.epmet.evaluationindex.screen.dto.result.PartymemberPercentResultDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -19,6 +20,7 @@ import org.springframework.web.bind.annotation.*;
* @author yinzuomei@elink-cn.com
* @date 2020/8/18 10:11
*/
@Slf4j
@RestController
@RequestMapping("/screen/grassrootspartydev")
public class GrassrootsPartyDevController {
@ -50,6 +52,7 @@ public class GrassrootsPartyDevController {
**/
@PostMapping("ageinfo")
public Result<PartymemberAgeDistributionResultDTO> ageInfo(@RequestBody ParymemberFormDTO param,@RequestHeader("CustomerId") String customerId){
log.info("CustomerId"+customerId);
ValidatorUtils.validateEntity(param, ParymemberFormDTO.Parymember.class);
return new Result<PartymemberAgeDistributionResultDTO>().ok(grassrootsPartyDevService.partymemberAgeDistribution(param,customerId));
}

7
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/PartyMemberLeadController.java

@ -6,10 +6,7 @@ import com.epmet.datareport.service.evaluationindex.screen.PartyMemberLeadServic
import com.epmet.evaluationindex.screen.dto.form.*;
import com.epmet.evaluationindex.screen.dto.result.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@ -33,7 +30,7 @@ public class PartyMemberLeadController {
* @date 2020/8/20 1:56 下午
*/
@PostMapping("fineexample")
public Result<FineExampleResultDTO> fineExample(@RequestBody FineExampleFormDTO fineExampleFormDTO){
public Result<FineExampleResultDTO> fineExample(@RequestHeader("CustomerId") String customerId, @RequestBody FineExampleFormDTO fineExampleFormDTO){
ValidatorUtils.validateEntity(fineExampleFormDTO, FineExampleFormDTO.FineExample.class);
return new Result<FineExampleResultDTO>().ok(partyMemberLeadService.fineExample(fineExampleFormDTO));
}

76
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java

@ -2,11 +2,23 @@ package com.epmet.datareport.controller.screen;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectOrgDailyService;
import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectQuantityOrgMonthlyService;
import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectService;
import com.epmet.dto.form.screen.CategoryAnalysisFormDTO;
import com.epmet.dto.form.screen.EfficiencyAnalysisFormDTO;
import com.epmet.dto.form.screen.QueryQuantityMonthlyFormDTO;
import com.epmet.dto.form.screen.ScreenCommonFormDTO;
import com.epmet.dto.result.screen.CategoryAnalysisResultDTO;
import com.epmet.dto.result.screen.EfficiencyAnalysisResultDTO;
import com.epmet.dto.result.screen.ProjectQuantityResultDTO;
import com.epmet.dto.result.screen.QueryQuantityMonthlyResultDTO;
import com.epmet.evaluationindex.screen.dto.form.ProjectDetailFormDTO;
import com.epmet.evaluationindex.screen.dto.form.ScreenProjectDetailFormDTO;
import com.epmet.evaluationindex.screen.dto.form.ScreenProjectDistributionFormDTO;
import com.epmet.evaluationindex.screen.dto.result.ProjectDetailResultDTO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -18,13 +30,17 @@ import java.util.List;
* @author yinzuomei@elink-cn.com
* @date 2020/8/18 10:16
*/
@Slf4j
@RestController
@RequestMapping("/screen/project")
public class ScreenProjectController {
@Autowired
private ScreenProjectService screenProjectService;
@Autowired
private ScreenProjectOrgDailyService projectOrgDailyService;
@Autowired
private ScreenProjectQuantityOrgMonthlyService projectQuantityOrgMonthlyService;
/**
* @Description 3项目详情
* @param projectDetailFormDTO
@ -37,6 +53,25 @@ public class ScreenProjectController {
return new Result<ProjectDetailResultDTO>().ok(screenProjectService.projectDetail(projectDetailFormDTO));
}
/**
* @Description 中央区事件分析-项目分布
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author liushaowen
* @Date 2021/2/24 16:10
*/
@PostMapping("projectdistribution")
public Result projectDistribution(@RequestBody ScreenProjectDistributionFormDTO formDTO){
if (StringUtils.isBlank(formDTO.getAreaCode()) && StringUtils.isBlank(formDTO.getAgencyId())){
formDTO.setAreaCode("370124");
}
return screenProjectService.projectDistribution(formDTO);
}
@PostMapping("projectdetail")
public Result projectDetail(@RequestBody ScreenProjectDetailFormDTO formDTO){
return screenProjectService.projectDistributionDetail(formDTO);
}
/**
* 事件分析类型分析
* @author zhaoqifeng
@ -48,8 +83,47 @@ public class ScreenProjectController {
@PostMapping("category-analysis")
public Result<List<CategoryAnalysisResultDTO>> categoryAnalysis(@RequestHeader("CustomerId") String customerId,
@RequestBody CategoryAnalysisFormDTO formDTO) {
log.info("===================customerId"+customerId);
ValidatorUtils.validateEntity(formDTO, CategoryAnalysisFormDTO.CategoryAnalysis.class);
return new Result<List<CategoryAnalysisResultDTO>>().ok(screenProjectService.categoryAnalysis(customerId, formDTO));
}
/**
* @param customerId
* @param formDTO
* @description 事件分析数量统计查询 平阴大屏
**/
@PostMapping("queryquantity")
public Result<ProjectQuantityResultDTO> queryQuantity(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCommonFormDTO formDTO){
formDTO.setCustomerId(customerId);
return new Result().ok(projectOrgDailyService.queryQuantity(formDTO));
}
/**
* @param customerId
* @param formDTO
* @author yinzuomei
* @description 近12个月事件分析月度数量分析 平阴大屏
**/
@PostMapping("queryquantity-monthly")
public Result<QueryQuantityMonthlyResultDTO> queryQuantityMonthly(@RequestHeader("CustomerId") String customerId, @RequestBody QueryQuantityMonthlyFormDTO formDTO) {
formDTO.setCustomerId(customerId);
ValidatorUtils.validateEntity(formDTO);
return new Result<QueryQuantityMonthlyResultDTO>().ok(projectQuantityOrgMonthlyService.queryQuantityMonthly(formDTO));
}
/**
* @param customerId
* @param formDTO
* @author yinzuomei
* @description 事件分析效率分析 平阴大屏
**/
@PostMapping("efficiency-analysis")
public Result<List<EfficiencyAnalysisResultDTO>> efficiencyAnalysis(@RequestHeader("CustomerId") String customerId, @RequestBody EfficiencyAnalysisFormDTO formDTO){
formDTO.setCustomerId(customerId);
ValidatorUtils.validateEntity(formDTO);
return new Result<List<EfficiencyAnalysisResultDTO>>().ok(projectOrgDailyService.efficiencyAnalysis(formDTO));
}
}

1
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java

@ -150,4 +150,5 @@ public interface ScreenCustomerAgencyDao {
**/
List<GridNodeDTO> selectGridList(@Param("areaCode") String areaCode,@Param("agencyId") String agencyId);
List<String> getNextAgencyIds(@Param("areaCode")String areaCode,@Param("agencyId")String agencyId);
}

2
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenOrgRankDataDao.java

@ -42,4 +42,6 @@ public interface ScreenOrgRankDataDao{
**/
List<OrgRankDataResultDTO> selectGridDataMonthly(@Param("agencyId") String agencyId, @Param("monthId") String monthId);
List<OrgRankDataResultDTO> selectGridDataMonthlyAreaCode(@Param("monthId") String monthId,
@Param("areaCode")String areaCode);
}

3
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyLinkMassesDataDao.java

@ -39,5 +39,6 @@ public interface ScreenPartyLinkMassesDataDao {
* @date 2020/8/20 2:48 下午
*/
List<ContactMassLineChartResult> selectContactMassLineChart(@Param("agencyId")String agencyId);
List<ContactMassLineChartResult> selectContactMassLineChartByAgencyIds(@Param("agencyIdList")List<String> agencyIdList);
}

4
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java

@ -71,4 +71,8 @@ public interface ScreenPartyUserRankDataDao{
* @author sun
*/
List<PartIndexScroeRankResultDTO> selectPartymemberPointList(PartIndexScroeRankFormDTO formDTO);
List<PartyUserPointResultDTO> selectPartymemberPointOrderByAreaCode(@Param("areaCode") String areaCode);
List<UserPointResultDTO> selectUserPointOrderByAreaCode(@Param("areaCode") String areaCode);
}

13
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPioneerDataDao.java

@ -21,6 +21,8 @@ import com.epmet.evaluationindex.screen.dto.result.FineExampleResultDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 党建引领-先锋模范数据
*
@ -37,5 +39,16 @@ public interface ScreenPioneerDataDao{
* @date 2020/8/20 5:22 下午
*/
FineExampleResultDTO selectFineExample(@Param("agencyId")String agencyId);
/**
* @Description 根据地区码查询先锋模范
* @param areaCode
* @param customerId
* @param customerIds - 子级客户列表
* @return com.epmet.evaluationindex.screen.dto.result.FineExampleResultDTO
* @author wangc
* @date 2021.02.24 15:39
*/
FineExampleResultDTO selectFineExampleByAreaCode(@Param("areaCode")String areaCode,@Param("customerId")String customerId,@Param("list") List<String> customerIds);
}

24
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectDataDao.java

@ -0,0 +1,24 @@
package com.epmet.datareport.dao.evaluationindex.screen;
import com.epmet.evaluationindex.screen.dto.result.ScreenProjectDetailResultDTO;
import com.epmet.evaluationindex.screen.dto.result.ScreenProjectDistributionResultDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface ScreenProjectDataDao {
List<ScreenProjectDistributionResultDTO> projectDistribution(@Param("agencyId") String agencyId, @Param("ids") List<String> ids, @Param("level") String level);
List<String> selectIdsByAreaCode(@Param("areaCode") String areaCode);
List<ScreenProjectDetailResultDTO> projectDistributionDetail(@Param("projectId") String projectId);
List<String> selectProjectImgs(@Param("projectId") String projectId);
List<ScreenProjectDetailResultDTO.processDTO> selectProjectProcess(@Param("projectId") String projectId);
List<ScreenProjectDetailResultDTO.processDTO.AttachmentDTO> selectProjectProcessAttachments(@Param("processId") String processId);
}

12
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPublicPartiTotalDataDao.java

@ -39,4 +39,16 @@ public interface ScreenPublicPartiTotalDataDao{
* @date 2020.08.20 16:00
**/
List<PublicPartiRankResultDTO> selectPublicPartiTotal(@Param("agencyId") String agencyId);
/**
* @Description 根据areaCode查询公众参与各类总数
* @param areaCode
* @return
* @author wangc
* @date 2020.08.20 16:00
**/
List<PublicPartiRankResultDTO> selectPublicPartiTotalByAreaCode(@Param("areaCode") String areaCode,
@Param("customerId")String customerId,
@Param("list")List<String> subCustomers);
}

12
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenUserJoinDao.java

@ -42,6 +42,18 @@ public interface ScreenUserJoinDao {
**/
UserJoinIndicatorGrowthRateResultDTO selectUserJoinData(@Param("agencyId") String agencyId, @Param("monthId")String monthId);
/**
* @Description 根据地区码查询用户参与数据
* @param areaCode
* @return
* @author wangc
* @date 2020.08.20 15:07
**/
UserJoinIndicatorGrowthRateResultDTO selectUserJoinDataByAreaCode(@Param("areaCode") String areaCode, @Param("monthId")String monthId,
@Param("list") List<String> subCustomers,
@Param("customerId")String customerId);
/**
* @Description 查询月度用户参与数据
* @param agencyId

5
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenUserTotalDataDao.java

@ -22,6 +22,8 @@ import com.epmet.evaluationindex.screen.dto.result.TopProfileResultDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 中央区-各类(用户|党员|党群|话题|议题|项目|注册人数|参与人数)总数
*
@ -56,5 +58,6 @@ public interface ScreenUserTotalDataDao {
* @date 2020.08.20 14:54
**/
int selectAvgIssue(@Param("agencyId")String agencyId);
PartymemberPercentResultDTO selectAgencyPartymemberPercentByIds(@Param("orgIds") List<String> orgIds);
}

2
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java

@ -51,7 +51,7 @@ public interface ScreenWorkRecordOrgDailyDao extends BaseDao<ScreenWorkRecordOrg
String selectLatestDateId(String customerId);
WorkRecordRankResultDTO selectCurrentAgency(@Param("areaCode") String areaCode,
List<WorkRecordRankResultDTO> selectCurrentAgency(@Param("areaCode") String areaCode,
@Param("dataType") String dataType,
@Param("dateId")String dateId);
}

9
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java

@ -61,4 +61,13 @@ public interface AgencyService {
AgencyNodeDTO queryStaffAgencyTree(String agencyId);
ScreenCustomerAgencyDTO queryAgencyInfo(String agencyId);
/**
* @return java.util.List<java.lang.String>
* @param agencyId
* @author yinzuomei
* @description 获取当前组织的下级组织集合
* @Date 2021/2/25 16:52
**/
List<String> getNextAgencyIds(String areaCode,String agencyId);
}

6
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectService.java

@ -1,5 +1,8 @@
package com.epmet.datareport.service.evaluationindex.screen;
import com.epmet.commons.tools.utils.Result;
import com.epmet.evaluationindex.screen.dto.form.ScreenProjectDetailFormDTO;
import com.epmet.evaluationindex.screen.dto.form.ScreenProjectDistributionFormDTO;
import com.epmet.dto.form.screen.CategoryAnalysisFormDTO;
import com.epmet.dto.result.screen.CategoryAnalysisResultDTO;
import com.epmet.evaluationindex.screen.dto.form.ProjectDetailFormDTO;
@ -33,4 +36,7 @@ public interface ScreenProjectService {
*/
List<CategoryAnalysisResultDTO> categoryAnalysis(String customerId, CategoryAnalysisFormDTO formDTO);
Result projectDistribution(ScreenProjectDistributionFormDTO formDTO);
Result projectDistributionDetail(ScreenProjectDetailFormDTO formDTO);
}

13
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java

@ -297,4 +297,17 @@ public class AgencyServiceImpl implements AgencyService {
public ScreenCustomerAgencyDTO queryAgencyInfo(String agencyId) {
return screenCustomerAgencyDao.selectByAgencyId(agencyId);
}
/**
* @param agencyId
* @return java.util.List<java.lang.String>
* @author yinzuomei
* @description 获取当前组织的下级组织集合
* @Date 2021/2/25 16:52
**/
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public List<String> getNextAgencyIds(String areaCode,String agencyId) {
return screenCustomerAgencyDao.getNextAgencyIds(areaCode,agencyId);
}
}

64
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java

@ -2,17 +2,24 @@ package com.epmet.datareport.service.evaluationindex.screen.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.DataSourceConstant;
import com.epmet.datareport.dao.evaluationindex.screen.*;
import com.epmet.datareport.service.evaluationindex.screen.GrassRootsGovernService;
import com.epmet.datareport.utils.DateUtils;
import com.epmet.datareport.utils.ModuleConstant;
import com.epmet.dto.result.ScreenCustomerAgencyDTO;
import com.epmet.evaluationindex.screen.dto.form.AgencyAndNumFormDTO;
import com.epmet.evaluationindex.screen.dto.form.AgencyFormDTO;
import com.epmet.evaluationindex.screen.dto.form.AgencyNumTypeParamFormDTO;
import com.epmet.evaluationindex.screen.dto.result.*;
import com.epmet.feign.OperCrmOpenFeignClient;
import com.github.pagehelper.PageHelper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
@ -30,6 +37,7 @@ import java.util.stream.Collectors;
* @author yinzuomei@elink-cn.com
* @date 2020/8/18 10:20
*/
@Slf4j
@Service
@DataSource(DataSourceConstant.EVALUATION_INDEX)
public class GrassRootsGovernServiceImpl implements GrassRootsGovernService {
@ -46,6 +54,10 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService {
private ScreenGovernRankDataDao screenGovernRankDataDao;
@Autowired
private ScreenPublicPartiTotalDataDao screenPublicPartiTotalDataDao;
@Autowired
private OperCrmOpenFeignClient crmClient;
@Autowired
private ScreenCustomerAgencyDao agencyDao;
/**
* @Description 1热心市民积分排行
@ -63,7 +75,13 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService {
param.setTopNum(NumConstant.FIVE);
}
PageHelper.startPage(NumConstant.ONE,param.getTopNum());
List<UserPointResultDTO> userPointList = screenPartyUserRankDataDao.selectUserPointOrder(param.getAgencyId());
List<UserPointResultDTO> userPointList = new ArrayList<>();
if(StringUtils.isNotBlank(param.getAreaCode())){
log.info("热心市民积分排行按照areaCode查询"+param.getAreaCode());
userPointList=screenPartyUserRankDataDao.selectUserPointOrderByAreaCode(param.getAreaCode());
}else{
userPointList=screenPartyUserRankDataDao.selectUserPointOrder(param.getAgencyId());
}
UserPointRankResultDTO result = new UserPointRankResultDTO();
result.setNameData(userPointList.stream().map(UserPointResultDTO::getName).collect(Collectors.toList()));
result.setPointsData(userPointList.stream().map(UserPointResultDTO::getPoint).collect(Collectors.toList()));
@ -87,6 +105,11 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService {
}
PageHelper.startPage(NumConstant.ONE,param.getTopNum());
List<DifficultProjectResultDTO> result = screenDifficultyDataDao.selectDifficulty(param.getAgencyId(),param.getType());
for(DifficultProjectResultDTO resultDTO:result){
if (StringUtils.isNotBlank(resultDTO.getImgUrl()) && !resultDTO.getImgUrl().contains("http")) {
resultDTO.setImgUrl(StrConstant.EPMETY_STR);
}
}
if(null == result) return new ArrayList<>();
return result;
}
@ -103,15 +126,26 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService {
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public PublicPartiProfileResultDTO publicPartiProfile(AgencyFormDTO param) {
ScreenCustomerAgencyDTO agencyInfo = agencyInfo(param.getAgencyId());
Result<List<String>> crmResp = crmClient.getAllSubCustomerIds(agencyInfo.getCustomerId());
List<String> subCustomers;
if(null == crmResp || !crmResp.success()) {subCustomers = null ;}
else {subCustomers = crmResp.getData();}
String monthId = dateUtils.getCurrentMonthId();
UserJoinIndicatorGrowthRateResultDTO latest = screenUserJoinDao.selectUserJoinData(param.getAgencyId(), monthId);
UserJoinIndicatorGrowthRateResultDTO latest = CollectionUtils.isEmpty(subCustomers) ?
screenUserJoinDao.selectUserJoinData(param.getAgencyId(), monthId) :
screenUserJoinDao.selectUserJoinDataByAreaCode(agencyInfo.getAreaCode(),monthId,
subCustomers,agencyInfo.getCustomerId());
//保证获取公众参与概率数据的最大可能性
int time = NumConstant.TWELVE;
while (null == latest && time > NumConstant.ONE) {
time--;
monthId = dateUtils.getPreviousMonthIdByDest(null, monthId);
latest = screenUserJoinDao.selectUserJoinData(param.getAgencyId(), monthId);
latest = CollectionUtils.isEmpty(subCustomers) ?
screenUserJoinDao.selectUserJoinData(param.getAgencyId(), monthId) :
screenUserJoinDao.selectUserJoinDataByAreaCode(agencyInfo.getAreaCode(),monthId,
subCustomers,agencyInfo.getCustomerId());
}
if (null == latest) return new PublicPartiProfileResultDTO();
@ -139,8 +173,18 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService {
if(NumConstant.ZERO == param.getTopNum()){
param.setTopNum(NumConstant.MAX);
}
ScreenCustomerAgencyDTO agencyInfo = agencyInfo(param.getAgencyId()) ;
List<String> subCustomers;
Result<List<String>> crmResp = crmClient.getAllSubCustomerIds(agencyInfo.getCustomerId());
if(null == crmResp || !crmResp.success()) {subCustomers = null ;}
else {subCustomers = crmResp.getData();}
PageHelper.startPage(NumConstant.ONE,param.getTopNum());
List<PublicPartiRankResultDTO> result = screenPublicPartiTotalDataDao.selectPublicPartiTotal(param.getAgencyId());
List<PublicPartiRankResultDTO> result =
CollectionUtils.isEmpty(subCustomers) ?
screenPublicPartiTotalDataDao.selectPublicPartiTotal(param.getAgencyId())
: screenPublicPartiTotalDataDao.selectPublicPartiTotalByAreaCode(agencyInfo.getAreaCode(),agencyInfo.getCustomerId(),
subCustomers);
if(null == result) {
return new ArrayList<>();
}
@ -247,6 +291,18 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService {
return percentStr.concat(ModuleConstant.SYMBOL_PERCENT);
}
/**
* @Description 通过agencyId获取机关信息
* @param agencyId
* @return java.lang.String
* @author wangc
* @date 2021.02.25 13:46
*/
private ScreenCustomerAgencyDTO agencyInfo(String agencyId){
ScreenCustomerAgencyDTO agencyInfo = agencyDao.selectByAgencyId(agencyId);
if(null == agencyInfo) throw new RenException("获取Agency信息失败");
return agencyInfo;
}
}

27
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassrootsPartyDevServiceImpl.java

@ -8,6 +8,7 @@ import com.epmet.constant.DataSourceConstant;
import com.epmet.datareport.dao.evaluationindex.screen.ScreenCpcBaseDataDao;
import com.epmet.datareport.dao.evaluationindex.screen.ScreenPartyBranchDataDao;
import com.epmet.datareport.dao.evaluationindex.screen.ScreenUserTotalDataDao;
import com.epmet.datareport.service.evaluationindex.screen.AgencyService;
import com.epmet.datareport.service.evaluationindex.screen.GrassrootsPartyDevService;
import com.epmet.datareport.utils.DateUtils;
import com.epmet.datareport.utils.ModuleConstant;
@ -50,7 +51,8 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService
private DateUtils dateUtils;
@Autowired
private OperCrmOpenFeignClient operCrmOpenFeignClient;
@Autowired
private AgencyService screenCustomerAgencyService;
/**
* @Description 1党员基本情况-饼状图概况
* @NEI https://nei.netease.com/interface/detail/res/?pid=57068&id=321324
@ -62,10 +64,29 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public PartymemberPercentResultDTO partymemberBaseInfo(ParymemberFormDTO param) {
if(StringUtils.isNotBlank(param.getAreaCode())){
logger.info(String.format("党员基本情况-饼状图概况按照areaCode查询:%s",param.getAreaCode()));
List<String> ids=screenCustomerAgencyService.getNextAgencyIds(param.getAreaCode(),param.getAgencyId());
if(org.apache.commons.collections4.CollectionUtils.isNotEmpty(ids)){
PartymemberPercentResultDTO result = screenUserTotalDataDao.selectAgencyPartymemberPercentByIds(ids);
if(null == result){
logger.warn("selectAgencyPartymemberPercentByIds is null");
result = new PartymemberPercentResultDTO();
result.setPercentInPlatForm(convertPercentStr(BigDecimal.ZERO));
return result;
}
if(null == result.getPlatFormTotal() || NumConstant.ZERO == result.getPlatFormTotal()){
result.setPercentInPlatForm(convertPercentStr(BigDecimal.ZERO));
}else{
result.setPercentInPlatForm(convertPercentStr(new BigDecimal((result.getPartyMemberTotal().doubleValue()/result.getPlatFormTotal().doubleValue()))));
}
return result;
}
logger.warn("当前组织没有下级getNextAgencyIds is empty");
return new PartymemberPercentResultDTO();
}
PartymemberPercentResultDTO result = screenUserTotalDataDao.selectAgencyPartymemberPercent(param.getAgencyId());
if(null == result){
result = new PartymemberPercentResultDTO();
logger.warn("com.epmet.datareport.service.screen.impl.GrassrootsPartyDevServiceImpl.partymemberBaseInfo:未查询出指定agencyId下的党员基础信息数据,agencyId :: {}",param.getAgencyId());
result = new PartymemberPercentResultDTO();
result.setPercentInPlatForm(convertPercentStr(BigDecimal.ZERO));

121
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/PartyMemberLeadServiceImpl.java

@ -1,19 +1,25 @@
package com.epmet.datareport.service.evaluationindex.screen.impl;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.DataSourceConstant;
import com.epmet.datareport.dao.evaluationindex.screen.*;
import com.epmet.datareport.service.evaluationindex.screen.AgencyService;
import com.epmet.datareport.service.evaluationindex.screen.PartyMemberLeadService;
import com.epmet.datareport.utils.DateUtils;
import com.epmet.datareport.utils.ModuleConstant;
import com.epmet.dto.result.ScreenCustomerAgencyDTO;
import com.epmet.evaluationindex.screen.constant.ScreenConstant;
import com.epmet.evaluationindex.screen.dto.form.AgencyAndNumFormDTO;
import com.epmet.evaluationindex.screen.dto.form.ContactMassLineChartFormDTO;
import com.epmet.evaluationindex.screen.dto.form.FineExampleFormDTO;
import com.epmet.evaluationindex.screen.dto.form.VolunteerServiceFormDTO;
import com.epmet.evaluationindex.screen.dto.result.*;
import com.epmet.feign.OperCrmOpenFeignClient;
import com.github.pagehelper.PageHelper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
@ -48,6 +54,12 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService {
private DateUtils dateUtils;
@Autowired
private ScreenPartyUserRankDataDao screenPartyUserRankDataDao;
@Autowired
private ScreenCustomerAgencyDao customerAgencyDao;
@Autowired
private OperCrmOpenFeignClient operCrmOpenFeignClient;
@Autowired
private AgencyService screenCustomerAgencyService;
/**
* @Description 1先锋模范
@ -58,17 +70,36 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService {
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public FineExampleResultDTO fineExample(FineExampleFormDTO fineExampleFormDTO) {
FineExampleResultDTO fineExampleResultDTO = screenPioneerDataDao.selectFineExample(fineExampleFormDTO.getAgencyId());
if (null == fineExampleResultDTO){
return new FineExampleResultDTO();
String customerId = fineExampleFormDTO.getCustomerId();
String areaCode = null;
if(StringUtils.isBlank(customerId)){
ScreenCustomerAgencyDTO agencyInfo = customerAgencyDao.selectByAgencyId(fineExampleFormDTO.getAgencyId());
if(null == agencyInfo) throw new RenException("未找到对应的机关");
customerId = agencyInfo.getCustomerId();
areaCode = agencyInfo.getAreaCode();
}
fineExampleResultDTO.setIssueRatio(this.getRatio(fineExampleResultDTO.getIssueRatioA()));
fineExampleResultDTO.setPublishIssueRatio(this.getRatio(fineExampleResultDTO.getPublishIssueRatioA()));
fineExampleResultDTO.setResolvedProjectRatio(this.getRatio(fineExampleResultDTO.getResolvedProjectRatioA()));
fineExampleResultDTO.setTopicRatio(this.getRatio(fineExampleResultDTO.getTopicRatioA()));
fineExampleResultDTO.setShiftProjectRatio(this.getRatio(fineExampleResultDTO.getShiftProjectRatioA()));
fineExampleResultDTO.setPlatJoinPartyRatio(this.getRatio(Double.valueOf(fineExampleResultDTO.getPlatJoinPartyRatio())));
return fineExampleResultDTO;
Result<List<String>> crmResponse = operCrmOpenFeignClient.getAllSubCustomerIds(customerId);
List<String> subCustomers;
if(null == crmResponse || !crmResponse.success())
{subCustomers = null;}
else
{subCustomers = crmResponse.getData();}
FineExampleResultDTO fineExampleResultDTO;
if(CollectionUtils.isEmpty(subCustomers))
fineExampleResultDTO = screenPioneerDataDao.selectFineExample(fineExampleFormDTO.getAgencyId());
else
fineExampleResultDTO = screenPioneerDataDao.selectFineExampleByAreaCode(areaCode,customerId,subCustomers);
if (null == fineExampleResultDTO) {
return new FineExampleResultDTO();
}
fineExampleResultDTO.setIssueRatio(this.getRatio(fineExampleResultDTO.getIssueRatioA()));
fineExampleResultDTO.setPublishIssueRatio(this.getRatio(fineExampleResultDTO.getPublishIssueRatioA()));
fineExampleResultDTO.setResolvedProjectRatio(this.getRatio(fineExampleResultDTO.getResolvedProjectRatioA()));
fineExampleResultDTO.setTopicRatio(this.getRatio(fineExampleResultDTO.getTopicRatioA()));
fineExampleResultDTO.setShiftProjectRatio(this.getRatio(fineExampleResultDTO.getShiftProjectRatioA()));
fineExampleResultDTO.setPlatJoinPartyRatio(this.getRatio(Double.valueOf(fineExampleResultDTO.getPlatJoinPartyRatio())));
return fineExampleResultDTO;
}
/**
@ -91,8 +122,14 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService {
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public ContactMassLineChartResultDTO contactMassLineChart(ContactMassLineChartFormDTO contactMassLineChartFormDTO) {
List<String> subAgencyIdorGridIdList=screenCustomerAgencyService.getNextAgencyIds(contactMassLineChartFormDTO.getAreaCode(),contactMassLineChartFormDTO.getAgencyId());
log.info("当前组织的下级id:"+JSON.toJSONString(subAgencyIdorGridIdList));
ContactMassLineChartResultDTO result = new ContactMassLineChartResultDTO();
List<ContactMassLineChartResult> contactMassLineChartResults = screenPartyLinkMassesDataDao.selectContactMassLineChart(contactMassLineChartFormDTO.getAgencyId());
// List<ContactMassLineChartResult> contactMassLineChartResults = screenPartyLinkMassesDataDao.selectContactMassLineChart(contactMassLineChartFormDTO.getAgencyId());
//多客户版修改如下:
List<ContactMassLineChartResult> contactMassLineChartResults = screenPartyLinkMassesDataDao.selectContactMassLineChartByAgencyIds(subAgencyIdorGridIdList);
if (contactMassLineChartResults.size() == NumConstant.ZERO){
result.setXAxis(new ArrayList<>());
result.setGroupMemberData(new ArrayList<>());
@ -221,6 +258,7 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService {
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public List<AdvanceBranchRankResultDTO> advancedBranchRank(AgencyAndNumFormDTO param) {
List<AdvanceBranchRankResultDTO> result = new LinkedList<>();
if(null == param.getTopNum()){
param.setTopNum(NumConstant.FIVE);
}else if(NumConstant.ZERO == param.getTopNum()){
@ -228,24 +266,43 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService {
}
PageHelper.startPage(NumConstant.ONE,param.getTopNum());
String monthId = dateUtils.getCurrentMonthId();
List<OrgRankDataResultDTO> gridData =
screenOrgRankDataDao.selectGridDataMonthly(param.getAgencyId(),monthId);
int time = NumConstant.TWELVE;
while(CollectionUtils.isEmpty(gridData) && time > NumConstant.ONE){
time--;
monthId = dateUtils.getPreviousMonthIdByDest(null,monthId);
PageHelper.startPage(NumConstant.ONE,param.getTopNum());
gridData = screenOrgRankDataDao.selectGridDataMonthly(param.getAgencyId(),monthId);
if(StringUtils.isNotBlank(param.getAreaCode())){
log.info("先进排行榜单-先进支部排行入参"+JSON.toJSONString(param));
//areaCode不为空,按照areaCode查询
List<OrgRankDataResultDTO> gridData =
screenOrgRankDataDao.selectGridDataMonthlyAreaCode(monthId,param.getAreaCode());
int time = NumConstant.TWELVE;
while(CollectionUtils.isEmpty(gridData) && time > NumConstant.ONE){
time--;
monthId = dateUtils.getPreviousMonthIdByDest(null,monthId);
PageHelper.startPage(NumConstant.ONE,param.getTopNum());
gridData = screenOrgRankDataDao.selectGridDataMonthlyAreaCode(monthId,param.getAreaCode());
}
if(null == gridData || gridData.isEmpty()) return result;
gridData.forEach( data -> {
AdvanceBranchRankResultDTO o = ConvertUtils.sourceToTarget(data,AdvanceBranchRankResultDTO.class);
o.setClosedProjectRatio(convertPercentStr(data.getClosedProjectRatio()));
o.setSatisfactionRatio(convertPercentStr(data.getSatisfactionRatio()));
result.add(o);
});
}else{
List<OrgRankDataResultDTO> gridData =
screenOrgRankDataDao.selectGridDataMonthly(param.getAgencyId(),monthId);
int time = NumConstant.TWELVE;
while(CollectionUtils.isEmpty(gridData) && time > NumConstant.ONE){
time--;
monthId = dateUtils.getPreviousMonthIdByDest(null,monthId);
PageHelper.startPage(NumConstant.ONE,param.getTopNum());
gridData = screenOrgRankDataDao.selectGridDataMonthly(param.getAgencyId(),monthId);
}
if(null == gridData || gridData.isEmpty()) return result;
gridData.forEach( data -> {
AdvanceBranchRankResultDTO o = ConvertUtils.sourceToTarget(data,AdvanceBranchRankResultDTO.class);
o.setClosedProjectRatio(convertPercentStr(data.getClosedProjectRatio()));
o.setSatisfactionRatio(convertPercentStr(data.getSatisfactionRatio()));
result.add(o);
});
}
List<AdvanceBranchRankResultDTO> result = new LinkedList<>();
if(null == gridData || gridData.isEmpty()) return result;
gridData.forEach( data -> {
AdvanceBranchRankResultDTO o = ConvertUtils.sourceToTarget(data,AdvanceBranchRankResultDTO.class);
o.setClosedProjectRatio(convertPercentStr(data.getClosedProjectRatio()));
o.setSatisfactionRatio(convertPercentStr(data.getSatisfactionRatio()));
result.add(o);
});
return result;
}
@ -262,7 +319,13 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService {
public List<PartyUserPointResultDTO> advancedPartymemberRank(AgencyAndNumFormDTO param) {
if(null == param.getTopNum()) param.setTopNum(NumConstant.TEN);
PageHelper.startPage(NumConstant.ONE,param.getTopNum());
List<PartyUserPointResultDTO> result = screenPartyUserRankDataDao.selectPartymemberPointOrder(param.getAgencyId());
List<PartyUserPointResultDTO> result=new ArrayList<>();
if(StringUtils.isNotBlank(param.getAreaCode())){
log.info("先进排行榜单-先进党员排行按照areaCode查询入参:"+param.getAreaCode());
result=screenPartyUserRankDataDao.selectPartymemberPointOrderByAreaCode(param.getAreaCode());
}else{
result=screenPartyUserRankDataDao.selectPartymemberPointOrder(param.getAgencyId());
}
if(null == result) return new ArrayList<>();
return result;
}

18
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java

@ -32,10 +32,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
@ -74,20 +71,27 @@ public class ScreenProjectQuantityOrgMonthlyServiceImpl implements ScreenProject
Map<String, ScreenProjectQuantityOrgMonthlyDTO> dtoMap = new HashMap<>();
if (!CollectionUtils.isEmpty(dtoList)) {
dtoMap = dtoList.stream().collect(Collectors.toMap(ScreenProjectQuantityOrgMonthlyDTO::getMonthId, Function.identity(), (key1, key2) -> key2));
List<String> blank = dtoMap.keySet().stream().filter(query -> !monthIdList.contains(query)).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(blank)){
for(int i = NumConstant.ZERO; i < blank.size(); i++){dtoMap.put(blank.get(i),null);}
}
}else{
for(int i = NumConstant.ZERO; i < monthIdList.size(); i++){dtoMap.put(monthIdList.get(i),null);}
}
for (String monthId : monthIdList) {
//202101=>01月
xAxis.add(monthId.substring(NumConstant.FOUR, NumConstant.SIX).concat(ScreenConstant.MONTH));
if (!CollectionUtils.isEmpty(dtoList)) {
ScreenProjectQuantityOrgMonthlyDTO en = dtoMap.get(monthId);
if ("incr".equals(formDTO.getType())) {
yAxis.add(dtoMap.get(monthId).getProjectIncr());
yAxis.add( null == en ? NumConstant.ZERO : en.getProjectIncr());
} else if ("sum".equals(formDTO.getType())) {
yAxis.add(dtoMap.get(monthId).getProjectTotal());
yAxis.add( null == en ? NumConstant.ZERO : en.getProjectTotal() );
}
continue;
}
//没有数据默认赋值0
yAxis.add(0);
//yAxis.add(0);
}
resultDTO.setXAxis(xAxis);
resultDTO.setYAxis(yAxis);

49
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectServiceImpl.java

@ -1,16 +1,23 @@
package com.epmet.datareport.service.evaluationindex.screen.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.DataSourceConstant;
import com.epmet.datareport.dao.evaluationindex.screen.ScreenEventDataDao;
import com.epmet.datareport.dao.evaluationindex.screen.ScreenEventImgDataDao;
import com.epmet.datareport.dao.evaluationindex.screen.ScreenProjectCategoryOrgDailyDao;
import com.epmet.datareport.dao.evaluationindex.screen.ScreenProjectDataDao;
import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectService;
import com.epmet.dto.form.screen.CategoryAnalysisFormDTO;
import com.epmet.dto.result.screen.CategoryAnalysisResultDTO;
import com.epmet.evaluationindex.screen.dto.form.ScreenProjectDetailFormDTO;
import com.epmet.evaluationindex.screen.dto.form.ScreenProjectDistributionFormDTO;
import com.epmet.evaluationindex.screen.dto.form.ProjectDetailFormDTO;
import com.epmet.evaluationindex.screen.dto.result.ProjectDetailResultDTO;
import com.epmet.evaluationindex.screen.dto.result.ScreenProjectDetailResultDTO;
import com.epmet.evaluationindex.screen.dto.result.ScreenProjectDistributionResultDTO;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -31,6 +38,9 @@ public class ScreenProjectServiceImpl implements ScreenProjectService {
private ScreenEventDataDao screenEventDataDao;
@Autowired
private ScreenEventImgDataDao screenEventImgDataDao;
@Autowired
private ScreenProjectDataDao screenProjectDataDao;
@Autowired
private ScreenProjectCategoryOrgDailyDao screenProjectCategoryOrgDailyDao;
@ -52,6 +62,43 @@ public class ScreenProjectServiceImpl implements ScreenProjectService {
return projectDetailResultDTO;
}
/**
* @Description 中央区事件分析-项目分布
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author liushaowen
* @Date 2021/2/24 15:25
*/
@Override
@DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true)
public Result projectDistribution(ScreenProjectDistributionFormDTO formDTO) {
List<String> areaIds = null;
if (StringUtils.isNotBlank(formDTO.getAreaCode())){
areaIds = screenProjectDataDao.selectIdsByAreaCode(formDTO.getAreaCode());
}
List<ScreenProjectDistributionResultDTO> resultDTOS = screenProjectDataDao.projectDistribution(formDTO.getAgencyId(),areaIds,formDTO.getLevel());
return new Result().ok(resultDTOS);
}
@Override
public Result projectDistributionDetail(ScreenProjectDetailFormDTO formDTO) {
List<ScreenProjectDetailResultDTO> resultDTOS = screenProjectDataDao.projectDistributionDetail(formDTO.getProjectId());
resultDTOS.forEach(item -> {
//项目图片
List<String> imgList = screenProjectDataDao.selectProjectImgs(formDTO.getProjectId());
item.setImgList(imgList);
//项目处理流程
List<ScreenProjectDetailResultDTO.processDTO> processDTOS = screenProjectDataDao.selectProjectProcess(formDTO.getProjectId());
//流程附件
processDTOS.forEach(processDTO -> {
List<ScreenProjectDetailResultDTO.processDTO.AttachmentDTO> attachmentDTOS = screenProjectDataDao.selectProjectProcessAttachments(processDTO.getProcessId());
processDTO.setAttachments(attachmentDTOS);
});
item.setProcessList(processDTOS);
});
return new Result().ok(resultDTOS);
}
/**
* 事件分析类型分析
*
@ -66,4 +113,4 @@ public class ScreenProjectServiceImpl implements ScreenProjectService {
String dateId = DateUtils.format(new Date(), DateUtils.DATE_PATTERN_YYYYMMDD);
return screenProjectCategoryOrgDailyDao.selectCategoryAnalysis(formDTO.getAgencyId(), dateId);
}
}
}

3
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenCustomerWorkRecordDictServiceImpl.java

@ -19,10 +19,12 @@ package com.epmet.datareport.service.plugins.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.constant.DataSourceConstant;
import com.epmet.datareport.dao.plugins.ScreenCustomerWorkRecordDictDao;
import com.epmet.datareport.entity.plugins.ScreenCustomerWorkRecordDictEntity;
import com.epmet.datareport.service.plugins.ScreenCustomerWorkRecordDictService;
@ -44,6 +46,7 @@ import java.util.Map;
*/
@Slf4j
@Service
@DataSource(DataSourceConstant.EVALUATION_INDEX)
public class ScreenCustomerWorkRecordDictServiceImpl extends BaseServiceImpl<ScreenCustomerWorkRecordDictDao, ScreenCustomerWorkRecordDictEntity> implements ScreenCustomerWorkRecordDictService {
@Override

26
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java

@ -45,6 +45,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
@ -60,6 +61,7 @@ import java.util.stream.Collectors;
*/
@Slf4j
@Service
@DataSource(DataSourceConstant.EVALUATION_INDEX)
public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl<ScreenWorkRecordOrgDailyDao, ScreenWorkRecordOrgDailyEntity> implements ScreenWorkRecordOrgDailyService {
@Autowired
private AgencyService agencyService;
@ -122,6 +124,7 @@ public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl<ScreenW
baseDao.deleteBatchIds(Arrays.asList(ids));
}
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public WorkRecordRankResultDTO rankList(WorkRecordRankFormDTO formDTO) {
////todo 待完善 直属网格是否显示?
@ -137,10 +140,14 @@ public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl<ScreenW
return new WorkRecordRankResultDTO(0, 0, new ArrayList<>());
} else {
//非社区的
WorkRecordRankResultDTO resultDTO = baseDao.selectCurrentAgency(agencyDTO.getAreaCode(), formDTO.getDataType(), dateId);
resultDTO.setSubRankList(baseDao.selectSubList(agencyDTO.getAreaCode(), agencyDTO.getAgencyId(), formDTO.getDataType(), formDTO.getTopRow(), dateId));
return resultDTO;
List<WorkRecordRankResultDTO> resultDTOList = baseDao.selectCurrentAgency(agencyDTO.getAreaCode(), formDTO.getDataType(), dateId);
if(!CollectionUtils.isEmpty(resultDTOList)){
WorkRecordRankResultDTO resultDTO=resultDTOList.get(0);
resultDTO.setSubRankList(baseDao.selectSubList(agencyDTO.getAreaCode(), agencyDTO.getAgencyId(), formDTO.getDataType(), formDTO.getTopRow(), dateId));
return resultDTO;
}
}
return new WorkRecordRankResultDTO();
}
/**
@ -149,21 +156,22 @@ public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl<ScreenW
* @author sun
*/
@Override
@DataSource(DataSourceConstant.STATS_DISPLAY)
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
public WorkRecordTrendResultDTO trend(WorkRecordTrendFormDTO formDTO) {
WorkRecordTrendResultDTO resultDTO = new WorkRecordTrendResultDTO();
//1.查询当前月过去12个月份
Map<String, String> map = dateUtils.getXpro();
resultDTO.setXAxis(map.values().stream().collect(Collectors.toList()));
List<String> monthIdList = map.keySet().stream().collect(Collectors.toList());
//2.根据资源编码查询资源名称集合,按sort升序
//1.根据资源编码查询资源名称集合,按sort升序
List<String> legendList = screenCustomerWorkRecordDictDao.selectListByDataType(formDTO.getCustomerId(), formDTO.getDataType());
resultDTO.setLegend(legendList);
if (null == legendList || legendList.size() < NumConstant.ONE) {
return resultDTO;
}
//2.查询当前月过去12个月份
Map<String, String> map = dateUtils.getXpro();
resultDTO.setXAxis(map.values().stream().collect(Collectors.toList()));
List<String> monthIdList = map.keySet().stream().collect(Collectors.toList());
//3-1.查询当前组织及所有下级过去12个月份某项数据所有资源的统计数据
DateTimeFormatter fmt = DateTimeFormatter.ofPattern("yyyyMM");
LocalDate today = LocalDate.now();

3
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.java

@ -19,10 +19,12 @@ package com.epmet.datareport.service.plugins.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.constant.DataSourceConstant;
import com.epmet.datareport.dao.plugins.ScreenWorkRecordOrgMonthlyDao;
import com.epmet.datareport.entity.plugins.ScreenWorkRecordOrgMonthlyEntity;
import com.epmet.datareport.service.plugins.ScreenWorkRecordOrgMonthlyService;
@ -44,6 +46,7 @@ import java.util.Map;
*/
@Slf4j
@Service
@DataSource(DataSourceConstant.EVALUATION_INDEX)
public class ScreenWorkRecordOrgMonthlyServiceImpl extends BaseServiceImpl<ScreenWorkRecordOrgMonthlyDao, ScreenWorkRecordOrgMonthlyEntity> implements ScreenWorkRecordOrgMonthlyService {
@Override

16
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java

@ -27,6 +27,7 @@ import com.epmet.project.dto.form.ProjectIncrTrendFormDTO;
import com.epmet.project.dto.result.ProjectDetailResultDTO;
import com.epmet.project.dto.result.*;
import com.github.pagehelper.PageHelper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -42,6 +43,7 @@ import java.util.List;
* @Author sun
* @Description 数据-项目
**/
@Slf4j
@Service
public class ProjectServiceImpl implements ProjectService {
@ -197,9 +199,21 @@ public class ProjectServiceImpl implements ProjectService {
*/
@Override
public ProjectDetailResultDTO projectDetail(ProcessListFormDTO processListFormDTO) {
ProjectDetailResultDTO projectDetailResultDTO = screenDifficultyDataService.projectDetail(processListFormDTO);
/*ProjectDetailResultDTO projectDetailResultDTO = screenDifficultyDataService.projectDetail(processListFormDTO);
if (null == projectDetailResultDTO) {
return new ProjectDetailResultDTO();
}*/
ProjectDetailResultDTO projectDetailResultDTO=new ProjectDetailResultDTO();
//todo
Result<ProjectInfoDTO> result=govProjectOpenFeignClient.queryProjectInfoByProjectId(processListFormDTO.getProjectId());
if(result.success()&&null!=result.getData()){
ProjectInfoDTO projectInfoDTO=result.getData();
projectDetailResultDTO.setImgUrlList(projectInfoDTO.getImgUrlList());
projectDetailResultDTO.setEventSource(projectInfoDTO.getGridName());
projectDetailResultDTO.setEventTitle(projectInfoDTO.getEventTitle());
projectDetailResultDTO.setEventContent(projectInfoDTO.getEventContent());
}else{
log.warn(String.format("项目信息查询失败,projectId:%s",processListFormDTO.getProjectId()));
}
Result<ProcessAndCurrentDeptResultDTO> processList = govProjectOpenFeignClient.getProcessList(processListFormDTO);
if (!processList.success()) {

33
epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml

@ -18,16 +18,27 @@
SELECT
sca.AGENCY_ID AS orgId,
sca.AGENCY_NAME AS `NAME`,
IFNULL( sum( m.PARTICIPATE_USER_TOTAL ), 0 ) AS participateUserTotal,
IFNULL( sum( m.ORGANIZE_TOTAL ), 0 ) AS participateTotal
IFNULL( sum( temp.PARTICIPATE_USER_TOTAL ), 0 ) AS participateUserTotal,
IFNULL( sum( temp.ORGANIZE_TOTAL ), 0 ) AS participateTotal
FROM
screen_customer_agency sca
LEFT JOIN screen_work_record_org_daily m ON ( sca.AGENCY_ID = m.ORG_ID AND m.DEL_FLAG = '0' AND m.DATE_ID = #{dateId} )
LEFT JOIN screen_customer_work_record_dict dict ON ( m.TYPE_CODE = dict.RESOURCE_CODE AND dict.DEL_FLAG = '0' AND dict.DATA_TYPE = #{dataType} )
left join (
select m.* from screen_work_record_org_daily m
where m.DEL_FLAG = '0'
AND m.DATE_ID = #{dateId}
and m.TYPE_CODE in(
select dict. RESOURCE_CODE from screen_customer_work_record_dict dict
where dict.DEL_FLAG = '0'
AND dict.DATA_TYPE = #{dataType}
and dict.`LEVEL`='1'
)
)temp on(
sca.AGENCY_ID = temp.ORG_ID AND temp.DEL_FLAG = '0' AND temp.DATE_ID =#{dateId}
)
WHERE
sca.DEL_FLAG = '0'
AND sca.PARENT_AREA_CODE like concat( #{areaCode},'%')
and sca.AGENCY_ID !=#{agencyId}
AND sca.PARENT_AREA_CODE =#{areaCode}
AND sca.AGENCY_ID != #{agencyId}
GROUP BY
sca.AGENCY_ID,
sca.AGENCY_NAME
@ -43,8 +54,14 @@
IFNULL( sum( m.ORGANIZE_TOTAL ), 0 ) AS participateTotal
FROM
screen_customer_agency sca
inner JOIN screen_work_record_org_daily m ON ( sca.AGENCY_ID = m.ORG_ID AND m.DEL_FLAG = '0' AND m.DATE_ID = #{dateId} )
inner JOIN screen_customer_work_record_dict dict ON ( m.TYPE_CODE = dict.RESOURCE_CODE AND dict.DEL_FLAG = '0' AND dict.DATA_TYPE = #{dataType} )
inner JOIN screen_work_record_org_daily m ON ( sca.AGENCY_ID = m.ORG_ID AND m.DEL_FLAG = '0' AND m.DATE_ID = #{dateId}
)
inner JOIN screen_customer_work_record_dict dict
ON ( m.TYPE_CODE = dict.RESOURCE_CODE
and dict.`LEVEL`='1'
AND dict.DEL_FLAG = '0'
AND dict.DATA_TYPE = #{dataType}
)
WHERE
sca.DEL_FLAG = '0'
AND sca.PARENT_AREA_CODE like concat( #{areaCode},'%')

30
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml

@ -272,4 +272,34 @@
and grid.PARENT_AGENCY_ID=#{agencyId}
</select>
<select id="getNextAgencyIds" parameterType="map" resultType="java.lang.String">
SELECT
sca.AGENCY_ID as orgId
FROM
screen_customer_agency sca
WHERE
sca.DEL_FLAG = '0'
<choose>
<when test="areaCode != null and areaCode.trim() != ''">
AND sca.PARENT_AREA_CODE = #{areaCode}
</when>
<otherwise>
and sca.PID=#{agencyId}
</otherwise>
</choose>
union
SELECT
m.GRID_ID as orgId
FROM
screen_customer_grid m
where m.DEL_FLAG = '0'
<choose>
<when test="areaCode != null and areaCode.trim() != ''">
and m.AREA_CODE=#{areaCode}
</when>
<otherwise>
m.PARENT_AGENCY_ID=#{agencyId}
</otherwise>
</choose>
</select>
</mapper>

32
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml

@ -34,4 +34,36 @@
</select>
<select id="selectGridDataMonthlyAreaCode" parameterType="map" resultType="com.epmet.evaluationindex.screen.dto.result.OrgRankDataResultDTO">
SELECT
rankData.ORG_NAME AS NAME,
rankData.PARTY_TOTAL AS partyMemberNum,
rankData.GROUP_TOTAL AS branchNum,
rankData.ISSUE_TOTAL AS issueNum,
rankData.PROJECT_TOTAL AS projectNum,
rankData.CLOSE_PROJECT_RATIO AS closedProjectRatio,
rankData.SATISFACTION_RATIO AS satisfactionRatio,
agency.AGENCY_NAME AS parentAgencyName
FROM
screen_org_rank_data rankData
left join screen_customer_grid scg on(
rankData.ORG_ID=scg.GRID_ID
and scg.DEL_FLAG='0'
)
LEFT JOIN screen_customer_agency agency
ON (scg.PARENT_AGENCY_ID = agency.AGENCY_ID AND agency.DEL_FLAG = '0')
WHERE
rankData.DEL_FLAG = '0'
AND rankData.ORG_TYPE = 'grid'
and scg.AREA_CODE like CONCAT('%',#{areaCode},'%')
AND rankData.MONTH_ID = #{monthId}
ORDER BY
(rankData.PARTY_TOTAL + rankData.GROUP_TOTAL + rankData.ISSUE_TOTAL + rankData.PROJECT_TOTAL + rankData.CLOSE_PROJECT_RATIO + rankData.SATISFACTION_RATIO) DESC,
rankData.PARTY_TOTAL DESC,
rankData.GROUP_TOTAL DESC,
rankData.ISSUE_TOTAL DESC,
rankData.PROJECT_TOTAL DESC,
rankData.CLOSE_PROJECT_RATIO DESC,
rankData.SATISFACTION_RATIO DESC
</select>
</mapper>

37
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml

@ -19,4 +19,41 @@
AND md.ORG_TYPE =
CASE WHEN sca.LEVEL = 'community' THEN 'grid' ELSE 'agency' END
</select>
<select id="selectContactMassLineChartByAgencyIds" resultType="com.epmet.evaluationindex.screen.dto.result.ContactMassLineChartResult">
SELECT
sca.agency_id as orgId,
sca.AGENCY_NAME AS orgName,
IFNULL(md.create_group_total,0) AS groupTotal,
IFNULL(md.group_user_total,0)AS userTotal
FROM
screen_customer_agency sca
LEFT JOIN screen_party_link_masses_data md
ON ( sca.agency_id = md.ORG_ID AND md.del_flag = '0' )
WHERE SCA.DEL_FLAG='0'
AND sca.is_display = '1'
<if test="agencyIdList != null and agencyIdList.size() > 0">
AND sca.agency_id in
<foreach item="agencyId" collection="agencyIdList" open="(" separator="," close=")">
#{agencyId}
</foreach>
</if>
union
SELECT
scg.GRID_ID as orgId,
scg.GRID_NAME AS orgName,
IFNULL(md.create_group_total,0) AS groupTotal,
IFNULL(md.group_user_total,0)AS userTotal
FROM
screen_customer_grid scg
LEFT JOIN screen_party_link_masses_data md
ON ( scg.GRID_ID = md.ORG_ID AND md.del_flag = '0' )
WHERE scg.DEL_FLAG='0'
<if test="agencyIdList != null and agencyIdList.size() > 0">
AND scg.GRID_ID in
<foreach item="agencyId" collection="agencyIdList" open="(" separator="," close=")">
#{agencyId}
</foreach>
</if>
</select>
</mapper>

33
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml

@ -98,4 +98,37 @@
LIMIT #{topNum}
</select>
<select id="selectPartymemberPointOrderByAreaCode" resultType="com.epmet.evaluationindex.screen.dto.result.PartyUserPointResultDTO">
SELECT
m.USER_ID,
concat( m.surname, CASE char_length( m.NAME ) WHEN 1 THEN '*' WHEN 2 THEN '**' ELSE '***' END ) AS name,
m.POINT_TOTAL AS point
FROM
screen_party_user_rank_data m
left join screen_customer_grid scg
on(m.GRID_ID=scg.GRID_ID and scg.DEL_FLAG='0')
WHERE
m.DEL_FLAG = '0'
AND PARTY_FLAG = '1'
and scg.AREA_CODE like CONCAT(#{areaCode},'%')
ORDER BY
m.POINT_TOTAL DESC
</select>
<select id="selectUserPointOrderByAreaCode" resultType="com.epmet.evaluationindex.screen.dto.result.UserPointResultDTO">
SELECT
m.USER_ID,
concat( m.surname, CASE char_length( m.NAME ) WHEN 1 THEN '*' WHEN 2 THEN '**' ELSE '***' END ) AS name,
m.POINT_TOTAL AS point
FROM
screen_party_user_rank_data m
left join screen_customer_grid scg
on(m.GRID_ID=scg.GRID_ID and scg.DEL_FLAG='0')
WHERE
m.DEL_FLAG = '0'
and scg.AREA_CODE like CONCAT(#{areaCode},'%')
ORDER BY
m.POINT_TOTAL DESC,
m.user_name
</select>
</mapper>

37
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml

@ -26,4 +26,41 @@
ORDER BY data_end_time DESC
LIMIT 1
</select>
<!-- 根据地区码查询先锋模范 -->
<select id="selectFineExampleByAreaCode" resultType="com.epmet.evaluationindex.screen.dto.result.FineExampleResultDTO">
SELECT
CEILING(avg(data.issue_total)) AS issueTotal,
IFNULL(avg(data.issue_ratio),0) AS issueRatioA,
CEILING(avg(data.topic_total)) AS topicTotal,
IFNULL(avg(data.topic_ratio),0) AS topicRatioA,
CEILING(avg(data.shift_project_total)) AS shiftProjectTotal,
IFNULL(avg(data.shift_project_Ratio),0) AS shiftProjectRatioA,
CEILING(avg(data.resolved_project_total)) AS resolvedProjectTotal,
IFNULL(avg(data.resolved_project_ratio),0) AS resolvedProjectRatioA,
CEILING(avg(data.publish_issue_total)) AS publishIssueTotal,
IFNULL(avg(data.publish_issue_ratio),0) AS publishIssueRatioA,
CEILING(avg(data.PLAT_ISSUE_TOTAL)) AS platIssueTotal,
IFNULL(avg(data.PLAT_JOIN_PARTY_RATIO),0) AS platJoinPartyRatio
FROM
screen_pioneer_data data
LEFT JOIN
screen_customer_agency agency
ON data.org_id = agency.agency_id
WHERE
data.del_flag = '0'
AND data.org_type = 'agency'
AND agency.area_code LIKE concat(#{areaCode},'%')
<if test=" null != list and list.size() > 0">
<foreach collection="list" item="subId" open="AND ( data.customer_id = #{customerId} OR " separator=" OR " close=" )">
data.customer_id = #{subId}
</foreach>
</if>
ORDER BY data.data_end_time DESC
LIMIT 1
</select>
</mapper>

85
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.datareport.dao.evaluationindex.screen.ScreenProjectDataDao">
<!-- 查询事件 -->
<select id="projectDistribution" resultType="com.epmet.evaluationindex.screen.dto.result.ScreenProjectDistributionResultDTO">
SELECT
IFNULL(project_title,'') AS projectTitle,
project_level AS level,
project_id AS id,
longitude AS longitude,
latitude AS latitude
FROM
screen_project_data
WHERE
del_flag = '0'
<if test="level != null">
and project_level = #{level}
</if>
<if test="ids != null">
and org_id in
<foreach collection="ids" item="id" index="index" open="(" close=")" separator=",">
#{id}
</foreach>
</if>
<if test="ids == null and agencyId != null">
and org_id = #{agencyId}
</if>
</select>
<select id="selectIdsByAreaCode" resultType="java.lang.String">
select agency_id as id from screen_customer_agency where del_flag = '0' and area_code like concat(#{areaCode},'%')
union all
select grid_id as id from screen_customer_grid where del_flag = '0' and area_code like concat(#{areaCode},'%')
</select>
<!-- 项目详情 -->
<select id="projectDistributionDetail" resultType="com.epmet.evaluationindex.screen.dto.result.ScreenProjectDetailResultDTO">
SELECT
project_id as projectId,
project_content AS projectContent,
project_create_time as reportTime,
ALL_CATEGORY_NAME as categoryName,
LINK_NAME as reportUserName,
link_mobile as mobile,
project_address as reportAddress
FROM
screen_project_data
WHERE
del_flag = '0'
AND project_id = #{projectId}
</select>
<select id="selectProjectImgs" resultType="java.lang.String">
select PROJECT_IMG_URL from screen_project_img_data
where del_flag = '0'
and project_id = #{projectId}
order by sort asc
</select>
<select id="selectProjectProcess" resultType="com.epmet.evaluationindex.screen.dto.result.ScreenProjectDetailResultDTO$processDTO">
select
process_id as processId,
HANDLER_NAME as handleDeptName,
PUBLIC_REPLY as suggestion,
PROCESS_TIME as reponseTime,
operation as operation,
TRANSFER_DEPT_NAME as whistleDeptName
from screen_project_process
where del_flag = '0'
and project_id = #{projectId}
order by process_time asc
</select>
<select id="selectProjectProcessAttachments" resultType="com.epmet.evaluationindex.screen.dto.result.ScreenProjectDetailResultDTO$processDTO$AttachmentDTO">
select
file_name as fileName,
attachment_name as attachmentName,
attachment_size as attachmentSize,
attachment_format as attachmentFormat,
attachment_type as attachmentType,
attachment_url as attachmentUrl,
if(duration != 0,duration,null) as duration
from screen_project_process_attachment
where del_flag = '0'
and file_place = 'public'
order by sort asc
</select>
</mapper>

39
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml

@ -31,4 +31,43 @@
totalData.PROJECT_TOTAL desc
</select>
<!-- 查询公众参与各类总数 -->
<select id="selectPublicPartiTotalByAreaCode" resultType="com.epmet.evaluationindex.screen.dto.result.PublicPartiRankResultDTO">
SELECT
totalData.ORG_NAME AS NAME,
totalData.REG_USER_TOTAL AS regNum,
totalData.JOIN_USER_TOTAL AS joinNum,
totalData.TOPIC_TOTAL AS topicNum,
totalData.ISSUE_TOTAL AS issueNum,
totalData.PROJECT_TOTAL AS projectNum,
agency.AGENCY_NAME AS parentAgencyName
FROM
screen_public_parti_total_data totalData
LEFT JOIN
screen_customer_agency agency
ON totalData.PARENT_ID = agency.AGENCY_ID
AND agency.DEL_FLAG = '0'
WHERE
totalData.DEL_FLAG = '0'
AND
agency.AREA_CODE like concat(#{areaCode},'%')
<if test=" null != list and list.size() > 0">
<foreach collection="list" item="subId" open="AND ( totalData.customer_id = #{customerId} OR " separator=" OR " close=" )">
totalData.customer_id = #{subId}
</foreach>
</if>
ORDER BY
(totalData.REG_USER_TOTAL + totalData.JOIN_USER_TOTAL + totalData.TOPIC_TOTAL + totalData.ISSUE_TOTAL + totalData.PROJECT_TOTAL) DESC,
totalData.REG_USER_TOTAL desc,
totalData.JOIN_USER_TOTAL desc,
totalData.TOPIC_TOTAL desc,
totalData.ISSUE_TOTAL desc,
totalData.PROJECT_TOTAL desc
</select>
</mapper>

29
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml

@ -24,6 +24,35 @@
AND MONTH_ID = #{monthId}
</select>
<!-- 根据地区码查询用户参与数据 -->
<select id="selectUserJoinDataByAreaCode" resultType="com.epmet.evaluationindex.screen.dto.result.UserJoinIndicatorGrowthRateResultDTO">
SELECT
avg(data.JOIN_TOTAL) AS total,
ROUND( avg(data.AVG_JOIN), 1 ) AS averageJoin,
avg(data.JOIN_TOTAL_UP_RATE) AS monthIncr,
avg(data.JOIN_TOTAL_UP_FLAG) AS monthTrend,
ROUND(avg(data.AVG_ISSUE), 1) AS averageIssue,
avg(data.AVG_ISSUE_UP_RATE) AS issueCompareLatestMonth,
avg(data.AVG_ISSUE_UP_FLAG) AS issueCompareLatestTrend,
avg(data.AGVG_JOIN_UP_RATE) AS joinCompareLatestMonth,
avg(data.AGVG_JOIN_UP_FLAG) AS joinCompareLatestTrend
FROM
screen_user_join data
LEFT JOIN
screen_customer_agency agency
ON data.org_id = agency.agency_id
WHERE
data.DEL_FLAG = '0'
AND data.area_code like concat(#{areaCode},'%')
AND data.MONTH_ID = #{monthId}
<if test=" null != list and list.size() > 0">
<foreach collection="list" item="sub" open="AND ( data.customer_id = #{customerId} or" separator=" OR " close=")">
data.customerId = #{sub}
</foreach>
</if>
</select>
<!-- 查询用户参与月度数据 -->
<select id="selectUserJoinDataMonthly" resultType="com.epmet.evaluationindex.screen.dto.result.UserJoinMonthlyResultDTO">
<!-- 字段完全对不上 -->

15
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml

@ -15,6 +15,21 @@
AND PARENT_ID = #{agencyId}
</select>
<select id="selectAgencyPartymemberPercentByIds" parameterType="map" resultType="com.epmet.evaluationindex.screen.dto.result.PartymemberPercentResultDTO">
SELECT
SUM( PARTY_TOTAL ) AS partyMemberTotal,
SUM( USER_TOTAL ) AS platFormTotal
FROM
screen_user_total_data m
WHERE
DEL_FLAG = '0'
<if test="orgIds != null and orgIds.size() > 0">
AND m.ORG_ID IN
<foreach item="orgId" collection="orgIds" open="(" separator="," close=")">
#{orgId}
</foreach>
</if>
</select>
<!-- 查询top区概况 -->
<select id="selectTopProfile" resultType="com.epmet.evaluationindex.screen.dto.result.TopProfileResultDTO">
SELECT

172
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectDataDTO.java

@ -0,0 +1,172 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto.screen;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import java.math.BigDecimal;
/**
* 中央区-项目数据
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-02-23
*/
@Data
public class ScreenProjectDataDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID 主键
*/
private String id;
/**
* 客户Id
*/
private String customerId;
/**
* 组织类别 agency组织部门department网格grid
*/
private String orgType;
/**
* 组织Id 可以为网格机关id
*/
private String orgId;
/**
* 上级组织Id
*/
private String parentId;
/**
* 组织名称
*/
private String orgName;
/**
* 原始事件Id
*/
private String projectId;
/**
* 事件名称
*/
private String projectTitle;
/**
* 事件时间
*/
private Date projectCreateTime;
/**
* 上报人
*/
private String linkName;
/**
* 电话
*/
private String linkMobile;
/**
* 事件描述
*/
private String projectContent;
/**
* 事件级别 红色1级已超期黄色2级:即将超期绿色3级未超期
*/
private Integer projectLevel;
/**
* 事件地址
*/
private String projectAddress;
/**
* 所有分类名 - 连接
*/
private String allCategoryName;
/**
* 事件所在经度
*/
private BigDecimal longitude;
/**
* 事件所在维度
*/
private BigDecimal latitude;
/**
* 删除标识 0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
/**
* 事件状态key pending处理中 已结案closed_case 已关闭closed
*/
private String projectStatusCode;
/**
* 结案日期
*/
private String closeCaseTime;
/**
* 数据更新至: yyyy|yyyMM|yyyyMMdd
*/
private String dataEndTime;
/**
* 所有上级ID用英文逗号分开
*/
private String allParentIds;
}

91
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectImgDataDTO.java

@ -0,0 +1,91 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto.screen;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 中央区-项目数据图片
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-02-23
*/
@Data
public class ScreenProjectImgDataDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID 主键
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 原始事件Id
*/
private String projectId;
/**
* 图片图片地址
*/
private String projectImgUrl;
/**
* 排序
*/
private Integer sort;
/**
* 删除标识 0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

136
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectProcessAttachmentDTO.java

@ -0,0 +1,136 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto.screen;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 中央区-项目数据处理节点附件表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-02-23
*/
@Data
public class ScreenProjectProcessAttachmentDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 唯一标识
*/
private String id;
/**
* 附件id
*/
private String attachmentId;
/**
* 客户ID
*/
private String customerId;
/**
* 项目ID
*/
private String projectId;
/**
* 项目进展表ID
*/
private String processId;
/**
* 文件所属位置(内部备注: internal 公开答复:public)
*/
private String filePlace;
/**
* 文件名
*/
private String fileName;
/**
* 附件名uuid随机生成
*/
private String attachmentName;
/**
* 文件大小单位b
*/
private Integer attachmentSize;
/**
* 文件格式JPGPNGJPEGBMPGIFPDFPPTPPTXDOCDOCXXLSXLSXMP3WMAM4AMP4AVIMOVRMVBRMWMV
*/
private String attachmentFormat;
/**
* 文件类型图片 - image 视频 - video 语音 - voice 文档 - doc
*/
private String attachmentType;
/**
* url地址
*/
private String attachmentUrl;
/**
* 排序(需求确定按上传顺序排序)
*/
private Integer sort;
/**
* 语音或视频时长
*/
private Integer duration;
/**
* 删除标识0.未删除 1.已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

146
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectProcessDTO.java

@ -0,0 +1,146 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto.screen;
import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
/**
* 中央区-项目数据项目处理进展表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-02-23
*/
@Data
public class ScreenProjectProcessDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 唯一标识
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 处理进展id
*/
private String processId;
/**
* 项目ID
*/
private String projectId;
/**
* 被流转的部门名称
*/
private String transferDeptName;
/**
* 被流转的部门名称
*/
private String transferDeptIds;
/**
* 处理者名称
*/
private String handlerName;
/**
* 处理者类型 未知unknown,机关agency,部门department,网格grid
*/
private String handlerType;
/**
* 处理者ID
*/
private String handlerId;
/**
* 所属机关11:22:33
*/
private String orgIdPath;
/**
* 回应 response结案close退回return部门流转transfer创建项目created
*/
private String operation;
/**
* 公开答复
*/
private String publicReply;
/**
* 内部备注
*/
private String internalRemark;
/**
* 处理时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date processTime;
/**
* 删除标识0.未删除 1.已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
/**
* 数据截止日期
*/
private String DataEndTime;
}

112
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/ScreenProjectDataInfoFormDTO.java

@ -0,0 +1,112 @@
package com.epmet.dto.screen.form;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* @description:
* @author: liushaowen
* @date: 2021/2/23 17:30
*/
@Data
public class ScreenProjectDataInfoFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 组织类别 agency组织部门department网格grid
*/
private String orgType;
/**
* 组织Id 可以为网格机关id
*/
private String orgId;
/**
* 上级组织Id
*/
private String parentId;
/**
* 组织名称
*/
private String orgName;
/**
* 原始事件Id
*/
private String projectId;
/**
* 事件名称
*/
private String projectTitle;
/**
* 事件时间
*/
private String projectCreateTime;
/**
* 上报人
*/
private String linkName;
/**
* 电话
*/
private String linkMobile;
/**
* 事件描述
*/
private String projectContent;
/**
* 事件级别 红色1级已超期黄色2级:即将超期绿色3级未超期
*/
private Integer projectLevel;
/**
* 事件地址
*/
private String projectAddress;
/**
* 所有分类名 - 连接
*/
private String allCategoryName;
/**
* 事件所在经度
*/
private BigDecimal longitude;
/**
* 事件所在维度
*/
private BigDecimal latitude;
/**
* 事件状态key pending处理中 已结案closed_case 已关闭closed
*/
private String projectStatusCode;
/**
* 结案日期
*/
private String closeCaseTime;
/**
* 所有上级ID用英文逗号分开
*/
private String allParentIds;
/**
* 议题图片地址
*/
private String[] projectImgUrl;
}

20
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/ScreenProjectProcessFormDTO.java

@ -0,0 +1,20 @@
package com.epmet.dto.screen.form;
import com.epmet.dto.screen.ScreenProjectProcessAttachmentDTO;
import com.epmet.dto.screen.ScreenProjectProcessDTO;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @description:
* @author: liushaowen
* @date: 2021/2/24 14:06
*/
@Data
public class ScreenProjectProcessFormDTO extends ScreenProjectProcessDTO implements Serializable{
private static final long serialVersionUID = 1L;
private List<ScreenProjectProcessAttachmentDTO> attachments;
}

37
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java

@ -3,6 +3,8 @@ package com.epmet.controller;
import com.epmet.commons.tools.exception.ValidateException;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.screen.*;
import com.epmet.dto.screen.form.ScreenProjectDataInfoFormDTO;
import com.epmet.dto.screen.form.ScreenProjectProcessFormDTO;
import com.epmet.dto.screencoll.ScreenCollFormDTO;
import com.epmet.service.evaluationindex.screen.*;
import lombok.extern.slf4j.Slf4j;
@ -37,6 +39,10 @@ public class ScreenProjectDataCollController {
private ScreenProjectCategoryGridDailyService projectCategoryGridDailyService;
@Autowired
private ScreenProjectCategoryOrgDailyService projectCategoryOrgDailyService;
@Autowired
private ScreenProjectDataService projectDataService;
@Autowired
private ScreenProjectProcessService projectProcessService;
/**
* @author wangc
@ -125,4 +131,35 @@ public class ScreenProjectDataCollController {
return new Result();
}
//上述两个接口可以有采集接口方便灌假数。后面项目分类统计两个方案A:从项目信息中分析计算到大屏表; B:下面三个子客户(榆山街道、孔村街道、锦水街道)单独上报;子客户根据area_code计算
/**
* @Description 项目信息上报
* @return com.epmet.commons.tools.utils.Result
* @Author liushaowen
* @Date 2021/2/23 17:25
*/
@RequestMapping("uploadprojectinfo")
public Result uploadProjectInfo(@RequestHeader("CustomerId") String customerId,@RequestBody ScreenCollFormDTO<ScreenProjectDataInfoFormDTO> param){
if (null == param || CollectionUtils.isEmpty(param.getDataList()) || StringUtils.isBlank(param.getDateId())) {
throw new ValidateException("参数错误:dataList不能为空且dataId不能为空");
}
projectDataService.collect(customerId,param);
return new Result();
}
/**
* @Description 项目处理进展上报
* @return com.epmet.commons.tools.utils.Result
* @Author liushaowen
* @Date 2021/2/23 17:25
*/
@RequestMapping("uploadprojectprocess")
public Result uploadProjectProcess(@RequestHeader("CustomerId") String customerId,@RequestBody ScreenCollFormDTO<ScreenProjectProcessFormDTO> param){
if (null == param || CollectionUtils.isEmpty(param.getDataList()) || StringUtils.isBlank(param.getDateId())) {
throw new ValidateException("参数错误:dataList不能为空且dataId不能为空");
}
projectProcessService.collect(customerId,param);
return new Result();
}
}

6
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/crm/CustomerRelationDao.java

@ -23,8 +23,6 @@ import com.epmet.entity.crm.CustomerRelationEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 客户关系表(01.14 add)
*
@ -35,10 +33,10 @@ import java.util.List;
public interface CustomerRelationDao extends BaseDao<CustomerRelationEntity> {
/**
* @param customerIds
* @param customerId
* @author yinzuomei
* @description 查询当前客户的area_code信息以及下一级客户列表
* @Date 2021/1/21 11:27
**/
List<CustomerSubInfoDTO> selectCustomerSubInfo(@Param("list") List<String> customerIds);
CustomerSubInfoDTO selectCustomerSubInfo(@Param("customerId")String customerId);
}

39
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectDataDao.java

@ -0,0 +1,39 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao.evaluationindex.screen;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.screen.form.ScreenProjectDataInfoFormDTO;
import com.epmet.entity.evaluationindex.screen.ScreenProjectDataEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 中央区-项目数据
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-02-23
*/
@Mapper
public interface ScreenProjectDataDao extends BaseDao<ScreenProjectDataEntity> {
int deleteByDateIdAndCustomerId(@Param("customerId") String customerId,@Param("dateId") String dateId);
}

33
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectImgDataDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao.evaluationindex.screen;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.evaluationindex.screen.ScreenProjectImgDataEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 中央区-项目数据图片
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-02-23
*/
@Mapper
public interface ScreenProjectImgDataDao extends BaseDao<ScreenProjectImgDataEntity> {
}

33
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectProcessAttachmentDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao.evaluationindex.screen;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.evaluationindex.screen.ScreenProjectProcessAttachmentEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 中央区-项目数据处理节点附件表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-02-23
*/
@Mapper
public interface ScreenProjectProcessAttachmentDao extends BaseDao<ScreenProjectProcessAttachmentEntity> {
}

35
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectProcessDao.java

@ -0,0 +1,35 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao.evaluationindex.screen;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.evaluationindex.screen.ScreenProjectProcessEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 中央区-项目数据项目处理进展表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-02-23
*/
@Mapper
public interface ScreenProjectProcessDao extends BaseDao<ScreenProjectProcessEntity> {
int deleteByDateIdAndCustomerId(@Param("customerId") String customerId, @Param("dateId") String dateId);
}

142
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectDataEntity.java

@ -0,0 +1,142 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity.evaluationindex.screen;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.util.Date;
/**
* 中央区-项目数据
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-02-23
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("screen_project_data")
public class ScreenProjectDataEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户Id
*/
private String customerId;
/**
* 组织类别 agency组织部门department网格grid
*/
private String orgType;
/**
* 组织Id 可以为网格机关id
*/
private String orgId;
/**
* 上级组织Id
*/
private String parentId;
/**
* 组织名称
*/
private String orgName;
/**
* 原始事件Id
*/
private String projectId;
/**
* 事件名称
*/
private String projectTitle;
/**
* 事件时间
*/
private String projectCreateTime;
/**
* 上报人
*/
private String linkName;
/**
* 电话
*/
private String linkMobile;
/**
* 事件描述
*/
private String projectContent;
/**
* 事件级别 红色1级已超期黄色2级:即将超期绿色3级未超期
*/
private Integer projectLevel;
/**
* 事件地址
*/
private String projectAddress;
/**
* 所有分类名 - 连接
*/
private String allCategoryName;
/**
* 事件所在经度
*/
private BigDecimal longitude;
/**
* 事件所在维度
*/
private BigDecimal latitude;
/**
* 事件状态key
*/
private String projectStatusCode;
/**
* 结案日期
*/
private String closeCaseTime;
/**
* 数据更新至: yyyy|yyyMM|yyyyMMdd
*/
private String dataEndTime;
/**
* 所有上级ID用英文逗号分开
*/
private String allParentIds;
}

61
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectImgDataEntity.java

@ -0,0 +1,61 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity.evaluationindex.screen;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 中央区-项目数据图片
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-02-23
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("screen_project_img_data")
public class ScreenProjectImgDataEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 原始事件Id
*/
private String projectId;
/**
* 图片图片地址
*/
private String projectImgUrl;
/**
* 排序
*/
private Integer sort;
}

106
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectProcessAttachmentEntity.java

@ -0,0 +1,106 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity.evaluationindex.screen;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 中央区-项目数据处理节点附件表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-02-23
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("screen_project_process_attachment")
public class ScreenProjectProcessAttachmentEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 附件id
*/
private String attachmentId;
/**
* 客户ID
*/
private String customerId;
/**
* 项目ID
*/
private String projectId;
/**
* 项目进展表ID
*/
private String processId;
/**
* 文件所属位置(内部备注: internal 公开答复:public)
*/
private String filePlace;
/**
* 文件名
*/
private String fileName;
/**
* 附件名uuid随机生成
*/
private String attachmentName;
/**
* 文件大小单位b
*/
private Integer attachmentSize;
/**
* 文件格式JPGPNGJPEGBMPGIFPDFPPTPPTXDOCDOCXXLSXLSXMP3WMAM4AMP4AVIMOVRMVBRMWMV
*/
private String attachmentFormat;
/**
* 文件类型图片 - image 视频 - video 语音 - voice 文档 - doc
*/
private String attachmentType;
/**
* url地址
*/
private String attachmentUrl;
/**
* 排序(需求确定按上传顺序排序)
*/
private Integer sort;
/**
* 语音或视频时长
*/
private Integer duration;
}

110
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectProcessEntity.java

@ -0,0 +1,110 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity.evaluationindex.screen;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 中央区-项目数据项目处理进展表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-02-23
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("screen_project_process")
public class ScreenProjectProcessEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 处理进展id
*/
private String processId;
/**
* 项目ID
*/
private String projectId;
/**
* 被流转的部门名称
*/
private String transferDeptName;
/**
* 被流转的部门名称
*/
private String transferDeptIds;
/**
* 处理者名称
*/
private String handlerName;
/**
* 处理者类型 未知unknown,机关agency,部门department,网格grid
*/
private String handlerType;
/**
* 处理者ID
*/
private String handlerId;
/**
* 所属机关11:22:33
*/
private String orgIdPath;
/**
* 回应 response结案close退回return部门流转transfer创建项目created
*/
private String operation;
/**
* 公开答复
*/
private String publicReply;
/**
* 内部备注
*/
private String internalRemark;
/**
* 处理时间
*/
private Date processTime;
/**
* 数据截止日期
*/
private String DataEndTime;
}

21
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerRelationServiceImpl.java

@ -22,11 +22,15 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.constant.DataSourceConstant;
import com.epmet.dao.crm.CustomerRelationDao;
import com.epmet.dto.indexcal.CustomerSubInfoDTO;
import com.epmet.dto.stats.DimCustomerDTO;
import com.epmet.entity.crm.CustomerRelationEntity;
import com.epmet.service.crm.CustomerRelationService;
import com.epmet.service.stats.DimCustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -38,11 +42,12 @@ import java.util.stream.Collectors;
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-01-14
*/
@DataSource(DataSourceConstant.STATS)
@DataSource(DataSourceConstant.OPER_CRM)
@Service
public class CustomerRelationServiceImpl extends BaseServiceImpl<CustomerRelationDao, CustomerRelationEntity> implements CustomerRelationService {
@Autowired
private DimCustomerService dimCustomerService;
/**
* @param customerIds
* @return java.util.Map<java.lang.String, com.epmet.dto.indexcal.CustomerSubInfoDTO>
@ -52,7 +57,17 @@ public class CustomerRelationServiceImpl extends BaseServiceImpl<CustomerRelatio
**/
@Override
public Map<String, CustomerSubInfoDTO> getCustomerInfoMap(List<String> customerIds) {
List<CustomerSubInfoDTO> list = baseDao.selectCustomerSubInfo(customerIds);
List<CustomerSubInfoDTO> list=new ArrayList<>();
for(String customerId:customerIds){
CustomerSubInfoDTO customerSubInfoDTO = baseDao.selectCustomerSubInfo(customerId);
if(null!=customerSubInfoDTO){
DimCustomerDTO dimCustomerDTO=dimCustomerService.get(customerId);
if(null!=dimCustomerDTO){
customerSubInfoDTO.setCustomerName(dimCustomerDTO.getCustomerName());
}
list.add(customerSubInfoDTO);
}
}
if(CollectionUtils.isEmpty(list)){
return new HashMap<>();
}

7
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java

@ -163,10 +163,11 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr
Map<String,String> contentMap = topicService.getTopicContent(projectSourceMap);
difficulties.forEach( diff -> {
if(!CollectionUtils.isEmpty(imgMap)) {
List<ScreenDifficultyImgDataEntity> figureList = imgMap.get(diff.getEventId());
List<ScreenDifficultyImgDataEntity> figureList = CollectionUtils.isEmpty(imgMap) ? null : imgMap.get(diff.getEventId());
diff.setEventImgUrl(CollectionUtils.isEmpty(figureList) ? "" : figureList.get(NumConstant.ZERO).getEventImgUrl());
}
if(!CollectionUtils.isEmpty(contentMap)) {
diff.setEventContent(contentMap.get(diff.getEventId()));
}

99
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectDataService.java

@ -0,0 +1,99 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.evaluationindex.screen;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.screen.ScreenProjectDataDTO;
import com.epmet.dto.screen.form.ScreenProjectDataInfoFormDTO;
import com.epmet.dto.screencoll.ScreenCollFormDTO;
import com.epmet.entity.evaluationindex.screen.ScreenProjectDataEntity;
import java.util.List;
import java.util.Map;
/**
* 中央区-项目数据
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-02-23
*/
public interface ScreenProjectDataService extends BaseService<ScreenProjectDataEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<ScreenProjectDataDTO>
* @author generator
* @date 2021-02-23
*/
PageData<ScreenProjectDataDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<ScreenProjectDataDTO>
* @author generator
* @date 2021-02-23
*/
List<ScreenProjectDataDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return ScreenProjectDataDTO
* @author generator
* @date 2021-02-23
*/
ScreenProjectDataDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-02-23
*/
void save(ScreenProjectDataDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-02-23
*/
void update(ScreenProjectDataDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2021-02-23
*/
void delete(String[] ids);
void collect(String customerId, ScreenCollFormDTO<ScreenProjectDataInfoFormDTO> param);
}

96
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectImgDataService.java

@ -0,0 +1,96 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.evaluationindex.screen;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.screen.ScreenProjectImgDataDTO;
import com.epmet.entity.evaluationindex.screen.ScreenProjectImgDataEntity;
import java.util.List;
import java.util.Map;
/**
* 中央区-项目数据图片
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-02-23
*/
public interface ScreenProjectImgDataService extends BaseService<ScreenProjectImgDataEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<ScreenProjectImgDataDTO>
* @author generator
* @date 2021-02-23
*/
PageData<ScreenProjectImgDataDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<ScreenProjectImgDataDTO>
* @author generator
* @date 2021-02-23
*/
List<ScreenProjectImgDataDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return ScreenProjectImgDataDTO
* @author generator
* @date 2021-02-23
*/
ScreenProjectImgDataDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-02-23
*/
void save(ScreenProjectImgDataDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-02-23
*/
void update(ScreenProjectImgDataDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2021-02-23
*/
void delete(String[] ids);
}

95
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectProcessAttachmentService.java

@ -0,0 +1,95 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.evaluationindex.screen;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.screen.ScreenProjectProcessAttachmentDTO;
import com.epmet.entity.evaluationindex.screen.ScreenProjectProcessAttachmentEntity;
import java.util.List;
import java.util.Map;
/**
* 中央区-项目数据处理节点附件表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-02-23
*/
public interface ScreenProjectProcessAttachmentService extends BaseService<ScreenProjectProcessAttachmentEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<ScreenProjectProcessAttachmentDTO>
* @author generator
* @date 2021-02-23
*/
PageData<ScreenProjectProcessAttachmentDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<ScreenProjectProcessAttachmentDTO>
* @author generator
* @date 2021-02-23
*/
List<ScreenProjectProcessAttachmentDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return ScreenProjectProcessAttachmentDTO
* @author generator
* @date 2021-02-23
*/
ScreenProjectProcessAttachmentDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-02-23
*/
void save(ScreenProjectProcessAttachmentDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-02-23
*/
void update(ScreenProjectProcessAttachmentDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2021-02-23
*/
void delete(String[] ids);
}

99
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectProcessService.java

@ -0,0 +1,99 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.evaluationindex.screen;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.screen.ScreenProjectProcessDTO;
import com.epmet.dto.screen.form.ScreenProjectProcessFormDTO;
import com.epmet.dto.screencoll.ScreenCollFormDTO;
import com.epmet.entity.evaluationindex.screen.ScreenProjectProcessEntity;
import java.util.List;
import java.util.Map;
/**
* 中央区-项目数据项目处理进展表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-02-23
*/
public interface ScreenProjectProcessService extends BaseService<ScreenProjectProcessEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<ScreenProjectProcessDTO>
* @author generator
* @date 2021-02-23
*/
PageData<ScreenProjectProcessDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<ScreenProjectProcessDTO>
* @author generator
* @date 2021-02-23
*/
List<ScreenProjectProcessDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return ScreenProjectProcessDTO
* @author generator
* @date 2021-02-23
*/
ScreenProjectProcessDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-02-23
*/
void save(ScreenProjectProcessDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-02-23
*/
void update(ScreenProjectProcessDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2021-02-23
*/
void delete(String[] ids);
void collect(String customerId, ScreenCollFormDTO<ScreenProjectProcessFormDTO> param);
}

222
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java

@ -0,0 +1,222 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.evaluationindex.screen.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.constant.DataSourceConstant;
import com.epmet.dao.evaluationindex.screen.*;
import com.epmet.dto.screen.ScreenProjectDataDTO;
import com.epmet.dto.screen.form.ScreenProjectDataInfoFormDTO;
import com.epmet.dto.screencoll.ScreenCollFormDTO;
import com.epmet.entity.evaluationindex.screen.*;
import com.epmet.service.evaluationindex.screen.*;
import com.google.common.collect.Lists;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* 中央区-项目数据
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-02-23
*/
@Service
public class ScreenProjectDataServiceImpl extends BaseServiceImpl<ScreenProjectDataDao, ScreenProjectDataEntity> implements ScreenProjectDataService {
@Resource
private ScreenProjectImgDataDao screenProjectImgDataDao;
@Resource
private ScreenCustomerAgencyDao agencyDao;
@Resource
private ScreenCustomerDeptDao deptDao;
@Resource
private ScreenCustomerGridDao gridDao;
@Override
public PageData<ScreenProjectDataDTO> page(Map<String, Object> params) {
IPage<ScreenProjectDataEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, ScreenProjectDataDTO.class);
}
@Override
public List<ScreenProjectDataDTO> list(Map<String, Object> params) {
List<ScreenProjectDataEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, ScreenProjectDataDTO.class);
}
private QueryWrapper<ScreenProjectDataEntity> getWrapper(Map<String, Object> params) {
String id = (String) params.get(FieldConstant.ID_HUMP);
QueryWrapper<ScreenProjectDataEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public ScreenProjectDataDTO get(String id) {
ScreenProjectDataEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, ScreenProjectDataDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(ScreenProjectDataDTO dto) {
ScreenProjectDataEntity entity = ConvertUtils.sourceToTarget(dto, ScreenProjectDataEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(ScreenProjectDataDTO dto) {
ScreenProjectDataEntity entity = ConvertUtils.sourceToTarget(dto, ScreenProjectDataEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
@Override
@Transactional(rollbackFor = Exception.class)
@DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true)
public void collect(String customerId, ScreenCollFormDTO<ScreenProjectDataInfoFormDTO> param) {
if (param.getIsFirst()) {
int affectedRows = baseDao.deleteByDateIdAndCustomerId(customerId, param.getDateId());
while (affectedRows > 0) {
affectedRows = baseDao.deleteByDateIdAndCustomerId(customerId, param.getDateId());
}
}
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date today = new Date();
param.getDataList().forEach(item -> {
String projectStatusCode = item.getProjectStatusCode();
//todo 动态获取超时时间
//如果结案 结案时间立项时间;
if ("closed_case".equals(projectStatusCode)) {
try {
Date createTime = sdf.parse(item.getProjectCreateTime());
Date closeCaseTime = sdf.parse(item.getCloseCaseTime());
if (closeCaseTime.getTime() - createTime.getTime() <= 1000 * 60 * 60 * 24 * 4) {
//如果结案时间-立项时间小于等于4天 未超期 level3
item.setProjectLevel(3);
} else if (closeCaseTime.getTime() - createTime.getTime() <= 1000 * 60 * 60 * 24 * 5) {
//如果结案时间-立项时间大于4天小于5天 即将超期 level2
item.setProjectLevel(2);
} else {
//大于5天 已超期 level1
item.setProjectLevel(1);
}
} catch (ParseException e) {
e.printStackTrace();
}
} else if ("pending".equals(projectStatusCode)) {
//如果处理中 当前时间-立项时间;
try {
Date createTime = sdf.parse(item.getProjectCreateTime());
if (today.getTime() - createTime.getTime() <= 1000 * 60 * 60 * 24 * 4) {
//如果当前时间-立项时间小于等于4天 未超期 level3
item.setProjectLevel(3);
} else if (today.getTime() - createTime.getTime() <= 1000 * 60 * 60 * 24 * 5) {
//如果当前时间-立项时间大于4天小于5天 即将超期 level2
item.setProjectLevel(2);
} else {
//大于5天 已超期 level1
item.setProjectLevel(1);
}
} catch (ParseException e) {
e.printStackTrace();
}
}
//先删除该projectId对应的旧数据
QueryWrapper<ScreenProjectDataEntity> deleteWrapper = new QueryWrapper<>();
deleteWrapper.eq(StringUtils.isNotBlank(item.getProjectId()), "project_id", item.getProjectId())
.eq(StringUtils.isNotBlank(customerId), "customer_id", customerId);
baseDao.delete(deleteWrapper);
QueryWrapper<ScreenProjectImgDataEntity> screenProjectImgDataEntityQueryWrapper = new QueryWrapper<>();
screenProjectImgDataEntityQueryWrapper.eq(StringUtils.isNotBlank(item.getProjectId()), "project_id", item.getProjectId())
.eq(StringUtils.isNotBlank(customerId), "customer_id", customerId);
screenProjectImgDataDao.delete(screenProjectImgDataEntityQueryWrapper);
//如果orgType未知,获取一下
// if ("unknown".equals(item.getOrgType())){
// ScreenCustomerAgencyEntity screenCustomerAgencyEntity = agencyDao.selectById(item.getOrgId());
// if (screenCustomerAgencyEntity != null){
// item.setOrgType("agency");
// }else {
// ScreenCustomerDeptEntity screenCustomerDeptEntity = deptDao.selectById(item.getOrgId());
// if (screenCustomerDeptEntity!=null){
// item.setOrgType("department");
// }else {
// ScreenCustomerGridEntity screenCustomerGridEntity = gridDao.selectById(item.getOrgId());
// if (screenCustomerGridEntity != null){
// item.setOrgType("grid");
// }
// }
// }
// }
//插入项目表
ScreenProjectDataEntity screenProjectDataEntity = ConvertUtils.sourceToTarget(item, ScreenProjectDataEntity.class);
screenProjectDataEntity.setCustomerId(customerId);
screenProjectDataEntity.setDataEndTime(param.getDateId());
baseDao.insert(screenProjectDataEntity);
//插入图片表
String[] projectImgUrl = item.getProjectImgUrl();
if (ArrayUtils.isNotEmpty(projectImgUrl)) {
for (int i = 0; i < projectImgUrl.length; i++) {
ScreenProjectImgDataEntity screenProjectImgDataEntity = new ScreenProjectImgDataEntity();
screenProjectImgDataEntity.setCustomerId(customerId);
screenProjectImgDataEntity.setProjectId(item.getProjectId());
screenProjectImgDataEntity.setProjectImgUrl(projectImgUrl[i]);
screenProjectImgDataEntity.setSort(i);
screenProjectImgDataDao.insert(screenProjectImgDataEntity);
}
}
});
}
}

99
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectImgDataServiceImpl.java

@ -0,0 +1,99 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.evaluationindex.screen.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.dao.evaluationindex.screen.ScreenProjectImgDataDao;
import com.epmet.dto.screen.ScreenProjectImgDataDTO;
import com.epmet.entity.evaluationindex.screen.ScreenProjectImgDataEntity;
import com.epmet.service.evaluationindex.screen.ScreenProjectImgDataService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 中央区-项目数据图片
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-02-23
*/
@Service
public class ScreenProjectImgDataServiceImpl extends BaseServiceImpl<ScreenProjectImgDataDao, ScreenProjectImgDataEntity> implements ScreenProjectImgDataService {
@Override
public PageData<ScreenProjectImgDataDTO> page(Map<String, Object> params) {
IPage<ScreenProjectImgDataEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, ScreenProjectImgDataDTO.class);
}
@Override
public List<ScreenProjectImgDataDTO> list(Map<String, Object> params) {
List<ScreenProjectImgDataEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, ScreenProjectImgDataDTO.class);
}
private QueryWrapper<ScreenProjectImgDataEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<ScreenProjectImgDataEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public ScreenProjectImgDataDTO get(String id) {
ScreenProjectImgDataEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, ScreenProjectImgDataDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(ScreenProjectImgDataDTO dto) {
ScreenProjectImgDataEntity entity = ConvertUtils.sourceToTarget(dto, ScreenProjectImgDataEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(ScreenProjectImgDataDTO dto) {
ScreenProjectImgDataEntity entity = ConvertUtils.sourceToTarget(dto, ScreenProjectImgDataEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}

98
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectProcessAttachmentServiceImpl.java

@ -0,0 +1,98 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.evaluationindex.screen.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.dao.evaluationindex.screen.ScreenProjectProcessAttachmentDao;
import com.epmet.dto.screen.ScreenProjectProcessAttachmentDTO;
import com.epmet.entity.evaluationindex.screen.ScreenProjectProcessAttachmentEntity;
import com.epmet.service.evaluationindex.screen.ScreenProjectProcessAttachmentService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 中央区-项目数据处理节点附件表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-02-23
*/
@Service
public class ScreenProjectProcessAttachmentServiceImpl extends BaseServiceImpl<ScreenProjectProcessAttachmentDao, ScreenProjectProcessAttachmentEntity> implements ScreenProjectProcessAttachmentService {
@Override
public PageData<ScreenProjectProcessAttachmentDTO> page(Map<String, Object> params) {
IPage<ScreenProjectProcessAttachmentEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, ScreenProjectProcessAttachmentDTO.class);
}
@Override
public List<ScreenProjectProcessAttachmentDTO> list(Map<String, Object> params) {
List<ScreenProjectProcessAttachmentEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, ScreenProjectProcessAttachmentDTO.class);
}
private QueryWrapper<ScreenProjectProcessAttachmentEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<ScreenProjectProcessAttachmentEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public ScreenProjectProcessAttachmentDTO get(String id) {
ScreenProjectProcessAttachmentEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, ScreenProjectProcessAttachmentDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(ScreenProjectProcessAttachmentDTO dto) {
ScreenProjectProcessAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, ScreenProjectProcessAttachmentEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(ScreenProjectProcessAttachmentDTO dto) {
ScreenProjectProcessAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, ScreenProjectProcessAttachmentEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}

156
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectProcessServiceImpl.java

@ -0,0 +1,156 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.evaluationindex.screen.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.constant.DataSourceConstant;
import com.epmet.dao.evaluationindex.screen.ScreenProjectProcessAttachmentDao;
import com.epmet.dao.evaluationindex.screen.ScreenProjectProcessDao;
import com.epmet.dto.screen.ScreenProjectProcessAttachmentDTO;
import com.epmet.dto.screen.ScreenProjectProcessDTO;
import com.epmet.dto.screen.form.ScreenProjectProcessFormDTO;
import com.epmet.dto.screencoll.ScreenCollFormDTO;
import com.epmet.entity.evaluationindex.screen.ScreenProjectProcessAttachmentEntity;
import com.epmet.entity.evaluationindex.screen.ScreenProjectProcessEntity;
import com.epmet.service.evaluationindex.screen.ScreenProjectProcessService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 中央区-项目数据项目处理进展表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-02-23
*/
@Service
public class ScreenProjectProcessServiceImpl extends BaseServiceImpl<ScreenProjectProcessDao, ScreenProjectProcessEntity> implements ScreenProjectProcessService {
@Resource
private ScreenProjectProcessAttachmentDao screenProjectProcessAttachmentDao;
@Override
public PageData<ScreenProjectProcessDTO> page(Map<String, Object> params) {
IPage<ScreenProjectProcessEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, ScreenProjectProcessDTO.class);
}
@Override
public List<ScreenProjectProcessDTO> list(Map<String, Object> params) {
List<ScreenProjectProcessEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, ScreenProjectProcessDTO.class);
}
private QueryWrapper<ScreenProjectProcessEntity> getWrapper(Map<String, Object> params) {
String id = (String) params.get(FieldConstant.ID_HUMP);
QueryWrapper<ScreenProjectProcessEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public ScreenProjectProcessDTO get(String id) {
ScreenProjectProcessEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, ScreenProjectProcessDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(ScreenProjectProcessDTO dto) {
ScreenProjectProcessEntity entity = ConvertUtils.sourceToTarget(dto, ScreenProjectProcessEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(ScreenProjectProcessDTO dto) {
ScreenProjectProcessEntity entity = ConvertUtils.sourceToTarget(dto, ScreenProjectProcessEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
@Override
@Transactional(rollbackFor = Exception.class)
@DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true)
public void collect(String customerId, ScreenCollFormDTO<ScreenProjectProcessFormDTO> param) {
if (param.getIsFirst()) {
int affectedRows = baseDao.deleteByDateIdAndCustomerId(customerId, param.getDateId());
while (affectedRows > 0) {
affectedRows = baseDao.deleteByDateIdAndCustomerId(customerId, param.getDateId());
}
}
param.getDataList().forEach(item -> {
//先删除旧数据
QueryWrapper<ScreenProjectProcessEntity> screenProjectProcessEntityQueryWrapper = new QueryWrapper<>();
screenProjectProcessEntityQueryWrapper.eq(StringUtils.isNotBlank(item.getProjectId()), "project_id", item.getProjectId())
.eq(StringUtils.isNotBlank(customerId), "customer_id", customerId)
.eq(StringUtils.isNotBlank(item.getProcessId()), "process_id", item.getProcessId());
baseDao.delete(screenProjectProcessEntityQueryWrapper);
QueryWrapper<ScreenProjectProcessAttachmentEntity> screenProjectProcessAttachmentEntityQueryWrapper = new QueryWrapper<>();
screenProjectProcessAttachmentEntityQueryWrapper.eq(StringUtils.isNotBlank(item.getProjectId()), "project_id", item.getProjectId())
.eq(StringUtils.isNotBlank(customerId), "customer_id", customerId)
.eq(StringUtils.isNotBlank(item.getProcessId()), "process_id", item.getProcessId());
screenProjectProcessAttachmentDao.delete(screenProjectProcessAttachmentEntityQueryWrapper);
//插入
ScreenProjectProcessEntity screenProjectProcessEntity = ConvertUtils.sourceToTarget(item, ScreenProjectProcessEntity.class);
screenProjectProcessEntity.setCustomerId(customerId);
screenProjectProcessEntity.setDataEndTime(param.getDateId());
baseDao.insert(screenProjectProcessEntity);
List<ScreenProjectProcessAttachmentDTO> attachments = item.getAttachments();
if (!CollectionUtils.isEmpty(attachments)){
for (int i = 0; i < attachments.size(); i++) {
ScreenProjectProcessAttachmentEntity attachmentEntity = ConvertUtils.sourceToTarget(attachments.get(i), ScreenProjectProcessAttachmentEntity.class);
attachmentEntity.setCustomerId(customerId);
attachmentEntity.setProcessId(item.getProcessId());
attachmentEntity.setProjectId(item.getProjectId());
if (attachmentEntity.getSort() == null) {
attachmentEntity.setSort(i);
}
screenProjectProcessAttachmentDao.insert(attachmentEntity);
}
}
});
}
}

16
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/crm/CustomerRelationDao.xml

@ -4,7 +4,6 @@
<mapper namespace="com.epmet.dao.crm.CustomerRelationDao">
<resultMap id="CustomerSubInfoDTOResMap" type="com.epmet.dto.indexcal.CustomerSubInfoDTO">
<result property="customerId" column="customerId"></result>
<result property="customerName" column="customerName"></result>
<result property="customerAreaCode" column="customerAreaCode"></result>
<collection property="subCustomerIds" ofType="java.lang.String">
<result column="subCustomerId"/>
@ -14,22 +13,13 @@
<select id="selectCustomerSubInfo" parameterType="map" resultMap="CustomerSubInfoDTOResMap">
SELECT
CR.PARENT_CUSTOMER_ID AS customerId,
dc.CUSTOMER_NAME AS customerName,
dc.AREA_CODE AS customerAreaCode,
CR.CUSTOMER_ID AS subCustomerId
CR.CUSTOMER_ID AS subCustomerId,
(select c.AREA_CODE from customer_relation c where c.del_flag='0' and c.CUSTOMER_ID=#{customerId}) as customerAreaCode
FROM
customer_relation cr
LEFT JOIN dim_customer dc ON ( cr.PARENT_CUSTOMER_ID = DC.ID and dc.del_flag='0')
WHERE
cr.DEL_FLAG = '0'
AND cr.`STATUS` = 'open'
AND cr.PARENT_CUSTOMER_ID != '0'
<if test="null !=list and list.size()>0">
AND cr.PARENT_CUSTOMER_ID IN
<foreach collection="list" item="customerId" index="index" open="(" close=")" separator=",">
#{customerId}
</foreach>
</if>
AND cr.PARENT_CUSTOMER_ID =#{customerId}
</select>
</mapper>

43
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.evaluationindex.screen.ScreenProjectDataDao">
<resultMap type="com.epmet.entity.evaluationindex.screen.ScreenProjectDataEntity" id="screenProjectDataMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="orgType" column="ORG_TYPE"/>
<result property="orgId" column="ORG_ID"/>
<result property="parentId" column="PARENT_ID"/>
<result property="orgName" column="ORG_NAME"/>
<result property="projectId" column="PROJECT_ID"/>
<result property="projectTitle" column="PROJECT_TITLE"/>
<result property="projectCreateTime" column="PROJECT_CREATE_TIME"/>
<result property="linkName" column="LINK_NAME"/>
<result property="linkMobile" column="LINK_MOBILE"/>
<result property="projectContent" column="PROJECT_CONTENT"/>
<result property="projectLevel" column="PROJECT_LEVEL"/>
<result property="projectAddress" column="PROJECT_ADDRESS"/>
<result property="allCategoryName" column="ALL_CATEGORY_NAME"/>
<result property="longitude" column="LONGITUDE"/>
<result property="latitude" column="LATITUDE"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
<result property="projectStatusCode" column="PROJECT_STATUS_CODE"/>
<result property="closeCaseTime" column="CLOSE_CASE_TIME"/>
<result property="dataEndTime" column="DATA_END_TIME"/>
<result property="allParentIds" column="ALL_PARENT_IDS"/>
</resultMap>
<delete id="deleteByDateIdAndCustomerId">
delete from screen_project_data
where customer_id = #{customerId}
and DATA_END_TIME = #{dateId}
limit 1000
</delete>
</mapper>

21
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectImgDataDao.xml

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.evaluationindex.screen.ScreenProjectImgDataDao">
<resultMap type="com.epmet.entity.evaluationindex.screen.ScreenProjectImgDataEntity" id="screenProjectImgDataMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="projectId" column="PROJECT_ID"/>
<result property="projectImgUrl" column="PROJECT_IMG_URL"/>
<result property="sort" column="SORT"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

30
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectProcessAttachmentDao.xml

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.evaluationindex.screen.ScreenProjectProcessAttachmentDao">
<resultMap type="com.epmet.entity.evaluationindex.screen.ScreenProjectProcessAttachmentEntity" id="screenProjectProcessAttachmentMap">
<result property="id" column="ID"/>
<result property="attachmentId" column="ATTACHMENT_ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="projectId" column="PROJECT_ID"/>
<result property="processId" column="PROCESS_ID"/>
<result property="filePlace" column="FILE_PLACE"/>
<result property="fileName" column="FILE_NAME"/>
<result property="attachmentName" column="ATTACHMENT_NAME"/>
<result property="attachmentSize" column="ATTACHMENT_SIZE"/>
<result property="attachmentFormat" column="ATTACHMENT_FORMAT"/>
<result property="attachmentType" column="ATTACHMENT_TYPE"/>
<result property="attachmentUrl" column="ATTACHMENT_URL"/>
<result property="sort" column="SORT"/>
<result property="duration" column="DURATION"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

13
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectProcessDao.xml

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.evaluationindex.screen.ScreenProjectProcessDao">
<delete id="deleteByDateIdAndCustomerId">
delete from screen_project_process
where customer_id = #{customerId}
and DATA_END_TIME = #{dateId}
limit 1000
</delete>
</mapper>

1
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/topic/TopicDao.xml

@ -225,6 +225,7 @@
resi_topic_attachment
WHERE
DEL_FLAG = '0'
AND ATTACHMENT_TYPE = 'image'
<foreach collection="list" item="item" open="AND (" separator=" OR " close=")">
TOPIC_ID = #{item.sourceId}
</foreach>

40
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java

@ -386,6 +386,7 @@ public class AreaCodeServiceImpl extends BaseServiceImpl<AreaCodeDao, AreaCodeEn
// 查询所有街道、社区
List<AreaCodeChildDTO> areaCodeChildDTOS = childDao.selectAllChild();
List<AreaCodeDictResultDTO> fourResult = new ArrayList<>();
List<AreaCodeDictResultDTO> fiveResult = new ArrayList<>();
// 街道-社区
Map<Integer, List<AreaCodeChildDTO>> groupByLevel = areaCodeChildDTOS.stream().collect(Collectors.groupingBy(AreaCodeChildDTO::getLevel));
//社区
@ -393,23 +394,40 @@ public class AreaCodeServiceImpl extends BaseServiceImpl<AreaCodeDao, AreaCodeEn
Map<String, List<AreaCodeChildDTO>> groupByPCode = levelFive.stream().collect(Collectors.groupingBy(AreaCodeChildDTO::getPCode));
//街道
List<AreaCodeChildDTO> levelFour = groupByLevel.get(NumConstant.FOUR);
// 6级
List<AreaCodeChildDTO> levelSix = groupByLevel.get(NumConstant.SIX);
Map<String, List<AreaCodeChildDTO>> groupBySixPCode = levelSix.stream().collect(Collectors.groupingBy(AreaCodeChildDTO::getPCode));
levelFive.forEach(f -> {
AreaCodeDictResultDTO dto = new AreaCodeDictResultDTO();
dto.setCode(f.getCode());
dto.setName(f.getName());
dto.setParentCode(f.getPCode());
groupBySixPCode.forEach((k,v) -> {
if (dto.getCode().equals(k)){
List<AreaCodeDictResultDTO> six = new ArrayList<>();
v.forEach(s -> {
AreaCodeDictResultDTO sixDto = new AreaCodeDictResultDTO();
sixDto.setCode(s.getCode());
sixDto.setName(s.getName());
sixDto.setParentCode(k);
six.add(sixDto);
});
List<AreaCodeDictResultDTO> collect = six.stream().sorted(Comparator.comparing(AreaCodeDictResultDTO::getCode)).collect(Collectors.toList());
dto.setChildren(collect);
}
});
fiveResult.add(dto);
});
Map<String, List<AreaCodeDictResultDTO>> groupByFivePCode = fiveResult.stream().collect(Collectors.groupingBy(AreaCodeDictResultDTO::getParentCode));
levelFour.forEach(four -> {
AreaCodeDictResultDTO dto = new AreaCodeDictResultDTO();
dto.setCode(four.getCode());
dto.setName(four.getName());
dto.setParentCode(four.getPCode());
groupByPCode.forEach((pCode,v) -> {
groupByFivePCode.forEach((pCode,v) -> {
if (dto.getCode().equals(pCode)){
List<AreaCodeDictResultDTO> fiveResult = new ArrayList<>();
v.forEach(five -> {
AreaCodeDictResultDTO fiveDto = new AreaCodeDictResultDTO();
fiveDto.setCode(five.getCode());
fiveDto.setName(five.getName());
fiveDto.setParentCode(pCode);
fiveResult.add(fiveDto);
});
List<AreaCodeDictResultDTO> fiveSort = fiveResult.stream().sorted(Comparator.comparing(AreaCodeDictResultDTO::getCode)).collect(Collectors.toList());
dto.setChildren(fiveSort);
dto.setChildren(v);
}
});
fourResult.add(dto);

2
epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/AreaCodeChildDao.xml

@ -5,7 +5,7 @@
<select id="selectAllChild" resultType="com.epmet.dto.AreaCodeChildDTO">
select * from area_code_child
select * from area_code_child m where m.DEL_FLAG = '0'
</select>
<select id="selectByCode" resultType="com.epmet.dto.AreaCodeChildDTO">

2
epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/AreaCodeDao.xml

@ -5,7 +5,7 @@
<select id="selectAllArea" resultType="com.epmet.dto.AreaCodeDTO">
select * from area_code
select * from area_code m where m.DEL_FLAG = '0'
</select>
<select id="selectByCountyCode" resultType="com.epmet.dto.AreaCodeDTO">

4
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueResultDTO.java

@ -44,5 +44,9 @@ public class IssueResultDTO implements Serializable {
*/
private String topicId;
/**
* 上级-网格名 20210224add
*/
private String gridName;
}

3
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java

@ -269,4 +269,7 @@ public interface GovIssueOpenFeignClient {
*/
@PostMapping("/gov/issue/issuesharelink/sharelinkinfo")
Result<IssueShareLinkRecordDTO> shareLinkInfo(@RequestParam String shareLinkId);
@PostMapping("/gov/issue/issue/detail")
Result<IssueResultDTO> queryIssueDetail(@RequestBody IssueDetailFormDTO formDTO);
}

6
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java

@ -21,7 +21,6 @@ import com.epmet.resi.group.dto.group.result.*;
import com.epmet.resi.mine.dto.from.MyShiftIssueTopicsFormDTO;
import com.epmet.resi.mine.dto.result.MyShiftIssueTopicsResultDTO;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
import java.util.Map;
@ -233,4 +232,9 @@ public class GovIssueOpenFeignClientFallBack implements GovIssueOpenFeignClient
public Result<IssueShareLinkRecordDTO> shareLinkInfo(String shareLinkId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "shareLinkInfo", shareLinkId);
}
@Override
public Result<IssueResultDTO> queryIssueDetail(IssueDetailFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "detail", formDTO);
}
}

2
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java

@ -34,7 +34,7 @@ public class IssueController {
/**
* @Description 议题详情
* @param issueDetail
* @author zxc
* @author zxc 这个接口内部feign也调用不要加权限注解
* @date 2020/5/11 9:42
*/
@PostMapping(value = "detail")

9
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java

@ -187,6 +187,15 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
public IssueResultDTO detail(IssueDetailFormDTO issueDetail) {
//议题信息
IssueResultDTO issueResult = issueDao.issueDetail(issueDetail);
if (null != issueResult && StringUtils.isNotBlank(issueResult.getGridId())) {
BelongGridNameFormDTO formDTO = new BelongGridNameFormDTO();
formDTO.setGridId(issueResult.getGridId());
Result<BelongGridNameResultDTO> result = govOrgOpenFeignClient.getGridNameByGridId(formDTO);
logger.info("根据网格id查询网格名称接口返参:" + JSON.toJSONString(result));
if (result.success() && null != result.getData()) {
issueResult.setGridName(result.getData().getBelongsGridName());
}
}
return issueResult;
}

36
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectInfoDTO.java

@ -0,0 +1,36 @@
package com.epmet.dto.result;
import lombok.Data;
import java.util.List;
/**
* 描述一下
*
* @author yinzuomei@elink-cn.com
* @date 2021/2/24 16:11
*/
@Data
public class ProjectInfoDTO {
// 【事件 = 项目】
private String projectId;
/**
* 项目标题
*/
private String eventTitle;
/**
* 项目内容
*/
private String eventContent;
private String issueId;
private String gridName;
private String gridId;
/**
* 项目附件图片集合
*/
private List<String> imgUrlList;
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save