Browse Source

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

dev_shibei_match
yinzuomei 5 years ago
parent
commit
16ad57a0ac
  1. 4
      epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java
  2. 18
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ScreenProjectDistributionFormDTO.java
  3. 55
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java
  4. 49
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java
  5. 5
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectDataDao.java
  6. 2
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectOrgDailyServiceImpl.java
  7. 5
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectServiceImpl.java
  8. 7
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml
  9. 1
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java

4
epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java

@ -154,10 +154,10 @@ public class SsoServiceImpl implements SsoService {
form.setMobile(thirdUser.getMobile());
Result<GovWebOperLoginResultDTO> result = epmetUserFeignClient.getStaffIdAndPwd(form);
//todo userId 写死测试 3f7f852ce22c511aa67ecb695395295d start
GovWebOperLoginResultDTO demo = new GovWebOperLoginResultDTO();
/* GovWebOperLoginResultDTO demo = new GovWebOperLoginResultDTO();
demo.setUserId("3f7f852ce22c511aa67ecb695395295d");
result = new Result<>();
result.ok(demo);
result.ok(demo);*/
//test end
if (!result.success() || null == result.getData() || null == result.getData().getUserId()) {

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

@ -2,6 +2,7 @@ package com.epmet.evaluationindex.screen.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
@ -13,9 +14,26 @@ import java.io.Serializable;
public class ScreenProjectDistributionFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 目前只有平阴在传默认赋值370124
*/
private String areaCode;
/**
* 如果为空返回全部可选值1:红色事件2黄色事件3绿色事件
*/
private String level;
/**
* 当前组织id
*/
@NotBlank(message = "agencyId不能为空")
private String agencyId;
/**
* 不必填默认查询的是处理中可选值all: 全部pending处理中 已结案closed_case 已关闭closed
* 默认查询pending
*/
private String status;
}

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

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

49
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java

@ -18,7 +18,6 @@ import com.epmet.evaluationindex.screen.dto.form.ScreenProjectDetailFormDTO;
import com.epmet.evaluationindex.screen.dto.form.ScreenProjectDistributionFormDTO;
import com.epmet.evaluationindex.screen.dto.result.ProjectDetailResultDTO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -62,37 +61,26 @@ public class ScreenProjectController {
*/
@PostMapping("projectdistribution")
public Result projectDistribution(@RequestBody ScreenProjectDistributionFormDTO formDTO){
if (StringUtils.isBlank(formDTO.getAreaCode()) && StringUtils.isBlank(formDTO.getAgencyId())){
formDTO.setAreaCode("370124");
}
ValidatorUtils.validateEntity(formDTO);
return screenProjectService.projectDistribution(formDTO);
}
@PostMapping("projectdetailv2")
public Result projectDetail(@RequestBody ScreenProjectDetailFormDTO formDTO){
return screenProjectService.projectDistributionDetail(formDTO);
}
/**
* 事件分析类型分析
* @author zhaoqifeng
* @date 2021/2/23 15:37
* @param customerId
* @Description 中央区事件分析-项目详情接口
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.screen.CategoryAnalysisResultDTO>>
* @return com.epmet.commons.tools.utils.Result
* @Author liushaowen
* @Date 2021/2/24 16:10
*/
@PostMapping("category-analysis")
public Result<List<CategoryAnalysisResultDTO>> categoryAnalysis(@RequestHeader("CustomerId") String customerId,
@RequestBody CategoryAnalysisFormDTO formDTO) {
log.info("===================customerId"+customerId);
ValidatorUtils.validateEntity(formDTO, CategoryAnalysisFormDTO.CategoryAnalysis.class);
return new Result<List<CategoryAnalysisResultDTO>>().ok(screenProjectService.categoryAnalysis(customerId, formDTO));
@PostMapping("projectdetailv2")
public Result projectDetail(@RequestBody ScreenProjectDetailFormDTO formDTO){
return screenProjectService.projectDistributionDetail(formDTO);
}
/**
* @param customerId
* @param formDTO
* @description 事件分析数量统计查询 平阴大屏
* @description 1事件分析数量统计查询 平阴大屏
**/
@PostMapping("queryquantity")
public Result<ProjectQuantityResultDTO> queryQuantity(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCommonFormDTO formDTO){
@ -104,7 +92,7 @@ public class ScreenProjectController {
* @param customerId
* @param formDTO
* @author yinzuomei
* @description 近12个月事件分析月度数量分析 平阴大屏
* @description 2近12个月事件分析月度数量分析 平阴大屏
**/
@PostMapping("queryquantity-monthly")
public Result<QueryQuantityMonthlyResultDTO> queryQuantityMonthly(@RequestHeader("CustomerId") String customerId, @RequestBody QueryQuantityMonthlyFormDTO formDTO) {
@ -117,7 +105,7 @@ public class ScreenProjectController {
* @param customerId
* @param formDTO
* @author yinzuomei
* @description 事件分析效率分析 平阴大屏
* @description 3事件分析效率分析 平阴大屏
**/
@PostMapping("efficiency-analysis")
public Result<List<EfficiencyAnalysisResultDTO>> efficiencyAnalysis(@RequestHeader("CustomerId") String customerId, @RequestBody EfficiencyAnalysisFormDTO formDTO){
@ -126,4 +114,19 @@ public class ScreenProjectController {
return new Result<List<EfficiencyAnalysisResultDTO>>().ok(projectOrgDailyService.efficiencyAnalysis(formDTO));
}
/**
* 事件分析类型分析
* @author zhaoqifeng
* @date 2021/2/23 15:37
* @param customerId
* @param formDTO 事件类型分析NEI接口地址 https://nei.netease.com/interface/detail/?pid=57068&id=346721
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.screen.CategoryAnalysisResultDTO>>
*/
@PostMapping("category-analysis")
public Result<List<CategoryAnalysisResultDTO>> categoryAnalysis(@RequestHeader("CustomerId") String customerId,
@RequestBody CategoryAnalysisFormDTO formDTO) {
log.info("===================customerId"+customerId);
ValidatorUtils.validateEntity(formDTO, CategoryAnalysisFormDTO.CategoryAnalysis.class);
return new Result<List<CategoryAnalysisResultDTO>>().ok(screenProjectService.categoryAnalysis(customerId, formDTO));
}
}

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

@ -10,7 +10,10 @@ import java.util.List;
@Mapper
public interface ScreenProjectDataDao {
List<ScreenProjectDistributionResultDTO> projectDistribution(@Param("agencyId") String agencyId, @Param("ids") List<String> ids, @Param("level") String level);
List<ScreenProjectDistributionResultDTO> projectDistribution(@Param("agencyId") String agencyId,
@Param("ids") List<String> ids,
@Param("level") String level,
@Param("status")String status);
List<String> selectIdsByAreaCode(@Param("areaCode") String areaCode);

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

@ -66,7 +66,7 @@ public class ScreenProjectOrgDailyServiceImpl implements ScreenProjectOrgDailySe
if (null != resultDTO) {
return resultDTO;
}
log.warn("【事件分析】数量统计查询 结果为空");
log.warn(String.format("【事件分析】数量统计查询 结果为空,customerId:%s,agencyId:%s",formDTO.getCustomerId(),formDTO.getAgencyId()));
ProjectQuantityResultDTO defaultDto = new ProjectQuantityResultDTO();
defaultDto.setCustomerId(formDTO.getCustomerId());
defaultDto.setAgencyId(formDTO.getAgencyId());

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

@ -70,11 +70,14 @@ public class ScreenProjectServiceImpl implements ScreenProjectService {
@Override
@DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true)
public Result projectDistribution(ScreenProjectDistributionFormDTO formDTO) {
if(StringUtils.isBlank(formDTO.getStatus())){
formDTO.setStatus("pending");
}
List<String> areaIds = null;
if (StringUtils.isNotBlank(formDTO.getAreaCode())){
areaIds = screenProjectDataDao.selectIdsByAreaCode(formDTO.getAreaCode());
}
List<ScreenProjectDistributionResultDTO> resultDTOS = screenProjectDataDao.projectDistribution(formDTO.getAgencyId(),areaIds,formDTO.getLevel());
List<ScreenProjectDistributionResultDTO> resultDTOS = screenProjectDataDao.projectDistribution(formDTO.getAgencyId(),areaIds,formDTO.getLevel(),formDTO.getStatus());
return new Result().ok(resultDTOS);
}

7
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml

@ -27,6 +27,13 @@
<if test="ids == null and agencyId != null">
and org_id = #{agencyId}
</if>
<choose>
<when test='"all" == status'>
</when>
<otherwise>
and PROJECT_STATUS_CODE=#{status}
</otherwise>
</choose>
</select>
<select id="selectIdsByAreaCode" resultType="java.lang.String">
select agency_id as id from screen_customer_agency where del_flag = '0' and area_code like concat(#{areaCode},'%')

1
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java

@ -156,7 +156,6 @@ public class ScreenProjectQuantityOrgMonthlyServiceImpl extends BaseServiceImpl<
List<ScreenProjectOrgDailyDTO> screenProjectOrgDailyDTOS = new ArrayList<>();
//如果有子客户要按照跟组织的area_code查询组织列表
if(customerRelationService.haveSubCustomer(customerId)){
//
CustomerAgencyEntity rootAgency=customerAgencyService.getRootAgencyInfo(customerId);
screenProjectOrgDailyDTOS=agencyDao.selectAgencyByAreaCode(rootAgency.getAreaCode());
}else{

Loading…
Cancel
Save