Browse Source

Merge remote-tracking branch 'origin/dev'

dev_shibei_match
yinzuomei 5 years ago
parent
commit
077728152c
  1. 5
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AdvanceBranchRankResultDTO.java
  2. 5
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/OrgRankDataResultDTO.java
  3. 2
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PublicPartiRankResultDTO.java
  4. 3
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml
  5. 41
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml
  6. 3
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml
  7. 35
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml
  8. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java
  9. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginGroupMainDailyService.java
  10. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginGroupMainDailyServiceImpl.java
  11. 13
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/IssueExtractServiceImpl.java
  12. 43
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyGuideServiceImpl.java
  13. 5
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml

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

@ -50,4 +50,9 @@ public class AdvanceBranchRankResultDTO implements Serializable {
* */
private Integer projectNum;
/**
* 当前name的上级组织名称 2021-01-11新增
*/
private String parentAgencyName;
}

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

@ -51,4 +51,9 @@ public class OrgRankDataResultDTO implements Serializable {
* */
private Integer projectNum;
/**
* 当前name的上级组织名称 2021-01-11新增
*/
private String parentAgencyName;
}

2
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PublicPartiRankResultDTO.java

@ -25,4 +25,6 @@ public class PublicPartiRankResultDTO implements Serializable {
private Integer issueNum;
private Integer projectNum;
private String parentAgencyName;
}

3
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml

@ -10,7 +10,8 @@
SUM( AGE_LEVEL_3 ) + SUM( AGE_LEVEL_4 ) AS between31And50Count,
SUM( AGE_LEVEL_5 ) AS between51And60Count,
SUM( AGE_LEVEL_6 ) AS above61Count,
SUM( PARTY_MEMBER_COUNT) AS partyTotal
SUM( PARTY_MEMBER_COUNT) AS partyMemberCount,
SUM( AGE_LEVEL_1 ) + SUM( AGE_LEVEL_2 )+SUM( AGE_LEVEL_3 ) + SUM( AGE_LEVEL_4 )+SUM( AGE_LEVEL_5 )+SUM( AGE_LEVEL_6 ) as partyTotal
FROM
screen_cpc_base_data
WHERE

41
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml

@ -6,28 +6,31 @@
<!-- 查询指定机关的直属网格月度数据 -->
<select id="selectGridDataMonthly" resultType="com.epmet.evaluationindex.screen.dto.result.OrgRankDataResultDTO">
SELECT
ORG_NAME AS NAME,
PARTY_TOTAL AS partyMemberNum,
GROUP_TOTAL AS branchNum,
ISSUE_TOTAL AS issueNum,
PROJECT_TOTAL AS projectNum,
CLOSE_PROJECT_RATIO AS closedProjectRatio,
SATISFACTION_RATIO AS satisfactionRatio
rankData.ORG_NAME AS NAME,
rankData.PARTY_TOTAL AS partyMemberNum,
rankData.GROUP_TOTAL AS branchNum,
rankData.ISSUE_TOTAL AS issueNum,
rankData.PROJECT_TOTAL AS projectNum,
rankData.CLOSE_PROJECT_RATIO AS closedProjectRatio,
rankData.SATISFACTION_RATIO AS satisfactionRatio,
agency.AGENCY_NAME AS parentAgencyName
FROM
screen_org_rank_data
screen_org_rank_data rankData
LEFT JOIN screen_customer_agency agency
ON rankData.PARENT_ID = agency.AGENCY_ID AND agency.DEL_FLAG = 0
WHERE
DEL_FLAG = '0'
AND ORG_TYPE = 'grid'
AND ALL_PARENT_IDS LIKE CONCAT('%',#{agencyId},'%')
AND MONTH_ID = #{monthId}
rankData.DEL_FLAG = '0'
AND rankData.ORG_TYPE = 'grid'
AND rankData.ALL_PARENT_IDS LIKE CONCAT('%',#{agencyId},'%')
AND rankData.MONTH_ID = #{monthId}
ORDER BY
(PARTY_TOTAL + GROUP_TOTAL + ISSUE_TOTAL + PROJECT_TOTAL + CLOSE_PROJECT_RATIO + SATISFACTION_RATIO) DESC,
PARTY_TOTAL DESC,
GROUP_TOTAL DESC,
ISSUE_TOTAL DESC,
PROJECT_TOTAL DESC,
CLOSE_PROJECT_RATIO DESC,
SATISFACTION_RATIO DESC
(rankData.PARTY_TOTAL + rankData.GROUP_TOTAL + rankData.ISSUE_TOTAL + rankData.PROJECT_TOTAL + rankData.CLOSE_PROJECT_RATIO + rankData.SATISFACTION_RATIO) DESC,
rankData.PARTY_TOTAL DESC,
rankData.GROUP_TOTAL DESC,
rankData.ISSUE_TOTAL DESC,
rankData.PROJECT_TOTAL DESC,
rankData.CLOSE_PROJECT_RATIO DESC,
rankData.SATISFACTION_RATIO DESC
</select>

3
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml

@ -15,5 +15,8 @@
WHERE
md.del_flag = '0'
AND md.parent_id = #{agencyId}
AND ORG_TYPE =
CASE WHEN sca.LEVEL = 'community' THEN 'grid' ELSE 'agency' END
</select>
</mapper>

35
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml

@ -6,24 +6,29 @@
<!-- 查询公众参与各类总数 -->
<select id="selectPublicPartiTotal" resultType="com.epmet.evaluationindex.screen.dto.result.PublicPartiRankResultDTO">
SELECT
ORG_NAME AS NAME,
REG_USER_TOTAL AS regNum,
JOIN_USER_TOTAL AS joinNum,
TOPIC_TOTAL AS topicNum,
ISSUE_TOTAL AS issueNum,
PROJECT_TOTAL AS projectNum
totalData.ORG_NAME AS NAME,
totalData.REG_USER_TOTAL AS regNum,
totalData.JOIN_USER_TOTAL AS joinNum,
totalData.TOPIC_TOTAL AS topicNum,
totalData.ISSUE_TOTAL AS issueNum,
totalData.PROJECT_TOTAL AS projectNum,
agency.AGENCY_NAME AS parentAgencyName
FROM
screen_public_parti_total_data
screen_public_parti_total_data totalData
LEFT JOIN
screen_customer_agency agency
ON totalData.PARENT_ID = agency.AGENCY_ID
AND agency.DEL_FLAG = '0' AND agency.AGENCY_ID = #{agencyId}
WHERE
DEL_FLAG = '0'
AND PARENT_ID = #{agencyId}
totalData.DEL_FLAG = '0'
AND totalData.PARENT_ID = #{agencyId}
ORDER BY
(REG_USER_TOTAL + JOIN_USER_TOTAL + TOPIC_TOTAL + ISSUE_TOTAL + PROJECT_TOTAL) DESC,
REG_USER_TOTAL desc,
JOIN_USER_TOTAL desc,
TOPIC_TOTAL desc,
ISSUE_TOTAL desc,
PROJECT_TOTAL desc
(totalData.REG_USER_TOTAL + totalData.JOIN_USER_TOTAL + totalData.TOPIC_TOTAL + totalData.ISSUE_TOTAL + totalData.PROJECT_TOTAL) DESC,
totalData.REG_USER_TOTAL desc,
totalData.JOIN_USER_TOTAL desc,
totalData.TOPIC_TOTAL desc,
totalData.ISSUE_TOTAL desc,
totalData.PROJECT_TOTAL desc
</select>
</mapper>

9
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java

@ -18,13 +18,11 @@
package com.epmet.dao.evaluationindex.extract;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO;
import com.epmet.dto.extract.result.OrgStatisticsResultDTO;
import com.epmet.dto.extract.result.PartyCreateGroupCountResultDTO;
import com.epmet.dto.extract.FactOriginGroupMainDailyDTO;
import com.epmet.dto.extract.form.GridHeartedFormDTO;
import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO;
import com.epmet.dto.extract.result.GridGroupUserCountResultDTO;
import com.epmet.dto.extract.result.OrgStatisticsResultDTO;
import com.epmet.dto.extract.result.PartyCreateGroupCountResultDTO;
import com.epmet.dto.group.result.ExtractGroupMemberActionRecordResultDTO;
import com.epmet.entity.evaluationindex.extract.FactOriginGroupMainDailyEntity;
@ -164,12 +162,11 @@ public interface FactOriginGroupMainDailyDao extends BaseDao<FactOriginGroupMain
/**
* @param customerId
* @param monthId
* @Description 查询党员建组信息
* @author zxc
* @date 2020/9/25 9:46 上午
*/
List<ScreenPartyLinkMassesDataFormDTO> selectPartyCreateGroupInfo(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("gridIds") List<String> gridIds);
List<ScreenPartyLinkMassesDataFormDTO> selectPartyCreateGroupInfo(@Param("customerId") String customerId, @Param("gridIds") List<String> gridIds);
/**
* desc: 获取所有网格的组中成员人数 去重
@ -202,4 +199,4 @@ public interface FactOriginGroupMainDailyDao extends BaseDao<FactOriginGroupMain
*/
List<OrgStatisticsResultDTO> selectOrgGroupCount(@Param("customerId") String customerId, @Param("monthId") String monthId,
@Param("level") String level);
}
}

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginGroupMainDailyService.java

@ -68,12 +68,11 @@ public interface FactOriginGroupMainDailyService extends BaseService<FactOriginG
/**
* @param customerId
* @param monthId
* @Description 查询党员建组信息
* @author zxc
* @date 2020/9/25 9:46 上午
*/
List<ScreenPartyLinkMassesDataFormDTO> selectPartyCreateGroupInfo(String customerId, String monthId, List<String> gridIds);
List<ScreenPartyLinkMassesDataFormDTO> selectPartyCreateGroupInfo(String customerId, List<String> gridIds);
/**
* desc: 获取客户下每个网格小组内的 去重人数
@ -106,4 +105,4 @@ public interface FactOriginGroupMainDailyService extends BaseService<FactOriginG
* @return java.util.List<com.epmet.dto.extract.result.OrgStatisticsResultDTO>
*/
List<OrgStatisticsResultDTO> getOrgGroupCount(String customerId, String monthId, String level);
}
}

11
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginGroupMainDailyServiceImpl.java

@ -21,8 +21,8 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.dao.evaluationindex.extract.FactOriginGroupMainDailyDao;
import com.epmet.dto.extract.FactOriginGroupMainDailyDTO;
import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO;
import com.epmet.dto.extract.result.OrgStatisticsResultDTO;
import com.epmet.dto.extract.result.GridGroupUserCountResultDTO;
import com.epmet.dto.extract.result.OrgStatisticsResultDTO;
import com.epmet.dto.group.result.ExtractGroupMemberActionRecordResultDTO;
import com.epmet.entity.evaluationindex.extract.FactOriginGroupMainDailyEntity;
import com.epmet.service.evaluationindex.extract.todata.FactOriginGroupMainDailyService;
@ -106,16 +106,15 @@ public class FactOriginGroupMainDailyServiceImpl extends BaseServiceImpl<FactOri
}
/**
* @Description 查询党员建组信息
* @param customerId
* @param monthId
* @Description 查询党员建组信息
* @author zxc
* @date 2020/9/25 9:46 上午
*/
@Override
public List<ScreenPartyLinkMassesDataFormDTO> selectPartyCreateGroupInfo(String customerId, String monthId, List<String> gridIds) {
public List<ScreenPartyLinkMassesDataFormDTO> selectPartyCreateGroupInfo(String customerId, List<String> gridIds) {
if (!CollectionUtils.isEmpty(gridIds)) {
return baseDao.selectPartyCreateGroupInfo(customerId, monthId, gridIds);
return baseDao.selectPartyCreateGroupInfo(customerId, gridIds);
}
return new ArrayList<>();
}
@ -135,4 +134,4 @@ public class FactOriginGroupMainDailyServiceImpl extends BaseServiceImpl<FactOri
return baseDao.selectOrgGroupCount(customerId, monthId, level);
}
}
}

13
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/IssueExtractServiceImpl.java

@ -22,6 +22,7 @@ import com.epmet.service.evaluationindex.extract.todata.IssueExtractService;
import com.epmet.service.topic.TopicService;
import com.epmet.service.user.UserService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -129,7 +130,11 @@ public class IssueExtractServiceImpl implements IssueExtractService {
agencyInfoList.forEach(pid -> {
if (r.getAgencyId().equals(pid.getAgencyId())){
r.setPid(pid.getPid());
r.setPids(pid.getPids().concat(":").concat(r.getAgencyId()));
if (StringUtils.isNotBlank(pid.getPids())) {
r.setPids(pid.getPids().concat(":").concat(r.getAgencyId()));
} else {
r.setPids(r.getAgencyId());
}
}
});
});
@ -231,7 +236,11 @@ public class IssueExtractServiceImpl implements IssueExtractService {
agencyInfoList.forEach(agency -> {
if (r.getAgencyId().equals(agency.getAgencyId())){
r.setPid(agency.getPid());
r.setPids(agency.getPids().concat(":").concat(r.getAgencyId()));
if(StringUtils.isNotBlank(agency.getPids())){
r.setPids(agency.getPids().concat(":").concat(r.getAgencyId()));
}else{
r.setPids(r.getAgencyId());
}
}
});
});

43
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyGuideServiceImpl.java

@ -1,11 +1,9 @@
package com.epmet.service.evaluationindex.extract.toscreen.impl;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.constant.ScreenConstant;
import com.epmet.dto.extract.form.ExtractScreenFormDTO;
import com.epmet.dto.extract.form.ScreenExtractFormDTO;
import com.epmet.dto.extract.form.ScreenPartyBranchDataFormDTO;
import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO;
import com.epmet.dto.extract.result.*;
@ -185,22 +183,22 @@ public class PartyGuideServiceImpl implements PartyGuideService {
// 判断当前级别agency是否为空
if (!CollectionUtils.isEmpty(agencyIdList)){
// 获取agencyIds
List<String> orgIds = agencyIdList.stream().map(m -> m.getAgencyId()).collect(Collectors.toList());
if (isGrid == true){
List<String> orgIds = agencyIdList.stream().map(CustomerAgencyInfoResultDTO::getAgencyId).collect(Collectors.toList());
if (isGrid) {
agencyIdList.forEach(agency -> {
// 计算社区级别的下级(实际就是网格)
GridPartyGuideDTO gridPartyGuideDTO = communityLevelSubGrid(customerId, monthId, agency);
GridPartyGuideDTO gridPartyGuideDTO = communityLevelSubGrid(customerId, agency);
orgIds.addAll(gridPartyGuideDTO.getOrgIds());
result.addAll(gridPartyGuideDTO.getResult());
});
// 根据agencyId分组,计算各个社区的
Map<String, List<ScreenPartyLinkMassesDataFormDTO>> groupByAgency = result.stream().collect(Collectors.groupingBy(ScreenPartyLinkMassesDataFormDTO::getParentId));
groupByAgency.forEach((agencyId,gridList) -> {
groupByAgency.forEach((agencyId, gridList) -> {
ScreenPartyLinkMassesDataFormDTO form = new ScreenPartyLinkMassesDataFormDTO();
List<OrgNameResultDTO> orgNameAgencyList = agencyService.selectOrgNameAgency(orgIds);
if (!CollectionUtils.isEmpty(orgNameAgencyList)){
orgNameAgencyList.forEach(name -> {
if (agencyId.equals(name.getAgencyId())){
if (agencyId.equals(name.getAgencyId())) {
form.setOrgName(name.getAgencyName());
form.setParentId(name.getParentId());
}
@ -210,8 +208,8 @@ public class PartyGuideServiceImpl implements PartyGuideService {
form.setCustomerId(customerId);
form.setDataEndTime(monthId);
form.setOrgType(ScreenConstant.AGENCY);
form.setCreateGroupTotal(gridList.stream().collect(Collectors.summingInt(ScreenPartyLinkMassesDataFormDTO::getCreateGroupTotal)));
form.setGroupUserTotal(gridList.stream().collect(Collectors.summingInt(ScreenPartyLinkMassesDataFormDTO::getGroupUserTotal)));
form.setCreateGroupTotal(gridList.stream().mapToInt(ScreenPartyLinkMassesDataFormDTO::getCreateGroupTotal).sum());
form.setGroupUserTotal(gridList.stream().mapToInt(ScreenPartyLinkMassesDataFormDTO::getGroupUserTotal).sum());
result.add(form);
});
delAndInsertLink(result,customerId,monthId,orgIds);
@ -227,15 +225,15 @@ public class PartyGuideServiceImpl implements PartyGuideService {
}
});
// 不为空 存在直属网格
if (!CollectionUtils.isEmpty(disGridIds)){
if (!CollectionUtils.isEmpty(disGridIds)) {
List<ScreenPartyLinkMassesDataFormDTO> gridResult = new ArrayList<>();
// 查询党员创建组,组内成员数
List<ScreenPartyLinkMassesDataFormDTO> partyLinkMassesDataList = groupMainService.selectPartyCreateGroupInfo(customerId, monthId, disGridIds);
List<OrgNameResultDTO> orgNameList = agencyService.selectOrgNameGrid(partyLinkMassesDataList.stream().map(m -> m.getOrgId()).collect(Collectors.toList()));
if (!CollectionUtils.isEmpty(partyLinkMassesDataList)){
List<ScreenPartyLinkMassesDataFormDTO> partyLinkMassesDataList = groupMainService.selectPartyCreateGroupInfo(customerId, disGridIds);
List<OrgNameResultDTO> orgNameList = agencyService.selectOrgNameGrid(partyLinkMassesDataList.stream().map(ScreenPartyLinkMassesDataFormDTO::getOrgId).collect(Collectors.toList()));
if (!CollectionUtils.isEmpty(partyLinkMassesDataList)) {
partyLinkMassesDataList.forEach(party -> {
orgNameList.forEach(org -> {
if (party.getOrgId().equals(org.getGridId())){
if (party.getOrgId().equals(org.getGridId())) {
party.setOrgName(org.getGridName());
}
});
@ -246,10 +244,10 @@ public class PartyGuideServiceImpl implements PartyGuideService {
delAndInsertLink(gridResult,customerId,monthId,disGridIds);
}
// 查询直属网格的信息 + 下级机关的信息 = agency的机关信息
List<ScreenPartyLinkMassesDataFormDTO> screenPartyLinkMassesDataGrid = groupMainService.selectPartyCreateGroupInfo(customerId, monthId, disGridIds);
List<ScreenPartyLinkMassesDataFormDTO> screenPartyLinkMassesDataGrid = groupMainService.selectPartyCreateGroupInfo(customerId, disGridIds);
List<ScreenPartyLinkMassesDataFormDTO> screenPartyLinkMassesDataList = linkMassesDataService.selectPartyLinkMassesInfo(customerId, monthId, agencyId);
screenPartyLinkMassesDataList.addAll(screenPartyLinkMassesDataGrid);
if (!CollectionUtils.isEmpty(screenPartyLinkMassesDataList)){
if (!CollectionUtils.isEmpty(screenPartyLinkMassesDataList)) {
ScreenPartyLinkMassesDataFormDTO form = new ScreenPartyLinkMassesDataFormDTO();
form.setOrgId(agencyId);
form.setOrgType(ScreenConstant.AGENCY);
@ -257,8 +255,8 @@ public class PartyGuideServiceImpl implements PartyGuideService {
form.setCustomerId(customerId);
form.setDataEndTime(monthId);
form.setParentId(screenPartyLinkMassesDataList.get(NumConstant.ZERO).getParentId());
form.setGroupUserTotal(screenPartyLinkMassesDataList.stream().collect(Collectors.summingInt(ScreenPartyLinkMassesDataFormDTO::getGroupUserTotal)));
form.setCreateGroupTotal(screenPartyLinkMassesDataList.stream().collect(Collectors.summingInt(ScreenPartyLinkMassesDataFormDTO::getCreateGroupTotal)));
form.setGroupUserTotal(screenPartyLinkMassesDataList.stream().mapToInt(ScreenPartyLinkMassesDataFormDTO::getGroupUserTotal).sum());
form.setCreateGroupTotal(screenPartyLinkMassesDataList.stream().mapToInt(ScreenPartyLinkMassesDataFormDTO::getCreateGroupTotal).sum());
result.add(form);
}
});
@ -431,24 +429,23 @@ public class PartyGuideServiceImpl implements PartyGuideService {
}
/**
* @Description 社区级别的处理
* @Description 社区级别的处理
* @Param customerId
* @Param monthId
* @Param agency
* @author zxc
* @date 2020/9/25 10:06 上午
*/
public GridPartyGuideDTO communityLevelSubGrid(String customerId, String monthId, CustomerAgencyInfoResultDTO agency){
public GridPartyGuideDTO communityLevelSubGrid(String customerId, CustomerAgencyInfoResultDTO agency) {
String agencyId = agency.getAgencyId();
// 获取下级所有agencyId【根据agencyMap中的level判断下级orgId是否是gridId】(此处直接作为gridId)
Map<String, Object> agencyMap = agencyService.selectAllSubAgencyId(agencyId, customerId);
List<String> gridIds = (List<String>) agencyMap.get(agencyId);
List<ScreenPartyLinkMassesDataFormDTO> partyLinkMassesDataList = groupMainService.selectPartyCreateGroupInfo(customerId, monthId, gridIds);
List<ScreenPartyLinkMassesDataFormDTO> partyLinkMassesDataList = groupMainService.selectPartyCreateGroupInfo(customerId, gridIds);
List<String> orgIds = partyLinkMassesDataList.stream().map(m -> m.getOrgId()).collect(Collectors.toList());
List<OrgNameResultDTO> orgNameList = agencyService.selectOrgNameGrid(orgIds);
partyLinkMassesDataList.forEach(party -> {
orgNameList.forEach(orgName -> {
if (party.getOrgId().equals(orgName.getGridId())){
if (party.getOrgId().equals(orgName.getGridId())) {
party.setOrgName(orgName.getGridName());
}
});

5
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml

@ -97,7 +97,7 @@
</foreach>
</where>
</delete>
<delete id="deleteSpecifiedDateData">
DELETE FROM
fact_origin_group_main_daily
@ -287,7 +287,6 @@
WHERE
DEL_FLAG = '0'
AND CUSTOMER_ID = #{customerId}
AND MONTH_ID = #{monthId}
AND GROUP_STATE = 'approved'
AND
(
@ -338,4 +337,4 @@
AND f.GROUP_STATE = 'approved'
GROUP BY f.AGENCY_ID
</select>
</mapper>
</mapper>

Loading…
Cancel
Save