Browse Source

Merge branch 'dev'

dev
sunyuchao 4 years ago
parent
commit
29535c015c
  1. 6
      epmet-commons/epmet-commons-tools/pom.xml
  2. 11
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/Constant.java
  3. 5
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
  4. 42
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ExcelUtils.java
  5. 13
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/Pinyin4jUtil.java
  6. 67
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/form/CustomerDataManageFormDTO.java
  7. 57
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/result/CustomerDataManageResultDTO.java
  8. 27
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/evaluationindex/ScreenAgencyOrGridListDTO.java
  9. 35
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/DataStatsController.java
  10. 27
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/datastats/DataStatsDao.java
  11. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/StatsStaffPatrolRecordDailyDao.java
  12. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/evaluationindex/EvaluationIndexDao.java
  13. 55
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/excel/CustomerDataManageExcel.java
  14. 18
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/DataStatsService.java
  15. 332
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java
  16. 7
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/StatsStaffPatrolRecordDailyService.java
  17. 1
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java
  18. 11
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/StatsStaffPatrolRecordDailyServiceImpl.java
  19. 15
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/EvaluationIndexService.java
  20. 63
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java
  21. 201
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml
  22. 41
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/StatsStaffPatrolRecordDailyDao.xml
  23. 7
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/evaluationindex/EvaluationIndexDao.xml
  24. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java
  25. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexModel.java
  26. 31
      epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java
  27. 1
      epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/utils/ModuleConstant.java
  28. 5
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/BizPointUserTotalDetailDTO.java
  29. 46
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/AllPartyFormDTO.java
  30. 3
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/GroupPointFormDTO.java
  31. 49
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/AllPartyResultDTO.java
  32. 21
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/GridPointRankResultDTO.java
  33. 21
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/MyPointRankResultDTO.java
  34. 42
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ResiPointController.java
  35. 9
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointStatisticalDailyDao.java
  36. 34
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointStatisticalDailyService.java
  37. 176
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java
  38. 93
      epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointStatisticalDailyDao.xml
  39. 18
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetAgencyListFormDTO.java
  40. 17
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/OrgFormDTO.java
  41. 31
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyTreeResultDTO.java
  42. 27
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/StaffOrgListResultDTO.java
  43. 10
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java
  44. 13
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java
  45. 27
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java
  46. 12
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java
  47. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java
  48. 19
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java
  49. 9
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/StaffService.java
  50. 28
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java
  51. 51
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java
  52. 35
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml
  53. 22
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/AttachmentDTO.java
  54. 56
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ExternalLinkDTO.java
  55. 117
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideAttachmentDTO.java
  56. 104
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideCategoryDTO.java
  57. 91
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideCollectionDTO.java
  58. 112
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideDTO.java
  59. 96
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideExternalLinkDTO.java
  60. 91
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideModuleDTO.java
  61. 96
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideModuleDictDTO.java
  62. 91
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideModuleDictDefaultDTO.java
  63. 58
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ModuleDTO.java
  64. 49
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/EditGuideCategoryFormDTO.java
  65. 61
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideAddFormDTO.java
  66. 56
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideCateOrderFormDTO.java
  67. 28
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideCategoryDropDownFormDTO.java
  68. 21
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideCategoryPageFormDTO.java
  69. 70
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideEditFormDTO.java
  70. 39
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideFormDTO.java
  71. 32
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideListFormDTO.java
  72. 17
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GetCategoryResultDTO.java
  73. 67
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GuideDetailResultDTO.java
  74. 39
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GuideDictResDTO.java
  75. 35
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GuideListResultDTO.java
  76. 171
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCategoryController.java
  77. 102
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCollectionController.java
  78. 180
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideController.java
  79. 93
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideModuleController.java
  80. 84
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideModuleDictController.java
  81. 33
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideAttachmentDao.java
  82. 98
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideCategoryDao.java
  83. 33
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideCollectionDao.java
  84. 71
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideDao.java
  85. 33
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideExternalLinkDao.java
  86. 45
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideModuleDao.java
  87. 33
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideModuleDictDao.java
  88. 33
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideModuleDictDefaultDao.java
  89. 83
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideAttachmentEntity.java
  90. 63
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideCategoryEntity.java
  91. 61
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideCollectionEntity.java
  92. 78
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideEntity.java
  93. 63
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideExternalLinkEntity.java
  94. 61
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideModuleDictDefaultEntity.java
  95. 66
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideModuleDictEntity.java
  96. 61
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideModuleEntity.java
  97. 114
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideAttachmentService.java
  98. 110
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCategoryService.java
  99. 117
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCollectionService.java
  100. 114
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideExternalLinkService.java

6
epmet-commons/epmet-commons-tools/pom.xml

@ -163,6 +163,12 @@
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
</dependency>
<dependency>
<groupId>io.github.wnjustdoit</groupId>
<artifactId>pinyin4j</artifactId>
<version>2.6.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>

11
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/Constant.java

@ -160,4 +160,15 @@ public interface Constant {
// resi_footbar_highlight_num
// gov_footbar_highlight_num
String FOOTBAR_HIGHLIGHT_NUM="_footbar_highlight_num";
/**
* 未被禁用标识
* */
String ENABLE = "enable";
/**
* 被禁用标识
* */
String DISABLE = "disable";
}

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

@ -74,6 +74,8 @@ public enum EpmetErrorCode {
AREA_CODE_ALREADY_EXISTS(8208,"组织区划已被占用,请重新选择"),
AGENCY_NAME_ALREADY_EXISTS(8209,"当前组织名称已存在,请重新修改"),
SET_PARENT_AREA_CODE(8210,"请先设置上级组织区划"),
HAVE_GUIDE_CANNOT_DEL(8211,"当前分类已经存在办事指南,不允许删除"),
GUIDE_CATEGORY_NAME_EXITS(8212,"分类已存在"),
REQUIRE_PERMISSION(8301, "您没有足够的操作权限"),
THIRD_PLAT_REQUEST_ERROR(8302, "请求第三方平台错误"),
@ -155,7 +157,8 @@ public enum EpmetErrorCode {
EXISTED_SPECIAL_PROJECT(8807, "已经添加过此专题"),
CAN_NOT_DEL_SPECIAL_PROJECT(8808, "您没有权限删除此专题"),
TAG_NOT_EXIST(8809,"标签不存在"),
GUIDE_IS_NULL(8810,"指南内容不能为空"),
GUIDE_IS_NOT_YOURS(8811,"只能删除自己创建的指南"),
//公众号 865..开头的码
PUBLIC_NOT_EXISTS(8651,"手机号未注册,请先完成信息注册"),
SELECT_CUSTOMER_ERROR(8652,"未查询到注册客户信息"),

42
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ExcelUtils.java

@ -14,11 +14,13 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.beans.BeanUtils;
import org.springframework.util.CollectionUtils;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
@ -80,4 +82,44 @@ public class ExcelUtils {
exportExcel(response, fileName, targetList, targetClass);
}
public static void exportExcelToTargetDisposeAll(HttpServletResponse response, String fileName, Collection<?> sourceList,
Class<?> targetClass) throws Exception {
if (!CollectionUtils.isEmpty(sourceList)){
List<Object> targetList = new ArrayList<>(sourceList.size());
for(Object source : sourceList){
Object target = targetClass.newInstance();
BeanUtils.copyProperties(source, target);
targetList.add(target);
}
exportExcelDispose(response, fileName, targetList, targetClass);
}else {
exportExcelDispose(response, fileName, new ArrayList<>(), targetClass);
}
}
public static void exportExcelDispose(HttpServletResponse response, String fileName, Collection<?> list,
Class<?> pojoClass) throws IOException {
if(StringUtils.isBlank(fileName)){
//当前日期
fileName = DateUtils.format(new Date());
}
ExportParams params = new ExportParams(fileName,fileName);
Workbook workbook = ExcelExportUtil.exportExcel(params, pojoClass, list);
Sheet sheet1 = workbook.getSheetAt(0);
sheet1.setDefaultColumnWidth(50*256);
sheet1.setDefaultRowHeight((short)(2*256));
response.setCharacterEncoding("UTF-8");
response.setHeader("content-Type", "application/vnd.ms-excel");
fileName = fileName + ".xls";
response.setHeader("Content-Disposition",
"attachment;filename=" +fileName);
ServletOutputStream out = response.getOutputStream();
workbook.write(out);
out.flush();
out.close();
}
}

13
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/Pinyin4jUtil.java → epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/Pinyin4jUtil.java

@ -1,4 +1,4 @@
package com.epmet.util;
package com.epmet.commons.tools.utils;
import net.sourceforge.pinyin4j.PinyinHelper;
import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
@ -42,7 +42,7 @@ public class Pinyin4jUtil {
*/
public static String getFirstSpellPinYin(String src, boolean isFullSpell) {
String targetStr = Pinyin4jUtil.makeStringByStringSet(Pinyin4jUtil.getPinyin(src, isFullSpell, 1));
System.out.println(targetStr);
System.out.println("targetStr="+targetStr);
String[] split = targetStr.split(",");
if (split.length > 1) {
targetStr = split[0];
@ -59,7 +59,7 @@ public class Pinyin4jUtil {
*/
public static String getSpellPinYin(String src, boolean isFullSpell,Integer preFont) {
String targetStr = Pinyin4jUtil.makeStringByStringSet(Pinyin4jUtil.getPinyin(src, isFullSpell, preFont));
System.out.println(targetStr);
System.out.println("targetStr="+targetStr);
String[] split = targetStr.split(",");
if (split.length > 1) {
targetStr = split[0];
@ -196,8 +196,9 @@ public class Pinyin4jUtil {
}
public static void main(String[] args) {
System.out.println(getFirstSpellPinYin("区直部门",false));
System.out.println(getSpellPinYin("党员提出话题数",false,4));
System.out.println(getSpellPinYin("社区超期项目数",false,4));
//System.out.println(getSpellPinYin("社区超期项目数",true,0));
System.out.println(getFirstSpellPinYin("区直部门",true));
//System.out.println(getSpellPinYin("党员提出话题数",false,4));
//System.out.println(getSpellPinYin("社区超期项目数",false,4));
}
}

67
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/form/CustomerDataManageFormDTO.java

@ -0,0 +1,67 @@
package com.epmet.dataaggre.dto.datastats.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;
/**
* @Author zxc
* @DateTime 2021/9/10 11:04 上午
* @DESC
*/
@Data
public class CustomerDataManageFormDTO implements Serializable {
private static final long serialVersionUID = 6462094914874831738L;
public interface CustomerDataManageForm{}
/**
* 客户ID
*/
@NotBlank(message = "客户ID不能为空",groups = CustomerDataManageForm.class)
private String customerId;
/**
* 组织ID
*/
@NotBlank(message = "组织ID不能为空",groups = CustomerDataManageForm.class)
private String agencyId;
/**
* 区间:Interval 截止:end
*/
@NotBlank(message = "type不能为空",groups = CustomerDataManageForm.class)
private String type;
/**
* 开始时间yyyymmdd
*/
private String startTime;
/**
* 结束时间yyyymmdd
*/
@NotBlank(message = "结束时间不能为空",groups = CustomerDataManageForm.class)
private String endTime;
private Integer pageNo = 1;
private Integer pageSize = 20;
/**
* 是否分页true分 false不分
*/
@NotNull(message = "是否分页不能为空",groups = CustomerDataManageForm.class)
private Boolean isPage;
//组织或网格Id集合
private List<String> idList;
//按起始时间还是结束时间查数据【start end】
private String sourceType;
//数据类型【组织agency 网格grid】
private String dataType;
}

57
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/result/CustomerDataManageResultDTO.java

@ -0,0 +1,57 @@
package com.epmet.dataaggre.dto.datastats.result;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* @Description 运营情况数据导出-接口返参
* @Auth sun
*/
@Data
public class CustomerDataManageResultDTO {
List<CustomerDataManage> list = new ArrayList<>();
private Integer total;
@Data
public static class CustomerDataManage {
//组织、网格Id
private String orgId;
//组织、网格名称
private String orgName;
//用户数
private Integer userCount = 0;
//居民数
private Integer residentCount = 0;
//党员数
private Integer partyMemberCount = 0;
//小组数
private Integer groupCount = 0;
//话题数
private Integer topicCount = 0;
//议题数
private Integer issueCount = 0;
//项目数
private Integer projectCount = 0;
//结案项目数
private Integer closedProjectCount = 0;
//巡查人数
private Integer patrolPeopleCount = 0;
//巡查次数
private Integer patrolCount = 0;
//巡查时长
private String patrolDuration;
//未转换前的巡查时长
private Integer patrolDurationInteger = 0;
//数据对应dateId
@JsonIgnore
private String dateId;
@JsonIgnore
private String staffId;
}
}

27
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/evaluationindex/ScreenAgencyOrGridListDTO.java

@ -0,0 +1,27 @@
package com.epmet.dataaggre.dto.evaluationindex;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @author sun
* @Description 根据组织Id判断查询直属下级组织/网格列表组织存在子客户的查询包含子客户组织数据
*/
@Data
public class ScreenAgencyOrGridListDTO implements Serializable {
private static final long serialVersionUID = 6328123559936824470L;
//组织级别(社区级:community,乡(镇、街道)级:street,区县级: district,市级: city,省级:province)
private String level;
//直属下级组织或网格集合
private List<AgencyGrid> agencyGridList;
@Data
public static class AgencyGrid {
//组织id
private String orgId;
//组织名称
private String orgName;
}
}

35
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/DataStatsController.java

@ -1,18 +1,21 @@
package com.epmet.dataaggre.controller;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dataaggre.dto.datastats.form.*;
import com.epmet.dataaggre.dto.datastats.result.*;
import com.epmet.dataaggre.excel.CustomerDataManageExcel;
import com.epmet.dataaggre.service.datastats.DataStatsService;
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 javax.servlet.http.HttpServletResponse;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
* @Author sun
@ -215,4 +218,28 @@ public class DataStatsController {
return new Result<GovrnRatioResultDTO>().ok(dataStatsService.governRatio(formDTO));
}
/**
* @Description 客户数据管理导出
* @Param formDTO
* @Param response
* @author zxc
* @date 2021/9/10 3:52 下午
*/
@PostMapping("operateexport")
public void CustomerDataManage(@RequestBody CustomerDataManageFormDTO formDTO, HttpServletResponse response) throws Exception {
ValidatorUtils.validateEntity(formDTO, CustomerDataManageFormDTO.CustomerDataManageForm.class);
dataStatsService.CustomerDataManage(formDTO,response);
}
/**
* @Param formDTO
* @Description 运营情况数据查询
* @author sun
*/
@PostMapping("operatedata")
public Result<CustomerDataManageResultDTO> operatedata(@RequestBody CustomerDataManageFormDTO formDTO) throws ParseException {
ValidatorUtils.validateEntity(formDTO, CustomerDataManageFormDTO.CustomerDataManageForm.class);
return new Result<CustomerDataManageResultDTO>().ok(dataStatsService.operateExport(formDTO));
}
}

27
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/datastats/DataStatsDao.java

@ -18,6 +18,7 @@
package com.epmet.dataaggre.dao.datastats;
import com.epmet.dataaggre.dto.datastats.FactGroupActDailyDTO;
import com.epmet.dataaggre.dto.datastats.form.CustomerDataManageFormDTO;
import com.epmet.dataaggre.dto.datastats.form.SubAgencyFormDTO;
import com.epmet.dataaggre.dto.datastats.form.SubGridFormDTO;
import com.epmet.dataaggre.dto.datastats.result.*;
@ -308,4 +309,30 @@ public interface DataStatsDao {
* @author sun
*/
List<GridMemberPatrolListResultDTO> selectGirdMemberPatrol(GridMemberPatrolListFormDTO formDTO);
/**
* @Description 直属组织或网格下注册用户数据
* @author sun
*/
List<CustomerDataManageResultDTO.CustomerDataManage> regUserList(CustomerDataManageFormDTO formDTO);
/**
* @Description 直属组织或网格下群组数据
* @author sun
*/
List<CustomerDataManageResultDTO.CustomerDataManage> groupList(CustomerDataManageFormDTO formDTO);
/**
* @Description 直属组织或网格下话题数据
* @author sun
*/
List<CustomerDataManageResultDTO.CustomerDataManage> topicList(CustomerDataManageFormDTO formDTO);
/**
* @Description 直属组织或网格下议题数据
* @author sun
*/
List<CustomerDataManageResultDTO.CustomerDataManage> issueList(CustomerDataManageFormDTO formDTO);
/**
* @Description 直属组织或网格下项目数据
* @author sun
*/
List<CustomerDataManageResultDTO.CustomerDataManage> projectList(CustomerDataManageFormDTO formDTO);
}

8
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/StatsStaffPatrolRecordDailyDao.java

@ -19,6 +19,8 @@ package com.epmet.dataaggre.dao.epmetuser;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dataaggre.dto.datastats.form.CustomerDataManageFormDTO;
import com.epmet.dataaggre.dto.datastats.result.CustomerDataManageResultDTO;
import com.epmet.dataaggre.dto.epmetuser.result.PatrolDailySumResult;
import com.epmet.dataaggre.entity.epmetuser.StatsStaffPatrolRecordDailyEntity;
import org.apache.ibatis.annotations.Mapper;
@ -43,4 +45,10 @@ public interface StatsStaffPatrolRecordDailyDao extends BaseDao<StatsStaffPatrol
* @return
*/
List<PatrolDailySumResult> getPatrolSumList(@Param("agencyFullIdList") List<String> agencyFullIdList, @Param("startDateId") String startDateId, @Param("endDateId") String endDateId);
/**
* @Description 直属组织或网格下巡查数据
* @author sun
*/
List<CustomerDataManageResultDTO.CustomerDataManage> patrolList(CustomerDataManageFormDTO formDTO);
}

8
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/evaluationindex/EvaluationIndexDao.java

@ -95,4 +95,12 @@ public interface EvaluationIndexDao {
*/
List<ScreenCustomerAgencyDTO> getSubAgencyListByAgency(@Param("agencyId") String agencyId, @Param("areaCode") String areaCode, @Param("list") List<String> list);
/**
* @Description 根据组织ID查询组织名
* @Param agencyId
* @author zxc
* @date 2021/9/10 3:54 下午
*/
String selectAgencyNameByAgencyId(@Param("agencyId")String agencyId);
}

55
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/excel/CustomerDataManageExcel.java

@ -0,0 +1,55 @@
package com.epmet.dataaggre.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
/**
* @Author zxc
* @DateTime 2021/9/10 10:15 上午
* @DESC
*/
@Data
public class CustomerDataManageExcel {
@Excel(name = "组织")
private String orgName;
@Excel(name = "用户数")
private Integer userCount;
@Excel(name = "居民数")
private Integer residentCount;
@Excel(name = "党员数")
private Integer partyMemberCount;
@Excel(name = "小组数")
private Integer groupCount;
@Excel(name = "话题数")
private Integer topicCount;
@Excel(name = "议题数")
private Integer issueCount;
@Excel(name = "项目数")
private Integer projectCount;
@Excel(name = "结案项目数")
private Integer closedProjectCount;
@Excel(name = "巡查人数")
private Integer patrolPeopleCount;
@Excel(name = "巡查次数")
private Integer patrolCount;
@Excel(name = "巡查时长")
private String patrolDuration;
/**
* 未转换前的巡查时长
*/
private Integer patrolDurationInteger;
}

18
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/DataStatsService.java

@ -9,6 +9,8 @@ import com.epmet.dataaggre.dto.govorg.result.GridMemberDataAnalysisResultDTO;
import com.epmet.dataaggre.dto.resigroup.ActCategoryDictDTO;
import com.epmet.dataaggre.dto.resigroup.result.GroupActRankDetailDTO;
import javax.servlet.http.HttpServletResponse;
import java.text.ParseException;
import java.util.List;
/**
@ -229,4 +231,20 @@ public interface DataStatsService {
* @author sun
*/
List<GridMemberPatrolListResultDTO> getGirdMemberPatrol(GridMemberPatrolListFormDTO formDTO);
/**
* @Description 客户数据管理导出
* @Param formDTO
* @Param response
* @author zxc
* @date 2021/9/10 3:52 下午
*/
void CustomerDataManage(CustomerDataManageFormDTO formDTO, HttpServletResponse response) throws Exception;
/**
* @Description 运营情况数据查询
* @author sun
*/
CustomerDataManageResultDTO operateExport(CustomerDataManageFormDTO formDTO) throws ParseException;
}

332
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java

@ -2,47 +2,53 @@
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.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.enums.OrgLevelEnum;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.constant.OrgConstant;
import com.epmet.dataaggre.dao.datastats.DataStatsDao;
import com.epmet.dataaggre.dao.datastats.FactGridMemberStatisticsDailyDao;
import com.epmet.dataaggre.dto.datastats.FactGroupActDailyDTO;
import com.epmet.dataaggre.dto.datastats.form.*;
import com.epmet.dataaggre.dto.datastats.result.*;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.constant.OrgConstant;
import com.epmet.dataaggre.dao.datastats.DataStatsDao;
import com.epmet.dataaggre.dao.datastats.FactGridMemberStatisticsDailyDao;
import com.epmet.dataaggre.dto.datastats.FactGroupActDailyDTO;
import com.epmet.dataaggre.dto.datastats.form.*;
import com.epmet.dataaggre.dto.datastats.result.*;
import com.epmet.dataaggre.dto.epmetuser.form.GridMemberPatrolListFormDTO;
import com.epmet.dataaggre.dto.epmetuser.result.GridMemberPatrolListResultDTO;
import com.epmet.dataaggre.dto.epmetuser.result.PatrolDailySumResult;
import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerAgencyDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerGridDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenGovernRankDataDailyDTO;
import com.epmet.dataaggre.dto.govorg.result.GridMemberDataAnalysisResultDTO;
import com.epmet.dataaggre.dto.resigroup.ActCategoryDictDTO;
import com.epmet.dataaggre.dto.resigroup.result.GroupActRankDetailDTO;
import com.epmet.dataaggre.entity.datastats.DimAgencyEntity;
import com.epmet.dataaggre.entity.datastats.FactAgencyGovernDailyEntity;
import com.epmet.dataaggre.service.datastats.DataStatsService;
import com.epmet.dataaggre.service.epmetuser.StatsStaffPatrolRecordDailyService;
import com.epmet.dataaggre.service.evaluationindex.EvaluationIndexService;
import com.epmet.dataaggre.service.opercrm.CustomerRelation;
import com.github.pagehelper.PageHelper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
import com.epmet.dataaggre.dto.evaluationindex.ScreenAgencyOrGridListDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerAgencyDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerGridDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenGovernRankDataDailyDTO;
import com.epmet.dataaggre.dto.govorg.result.GridMemberDataAnalysisResultDTO;
import com.epmet.dataaggre.dto.resigroup.ActCategoryDictDTO;
import com.epmet.dataaggre.dto.resigroup.result.GroupActRankDetailDTO;
import com.epmet.dataaggre.entity.datastats.DimAgencyEntity;
import com.epmet.dataaggre.entity.datastats.FactAgencyGovernDailyEntity;
import com.epmet.dataaggre.excel.CustomerDataManageExcel;
import com.epmet.dataaggre.service.datastats.DataStatsService;
import com.epmet.dataaggre.service.epmetuser.StatsStaffPatrolRecordDailyService;
import com.epmet.dataaggre.service.evaluationindex.EvaluationIndexService;
import com.epmet.dataaggre.service.opercrm.CustomerRelation;
import com.github.pagehelper.PageHelper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.NumberFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
/**
* @Author sun
@ -1841,4 +1847,258 @@ public class DataStatsServiceImpl implements DataStatsService {
return dataStatsDao.selectGirdMemberPatrol(formDTO);
}
/**
* @Description 客户数据管理导出
* @Param formDTO
* @Param response
* @author zxc
* @date 2021/9/10 3:52 下午
*/
@Override
public void CustomerDataManage(CustomerDataManageFormDTO formDTO, HttpServletResponse response) throws Exception {
List<CustomerDataManageResultDTO.CustomerDataManage> result = operateExport(formDTO).getList();
if (!CollectionUtils.isEmpty(result)){
CustomerDataManageResultDTO.CustomerDataManage c = new CustomerDataManageResultDTO.CustomerDataManage();
c.setOrgName("合计");
c.setUserCount(result.stream().collect(Collectors.summingInt(CustomerDataManageResultDTO.CustomerDataManage::getUserCount)));
c.setResidentCount(result.stream().collect(Collectors.summingInt(CustomerDataManageResultDTO.CustomerDataManage::getResidentCount)));
c.setPartyMemberCount(result.stream().collect(Collectors.summingInt(CustomerDataManageResultDTO.CustomerDataManage::getPartyMemberCount)));
c.setGroupCount(result.stream().collect(Collectors.summingInt(CustomerDataManageResultDTO.CustomerDataManage::getGroupCount)));
c.setTopicCount(result.stream().collect(Collectors.summingInt(CustomerDataManageResultDTO.CustomerDataManage::getTopicCount)));
c.setIssueCount(result.stream().collect(Collectors.summingInt(CustomerDataManageResultDTO.CustomerDataManage::getIssueCount)));
c.setProjectCount(result.stream().collect(Collectors.summingInt(CustomerDataManageResultDTO.CustomerDataManage::getProjectCount)));
c.setClosedProjectCount(result.stream().collect(Collectors.summingInt(CustomerDataManageResultDTO.CustomerDataManage::getClosedProjectCount)));
c.setPatrolPeopleCount(result.stream().collect(Collectors.summingInt(CustomerDataManageResultDTO.CustomerDataManage::getPatrolPeopleCount)));
c.setPatrolCount(result.stream().collect(Collectors.summingInt(CustomerDataManageResultDTO.CustomerDataManage::getPatrolCount)));
c.setPatrolDurationInteger(result.stream().collect(Collectors.summingInt(CustomerDataManageResultDTO.CustomerDataManage::getPatrolDurationInteger)));
c.setPatrolDuration(getHm(c.getPatrolDurationInteger()));
result.add(c);
}
String fileName = excelName(formDTO);
ExcelUtils.exportExcelToTargetDisposeAll(response,fileName,result, CustomerDataManageExcel.class);
}
/**
* @Description 秒转换时分
* @Param seconds
* @author zxc
* @date 2021/9/13 10:03 上午
*/
public String getHm(Integer seconds){
String result = "0分钟";
if (seconds >= NumConstant.SIXTY) {
Integer hours = seconds / 3600;
Integer minutes = seconds % 3600 / 60;
result = (hours < NumConstant.ONE ? "" : hours + "小时") + (minutes < NumConstant.ONE ? "" : minutes + "分钟");
}else if (seconds < NumConstant.SIXTY && seconds > NumConstant.ZERO){
result = "1分钟";
}
return result;
}
/**
* @Description 表头获取
* @Param formDTO
* @author zxc
* @date 2021/9/13 10:02 上午
*/
public String excelName(CustomerDataManageFormDTO formDTO){
StringBuffer s = new StringBuffer();
String agencyName = indexService.selectAgencyNameByAgencyId(formDTO.getAgencyId());
s.append(agencyName);
if (StringUtils.isNotBlank(formDTO.getStartTime())){
String startTime = formDTO.getStartTime();
String sYear = startTime.substring(0, 4);
String sMonth = startTime.substring(4, 6);
String sDay = startTime.substring(6, 8);
String endTime = formDTO.getEndTime();
String eYear = endTime.substring(0, 4);
String eMonth = endTime.substring(4, 6);
String eDay = endTime.substring(6, 8);
s.append(sYear).append("年").append(sMonth).append("月").append(sDay).append("日-")
.append(eYear).append("年").append(eMonth).append("月").append(eDay).append("日区间新增值");
}else {
String endTime = formDTO.getEndTime();
String eYear = endTime.substring(0, 4);
String eMonth = endTime.substring(4, 6);
String eDay = endTime.substring(6, 8);
s.append(eYear).append("年").append(eMonth).append("月").append(eDay).append("日截止累计值");
}
return s.toString();
}
/**
* @Param formDTO
* @Description 运营情况数据查询
* @author sun
*/
@Override
public CustomerDataManageResultDTO operateExport(CustomerDataManageFormDTO formDTO) throws ParseException {
CustomerDataManageResultDTO resultDTO = new CustomerDataManageResultDTO();
List<CustomerDataManageResultDTO.CustomerDataManage> dataManageList = new ArrayList<>();
//1.必要参数校验及处理
if ("Interval".equals(formDTO.getType()) && StringUtils.isEmpty(formDTO.getStartTime())) {
throw new RenException("请选择开始时间或查询累计值");
}
//入参有开始时间的则需要减去一天
if (StringUtils.isNotBlank(formDTO.getStartTime())) {
SimpleDateFormat format = new SimpleDateFormat(DateUtils.DATE_PATTERN_YYYYMMDD);
Date date = format.parse(formDTO.getStartTime());
Date yesterday = DateUtils.addDateDays(date, -1);
formDTO.setStartTime(format.format(yesterday));
}
//2.查询组织信息,判断查询下级组织还是网格数据
ScreenAgencyOrGridListDTO agencyGrid = indexService.getSubAgencyOrGridList(formDTO.getAgencyId());
if (null == agencyGrid) {
return new CustomerDataManageResultDTO();
}
//组织或网格Id集合
List<String> idList = agencyGrid.getAgencyGridList().stream().map(ScreenAgencyOrGridListDTO.AgencyGrid::getOrgId).collect(Collectors.toList());
formDTO.setDataType(!"community".equals(agencyGrid.getLevel()) ? "agency" : "grid");
formDTO.setIdList(idList);
resultDTO.setTotal(idList.size());
//3.查询截止日期用户、群组、话题、议题、项目、巡查数据
formDTO.setSourceType("end");
List<CustomerDataManageResultDTO.CustomerDataManage> userEnd = dataStatsDao.regUserList(formDTO);
HashMap<String, CustomerDataManageResultDTO.CustomerDataManage> uEndMap = new HashMap<>();
userEnd.stream().forEach(u->uEndMap.put(u.getOrgId(),u));
List<CustomerDataManageResultDTO.CustomerDataManage> groupEnd = dataStatsDao.groupList(formDTO);
HashMap<String, CustomerDataManageResultDTO.CustomerDataManage> gEndMap = new HashMap<>();
groupEnd.stream().forEach(u->gEndMap.put(u.getOrgId(),u));
List<CustomerDataManageResultDTO.CustomerDataManage> topicEnd = dataStatsDao.topicList(formDTO);
HashMap<String, CustomerDataManageResultDTO.CustomerDataManage> tEndMap = new HashMap<>();
topicEnd.stream().forEach(u->tEndMap.put(u.getOrgId(),u));
List<CustomerDataManageResultDTO.CustomerDataManage> issueEnd = dataStatsDao.issueList(formDTO);
HashMap<String, CustomerDataManageResultDTO.CustomerDataManage> iEndMap = new HashMap<>();
issueEnd.stream().forEach(u->iEndMap.put(u.getOrgId(),u));
List<CustomerDataManageResultDTO.CustomerDataManage> projectEnd = dataStatsDao.projectList(formDTO);
HashMap<String, CustomerDataManageResultDTO.CustomerDataManage> pEndMap = new HashMap<>();
projectEnd.stream().forEach(u->pEndMap.put(u.getOrgId(),u));
//巡查数据不区分区间差值,只计算累计值,人员做去重处理且是有巡查记录的人员
List<CustomerDataManageResultDTO.CustomerDataManage> patrolEnd = statsStaffPatrolRecordDailyService.patrolList(formDTO);
//4.判断是否需要查询起始日期用户、群组、话题、议题、项目、巡查数据
HashMap<String, CustomerDataManageResultDTO.CustomerDataManage> uStartMap = new HashMap<>();
HashMap<String, CustomerDataManageResultDTO.CustomerDataManage> gStartMap = new HashMap<>();
HashMap<String, CustomerDataManageResultDTO.CustomerDataManage> tStartMap = new HashMap<>();
HashMap<String, CustomerDataManageResultDTO.CustomerDataManage> iStartMap = new HashMap<>();
HashMap<String, CustomerDataManageResultDTO.CustomerDataManage> pStartMap = new HashMap<>();
if ("Interval".equals(formDTO.getType())) {
formDTO.setSourceType("start");
List<CustomerDataManageResultDTO.CustomerDataManage> userStart = dataStatsDao.regUserList(formDTO);
userStart.stream().forEach(u->uStartMap.put(u.getOrgId(),u));
List<CustomerDataManageResultDTO.CustomerDataManage> groupStart = dataStatsDao.groupList(formDTO);
groupStart.stream().forEach(u->gStartMap.put(u.getOrgId(),u));
List<CustomerDataManageResultDTO.CustomerDataManage> topicStart = dataStatsDao.topicList(formDTO);
topicStart.stream().forEach(u->tStartMap.put(u.getOrgId(),u));
List<CustomerDataManageResultDTO.CustomerDataManage> issueStart = dataStatsDao.issueList(formDTO);
issueStart.stream().forEach(u->iStartMap.put(u.getOrgId(),u));
List<CustomerDataManageResultDTO.CustomerDataManage> projectStart = dataStatsDao.projectList(formDTO);
projectStart.stream().forEach(u->pStartMap.put(u.getOrgId(),u));
}
//5.封装数据
agencyGrid.getAgencyGridList().forEach(org -> {
CustomerDataManageResultDTO.CustomerDataManage dto = new CustomerDataManageResultDTO.CustomerDataManage();
dto.setOrgId(org.getOrgId());
dto.setOrgName(org.getOrgName());
int user = 0;
int resi = 0;
int part = 0;
if(uEndMap.containsKey(org.getOrgId())){
user = uEndMap.get(org.getOrgId()).getUserCount();
resi = uEndMap.get(org.getOrgId()).getResidentCount();
part = uEndMap.get(org.getOrgId()).getPartyMemberCount();
if ("Interval".equals(formDTO.getType())&&uStartMap.containsKey(org.getOrgId())) {
user = user - uStartMap.get(org.getOrgId()).getUserCount();
resi = resi - uStartMap.get(org.getOrgId()).getResidentCount();
part = part - uStartMap.get(org.getOrgId()).getPartyMemberCount();
}
}
int group = 0;
if(gEndMap.containsKey(org.getOrgId())){
group = gEndMap.get(org.getOrgId()).getGroupCount();
if ("Interval".equals(formDTO.getType())&&gStartMap.containsKey(org.getOrgId())) {
group = group - gStartMap.get(org.getOrgId()).getGroupCount();
}
}
int topic = 0;
if(tEndMap.containsKey(org.getOrgId())){
topic = tEndMap.get(org.getOrgId()).getTopicCount();
if ("Interval".equals(formDTO.getType())&&tStartMap.containsKey(org.getOrgId())) {
topic = topic - tStartMap.get(org.getOrgId()).getTopicCount();
}
}
int issue = 0;
if(iEndMap.containsKey(org.getOrgId())){
issue = iEndMap.get(org.getOrgId()).getIssueCount();
if ("Interval".equals(formDTO.getType())&&iStartMap.containsKey(org.getOrgId())) {
issue = issue - iStartMap.get(org.getOrgId()).getIssueCount();
}
}
int project = 0;
int closed = 0;
if(pEndMap.containsKey(org.getOrgId())){
project = pEndMap.get(org.getOrgId()).getProjectCount();
closed = pEndMap.get(org.getOrgId()).getClosedProjectCount();
if ("Interval".equals(formDTO.getType())&&pStartMap.containsKey(org.getOrgId())) {
project = project - pStartMap.get(org.getOrgId()).getProjectCount();
closed = closed - pStartMap.get(org.getOrgId()).getClosedProjectCount();
}
}
int patro = 0;
int patroCount = 0;
String patrolDuration = "";
int patrolDurationInteger = 0;
HashSet set = new HashSet();
for (CustomerDataManageResultDTO.CustomerDataManage u : patrolEnd) {
if (org.getOrgId().equals(u.getOrgId())) {
patroCount += u.getPatrolCount();
patrolDurationInteger += u.getPatrolDurationInteger();
set.add(u.getStaffId());
}
}
patro = set.size();
Integer minutes = patrolDurationInteger / 60;
patrolDuration = (minutes / 60 > 0 ? minutes / 60 + "小时" : "") + (minutes % 60 > 0 ? minutes % 60 + "分钟" : "0分钟");
dto.setUserCount(user);
dto.setResidentCount(resi);
dto.setPartyMemberCount(part);
dto.setGroupCount(group);
dto.setTopicCount(topic);
dto.setIssueCount(issue);
dto.setProjectCount(project);
dto.setClosedProjectCount(closed);
dto.setPatrolPeopleCount(patro);
dto.setPatrolCount(patroCount);
dto.setPatrolDuration(patrolDuration);
dto.setPatrolDurationInteger(patrolDurationInteger);
dataManageList.add(dto);
});
//6.默认按用户总数降序
Collections.sort(dataManageList, new Comparator<CustomerDataManageResultDTO.CustomerDataManage>() {
@Override
public int compare(CustomerDataManageResultDTO.CustomerDataManage o1, CustomerDataManageResultDTO.CustomerDataManage o2) {
return o2.getUserCount().compareTo(o1.getUserCount());
}
});
//7.物理分页并返回
if (formDTO.getIsPage()) {
int firstIndex = (formDTO.getPageNo() - 1) * formDTO.getPageSize();
int lastIndex = formDTO.getPageNo() * formDTO.getPageSize();
List<CustomerDataManageResultDTO.CustomerDataManage> list = dataManageList.subList((firstIndex > dataManageList.size() ? dataManageList.size() : firstIndex), (lastIndex > dataManageList.size() ? dataManageList.size() : lastIndex));
resultDTO.setList(list);
return resultDTO;
}
resultDTO.setList(dataManageList);
return resultDTO;
}
}

7
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/StatsStaffPatrolRecordDailyService.java

@ -18,6 +18,8 @@
package com.epmet.dataaggre.service.epmetuser;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.dataaggre.dto.datastats.form.CustomerDataManageFormDTO;
import com.epmet.dataaggre.dto.datastats.result.CustomerDataManageResultDTO;
import com.epmet.dataaggre.dto.epmetuser.result.PatrolDailySumResult;
import com.epmet.dataaggre.entity.epmetuser.StatsStaffPatrolRecordDailyEntity;
@ -40,4 +42,9 @@ public interface StatsStaffPatrolRecordDailyService extends BaseService<StatsSta
*/
List<PatrolDailySumResult> getPatrolSumList(List<String> agencyList, String startDateId, String endDateId);
/**
* @Description 直属组织或网格下巡查数据
* @author sun
*/
List<CustomerDataManageResultDTO.CustomerDataManage> patrolList(CustomerDataManageFormDTO formDTO);
}

1
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java

@ -598,6 +598,7 @@ public class EpmetUserServiceImpl implements EpmetUserService {
log.error("getStaffInfo have any agency staffId:{}",staffId);
return null;
}
result.setAgencyId(agencyDTO.getId());
result.setAgencyName(agencyDTO.getOrganizationName());
StaffOrgRelationResultDTO fromOrgTypeDto = govOrgService.getStaffFromOrgType(staffId);
String fromOrgType = OrgTypeEnum.AGENCY.getCode();

11
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/StatsStaffPatrolRecordDailyServiceImpl.java

@ -4,6 +4,8 @@ import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.dao.epmetuser.StatsStaffPatrolRecordDailyDao;
import com.epmet.dataaggre.dto.datastats.form.CustomerDataManageFormDTO;
import com.epmet.dataaggre.dto.datastats.result.CustomerDataManageResultDTO;
import com.epmet.dataaggre.dto.epmetuser.result.PatrolDailySumResult;
import com.epmet.dataaggre.entity.epmetuser.StatsStaffPatrolRecordDailyEntity;
import com.epmet.dataaggre.service.epmetuser.StatsStaffPatrolRecordDailyService;
@ -36,4 +38,13 @@ public class StatsStaffPatrolRecordDailyServiceImpl extends BaseServiceImpl<Stat
return baseDao.getPatrolSumList(agencyFullIdList,startDateId,endDateId);
}
/**
* @Description 直属组织或网格下巡查数据
* @author sun
*/
@Override
public List<CustomerDataManageResultDTO.CustomerDataManage> patrolList(CustomerDataManageFormDTO formDTO) {
return baseDao.patrolList(formDTO);
}
}

15
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/EvaluationIndexService.java

@ -2,6 +2,7 @@ package com.epmet.dataaggre.service.evaluationindex;
import com.epmet.dataaggre.dto.datastats.form.GovrnRatioFormDTO;
import com.epmet.dataaggre.dto.datastats.result.GovrnRatioResultDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenAgencyOrGridListDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerAgencyDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerGridDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenGovernRankDataDailyDTO;
@ -71,4 +72,18 @@ public interface EvaluationIndexService {
*/
List<ScreenCustomerAgencyDTO> getSubAgencyListByAgency(String agencyId);
/**
* @Description 根据组织ID查询组织名
* @Param agencyId
* @author zxc
* @date 2021/9/10 3:54 下午
*/
String selectAgencyNameByAgencyId(String agencyId);
/**
* @Description 根据组织Id判断查询直属下级组织/网格列表组织存在子客户的查询包含子客户组织数据
* @author sun
*/
ScreenAgencyOrGridListDTO getSubAgencyOrGridList(String agencyId);
}

63
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java

@ -2,10 +2,12 @@ package com.epmet.dataaggre.service.evaluationindex.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.dao.evaluationindex.EvaluationIndexDao;
import com.epmet.dataaggre.dto.datastats.form.GovrnRatioFormDTO;
import com.epmet.dataaggre.dto.datastats.result.GovrnRatioResultDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenAgencyOrGridListDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerAgencyDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerGridDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenGovernRankDataDailyDTO;
@ -143,4 +145,65 @@ public class EvaluationIndexServiceImpl implements EvaluationIndexService {
}
}
/**
* @Description 根据组织ID查询组织名
* @Param agencyId
* @author zxc
* @date 2021/9/10 3:54 下午
*/
@Override
public String selectAgencyNameByAgencyId(String agencyId) {
return evaluationIndexDao.selectAgencyNameByAgencyId(agencyId);
}
/**
* @Description 根据组织Id判断查询直属下级组织/网格列表组织存在子客户的查询包含子客户组织数据
* @author sun
*/
@Override
public ScreenAgencyOrGridListDTO getSubAgencyOrGridList(String agencyId) {
ScreenAgencyOrGridListDTO resultDTO = new ScreenAgencyOrGridListDTO();
List<ScreenAgencyOrGridListDTO.AgencyGrid> agencyGridList = new ArrayList<>();
//1.查询组织信息
ScreenCustomerAgencyDTO dto = evaluationIndexDao.getByAgencyId(agencyId);
if (dto == null) {
log.error(String.format("组织信息不存在,组织Id->%s"), agencyId);
return new ScreenAgencyOrGridListDTO();
}
//2.根据组织级别判断查询直属组织或网格列表
List<ScreenCustomerAgencyDTO> agencyList = new ArrayList<>();
List<ScreenCustomerGridDTO> gridList = new ArrayList<>();
List<ScreenAgencyOrGridListDTO.AgencyGrid> finalAgencyGridList = agencyGridList;
if (!"community".equals(dto.getLevel())) {
//2-1.直属下级组织列表
//2.判断客户是否存在子客户
List<String> list = customerRelation.haveSubCustomer(dto.getCustomerId());
if (!CollectionUtils.isNotEmpty(list)) {
agencyList = evaluationIndexDao.getSubAgencyListByAgency(agencyId, null, null);
} else {
list.add(dto.getCustomerId());
agencyList = evaluationIndexDao.getSubAgencyListByAgency(null, dto.getAreaCode(), list);
}
agencyList.forEach(gr->{
ScreenAgencyOrGridListDTO.AgencyGrid org = new ScreenAgencyOrGridListDTO.AgencyGrid();
org.setOrgId(gr.getAgencyId());
org.setOrgName(gr.getAgencyName());
finalAgencyGridList.add(org);
});
} else {
//2-2.直属下级网格列表
gridList = evaluationIndexDao.getSubGridList(agencyId);
gridList.forEach(gr->{
ScreenAgencyOrGridListDTO.AgencyGrid org = new ScreenAgencyOrGridListDTO.AgencyGrid();
org.setOrgId(gr.getGridId());
org.setOrgName(gr.getGridName());
finalAgencyGridList.add(org);
});
}
resultDTO.setLevel(dto.getLevel());
resultDTO.setAgencyGridList(agencyGridList);
return resultDTO;
}
}

201
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml

@ -797,4 +797,205 @@
GROUP BY staff_id
</select>
<select id="regUserList" resultType="com.epmet.dataaggre.dto.datastats.result.CustomerDataManageResultDTO$CustomerDataManage">
SELECT
t.orgId, t.dateId, t.userCount, t.partyMemberCount,t.residentCount
FROM
(
SELECT DISTINCT
date_id dateId, reg_total userCount, partymember_total partyMemberCount, (reg_total - partymember_total) residentCount
<choose>
<when test='dataType == "agency"'>
, agency_id orgId
FROM fact_reg_user_agency_daily
WHERE del_flag = '0'
<foreach collection="idList" item="id" open="AND agency_id IN (" separator="," close=")">
#{id}
</foreach>
</when>
<otherwise>
, grid_id orgId
FROM fact_reg_user_grid_daily
WHERE del_flag = '0'
<foreach collection="idList" item="id" open="AND grid_id IN (" separator="," close=")">
#{id}
</foreach>
</otherwise>
</choose>
<if test='sourceType != "" and sourceType == "start" and startTime != "" and startTime != null '>
AND date_id <![CDATA[>=]]> #{startTime}
ORDER BY date_id ASC
</if>
<if test='sourceType != "" and sourceType == "end" and endTime != "" and endTime != null '>
AND date_id <![CDATA[<=]]> #{endTime}
ORDER BY date_id DESC
</if>
<choose>
<when test='dataType == "agency"'>, agency_id ASC</when>
<otherwise>, grid_id ASC</otherwise>
</choose>
) t
GROUP BY t.orgId
</select>
<select id="groupList" resultType="com.epmet.dataaggre.dto.datastats.result.CustomerDataManageResultDTO$CustomerDataManage">
SELECT
t.orgId, t.dateId, t.groupCount
FROM
(
SELECT DISTINCT
date_id dateId, group_total groupCount
<choose>
<when test='dataType == "agency"'>
, agency_id orgId
FROM fact_group_total_agency_daily
WHERE del_flag = '0'
<foreach collection="idList" item="id" open="AND agency_id IN (" separator="," close=")">
#{id}
</foreach>
</when>
<otherwise>
, grid_id orgId
FROM fact_group_total_grid_daily
WHERE del_flag = '0'
<foreach collection="idList" item="id" open="AND grid_id IN (" separator="," close=")">
#{id}
</foreach>
</otherwise>
</choose>
<if test='sourceType != "" and sourceType == "start" and startTime != "" and startTime != null '>
AND date_id <![CDATA[>=]]> #{startTime}
ORDER BY date_id ASC
</if>
<if test='sourceType != "" and sourceType == "end" and endTime != "" and endTime != null '>
AND date_id <![CDATA[<=]]> #{endTime}
ORDER BY date_id DESC
</if>
<choose>
<when test='dataType == "agency"'>, agency_id ASC</when>
<otherwise>, grid_id ASC</otherwise>
</choose>
) t
GROUP BY t.orgId
</select>
<select id="topicList" resultType="com.epmet.dataaggre.dto.datastats.result.CustomerDataManageResultDTO$CustomerDataManage">
SELECT
t.orgId, t.dateId, t.topicCount
FROM
(
SELECT DISTINCT
date_id dateId, topic_total topicCount
<choose>
<when test='dataType == "agency"'>
, agency_id orgId
FROM fact_topic_total_agency_daily
WHERE del_flag = '0'
<foreach collection="idList" item="id" open="AND agency_id IN (" separator="," close=")">
#{id}
</foreach>
</when>
<otherwise>
, grid_id orgId
FROM fact_topic_total_grid_daily
WHERE del_flag = '0'
<foreach collection="idList" item="id" open="AND grid_id IN (" separator="," close=")">
#{id}
</foreach>
</otherwise>
</choose>
<if test='sourceType != "" and sourceType == "start" and startTime != "" and startTime != null '>
AND date_id <![CDATA[>=]]> #{startTime}
ORDER BY date_id ASC
</if>
<if test='sourceType != "" and sourceType == "end" and endTime != "" and endTime != null '>
AND date_id <![CDATA[<=]]> #{endTime}
ORDER BY date_id DESC
</if>
<choose>
<when test='dataType == "agency"'>, agency_id ASC</when>
<otherwise>, grid_id ASC</otherwise>
</choose>
) t
GROUP BY t.orgId
</select>
<select id="issueList" resultType="com.epmet.dataaggre.dto.datastats.result.CustomerDataManageResultDTO$CustomerDataManage">
SELECT
t.orgId, t.dateId, t.issueCount
FROM
(
SELECT DISTINCT
date_id dateId, issue_total issueCount
<choose>
<when test='dataType == "agency"'>
, agency_id orgId
FROM fact_issue_agency_daily
WHERE del_flag = '0'
<foreach collection="idList" item="id" open="AND agency_id IN (" separator="," close=")">
#{id}
</foreach>
</when>
<otherwise>
, grid_id orgId
FROM fact_issue_grid_daily
WHERE del_flag = '0'
<foreach collection="idList" item="id" open="AND grid_id IN (" separator="," close=")">
#{id}
</foreach>
</otherwise>
</choose>
<if test='sourceType != "" and sourceType == "start" and startTime != "" and startTime != null '>
AND date_id <![CDATA[>=]]> #{startTime}
ORDER BY date_id ASC
</if>
<if test='sourceType != "" and sourceType == "end" and endTime != "" and endTime != null '>
AND date_id <![CDATA[<=]]> #{endTime}
ORDER BY date_id DESC
</if>
<choose>
<when test='dataType == "agency"'>, agency_id ASC</when>
<otherwise>, grid_id ASC</otherwise>
</choose>
) t
GROUP BY t.orgId
</select>
<select id="projectList" resultType="com.epmet.dataaggre.dto.datastats.result.CustomerDataManageResultDTO$CustomerDataManage">
SELECT
t.orgId, t.dateId, t.projectCount, t.closedProjectCount
FROM
(
SELECT DISTINCT
date_id dateId, project_total projectCount, closed_total closedProjectCount
<choose>
<when test='dataType == "agency"'>
, agency_id orgId
FROM fact_agency_project_daily
WHERE del_flag = '0'
<foreach collection="idList" item="id" open="AND agency_id IN (" separator="," close=")">
#{id}
</foreach>
</when>
<otherwise>
, grid_id orgId
FROM fact_grid_project_daily
WHERE del_flag = '0'
<foreach collection="idList" item="id" open="AND grid_id IN (" separator="," close=")">
#{id}
</foreach>
</otherwise>
</choose>
<if test='sourceType != "" and sourceType == "start" and startTime != "" and startTime != null '>
AND date_id <![CDATA[>=]]> #{startTime}
ORDER BY date_id ASC
</if>
<if test='sourceType != "" and sourceType == "end" and endTime != "" and endTime != null '>
AND date_id <![CDATA[<=]]> #{endTime}
ORDER BY date_id DESC
</if>
<choose>
<when test='dataType == "agency"'>, agency_id ASC</when>
<otherwise>, grid_id ASC</otherwise>
</choose>
) t
GROUP BY t.orgId
</select>
</mapper>

41
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/StatsStaffPatrolRecordDailyDao.xml

@ -15,4 +15,45 @@
</foreach>
</select>
<select id="patrolList" resultType="com.epmet.dataaggre.dto.datastats.result.CustomerDataManageResultDTO$CustomerDataManage">
SELECT
t.dateId, t.orgId, t.staffId, sum(t.patrol_total) patrolCount, SUM(t.total_time) patrolDurationInteger
FROM (
SELECT
date_id dateId, grid_id, staff_id staffId, patrol_total , total_time
<choose>
<when test='dataType == "agency"'>
, agency_id orgId
</when>
<otherwise>
, grid_id orgId
</otherwise>
</choose>
FROM
stats_staff_patrol_record_daily
WHERE del_flag = '0'
AND patrol_total > 0
<choose>
<when test='dataType == "agency"'>
<foreach collection="idList" item="id" open="AND agency_id IN (" separator="," close=")">
#{id}
</foreach>
</when>
<otherwise>
<foreach collection="idList" item="id" open="AND grid_id IN (" separator="," close=")">
#{id}
</foreach>
</otherwise>
</choose>
<if test='type != "" and type == "Interval" and startTime != "" and startTime != null '>
AND date_id <![CDATA[>=]]> #{startTime}
</if>
<if test='endTime != "" and endTime != null '>
AND date_id <![CDATA[<=]]> #{endTime}
</if>
) t
GROUP BY t.grid_id, t.staffId
</select>
</mapper>

7
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/evaluationindex/EvaluationIndexDao.xml

@ -175,4 +175,11 @@
</if>
</select>
<!-- 根据组织ID查询组织名 -->
<select id="selectAgencyNameByAgencyId" resultType="java.lang.String">
SELECT AGENCY_NAME FROM screen_customer_agency
WHERE AGENCY_ID = #{agencyId}
AND DEL_FLAG = 0
</select>
</mapper>

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java

@ -4,6 +4,7 @@ import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.utils.Pinyin4jUtil;
import com.epmet.commons.tools.utils.UniqueIdGenerator;
import com.epmet.entity.evaluationindex.screen.IndexDictEntity;
import com.epmet.entity.evaluationindex.screen.IndexGroupDetailTemplateEntity;
@ -13,7 +14,6 @@ import com.epmet.service.evaluationindex.screen.IndexGroupDetailService;
import com.epmet.service.evaluationindex.screen.IndexGroupDetailTemplateService;
import com.epmet.service.evaluationindex.screen.IndexGroupTemplateService;
import com.epmet.support.normalizing.Correlation;
import com.epmet.util.Pinyin4jUtil;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexModel.java

@ -2,7 +2,7 @@ package com.epmet.model;
import com.alibaba.excel.annotation.ExcelProperty;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.util.Pinyin4jUtil;
import com.epmet.commons.tools.utils.Pinyin4jUtil;
import lombok.Data;
@Data

31
epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java

@ -401,4 +401,35 @@ public class OssController {
return ossService.uploadImgV2(file, PrivacyType.EXTERNAL, customerId);
}
/**
* @Description 办事指南上传附件
* @Param file
* @Param customerId
* @Return {@link Result< UploadImgResultDTO>}
* @Author zhaoqifeng
* @Date 2021/9/8 17:14
*/
@PostMapping("upload-guide-file")
public Result<UploadImgResultDTO> uploadGuideFile(@RequestPart(value = "file") MultipartFile file, @RequestParam("customerId") String customerId) {
String fileName = file.getOriginalFilename();
String format = "-" + fileName.substring(fileName.lastIndexOf(".") + NumConstant.ONE) + "-";
format = format.toLowerCase();
// 体积限制
int sizeMb = 10;
// 大小限制10m
int sizeThreshold = sizeMb * 1024 * 1024;
if (file.getSize() > sizeThreshold) {
throw new RenException(EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getCode(),
EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getMsg().concat(",限制在").concat(String.valueOf(sizeMb)).concat("M以内"));
}
// 格式限制,只允许png和jpeg
if (!ModuleConstant.GUIDE_FILE_DOC.contains(format)) {
throw new RenException(EpmetErrorCode.OPER_UPLOAD_FILE_TYPE_ERROR.getCode()
, EpmetErrorCode.OPER_UPLOAD_FILE_TYPE_ERROR.getMsg());
}
return ossService.uploadImgV2(file, PrivacyType.EXTERNAL, customerId);
}
}

1
epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/utils/ModuleConstant.java

@ -43,6 +43,7 @@ public interface ModuleConstant extends Constant {
* 项目附件-允许的文件类型
*/
String PROJECT_FILE_DOC = "-pdf-ppt-pptx-doc-docx-xls-xlsx-";
String GUIDE_FILE_DOC = "-pdf-doc-docx-xls-xlsx-";
/**
* 项目附件-允许的音频类型
*/

5
epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/BizPointUserTotalDetailDTO.java

@ -17,9 +17,10 @@
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
@ -103,4 +104,6 @@ public class BizPointUserTotalDetailDTO implements Serializable {
*/
private Date updatedTime;
private String rank;
}

46
epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/AllPartyFormDTO.java

@ -0,0 +1,46 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.constant.NumConstant;
import lombok.Data;
import javax.validation.constraints.Min;
import java.io.Serializable;
import java.util.List;
/**
* @Author zxc
* @DateTime 2021/9/6 3:13 下午
* @DESC
*/
@Data
public class AllPartyFormDTO implements Serializable {
private static final long serialVersionUID = -600409785611581009L;
/**
* 页码
**/
private Integer pageNo = NumConstant.ONE;
/**
* 每页数据条数
**/
private Integer pageSize = NumConstant.TEN;
/**
* 本月 monthly 总排行 all;
* */
private String type;
/**
* 认证成功的党员 的用户ID
* */
private List<String> userIds;
/**
* 客户ID
*/
private String customerId;
}

3
epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/GroupPointFormDTO.java

@ -17,8 +17,9 @@ public class GroupPointFormDTO implements Serializable {
public interface GroupPoint extends CustomerClientShowGroup {}
public interface GridRank extends CustomerClientShowGroup {}
public interface PointRank extends CustomerClientShowGroup {}
@NotBlank(message = "小组Id不能为空", groups = {GroupPoint.class, GridRank.class})
private String groupId;
@NotBlank(message = "网格Id不能为空", groups = {GridRank.class})
@NotBlank(message = "网格Id不能为空", groups = {GridRank.class, PointRank.class})
private String gridId;
}

49
epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/AllPartyResultDTO.java

@ -0,0 +1,49 @@
package com.epmet.dto.result;
import com.epmet.commons.tools.constant.NumConstant;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/9/6 3:12 下午
* @DESC
*/
@Data
public class AllPartyResultDTO implements Serializable {
private static final long serialVersionUID = -5889648842876122793L;
/**
* 排序
**/
private Integer ranking;
/**
* 积分
**/
private Integer point;
/**
* 头像
**/
private String userHeadPhoto;
/**
* 名称
**/
private String realName;
/**
* 用户id
**/
private String userId;
public AllPartyResultDTO() {
this.point = NumConstant.ZERO;
this.userHeadPhoto = "";
this.realName = "";
this.userId = "";
}
}

21
epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/GridPointRankResultDTO.java

@ -0,0 +1,21 @@
package com.epmet.dto.result;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2021/9/10 14:11
*/
@NoArgsConstructor
@Data
public class GridPointRankResultDTO implements Serializable {
private static final long serialVersionUID = 3288606889536923166L;
private String gridName;
private String agencyRank;
private String customerRank;
}

21
epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/MyPointRankResultDTO.java

@ -0,0 +1,21 @@
package com.epmet.dto.result;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2021/9/10 13:44
*/
@NoArgsConstructor
@Data
public class MyPointRankResultDTO implements Serializable {
private static final long serialVersionUID = -2438231097029179782L;
private String headPhoto;
private String gridRank;
private String customerRank;
}

42
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ResiPointController.java

@ -159,6 +159,18 @@ public class ResiPointController {
return new Result<List<ResiAroundPartyPointRankResultDTO>>().ok(resultDTOS);
}
/**
* @Description 全部党员积分排行
* @Param formDTO
* @author zxc
* @date 2021/9/6 3:30 下午
*/
@PostMapping("allparty")
public Result<List<AllPartyResultDTO>> allParty(@RequestBody AllPartyFormDTO formDTO,@LoginUser TokenDto tokenDto){
formDTO.setCustomerId(tokenDto.getCustomerId());
return new Result<List<AllPartyResultDTO>>().ok(userPointStatisticalDailyService.allParty(formDTO));
}
/**
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.MyPointTaskResultDTO>>
* @param tokenDto
@ -178,4 +190,34 @@ public class ResiPointController {
ValidatorUtils.validateEntity(formDTO);
return new Result<List<MyPointTaskResultDTO>>().ok(pointActionLogService.queryMyPointTaskList(formDTO));
}
/**
* @Description 个人当月积分在网格和客户中的排名
* @Param tokenDto
* @Param formDTO
* @Return {@link Result< MyPointTaskResultDTO>}
* @Author zhaoqifeng
* @Date 2021/9/10 14:13
*/
@PostMapping("mypointrank")
public Result<MyPointRankResultDTO> myPointRank(@LoginUser TokenDto tokenDto, @RequestBody GroupPointFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, GroupPointFormDTO.PointRank.class);
return new Result<MyPointRankResultDTO>().ok(userPointStatisticalDailyService.myPointRank(tokenDto, formDTO));
}
/**
* @Description 网格当月积分在组织和客户内排名
* @Param tokenDto
* @Param formDTO
* @Return {@link Result<GridPointRankResultDTO>}
* @Author zhaoqifeng
* @Date 2021/9/10 14:13
*/
@PostMapping("gridpointrank")
public Result<GridPointRankResultDTO> gridPointRank(@LoginUser TokenDto tokenDto, @RequestBody GroupPointFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, GroupPointFormDTO.PointRank.class);
return new Result<GridPointRankResultDTO>().ok(userPointStatisticalDailyService.gridPointRank(tokenDto, formDTO));
}
}

9
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointStatisticalDailyDao.java

@ -18,7 +18,9 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.BizPointUserTotalDetailDTO;
import com.epmet.dto.form.ResiAroundPartyPointRankFormDTO;
import com.epmet.dto.result.AllPartyResultDTO;
import com.epmet.dto.result.ResiAroundPartyPointRankResultDTO;
import com.epmet.dto.result.ResiPointRankResultDTO;
import com.epmet.entity.UserPointStatisticalDailyEntity;
@ -73,6 +75,7 @@ public interface UserPointStatisticalDailyDao extends BaseDao<UserPointStatistic
* @Date 09:24 2020-12-29
**/
List<ResiAroundPartyPointRankResultDTO> selectListGridPartyRankByUsablePoint(ResiAroundPartyPointRankFormDTO formDTO);
List<AllPartyResultDTO> selectListGridPartyNewRankByUsablePoint(ResiAroundPartyPointRankFormDTO formDTO);
/**
* 身边党员-积分排行 按网格统计对本月党员增加的积分 进行排序
@ -82,4 +85,10 @@ public interface UserPointStatisticalDailyDao extends BaseDao<UserPointStatistic
* @Date 09:24 2020-12-29
**/
List<ResiAroundPartyPointRankResultDTO> selectListGridPartyRankByMonth(ResiAroundPartyPointRankFormDTO formDTO);
List<AllPartyResultDTO> selectListGridPartyNewRankByMonth(ResiAroundPartyPointRankFormDTO formDTO);
List<BizPointUserTotalDetailDTO> selectUserPointByMonth(@Param("customerId") String customerId, @Param("agencyId") String agencyId,
@Param("gridId") String gridId);
List<BizPointUserTotalDetailDTO> selectGridPointByMonth(@Param("customerId") String customerId, @Param("agencyId") String agencyId);
}

34
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointStatisticalDailyService.java

@ -19,11 +19,13 @@ package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.dto.UserPointStatisticalDailyDTO;
import com.epmet.dto.form.AllPartyFormDTO;
import com.epmet.dto.form.GroupPointFormDTO;
import com.epmet.dto.form.ResiAroundPartyPointRankFormDTO;
import com.epmet.dto.form.ResiPointRankFormDTO;
import com.epmet.dto.result.ResiAroundPartyPointRankResultDTO;
import com.epmet.dto.result.ResiPointRankListResultDTO;
import com.epmet.dto.result.*;
import com.epmet.entity.UserPointStatisticalDailyEntity;
import java.util.List;
@ -125,4 +127,32 @@ public interface UserPointStatisticalDailyService extends BaseService<UserPointS
* @Date 16:17 2020-12-28
**/
List<ResiAroundPartyPointRankResultDTO> listAroundPartyPointRank(ResiAroundPartyPointRankFormDTO formDTO);
/**
* @Description 全部党员积分排行
* @Param formDTO
* @author zxc
* @date 2021/9/6 3:30 下午
*/
List<AllPartyResultDTO> allParty(AllPartyFormDTO formDTO);
/**
* @Description 个人当月积分在网格和客户中的排名
* @Param tokenDto
* @Param formDTO
* @Return {@link MyPointRankResultDTO}
* @Author zhaoqifeng
* @Date 2021/9/10 14:18
*/
MyPointRankResultDTO myPointRank(TokenDto tokenDto, GroupPointFormDTO formDTO);
/**
* @Description 网格当月积分在组织和客户内排名
* @Param tokenDto
* @Param formDTO
* @Return {@link GridPointRankResultDTO}
* @Author zhaoqifeng
* @Date 2021/9/10 14:18
*/
GridPointRankResultDTO gridPointRank(TokenDto tokenDto, GroupPointFormDTO formDTO);
}

176
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java

@ -23,11 +23,16 @@ import com.epmet.common.enu.AroundPartyConstant;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.UserPointStatisticalDailyDao;
import com.epmet.dto.BizPointUserTotalDetailDTO;
import com.epmet.dto.UserPointStatisticalDailyDTO;
import com.epmet.dto.form.AllPartyFormDTO;
import com.epmet.dto.form.GroupPointFormDTO;
import com.epmet.dto.form.ResiAroundPartyPointRankFormDTO;
import com.epmet.dto.form.ResiPointRankFormDTO;
import com.epmet.dto.result.*;
@ -41,12 +46,14 @@ import com.epmet.utils.DimIdGenerator;
import com.epmet.utils.ModuleConstant;
import com.github.pagehelper.PageHelper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
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.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
/**
@ -292,6 +299,95 @@ public class UserPointStatisticalDailyServiceImpl extends BaseServiceImpl<UserPo
return resultDTOS;
}
/**
* @Description 全部党员积分排行
* @Param formDTO
* @author zxc
* @date 2021/9/6 3:30 下午
*/
@Override
public List<AllPartyResultDTO> allParty(AllPartyFormDTO formDTO) {
formDTO.setPageNo((formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize());
Result<List<PartymemberInfoDTO>> partyMemberInfosResult = resiPartyMemberOpenFeignClient.getPartyMemberInfoByCustomerId(formDTO.getCustomerId());
if (!partyMemberInfosResult.success()){
throw new RenException("查询客户下的党员失败......");
}
if (CollectionUtils.isEmpty(partyMemberInfosResult.getData())){
return new ArrayList<>();
}
List<PartymemberInfoDTO> partyMemberInfos = partyMemberInfosResult.getData();
List<String> userIds = partyMemberInfos.stream().map(m -> m.getUserId()).collect(Collectors.toList());
ResiAroundPartyPointRankFormDTO selDto = ConvertUtils.sourceToTarget(formDTO, ResiAroundPartyPointRankFormDTO.class);
selDto.setUserIds(userIds);
List<AllPartyResultDTO> resultDTOS = new ArrayList<>();
if (AroundPartyConstant.ALL.equals(formDTO.getType())){
resultDTOS = baseDao.selectListGridPartyNewRankByUsablePoint(selDto);
}else if (AroundPartyConstant.MONTHLY.equals(formDTO.getType())){
resultDTOS = baseDao.selectListGridPartyNewRankByMonth(selDto);
}
List<ResiAroundPartyPointRankResultDTO> partyBaseInfo = getPartyBaseInfo(ConvertUtils.sourceToTarget(resultDTOS, ResiAroundPartyPointRankResultDTO.class));
List<AllPartyResultDTO> result = ConvertUtils.sourceToTarget(partyBaseInfo, AllPartyResultDTO.class);
return result;
}
/**
* @param tokenDto
* @param formDTO
* @Description 个人当月积分在网格和客户中的排名
* @Param tokenDto
* @Param formDTO
* @Return {@link MyPointRankResultDTO}
* @Author zhaoqifeng
* @Date 2021/9/10 14:18
*/
@Override
public MyPointRankResultDTO myPointRank(TokenDto tokenDto, GroupPointFormDTO formDTO) {
List<String> userIds = new ArrayList<>();
userIds.add(tokenDto.getUserId());
//获取我的个人信息
Result<List<UserBaseInfoResultDTO>> myInfoResult = epmetUserOpenFeignClient.queryUserBaseInfo(userIds);
if(!myInfoResult.success()){
throw new RenException(myInfoResult.getCode(), myInfoResult.getMsg());
}
MyPointRankResultDTO result = new MyPointRankResultDTO();
result.setHeadPhoto(myInfoResult.getData().get(0).getHeadImgUrl());
//获取客户下用户积分
List<BizPointUserTotalDetailDTO> list = getUserPointList(tokenDto.getCustomerId(), null, null);
result.setCustomerRank(getRank(list, tokenDto.getUserId()));
//获取网格用户积分
List<BizPointUserTotalDetailDTO> gridRankList = getUserPointList(tokenDto.getCustomerId(), null, formDTO.getGridId());
result.setGridRank(getRank(gridRankList, tokenDto.getUserId()));
return result;
}
/**
* @param tokenDto
* @param formDTO
* @Description 网格当月积分在组织和客户内排名
* @Param tokenDto
* @Param formDTO
* @Return {@link GridPointRankResultDTO}
* @Author zhaoqifeng
* @Date 2021/9/10 14:18
*/
@Override
public GridPointRankResultDTO gridPointRank(TokenDto tokenDto, GroupPointFormDTO formDTO) {
GridPointRankResultDTO result = new GridPointRankResultDTO();
//获取网格信息
Result<GridInfoResultDTO> gridInfoResult = govOrgOpenFeignClient.queryGridInfo(formDTO.getGridId());
if (!gridInfoResult.success()) {
throw new RenException(gridInfoResult.getCode());
}
result.setGridName(gridInfoResult.getData().getGridName());
String agencyId = gridInfoResult.getData().getParentAgencyId();
//获取客户下用户积分
List<BizPointUserTotalDetailDTO> list = getGridPointList(tokenDto.getCustomerId(), null);
result.setCustomerRank(getGridRank(list, formDTO.getGridId()));
List<BizPointUserTotalDetailDTO> agencyPointList = getGridPointList(tokenDto.getCustomerId(), agencyId);
result.setAgencyRank(getGridRank(agencyPointList, formDTO.getGridId()));
return result;
}
/**
* 获取认证通过的党员的 用户id
*
@ -338,4 +434,84 @@ public class UserPointStatisticalDailyServiceImpl extends BaseServiceImpl<UserPo
}
return rankResultDTOS;
}
/**
* @Description 获取客户下用户的当月积分
*
* @Param customerId
* @Return {@link List<BizPointUserTotalDetailDTO>}
* @Author zhaoqifeng
* @Date 2021/9/10 15:04
*/
private List<BizPointUserTotalDetailDTO> getUserPointList(String customerId, String agencyId, String gridId) {
return baseDao.selectUserPointByMonth(customerId, agencyId, gridId);
}
private List<BizPointUserTotalDetailDTO> getGridPointList(String customerId, String agencyId) {
return baseDao.selectGridPointByMonth(customerId, agencyId);
}
private Boolean havePoint(List<BizPointUserTotalDetailDTO> list, String userId) {
Map<String, Integer> map = list.stream().collect(Collectors.toMap(BizPointUserTotalDetailDTO::getUserId, BizPointUserTotalDetailDTO::getTotalPoint));
return null != map.get(userId);
}
private String getGridRank(List<BizPointUserTotalDetailDTO> list, String gridId) {
if (CollectionUtils.isEmpty(list)) {
return NumConstant.ONE_STR;
}
//如果当月网格没有积分变动,则积分为0
Map<String, Integer> map = list.stream().collect(Collectors.toMap(BizPointUserTotalDetailDTO::getGridId, BizPointUserTotalDetailDTO::getTotalPoint));
if (null == map.get(gridId)) {
BizPointUserTotalDetailDTO dto = new BizPointUserTotalDetailDTO();
dto.setGridId(gridId);
dto.setTotalPoint(NumConstant.ZERO);
list.add(dto);
}
//排序
list = list.stream().sorted(Comparator.comparing(BizPointUserTotalDetailDTO :: getTotalPoint).reversed()
.thenComparing(BizPointUserTotalDetailDTO::getGridId))
.collect(Collectors.toList());
AtomicInteger i = new AtomicInteger(1);
AtomicInteger point = new AtomicInteger(0);
list.forEach(item -> {
if (item.getTotalPoint().equals(point.get())) {
item.setRank(String.valueOf(i));
} else {
item.setRank(String.valueOf(i.getAndIncrement()));
}
point.set(item.getTotalPoint());
});
Map<String, String> rankMap = list.stream().collect(Collectors.toMap(BizPointUserTotalDetailDTO::getGridId, BizPointUserTotalDetailDTO::getRank));
return rankMap.get(gridId);
}
private String getRank(List<BizPointUserTotalDetailDTO> list, String userId) {
if (CollectionUtils.isEmpty(list)) {
return NumConstant.ONE_STR;
}
if (!havePoint(list, userId)) {
BizPointUserTotalDetailDTO dto = new BizPointUserTotalDetailDTO();
dto.setUserId(userId);
dto.setTotalPoint(NumConstant.ZERO);
list.add(dto);
}
//排序
list = list.stream().sorted(Comparator.comparing(BizPointUserTotalDetailDTO :: getTotalPoint).reversed()
.thenComparing(BizPointUserTotalDetailDTO::getUserId))
.collect(Collectors.toList());
AtomicInteger i = new AtomicInteger(1);
AtomicInteger point = new AtomicInteger(0);
list.forEach(item -> {
if (item.getTotalPoint().equals(point.get())) {
item.setRank(String.valueOf(i));
} else {
item.setRank(String.valueOf(i.getAndIncrement()));
}
point.set(item.getTotalPoint());
});
Map<String, String> map = list.stream().collect(Collectors.toMap(BizPointUserTotalDetailDTO::getUserId, BizPointUserTotalDetailDTO::getRank));
return map.get(userId);
}
}

93
epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointStatisticalDailyDao.xml

@ -184,4 +184,97 @@
ORDER BY P.point DESC
LIMIT #{pageNo}, #{pageSize}
</select>
<select id="selectListGridPartyNewRankByUsablePoint" resultType="com.epmet.dto.result.AllPartyResultDTO">
SET @curRank = 0;
SELECT
@curRank := @curRank + 1 AS ranking,
@point := IFNULL(p.USABLE_POINT, 0),
IFNULL(p.USABLE_POINT, 0) point,
p.USER_ID userId
FROM user_point_total p
<if test="null != userIds and userIds.size() > 0">
WHERE p.USER_ID IN
<foreach collection="userIds" item="userId" open="(" separator="," close=" )">
#{userId}
</foreach>
</if>
ORDER BY IFNULL(p.USABLE_POINT, 0) DESC
LIMIT #{pageNo}, #{pageSize}
</select>
<select id="selectListGridPartyNewRankByMonth" resultType="com.epmet.dto.result.AllPartyResultDTO">
SET @curRank = 0;
SELECT
@curRank := @curRank + 1 AS ranking,
@point := p.point,
P.userId,
P.point
FROM(
SELECT
pl.USER_ID userId,
SUM(PL.POINT) point
FROM user_point_action_log pl
WHERE pl.DEL_FLAG = '0' AND DATE_FORMAT(pl.CREATED_TIME, '%Y%m')= DATE_FORMAT( CURDATE( ) , '%Y%m' ) AND pl.action_flag = 'plus'
GROUP BY pl.USER_ID
) P
<if test="null != userIds and userIds.size() > 0">
WHERE userId IN
<foreach collection="userIds" item="userId" open="(" separator="," close=" )">
#{userId}
</foreach>
</if>
ORDER BY P.point DESC
LIMIT #{pageNo}, #{pageSize}
</select>
<select id="selectUserPointByMonth" resultType="com.epmet.dto.BizPointUserTotalDetailDTO">
SELECT
a.CUSTOMER_ID,
a.AGENCY_ID,
a.GRID_ID,
a.USER_ID,
SUM( POINT ) AS TOTAL_POINT
FROM
biz_point_user_total_detail a
INNER JOIN user_point_action_log b ON a.USER_ID = b.USER_ID
AND b.CUSTOMER_ID = #{customerId}
AND DATE_FORMAT( b.CREATED_TIME, '%Y%m' )= DATE_FORMAT( CURDATE( ), '%Y%m' )
AND b.DEL_FLAG = '0'
WHERE
a.DEL_FLAG = '0'
AND a.CUSTOMER_ID = #{customerId}
<if test="null != agencyId and agencyId != ''">
AND a.AGENCY_ID = #{agencyId}
</if>
<if test="null != gridId and gridId != ''">
AND a.GRID_ID = #{gridId}
</if>
GROUP BY a.CUSTOMER_ID,
a.AGENCY_ID,
a.GRID_ID,
a.USER_ID
</select>
<select id="selectGridPointByMonth" resultType="com.epmet.dto.BizPointUserTotalDetailDTO">
SELECT
a.CUSTOMER_ID,
a.AGENCY_ID,
a.GRID_ID,
SUM( POINT ) AS TOTAL_POINT
FROM
biz_point_user_total_detail a
INNER JOIN user_point_action_log b ON a.USER_ID = b.USER_ID
AND b.CUSTOMER_ID = #{customerId}
AND DATE_FORMAT( b.CREATED_TIME, '%Y%m' )= DATE_FORMAT( CURDATE( ), '%Y%m' )
AND b.DEL_FLAG = '0'
WHERE
a.DEL_FLAG = '0'
AND a.CUSTOMER_ID = #{customerId}
<if test="null != agencyId and agencyId != ''">
AND a.AGENCY_ID = #{agencyId}
</if>
GROUP BY a.CUSTOMER_ID,
a.AGENCY_ID,
a.GRID_ID
</select>
</mapper>

18
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/GetAgencyListFormDTO.java

@ -0,0 +1,18 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/9/13 3:20 下午
* @DESC
*/
@Data
public class GetAgencyListFormDTO implements Serializable {
private static final long serialVersionUID = -5846836779036328298L;
private String customerId;
}

17
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/OrgFormDTO.java

@ -0,0 +1,17 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2021/9/7 15:41
*/
@Data
public class OrgFormDTO implements Serializable {
private static final long serialVersionUID = -5975063766883885089L;
private String orgId;
private String orgType;
}

31
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyTreeResultDTO.java

@ -0,0 +1,31 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @Description
* @Author zhaoqifeng
* @Date 2021/9/8 15:06
*/
@Data
public class AgencyTreeResultDTO implements Serializable {
private static final long serialVersionUID = -311212619121062367L;
/**
* 机关组织Id
*/
private String agencyId;
/**
* 机关组织名称
*/
private String agencyName;
private String pid;
/**
* 下级机关组织
*/
private List<AgencyTreeResultDTO> subAgencyList;
}

27
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/StaffOrgListResultDTO.java

@ -0,0 +1,27 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2021/9/8 15:11
*/
@Data
public class StaffOrgListResultDTO implements Serializable {
private static final long serialVersionUID = -7717333635633000120L;
/**
* 组织ID
*/
private String orgId;
/**
* 组织名称
*/
private String orgName;
/**
* 组织类型机关agency 网格grid 部门dept
*/
private String orgType;
}

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

@ -417,4 +417,14 @@ public interface GovOrgOpenFeignClient {
*/
@PostMapping("/gov/org/customerstaffagency/queryOrgStaffs")
Result<Set<String>> queryOrgStaffs(@RequestBody OrgStaffFormDTO formDTO);
/**
* @Description 根据组织或网格或吧部门获取组织信息
* @Param formDTO
* @Return {@link Result<OrgResultDTO>}
* @Author zhaoqifeng
* @Date 2021/9/7 15:27
*/
@PostMapping("/gov/org/customeragency/getAgencyInfo")
Result<OrgResultDTO> getAgencyInfo(@RequestBody OrgFormDTO formDTO);
}

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

@ -248,6 +248,19 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "queryOrgStaffs", formDTO);
}
/**
* @param formDTO
* @Description 根据组织或网格或吧部门获取组织信息
* @Param formDTO
* @Return {@link Result<OrgResultDTO>}
* @Author zhaoqifeng
* @Date 2021/9/7 15:27
*/
@Override
public Result<OrgResultDTO> getAgencyInfo(OrgFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getAgencyInfo", formDTO);
}
@Override
public Result<String> selectPidsByGridId(String gridId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "selectPidsByGridId", gridId);

27
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java

@ -312,4 +312,31 @@ public class CustomerAgencyController {
return new Result<ExtStaffPermissionResultDTO>().ok(customerAgencyService.staffPermissionExt(tokenDto.getUserId()));
}
/**
* @Description 根据组织或网格或吧部门获取组织信息
* @Param formDTO
* @Return {@link Result<OrgResultDTO>}
* @Author zhaoqifeng
* @Date 2021/9/7 15:27
*/
@PostMapping("getAgencyInfo")
public Result<OrgResultDTO> getAgencyInfo(@RequestBody OrgFormDTO formDTO) {
return new Result<OrgResultDTO>().ok(customerAgencyService.getAgencyInfo(formDTO));
}
/**
* @Description 获取客户下组织树
* @Param tokenDTO
* @Return {@link Result< AgencyTreeResultDTO >}
* @Author zhaoqifeng
* @Date 2021/9/8 15:20
*/
@PostMapping("agencylist")
public Result<AgencyTreeResultDTO> getAgencyList(@LoginUser TokenDto tokenDTO,@RequestBody GetAgencyListFormDTO formDTO) {
if (StringUtils.isBlank(formDTO.getCustomerId())){
formDTO.setCustomerId(tokenDTO.getCustomerId());
}
return new Result<AgencyTreeResultDTO>().ok(customerAgencyService.getAgencyList(formDTO));
}
}

12
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java

@ -195,4 +195,16 @@ public class StaffController {
return staffService.addStaffV2(fromDTO);
}
/**
* @Description 用户所属组织
* @Param tokenDto
* @Return {@link Result< StaffOrgListResultDTO>}
* @Author zhaoqifeng
* @Date 2021/9/8 16:55
*/
@PostMapping("orgList")
public Result<List<StaffOrgListResultDTO>> staffOrgList(@LoginUser TokenDto tokenDto) {
return new Result<List<StaffOrgListResultDTO>>().ok(staffService.staffOrgList(tokenDto));
}
}

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

@ -239,4 +239,8 @@ public interface CustomerAgencyDao extends BaseDao<CustomerAgencyEntity> {
* @author sun
*/
OrgResultDTO selectAgencyDetail(@Param("orgId") String orgId, @Param("orgType") String orgType);
AgencyTreeResultDTO getAllAgency(@Param("customerId") String customerId);
List<AgencyTreeResultDTO> getSubAgencyList(@Param("pid") String pid);
}

19
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java

@ -19,6 +19,7 @@ package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.form.*;
@ -236,4 +237,22 @@ public interface CustomerAgencyService extends BaseService<CustomerAgencyEntity>
OrganizeTreeResultDTO organizeTree(String agencyId);
void checkAgencyName(String agencyName,String customerId,String agencyId,String parentAgencyId);
/**
* 根据组织或网格或吧部门获取组织信息
* @Param formDTO
* @Return {@link OrgResultDTO}
* @Author zhaoqifeng
* @Date 2021/9/7 15:28
*/
OrgResultDTO getAgencyInfo(OrgFormDTO formDTO);
/**
* @Description 获取客户下组织树
* @Param tokenDTO
* @Return {@link AgencyTreeResultDTO}
* @Author zhaoqifeng
* @Date 2021/9/8 15:21
*/
AgencyTreeResultDTO getAgencyList(GetAgencyListFormDTO formDTO);
}

9
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/StaffService.java

@ -129,4 +129,13 @@ public interface StaffService {
* @author sun
*/
Result addStaffV2(AddStaffV2FromDTO fromDTO);
/**
* @Description 工作人员所属组织
* @Param tokenDto
* @Return {@link StaffOrgListResultDTO}
* @Author zhaoqifeng
* @Date 2021/9/8 16:57
*/
List<StaffOrgListResultDTO> staffOrgList(TokenDto tokenDto);
}

28
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java

@ -25,6 +25,7 @@ import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.CustomerAgencyConstant;
@ -1075,4 +1076,31 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl<CustomerAgencyDao
}
}
/**
* 根据组织或网格或吧部门获取组织信息
*
* @param formDTO
* @Param formDTO
* @Return {@link OrgResultDTO}
* @Author zhaoqifeng
* @Date 2021/9/7 15:28
*/
@Override
public OrgResultDTO getAgencyInfo(OrgFormDTO formDTO) {
return baseDao.selectAgencyDetail(formDTO.getOrgId(), formDTO.getOrgType());
}
/**
* @param tokenDTO
* @Description 获取客户下组织树
* @Param tokenDTO
* @Return {@link AgencyTreeResultDTO}
* @Author zhaoqifeng
* @Date 2021/9/8 15:21
*/
@Override
public AgencyTreeResultDTO getAgencyList(GetAgencyListFormDTO formDTO) {
return baseDao.getAllAgency(formDTO.getCustomerId());
}
}

51
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java

@ -11,9 +11,7 @@ import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.CustomerAgencyConstant;
import com.epmet.constant.OrgInfoConstant;
import com.epmet.dao.CustomerAgencyDao;
import com.epmet.dao.CustomerStaffAgencyDao;
import com.epmet.dto.*;
import com.epmet.dto.form.*;
@ -21,6 +19,7 @@ import com.epmet.dto.result.*;
import com.epmet.entity.*;
import com.epmet.feign.*;
import com.epmet.service.*;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -30,6 +29,7 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
@ -566,5 +566,52 @@ public class StaffServiceImpl implements StaffService {
return new Result();
}
/**
* @param tokenDto
* @Description 工作人员所属组织
* @Param tokenDto
* @Return {@link StaffOrgListResultDTO}
* @Author zhaoqifeng
* @Date 2021/9/8 16:57
*/
@Override
public List<StaffOrgListResultDTO> staffOrgList(TokenDto tokenDto) {
//redis获取工作人员信息
CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId());
if (null == staffInfoCache) {
return Collections.emptyList();
}
List<StaffOrgListResultDTO> list = new ArrayList<>();
//工作人员所在组织
StaffOrgListResultDTO agency = new StaffOrgListResultDTO();
agency.setOrgId(staffInfoCache.getAgencyId());
agency.setOrgName(staffInfoCache.getAgencyName());
agency.setOrgType(OrgInfoConstant.AGENCY);
list.add(agency);
//工作人员所在部门
if(CollectionUtils.isNotEmpty(staffInfoCache.getDeptList())) {
List<StaffOrgListResultDTO> deptList = staffInfoCache.getDeptList().stream().map(item -> {
StaffOrgListResultDTO dto = new StaffOrgListResultDTO();
dto.setOrgId(item.getId());
dto.setOrgName(item.getName());
dto.setOrgType(OrgInfoConstant.DEPT);
return dto;
}).collect(Collectors.toList());
list.addAll(deptList);
}
//工作人员所在网格
if(CollectionUtils.isNotEmpty(staffInfoCache.getGridList())) {
List<StaffOrgListResultDTO> gridList = staffInfoCache.getGridList().stream().map(item -> {
StaffOrgListResultDTO dto = new StaffOrgListResultDTO();
dto.setOrgId(item.getId());
dto.setOrgName(item.getName());
dto.setOrgType(OrgInfoConstant.GRID);
return dto;
}).collect(Collectors.toList());
list.addAll(gridList);
}
return list;
}
}

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

@ -503,5 +503,40 @@
</otherwise>
</choose>
</select>
<resultMap id="BaseResultMap" type="com.epmet.dto.result.AgencyTreeResultDTO">
<result column="agencyId" property="agencyId"/>
<result column="agencyName" property="agencyName"/>
<result column="pid" property="pid"/>
</resultMap>
<resultMap id="NodeTreeResult" type="com.epmet.dto.result.AgencyTreeResultDTO"
extends="BaseResultMap">
<collection property="subAgencyList" column="agencyId" ofType="com.epmet.dto.result.AgencyTreeResultDTO"
javaType="java.util.ArrayList" select="getSubAgencyList">
</collection>
</resultMap>
<select id="getSubAgencyList" resultMap="NodeTreeResult">
select
ID AS agencyId,
ORGANIZATION_NAME AS agencyName,
PID
from customer_agency
where
DEL_FLAG = 0
AND PID= #{pid}
ORDER BY ID
</select>
<select id="getAllAgency" resultMap="NodeTreeResult">
select
ID AS agencyId,
ORGANIZATION_NAME AS agencyName,
PID
from
customer_agency
where
DEL_FLAG = 0
AND PID ='0'
AND CUSTOMER_ID = #{customerId}
</select>
</mapper>

22
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/AttachmentDTO.java

@ -0,0 +1,22 @@
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2021/9/7 16:21
*/
@Data
public class AttachmentDTO implements Serializable {
private static final long serialVersionUID = 6505979559566901869L;
private String name;
private String format;
private String type;
private String url;
private Integer size;
private Integer duration;
}

56
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ExternalLinkDTO.java

@ -0,0 +1,56 @@
/**
* 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-09-06
*/
@Data
public class ExternalLinkDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 链接说明
*/
private String description;
/**
* 外部链接
*/
private String externalLink;
/**
* 外部链接
*/
private Integer sort;
}

117
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideAttachmentDTO.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.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 办事指南附件
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Data
public class GuideAttachmentDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 唯一标识
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 办事指南ID
*/
private String guideId;
/**
* 附件名
*/
private String attachmentName;
/**
* 文件大小 单位byte
*/
private Integer attachmentSize;
/**
* 文件格式 wordexcelpdf
*/
private String attachmentFormat;
/**
* 类型
*/
private String attachmentType;
/**
* 附件地址
*/
private String attachmentUrl;
/**
* 语音或视频时长
*/
private Integer duration;
/**
* 排序
*/
private Integer sort;
/**
* 删除标识 0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

104
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideCategoryDTO.java

@ -0,0 +1,104 @@
/**
* 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 com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 指南分类
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-08
*/
@Data
public class GuideCategoryDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户id产品默认配置此列存储default
*/
private String customerId;
/**
* 分类名,客户内唯一
*/
private String categoryName;
/**
* 分类编码分类名的全拼; eggongjijin
*/
private String categoryCode;
/**
* 排序
*/
private Integer sort;
/**
* 状态 禁用disable 启用enable
*/
private String status;
/**
* 删除标识 0未删除1已删除
*/
@JsonIgnore
private String delFlag;
/**
* 乐观锁
*/
@JsonIgnore
private Integer revision;
/**
* 创建人
*/
@JsonIgnore
private String createdBy;
/**
* 创建时间
*/
@JsonIgnore
private Date createdTime;
/**
* 更新人
*/
@JsonIgnore
private String updatedBy;
/**
* 更新时间
*/
@JsonIgnore
private Date updatedTime;
}

91
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideCollectionDTO.java

@ -0,0 +1,91 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 指南收藏表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Data
public class GuideCollectionDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户id
*/
private String customerId;
/**
* 指南ID
*/
private String guideId;
/**
* 用户ID
*/
private String userId;
/**
* 用户所属客户端 居民端resi 工作端gov
*/
private String app;
/**
* 删除标识 0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

112
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideDTO.java

@ -0,0 +1,112 @@
/**
* 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;
import java.util.Date;
/**
* 办事指南表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Data
public class GuideDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID 唯一标识
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 发布单位类型 机关agency 网格grid 部门dept
*/
private String orgType;
/**
* 发布单位ID
*/
private String orgId;
/**
* 发布单位名称
*/
private String orgName;
/**
* 所属组织机构IDcustomer_agency.id
*/
private String pid;
/**
* 所有上级组织ID,英文:隔开
*/
private String pids;
/**
* 标题
*/
private String title;
/**
* 分类ID
*/
private String categoryCode;
/**
* 删除标识:0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

96
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideExternalLinkDTO.java

@ -0,0 +1,96 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 指南外链表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Data
public class GuideExternalLinkDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户id
*/
private String customerId;
/**
* 指南ID
*/
private String guideId;
/**
* 链接说明
*/
private String description;
/**
* 外部链接
*/
private String externalLink;
/**
* 排序
*/
private Integer sort;
/**
* 删除标识 0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

91
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideModuleDTO.java

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

96
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideModuleDictDTO.java

@ -0,0 +1,96 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 指南模块字典表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Data
public class GuideModuleDictDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户id
*/
private String customerId;
/**
* 模块key
*/
private String moduleValue;
/**
* 模块名
*/
private String moduleName;
/**
* 排序
*/
private Integer sort;
/**
* 状态 禁用disable 启用enable
*/
private String status;
/**
* 删除标识 0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

91
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideModuleDictDefaultDTO.java

@ -0,0 +1,91 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 指南模块默认字典表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Data
public class GuideModuleDictDefaultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 模块key
*/
private String moduleValue;
/**
* 模块名
*/
private String moduleName;
/**
* 排序
*/
private Integer sort;
/**
* 状态 禁用disable 启用enable
*/
private String status;
/**
* 删除标识 0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

58
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ModuleDTO.java

@ -0,0 +1,58 @@
/**
* 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-09-06
*/
@Data
public class ModuleDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String guideModuleId;
/**
* 主键
*/
private String moduleId;
/**
* 模块key
*/
private String moduleValue;
/**
* 模块名
*/
private String moduleName;
/**
* 模块内容
*/
private String moduleContent;
}

49
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/EditGuideCategoryFormDTO.java

@ -0,0 +1,49 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Description 编辑禁用删除统一入参
* @Author yinzuomei
* @Date 2021/9/8 4:15 下午
*/
@Data
public class EditGuideCategoryFormDTO implements Serializable {
private static final long serialVersionUID = -6853534660181580456L;
public interface AddUserInternalGroup {
}
public interface StatusGroup {
}
public interface UpdateInfoGroup extends CustomerClientShowGroup {
}
public interface SaveInfoGroup extends CustomerClientShowGroup {
}
public interface DelGroup {
}
@NotBlank(message = "当前操作人id不能为空", groups = AddUserInternalGroup.class)
private String staffId;
@NotBlank(message = "客户id不能为空",groups = {DelGroup.class,UpdateInfoGroup.class,SaveInfoGroup.class})
private String customerId;
@NotBlank(message = "id不能为空", groups = {StatusGroup.class,DelGroup.class,UpdateInfoGroup.class})
private String id;
@NotBlank(message = "status不能为空", groups = StatusGroup.class)
private String status;
@NotBlank(message = "分类名称不能为空不能为空", groups = {UpdateInfoGroup.class,SaveInfoGroup.class})
@Length(max = 10, message = "分类名称最多填入10个字", groups = {UpdateInfoGroup.class,SaveInfoGroup.class})
private String categoryName;
}

61
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideAddFormDTO.java

@ -0,0 +1,61 @@
package com.epmet.dto.form;
import com.epmet.dto.AttachmentDTO;
import com.epmet.dto.ExternalLinkDTO;
import com.epmet.dto.ModuleDTO;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* @Description
* @Author zhaoqifeng
* @Date 2021/9/7 10:24
*/
@NoArgsConstructor
@Data
public class GuideAddFormDTO implements Serializable {
private static final long serialVersionUID = -7750999102010191460L;
/**
* 标题
*/
@NotBlank(message = "标题不能为空")
private String title;
/**
* 标题
*/
@NotBlank(message = "分类不能为空")
private String categoryCode;
/**
* 机关类型 机关agency 网格grid 部门dept
*/
@NotBlank(message = "所属机关类型不能为空")
private String orgType;
/**
* 所属机关
*/
@NotBlank(message = "所属机关ID不能为空")
private String orgId;
/**
* 所属机关
*/
@NotBlank(message = "所属机关名不能为空")
private String orgName;
/**
* 外部链接
*/
private List<ExternalLinkDTO> externalLinks;
/**
* 内容模块
*/
private List<ModuleDTO> moduleList;
/**
* 附件
*/
private List<AttachmentDTO> attachmentList;
}

56
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideCateOrderFormDTO.java

@ -0,0 +1,56 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.List;
/**
* @Description 分类排序入参DTO
* @Author yinzuomei
* @Date 2021/9/8 4:03 下午
*/
@Data
public class GuideCateOrderFormDTO implements Serializable {
private static final long serialVersionUID = 8671295475212569124L;
public interface AddUserInternalGroup {
}
@NotBlank(message = "当前操作人id不能为空", groups = AddUserInternalGroup.class)
private String staffId;
@NotEmpty(message = "顺序不能为空", groups = {AddUserInternalGroup.class})
private List<OrderIndexDTO> orderList;
/**
* 排序索引号dto
*/
public static class OrderIndexDTO {
private String id;
private Integer orderIndex;
public OrderIndexDTO() {
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Integer getOrderIndex() {
return orderIndex;
}
public void setOrderIndex(Integer orderIndex) {
this.orderIndex = orderIndex;
}
}
}

28
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideCategoryDropDownFormDTO.java

@ -0,0 +1,28 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Description 发布指南编辑指南查询指南列表 分类下拉框
* @Author yinzuomei
* @Date 2021/9/8 2:57 下午
*/
@Data
public class GuideCategoryDropDownFormDTO implements Serializable {
private static final long serialVersionUID = 9122708701080412461L;
public interface AddUserInternalGroup {
}
/**
* 新增指南saveorupdate查询指南列表query
*/
@NotBlank(message = "新增指南:saveorupdate;查询指南列表:query",groups = AddUserInternalGroup.class)
private String queryOrigin;
@NotBlank(message = "当前工作人员所属客户id不能为空",groups = AddUserInternalGroup.class)
private String customerId;
}

21
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideCategoryPageFormDTO.java

@ -0,0 +1,21 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Description 工作端PC或者运营端分页
* @Author yinzuomei
* @Date 2021/9/8 1:35 下午
*/
@Data
public class GuideCategoryPageFormDTO implements Serializable {
private static final long serialVersionUID = -7551388716349439643L;
public interface AddUserInternalGroup {
}
@NotBlank(message = "客户id不能为空,运营端传default", groups = AddUserInternalGroup.class)
private String customerId;
}

70
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideEditFormDTO.java

@ -0,0 +1,70 @@
package com.epmet.dto.form;
import com.epmet.dto.AttachmentDTO;
import com.epmet.dto.ExternalLinkDTO;
import com.epmet.dto.ModuleDTO;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* @Description
* @Author zhaoqifeng
* @Date 2021/9/7 10:24
*/
@NoArgsConstructor
@Data
public class GuideEditFormDTO implements Serializable {
private static final long serialVersionUID = -7750999102010191460L;
/**
* 工作人员ID
*/
private String staffId;
/**
* 指南ID
*/
@NotBlank(message = "指南id不能为空")
private String guideId;
/**
* 标题
*/
@NotBlank(message = "标题不能为空")
private String title;
/**
* 标题
*/
@NotBlank(message = "分类不能为空")
private String categoryCode;
/**
* 机关类型 机关agency 网格grid 部门dept
*/
@NotBlank(message = "所属机关类型不能为空")
private String orgType;
/**
* 所属机关
*/
@NotBlank(message = "所属机关ID不能为空")
private String orgId;
/**
* 所属机关
*/
@NotBlank(message = "所属机关名不能为空")
private String orgName;
/**
* 外部链接
*/
private List<ExternalLinkDTO> externalLinks;
/**
* 内容模块
*/
private List<ModuleDTO> moduleList;
/**
* 附件
*/
private List<AttachmentDTO> attachmentList;
}

39
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideFormDTO.java

@ -0,0 +1,39 @@
package com.epmet.dto.form;
import com.epmet.dto.ExternalLinkDTO;
import com.epmet.dto.GuideAttachmentDTO;
import com.epmet.dto.ModuleDTO;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* @Description
* @Author zhaoqifeng
* @Date 2021/9/7 10:24
*/
@NoArgsConstructor
@Data
public class GuideFormDTO implements Serializable {
private static final long serialVersionUID = -7750999102010191460L;
/**
* 标题
*/
@NotBlank(message = "指南id不能为空")
private String guideId;
/**
* 工作人员
*/
private String staffId;
/**
* 客户ID
*/
private String customerId;
}

32
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideListFormDTO.java

@ -0,0 +1,32 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2021/9/7 9:38
*/
@NoArgsConstructor
@Data
public class GuideListFormDTO extends PageFormDTO implements Serializable {
private static final long serialVersionUID = -4471422632936288213L;
private String customerId;
/**
* 组织ID
*/
private String agencyId;
/**
* 分类
*/
private String categoryCode;
/**
* 标题
*/
private String guideTitle;
}

17
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GetCategoryResultDTO.java

@ -0,0 +1,17 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2021/9/7 10:52
*/
@Data
public class GetCategoryResultDTO implements Serializable {
private static final long serialVersionUID = 3527239091132653541L;
private String categoryId;
private String categoryName;
}

67
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GuideDetailResultDTO.java

@ -0,0 +1,67 @@
package com.epmet.dto.result;
import com.epmet.dto.AttachmentDTO;
import com.epmet.dto.ExternalLinkDTO;
import com.epmet.dto.ModuleDTO;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
/**
* @Description
* @Author zhaoqifeng
* @Date 2021/9/7 10:24
*/
@NoArgsConstructor
@Data
public class GuideDetailResultDTO implements Serializable {
private static final long serialVersionUID = -7750999102010191460L;
/**
* 标题
*/
private String guideId;
/**
* 标题
*/
private String title;
/**
* 分类ID
*/
private String categoryCode;
/**
* 分类名
*/
private String categoryName;
/**
* 机关类型 机关agency 网格grid 部门dept
*/
private String orgType;
/**
* 所属机关
*/
private String orgId;
/**
* 所属机关名
*/
private String orgName;
/**
* 是否收藏 1是 0否
*/
private String collectionFlag;
/**
* 外部链接
*/
private List<ExternalLinkDTO> externalLinks;
/**
* 内容模块
*/
private List<ModuleDTO> moduleList;
/**
* 附件
*/
private List<AttachmentDTO> attachmentList;
}

39
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GuideDictResDTO.java

@ -0,0 +1,39 @@
package com.epmet.dto.result;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;
/**
* @Description 办事指南可用分类列表 新增编辑指南时的下拉框展示未禁用的分类 查询指南列表如果禁用的分类下存在指南列表则展示不存在直接不展示
* @Author yinzuomei
* @Date 2021/9/8 2:44 下午
*/
@Data
public class GuideDictResDTO implements Serializable {
/**
* 分类名,客户内唯一
*/
private String categoryName;
/**
* 分类编码分类名的全拼; eggongjijin
*/
private String categoryCode;
/**
* 排序
*/
@JsonIgnore
private Integer sort;
/**
* 状态 禁用disable 启用enable
*/
@JsonIgnore
private String status;
}

35
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GuideListResultDTO.java

@ -0,0 +1,35 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* @author Administrator
*/
@Data
public class GuideListResultDTO implements Serializable {
private static final long serialVersionUID = -1360741408368601140L;
private String guideId;
/**
* 标题
*/
private String title;
/**
* 分类
*/
private String categoryName;
/**
* 创建人ID
*/
private String createdId;
/**
* 创建人姓名
*/
private String createdName;
/**
* 更新时间
*/
private Date updatedTime;
}

171
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCategoryController.java

@ -0,0 +1,171 @@
/**
* 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.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.GuideCategoryDTO;
import com.epmet.dto.form.EditGuideCategoryFormDTO;
import com.epmet.dto.form.GuideCateOrderFormDTO;
import com.epmet.dto.form.GuideCategoryDropDownFormDTO;
import com.epmet.dto.form.GuideCategoryPageFormDTO;
import com.epmet.dto.result.GuideDictResDTO;
import com.epmet.service.GuideCategoryService;
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 java.util.List;
/**
* 指南分类
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@RestController
@RequestMapping("guidecategory")
public class GuideCategoryController {
@Autowired
private GuideCategoryService guideCategoryService;
/**
* 办事指南分类列表-工作端PC和运营端用不分页
*
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.commons.tools.page.PageData<com.epmet.dto.GuideCategoryDTO>>
* @author yinzuomei
* @date 2021/9/8 1:33 下午
*/
@PostMapping("page")
public Result<PageData<GuideCategoryDTO>> page(@RequestBody GuideCategoryPageFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, GuideCategoryPageFormDTO.AddUserInternalGroup.class);
PageData<GuideCategoryDTO> page = guideCategoryService.page(formDTO);
return new Result<PageData<GuideCategoryDTO>>().ok(page);
}
/**
* 办事指南可用分类列表 新增编辑指南时的下拉框展示未禁用的分类 查询指南列表如果禁用的分类下存在指南列表则展示不存在直接不展示
*
* @param tokenDto
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.GuideDictResDTO>>
* @author yinzuomei
* @date 2021/9/8 2:47 下午
*/
@PostMapping("getcategory")
public Result<List<GuideDictResDTO>> getCategory(@LoginUser TokenDto tokenDto,@RequestBody GuideCategoryDropDownFormDTO formDTO){
formDTO.setCustomerId(tokenDto.getCustomerId());
ValidatorUtils.validateEntity(formDTO,GuideCategoryDropDownFormDTO.AddUserInternalGroup.class);
return new Result<List<GuideDictResDTO>>().ok(guideCategoryService.getCategory(formDTO));
}
/**
* 保存排序
*
* @param tokenDto
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @author yinzuomei
* @date 2021/9/8 4:09 下午
*/
@PostMapping("saveorder")
public Result saveOrder(@LoginUser TokenDto tokenDto,@RequestBody GuideCateOrderFormDTO formDTO){
formDTO.setStaffId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO,GuideCateOrderFormDTO.AddUserInternalGroup.class);
guideCategoryService.saveOrder(formDTO);
return new Result();
}
/**
* 禁用或者启用分类
*
* @param tokenDto
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @author yinzuomei
* @date 2021/9/8 4:19 下午
*/
@PostMapping("disable")
public Result disable(@LoginUser TokenDto tokenDto,@RequestBody EditGuideCategoryFormDTO formDTO){
formDTO.setStaffId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO,EditGuideCategoryFormDTO.StatusGroup.class,EditGuideCategoryFormDTO.AddUserInternalGroup.class);
guideCategoryService.disableGuideCategory(formDTO);
return new Result();
}
/**
* 删除分类已经存在指南的不允许删除给予提示
*
* @param tokenDto
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @author yinzuomei
* @date 2021/9/8 4:45 下午
*/
@PostMapping("delete")
public Result delete(@LoginUser TokenDto tokenDto,@RequestBody EditGuideCategoryFormDTO formDTO){
formDTO.setStaffId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO,EditGuideCategoryFormDTO.AddUserInternalGroup.class,EditGuideCategoryFormDTO.DelGroup.class);
guideCategoryService.delete(formDTO);
return new Result();
}
/**
* 新增分类名称和编码客户内唯一
*
* @param tokenDto
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @author yinzuomei
* @date 2021/9/8 5:11 下午
*/
@PostMapping("save")
public Result<GuideCategoryDTO> save(@LoginUser TokenDto tokenDto,@RequestBody EditGuideCategoryFormDTO formDTO){
formDTO.setStaffId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO,EditGuideCategoryFormDTO.AddUserInternalGroup.class,EditGuideCategoryFormDTO.SaveInfoGroup.class);
return new Result<GuideCategoryDTO>().ok(guideCategoryService.save(formDTO));
}
/**
* 编辑名称
*
* @param tokenDto
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @author yinzuomei
* @date 2021/9/8 5:37 下午
*/
@PostMapping("update")
public Result<GuideCategoryDTO> update(@LoginUser TokenDto tokenDto,@RequestBody EditGuideCategoryFormDTO formDTO){
formDTO.setStaffId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO,EditGuideCategoryFormDTO.AddUserInternalGroup.class,EditGuideCategoryFormDTO.UpdateInfoGroup.class);
return new Result<GuideCategoryDTO>().ok(guideCategoryService.update(formDTO));
}
}

102
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCollectionController.java

@ -0,0 +1,102 @@
/**
* 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.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.GuideCollectionDTO;
import com.epmet.dto.form.GuideFormDTO;
import com.epmet.service.GuideCollectionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* 指南收藏表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@RestController
@RequestMapping("guidecollection")
public class GuideCollectionController {
@Autowired
private GuideCollectionService guideCollectionService;
@GetMapping("page")
public Result<PageData<GuideCollectionDTO>> page(@RequestParam Map<String, Object> params){
PageData<GuideCollectionDTO> page = guideCollectionService.page(params);
return new Result<PageData<GuideCollectionDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<GuideCollectionDTO> get(@PathVariable("id") String id){
GuideCollectionDTO data = guideCollectionService.get(id);
return new Result<GuideCollectionDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody GuideCollectionDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
guideCollectionService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody GuideCollectionDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
guideCollectionService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
guideCollectionService.delete(ids);
return new Result();
}
/**
* @Description 收藏指南
* @Param tokenDto
* @Param formDTO
* @Return {@link Result}
* @Author zhaoqifeng
* @Date 2021/9/9 9:46
*/
@PostMapping("collection")
public Result collection(@LoginUser TokenDto tokenDto, @RequestBody GuideFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
guideCollectionService.collection(tokenDto, formDTO);
return new Result();
}
}

180
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideController.java

@ -0,0 +1,180 @@
/**
* 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.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.GuideDTO;
import com.epmet.dto.form.GuideAddFormDTO;
import com.epmet.dto.form.GuideEditFormDTO;
import com.epmet.dto.form.GuideFormDTO;
import com.epmet.dto.form.GuideListFormDTO;
import com.epmet.dto.result.GuideDetailResultDTO;
import com.epmet.dto.result.GuideListResultDTO;
import com.epmet.service.GuideService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* 办事指南表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@RestController
@RequestMapping("guide")
public class GuideController {
@Autowired
private GuideService guideService;
@GetMapping("page")
public Result<PageData<GuideDTO>> page(@RequestParam Map<String, Object> params) {
PageData<GuideDTO> page = guideService.page(params);
return new Result<PageData<GuideDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<GuideDTO> get(@PathVariable("id") String id) {
GuideDTO data = guideService.get(id);
return new Result<GuideDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody GuideDTO dto) {
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
guideService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody GuideDTO dto) {
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
guideService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids) {
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
guideService.delete(ids);
return new Result();
}
/**
* @Description 办事指南列表
* @Param formDTO
* @Return {@link Result< PageData< GuideListResultDTO>>}
* @Author zhaoqifeng
* @Date 2021/9/7 13:59
*/
@PostMapping("list")
public Result<PageData<GuideListResultDTO>> guideList(@LoginUser TokenDto tokenDto, @RequestBody GuideListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class);
PageData<GuideListResultDTO> page = guideService.guideList(tokenDto, formDTO);
return new Result<PageData<GuideListResultDTO>>().ok(page);
}
/**
* @Description 添加指南
* @Param tokenDto
* @Param formDTO
* @Return {@link Result}
* @Author zhaoqifeng
* @Date 2021/9/7 14:13
*/
@PostMapping("add")
public Result guideAdd(@LoginUser TokenDto tokenDto, @RequestBody GuideAddFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
guideService.guideAdd(tokenDto, formDTO);
return new Result();
}
/**
* @Description 修改指南
* @Param tokenDto
* @Param formDTO
* @Return {@link Result}
* @Author zhaoqifeng
* @Date 2021/9/7 14:13
*/
@PostMapping("edit")
public Result guideEdit(@LoginUser TokenDto tokenDto, @RequestBody GuideEditFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
formDTO.setStaffId(tokenDto.getUserId());
guideService.guideEdit(formDTO);
return new Result();
}
/**
* @Description 删除指南
* @Param tokenDto
* @Param formDTO
* @Return {@link Result}
* @Author zhaoqifeng
* @Date 2021/9/7 14:13
*/
@PostMapping("del")
public Result guideDel(@LoginUser TokenDto tokenDto, @RequestBody GuideFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
formDTO.setStaffId(tokenDto.getUserId());
guideService.guideDel(formDTO);
return new Result();
}
/**
* @Description 指南详情
* @Param tokenDto
* @Param formDTO
* @Return {@link Result< GuideDetailResultDTO>}
* @Author zhaoqifeng
* @Date 2021/9/7 14:13
*/
@PostMapping("detail")
public Result<GuideDetailResultDTO> guideDetail(@LoginUser TokenDto tokenDto, @RequestBody GuideFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
formDTO.setCustomerId(tokenDto.getCustomerId());
GuideDetailResultDTO result = guideService.guideDetail(tokenDto, formDTO);
return new Result<GuideDetailResultDTO>().ok(result);
}
@PostMapping("collectionlist")
public Result<PageData<GuideListResultDTO>> collectionList(@LoginUser TokenDto tokenDto, @RequestBody PageFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class);
PageData<GuideListResultDTO> page = guideService.collectionList(tokenDto, formDTO);
return new Result<PageData<GuideListResultDTO>>().ok(page);
}
}

93
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideModuleController.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.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.GuideModuleDTO;
import com.epmet.dto.ModuleDTO;
import com.epmet.service.GuideModuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
/**
* 指南模块关联表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@RestController
@RequestMapping("guidemodule")
public class GuideModuleController {
@Autowired
private GuideModuleService guideModuleService;
@GetMapping("page")
public Result<PageData<GuideModuleDTO>> page(@RequestParam Map<String, Object> params){
PageData<GuideModuleDTO> page = guideModuleService.page(params);
return new Result<PageData<GuideModuleDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<GuideModuleDTO> get(@PathVariable("id") String id){
GuideModuleDTO data = guideModuleService.get(id);
return new Result<GuideModuleDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody GuideModuleDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
guideModuleService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody GuideModuleDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
guideModuleService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
guideModuleService.delete(ids);
return new Result();
}
@PostMapping("list")
public Result<List<ModuleDTO>> getModuleList(@LoginUser TokenDto tokenDto) {
return new Result<List<ModuleDTO>>().ok(guideModuleService.getModuleList(tokenDto.getCustomerId()));
}
}

84
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideModuleDictController.java

@ -0,0 +1,84 @@
/**
* 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.controller;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.GuideModuleDictDTO;
import com.epmet.service.GuideModuleDictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* 指南模块字典表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@RestController
@RequestMapping("guidemoduledict")
public class GuideModuleDictController {
@Autowired
private GuideModuleDictService guideModuleDictService;
@GetMapping("page")
public Result<PageData<GuideModuleDictDTO>> page(@RequestParam Map<String, Object> params){
PageData<GuideModuleDictDTO> page = guideModuleDictService.page(params);
return new Result<PageData<GuideModuleDictDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<GuideModuleDictDTO> get(@PathVariable("id") String id){
GuideModuleDictDTO data = guideModuleDictService.get(id);
return new Result<GuideModuleDictDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody GuideModuleDictDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
guideModuleDictService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody GuideModuleDictDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
guideModuleDictService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
guideModuleDictService.delete(ids);
return new Result();
}
}

33
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideAttachmentDao.java

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

98
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideCategoryDao.java

@ -0,0 +1,98 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.GuideCategoryDTO;
import com.epmet.dto.result.GuideDictResDTO;
import com.epmet.entity.GuideCategoryEntity;
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-09-06
*/
@Mapper
public interface GuideCategoryDao extends BaseDao<GuideCategoryEntity> {
/**
* 工作端PC或者运营端分类列表查询不分页
*
* @param customerId
* @return java.util.List<com.epmet.dto.GuideCategoryDTO>
* @author yinzuomei
* @date 2021/9/8 1:57 下午
*/
List<GuideCategoryDTO> selectPageByCid(String customerId);
/**
* 办事指南可用分类列表 新增编辑指南时的下拉框展示未禁用的分类 查询指南列表如果禁用的分类下存在指南列表则展示不存在直接不展示
*
* @param customerId
* @param queryOrigin
* @return java.util.List<com.epmet.dto.result.GuideDictResDTO>
* @author yinzuomei
* @date 2021/9/8 3:15 下午
*/
List<GuideDictResDTO> selectCategoryDict(@Param("customerId") String customerId, @Param("queryOrigin") String queryOrigin);
/**
* 保存排序
*
* @param id
* @param orderIndex
* @param staffId
* @return int
* @author yinzuomei
* @date 2021/9/8 4:11 下午
*/
int updateOrder(@Param("id") String id, @Param("orderIndex") Integer orderIndex, @Param("staffId") String staffId);
/**
* 启用或者禁用
*
* @param id
* @param status
* @param staffId
* @return int
* @author yinzuomei
* @date 2021/9/8 4:22 下午
*/
int updateStatus(@Param("id") String id, @Param("status")String status, @Param("staffId")String staffId);
/**
* 查询这个分类下的项目数
*
* @param id
* @return int
* @author yinzuomei
* @date 2021/9/8 4:36 下午
*/
int selectGuideTotal(@Param("id") String id,@Param("customerId") String customerId);
int selectCategoryName(@Param("categoryName") String categoryName, @Param("customerId")String customerId, @Param("excludeId") String excludeId);
int selectCurrentOrder(String customerId);
int selectCategoryCode(@Param("categoryCode") String categoryCode, @Param("customerId")String customerId, @Param("excludeId") String excludeId);
}

33
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideCollectionDao.java

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

71
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideDao.java

@ -0,0 +1,71 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.dto.form.GuideListFormDTO;
import com.epmet.dto.result.GuideDetailResultDTO;
import com.epmet.dto.result.GuideListResultDTO;
import com.epmet.entity.GuideEntity;
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-09-06
*/
@Mapper
public interface GuideDao extends BaseDao<GuideEntity> {
/**
* 指南列表
*
* @Param formDTO
* @Return {@link List<GuideListResultDTO>}
* @Author zhaoqifeng
* @Date 2021/9/7 14:21
*/
List<GuideListResultDTO> getGuideList(GuideListFormDTO formDTO);
/**
* 指南详情
*
* @Param customerId
* @Param guideId
* @Return {@link GuideDetailResultDTO}
* @Author zhaoqifeng
* @Date 2021/9/8 9:59
*/
GuideDetailResultDTO getGuideDetail(@Param("customerId") String customerId, @Param("guideId") String guideId);
/**
* 收藏列表
*
* @Param tokenDto
* @Return {@link List< GuideListResultDTO>}
* @Author zhaoqifeng
* @Date 2021/9/9 10:09
*/
List<GuideListResultDTO> getCollectionList(TokenDto tokenDto);
}

33
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideExternalLinkDao.java

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

45
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideModuleDao.java

@ -0,0 +1,45 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.ModuleDTO;
import com.epmet.entity.GuideModuleEntity;
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-09-06
*/
@Mapper
public interface GuideModuleDao extends BaseDao<GuideModuleEntity> {
/**
* @Description 获取指南的内容模块
* @Param guideId
* @Return {@link List< ModuleDTO>}
* @Author zhaoqifeng
* @Date 2021/9/8 10:18
*/
List<ModuleDTO> selectByGuideId(@Param("customerId") String customerId, @Param("guideId") String guideId);
}

33
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideModuleDictDao.java

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

33
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideModuleDictDefaultDao.java

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

83
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideAttachmentEntity.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.entity;
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-09-06
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("guide_attachment")
public class GuideAttachmentEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 办事指南ID
*/
private String guideId;
/**
* 附件名
*/
private String attachmentName;
/**
* 文件大小 单位byte
*/
private Integer attachmentSize;
/**
* 文件格式 wordexcelpdf
*/
private String attachmentFormat;
/**
* 类型
*/
private String attachmentType;
/**
* 附件地址
*/
private String attachmentUrl;
/**
* 语音或视频时长
*/
private Integer duration;
/**
* 排序
*/
private Integer sort;
}

63
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideCategoryEntity.java

@ -0,0 +1,63 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 指南分类
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-08
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("guide_category")
public class GuideCategoryEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户id产品默认配置此列存储default
*/
private String customerId;
/**
* 分类名,客户内唯一
*/
private String categoryName;
/**
* 分类编码分类名的全拼; eggongjijin
*/
private String categoryCode;
/**
* 排序
*/
private Integer sort;
/**
* 状态 禁用disable 启用enable
*/
private String status;
}

61
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideCollectionEntity.java

@ -0,0 +1,61 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 指南收藏表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("guide_collection")
public class GuideCollectionEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 指南ID
*/
private String guideId;
/**
* 用户ID
*/
private String userId;
/**
* 用户所属客户端 居民端resi 工作端gov
*/
private String app;
}

78
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideEntity.java

@ -0,0 +1,78 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 办事指南表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("guide")
public class GuideEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 发布单位类型 机关agency 网格grid 部门dept
*/
private String orgType;
/**
* 发布单位ID
*/
private String orgId;
/**
* 发布单位名称
*/
private String orgName;
/**
* 所属组织机构IDcustomer_agency.id
*/
private String pid;
/**
* 所有上级组织ID,英文:隔开
*/
private String pids;
/**
* 标题
*/
private String title;
/**
* 分类ID
*/
private String categoryCode;
}

63
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideExternalLinkEntity.java

@ -0,0 +1,63 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 指南外链表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("guide_external_link")
public class GuideExternalLinkEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 指南ID
*/
private String guideId;
/**
* 链接说明
*/
private String description;
/**
* 外部链接
*/
private String externalLink;
/**
* 排序
*/
private Integer sort;
}

61
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideModuleDictDefaultEntity.java

@ -0,0 +1,61 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 指南模块默认字典表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("guide_module_dict_default")
public class GuideModuleDictDefaultEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 模块key
*/
private String moduleValue;
/**
* 模块名
*/
private String moduleName;
/**
* 排序
*/
private Integer sort;
/**
* 状态 禁用disable 启用enable
*/
private String status;
}

66
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideModuleDictEntity.java

@ -0,0 +1,66 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 指南模块字典表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("guide_module_dict")
public class GuideModuleDictEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 模块key
*/
private String moduleValue;
/**
* 模块名
*/
private String moduleName;
/**
* 排序
*/
private Integer sort;
/**
* 状态 禁用disable 启用enable
*/
private String status;
}

61
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideModuleEntity.java

@ -0,0 +1,61 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 指南模块关联表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("guide_module")
public class GuideModuleEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 指南ID
*/
private String guideId;
/**
* 模块ID
*/
private String moduleId;
/**
*
*/
private String moduleContent;
}

114
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideAttachmentService.java

@ -0,0 +1,114 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.AttachmentDTO;
import com.epmet.dto.GuideAttachmentDTO;
import com.epmet.entity.GuideAttachmentEntity;
import java.util.List;
import java.util.Map;
/**
* 办事指南附件
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
public interface GuideAttachmentService extends BaseService<GuideAttachmentEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<GuideAttachmentDTO>
* @author generator
* @date 2021-09-06
*/
PageData<GuideAttachmentDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<GuideAttachmentDTO>
* @author generator
* @date 2021-09-06
*/
List<GuideAttachmentDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return GuideAttachmentDTO
* @author generator
* @date 2021-09-06
*/
GuideAttachmentDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-09-06
*/
void save(GuideAttachmentDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-09-06
*/
void update(GuideAttachmentDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2021-09-06
*/
void delete(String[] ids);
/**
* @Description 删除指南附件
* @Param guideId
* @Return
* @Author zhaoqifeng
* @Date 2021/9/7 17:16
*/
void deleteByGuideId(String guideId);
/**
* @Description 获取指南附件
* @Param guideId
* @Return {@link List< AttachmentDTO>}
* @Author zhaoqifeng
* @Date 2021/9/8 10:49
*/
List<AttachmentDTO> getByGuideId(String guideId);
}

110
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCategoryService.java

@ -0,0 +1,110 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.GuideCategoryDTO;
import com.epmet.dto.form.EditGuideCategoryFormDTO;
import com.epmet.dto.form.GuideCateOrderFormDTO;
import com.epmet.dto.form.GuideCategoryDropDownFormDTO;
import com.epmet.dto.form.GuideCategoryPageFormDTO;
import com.epmet.dto.result.GuideDictResDTO;
import com.epmet.entity.GuideCategoryEntity;
import java.util.List;
/**
* 指南分类
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
public interface GuideCategoryService extends BaseService<GuideCategoryEntity> {
/**
* 办事指南分类列表-工作端PC和运营端用不分页
*
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.commons.tools.page.PageData<com.epmet.dto.GuideCategoryDTO>>
* @author yinzuomei
* @date 2021/9/8 1:33 下午
*/
PageData<GuideCategoryDTO> page(GuideCategoryPageFormDTO formDTO);
/**
* 办事指南可用分类列表 新增编辑指南时的下拉框展示未禁用的分类 查询指南列表如果禁用的分类下存在指南列表则展示不存在直接不展示
*
* @param formDTO
* @return java.util.List<com.epmet.dto.result.GuideDictResDTO>
* @author yinzuomei
* @date 2021/9/8 3:06 下午
*/
List<GuideDictResDTO> getCategory(GuideCategoryDropDownFormDTO formDTO);
/**
* 保存排序
*
* @param formDTO
* @return void
* @author yinzuomei
* @date 2021/9/8 4:09 下午
*/
void saveOrder(GuideCateOrderFormDTO formDTO);
/**
* 启用或者禁用分类
*
* @param formDTO
* @return int
* @author yinzuomei
* @date 2021/9/8 4:20 下午
*/
void disableGuideCategory(EditGuideCategoryFormDTO formDTO);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-09-06
*/
GuideCategoryDTO save(EditGuideCategoryFormDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-09-06
*/
GuideCategoryDTO update(EditGuideCategoryFormDTO dto);
/**
* 删除分类存在办事指南的不允许删除给予提示
*
* @param formDTO
* @return void
* @author yinzuomei
* @date 2021/9/8 4:34 下午
*/
void delete(EditGuideCategoryFormDTO formDTO);
}

117
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCollectionService.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.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.dto.GuideCollectionDTO;
import com.epmet.dto.form.GuideFormDTO;
import com.epmet.entity.GuideCollectionEntity;
import java.util.List;
import java.util.Map;
/**
* 指南收藏表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
public interface GuideCollectionService extends BaseService<GuideCollectionEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<GuideCollectionDTO>
* @author generator
* @date 2021-09-06
*/
PageData<GuideCollectionDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<GuideCollectionDTO>
* @author generator
* @date 2021-09-06
*/
List<GuideCollectionDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return GuideCollectionDTO
* @author generator
* @date 2021-09-06
*/
GuideCollectionDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-09-06
*/
void save(GuideCollectionDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-09-06
*/
void update(GuideCollectionDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2021-09-06
*/
void delete(String[] ids);
/**
* @Description 收藏指南
* @Param tokenDto
* @Param formDTO
* @Return
* @Author zhaoqifeng
* @Date 2021/9/9 9:46
*/
void collection(TokenDto tokenDto, GuideFormDTO formDTO);
/**
* @Description 获取收藏信息
* @Param tokenDto
* @Param guideId
* @Return {@link GuideCollectionDTO}
* @Author zhaoqifeng
* @Date 2021/9/10 9:52
*/
GuideCollectionDTO getCollection(TokenDto tokenDto, String guideId);
}

114
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideExternalLinkService.java

@ -0,0 +1,114 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.ExternalLinkDTO;
import com.epmet.dto.GuideExternalLinkDTO;
import com.epmet.entity.GuideExternalLinkEntity;
import java.util.List;
import java.util.Map;
/**
* 指南外链表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
public interface GuideExternalLinkService extends BaseService<GuideExternalLinkEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<GuideExternalLinkDTO>
* @author generator
* @date 2021-09-06
*/
PageData<GuideExternalLinkDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<GuideExternalLinkDTO>
* @author generator
* @date 2021-09-06
*/
List<GuideExternalLinkDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return GuideExternalLinkDTO
* @author generator
* @date 2021-09-06
*/
GuideExternalLinkDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-09-06
*/
void save(GuideExternalLinkDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-09-06
*/
void update(GuideExternalLinkDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2021-09-06
*/
void delete(String[] ids);
/**
* @Description 删除指南外链
* @Param guideId
* @Return
* @Author zhaoqifeng
* @Date 2021/9/7 17:20
*/
void deleteByGuideId(String guideId);
/**
* @Description 获取指南外链
* @Param guideId
* @Return {@link List< ExternalLinkDTO>}
* @Author zhaoqifeng
* @Date 2021/9/8 11:05
*/
List<ExternalLinkDTO> getByGuideId(String guideId);
}

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

Loading…
Cancel
Save