diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenDifficultyDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenDifficultyDataDao.java index 8041e34caa..801f8d5026 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenDifficultyDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenDifficultyDataDao.java @@ -44,12 +44,11 @@ public interface ScreenDifficultyDataDao { /** * @Description 查询难点赌点-耗时最长|涉及部门最多|处理次数【new】 - * @Param orgIds * @Param type * @author zxc * @date 2021/2/25 下午6:41 */ - List selectDifficultyNew(@Param("orgIds")List orgIds,@Param("type")String type); + List selectDifficultyByAreaCode(@Param("areaCode")String areaCode,@Param("type")String type); ProjectDetailResultDTO projectDetail(@Param("eventId")String projectId); diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java index ec53c3c834..a94607333f 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java @@ -104,18 +104,13 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public List difficultProject(AgencyNumTypeParamFormDTO param) { - List nextAgencyIds = new ArrayList<>(); List result = new ArrayList<>(); if(null == param.getTopNum()){ param.setTopNum(NumConstant.TWO); } PageHelper.startPage(NumConstant.ONE,param.getTopNum()); if (StringUtils.isNotEmpty(param.getAreaCode())){ - nextAgencyIds = screenCustomerAgencyService.getNextAgencyIds(param.getAreaCode(), param.getAgencyId()); - if (CollectionUtils.isEmpty(nextAgencyIds)){ - return new ArrayList<>(); - } - result = screenDifficultyDataDao.selectDifficultyNew(nextAgencyIds,param.getType()); + result = screenDifficultyDataDao.selectDifficultyByAreaCode(param.getAreaCode(),param.getType()); }else { result = screenDifficultyDataDao.selectDifficulty(param.getAgencyId(),param.getType()); } 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 8f2369ea07..f8832532b1 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 @@ -106,6 +106,7 @@ public class ScreenProjectServiceImpl implements ScreenProjectService { * @author zhaoqifeng * @date 2021/2/23 15:37 */ + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) @Override public List categoryAnalysis(String customerId, CategoryAnalysisFormDTO formDTO) { return screenProjectCategoryOrgDailyDao.selectCategoryAnalysis(formDTO.getAgencyId()); diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml index 59abb0b764..7f30a13cac 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml @@ -53,7 +53,7 @@ - SELECT diff.EVENT_ID AS projectId, diff.EVENT_CONTENT AS title, @@ -65,15 +65,17 @@ diff.EVENT_RE_ORG AS handleDepts, diff.EVENT_RE_ORG AS handleCount FROM - screen_difficulty_data diff + screen_difficulty_data diff + left join screen_customer_grid scg + on(diff.ORG_ID=scg.GRID_ID and scg.DEL_FLAG='0') WHERE - diff.DEL_FLAG = '0' - AND ( - - diff.ALL_PARENT_IDS LIKE CONCAT('%',#{id},'%') - - ) - ORDER BY (CASE #{type} WHEN 'timelongest' THEN diff.EVENT_COST_TIME WHEN 'mosthandled' THEN diff.EVENT_HANDLED_COUNT ELSE diff.EVENT_RE_ORG END) DESC + diff.DEL_FLAG = '0' + AND scg.AREA_CODE like concat(#{areaCode},'%') + ORDER BY + (CASE #{type} + WHEN 'timelongest' THEN diff.EVENT_COST_TIME + WHEN 'mosthandled' THEN diff.EVENT_HANDLED_COUNT + ELSE diff.EVENT_RE_ORG END) DESC \ No newline at end of file