From 956d31e5f8b0fa31edf72c15b3c72b3c91c30fa1 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 15 Oct 2021 14:16:14 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E7=AB=8B=E9=A1=B9?= =?UTF-8?q?=E7=9A=84=E6=9F=A5=E8=AF=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/FactOriginProjectCategoryDailyDao.java | 2 +- .../extract/todata/FactOriginProjectCategoryDailyService.java | 2 +- .../impl/FactOriginProjectCategoryDailyServiceImpl.java | 4 ++-- .../screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java | 4 ++-- .../extract/FactOriginProjectCategoryDailyDao.xml | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectCategoryDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectCategoryDailyDao.java index dcd9105781..5766f27aa4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectCategoryDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectCategoryDailyDao.java @@ -50,7 +50,7 @@ public interface FactOriginProjectCategoryDailyDao extends BaseDao selectListProjectCategoryByOrg(@Param("orgIds")List orgIds,@Param("customerId") String customerId); + List selectListProjectCategoryByOrg(@Param("orgIds")List orgIds,@Param("customerId") String customerId,@Param("subCount") Integer subCount); int deleteByProjectIds(@Param("list") List list); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectCategoryDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectCategoryDailyService.java index 2da14685eb..1252a4739c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectCategoryDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectCategoryDailyService.java @@ -54,5 +54,5 @@ public interface FactOriginProjectCategoryDailyService extends BaseService selectListProjectCategoryByOrg(List orgIds,String customerId); + List selectListProjectCategoryByOrg(List orgIds,String customerId,Integer subCount); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectCategoryDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectCategoryDailyServiceImpl.java index d1c8e145dc..58c83c8ba6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectCategoryDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectCategoryDailyServiceImpl.java @@ -147,10 +147,10 @@ public class FactOriginProjectCategoryDailyServiceImpl extends BaseServiceImpl selectListProjectCategoryByOrg(List orgIds,String customerId) { + public List selectListProjectCategoryByOrg(List orgIds,String customerId,Integer subCount) { if (!CollectionUtils.isEmpty(orgIds)){ return new ArrayList<>(); } - return baseDao.selectListProjectCategoryByOrg(orgIds,customerId); + return baseDao.selectListProjectCategoryByOrg(orgIds,customerId,subCount); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java index 902981793a..3d5eb874f7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java @@ -280,7 +280,7 @@ public class ScreenProjectCategoryOrgDailyServiceImpl extends BaseServiceImpl levelAgencyInfo = groupByLevel.get(level); if (!CollectionUtils.isEmpty(levelAgencyInfo)){ - List screenProjectCategory = factOriginProjectCategoryDailyService.selectListProjectCategoryByOrg(orgIds,customerId); + List screenProjectCategory = factOriginProjectCategoryDailyService.selectListProjectCategoryByOrg(orgIds,customerId,NumConstant.FOUR); if (!CollectionUtils.isEmpty(result)){ if (!CollectionUtils.isEmpty(screenProjectCategory)){ result.forEach(r -> { @@ -496,7 +496,7 @@ public class ScreenProjectCategoryOrgDailyServiceImpl extends BaseServiceImpl levelAgencyInfo = groupByLevel.get(level); if (!CollectionUtils.isEmpty(levelAgencyInfo)) { // 查询客户下,组织直接立项的,各项目分类下的项目数量【筛选组织创建的项目,fact_origin_project_main_daily表gridId为空】 - List screenProjectCategory = factOriginProjectCategoryDailyService.selectListProjectCategoryByOrg(orgIds, customerId); + List screenProjectCategory = factOriginProjectCategoryDailyService.selectListProjectCategoryByOrg(orgIds, customerId,NumConstant.TWO); log.info("直接立项的统计:"+screenProjectCategory); if (!CollectionUtils.isEmpty(result)) { if (!CollectionUtils.isEmpty(screenProjectCategory)) { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectCategoryDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectCategoryDailyDao.xml index 8bc9f15f92..874b96c47d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectCategoryDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectCategoryDailyDao.xml @@ -104,7 +104,7 @@ SELECT c.CUSTOMER_ID, c.CUSTOMER_ID AS categoryOriginCustomerId, - left(c.CATEGORY_CODE, 4) AS CATEGORY_CODE, + left(c.CATEGORY_CODE, #{subCount}) AS CATEGORY_CODE, '1' AS `LEVEL`, p.AGENCY_ID AS orgId, p.PID AS PID, @@ -120,6 +120,6 @@ ) AND p.GRID_ID = '' - GROUP BY c.CUSTOMER_ID, left(c.CATEGORY_CODE, 4), c.`LEVEL`, p.PID, p.AGENCY_ID, P.PIDS + GROUP BY c.CUSTOMER_ID, left(c.CATEGORY_CODE, #{subCount}), c.`LEVEL`, p.PID, p.AGENCY_ID, P.PIDS From 254aa70959899ccf6054cfde9502b60f5a0e666f Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 15 Oct 2021 14:25:42 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/constant/PingYinConstant.java | 3 +++ .../extract/FactOriginProjectCategoryDailyDao.java | 2 +- .../FactOriginProjectCategoryDailyServiceImpl.java | 12 +++++++++++- .../extract/FactOriginProjectCategoryDailyDao.xml | 4 ++-- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/PingYinConstant.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/PingYinConstant.java index 16526ef4fe..043e256c42 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/PingYinConstant.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/PingYinConstant.java @@ -15,4 +15,7 @@ public interface PingYinConstant { String YU_SHAN_AGENCY_ID = "1258587398679126017"; String YU_SHAN_CUSTOMER_ID = "a4bbf298d8e427844038cee466f022ef"; + + String TEST_PING_YIN_CUSTOMER_ID = "78e2b2227c07de1fe54da14e2b2d9eb6"; + String PROD_PING_YIN_CUSTOMER_ID = "6f203e30de1a65aab7e69c058826cd80"; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectCategoryDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectCategoryDailyDao.java index 5766f27aa4..58ba1f5bc9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectCategoryDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectCategoryDailyDao.java @@ -42,7 +42,7 @@ public interface FactOriginProjectCategoryDailyDao extends BaseDao selectListProjectCategoryGridDailyDTO(@Param("customerId") String customerId); + List selectListProjectCategoryGridDailyDTO(@Param("customerId") String customerId,@Param("subCount")Integer subCount); /** * @Description 查询客户下,组织直接立项的,各项目分类下的项目数量【筛选组织创建的项目,fact_origin_project_main_daily表gridId为空】 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectCategoryDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectCategoryDailyServiceImpl.java index 58c83c8ba6..083fe26a85 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectCategoryDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectCategoryDailyServiceImpl.java @@ -23,6 +23,8 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.constant.DataSourceConstant; +import com.epmet.constant.PingYinConstant; +import com.epmet.constant.PingYinConstants; import com.epmet.dao.evaluationindex.extract.FactOriginProjectCategoryDailyDao; import com.epmet.dto.ProjectCategoryDTO; import com.epmet.dto.extract.form.ExtractOriginFormDTO; @@ -136,10 +138,18 @@ public class FactOriginProjectCategoryDailyServiceImpl extends BaseServiceImpl selectListProjectCategoryGridDailyDTO(String customerId) { - List list=baseDao.selectListProjectCategoryGridDailyDTO(customerId); + List list=baseDao.selectListProjectCategoryGridDailyDTO(customerId,getSubCount(customerId)); return list; } + public Integer getSubCount(String customerId){ + Integer result = NumConstant.FOUR; + if (customerId.equals(PingYinConstant.TEST_PING_YIN_CUSTOMER_ID) || customerId.equals(PingYinConstant.PROD_PING_YIN_CUSTOMER_ID)){ + return NumConstant.TWO; + } + return result; + } + /** * @Description 查询客户下,组织直接立项的,各项目分类下的项目数量【筛选组织创建的项目,fact_origin_project_main_daily表gridId为空】 * @Param orgIds diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectCategoryDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectCategoryDailyDao.xml index 874b96c47d..cd1ced9860 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectCategoryDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectCategoryDailyDao.xml @@ -55,7 +55,7 @@ union all SELECT c.CUSTOMER_ID, - left(c.CATEGORY_CODE, 4) as CATEGORY_CODE, + left(c.CATEGORY_CODE, #{subCount}) as CATEGORY_CODE, '1'as `LEVEL`, p.GRID_ID, p.AGENCY_ID AS PID, @@ -70,7 +70,7 @@ AND c.CUSTOMER_ID = #{customerId} GROUP BY c.CUSTOMER_ID, - left(c.CATEGORY_CODE, 4), + left(c.CATEGORY_CODE, #{subCount}), c.`LEVEL`, p.GRID_ID, p.AGENCY_ID,