Browse Source

难点堵点查询接口修改

dev_shibei_match
yinzuomei 5 years ago
parent
commit
f0a818d3f5
  1. 3
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenDifficultyDataDao.java
  2. 7
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java
  3. 1
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectServiceImpl.java
  4. 20
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml

3
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<DifficultProjectResultDTO> selectDifficultyNew(@Param("orgIds")List<String> orgIds,@Param("type")String type);
List<DifficultProjectResultDTO> selectDifficultyByAreaCode(@Param("areaCode")String areaCode,@Param("type")String type);
ProjectDetailResultDTO projectDetail(@Param("eventId")String projectId);

7
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<DifficultProjectResultDTO> difficultProject(AgencyNumTypeParamFormDTO param) {
List<String> nextAgencyIds = new ArrayList<>();
List<DifficultProjectResultDTO> 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());
}

1
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<CategoryAnalysisResultDTO> categoryAnalysis(String customerId, CategoryAnalysisFormDTO formDTO) {
return screenProjectCategoryOrgDailyDao.selectCategoryAnalysis(formDTO.getAgencyId());

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

@ -53,7 +53,7 @@
</select>
<!-- 查询难点赌点-耗时最长|涉及部门最多|处理次数【new】 -->
<select id="selectDifficultyNew" resultType="com.epmet.evaluationindex.screen.dto.result.DifficultProjectResultDTO">
<select id="selectDifficultyByAreaCode" resultType="com.epmet.evaluationindex.screen.dto.result.DifficultProjectResultDTO">
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 (
<foreach collection="orgIds" item="id" separator=" OR ">
diff.ALL_PARENT_IDS LIKE CONCAT('%',#{id},'%')
</foreach>
)
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
</select>
</mapper>
Loading…
Cancel
Save