diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java index c05df9f3a2..f15b892217 100644 --- a/epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java +++ b/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 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()) { diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ScreenProjectDistributionFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ScreenProjectDistributionFormDTO.java index 69da09b886..aa4a89183e 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ScreenProjectDistributionFormDTO.java +++ b/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; } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java index 88fa5c31b8..ed31aef27a 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java +++ b/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> myNextAgency(@LoginUser TokenDto tokenDto){ return new Result>().ok(projectService.getMyNextAgency(tokenDto)); } - - /** - * @param customerId - * @param formDTO - * @description 【事件分析】数量统计查询 平阴大屏 - **/ - @PostMapping("queryquantity") - public Result 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 queryQuantityMonthly(@RequestHeader("CustomerId") String customerId, @RequestBody QueryQuantityMonthlyFormDTO formDTO) { - formDTO.setCustomerId(customerId); - ValidatorUtils.validateEntity(formDTO); - return new Result().ok(projectQuantityOrgMonthlyService.queryQuantityMonthly(formDTO)); - } - - /** - * @param customerId - * @param formDTO - * @author yinzuomei - * @description 【事件分析】效率分析 平阴大屏 - **/ - @PostMapping("efficiency-analysis") - public Result> efficiencyAnalysis(@RequestHeader("CustomerId") String customerId, @RequestBody EfficiencyAnalysisFormDTO formDTO){ - formDTO.setCustomerId(customerId); - ValidatorUtils.validateEntity(formDTO); - return new Result>().ok(projectOrgDailyService.efficiencyAnalysis(formDTO)); - } - - //todo 【事件类型分析】NEI接口地址: https://nei.netease.com/interface/detail/?pid=57068&id=346721 } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java index cc7a55528e..84e109d3fc 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java +++ b/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> + * @return com.epmet.commons.tools.utils.Result + * @Author liushaowen + * @Date 2021/2/24 16:10 */ - @PostMapping("category-analysis") - public Result> categoryAnalysis(@RequestHeader("CustomerId") String customerId, - @RequestBody CategoryAnalysisFormDTO formDTO) { - log.info("===================customerId"+customerId); - ValidatorUtils.validateEntity(formDTO, CategoryAnalysisFormDTO.CategoryAnalysis.class); - return new Result>().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 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 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> efficiencyAnalysis(@RequestHeader("CustomerId") String customerId, @RequestBody EfficiencyAnalysisFormDTO formDTO){ @@ -126,4 +114,19 @@ public class ScreenProjectController { return new Result>().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> + */ + @PostMapping("category-analysis") + public Result> categoryAnalysis(@RequestHeader("CustomerId") String customerId, + @RequestBody CategoryAnalysisFormDTO formDTO) { + log.info("===================customerId"+customerId); + ValidatorUtils.validateEntity(formDTO, CategoryAnalysisFormDTO.CategoryAnalysis.class); + return new Result>().ok(screenProjectService.categoryAnalysis(customerId, formDTO)); + } } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectDataDao.java index 6ac5ef48ea..eeb9831e21 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectDataDao.java +++ b/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 projectDistribution(@Param("agencyId") String agencyId, @Param("ids") List ids, @Param("level") String level); + List projectDistribution(@Param("agencyId") String agencyId, + @Param("ids") List ids, + @Param("level") String level, + @Param("status")String status); List selectIdsByAreaCode(@Param("areaCode") String areaCode); diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectOrgDailyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectOrgDailyServiceImpl.java index b4518096dc..1ef82de513 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectOrgDailyServiceImpl.java +++ b/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()); diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectServiceImpl.java index f8832532b1..97dafab068 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectServiceImpl.java +++ b/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 areaIds = null; if (StringUtils.isNotBlank(formDTO.getAreaCode())){ areaIds = screenProjectDataDao.selectIdsByAreaCode(formDTO.getAreaCode()); } - List resultDTOS = screenProjectDataDao.projectDistribution(formDTO.getAgencyId(),areaIds,formDTO.getLevel()); + List resultDTOS = screenProjectDataDao.projectDistribution(formDTO.getAgencyId(),areaIds,formDTO.getLevel(),formDTO.getStatus()); return new Result().ok(resultDTOS); } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml index b59665f53e..08e88bbeae 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml @@ -27,6 +27,13 @@ and org_id = #{agencyId} + + + + + and PROJECT_STATUS_CODE=#{status} + +