Browse Source

Merge remote-tracking branch 'origin/dev_ui_upgrade' into dev

master
yinzuomei 4 years ago
parent
commit
c8e013f936
  1. 15
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/Constant.java
  2. 2
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/constant/DataSourceConstant.java
  3. 27
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/app/form/AppFootBarFormDTO.java
  4. 39
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/app/result/AppFootBarResultDTO.java
  5. 49
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/app/result/CustomerFootBarDTO.java
  6. 23
      epmet-module/data-aggregator/data-aggregator-server/pom.xml
  7. 40
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/AppController.java
  8. 43
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/opercrm/CustomerParameterDao.java
  9. 59
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/opercustomize/CustomerFootBarDao.java
  10. 68
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/opercrm/CustomerParameterEntity.java
  11. 88
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/opercustomize/CustomerFootBarEntity.java
  12. 34
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/opercrm/CustomerParameterService.java
  13. 60
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/opercrm/impl/CustomerParameterServiceImpl.java
  14. 42
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/opercustomize/CustomerFootBarService.java
  15. 115
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/opercustomize/impl/CustomerFootBarServiceImpl.java
  16. 5
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/bootstrap.yml
  17. 15
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/opercrm/CustomerParameterDao.xml
  18. 41
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/opercustomize/CustomerFootBarDao.xml
  19. 2
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/ResiPointRankListResultDTO.java
  20. 2
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/ResiPointRankingResultDTO.java
  21. 2
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java
  22. 2
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointTotalServiceImpl.java
  23. 2
      epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/form/RedDotFormDTO.java
  24. 92
      epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/RemindServiceImpl.java
  25. 4
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java
  26. 5
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java
  27. 6
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java
  28. 9
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java
  29. 9
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java
  30. 44
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java
  31. 16
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml
  32. 0
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ShiftProjectListFromDTO.java
  33. 31
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/PendingResultDTO.java
  34. 53
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ResolvedResultDTO.java
  35. 53
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/UnResolvedResultDTO.java
  36. 31
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java
  37. 39
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java
  38. 37
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java
  39. 33
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java
  40. 27
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java
  41. 47
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java
  42. 62
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml
  43. 33
      epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/form/FootBarPatternFormDTO.java
  44. 28
      epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/form/FootBarPatternQueryFormDTO.java
  45. 23
      epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/result/FootBarPatternQueryResultDTO.java
  46. 33
      epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java
  47. 11
      epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/dao/CustomerParameterDao.java
  48. 22
      epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerParameterService.java
  49. 91
      epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerParameterServiceImpl.java
  50. 4
      epmet-module/oper-crm/oper-crm-server/src/main/resources/db/migration/V0.0.8__insert_footbar_parameter.sql
  51. 10
      epmet-module/oper-crm/oper-crm-server/src/main/resources/mapper/CustomerParameterDao.xml
  52. 9
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/CustomerFootBarDTO.java
  53. 28
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/CheckFloatFootBarFormDTO.java
  54. 15
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/CustomerFootBarFormDTO.java
  55. 21
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/NotOnlineFootBarFormDTO.java
  56. 27
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/SyncFootBar4CustomerFormDTO.java
  57. 27
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CheckFloatFootBarResultDTO.java
  58. 9
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerFootBarResultDTO.java
  59. 20
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/OperCustomizeOpenFeignClient.java
  60. 19
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/fallback/OperCustomizeOpenFeignClientFallback.java
  61. 76
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFootBarController.java
  62. 43
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFootBarDao.java
  63. 8
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/CustomerFootBarEntity.java
  64. 42
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerFootBarService.java
  65. 162
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFootBarServiceImpl.java
  66. 1
      epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.12__add_float_icon_path.sql
  67. 84
      epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFootBarDao.xml
  68. 36
      epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/controller/IssueController.java
  69. 30
      epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/IssueService.java
  70. 107
      epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java

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

@ -145,4 +145,19 @@ public interface Constant {
String DISTRICT = "district";
String STREET = "street";
String COMMUNITY = "community";
//footbar参数值含义:flat:水平模式;float:浮起某个菜单
String FOOT_BAR_FLOAT="float";
//footbar参数值含义:flat:水平模式;float:浮起某个菜单
String FOOT_BAR_FLAT="flat";
/**
* resi_footbar_pattern
* gov_footbar_pattern
* 后缀
*/
String FOOTBAR_PATTERN_KEY_SUFFIX="_footbar_pattern";
// resi_footbar_highlight_num
// gov_footbar_highlight_num
String FOOTBAR_HIGHLIGHT_NUM="_footbar_highlight_num";
}

2
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/constant/DataSourceConstant.java

@ -30,4 +30,6 @@ public interface DataSourceConstant {
String DATA_STATISTICAL="datastatistical";
String EVALUATION_INDEX = "evaluationIndex";
String OPERCUSTOMIZE="opercustomize";
}

27
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/app/form/AppFootBarFormDTO.java

@ -0,0 +1,27 @@
package com.epmet.dataaggre.dto.app.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 查询底部footBar信息两端通用
*
* @author yinzuomei@elink-cn.com
* @date 2021/7/27 18:54
*/
@Data
public class AppFootBarFormDTO implements Serializable {
public interface AddUserInternalGroup {}
/**
* 产品配置default 客户定制化里面就传客户id
*/
@NotBlank(message = "customerId不能为空",groups = AddUserInternalGroup.class)
private String customerId;
/**
* 工作端gov居民端resi
*/
@NotBlank(message = "appType不能为空",groups = AddUserInternalGroup.class)
private String appType;
}

39
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/app/result/AppFootBarResultDTO.java

@ -0,0 +1,39 @@
package com.epmet.dataaggre.dto.app.result;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 查询底部footBar信息两端通用
*
* @author yinzuomei@elink-cn.com
* @date 2021/7/27 19:00
*/
@Data
public class AppFootBarResultDTO implements Serializable {
private static final long serialVersionUID = -2219461245919203814L;
/**
* 水平flat浮起float
*/
private String pattern;
/**
* 默认返回0如果是浮起模式且是奇数返回是footBarList的索引
*/
private Integer highLightNum;
private List<CustomerFootBarDTO> footBarList;
/**
* 是否是奇数true:是奇数
*/
private Boolean isOddNum;
/**
* 是否都上传了图标true:都上传了
*/
// private Boolean bothUploaded;
}

49
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/app/result/CustomerFootBarDTO.java

@ -0,0 +1,49 @@
package com.epmet.dataaggre.dto.app.result;
import lombok.Data;
import java.io.Serializable;
/**
* 查询底部footBar信息两端通用
*
* @author yinzuomei@elink-cn.com
* @date 2021/7/27 19:01
*/
@Data
public class CustomerFootBarDTO implements Serializable {
/**
* KEY
*/
private String barKey;
/**
* bar名称
*/
private String barName;
/**
* 页面标题
*/
private String pageTitle;
/**
* 图标路径
*/
private String iconPath;
/**
* 选中页面图标路径
*/
private String selectedIconPath;
/**
* 凸起时图标路径
*/
private String floatIconPath;
/**
* 客户id
*/
private String customerId;
}

23
epmet-module/data-aggregator/data-aggregator-server/pom.xml

@ -171,6 +171,11 @@
<datasource.druid.evaluationIndex.username>epmet_evaluation_index_user</datasource.druid.evaluationIndex.username>
<datasource.druid.evaluationIndex.password>EpmEt-db-UsEr</datasource.druid.evaluationIndex.password>
<datasource.druid.opercustomize.url>
<![CDATA[jdbc:mysql://192.168.1.140:3306/epmet_oper_customize?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</datasource.druid.opercustomize.url>
<datasource.druid.opercustomize.username>epmet_oper_customize_user</datasource.druid.opercustomize.username>
<datasource.druid.opercustomize.password>EpmEt-db-UsEr</datasource.druid.opercustomize.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>192.168.1.140</spring.redis.host>
@ -266,6 +271,12 @@
<datasource.druid.evaluationIndex.username>epmet_evaluation_index_user</datasource.druid.evaluationIndex.username>
<datasource.druid.evaluationIndex.password>EpmEt-db-UsEr</datasource.druid.evaluationIndex.password>
<datasource.druid.opercustomize.url>
<![CDATA[jdbc:mysql://192.168.1.140:3306/epmet_oper_customize?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</datasource.druid.opercustomize.url>
<datasource.druid.opercustomize.username>epmet_oper_customize_user</datasource.druid.opercustomize.username>
<datasource.druid.opercustomize.password>EpmEt-db-UsEr</datasource.druid.opercustomize.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>192.168.1.140</spring.redis.host>
@ -361,6 +372,12 @@
<datasource.druid.evaluationIndex.username>epmet</datasource.druid.evaluationIndex.username>
<datasource.druid.evaluationIndex.password>elink@833066</datasource.druid.evaluationIndex.password>
<datasource.druid.opercustomize.url>
<![CDATA[jdbc:mysql://rm-m5ef9t617j6o5eup7.mysql.rds.aliyuncs.com:3306/epmet_oper_customize?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</datasource.druid.opercustomize.url>
<datasource.druid.opercustomize.username>epmet</datasource.druid.opercustomize.username>
<datasource.druid.opercustomize.password>elink@833066</datasource.druid.opercustomize.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
@ -456,6 +473,12 @@
<datasource.druid.evaluationIndex.username>epmet_evaluation_index_user</datasource.druid.evaluationIndex.username>
<datasource.druid.evaluationIndex.password>EpmEt-db-UsEr</datasource.druid.evaluationIndex.password>
<datasource.druid.opercustomize.url>
<![CDATA[jdbc:mysql://rm-m5e3vzs2637224wj9.mysql.rds.aliyuncs.com:3306/epmet_oper_customize?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</datasource.druid.opercustomize.url>
<datasource.druid.opercustomize.username>epmet_oper_customize_user</datasource.druid.opercustomize.username>
<datasource.druid.opercustomize.password>EpmEt-db-UsEr</datasource.druid.opercustomize.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5ez3n1j0qc3ykq2ut.redis.rds.aliyuncs.com</spring.redis.host>

40
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/AppController.java

@ -0,0 +1,40 @@
package com.epmet.dataaggre.controller;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dataaggre.dto.app.form.AppFootBarFormDTO;
import com.epmet.dataaggre.dto.app.result.AppFootBarResultDTO;
import com.epmet.dataaggre.service.opercustomize.CustomerFootBarService;
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;
/**
* 小程序相关配置可以放在这目前只放了footbar
*
* @author yinzuomei@elink-cn.com
* @date 2021/7/27 18:36
*/
@RestController
@RequestMapping("app")
public class AppController {
@Autowired
private CustomerFootBarService customerFootBarService;
/**
* 查询底部footBar信息两端通用
*
* @param footBarFormDTO
* @return com.epmet.dataaggre.dto.app.result.AppFootBarResultDTO
* @author yinzuomei
* @date 2021/7/27 18:59
*/
@PostMapping("footbars")
public Result<AppFootBarResultDTO> queryAppFootBars(@RequestBody AppFootBarFormDTO footBarFormDTO){
ValidatorUtils.validateEntity(footBarFormDTO,AppFootBarFormDTO.AddUserInternalGroup.class);
AppFootBarResultDTO resultDTO=customerFootBarService.queryAppFootBars(footBarFormDTO);
return new Result<AppFootBarResultDTO>().ok(resultDTO);
}
}

43
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/opercrm/CustomerParameterDao.java

@ -0,0 +1,43 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dataaggre.dao.opercrm;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dataaggre.entity.opercrm.CustomerParameterEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 客户配置表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-07-27
*/
@Mapper
public interface CustomerParameterDao extends BaseDao<CustomerParameterEntity> {
/**
* 根据参数key查询
*
* @param parameterKey
* @param customerId
* @return java.lang.String
* @author yinzuomei
* @date 2021/7/27 17:07
*/
CustomerParameterEntity selectByParameterKey(@Param("parameterKey")String parameterKey, @Param("customerId")String customerId);
}

59
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/opercustomize/CustomerFootBarDao.java

@ -0,0 +1,59 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dataaggre.dao.opercustomize;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dataaggre.dto.app.result.CustomerFootBarDTO;
import com.epmet.dataaggre.entity.opercustomize.CustomerFootBarEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* APP底部菜单栏信息
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-07-27
*/
@Mapper
public interface CustomerFootBarDao extends BaseDao<CustomerFootBarEntity> {
/**
* 查询客户工作端或者居民端footbar列表
*
* @param customerId
* @param appType
* @return java.util.List<com.epmet.dataaggre.dto.app.result.CustomerFootBarDTO>
* @author yinzuomei
* @date 2021/7/28 10:56
*/
List<CustomerFootBarDTO> selectAppFootBars(@Param("customerId") String customerId, @Param("appType") String appType);
/**
* 查询某个footbar信息
*
* @param customerId
* @param appType
* @param barKey
* @return com.epmet.dataaggre.entity.opercustomize.CustomerFootBarEntity
* @author yinzuomei
* @date 2021/7/28 10:56
*/
CustomerFootBarEntity selectDefaultIcon(@Param("customerId") String customerId, @Param("appType")String appType, @Param("barKey")String barKey);
}

68
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/opercrm/CustomerParameterEntity.java

@ -0,0 +1,68 @@
/**
* 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.dataaggre.entity.opercrm;
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-07-27
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("customer_parameter")
public class CustomerParameterEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 参数KEY值(发短信:send_msg;)
*/
private String parameterKey;
/**
* 参数名称(短信)
*/
private String parameterName;
/**
* 参数开关开启on关闭off
*/
private String parameterSwitch;
/**
* 参数VALUE值
*/
private String parameterValue;
/**
* 说明
*/
private String description;
}

88
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/opercustomize/CustomerFootBarEntity.java

@ -0,0 +1,88 @@
/**
* 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.dataaggre.entity.opercustomize;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* APP底部菜单栏信息
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-07-27
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("customer_foot_bar")
public class CustomerFootBarEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 工作端gov居民端resi
*/
private String appType;
/**
* KEY
*/
private String barKey;
/**
* bar名称
*/
private String barName;
/**
* 页面标题
*/
private String pageTitle;
/**
* 图标路径
*/
private String iconPath;
/**
* 选中页面图标路径
*/
private String selectedIconPath;
/**
* 凸起时图标路径
*/
private String floatIconPath;
/**
* 是否显示1显示0隐藏
*/
private Integer display;
/**
* 排序
*/
private Integer orderIndex;
}

34
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/opercrm/CustomerParameterService.java

@ -0,0 +1,34 @@
/**
* 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.dataaggre.service.opercrm;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.dataaggre.entity.opercrm.CustomerParameterEntity;
/**
* 客户配置表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-07-27
*/
public interface CustomerParameterService extends BaseService<CustomerParameterEntity> {
CustomerParameterEntity queryFootBarPattern(String customerId, String appType);
CustomerParameterEntity queryFootBarHighLightNum(String customerId, String appType);
}

60
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/opercrm/impl/CustomerParameterServiceImpl.java

@ -0,0 +1,60 @@
/**
* 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.dataaggre.service.opercrm.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.Constant;
import com.epmet.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.dao.opercrm.CustomerParameterDao;
import com.epmet.dataaggre.entity.opercrm.CustomerParameterEntity;
import com.epmet.dataaggre.service.opercrm.CustomerParameterService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
* 客户配置表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-07-27
*/
@DataSource(DataSourceConstant.OPER_CRM)
@Slf4j
@Service
public class CustomerParameterServiceImpl extends BaseServiceImpl<CustomerParameterDao, CustomerParameterEntity> implements CustomerParameterService {
@Override
public CustomerParameterEntity queryFootBarPattern(String customerId, String appType) {
String parameterKey=appType.concat(Constant.FOOTBAR_PATTERN_KEY_SUFFIX);
CustomerParameterEntity pattern=baseDao.selectByParameterKey(parameterKey,customerId);
if(null ==pattern){
pattern=baseDao.selectByParameterKey(parameterKey, Constant.DEFAULT_CUSTOMER);
}
return pattern;
}
@Override
public CustomerParameterEntity queryFootBarHighLightNum(String customerId, String appType) {
String parameterKey=appType.concat(Constant.FOOTBAR_HIGHLIGHT_NUM);
CustomerParameterEntity entity=baseDao.selectByParameterKey(parameterKey,customerId);
if(null ==entity){
entity=baseDao.selectByParameterKey(parameterKey, Constant.DEFAULT_CUSTOMER);
}
return entity;
}
}

42
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/opercustomize/CustomerFootBarService.java

@ -0,0 +1,42 @@
/**
* 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.dataaggre.service.opercustomize;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.dataaggre.dto.app.form.AppFootBarFormDTO;
import com.epmet.dataaggre.dto.app.result.AppFootBarResultDTO;
import com.epmet.dataaggre.entity.opercustomize.CustomerFootBarEntity;
/**
* APP底部菜单栏信息
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-07-27
*/
public interface CustomerFootBarService extends BaseService<CustomerFootBarEntity> {
/**
* 查询底部footBar信息两端通用
*
* @param footBarFormDTO
* @return com.epmet.dataaggre.dto.app.result.AppFootBarResultDTO
* @author yinzuomei
* @date 2021/7/27 18:59
*/
AppFootBarResultDTO queryAppFootBars(AppFootBarFormDTO footBarFormDTO);
}

115
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/opercustomize/impl/CustomerFootBarServiceImpl.java

@ -0,0 +1,115 @@
/**
* 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.dataaggre.service.opercustomize.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.Constant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.dao.opercustomize.CustomerFootBarDao;
import com.epmet.dataaggre.dto.app.form.AppFootBarFormDTO;
import com.epmet.dataaggre.dto.app.result.AppFootBarResultDTO;
import com.epmet.dataaggre.dto.app.result.CustomerFootBarDTO;
import com.epmet.dataaggre.entity.opercrm.CustomerParameterEntity;
import com.epmet.dataaggre.entity.opercustomize.CustomerFootBarEntity;
import com.epmet.dataaggre.service.opercrm.CustomerParameterService;
import com.epmet.dataaggre.service.opercustomize.CustomerFootBarService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.List;
/**
* APP底部菜单栏信息
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-07-27
*/
@DataSource(DataSourceConstant.OPERCUSTOMIZE)
@Slf4j
@Service
public class CustomerFootBarServiceImpl extends BaseServiceImpl<CustomerFootBarDao, CustomerFootBarEntity> implements CustomerFootBarService {
@Autowired
private CustomerParameterService customerParameterService;
/**
* 查询底部footBar信息两端通用
*
* @param footBarFormDTO
* @return com.epmet.dataaggre.dto.app.result.AppFootBarResultDTO
* @author yinzuomei
* @date 2021/7/27 18:59
*/
@Override
public AppFootBarResultDTO queryAppFootBars(AppFootBarFormDTO footBarFormDTO) {
AppFootBarResultDTO resultDTO = new AppFootBarResultDTO();
resultDTO.setPattern(Constant.FOOT_BAR_FLAT);
resultDTO.setHighLightNum(NumConstant.ZERO);
// 1、查询客户的模式,没有返回产品默认的;*水平:flat;浮起:float
CustomerParameterEntity patternEntity = customerParameterService.queryFootBarPattern(footBarFormDTO.getCustomerId(), footBarFormDTO.getAppType());
// 2、查询客户设置的第几个,没有默认返回0,
CustomerParameterEntity highLightNumEntity = customerParameterService.queryFootBarHighLightNum(footBarFormDTO.getCustomerId(), footBarFormDTO.getAppType());
List<CustomerFootBarDTO> footBarList = baseDao.selectAppFootBars(footBarFormDTO.getCustomerId(), footBarFormDTO.getAppType());
if (CollectionUtils.isEmpty(footBarList)) {
footBarList = baseDao.selectAppFootBars(Constant.DEFAULT_CUSTOMER, footBarFormDTO.getAppType());
}else{
//如果客户没有上传图标,返回产品默认的图标
for (CustomerFootBarDTO dto : footBarList) {
if (StringUtils.isBlank(dto.getIconPath())
|| StringUtils.isBlank(dto.getSelectedIconPath())
|| StringUtils.isBlank(dto.getFloatIconPath())) {
CustomerFootBarEntity defaultEntity = baseDao.selectDefaultIcon(Constant.DEFAULT_CUSTOMER, footBarFormDTO.getAppType(), dto.getBarKey());
if (StringUtils.isBlank(dto.getIconPath())) {
dto.setIconPath(null == defaultEntity ? StrConstant.EPMETY_STR : defaultEntity.getIconPath());
}
if (StringUtils.isBlank(dto.getSelectedIconPath())) {
dto.setSelectedIconPath(null == defaultEntity ? StrConstant.EPMETY_STR : defaultEntity.getSelectedIconPath());
}
if (StringUtils.isBlank(dto.getFloatIconPath())) {
dto.setFloatIconPath(null == defaultEntity ? StrConstant.EPMETY_STR : defaultEntity.getFloatIconPath());
}
}
}
}
if (footBarList.size() % NumConstant.TWO == 0) {
resultDTO.setIsOddNum(false);
} else {
resultDTO.setIsOddNum(true);
}
//只有客户选择的浮起+奇数+全部上传了图标才返回pattern=flat
if (resultDTO.getIsOddNum() && Constant.FOOT_BAR_FLOAT.equals(patternEntity.getParameterValue())) {
resultDTO.setPattern(Constant.FOOT_BAR_FLOAT);
//返回
resultDTO.setHighLightNum(footBarList.size() / NumConstant.TWO);
} else {
resultDTO.setPattern(Constant.FOOT_BAR_FLAT);
resultDTO.setHighLightNum(Integer.valueOf(highLightNumEntity.getParameterValue()));
}
//如果是浮起模式且是奇数,返回是footBarList的索引
resultDTO.setFootBarList(footBarList);
return resultDTO;
}
}

5
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/bootstrap.yml

@ -139,6 +139,11 @@ dynamic:
url: @datasource.druid.evaluationIndex.url@
username: @datasource.druid.evaluationIndex.username@
password: @datasource.druid.evaluationIndex.password@
opercustomize:
driver-class-name: com.mysql.cj.jdbc.Driver
url: @datasource.druid.opercustomize.url@
username: @datasource.druid.opercustomize.username@
password: @datasource.druid.opercustomize.password@
feign:
hystrix:
enabled: true

15
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/opercrm/CustomerParameterDao.xml

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dataaggre.dao.opercrm.CustomerParameterDao">
<select id="selectByParameterKey" parameterType="map" resultType="com.epmet.dataaggre.entity.opercrm.CustomerParameterEntity">
select
cp.*
from customer_parameter cp
where cp.DEL_FLAG='0'
and cp.CUSTOMER_ID=#{customerId}
and cp.PARAMETER_KEY=#{parameterKey}
</select>
</mapper>

41
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/opercustomize/CustomerFootBarDao.xml

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dataaggre.dao.opercustomize.CustomerFootBarDao">
<!-- 查询客户工作端或者居民端,footbar列表 -->
<select id="selectAppFootBars" parameterType="map" resultType="com.epmet.dataaggre.dto.app.result.CustomerFootBarDTO">
SELECT
c.BAR_KEY as barKey,
c.BAR_NAME as barName,
IFNULL(c.PAGE_TITLE,'') as pageTitle,
IFNULL(c.ICON_PATH,'') as iconPath,
IFNULL(c.SELECTED_ICON_PATH,'') as selectedIconPath,
IFNULL(c.FLOAT_ICON_PATH,'') AS floatIconPath,
c.CUSTOMER_ID as customerId
FROM
customer_foot_bar c
WHERE
c.del_flag = '0'
AND c.customer_id = #{customerId}
AND c.app_type = #{appType}
AND C.DISPLAY='1'
order by c.ORDER_INDEX asc
</select>
<!-- 查询某个footbar信息 -->
<select id="selectDefaultIcon" parameterType="map" resultType="com.epmet.dataaggre.entity.opercustomize.CustomerFootBarEntity">
SELECT
IFNULL(c.ICON_PATH,'') as iconPath,
IFNULL(c.SELECTED_ICON_PATH,'') as selectedIconPath,
IFNULL(c.FLOAT_ICON_PATH,'') as floatIconPath
FROM
customer_foot_bar c
WHERE
c.del_flag = '0'
AND c.customer_id = #{customerId}
AND c.app_type = #{appType}
and c.BAR_KEY=#{barKey}
AND C.DISPLAY='1'
</select>
</mapper>

2
epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/ResiPointRankListResultDTO.java

@ -30,6 +30,8 @@ public class ResiPointRankListResultDTO implements Serializable {
* */
private Integer myRanking;
private String myHeadImgUrl;
/**
* 积分排名列表
* */

2
epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/ResiPointRankingResultDTO.java

@ -20,4 +20,6 @@ public class ResiPointRankingResultDTO implements Serializable {
private Integer point;
private String headImgUrl;
}

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

@ -146,6 +146,7 @@ public class UserPointStatisticalDailyServiceImpl extends BaseServiceImpl<UserPo
}
//微信昵称
o.setMyNickname(myResiInfoResult.getData().get(NumConstant.ZERO).getNickname());
o.setMyHeadImgUrl(myResiInfoResult.getData().get(NumConstant.ZERO).getHeadImgUrl());
}
//2.获取维度值
DimIdGenerator.DimIdBean dimIdBean = DimIdGenerator.getDimIdBean(new Date());
@ -204,6 +205,7 @@ public class UserPointStatisticalDailyServiceImpl extends BaseServiceImpl<UserPo
target.setPoint(rankList.get(i).getTotalPoint());
if(userRequestCallback) {
target.setNickname(null == userInfo.getData().get(i) ? "" : userInfo.getData().get(i).getNickname());
target.setHeadImgUrl(null == userInfo.getData().get(i) ? "" : userInfo.getData().get(i).getHeadImgUrl());
}
resultObj.setRankList(target);
result.add(resultObj);

2
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointTotalServiceImpl.java

@ -155,6 +155,7 @@ public class UserPointTotalServiceImpl extends BaseServiceImpl<UserPointTotalDao
}
//微信昵称
o.setMyNickname(myResiInfoResult.getData().get(NumConstant.ZERO).getNickname());
o.setMyHeadImgUrl(myResiInfoResult.getData().get(NumConstant.ZERO).getHeadImgUrl());
}
//2.查询排行榜信息,个人排行(分页)
if(NumConstant.ONE < pointRankFormDTO.getPageNo()){
@ -215,6 +216,7 @@ public class UserPointTotalServiceImpl extends BaseServiceImpl<UserPointTotalDao
target.setPoint(rankList.get(i).getTotalPoint());
if(userRequestCallback) {
target.setNickname(null == userInfo.getData().get(i) ? "" : userInfo.getData().get(i).getNickname());
target.setHeadImgUrl(null == userInfo.getData().get(i) ? "" : userInfo.getData().get(i).getHeadImgUrl());
}
resultObj.setRankList(target);
result.add(resultObj);

2
epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/form/RedDotFormDTO.java

@ -23,7 +23,7 @@ public class RedDotFormDTO implements Serializable {
/**
* 网格ID
*/
@NotBlank(message = "网格id不能为空")
//@NotBlank(message = "网格id不能为空")
private String gridId;
}

92
epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/RemindServiceImpl.java

@ -14,6 +14,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import java.util.ArrayList;
import java.util.Collections;
@ -228,14 +229,20 @@ public class RemindServiceImpl implements RemindService {
Result<List<GridProcessingCountResultDTO>> groupResult = resiGroupFeignClient.queryGroupProcessingCount(gridIdList);
if (groupResult.success() && !CollectionUtils.isEmpty(groupResult.getData())) {
groupResult.getData().forEach(groupDto -> {
//当前网格
if (formDTO.getGridId().equals(groupDto.getGridId()) && groupDto.getCount() > 0) {
if (StringUtils.isEmpty(formDTO.getGridId())) {
functionList.add(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_GROUP);
details.add(new RedDotDetialDTO(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_GROUP, groupDto.getCount()));
}
//其他网格
if (!formDTO.getGridId().equals(groupDto.getGridId()) && groupDto.getCount() > 0) {
redDotResultDTO.setOtherGridRedDot(true);
redDotResultDTO.setOtherGridRedDot(false);
} else {
//当前网格
if (formDTO.getGridId().equals(groupDto.getGridId()) && groupDto.getCount() > 0) {
functionList.add(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_GROUP);
details.add(new RedDotDetialDTO(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_GROUP, groupDto.getCount()));
}
//其他网格
if (!formDTO.getGridId().equals(groupDto.getGridId()) && groupDto.getCount() > 0) {
redDotResultDTO.setOtherGridRedDot(true);
}
}
});
}
@ -244,14 +251,20 @@ public class RemindServiceImpl implements RemindService {
Result<List<GridProcessingCountResultDTO>> resiResult = resiPartymemberFeignClient.queryResiProcessingCount(gridIdList);
if (resiResult.success() && !CollectionUtils.isEmpty(resiResult.getData())) {
resiResult.getData().forEach(resiDto -> {
//当前网格
if (formDTO.getGridId().equals(resiDto.getGridId()) && resiDto.getCount() > 0) {
if (StringUtils.isEmpty(formDTO.getGridId())) {
functionList.add(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_RESI);
details.add(new RedDotDetialDTO(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_RESI, resiDto.getCount()));
}
//其他网格
if (!formDTO.getGridId().equals(resiDto.getGridId()) && resiDto.getCount() > 0) {
redDotResultDTO.setOtherGridRedDot(true);
redDotResultDTO.setOtherGridRedDot(false);
} else {
//当前网格
if (formDTO.getGridId().equals(resiDto.getGridId()) && resiDto.getCount() > 0) {
functionList.add(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_RESI);
details.add(new RedDotDetialDTO(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_RESI, resiDto.getCount()));
}
//其他网格
if (!formDTO.getGridId().equals(resiDto.getGridId()) && resiDto.getCount() > 0) {
redDotResultDTO.setOtherGridRedDot(true);
}
}
});
}
@ -260,14 +273,20 @@ public class RemindServiceImpl implements RemindService {
Result<List<GridProcessingCountResultDTO>> partyResult = resiPartymemberFeignClient.queryPartyMemberProcessingCount(gridIdList);
if (partyResult.success() && !CollectionUtils.isEmpty(partyResult.getData())) {
partyResult.getData().forEach(partyDto -> {
//当前网格
if (formDTO.getGridId().equals(partyDto.getGridId()) && partyDto.getCount() > 0) {
if (StringUtils.isEmpty(formDTO.getGridId())) {
functionList.add(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_PARTYAUTH);
details.add(new RedDotDetialDTO(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_PARTYAUTH, partyDto.getCount()));
}
//其他网格
if (!formDTO.getGridId().equals(partyDto.getGridId()) && partyDto.getCount() > 0) {
redDotResultDTO.setOtherGridRedDot(true);
redDotResultDTO.setOtherGridRedDot(false);
} else {
//当前网格
if (formDTO.getGridId().equals(partyDto.getGridId()) && partyDto.getCount() > 0) {
functionList.add(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_PARTYAUTH);
details.add(new RedDotDetialDTO(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_PARTYAUTH, partyDto.getCount()));
}
//其他网格
if (!formDTO.getGridId().equals(partyDto.getGridId()) && partyDto.getCount() > 0) {
redDotResultDTO.setOtherGridRedDot(true);
}
}
});
}
@ -276,14 +295,20 @@ public class RemindServiceImpl implements RemindService {
Result<List<GridProcessingCountResultDTO>> issueResult = govIssueFeignClient.queryVotingIssueCount(gridIdList);
if (issueResult.success() && !CollectionUtils.isEmpty(issueResult.getData())) {
issueResult.getData().forEach(issueDto -> {
//当前网格
if (formDTO.getGridId().equals(issueDto.getGridId()) && issueDto.getCount() > 0) {
if (StringUtils.isEmpty(formDTO.getGridId())) {
functionList.add(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_ISSUE);
details.add(new RedDotDetialDTO(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_ISSUE, issueDto.getCount()));
}
//其他网格
if (!formDTO.getGridId().equals(issueDto.getGridId()) && issueDto.getCount() > 0) {
redDotResultDTO.setOtherGridRedDot(true);
redDotResultDTO.setOtherGridRedDot(false);
} else {
//当前网格
if (formDTO.getGridId().equals(issueDto.getGridId()) && issueDto.getCount() > 0) {
functionList.add(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_ISSUE);
details.add(new RedDotDetialDTO(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_ISSUE, issueDto.getCount()));
}
//其他网格
if (!formDTO.getGridId().equals(issueDto.getGridId()) && issueDto.getCount() > 0) {
redDotResultDTO.setOtherGridRedDot(true);
}
}
});
}
@ -292,14 +317,21 @@ public class RemindServiceImpl implements RemindService {
Result<List<GridAuditingBadgeCountResultDTO>> badgeResult = epmetUserOpenFeignClient.queryGridAuditingBadgeCount(gridIdList);
if (badgeResult.success() && !CollectionUtils.isEmpty(badgeResult.getData())) {
badgeResult.getData().forEach(badgeDto -> {
//当前网格
if (formDTO.getGridId().equals(badgeDto.getGridId()) && badgeDto.getCount() > 0) {
if (StringUtils.isEmpty(formDTO.getGridId())) {
functionList.add(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_BADGE);
details.add(new RedDotDetialDTO(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_BADGE, badgeDto.getCount()));
}
//其他网格
if (!formDTO.getGridId().equals(badgeDto.getGridId()) && badgeDto.getCount() > 0) {
redDotResultDTO.setOtherGridRedDot(true);
redDotResultDTO.setOtherGridRedDot(false);
} else {
//当前网格
if (formDTO.getGridId().equals(badgeDto.getGridId()) && badgeDto.getCount() > 0) {
functionList.add(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_BADGE);
details.add(new RedDotDetialDTO(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_BADGE, badgeDto.getCount()));
}
//其他网格
if (!formDTO.getGridId().equals(badgeDto.getGridId()) && badgeDto.getCount() > 0) {
redDotResultDTO.setOtherGridRedDot(true);
}
}
});
}

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

@ -337,4 +337,8 @@ public interface GovIssueOpenFeignClient {
*/
@PostMapping(value = "/gov/issue/issueprojectcategorydict/getprojectcategory")
Result<List<ProjectCategoryDisPoseResultDTO>> getProjectCategory(@RequestBody List<ProjectCategoryDisPoseResultDTO> list);
@PostMapping("/gov/issue/issue/unresolvedlist")
Result<List<UnResolvedResultDTO>> getUnresolvedList(@RequestBody ShiftProjectListFromDTO formDTO);
}

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

@ -276,4 +276,9 @@ public class GovIssueOpenFeignClientFallBack implements GovIssueOpenFeignClient
public Result<List<ProjectCategoryDisPoseResultDTO>> getProjectCategory(List<ProjectCategoryDisPoseResultDTO> list) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "getProjectCategory", list);
}
@Override
public Result<List<UnResolvedResultDTO>> getUnresolvedList(ShiftProjectListFromDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "getUnresolvedList", formDTO);
}
}

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

@ -278,5 +278,11 @@ public class IssueController {
return new Result<List<CanEvaluateProjectCountBatchResultDTO>>().ok(issueService.canEvaluateProjectCountBatch(issueIds));
}
@PostMapping("unresolvedlist")
public Result<List<UnResolvedResultDTO>> getUnresolvedList(@RequestBody ShiftProjectListFromDTO formDTO){
return new Result<List<UnResolvedResultDTO>>().ok(issueService.getUnResolvedList(formDTO));
}
}

9
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java

@ -216,4 +216,13 @@ public interface IssueDao extends BaseDao<IssueEntity> {
* @Date 2020/12/25 14:12
**/
List<GridVotingIssueCountResultDTO> selectIssueRedDot(@Param("gridIdList") List<String> gridIdList);
/**
* 无需解决列表
* @author zhaoqifeng
* @date 2021/7/27 16:52
* @param gridId
* @return java.util.List<com.epmet.dto.result.UnResolvedResultDTO>
*/
List<UnResolvedResultDTO> selectUnResolvedList(@Param("gridId") String gridId);
}

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

@ -341,4 +341,13 @@ public interface IssueService extends BaseService<IssueEntity> {
* @date 2021/5/11 4:50 下午
*/
List<CanEvaluateProjectCountBatchResultDTO> canEvaluateProjectCountBatch(List<String> issueIds);
/**
* 无需解决解决列表
* @author zhaoqifeng
* @date 2021/7/27 16:58
* @param fromDTO
* @return java.util.List<com.epmet.dto.result.UnResolvedResultDTO>
*/
List<UnResolvedResultDTO> getUnResolvedList(ShiftProjectListFromDTO fromDTO);
}

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

@ -127,6 +127,8 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
private IssueVoteDetailDao issueVoteDetailDao;
@Autowired
private EpmetMessageOpenFeignClient messageOpenFeignClient;
@Autowired
private GovProjectOpenFeignClient govProjectOpenFeignClient;
@Value("${openapi.scan.server.url}")
@ -1507,4 +1509,46 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
return result;
}
/**
* 无需解决解决列表
*
* @param fromDTO
* @return java.util.List<com.epmet.dto.result.UnResolvedResultDTO>
* @author zhaoqifeng
* @date 2021/7/27 16:58
*/
@Override
public List<UnResolvedResultDTO> getUnResolvedList(ShiftProjectListFromDTO fromDTO) {
List<UnResolvedResultDTO> resultList = new ArrayList<>();
List<UnResolvedResultDTO> issueList = baseDao.selectUnResolvedList(fromDTO.getGridId());
if (CollectionUtils.isNotEmpty(issueList)) {
resultList.addAll(issueList);
}
List<UnResolvedResultDTO> projectList = govProjectOpenFeignClient.getUnResolvedList(fromDTO).getData();
if (CollectionUtils.isNotEmpty(projectList)) {
resultList.addAll(projectList);
}
if (CollectionUtils.isNotEmpty(resultList)) {
resultList = resultList.stream().sorted(Comparator.comparing(UnResolvedResultDTO::getClosedTime).reversed()).collect(Collectors.toList());
int fromIndex = (fromDTO.getPageNo() - NumConstant.ONE) * fromDTO.getPageSize();
int toIndex = fromDTO.getPageNo() * fromDTO.getPageSize();
if (fromIndex >= resultList.size()) {
return new ArrayList<>();
}
if (toIndex > resultList.size()) {
toIndex = resultList.size();
}
resultList = resultList.subList(fromIndex, toIndex);
}
return resultList;
}
public static void main(String[] args) {
List<String> list = new ArrayList<>();
list.add("1");
list.add("2");
list.add("3");
System.out.println(list.subList(0, 3));
}
}

16
epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml

@ -235,6 +235,7 @@
DEL_FLAG = '0'
AND GRID_ID = #{gridId}
AND ISSUE_STATUS = 'closed'
AND RESOLVE_TYPE = 'resolved'
ORDER BY
created_time DESC
LIMIT #{pageNo},
@ -561,4 +562,19 @@
GROUP BY
temp.gridId
</select>
<select id="selectUnResolvedList" resultType="com.epmet.dto.result.UnResolvedResultDTO">
SELECT
ID AS issueId,
IFNULL(ISSUE_TITLE,'') AS issueTitle,
IFNULL(CLOSE_REASON,'') AS solution,
UNIX_TIMESTAMP( CLOSED_TIME ) AS closedTime,
SOURCE_ID AS sourceId
FROM
issue
WHERE
DEL_FLAG = '0'
AND GRID_ID = #{gridId}
AND ISSUE_STATUS = 'closed'
AND RESOLVE_TYPE = 'unresolved'
</select>
</mapper>

0
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ShiftProjectListFromDTO.java → epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ShiftProjectListFromDTO.java

31
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/PendingResultDTO.java

@ -0,0 +1,31 @@
package com.epmet.dto.result;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
/**
* @author zhaoqifeng
* @dscription
* @date 2021/7/27 10:47
*/
@NoArgsConstructor
@Data
public class PendingResultDTO implements Serializable {
private static final long serialVersionUID = 2545519820222637112L;
private String issueId;
private String issueTitle;
private Long issueShiftedTime;
private String topicContent;
private List<String> currentHandleDepartMent;
private List<String> topicVoices;
private List<String> topicImgs;
private String sourceId;
@JsonIgnore
private String projectId;
}

53
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ResolvedResultDTO.java

@ -0,0 +1,53 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @author zhaoqifeng
* @dscription
* @date 2021/7/27 13:55
*/
@Data
public class ResolvedResultDTO implements Serializable {
private static final long serialVersionUID = -6670213622289052352L;
/**
* 议题Id
*/
private String issueId;
/**
* 议题标题
*/
private String issueTitle;
/**
* 转成项目时间
*/
private Long closedTime;
/**
* 结案说明
*/
private String publicReply;
/**
* 来源id
*/
private String sourceId;
/**
* 话题图片
*/
private List<String> topicImgs;
/**
* 话题语音
*/
private List<String> topicVoices;
/**
* 话题内容
*/
private String topicContent;
}

53
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/UnResolvedResultDTO.java

@ -0,0 +1,53 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @author zhaoqifeng
* @dscription
* @date 2021/7/27 10:31
*/
@Data
public class UnResolvedResultDTO implements Serializable {
private static final long serialVersionUID = 3654271828450408782L;
/**
* 议题Id
*/
private String issueId;
/**
* 议题标题
*/
private String issueTitle;
/**
* 转成项目时间
*/
private Long closedTime;
/**
* 结案说明
*/
private String solution;
/**
* 来源id
*/
private String sourceId;
/**
* 话题图片
*/
private List<String> topicImgs;
/**
* 话题语音
*/
private List<String> topicVoices;
/**
* 话题内容
*/
private String topicContent;
}

31
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java

@ -93,4 +93,35 @@ public interface GovProjectOpenFeignClient {
*/
@PostMapping("gov/project/project/patrolproject")
Result<Integer> selectPatrolProject(@RequestBody PatrolProjectFormDTO formDTO);
/**
* 获取待处理列表
* @author zhaoqifeng
* @date 2021/7/27 14:55
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.PendingResultDTO>>
*/
@PostMapping("gov/project/project/pendinglist")
Result<List<PendingResultDTO>> getPendingList(@RequestBody ShiftProjectListFromDTO formDTO);
/**
* 已解决项目列表
* @author zhaoqifeng
* @date 2021/7/27 14:55
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.ResolvedResultDTO>>
*/
@PostMapping("gov/project/project/resolvedlist")
Result<List<ResolvedResultDTO>> getResolvedList(@RequestBody ShiftProjectListFromDTO formDTO);
/**
* 无需解决项目列表
* @author zhaoqifeng
* @date 2021/7/27 14:55
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.UnResolvedResultDTO>>
*/
@PostMapping("gov/project/project/unresolvedlist")
Result<List<UnResolvedResultDTO>> getUnResolvedList(@RequestBody ShiftProjectListFromDTO formDTO);
}

39
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java

@ -80,4 +80,43 @@ public class GovProjectOpenFeignClientFallback implements GovProjectOpenFeignCli
public Result<Integer> selectPatrolProject(PatrolProjectFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "selectPatrolProject", formDTO);
}
/**
* 获取待处理列表
*
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.dto.result.PendingResultDTO>>
* @author zhaoqifeng
* @date 2021/7/27 14:55
*/
@Override
public Result<List<PendingResultDTO>> getPendingList(ShiftProjectListFromDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "getPendingList", formDTO);
}
/**
* 已解决项目列表
*
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.dto.result.ResolvedResultDTO>>
* @author zhaoqifeng
* @date 2021/7/27 14:55
*/
@Override
public Result<List<ResolvedResultDTO>> getResolvedList(ShiftProjectListFromDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "getResolvedList", formDTO);
}
/**
* 无需解决项目列表
*
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.dto.result.UnResolvedResultDTO>>
* @author zhaoqifeng
* @date 2021/7/27 14:55
*/
@Override
public Result<List<UnResolvedResultDTO>> getUnResolvedList(ShiftProjectListFromDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "getUnResolvedList", formDTO);
}
}

37
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java

@ -234,4 +234,41 @@ public class ProjectController {
return new Result<Integer>().ok(projectService.selectPatrolProject(formDTO));
}
/**
* 获取待处理列表
* @author zhaoqifeng
* @date 2021/7/27 14:55
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.PendingResultDTO>>
*/
@PostMapping("pendinglist")
public Result<List<PendingResultDTO>> getPendingList(@RequestBody ShiftProjectListFromDTO formDTO){
return new Result<List<PendingResultDTO>>().ok(projectService.getPendingList(formDTO));
}
/**
* 已解决项目列表
* @author zhaoqifeng
* @date 2021/7/27 14:55
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.ResolvedResultDTO>>
*/
@PostMapping("resolvedlist")
public Result<List<ResolvedResultDTO>> getResolvedList(@RequestBody ShiftProjectListFromDTO formDTO){
return new Result<List<ResolvedResultDTO>>().ok(projectService.getResolvedListByGrid(formDTO));
}
/**
* 无需解决项目列表
* @author zhaoqifeng
* @date 2021/7/27 14:55
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.UnResolvedResultDTO>>
*/
@PostMapping("unresolvedlist")
public Result<List<UnResolvedResultDTO>> getUnResolvedList(@RequestBody ShiftProjectListFromDTO formDTO){
return new Result<List<UnResolvedResultDTO>>().ok(projectService.getUnResolvedListByGrid(formDTO));
}
}

33
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java

@ -173,4 +173,37 @@ public interface ProjectDao extends BaseDao<ProjectEntity> {
* @date 2021/7/1 10:16 上午
*/
Integer selectPatrolProject(PatrolProjectFormDTO formDTO);
/**
* 获取党建声音处理中列表
* @author zhaoqifeng
* @date 2021/7/27 10:28
* @param gridId
* @param pageNo
* @param pageSize
* @return java.util.List<com.epmet.dto.result.ShiftProjectListResultDTO>
*/
List<PendingResultDTO> selectPendingListByGrid(@Param("gridId")String gridId, @Param("pageNo") Integer pageNo,
@Param("pageSize") Integer pageSize);
/**
* 获取党建声音已结案列表
* @author zhaoqifeng
* @date 2021/7/27 10:28
* @param gridId
* @param pageNo
* @param pageSize
* @return java.util.List<com.epmet.dto.result.ShiftProjectListResultDTO>
*/
List<ResolvedResultDTO> selectResolvedListByGrid(@Param("gridId")String gridId, @Param("pageNo") Integer pageNo,
@Param("pageSize") Integer pageSize);
/**
* 无需解决列表
* @author zhaoqifeng
* @date 2021/7/27 14:38
* @param gridId
* @return java.util.List<com.epmet.dto.result.UnResolvedResultDTO>
*/
List<UnResolvedResultDTO> selectUnResolvedListByGrid(@Param("gridId")String gridId);
}

27
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java

@ -303,4 +303,31 @@ public interface ProjectService extends BaseService<ProjectEntity> {
* @date 2021/7/1 10:16 上午
*/
Integer selectPatrolProject(PatrolProjectFormDTO formDTO);
/**
* 获取待处理列表
* @author zhaoqifeng
* @date 2021/7/27 14:18
* @param fromDTO
* @return java.util.List<com.epmet.dto.result.PendingResultDTO>
*/
List<PendingResultDTO> getPendingList(ShiftProjectListFromDTO fromDTO);
/**
* 已解决项目列表
* @author zhaoqifeng
* @date 2021/7/27 14:36
* @param fromDTO
* @return java.util.List<com.epmet.dto.result.ResolvedResultDTO>
*/
List<ResolvedResultDTO> getResolvedListByGrid(ShiftProjectListFromDTO fromDTO);
/**
* 无需解决项目列表
* @author zhaoqifeng
* @date 2021/7/27 14:40
* @param fromDTO
* @return java.util.List<com.epmet.dto.result.UnResolvedResultDTO>
*/
List<UnResolvedResultDTO> getUnResolvedListByGrid(ShiftProjectListFromDTO fromDTO);
}

47
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java

@ -2706,4 +2706,51 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
return baseDao.selectPatrolProject(formDTO);
}
/**
* 获取待处理列表
*
* @param fromDTO
* @return java.util.List<com.epmet.dto.result.PendingResultDTO>
* @author zhaoqifeng
* @date 2021/7/27 14:18
*/
@Override
public List<PendingResultDTO> getPendingList(ShiftProjectListFromDTO fromDTO) {
int pageIndex = (fromDTO.getPageNo() - NumConstant.ONE) * fromDTO.getPageSize();
List<PendingResultDTO> list = baseDao.selectPendingListByGrid(fromDTO.getGridId(), pageIndex, fromDTO.getPageSize());
list.forEach(item -> {
ProjectDTO dto = new ProjectDTO();
dto.setId(item.getProjectId());
item.setCurrentHandleDepartMent(baseDao.selectDepartmentNameList(dto));
});
return list;
}
/**
* 已解决项目列表
*
* @param fromDTO
* @return java.util.List<com.epmet.dto.result.ResolvedResultDTO>
* @author zhaoqifeng
* @date 2021/7/27 14:36
*/
@Override
public List<ResolvedResultDTO> getResolvedListByGrid(ShiftProjectListFromDTO fromDTO) {
int pageIndex = (fromDTO.getPageNo() - NumConstant.ONE) * fromDTO.getPageSize();
return baseDao.selectResolvedListByGrid(fromDTO.getGridId(), pageIndex, fromDTO.getPageSize());
}
/**
* 无需解决项目列表
*
* @param fromDTO
* @return java.util.List<com.epmet.dto.result.ResolvedResultDTO>
* @author zhaoqifeng
* @date 2021/7/27 14:40
*/
@Override
public List<UnResolvedResultDTO> getUnResolvedListByGrid(ShiftProjectListFromDTO fromDTO) {
return baseDao.selectUnResolvedListByGrid(fromDTO.getGridId());
}
}

62
epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml

@ -316,5 +316,67 @@
AND ORIGIN = 'agency'
AND CREATED_BY = #{userId}
</select>
<select id="selectPendingListByGrid" resultType="com.epmet.dto.result.PendingResultDTO">
SELECT
a.ID AS projectId,
a.ORIGIN_ID AS issueId,
a.TITLE AS issueTitle,
UNIX_TIMESTAMP(a.CREATED_TIME) AS issueShiftedTime,
b.SOURCE_ID AS sourceId
FROM
project a
INNER JOIN project_related_personnel b ON a.ID = b.PROJECT_ID
AND b.SOURCE_TYPE = 'topic'
AND b.GRID_ID = #{gridId}
WHERE
a.DEL_FLAG = '0'
AND a.`STATUS` = 'pending'
AND a.ORIGIN = 'issue'
ORDER BY a.CREATED_TIME DESC
LIMIT #{pageNo}, #{pageSize}
</select>
<select id="selectResolvedListByGrid" resultType="com.epmet.dto.result.ResolvedResultDTO">
SELECT
a.ORIGIN_ID AS issueId,
a.TITLE AS issueTitle,
c.PUBLIC_REPLY AS publicReply,
UNIX_TIMESTAMP(a.UPDATED_TIME) AS closedTime,
b.SOURCE_ID AS sourceId
FROM
project a
INNER JOIN project_related_personnel b ON a.ID = b.PROJECT_ID
AND b.SOURCE_TYPE = 'topic'
AND b.GRID_ID = #{gridId}
LEFT JOIN project_process c ON a.ID = c.PROJECT_ID
AND c.OPERATION = 'close'
WHERE
a.DEL_FLAG = '0'
AND a.`STATUS` = 'closed'
AND a.ORIGIN = 'issue'
AND a.CLOSED_STATUS = 'resolved'
ORDER BY a.UPDATED_TIME DESC
LIMIT #{pageNo}, #{pageSize}
</select>
<select id="selectUnResolvedListByGrid" resultType="com.epmet.dto.result.UnResolvedResultDTO">
SELECT
a.ORIGIN_ID AS issueId,
a.TITLE AS issueTitle,
c.PUBLIC_REPLY AS solution,
UNIX_TIMESTAMP(a.UPDATED_TIME) AS closedTime,
b.SOURCE_ID AS sourceId
FROM
project a
INNER JOIN project_related_personnel b ON a.ID = b.PROJECT_ID
AND b.SOURCE_TYPE = 'topic'
AND b.GRID_ID = #{gridId}
LEFT JOIN project_process c ON a.ID = c.PROJECT_ID
AND c.OPERATION = 'close'
WHERE
a.DEL_FLAG = '0'
AND a.`STATUS` = 'closed'
AND a.ORIGIN = 'issue'
AND a.CLOSED_STATUS = 'unresolved'
ORDER BY a.UPDATED_TIME DESC
</select>
</mapper>

33
epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/form/FootBarPatternFormDTO.java

@ -0,0 +1,33 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 描述一下
*
* @author yinzuomei@elink-cn.com
* @date 2021/7/27 17:21
*/
@Data
public class FootBarPatternFormDTO implements Serializable {
private static final long serialVersionUID = 8607183484805804359L;
/**
* 产品配置default 客户定制化里面就传客户id
*/
@NotBlank(message = "customerId不能为空")
private String customerId;
/**
* 工作端gov居民端resi
*/
@NotBlank(message = "appType不能为空")
private String appType;
/**
* 参数值含义flat水平模式float浮起某个菜单
*/
@NotBlank(message = "pattern不能为空,参数值含义:flat:水平模式;float:浮起某个菜单")
private String pattern;
}

28
epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/form/FootBarPatternQueryFormDTO.java

@ -0,0 +1,28 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 查询FootBar显示模式产品配置+客户定制化通用
*
* @author yinzuomei@elink-cn.com
* @date 2021/7/27 16:40
*/
@Data
public class FootBarPatternQueryFormDTO implements Serializable {
private static final long serialVersionUID = 2928030075406974562L;
/**
* 产品配置default 客户定制化里面就传客户id
*/
@NotBlank(message = "customerId不能为空")
private String customerId;
/**
* 工作端gov居民端resi
*/
@NotBlank(message = "appType不能为空")
private String appType;
}

23
epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/result/FootBarPatternQueryResultDTO.java

@ -0,0 +1,23 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* 查询FootBar显示模式产品配置+客户定制化通用
*
* @author yinzuomei@elink-cn.com
* @date 2021/7/27 16:49
*/
@Data
public class FootBarPatternQueryResultDTO implements Serializable {
private static final long serialVersionUID = -3185762444171339921L;
/**
* 参数值含义flat水平模式float浮起某个菜单
*/
private String pattern;
private String customerId;
}

33
epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java

@ -34,6 +34,7 @@ import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.excel.CustomerExcel;
import com.epmet.feign.GovOrgFeignClient;
import com.epmet.service.CustomerParameterService;
import com.epmet.service.CustomerRelationService;
import com.epmet.service.CustomerService;
import com.epmet.service.CustomerThirdplatApiServiceService;
@ -70,6 +71,9 @@ public class CustomerController {
@Autowired
private CustomerThirdplatApiServiceService customerThirdplatApiServiceService;
@Autowired
private CustomerParameterService customerParameterService;
@GetMapping("page")
public Result<PageData<CustomerDTO>> page(@RequestParam Map<String, Object> params) {
@ -393,4 +397,33 @@ public class CustomerController {
}
return new Result<>();
}
/**
* 查询FootBar显示模式产品配置+客户定制化通用
*
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.FootBarPatternQueryResultDTO>
* @author yinzuomei
* @date 2021/7/27 16:54
*/
@PostMapping("footbarpattern")
public Result<FootBarPatternQueryResultDTO> queryFootBarPattern(@RequestBody FootBarPatternQueryFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return new Result<FootBarPatternQueryResultDTO>().ok(customerParameterService.queryFootBarPattern(formDTO));
}
/**
* ???
*
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @author yinzuomei
* @date 2021/7/27 17:24
*/
@PostMapping("savefootbarpattern")
public Result saveFootBarPattern(@RequestBody FootBarPatternFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO);
customerParameterService.saveFootBarPattern(formDTO);
return new Result();
}
}

11
epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/dao/CustomerParameterDao.java

@ -31,4 +31,15 @@ public interface CustomerParameterDao extends BaseDao<CustomerParameterEntity> {
* @date 2021/1/4 下午4:12
*/
void updateParamInfo(@Param("formDTOS")List<CrmParameterResultDTO> formDTOS);
/**
* 查询FootBar显示模式产品配置+客户定制化通用
*
* @param parameterKey
* @param customerId
* @return java.lang.String
* @author yinzuomei
* @date 2021/7/27 17:07
*/
CustomerParameterEntity selectAppFootBarPattern(@Param("parameterKey")String parameterKey, @Param("customerId")String customerId);
}

22
epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerParameterService.java

@ -1,7 +1,10 @@
package com.epmet.service;
import com.epmet.dto.form.CrmParameterFormDTO;
import com.epmet.dto.form.FootBarPatternFormDTO;
import com.epmet.dto.form.FootBarPatternQueryFormDTO;
import com.epmet.dto.result.CrmParameterResultDTO;
import com.epmet.dto.result.FootBarPatternQueryResultDTO;
import java.util.List;
@ -27,4 +30,23 @@ public interface CustomerParameterService {
*/
void updateParamInfo(List<CrmParameterResultDTO> formDTOS);
/**
* 查询FootBar显示模式产品配置+客户定制化通用
*
* @param formDTO
* @return com.epmet.dto.result.FootBarPatternQueryResultDTO
* @author yinzuomei
* @date 2021/7/27 16:58
*/
FootBarPatternQueryResultDTO queryFootBarPattern(FootBarPatternQueryFormDTO formDTO);
/**
* ????
*
* @param formDTO
* @return void
* @author yinzuomei
* @date 2021/7/27 17:24
*/
void saveFootBarPattern(FootBarPatternFormDTO formDTO);
}

91
epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerParameterServiceImpl.java

@ -1,9 +1,20 @@
package com.epmet.service.impl;
import com.epmet.commons.tools.constant.Constant;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.CustomerParameterDao;
import com.epmet.dto.form.CheckFloatFootBarFormDTO;
import com.epmet.dto.form.CrmParameterFormDTO;
import com.epmet.dto.form.FootBarPatternFormDTO;
import com.epmet.dto.form.FootBarPatternQueryFormDTO;
import com.epmet.dto.result.CheckFloatFootBarResultDTO;
import com.epmet.dto.result.CrmParameterResultDTO;
import com.epmet.dto.result.FootBarPatternQueryResultDTO;
import com.epmet.entity.CustomerParameterEntity;
import com.epmet.feign.OperCustomizeOpenFeignClient;
import com.epmet.service.CustomerParameterService;
import com.epmet.service.CustomerService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -23,6 +34,10 @@ public class CustomerParameterServiceImpl implements CustomerParameterService {
@Autowired
private CustomerParameterDao parameterDao;
@Autowired
private CustomerService customerService;
@Autowired
private OperCustomizeOpenFeignClient operCustomizeOpenFeignClient;
/**
* @Description 查询客户配置信息
@ -54,4 +69,80 @@ public class CustomerParameterServiceImpl implements CustomerParameterService {
if (CollectionUtils.isEmpty(formDTOS))return;
parameterDao.updateParamInfo(formDTOS);
}
/**
* 查询FootBar显示模式产品配置+客户定制化通用
*
* @param formDTO
* @return com.epmet.dto.result.FootBarPatternQueryResultDTO
* @author yinzuomei
* @date 2021/7/27 16:58
*/
@Override
public FootBarPatternQueryResultDTO queryFootBarPattern(FootBarPatternQueryFormDTO formDTO) {
String parameterKey=formDTO.getAppType().concat(Constant.FOOTBAR_PATTERN_KEY_SUFFIX);
CustomerParameterEntity pattern=parameterDao.selectAppFootBarPattern(parameterKey,formDTO.getCustomerId());
if (null == pattern){
pattern = parameterDao.selectAppFootBarPattern(parameterKey, Constant.DEFAULT_CUSTOMER);
}
FootBarPatternQueryResultDTO resultDTO=new FootBarPatternQueryResultDTO();
resultDTO.setPattern(pattern.getParameterValue());
resultDTO.setCustomerId(formDTO.getCustomerId());
return resultDTO;
}
/**
* ????
*
* @param formDTO
* @return void
* @author yinzuomei
* @date 2021/7/27 17:24
*/
@Override
public void saveFootBarPattern(FootBarPatternFormDTO formDTO) {
//1、客户不存在
if (!Constant.DEFAULT_CUSTOMER.equals(formDTO.getCustomerId()) && null == customerService.get(formDTO.getCustomerId())) {
throw new RenException("客户信息不存在");
}
// 2、如果选择的浮起,只有footbar为奇数+并且3个图标路径全部上传才可以配置浮起模式
if (Constant.FOOT_BAR_FLOAT.equals(formDTO.getPattern())) {
CheckFloatFootBarFormDTO checkFloatFootBarFormDTO = new CheckFloatFootBarFormDTO();
checkFloatFootBarFormDTO.setCustomerId(formDTO.getCustomerId());
checkFloatFootBarFormDTO.setAppType(formDTO.getAppType());
Result<CheckFloatFootBarResultDTO> customizeResult = operCustomizeOpenFeignClient.checkFloatFootBar(checkFloatFootBarFormDTO);
if (!customizeResult.success() && null == customizeResult.getData()) {
throw new RenException("查询客户footbar信息异常");
}
if(!customizeResult.getData().getIsOddNum()){
//运营端错误信息是怎么显示的?
throw new RenException("只有footbar个数为奇数时,才可以选择此模式");
}
if(!customizeResult.getData().getBothUploaded()){
throw new RenException("请先上传footbar图标,全部上传后才可以选择此模式");
}
}
//3、符合条件,更新或者插入
String parameterKey = formDTO.getAppType().concat(Constant.FOOTBAR_PATTERN_KEY_SUFFIX);
CustomerParameterEntity original = parameterDao.selectAppFootBarPattern(parameterKey, formDTO.getCustomerId());
if (null != original) {
original.setParameterValue(formDTO.getPattern());
parameterDao.updateById(original);
} else {
CustomerParameterEntity defaultCustomer = parameterDao.selectAppFootBarPattern(parameterKey, Constant.DEFAULT_CUSTOMER);
if(null==defaultCustomer){
throw new RenException(String.format("系统异常,%产品没有配置默认值",parameterKey));
}
CustomerParameterEntity insertEntity = new CustomerParameterEntity();
insertEntity.setCustomerId(formDTO.getCustomerId());
insertEntity.setParameterKey(parameterKey);
insertEntity.setParameterName(defaultCustomer.getParameterName());
insertEntity.setParameterSwitch(defaultCustomer.getParameterSwitch());
insertEntity.setParameterValue(formDTO.getPattern());
insertEntity.setDescription(defaultCustomer.getDescription());
parameterDao.insert(insertEntity);
}
}
}

4
epmet-module/oper-crm/oper-crm-server/src/main/resources/db/migration/V0.0.8__insert_footbar_parameter.sql

@ -0,0 +1,4 @@
INSERT INTO `epmet_oper_crm`.`customer_parameter`(`ID`, `CUSTOMER_ID`, `PARAMETER_KEY`, `PARAMETER_NAME`, `PARAMETER_SWITCH`, `PARAMETER_VALUE`, `DESCRIPTION`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('cf4ea9c6eeb011eb89b70050568f8cf7', 'default', 'gov_footbar_pattern', '工作端footbar显示样式', 'on', 'flat', '参数值含义:flat:水平模式;float:浮起某个菜单', 0, 0, 'yinzuomei', '2021-07-27 16:04:53', 'yinzuomei', '2021-07-27 16:04:56');
INSERT INTO `epmet_oper_crm`.`customer_parameter`(`ID`, `CUSTOMER_ID`, `PARAMETER_KEY`, `PARAMETER_NAME`, `PARAMETER_SWITCH`, `PARAMETER_VALUE`, `DESCRIPTION`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1e398325eeb111eb89b70050568f8cf7', 'default', 'resi_footbar_pattern', '居民端footbar显示样式', 'on', 'flat', '参数值含义: flat:水平模式;float:浮起某个菜单。', 0, 0, 'yinzuomei', '2021-07-27 16:05:46', 'yinzuomei', '2021-07-27 16:05:51');
INSERT INTO `epmet_oper_crm`.`customer_parameter`(`ID`, `CUSTOMER_ID`, `PARAMETER_KEY`, `PARAMETER_NAME`, `PARAMETER_SWITCH`, `PARAMETER_VALUE`, `DESCRIPTION`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('c7baa378eeb111eb89b70050568f8cf7', 'default', 'gov_footbar_highlight_num', '工作端footbar为水平模式时,第几个凸起?现在默认是0', 'on', '0', '工作端footbar为水平模式时,第几个凸起?现在默认是0', 0, 0, 'yinzuomei', '2021-07-27 16:12:46', 'yinzuomei', '2021-07-27 16:12:51');
INSERT INTO `epmet_oper_crm`.`customer_parameter`(`ID`, `CUSTOMER_ID`, `PARAMETER_KEY`, `PARAMETER_NAME`, `PARAMETER_SWITCH`, `PARAMETER_VALUE`, `DESCRIPTION`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('35d14ac1eeb211eb89b70050568f8cf7', 'default', 'resi_footbar_highlight_num', '居民端footbar为水平模式时,第几个凸起?现在默认是0', 'on', '0', '居民端footbar为水平模式时,第几个凸起?现在默认是0', 0, 0, 'yinzuomei', '2021-07-27 16:14:43', 'yinzuomei', '2021-07-27 16:14:49');

10
epmet-module/oper-crm/oper-crm-server/src/main/resources/mapper/CustomerParameterDao.xml

@ -30,4 +30,14 @@
AND PARAMETER_KEY = #{formDTO.parameterKey}
</foreach>
</select>
<!-- 查询FootBar显示模式(产品配置+客户定制化通用) -->
<select id="selectAppFootBarPattern" parameterType="map" resultType="com.epmet.entity.CustomerParameterEntity">
select
cp.*
from customer_parameter cp
where cp.DEL_FLAG='0'
and cp.CUSTOMER_ID=#{customerId}
and cp.PARAMETER_KEY=#{parameterKey}
</select>
</mapper>

9
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/CustomerFootBarDTO.java

@ -17,9 +17,10 @@
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
@ -100,4 +101,10 @@ public class CustomerFootBarDTO implements Serializable {
private Boolean display;
/**
* 浮起时图标
*/
private String floatIconPath;
private String customerId;
}

28
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/CheckFloatFootBarFormDTO.java

@ -0,0 +1,28 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 校验当前客户是否可以选择浮起footbar模式
* 只有奇数并且3个图标都上传的才可以
*
* @author yinzuomei@elink-cn.com
* @date 2021/7/27 17:56
*/
@Data
public class CheckFloatFootBarFormDTO implements Serializable {
private static final long serialVersionUID = 3202974977135976455L;
/**
* 传客户id
*/
@NotBlank(message = "customerId不能为空")
private String customerId;
/**
* 工作端gov居民端resi
*/
@NotBlank(message = "appType不能为空")
private String appType;
}

15
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/CustomerFootBarFormDTO.java

@ -14,6 +14,9 @@ public class CustomerFootBarFormDTO {
// 创建footbar的分组
public interface CreateFootBarGroup extends CustomerClientShowGroup {}
//产品配置-添加footbar时,3个icon必填
public interface DefaultCustomerCreateFootBarGroup extends CustomerClientShowGroup {}
// 查询footbar列表分组
public interface ListFootBarGroup extends CustomerClientShowGroup {}
@ -41,7 +44,7 @@ public class CustomerFootBarFormDTO {
@NotBlank(message = "FootBar的ID不能为空", groups = { UpdateFootBarGroup.class, FootBarDetailGroup.class, UpdateDisplayStatusGroup.class, DeleteFootbarsGroup.class })
private String id;
@NotBlank(message = "客户ID不能为空", groups = { CreateFootBarGroup.class, AddDefaultFootbars4Customer.class, ListFootBarGroup4Oper.class })
@NotBlank(message = "客户ID不能为空", groups = { CreateFootBarGroup.class, AddDefaultFootbars4Customer.class, ListFootBarGroup4Oper.class , DeleteFootbarsGroup.class})
private String customerId;
// 哪一个端:gov,resi
@ -51,17 +54,19 @@ public class CustomerFootBarFormDTO {
@NotBlank(message = "名称不能为空", groups = { CreateFootBarGroup.class, UpdateFootBarGroup.class })
private String barName;
@NotBlank(message = "key不能为空", groups = { CreateFootBarGroup.class })
@NotBlank(message = "key不能为空", groups = { CreateFootBarGroup.class , DeleteFootbarsGroup.class})
private String barKey;
@NotBlank(message = "页面标题不能为空", groups = { CreateFootBarGroup.class, UpdateFootBarGroup.class })
private String pageTitle;
//@NotBlank(message = "图标路径不能为空", groups = { UpdateFootBarGroup.class })
@NotBlank(message = "图标路径不能为空", groups = {DefaultCustomerCreateFootBarGroup.class})
private String iconPath;
//@NotBlank(message = "选中的图标路径不能为空", groups = { UpdateFootBarGroup.class })
@NotBlank(message = "选中的图标路径不能为空", groups = {DefaultCustomerCreateFootBarGroup.class})
private String selectedIconPath;
@NotBlank(message = "浮起时图标不能为空", groups = {DefaultCustomerCreateFootBarGroup.class})
private String floatIconPath;
@NotEmpty(message = "顺序不能为空", groups = { SaveOrderGroup.class })
private List<OrderIndexDTO> orderList;
@ -69,6 +74,8 @@ public class CustomerFootBarFormDTO {
@NotNull(message = "显示状态不能为空", groups = { UpdateDisplayStatusGroup.class })
private Boolean display;
@NotBlank(message = "操作人id不能为空", groups = {DeleteFootbarsGroup.class, SaveOrderGroup.class, UpdateDisplayStatusGroup.class})
private String userId;
/**
* 排序索引号dto
*/

21
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/NotOnlineFootBarFormDTO.java

@ -0,0 +1,21 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 客户定制化-FootBar配置获取当前客户未上线的
*
* @author yinzuomei@elink-cn.com
* @date 2021/7/28 9:39
*/
@Data
public class NotOnlineFootBarFormDTO implements Serializable {
private static final long serialVersionUID = -4103181048360051521L;
@NotBlank(message = "客户id不能为空")
private String customerId;
@NotBlank(message = "appType不能为空")
private String appType;
}

27
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/SyncFootBar4CustomerFormDTO.java

@ -0,0 +1,27 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* 客户定制化-同步footbar
*
* @author yinzuomei@elink-cn.com
* @date 2021/7/28 15:21
*/
@Data
public class SyncFootBar4CustomerFormDTO implements Serializable {
private static final long serialVersionUID = 8879950597580438204L;
@NotBlank(message = "customerId不能为空")
private String customerId;
@NotBlank(message = "appType不能为空")
private String appType;
private List<String> syncBarKeyList;
private List<String> addBarKeyList;
@NotBlank(message = "操作用户不能为空")
private String userId;
}

27
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CheckFloatFootBarResultDTO.java

@ -0,0 +1,27 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* 校验当前客户是否可以选择浮起footbar模式
* 只有奇数并且3个图标都上传的才可以
*
* @author yinzuomei@elink-cn.com
* @date 2021/7/27 17:56
*/
@Data
public class CheckFloatFootBarResultDTO implements Serializable {
private static final long serialVersionUID = 8205326079938200511L;
/**
* 是否是奇数true:是奇数
*/
private Boolean isOddNum;
/**
* 是否都上传了图标true:都上传了
*/
private Boolean bothUploaded;
}

9
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerFootBarResultDTO.java

@ -68,6 +68,11 @@ public class CustomerFootBarResultDTO implements Serializable {
*/
private String selectedIconPath;
/**
* 浮起时图标
*/
private String floatIconPath;
/**
* 删除标识0.未删除 1.已删除
*/
@ -105,6 +110,10 @@ public class CustomerFootBarResultDTO implements Serializable {
private String defaultIconPath;
private String defaultSelectedIconPath;
/**
* 浮起时图标-产品默认
*/
private String defaultFloatIconPath;
private String defaultPageTitle;

20
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/OperCustomizeOpenFeignClient.java

@ -1,7 +1,9 @@
package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerFootBarDTO;
import com.epmet.dto.form.CheckFloatFootBarFormDTO;
import com.epmet.dto.form.CustomerFootBarFormDTO;
import com.epmet.feign.fallback.OperCustomizeOpenFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
@ -9,13 +11,9 @@ import org.springframework.cloud.openfeign.FeignClient;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.CustomerFunctionListFormDTO;
import com.epmet.dto.result.CheckFloatFootBarResultDTO;
import com.epmet.dto.result.DefaultFunctionListResultDTO;
import com.epmet.feign.fallback.OperCustomizeOpenFeignClientFallback;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
@ -37,4 +35,16 @@ public interface OperCustomizeOpenFeignClient {
@PostMapping(value = "/oper/customize/customerfunction/getOpenedFunctionList", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
Result<List<DefaultFunctionListResultDTO>> getOpenedFunctionList(@RequestBody CustomerFunctionListFormDTO formDTO);
/**
* 校验当前客户是否可以选择浮起footbar模式
* 只有奇数并且3个图标都上传的才可以
*
* @param checkFloatFootBarFormDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.CheckFloatFootBarResultDTO>
* @author yinzuomei
* @date 2021/7/27 18:06
*/
@PostMapping(value = "/oper/customize/customerfootbar/checkfloatfootbar", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
Result<CheckFloatFootBarResultDTO> checkFloatFootBar(@RequestBody CheckFloatFootBarFormDTO checkFloatFootBarFormDTO);
}

19
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/fallback/OperCustomizeOpenFeignClientFallback.java

@ -4,11 +4,10 @@ import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerFootBarDTO;
import com.epmet.dto.form.CheckFloatFootBarFormDTO;
import com.epmet.dto.form.CustomerFootBarFormDTO;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.CustomerFunctionListFormDTO;
import com.epmet.dto.result.CheckFloatFootBarResultDTO;
import com.epmet.dto.result.DefaultFunctionListResultDTO;
import com.epmet.feign.OperCustomizeOpenFeignClient;
import org.springframework.stereotype.Component;
@ -36,4 +35,18 @@ public class OperCustomizeOpenFeignClientFallback implements OperCustomizeOpenFe
public Result<List<DefaultFunctionListResultDTO>> getOpenedFunctionList(CustomerFunctionListFormDTO formDTO){
return ModuleUtils.feignConError(ServiceConstant.OPER_CUSTOMIZE_SERVER, "getOpenedFunctionList", formDTO);
}
/**
* 校验当前客户是否可以选择浮起footbar模式
* 只有奇数并且3个图标都上传的才可以
*
* @param checkFloatFootBarFormDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.CheckFloatFootBarResultDTO>
* @author yinzuomei
* @date 2021/7/27 18:06
*/
@Override
public Result<CheckFloatFootBarResultDTO> checkFloatFootBar(CheckFloatFootBarFormDTO checkFloatFootBarFormDTO) {
return ModuleUtils.feignConError(ServiceConstant.OPER_CUSTOMIZE_SERVER, "checkFloatFootBar", checkFloatFootBarFormDTO);
}
}

76
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFootBarController.java

@ -17,10 +17,12 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.RedisKeys;
import com.epmet.commons.tools.redis.RedisUtils;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
@ -30,7 +32,11 @@ 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.CustomerFootBarDTO;
import com.epmet.dto.form.CheckFloatFootBarFormDTO;
import com.epmet.dto.form.CustomerFootBarFormDTO;
import com.epmet.dto.form.NotOnlineFootBarFormDTO;
import com.epmet.dto.form.SyncFootBar4CustomerFormDTO;
import com.epmet.dto.result.CheckFloatFootBarResultDTO;
import com.epmet.dto.result.CustomerFootBarResultDTO;
import com.epmet.entity.CustomerFootBarEntity;
import com.epmet.excel.CustomerFootBarExcel;
@ -160,11 +166,12 @@ public class CustomerFootBarController {
List<CustomerFootBarEntity> footbars = customerFootBarService.listAllCustomerFootBars(customerId, appType);
List<CustomerFootBarDTO> barDTOS = new LinkedList<>();
footbars.forEach(barEntity -> {
CustomerFootBarEntity defaultFootBarEntity = customerFootBarService.getByAppTypeAndBarKeyOfCustomer("default", barEntity.getAppType(), barEntity.getBarKey());
CustomerFootBarDTO barDTO = new CustomerFootBarDTO();
BeanUtils.copyProperties(barEntity, barDTO);
barDTO.setDefaultBarName(defaultFootBarEntity.getBarName());
CustomerFootBarEntity defaultFootBarEntity = customerFootBarService.getByAppTypeAndBarKeyOfCustomer("default", barEntity.getAppType(), barEntity.getBarKey());
if(null!=defaultFootBarEntity){
barDTO.setDefaultBarName(defaultFootBarEntity.getBarName());
}
barDTOS.add(barDTO);
});
return new Result<List<CustomerFootBarDTO>>().ok(barDTOS);
@ -178,7 +185,7 @@ public class CustomerFootBarController {
*/
@PostMapping("createfootbar")
public Result createFootBar(@RequestBody CustomerFootBarFormDTO form) {
ValidatorUtils.validateEntity(form, CustomerFootBarFormDTO.CreateFootBarGroup.class);
ValidatorUtils.validateEntity(form, CustomerFootBarFormDTO.CreateFootBarGroup.class, CustomerFootBarFormDTO.DefaultCustomerCreateFootBarGroup.class);
customerFootBarService.createFootBar(form);
return new Result();
}
@ -213,9 +220,10 @@ public class CustomerFootBarController {
* @return
*/
@PostMapping("saveorder")
public Result saveOrder(@RequestBody CustomerFootBarFormDTO form) {
public Result saveOrder(@LoginUser TokenDto tokenDto, @RequestBody CustomerFootBarFormDTO form) {
form.setUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(form, CustomerFootBarFormDTO.SaveOrderGroup.class);
customerFootBarService.saveOrder(form.getOrderList());
customerFootBarService.saveOrder(form.getUserId(),form.getOrderList());
return new Result();
}
@ -225,9 +233,10 @@ public class CustomerFootBarController {
* @return
*/
@PostMapping("updatedisplaystatus")
public Result updateDisplayStatus(@RequestBody CustomerFootBarFormDTO form) {
public Result updateDisplayStatus(@LoginUser TokenDto tokenDto,@RequestBody CustomerFootBarFormDTO form) {
form.setUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(form, CustomerFootBarFormDTO.UpdateDisplayStatusGroup.class);
customerFootBarService.updateDisplayStatus(form.getId(), form.getDisplay());
customerFootBarService.updateDisplayStatus(form.getId(), form.getDisplay(),form.getUserId());
return new Result();
}
@ -249,10 +258,57 @@ public class CustomerFootBarController {
* @return
*/
@PostMapping("deletefootbar")
public Result deleteFootBar(@RequestBody CustomerFootBarFormDTO form) {
public Result deleteFootBar(@LoginUser TokenDto tokenDto, @RequestBody CustomerFootBarFormDTO form) {
form.setUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(form, CustomerFootBarFormDTO.DeleteFootbarsGroup.class);
customerFootBarService.deleteFootBar(form.getId());
customerFootBarService.deleteFootBar(form.getId(),form.getUserId());
return new Result();
}
/**
* 校验当前客户是否可以选择浮起footbar模式
* 只有奇数并且3个图标都上传的才可以
*
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.CheckFloatFootBarResultDTO>
* @author yinzuomei
* @date 2021/7/27 18:06
*/
@PostMapping("checkfloatfootbar")
public Result<CheckFloatFootBarResultDTO> checkFloatFootBar(@RequestBody CheckFloatFootBarFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return new Result<CheckFloatFootBarResultDTO>().ok(customerFootBarService.checkFloatFootBar(formDTO));
}
/**
* 客户定制化-采集产品配置中我没有的添加到当前客户
*
* @param form
* @return com.epmet.commons.tools.utils.Result
* @author yinzuomei
* @date 2021/7/28 10:01
*/
@PostMapping("syncfootbar4customer")
public Result createFootBarCustomer(@LoginUser TokenDto tokenDto, @RequestBody SyncFootBar4CustomerFormDTO form) {
form.setUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(form);
customerFootBarService.createFootBarCustomer(form);
return new Result();
}
/**
* 客户定制化-FootBar配置获取当前客户未上线的
*
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.CustomerFootBarDTO>>
* @author yinzuomei
* @date 2021/7/28 9:47
*/
@PostMapping("getNotOnlineFootBars")
public Result<List<CustomerFootBarResultDTO>> getNotOnlineFootBars(@RequestBody NotOnlineFootBarFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return customerFootBarService.getNotOnlineFootBars(formDTO);
}
}

43
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFootBarDao.java

@ -64,7 +64,7 @@ public interface CustomerFootBarDao extends BaseDao<CustomerFootBarEntity> {
* @param orderIndex
* @return
*/
Integer updateOrder(@Param("id") String id, @Param("orderIndex") Integer orderIndex);
Integer updateOrder(@Param("id") String id, @Param("orderIndex") Integer orderIndex,@Param("userId") String userId);
CustomerFootBarEntity getByAppTypeAndBarKeyOfCustomer(@Param("customerId") String customerId,
@Param("appType") String appType,
@ -77,11 +77,48 @@ public interface CustomerFootBarDao extends BaseDao<CustomerFootBarEntity> {
List<CustomerFootBarEntity> listByAppTypeAndCustomerId(@Param("customerId") String customerId,
@Param("appType") String appType);
void updateDisplayStatus(@Param("id") String id, @Param("display") Boolean display);
void updateDisplayStatus(@Param("id") String id, @Param("display") Boolean display,@Param("userId")String userId);
List<String> listFootBarOwnerCustomerIds();
void physicsDeleteById(@Param("id") String id);
void physicsDeleteByAppTypeAndBarKey(@Param("appType") String appType, @Param("barKey") String barKey);
void physicsDeleteByAppTypeAndBarKey(@Param("appType") String appType, @Param("barKey") String barKey,@Param("id")String id);
/**
* 客户定制化-FootBar配置获取当前客户未上线的
*
* @param customerId
* @param appType
* @return java.util.List<com.epmet.entity.CustomerFootBarEntity>
* @author yinzuomei
* @date 2021/7/28 9:49
*/
List<CustomerFootBarEntity> selectNotOnlineFootBars(@Param("customerId") String customerId, @Param("appType")String appType);
/**
* 根据key查询
*
* @param customerId
* @param appType
* @param barKeyList
* @return com.epmet.entity.CustomerFootBarEntity
* @author yinzuomei
* @date 2021/7/28 15:27
*/
List<CustomerFootBarEntity> selectListByKey(@Param("customerId")String customerId,
@Param("appType")String appType,
@Param("barKeyList")List<String> barKeyList);
int updateCustomerFootBarByKey(@Param("customerId")String customerId,
@Param("appType")String appType,
@Param("barKey")String barKey,
@Param("userId")String userId,
@Param("pageTitle")String pageTitle,
@Param("barName")String barName,
@Param("iconPath")String iconPath,
@Param("selectedIconPath")String selectedIconPath,
@Param("floatIconPath")String floatIconPath);
int updateFootBarDel(@Param("id") String id, @Param("userId")String userId);
}

8
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/CustomerFootBarEntity.java

@ -18,13 +18,10 @@
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;
/**
* APP底部菜单栏信息
*
@ -80,4 +77,9 @@ public class CustomerFootBarEntity extends BaseEpmetEntity {
*/
private Boolean display;
/**
* 浮起时图标
*/
private String floatIconPath;
}

42
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerFootBarService.java

@ -19,8 +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.utils.Result;
import com.epmet.dto.CustomerFootBarDTO;
import com.epmet.dto.form.CheckFloatFootBarFormDTO;
import com.epmet.dto.form.CustomerFootBarFormDTO;
import com.epmet.dto.form.NotOnlineFootBarFormDTO;
import com.epmet.dto.form.SyncFootBar4CustomerFormDTO;
import com.epmet.dto.result.CheckFloatFootBarResultDTO;
import com.epmet.dto.result.CustomerFootBarResultDTO;
import com.epmet.entity.CustomerFootBarEntity;
@ -105,13 +110,44 @@ public interface CustomerFootBarService extends BaseService<CustomerFootBarEntit
CustomerFootBarResultDTO getFootBarDetail(String id);
void saveOrder(List<CustomerFootBarFormDTO.OrderIndexDTO> orderList);
void saveOrder(String userId,List<CustomerFootBarFormDTO.OrderIndexDTO> orderList);
CustomerFootBarEntity getByAppTypeAndBarKeyOfCustomer(String customerId, String appType, String barKey);
void updateDisplayStatus(String id, Boolean display);
void updateDisplayStatus(String id, Boolean display,String userId);
void addDefault4Customer(String customerId, String appType);
void deleteFootBar(String id);
void deleteFootBar(String id,String userId);
/**
* 校验当前客户是否可以选择浮起footbar模式
* 只有奇数并且3个图标都上传的才可以
*
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.CheckFloatFootBarResultDTO>
* @author yinzuomei
* @date 2021/7/27 18:06
*/
CheckFloatFootBarResultDTO checkFloatFootBar(CheckFloatFootBarFormDTO formDTO);
/**
* 客户定制化-采集产品配置中我没有的添加到当前客户
*
* @param form
* @return void
* @author yinzuomei
* @date 2021/7/28 10:01
*/
void createFootBarCustomer(SyncFootBar4CustomerFormDTO form);
/**
* 客户定制化-FootBar配置获取当前客户未上线的
*
* @param formDTO
* @return com.epmet.dto.result.CustomerFootBarResultDTO
* @author yinzuomei
* @date 2021/7/28 9:47
*/
Result<List<CustomerFootBarResultDTO>> getNotOnlineFootBars(NotOnlineFootBarFormDTO formDTO);
}

162
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFootBarServiceImpl.java

@ -20,30 +20,34 @@ package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.Constant;
import com.epmet.commons.tools.constant.FieldConstant;
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.redis.RedisKeys;
import com.epmet.commons.tools.redis.RedisUtils;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.CustomerFootBarDao;
import com.epmet.dto.CustomerFootBarDTO;
import com.epmet.dto.form.CheckFloatFootBarFormDTO;
import com.epmet.dto.form.CustomerFootBarFormDTO;
import com.epmet.dto.form.NotOnlineFootBarFormDTO;
import com.epmet.dto.form.SyncFootBar4CustomerFormDTO;
import com.epmet.dto.result.CheckFloatFootBarResultDTO;
import com.epmet.dto.result.CustomerFootBarResultDTO;
import com.epmet.entity.CustomerFootBarEntity;
import com.epmet.redis.CustomerFootBarRedis;
import com.epmet.service.CustomerFootBarService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.*;
/**
* APP底部菜单栏信息
@ -130,16 +134,17 @@ public class CustomerFootBarServiceImpl extends BaseServiceImpl<CustomerFootBarD
CustomerFootBarEntity entity = new CustomerFootBarEntity();
entity.setAppType(form.getAppType());
entity.setCustomerId("default"); // 只能为默认客户创建
entity.setBarKey(form.getBarKey());
entity.setBarKey(form.getBarKey().trim());
entity.setBarName(form.getBarName());
entity.setIconPath(form.getIconPath());
entity.setPageTitle(form.getPageTitle());
entity.setSelectedIconPath(form.getSelectedIconPath());
entity.setOrderIndex(baseDao.fetchNextOrder(form.getCustomerId(), form.getAppType()));
entity.setDisplay(true);
entity.setFloatIconPath(form.getFloatIconPath());
baseDao.insert(entity);
sync2Customers(entity);
// 07.28注释
// sync2Customers(entity);
}
/**
@ -180,7 +185,7 @@ public class CustomerFootBarServiceImpl extends BaseServiceImpl<CustomerFootBarD
entity.setBarName(form.getBarName());
entity.setPageTitle(form.getPageTitle());
entity.setIconPath(form.getIconPath());
entity.setFloatIconPath(form.getFloatIconPath());
baseDao.updateById(entity);
// 删除缓存中的footbar。若缓存删除失败,则事务回滚,db中的不应该成功
@ -195,18 +200,21 @@ public class CustomerFootBarServiceImpl extends BaseServiceImpl<CustomerFootBarD
}
CustomerFootBarResultDTO dto = ConvertUtils.sourceToTarget(entity, CustomerFootBarResultDTO.class);
CustomerFootBarEntity defaultBar = baseDao.getByAppTypeAndBarKeyOfCustomer("default", entity.getAppType(), entity.getBarKey());
dto.setDefaultBarName(defaultBar.getBarName());
dto.setDefaultIconPath(defaultBar.getIconPath());
dto.setDefaultSelectedIconPath(defaultBar.getSelectedIconPath());
dto.setDefaultPageTitle(defaultBar.getPageTitle());
if (null != defaultBar) {
dto.setDefaultBarName(defaultBar.getBarName());
dto.setDefaultIconPath(defaultBar.getIconPath());
dto.setDefaultSelectedIconPath(defaultBar.getSelectedIconPath());
dto.setDefaultPageTitle(defaultBar.getPageTitle());
dto.setDefaultFloatIconPath(defaultBar.getFloatIconPath());
}
return dto;
}
@Transactional
@Override
public void saveOrder(List<CustomerFootBarFormDTO.OrderIndexDTO> orderList) {
public void saveOrder(String userId,List<CustomerFootBarFormDTO.OrderIndexDTO> orderList) {
for (CustomerFootBarFormDTO.OrderIndexDTO idx : orderList) {
baseDao.updateOrder(idx.getId(), idx.getOrderIndex());
baseDao.updateOrder(idx.getId(), idx.getOrderIndex(),userId);
}
if (!CollectionUtils.isEmpty(orderList)) {
@ -229,8 +237,8 @@ public class CustomerFootBarServiceImpl extends BaseServiceImpl<CustomerFootBarD
@Transactional
@Override
public void updateDisplayStatus(String id, Boolean display) {
baseDao.updateDisplayStatus(id, display);
public void updateDisplayStatus(String id, Boolean display,String userId) {
baseDao.updateDisplayStatus(id, display,userId);
CustomerFootBarEntity footBarEntity = baseDao.selectById(id);
@ -263,10 +271,12 @@ public class CustomerFootBarServiceImpl extends BaseServiceImpl<CustomerFootBarD
@Transactional
@Override
public void deleteFootBar(String id) {
public void deleteFootBar(String id,String userId) {
CustomerFootBarEntity defaultFootbar = baseDao.selectById(id);
baseDao.physicsDeleteByAppTypeAndBarKey(defaultFootbar.getAppType(), defaultFootbar.getBarKey());
// 注释07.28,暂时不要物理删除
// baseDao.physicsDeleteByAppTypeAndBarKey(defaultFootbar.getAppType(), defaultFootbar.getBarKey(),id);
defaultFootbar.setDelFlag("1");
baseDao.updateFootBarDel(id,userId);
// 删除缓存中的footbar。若缓存删除失败,则事务回滚,db中的不应该成功
redisUtils.delete(RedisKeys.getCustomerFootbarKey(defaultFootbar.getCustomerId(), defaultFootbar.getAppType()));
}
@ -277,7 +287,7 @@ public class CustomerFootBarServiceImpl extends BaseServiceImpl<CustomerFootBarD
*/
private void validateBeforeCreate(CustomerFootBarFormDTO form) {
synchronized (this) {
int uniqueCount1 = baseDao.count4Unique(form.getCustomerId(), form.getAppType(), form.getBarKey(), null);
int uniqueCount1 = baseDao.count4Unique(form.getCustomerId(), form.getAppType(), form.getBarKey().trim(), null);
int uniqueCount2 = baseDao.count4Unique(form.getCustomerId(), form.getAppType(), null, form.getBarName());
if (uniqueCount1 > 0 || uniqueCount2 > 0) {
throw new RenException(EpmetErrorCode.OPER_CUSTOMER_FOOTBAR_EXISTS.getCode(),
@ -295,4 +305,114 @@ public class CustomerFootBarServiceImpl extends BaseServiceImpl<CustomerFootBarD
}
}
}
/**
* 校验当前客户是否可以选择浮起footbar模式
* 只有奇数并且3个图标都上传的才可以
*
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.CheckFloatFootBarResultDTO>
* @author yinzuomei
* @date 2021/7/27 18:06
*/
@Override
public CheckFloatFootBarResultDTO checkFloatFootBar(CheckFloatFootBarFormDTO formDTO) {
CheckFloatFootBarResultDTO resultDTO = new CheckFloatFootBarResultDTO();
resultDTO.setIsOddNum(false);
resultDTO.setBothUploaded(true);
List<CustomerFootBarEntity> footbars = this.listCustomerFootBars(formDTO.getCustomerId(), formDTO.getAppType());
if (!CollectionUtils.isEmpty(footbars)) {
if (footbars.size() % 2 == 0) {
resultDTO.setIsOddNum(false);
} else {
resultDTO.setIsOddNum(true);
}
// TODO 是否需要3个图标都上传?? 如果不限制3个必传,让前端判断,取默认
for (CustomerFootBarEntity entity : footbars) {
if (StringUtils.isBlank(entity.getIconPath())
|| StringUtils.isBlank(entity.getSelectedIconPath())
|| StringUtils.isBlank(entity.getFloatIconPath())) {
resultDTO.setBothUploaded(false);
break;
}
}
}
return resultDTO;
}
/**
* 客户定制化-采集产品配置中我没有的添加到当前客户
*
* @param form
* @return void
* @author yinzuomei
* @date 2021/7/28 10:01
*/
@Transactional(rollbackFor = Exception.class)
@Override
public void createFootBarCustomer(SyncFootBar4CustomerFormDTO form) {
if (!CollectionUtils.isEmpty(form.getSyncBarKeyList())) {
// 根据key, 查找产品配置中该footbar信息
List<CustomerFootBarEntity> syncList = baseDao.selectListByKey(Constant.DEFAULT_CUSTOMER, form.getAppType(), form.getSyncBarKeyList());
syncList.forEach(syncEntity -> {
baseDao.updateCustomerFootBarByKey(form.getCustomerId(),
form.getAppType(),
syncEntity.getBarKey(),
form.getUserId(),
syncEntity.getPageTitle(),
syncEntity.getBarName(),
syncEntity.getIconPath(),
syncEntity.getSelectedIconPath(),
syncEntity.getFloatIconPath()
);
});
}
// 产品配置有,当前客户未上线的,直接增加
if (!CollectionUtils.isEmpty(form.getAddBarKeyList())) {
List<CustomerFootBarEntity> addList = baseDao.selectListByKey(Constant.DEFAULT_CUSTOMER, form.getAppType(), form.getAddBarKeyList());
addList.forEach(addEntity -> {
CustomerFootBarFormDTO footBarFormDTO = new CustomerFootBarFormDTO();
footBarFormDTO.setCustomerId(form.getCustomerId());
footBarFormDTO.setAppType(form.getAppType());
footBarFormDTO.setBarKey(addEntity.getBarKey());
footBarFormDTO.setBarName(addEntity.getBarName());
// 校验一下是否存在
validateBeforeCreate(footBarFormDTO);
CustomerFootBarEntity entity = ConvertUtils.sourceToTarget(addEntity, CustomerFootBarEntity.class);
entity.setCustomerId(form.getCustomerId());
entity.setOrderIndex(baseDao.fetchNextOrder(form.getCustomerId(), form.getAppType()));
entity.setDisplay(true);
baseDao.insert(entity);
});
}
}
/**
* 客户定制化-FootBar配置获取当前客户未上线的
*
* @param formDTO
* @return com.epmet.dto.result.CustomerFootBarResultDTO
* @author yinzuomei
* @date 2021/7/28 9:49
*/
@Override
public Result<List<CustomerFootBarResultDTO>> getNotOnlineFootBars(NotOnlineFootBarFormDTO formDTO) {
String customerId = formDTO.getCustomerId();
String appType = formDTO.getAppType();
List<CustomerFootBarEntity> footbars = baseDao.selectNotOnlineFootBars(customerId, appType);
List<CustomerFootBarResultDTO> barDTOS=new ArrayList<>();
footbars.forEach(defaultBar -> {
CustomerFootBarResultDTO barDTO = new CustomerFootBarResultDTO();
BeanUtils.copyProperties(defaultBar, barDTO);
barDTO.setDefaultBarName(defaultBar.getBarName());
barDTO.setDefaultIconPath(defaultBar.getIconPath());
barDTO.setDefaultSelectedIconPath(defaultBar.getSelectedIconPath());
barDTO.setDefaultFloatIconPath(defaultBar.getFloatIconPath());
barDTO.setDefaultPageTitle(defaultBar.getPageTitle());
barDTOS.add(barDTO);
});
return new Result<List<CustomerFootBarResultDTO>>().ok(barDTOS);
}
}

1
epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.12__add_float_icon_path.sql

@ -0,0 +1 @@
alter table customer_foot_bar add COLUMN FLOAT_ICON_PATH VARCHAR(255) COMMENT '凸起时图标路径' AFTER SELECTED_ICON_PATH;

84
epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFootBarDao.xml

@ -24,14 +24,16 @@
<!--更新顺序号-->
<update id="updateOrder">
update customer_foot_bar
set ORDER_INDEX = #{orderIndex}
set ORDER_INDEX = #{orderIndex},UPDATED_BY=#{userId},UPDATED_TIME=NOW()
where ID = #{id}
and DEL_FLAG='0'
</update>
<update id="updateDisplayStatus">
update customer_foot_bar
set DISPLAY=#{display}
set DISPLAY=#{display},UPDATED_BY=#{userId},UPDATED_TIME=NOW()
where ID = #{id}
and DEL_FLAG='0'
</update>
<!--物理删除-->
@ -46,6 +48,7 @@
from customer_foot_bar
where app_type = #{appType}
and BAR_KEY = #{barKey}
and id=#{id}
</delete>
<!--查询客户的footbar列表-->
@ -66,7 +69,8 @@
created_by,
created_time,
updated_by,
updated_time
updated_time,
FLOAT_ICON_PATH
FROM
customer_foot_bar
<where>
@ -95,7 +99,8 @@
created_by,
created_time,
updated_by,
updated_time
updated_time,
FLOAT_ICON_PATH as floatIconPath
FROM
customer_foot_bar
<where>
@ -152,11 +157,13 @@
created_by,
created_time,
updated_by,
updated_time
updated_time,
FLOAT_ICON_PATH as floatIconPath
from customer_foot_bar
where CUSTOMER_ID = #{customerId}
and APP_TYPE = #{appType}
and BAR_KEY = #{barKey}
and DEL_FLAG='0'
</select>
<select id="listByAppTypeAndCustomerId" resultType="com.epmet.entity.CustomerFootBarEntity">
@ -168,6 +175,7 @@
page_title,
icon_path,
selected_icon_path,
FLOAT_ICON_PATH as floatIconPath,
display,
order_index,
del_flag,
@ -186,6 +194,7 @@
select distinct CUSTOMER_ID
from customer_foot_bar fb
where CUSTOMER_ID != 'default'
and DEL_FLAG='0'
</select>
<select id="getByAppTypeAndBarNameOfCustomer" resultType="com.epmet.entity.CustomerFootBarEntity">
@ -197,6 +206,7 @@
page_title,
icon_path,
selected_icon_path,
FLOAT_ICON_PATH as floatIconPath,
display,
order_index,
del_flag,
@ -209,7 +219,71 @@
where CUSTOMER_ID = #{customerId}
and APP_TYPE = #{appType}
and BAR_NAME = #{barName}
and DEL_FLAG='0'
</select>
<select id="selectNotOnlineFootBars" parameterType="map" resultType="com.epmet.entity.CustomerFootBarEntity">
select
m.BAR_NAME as barName,
m.BAR_KEY as barKey,
m.app_type as appType,
m.PAGE_TITLE as pageTitle,
m.ICON_PATH as iconPath,
m.SELECTED_ICON_PATH as selectedIconPath,
m.FLOAT_ICON_PATH as floatIconPath
from customer_foot_bar m
where m.DEL_FLAG='0'
and m.CUSTOMER_ID='default'
and m.app_type=#{appType}
and m.DISPLAY='1'
and m.BAR_KEY not in(
select cfb.BAR_KEY
from customer_foot_bar cfb
where cfb.DEL_FLAG='0'
and cfb.CUSTOMER_ID=#{customerId}
and cfb.app_type=#{appType}
)order by m.ORDER_INDEX asc
</select>
<!-- 根据key查询 -->
<select id="selectListByKey" parameterType="map" resultType="com.epmet.entity.CustomerFootBarEntity">
select
m.BAR_NAME as barName,
m.BAR_KEY as barKey,
m.app_type as appType,
m.PAGE_TITLE as pageTitle,
m.ICON_PATH as iconPath,
m.SELECTED_ICON_PATH as selectedIconPath,
m.FLOAT_ICON_PATH as floatIconPath
from customer_foot_bar m
where m.DEL_FLAG='0'
and m.CUSTOMER_ID=#{customerId}
and m.app_type=#{appType}
and m.BAR_KEY in
<foreach collection="barKeyList" item="barKey" open="( " separator=" , " index="index" close=")">
#{barKey}
</foreach>
</select>
<update id="updateCustomerFootBarByKey" parameterType="map">
UPDATE customer_foot_bar
SET BAR_NAME = #{barName},
PAGE_TITLE = #{pageTitle},
ICON_PATH = #{iconPath},
SELECTED_ICON_PATH = #{selectedIconPath},
FLOAT_ICON_PATH = #{floatIconPath},
UPDATED_BY = #{userId},
UPDATED_TIME = NOW()
WHERE
CUSTOMER_ID = #{customerId}
AND app_type = #{appType}
AND BAR_KEY = #{barKey}
AND DEL_FLAG = '0'
</update>
<update id="updateFootBarDel" parameterType="map">
UPDATE customer_foot_bar
set DEL_FLAG='1',UPDATED_BY = #{userId}, UPDATED_TIME = NOW()
where id=#{id}
</update>
</mapper>

36
epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/controller/IssueController.java

@ -235,5 +235,41 @@ public class IssueController {
PublishSuggestionResultDTO resultDTO=issueService.publisSuggestion(formDTO);
return new Result<PublishSuggestionResultDTO>().ok(resultDTO);
}
/**
* 处理中列表
* @author zhaoqifeng
* @date 2021/7/27 17:50
* @param fromDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.PendingResultDTO>>
*/
@PostMapping("processing")
public Result<List<PendingResultDTO>> processingList(@RequestBody ShiftProjectListFromDTO fromDTO){
return new Result<List<PendingResultDTO>>().ok(issueService.getProcessing(fromDTO));
}
/**
* 已结案列表
* @author zhaoqifeng
* @date 2021/7/27 17:50
* @param fromDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.ResolvedResultDTO>>
*/
@PostMapping("closedproject")
public Result<List<ResolvedResultDTO>> closedProject(@RequestBody ShiftProjectListFromDTO fromDTO){
return new Result<List<ResolvedResultDTO>>().ok(issueService.getClosedProjectList(fromDTO));
}
/**
* 无需解决列表
* @author zhaoqifeng
* @date 2021/7/27 17:50
* @param fromDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.UnResolvedResultDTO>>
*/
@PostMapping("unreslovedlist")
public Result<List<UnResolvedResultDTO>> unResolvedList(@RequestBody ShiftProjectListFromDTO fromDTO){
return new Result<List<UnResolvedResultDTO>>().ok(issueService.getUnResolvedList(fromDTO));
}
}

30
epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/IssueService.java

@ -127,4 +127,34 @@ public interface IssueService {
* @date 2021.05.19 10:52
*/
List<ClosedIssueListResultDTO> getClosedList(CommonIssueListFormDTO issueListFormDTO);
/**
* 处理中项目列表
* @author zhaoqifeng
* @date 2021/7/26 17:46
* @param formDTO
* @return java.util.List<com.epmet.dto.result.ShiftProjectListResultDTO>
*/
List<PendingResultDTO> getProcessing(ShiftProjectListFromDTO formDTO);
/**
* 已结案项目列表
* @author zhaoqifeng
* @date 2021/7/27 15:51
* @param formDTO
* @return java.util.List<com.epmet.dto.result.ResolvedResultDTO>
*/
List<ResolvedResultDTO> getClosedProjectList(ShiftProjectListFromDTO formDTO);
/**
* 无需解决项目议题列表
* @author zhaoqifeng
* @date 2021/7/27 17:45
* @param formDTO
* @return java.util.List<com.epmet.dto.result.UnResolvedResultDTO>
*/
List<UnResolvedResultDTO> getUnResolvedList(ShiftProjectListFromDTO formDTO);
}

107
epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java

@ -54,6 +54,8 @@ public class IssueServiceImpl implements IssueService {
private LoginUserUtil loginUserUtil;
@Autowired
private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
@Autowired
private GovProjectOpenFeignClient govProjectOpenFeignClient;
@Autowired
private ResiGroupOpenFeignClient resiGroupOpenFeignClient;
@ -468,4 +470,109 @@ public class IssueServiceImpl implements IssueService {
return issueList;
}
/**
* 处理中项目列表
*
* @param formDTO
* @return java.util.List<com.epmet.dto.result.ShiftProjectListResultDTO>
* @author zhaoqifeng
* @date 2021/7/26 17:46
*/
@Override
public List<PendingResultDTO> getProcessing(ShiftProjectListFromDTO formDTO) {
List<PendingResultDTO> resultList = govProjectOpenFeignClient.getPendingList(formDTO).getData();
if (org.apache.commons.collections4.CollectionUtils.isEmpty(resultList)) {
return new ArrayList<>();
}
List<String> topicIds = resultList.stream().map(PendingResultDTO::getSourceId).collect(Collectors.toList());
TopicDetailBatchFormDTO form = new TopicDetailBatchFormDTO();
form.setTopicIdList(topicIds);
Result<List<ResiTopicDetailResultDTO>> topicDetailsResult = resiGroupOpenFeignClient.listTopicDetailsByIds(form);
if (!topicDetailsResult.success()) {
logger.error("调用resi-group批量查询详情失败");
} else {
List<ResiTopicDetailResultDTO> topicDetails = topicDetailsResult.getData();
HashMap<String, ResiTopicDetailResultDTO> rtm = convertTopicDetailList2Map(topicDetails);
resultList.forEach(vi -> {
ResiTopicDetailResultDTO rr = rtm.get(vi.getSourceId());
vi.setTopicImgs(rr == null ? new ArrayList<>() : rr.getTopicImgs());
vi.setTopicVoices(rr == null ? new ArrayList<>() : rr.getTopicImgs());
vi.setTopicContent(rr == null ? "" : rr.getTopicContent());
});
}
return resultList;
}
/**
* 已结案项目列表
*
* @param formDTO
* @return java.util.List<com.epmet.dto.result.ResolvedResultDTO>
* @author zhaoqifeng
* @date 2021/7/27 15:51
*/
@Override
public List<ResolvedResultDTO> getClosedProjectList(ShiftProjectListFromDTO formDTO) {
List<ResolvedResultDTO> resultList = govProjectOpenFeignClient.getResolvedList(formDTO).getData();
if (org.apache.commons.collections4.CollectionUtils.isEmpty(resultList)) {
return new ArrayList<>();
}
List<String> topicIds = resultList.stream().map(ResolvedResultDTO::getSourceId).collect(Collectors.toList());
TopicDetailBatchFormDTO form = new TopicDetailBatchFormDTO();
form.setTopicIdList(topicIds);
Result<List<ResiTopicDetailResultDTO>> topicDetailsResult = resiGroupOpenFeignClient.listTopicDetailsByIds(form);
if (!topicDetailsResult.success()) {
logger.error("调用resi-group批量查询详情失败");
} else {
List<ResiTopicDetailResultDTO> topicDetails = topicDetailsResult.getData();
HashMap<String, ResiTopicDetailResultDTO> rtm = convertTopicDetailList2Map(topicDetails);
resultList.forEach(vi -> {
ResiTopicDetailResultDTO rr = rtm.get(vi.getSourceId());
vi.setTopicImgs(rr == null ? new ArrayList<>() : rr.getTopicImgs());
vi.setTopicVoices(rr == null ? new ArrayList<>() : rr.getTopicImgs());
vi.setTopicContent(rr == null ? "" : rr.getTopicContent());
});
}
return resultList;
}
/**
* 无需解决项目议题列表
*
* @param formDTO
* @return java.util.List<com.epmet.dto.result.UnResolvedResultDTO>
* @author zhaoqifeng
* @date 2021/7/27 17:45
*/
@Override
public List<UnResolvedResultDTO> getUnResolvedList(ShiftProjectListFromDTO formDTO) {
List<UnResolvedResultDTO> resultList = govIssueOpenFeignClient.getUnresolvedList(formDTO).getData();
if (org.apache.commons.collections4.CollectionUtils.isEmpty(resultList)) {
return new ArrayList<>();
}
List<String> topicIds = resultList.stream().map(UnResolvedResultDTO::getSourceId).collect(Collectors.toList());
TopicDetailBatchFormDTO form = new TopicDetailBatchFormDTO();
form.setTopicIdList(topicIds);
Result<List<ResiTopicDetailResultDTO>> topicDetailsResult = resiGroupOpenFeignClient.listTopicDetailsByIds(form);
if (!topicDetailsResult.success()) {
logger.error("调用resi-group批量查询详情失败");
} else {
List<ResiTopicDetailResultDTO> topicDetails = topicDetailsResult.getData();
HashMap<String, ResiTopicDetailResultDTO> rtm = convertTopicDetailList2Map(topicDetails);
resultList.forEach(vi -> {
ResiTopicDetailResultDTO rr = rtm.get(vi.getSourceId());
vi.setTopicImgs(rr == null ? new ArrayList<>() : rr.getTopicImgs());
vi.setTopicVoices(rr == null ? new ArrayList<>() : rr.getTopicImgs());
vi.setTopicContent(rr == null ? "" : rr.getTopicContent());
});
}
return resultList;
}
}

Loading…
Cancel
Save