Browse Source

Merge remote-tracking branch 'origin/develop' into release_temp

master
zxc 4 years ago
parent
commit
32df6fb700
  1. 2
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/GridAndOrgCategoryCountResultDTO.java
  2. 15
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectDataDao.java
  3. 8
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryGridAndOrgDailyServiceImpl.java
  4. 18
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml
  5. 1
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/NeighborHoodServiceImpl.java

2
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/GridAndOrgCategoryCountResultDTO.java

@ -44,6 +44,8 @@ public class GridAndOrgCategoryCountResultDTO implements Serializable {
private String customerId;
private String categoryOriginCustomerId;
/**
* 分类CODE
*/

15
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectDataDao.java

@ -96,4 +96,19 @@ public interface ScreenProjectDataDao extends BaseDao<ScreenProjectDataEntity> {
List<GridAndOrgCategoryCountResultDTO> selectOrgCategoryProjectCount(@Param("dateId") String dateId, @Param("status")String status,
@Param("customerId") String customerId, @Param("subCount")Integer subCount,
@Param("allAgencies") List<GridAndOrgCategoryCountResultDTO> allAgencies);
/**
* @Description 查询组织下的1级项目分类
* @param dateId
* @param status
* @param customerId
* @param subCount
* @param allAgencies
* @author zxc
* @date 2021/11/11 11:14 上午
*/
List<GridAndOrgCategoryCountResultDTO> selectOrgCategoryOneLevelProjectCount(@Param("dateId") String dateId, @Param("status")String status,
@Param("customerId") String customerId, @Param("subCount")Integer subCount,
@Param("allAgencies") List<GridAndOrgCategoryCountResultDTO> allAgencies);
}

8
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryGridAndOrgDailyServiceImpl.java

@ -137,6 +137,10 @@ public class ScreenProjectCategoryGridAndOrgDailyServiceImpl implements ScreenPr
List<ScreenProjectOrgDailyDTO> agencies = screenCustomerAgencyDao.selectAgencyByCustomer(customerId);
List<GridAndOrgCategoryCountResultDTO> allAgencies = ConvertUtils.sourceToTarget(agencies, GridAndOrgCategoryCountResultDTO.class);
result = screenProjectDataDao.selectOrgCategoryProjectCount(dateId, ProjectConstant.PROJECT_STATUS_ALL, customerId, NumConstant.FOUR, allAgencies);
List<GridAndOrgCategoryCountResultDTO> oneLevelList = screenProjectDataDao.selectOrgCategoryOneLevelProjectCount(dateId, ProjectConstant.PROJECT_STATUS_ALL, customerId, NumConstant.FOUR, allAgencies);
if (CollectionUtils.isNotEmpty(oneLevelList)){
result.addAll(oneLevelList);
}
List<GridAndOrgCategoryCountResultDTO> closedList = screenProjectDataDao.selectOrgCategoryProjectCount(dateId, ProjectConstant.PROJECT_STATUS_CLOSED, customerId, NumConstant.FOUR, allAgencies);
result.forEach(r -> closedList.stream().filter(c -> r.getOrgId().equals(c.getOrgId()) && r.getCategoryCode().equals(c.getCategoryCode())).forEach(c -> r.setClosedProjectTotal(c.getClosedProjectTotal())));
}else {
@ -154,6 +158,10 @@ public class ScreenProjectCategoryGridAndOrgDailyServiceImpl implements ScreenPr
List<GridAndOrgCategoryCountResultDTO> allOrgCategoryList = result;
partition.forEach(p -> {
List<GridAndOrgCategoryCountResultDTO> allOrgList = screenProjectDataDao.selectOrgCategoryProjectCount(dateId, ProjectConstant.PROJECT_STATUS_ALL, customerId, NumConstant.TWO, p);
List<GridAndOrgCategoryCountResultDTO> oneLevelList = screenProjectDataDao.selectOrgCategoryOneLevelProjectCount(dateId, ProjectConstant.PROJECT_STATUS_ALL, customerId, NumConstant.FOUR, allAgencies);
if (CollectionUtils.isNotEmpty(oneLevelList)){
allOrgList.addAll(oneLevelList);
}
List<GridAndOrgCategoryCountResultDTO> closedOrgList = screenProjectDataDao.selectOrgCategoryProjectCount(dateId, ProjectConstant.PROJECT_STATUS_CLOSED, customerId, NumConstant.TWO, p);
allOrgList.forEach(a -> closedOrgList.stream().filter(c -> a.getOrgId().equals(c.getOrgId()) && a.getCategoryCode().equals(c.getCategoryCode())).forEach(c -> a.setClosedProjectTotal(c.getClosedProjectTotal())));
allOrgCategoryList.addAll(allOrgList);

18
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml

@ -336,6 +336,7 @@
SELECT
#{dateId} AS dateId,
#{customerId} AS customerId,
pd.customer_id AS categoryOriginCustomerId,
pc.CATEGORY_CODE,
#{a.orgId} AS orgId,
#{a.pid} AS pid,
@ -358,10 +359,15 @@
AND pd.PROJECT_STATUS_CODE IN ('closed','closed_case')
</if>
GROUP BY pc.CATEGORY_CODE
UNION ALL
</foreach>
</select>
<select id="selectOrgCategoryOneLevelProjectCount" resultType="com.epmet.dto.screen.result.GridAndOrgCategoryCountResultDTO">
<foreach collection="allAgencies" item="a" separator=" UNION ALL ">
SELECT
#{dateId} AS dateId,
#{customerId} AS customerId,
pd.customer_id AS categoryOriginCustomerId,
left(pc.CATEGORY_CODE, #{subCount}) AS categoryCode,
#{a.orgId} AS orgId,
#{a.pid} AS pid,
@ -377,11 +383,11 @@
FROM screen_project_data pd
INNER JOIN screen_project_category pc ON (pc.PROJECT_ID = pd.PROJECT_ID AND pc.DEL_FLAG = '0')
WHERE pd.DEL_FLAG = '0'
AND DATE_FORMAT(pd.PROJECT_CREATE_TIME,'%Y%m%d') <![CDATA[ <= ]]> #{dateId}
AND ALL_PARENT_IDS LIKE #{a.orgId}
<if test=' status == "closed" '>
AND pd.PROJECT_STATUS_CODE IN ('closed','closed_case')
</if>
AND DATE_FORMAT(pd.PROJECT_CREATE_TIME,'%Y%m%d') <![CDATA[ <= ]]> #{dateId}
AND ALL_PARENT_IDS LIKE #{a.orgId}
<if test=' status == "closed" '>
AND pd.PROJECT_STATUS_CODE IN ('closed','closed_case')
</if>
GROUP BY categoryCode
</foreach>
</select>

1
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/NeighborHoodServiceImpl.java

@ -253,6 +253,7 @@ public class NeighborHoodServiceImpl implements NeighborHoodService {
if (!obj.getAgencyName().trim().equals(staffInfoCache.getAgencyName())) {
numList.add(obj.getRowNum());
iterator.remove();
continue;
}
//当前组织下网格名不存在的也不允许导入
AtomicBoolean br = new AtomicBoolean(true);

Loading…
Cancel
Save