Browse Source

Merge branches 'dev' and 'dev_jcet' of http://git.elinkit.com.cn:7070/r/epmet-cloud into dev_jcet

feature/evaluate
wxz 5 years ago
parent
commit
b3b373bb11
  1. 5
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java
  2. 26
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/AgencyNode.java
  3. 73
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/AgencyTreeUtils.java
  4. 34
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java
  5. 161
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/SendMqMsgUtils.java
  6. 23
      epmet-gateway/src/main/java/com/epmet/auth/InternalAuthProcessor.java
  7. 2
      epmet-gateway/src/main/resources/bootstrap.yml
  8. 16
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govissue/result/IssueInfoDTO.java
  9. 4
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/CustomerAgencyDTO.java
  10. 19
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/form/ProjectDistributionFormDTO.java
  11. 25
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/ProjectDistributionResultDTO.java
  12. 7
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/resigroup/ResiTopicDTO.java
  13. 25
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovProjectController.java
  14. 7
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govissue/IssueDao.java
  15. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govproject/ProjectDao.java
  16. 7
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/resigroup/ResiTopicDao.java
  17. 4
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/govorg/CustomerAgencyEntity.java
  18. 7
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/GovIssueService.java
  19. 5
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/impl/GovIssueServiceImpl.java
  20. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/GovProjectService.java
  21. 39
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java
  22. 6
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/ResiGroupService.java
  23. 12
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/impl/ResiGroupServiceImpl.java
  24. 17
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueDao.xml
  25. 18
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govproject/ProjectDao.xml
  26. 21
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/resigroup/ResiTopicDao.xml
  27. 59
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenProjectQuantityOrgMonthlyDTO.java
  28. 20
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/screen/EfficiencyAnalysisFormDTO.java
  29. 28
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/screen/QueryQuantityMonthlyFormDTO.java
  30. 24
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/screen/ScreenCommonFormDTO.java
  31. 49
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/ScreenCustomerAgencyDTO.java
  32. 18
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/commonservice/AddAreaCodeDictResultDTO.java
  33. 50
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/AgencyNodeDTO.java
  34. 15
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/BidInfoResultDTO.java
  35. 19
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/ContractResultDTO.java
  36. 36
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/DeptNodeDTO.java
  37. 36
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/GridNodeDTO.java
  38. 18
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/OneListResultDTO.java
  39. 40
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/EfficiencyAnalysisResultDTO.java
  40. 40
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/ProjectQuantityResultDTO.java
  41. 27
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/QueryQuantityMonthlyResultDTO.java
  42. 17
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/constant/ScreenConstant.java
  43. 5
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/MonthBarchartFormDTO.java
  44. 5
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/MonthPieChartFormDTO.java
  45. 5
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/SubAgencyIndexRankFormDTO.java
  46. 5
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/SubAgencyIndexRankYMFormDTO.java
  47. 5
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/YearAverageIndexFormDTO.java
  48. 27
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/feign/DataReportOpenFeignClient.java
  49. 21
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/feign/impl/DataReportOpenFeignClientFallBack.java
  50. 127
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/ScreenCustomerWorkRecordDictDTO.java
  51. 117
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/ScreenWorkRecordOrgDailyDTO.java
  52. 117
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/ScreenWorkRecordOrgMonthlyDTO.java
  53. 38
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/form/WorkRecordRankFormDTO.java
  54. 32
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordRankResultDTO.java
  55. 34
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordSubRank.java
  56. 65
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/plugins/OfsController.java
  57. 40
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/plugins/WorkRecordController.java
  58. 57
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java
  59. 31
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java
  60. 26
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java
  61. 38
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java
  62. 43
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectGridDailyDao.java
  63. 48
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectOrgDailyDao.java
  64. 32
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectQuantityGridMonthlyDao.java
  65. 44
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyDao.java
  66. 36
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenBidInfoDao.java
  67. 35
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenContractInfoDao.java
  68. 33
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenCustomerWorkRecordDictDao.java
  69. 35
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenListInfoDao.java
  70. 57
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java
  71. 33
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgMonthlyDao.java
  72. 93
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/plugins/ScreenCustomerWorkRecordDictEntity.java
  73. 83
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/plugins/ScreenWorkRecordOrgDailyEntity.java
  74. 83
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/plugins/ScreenWorkRecordOrgMonthlyEntity.java
  75. 14
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java
  76. 38
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectGridDailyService.java
  77. 47
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectOrgDailyService.java
  78. 28
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectQuantityGridMonthlyService.java
  79. 37
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyService.java
  80. 49
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java
  81. 7
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java
  82. 53
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectGridDailyServiceImpl.java
  83. 101
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectOrgDailyServiceImpl.java
  84. 36
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java
  85. 97
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java
  86. 34
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/OfsService.java
  87. 95
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/ScreenCustomerWorkRecordDictService.java
  88. 99
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/ScreenWorkRecordOrgDailyService.java
  89. 94
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/ScreenWorkRecordOrgMonthlyService.java
  90. 59
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/OfsServiceImpl.java
  91. 101
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenCustomerWorkRecordDictServiceImpl.java
  92. 131
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java
  93. 101
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.java
  94. 16
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java
  95. 18
      epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenBidInfoDao.xml
  96. 18
      epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenContractInfoDao.xml
  97. 28
      epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenCustomerWorkRecordDictDao.xml
  98. 17
      epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenListInfoDao.xml
  99. 53
      epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml
  100. 8
      epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml

5
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java

@ -119,6 +119,11 @@ public interface ServiceConstant {
*/
String DATA_STATISTICAL_SERVER = "data-statistical-server";
/**
* 数据统计结果查询
*/
String DATA_REPORT_SERVER="data-report-server";
/**
* 微信第三方平台
*/

26
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/AgencyNode.java

@ -0,0 +1,26 @@
package com.epmet.commons.tools.utils;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* 描述一下
*
* @author yinzuomei@elink-cn.com
* @date 2021/2/4 20:49
*/
@Data
public class AgencyNode<T> implements Serializable {
private String areaCode;
private String parentAreaCode;
/**
* 子节点列表
*/
private List<T> subAgencyList = new ArrayList<>();
}

73
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/AgencyTreeUtils.java

@ -0,0 +1,73 @@
package com.epmet.commons.tools.utils;
import com.epmet.commons.tools.validator.AssertUtils;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
/**
* 描述一下
*
* @author yinzuomei@elink-cn.com
* @date 2021/2/4 20:49
*/
public class AgencyTreeUtils {
/**
* 根据pid构建树节点
*/
public static <T extends AgencyNode> List<T> build(List<T> agencyNodes, String parentAreaCode) {
//pid不能为空
AssertUtils.isNull(parentAreaCode, "parentAreaCode");
List<T> treeList = new ArrayList<>();
for (T agencyNode : agencyNodes) {
if (parentAreaCode.equals(agencyNode.getParentAreaCode())) {
treeList.add(findChildren(agencyNodes, agencyNode));
}
}
return treeList;
}
/**
* 查找子节点
*/
private static <T extends AgencyNode> T findChildren(List<T> agencyNodes, T rootNode) {
for (T agencyNode : agencyNodes) {
if (rootNode.getAreaCode().equals(agencyNode.getParentAreaCode())) {
rootNode.getSubAgencyList().add(findChildren(agencyNodes, agencyNode));
}
}
return rootNode;
}
/**
* 构建树节点
*/
public static <T extends AgencyNode> List<T> build(List<T> agencyNodes) {
List<T> result = new ArrayList<>();
//list转map
Map<String, T> nodeMap = new LinkedHashMap<>(agencyNodes.size());
for (T agencyNode : agencyNodes) {
nodeMap.put(agencyNode.getAreaCode(), agencyNode);
}
for (T node : nodeMap.values()) {
T parent = nodeMap.get(node.getParentAreaCode());
if (parent != null && !(node.getAreaCode().equals(parent.getAreaCode()))) {
parent.getSubAgencyList().add(node);
continue;
}
result.add(node);
}
return result;
}
}

34
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java

@ -729,4 +729,38 @@ public class DateUtils {
LocalDate ldn = new LocalDate(date);
return ldn.dayOfMonth().withMaximumValue().toDate();
}
/**
* @return ["202002","202003","202004","202005","202006","202007","202008","202009","202010","202011","202012","202101"]
* @param monthId 202101
* @param num 11
* @description 截止到当前monthId,近12个月的坐标
* @Date 2021/2/1 17:20
**/
public static List<String> getMonthIdList(String monthId,int num) {
List<String> monthIdList = new ArrayList<>();
for (int i = num; i >= NumConstant.ZERO; i--) {
Calendar c = Calendar.getInstance();
c.setTime(com.epmet.commons.tools.utils.DateUtils.stringToDate(monthId.concat("01"), com.epmet.commons.tools.utils.DateUtils.DATE_PATTERN_YYYYMMDD));
c.add(Calendar.MONTH, -i);
Date date = c.getTime();
String month = com.epmet.commons.tools.utils.DateUtils.format(date, com.epmet.commons.tools.utils.DateUtils.DATE_PATTERN_YYYYMM);
// monthIdList.add(month.substring(4, 6).concat("月"));
monthIdList.add(month);
}
return monthIdList;
}
/**
* @author yinzuomei
* @description 获取当前时间的山个月monthId
* @Date 2021/2/1 17:41
**/
public static String getCurrentTimeBeforeMonthId(){
Calendar c = Calendar.getInstance();
c.setTime(new Date());
c.add(Calendar.MONTH, -1);
Date nowDate = c.getTime();
return com.epmet.commons.tools.utils.DateUtils.format(nowDate, com.epmet.commons.tools.utils.DateUtils.DATE_PATTERN_YYYYMM);
}
}

161
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/SendMqMsgUtils.java

@ -7,7 +7,6 @@ import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.dto.form.mq.EventClassDto;
import com.epmet.commons.tools.dto.form.mq.MqBaseMsgDTO;
import com.epmet.commons.tools.dto.form.mq.MqReturnBaseResult;
import com.epmet.commons.tools.enums.EnvEnum;
import com.epmet.commons.tools.enums.MqMethodPathEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.ValidateException;
@ -29,85 +28,91 @@ import java.util.Map;
@Slf4j
@Component
public class SendMqMsgUtils {
private static MqConfig mqConfig;
private static MqConfig mqConfig;
/**
* desc:发送mq消息
*
* @return
*/
public static Result<String> sendMsg(MqBaseMsgDTO msg) {
if (mqConfig == null) {
mqConfig = SpringContextUtils.getBean(MqConfig.class);
}
log.debug("sendMsg param:{}", JSON.toJSONString(msg));
try {
// TODO
ValidatorUtils.validateEntity(msg, DefaultGroup.class);
} catch (ValidateException e) {
return new Result<String>().error(e.getMsg());
}
msg.setAppId(mqConfig.getAppId());
msg.setRequestUrl(mqConfig.getHost().concat(MqMethodPathEnum.SEND_MSG.getCode()));
msg.setToken(mqConfig.getToken());
try {
Result<String> result = HttpClientManager.getInstance().sendPostByHttps(msg.getRequestUrl(), JSON.toJSONString(msg));
log.debug("sendMsg result:{}", JSON.toJSONString(result));
if (result.success()) {
MqReturnBaseResult resultResult = JSON.parseObject(result.getData(), MqReturnBaseResult.class);
if (resultResult.getErrCode().equals(NumConstant.ZERO)) {
JSONObject jsonObject = JSON.parseObject(resultResult.getData());
return new Result<String>().ok(jsonObject.getString("msgId"));
} else {
log.error("sendMsg fail,resultData:{}", JSON.toJSONString(resultResult));
return new Result<String>().error(EpmetErrorCode.SERVER_ERROR.getCode(), resultResult.getErrMsg());
}
}
Result<String> resultResult = new Result<>();
resultResult.error(result.getCode(), result.getMsg());
resultResult.setInternalMsg(result.getInternalMsg());
return resultResult;
} catch (Exception e) {
log.debug("sendMsg exception", e);
return new Result<String>().error(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg());
}
}
/**
* desc:发送mq消息(如果失败重试1次)
*
* @return
*/
public static Result<String> sendMsg(MqBaseMsgDTO msg) {
if (mqConfig == null) {
mqConfig = SpringContextUtils.getBean(MqConfig.class);
}
log.info("sendMsg param:{}", JSON.toJSONString(msg));
try {
// TODO
ValidatorUtils.validateEntity(msg, DefaultGroup.class);
} catch (ValidateException e) {
return new Result<String>().error(e.getMsg());
}
msg.setAppId(mqConfig.getAppId());
msg.setRequestUrl(mqConfig.getHost().concat(MqMethodPathEnum.SEND_MSG.getCode()));
msg.setToken(mqConfig.getToken());
try {
int retryTime = 0;
Result<String> result = null;
do {
retryTime++;
result = HttpClientManager.getInstance().sendPostByHttps(msg.getRequestUrl(), JSON.toJSONString(msg));
log.info("sendMsg retryTime:{},result:{}", retryTime, JSON.toJSONString(result));
} while ((!result.success()) && retryTime < 2);
if (result.success()) {
MqReturnBaseResult resultResult = JSON.parseObject(result.getData(), MqReturnBaseResult.class);
if (resultResult.getErrCode().equals(NumConstant.ZERO)) {
JSONObject jsonObject = JSON.parseObject(resultResult.getData());
return new Result<String>().ok(jsonObject.getString("msgId"));
} else {
log.error("sendMsg fail,resultData:{}", JSON.toJSONString(resultResult));
return new Result<String>().error(EpmetErrorCode.SERVER_ERROR.getCode(), resultResult.getErrMsg());
}
}
Result<String> resultResult = new Result<>();
resultResult.error(result.getCode(), result.getMsg());
resultResult.setInternalMsg(result.getInternalMsg());
return resultResult;
} catch (Exception e) {
log.error("sendMsg exception", e);
return new Result<String>().error(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg());
}
}
/**
* desc:发送mq消息
*
* @return
*/
public static Result<List<EventClassDto>> getEventClassList() {
if (mqConfig == null) {
mqConfig = SpringContextUtils.getBean(MqConfig.class);
}
Map<String, String> param = new HashMap<>();
param.put("appId", mqConfig.getAppId());
param.put("token", mqConfig.getToken());
String requestUrl = mqConfig.getHost().concat(MqMethodPathEnum.GET_EVENT_LIST.getCode());
try {
Result<String> result = HttpClientManager.getInstance().sendPostByHttps(requestUrl, JSON.toJSONString(param));
log.debug("getEventClassList result:{}", JSON.toJSONString(result));
if (result.success()) {
MqReturnBaseResult resultResult = JSON.parseObject(result.getData(), MqReturnBaseResult.class);
if (resultResult.getErrCode().equals(NumConstant.ZERO)) {
List<EventClassDto> eventClassDto = JSON.parseArray(resultResult.getData(), EventClassDto.class);
return new Result<List<EventClassDto>>().ok(eventClassDto);
} else {
log.error("sendMsg fail,resultData:{}", JSON.toJSONString(resultResult));
return new Result<List<EventClassDto>>().error(EpmetErrorCode.SERVER_ERROR.getCode(), resultResult.getErrMsg());
}
}
Result<List<EventClassDto>> resultResult = new Result<>();
resultResult.error(result.getCode(), result.getMsg());
resultResult.setInternalMsg(result.getInternalMsg());
return resultResult;
} catch (Exception e) {
log.debug("sendMsg exception", e);
return new Result<List<EventClassDto>>().error(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg());
}
}
/**
* desc:发送mq消息
*
* @return
*/
public static Result<List<EventClassDto>> getEventClassList() {
if (mqConfig == null) {
mqConfig = SpringContextUtils.getBean(MqConfig.class);
}
Map<String, String> param = new HashMap<>();
param.put("appId", mqConfig.getAppId());
param.put("token", mqConfig.getToken());
String requestUrl = mqConfig.getHost().concat(MqMethodPathEnum.GET_EVENT_LIST.getCode());
try {
Result<String> result = HttpClientManager.getInstance().sendPostByHttps(requestUrl, JSON.toJSONString(param));
log.info("getEventClassList result:{}", JSON.toJSONString(result));
if (result.success()) {
MqReturnBaseResult resultResult = JSON.parseObject(result.getData(), MqReturnBaseResult.class);
if (resultResult.getErrCode().equals(NumConstant.ZERO)) {
List<EventClassDto> eventClassDto = JSON.parseArray(resultResult.getData(), EventClassDto.class);
return new Result<List<EventClassDto>>().ok(eventClassDto);
} else {
log.error("sendMsg fail,resultData:{}", JSON.toJSONString(resultResult));
return new Result<List<EventClassDto>>().error(EpmetErrorCode.SERVER_ERROR.getCode(), resultResult.getErrMsg());
}
}
Result<List<EventClassDto>> resultResult = new Result<>();
resultResult.error(result.getCode(), result.getMsg());
resultResult.setInternalMsg(result.getInternalMsg());
return resultResult;
} catch (Exception e) {
log.error("sendMsg exception", e);
return new Result<List<EventClassDto>>().error(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg());
}
}
}

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

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

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

@ -468,7 +468,7 @@ epmet:
- /epmet/ext/**
- /epmetuser/customerstaff/customerlist
- /message/template/**
- /data/aggregator/project/projectdistribution
swaggerUrls:
jwt:

16
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govissue/result/IssueInfoDTO.java

@ -0,0 +1,16 @@
package com.epmet.dataaggre.dto.govissue.result;
import lombok.Data;
/**
* 描述一下
*
* @author yinzuomei@elink-cn.com
* @date 2021/2/24 12:12
*/
@Data
public class IssueInfoDTO {
private String issueId;
private String gridId;
private String topicId;
}

4
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/CustomerAgencyDTO.java

@ -128,4 +128,8 @@ public class CustomerAgencyDTO implements Serializable {
*/
private String district;
/**
* 当前组织的上级行政地区编码add0204;举例平阴县对应的是济南市3701
*/
private String parentAreaCode;
}

19
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/form/ProjectDistributionFormDTO.java

@ -0,0 +1,19 @@
package com.epmet.dataaggre.dto.govproject.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 项目分布实时只适用于e事通客户入参
*
* @author yinzuomei@elink-cn.com
* @date 2021/2/24 11:04
*/
@Data
public class ProjectDistributionFormDTO implements Serializable {
private String gridId;
@NotBlank(message = "customerId不能为空")
private String customerId;
}

25
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/ProjectDistributionResultDTO.java

@ -0,0 +1,25 @@
package com.epmet.dataaggre.dto.govproject.result;
import lombok.Data;
import java.io.Serializable;
/**
* 项目分布实时只适用于e事通客户返参
*
* @author yinzuomei@elink-cn.com
* @date 2021/2/24 11:05
*/
@Data
public class ProjectDistributionResultDTO implements Serializable {
private String projectId;
private String projectTitle;
private String statusDesc;
private String longitude;
private String latitude;
// @JsonIgnore
private String issueId;
// @JsonIgnore
private String statusCode;
private String gridId;
}

7
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/resigroup/ResiTopicDTO.java

@ -17,9 +17,10 @@
package com.epmet.dataaggre.dto.resigroup;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
@ -128,4 +129,8 @@ public class ResiTopicDTO implements Serializable {
*/
private String issueId;
/**
* 话题所属网格id
*/
private String gridId;
}

25
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovProjectController.java

@ -5,14 +5,16 @@ import com.epmet.commons.tools.annotation.RequirePermission;
import com.epmet.commons.tools.enums.RequirePermissionEnum;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dataaggre.dto.govproject.form.AllProjectFormDTO;
import com.epmet.dataaggre.dto.govproject.form.ProjectDistributionFormDTO;
import com.epmet.dataaggre.dto.govproject.result.AllProjectResultDTO;
import com.epmet.dataaggre.dto.govproject.result.ProjectDistributionResultDTO;
import com.epmet.dataaggre.service.govproject.GovProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* @Author zxc
@ -39,4 +41,19 @@ public class GovProjectController {
AllProjectResultDTO result = govProjectService.allProjectList(tokenDto, formDTO);
return new Result<AllProjectResultDTO>().ok(result);
}
/**
* @param customerId
* @param formDTO
* @author yinzuomei 项目分布实时只适用于e事通客户返参
* @description 目前在用龙湾大屏调用此接口接口内写死了 按照立项时间降序取前100个项目
* @Date 2021/2/24 13:17
**/
@PostMapping("projectdistribution")
public Result<List<ProjectDistributionResultDTO>> queryProjectDistribution(@RequestHeader("CustomerId") String customerId,
@RequestBody ProjectDistributionFormDTO formDTO){
formDTO.setCustomerId(customerId);
ValidatorUtils.validateEntity(formDTO);
return new Result<List<ProjectDistributionResultDTO>>().ok(govProjectService.queryProjectDistribution(formDTO));
}
}

7
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govissue/IssueDao.java

@ -21,10 +21,7 @@ import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dataaggre.dto.govissue.form.ClosedIssueListFormDTO;
import com.epmet.dataaggre.dto.govissue.form.ShiftProjectIssueListFormDTO;
import com.epmet.dataaggre.dto.govissue.form.VotingIssueListFormDTO;
import com.epmet.dataaggre.dto.govissue.result.ClosedIssueListResultDTO;
import com.epmet.dataaggre.dto.govissue.result.IssueListResultDTO;
import com.epmet.dataaggre.dto.govissue.result.IssueShiftProjectResultDTO;
import com.epmet.dataaggre.dto.govissue.result.VotingIssueListResultDTO;
import com.epmet.dataaggre.dto.govissue.result.*;
import com.epmet.dataaggre.entity.govissue.IssueEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -75,4 +72,6 @@ public interface IssueDao extends BaseDao<IssueEntity> {
List<ClosedIssueListResultDTO> selectClosedListGov(ClosedIssueListFormDTO fromDTO);
Integer selectIssueCount(@Param("gridIds") List<String> gridIds,@Param("issueType")String issueType);
List<IssueInfoDTO> selectShiftProjectIssueList(@Param("customerId") String customerId, @Param("gridId") String gridId);
}

8
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govproject/ProjectDao.java

@ -18,18 +18,17 @@
package com.epmet.dataaggre.dao.govproject;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dataaggre.dto.govproject.form.AllProjectFormDTO;
import com.epmet.dataaggre.dto.govproject.result.ProjectInfoDTO;
import com.epmet.dataaggre.dto.govissue.result.IssueListResultDTO;
import com.epmet.dataaggre.dto.govproject.ProjectDTO;
import com.epmet.dataaggre.dto.govproject.form.AllProjectFormDTO;
import com.epmet.dataaggre.dto.govproject.result.ProjectDistributionResultDTO;
import com.epmet.dataaggre.dto.govproject.result.ProjectInfoDTO;
import com.epmet.dataaggre.entity.govproject.ProjectEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.List;
/**
* 项目表
*
@ -68,4 +67,5 @@ public interface ProjectDao extends BaseDao<ProjectEntity> {
**/
List<String> selectDepartmentNameList(ProjectDTO project);
List<ProjectDistributionResultDTO> selectList(@Param("customerId") String customerId,@Param("list")List<String> issueIds);
}

7
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/resigroup/ResiTopicDao.java

@ -18,8 +18,12 @@
package com.epmet.dataaggre.dao.resigroup;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dataaggre.dto.resigroup.ResiTopicDTO;
import com.epmet.dataaggre.entity.resigroup.ResiTopicEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 话题信息表
@ -29,5 +33,6 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface ResiTopicDao extends BaseDao<ResiTopicEntity> {
List<ResiTopicDTO> selectTopicInfoByIds(@Param("list") List<String> topicIds);
}

4
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/govorg/CustomerAgencyEntity.java

@ -94,4 +94,8 @@ public class CustomerAgencyEntity extends BaseEpmetEntity {
*/
private String district;
/**
* 当前组织的上级行政地区编码add0204;举例平阴县对应的是济南市3701
*/
private String parentAreaCode;
}

7
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/GovIssueService.java

@ -5,10 +5,7 @@ import com.epmet.dataaggre.dto.govissue.form.AllIssueFormDTO;
import com.epmet.dataaggre.dto.govissue.form.ClosedIssueListFormDTO;
import com.epmet.dataaggre.dto.govissue.form.ShiftProjectIssueListFormDTO;
import com.epmet.dataaggre.dto.govissue.form.VotingIssueListFormDTO;
import com.epmet.dataaggre.dto.govissue.result.AllIssueResultDTO;
import com.epmet.dataaggre.dto.govissue.result.ClosedIssueListResultDTO;
import com.epmet.dataaggre.dto.govissue.result.ShiftProjectIssueListResultDTO;
import com.epmet.dataaggre.dto.govissue.result.VotingIssueListResultDTO;
import com.epmet.dataaggre.dto.govissue.result.*;
import java.util.List;
@ -46,4 +43,6 @@ public interface GovIssueService {
* @author sun
**/
List<ClosedIssueListResultDTO> closedIssueList(ClosedIssueListFormDTO fromDTO);
List<IssueInfoDTO> selectShiftProjectIssueList(String customerId,String gridId);
}

5
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/impl/GovIssueServiceImpl.java

@ -313,4 +313,9 @@ public class GovIssueServiceImpl implements GovIssueService {
return resultList;
}
@Override
public List<IssueInfoDTO> selectShiftProjectIssueList(String customerId,String gridId) {
return issueDao.selectShiftProjectIssueList(customerId,gridId);
}
}

8
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/GovProjectService.java

@ -1,12 +1,11 @@
package com.epmet.dataaggre.service.govproject;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.dataaggre.dto.govissue.result.IssueListResultDTO;
import com.epmet.dataaggre.dto.govproject.form.AllProjectFormDTO;
import com.epmet.dataaggre.dto.govproject.form.ProjectDistributionFormDTO;
import com.epmet.dataaggre.dto.govproject.result.AllProjectResultDTO;
import java.util.List;
import com.epmet.dataaggre.dto.govissue.result.IssueListResultDTO;
import com.epmet.dataaggre.dto.govproject.result.ProjectDistributionResultDTO;
import com.epmet.dataaggre.dto.govproject.result.ShiftProjectResultDTO;
import java.util.List;
@ -41,4 +40,5 @@ public interface GovProjectService {
List<ShiftProjectResultDTO> getProjectByIssue(List<String> issueIdList);
List<ProjectDistributionResultDTO> queryProjectDistribution(ProjectDistributionFormDTO formDTO);
}

39
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java

@ -8,17 +8,21 @@ import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.constant.ProjectConstant;
import com.epmet.dataaggre.dao.govorg.CustomerStaffAgencyDao;
import com.epmet.dataaggre.dao.govproject.ProjectDao;
import com.epmet.dataaggre.dto.govissue.result.IssueInfoDTO;
import com.epmet.dataaggre.dto.govissue.result.IssueListResultDTO;
import com.epmet.dataaggre.dto.govorg.CustomerStaffAgencyDTO;
import com.epmet.dataaggre.dto.govproject.ProjectDTO;
import com.epmet.dataaggre.dto.govproject.form.AllProjectFormDTO;
import com.epmet.dataaggre.dto.govproject.form.ProjectDistributionFormDTO;
import com.epmet.dataaggre.dto.govproject.result.AllProjectResultDTO;
import com.epmet.dataaggre.dto.govproject.result.ProjectDistributionResultDTO;
import com.epmet.dataaggre.dto.govproject.result.ProjectInfoDTO;
import com.epmet.dataaggre.dto.govproject.result.ShiftProjectResultDTO;
import com.epmet.dataaggre.dto.resigroup.ResiTopicDTO;
import com.epmet.dataaggre.service.govissue.GovIssueService;
import com.epmet.dataaggre.service.govorg.GovOrgService;
import com.epmet.dataaggre.service.govproject.GovProjectService;
import com.epmet.dataaggre.service.resigroup.ResiGroupService;
import com.epmet.dto.form.TimestampIntervalFormDTO;
import com.epmet.dto.form.WorkMinuteFormDTO;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
@ -46,6 +50,10 @@ public class GovProjectServiceImpl implements GovProjectService {
private GovOrgService govOrgService;
@Autowired
private EpmetCommonServiceOpenFeignClient epmetCommonServiceOpenFeignClient;
@Autowired
private GovIssueService govIssueService;
@Autowired
private ResiGroupService resiGroupService;
/**
* @Description 查询项目信息
@ -103,6 +111,33 @@ public class GovProjectServiceImpl implements GovProjectService {
return resultList;
}
@Override
public List<ProjectDistributionResultDTO> queryProjectDistribution(ProjectDistributionFormDTO formDTO) {
List<ProjectDistributionResultDTO> resultDTOList = new ArrayList<>();
List<IssueInfoDTO> issueInfoDTOList = govIssueService.selectShiftProjectIssueList(formDTO.getCustomerId(), formDTO.getGridId());
if (CollectionUtils.isNotEmpty(issueInfoDTOList)) {
List<String> topicIds = issueInfoDTOList.stream().map(data -> data.getTopicId()).collect(Collectors.toList());
// log.info("话题id集合:" + JSON.toJSONString(topicIds, true));
List<ResiTopicDTO> topicInfoDTOList = resiGroupService.selectTopicInfoByIds(topicIds);
List<String> issueIds = issueInfoDTOList.stream().map(data -> data.getIssueId()).collect(Collectors.toList());
// log.info("议题id集合:" + JSON.toJSONString(issueIds, true));
resultDTOList = projectDao.selectList(formDTO.getCustomerId(),issueIds);
for (ProjectDistributionResultDTO project : resultDTOList) {
for (ResiTopicDTO topicInfoDTO : topicInfoDTOList) {
if (project.getIssueId().equals(topicInfoDTO.getIssueId())) {
//维度
project.setLatitude(topicInfoDTO.getDimension());
//经度
project.setLongitude(topicInfoDTO.getLongitude());
project.setGridId(topicInfoDTO.getGridId());
break;
}
}
}
}
return resultDTOList;
}
/**
* 全部项目

6
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/ResiGroupService.java

@ -1,8 +1,14 @@
package com.epmet.dataaggre.service.resigroup;
import com.epmet.dataaggre.dto.resigroup.ResiTopicDTO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @Author zxc
* @DateTime 2020/12/25 上午9:21
*/
public interface ResiGroupService {
List<ResiTopicDTO> selectTopicInfoByIds(@Param("topicIds") List<String> topicIds);
}

12
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/impl/ResiGroupServiceImpl.java

@ -2,10 +2,15 @@ package com.epmet.dataaggre.service.resigroup.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.dao.resigroup.ResiTopicDao;
import com.epmet.dataaggre.dto.resigroup.ResiTopicDTO;
import com.epmet.dataaggre.service.resigroup.ResiGroupService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @Author zxc
* @DateTime 2020/12/25 上午9:21
@ -14,4 +19,11 @@ import org.springframework.stereotype.Service;
@DataSource(DataSourceConstant.RESI_GROUP)
@Slf4j
public class ResiGroupServiceImpl implements ResiGroupService {
@Autowired
private ResiTopicDao resiTopicDao;
@Override
public List<ResiTopicDTO> selectTopicInfoByIds(List<String> topicIds) {
return resiTopicDao.selectTopicInfoByIds(topicIds);
}
}

17
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueDao.xml

@ -107,4 +107,21 @@
</foreach>)
</select>
<select id="selectShiftProjectIssueList" parameterType="map" resultType="com.epmet.dataaggre.dto.govissue.result.IssueInfoDTO">
SELECT
i.ID as issueId,
i.GRID_ID as gridId,
i.SOURCE_ID as topicId
FROM
issue i
WHERE
i.DEL_FLAG = '0'
AND i.ISSUE_STATUS = 'shift_project'
and i.SOURCE_TYPE='resi_topic'
AND i.CUSTOMER_ID = #{customerId}
<if test="gridId != null and gridId.trim() != ''">
AND i.GRID_ID = #{gridId}
</if>
order by i.SHIFTED_TIME desc limit 100
</select>
</mapper>

18
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govproject/ProjectDao.xml

@ -124,4 +124,22 @@
AND p.id = #{id}
</select>
<select id="selectList" parameterType="map" resultType="com.epmet.dataaggre.dto.govproject.result.ProjectDistributionResultDTO">
SELECT
p.id AS projectId,
p.TITLE AS projectTitle,
( CASE WHEN p.`STATUS` = 'pending' THEN '处理中' WHEN p.`STATUS` = 'closed' THEN '已结案' ELSE '' END ) AS statusDesc,
p.`STATUS` as statusCode,
p.ORIGIN_ID as issueId
FROM
project p
WHERE
p.DEL_FLAG = '0'
and p.CUSTOMER_ID=#{customerId}
and p.ORIGIN_ID in
<foreach item="issueId" collection="list" separator="," open="(" close=")" index="">
#{issueId}
</foreach>
order by CREATED_TIME desc limit 100
</select>
</mapper>

21
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/resigroup/ResiTopicDao.xml

@ -2,5 +2,24 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dataaggre.dao.resigroup.ResiTopicDao">
<select id="selectTopicInfoByIds" parameterType="map" resultType="com.epmet.dataaggre.dto.resigroup.ResiTopicDTO">
SELECT
rt.id ,
rt.ISSUE_ID ,
rt.LONGITUDE,
rt.DIMENSION,
RG.GRID_ID
FROM
resi_topic rt
LEFT JOIN resi_group RG
ON(RT.GROUP_ID=RG.ID)
WHERE rt.DEL_FLAG='0'
AND rt.SHIFT_ISSUE = '1'
and LENGTH(rt.LONGITUDE)>0
AND LENGTH(RT.DIMENSION)>0
and rt.id in
<foreach item="topicId" collection="list" separator="," open="(" close=")" index="">
#{topicId}
</foreach>
</select>
</mapper>

59
epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenProjectQuantityOrgMonthlyDTO.java

@ -0,0 +1,59 @@
/**
* 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;
import lombok.Data;
import java.io.Serializable;
/**
* 项目(事件)数量分析按组织_按月统计
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-01-27
*/
@Data
public class ScreenProjectQuantityOrgMonthlyDTO implements Serializable {
private static final long serialVersionUID = 6821188282305837207L;
/**
* 客户ID
*/
private String customerId;
/**
* 日期yyyyMMdd
*/
private String monthId;
/**
* 组织id
*/
private String orgId;
/**
* 当前组织内本月新增的项目数量转项目日期在当前月份内
*/
private Integer projectIncr;
/**
* 截止到当前月份累计项目总数
*/
private Integer projectTotal;
}

20
epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/screen/EfficiencyAnalysisFormDTO.java

@ -0,0 +1,20 @@
package com.epmet.dto.form.screen;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* 事件分析效率分析 入参DTO
*
* @author yinzuomei@elink-cn.com
* @date 2021/2/1 18:27
*/
@Data
public class EfficiencyAnalysisFormDTO extends ScreenCommonFormDTO{
/**
* 网格grid 街道street
*/
@NotBlank(message = "type不能为空:网格:grid; 街道:street")
private String type;
}

28
epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/screen/QueryQuantityMonthlyFormDTO.java

@ -0,0 +1,28 @@
package com.epmet.dto.form.screen;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* 近12个月事件分析月度数量分析 入参DTO
*
* @author yinzuomei@elink-cn.com
* @date 2021/2/1 16:34
*/
@Data
public class QueryQuantityMonthlyFormDTO extends ScreenCommonFormDTO{
private static final long serialVersionUID = 8848067533647648347L;
/**
* 每月项目增量incr累计项目数量sum
*/
@NotBlank(message = "type不能为空:每月项目增量:incr;累计项目数量:sum")
private String type ;
/**
* 截止到某月格式yyyyMM可为空
*/
private String endMonthId;
}

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

@ -0,0 +1,24 @@
package com.epmet.dto.form.screen;
import lombok.Data;
import java.io.Serializable;
/**
* 大屏通用入参
*
* @author yinzuomei@elink-cn.com
*/
@Data
public class ScreenCommonFormDTO implements Serializable {
private static final long serialVersionUID = -5959152175751211940L;
/**
* 来源于请求头中的customerId
*/
private String customerId;
/**
* 当前要查询的组织id
*/
private String agencyId;
}

49
epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/ScreenCustomerAgencyDTO.java

@ -0,0 +1,49 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* 组织机构信息
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-08-21
*/
@Data
public class ScreenCustomerAgencyDTO implements Serializable {
private static final long serialVersionUID = 6328123559936824470L;
/**
* 客户id
*/
private String customerId;
/**
* 组织id
*/
private String agencyId;
/**
* 组织名称
*/
private String agencyName;
/**
* 机关级别社区级community
街道:street,
区县级: district,
市级: city
省级:province
*/
private String level;
/**
* 行政地区编码
*/
private String areaCode;
/**
* 当前组织的上级行政地区编码add0204;举例平阴县对应的是济南市3701
*/
private String parentAreaCode;
}

18
epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/commonservice/AddAreaCodeDictResultDTO.java

@ -0,0 +1,18 @@
package com.epmet.dto.result.commonservice;
import lombok.Data;
import java.io.Serializable;
/**
* 003新增街道或者社区地区编码 入参
*
* @author yinzuomei@elink-cn.com
* @date 2021/2/5 17:39
*/
@Data
public class AddAreaCodeDictResultDTO implements Serializable {
private static final long serialVersionUID = 7505566589581480619L;
private String code;
}

50
epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/AgencyNodeDTO.java

@ -0,0 +1,50 @@
package com.epmet.dto.result.plugins;
import com.epmet.commons.tools.utils.AgencyNode;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* 008当前用户的数据权限(多客户版本) 返参DTO
*
* @author yinzuomei@elink-cn.com
* @date 2021/2/3 20:33
*/
@Data
public class AgencyNodeDTO extends AgencyNode<AgencyNodeDTO> implements Serializable {
private static final long serialVersionUID = -3745920378557792529L;
/**
* 直属机关Id
* */
private String agencyId;
/**
* 直属机关名称
* */
private String agencyName;
/**
* 机关级别社区级community 街道:street, 区县级: district, 市级: city 省级:province
* */
private String level;
/**
* 当前agencyId所属的客户id add02.03
* */
private String customerId;
/**
* 直属机关直属网格列表
* */
private List<GridNodeDTO> gridList = new ArrayList<>();
/**
* 直属机关直属部门列表
* */
private List<DeptNodeDTO> departmentList = new ArrayList<>();
}

15
epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/BidInfoResultDTO.java

@ -0,0 +1,15 @@
package com.epmet.dto.result.plugins;
import lombok.Data;
/**
* 146体系竞标管理-列表
*
* @author yinzuomei@elink-cn.com
* @date 2021/1/22 13:37
*/
@Data
public class BidInfoResultDTO {
private String bidName;
private String statusDesc;
}

19
epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/ContractResultDTO.java

@ -0,0 +1,19 @@
package com.epmet.dto.result.plugins;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
/**
* 146体系合同监督-列表
*
* @author yinzuomei@elink-cn.com
* @date 2021/1/22 13:30
*/
@Data
public class ContractResultDTO {
private String contractListName;
@JsonFormat(pattern = "yyyy.MM.dd", timezone = "GMT+8")
private Date dueDate;
}

36
epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/DeptNodeDTO.java

@ -0,0 +1,36 @@
package com.epmet.dto.result.plugins;
import lombok.Data;
import java.io.Serializable;
/**
* @Description 部门信息
* @ClassName ExtDeptResultDTO
* @Auth wangc
* @Date 2020-08-17 17:16
*/
@Data
public class DeptNodeDTO implements Serializable {
private static final long serialVersionUID = 1792371558965832432L;
/**
* 部门Id
* */
private String deptId;
/**
* 部门名称
* */
private String deptName;
/**
* 当前deptId所属的customerId add02.03
* */
private String customerId;
/**
* 当前deptId对应的地区编码 add02.03
* */
private String areaCode;
}

36
epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/GridNodeDTO.java

@ -0,0 +1,36 @@
package com.epmet.dto.result.plugins;
import lombok.Data;
import java.io.Serializable;
/**
* 008当前用户的数据权限(多客户版本) 返参DTO
*
* @author yinzuomei@elink-cn.com
* @date 2021/2/3 20:33
*/
@Data
public class GridNodeDTO implements Serializable {
private static final long serialVersionUID = -4531574240525562587L;
/**
* 网格Id
* */
private String gridId;
/**
* 网格名称
* */
private String gridName;
/**
* 当前gridId所属的客户id add02.03
* */
private String customerId;
/**
* 当前gridId对应的地区编码 add02.03
* */
private String areaCode;
}

18
epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/plugins/OneListResultDTO.java

@ -0,0 +1,18 @@
package com.epmet.dto.result.plugins;
import lombok.Data;
import java.io.Serializable;
/**
* 146体系清单列表
*
* @author yinzuomei@elink-cn.com
* @date 2021/1/22 13:23
*/
@Data
public class OneListResultDTO implements Serializable {
private static final long serialVersionUID = -1578923862757670664L;
private String listName;
private String listId;
}

40
epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/EfficiencyAnalysisResultDTO.java

@ -0,0 +1,40 @@
package com.epmet.dto.result.screen;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 事件分析效率分析 返参DTO
*
* @author yinzuomei@elink-cn.com
* @date 2021/2/1 18:23
*/
@Data
public class EfficiencyAnalysisResultDTO implements Serializable {
private static final long serialVersionUID = 7291513498972998552L;
/**
* 可能是网格名也可能是组织名
*/
private String name;
/**
* 解决率: %:90.74%
*/
private String resolvedRatioStr;
/**
* 解决率数值 90.74
*/
private BigDecimal resolvedRatio;
/**
* 方便查找日志
*/
private String customerId;
private String agencyId;
private String gridId;
private String dateId;
}

40
epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/ProjectQuantityResultDTO.java

@ -0,0 +1,40 @@
package com.epmet.dto.result.screen;
import lombok.Data;
/**
* 事件分析数量统计查询
*
* @author yinzuomei@elink-cn.com
* @date 2021/1/29 16:39
*/
@Data
public class ProjectQuantityResultDTO {
/**
* 事件总数
*/
private Integer projectTotal;
/**
* 已解决数
*/
private Integer resolvedNum;
/**
* 解决率,%号的字符串
*/
private String resolvedRatio;
/**
* 事件总数,%号的字符串
*/
private String satisfactionRatio;
/**
* 方便查找日志
*/
private String customerId;
private String agencyId;
private String dateId;
}

27
epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/screen/QueryQuantityMonthlyResultDTO.java

@ -0,0 +1,27 @@
package com.epmet.dto.result.screen;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 近12个月事件分析月度数量分析 返参DTO
*
* @author yinzuomei@elink-cn.com
* @date 2021/2/1 16:57
*/
@Data
public class QueryQuantityMonthlyResultDTO implements Serializable {
private static final long serialVersionUID = -9214182002720799008L;
/**
* 横坐标集合
*/
private List<String> xAxis;
/**
* 每个月的项目增量或者累计数量根据入参type决定
*/
private List<Integer> yAxis;
}

17
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/constant/ScreenConstant.java

@ -24,4 +24,21 @@ public interface ScreenConstant {
String GET_AREA_TREE_FAILURE = "查询行政地区编码树失败......";
String STREET = "street";
String DISTRICT = "district";
String CITY = "city";
String PROVINCE = "province";
String LEVEL = "level";
String STR_NULL = "";
String ENGLISH_COMMA = ",";
String GRID = "grid";
String AGENCY = "agency";
}

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

@ -26,4 +26,9 @@ public class MonthBarchartFormDTO implements Serializable {
* 月份ID,如果此列有值查询截止到当前monthId的近12个月数据
*/
private String monthId;
/**
* area_code升级,新增此参数来源于当前token
*/
private String customerId;
}

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

@ -21,4 +21,9 @@ public class MonthPieChartFormDTO implements Serializable {
*/
@NotBlank(message = "机关ID不能为空",groups = {MonthPieChart.class})
private String agencyId;
/**
* area_code升级,新增此参数来源于当前token
*/
private String customerId;
}

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

@ -30,4 +30,9 @@ public class SubAgencyIndexRankFormDTO implements Serializable {
private Integer topNum;
private String yearId;
/**
* area_code升级,新增此参数来源于当前token
*/
private String customerId;
}

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

@ -53,4 +53,9 @@ public class SubAgencyIndexRankYMFormDTO implements Serializable {
* 组织类型 组织agency 网格grid
*/
private String orgType;
/**
* area_code升级,新增此参数来源于当前token
*/
private String customerId;
}

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

@ -21,4 +21,9 @@ public class YearAverageIndexFormDTO implements Serializable {
*/
@NotBlank(message = "机关ID不能为空",groups = {YearAverageIndex.class})
private String agencyId;
/**
* area_code升级,新增此参数来源于当前token
*/
private String customerId;
}

27
epmet-module/data-report/data-report-client/src/main/java/com/epmet/feign/DataReportOpenFeignClient.java

@ -0,0 +1,27 @@
package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.result.plugins.AgencyNodeDTO;
import com.epmet.feign.impl.DataReportOpenFeignClientFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
/**
* 本服务对外开放的API,其他服务通过引用此client调用该服务
*
* @author yinzuomei@elink-cn.com
* @date 2021/2/3 22:05
*/
// @FeignClient(name = ServiceConstant.DATA_REPORT_SERVER, fallback = DataReportOpenFeignClientFallBack.class,url = "localhost:8109")
@FeignClient(name = ServiceConstant.DATA_REPORT_SERVER, fallback = DataReportOpenFeignClientFallBack.class)
public interface DataReportOpenFeignClient {
/**
* @param agencyId
* @description 查询当前组织及下级组织树
* @Date 2021/2/3 22:05
**/
@GetMapping("/data/report/screen/agency/querystaffagencytree/{agencyId}")
Result<AgencyNodeDTO> queryStaffAgencyTree(@PathVariable("agencyId") String agencyId);
}

21
epmet-module/data-report/data-report-client/src/main/java/com/epmet/feign/impl/DataReportOpenFeignClientFallBack.java

@ -0,0 +1,21 @@
package com.epmet.feign.impl;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.result.plugins.AgencyNodeDTO;
import com.epmet.feign.DataReportOpenFeignClient;
import org.springframework.stereotype.Component;
@Component
public class DataReportOpenFeignClientFallBack implements DataReportOpenFeignClient {
/**
* @param agencyId
* @description 查询当前组织及下级组织树
* @Date 2021/2/3 22:05
**/
@Override
public Result<AgencyNodeDTO> queryStaffAgencyTree(String agencyId) {
return ModuleUtils.feignConError(ServiceConstant.DATA_REPORT_SERVER, "queryStaffAgencyTree",agencyId);
}
}

127
epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/ScreenCustomerWorkRecordDictDTO.java

@ -0,0 +1,127 @@
/**
* 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.plugins;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 工作日志资源字典表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-02-23
*/
@Data
public class ScreenCustomerWorkRecordDictDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键客户每次上传直接根据customerId全删全增
*/
private String id;
/**
* 客户Id
*/
private String customerId;
/**
* 数据更新至日期eg:20200101
*/
private String dateId;
/**
* 资源id
*/
private String dictId;
/**
* 父资源ID如果是一级分类pid=0
*/
private String pid;
/**
* 资源类型
*/
private String resourceType;
/**
* 资源编码
*/
private String resourceCode;
/**
* 资源标签名
*/
private String resourceLabel;
/**
* 显示标识0否1是
*/
private String showFlag;
/**
* 排序
*/
private Integer sort;
/**
* 数据类别 party:支部建设; union:联合建设党员志愿服务voluntaryservice所有的一级分类需要对应到这三个key中
*/
private String dataType;
/**
* 当前资源属于几级例如1234....
*/
private Integer level;
/**
* 逻辑删除标识
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

117
epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/ScreenWorkRecordOrgDailyDTO.java

@ -0,0 +1,117 @@
/**
* 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.plugins;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 工作日志-组织按日统计(累计值)
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-02-23
*/
@Data
public class ScreenWorkRecordOrgDailyDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID 主键
*/
private String id;
/**
* 客户Id
*/
private String customerId;
/**
* 日期IdyyyyMMdd
*/
private String dateId;
/**
* 组织Idor网格id
*/
private String orgId;
/**
* 组织名称或者网格名
*/
private String orgName;
/**
* 会议类型编码对应screen_customer_work_record_dict的资源编码
*/
private String meetingCode;
/**
* 随手记类型编码对应screen_customer_work_record_dict的资源编码
*/
private String typeCode;
/**
* 组织次数
*/
private Integer organizeTotal;
/**
* 参与人数
*/
private Integer participateUserTotal;
/**
* 平均参与人数
*/
private Integer avgParticipateUserTotal;
/**
* 删除标识 0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

117
epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/ScreenWorkRecordOrgMonthlyDTO.java

@ -0,0 +1,117 @@
/**
* 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.plugins;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 工作日志-组织按月统计(增量)
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-02-23
*/
@Data
public class ScreenWorkRecordOrgMonthlyDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID 主键
*/
private String id;
/**
* 客户Id
*/
private String customerId;
/**
* 月份IdyyyyMM
*/
private String monthId;
/**
* 组织Idor网格id
*/
private String orgId;
/**
* 组织名称或者网格名
*/
private String orgName;
/**
* 会议类型编码对应screen_customer_work_record_dict的资源编码
*/
private String meetingCode;
/**
* 随手记类型编码对应screen_customer_work_record_dict的资源编码
*/
private String typeCode;
/**
* 组织次数
*/
private Integer organizeTotal;
/**
* 参与人数
*/
private Integer participateUserTotal;
/**
* 平均参与人数
*/
private Integer avgParticipateUserTotal;
/**
* 删除标识 0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

38
epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/form/WorkRecordRankFormDTO.java

@ -0,0 +1,38 @@
package com.epmet.plugins.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* 5工作日志本机及下级排名 通用入参
*
* @author yinzuomei@elink-cn.com
* @date 2021/2/23 23:08
*/
@Data
public class WorkRecordRankFormDTO implements Serializable {
private static final long serialVersionUID = -2934835714413031036L;
/**
* party:支部建设; union:联建共建党员志愿服务voluntaryservice
*/
@NotBlank(message = "dataType不能为空;可选值:party:支部建设; union:联建共建;党员志愿服务:voluntaryservice")
private String dataType;
/**
* 当前组织id
*/
@NotBlank(message = "agencyId不能为空")
private String agencyId;
/**
* 默认显示前3
*/
@NotNull(message = "topRow不能为空")
private Integer topRow;
@NotBlank(message = "customerId不能为空")
private String customerId;
}

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

@ -0,0 +1,32 @@
package com.epmet.plugins.result;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 5工作日志本机及下级排名 返参
*
* @author yinzuomei@elink-cn.com
* @date 2021/2/23 23:11
*/
@AllArgsConstructor
@Data
public class WorkRecordRankResultDTO implements Serializable {
/**
* 总参与人数
*/
private Integer participateUserTotal;
/**
*组织次数
*/
private Integer participateTotal;
/**
*下级排行列表
*/
private List<WorkRecordSubRank> subRankList;
}

34
epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordSubRank.java

@ -0,0 +1,34 @@
package com.epmet.plugins.result;
import lombok.Data;
import java.io.Serializable;
/**
* 下级排行列表
*
* @author yinzuomei@elink-cn.com
* @date 2021/2/23 23:21
*/
@Data
public class WorkRecordSubRank implements Serializable {
private static final long serialVersionUID = -2450978606865910110L;
private String orgId;
/**
* 组织名称或者是网格名称
*/
private String name;
/**
* 总参与人数
*/
private Integer participateUserTotal;
/**
* 组织次数
*/
private Integer participateTotal;
}

65
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/plugins/OfsController.java

@ -0,0 +1,65 @@
package com.epmet.datareport.controller.plugins;
import com.epmet.commons.tools.utils.Result;
import com.epmet.datareport.service.plugins.OfsService;
import com.epmet.dto.result.plugins.BidInfoResultDTO;
import com.epmet.dto.result.plugins.ContractResultDTO;
import com.epmet.dto.result.plugins.OneListResultDTO;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 146体系数据查询
*
* @author yinzuomei@elink-cn.com
* @date 2021/1/22 12:58
*/
@RestController
@RequestMapping("plugins/ofs")
public class OfsController {
@Autowired
private OfsService ofsService;
/**
* @param customerId
* @author yinzuomei
* @description 146体系清单列表
* @Date 2021/1/22 13:36
**/
@PostMapping("list")
public Result<List<OneListResultDTO>> oneList(@RequestHeader("CustomerId") String customerId){
if(StringUtils.isNotBlank(customerId)){
return new Result().ok(ofsService.queryOneList(customerId));
}
return new Result();
}
/**
* @param customerId
* @author yinzuomei
* @description 146体系合同监督-列表
* @Date 2021/1/22 13:36
**/
@PostMapping("contractlist")
public Result<List<ContractResultDTO>> queryContractList(@RequestHeader("CustomerId") String customerId){
if(StringUtils.isNotBlank(customerId)){
return new Result().ok(ofsService.queryContractList(customerId));
}
return new Result();
}
@PostMapping("bidlist")
public Result<List<BidInfoResultDTO>> bidList(@RequestHeader("CustomerId") String customerId){
if(StringUtils.isNotBlank(customerId)){
return new Result().ok(ofsService.queryBidList(customerId));
}
return new Result();
}
}

40
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/plugins/WorkRecordController.java

@ -0,0 +1,40 @@
package com.epmet.datareport.controller.plugins;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.datareport.service.plugins.ScreenWorkRecordOrgDailyService;
import com.epmet.plugins.form.WorkRecordRankFormDTO;
import com.epmet.plugins.result.WorkRecordRankResultDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* 大屏工作日志相关输出接口
*
* @author yinzuomei@elink-cn.com
* @date 2021/2/21 19:51
*/
@RestController
@RequestMapping("plugins/workrecord")
public class WorkRecordController {
@Autowired
private ScreenWorkRecordOrgDailyService screenWorkRecordOrgDailyService;
//todo 工作日志是否要添加area_code、parent_area_code、orgType;插件是否可以提供;也可以采集的时候赋值
//5、【工作日志】本机及下级排名
//NEI接口地址:https://nei.netease.com/interface/detail/?pid=57068&id=348966
//返参中的当前组织的参与人数、组织次数 直接sum所有下级的值;
//下级根据当前组织的areaCode查询下级列表,再去查询screen_work_record_org_daily
//legend来源于screen_customer_work_record_dict表 level=2,dataType=party
@PostMapping("ranklist")
public Result<WorkRecordRankResultDTO> rankList(@RequestHeader("CustomerId")String customerId, @RequestBody WorkRecordRankFormDTO formDTO){
formDTO.setCustomerId(customerId);
ValidatorUtils.validateEntity(formDTO);
return new Result<WorkRecordRankResultDTO>().ok(screenWorkRecordOrgDailyService.rankList(formDTO));
}
//6、【工作日志】近12月趋势图
//NEI接口地址:https://nei.netease.com/interface/detail/?pid=57068&id=348967
//可以下级组织+下级网格 orgId 直接 in
}

57
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java

@ -5,17 +5,21 @@ import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.datareport.service.evaluationindex.screen.*;
import com.epmet.datareport.service.project.ProjectService;
import com.epmet.dto.form.ProcessListFormDTO;
import com.epmet.dto.form.screen.EfficiencyAnalysisFormDTO;
import com.epmet.dto.form.screen.QueryQuantityMonthlyFormDTO;
import com.epmet.dto.form.screen.ScreenCommonFormDTO;
import com.epmet.dto.result.screen.EfficiencyAnalysisResultDTO;
import com.epmet.dto.result.screen.ProjectQuantityResultDTO;
import com.epmet.dto.result.screen.QueryQuantityMonthlyResultDTO;
import com.epmet.project.constant.ProjectConstant;
import com.epmet.project.dto.form.DifficultyRankFormDTO;
import com.epmet.project.dto.form.ProjectIncrTrendFormDTO;
import com.epmet.project.dto.result.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@ -29,7 +33,14 @@ public class ProjectController {
@Autowired
private ProjectService projectService;
@Autowired
private ScreenProjectGridDailyService projectGridDailyService;
@Autowired
private ScreenProjectOrgDailyService projectOrgDailyService;
@Autowired
private ScreenProjectQuantityGridMonthlyService projectQuantityGridMonthlyService;
@Autowired
private ScreenProjectQuantityOrgMonthlyService projectQuantityOrgMonthlyService;
/**
* @Author sun
@ -119,6 +130,42 @@ public class ProjectController {
return new Result<List<ProjectNextAgencyResultDTO>>().ok(projectService.getMyNextAgency(tokenDto));
}
/**
* @param customerId
* @param formDTO
* @description 事件分析数量统计查询 平阴大屏
**/
@PostMapping("queryquantity")
public Result<ProjectQuantityResultDTO> queryQuantity(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCommonFormDTO formDTO){
formDTO.setCustomerId(customerId);
return new Result().ok(projectOrgDailyService.queryQuantity(formDTO));
}
/**
* @param customerId
* @param formDTO
* @author yinzuomei
* @description 近12个月事件分析月度数量分析 平阴大屏
**/
@PostMapping("queryquantity-monthly")
public Result<QueryQuantityMonthlyResultDTO> queryQuantityMonthly(@RequestHeader("CustomerId") String customerId, @RequestBody QueryQuantityMonthlyFormDTO formDTO) {
formDTO.setCustomerId(customerId);
ValidatorUtils.validateEntity(formDTO);
return new Result<QueryQuantityMonthlyResultDTO>().ok(projectQuantityOrgMonthlyService.queryQuantityMonthly(formDTO));
}
/**
* @param customerId
* @param formDTO
* @author yinzuomei
* @description 事件分析效率分析 平阴大屏
**/
@PostMapping("efficiency-analysis")
public Result<List<EfficiencyAnalysisResultDTO>> efficiencyAnalysis(@RequestHeader("CustomerId") String customerId, @RequestBody EfficiencyAnalysisFormDTO formDTO){
formDTO.setCustomerId(customerId);
ValidatorUtils.validateEntity(formDTO);
return new Result<List<EfficiencyAnalysisResultDTO>>().ok(projectOrgDailyService.efficiencyAnalysis(formDTO));
}
//todo 【事件类型分析】NEI接口地址: https://nei.netease.com/interface/detail/?pid=57068&id=346721
}

31
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java

@ -3,13 +3,17 @@ package com.epmet.datareport.controller.screen;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.datareport.service.evaluationindex.screen.AgencyService;
import com.epmet.dto.form.AddAreaCodeDictFormDTO;
import com.epmet.dto.form.AreaCodeDictFormDTO;
import com.epmet.dto.result.AreaCodeDictResultDTO;
import com.epmet.dto.result.commonservice.AddAreaCodeDictResultDTO;
import com.epmet.dto.result.plugins.AgencyNodeDTO;
import com.epmet.evaluationindex.screen.dto.form.CompartmentByBizTypeFormDTO;
import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO;
import com.epmet.evaluationindex.screen.dto.form.TreeByTypeFormDTO;
import com.epmet.evaluationindex.screen.dto.result.CompartmentResultDTO;
import com.epmet.evaluationindex.screen.dto.result.TreeResultDTO;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -27,7 +31,6 @@ public class AgencyController {
@Autowired
private AgencyService agencyService;
/**
* @param
* @Description 1组织机构树 只返回 is_display = '1'
@ -81,4 +84,30 @@ public class AgencyController {
return new Result<List<AreaCodeDictResultDTO>>().ok(agencyService.areaCodeDictTree(formDTO));
}
/**
* @return com.epmet.commons.tools.utils.Result
* @param
* @author yinzuomei
* @description 003新增街道或者社区地区编码
* @Date 2021/2/5 17:39
**/
@PostMapping("addstreetcomm")
public Result<AddAreaCodeDictResultDTO> addStreetCommAreaCode(@RequestBody AddAreaCodeDictFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO);
return new Result<AddAreaCodeDictResultDTO>().ok(agencyService.addStreetCommAreaCode(formDTO));
}
/**
* @param agencyId
* @author yinzuomei
* @description 查询当前组织及下级组织树
* @Date 2021/2/3 22:19
**/
@GetMapping("querystaffagencytree/{agencyId}")
public Result<AgencyNodeDTO> queryStaffAgencyTree(@PathVariable("agencyId") String agencyId) {
//todo 单独校验下此方法
if (StringUtils.isNotBlank(agencyId)) {
return new Result<AgencyNodeDTO>().ok(agencyService.queryStaffAgencyTree(agencyId));
}
return new Result<>();
}
}

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

@ -6,6 +6,7 @@ import com.epmet.datareport.eum.OrgTypeEnum;
import com.epmet.datareport.service.evaluationindex.screen.IndexService;
import com.epmet.evaluationindex.screen.dto.form.*;
import com.epmet.evaluationindex.screen.dto.result.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -17,6 +18,7 @@ import java.util.List;
* @author yinzuomei@elink-cn.com
* @date 2020/8/18 10:13
*/
@Slf4j
@RestController
@RequestMapping("/screen/index")
public class IndexController {
@ -31,7 +33,9 @@ public class IndexController {
* @date 2020/8/19 2:53 下午
*/
@PostMapping("yearaverageindex")
public Result<YearAverageIndexResultDTO> yearAverageIndex(@RequestBody YearAverageIndexFormDTO yearAverageIndexFormDTO){
public Result<YearAverageIndexResultDTO> yearAverageIndex(@RequestHeader("CustomerId") String customerId,@RequestBody YearAverageIndexFormDTO yearAverageIndexFormDTO){
//area_code升级,新增此参数
yearAverageIndexFormDTO.setCustomerId(customerId);
ValidatorUtils.validateEntity(yearAverageIndexFormDTO, YearAverageIndexFormDTO.YearAverageIndex.class);
return new Result<YearAverageIndexResultDTO>().ok(indexService.yearAverageIndex(yearAverageIndexFormDTO));
}
@ -43,7 +47,9 @@ public class IndexController {
* @date 2020/8/19 3:17 下午
*/
@PostMapping("monthindexanalysis/piechart")
public Result<MonthPieChartResultDTO> monthPieChart(@RequestBody MonthPieChartFormDTO monthPieChartFormDTO){
public Result<MonthPieChartResultDTO> monthPieChart(@RequestHeader("CustomerId") String customerId,@RequestBody MonthPieChartFormDTO monthPieChartFormDTO){
//area_code升级,新增此参数
monthPieChartFormDTO.setCustomerId(customerId);
ValidatorUtils.validateEntity(monthPieChartFormDTO, MonthPieChartFormDTO.MonthPieChart.class);
return new Result<MonthPieChartResultDTO>().ok(indexService.monthPieChart(monthPieChartFormDTO));
}
@ -55,7 +61,9 @@ public class IndexController {
* @date 2020/8/19 5:27 下午
*/
@PostMapping("monthindexanalysis/barchart")
public Result<MonthBarchartResultDTO> monthBarchart(@RequestBody MonthBarchartFormDTO monthBarchartFormDTO){
public Result<MonthBarchartResultDTO> monthBarchart(@RequestHeader("CustomerId") String customerId,@RequestBody MonthBarchartFormDTO monthBarchartFormDTO){
//area_code升级,新增此参数
monthBarchartFormDTO.setCustomerId(customerId);
ValidatorUtils.validateEntity(monthBarchartFormDTO, MonthBarchartFormDTO.MonthBarchart.class);
return new Result<MonthBarchartResultDTO>().ok(indexService.monthBarchart(monthBarchartFormDTO));
}
@ -67,7 +75,9 @@ public class IndexController {
* @date 2020/8/20 10:02 上午
*/
@PostMapping("subagencyindexrank")
public Result<List<SubAgencyIndexRankResultDTO>> subAgencyIndexRank(@RequestBody SubAgencyIndexRankFormDTO subAgencyIndexRankFormDTO){
public Result<List<SubAgencyIndexRankResultDTO>> subAgencyIndexRank(@RequestHeader("CustomerId") String customerId,@RequestBody SubAgencyIndexRankFormDTO subAgencyIndexRankFormDTO){
//area_code升级,新增此参数
subAgencyIndexRankFormDTO.setCustomerId(customerId);
ValidatorUtils.validateEntity(subAgencyIndexRankFormDTO, SubAgencyIndexRankFormDTO.SubAgencyIndexRank.class);
return new Result<List<SubAgencyIndexRankResultDTO>>().ok(indexService.subAgencyIndexRank(subAgencyIndexRankFormDTO));
}
@ -81,7 +91,9 @@ public class IndexController {
* @Date 13:39 2020-09-11
**/
@PostMapping("dataclient/subagencyindexrank")
public Result<List<AnNingSubAgencyIndexRankResultDTO>> getSubAgencyIndexRank(@RequestBody SubAgencyIndexRankYMFormDTO formDTO) {
public Result<List<AnNingSubAgencyIndexRankResultDTO>> getSubAgencyIndexRank(@RequestHeader("CustomerId") String customerId,@RequestBody SubAgencyIndexRankYMFormDTO formDTO) {
//area_code升级,新增此参数
formDTO.setCustomerId(customerId);
ValidatorUtils.validateEntity(formDTO, SubAgencyIndexRankYMFormDTO.SubAgencyIndexRank.class);
return new Result<List<AnNingSubAgencyIndexRankResultDTO>>().ok(indexService.getSubAgencyIndexRank(formDTO));
}
@ -118,7 +130,7 @@ public class IndexController {
/**
* @param formDTO
* @Description 组织月度指数得分
* @Description 数据改版组织月度指数得分
* @author sun
*/
@PostMapping("month/indexscore")
@ -129,7 +141,7 @@ public class IndexController {
/**
* @param formDTO
* @Description 先进排行-先进支部排行
* @Description 数据改版先进排行-先进支部排行
* @author sun
*/
@PostMapping("advancedbranchrank")

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

@ -17,6 +17,10 @@
package com.epmet.datareport.dao.evaluationindex.screen;
import com.epmet.dto.result.ScreenCustomerAgencyDTO;
import com.epmet.dto.result.plugins.AgencyNodeDTO;
import com.epmet.dto.result.plugins.DeptNodeDTO;
import com.epmet.dto.result.plugins.GridNodeDTO;
import com.epmet.evaluationindex.screen.dto.result.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -112,4 +116,38 @@ public interface ScreenCustomerAgencyDao {
* @date 2020/10/28 10:33 上午
*/
List<SubBranchCountResultDTO> selectSubAgencyId(@Param("agencyId") String agencyId);
/**
* @param agencyId
* @author yinzuomei
* @description 查询组织基本信息
**/
ScreenCustomerAgencyDTO selectByAgencyId(@Param("agencyId") String agencyId);
/**
* @param areaCode
* @author yinzuomei
* @description 根据areaCode查询组织机构
* @Date 2021/2/4 21:51
**/
List<AgencyNodeDTO> queryStaffAgencyTree(@Param("areaCode")String areaCode);
/**
* @param areaCode
* @param agencyId
* @author yinzuomei
* @description 查找组织下的部门
* @Date 2021/2/4 21:51
**/
List<DeptNodeDTO> selectDeptList(@Param("areaCode") String areaCode,@Param("agencyId") String agencyId);
/**
* @param areaCode
* @param agencyId
* @author yinzuomei
* @description 查找组织下的网格
* @Date 2021/2/4 21:52
**/
List<GridNodeDTO> selectGridList(@Param("areaCode") String areaCode,@Param("agencyId") String agencyId);
}

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

@ -0,0 +1,43 @@
/**
* 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.evaluationindex.screen;
import com.epmet.dto.result.screen.EfficiencyAnalysisResultDTO;
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 2021-01-27
*/
@Mapper
public interface ScreenProjectGridDailyDao{
/**
* @param customerId
* @param areaCode
* @author yinzuomei
* @description 下级网格的效率解决率列表
**/
List<EfficiencyAnalysisResultDTO> queryGridEfficiencyAnalysis(@Param("customerId") String customerId, @Param("areaCode") String areaCode);
}

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

@ -0,0 +1,48 @@
/**
* 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.evaluationindex.screen;
import com.epmet.dto.result.screen.EfficiencyAnalysisResultDTO;
import com.epmet.dto.result.screen.ProjectQuantityResultDTO;
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 2021-01-27
*/
@Mapper
public interface ScreenProjectOrgDailyDao {
/**
* @author yinzuomei
* @description 事件分析数量统计查询
**/
ProjectQuantityResultDTO queryQuantity(@Param("customerId") String customerId, @Param("agencyId")String agencyId);
/**
* @param areaCode
* @author yinzuomei
* @description 下级组织的效率解决率列表
**/
List<EfficiencyAnalysisResultDTO> queryEfficiencyAnalysis(@Param("customerId")String customerId,@Param("areaCode") String areaCode);
}

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

@ -0,0 +1,32 @@
/**
* 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.evaluationindex.screen;
import org.apache.ibatis.annotations.Mapper;
/**
* 项目(事件)数量分析按网格_按月统计
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-01-27
*/
@Mapper
public interface ScreenProjectQuantityGridMonthlyDao {
}

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

@ -0,0 +1,44 @@
/**
* 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.evaluationindex.screen;
import com.epmet.dto.ScreenProjectQuantityOrgMonthlyDTO;
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 2021-01-27
*/
@Mapper
public interface ScreenProjectQuantityOrgMonthlyDao {
/**
* @return java.util.List<com.epmet.dto.ScreenProjectQuantityOrgMonthlyDTO>
* @param customerId 当前客户id
* @param agencyId 当前要查询的组织
* @param endMonthId 截止月份yyyyMM
* @author yinzuomei
* @description 近12个月事件分析月度数量分析
**/
List<ScreenProjectQuantityOrgMonthlyDTO> selectList(@Param("customerId") String customerId, @Param("agencyId")String agencyId, @Param("endMonthId")String endMonthId);
}

36
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenBidInfoDao.java

@ -0,0 +1,36 @@
/**
* 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.plugins;
import com.epmet.dto.result.plugins.BidInfoResultDTO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 146:竞标管理
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-01-22
*/
@Mapper
public interface ScreenBidInfoDao{
List<BidInfoResultDTO> selectList(String customerId);
}

35
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenContractInfoDao.java

@ -0,0 +1,35 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.datareport.dao.plugins;
import com.epmet.dto.result.plugins.ContractResultDTO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 146:合同基本信息
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-01-22
*/
@Mapper
public interface ScreenContractInfoDao {
List<ContractResultDTO> selectList(String customerId);
}

33
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenCustomerWorkRecordDictDao.java

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

35
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenListInfoDao.java

@ -0,0 +1,35 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.datareport.dao.plugins;
import com.epmet.dto.result.plugins.OneListResultDTO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 146:一张清单列表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-01-22
*/
@Mapper
public interface ScreenListInfoDao {
List<OneListResultDTO> selectList(String customerId);
}

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

@ -0,0 +1,57 @@
/**
* 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.plugins;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.datareport.entity.plugins.ScreenWorkRecordOrgDailyEntity;
import com.epmet.plugins.result.WorkRecordRankResultDTO;
import com.epmet.plugins.result.WorkRecordSubRank;
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 2021-02-23
*/
@Mapper
public interface ScreenWorkRecordOrgDailyDao extends BaseDao<ScreenWorkRecordOrgDailyEntity> {
/**
* @param areaCode 当前组织对应的areaCode;
* @param dataType
* @param topRow
* @return com.epmet.plugins.result.WorkRecordRankResultDTO
* @author yinzuomei
* @description 5工作日志本机及下级排名
* @Date 2021/2/23 23:37
**/
List<WorkRecordSubRank> selectSubList(@Param("areaCode") String areaCode,
@Param("agencyId") String agencyId,
@Param("dataType") String dataType,
@Param("topRow") Integer topRow,
@Param("dateId")String dateId);
String selectLatestDateId(String customerId);
WorkRecordRankResultDTO selectCurrentAgency(@Param("areaCode") String areaCode,
@Param("dataType") String dataType,
@Param("dateId")String dateId);
}

33
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgMonthlyDao.java

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

93
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/plugins/ScreenCustomerWorkRecordDictEntity.java

@ -0,0 +1,93 @@
/**
* 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.entity.plugins;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 工作日志资源字典表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-02-23
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("screen_customer_work_record_dict")
public class ScreenCustomerWorkRecordDictEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户Id
*/
private String customerId;
/**
* 数据更新至日期eg:20200101
*/
private String dateId;
/**
* 资源id
*/
private String dictId;
/**
* 父资源ID如果是一级分类pid=0
*/
private String pid;
/**
* 资源类型
*/
private String resourceType;
/**
* 资源编码
*/
private String resourceCode;
/**
* 资源标签名
*/
private String resourceLabel;
/**
* 显示标识0否1是
*/
private String showFlag;
/**
* 排序
*/
private Integer sort;
/**
* 数据类别 party:支部建设; union:联合建设党员志愿服务voluntaryservice所有的一级分类需要对应到这三个key中
*/
private String dataType;
/**
* 当前资源属于几级例如1234....
*/
private Integer level;
}

83
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/plugins/ScreenWorkRecordOrgDailyEntity.java

@ -0,0 +1,83 @@
/**
* 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.entity.plugins;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 工作日志-组织按日统计(累计值)
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-02-23
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("screen_work_record_org_daily")
public class ScreenWorkRecordOrgDailyEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户Id
*/
private String customerId;
/**
* 日期IdyyyyMMdd
*/
private String dateId;
/**
* 组织Idor网格id
*/
private String orgId;
/**
* 组织名称或者网格名
*/
private String orgName;
/**
* 会议类型编码对应screen_customer_work_record_dict的资源编码
*/
private String meetingCode;
/**
* 随手记类型编码对应screen_customer_work_record_dict的资源编码
*/
private String typeCode;
/**
* 组织次数
*/
private Integer organizeTotal;
/**
* 参与人数
*/
private Integer participateUserTotal;
/**
* 平均参与人数
*/
private Integer avgParticipateUserTotal;
}

83
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/entity/plugins/ScreenWorkRecordOrgMonthlyEntity.java

@ -0,0 +1,83 @@
/**
* 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.entity.plugins;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 工作日志-组织按月统计(增量)
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-02-23
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("screen_work_record_org_monthly")
public class ScreenWorkRecordOrgMonthlyEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户Id
*/
private String customerId;
/**
* 月份IdyyyyMM
*/
private String monthId;
/**
* 组织Idor网格id
*/
private String orgId;
/**
* 组织名称或者网格名
*/
private String orgName;
/**
* 会议类型编码对应screen_customer_work_record_dict的资源编码
*/
private String meetingCode;
/**
* 随手记类型编码对应screen_customer_work_record_dict的资源编码
*/
private String typeCode;
/**
* 组织次数
*/
private Integer organizeTotal;
/**
* 参与人数
*/
private Integer participateUserTotal;
/**
* 平均参与人数
*/
private Integer avgParticipateUserTotal;
}

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

@ -1,7 +1,11 @@
package com.epmet.datareport.service.evaluationindex.screen;
import com.epmet.dto.form.AddAreaCodeDictFormDTO;
import com.epmet.dto.form.AreaCodeDictFormDTO;
import com.epmet.dto.result.AreaCodeDictResultDTO;
import com.epmet.dto.result.commonservice.AddAreaCodeDictResultDTO;
import com.epmet.dto.result.ScreenCustomerAgencyDTO;
import com.epmet.dto.result.plugins.AgencyNodeDTO;
import com.epmet.evaluationindex.screen.dto.form.CompartmentByBizTypeFormDTO;
import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO;
import com.epmet.evaluationindex.screen.dto.form.TreeByTypeFormDTO;
@ -47,4 +51,14 @@ public interface AgencyService {
*/
List<AreaCodeDictResultDTO> areaCodeDictTree(AreaCodeDictFormDTO formDTO);
AddAreaCodeDictResultDTO addStreetCommAreaCode(AddAreaCodeDictFormDTO formDTO);
/**
* @param agencyId
* @author yinzuomei
* @description 查询当前组织及下级组织树
* @Date 2021/2/3 22:19
**/
AgencyNodeDTO queryStaffAgencyTree(String agencyId);
ScreenCustomerAgencyDTO queryAgencyInfo(String agencyId);
}

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

@ -0,0 +1,38 @@
/**
* 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.service.evaluationindex.screen;
import com.epmet.dto.result.screen.EfficiencyAnalysisResultDTO;
import java.util.List;
/**
* 项目(事件)分析按网格_按天统计
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-01-27
*/
public interface ScreenProjectGridDailyService {
/**
* @param customerId
* @param areaCode
* @author yinzuomei
* @description 事件分析效率分析 网格的解决率
**/
List<EfficiencyAnalysisResultDTO> efficiencyAnalysis(String customerId, String areaCode);
}

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

@ -0,0 +1,47 @@
/**
* 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.service.evaluationindex.screen;
import com.epmet.dto.form.screen.EfficiencyAnalysisFormDTO;
import com.epmet.dto.form.screen.ScreenCommonFormDTO;
import com.epmet.dto.result.screen.EfficiencyAnalysisResultDTO;
import com.epmet.dto.result.screen.ProjectQuantityResultDTO;
import java.util.List;
/**
* 项目(事件)分析按组织_按天统计
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-01-27
*/
public interface ScreenProjectOrgDailyService {
/**
* @param formDTO
* @author yinzuomei
* @description 事件分析数量统计查询
**/
ProjectQuantityResultDTO queryQuantity(ScreenCommonFormDTO formDTO);
/**
* @param formDTO
* @author yinzuomei
* @description 事件分析效率分析
**/
List<EfficiencyAnalysisResultDTO> efficiencyAnalysis(EfficiencyAnalysisFormDTO formDTO);
}

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

@ -0,0 +1,28 @@
/**
* 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.service.evaluationindex.screen;
/**
* 项目(事件)数量分析按网格_按月统计
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-01-27
*/
public interface ScreenProjectQuantityGridMonthlyService {
}

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

@ -0,0 +1,37 @@
/**
* 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.service.evaluationindex.screen;
import com.epmet.dto.form.screen.QueryQuantityMonthlyFormDTO;
import com.epmet.dto.result.screen.QueryQuantityMonthlyResultDTO;
/**
* 项目(事件)数量分析按组织_按月统计
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-01-27
*/
public interface ScreenProjectQuantityOrgMonthlyService {
/**
* @param formDTO
* @author yinzuomei
* @description 近12个月事件分析月度数量分析
**/
QueryQuantityMonthlyResultDTO queryQuantityMonthly(QueryQuantityMonthlyFormDTO formDTO);
}

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

@ -1,15 +1,21 @@
package com.epmet.datareport.service.evaluationindex.screen.impl;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.utils.AgencyTreeUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.DataSourceConstant;
import com.epmet.datareport.dao.evaluationindex.screen.ScreenCustomerAgencyDao;
import com.epmet.datareport.dao.evaluationindex.screen.ScreenCustomerGridDao;
import com.epmet.datareport.service.evaluationindex.screen.AgencyService;
import com.epmet.dto.form.AddAreaCodeDictFormDTO;
import com.epmet.dto.form.AreaCodeDictFormDTO;
import com.epmet.dto.result.AreaCodeDictResultDTO;
import com.epmet.dto.result.commonservice.AddAreaCodeDictResultDTO;
import com.epmet.dto.result.ScreenCustomerAgencyDTO;
import com.epmet.dto.result.plugins.AgencyNodeDTO;
import com.epmet.evaluationindex.screen.constant.ScreenConstant;
import com.epmet.evaluationindex.screen.dto.form.CompartmentByBizTypeFormDTO;
import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO;
@ -18,6 +24,8 @@ import com.epmet.evaluationindex.screen.dto.result.AgencyDistributionResultDTO;
import com.epmet.evaluationindex.screen.dto.result.CompartmentResultDTO;
import com.epmet.evaluationindex.screen.dto.result.TreeResultDTO;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.exceptions.TooManyResultsException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -32,6 +40,7 @@ import java.util.List;
* @author yinzuomei@elink-cn.com
* @date 2020/8/18 10:18
*/
@Slf4j
@Service
@DataSource(DataSourceConstant.EVALUATION_INDEX)
public class AgencyServiceImpl implements AgencyService {
@ -248,4 +257,44 @@ public class AgencyServiceImpl implements AgencyService {
}
return new ArrayList<>();
}
@Override
public AddAreaCodeDictResultDTO addStreetCommAreaCode(AddAreaCodeDictFormDTO formDTO) {
Result<String> res = commonServiceOpenFeignClient.addStreetCommAreaCode(formDTO);
if (res.success() && null != res.getData()) {
AddAreaCodeDictResultDTO resultDTO = new AddAreaCodeDictResultDTO();
resultDTO.setCode(res.getData());
return resultDTO;
}
throw new RenException(res.getMsg() + res.getInternalMsg());
}
/**
* @param agencyId
* @author yinzuomei
* @description 查询当前组织及下级组织树
* @Date 2021/2/3 22:19
**/
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public AgencyNodeDTO queryStaffAgencyTree(String agencyId) {
ScreenCustomerAgencyDTO agencyDTO = screenCustomerAgencyDao.selectByAgencyId(agencyId);
if (null == agencyDTO || StringUtils.isBlank(agencyDTO.getAreaCode())) {
throw new RenException(String.format("当前agencyId%s所属的area_code为空", agencyId));
}
List<AgencyNodeDTO> list = screenCustomerAgencyDao.queryStaffAgencyTree(agencyDTO.getAreaCode());
for (AgencyNodeDTO agencyNodeDTO : list) {
agencyNodeDTO.setGridList(screenCustomerAgencyDao.selectGridList(agencyNodeDTO.getAreaCode(), agencyNodeDTO.getAgencyId()));
agencyNodeDTO.setDepartmentList(screenCustomerAgencyDao.selectDeptList(agencyNodeDTO.getAreaCode(), agencyNodeDTO.getAgencyId()));
}
List<AgencyNodeDTO> treeList = AgencyTreeUtils.build(list);
log.info(JSON.toJSONString(treeList));
return treeList.get(NumConstant.ZERO);
}
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public ScreenCustomerAgencyDTO queryAgencyInfo(String agencyId) {
return screenCustomerAgencyDao.selectByAgencyId(agencyId);
}
}

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

@ -2,6 +2,7 @@ package com.epmet.datareport.service.evaluationindex.screen.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.constant.DataSourceConstant;
import com.epmet.datareport.dao.evaluationindex.screen.*;
@ -13,6 +14,7 @@ import com.epmet.evaluationindex.screen.dto.form.AgencyFormDTO;
import com.epmet.evaluationindex.screen.dto.form.AgencyNumTypeParamFormDTO;
import com.epmet.evaluationindex.screen.dto.result.*;
import com.github.pagehelper.PageHelper;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
@ -87,6 +89,11 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService {
}
PageHelper.startPage(NumConstant.ONE,param.getTopNum());
List<DifficultProjectResultDTO> result = screenDifficultyDataDao.selectDifficulty(param.getAgencyId(),param.getType());
for(DifficultProjectResultDTO resultDTO:result){
if (StringUtils.isNotBlank(resultDTO.getImgUrl()) && !resultDTO.getImgUrl().contains("http")) {
resultDTO.setImgUrl(StrConstant.EPMETY_STR);
}
}
if(null == result) return new ArrayList<>();
return result;
}

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

@ -0,0 +1,53 @@
/**
* 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.service.evaluationindex.screen.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.constant.DataSourceConstant;
import com.epmet.datareport.dao.evaluationindex.screen.ScreenProjectGridDailyDao;
import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectGridDailyService;
import com.epmet.dto.result.screen.EfficiencyAnalysisResultDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 项目(事件)分析按网格_按天统计
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-01-27
*/
@DataSource(DataSourceConstant.EVALUATION_INDEX)
@Service
public class ScreenProjectGridDailyServiceImpl implements ScreenProjectGridDailyService {
@Autowired
private ScreenProjectGridDailyDao screenProjectGridDailyDao;
/**
* @param customerId
* @param areaCode
* @author yinzuomei
* @description 事件分析效率分析 网格的解决率
**/
@DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true)
@Override
public List<EfficiencyAnalysisResultDTO> efficiencyAnalysis(String customerId, String areaCode) {
return screenProjectGridDailyDao.queryGridEfficiencyAnalysis(customerId,areaCode);
}
}

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

@ -0,0 +1,101 @@
/**
* 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.service.evaluationindex.screen.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.constant.DataSourceConstant;
import com.epmet.datareport.dao.evaluationindex.screen.ScreenCustomerAgencyDao;
import com.epmet.datareport.dao.evaluationindex.screen.ScreenProjectOrgDailyDao;
import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectGridDailyService;
import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectOrgDailyService;
import com.epmet.dto.form.screen.EfficiencyAnalysisFormDTO;
import com.epmet.dto.form.screen.ScreenCommonFormDTO;
import com.epmet.dto.result.ScreenCustomerAgencyDTO;
import com.epmet.dto.result.screen.EfficiencyAnalysisResultDTO;
import com.epmet.dto.result.screen.ProjectQuantityResultDTO;
import com.epmet.evaluationindex.screen.constant.ScreenConstant;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
* 项目(事件)分析按组织_按天统计
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-01-27
*/
@Slf4j
@Service
@DataSource(DataSourceConstant.EVALUATION_INDEX)
public class ScreenProjectOrgDailyServiceImpl implements ScreenProjectOrgDailyService {
@Autowired
private ScreenProjectOrgDailyDao baseDao;
@Autowired
private ScreenCustomerAgencyDao screenCustomerAgencyDao;
@Autowired
private ScreenProjectGridDailyService screenProjectGridDailyService;
/**
* @param formDTO
* @author yinzuomei
* @description 事件分析数量统计查询
**/
@DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true)
@Override
public ProjectQuantityResultDTO queryQuantity(ScreenCommonFormDTO formDTO) {
//客户id、agencyId都不能为空
ProjectQuantityResultDTO resultDTO = baseDao.queryQuantity(formDTO.getCustomerId(), formDTO.getAgencyId());
if (null != resultDTO) {
return resultDTO;
}
log.warn("【事件分析】数量统计查询 结果为空");
ProjectQuantityResultDTO defaultDto = new ProjectQuantityResultDTO();
defaultDto.setCustomerId(formDTO.getCustomerId());
defaultDto.setAgencyId(formDTO.getAgencyId());
defaultDto.setProjectTotal(NumConstant.ZERO);
defaultDto.setResolvedNum(NumConstant.ZERO);
defaultDto.setResolvedRatio("0%");
defaultDto.setSatisfactionRatio("0%");
return defaultDto;
}
/**
* @param formDTO
* @author yinzuomei
* @description 事件分析效率分析
**/
@DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true)
@Override
public List<EfficiencyAnalysisResultDTO> efficiencyAnalysis(EfficiencyAnalysisFormDTO formDTO) {
ScreenCustomerAgencyDTO agencyDTO = screenCustomerAgencyDao.selectByAgencyId(formDTO.getAgencyId());
if (null != agencyDTO) {
if (ScreenConstant.STREET.equals(formDTO.getType())) {
// 查询当前入参的下一级
// type=street查询screen_project_org_daily
return baseDao.queryEfficiencyAnalysis(formDTO.getCustomerId(), agencyDTO.getAreaCode());
} else if (ScreenConstant.GRID.equals(formDTO.getType())) {
// type=grid查询组织下的网格
return screenProjectGridDailyService.efficiencyAnalysis(formDTO.getCustomerId(), agencyDTO.getAreaCode());
}
}
return new ArrayList<>();
}
}

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

@ -0,0 +1,36 @@
/**
* 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.service.evaluationindex.screen.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.constant.DataSourceConstant;
import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectQuantityGridMonthlyService;
import org.springframework.stereotype.Service;
/**
* 项目(事件)数量分析按网格_按月统计
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-01-27
*/
@DataSource(DataSourceConstant.EVALUATION_INDEX)
@Service
public class ScreenProjectQuantityGridMonthlyServiceImpl implements ScreenProjectQuantityGridMonthlyService {
}

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

@ -0,0 +1,97 @@
/**
* 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.service.evaluationindex.screen.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.DataSourceConstant;
import com.epmet.datareport.dao.evaluationindex.screen.ScreenProjectQuantityOrgMonthlyDao;
import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectQuantityOrgMonthlyService;
import com.epmet.dto.ScreenProjectQuantityOrgMonthlyDTO;
import com.epmet.dto.form.screen.QueryQuantityMonthlyFormDTO;
import com.epmet.dto.result.screen.QueryQuantityMonthlyResultDTO;
import com.epmet.evaluationindex.screen.constant.ScreenConstant;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
/**
* 项目(事件)数量分析按组织_按月统计
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-01-27
*/
@DataSource(DataSourceConstant.EVALUATION_INDEX)
@Service
public class ScreenProjectQuantityOrgMonthlyServiceImpl implements ScreenProjectQuantityOrgMonthlyService {
@Autowired
private ScreenProjectQuantityOrgMonthlyDao baseDao;
/**
* @param formDTO
* @author yinzuomei
* @description 近12个月事件分析月度数量分析
**/
@DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true)
@Override
public QueryQuantityMonthlyResultDTO queryQuantityMonthly(QueryQuantityMonthlyFormDTO formDTO) {
if (StringUtils.isBlank(formDTO.getEndMonthId())) {
formDTO.setEndMonthId(DateUtils.getCurrentTimeBeforeMonthId());
}
QueryQuantityMonthlyResultDTO resultDTO = new QueryQuantityMonthlyResultDTO();
//近12个月的monthId集合,["202002","202003","202004","202005","202006","202007","202008","202009","202010","202011","202012","202101"]
List<String> monthIdList = DateUtils.getMonthIdList(formDTO.getEndMonthId(), NumConstant.ELEVEN);
//要返回的横坐标:["02月","03月","04月","05月","06月","07月","08月","09月","10月","11月","12月","01月"]
List<String> xAxis = new ArrayList<>();
List<Integer> yAxis = new ArrayList<>();
//查询近12个月的数据
List<ScreenProjectQuantityOrgMonthlyDTO> dtoList = baseDao.selectList(formDTO.getCustomerId(), formDTO.getAgencyId(), formDTO.getEndMonthId());
Map<String, ScreenProjectQuantityOrgMonthlyDTO> dtoMap = new HashMap<>();
if (!CollectionUtils.isEmpty(dtoList)) {
dtoMap = dtoList.stream().collect(Collectors.toMap(ScreenProjectQuantityOrgMonthlyDTO::getMonthId, Function.identity(), (key1, key2) -> key2));
}
for (String monthId : monthIdList) {
//202101=>01月
xAxis.add(monthId.substring(NumConstant.FOUR, NumConstant.SIX).concat(ScreenConstant.MONTH));
if (!CollectionUtils.isEmpty(dtoList)) {
if ("incr".equals(formDTO.getType())) {
yAxis.add(dtoMap.get(monthId).getProjectIncr());
} else if ("sum".equals(formDTO.getType())) {
yAxis.add(dtoMap.get(monthId).getProjectTotal());
}
continue;
}
//没有数据默认赋值0
yAxis.add(0);
}
resultDTO.setXAxis(xAxis);
resultDTO.setYAxis(yAxis);
return resultDTO;
}
}

34
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/OfsService.java

@ -0,0 +1,34 @@
package com.epmet.datareport.service.plugins;
import com.epmet.dto.result.plugins.BidInfoResultDTO;
import com.epmet.dto.result.plugins.ContractResultDTO;
import com.epmet.dto.result.plugins.OneListResultDTO;
import java.util.List;
/**
* 146体系数据查询
*
* @author yinzuomei@elink-cn.com
* @date 2021/1/22 10:18
*/
public interface OfsService {
List<OneListResultDTO> queryOneList(String customerId);
/**
* @param customerId
* @author yinzuomei
* @description 146体系合同监督-列表
* @Date 2021/1/22 13:36
**/
List<ContractResultDTO> queryContractList(String customerId);
/**
* @param customerId
* @author yinzuomei
* @description 146体系竞标管理-列表
* @Date 2021/1/22 13:38
**/
List<BidInfoResultDTO> queryBidList(String customerId);
}

95
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/ScreenCustomerWorkRecordDictService.java

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

99
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/ScreenWorkRecordOrgDailyService.java

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

94
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/ScreenWorkRecordOrgMonthlyService.java

@ -0,0 +1,94 @@
/**
* 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.service.plugins;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.datareport.entity.plugins.ScreenWorkRecordOrgMonthlyEntity;
import com.epmet.plugins.ScreenWorkRecordOrgMonthlyDTO;
import java.util.List;
import java.util.Map;
/**
* 工作日志-组织按月统计(增量)
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-02-23
*/
public interface ScreenWorkRecordOrgMonthlyService extends BaseService<ScreenWorkRecordOrgMonthlyEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<ScreenWorkRecordOrgMonthlyDTO>
* @author generator
* @date 2021-02-23
*/
PageData<ScreenWorkRecordOrgMonthlyDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<ScreenWorkRecordOrgMonthlyDTO>
* @author generator
* @date 2021-02-23
*/
List<ScreenWorkRecordOrgMonthlyDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return ScreenWorkRecordOrgMonthlyDTO
* @author generator
* @date 2021-02-23
*/
ScreenWorkRecordOrgMonthlyDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-02-23
*/
void save(ScreenWorkRecordOrgMonthlyDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-02-23
*/
void update(ScreenWorkRecordOrgMonthlyDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2021-02-23
*/
void delete(String[] ids);
}

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

@ -0,0 +1,59 @@
package com.epmet.datareport.service.plugins.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.constant.DataSourceConstant;
import com.epmet.datareport.dao.plugins.ScreenBidInfoDao;
import com.epmet.datareport.dao.plugins.ScreenContractInfoDao;
import com.epmet.datareport.dao.plugins.ScreenListInfoDao;
import com.epmet.datareport.service.plugins.OfsService;
import com.epmet.dto.result.plugins.BidInfoResultDTO;
import com.epmet.dto.result.plugins.ContractResultDTO;
import com.epmet.dto.result.plugins.OneListResultDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 146体系数据查询
*
* @author yinzuomei@elink-cn.com
* @date 2021/1/22 10:20
*/
@Service
@Slf4j
@DataSource(DataSourceConstant.EVALUATION_INDEX)
public class OfsServiceImpl implements OfsService {
@Autowired
private ScreenBidInfoDao screenBidInfoDao;
@Autowired
private ScreenContractInfoDao screenContractInfoDao;
@Autowired
private ScreenListInfoDao screenListInfoDao;
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public List<OneListResultDTO> queryOneList(String customerId) {
return screenListInfoDao.selectList(customerId);
}
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public List<ContractResultDTO> queryContractList(String customerId) {
return screenContractInfoDao.selectList(customerId);
}
/**
* @param customerId
* @author yinzuomei
* @description 146体系竞标管理-列表
* @Date 2021/1/22 13:38
**/
@Override
public List<BidInfoResultDTO> queryBidList(String customerId) {
return screenBidInfoDao.selectList(customerId);
}
}

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

@ -0,0 +1,101 @@
/**
* 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.service.plugins.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.datareport.dao.plugins.ScreenCustomerWorkRecordDictDao;
import com.epmet.datareport.entity.plugins.ScreenCustomerWorkRecordDictEntity;
import com.epmet.datareport.service.plugins.ScreenCustomerWorkRecordDictService;
import com.epmet.plugins.ScreenCustomerWorkRecordDictDTO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 工作日志资源字典表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-02-23
*/
@Slf4j
@Service
public class ScreenCustomerWorkRecordDictServiceImpl extends BaseServiceImpl<ScreenCustomerWorkRecordDictDao, ScreenCustomerWorkRecordDictEntity> implements ScreenCustomerWorkRecordDictService {
@Override
public PageData<ScreenCustomerWorkRecordDictDTO> page(Map<String, Object> params) {
IPage<ScreenCustomerWorkRecordDictEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, ScreenCustomerWorkRecordDictDTO.class);
}
@Override
public List<ScreenCustomerWorkRecordDictDTO> list(Map<String, Object> params) {
List<ScreenCustomerWorkRecordDictEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, ScreenCustomerWorkRecordDictDTO.class);
}
private QueryWrapper<ScreenCustomerWorkRecordDictEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<ScreenCustomerWorkRecordDictEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public ScreenCustomerWorkRecordDictDTO get(String id) {
ScreenCustomerWorkRecordDictEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, ScreenCustomerWorkRecordDictDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(ScreenCustomerWorkRecordDictDTO dto) {
ScreenCustomerWorkRecordDictEntity entity = ConvertUtils.sourceToTarget(dto, ScreenCustomerWorkRecordDictEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(ScreenCustomerWorkRecordDictDTO dto) {
ScreenCustomerWorkRecordDictEntity entity = ConvertUtils.sourceToTarget(dto, ScreenCustomerWorkRecordDictEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}

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

@ -0,0 +1,131 @@
/**
* 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.service.plugins.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.datareport.dao.plugins.ScreenWorkRecordOrgDailyDao;
import com.epmet.datareport.entity.plugins.ScreenWorkRecordOrgDailyEntity;
import com.epmet.datareport.service.evaluationindex.screen.AgencyService;
import com.epmet.datareport.service.plugins.ScreenWorkRecordOrgDailyService;
import com.epmet.dto.result.ScreenCustomerAgencyDTO;
import com.epmet.plugins.ScreenWorkRecordOrgDailyDTO;
import com.epmet.plugins.form.WorkRecordRankFormDTO;
import com.epmet.plugins.result.WorkRecordRankResultDTO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 工作日志-组织按日统计(累计值)
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-02-23
*/
@Slf4j
@Service
public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl<ScreenWorkRecordOrgDailyDao, ScreenWorkRecordOrgDailyEntity> implements ScreenWorkRecordOrgDailyService {
@Autowired
private AgencyService agencyService;
@Override
public PageData<ScreenWorkRecordOrgDailyDTO> page(Map<String, Object> params) {
IPage<ScreenWorkRecordOrgDailyEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, ScreenWorkRecordOrgDailyDTO.class);
}
@Override
public List<ScreenWorkRecordOrgDailyDTO> list(Map<String, Object> params) {
List<ScreenWorkRecordOrgDailyEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, ScreenWorkRecordOrgDailyDTO.class);
}
private QueryWrapper<ScreenWorkRecordOrgDailyEntity> getWrapper(Map<String, Object> params) {
String id = (String) params.get(FieldConstant.ID_HUMP);
QueryWrapper<ScreenWorkRecordOrgDailyEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public ScreenWorkRecordOrgDailyDTO get(String id) {
ScreenWorkRecordOrgDailyEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, ScreenWorkRecordOrgDailyDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(ScreenWorkRecordOrgDailyDTO dto) {
ScreenWorkRecordOrgDailyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenWorkRecordOrgDailyEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(ScreenWorkRecordOrgDailyDTO dto) {
ScreenWorkRecordOrgDailyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenWorkRecordOrgDailyEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
@Override
public WorkRecordRankResultDTO rankList(WorkRecordRankFormDTO formDTO) {
////todo 待完善 直属网格是否显示?
ScreenCustomerAgencyDTO agencyDTO = agencyService.queryAgencyInfo(formDTO.getAgencyId());
if (null == agencyDTO) {
throw new RenException(String.format("获取组织信息异常,agencyId:%s", formDTO.getAgencyId()));
}
String dateId = baseDao.selectLatestDateId(formDTO.getCustomerId());
log.info(String.format("最近一次上传dateId:%s", dateId));
if (agencyDTO.getLevel().equals("community")) {
log.warn("【工作日志】本机及下级排名接口待完善");
//todo
return new WorkRecordRankResultDTO(0, 0, new ArrayList<>());
} else {
//非社区的
WorkRecordRankResultDTO resultDTO = baseDao.selectCurrentAgency(agencyDTO.getAreaCode(), formDTO.getDataType(), dateId);
resultDTO.setSubRankList(baseDao.selectSubList(agencyDTO.getAreaCode(), agencyDTO.getAgencyId(), formDTO.getDataType(), formDTO.getTopRow(), dateId));
return resultDTO;
}
}
}

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

@ -0,0 +1,101 @@
/**
* 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.service.plugins.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.datareport.dao.plugins.ScreenWorkRecordOrgMonthlyDao;
import com.epmet.datareport.entity.plugins.ScreenWorkRecordOrgMonthlyEntity;
import com.epmet.datareport.service.plugins.ScreenWorkRecordOrgMonthlyService;
import com.epmet.plugins.ScreenWorkRecordOrgMonthlyDTO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 工作日志-组织按月统计(增量)
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-02-23
*/
@Slf4j
@Service
public class ScreenWorkRecordOrgMonthlyServiceImpl extends BaseServiceImpl<ScreenWorkRecordOrgMonthlyDao, ScreenWorkRecordOrgMonthlyEntity> implements ScreenWorkRecordOrgMonthlyService {
@Override
public PageData<ScreenWorkRecordOrgMonthlyDTO> page(Map<String, Object> params) {
IPage<ScreenWorkRecordOrgMonthlyEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, ScreenWorkRecordOrgMonthlyDTO.class);
}
@Override
public List<ScreenWorkRecordOrgMonthlyDTO> list(Map<String, Object> params) {
List<ScreenWorkRecordOrgMonthlyEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, ScreenWorkRecordOrgMonthlyDTO.class);
}
private QueryWrapper<ScreenWorkRecordOrgMonthlyEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<ScreenWorkRecordOrgMonthlyEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public ScreenWorkRecordOrgMonthlyDTO get(String id) {
ScreenWorkRecordOrgMonthlyEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, ScreenWorkRecordOrgMonthlyDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(ScreenWorkRecordOrgMonthlyDTO dto) {
ScreenWorkRecordOrgMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenWorkRecordOrgMonthlyEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(ScreenWorkRecordOrgMonthlyDTO dto) {
ScreenWorkRecordOrgMonthlyEntity entity = ConvertUtils.sourceToTarget(dto, ScreenWorkRecordOrgMonthlyEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}

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

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

18
epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenBidInfoDao.xml

@ -0,0 +1,18 @@
<?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.plugins.ScreenBidInfoDao">
<select id="selectList" parameterType="java.lang.String" resultType="com.epmet.dto.result.plugins.BidInfoResultDTO">
SELECT
sbi.BID_NAME AS bidName,
sbi.STATUS_DESC AS statusDesc
FROM
screen_bid_info sbi
WHERE
sbi.DEL_FLAG = '0'
AND sbi.CUSTOMER_ID =#{customerId}
ORDER BY
sbi.RELEASE_TIME DESC
</select>
</mapper>

18
epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenContractInfoDao.xml

@ -0,0 +1,18 @@
<?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.plugins.ScreenContractInfoDao">
<select id="selectList" parameterType="java.lang.String" resultType="com.epmet.dto.result.plugins.ContractResultDTO">
SELECT
sci.CONTRACT_NAME AS contractListName,
sci.DUE_DATE AS dueDate
FROM
screen_contract_info sci
WHERE
sci.DEL_FLAG = '0'
and sci.CUSTOMER_ID=#{customerId}
order by sci.DUE_DATE desc
</select>
</mapper>

28
epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenCustomerWorkRecordDictDao.xml

@ -0,0 +1,28 @@
<?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.plugins.ScreenCustomerWorkRecordDictDao">
<resultMap type="com.epmet.datareport.entity.plugins.ScreenCustomerWorkRecordDictEntity" id="screenCustomerWorkRecordDictMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="dateId" column="DATE_ID"/>
<result property="dictId" column="DICT_ID"/>
<result property="pid" column="PID"/>
<result property="resourceType" column="RESOURCE_TYPE"/>
<result property="resourceCode" column="RESOURCE_CODE"/>
<result property="resourceLabel" column="RESOURCE_LABEL"/>
<result property="showFlag" column="SHOW_FLAG"/>
<result property="sort" column="SORT"/>
<result property="dataType" column="DATA_TYPE"/>
<result property="level" column="LEVEL"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

17
epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenListInfoDao.xml

@ -0,0 +1,17 @@
<?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.plugins.ScreenListInfoDao">
<select id="selectList" parameterType="java.lang.String" resultType="com.epmet.dto.result.plugins.OneListResultDTO">
SELECT
sli.LIST_ID AS listId,
sli.LIST_NAME AS listName
FROM
screen_list_info sli
WHERE
sli.DEL_FLAG = '0'
AND sli.CUSTOMER_ID = #{customerId}
ORDER BY
sli.SORT ASC
</select>
</mapper>

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

@ -0,0 +1,53 @@
<?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.plugins.ScreenWorkRecordOrgDailyDao">
<select id="selectLatestDateId" resultType="java.lang.String" parameterType="java.lang.String">
SELECT
max( m.DATE_ID ) AS maxDateId
FROM
screen_work_record_org_daily m
WHERE
m.DEL_FLAG = '0'
AND m.CUSTOMER_ID = #{customerId}
</select>
<!-- 按照area_code查询当前组织的下级对应的数值,不包含本级 -->
<select id="selectSubList" parameterType="map" resultType="com.epmet.plugins.result.WorkRecordSubRank">
SELECT
sca.AGENCY_ID AS orgId,
sca.AGENCY_NAME AS `NAME`,
IFNULL( sum( m.PARTICIPATE_USER_TOTAL ), 0 ) AS participateUserTotal,
IFNULL( sum( m.ORGANIZE_TOTAL ), 0 ) AS participateTotal
FROM
screen_customer_agency sca
LEFT JOIN screen_work_record_org_daily m ON ( sca.AGENCY_ID = m.ORG_ID AND m.DEL_FLAG = '0' AND m.DATE_ID = #{dateId} )
LEFT JOIN screen_customer_work_record_dict dict ON ( m.TYPE_CODE = dict.RESOURCE_CODE AND dict.DEL_FLAG = '0' AND dict.DATA_TYPE = #{dataType} )
WHERE
sca.DEL_FLAG = '0'
AND sca.PARENT_AREA_CODE like concat( #{areaCode},'%')
and sca.AGENCY_ID !=#{agencyId}
GROUP BY
sca.AGENCY_ID,
sca.AGENCY_NAME
ORDER BY
participateUserTotal DESC,
participateTotal DESC
LIMIT #{topRow}
</select>
<select id="selectCurrentAgency" parameterType="map" resultType="com.epmet.plugins.result.WorkRecordRankResultDTO">
SELECT
IFNULL( sum( m.PARTICIPATE_USER_TOTAL ), 0 ) AS participateUserTotal,
IFNULL( sum( m.ORGANIZE_TOTAL ), 0 ) AS participateTotal
FROM
screen_customer_agency sca
inner JOIN screen_work_record_org_daily m ON ( sca.AGENCY_ID = m.ORG_ID AND m.DEL_FLAG = '0' AND m.DATE_ID = #{dateId} )
inner JOIN screen_customer_work_record_dict dict ON ( m.TYPE_CODE = dict.RESOURCE_CODE AND dict.DEL_FLAG = '0' AND dict.DATA_TYPE = #{dataType} )
WHERE
sca.DEL_FLAG = '0'
AND sca.PARENT_AREA_CODE like concat( #{areaCode},'%')
</select>
</mapper>

8
epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml

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

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

Loading…
Cancel
Save