Browse Source

项目研判分析按分类查询数据兼容市北多层级分类以及不是来源话题的议题补录一条关于话题数据(project_related_personnel) 话题id为空的问题

release
sunyuchao 4 years ago
parent
commit
0889bec4ab
  1. 3
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java
  2. 15
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govproject/ProjectDao.xml

3
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java

@ -1,6 +1,7 @@
package com.epmet.dataaggre.service.govproject.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.CustomerIdConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
@ -559,7 +560,7 @@ public class GovProjectServiceImpl implements GovProjectService {
})).collect(Collectors.toList());
//4.根据userId集合和二级分类Code集合查询来源楼院小组的项目
List<ProjectCategoryResultDTO> groupList = projectDao.getProjectCategoryList(formDTO.getCustomerId(), secondCodeList, userIds, "issue");
List<ProjectCategoryResultDTO> groupList = projectDao.getProjectCategoryList(formDTO.getCustomerId(), (CustomerIdConstant.SHI_BEI_CUSTOMER_ID.equals(formDTO.getCustomerId()) ? null : secondCodeList), userIds, "issue");
//5.根据userId集合和二级分类Code集合查询来源事件上报的项目
List<ProjectCategoryResultDTO> eventList = projectDao.getProjectCategoryList(formDTO.getCustomerId(), secondCodeList, userIds, "resiEvent");

15
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govproject/ProjectDao.xml

@ -363,9 +363,18 @@
p.del_flag = '0'
AND p.customer_id = #{customerId}
AND p.origin = #{origin}
<foreach collection="secondCodeList" item="code" open="AND pc.category_code IN (" separator="," close=")">
#{code}
</foreach>
<choose>
<when test="null != secondCodeList and secondCodeList.size > 0">
<foreach collection="secondCodeList" item="code" open="AND pc.category_code IN (" separator="," close=")">
#{code}
</foreach>
</when>
<otherwise>
<foreach collection="secondCodeList" item="code" open="AND (" separator=" OR " close=" )" >
pc.category_code LIKE CONCAT(#{code}, '%')
</foreach>
</otherwise>
</choose>
<if test="origin != null and origin != '' and origin == 'issue'">
<foreach collection="userIds" item="userId" open="AND prp.user_id IN (" separator="," close=")">
#{userId}

Loading…
Cancel
Save