Browse Source

难点堵点查询修改

dev_shibei_match
zxc 5 years ago
parent
commit
894a258268
  1. 5
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/AgencyNumTypeParamFormDTO.java
  2. 9
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenDifficultyDataDao.java
  3. 11
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java
  4. 24
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml

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

@ -32,4 +32,9 @@ public class AgencyNumTypeParamFormDTO implements Serializable {
@NotBlank(message = "类型不能为空", groups = AgencyNumTypeParamGroup.class)
private String type;
/**
* 地区编码
*/
private String areaCode;
}

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

@ -42,6 +42,15 @@ public interface ScreenDifficultyDataDao {
**/
List<DifficultProjectResultDTO> selectDifficulty(@Param("agencyId")String agencyId,@Param("type")String type);
/**
* @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);
ProjectDetailResultDTO projectDetail(@Param("eventId")String projectId);
}

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

@ -8,6 +8,7 @@ import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.DataSourceConstant;
import com.epmet.datareport.dao.evaluationindex.screen.*;
import com.epmet.datareport.service.evaluationindex.screen.AgencyService;
import com.epmet.datareport.service.evaluationindex.screen.GrassRootsGovernService;
import com.epmet.datareport.utils.DateUtils;
import com.epmet.datareport.utils.ModuleConstant;
@ -58,6 +59,9 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService {
private OperCrmOpenFeignClient crmClient;
@Autowired
private ScreenCustomerAgencyDao agencyDao;
@Autowired
private AgencyService screenCustomerAgencyService;
/**
* @Description 1热心市民积分排行
@ -100,11 +104,16 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService {
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public List<DifficultProjectResultDTO> difficultProject(AgencyNumTypeParamFormDTO param) {
List<String> nextAgencyIds = screenCustomerAgencyService.getNextAgencyIds(param.getAreaCode(), param.getAgencyId());
if (CollectionUtils.isEmpty(nextAgencyIds)){
return new ArrayList<>();
}
if(null == param.getTopNum()){
param.setTopNum(NumConstant.TWO);
}
PageHelper.startPage(NumConstant.ONE,param.getTopNum());
List<DifficultProjectResultDTO> result = screenDifficultyDataDao.selectDifficulty(param.getAgencyId(),param.getType());
// List<DifficultProjectResultDTO> result = screenDifficultyDataDao.selectDifficulty(param.getAgencyId(),param.getType());
List<DifficultProjectResultDTO> result = screenDifficultyDataDao.selectDifficultyNew(nextAgencyIds,param.getType());
for(DifficultProjectResultDTO resultDTO:result){
if (StringUtils.isNotBlank(resultDTO.getImgUrl()) && !resultDTO.getImgUrl().contains("http")) {
resultDTO.setImgUrl(StrConstant.EPMETY_STR);

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

@ -52,4 +52,28 @@
AND dd.EVENT_ID = #{eventId}
</select>
<!-- 查询难点赌点-耗时最长|涉及部门最多|处理次数【new】 -->
<select id="selectDifficultyNew" resultType="com.epmet.evaluationindex.screen.dto.result.DifficultProjectResultDTO">
SELECT
diff.EVENT_ID AS projectId,
diff.EVENT_CONTENT AS title,
diff.EVENT_STATUS_CODE AS STATUS,
ROUND(diff.EVENT_COST_TIME/60,0) AS totalHours,
diff.EVENT_SOURCE AS gridName,
diff.EVENT_IMG_URL AS imgUrl,
IFNULL(diff.EVENT_CATEGORY_NAME,'') AS categoryName,
diff.EVENT_RE_ORG AS handleDepts,
diff.EVENT_RE_ORG AS handleCount
FROM
screen_difficulty_data diff
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
</select>
</mapper>
Loading…
Cancel
Save