Browse Source

Merge remote-tracking branch 'origin/dev_2021_12_30_bug' into dev

master
zxc 4 years ago
parent
commit
53655b0896
  1. 2
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java
  2. 2
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java
  3. 6
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml

2
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java

@ -265,6 +265,6 @@ public interface ProjectDao extends BaseDao<ProjectEntity> {
* @author zxc
* @date 2021/12/10 10:31 上午
*/
List<ProjectDistributionAnalysisRightDTO> selectProjectCountByOrg(@Param("orgIds")List<String> orgIds,@Param("startDate")String startDate,@Param("endDate")String endDate);
List<ProjectDistributionAnalysisRightDTO> selectProjectCountByOrg(List<SonOrgResultDTO> orgIds,@Param("startDate")String startDate,@Param("endDate")String endDate);
}

2
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java

@ -2921,7 +2921,7 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
}
List<SonOrgResultDTO> orgIds = sonOrgList.getData();
if (!agencyInfo.getLevel().equals(ProjectConstant.ORG_LEVEL_COMMUNITY)){
orgList = baseDao.selectProjectCountByOrg(orgIds.stream().map(m -> m.getPids()).collect(Collectors.toList()), formDTO.getStartDate(),formDTO.getEndDate());
orgList = baseDao.selectProjectCountByOrg(orgIds, formDTO.getStartDate(),formDTO.getEndDate());
}else {
for (SonOrgResultDTO o : orgIds) {
ProjectDistributionAnalysisRightDTO dto = new ProjectDistributionAnalysisRightDTO();

6
epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml

@ -472,13 +472,13 @@
<!-- 查询组织下的项目数 -->
<select id="selectProjectCountByOrg" resultType="com.epmet.dto.result.ProjectDistributionAnalysisRightDTO">
<foreach collection="orgIds" item="orgId" separator=" UNION ALL ">
<foreach collection="orgIds" item="o" separator=" UNION ALL ">
SELECT
#{orgId} AS orgId,
#{o.orgId} AS orgId,
COUNT(ID) AS count
FROM project
WHERE DEL_FLAG = '0'
AND ORG_ID_PATH LIKE CONCAT(#{orgId},'%')
AND ORG_ID_PATH LIKE CONCAT(#{o.orgId},'%')
AND DATE_FORMAT(CREATED_TIME,'%Y-%m-%d') >= #{startDate}
AND DATE_FORMAT(CREATED_TIME,'%Y-%m-%d') <![CDATA[ <= ]]> #{endDate}
</foreach>

Loading…
Cancel
Save