Browse Source

重复修改

dev_shibei_match
zxc 4 years ago
parent
commit
2bea7290b1
  1. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/PingYinConstant.java
  2. 30
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java
  3. 5
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.xml

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/PingYinConstant.java

@ -13,6 +13,6 @@ public interface PingYinConstant {
String JIN_SHUI_AGENCY_ID = "1215437824174608386";
String JIN_SHUI__CUSTOMER_ID = "f5ff0770f409981c73adda6ae35143ef";
String YU_SHAN_AGENCY_ID = "";
String YU_SHAN_AGENCY_ID = "1258587398679126017";
String YU_SHAN_CUSTOMER_ID = "a4bbf298d8e427844038cee466f022ef";
}

30
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java

@ -26,6 +26,7 @@ import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.constant.DataSourceConstant;
import com.epmet.constant.PingYinConstant;
import com.epmet.constant.ScreenConstant;
import com.epmet.dao.evaluationindex.screen.ScreenProjectCategoryGridDailyDao;
import com.epmet.dao.evaluationindex.screen.ScreenProjectCategoryOrgDailyDao;
@ -352,6 +353,7 @@ public class ScreenProjectCategoryOrgDailyServiceImpl extends BaseServiceImpl<Sc
*/
private void disposeMoreCustomerSub(String level,Boolean isGrid,String customerId, String dateId, List<CustomerRelationEntity> relationInfo,List<CustomerAgencyInfoResultDTO> agencyIdList){
List<ScreenProjectCategoryOrgDailyEntity> result = new ArrayList<>();
List<String> orgIds = new ArrayList<>();
if (isGrid){
// community级别走这
List<CategoryProjectResultDTO> categoryInfos = gridDailyDao.selectCategoryInfo(customerId, dateId,null,null);
@ -428,34 +430,18 @@ public class ScreenProjectCategoryOrgDailyServiceImpl extends BaseServiceImpl<Sc
List<ScreenProjectCategoryOrgDailyEntity> entities = ConvertUtils.sourceToTarget(sonResult, ScreenProjectCategoryOrgDailyEntity.class);
result.addAll(entities);
}
/*if (!CollectionUtils.isEmpty(categoryProjectExists)){
result.forEach(r -> {
categoryProjectExists.forEach(c -> {
if (r.getCategoryCode().equals(c.getCategoryCode())){
r.setProjectTotal(r.getProjectTotal() + c.getProjectTotal());
c.setStatus(true);
}
});
});
Map<Boolean, List<CategoryProjectResultDTO>> groupByStatus = categoryProjectExists.stream().collect(Collectors.groupingBy(CategoryProjectResultDTO::getStatus));
List<CategoryProjectResultDTO> categoryProjectFalse = groupByStatus.get(false);
if (!CollectionUtils.isEmpty(categoryProjectFalse)){
List<ScreenProjectCategoryOrgDailyEntity> f = ConvertUtils.sourceToTarget(categoryProjectFalse, ScreenProjectCategoryOrgDailyEntity.class);
result.addAll(f);
}
}
if (!CollectionUtils.isEmpty(categoryProjectNotExists)){
List<ScreenProjectCategoryOrgDailyEntity> notExists = ConvertUtils.sourceToTarget(categoryProjectNotExists, ScreenProjectCategoryOrgDailyEntity.class);
result.addAll(notExists);
}*/
// 添加此 锦水、孔村、榆山 orgId,删除时使用
orgIds.add(PingYinConstant.JIN_SHUI_AGENCY_ID);
orgIds.add(PingYinConstant.KONG_CUN_AGENCY_ID);
orgIds.add(PingYinConstant.YU_SHAN_AGENCY_ID);
}
}
// 目前不考虑计算子客户组织直接创建的项目,只算内部客户
List<String> orgIds = new ArrayList<>();
Map<String, List<CustomerAgencyInfoResultDTO>> groupByLevel = agencyIdList.stream().collect(Collectors.groupingBy(CustomerAgencyInfoResultDTO::getLevel));
List<CustomerAgencyInfoResultDTO> levelAgencyInfo = groupByLevel.get(level);
if (!CollectionUtils.isEmpty(levelAgencyInfo)) {
orgIds = levelAgencyInfo.stream().map(m -> m.getAgencyId()).collect(Collectors.toList());
List<String> orgIdss = levelAgencyInfo.stream().map(m -> m.getAgencyId()).collect(Collectors.toList());
orgIds.addAll(orgIdss);
// 查询客户下,组织直接立项的,各项目分类下的项目数量【筛选组织创建的项目,fact_origin_project_main_daily表gridId为空】
List<ScreenProjectCategoryGridDailyDTO> screenProjectCategory = factOriginProjectCategoryDailyService.selectListProjectCategoryByOrg(orgIds, customerId);
if (!CollectionUtils.isEmpty(result)) {

5
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.xml

@ -65,6 +65,11 @@
od.CUSTOMER_ID = #{id}
</foreach>
)
AND (
<foreach collection="customerIds" item="id" separator=" OR ">
cd.CUSTOMER_ID = #{id}
</foreach>
)
<if test="existsStatus == true">
AND cd.EPMET_CATEGORY_CODE IS NOT NULL
</if>

Loading…
Cancel
Save