diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/OrgResponseTimeResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/OrgResponseTimeResultDTO.java new file mode 100644 index 0000000000..88735859d3 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/OrgResponseTimeResultDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dto.extract.result; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * @Description 各机关响应时间 + * @ClassName OrgResponseTimeResultDTO + * @Auth wangc + * @Date 2020-09-21 02:03 + */ +@Data +public class OrgResponseTimeResultDTO implements Serializable { + private static final long serialVersionUID = 6017440139236985959L; + + private String agencyId; + + private BigDecimal responseTime; + + private BigDecimal projectTotal; + + private BigDecimal distinctProjectTotal; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/ProjectParticipatedAgencyResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/ProjectParticipatedAgencyResultDTO.java new file mode 100644 index 0000000000..1cd9de713b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/ProjectParticipatedAgencyResultDTO.java @@ -0,0 +1,24 @@ +package com.epmet.dto.extract.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 参与过项目的agencyDTO + * @ClassName ProjectParticipatedAgencyResultDTO + * @Auth wangc + * @Date 2020-09-20 23:40 + */ +@Data +public class ProjectParticipatedAgencyResultDTO implements Serializable { + private static final long serialVersionUID = 1071619125612033138L; + + private String projectId; + + private String agencyId; + + private String level; + + private int score; +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index 848be0a8bb..92611df2cf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -27,6 +27,7 @@ import com.epmet.entity.stats.DimCustomerEntity; import com.epmet.entity.stats.DimDateEntity; import com.epmet.service.StatsDemoService; import com.epmet.service.evaluationindex.extract.CalGridIndexService; +import com.epmet.service.evaluationindex.extract.FactOriginProjectLogDailyService; import com.epmet.service.evaluationindex.extract.FactOriginTopicMainDailyService; import com.epmet.service.evaluationindex.indexcal.*; import com.epmet.service.stats.DimAgencyService; @@ -39,6 +40,7 @@ import org.springframework.web.bind.annotation.*; import java.math.BigDecimal; import java.time.LocalDateTime; import java.util.List; +import java.util.Map; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; @@ -83,6 +85,8 @@ public class DemoController { private DimCustomerDao dimCustomerDao; @Autowired private FactOriginTopicMainDailyService factOriginTopicMainDailyService; + @Autowired + private FactOriginProjectLogDailyService factOriginProjectLogDailyService; @GetMapping("testAlarm") public void testAlarm() { @@ -553,4 +557,19 @@ public class DemoController { String monthId = "202008"; calGridIndexService.calGridIndexGovernAbility(customerId,monthId); } + + @PostMapping("handlemap") + public Result> handleMap(){ + return new Result>().ok( + factOriginProjectLogDailyService.getProjectHandledAgency("3ef7e4bb195eb9e622d68b52509aa940","202006","month")); + } + + @PostMapping("responseration") + public Result> responseRatio(){ + return new Result>().ok( + factOriginProjectLogDailyService.getAgencyResponseRatio("3ef7e4bb195eb9e622d68b52509aa940","202006","month") + ); + } + + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java index c2100cee16..336e900771 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java @@ -76,12 +76,12 @@ public interface FactOriginGroupMainDailyDao extends BaseDao list); + void deleteBatchByGroupId(@Param("customerId")String customerId,@Param("list") List list); /** * @Description 更新群主的党员信息 @@ -90,7 +90,7 @@ public interface FactOriginGroupMainDailyDao extends BaseDao list); + int updatePartyFlag(@Param("list") List list,@Param("customerId")String customerId); /** * @Description 更新群主的热心居民信息 @@ -99,7 +99,7 @@ public interface FactOriginGroupMainDailyDao extends BaseDao list); + int updateHeartedFlag(@Param("list") List list,@Param("customerId")String customerId); /** * @Description 批量插入组主表 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectLogDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectLogDailyDao.java index 759a56e82c..3dec07d1b3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectLogDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectLogDailyDao.java @@ -18,10 +18,7 @@ package com.epmet.dao.evaluationindex.extract; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.extract.result.OrgStatisticsResultDTO; -import com.epmet.dto.extract.result.AutoNoMyResultDTO; -import com.epmet.dto.extract.result.NotReturnProjectResultDTO; -import com.epmet.dto.extract.result.ProjectEvaluateResultDTO; +import com.epmet.dto.extract.result.*; import com.epmet.entity.evaluationindex.extract.FactOriginProjectLogDailyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -96,4 +93,14 @@ public interface FactOriginProjectLogDailyDao extends BaseDao selectSatisfaction(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("level")String level); + + /** + * @Description 查询各项目经受了多少机关 + * @param customerId + * @return + * @author wangc + * @date 2020.09.20 23:46 + **/ + List selectProjectParticipatedAgency(@Param("customerId") String customerId, @Param("dimId") String dimId, + @Param("dateType")String dateType); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectOrgPeriodDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectOrgPeriodDailyDao.java index 87e8342706..72932604b2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectOrgPeriodDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectOrgPeriodDailyDao.java @@ -18,10 +18,12 @@ package com.epmet.dao.evaluationindex.extract; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.extract.result.OrgResponseTimeResultDTO; import com.epmet.dto.extract.result.OrgStatisticsResultDTO; import com.epmet.entity.evaluationindex.extract.FactOriginProjectOrgPeriodDailyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import org.springframework.web.bind.annotation.PostMapping; import java.util.List; @@ -76,4 +78,22 @@ public interface FactOriginProjectOrgPeriodDailyDao extends BaseDao list); + + /** + * @Description 查找网格、部门对项目的响应系数 + * @param customerId + * @return + * @author wangc + * @date 2020.09.21 02:13 + **/ + List selectSubOrgResponseCoefficient(@Param("customerId") String customerId,@Param("dimId") String dimId, @Param("dateType") String dateType); + + /** + * @Description 查找机关对项目的响应系数 + * @param customerId + * @return + * @author wangc + * @date 2020.09.21 02:13 + **/ + List selectAgencyResponseCoefficient(@Param("customerId") String customerId,@Param("dimId") String dimId, @Param("dateType") String dateType); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimGridDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimGridDao.java index 3087abdd21..310dbc6ee5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimGridDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimGridDao.java @@ -78,5 +78,5 @@ public interface DimGridDao extends BaseDao { * @author wangc * @date 2020.09.20 13:01 **/ - List selectGridAttributes(@Param("gridIds") List gridIds); + List selectGridAttributes(@Param("customerId") String customerId,@Param("gridIds") List gridIds); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/FactOriginProjectLogDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/FactOriginProjectLogDailyService.java index 72f840ba81..e32e492e5e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/FactOriginProjectLogDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/FactOriginProjectLogDailyService.java @@ -26,6 +26,7 @@ import com.epmet.dto.extract.result.NotReturnProjectResultDTO; import com.epmet.dto.extract.result.ProjectEvaluateResultDTO; import com.epmet.entity.evaluationindex.extract.FactOriginProjectLogDailyEntity; +import java.math.BigDecimal; import java.util.List; import java.util.Map; @@ -155,4 +156,23 @@ public interface FactOriginProjectLogDailyService extends BaseService */ List getSatisfaction(String customerId, String monthId, String level); + + /** + * @Description 查询各机关办结了多少项目 + * @param customerId + * @return + * @author wangc + * @date 2020.09.20 23:46 + **/ + Map getProjectHandledAgency(String customerId, String dimId,String dateType); + + /** + * @Description 计算机关响应度 + * @param customerId + * @return + * @author wangc + * @date 2020.09.21 02:16 + **/ + Map getAgencyResponseRatio(String customerId, String dimId,String dateType); + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactOriginProjectLogDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactOriginProjectLogDailyServiceImpl.java index a62fdd38e2..727bc75659 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactOriginProjectLogDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactOriginProjectLogDailyServiceImpl.java @@ -21,23 +21,25 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.dao.evaluationindex.extract.FactOriginProjectLogDailyDao; +import com.epmet.dao.evaluationindex.extract.FactOriginProjectOrgPeriodDailyDao; import com.epmet.dto.extract.FactOriginProjectLogDailyDTO; -import com.epmet.dto.extract.result.OrgStatisticsResultDTO; -import com.epmet.dto.extract.result.AutoNoMyResultDTO; -import com.epmet.dto.extract.result.NotReturnProjectResultDTO; -import com.epmet.dto.extract.result.ProjectEvaluateResultDTO; +import com.epmet.dto.extract.result.*; import com.epmet.entity.evaluationindex.extract.FactOriginProjectLogDailyEntity; import com.epmet.service.evaluationindex.extract.FactOriginProjectLogDailyService; import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; -import java.util.Arrays; -import java.util.List; -import java.util.Map; +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.util.*; +import java.util.stream.Collectors; /** * 项目明细_日统计 @@ -48,6 +50,8 @@ import java.util.Map; @Service public class FactOriginProjectLogDailyServiceImpl extends BaseServiceImpl implements FactOriginProjectLogDailyService { + @Autowired + private FactOriginProjectOrgPeriodDailyDao projectOrgPeriodDailyDao; @Override public PageData page(Map params) { @@ -152,4 +156,79 @@ public class FactOriginProjectLogDailyServiceImpl extends BaseServiceImpl getProjectHandledAgency(String customerId, String dimId, String dateType) { + Map result = new HashMap<>(); + List projectAgency = baseDao.selectProjectParticipatedAgency(customerId,dimId,dateType); + if(!CollectionUtils.isEmpty(projectAgency)){ + Map> map + = projectAgency.stream().collect(Collectors.groupingBy(ProjectParticipatedAgencyResultDTO :: getProjectId)); + + map.forEach((key ,agencies) ->{ + if(!CollectionUtils.isEmpty(agencies)) { + String highest = agencies.get(NumConstant.ZERO).getLevel(); + for (int i = NumConstant.ZERO; i < agencies.size(); i++) { + if(StringUtils.equals(agencies.get(i).getLevel(),highest)){ + if(null != result.get(agencies.get(i).getAgencyId())){ + result.put(key,result.get(agencies.get(i).getAgencyId()) + NumConstant.ONE); + }else{ + result.put(key,NumConstant.ONE); + } + }else break; + } + } + }); + } + return result; + } + + /** + * @Description 计算机关响应度 + * @param customerId + * @return + * @author wangc + * @date 2020.09.21 02:16 + **/ + @Override + public Map getAgencyResponseRatio(String customerId, String dimId, String dateType) { + List gridDeptResponse = projectOrgPeriodDailyDao.selectSubOrgResponseCoefficient(customerId, dimId, dateType); + List agencyResponse = projectOrgPeriodDailyDao.selectAgencyResponseCoefficient(customerId, dimId, dateType); + Map consumingMap = new HashMap<>(); + Map timeMap = new HashMap<>(); + if(!CollectionUtils.isEmpty(agencyResponse)){ + agencyResponse.forEach(response -> { + consumingMap.put(response.getAgencyId(),response.getResponseTime()); + //注意,这里取的是去重后的项目次数,例如一个部门被项目流转了多次,项目数只算一次 + //如果需要改成不去重,只需response.getProjectTotal() + timeMap.put(response.getAgencyId(),response.getDistinctProjectTotal()); + }); + } + if(!CollectionUtils.isEmpty(gridDeptResponse)){ + gridDeptResponse.forEach(response -> { + if(null != consumingMap.get(response.getAgencyId())){ + consumingMap.put(response.getAgencyId(),consumingMap.get(response.getAgencyId()).add(response.getResponseTime())); + timeMap.put(response.getAgencyId(),timeMap.get(response.getAgencyId()).add(response.getDistinctProjectTotal())); + }else{ + consumingMap.put(response.getAgencyId(),response.getResponseTime()); + timeMap.put(response.getAgencyId(),response.getDistinctProjectTotal()); + } + }); + } + Map ratioMap = new HashMap<>(); + if(!CollectionUtils.isEmpty(consumingMap)) { + consumingMap.keySet().forEach(agencyId -> { + ratioMap.put(agencyId, consumingMap.get(agencyId).divide(timeMap.get(agencyId), NumConstant.SIX, RoundingMode.HALF_UP)); + }); + } + return ratioMap; + } + + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/GroupExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/GroupExtractServiceImpl.java index 9d3c89eca8..4a47ab67fa 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/GroupExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/GroupExtractServiceImpl.java @@ -90,7 +90,7 @@ public class GroupExtractServiceImpl implements GroupExtractService { List memberList = new LinkedList<>(); if (!CollectionUtils.isEmpty(originGroupData)) { - List gridList = dimGridService.getGridAttributes(originGroupData.stream().map(FactOriginGroupMainDailyDTO::getGridId).distinct().collect(Collectors.toList())); + List gridList = dimGridService.getGridAttributes(param.getCustomerId(),originGroupData.stream().map(FactOriginGroupMainDailyDTO::getGridId).distinct().collect(Collectors.toList())); if (!CollectionUtils.isEmpty(gridList)) { Map gridMap = @@ -130,12 +130,11 @@ public class GroupExtractServiceImpl implements GroupExtractService { if (count <= NumConstant.ZERO) { //isFirst - factOriginGroupMainDailyDao.deleteBatchByCustomerId(param.getCustomerId()); factOriginGroupMainDailyDao.deleteBatchMemberByCustomerId(param.getCustomerId()); factOriginGroupMainDailyDao.insertBatchMain(originGroupData); factOriginGroupMainDailyDao.insertBatchMembers(memberList); } else { - factOriginGroupMainDailyDao.deleteBatchByGroupId(originGroupData.stream().map(FactOriginGroupMainDailyDTO :: getId).distinct().collect(Collectors.toList())); + factOriginGroupMainDailyDao.deleteBatchByGroupId(param.getCustomerId(),originGroupData.stream().map(FactOriginGroupMainDailyDTO :: getId).distinct().collect(Collectors.toList())); factOriginGroupMainDailyDao.insertBatchMembers(memberList); } @@ -145,8 +144,8 @@ public class GroupExtractServiceImpl implements GroupExtractService { List partyIds = userService.getPartymembersByCustomerId(param.getCustomerId()); List heartedIds = userService.getWarmHeartedByCustomerId(param.getCustomerId()); - factOriginGroupMainDailyDao.updatePartyFlag(partyIds); - factOriginGroupMainDailyDao.updateHeartedFlag(heartedIds); + factOriginGroupMainDailyDao.updatePartyFlag(partyIds,param.getCustomerId()); + factOriginGroupMainDailyDao.updateHeartedFlag(heartedIds,param.getCustomerId()); } } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/ProjectExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/ProjectExtractServiceImpl.java index f1e8d60dff..26cb96daf1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/ProjectExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/ProjectExtractServiceImpl.java @@ -344,4 +344,6 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { } return result; } + + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/IndexCollStreetServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/IndexCollStreetServiceImpl.java index 8f32d7507a..51d688745e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/IndexCollStreetServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/IndexCollStreetServiceImpl.java @@ -15,6 +15,7 @@ import com.epmet.service.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthl import com.epmet.service.evaluationindex.indexcoll.IndexCollStreetService; import com.epmet.service.stats.DimAgencyService; import com.epmet.util.DimIdGenerator; +import io.swagger.models.auth.In; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -23,6 +24,7 @@ import java.math.BigDecimal; import java.math.RoundingMode; import java.util.Date; import java.util.List; +import java.util.Map; import java.util.stream.Collectors; /** @@ -63,9 +65,12 @@ public class IndexCollStreetServiceImpl implements IndexCollStreetService { entity.setMonthId(dimId.getMonthId()); entity.setDataType(OrgTypeConstant.STREET); entity.setTransferedCount(NumConstant.ZERO); + //办结项目数 entity.setClosedProjectCount(NumConstant.ZERO); + //项目响应度 entity.setRespProjectRatio(new BigDecimal(NumConstant.ZERO)); entity.setOverdueProjectRatio(new BigDecimal(NumConstant.ZERO)); + //办结项目率 entity.setClosedProjectRatio(new BigDecimal(NumConstant.ZERO)); entity.setSatisfactionRatio(new BigDecimal(NumConstant.ZERO)); entity.setHandleProjectRatio(new BigDecimal(NumConstant.ZERO)); @@ -105,6 +110,20 @@ public class IndexCollStreetServiceImpl implements IndexCollStreetService { } })); } + //办结数 + Map agencyHandleCount = factOriginProjectLogDailyService.getProjectHandledAgency(customerId,dimId.getMonthId(),"month"); + Map responseMap = factOriginProjectLogDailyService.getAgencyResponseRatio(customerId,dimId.getMonthId(),"month"); + list.forEach(entity ->{ + entity.setClosedProjectCount(agencyHandleCount.get(entity.getAgencyId())); + BigDecimal element = entity.getClosedProjectRatio(); + //办结率 + entity.setClosedProjectRatio( + element.divide(new BigDecimal(entity.getTransferedCount()), NumConstant.SIX, RoundingMode.HALF_UP) + ); + //响应度 + entity.setRespProjectRatio(responseMap.get(entity.getAgencyId())); + }); + factIndexGovrnAblityOrgMonthlyService.deleteByCustomer(customerId, dimId.getMonthId(), OrgTypeConstant.STREET); factIndexGovrnAblityOrgMonthlyService.insertBatch(list); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java index 6d4f47d76c..c29bf789a5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java @@ -181,4 +181,6 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl { * @author wangc * @date 2020.09.20 13:01 **/ - List getGridAttributes(List gridIds); + List getGridAttributes(String customerId,List gridIds); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java index 6a6a5ff323..5062b8e94f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java @@ -185,8 +185,8 @@ public class DimGridServiceImpl extends BaseServiceImpl getGridAttributes(List gridIds) { + public List getGridAttributes(String customerId,List gridIds) { if(CollectionUtils.isEmpty(gridIds)) return Collections.EMPTY_LIST; - return baseDao.selectGridAttributes(gridIds); + return baseDao.selectGridAttributes(customerId,gridIds); } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml index 305b618772..c3dfa906d8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml @@ -48,7 +48,8 @@ DELETE FROM fact_origin_group_main_daily - + CUSTOMER_ID = #{customerId} + ID = #{groupId} @@ -59,6 +60,7 @@ SET IS_OWNER_PARTY = 1 DEL_FLAG = '0' + AND CUSTOMER_ID = #{customerId} AND GROUP_OWNER_ID = #{ownerId} @@ -71,6 +73,7 @@ SET IS_OWNER_HEARTED = 1 DEL_FLAG = '0' + AND CUSTOMER_ID = #{customerId} AND (GROUP_OWNER_ID = #{item.userId} AND GRID_ID = #{item.gridId}) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml index 6047bc9726..2a52eb8076 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml @@ -116,4 +116,54 @@ GROUP BY AGENCY_ID + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectOrgPeriodDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectOrgPeriodDailyDao.xml index 20f45783a4..bf502d1af2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectOrgPeriodDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectOrgPeriodDailyDao.xml @@ -115,4 +115,68 @@ ) + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimGridDao.xml index 09aa1bee36..bbc7e463e1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimGridDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimGridDao.xml @@ -101,6 +101,7 @@ WHERE dg.DEL_FLAG = '0' AND da.DEL_FLAG = '0' + AND da.CUSTOMER_ID = #{customerId} AND (