Browse Source

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

dev_shibei_match
wangchao 5 years ago
parent
commit
03445db264
  1. 4
      epmet-commons/epmet-commons-extapp-auth/src/main/java/com/epmet/commons/extappauth/aspect/ExternalAppRequestAuthAspect.java
  2. 2
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
  3. 8
      epmet-gateway/src/main/java/com/epmet/filter/CpAuthGatewayFilterFactory.java
  4. 5
      epmet-gateway/src/main/java/com/epmet/filter/CpProperty.java
  5. 6
      epmet-gateway/src/main/resources/bootstrap.yml
  6. 24
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/MonthPieChartFormDTO.java
  7. 24
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/YearAverageIndexFormDTO.java
  8. 30
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthPieChartResultDTO.java
  9. 35
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/YearAverageIndexResultDTO.java
  10. 4
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/DistributionController.java
  11. 42
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java
  12. 12
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataMonthlyDao.java
  13. 41
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataYearlyDao.java
  14. 22
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/IndexService.java
  15. 42
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/IndexServiceImpl.java
  16. 8
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataDao.xml
  17. 20
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml
  18. 21
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml
  19. 5
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CpcBaseDataFormDTO.java
  20. 5
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerAgencyFormDTO.java
  21. 5
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerDeptFormDTO.java
  22. 5
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerGridFormDTO.java
  23. 10
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataFormDTO.java
  24. 10
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/EventDataFormDTO.java
  25. 5
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/GovernRankDataFormDTO.java
  26. 9
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataMonthlyFormDTO.java
  27. 61
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataYearlyFormDTO.java
  28. 5
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/OrgRankDataFormDTO.java
  29. 5
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyBranchDataFormDTO.java
  30. 5
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyLinkMassesDataFormDTO.java
  31. 5
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PioneerDataFormDTO.java
  32. 5
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserJoinFormDTO.java
  33. 5
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserTotalDataFormDTO.java
  34. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/DataStatsApplication.java
  35. 123
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenCollController.java
  36. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java
  37. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java
  38. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java
  39. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java
  40. 16
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java
  41. 14
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java
  42. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java
  43. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataMonthlyDao.java
  44. 61
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataYearlyDao.java
  45. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java
  46. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java
  47. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java
  48. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java
  49. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java
  50. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java
  51. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java
  52. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java
  53. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataMonthlyEntity.java
  54. 92
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataYearlyEntity.java
  55. 67
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/ScreenCollService.java
  56. 122
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/ScreenCollServiceImpl.java
  57. 4
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml
  58. 4
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml
  59. 4
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerDeptDao.xml
  60. 4
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml
  61. 10
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml
  62. 10
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml
  63. 4
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml
  64. 12
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml
  65. 60
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml
  66. 4
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml
  67. 4
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml
  68. 4
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml
  69. 4
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml
  70. 4
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml
  71. 4
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml
  72. 15
      epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/form/ExternalCustomerFormDTO.java
  73. 46
      epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/result/ExternalCustomerResultDTO.java
  74. 5
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/ExternalAppController.java
  75. 47
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/ExternalCustomerController.java
  76. 41
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/ExternalCustomerDao.java
  77. 46
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/entity/ExternalCustomerEntity.java
  78. 11
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/ExternalCustomerService.java
  79. 24
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ExternalAppAuthServiceImpl.java
  80. 26
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ExternalCustomerServiceImpl.java
  81. 5
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java
  82. 29
      epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/ExternalCustomerDao.xml

4
epmet-commons/epmet-commons-extapp-auth/src/main/java/com/epmet/commons/extappauth/aspect/ExternalAppRequestAuthAspect.java

@ -35,7 +35,7 @@ public class ExternalAppRequestAuthAspect {
private static Logger logger = LoggerFactory.getLogger(ExternalAppRequestAuthAspect.class);
public static final String ACCESS_TOKEN_HEADER_KEY = "access_token";
public static final String ACCESS_TOKEN_HEADER_KEY = "AccessToken";
public static final String APP_ID_HEADER_KEY = "appId";
@Autowired
@ -64,7 +64,7 @@ public class ExternalAppRequestAuthAspect {
form.setToken(token);
Result<ExternalAppAuthResultDTO> result = commonServiceOpenFeignClient.externalAppAuth(form);
if (result == null) {
throw new RenException("调用external鉴权服务,返回null");
throw new RenException("调用服务进行外部应用认证,返回null");
}
if (!result.success()) {
throw new RenException(result.getInternalMsg());

2
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java

@ -99,7 +99,7 @@ public enum EpmetErrorCode {
OPER_ADD_CUSTOMER_MANAGER_ERROR(8706, "新增客户管理员失败"),
OPER_UPLOAD_FILE_OVER_SIZE(8707, "文件体积过大"),
OPER_UPLOAD_FILE_TYPE_ERROR(8708, "文件类型错误"),
OPER_EXTERNAL_APP_AUTH_ERROR(8709, "外部应用鉴权失败"),
OPER_EXTERNAL_APP_AUTH_ERROR(8709, "外部应用认证失败"),
// 党建声音 前端提示 88段
DRAFT_CONTENT_IS_NULL(8801, "至少需要添加一个段落"),

8
epmet-gateway/src/main/java/com/epmet/filter/CpAuthGatewayFilterFactory.java

@ -208,11 +208,19 @@ public class CpAuthGatewayFilterFactory extends AbstractGatewayFilterFactory<CpA
* @return
*/
private boolean needAuth(String requestUri) {
// 优先判断白名单,在白名单中的就直接放行
for (String url : cpProperty.getUrlWhiteList()) {
if (antPathMatcher.match(url, requestUri)) {
return false;
}
}
for (String url : cpProperty.getSwaggerUrls()) {
if (antPathMatcher.match(url, requestUri)) {
return false;
}
}
for (String url : cpProperty.getUrls()) {
if (antPathMatcher.match(url, requestUri)) {
return true;

5
epmet-gateway/src/main/java/com/epmet/filter/CpProperty.java

@ -19,6 +19,11 @@ public class CpProperty {
private List<String> urls;
/**
* 白名单
*/
private List<String> urlWhiteList;
/**
* 不处理token直接通过
*/

6
epmet-gateway/src/main/resources/bootstrap.yml

@ -427,6 +427,12 @@ epmet:
- /gov/issue/**
- /gov/project/**
- /resi/home/**
- /data/report/**
# url认证白名单,先判断白名单,在白名单中的url直接放行,不再判断上述需要认证的名单
urlWhiteList:
- /data/report/test/test
swaggerUrls:
jwt:

24
epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/MonthPieChartFormDTO.java

@ -0,0 +1,24 @@
package com.epmet.screen.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/8/19 3:10 下午
*/
@Data
public class MonthPieChartFormDTO implements Serializable {
private static final long serialVersionUID = -3163410637094615814L;
public interface MonthPieChart{}
/**
* 机关ID
*/
@NotBlank(message = "机关ID不能为空",groups = {MonthPieChart.class})
private String agencyId;
}

24
epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/YearAverageIndexFormDTO.java

@ -0,0 +1,24 @@
package com.epmet.screen.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/8/19 2:40 下午
*/
@Data
public class YearAverageIndexFormDTO implements Serializable {
private static final long serialVersionUID = -2389432085360116229L;
public interface YearAverageIndex{}
/**
* 机关Id
*/
@NotBlank(message = "机关ID不能为空",groups = {YearAverageIndex.class})
private String agencyId;
}

30
epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthPieChartResultDTO.java

@ -0,0 +1,30 @@
package com.epmet.screen.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/8/19 3:12 下午
*/
@Data
public class MonthPieChartResultDTO implements Serializable {
private static final long serialVersionUID = 8399158251970739021L;
/**
* 服务能力
*/
private Double serviceAbility = 0.0;
/**
* 党建能力
*/
private Double partyDevAbility = 0.0;
/**
* 治理能力
*/
private Double governAbility = 0.0;
}

35
epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/YearAverageIndexResultDTO.java

@ -0,0 +1,35 @@
package com.epmet.screen.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/8/19 2:45 下午
*/
@Data
public class YearAverageIndexResultDTO implements Serializable {
private static final long serialVersionUID = 6453379153616899440L;
/**
* 年度平均指数
*/
private Double yearAverageIndex = 0.0;
/**
* 服务能力
*/
private Double serviceAbility = 0.0;
/**
* 党建能力
*/
private Double partyDevAbility = 0.0;
/**
* 治理能力
*/
private Double governAbility = 0.0;
}

4
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/DistributionController.java

@ -72,7 +72,7 @@ public class DistributionController {
* @author zxc
* @date 2020/8/19 1:29 下午
*/
// @ExternalAppRequestAuth
@ExternalAppRequestAuth
@PostMapping("project")
public Result<List<ProjectResultDTO>> project(@RequestBody ProjectFormDTO projectFormDTO){
ValidatorUtils.validateEntity(projectFormDTO, ProjectFormDTO.Project.class);
@ -85,7 +85,7 @@ public class DistributionController {
* @author zxc
* @date 2020/8/19 1:52 下午
*/
// @ExternalAppRequestAuth
@ExternalAppRequestAuth
@PostMapping("topprofile")
public Result<TopProfileResultDTO> topProfile(@RequestBody TopProfileFormDTO topProfileFormDTO){
ValidatorUtils.validateEntity(topProfileFormDTO, TopProfileFormDTO.TopProfile.class);

42
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java

@ -1,5 +1,16 @@
package com.epmet.datareport.controller.screen;
import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.datareport.service.screen.IndexService;
import com.epmet.screen.dto.form.MonthPieChartFormDTO;
import com.epmet.screen.dto.form.YearAverageIndexFormDTO;
import com.epmet.screen.dto.result.MonthPieChartResultDTO;
import com.epmet.screen.dto.result.YearAverageIndexResultDTO;
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;
@ -12,4 +23,35 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/screen/index")
public class IndexController {
@Autowired
private IndexService indexService;
/**
* @Description 1年度平均指数
* @param yearAverageIndexFormDTO
* @author zxc
* @date 2020/8/19 2:53 下午
*/
@ExternalAppRequestAuth
@PostMapping("yearaverageindex")
public Result<YearAverageIndexResultDTO> yearAverageIndex(@RequestBody YearAverageIndexFormDTO yearAverageIndexFormDTO){
ValidatorUtils.validateEntity(yearAverageIndexFormDTO, YearAverageIndexFormDTO.YearAverageIndex.class);
return new Result<YearAverageIndexResultDTO>().ok(indexService.yearAverageIndex(yearAverageIndexFormDTO));
}
/**
* @Description 2月度指数分析-饼状图
* @param monthPieChartFormDTO
* @author zxc
* @date 2020/8/19 3:17 下午
*/
@ExternalAppRequestAuth
@PostMapping("monthindexanalysis/piechart")
public Result<MonthPieChartResultDTO> monthPieChart(@RequestBody MonthPieChartFormDTO monthPieChartFormDTO){
ValidatorUtils.validateEntity(monthPieChartFormDTO, MonthPieChartFormDTO.MonthPieChart.class);
return new Result<MonthPieChartResultDTO>().ok(indexService.monthPieChart(monthPieChartFormDTO));
}
}

12
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataDao.java → epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataMonthlyDao.java

@ -17,7 +17,9 @@
package com.epmet.datareport.dao.screen;
import com.epmet.screen.dto.result.MonthPieChartResultDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 指数-指数数据
@ -26,6 +28,14 @@ import org.apache.ibatis.annotations.Mapper;
* @since v1.0.0 2020-08-18
*/
@Mapper
public interface ScreenIndexDataDao{
public interface ScreenIndexDataMonthlyDao{
/**
* @Description 2月度指数分析-饼状图
* @param agencyId
* @author zxc
* @date 2020/8/19 3:43 下午
*/
MonthPieChartResultDTO selectMonthPieChart(@Param("agencyId")String agencyId);
}

41
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataYearlyDao.java

@ -0,0 +1,41 @@
/**
* 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.datareport.dao.screen;
import com.epmet.screen.dto.result.YearAverageIndexResultDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 指数-指数数据(按年统计)
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-08-19
*/
@Mapper
public interface ScreenIndexDataYearlyDao{
/**
* @Description 1年度平均指数
* @param agencyId
* @author zxc
* @date 2020/8/19 3:43 下午
*/
YearAverageIndexResultDTO selectYearAverageIndex(@Param("agencyId")String agencyId);
}

22
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/IndexService.java

@ -1,5 +1,10 @@
package com.epmet.datareport.service.screen;
import com.epmet.screen.dto.form.MonthPieChartFormDTO;
import com.epmet.screen.dto.form.YearAverageIndexFormDTO;
import com.epmet.screen.dto.result.MonthPieChartResultDTO;
import com.epmet.screen.dto.result.YearAverageIndexResultDTO;
/**
* 指数相关相关各指标查询
*
@ -7,4 +12,21 @@ package com.epmet.datareport.service.screen;
* @date 2020/8/18 10:21
*/
public interface IndexService {
/**
* @Description 1年度平均指数
* @param yearAverageIndexFormDTO
* @author zxc
* @date 2020/8/19 2:53 下午
*/
YearAverageIndexResultDTO yearAverageIndex(YearAverageIndexFormDTO yearAverageIndexFormDTO);
/**
* @Description 2月度指数分析-饼状图
* @param monthPieChartFormDTO
* @author zxc
* @date 2020/8/19 3:17 下午
*/
MonthPieChartResultDTO monthPieChart(MonthPieChartFormDTO monthPieChartFormDTO);
}

42
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/IndexServiceImpl.java

@ -1,6 +1,13 @@
package com.epmet.datareport.service.screen.impl;
import com.epmet.datareport.dao.screen.ScreenIndexDataMonthlyDao;
import com.epmet.datareport.dao.screen.ScreenIndexDataYearlyDao;
import com.epmet.datareport.service.screen.IndexService;
import com.epmet.screen.dto.form.MonthPieChartFormDTO;
import com.epmet.screen.dto.form.YearAverageIndexFormDTO;
import com.epmet.screen.dto.result.MonthPieChartResultDTO;
import com.epmet.screen.dto.result.YearAverageIndexResultDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
@ -11,4 +18,39 @@ import org.springframework.stereotype.Service;
*/
@Service
public class IndexServiceImpl implements IndexService {
@Autowired
private ScreenIndexDataYearlyDao screenIndexDataYearlyDao;
@Autowired
private ScreenIndexDataMonthlyDao screenIndexDataMonthlyDao;
/**
* @Description 1年度平均指数
* @param yearAverageIndexFormDTO
* @author zxc
* @date 2020/8/19 2:53 下午
*/
@Override
public YearAverageIndexResultDTO yearAverageIndex(YearAverageIndexFormDTO yearAverageIndexFormDTO) {
YearAverageIndexResultDTO yearAverageIndexResultDTO = screenIndexDataYearlyDao.selectYearAverageIndex(yearAverageIndexFormDTO.getAgencyId());
if (null == yearAverageIndexResultDTO){
return new YearAverageIndexResultDTO();
}
return yearAverageIndexResultDTO;
}
/**
* @Description 2月度指数分析-饼状图
* @param monthPieChartFormDTO
* @author zxc
* @date 2020/8/19 3:17 下午
*/
@Override
public MonthPieChartResultDTO monthPieChart(MonthPieChartFormDTO monthPieChartFormDTO) {
MonthPieChartResultDTO monthPieChartResultDTO = screenIndexDataMonthlyDao.selectMonthPieChart(monthPieChartFormDTO.getAgencyId());
if (null == monthPieChartFormDTO){
return new MonthPieChartResultDTO();
}
return monthPieChartResultDTO;
}
}

8
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataDao.xml

@ -1,8 +0,0 @@
<?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.screen.ScreenIndexDataDao">
</mapper>

20
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml

@ -0,0 +1,20 @@
<?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.screen.ScreenIndexDataMonthlyDao">
<!-- 2、月度指数分析-饼状图 -->
<select id="selectMonthPieChart" resultType="com.epmet.screen.dto.result.MonthPieChartResultDTO">
SELECT
service_ablity AS serviceAbility,
party_dev_ablity AS partyDevAbility,
govern_ablity AS governAbility
FROM
screen_index_data_monthly
WHERE
del_flag = '0'
AND org_type = 'agency'
AND org_id = #{agencyId}
AND month_id = DATE_FORMAT(NOW(),'%Y%m')
</select>
</mapper>

21
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.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.datareport.dao.screen.ScreenIndexDataYearlyDao">
<!-- 1、年度平均指数 -->
<select id="selectYearAverageIndex" resultType="com.epmet.screen.dto.result.YearAverageIndexResultDTO">
SELECT
index_total AS yearAverageIndex,
service_ablity AS serviceAbility,
party_dev_ablity AS partyDevAbility,
govern_ablity AS governAbility
FROM
screen_index_data_yearly
WHERE
del_flag = '0'
AND org_type = 'agency'
AND org_id = #{agencyId}
AND year_id = DATE_FORMAT(NOW(),'%Y')
</select>
</mapper>

5
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CpcBaseDataFormDTO.java

@ -14,11 +14,6 @@ public class CpcBaseDataFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 组织类别 agency组织部门department网格grid
*/

5
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerAgencyFormDTO.java

@ -14,11 +14,6 @@ public class CustomerAgencyFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 组织id
*/

5
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerDeptFormDTO.java

@ -14,11 +14,6 @@ public class CustomerDeptFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 部门id
*/

5
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerGridFormDTO.java

@ -14,11 +14,6 @@ public class CustomerGridFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 网格id
*/

10
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataFormDTO.java

@ -14,11 +14,6 @@ public class DifficultyDataFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 组织类别 agency组织部门department网格grid
*/
@ -88,4 +83,9 @@ public class DifficultyDataFormDTO implements Serializable {
* 事件状态描述
*/
private String eventStatusDesc;
/**
* 最近一次操作说明 eg: 转项目结案流转
*/
private String latestOperateDesc;
}

10
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/EventDataFormDTO.java

@ -17,11 +17,6 @@ public class EventDataFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 组织类别 agency组织部门department网格grid
*/
@ -116,4 +111,9 @@ public class EventDataFormDTO implements Serializable {
* 事件状态key
*/
private String eventStatusCode;
/**
* 最近一次操作说明 eg: 转项目结案流转
*/
private String latestOperateDesc;
}

5
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/GovernRankDataFormDTO.java

@ -15,11 +15,6 @@ public class GovernRankDataFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 年Id yyyy
*/

9
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataFormDTO.java → epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataMonthlyFormDTO.java

@ -5,20 +5,15 @@ import lombok.Data;
import java.io.Serializable;
/**
* 1指数相关 入参
* 1指数_按月统计 入参
* @Auther: zhangyong
* @Date: 2020-08-18 09:59
*/
@Data
public class IndexDataFormDTO implements Serializable {
public class IndexDataMonthlyFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* yyyy
*/

61
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataYearlyFormDTO.java

@ -0,0 +1,61 @@
package com.epmet.dto.screencoll.form;
import lombok.Data;
import java.io.Serializable;
/**
* 17指数_按年统计 入参
* @Auther: zhangyong
* @Date: 2020-08-18 09:59
*/
@Data
public class IndexDataYearlyFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* yyyy
*/
private String yearId;
/**
* 组织类别 agency组织部门department网格grid
*/
private String orgType;
/**
* 组织Id 可以为网格机关id
*/
private String orgId;
/**
* 上级组织Id
*/
private String parentId;
/**
* 组织名称
*/
private String orgName;
/**
* 总指数
*/
private Integer indexTotal;
/**
* 党建能力指数
*/
private Integer partyDevAblity;
/**
* 服务能力指数
*/
private Integer serviceAblity;
/**
* 治理能力指数
*/
private Integer governAblity;
}

5
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/OrgRankDataFormDTO.java

@ -15,11 +15,6 @@ public class OrgRankDataFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 年Id yyyy
*/

5
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyBranchDataFormDTO.java

@ -14,11 +14,6 @@ public class PartyBranchDataFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 年Id yyyy
*/

5
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyLinkMassesDataFormDTO.java

@ -14,11 +14,6 @@ public class PartyLinkMassesDataFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 组织类别 agency组织部门department网格grid
*/

5
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PioneerDataFormDTO.java

@ -14,11 +14,6 @@ public class PioneerDataFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 组织类别 agency组织部门department网格grid
*/

5
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserJoinFormDTO.java

@ -14,11 +14,6 @@ public class UserJoinFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 组织类别 agency组织部门department网格grid
*/

5
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserTotalDataFormDTO.java

@ -14,11 +14,6 @@ public class UserTotalDataFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 组织类别 agency组织部门department网格grid
*/

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/DataStatsApplication.java

@ -3,8 +3,12 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.scheduling.annotation.EnableAsync;
@EnableDiscoveryClient
@EnableFeignClients
@SpringBootApplication (exclude = {DataSourceAutoConfiguration.class})
@EnableAsync
public class DataStatsApplication {

123
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenCollController.java

@ -1,7 +1,5 @@
package com.epmet.controller;
import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth;
import com.epmet.commons.extappauth.bean.ExternalAppRequestParam;
import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth;
import com.epmet.commons.extappauth.bean.ExternalAppRequestParam;
import com.epmet.commons.tools.utils.Result;
@ -31,6 +29,7 @@ public class ScreenCollController {
/**
* 9党建引领|基层治理-居民党员积分排行榜
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
@ -39,191 +38,249 @@ public class ScreenCollController {
@ExternalAppRequestAuth
@PostMapping("partyuserrankdata")
public Result partyUserRankData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<PartyUserRankDataFormDTO> formDTO) {
screenCollService.insertPartyUserRankData(formDTO,externalAppRequestParam.getCustomerId());
screenCollService.insertPartyUserRankData(formDTO, externalAppRequestParam.getCustomerId());
return new Result();
}
/**
* 8党建引领-党员联系群众数据
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
@ExternalAppRequestAuth
@PostMapping("partylinkmassesdata")
public Result partyLinkMassesData(@RequestBody List<PartyLinkMassesDataFormDTO> formDTO) {
return screenCollService.insertPartyLinkMassesData(formDTO);
public Result partyLinkMassesData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<PartyLinkMassesDataFormDTO> formDTO) {
screenCollService.insertPartyLinkMassesData(formDTO, externalAppRequestParam.getCustomerId());
return new Result();
}
/**
* 7基层党建-建设情况数据支部联建志愿
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
@ExternalAppRequestAuth
@PostMapping("meetdata")
public Result meetData(@RequestBody List<PartyBranchDataFormDTO> formDTO) {
return screenCollService.insertPartyBranchData(formDTO);
public Result meetData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<PartyBranchDataFormDTO> formDTO) {
screenCollService.insertPartyBranchData(formDTO, externalAppRequestParam.getCustomerId());
return new Result();
}
/**
* 6党建引领-组织排行
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
@ExternalAppRequestAuth
@PostMapping("orgrankdata")
public Result orgRankData(@RequestBody List<OrgRankDataFormDTO> formDTO) {
return screenCollService.insertOrgRankData(formDTO);
public Result orgRankData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<OrgRankDataFormDTO> formDTO) {
screenCollService.insertOrgRankData(formDTO, externalAppRequestParam.getCustomerId());
return new Result();
}
/**
* 5基层治理-治理能力数据
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
@ExternalAppRequestAuth
@PostMapping("governrankdata")
public Result governRankData(@RequestBody List<GovernRankDataFormDTO> formDTO) {
return screenCollService.insertGovernRankData(formDTO);
public Result governRankData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<GovernRankDataFormDTO> formDTO) {
screenCollService.insertGovernRankData(formDTO, externalAppRequestParam.getCustomerId());
return new Result();
}
/**
* 4事件数据
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
@ExternalAppRequestAuth
@PostMapping("eventdata")
public Result eventData(@RequestBody List<EventDataFormDTO> formDTO) {
return screenCollService.insertEventData(formDTO);
public Result eventData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<EventDataFormDTO> formDTO) {
screenCollService.insertEventData(formDTO, externalAppRequestParam.getCustomerId());
return new Result();
}
/**
* 3难点赌点
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
@ExternalAppRequestAuth
@PostMapping("difficultydata")
public Result difficultyData(@RequestBody List<DifficultyDataFormDTO> formDTO) {
return screenCollService.insertDifficultyData(formDTO);
public Result difficultyData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<DifficultyDataFormDTO> formDTO) {
screenCollService.insertDifficultyData(formDTO, externalAppRequestParam.getCustomerId());
return new Result();
}
/**
* 2党员基本情况
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
@ExternalAppRequestAuth
@PostMapping("cpcbasedata")
public Result cpcbaseData(@RequestBody List<CpcBaseDataFormDTO> formDTO) {
return screenCollService.insertCpcbaseData(formDTO);
public Result cpcbaseData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<CpcBaseDataFormDTO> formDTO) {
screenCollService.insertCpcbaseData(formDTO, externalAppRequestParam.getCustomerId());
return new Result();
}
/**
* 1指数相关
* 1指数_按月统计
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
@PostMapping("indexdata")
public Result indexData(@RequestBody List<IndexDataFormDTO> formDTO) {
return screenCollService.insertIndexData(formDTO);
@ExternalAppRequestAuth
@PostMapping("indexdatamonthly")
public Result indexDataMonthly(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<IndexDataMonthlyFormDTO> formDTO) {
screenCollService.insertIndexDataMonthly(formDTO, externalAppRequestParam.getCustomerId());
return new Result();
}
// --
/**
* 17指数_按年统计
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
@ExternalAppRequestAuth
@PostMapping("indexdatayearly")
public Result indexDataYearly(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<IndexDataYearlyFormDTO> formDTO) {
screenCollService.insertIndexDataYearly(formDTO, externalAppRequestParam.getCustomerId());
return new Result();
}
/**
* 16部门信息上传
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
@ExternalAppRequestAuth
@PostMapping("customerdept")
public Result customerDept(@RequestBody List<CustomerDeptFormDTO> formDTO) {
return screenCollService.insertCustomerDept(formDTO);
public Result customerDept(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<CustomerDeptFormDTO> formDTO) {
screenCollService.insertCustomerDept(formDTO, externalAppRequestParam.getCustomerId());
return new Result();
}
/**
* 15网格信息上传
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
@ExternalAppRequestAuth
@PostMapping("customergrid")
public Result customerGrid(@RequestBody List<CustomerGridFormDTO> formDTO) {
return screenCollService.insertCustomerGrid(formDTO);
public Result customerGrid(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<CustomerGridFormDTO> formDTO) {
screenCollService.insertCustomerGrid(formDTO, externalAppRequestParam.getCustomerId());
return new Result();
}
/**
* 14组织层级
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
@ExternalAppRequestAuth
@PostMapping("customeragency")
public Result customerAgency(@RequestBody List<CustomerAgencyFormDTO> formDTO) {
return screenCollService.insertCustomerAgency(formDTO);
public Result customerAgency(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<CustomerAgencyFormDTO> formDTO) {
screenCollService.insertCustomerAgency(formDTO, externalAppRequestParam.getCustomerId());
return new Result();
}
/**
* 12中央区各类总数
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
@ExternalAppRequestAuth
@PostMapping("usertotaldata")
public Result userTotalData(@RequestBody List<UserTotalDataFormDTO> formDTO) {
return screenCollService.insertUserTotalData(formDTO);
public Result userTotalData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<UserTotalDataFormDTO> formDTO) {
screenCollService.insertUserTotalData(formDTO, externalAppRequestParam.getCustomerId());
return new Result();
}
/**
* 11基层治理-公众参与
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
@ExternalAppRequestAuth
@PostMapping("userjoin")
public Result userJoin(@RequestBody List<UserJoinFormDTO> formDTO) {
return screenCollService.insertUserJoin(formDTO);
public Result userJoin(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<UserJoinFormDTO> formDTO) {
screenCollService.insertUserJoin(formDTO, externalAppRequestParam.getCustomerId());
return new Result();
}
/**
* 10党建引领-先锋模范数据
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
@ExternalAppRequestAuth
@PostMapping("pioneerdata")
public Result pioneerData(@RequestBody List<PioneerDataFormDTO> formDTO) {
return screenCollService.insertPioneerData(formDTO);
public Result pioneerData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<PioneerDataFormDTO> formDTO) {
screenCollService.insertPioneerData(formDTO, externalAppRequestParam.getCustomerId());
return new Result();
}
}

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java

@ -51,8 +51,9 @@ public interface ScreenCpcBaseDataDao extends BaseDao<ScreenCpcBaseDataEntity> {
* 2) 在批量新增
*
* @param list
* @param customerId
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
void batchInsertCpcBaseData(@Param("list") List<CpcBaseDataFormDTO> list);
void batchInsertCpcBaseData(@Param("list") List<CpcBaseDataFormDTO> list, @Param("customerId")String customerId);
}

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java

@ -51,8 +51,9 @@ public interface ScreenCustomerAgencyDao extends BaseDao<ScreenCustomerAgencyEnt
* 2) 在批量新增
*
* @param list
* @param customerId
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
void batchInsertCustomerAgency(@Param("list") List<CustomerAgencyFormDTO> list);
void batchInsertCustomerAgency(@Param("list") List<CustomerAgencyFormDTO> list, @Param("customerId")String customerId);
}

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java

@ -51,8 +51,9 @@ public interface ScreenCustomerDeptDao extends BaseDao<ScreenCustomerDeptEntity>
* 2) 在批量新增
*
* @param list
* @param customerId
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
void batchInsertCustomerDept(@Param("list") List<CustomerDeptFormDTO> list);
void batchInsertCustomerDept(@Param("list") List<CustomerDeptFormDTO> list, @Param("customerId")String customerId);
}

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java

@ -50,8 +50,9 @@ public interface ScreenCustomerGridDao extends BaseDao<ScreenCustomerGridEntity>
* 2) 在批量新增
*
* @param list
* @param customerId
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
void batchInsertCustomerGrid(@Param("list") List<CustomerGridFormDTO> list);
void batchInsertCustomerGrid(@Param("list") List<CustomerGridFormDTO> list, @Param("customerId")String customerId);
}

16
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java

@ -36,23 +36,25 @@ public interface ScreenDifficultyDataDao extends BaseDao<ScreenDifficultyDataEnt
/**
* 3难点赌点
* 1) 根据CUSTOMER_IDEVENT_IDORG_ID进行查询如果有数据则先进行物理删除
* CUSTOMER_ID
* EVENT_ID
* ORG_ID
*
* @param list
* @param customerId
* @param eventId
* @param orgId
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
void deleteDifficultyData(DifficultyDataFormDTO list);
void deleteDifficultyData(@Param("customerId")String customerId,
@Param("eventId")String eventId,
@Param("orgId")String orgId);
/**
* 3难点赌点
* 2) 在批量新增
*
* @param list
* @param customerId
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
void batchInsertDifficultyData(@Param("list") List<DifficultyDataFormDTO> list);
void batchInsertDifficultyData(@Param("list") List<DifficultyDataFormDTO> list, @Param("customerId")String customerId);
}

14
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java

@ -36,23 +36,25 @@ public interface ScreenEventDataDao extends BaseDao<ScreenEventDataEntity> {
/**
* 4事件数据
* 1) 根据CUSTOMER_IDEVENT_IDORG_ID进行查询如果有数据则先进行物理删除
* CUSTOMER_ID
* EVENT_ID
* ORG_ID
*
* @param list
* @param customerId
* @param eventId
* @param orgId
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
void deleteEventData(EventDataFormDTO list);
void deleteEventData(@Param("customerId")String customerId,
@Param("eventId")String eventId,
@Param("orgId")String orgId);
/**
* 4事件数据
* 2) 在批量新增
*
* @param list
* @param customerId
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
void batchInsertEventData(@Param("list") List<EventDataFormDTO> list);
void batchInsertEventData(@Param("list") List<EventDataFormDTO> list, @Param("customerId")String customerId);
}

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java

@ -54,8 +54,9 @@ public interface ScreenGovernRankDataDao extends BaseDao<ScreenGovernRankDataEnt
* 2) 在批量新增
*
* @param list
* @param customerId
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
void batchInsertGovernRankData(@Param("list") List<GovernRankDataFormDTO> list);
void batchInsertGovernRankData(@Param("list") List<GovernRankDataFormDTO> list, @Param("customerId")String customerId);
}

11
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataDao.java → epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataMonthlyDao.java

@ -18,8 +18,8 @@
package com.epmet.dao.screen;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.screencoll.form.IndexDataFormDTO;
import com.epmet.entity.screen.ScreenIndexDataEntity;
import com.epmet.dto.screencoll.form.IndexDataMonthlyFormDTO;
import com.epmet.entity.screen.ScreenIndexDataMonthlyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -32,7 +32,7 @@ import java.util.List;
* @since v1.0.0 2020-08-18
*/
@Mapper
public interface ScreenIndexDataDao extends BaseDao<ScreenIndexDataEntity> {
public interface ScreenIndexDataMonthlyDao extends BaseDao<ScreenIndexDataMonthlyEntity> {
/**
*1指数相关
@ -45,7 +45,7 @@ public interface ScreenIndexDataDao extends BaseDao<ScreenIndexDataEntity> {
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
void deleteIndexData(@Param("customerId") String customerId,
void deleteIndexDataMonthly(@Param("customerId") String customerId,
@Param("yearId") String yearId,
@Param("monthId") String monthId,
@Param("orgIds") String[] orgIds);
@ -55,8 +55,9 @@ public interface ScreenIndexDataDao extends BaseDao<ScreenIndexDataEntity> {
* 2) 在批量新增
*
* @param list
* @param customerId
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
void batchInsertIndexData(@Param("list") List<IndexDataFormDTO> list);
void batchInsertIndexDataMonthly(@Param("list") List<IndexDataMonthlyFormDTO> list, @Param("customerId")String customerId);
}

61
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataYearlyDao.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.dao.screen;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.screencoll.form.IndexDataYearlyFormDTO;
import com.epmet.entity.screen.ScreenIndexDataYearlyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 指数-指数数据(按年统计)
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-08-19
*/
@Mapper
public interface ScreenIndexDataYearlyDao extends BaseDao<ScreenIndexDataYearlyEntity> {
/**
* 17指数_按年统计
* 1) 根据CUSTOMER_IDYEAR_IDORG_ID进行查询如果有数据则先进行物理删除
*
* @param customerId
* @param yearId
* @param orgIds 组织Id集合
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
void deleteIndexDataYearly(@Param("customerId") String customerId,
@Param("yearId") String yearId,
@Param("orgIds") String[] orgIds);
/**
* 17指数_按年统计
* 2) 在批量新增
*
* @param list
* @param customerId
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
void batchInsertIndexDataYearly(@Param("list") List<IndexDataYearlyFormDTO> list, @Param("customerId")String customerId);
}

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java

@ -54,8 +54,9 @@ public interface ScreenOrgRankDataDao extends BaseDao<ScreenOrgRankDataEntity> {
* 2) 在批量新增
*
* @param list
* @param customerId
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
void batchInsertOrgRankData(@Param("list") List<OrgRankDataFormDTO> list);
void batchInsertOrgRankData(@Param("list") List<OrgRankDataFormDTO> list, @Param("customerId")String customerId);
}

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java

@ -54,8 +54,9 @@ public interface ScreenPartyBranchDataDao extends BaseDao<ScreenPartyBranchDataE
* 2) 在批量新增
*
* @param list
* @param customerId
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
void batchInsertPartyBranchData(@Param("list") List<PartyBranchDataFormDTO> list);
void batchInsertPartyBranchData(@Param("list") List<PartyBranchDataFormDTO> list, @Param("customerId")String customerId);
}

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java

@ -51,8 +51,9 @@ public interface ScreenPartyLinkMassesDataDao extends BaseDao<ScreenPartyLinkMas
* 2) 在批量新增
*
* @param list
* @param customerId
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
void batchInsertPartyLinkMassesData(@Param("list") List<PartyLinkMassesDataFormDTO> list);
void batchInsertPartyLinkMassesData(@Param("list") List<PartyLinkMassesDataFormDTO> list, @Param("customerId")String customerId);
}

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java

@ -51,8 +51,9 @@ public interface ScreenPioneerDataDao extends BaseDao<ScreenPioneerDataEntity> {
* 2) 在批量新增
*
* @param list
* @param customerId
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
void batchInsertPioneerData(@Param("list") List<PioneerDataFormDTO> list);
void batchInsertPioneerData(@Param("list") List<PioneerDataFormDTO> list, @Param("customerId")String customerId);
}

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java

@ -55,8 +55,9 @@ public interface ScreenUserJoinDao extends BaseDao<ScreenUserJoinEntity> {
* 2) 在批量新增
*
* @param list
* @param customerId
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
void batchInsertUserJoin(@Param("list") List<UserJoinFormDTO> list);
void batchInsertUserJoin(@Param("list") List<UserJoinFormDTO> list, @Param("customerId")String customerId);
}

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java

@ -51,8 +51,9 @@ public interface ScreenUserTotalDataDao extends BaseDao<ScreenUserTotalDataEntit
* 2) 在批量新增
*
* @param list
* @param customerId
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
void batchInsertUserTotalData(@Param("list") List<UserTotalDataFormDTO> list);
void batchInsertUserTotalData(@Param("list") List<UserTotalDataFormDTO> list, @Param("customerId")String customerId);
}

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java

@ -113,4 +113,8 @@ public class ScreenDifficultyDataEntity extends BaseEpmetEntity {
*/
private String eventStatusDesc;
/**
* 最近一次操作说明
*/
private String latestOperateDesc;
}

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java

@ -133,4 +133,9 @@ public class ScreenEventDataEntity extends BaseEpmetEntity {
* 事件状态描述
*/
private String eventStatusDesc;
/**
* 最近一次操作说明
*/
private String latestOperateDesc;
}

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataEntity.java → epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataMonthlyEntity.java

@ -34,8 +34,8 @@ import java.util.Date;
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("screen_index_data")
public class ScreenIndexDataEntity extends BaseEpmetEntity {
@TableName("screen_index_data_monthly")
public class ScreenIndexDataMonthlyEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;

92
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataYearlyEntity.java

@ -0,0 +1,92 @@
/**
* 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.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 generator generator@elink-cn.com
* @since v1.0.0 2020-08-19
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("screen_index_data_yearly")
public class ScreenIndexDataYearlyEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户Id
*/
private String customerId;
/**
* 年Id: yyyy
*/
private String yearId;
/**
* 组织类别 agency组织部门department网格grid
*/
private String orgType;
/**
* 组织Id 可以为网格机关id
*/
private String orgId;
/**
* 上级组织Id
*/
private String parentId;
/**
* 组织名称
*/
private String orgName;
/**
* 总指数
*/
private BigDecimal indexTotal;
/**
* 党建能力指数
*/
private BigDecimal partyDevAblity;
/**
* 服务能力指数
*/
private BigDecimal serviceAblity;
/**
* 治理能力指数
*/
private BigDecimal governAblity;
}

67
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/ScreenCollService.java

@ -4,7 +4,12 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.screencoll.form.*;
import java.util.List;
/**
* 大屏数据采集api
*
* @author yinzuomei@elink-cn.com
* @date 2020/8/18 10:25
*/
public interface ScreenCollService {
/**
@ -13,11 +18,12 @@ public interface ScreenCollService {
* 2) 在新增
*
* @param formDTO
* @param customerId
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
void insertPartyUserRankData(List<PartyUserRankDataFormDTO> formDTO,String customerId);
void insertPartyUserRankData(List<PartyUserRankDataFormDTO> formDTO, String customerId);
/**
* 8党建引领-党员联系群众数据
@ -25,11 +31,12 @@ public interface ScreenCollService {
* 2) 在新增
*
* @param formDTO
* @param customerId
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
Result insertPartyLinkMassesData(List<PartyLinkMassesDataFormDTO> formDTO);
void insertPartyLinkMassesData(List<PartyLinkMassesDataFormDTO> formDTO, String customerId);
/**
* 7基层党建-建设情况数据支部联建志愿
@ -37,11 +44,12 @@ public interface ScreenCollService {
* 2) 在新增
*
* @param formDTO
* @param customerId
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
Result insertPartyBranchData(List<PartyBranchDataFormDTO> formDTO);
void insertPartyBranchData(List<PartyBranchDataFormDTO> formDTO, String customerId);
/**
* 6党建引领-组织排行
@ -49,11 +57,12 @@ public interface ScreenCollService {
* 2) 在新增
*
* @param formDTO
* @param customerId
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
Result insertOrgRankData(List<OrgRankDataFormDTO> formDTO);
void insertOrgRankData(List<OrgRankDataFormDTO> formDTO, String customerId);
/**
* 5基层治理-治理能力数据
@ -61,11 +70,12 @@ public interface ScreenCollService {
* 2) 在新增
*
* @param formDTO
* @param customerId
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
Result insertGovernRankData(List<GovernRankDataFormDTO> formDTO);
void insertGovernRankData(List<GovernRankDataFormDTO> formDTO, String customerId);
/**
* 4事件数据
@ -73,11 +83,12 @@ public interface ScreenCollService {
* 2) 在新增
*
* @param formDTO
* @param customerId
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
Result insertEventData(List<EventDataFormDTO> formDTO);
void insertEventData(List<EventDataFormDTO> formDTO, String customerId);
/**
* 3难点赌点
@ -85,11 +96,12 @@ public interface ScreenCollService {
* 2) 在新增
*
* @param formDTO
* @param customerId
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
Result insertDifficultyData(List<DifficultyDataFormDTO> formDTO);
void insertDifficultyData(List<DifficultyDataFormDTO> formDTO, String customerId);
/**
* 2党员基本情况
@ -97,23 +109,38 @@ public interface ScreenCollService {
* 2) 在新增
*
* @param formDTO
* @param customerId
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
Result insertCpcbaseData(List<CpcBaseDataFormDTO> formDTO);
void insertCpcbaseData(List<CpcBaseDataFormDTO> formDTO, String customerId);
/**
* 1指数相关
* 1指数_按月统计
* 1) 根据CUSTOMER_IDYEAR_IDMONTH_IDORG_ID进行查询如果有数据则先进行物理删除
* 2) 在新增
*
* @param formDTO
* @param customerId
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
void insertIndexDataMonthly(List<IndexDataMonthlyFormDTO> formDTO, String customerId);
/**
* 17指数_按年统计
* 1) 根据CUSTOMER_IDYEAR_IDORG_ID进行查询如果有数据则先进行物理删除
* 2) 在新增
*
* @param formDTO
* @param customerId
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
Result insertIndexData(List<IndexDataFormDTO> formDTO);
void insertIndexDataYearly(List<IndexDataYearlyFormDTO> formDTO, String customerId);
/**
* 16部门信息上传
@ -121,11 +148,12 @@ public interface ScreenCollService {
* 2) 在新增
*
* @param formDTO
* @param customerId
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
Result insertCustomerDept(List<CustomerDeptFormDTO> formDTO);
void insertCustomerDept(List<CustomerDeptFormDTO> formDTO, String customerId);
/**
* 15网格信息上传
@ -133,11 +161,12 @@ public interface ScreenCollService {
* 2) 在新增
*
* @param formDTO
* @param customerId
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
Result insertCustomerGrid(List<CustomerGridFormDTO> formDTO);
void insertCustomerGrid(List<CustomerGridFormDTO> formDTO, String customerId);
/**
* 14组织层级
@ -145,11 +174,12 @@ public interface ScreenCollService {
* 2) 在新增
*
* @param formDTO
* @param customerId
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
Result insertCustomerAgency(List<CustomerAgencyFormDTO> formDTO);
void insertCustomerAgency(List<CustomerAgencyFormDTO> formDTO, String customerId);
/**
* 12中央区各类总数
@ -157,11 +187,12 @@ public interface ScreenCollService {
* 2) 在新增
*
* @param formDTO
* @param customerId
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
Result insertUserTotalData(List<UserTotalDataFormDTO> formDTO);
void insertUserTotalData(List<UserTotalDataFormDTO> formDTO, String customerId);
/**
* 11基层治理-公众参与
@ -169,11 +200,12 @@ public interface ScreenCollService {
* 2) 在新增
*
* @param formDTO
* @param customerId
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
Result insertUserJoin(List<UserJoinFormDTO> formDTO);
void insertUserJoin(List<UserJoinFormDTO> formDTO, String customerId);
/**
* 10党建引领-先锋模范数据
@ -181,9 +213,10 @@ public interface ScreenCollService {
* 2) 在新增
*
* @param formDTO
* @param customerId
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
Result insertPioneerData(List<PioneerDataFormDTO> formDTO);
void insertPioneerData(List<PioneerDataFormDTO> formDTO, String customerId);
}

122
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/ScreenCollServiceImpl.java

@ -57,7 +57,7 @@ public class ScreenCollServiceImpl implements ScreenCollService {
@Autowired
private ScreenCpcBaseDataDao screenCpcBaseDataDao;
@Autowired
private ScreenIndexDataDao screenIndexDataDao;
private ScreenIndexDataMonthlyDao screenIndexDataMonthlyDao;
@Autowired
private ScreenCustomerDeptDao screenCustomerDeptDao;
@Autowired
@ -70,7 +70,8 @@ public class ScreenCollServiceImpl implements ScreenCollService {
private ScreenUserJoinDao screenUserJoinDao;
@Autowired
private ScreenPioneerDataDao screenPioneerDataDao;
@Autowired
private ScreenIndexDataYearlyDao screenIndexDataYearlyDao;
@Override
@Transactional(rollbackFor = Exception.class)
public void insertPartyUserRankData(List<PartyUserRankDataFormDTO> formDTO,String customerId) {
@ -90,81 +91,78 @@ public class ScreenCollServiceImpl implements ScreenCollService {
@Override
@Transactional(rollbackFor = Exception.class)
public Result insertPartyLinkMassesData(List<PartyLinkMassesDataFormDTO> formDTO) {
public void insertPartyLinkMassesData(List<PartyLinkMassesDataFormDTO> formDTO, String customerId) {
if (null != formDTO && formDTO.size() > NumConstant.ZERO){
String[] orgIds = new String[formDTO.size()];
for (int i = NumConstant.ZERO; i < formDTO.size(); i++){
orgIds[i] = formDTO.get(i).getOrgId();
}
screenPartyLinkMassesDataDao.deletePartyLinkMassesData(formDTO.get(NumConstant.ZERO).getCustomerId(), orgIds);
screenPartyLinkMassesDataDao.deletePartyLinkMassesData(customerId, orgIds);
screenPartyLinkMassesDataDao.batchInsertPartyLinkMassesData(formDTO);
screenPartyLinkMassesDataDao.batchInsertPartyLinkMassesData(formDTO, customerId);
}
return new Result();
}
@Override
public Result insertPartyBranchData(List<PartyBranchDataFormDTO> formDTO) {
@Transactional(rollbackFor = Exception.class)
public void insertPartyBranchData(List<PartyBranchDataFormDTO> formDTO, String customerId) {
if (null != formDTO && formDTO.size() > NumConstant.ZERO){
String[] orgIds = new String[formDTO.size()];
for (int i = NumConstant.ZERO; i < formDTO.size(); i++){
orgIds[i] = formDTO.get(i).getOrgId();
}
screenPartyBranchDataDao.deletePartyBranchData(formDTO.get(NumConstant.ZERO).getCustomerId(),
screenPartyBranchDataDao.deletePartyBranchData(customerId,
formDTO.get(NumConstant.ZERO).getYearId(),
formDTO.get(NumConstant.ZERO).getMonthId(),
orgIds);
screenPartyBranchDataDao.batchInsertPartyBranchData(formDTO);
screenPartyBranchDataDao.batchInsertPartyBranchData(formDTO, customerId);
}
return new Result();
}
@Override
@Transactional(rollbackFor = Exception.class)
public Result insertOrgRankData(List<OrgRankDataFormDTO> formDTO) {
public void insertOrgRankData(List<OrgRankDataFormDTO> formDTO, String customerId) {
if (null != formDTO && formDTO.size() > NumConstant.ZERO){
String[] orgIds = new String[formDTO.size()];
for (int i = NumConstant.ZERO; i < formDTO.size(); i++){
orgIds[i] = formDTO.get(i).getOrgId();
}
screenOrgRankDataDao.deleteOrgRankData(formDTO.get(NumConstant.ZERO).getCustomerId(),
screenOrgRankDataDao.deleteOrgRankData(customerId,
formDTO.get(NumConstant.ZERO).getYearId(),
formDTO.get(NumConstant.ZERO).getMonthId(),
orgIds);
screenOrgRankDataDao.batchInsertOrgRankData(formDTO);
screenOrgRankDataDao.batchInsertOrgRankData(formDTO, customerId);
}
return new Result();
}
@Override
@Transactional(rollbackFor = Exception.class)
public Result insertGovernRankData(List<GovernRankDataFormDTO> formDTO) {
public void insertGovernRankData(List<GovernRankDataFormDTO> formDTO, String customerId) {
if (null != formDTO && formDTO.size() > NumConstant.ZERO){
String[] orgIds = new String[formDTO.size()];
for (int i = NumConstant.ZERO; i < formDTO.size(); i++){
orgIds[i] = formDTO.get(i).getOrgId();
}
screenGovernRankDataDao.deleteGovernRankData(formDTO.get(NumConstant.ZERO).getCustomerId(),
screenGovernRankDataDao.deleteGovernRankData(customerId,
formDTO.get(NumConstant.ZERO).getYearId(),
formDTO.get(NumConstant.ZERO).getMonthId(),
orgIds);
screenGovernRankDataDao.batchInsertGovernRankData(formDTO);
screenGovernRankDataDao.batchInsertGovernRankData(formDTO, customerId);
}
return new Result();
}
@Override
@Transactional(rollbackFor = Exception.class)
public Result insertEventData(List<EventDataFormDTO> formDTO) {
public void insertEventData(List<EventDataFormDTO> formDTO, String customerId) {
if (null != formDTO && formDTO.size() > NumConstant.ZERO){
for (int i = NumConstant.ZERO; i < formDTO.size(); i++){
screenEventDataDao.deleteEventData(formDTO.get(i));
screenEventDataDao.deleteEventData(customerId, formDTO.get(i).getEventId(), formDTO.get(i).getOrgId());
}
screenEventDataDao.batchInsertEventData(formDTO);
screenEventDataDao.batchInsertEventData(formDTO, customerId);
for (int i = NumConstant.ZERO; i < formDTO.size(); i++) {
if (null != formDTO.get(i).getImgDataList() && formDTO.get(i).getImgDataList().size() > NumConstant.ZERO) {
@ -181,147 +179,151 @@ public class ScreenCollServiceImpl implements ScreenCollService {
}
}
}
return new Result();
}
@Override
@Transactional(rollbackFor = Exception.class)
public Result insertDifficultyData(List<DifficultyDataFormDTO> formDTO) {
public void insertDifficultyData(List<DifficultyDataFormDTO> formDTO, String customerId) {
if (null != formDTO && formDTO.size() > NumConstant.ZERO){
for (int i = NumConstant.ZERO; i < formDTO.size(); i++){
screenDifficultyDataDao.deleteDifficultyData(formDTO.get(i));
screenDifficultyDataDao.deleteDifficultyData(customerId, formDTO.get(i).getEventId(), formDTO.get(i).getOrgId());
}
screenDifficultyDataDao.batchInsertDifficultyData(formDTO);
screenDifficultyDataDao.batchInsertDifficultyData(formDTO, customerId);
}
return new Result();
}
@Override
@Transactional(rollbackFor = Exception.class)
public Result insertCpcbaseData(List<CpcBaseDataFormDTO> formDTO) {
public void insertCpcbaseData(List<CpcBaseDataFormDTO> formDTO, String customerId) {
if (null != formDTO && formDTO.size() > NumConstant.ZERO){
String[] orgIds = new String[formDTO.size()];
for (int i = NumConstant.ZERO; i < formDTO.size(); i++){
orgIds[i] = formDTO.get(i).getOrgId();
}
screenCpcBaseDataDao.deleteCpcBaseData(formDTO.get(NumConstant.ZERO).getCustomerId(), orgIds);
screenCpcBaseDataDao.deleteCpcBaseData(customerId, orgIds);
screenCpcBaseDataDao.batchInsertCpcBaseData(formDTO);
screenCpcBaseDataDao.batchInsertCpcBaseData(formDTO, customerId);
}
return new Result();
}
@Override
@Transactional(rollbackFor = Exception.class)
public Result insertIndexData(List<IndexDataFormDTO> formDTO) {
public void insertIndexDataMonthly(List<IndexDataMonthlyFormDTO> formDTO, String customerId) {
if (null != formDTO && formDTO.size() > NumConstant.ZERO){
String[] orgIds = new String[formDTO.size()];
for (int i = NumConstant.ZERO; i < formDTO.size(); i++){
orgIds[i] = formDTO.get(i).getOrgId();
}
screenIndexDataDao.deleteIndexData(formDTO.get(NumConstant.ZERO).getCustomerId(),
screenIndexDataMonthlyDao.deleteIndexDataMonthly(customerId,
formDTO.get(NumConstant.ZERO).getYearId(),
formDTO.get(NumConstant.ZERO).getMonthId(),
orgIds);
screenIndexDataDao.batchInsertIndexData(formDTO);
screenIndexDataMonthlyDao.batchInsertIndexDataMonthly(formDTO, customerId);
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public void insertIndexDataYearly(List<IndexDataYearlyFormDTO> formDTO, String customerId) {
if (null != formDTO && formDTO.size() > NumConstant.ZERO){
String[] orgIds = new String[formDTO.size()];
for (int i = NumConstant.ZERO; i < formDTO.size(); i++){
orgIds[i] = formDTO.get(i).getOrgId();
}
screenIndexDataYearlyDao.deleteIndexDataYearly(customerId,
formDTO.get(NumConstant.ZERO).getYearId(),
orgIds);
screenIndexDataYearlyDao.batchInsertIndexDataYearly(formDTO, customerId);
}
return new Result();
}
@Override
@Transactional(rollbackFor = Exception.class)
public Result insertCustomerDept(List<CustomerDeptFormDTO> formDTO) {
public void insertCustomerDept(List<CustomerDeptFormDTO> formDTO, String customerId) {
if (null != formDTO && formDTO.size() > NumConstant.ZERO){
String[] deptIds = new String[formDTO.size()];
for (int i = NumConstant.ZERO; i < formDTO.size(); i++){
deptIds[i] = formDTO.get(i).getDeptId();
}
screenCustomerDeptDao.deleteCustomerDept(formDTO.get(NumConstant.ZERO).getCustomerId(), deptIds);
screenCustomerDeptDao.deleteCustomerDept(customerId, deptIds);
screenCustomerDeptDao.batchInsertCustomerDept(formDTO);
screenCustomerDeptDao.batchInsertCustomerDept(formDTO, customerId);
}
return new Result();
}
@Override
@Transactional(rollbackFor = Exception.class)
public Result insertCustomerGrid(List<CustomerGridFormDTO> formDTO) {
public void insertCustomerGrid(List<CustomerGridFormDTO> formDTO, String customerId) {
if (null != formDTO && formDTO.size() > NumConstant.ZERO){
String[] gridIds = new String[formDTO.size()];
for (int i = NumConstant.ZERO; i < formDTO.size(); i++){
gridIds[i] = formDTO.get(i).getGridId();
}
screenCustomerGridDao.deleteCustomerGrid(formDTO.get(NumConstant.ZERO).getCustomerId(), gridIds);
screenCustomerGridDao.deleteCustomerGrid(customerId, gridIds);
screenCustomerGridDao.batchInsertCustomerGrid(formDTO);
screenCustomerGridDao.batchInsertCustomerGrid(formDTO, customerId);
}
return new Result();
}
@Override
@Transactional(rollbackFor = Exception.class)
public Result insertCustomerAgency(List<CustomerAgencyFormDTO> formDTO) {
public void insertCustomerAgency(List<CustomerAgencyFormDTO> formDTO, String customerId) {
if (null != formDTO && formDTO.size() > NumConstant.ZERO){
String[] agencyIds = new String[formDTO.size()];
for (int i = NumConstant.ZERO; i < formDTO.size(); i++){
agencyIds[i] = formDTO.get(i).getAgencyId();
}
screenCustomerAgencyDao.deleteCustomerAgency(formDTO.get(NumConstant.ZERO).getCustomerId(), agencyIds);
screenCustomerAgencyDao.deleteCustomerAgency(customerId, agencyIds);
screenCustomerAgencyDao.batchInsertCustomerAgency(formDTO);
screenCustomerAgencyDao.batchInsertCustomerAgency(formDTO, customerId);
}
return new Result();
}
@Override
@Transactional(rollbackFor = Exception.class)
public Result insertUserTotalData(List<UserTotalDataFormDTO> formDTO) {
public void insertUserTotalData(List<UserTotalDataFormDTO> formDTO, String customerId) {
if (null != formDTO && formDTO.size() > NumConstant.ZERO){
String[] orgIds = new String[formDTO.size()];
for (int i = NumConstant.ZERO; i < formDTO.size(); i++){
orgIds[i] = formDTO.get(i).getOrgId();
}
screenUserTotalDataDao.deleteUserTotalData(formDTO.get(NumConstant.ZERO).getCustomerId(),
orgIds);
screenUserTotalDataDao.deleteUserTotalData(customerId, orgIds);
screenUserTotalDataDao.batchInsertUserTotalData(formDTO);
screenUserTotalDataDao.batchInsertUserTotalData(formDTO, customerId);
}
return new Result();
}
@Override
@Transactional(rollbackFor = Exception.class)
public Result insertUserJoin(List<UserJoinFormDTO> formDTO) {
public void insertUserJoin(List<UserJoinFormDTO> formDTO, String customerId) {
if (null != formDTO && formDTO.size() > NumConstant.ZERO){
String[] orgIds = new String[formDTO.size()];
for (int i = NumConstant.ZERO; i < formDTO.size(); i++){
orgIds[i] = formDTO.get(i).getOrgId();
}
screenUserJoinDao.deleteUserJoin(formDTO.get(NumConstant.ZERO).getCustomerId(),
screenUserJoinDao.deleteUserJoin(customerId,
formDTO.get(NumConstant.ZERO).getYearId(),
formDTO.get(NumConstant.ZERO).getMonthId(),
orgIds);
screenUserJoinDao.batchInsertUserJoin(formDTO);
screenUserJoinDao.batchInsertUserJoin(formDTO, customerId);
}
return new Result();
}
@Override
@Transactional(rollbackFor = Exception.class)
public Result insertPioneerData(List<PioneerDataFormDTO> formDTO) {
public void insertPioneerData(List<PioneerDataFormDTO> formDTO, String customerId) {
if (null != formDTO && formDTO.size() > NumConstant.ZERO){
String[] orgIds = new String[formDTO.size()];
for (int i = NumConstant.ZERO; i < formDTO.size(); i++){
orgIds[i] = formDTO.get(i).getOrgId();
}
screenPioneerDataDao.deletePioneerData(formDTO.get(NumConstant.ZERO).getCustomerId(),
orgIds);
screenPioneerDataDao.deletePioneerData(customerId, orgIds);
screenPioneerDataDao.batchInsertPioneerData(formDTO);
screenPioneerDataDao.batchInsertPioneerData(formDTO, customerId);
}
return new Result();
}
}

4
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml

@ -12,7 +12,7 @@
</foreach>
</delete>
<insert id="batchInsertCpcBaseData" parameterType="java.util.List">
<insert id="batchInsertCpcBaseData" parameterType="map">
insert into screen_cpc_base_data
(
ID,
@ -40,7 +40,7 @@
<foreach collection="list" item="item" index="index" separator=",">
(
(SELECT REPLACE(UUID(), '-', '') AS id),
#{item.customerId},
#{customerId},
#{item.orgType},
#{item.orgId},
#{item.parentId},

4
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml

@ -12,7 +12,7 @@
</foreach>
</delete>
<insert id="batchInsertCustomerAgency" parameterType="java.util.List">
<insert id="batchInsertCustomerAgency" parameterType="map">
insert into screen_customer_agency
(
ID,
@ -37,7 +37,7 @@
<foreach collection="list" item="item" index="index" separator=",">
(
(SELECT REPLACE(UUID(), '-', '') AS id),
#{item.customerId},
#{customerId},
#{item.agencyId},
#{item.agencyName},
#{item.pid},

4
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerDeptDao.xml

@ -12,7 +12,7 @@
</foreach>
</delete>
<insert id="batchInsertCustomerDept" parameterType="java.util.List">
<insert id="batchInsertCustomerDept" parameterType="map">
insert into screen_customer_dept
(
ID,
@ -33,7 +33,7 @@
<foreach collection="list" item="item" index="index" separator=",">
(
(SELECT REPLACE(UUID(), '-', '') AS id),
#{item.customerId},
#{customerId},
#{item.deptId},
#{item.deptName},
#{item.parentAgencyId},

4
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml

@ -12,7 +12,7 @@
</foreach>
</delete>
<insert id="batchInsertCustomerGrid" parameterType="java.util.List">
<insert id="batchInsertCustomerGrid" parameterType="map">
insert into screen_customer_grid
(
ID,
@ -33,7 +33,7 @@
<foreach collection="list" item="item" index="index" separator=",">
(
(SELECT REPLACE(UUID(), '-', '') AS id),
#{item.customerId},
#{customerId},
#{item.gridId},
#{item.gridName},
#{item.parentAgencyId},

10
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml

@ -8,7 +8,7 @@
where CUSTOMER_ID = #{customerId} AND EVENT_ID = #{eventId} AND ORG_ID = #{orgId}
</delete>
<insert id="batchInsertDifficultyData" parameterType="java.util.List">
<insert id="batchInsertDifficultyData" parameterType="map">
insert into screen_difficulty_data
(
ID,
@ -32,12 +32,13 @@
CREATED_BY,
CREATED_TIME,
UPDATED_BY,
UPDATED_TIME
UPDATED_TIME,
LATEST_OPERATE_DESC
) values
<foreach collection="list" item="item" index="index" separator=",">
(
(SELECT REPLACE(UUID(), '-', '') AS id),
#{item.customerId},
#{customerId},
#{item.orgType},
#{item.orgId},
#{item.parentId},
@ -57,7 +58,8 @@
'APP_USER',
now(),
'APP_USER',
now()
now(),
#{item.latestOperateDesc}
)
</foreach>
</insert>

10
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml

@ -8,7 +8,7 @@
where CUSTOMER_ID = #{customerId} AND EVENT_ID = #{eventId} AND ORG_ID = #{orgId}
</delete>
<insert id="batchInsertEventData" parameterType="java.util.List">
<insert id="batchInsertEventData" parameterType="map">
insert into screen_event_data
(
ID,
@ -36,12 +36,13 @@
UPDATED_BY,
UPDATED_TIME,
EVENT_STATUS_CODE,
EVENT_STATUS_DESC
EVENT_STATUS_DESC,
LATEST_OPERATE_DESC
) values
<foreach collection="list" item="item" index="index" separator=",">
(
(SELECT REPLACE(UUID(), '-', '') AS id),
#{item.customerId},
#{customerId},
#{item.orgType},
#{item.orgId},
#{item.parentId},
@ -65,7 +66,8 @@
'APP_USER',
now(),
#{item.eventStatusCode},
#{item.eventStatusDesc}
#{item.eventStatusDesc},
#{item.latestOperateDesc}
)
</foreach>
</insert>

4
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml

@ -12,7 +12,7 @@
</foreach>
</delete>
<insert id="batchInsertGovernRankData" parameterType="java.util.List">
<insert id="batchInsertGovernRankData" parameterType="map">
insert into screen_govern_rank_data
(
ID,
@ -39,7 +39,7 @@
<foreach collection="list" item="item" index="index" separator=",">
(
(SELECT REPLACE(UUID(), '-', '') AS id),
#{item.customerId},
#{customerId},
#{item.yearId},
#{item.monthId},
#{item.orgType},

12
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataDao.xml → epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml

@ -1,10 +1,10 @@
<?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.screen.ScreenIndexDataDao">
<mapper namespace="com.epmet.dao.screen.ScreenIndexDataMonthlyDao">
<delete id="deleteIndexData">
delete from screen_index_data
<delete id="deleteIndexDataMonthly">
delete from screen_index_data_monthly
where CUSTOMER_ID = #{customerId} AND YEAR_ID = #{yearId} AND MONTH_ID = #{monthId}
AND ORG_ID IN
<foreach item="item" collection="orgIds" open="(" separator="," close=")">
@ -12,8 +12,8 @@
</foreach>
</delete>
<insert id="batchInsertIndexData" parameterType="java.util.List">
insert into screen_index_data
<insert id="batchInsertIndexDataMonthly" parameterType="map">
insert into screen_index_data_monthly
(
ID,
CUSTOMER_ID,
@ -37,7 +37,7 @@
<foreach collection="list" item="item" index="index" separator=",">
(
(SELECT REPLACE(UUID(), '-', '') AS id),
#{item.customerId},
#{customerId},
#{item.yearId},
#{item.monthId},
#{item.orgType},

60
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml

@ -0,0 +1,60 @@
<?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.screen.ScreenIndexDataYearlyDao">
<delete id="deleteIndexDataYearly">
delete from screen_index_data_yearly
where CUSTOMER_ID = #{customerId} AND YEAR_ID = #{yearId}
AND ORG_ID IN
<foreach item="item" collection="orgIds" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<insert id="batchInsertIndexDataYearly" parameterType="map">
insert into screen_index_data_yearly
(
ID,
CUSTOMER_ID,
YEAR_ID,
ORG_TYPE,
ORG_ID,
PARENT_ID,
ORG_NAME,
INDEX_TOTAL,
PARTY_DEV_ABLITY,
SERVICE_ABLITY,
GOVERN_ABLITY,
DEL_FLAG,
REVISION,
CREATED_BY,
CREATED_TIME,
UPDATED_BY,
UPDATED_TIME
) values
<foreach collection="list" item="item" index="index" separator=",">
(
(SELECT REPLACE(UUID(), '-', '') AS id),
#{customerId},
#{item.yearId},
#{item.orgType},
#{item.orgId},
#{item.parentId},
#{item.orgName},
#{item.indexTotal},
#{item.partyDevAblity},
#{item.serviceAblity},
#{item.governAblity},
0,
0,
'APP_USER',
now(),
'APP_USER',
now()
)
</foreach>
</insert>
</mapper>

4
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml

@ -12,7 +12,7 @@
</foreach>
</delete>
<insert id="batchInsertOrgRankData" parameterType="java.util.List">
<insert id="batchInsertOrgRankData" parameterType="map">
insert into screen_org_rank_data
(
ID,
@ -40,7 +40,7 @@
<foreach collection="list" item="item" index="index" separator=",">
(
(SELECT REPLACE(UUID(), '-', '') AS id),
#{item.customerId},
#{customerId},
#{item.yearId},
#{item.monthId},
#{item.orgType},

4
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml

@ -12,7 +12,7 @@
</foreach>
</delete>
<insert id="batchInsertPartyBranchData" parameterType="java.util.List">
<insert id="batchInsertPartyBranchData" parameterType="map">
insert into screen_party_branch_data
(
ID,
@ -39,7 +39,7 @@
<foreach collection="list" item="item" index="index" separator=",">
(
(SELECT REPLACE(UUID(), '-', '') AS id),
#{item.customerId},
#{customerId},
#{item.yearId},
#{item.monthId},
#{item.type},

4
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml

@ -12,7 +12,7 @@
</foreach>
</delete>
<insert id="batchInsertPartyLinkMassesData" parameterType="java.util.List">
<insert id="batchInsertPartyLinkMassesData" parameterType="map">
insert into screen_party_link_masses_data
(
ID,
@ -33,7 +33,7 @@
<foreach collection="list" item="item" index="index" separator=",">
(
(SELECT REPLACE(UUID(), '-', '') AS id),
#{item.customerId},
#{customerId},
#{item.orgType},
#{item.orgId},
#{item.parentId},

4
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml

@ -12,7 +12,7 @@
</foreach>
</delete>
<insert id="batchInsertPioneerData" parameterType="java.util.List">
<insert id="batchInsertPioneerData" parameterType="map">
insert into screen_pioneer_data
(
ID,
@ -36,7 +36,7 @@
<foreach collection="list" item="item" index="index" separator=",">
(
(SELECT REPLACE(UUID(), '-', '') AS id),
#{item.customerId},
#{customerId},
#{item.orgType},
#{item.orgId},
#{item.parentId},

4
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml

@ -12,7 +12,7 @@
</foreach>
</delete>
<insert id="batchInsertUserJoin" parameterType="java.util.List">
<insert id="batchInsertUserJoin" parameterType="map">
insert into screen_user_join
(
ID,
@ -36,7 +36,7 @@
<foreach collection="list" item="item" index="index" separator=",">
(
(SELECT REPLACE(UUID(), '-', '') AS id),
#{item.customerId},
#{customerId},
#{item.yearId},
#{item.monthId},
#{item.orgType},

4
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml

@ -12,7 +12,7 @@
</foreach>
</delete>
<insert id="batchInsertUserTotalData" parameterType="java.util.List">
<insert id="batchInsertUserTotalData" parameterType="map">
insert into screen_user_total_data
(
ID,
@ -37,7 +37,7 @@
<foreach collection="list" item="item" index="index" separator=",">
(
(SELECT REPLACE(UUID(), '-', '') AS id),
#{item.customerId},
#{customerId},
#{item.orgType},
#{item.orgId},
#{item.parentId},

15
epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/form/ExternalCustomerFormDTO.java

@ -0,0 +1,15 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.Min;
@Data
public class ExternalCustomerFormDTO {
@Min(0)
private Integer pageNo;
@Min(0)
private Integer pageSize;
}

46
epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/result/ExternalCustomerResultDTO.java

@ -0,0 +1,46 @@
/**
* 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.result;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
*
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-08-19
*/
@Data
public class ExternalCustomerResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String id;
/**
* 客户名称
*/
private String customerName;
}

5
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/ExternalAppController.java

@ -23,6 +23,11 @@ public class ExternalAppController {
@Autowired
private ExternalAppAuthService externalAppAuthService;
/**
* 外部请求认证
* @param formDTO
* @return
*/
@PostMapping("/auth")
public Result<ExternalAppAuthResultDTO> auth(@RequestBody ExternalAppAuthFormDTO formDTO) {
String appId = formDTO.getAppId();

47
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/ExternalCustomerController.java

@ -0,0 +1,47 @@
package com.epmet.controller;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.ExternalAppAuthFormDTO;
import com.epmet.dto.form.ExternalCustomerFormDTO;
import com.epmet.dto.result.ExternalAppAuthResultDTO;
import com.epmet.service.ExternalAppAuthService;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
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 javax.validation.constraints.Min;
/**
* 外部客户管理
*/
@RestController
@RequestMapping("/externalcustomer")
public class ExternalCustomerController {
private static Logger logger = LoggerFactory.getLogger(ExternalCustomerController.class);
@Autowired
private ExternalAppAuthService externalAppAuthService;
/**
* 外部客户管理
* @return
*/
@PostMapping("/list")
public Result<ExternalAppAuthResultDTO> list(@RequestBody ExternalCustomerFormDTO form) {
ValidatorUtils.validateEntity(form);
Integer pageNo = form.getPageNo();
Integer pageSize = form.getPageSize();
return null;
}
}

41
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/ExternalCustomerDao.java

@ -0,0 +1,41 @@
/**
* 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;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.result.ExternalCustomerResultDTO;
import com.epmet.entity.ExternalCustomerEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
*
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-08-19
*/
@Mapper
public interface ExternalCustomerDao extends BaseDao<ExternalCustomerEntity> {
/**
* 列出客户基本信息
* @return
*/
List<ExternalCustomerResultDTO> listBaseInfo();
}

46
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/entity/ExternalCustomerEntity.java

@ -0,0 +1,46 @@
/**
* 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;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
*
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-08-19
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("external_customer")
public class ExternalCustomerEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户名称
*/
private String customerName;
}

11
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/ExternalCustomerService.java

@ -0,0 +1,11 @@
package com.epmet.service;
import com.epmet.dto.result.ExternalCustomerResultDTO;
import java.util.List;
public interface ExternalCustomerService {
public List<ExternalCustomerResultDTO> list(Integer pageNo, Integer pageSize);
}

24
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ExternalAppAuthServiceImpl.java

@ -29,6 +29,8 @@ public class ExternalAppAuthServiceImpl implements ExternalAppAuthService {
@Autowired
private ExternalAppSecretDao externalAppSecretDao;
private int diffMillins = 1000 * 60 * 5;
@Override
public ExternalAppAuthResultDTO auth(String appId, String token) {
String secret;
@ -47,6 +49,19 @@ public class ExternalAppAuthServiceImpl implements ExternalAppAuthService {
String appIdIn = (String)claim.get("appId");
String customerId = (String)claim.get("customerId");
Long timestamp = (Long)claim.get("ts");
//校验时间戳,允许5分钟误差
if (StringUtils.isAnyBlank(appIdIn, customerId) || timestamp == null) {
logger.error("access token不完整。{},{},{}", appIdIn, customerId, timestamp);
return fillAuthResult(false, "access token不完整。", null);
}
// TODO
// if (!validTimeStamp(timestamp)) {
// logger.error("服务器存在时差过大,请求被拒绝", appId, appIdIn);
// return fillAuthResult(false, "服务器存在时差过大,请求被拒绝", null);
// }
if (!appId.equals(appIdIn)) {
logger.error("AppId不对应,token外部的:{}, token内部解析出来的:{}", appId, appIdIn);
@ -55,6 +70,15 @@ public class ExternalAppAuthServiceImpl implements ExternalAppAuthService {
return fillAuthResult(true, "解析成功", customerId);
}
private boolean validTimeStamp(Long timestamp) {
long now = System.currentTimeMillis();
// System.out.println(new Date(timestamp));
if (Math.abs(now - timestamp) > diffMillins) {
return false;
}
return true;
}
/**
* 通过APP ID查询对应的秘钥
* @param appId

26
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ExternalCustomerServiceImpl.java

@ -0,0 +1,26 @@
package com.epmet.service.impl;
import com.epmet.dao.ExternalCustomerDao;
import com.epmet.dto.result.ExternalCustomerResultDTO;
import com.epmet.service.ExternalCustomerService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class ExternalCustomerServiceImpl implements ExternalCustomerService {
@Autowired
private ExternalCustomerDao externalCustomerDao;
@Override
public List<ExternalCustomerResultDTO> list(Integer pageNo, Integer pageSize) {
PageHelper.startPage(pageNo, pageSize);
List<ExternalCustomerResultDTO> customers = externalCustomerDao.listBaseInfo();
PageInfo<ExternalCustomerResultDTO> pageInfo = new PageInfo<>(customers);
return null;
}
}

5
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java

@ -75,8 +75,9 @@ public class ExtAppJwtTokenUtils {
public static void genToken() {
HashMap<String, Object> claim = new HashMap<>();
claim.put("appId", "1");
// claim.put("customerId", "c1");
claim.put("appId", "dbfad3110c124c89948d16e8b06a8888");
claim.put("customerId", "c1");
claim.put("ts", System.currentTimeMillis() - 1000 * 60 * 4);
String abc = new ExtAppJwtTokenUtils().createToken(claim, "4a762660254c57996343f8ee42fbc0a6");
System.out.println(abc);

29
epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/ExternalCustomerDao.xml

@ -0,0 +1,29 @@
<?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.ExternalCustomerDao">
<resultMap type="com.epmet.entity.ExternalCustomerEntity" id="externalCustomerMap">
<result property="id" column="ID"/>
<result property="customerName" column="CUSTOMER_NAME"/>
<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>
<!-- 列出客户基本信息-->
<select id="listBaseInfo" resultType="com.epmet.dto.result.ExternalCustomerResultDTO">
SELECT
id,
CUSTOMER_NAME
FROM
external_customer
WHERE
DEL_FLAG = 0
</select>
</mapper>
Loading…
Cancel
Save