|
@ -4,14 +4,16 @@ import com.epmet.commons.dynamic.datasource.annotation.DataSource; |
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
import com.epmet.commons.tools.utils.DateUtils; |
|
|
import com.epmet.commons.tools.utils.DateUtils; |
|
|
import com.epmet.constant.DataSourceConstant; |
|
|
import com.epmet.constant.DataSourceConstant; |
|
|
import com.epmet.dao.stats.*; |
|
|
import com.epmet.dao.stats.FactAgencyProjectDailyDao; |
|
|
|
|
|
import com.epmet.dao.stats.FactGroupGridDailyDao; |
|
|
|
|
|
import com.epmet.dao.stats.FactIssueGridDailyDao; |
|
|
import com.epmet.dao.stats.topic.FactTopicTotalGridDailyDao; |
|
|
import com.epmet.dao.stats.topic.FactTopicTotalGridDailyDao; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.epmet.dao.stats.user.FactRegUserGridDailyDao; |
|
|
import com.epmet.dao.stats.user.FactRegUserGridDailyDao; |
|
|
|
|
|
import com.epmet.dto.org.result.OrgStaffDTO; |
|
|
import com.epmet.entity.evaluationindex.screen.ScreenUserTotalDataEntity; |
|
|
import com.epmet.entity.evaluationindex.screen.ScreenUserTotalDataEntity; |
|
|
|
|
|
import com.epmet.service.org.CustomerAgencyService; |
|
|
import com.epmet.service.stats.ScreenCentralZoneDataExtractService; |
|
|
import com.epmet.service.stats.ScreenCentralZoneDataExtractService; |
|
|
|
|
|
import com.epmet.service.user.UserService; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
@ -43,7 +45,10 @@ public class ScreenCentralZoneDataExtractServiceImpl implements ScreenCentralZon |
|
|
private FactIssueGridDailyDao factIssueGridDailyDao; |
|
|
private FactIssueGridDailyDao factIssueGridDailyDao; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private FactAgencyProjectDailyDao factAgencyProjectDailyDao; |
|
|
private FactAgencyProjectDailyDao factAgencyProjectDailyDao; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private CustomerAgencyService customerAgencyService; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private UserService userService; |
|
|
|
|
|
|
|
|
private final String ORG_LEVEL_AGENCY = "agency"; |
|
|
private final String ORG_LEVEL_AGENCY = "agency"; |
|
|
private final String ORG_LEVEL_GRID = "grid"; |
|
|
private final String ORG_LEVEL_GRID = "grid"; |
|
@ -155,6 +160,10 @@ public class ScreenCentralZoneDataExtractServiceImpl implements ScreenCentralZon |
|
|
Map<String,Integer> projectMap = agencyProject.stream().collect(Collectors.toMap(ScreenUserTotalDataEntity::getOrgId,ScreenUserTotalDataEntity::getProjectTotal)); |
|
|
Map<String,Integer> projectMap = agencyProject.stream().collect(Collectors.toMap(ScreenUserTotalDataEntity::getOrgId,ScreenUserTotalDataEntity::getProjectTotal)); |
|
|
projectMap.putAll(gridProject.stream().collect(Collectors.toMap(ScreenUserTotalDataEntity::getOrgId,ScreenUserTotalDataEntity::getProjectTotal))); |
|
|
projectMap.putAll(gridProject.stream().collect(Collectors.toMap(ScreenUserTotalDataEntity::getOrgId,ScreenUserTotalDataEntity::getProjectTotal))); |
|
|
|
|
|
|
|
|
|
|
|
//For:06.01新增:orgType=agency或者grid的时候,此列赋值:当前组织或者当前网格内的网格员人数
|
|
|
|
|
|
List<OrgStaffDTO> orgStaffDTOList=customerAgencyService.queryOrgStaffIds(customerId); |
|
|
|
|
|
Map<String,Integer> gridManagerMap=userService.queryOrgGridManager(customerId,orgStaffDTOList); |
|
|
|
|
|
|
|
|
result.forEach(o -> { |
|
|
result.forEach(o -> { |
|
|
String orgId = o.getOrgId(); |
|
|
String orgId = o.getOrgId(); |
|
|
Integer count = groupMap.get(orgId); |
|
|
Integer count = groupMap.get(orgId); |
|
@ -169,10 +178,14 @@ public class ScreenCentralZoneDataExtractServiceImpl implements ScreenCentralZon |
|
|
count = projectMap.get(orgId); |
|
|
count = projectMap.get(orgId); |
|
|
o.setProjectTotal(null == count ? NumConstant.ZERO : count); |
|
|
o.setProjectTotal(null == count ? NumConstant.ZERO : count); |
|
|
o.setDataEndTime(dimId); |
|
|
o.setDataEndTime(dimId); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//For:06.01新增:orgType=agency或者grid的时候,此列赋值:当前组织或者当前网格内的网格员人数
|
|
|
|
|
|
if(gridManagerMap.containsKey(orgId)){ |
|
|
|
|
|
o.setGridMemberTotal(gridManagerMap.get(orgId)); |
|
|
|
|
|
}else{ |
|
|
|
|
|
o.setGridMemberTotal(NumConstant.ZERO); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
return result; |
|
|
return result; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|