From 8a84042cb3bdf6fd70f6ecd9619565a8ec50f358 Mon Sep 17 00:00:00 2001 From: jianjun Date: Sat, 10 Oct 2020 17:55:52 +0800 Subject: [PATCH 01/15] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=81=A5=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-gateway/src/main/resources/bootstrap.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-gateway/src/main/resources/bootstrap.yml b/epmet-gateway/src/main/resources/bootstrap.yml index 8bf6af5abd..ed3a3961da 100644 --- a/epmet-gateway/src/main/resources/bootstrap.yml +++ b/epmet-gateway/src/main/resources/bootstrap.yml @@ -441,6 +441,7 @@ epmet: # 外部应用认证,使用AccessToken等头进行认证 externalAuthUrls: - /data/report/** + - /data/stats/** - /epmetuser/customerstaff/customerlist swaggerUrls: From 35150537caa0690c25e6198307b535566394a50b Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sat, 10 Oct 2020 18:00:50 +0800 Subject: [PATCH 02/15] =?UTF-8?q?screen=5Findex=5Fdata=5Fmonthly=20?= =?UTF-8?q?=E8=B5=8B=E5=80=BCALL=5FPARENT=5FIDS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/DemoController.java | 45 +++++++++++++++++-- .../screen/ScreenIndexDataMonthlyDao.java | 2 + .../screen/ScreenIndexDataMonthlyEntity.java | 2 + .../screen/ScreenIndexDataMonthlyDao.xml | 6 +++ 4 files changed, 51 insertions(+), 4 deletions(-) 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 c5d269e36f..7ebedfc864 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 @@ -11,21 +11,23 @@ import com.epmet.dao.evaluationindex.indexcal.GridScoreDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.screen.ScreenCustomerAgencyDao; import com.epmet.dao.evaluationindex.screen.ScreenCustomerGridDao; +import com.epmet.dao.evaluationindex.screen.ScreenIndexDataMonthlyDao; import com.epmet.dao.stats.DimCustomerDao; import com.epmet.dao.stats.DimDateDao; import com.epmet.dao.stats.DimMonthDao; import com.epmet.dto.AgencySubTreeDto; import com.epmet.dto.extract.form.ExtractOriginFormDTO; import com.epmet.dto.extract.form.ExtractScreenFormDTO; -import com.epmet.dto.extract.form.ScreenExtractFormDTO; import com.epmet.dto.indexcal.CalculateCommonFormDTO; -import com.epmet.dto.screen.form.ScreenCentralZoneDataFormDTO; import com.epmet.dto.stats.form.CustomerIdAndDateIdFormDTO; import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyEntity; import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyEntity; import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyEntity; +import com.epmet.entity.evaluationindex.screen.ScreenCustomerAgencyEntity; import com.epmet.entity.evaluationindex.screen.ScreenCustomerGridEntity; +import com.epmet.entity.evaluationindex.screen.ScreenIndexDataMonthlyEntity; import com.epmet.entity.stats.DimAgencyEntity; import com.epmet.entity.stats.DimCustomerEntity; import com.epmet.entity.stats.DimDateEntity; @@ -37,8 +39,6 @@ import com.epmet.service.evaluationindex.extract.dataToIndex.IndexCollCommunityS import com.epmet.service.evaluationindex.extract.dataToIndex.IndexCollStreetService; import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectLogDailyService; import com.epmet.service.evaluationindex.extract.todata.FactOriginTopicMainDailyService; -import com.epmet.service.evaluationindex.extract.todata.GroupExtractService; -import com.epmet.service.evaluationindex.extract.todata.ProjectExtractService; import com.epmet.service.evaluationindex.extract.toscreen.*; import com.epmet.service.evaluationindex.indexcal.*; import com.epmet.service.stats.DimAgencyService; @@ -718,5 +718,42 @@ public class DemoController { } + @Autowired + private ScreenIndexDataMonthlyDao screenIndexDataMonthlyDao; + @Autowired + private ScreenCustomerAgencyDao screenCustomerAgencyDao; + + /** + * @return com.epmet.commons.tools.utils.Result + * @param + * @author yinzuomei + * @description screen_index_data_monthly 赋值ALL_PARENT_IDS + * @Date 2020/10/10 17:59 + **/ + @DataSource(DataSourceConstant.EVALUATION_INDEX) + @PostMapping("updateDeptIndexMonthly") + public Result updateDeptIndexMonthly(){ + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq("ORG_TYPE", "department"); + List list=screenIndexDataMonthlyDao.selectList(wrapper); + int updateNum=0; + for(ScreenIndexDataMonthlyEntity entity:list){ + if(StringUtils.isNotBlank(entity.getParentId())){ + ScreenCustomerAgencyEntity agencyEntity=screenCustomerAgencyDao.selectByAgencyId(entity.getParentId()); + if(null!=agencyEntity){ + //根组织下的部门 + if("0".equals(agencyEntity.getPid())){ + log.info("根组织下的部门"); + entity.setAllParentIds(agencyEntity.getAgencyId()); + }else{ + entity.setAllParentIds(agencyEntity.getPids().concat(",").concat(agencyEntity.getAgencyId())); + } + updateNum+=screenIndexDataMonthlyDao.updateParentIdsById(entity.getId(),entity.getAllParentIds()); + } + } + } + log.info("影响行数="+updateNum); + return new Result(); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java index 925c5c728f..ecb417b9b6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java @@ -95,4 +95,6 @@ public interface ScreenIndexDataMonthlyDao extends BaseDao + + + update screen_index_data_monthly m3 + SET m3.ALL_PARENT_IDS =#{allParentIds} + where m3.id=#{id} + From 7c6ac4a364cc3ace025775fa2fb949a3a5b3da9a Mon Sep 17 00:00:00 2001 From: jianjun Date: Sat, 10 Oct 2020 18:34:06 +0800 Subject: [PATCH 03/15] =?UTF-8?q?data=5Fmonthly=E6=8F=92=E5=85=A5=E6=97=B6?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0allPids?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/IndexDataMonthlyFormDTO.java | 5 ++ .../impl/FactIndexCollectServiceImpl.java | 72 +++++++++++++++---- .../screen/ScreenCustomerAgencyDao.xml | 3 +- .../screen/ScreenCustomerGridDao.xml | 3 +- .../screen/ScreenIndexDataMonthlyDao.xml | 2 + 5 files changed, 68 insertions(+), 17 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataMonthlyFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataMonthlyFormDTO.java index 4adf142a12..5c730099e4 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataMonthlyFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataMonthlyFormDTO.java @@ -41,6 +41,11 @@ public class IndexDataMonthlyFormDTO implements Serializable { */ private String parentId; + /** + * 所有上级ID,用英文逗号分开 + */ + private String allParentIds; + /** * 组织名称 */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java index 0732ac80c5..e21d0055d6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java @@ -2,6 +2,7 @@ package com.epmet.service.evaluationindex.indexcoll.impl; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.constant.DataSourceConstant; import com.epmet.constant.OrgTypeConstant; @@ -23,16 +24,20 @@ import com.epmet.entity.evaluationindex.screen.ScreenCustomerAgencyEntity; import com.epmet.entity.evaluationindex.screen.ScreenCustomerDeptEntity; import com.epmet.eum.IndexCodeEnum; import com.epmet.service.evaluationindex.indexcoll.FactIndexCollectService; +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; /** @@ -43,6 +48,7 @@ import java.util.stream.Collectors; @Service @DataSource(DataSourceConstant.EVALUATION_INDEX) public class FactIndexCollectServiceImpl implements FactIndexCollectService { + Cache allParentIds = CacheBuilder.newBuilder().expireAfterWrite(2, TimeUnit.HOURS).build(); @Autowired private FactIndexPartyAblityCpcMonthlyDao factIndexPartyAblityCpcMonthlyDao; @@ -219,6 +225,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { // 根据年,汇总今年各项得到,计算平均值后 插入年表 screen_index_data_yearly this.insertIndexDataYear(monthId, customerId); + allParentIds.invalidateAll(); } /** @@ -283,6 +290,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { // 补充表中其他字段 monthlyDTO = this.supplementIndexDataMonthlyTable(monthId, OrgTypeConstant.GRID, gridScoreDTOS.get(i).getGridId(), gridScoreDTOS.get(i).getParentAgencyId(), gridScoreDTOS.get(i).getGridName(), monthlyDTO); + monthlyDTO.setAllParentIds(gridScoreDTOS.get(i).getAllParentIds()); monthlyFormDTOList.add(monthlyDTO); } screenIndexDataMonthlyDao.batchInsertIndexDataMonthly(monthlyFormDTOList, customerId); @@ -298,21 +306,26 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { * @Author zhangyong * @Date 14:17 2020-09-03 **/ - private void insertIndexDataMonthlyByGridScore(String monthId, String customerId, List gridScoreDTOS){ + private void insertIndexDataMonthlyByGridScore(String monthId, String customerId, List gridScoreDTOS) { List monthlyFormDTOList = new ArrayList<>(); // 根据网格id进行分组,最后组装一条数据 一个网格 对应 4条数据 Map> collect = gridScoreDTOS.stream().collect(Collectors.groupingBy(FactIndexGridScoreDTO::getGridId)); // 查询网格的 上级组织id 和 组织名称 List parentGridList = screenCustomerGridDao.selectListGridInfo(customerId); - for(Map.Entry> gridScore : collect.entrySet()){ + if (!CollectionUtils.isEmpty(parentGridList)) { + parentGridList.forEach(o -> { + allParentIds.put(o.getGridId(), o.getGridId()); + }); + } + for (Map.Entry> gridScore : collect.entrySet()) { IndexDataMonthlyFormDTO monthlyFormDTO = new IndexDataMonthlyFormDTO(); // 给4个指数 赋默认值 monthlyFormDTO = this.setIndexDefaultValueFor(monthlyFormDTO); - for ( int i = 0; i < gridScore.getValue().size(); i++){ - if (NumConstant.ONE_STR.equals(gridScore.getValue().get(i).getIsTotal())){ + for (int i = 0; i < gridScore.getValue().size(); i++) { + if (NumConstant.ONE_STR.equals(gridScore.getValue().get(i).getIsTotal())) { // 是总分 - if (IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode().equals(gridScore.getValue().get(i).getIndexCode())){ + if (IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode().equals(gridScore.getValue().get(i).getIndexCode())) { // 总指数 = 网格相关 monthlyFormDTO.setIndexTotal(gridScore.getValue().get(i).getScore()); } @@ -339,6 +352,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { // 补充表中其他字段 monthlyFormDTO = this.supplementIndexDataMonthlyTable(monthId, OrgTypeConstant.GRID, gridScore.getKey(), parentAgencyId, gridName, monthlyFormDTO); + monthlyFormDTO.setAllParentIds(allParentIds.getIfPresent(monthlyFormDTO.getOrgId())); monthlyFormDTOList.add(monthlyFormDTO); } if (monthlyFormDTOList.size() > NumConstant.ZERO){ @@ -409,6 +423,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { // 补充表中其他字段 monthlyDTO = this.supplementIndexDataMonthlyTable(monthId, OrgTypeConstant.AGENCY, communityScoreDTOS.get(i).getAgencyId(), communityScoreDTOS.get(i).getPid(), communityScoreDTOS.get(i).getAgencyName(), monthlyDTO); + monthlyDTO.setAllParentIds(communityScoreDTOS.get(i).getPids()); monthlyFormDTOList.add(monthlyDTO); } screenIndexDataMonthlyDao.batchInsertIndexDataMonthly(monthlyFormDTOList, customerId); @@ -424,20 +439,25 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { * @Author zhangyong * @Date 14:17 2020-09-03 **/ - private void insertIndexDataMonthlyByCommunityScore(String monthId, String customerId, List communityScoreDTOS){ + private void insertIndexDataMonthlyByCommunityScore(String monthId, String customerId, List communityScoreDTOS) { List monthlyFormDTOList = new ArrayList<>(); // 根据组织id 进行分组,最后组装一条数据 一个组织id 对应 4条数据 Map> collect = communityScoreDTOS.stream().collect(Collectors.groupingBy(FactIndexCommunityScoreDTO::getAgencyId)); // 根据客户id,查询区/街道 组织名称、id List parentAgencyList = screenCustomerAgencyDao.selectListAgencyInfo(customerId); - for(Map.Entry> communityScore : collect.entrySet()){ + if (!CollectionUtils.isEmpty(parentAgencyList)) { + parentAgencyList.forEach(o -> { + allParentIds.put(o.getAgencyId(), o.getPids()); + }); + } + for (Map.Entry> communityScore : collect.entrySet()) { IndexDataMonthlyFormDTO monthlyFormDTO = new IndexDataMonthlyFormDTO(); // 给4个指数 赋默认值 monthlyFormDTO = this.setIndexDefaultValueFor(monthlyFormDTO); - for ( int i = 0; i < communityScore.getValue().size(); i++){ - if (NumConstant.ONE_STR.equals(communityScore.getValue().get(i).getIsTotal())){ + for (int i = 0; i < communityScore.getValue().size(); i++) { + if (NumConstant.ONE_STR.equals(communityScore.getValue().get(i).getIsTotal())) { // 是总分 - if (IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode().equals(communityScore.getValue().get(i).getIndexCode())){ + if (IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode().equals(communityScore.getValue().get(i).getIndexCode())) { // 总指数 = 社区相关 monthlyFormDTO.setIndexTotal(communityScore.getValue().get(i).getScore()); } @@ -465,6 +485,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { // 补充表中其他字段 monthlyFormDTO = this.supplementIndexDataMonthlyTable(monthId, OrgTypeConstant.AGENCY, communityScore.getKey(), parentAgencyId, agencyName, monthlyFormDTO); + monthlyFormDTO.setAllParentIds(allParentIds.getIfPresent(monthlyFormDTO.getOrgId())); // 补充表中其他字段 monthlyFormDTOList.add(monthlyFormDTO); } @@ -497,7 +518,13 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { mismatchDeptList = screenCustomerDeptDao.selectListMismatchDeptInfo(customerId, null); } - if (!CollectionUtils.isEmpty(mismatchDeptList)){ + if (!CollectionUtils.isEmpty(mismatchDeptList)) { + mismatchDeptList.forEach(o -> { + String pids = allParentIds.getIfPresent(o.getParentAgencyId()); + if (!StringUtils.isEmpty(pids)) { + allParentIds.put(o.getDeptId(), pids.concat(StrConstant.COLON).concat(o.getParentAgencyId())); + } + }); // 如果进行不匹配查询,查到了其他部门信息,一律赋默认值 this.insertIndexMonthlyByDeptDefaultScore(monthId, customerId, mismatchDeptList); } @@ -534,6 +561,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { // 补充表中其他字段 monthlyDTO = this.supplementIndexDataMonthlyTable(monthId, OrgTypeConstant.DEPARTMENT, deptScoreDTOS.get(i).getDeptId(), deptScoreDTOS.get(i).getParentAgencyId(), deptScoreDTOS.get(i).getDeptName(), monthlyDTO); + monthlyDTO.setAllParentIds(allParentIds.getIfPresent(monthlyDTO.getOrgId())); monthlyFormDTOList.add(monthlyDTO); } screenIndexDataMonthlyDao.batchInsertIndexDataMonthly(monthlyFormDTOList, customerId); @@ -579,12 +607,17 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { deptName = deptEntity.getDeptName(); } } - if ("".equals(parentAgencyId)){ + if ("".equals(parentAgencyId)) { throw new RuntimeException("在screen_customer_dept表中未查询到该客户下的父级信息:customerId =" + customerId + ", deptId = " + deptScore.getKey()); } // 补充表中其他字段 monthlyFormDTO = this.supplementIndexDataMonthlyTable(monthId, OrgTypeConstant.DEPARTMENT, deptScore.getKey(), parentAgencyId, deptName, monthlyFormDTO); + //部门表没有 allParentIds 所以直接获取 然后拼接 + String ppIds = allParentIds.getIfPresent(monthlyFormDTO.getParentId()); + if (!StringUtils.isEmpty(ppIds)) { + monthlyFormDTO.setAllParentIds(ppIds.concat(StrConstant.COLON).concat(monthlyFormDTO.getParentId())); + } monthlyFormDTOList.add(monthlyFormDTO); } if (monthlyFormDTOList.size() > NumConstant.ZERO){ @@ -634,13 +667,18 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { * @Author zhangyong * @Date 14:17 2020-09-03 **/ - private void insertIndexDataMonthlyByAgencyScore(String monthId, String customerId, List agencyScoreDTOS){ + private void insertIndexDataMonthlyByAgencyScore(String monthId, String customerId, List agencyScoreDTOS) { List monthlyFormDTOList = new ArrayList<>(); // 根据组织id(eg:社区或者街道id) 进行分组,最后组装一条数据 一个组织id 对应 4条数据 Map> collect = agencyScoreDTOS.stream().collect(Collectors.groupingBy(AgencyScoreDTO::getAgencyId)); List parentAgencyList = screenCustomerAgencyDao.selectListAgencyInfo(customerId); int j = 0; - for(Map.Entry> agencyScore : collect.entrySet()){ + if (!CollectionUtils.isEmpty(parentAgencyList)) { + parentAgencyList.forEach(o -> { + allParentIds.put(o.getAgencyId(), o.getPids()); + }); + } + for (Map.Entry> agencyScore : collect.entrySet()) { if (NumConstant.ZERO_STR.equals(agencyScore.getKey())) { log.warn("insertIndexDataMonthlyByAgencyScore agencyyId is 0"); continue; @@ -669,12 +707,16 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { agencyName = agencyScoreDTO.getAgencyName(); } } - if ("".equals(agencyName)){ + if ("".equals(agencyName)) { throw new RuntimeException("在screen_customer_agency表中未查询到该客户下的组织名称:customerId =" + customerId + ", agencyId = " + agencyScore.getKey()); } // 补充表中其他字段 monthlyFormDTO = this.supplementIndexDataMonthlyTable(monthId, OrgTypeConstant.AGENCY, agencyScore.getKey(), parentAgencyId, agencyName, monthlyFormDTO); + if ("S2-C1".equals(monthlyFormDTO.getOrgId())) { + System.out.println("======" + allParentIds.getIfPresent(monthlyFormDTO.getOrgId())); + } + monthlyFormDTO.setAllParentIds(allParentIds.getIfPresent(monthlyFormDTO.getOrgId())); monthlyFormDTOList.add(monthlyFormDTO); } if (monthlyFormDTOList.size() > NumConstant.ZERO){ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml index 1c1907e4a7..83a948ed38 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml @@ -81,7 +81,8 @@ + + From a058db69d49840eab8cd0b2cca6214fb0f494f2d Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 12 Oct 2020 09:20:44 +0800 Subject: [PATCH 05/15] =?UTF-8?q?=E5=85=88=E8=BF=9B=E6=94=AF=E9=83=A8?= =?UTF-8?q?=E6=8E=92=E8=A1=8Csql=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml index ce6e942389..26e433c67f 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml @@ -209,6 +209,7 @@ dm.del_flag = '0' AND rd.del_flag = '0' AND dm.org_type = 'grid' + AND dm.month_id = #{monthId} AND dm.all_parent_ids LIKE concat('%', #{agencyId}, '%') From 8cee53e3903d180507db4990febe872cc879e3c8 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 12 Oct 2020 09:49:27 +0800 Subject: [PATCH 06/15] =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluationindex/screen/impl/IndexServiceImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java index 13ff3a5367..5fee90fb73 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java @@ -317,8 +317,10 @@ public class IndexServiceImpl implements IndexService { list.forEach(l->{ BigDecimal num = new BigDecimal(l.getTotalScore()).setScale(1, BigDecimal.ROUND_HALF_UP).stripTrailingZeros(); l.setScroe(num); - l.setSatisfactionRatio(nf.format(Double.parseDouble(l.getSatisfactionRatio()))); - l.setClosedProjectRatio(nf.format(Double.parseDouble(l.getClosedProjectRatio()))); + BigDecimal num1 = new BigDecimal(l.getSatisfactionRatio()).setScale(1, BigDecimal.ROUND_HALF_UP); + l.setSatisfactionRatio(num1 + "%"); + BigDecimal num2 = new BigDecimal(l.getClosedProjectRatio()).setScale(1, BigDecimal.ROUND_HALF_UP); + l.setClosedProjectRatio(num2 + "%"); }); return list; From 0236e69debf7bad4918566fced20a13a7bdbebeb Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 12 Oct 2020 09:56:49 +0800 Subject: [PATCH 07/15] =?UTF-8?q?=E5=85=88=E8=BF=9B=E6=94=AF=E9=83=A8?= =?UTF-8?q?=E6=8E=92=E8=A1=8C=E6=8C=89=E6=80=BB=E6=8C=87=E6=A0=87=E5=88=86?= =?UTF-8?q?=E9=99=8D=E5=BA=8F=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml index 26e433c67f..3543c79438 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml @@ -211,6 +211,7 @@ AND dm.org_type = 'grid' AND dm.month_id = #{monthId} AND dm.all_parent_ids LIKE concat('%', #{agencyId}, '%') + ORDER BY dm.index_total DESC From b9682cb90dc41b89b2caa5b852c1e59e38227a2d Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 12 Oct 2020 10:08:43 +0800 Subject: [PATCH 08/15] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml index 3543c79438..399d1defa1 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml @@ -205,6 +205,7 @@ FROM screen_index_data_monthly dm INNER JOIN screen_org_rank_data rd ON dm.org_id = rd.org_id + AND dm.month_id = rd.month_id WHERE dm.del_flag = '0' AND rd.del_flag = '0' From 15aabc7d228839716ede5022fb8c8691a9279a81 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 12 Oct 2020 10:29:22 +0800 Subject: [PATCH 09/15] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E7=BA=A7=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcoll/impl/FactIndexCollectServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java index e21d0055d6..83a66a67d2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java @@ -608,7 +608,8 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { } } if ("".equals(parentAgencyId)) { - throw new RuntimeException("在screen_customer_dept表中未查询到该客户下的父级信息:customerId =" + customerId + ", deptId = " + deptScore.getKey()); + log.error("在screen_customer_dept表中未查询到该客户下的父级信息:customerId =" + customerId + ", deptId = " + deptScore.getKey()); + continue; } // 补充表中其他字段 monthlyFormDTO = this.supplementIndexDataMonthlyTable(monthId, OrgTypeConstant.DEPARTMENT, deptScore.getKey(), From b7a60f325953ba8b74cb1ebcd4b2a5cc7192d80d Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 12 Oct 2020 10:39:42 +0800 Subject: [PATCH 10/15] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml index 399d1defa1..3b655a6481 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml @@ -213,6 +213,7 @@ AND dm.month_id = #{monthId} AND dm.all_parent_ids LIKE concat('%', #{agencyId}, '%') ORDER BY dm.index_total DESC + LIMIT #{topNum} From d2c0aedf7b7fb9feb9f863150f24e0a7ae65482a Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 12 Oct 2020 10:40:36 +0800 Subject: [PATCH 11/15] =?UTF-8?q?log=E7=BA=A7=E5=88=AB=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcal/impl/IndexCalculateCommunityServiceImpl.java | 6 +++--- .../indexcal/impl/IndexCalculateDistrictServiceImpl.java | 6 +++--- .../indexcal/impl/IndexCalculateStreetServiceImpl.java | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java index e1efb04152..f8f20cc1dd 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java @@ -204,7 +204,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni if (IndexCodeEnum.XIA_SHU_SUO_YOU_WGDDJNLPJZ.getCode().equals(detail.getIndexCode())) { List subGridPartyAvgScore = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { - log.error(IndexCalConstant.GRID_PARTY_AVG_NULL); + log.warn(IndexCalConstant.GRID_PARTY_AVG_NULL); } else { MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridPartyAvgScore.stream().map(o -> o.getScore()).collect(Collectors.toList())); List> subPartyAvgList = ListUtils.partition(subGridPartyAvgScore, IndexCalConstant.PAGE_SIZE); @@ -298,7 +298,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni // 治理能力的六个五级指标 List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbility(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); if (CollectionUtils.isEmpty(communityGovernAbility)){ - log.error(IndexCalConstant.COMMUNITY_GOVERN_ABILITY_NULL); + log.warn(IndexCalConstant.COMMUNITY_GOVERN_ABILITY_NULL); }else{ String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); if (StringUtils.isEmpty(fieldNameByIndexCode)) { @@ -370,7 +370,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni } else { List> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMap(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); if (CollectionUtils.isEmpty(communityActivityCountList)) { - log.error(IndexCalConstant.COMMUNITY_SERVICE_ABILITY_NULL); + log.warn(IndexCalConstant.COMMUNITY_SERVICE_ABILITY_NULL); }else{ String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); if (StringUtils.isEmpty(fieldNameByIndexCode)) { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java index 8977849482..ed96d66b01 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java @@ -202,7 +202,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict if (IndexCodeEnum.QU_XIA_JI_JIE_DDJNLHZPJZ.getCode().equals(detail.getIndexCode())) { List subGridPartyAvgScore = agencyScoreDao.selectAgencyScoreAvg(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL); if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { - log.error(IndexCalConstant.DISTRICT_PARTY_AVG_NULL); + log.warn(IndexCalConstant.DISTRICT_PARTY_AVG_NULL); } else if (subGridPartyAvgScore.size() > NumConstant.ZERO) { MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridPartyAvgScore.stream().map(o -> o.getScore()).collect(Collectors.toList())); List> subPartyAvgList = ListUtils.partition(subGridPartyAvgScore, IndexCalConstant.PAGE_SIZE); @@ -283,7 +283,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict } } if (CollectionUtils.isEmpty(districtGovernAvgList)) { - log.error("查询所有街道治理能力平均值集合为空"); + log.warn("查询所有街道治理能力平均值集合为空"); } else{ MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(districtGovernAvgList.stream().map(o -> o.getScore()).collect(Collectors.toList())); List> governAvg = ListUtils.partition(districtGovernAvgList, IndexCalConstant.PAGE_SIZE); @@ -363,7 +363,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict } } if (CollectionUtils.isEmpty(subStreetAvgList)) { - log.error("查询区下属街道服务能力汇总平均值集合为空"); + log.warn("查询区下属街道服务能力汇总平均值集合为空"); } else{ MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subStreetAvgList.stream().map(o -> o.getScore()).collect(Collectors.toList())); List> serviceAvgList = ListUtils.partition(subStreetAvgList, IndexCalConstant.PAGE_SIZE); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java index a36ba5f471..e35b267ccd 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java @@ -205,7 +205,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ if (IndexCodeEnum.JIE_DAO_XIA_SHU_SYSQDJNLHZPJZ.getCode().equals(detail.getIndexCode())) { List subCommPartyAvgScore = communityScoreDao.selectSubCommAvgScore(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); if (CollectionUtils.isEmpty(subCommPartyAvgScore)) { - log.error(IndexCalConstant.COMMUNITY_PARTY_AVG_NULL); + log.warn(IndexCalConstant.COMMUNITY_PARTY_AVG_NULL); } else if (subCommPartyAvgScore.size() > NumConstant.ZERO) { MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subCommPartyAvgScore.stream().map(o -> o.getScore()).collect(Collectors.toList())); Integer indexEnd = NumConstant.TEN; @@ -299,7 +299,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ // 治理能力的六个五级指标 List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbility(customerId, monthId,IndexCalConstant.STREET_LEVEL); if (CollectionUtils.isEmpty(communityGovernAbility)){ - log.error(IndexCalConstant.STREET_GOVERN_ABILITY_NULL); + log.warn(IndexCalConstant.STREET_GOVERN_ABILITY_NULL); }else{ String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); if (StringUtils.isEmpty(fieldNameByIndexCode)) { @@ -371,7 +371,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ } else { List> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMap(customerId, monthId,IndexCalConstant.STREET_LEVEL); if (CollectionUtils.isEmpty(communityActivityCountList)) { - log.error(IndexCalConstant.STREET_SERVICE_ABILITY_NULL); + log.warn(IndexCalConstant.STREET_SERVICE_ABILITY_NULL); }else{ String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); if (StringUtils.isEmpty(fieldNameByIndexCode)) { From bd9a662942749fe3ee5ac9a56ae6a8f036c76168 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 12 Oct 2020 10:54:34 +0800 Subject: [PATCH 12/15] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E7=BA=A7=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluationindex/indexcal/impl/DeptScoreServiceImpl.java | 2 +- .../indexcal/impl/GridCorreLationServiceImpl.java | 2 +- .../indexcal/impl/IndexCalculateCommunityServiceImpl.java | 2 +- .../indexcal/impl/IndexCalculateDistrictServiceImpl.java | 2 +- .../indexcal/impl/IndexCalculateStreetServiceImpl.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java index 33246cad86..f4d97de2aa 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java @@ -134,7 +134,7 @@ public class DeptScoreServiceImpl extends BaseServiceImpl subScore = deptSubScoreDao.selectSubListByPath(formDTO.getCustomerId(), formDTO.getMonthId(), levelIndexPath); if (CollectionUtils.isEmpty(subScore)) { - log.error("calculateSelfSubScore communitySubScoreDao.selectSubListByPath return empty,customerId:{} ", formDTO.getCustomerId()); + log.warn("calculateSelfSubScore communitySubScoreDao.selectSubListByPath return empty,customerId:{} ", formDTO.getCustomerId()); return; } Map> selfSubParentMap = new HashMap<>(); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java index e76b18513a..f0c4d272d3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java @@ -123,7 +123,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //获取该能力下的分数 List subScore = gridSubScoreDao.selectSubListByPath(formDTO.getCustomerId(), formDTO.getMonthId(), levelIndexPath); if (CollectionUtils.isEmpty(subScore)) { - log.error("calculateSelfSubScore gridSubScoreDao.selectSubListByPath return empty,customerId:{} ", formDTO.getCustomerId()); + log.warn("calculateSelfSubScore gridSubScoreDao.selectSubListByPath return empty,customerId:{} ", formDTO.getCustomerId()); return; } Map> selfSubParentMap = new HashMap<>(); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java index f8f20cc1dd..88e6b14578 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java @@ -132,7 +132,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni //获取该能力下的分数 List subScore = communitySubScoreDao.selectSubListByPath(formDTO.getCustomerId(), formDTO.getMonthId(), levelIndexPath); if (CollectionUtils.isEmpty(subScore)) { - log.error("calculateSelfSubScore communitySubScoreDao.selectSubListByPath return empty,customerId:{} ", formDTO.getCustomerId()); + log.warn("calculateSelfSubScore communitySubScoreDao.selectSubListByPath return empty,customerId:{} ", formDTO.getCustomerId()); return; } Map> selfSubParentMap = new HashMap<>(); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java index ed96d66b01..9334fa2351 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java @@ -130,7 +130,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict //获取该能力下的分数 List subScore = agencySubScoreDao.selectSubListByPath(formDTO.getCustomerId(), formDTO.getMonthId(), OrgTypeConstant.DISTRICT, levelIndexPath); if (CollectionUtils.isEmpty(subScore)) { - log.error("calculateSelfSubScore communitySubScoreDao.selectSubListByPath return empty,customerId:{} ", formDTO.getCustomerId()); + log.warn("calculateSelfSubScore communitySubScoreDao.selectSubListByPath return empty,customerId:{} ", formDTO.getCustomerId()); return; } Map> selfSubParentMap = new HashMap<>(); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java index e35b267ccd..4809870eef 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java @@ -133,7 +133,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ //获取该能力下的分数 List subScore = agencySubScoreDao.selectSubListByPath(formDTO.getCustomerId(), formDTO.getMonthId(), OrgTypeConstant.STREET, levelIndexPath); if (CollectionUtils.isEmpty(subScore)) { - log.error("calculateSelfSubScore communitySubScoreDao.selectSubListByPath return empty,customerId:{} ", formDTO.getCustomerId()); + log.warn("calculateSelfSubScore communitySubScoreDao.selectSubListByPath return empty,customerId:{} ", formDTO.getCustomerId()); return; } Map> selfSubParentMap = new HashMap<>(); From 40dd58b8cab8ed697996ece9bb2e9b6e0630f24a Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 12 Oct 2020 13:49:52 +0800 Subject: [PATCH 13/15] =?UTF-8?q?=E7=BB=84=E7=BB=87=E6=9C=88=E5=BA=A6?= =?UTF-8?q?=E6=8C=87=E6=95=B0=E5=BE=97=E5=88=86=E6=80=BB=E5=88=86=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E7=B4=AF=E5=8A=A0=E5=92=8C=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluationindex/screen/impl/IndexServiceImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java index 5fee90fb73..1effbe941f 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java @@ -285,8 +285,6 @@ public class IndexServiceImpl implements IndexService { NumberFormat nf = NumberFormat.getPercentInstance(); nf.setMaximumFractionDigits(1); - BigDecimal num = new BigDecimal(resultDTO.getTotal()).setScale(1, BigDecimal.ROUND_HALF_UP).stripTrailingZeros(); - resultDTO.setTotalScore(num); BigDecimal num1 = new BigDecimal(resultDTO.getParty()).setScale(1, BigDecimal.ROUND_HALF_UP).stripTrailingZeros(); resultDTO.setPartyDevAbility(num1); resultDTO.setPartyDevAbilityWeight(nf.format(Double.parseDouble(resultDTO.getPartyDevAbilityWeight()))); @@ -296,6 +294,9 @@ public class IndexServiceImpl implements IndexService { BigDecimal num3 = new BigDecimal(resultDTO.getService()).setScale(1, BigDecimal.ROUND_HALF_UP).stripTrailingZeros(); resultDTO.setServiceAbility(num3); resultDTO.setServiceAbilityWeight(nf.format(Double.parseDouble(resultDTO.getServiceAbilityWeight()))); + Double db = Double.parseDouble(resultDTO.getParty())+Double.parseDouble(resultDTO.getGovern())+Double.parseDouble(resultDTO.getService()); + BigDecimal num = new BigDecimal(db.toString()).setScale(1, BigDecimal.ROUND_HALF_UP).stripTrailingZeros(); + resultDTO.setTotalScore(num); return resultDTO; } From 66d5818b42d43da18b045c3b907ba8b325a053e4 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 12 Oct 2020 14:16:32 +0800 Subject: [PATCH 14/15] =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/evaluationindex/screen/impl/IndexServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java index 1effbe941f..01b433dc0d 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java @@ -294,7 +294,7 @@ public class IndexServiceImpl implements IndexService { BigDecimal num3 = new BigDecimal(resultDTO.getService()).setScale(1, BigDecimal.ROUND_HALF_UP).stripTrailingZeros(); resultDTO.setServiceAbility(num3); resultDTO.setServiceAbilityWeight(nf.format(Double.parseDouble(resultDTO.getServiceAbilityWeight()))); - Double db = Double.parseDouble(resultDTO.getParty())+Double.parseDouble(resultDTO.getGovern())+Double.parseDouble(resultDTO.getService()); + Double db = num1.doubleValue() + num2.doubleValue() + num3.doubleValue(); BigDecimal num = new BigDecimal(db.toString()).setScale(1, BigDecimal.ROUND_HALF_UP).stripTrailingZeros(); resultDTO.setTotalScore(num); From d825f75e73eefea5b11d817d2a05bfcd19a5d5eb Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 12 Oct 2020 17:33:33 +0800 Subject: [PATCH 15/15] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E5=85=88=E9=94=8B?= =?UTF-8?q?=E6=A8=A1=E8=8C=83=EF=BC=8C=E5=B7=B2=E8=A7=A3=E5=86=B3=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=EF=BC=8C=E5=8D=A0=E5=B7=B2=E7=BB=93=E6=A1=88=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E5=8D=A0=E6=AF=94=20=20sql=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/FactOriginProjectMainDailyDao.java | 12 ++++++++---- .../todata/FactOriginProjectMainDailyService.java | 11 ++++++----- .../FactOriginProjectMainDailyServiceImpl.java | 14 ++++++++------ .../impl/PioneerDataExtractServiceImpl.java | 5 +++-- .../extract/FactOriginProjectMainDailyDao.xml | 10 ++++++++-- 5 files changed, 33 insertions(+), 19 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java index 4ed5d1303c..bdadee2f52 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java @@ -113,7 +113,8 @@ public interface FactOriginProjectMainDailyDao extends BaseDao - and t1.CLOSED_STATUS=#{closedStatus} + and t1.IS_RESOLVED=#{closedStatus} + + + and t1.PROJECT_STATUS=#{projectStatus} @@ -175,7 +178,10 @@ AND T1.CUSTOMER_ID = #{customerId} and t1.PIDS LIKE CONCAT(#{agencyPath},'%') - and t1.CLOSED_STATUS=#{closedStatus} + and t1.IS_RESOLVED=#{closedStatus} + + + and t1.PROJECT_STATUS=#{projectStatus}