Browse Source

Merge remote-tracking branch 'remotes/origin/dev'

# Conflicts:
#	epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java
feature/evaluate
jianjun 5 years ago
parent
commit
cc70f49987
  1. 18
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/EnvEnum.java
  2. 5
      epmet-module/data-report/data-report-client/pom.xml
  3. 31
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/CompartmentByBizTypeFormDTO.java
  4. 6
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AblityListResultDTO.java
  5. 5
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AgencyDistributionResultDTO.java
  6. 28
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/DepartmentNameListResultDTO.java
  7. 2
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/constant/ProjectConstant.java
  8. 61
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectDetailResultDTO.java
  9. 77
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectProcessResultDTO.java
  10. 21
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/backdoor/BackDoorController.java
  11. 4
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/fact/FactIndexController.java
  12. 13
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java
  13. 7
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java
  14. 6
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/DistributionController.java
  15. 38
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java
  16. 3
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenDifficultyDataDao.java
  17. 8
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexAgencyScoreDao.java
  18. 6
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexCommunityScoreDao.java
  19. 6
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexGridScoreDao.java
  20. 4
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/BackDoorService.java
  21. 23
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/impl/BackDoorServiceImpl.java
  22. 3
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java
  23. 14
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenDifficultyDataService.java
  24. 19
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java
  25. 31
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenDifficultyDataServiceImpl.java
  26. 28
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/fact/impl/FactIndexServiceImpl.java
  27. 9
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/ProjectService.java
  28. 36
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java
  29. 20
      epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencyScoreDao.xml
  30. 3
      epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencySubScoreDao.xml
  31. 20
      epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunityScoreDao.xml
  32. 3
      epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunitySubScoreDao.xml
  33. 20
      epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridScoreDao.xml
  34. 3
      epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridSubScoreDao.xml
  35. 50
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml
  36. 14
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml
  37. 25
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml
  38. 5
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerAgencyFormDTO.java
  39. 5
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataDetailFormDTO.java
  40. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java
  41. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java
  42. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java
  43. 12
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java
  44. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml
  45. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenDifficultyDataDao.xml
  46. 4
      epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java
  47. 4
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java
  48. 48
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessAndCurrentDeptResultDTO.java
  49. 6
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java
  50. 8
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java
  51. 12
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTraceController.java
  52. 9
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectProcessService.java
  53. 67
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java

18
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/EnvEnum.java

@ -11,21 +11,23 @@ import org.springframework.core.env.Environment;
* @date 2020-07-03 11:14 * @date 2020-07-03 11:14
**/ **/
public enum EnvEnum { public enum EnvEnum {
LOCAL("local", "本地环境"), LOCAL("local", "本地环境","http://localhost:8080/api/"),
DEV("dev", "开发环境"), DEV("dev", "开发环境","http://192.168.1.130:8080/api/"),
TEST("test", "体验环境"), TEST("test", "体验环境","https://epmet-dev.elinkservice.cn/api/"),
PROD("prod", "生产环境"), PROD("prod", "生产环境","https://epmet-cloud.elinkservice.cn/api/"),
UN_KNOWN("un_known", "未知"), UN_KNOWN("un_known", "未知","https://epmet-dev.elinkservice.cn/api/"),
; ;
private String code; private String code;
private String name; private String name;
private String url;
EnvEnum(String code, String name) { EnvEnum(String code, String name, String url) {
this.code = code; this.code = code;
this.name = name; this.name = name;
this.url = url;
} }
public static EnvEnum getEnum(String code) { public static EnvEnum getEnum(String code) {
@ -59,4 +61,8 @@ public enum EnvEnum {
public String getName() { public String getName() {
return name; return name;
} }
public String getUrl(){
return url;
}
} }

5
epmet-module/data-report/data-report-client/pom.xml

@ -17,6 +17,11 @@
<artifactId>epmet-commons-tools</artifactId> <artifactId>epmet-commons-tools</artifactId>
<version>2.0.0</version> <version>2.0.0</version>
</dependency> </dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>gov-project-client</artifactId>
<version>2.0.0</version>
</dependency>
</dependencies> </dependencies>

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

@ -0,0 +1,31 @@
package com.epmet.evaluationindex.screen.dto.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/10/22
*/
@Data
public class CompartmentByBizTypeFormDTO implements Serializable {
private static final long serialVersionUID = -3354778434424878413L;
public interface CompartmentByBizType extends CustomerClientShowGroup {}
/**
* 机关ID
*/
@NotBlank(message = "机关ID不能为空",groups = {CompartmentByBizType.class})
private String agencyId;
/**
* 业务类型
*/
@NotBlank(message = "bizType不能为空", groups = {CompartmentByBizType.class})
private String bizType;
}

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

@ -3,6 +3,7 @@ package com.epmet.evaluationindex.screen.dto.result;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
/** /**
* 按月查询各项指标数据--接口返参 * 按月查询各项指标数据--接口返参
@ -30,4 +31,9 @@ public class AblityListResultDTO implements Serializable {
*/ */
private String showType; private String showType;
/**
* 指标对应的权重
*/
private BigDecimal weight;
} }

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

@ -37,4 +37,9 @@ public class AgencyDistributionResultDTO implements Serializable {
* 组织agency; 网格grid ; 部门dept * 组织agency; 网格grid ; 部门dept
*/ */
private String type; private String type;
public AgencyDistributionResultDTO() {
this.subAreaMarks = "";
this.subCenterMark = "";
}
} }

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

@ -0,0 +1,28 @@
package com.epmet.evaluationindex.screen.dto.result;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @Author zxc
* @DateTime 2020/10/26 3:36 下午
*/
@Data
@AllArgsConstructor
public class DepartmentNameListResultDTO implements Serializable {
private static final long serialVersionUID = -801407836277197080L;
/**
* 部门名
*/
private String departmentName;
/**
* 工作人员
*/
private List<String> staffList;
}

2
epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/constant/ProjectConstant.java

@ -20,4 +20,6 @@ public interface ProjectConstant {
*/ */
String TYPE_EXCEPTION = "必要参数为空或参数格式错误"; String TYPE_EXCEPTION = "必要参数为空或参数格式错误";
String PROCESS_FAILURE = "查询项目进展失败......";
} }

61
epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectDetailResultDTO.java

@ -0,0 +1,61 @@
package com.epmet.project.dto.result;
import com.epmet.evaluationindex.screen.dto.result.DepartmentNameListResultDTO;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* @Author zxc
* @DateTime 2020/10/23 10:13 上午
*/
@Data
public class ProjectDetailResultDTO implements Serializable {
private static final long serialVersionUID = 2450826789942547426L;
/** 事件 = 项目
* 事件标题
*/
private String eventTitle;
/**
* 事件内容
*/
private String eventContent;
/**
* 事件来源
*/
private String eventSource;
/**
* 事件图片集合
*/
private List<String> imgUrlList;
/**
* 项目进展
*/
private List<ProjectProcessResultDTO> processList;
/**
* 当前跟进部门
*/
private List<String> departmentNameList;
/**
* 当前跟进部门
*/
private List<DepartmentNameListResultDTO> departmentList;
public ProjectDetailResultDTO() {
this.eventTitle = "";
this.eventContent = "";
this.eventSource = "";
this.imgUrlList = new ArrayList<>();
this.processList = new ArrayList<>();
}
}

77
epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectProcessResultDTO.java

@ -0,0 +1,77 @@
/**
* 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.project.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* 项目跟踪-项目处理进展列表-接口返参
*
* @author sun
*/
@Data
public class ProjectProcessResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 项目Id
*/
private String projectId = "";
/**
* 项目处理进展Id
*/
private String processId = "";
/**
* 处理进展名称
*/
private String processName = "";
/**
* 处理进展时间
*/
private Long processTime;
/**
* 处理进展时间 字符串
*/
//@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
//private String processTimeStr;
/**
* 处理部门
*/
private String departmentName = "";
/**
* 公开答复
*/
private String publicReply = "";
/**
* 内部备注
*/
private String internalRemark = "";
}

21
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/backdoor/BackDoorController.java

@ -1,6 +1,5 @@
package com.epmet.datareport.controller.backdoor; package com.epmet.datareport.controller.backdoor;
import com.epmet.commons.tools.utils.Result;
import com.epmet.datareport.service.backdoor.BackDoorService; import com.epmet.datareport.service.backdoor.BackDoorService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -16,9 +15,23 @@ public class BackDoorController {
@Autowired @Autowired
private BackDoorService backDoorService; private BackDoorService backDoorService;
@PostMapping("backdoor") /**
public Object backDoor(@RequestHeader("Data-Type")String dataType, @RequestHeader("AppId")String appId, @RequestHeader("target")String target, @RequestBody(required = false) Object o){ * desc: 重定向到target 方法适用于外部鉴权接口的查询 比如大屏的查询接口
return backDoorService.backDoor(dataType,appId,target,o); *
* @param dataType
* @param appId
* @param target
* @param targetParam
* @return java.lang.String
* @author LiuJanJun
* @date 2020/10/23 1:44 下午
*/
@PostMapping("redirect/external")
public Object backDoor(@RequestHeader(value = "Data-Type", defaultValue = "real", required = false) String dataType,
@RequestHeader(value = "env", defaultValue = "test", required = false) String env,
@RequestHeader("AppId") String appId, @RequestHeader("target") String target,
@RequestBody(required = false) Object targetParam) {
return backDoorService.redirect(dataType, appId, target, targetParam,env);
} }
} }

4
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/fact/FactIndexController.java

@ -1,7 +1,5 @@
package com.epmet.datareport.controller.fact; package com.epmet.datareport.controller.fact;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.datareport.service.fact.FactIndexService; import com.epmet.datareport.service.fact.FactIndexService;
@ -40,7 +38,7 @@ public class FactIndexController {
/** /**
* @param formDTO * @param formDTO
* @Description 按月份查询各项能力分数 * @Description 按月份查询本级及下级分数
* @author sun * @author sun
*/ */
@PostMapping("index/scorelist") @PostMapping("index/scorelist")

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

@ -5,6 +5,7 @@ import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.ProcessListFormDTO;
import com.epmet.module.project.service.ProjectService; import com.epmet.module.project.service.ProjectService;
import com.epmet.project.constant.ProjectConstant; import com.epmet.project.constant.ProjectConstant;
import com.epmet.project.dto.form.ProjectIncrTrendFormDTO; import com.epmet.project.dto.form.ProjectIncrTrendFormDTO;
@ -78,4 +79,16 @@ public class ProjectController {
return new Result<List<ProjectIncrTrendResultDTO>>().ok(projectService.getProjectIncrTrend(tokenDto, formDTO)); return new Result<List<ProjectIncrTrendResultDTO>>().ok(projectService.getProjectIncrTrend(tokenDto, formDTO));
} }
/**
* @Description 项目详情
* @Param processListFormDTO
* @author zxc
* @date 2020/10/23 10:31 上午
*/
@PostMapping("projectdetail")
public Result<ProjectDetailResultDTO> projectDetail(@RequestBody ProcessListFormDTO processListFormDTO){
ValidatorUtils.validateEntity(processListFormDTO);
return new Result<ProjectDetailResultDTO>().ok(projectService.projectDetail(processListFormDTO));
}
} }

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

@ -3,6 +3,7 @@ package com.epmet.datareport.controller.screen;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.datareport.service.evaluationindex.screen.AgencyService; import com.epmet.datareport.service.evaluationindex.screen.AgencyService;
import com.epmet.evaluationindex.screen.dto.form.CompartmentByBizTypeFormDTO;
import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO; import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO;
import com.epmet.evaluationindex.screen.dto.form.TreeByTypeFormDTO; import com.epmet.evaluationindex.screen.dto.form.TreeByTypeFormDTO;
import com.epmet.evaluationindex.screen.dto.result.CompartmentResultDTO; import com.epmet.evaluationindex.screen.dto.result.CompartmentResultDTO;
@ -59,4 +60,10 @@ public class AgencyController {
return new Result<CompartmentResultDTO>().ok(agencyService.compartment(compartmentFormDTO)); return new Result<CompartmentResultDTO>().ok(agencyService.compartment(compartmentFormDTO));
} }
@PostMapping("compartmentbybiztype")
public Result<CompartmentResultDTO> compartmentByBizType(@RequestBody CompartmentByBizTypeFormDTO compartmentFormDTO){
ValidatorUtils.validateEntity(compartmentFormDTO, CompartmentByBizTypeFormDTO.CompartmentByBizType.class);
return new Result<CompartmentResultDTO>().ok(agencyService.compartmentByBizType(compartmentFormDTO));
}
} }

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

@ -27,8 +27,8 @@ public class DistributionController {
private DistributionService distributionService; private DistributionService distributionService;
/** /**
* @Description 1党支部
* @param formDTO * @param formDTO
* @Description 1党支部分布 只显示 screen_customer_biz_org 表中存在的orgId的数据
* @author zxc * @author zxc
* @date 2020/8/18 10:59 上午 * @date 2020/8/18 10:59 上午
*/ */
@ -39,7 +39,7 @@ public class DistributionController {
} }
/** /**
* @Description 2用户分布 * @Description 2用户分布 只显示 screen_customer_biz_org 表中存在的orgId的数据
* @param userFormDTO * @param userFormDTO
* @author zxc * @author zxc
* @date 2020/8/18 11:10 上午 * @date 2020/8/18 11:10 上午
@ -51,7 +51,7 @@ public class DistributionController {
} }
/** /**
* @Description 3党员分布 * @Description 3党员分布 只显示 screen_customer_biz_org 表中存在的orgId的数据
* @param parymemberFormDTO * @param parymemberFormDTO
* @author zxc * @author zxc
* @date 2020/8/18 11:20 上午 * @date 2020/8/18 11:20 上午

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

@ -33,18 +33,18 @@ import java.util.List;
public interface ScreenCustomerAgencyDao { public interface ScreenCustomerAgencyDao {
/** /**
* @Description 查询客户根组织ID
* @param customerId * @param customerId
* @Description 查询客户根组织ID
* @author zxc * @author zxc
* @date 2020/8/18 2:44 下午 * @date 2020/8/18 2:44 下午
*/ */
TreeResultDTO selectRootAgencyId(@Param("customerId")String customerId); TreeResultDTO selectRootAgencyId(@Param("customerId") String customerId);
TreeResultDTO selectRootAgencyIdByBizType(@Param("customerId")String customerId,@Param("bizType")String bizType); TreeResultDTO selectRootAgencyIdByBizType(@Param("customerId") String customerId, @Param("bizType") String bizType);
/** /**
* @Description 查询下级机关的 名称和id
* @param subAgencyPids * @param subAgencyPids
* @Description 查询下级机关的 名称和id
* @author zxc * @author zxc
* @date 2020/8/18 4:48 下午 * @date 2020/8/18 4:48 下午
*/ */
@ -53,36 +53,40 @@ public interface ScreenCustomerAgencyDao {
List<TreeResultDTO> selectSubAgencyListByBizType(@Param("subAgencyPids") String subAgencyPids); List<TreeResultDTO> selectSubAgencyListByBizType(@Param("subAgencyPids") String subAgencyPids);
/** /**
* @Description 查询当前机关的区域信息
* @param agencyId * @param agencyId
* @Description 查询当前机关的区域信息
* @author zxc * @author zxc
* @date 2020/8/18 4:51 下午 * @date 2020/8/18 4:51 下午
*/ */
CompartmentResultDTO getAgencyAreaInfo(@Param("agencyId")String agencyId); CompartmentResultDTO getAgencyAreaInfo(@Param("agencyId") String agencyId);
CompartmentResultDTO getAgencyAreaInfoByBizType(@Param("agencyId") String agencyId, @Param("bizType") String bizType);
/** /**
* @Description 查询子级区域分布信息机关级别
* @param agencyId * @param agencyId
* @Description 查询子级区域分布信息机关级别
* @author zxc * @author zxc
* @date 2020/8/18 5:12 下午 * @date 2020/8/18 5:12 下午
*/ */
List<AgencyDistributionResultDTO> selectSubDistribution(@Param("agencyId")String agencyId); List<AgencyDistributionResultDTO> selectSubDistribution(@Param("agencyId") String agencyId);
List<AgencyDistributionResultDTO> selectSubDistributionByType(@Param("agencyId") String agencyId, @Param("bizType") String bizType);
/** /**
* @Description 查询子级用户分布机关级别
* @param parentId * @param parentId
* @Description 查询子级用户分布机关级别
* @author zxc * @author zxc
* @date 2020/8/19 9:33 上午 * @date 2020/8/19 9:33 上午
*/ */
List<UserDistributionResultDTO> selectUserDistributionAgency(@Param("parentId")String parentId); List<UserDistributionResultDTO> selectUserDistributionAgency(@Param("parentId") String parentId);
/** /**
* @Description 查询子级党员分布机关级别
* @param parentId * @param parentId
* @Description 查询子级党员分布机关级别
* @author zxc * @author zxc
* @date 2020/8/19 10:30 上午 * @date 2020/8/19 10:30 上午
*/ */
List<ParymemberDistributionResultDTO> selectParymemberDistribution(@Param("parentId")String parentId); List<ParymemberDistributionResultDTO> selectParymemberDistribution(@Param("parentId") String parentId);
/** /**
* @param agencyId * @param agencyId
@ -90,4 +94,14 @@ public interface ScreenCustomerAgencyDao {
* @author sun * @author sun
*/ */
int selectRootAgency(@Param("agencyId") String agencyId); int selectRootAgency(@Param("agencyId") String agencyId);
/**
* desc: 根据orgId获取组织信息
*
* @param agencyId
* @return com.epmet.evaluationindex.screen.dto.result.CompartmentResultDTO
* @author LiuJanJun
* @date 2020/10/23 3:54 下午
*/
CompartmentResultDTO getAgencyInfoByAegncyId(@Param("agencyId") String agencyId);
} }

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

@ -18,6 +18,7 @@
package com.epmet.datareport.dao.evaluationindex.screen; package com.epmet.datareport.dao.evaluationindex.screen;
import com.epmet.evaluationindex.screen.dto.result.DifficultProjectResultDTO; import com.epmet.evaluationindex.screen.dto.result.DifficultProjectResultDTO;
import com.epmet.project.dto.result.ProjectDetailResultDTO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -41,4 +42,6 @@ public interface ScreenDifficultyDataDao {
**/ **/
List<DifficultProjectResultDTO> selectDifficulty(@Param("agencyId")String agencyId,@Param("type")String type); List<DifficultProjectResultDTO> selectDifficulty(@Param("agencyId")String agencyId,@Param("type")String type);
ProjectDetailResultDTO projectDetail(@Param("eventId")String projectId);
} }

8
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexAgencyScoreDao.java

@ -39,22 +39,22 @@ public interface FactIndexAgencyScoreDao {
/** /**
* @param formDTO * @param formDTO
* @Description 分别查询区县乡镇街道过去12个月党建能力治理能力服务能力每月总分本级得分下级得分数据 * @Description 分别查询区县乡镇街道过去12个月党建能力治理能力服务能力每月各项乘以权重后的得分数据
* @author sun * @author sun
*/ */
LinkedList<AblityIndexResultDTO.ScoreListResultDTO> selectAblityIndex(AblityIndexFormDTO formDTO); LinkedList<AblityIndexResultDTO.ScoreListResultDTO> selectAgencyAblityWeightScoreIndex(AblityIndexFormDTO formDTO);
/** /**
* @param formDTO * @param formDTO
* @Description 查询当前组织某一月份党建能力治理能力服务能力对应的总分本级分下级分 * @Description 查询当前组织某一月份党建能力治理能力服务能力对应的总分本级分下级分
* @author sun * @author sun
*/ */
List<ScoreListResultDTO> selectScoreList(ScoreListFormDTO formDTO); List<ScoreListResultDTO> selectAgencyWeightScoreList(ScoreListFormDTO formDTO);
/** /**
* @param formDTO * @param formDTO
* @Description 分别查询区县乡镇街道过去12个月党建能力治理能力服务能力每月总分本级得分下级得分数据 * @Description 分别查询区县乡镇街道过去12个月党建能力治理能力服务能力每月总分本级得分下级得分数据
* @author sun * @author sun
*/ */
LinkedList<MonthScoreListResultDTO.ScoreListResultDTO> selectMonthScoreList(MonthScoreListFormDTO formDTO); LinkedList<MonthScoreListResultDTO.ScoreListResultDTO> selectAgencyMonthWeightScoreList(MonthScoreListFormDTO formDTO);
} }

6
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexCommunityScoreDao.java

@ -42,19 +42,19 @@ public interface FactIndexCommunityScoreDao {
* @Description 分别查询社区过去12个月党建能力治理能力服务能力每月总分本级得分下级得分数据 * @Description 分别查询社区过去12个月党建能力治理能力服务能力每月总分本级得分下级得分数据
* @author sun * @author sun
*/ */
LinkedList<AblityIndexResultDTO.ScoreListResultDTO> selectCommunityAblityIndex(AblityIndexFormDTO formDTO); LinkedList<AblityIndexResultDTO.ScoreListResultDTO> selectCommunityAblityWeightScore(AblityIndexFormDTO formDTO);
/** /**
* @param formDTO * @param formDTO
* @Description 查询社区级组织某一月份党建能力治理能力服务能力对应的总分本级分下级分 * @Description 查询社区级组织某一月份党建能力治理能力服务能力对应的总分本级分下级分
* @author sun * @author sun
*/ */
List<ScoreListResultDTO> selectCommunityScoreList(ScoreListFormDTO formDTO); List<ScoreListResultDTO> selectCommunityWeightScoreList(ScoreListFormDTO formDTO);
/** /**
* @param formDTO * @param formDTO
* @Description 分别查询社区过去12个月党建能力治理能力服务能力每月总分本级得分下级得分数据 * @Description 分别查询社区过去12个月党建能力治理能力服务能力每月总分本级得分下级得分数据
* @author sun * @author sun
*/ */
LinkedList<MonthScoreListResultDTO.ScoreListResultDTO> selectCommunityMonthScoreList(MonthScoreListFormDTO formDTO); LinkedList<MonthScoreListResultDTO.ScoreListResultDTO> selectCommunityMonthWeightScoreList(MonthScoreListFormDTO formDTO);
} }

6
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexGridScoreDao.java

@ -42,19 +42,19 @@ public interface FactIndexGridScoreDao {
* @Description 分别查网格过去12个月党建能力治理能力服务能力每月总分本级得分下级得分数据 * @Description 分别查网格过去12个月党建能力治理能力服务能力每月总分本级得分下级得分数据
* @author sun * @author sun
*/ */
LinkedList<AblityIndexResultDTO.ScoreListResultDTO> selectGridAblityIndex(AblityIndexFormDTO formDTO); LinkedList<AblityIndexResultDTO.ScoreListResultDTO> selectGridAblityWeightScore(AblityIndexFormDTO formDTO);
/** /**
* @param formDTO * @param formDTO
* @Description 分别查网格某一月份党建能力治理能力服务能力对应的总分本级分下级分 * @Description 分别查网格某一月份党建能力治理能力服务能力对应的总分本级分下级分
* @author sun * @author sun
*/ */
List<ScoreListResultDTO> selectGridScoreList(ScoreListFormDTO formDTO); List<ScoreListResultDTO> selectGridWeightScoreList(ScoreListFormDTO formDTO);
/** /**
* @param formDTO * @param formDTO
* @Description 分别查网格过去12个月党建能力治理能力服务能力每月总分本级得分下级得分数据 * @Description 分别查网格过去12个月党建能力治理能力服务能力每月总分本级得分下级得分数据
* @author sun * @author sun
*/ */
LinkedList<MonthScoreListResultDTO.ScoreListResultDTO> selectGridMonthScoreList(MonthScoreListFormDTO formDTO); LinkedList<MonthScoreListResultDTO.ScoreListResultDTO> selectGridMonthWeightScoreList(MonthScoreListFormDTO formDTO);
} }

4
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/BackDoorService.java

@ -1,13 +1,11 @@
package com.epmet.datareport.service.backdoor; package com.epmet.datareport.service.backdoor;
import com.epmet.commons.tools.utils.Result;
/** /**
* @Author zxc * @Author zxc
* @DateTime 2020/10/21 5:17 下午 * @DateTime 2020/10/21 5:17 下午
*/ */
public interface BackDoorService { public interface BackDoorService {
Object backDoor(String dataType, String appId, String target, Object o); Object redirect(String dataType, String appId, String target, Object o,String env);
} }

23
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/backdoor/impl/BackDoorServiceImpl.java

@ -1,11 +1,11 @@
package com.epmet.datareport.service.backdoor.impl; package com.epmet.datareport.service.backdoor.impl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.epmet.commons.tools.enums.EnvEnum;
import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.utils.HttpClientManager; import com.epmet.commons.tools.utils.HttpClientManager;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.datareport.constant.*; import com.epmet.datareport.constant.FactConstant;
import com.epmet.datareport.service.backdoor.BackDoorService; import com.epmet.datareport.service.backdoor.BackDoorService;
import com.epmet.dto.result.AppIdInfoResultDTO; import com.epmet.dto.result.AppIdInfoResultDTO;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient; import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
@ -28,24 +28,23 @@ public class BackDoorServiceImpl implements BackDoorService {
private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient; private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient;
@Override @Override
public Object backDoor(String dataType, String appId, String target, Object o) { public Object redirect(String dataType, String appId, String target, Object targetParam, String env) {
Result<AppIdInfoResultDTO> appIdInfoResultDTOResult = commonServiceOpenFeignClient.appIdInfo(appId); Result<AppIdInfoResultDTO> appIdInfoResultDTOResult = commonServiceOpenFeignClient.appIdInfo(appId);
if (!appIdInfoResultDTOResult.success()){ if (!appIdInfoResultDTOResult.success()) {
throw new RenException("获取accessToken失败......"); throw new RenException("获取accessToken失败......");
} }
AppIdInfoResultDTO data = appIdInfoResultDTOResult.getData(); AppIdInfoResultDTO data = appIdInfoResultDTOResult.getData();
String url = FactConstant.URL.concat(target); String url = EnvEnum.getEnum(env).getUrl().concat(target);
Map<String,String> headerMap = new HashMap<>(16); Map<String, String> headerMap = new HashMap<>(16);
headerMap.put("AccessToken",data.getAccessToken()); headerMap.put("AccessToken", data.getAccessToken());
headerMap.put("AppId",data.getAppId()); headerMap.put("AppId", data.getAppId());
headerMap.put("AuthType","jwt"); headerMap.put("AuthType", "jwt");
headerMap.put("Data-Type",dataType); headerMap.put("Data-Type",dataType);
Result<String> stringResult = HttpClientManager.getInstance().sendPostByJSONAndHeader(url, JSON.toJSONString(o),headerMap); Result<String> stringResult = HttpClientManager.getInstance().sendPostByJSONAndHeader(url, JSON.toJSONString(targetParam), headerMap);
log.info(JSON.toJSONString(stringResult)); log.info(JSON.toJSONString(stringResult));
if (!stringResult.success()){ if (!stringResult.success()){
throw new RenException("请求【"+url+"】失败......"+stringResult.error()); throw new RenException("请求【"+url+"】失败......"+stringResult.error());
} }
JSONObject jsonObject = JSON.parseObject(stringResult.getData()); return JSON.parseObject(stringResult.getData());
return jsonObject;
} }
} }

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

@ -1,5 +1,6 @@
package com.epmet.datareport.service.evaluationindex.screen; package com.epmet.datareport.service.evaluationindex.screen;
import com.epmet.evaluationindex.screen.dto.form.CompartmentByBizTypeFormDTO;
import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO; import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO;
import com.epmet.evaluationindex.screen.dto.form.TreeByTypeFormDTO; import com.epmet.evaluationindex.screen.dto.form.TreeByTypeFormDTO;
import com.epmet.evaluationindex.screen.dto.result.CompartmentResultDTO; import com.epmet.evaluationindex.screen.dto.result.CompartmentResultDTO;
@ -32,4 +33,6 @@ public interface AgencyService {
*/ */
CompartmentResultDTO compartment(CompartmentFormDTO compartmentFormDTO); CompartmentResultDTO compartment(CompartmentFormDTO compartmentFormDTO);
CompartmentResultDTO compartmentByBizType(CompartmentByBizTypeFormDTO compartmentFormDTO);
} }

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

@ -0,0 +1,14 @@
package com.epmet.datareport.service.evaluationindex.screen;
import com.epmet.dto.form.ProcessListFormDTO;
import com.epmet.project.dto.result.ProjectDetailResultDTO;
/**
* @Author zxc
* @DateTime 2020/10/23 1:26 下午
*/
public interface ScreenDifficultyDataService {
ProjectDetailResultDTO projectDetail(ProcessListFormDTO processListFormDTO);
}

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

@ -8,6 +8,7 @@ import com.epmet.datareport.dao.evaluationindex.screen.ScreenCustomerAgencyDao;
import com.epmet.datareport.dao.evaluationindex.screen.ScreenCustomerGridDao; import com.epmet.datareport.dao.evaluationindex.screen.ScreenCustomerGridDao;
import com.epmet.datareport.service.evaluationindex.screen.AgencyService; import com.epmet.datareport.service.evaluationindex.screen.AgencyService;
import com.epmet.evaluationindex.screen.constant.ScreenConstant; import com.epmet.evaluationindex.screen.constant.ScreenConstant;
import com.epmet.evaluationindex.screen.dto.form.CompartmentByBizTypeFormDTO;
import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO; import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO;
import com.epmet.evaluationindex.screen.dto.form.TreeByTypeFormDTO; import com.epmet.evaluationindex.screen.dto.form.TreeByTypeFormDTO;
import com.epmet.evaluationindex.screen.dto.result.AgencyDistributionResultDTO; import com.epmet.evaluationindex.screen.dto.result.AgencyDistributionResultDTO;
@ -206,4 +207,22 @@ public class AgencyServiceImpl implements AgencyService {
} }
return agencyAreaInfo; return agencyAreaInfo;
} }
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public CompartmentResultDTO compartmentByBizType(CompartmentByBizTypeFormDTO compartmentFormDTO) {
CompartmentResultDTO agencyAreaInfo = screenCustomerAgencyDao.getAgencyAreaInfoByBizType(compartmentFormDTO.getAgencyId(),compartmentFormDTO.getBizType());
if (null == agencyAreaInfo){
return new CompartmentResultDTO();
}
if (agencyAreaInfo.getLevel().equals(ScreenConstant.COMMUNITY)){
// 当level为"community"时,查询screen_customer_grid表
List<AgencyDistributionResultDTO> agencyDistributionResultDTOS = screenCustomerGridDao.selectSubDistribution(compartmentFormDTO.getAgencyId());
agencyAreaInfo.setAgencyDistribution(agencyDistributionResultDTOS);
}else {
List<AgencyDistributionResultDTO> agencyDistributionResultDTOS = screenCustomerAgencyDao.selectSubDistributionByType(compartmentFormDTO.getAgencyId(),compartmentFormDTO.getBizType());
agencyAreaInfo.setAgencyDistribution(agencyDistributionResultDTOS);
}
return agencyAreaInfo;
}
} }

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

@ -0,0 +1,31 @@
package com.epmet.datareport.service.evaluationindex.screen.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.constant.DataSourceConstant;
import com.epmet.datareport.dao.evaluationindex.screen.ScreenDifficultyDataDao;
import com.epmet.datareport.service.evaluationindex.screen.ScreenDifficultyDataService;
import com.epmet.dto.form.ProcessListFormDTO;
import com.epmet.project.dto.result.ProjectDetailResultDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @Author zxc
* @DateTime 2020/10/23 1:26 下午
*/
@Service
@Slf4j
@DataSource(DataSourceConstant.EVALUATION_INDEX)
public class ScreenDifficultyDataServiceImpl implements ScreenDifficultyDataService {
@Autowired
private ScreenDifficultyDataDao screenDifficultyDataDao;
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public ProjectDetailResultDTO projectDetail(ProcessListFormDTO processListFormDTO) {
ProjectDetailResultDTO projectDetailResultDTO = screenDifficultyDataDao.projectDetail(processListFormDTO.getProjectId());
return projectDetailResultDTO;
}
}

28
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/fact/impl/FactIndexServiceImpl.java

@ -70,7 +70,7 @@ public class FactIndexServiceImpl implements FactIndexService {
//组织层级数据 //组织层级数据
if (FactConstant.AGENCY.equals(formDTO.getOrgType())) { if (FactConstant.AGENCY.equals(formDTO.getOrgType())) {
//3.根据组织Id查询组织信息 //3.根据组织Id查询组织信息
CompartmentResultDTO agency = screenCustomerAgencyDao.getAgencyAreaInfo(formDTO.getOrgId()); CompartmentResultDTO agency = screenCustomerAgencyDao.getAgencyInfoByAegncyId(formDTO.getOrgId());
if (null == agency) { if (null == agency) {
//throw new RenException(String.format("根据组织Id未查询到组织信息,组织Id:%s", formDTO.getOrgId())); //throw new RenException(String.format("根据组织Id未查询到组织信息,组织Id:%s", formDTO.getOrgId()));
return resultList; return resultList;
@ -79,12 +79,12 @@ public class FactIndexServiceImpl implements FactIndexService {
//区县级、乡镇街道级 //区县级、乡镇街道级
if ("district".equals(agency.getLevel()) || "street".equals(agency.getLevel())) { if ("district".equals(agency.getLevel()) || "street".equals(agency.getLevel())) {
//4-1.查询过去12个月党建能力、治理能力、服务能力每月总分数据 //4-1.查询过去12个月党建能力、治理能力、服务能力每月总分数据
list = factIndexAgencyScoreDao.selectAblityIndex(formDTO); list = factIndexAgencyScoreDao.selectAgencyAblityWeightScoreIndex(formDTO);
//社区级 //社区级
} else if ("community".equals(agency.getLevel())) { } else if ("community".equals(agency.getLevel())) {
//4-1.查询过去12个月党建能力、治理能力、服务能力每月总分、本级得分、下级得分数据 //4-1.查询过去12个月党建能力、治理能力、服务能力每月总分、本级得分、下级得分数据
list = factIndexCommunityScoreDao.selectCommunityAblityIndex(formDTO); list = factIndexCommunityScoreDao.selectCommunityAblityWeightScore(formDTO);
} else { } else {
//throw new RenException(String.format("根据组织Id查询到的组织级别信息错误,组织Id:%s", formDTO.getOrgId())); //throw new RenException(String.format("根据组织Id查询到的组织级别信息错误,组织Id:%s", formDTO.getOrgId()));
return resultList; return resultList;
@ -92,7 +92,7 @@ public class FactIndexServiceImpl implements FactIndexService {
//网格层级数据 //网格层级数据
} else if (FactConstant.GRID.equals(formDTO.getOrgType())) { } else if (FactConstant.GRID.equals(formDTO.getOrgType())) {
//5.查询网格过去12个月党建能力、治理能力、服务能力每月总分数据 //5.查询网格过去12个月党建能力、治理能力、服务能力每月总分数据
list = factIndexGridScoreDao.selectGridAblityIndex(formDTO); list = factIndexGridScoreDao.selectGridAblityWeightScore(formDTO);
} else { } else {
throw new RenException(String.format("能力指数查询,orgType类型错误,组织Id:%s,类型Type:%s", formDTO.getOrgId(), formDTO.getOrgType())); throw new RenException(String.format("能力指数查询,orgType类型错误,组织Id:%s,类型Type:%s", formDTO.getOrgId(), formDTO.getOrgType()));
} }
@ -172,7 +172,7 @@ public class FactIndexServiceImpl implements FactIndexService {
//组织层级数据 //组织层级数据
if (FactConstant.AGENCY.equals(formDTO.getOrgType())) { if (FactConstant.AGENCY.equals(formDTO.getOrgType())) {
//2.根据组织Id查询组织信息 //2.根据组织Id查询组织信息
CompartmentResultDTO agency = screenCustomerAgencyDao.getAgencyAreaInfo(formDTO.getOrgId()); CompartmentResultDTO agency = screenCustomerAgencyDao.getAgencyInfoByAegncyId(formDTO.getOrgId());
if (null == agency) { if (null == agency) {
//throw new RenException(String.format("根据组织Id未查询到组织信息,组织Id:%s", formDTO.getOrgId())); //throw new RenException(String.format("根据组织Id未查询到组织信息,组织Id:%s", formDTO.getOrgId()));
return resultList; return resultList;
@ -181,11 +181,11 @@ public class FactIndexServiceImpl implements FactIndexService {
//区县级、乡镇街道级 //区县级、乡镇街道级
if ("district".equals(agency.getLevel()) || "street".equals(agency.getLevel())) { if ("district".equals(agency.getLevel()) || "street".equals(agency.getLevel())) {
//3-1.查询当前组织某一月份党建能力、治理能力、服务能力对应的总分、本级分、下级分 //3-1.查询当前组织某一月份党建能力、治理能力、服务能力对应的总分、本级分、下级分
resultList = factIndexAgencyScoreDao.selectScoreList(formDTO); resultList = factIndexAgencyScoreDao.selectAgencyWeightScoreList(formDTO);
//社区级 //社区级
} else if ("community".equals(agency.getLevel())) { } else if ("community".equals(agency.getLevel())) {
//3-1.查询当前组织某一月份党建能力、治理能力、服务能力对应的总分、本级分、下级分 //3-1.查询当前组织某一月份党建能力、治理能力、服务能力对应的总分、本级分、下级分
resultList = factIndexCommunityScoreDao.selectCommunityScoreList(formDTO); resultList = factIndexCommunityScoreDao.selectCommunityWeightScoreList(formDTO);
} else { } else {
//throw new RenException(String.format("根据组织Id查询到的组织级别信息错误,组织Id:%s", formDTO.getOrgId())); //throw new RenException(String.format("根据组织Id查询到的组织级别信息错误,组织Id:%s", formDTO.getOrgId()));
return resultList; return resultList;
@ -194,7 +194,7 @@ public class FactIndexServiceImpl implements FactIndexService {
//4.网格层级数据 //4.网格层级数据
} else if (FactConstant.GRID.equals(formDTO.getOrgType())) { } else if (FactConstant.GRID.equals(formDTO.getOrgType())) {
//4-1.查询当前组织某一月份党建能力、治理能力、服务能力对应的总分、本级分、下级分 //4-1.查询当前组织某一月份党建能力、治理能力、服务能力对应的总分、本级分、下级分
resultList = factIndexGridScoreDao.selectGridScoreList(formDTO); resultList = factIndexGridScoreDao.selectGridWeightScoreList(formDTO);
} else { } else {
throw new RenException(String.format("按月份查询各项能力分数,orgType类型错误,组织Id:%s,类型Type:%s", formDTO.getOrgId(), formDTO.getOrgType())); throw new RenException(String.format("按月份查询各项能力分数,orgType类型错误,组织Id:%s,类型Type:%s", formDTO.getOrgId(), formDTO.getOrgType()));
} }
@ -220,7 +220,7 @@ public class FactIndexServiceImpl implements FactIndexService {
//组织层级数据 //组织层级数据
if (FactConstant.AGENCY.equals(formDTO.getOrgType())) { if (FactConstant.AGENCY.equals(formDTO.getOrgType())) {
//3.根据组织Id查询组织信息 //3.根据组织Id查询组织信息
CompartmentResultDTO agency = screenCustomerAgencyDao.getAgencyAreaInfo(formDTO.getOrgId()); CompartmentResultDTO agency = screenCustomerAgencyDao.getAgencyInfoByAegncyId(formDTO.getOrgId());
if (null == agency) { if (null == agency) {
//throw new RenException(String.format("根据组织Id未查询到组织信息,组织Id:%s", formDTO.getOrgId())); //throw new RenException(String.format("根据组织Id未查询到组织信息,组织Id:%s", formDTO.getOrgId()));
return resultList; return resultList;
@ -229,12 +229,12 @@ public class FactIndexServiceImpl implements FactIndexService {
//区县级、乡镇街道级 //区县级、乡镇街道级
if ("district".equals(agency.getLevel()) || "street".equals(agency.getLevel())) { if ("district".equals(agency.getLevel()) || "street".equals(agency.getLevel())) {
//4-1.查询过去12个月党建能力、治理能力、服务能力每月总分、本级得分、下级得分数据 //4-1.查询过去12个月党建能力、治理能力、服务能力每月总分、本级得分、下级得分数据
list = factIndexAgencyScoreDao.selectMonthScoreList(formDTO); list = factIndexAgencyScoreDao.selectAgencyMonthWeightScoreList(formDTO);
//社区级 //社区级
} else if ("community".equals(agency.getLevel())) { } else if ("community".equals(agency.getLevel())) {
//4-1.查询过去12个月党建能力、治理能力、服务能力每月总分、本级得分、下级得分数据 //4-1.查询过去12个月党建能力、治理能力、服务能力每月总分、本级得分、下级得分数据
list = factIndexCommunityScoreDao.selectCommunityMonthScoreList(formDTO); list = factIndexCommunityScoreDao.selectCommunityMonthWeightScoreList(formDTO);
} else { } else {
//throw new RenException(String.format("根据组织Id查询到的组织级别信息错误,组织Id:%s", formDTO.getOrgId())); //throw new RenException(String.format("根据组织Id查询到的组织级别信息错误,组织Id:%s", formDTO.getOrgId()));
return resultList; return resultList;
@ -242,7 +242,7 @@ public class FactIndexServiceImpl implements FactIndexService {
//网格层级数据 //网格层级数据
} else if (FactConstant.GRID.equals(formDTO.getOrgType())) { } else if (FactConstant.GRID.equals(formDTO.getOrgType())) {
//5.查询网格过去12个月党建能力、治理能力、服务能力每月总分、本级得分、下级得分数据 //5.查询网格过去12个月党建能力、治理能力、服务能力每月总分、本级得分、下级得分数据
list = factIndexGridScoreDao.selectGridMonthScoreList(formDTO); list = factIndexGridScoreDao.selectGridMonthWeightScoreList(formDTO);
} else { } else {
throw new RenException(String.format("能力指数查询,orgType类型错误,组织Id:%s,类型Type:%s", formDTO.getOrgId(), formDTO.getOrgType())); throw new RenException(String.format("能力指数查询,orgType类型错误,组织Id:%s,类型Type:%s", formDTO.getOrgId(), formDTO.getOrgType()));
} }
@ -291,7 +291,7 @@ public class FactIndexServiceImpl implements FactIndexService {
//组织层级数据 //组织层级数据
if (FactConstant.AGENCY.equals(formDTO.getOrgType())) { if (FactConstant.AGENCY.equals(formDTO.getOrgType())) {
//2.根据组织Id查询组织信息 //2.根据组织Id查询组织信息
CompartmentResultDTO agency = screenCustomerAgencyDao.getAgencyAreaInfo(formDTO.getOrgId()); CompartmentResultDTO agency = screenCustomerAgencyDao.getAgencyInfoByAegncyId(formDTO.getOrgId());
if (null == agency) { if (null == agency) {
//throw new RenException(String.format("根据组织Id未查询到组织信息,组织Id:%s", formDTO.getOrgId())); //throw new RenException(String.format("根据组织Id未查询到组织信息,组织Id:%s", formDTO.getOrgId()));
return resultList; return resultList;
@ -359,7 +359,7 @@ public class FactIndexServiceImpl implements FactIndexService {
//组织层级数据 //组织层级数据
if (FactConstant.AGENCY.equals(formDTO.getOrgType())) { if (FactConstant.AGENCY.equals(formDTO.getOrgType())) {
//3.根据组织Id查询组织信息 //3.根据组织Id查询组织信息
CompartmentResultDTO agency = screenCustomerAgencyDao.getAgencyAreaInfo(formDTO.getOrgId()); CompartmentResultDTO agency = screenCustomerAgencyDao.getAgencyInfoByAegncyId(formDTO.getOrgId());
if (null == agency) { if (null == agency) {
//throw new RenException(String.format("查询组织信息失败,组织Id:%s", formDTO.getOrgId())); //throw new RenException(String.format("查询组织信息失败,组织Id:%s", formDTO.getOrgId()));
return resultList; return resultList;

9
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/ProjectService.java

@ -1,6 +1,7 @@
package com.epmet.module.project.service; package com.epmet.module.project.service;
import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.dto.form.ProcessListFormDTO;
import com.epmet.project.dto.form.ProjectIncrTrendFormDTO; import com.epmet.project.dto.form.ProjectIncrTrendFormDTO;
import com.epmet.project.dto.result.*; import com.epmet.project.dto.result.*;
@ -41,4 +42,12 @@ public interface ProjectService {
* @Description 数据-项目-/月数据查询 * @Description 数据-项目-/月数据查询
**/ **/
List<ProjectIncrTrendResultDTO> getProjectIncrTrend(TokenDto tokenDto, ProjectIncrTrendFormDTO formDTO); List<ProjectIncrTrendResultDTO> getProjectIncrTrend(TokenDto tokenDto, ProjectIncrTrendFormDTO formDTO);
/**
* @Description 项目详情
* @Param processListFormDTO
* @author zxc
* @date 2020/10/23 10:33 上午
*/
ProjectDetailResultDTO projectDetail( ProcessListFormDTO processListFormDTO);
} }

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

@ -3,11 +3,18 @@ package com.epmet.datareport.service.project.impl;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.datareport.dao.project.ProjectDao; import com.epmet.datareport.dao.project.ProjectDao;
import com.epmet.datareport.service.evaluationindex.screen.ScreenDifficultyDataService;
import com.epmet.dto.form.LoginUserDetailsFormDTO; import com.epmet.dto.form.LoginUserDetailsFormDTO;
import com.epmet.dto.form.ProcessListFormDTO;
import com.epmet.dto.result.LoginUserDetailsResultDTO; import com.epmet.dto.result.LoginUserDetailsResultDTO;
import com.epmet.dto.result.ProcessAndCurrentDeptResultDTO;
import com.epmet.evaluationindex.screen.dto.result.DepartmentNameListResultDTO;
import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.feign.GovProjectOpenFeignClient;
import com.epmet.module.project.service.ProjectService; import com.epmet.module.project.service.ProjectService;
import com.epmet.project.constant.ProjectConstant; import com.epmet.project.constant.ProjectConstant;
import com.epmet.project.dto.FactAgencyProjectDailyDTO; import com.epmet.project.dto.FactAgencyProjectDailyDTO;
@ -35,6 +42,10 @@ public class ProjectServiceImpl implements ProjectService {
private ProjectDao projectDao; private ProjectDao projectDao;
@Autowired @Autowired
private EpmetUserOpenFeignClient epmetUserOpenFeignClient; private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
@Autowired
private GovProjectOpenFeignClient govProjectOpenFeignClient;
@Autowired
private ScreenDifficultyDataService screenDifficultyDataService;
/** /**
* @Author sun * @Author sun
@ -168,6 +179,31 @@ public class ProjectServiceImpl implements ProjectService {
return resultList; return resultList;
} }
/**
* @Description 项目详情
* @Param processListFormDTO
* @author zxc
* @date 2020/10/23 10:33 上午
*/
@Override
public ProjectDetailResultDTO projectDetail(ProcessListFormDTO processListFormDTO) {
ProjectDetailResultDTO projectDetailResultDTO = screenDifficultyDataService.projectDetail(processListFormDTO);
if (null == projectDetailResultDTO) {
return new ProjectDetailResultDTO();
}
Result<ProcessAndCurrentDeptResultDTO> processList = govProjectOpenFeignClient.getProcessList(processListFormDTO);
if (!processList.success()) {
throw new RenException(ProjectConstant.PROCESS_FAILURE);
}
ProcessAndCurrentDeptResultDTO data = processList.getData();
List<ProjectProcessResultDTO> processResultDTOS = ConvertUtils.sourceToTarget(data.getProcessList(), ProjectProcessResultDTO.class);
projectDetailResultDTO.setProcessList(processResultDTOS);
List<DepartmentNameListResultDTO> departmentNameListResultDTOS = ConvertUtils.sourceToTarget(data.getDepartmentList(), DepartmentNameListResultDTO.class);
projectDetailResultDTO.setDepartmentList(departmentNameListResultDTOS);
projectDetailResultDTO.setDepartmentNameList(data.getDepartmentNameList());
return projectDetailResultDTO;
}
/** /**
* @author sun * @author sun
* @Description 获取机关ID * @Description 获取机关ID

20
epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencyScoreDao.xml

@ -3,10 +3,10 @@
<mapper namespace="com.epmet.datareport.dao.fact.FactIndexAgencyScoreDao"> <mapper namespace="com.epmet.datareport.dao.fact.FactIndexAgencyScoreDao">
<select id="selectAblityIndex" resultType="com.epmet.evaluationindex.screen.dto.result.AblityIndexResultDTO$ScoreListResultDTO"> <select id="selectAgencyAblityWeightScoreIndex" resultType="com.epmet.evaluationindex.screen.dto.result.AblityIndexResultDTO$ScoreListResultDTO">
SELECT SELECT
fact.month_id AS "monthId", fact.month_id AS "monthId",
ROUND(fact.score, 1) AS "indexTotal", ROUND(fact.score*fact.WEIGHT, 1) AS "indexTotal",
fact.index_code AS "indexCode" fact.index_code AS "indexCode"
FROM FROM
fact_index_agency_score fact fact_index_agency_score fact
@ -21,12 +21,12 @@
fact.month_id ASC fact.month_id ASC
</select> </select>
<select id="selectScoreList" resultType="com.epmet.evaluationindex.screen.dto.result.ScoreListResultDTO"> <select id="selectAgencyWeightScoreList" resultType="com.epmet.evaluationindex.screen.dto.result.ScoreListResultDTO">
SELECT SELECT
fact.index_code AS "indexCode", fact.index_code AS "indexCode",
ROUND(fact.score, 1) AS "indexTotal", ROUND(fact.score*fact.WEIGHT, 1) AS "indexTotal",
ROUND(self.self_score, 1) AS "agencyScore", ROUND(self.self_score*fact.WEIGHT, 1) AS "agencyScore",
ROUND(self.sub_score, 1) AS "subAgencyScore" ROUND(self.sub_score*fact.WEIGHT, 1) AS "subAgencyScore"
FROM FROM
fact_index_agency_score fact fact_index_agency_score fact
INNER JOIN fact_index_agency_self_sub_score self ON fact.agency_id = self.agency_id INNER JOIN fact_index_agency_self_sub_score self ON fact.agency_id = self.agency_id
@ -41,12 +41,12 @@
AND fact.month_id = #{monthId} AND fact.month_id = #{monthId}
</select> </select>
<select id="selectMonthScoreList" resultType="com.epmet.evaluationindex.screen.dto.result.MonthScoreListResultDTO$ScoreListResultDTO"> <select id="selectAgencyMonthWeightScoreList" resultType="com.epmet.evaluationindex.screen.dto.result.MonthScoreListResultDTO$ScoreListResultDTO">
SELECT SELECT
fact.month_id AS "monthId", fact.month_id AS "monthId",
ROUND(fact.score, 1) AS "indexTotal", ROUND(fact.score*fact.WEIGHT, 1) AS "indexTotal",
ROUND(self.self_score, 1) AS "agencyScore", ROUND(self.self_score*fact.WEIGHT, 1) AS "agencyScore",
ROUND(self.sub_score, 1) AS "subAgencyScore", ROUND(self.sub_score*fact.WEIGHT, 1) AS "subAgencyScore",
fact.index_code AS "indexCode" fact.index_code AS "indexCode"
FROM FROM
fact_index_agency_score fact fact_index_agency_score fact

3
epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencySubScoreDao.xml

@ -7,7 +7,8 @@
SELECT SELECT
fact.index_code AS "key", fact.index_code AS "key",
IF(fact.origin_value='',0,IFNULL(fact.origin_value,0)) AS "value", IF(fact.origin_value='',0,IFNULL(fact.origin_value,0)) AS "value",
dict.index_name AS "name" dict.index_name AS "name",
round(fact.WEIGHT,2) AS weight
FROM FROM
fact_index_agency_sub_score fact fact_index_agency_sub_score fact
LEFT JOIN index_dict dict ON fact.index_code = dict.index_code LEFT JOIN index_dict dict ON fact.index_code = dict.index_code

20
epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunityScoreDao.xml

@ -3,10 +3,10 @@
<mapper namespace="com.epmet.datareport.dao.fact.FactIndexCommunityScoreDao"> <mapper namespace="com.epmet.datareport.dao.fact.FactIndexCommunityScoreDao">
<select id="selectCommunityAblityIndex" resultType="com.epmet.evaluationindex.screen.dto.result.AblityIndexResultDTO$ScoreListResultDTO"> <select id="selectCommunityAblityWeightScore" resultType="com.epmet.evaluationindex.screen.dto.result.AblityIndexResultDTO$ScoreListResultDTO">
SELECT SELECT
fact.month_id AS "monthId", fact.month_id AS "monthId",
ROUND(fact.score, 1) AS "indexTotal", ROUND(fact.score*fact.WEIGHT, 1) AS "indexTotal",
fact.index_code AS "indexCode" fact.index_code AS "indexCode"
FROM FROM
fact_index_community_score fact fact_index_community_score fact
@ -21,12 +21,12 @@
fact.month_id ASC fact.month_id ASC
</select> </select>
<select id="selectCommunityScoreList" resultType="com.epmet.evaluationindex.screen.dto.result.ScoreListResultDTO"> <select id="selectCommunityWeightScoreList" resultType="com.epmet.evaluationindex.screen.dto.result.ScoreListResultDTO">
SELECT SELECT
fact.index_code AS "indexCode", fact.index_code AS "indexCode",
ROUND(fact.score, 1) AS "indexTotal", ROUND(fact.score*fact.WEIGHT, 1) AS "indexTotal",
ROUND(self.self_score, 1) AS "agencyScore", ROUND(self.self_score*fact.WEIGHT, 1) AS "agencyScore",
ROUND(self.sub_score, 1) AS "subAgencyScore" ROUND(self.sub_score*fact.WEIGHT, 1) AS "subAgencyScore"
FROM FROM
fact_index_community_score fact fact_index_community_score fact
INNER JOIN fact_index_community_self_sub_score self ON fact.agency_id = self.agency_id INNER JOIN fact_index_community_self_sub_score self ON fact.agency_id = self.agency_id
@ -41,12 +41,12 @@
AND fact.month_id = #{monthId} AND fact.month_id = #{monthId}
</select> </select>
<select id="selectCommunityMonthScoreList" resultType="com.epmet.evaluationindex.screen.dto.result.MonthScoreListResultDTO$ScoreListResultDTO"> <select id="selectCommunityMonthWeightScoreList" resultType="com.epmet.evaluationindex.screen.dto.result.MonthScoreListResultDTO$ScoreListResultDTO">
SELECT SELECT
fact.month_id AS "monthId", fact.month_id AS "monthId",
ROUND(fact.score, 1) AS "indexTotal", ROUND(fact.score*fact.WEIGHT, 1) AS "indexTotal",
ROUND(self.self_score, 1) AS "agencyScore", ROUND(self.self_score*fact.WEIGHT, 1) AS "agencyScore",
ROUND(self.sub_score, 1) AS "subAgencyScore", ROUND(self.sub_score*fact.WEIGHT, 1) AS "subAgencyScore",
fact.index_code AS "indexCode" fact.index_code AS "indexCode"
FROM FROM
fact_index_community_score fact fact_index_community_score fact

3
epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunitySubScoreDao.xml

@ -7,7 +7,8 @@
SELECT SELECT
fact.index_code AS "key", fact.index_code AS "key",
IF(fact.origin_value='',0,IFNULL(fact.origin_value,0)) AS "value", IF(fact.origin_value='',0,IFNULL(fact.origin_value,0)) AS "value",
dict.index_name AS "name" dict.index_name AS "name",
round(fact.WEIGHT,2) AS weight
FROM FROM
fact_index_community_sub_score fact fact_index_community_sub_score fact
LEFT JOIN index_dict dict ON fact.index_code = dict.index_code LEFT JOIN index_dict dict ON fact.index_code = dict.index_code

20
epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridScoreDao.xml

@ -3,10 +3,10 @@
<mapper namespace="com.epmet.datareport.dao.fact.FactIndexGridScoreDao"> <mapper namespace="com.epmet.datareport.dao.fact.FactIndexGridScoreDao">
<select id="selectGridAblityIndex" resultType="com.epmet.evaluationindex.screen.dto.result.AblityIndexResultDTO$ScoreListResultDTO"> <select id="selectGridAblityWeightScore" resultType="com.epmet.evaluationindex.screen.dto.result.AblityIndexResultDTO$ScoreListResultDTO">
SELECT SELECT
fact.month_id AS "monthId", fact.month_id AS "monthId",
ROUND(fact.score, 1) AS "indexTotal", ROUND(fact.score*fact.WEIGHT, 1) AS "indexTotal",
fact.index_code AS "indexCode" fact.index_code AS "indexCode"
FROM FROM
fact_index_grid_score fact fact_index_grid_score fact
@ -21,12 +21,12 @@
fact.month_id ASC fact.month_id ASC
</select> </select>
<select id="selectGridScoreList" resultType="com.epmet.evaluationindex.screen.dto.result.ScoreListResultDTO"> <select id="selectGridWeightScoreList" resultType="com.epmet.evaluationindex.screen.dto.result.ScoreListResultDTO">
SELECT SELECT
fact.index_code AS "indexCode", fact.index_code AS "indexCode",
ROUND(fact.score, 1) AS "indexTotal", ROUND(fact.score*fact.WEIGHT, 1) AS "indexTotal",
ROUND(self.self_score, 1) AS "agencyScore", ROUND(self.self_score*fact.WEIGHT, 1) AS "agencyScore",
ROUND(self.sub_score, 1) AS "subAgencyScore" ROUND(self.sub_score*fact.WEIGHT, 1) AS "subAgencyScore"
FROM FROM
fact_index_grid_score fact fact_index_grid_score fact
INNER JOIN fact_index_grid_self_sub_score self ON fact.grid_id = self.grid_id INNER JOIN fact_index_grid_self_sub_score self ON fact.grid_id = self.grid_id
@ -42,12 +42,12 @@
AND fact.month_id = #{monthId} AND fact.month_id = #{monthId}
</select> </select>
<select id="selectGridMonthScoreList" resultType="com.epmet.evaluationindex.screen.dto.result.MonthScoreListResultDTO$ScoreListResultDTO"> <select id="selectGridMonthWeightScoreList" resultType="com.epmet.evaluationindex.screen.dto.result.MonthScoreListResultDTO$ScoreListResultDTO">
SELECT SELECT
fact.month_id AS "monthId", fact.month_id AS "monthId",
ROUND(fact.score, 1) AS "indexTotal", ROUND(fact.score*fact.WEIGHT, 1) AS "indexTotal",
ROUND(self.self_score, 1) AS "agencyScore", ROUND(self.self_score*fact.WEIGHT, 1) AS "agencyScore",
ROUND(self.sub_score, 1) AS "subAgencyScore", ROUND(self.sub_score*fact.WEIGHT, 1) AS "subAgencyScore",
fact.index_code AS "indexCode" fact.index_code AS "indexCode"
FROM FROM
fact_index_grid_score fact fact_index_grid_score fact

3
epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridSubScoreDao.xml

@ -7,7 +7,8 @@
SELECT SELECT
fact.index_code AS "key", fact.index_code AS "key",
IF(fact.origin_value='',0,IFNULL(fact.origin_value,0)) AS "value", IF(fact.origin_value='',0,IFNULL(fact.origin_value,0)) AS "value",
dict.index_name AS "name" dict.index_name AS "name",
round(fact.WEIGHT,2) AS weight
FROM FROM
fact_index_grid_sub_score fact fact_index_grid_sub_score fact
LEFT JOIN index_dict dict ON fact.index_code = dict.index_code LEFT JOIN index_dict dict ON fact.index_code = dict.index_code

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

@ -49,6 +49,7 @@
screen_customer_agency screen_customer_agency
WHERE WHERE
del_flag = 0 del_flag = 0
and is_display = 1
AND agency_id = #{agencyId} AND agency_id = #{agencyId}
</select> </select>
@ -64,6 +65,7 @@
screen_customer_agency screen_customer_agency
WHERE WHERE
del_flag = 0 del_flag = 0
AND is_display = 1
AND pid = #{agencyId} AND pid = #{agencyId}
</select> </select>
@ -78,7 +80,7 @@
sutd.org_type AS type sutd.org_type AS type
FROM FROM
screen_user_total_data sutd screen_user_total_data sutd
LEFT JOIN screen_customer_agency sca ON sca.agency_id = sutd.org_id LEFT JOIN screen_customer_agency sca ON sca.agency_id = sutd.org_id AND sca.is_display = 1
WHERE WHERE
sutd.del_flag = '0' sutd.del_flag = '0'
AND sca.del_flag = 0 AND sca.del_flag = 0
@ -96,7 +98,7 @@
sutd.org_type AS type sutd.org_type AS type
FROM FROM
screen_user_total_data sutd screen_user_total_data sutd
LEFT JOIN screen_customer_agency sca ON sca.agency_id = sutd.org_id LEFT JOIN screen_customer_agency sca ON sca.agency_id = sutd.org_id AND sca.is_display = 1
WHERE WHERE
sutd.del_flag = '0' sutd.del_flag = '0'
AND sca.del_flag = 0 AND sca.del_flag = 0
@ -151,4 +153,48 @@
ca.created_time DESC ca.created_time DESC
</select> </select>
<select id="getAgencyAreaInfoByBizType" resultType="com.epmet.evaluationindex.screen.dto.result.CompartmentResultDTO">
SELECT
bo.ORG_ID AS agencyId,
sca.agency_name AS name,
IFNULL(sca.area_marks,'') AS areaMarks,
sca.level AS level
FROM
screen_customer_agency sca
LEFT JOIN screen_customer_biz_org bo ON bo.ORG_ID = sca.AGENCY_ID
WHERE
sca.del_flag = 0
AND bo.DEL_FLAG = 0
AND bo.ORG_ID = #{agencyId}
AND bo.BIZ_TYPE = #{bizType}
</select>
<select id="selectSubDistributionByType" resultType="com.epmet.evaluationindex.screen.dto.result.AgencyDistributionResultDTO">
SELECT
ORG_ID AS subId,
sca.agency_name AS subName,
IFNULL(sca.area_marks,'') AS subAreaMarks,
IFNULL(sca.center_mark,'') AS subCenterMark,
'agency' AS type
FROM
screen_customer_agency sca
LEFT JOIN screen_customer_biz_org cbo ON cbo.ORG_ID = sca.AGENCY_ID
WHERE
sca.del_flag = 0
AND cbo.DEL_FLAG = 0
AND cbo.BIZ_TYPE = #{bizType}
AND sca.pid = #{agencyId}
</select>
<select id="getAgencyInfoByAegncyId" resultType="com.epmet.evaluationindex.screen.dto.result.CompartmentResultDTO">
SELECT
agency_id AS agencyId,
agency_name AS name,
level AS level
FROM
screen_customer_agency
WHERE
del_flag = 0
AND agency_id = #{agencyId}
</select>
</mapper> </mapper>

14
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml

@ -21,14 +21,16 @@
<!-- 查询党支部信息 --> <!-- 查询党支部信息 -->
<select id="selectBranch" resultType="com.epmet.evaluationindex.screen.dto.result.BranchResultDTO"> <select id="selectBranch" resultType="com.epmet.evaluationindex.screen.dto.result.BranchResultDTO">
SELECT SELECT
grid_id AS gridId, scg.grid_id AS gridId,
grid_name AS gridName, scg.grid_name AS gridName,
party_mark AS partyMark scg.party_mark AS partyMark
FROM FROM
screen_customer_grid screen_customer_grid scg
LEFT JOIN screen_customer_biz_org bo ON bo.ORG_ID = scg.PARENT_AGENCY_ID
WHERE WHERE
del_flag = 0 scg.del_flag = 0
AND all_parent_ids LIKE concat('%', #{agencyId}, '%') AND bo.BIZ_TYPE = 'community'
AND scg.all_parent_ids LIKE concat('%', #{agencyId}, '%')
</select> </select>
<!-- 查询子级用户分布【网格级别】 --> <!-- 查询子级用户分布【网格级别】 -->

25
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml

@ -30,4 +30,29 @@
DESC DESC
</select> </select>
<resultMap id="projectDetail" type="com.epmet.project.dto.result.ProjectDetailResultDTO">
<result property="eventContent" column="eventContent"/>
<result property="eventTitle" column="eventTitle"/>
<result property="eventSource" column="eventSource"/>
<collection property="imgUrlList" ofType="java.lang.String">
<result column="imgUrl"/>
<result column="id"/>
</collection>
</resultMap>
<!-- 项目详情 -->
<select id="projectDetail" resultMap="projectDetail">
SELECT
dd.event_title AS eventTitle,
dd.EVENT_CONTENT AS eventContent,
dd.EVENT_SOURCE AS eventSource,
did.EVENT_IMG_URL AS imgUrl,
did.id as id
FROM
screen_difficulty_data dd
LEFT JOIN screen_difficulty_img_data did ON did.EVENT_ID = dd.EVENT_ID
WHERE
dd.DEL_FLAG = '0'
AND dd.EVENT_ID = #{eventId}
</select>
</mapper> </mapper>

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

@ -68,4 +68,9 @@ public class CustomerAgencyFormDTO implements Serializable {
* 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增)
*/ */
private String dataEndTime; private String dataEndTime;
/**
* 是否显示
*/
private String isDisplay;
} }

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

@ -48,6 +48,11 @@ public class DifficultyDataDetailFormDTO implements Serializable {
*/ */
private String eventSource; private String eventSource;
/**
* 事件标题
*/
private String eventTitle;
/** /**
* 事件内容 * 事件内容
*/ */

6
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java

@ -197,7 +197,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
List<IndexGroupDetailEntity> detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); List<IndexGroupDetailEntity> detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode());
if (CollectionUtils.isEmpty(detailListByParentCode)) { if (CollectionUtils.isEmpty(detailListByParentCode)) {
log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL);
return false; return true;
} }
List<IndexInputVO> indexInputVOS = new ArrayList<>(); List<IndexInputVO> indexInputVOS = new ArrayList<>();
Map<String, String> pid = new HashMap<>(); Map<String, String> pid = new HashMap<>();
@ -272,7 +272,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
List<IndexGroupDetailEntity> detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); List<IndexGroupDetailEntity> detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode());
if (CollectionUtils.isEmpty(detailListByParentCode)) { if (CollectionUtils.isEmpty(detailListByParentCode)) {
log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL);
return false; return true;
} }
List<IndexInputVO> indexInputVOS = new ArrayList<>(); List<IndexInputVO> indexInputVOS = new ArrayList<>();
Map<String, String> pid = new HashMap<>(); Map<String, String> pid = new HashMap<>();
@ -344,7 +344,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
List<IndexGroupDetailEntity> detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); List<IndexGroupDetailEntity> detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode());
if (CollectionUtils.isEmpty(detailListByParentCode)) { if (CollectionUtils.isEmpty(detailListByParentCode)) {
log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL);
return false; return true;
} }
List<IndexInputVO> indexInputVOS = new ArrayList<>(); List<IndexInputVO> indexInputVOS = new ArrayList<>();
Map<String, String> pid = new HashMap<>(); Map<String, String> pid = new HashMap<>();

6
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java

@ -194,7 +194,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
List<IndexGroupDetailEntity> indexDetailList = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); List<IndexGroupDetailEntity> indexDetailList = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode());
if (CollectionUtils.isEmpty(indexDetailList)) { if (CollectionUtils.isEmpty(indexDetailList)) {
log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL);
return false; return true;
} }
List<IndexInputVO> indexInputVOS = new ArrayList<>(); List<IndexInputVO> indexInputVOS = new ArrayList<>();
Map<String, String> pid = new HashMap<>(); Map<String, String> pid = new HashMap<>();
@ -271,7 +271,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
List<IndexGroupDetailEntity> detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); List<IndexGroupDetailEntity> detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode());
if (CollectionUtils.isEmpty(detailListByParentCode)) { if (CollectionUtils.isEmpty(detailListByParentCode)) {
log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL);
return false; return true;
} }
List<IndexInputVO> indexInputVOS = new ArrayList<>(); List<IndexInputVO> indexInputVOS = new ArrayList<>();
Map<String, String> pid = new HashMap<>(); Map<String, String> pid = new HashMap<>();
@ -350,7 +350,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
List<IndexGroupDetailEntity> detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); List<IndexGroupDetailEntity> detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode());
if (CollectionUtils.isEmpty(detailListByParentCode)) { if (CollectionUtils.isEmpty(detailListByParentCode)) {
log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL);
return false; return true;
} }
List<IndexInputVO> indexInputVOS = new ArrayList<>(); List<IndexInputVO> indexInputVOS = new ArrayList<>();
Map<String, String> pid = new HashMap<>(); Map<String, String> pid = new HashMap<>();

6
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java

@ -198,7 +198,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
List<IndexGroupDetailEntity> detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); List<IndexGroupDetailEntity> detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode());
if (CollectionUtils.isEmpty(detailListByParentCode)) { if (CollectionUtils.isEmpty(detailListByParentCode)) {
log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL);
return false; return true;
} }
List<IndexInputVO> indexInputVOS = new ArrayList<>(); List<IndexInputVO> indexInputVOS = new ArrayList<>();
Map<String, String> pid = new HashMap<>(); Map<String, String> pid = new HashMap<>();
@ -273,7 +273,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
List<IndexGroupDetailEntity> detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); List<IndexGroupDetailEntity> detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode());
if (CollectionUtils.isEmpty(detailListByParentCode)) { if (CollectionUtils.isEmpty(detailListByParentCode)) {
log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL);
return false; return true;
} }
List<IndexInputVO> indexInputVOS = new ArrayList<>(); List<IndexInputVO> indexInputVOS = new ArrayList<>();
Map<String, String> pid = new HashMap<>(); Map<String, String> pid = new HashMap<>();
@ -345,7 +345,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
List<IndexGroupDetailEntity> detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); List<IndexGroupDetailEntity> detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode());
if (CollectionUtils.isEmpty(detailListByParentCode)) { if (CollectionUtils.isEmpty(detailListByParentCode)) {
log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL);
return false; return true;
} }
List<IndexInputVO> indexInputVOS = new ArrayList<>(); List<IndexInputVO> indexInputVOS = new ArrayList<>();
Map<String, String> pid = new HashMap<>(); Map<String, String> pid = new HashMap<>();

12
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java

@ -66,6 +66,13 @@ public class BatchScoreCalculator {
BigDecimal minScoreValue = idx.getScoreCalculator().getMinScore(); BigDecimal minScoreValue = idx.getScoreCalculator().getMinScore();
BigDecimal maxScoreValue = idx.getScoreCalculator().getMaxScore(); BigDecimal maxScoreValue = idx.getScoreCalculator().getMaxScore();
//1.如果是分数值(平均值)不需要归一 则 直接value*权重
//2.否则 先判断 样本值是否相等 是:反正切函数 否:归一算法
if (idx.isScore()) {
vo.setSampleValue(new BigDecimal(vo.getSampleValue().toString()).compareTo(NumConstant.ZERO_DECIMAL) == NumConstant.ZERO ? ScoreConstants.MIN_SCORE : new BigDecimal(vo.getSampleValue().toString()));
normalizeValue = getFinalSampleValue(vo.getSampleValue(), threshold);
} else {
if (idx.getScoreCalculator().getMaxValue().compareTo(idx.getScoreCalculator().getMinValue()) == 0) { if (idx.getScoreCalculator().getMaxValue().compareTo(idx.getScoreCalculator().getMinValue()) == 0) {
//*((max-min)/ (Math.PI/2))+min //*((max-min)/ (Math.PI/2))+min
//Math.atan(new Double(vo.getSampleValue().toString()))* //Math.atan(new Double(vo.getSampleValue().toString()))*
@ -77,11 +84,6 @@ public class BatchScoreCalculator {
if (scoreCalculator.getCorrelation().getCode().equals(Correlation.NEGATIVE)) { if (scoreCalculator.getCorrelation().getCode().equals(Correlation.NEGATIVE)) {
normalizeValue = maxScoreValue.subtract(normalizeValue); normalizeValue = maxScoreValue.subtract(normalizeValue);
} }
} else {
//如果不需要归一 则 直接value*权重
if (idx.isScore()) {
vo.setSampleValue(new BigDecimal(vo.getSampleValue().toString()).compareTo(NumConstant.ZERO_DECIMAL) == NumConstant.ZERO ? ScoreConstants.MIN_SCORE : new BigDecimal(vo.getSampleValue().toString()));
normalizeValue = getFinalSampleValue(vo.getSampleValue(), threshold);
} else { } else {
normalizeValue = scoreCalculator.normalize(getFinalSampleValue(vo.getSampleValue(), threshold)); normalizeValue = scoreCalculator.normalize(getFinalSampleValue(vo.getSampleValue(), threshold));
} }

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

@ -24,6 +24,7 @@
PARTY_MARK, PARTY_MARK,
`LEVEL`, `LEVEL`,
AREA_CODE, AREA_CODE,
IS_DISPLAY,
DEL_FLAG, DEL_FLAG,
REVISION, REVISION,
CREATED_BY, CREATED_BY,
@ -46,6 +47,7 @@
#{item.partyMark}, #{item.partyMark},
#{item.level}, #{item.level},
#{item.areaCode}, #{item.areaCode},
ifnull(#{item.isDisplay},'1'),
0, 0,
0, 0,
'APP_USER', 'APP_USER',

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

@ -18,6 +18,7 @@
PARENT_ID, PARENT_ID,
ORG_NAME, ORG_NAME,
EVENT_ID, EVENT_ID,
EVENT_TITLE,
EVENT_IMG_URL, EVENT_IMG_URL,
EVENT_SOURCE, EVENT_SOURCE,
EVENT_CONTENT, EVENT_CONTENT,
@ -47,6 +48,7 @@
#{item.parentId}, #{item.parentId},
#{item.orgName}, #{item.orgName},
#{item.eventId}, #{item.eventId},
#{item.eventTitle},
#{item.eventImgUrl}, #{item.eventImgUrl},
#{item.eventSource}, #{item.eventSource},
#{item.eventContent}, #{item.eventContent},

4
epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java

@ -21,8 +21,8 @@ import java.util.List;
* @author yinzuomei@elink-cn.com * @author yinzuomei@elink-cn.com
* @date 2020/6/4 10:28 * @date 2020/6/4 10:28
*/ */
//@FeignClient(name = ServiceConstant.EPMET_COMMON_SERVICE, fallback = EpmetCommonServiceOpenFeignClientFallback.class) @FeignClient(name = ServiceConstant.EPMET_COMMON_SERVICE, fallback = EpmetCommonServiceOpenFeignClientFallback.class)
@FeignClient(name = ServiceConstant.EPMET_COMMON_SERVICE, fallback = EpmetCommonServiceOpenFeignClientFallback.class, url = "localhost:8103") //@FeignClient(name = ServiceConstant.EPMET_COMMON_SERVICE, fallback = EpmetCommonServiceOpenFeignClientFallback.class, url = "localhost:8103")
public interface EpmetCommonServiceOpenFeignClient { public interface EpmetCommonServiceOpenFeignClient {
/** /**
* @param formDTO * @param formDTO

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

@ -90,4 +90,8 @@ public class ExtAppJwtTokenUtils {
return createToken(claim, secret); return createToken(claim, secret);
} }
public static void main(String[] args) {
genTestToken();
}
} }

48
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessAndCurrentDeptResultDTO.java

@ -0,0 +1,48 @@
package com.epmet.dto.result;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* @Author zxc
* @DateTime 2020/10/26 9:36 上午
*/
@Data
public class ProcessAndCurrentDeptResultDTO implements Serializable {
private static final long serialVersionUID = 2977695657920536933L;
private List<ProcesslistResultDTO> processList;
/**
* 当前跟进部门
*/
private List<String> departmentNameList;
/**
* 当前跟进部门
*/
private List<ProjectDetailResultDTO.DepartmentNameListBean> departmentList;
@NoArgsConstructor
@Data
public static class DepartmentNameListBean {
/**
* 部门名
*/
private String departmentName;
/**
* 工作人员
*/
private List<String> staffList;
}
public ProcessAndCurrentDeptResultDTO() {
this.processList = new ArrayList<>();
this.departmentNameList = new ArrayList<>();
this.departmentList = new ArrayList<>();
}
}

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

@ -1,8 +1,11 @@
package com.epmet.feign; package com.epmet.feign;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.ProcessListFormDTO;
import com.epmet.dto.form.ProjectListFromDTO; import com.epmet.dto.form.ProjectListFromDTO;
import com.epmet.dto.result.PendProjectListResultDTO; import com.epmet.dto.result.PendProjectListResultDTO;
import com.epmet.dto.result.ProcessAndCurrentDeptResultDTO;
import com.epmet.dto.result.ProcesslistResultDTO;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.constant.ServiceConstant;
@ -29,4 +32,7 @@ public interface GovProjectOpenFeignClient {
*/ */
@PostMapping("gov/project/project/pendprojectlist") @PostMapping("gov/project/project/pendprojectlist")
Result<List<PendProjectListResultDTO>> getPendProjectList(@RequestBody ProjectListFromDTO fromDTO); Result<List<PendProjectListResultDTO>> getPendProjectList(@RequestBody ProjectListFromDTO fromDTO);
@PostMapping("gov/project/trace/processlistnotrule")
Result<ProcessAndCurrentDeptResultDTO> getProcessList(@RequestBody ProcessListFormDTO fromDTO);
} }

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

@ -3,8 +3,11 @@ package com.epmet.feign.fallback;
import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.ProcessListFormDTO;
import com.epmet.dto.form.ProjectListFromDTO; import com.epmet.dto.form.ProjectListFromDTO;
import com.epmet.dto.result.PendProjectListResultDTO; import com.epmet.dto.result.PendProjectListResultDTO;
import com.epmet.dto.result.ProcessAndCurrentDeptResultDTO;
import com.epmet.dto.result.ProcesslistResultDTO;
import com.epmet.feign.GovProjectOpenFeignClient; import com.epmet.feign.GovProjectOpenFeignClient;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@ -22,4 +25,9 @@ public class GovProjectOpenFeignClientFallback implements GovProjectOpenFeignCli
public Result<List<PendProjectListResultDTO>> getPendProjectList(ProjectListFromDTO fromDTO) { public Result<List<PendProjectListResultDTO>> getPendProjectList(ProjectListFromDTO fromDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "getPendProjectList", fromDTO); return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "getPendProjectList", fromDTO);
} }
@Override
public Result<ProcessAndCurrentDeptResultDTO> getProcessList(ProcessListFormDTO fromDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "getProcessList", fromDTO);
}
} }

12
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTraceController.java

@ -179,6 +179,18 @@ public class ProjectTraceController {
return new Result<List<ProcesslistResultDTO>>().ok(projectProcessService.progressList(formDTO)); return new Result<List<ProcesslistResultDTO>>().ok(projectProcessService.progressList(formDTO));
} }
/**
* @param formDTO
* @return
* @Author zxc
* @Description 项目跟踪-项目处理进展列表
**/
@PostMapping("processlistnotrule")
public Result<ProcessAndCurrentDeptResultDTO> processListNotRule(@RequestBody ProcessListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return new Result<ProcessAndCurrentDeptResultDTO>().ok(projectProcessService.progressAndCurrentDept(formDTO));
}
/** /**
* @param formDTO * @param formDTO
* @return * @return

9
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectProcessService.java

@ -24,7 +24,6 @@ import com.epmet.dto.ProjectProcessDTO;
import com.epmet.dto.form.*; import com.epmet.dto.form.*;
import com.epmet.dto.result.*; import com.epmet.dto.result.*;
import com.epmet.entity.ProjectProcessEntity; import com.epmet.entity.ProjectProcessEntity;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -136,4 +135,12 @@ public interface ProjectProcessService extends BaseService<ProjectProcessEntity>
*/ */
ProjectDetailCheckResultDTO checkProjectClose(ProjectIdFormDTO projectIdFormDTO); ProjectDetailCheckResultDTO checkProjectClose(ProjectIdFormDTO projectIdFormDTO);
/**
* @Description 查询项目进展和当前处理部门
* @Param formDTO
* @author zxc
* @date 2020/10/26 9:41 上午
*/
ProcessAndCurrentDeptResultDTO progressAndCurrentDept(ProcessListFormDTO formDTO);
} }

67
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java

@ -35,15 +35,19 @@ import com.epmet.commons.tools.utils.ScanContentUtils;
import com.epmet.constant.ProjectConstant; import com.epmet.constant.ProjectConstant;
import com.epmet.constant.ReadFlagConstant; import com.epmet.constant.ReadFlagConstant;
import com.epmet.constant.UserMessageConstant; import com.epmet.constant.UserMessageConstant;
import com.epmet.dao.ProjectDao;
import com.epmet.dao.ProjectProcessDao; import com.epmet.dao.ProjectProcessDao;
import com.epmet.dao.ProjectStaffDao; import com.epmet.dao.ProjectStaffDao;
import com.epmet.dto.ProjectDTO;
import com.epmet.dto.ProjectProcessDTO; import com.epmet.dto.ProjectProcessDTO;
import com.epmet.dto.ProjectStaffDTO;
import com.epmet.dto.form.*; import com.epmet.dto.form.*;
import com.epmet.dto.result.*; import com.epmet.dto.result.*;
import com.epmet.entity.ProjectEntity; import com.epmet.entity.ProjectEntity;
import com.epmet.entity.ProjectProcessEntity; import com.epmet.entity.ProjectProcessEntity;
import com.epmet.entity.ProjectStaffEntity; import com.epmet.entity.ProjectStaffEntity;
import com.epmet.feign.EpmetUserFeignClient; import com.epmet.feign.EpmetUserFeignClient;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.feign.GovOrgFeignClient; import com.epmet.feign.GovOrgFeignClient;
import com.epmet.redis.ProjectProcessRedis; import com.epmet.redis.ProjectProcessRedis;
import com.epmet.service.ProjectProcessService; import com.epmet.service.ProjectProcessService;
@ -87,6 +91,10 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl<ProjectProcessDao
private String scanApiUrl; private String scanApiUrl;
@Value("${openapi.scan.method.textSyncScan}") @Value("${openapi.scan.method.textSyncScan}")
private String textSyncScanMethod; private String textSyncScanMethod;
@Autowired
private ProjectDao projectDao;
@Autowired
private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
@Override @Override
public PageData<ProjectProcessDTO> page(Map<String, Object> params) { public PageData<ProjectProcessDTO> page(Map<String, Object> params) {
@ -340,4 +348,63 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl<ProjectProcessDao
return resultDTO; return resultDTO;
} }
/**
* @Description 查询项目进展和当前处理部门
* @Param formDTO
* @author zxc
* @date 2020/10/26 9:41 上午
*/
@Override
public ProcessAndCurrentDeptResultDTO progressAndCurrentDept(ProcessListFormDTO formDTO) {
ProcessAndCurrentDeptResultDTO result = new ProcessAndCurrentDeptResultDTO();
result.setProcessList(progressList(formDTO));
//获取当前跟进部门
List<String> departments = new ArrayList<>();
List<ProjectStaffDTO> departmentNameList = new ArrayList<>();
List<ProjectDetailResultDTO.DepartmentNameListBean> departmentList = new ArrayList<>();
ProjectDetailResultDTO projectDetailResultDTO = projectDao.selectProjectDetail(formDTO.getProjectId());
if (null == projectDetailResultDTO){
result.setDepartmentList(departmentList);
result.setDepartmentNameList(departments);
return result;
}
if (ProjectConstant.CLOSED.equals(projectDetailResultDTO.getProjectStatus())) {
//项目已结案,跟进部门为空
result.setDepartmentList(departmentList);
result.setDepartmentNameList(departments);
} else {
//项目未结案,找出所有跟进部门
ProjectDTO projectDTO = new ProjectDTO();
projectDTO.setId(formDTO.getProjectId());
departmentNameList = projectDao.selectCurrentDepartmentList(projectDTO);
//提取工作人员ID
List<String> staffIdList = departmentNameList.stream().map(ProjectStaffDTO::getStaffId).collect(Collectors.toList());
staffIdList = staffIdList.stream().distinct().collect(Collectors.toList());
//根据部门分组
Map<String, List<ProjectStaffDTO>> departmentMap =
departmentNameList.stream().collect(Collectors.groupingBy(ProjectStaffDTO::getDepartmentName));
//获取工作人员信息(姓名)
UserIdsFormDTO userIdsFormDTO = new UserIdsFormDTO();
userIdsFormDTO.setUserIds(staffIdList);
Result<List<StaffSinGridResultDTO>> staffListResult = epmetUserOpenFeignClient.getStaffInfoList(userIdsFormDTO);
if (!staffListResult.success()) {
throw new RenException(staffListResult.getCode(), staffListResult.getMsg());
}
List<StaffSinGridResultDTO> staffList = staffListResult.getData();
for (String departmentName : departmentMap.keySet()) {
ProjectDetailResultDTO.DepartmentNameListBean bean = new ProjectDetailResultDTO.DepartmentNameListBean();
bean.setDepartmentName(departmentName);
List<ProjectStaffDTO> staffDTOList = departmentMap.get(departmentName);
List<String> staffNameList =
staffDTOList.stream().flatMap(staffDto -> staffList.stream().filter(staffInfo ->
staffDto.getStaffId().equals(staffInfo.getStaffId())).map((StaffSinGridResultDTO::getStaffName))).collect(Collectors.toList());
bean.setStaffList(staffNameList);
departmentList.add(bean);
departments.add(departmentName);
}
result.setDepartmentList(departmentList);
result.setDepartmentNameList(departments);
}
return result;
}
} }
Loading…
Cancel
Save