|
@ -6,8 +6,6 @@ import com.epmet.constant.OrgTypeConstant; |
|
|
import com.epmet.dto.extract.result.OrgStatisticsResultDTO; |
|
|
import com.epmet.dto.extract.result.OrgStatisticsResultDTO; |
|
|
import com.epmet.dto.stats.user.FactRegUserAgencyMonthlyDTO; |
|
|
import com.epmet.dto.stats.user.FactRegUserAgencyMonthlyDTO; |
|
|
import com.epmet.dto.stats.user.FactRegUserGridMonthlyDTO; |
|
|
import com.epmet.dto.stats.user.FactRegUserGridMonthlyDTO; |
|
|
import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyEntity; |
|
|
|
|
|
import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyEntity; |
|
|
|
|
|
import com.epmet.entity.evaluationindex.screen.ScreenOrgRankDataEntity; |
|
|
import com.epmet.entity.evaluationindex.screen.ScreenOrgRankDataEntity; |
|
|
import com.epmet.service.evaluationindex.extract.todata.*; |
|
|
import com.epmet.service.evaluationindex.extract.todata.*; |
|
|
import com.epmet.service.evaluationindex.extract.toscreen.OrgRankExtractService; |
|
|
import com.epmet.service.evaluationindex.extract.toscreen.OrgRankExtractService; |
|
@ -17,9 +15,9 @@ import com.epmet.service.evaluationindex.screen.ScreenOrgRankDataService; |
|
|
import com.epmet.service.stats.user.FactRegUserAgencyMonthlyService; |
|
|
import com.epmet.service.stats.user.FactRegUserAgencyMonthlyService; |
|
|
import com.epmet.service.stats.user.FactRegUserGridMonthlyService; |
|
|
import com.epmet.service.stats.user.FactRegUserGridMonthlyService; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
|
import org.apache.commons.collections4.CollectionUtils; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.apache.commons.collections4.CollectionUtils; |
|
|
|
|
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
import java.math.BigDecimal; |
|
|
import java.math.RoundingMode; |
|
|
import java.math.RoundingMode; |
|
@ -184,11 +182,15 @@ public class OrgRankExtractServiceImpl implements OrgRankExtractService { |
|
|
)); |
|
|
)); |
|
|
} |
|
|
} |
|
|
//结案率 结案数/项目数
|
|
|
//结案率 结案数/项目数
|
|
|
List<FactIndexGovrnAblityOrgMonthlyEntity> abilityList = factIndexGovrnAblityOrgMonthlyService.getOrgByCustomer(customerId, monthId, OrgTypeConstant.COMMUNITY); |
|
|
List<OrgStatisticsResultDTO> closed = factOriginProjectLogDailyService.getAgencyClosed(customerId, monthId); |
|
|
if (CollectionUtils.isNotEmpty(abilityList)) { |
|
|
if (CollectionUtils.isNotEmpty(closed)) { |
|
|
list.forEach(entity -> abilityList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> |
|
|
list.forEach(entity -> closed.stream().filter(item -> item.getOrgId().equals(entity.getOrgId())).forEach(dto -> { |
|
|
entity.setCloseProjectRatio(dto.getClosedProjectRatio()) |
|
|
if (dto.getSum() != NumConstant.ZERO) { |
|
|
)); |
|
|
BigDecimal sum = new BigDecimal(dto.getSum()); |
|
|
|
|
|
BigDecimal count = new BigDecimal(dto.getCount()); |
|
|
|
|
|
entity.setCloseProjectRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
|
|
|
} |
|
|
|
|
|
})); |
|
|
} |
|
|
} |
|
|
//满意率 满意和非常满意占比
|
|
|
//满意率 满意和非常满意占比
|
|
|
List<OrgStatisticsResultDTO> satisfactionList = factOriginProjectLogDailyService.getOrgSatisfaction(customerId, monthId, OrgTypeConstant.COMMUNITY); |
|
|
List<OrgStatisticsResultDTO> satisfactionList = factOriginProjectLogDailyService.getOrgSatisfaction(customerId, monthId, OrgTypeConstant.COMMUNITY); |
|
@ -252,11 +254,15 @@ public class OrgRankExtractServiceImpl implements OrgRankExtractService { |
|
|
)); |
|
|
)); |
|
|
} |
|
|
} |
|
|
//结案率 结案数/项目数
|
|
|
//结案率 结案数/项目数
|
|
|
List<FactIndexGovrnAblityOrgMonthlyEntity> abilityList = factIndexGovrnAblityOrgMonthlyService.getOrgByCustomer(customerId, monthId, OrgTypeConstant.STREET); |
|
|
List<OrgStatisticsResultDTO> closed = factOriginProjectLogDailyService.getAgencyClosed(customerId, monthId); |
|
|
if (CollectionUtils.isNotEmpty(abilityList)) { |
|
|
if (CollectionUtils.isNotEmpty(closed)) { |
|
|
list.forEach(entity -> abilityList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> |
|
|
list.forEach(entity -> closed.stream().filter(item -> item.getOrgId().equals(entity.getOrgId())).forEach(dto -> { |
|
|
entity.setCloseProjectRatio(dto.getClosedProjectRatio()) |
|
|
if (dto.getSum() != NumConstant.ZERO) { |
|
|
)); |
|
|
BigDecimal sum = new BigDecimal(dto.getSum()); |
|
|
|
|
|
BigDecimal count = new BigDecimal(dto.getCount()); |
|
|
|
|
|
entity.setCloseProjectRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
|
|
|
} |
|
|
|
|
|
})); |
|
|
} |
|
|
} |
|
|
//满意率 满意和非常满意占比
|
|
|
//满意率 满意和非常满意占比
|
|
|
List<OrgStatisticsResultDTO> satisfactionList = factOriginProjectLogDailyService.getOrgSatisfaction(customerId, monthId, OrgTypeConstant.STREET); |
|
|
List<OrgStatisticsResultDTO> satisfactionList = factOriginProjectLogDailyService.getOrgSatisfaction(customerId, monthId, OrgTypeConstant.STREET); |
|
@ -320,11 +326,15 @@ public class OrgRankExtractServiceImpl implements OrgRankExtractService { |
|
|
)); |
|
|
)); |
|
|
} |
|
|
} |
|
|
//结案率 结案数/项目数
|
|
|
//结案率 结案数/项目数
|
|
|
List<FactIndexGovrnAblityOrgMonthlyEntity> abilityList = factIndexGovrnAblityOrgMonthlyService.getOrgByCustomer(customerId, monthId, OrgTypeConstant.DISTRICT); |
|
|
List<OrgStatisticsResultDTO> closed = factOriginProjectLogDailyService.getAgencyClosed(customerId, monthId); |
|
|
if (CollectionUtils.isNotEmpty(abilityList)) { |
|
|
if (CollectionUtils.isNotEmpty(closed)) { |
|
|
list.forEach(entity -> abilityList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> |
|
|
list.forEach(entity -> closed.stream().filter(item -> item.getOrgId().equals(entity.getOrgId())).forEach(dto -> { |
|
|
entity.setCloseProjectRatio(dto.getClosedProjectRatio()) |
|
|
if (dto.getSum() != NumConstant.ZERO) { |
|
|
)); |
|
|
BigDecimal sum = new BigDecimal(dto.getSum()); |
|
|
|
|
|
BigDecimal count = new BigDecimal(dto.getCount()); |
|
|
|
|
|
entity.setCloseProjectRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
|
|
|
} |
|
|
|
|
|
})); |
|
|
} |
|
|
} |
|
|
//满意率 满意和非常满意占比
|
|
|
//满意率 满意和非常满意占比
|
|
|
List<OrgStatisticsResultDTO> satisfactionList = factOriginProjectLogDailyService.getOrgSatisfaction(customerId, monthId, OrgTypeConstant.STREET); |
|
|
List<OrgStatisticsResultDTO> satisfactionList = factOriginProjectLogDailyService.getOrgSatisfaction(customerId, monthId, OrgTypeConstant.STREET); |
|
|