Browse Source

网格分类统计修改

master
zxc 4 years ago
parent
commit
254aa70959
  1. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/PingYinConstant.java
  2. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectCategoryDailyDao.java
  3. 12
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectCategoryDailyServiceImpl.java
  4. 4
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectCategoryDailyDao.xml

3
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";
}

2
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<FactOriginPro
* @description 计算当前客户下各个网格内各项目分类下项目数量
* @Date 2021/3/23 9:58
**/
List<ScreenProjectCategoryGridDailyDTO> selectListProjectCategoryGridDailyDTO(@Param("customerId") String customerId);
List<ScreenProjectCategoryGridDailyDTO> selectListProjectCategoryGridDailyDTO(@Param("customerId") String customerId,@Param("subCount")Integer subCount);
/**
* @Description 查询客户下组织直接立项的各项目分类下的项目数量筛选组织创建的项目fact_origin_project_main_daily表gridId为空

12
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<F
**/
@Override
public List<ScreenProjectCategoryGridDailyDTO> selectListProjectCategoryGridDailyDTO(String customerId) {
List<ScreenProjectCategoryGridDailyDTO> list=baseDao.selectListProjectCategoryGridDailyDTO(customerId);
List<ScreenProjectCategoryGridDailyDTO> 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

4
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,

Loading…
Cancel
Save