|
@@ -1,5 +1,6 @@ |
|
|
package com.ningdatech.pmapi.dashboard.manage; |
|
|
package com.ningdatech.pmapi.dashboard.manage; |
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil; |
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
import com.google.common.collect.Lists; |
|
|
import com.google.common.collect.Lists; |
|
|
import com.ningdatech.pmapi.common.model.entity.DataDTO; |
|
|
import com.ningdatech.pmapi.common.model.entity.DataDTO; |
|
@@ -15,6 +16,7 @@ import lombok.extern.slf4j.Slf4j; |
|
|
import org.springframework.stereotype.Component; |
|
|
import org.springframework.stereotype.Component; |
|
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
import java.math.BigDecimal; |
|
|
|
|
|
import java.math.RoundingMode; |
|
|
import java.time.LocalDateTime; |
|
|
import java.time.LocalDateTime; |
|
|
import java.util.List; |
|
|
import java.util.List; |
|
|
import java.util.Objects; |
|
|
import java.util.Objects; |
|
@@ -80,7 +82,11 @@ public class ProjectCostStatisticsManage { |
|
|
List<Long> yearMeetingIds = yearMeetings.stream().map(Meeting::getId) |
|
|
List<Long> yearMeetingIds = yearMeetings.stream().map(Meeting::getId) |
|
|
.collect(Collectors.toList()); |
|
|
.collect(Collectors.toList()); |
|
|
//算出所有的 同意的专家 |
|
|
//算出所有的 同意的专家 |
|
|
List<MeetingExpert> yearMeetingExperts = meetingExpertService.listAgreedExperts(yearMeetingIds); |
|
|
|
|
|
|
|
|
List<MeetingExpert> yearMeetingExperts = Lists.newArrayList(); |
|
|
|
|
|
if(CollUtil.isNotEmpty(yearMeetingIds)){ |
|
|
|
|
|
yearMeetingExperts = meetingExpertService.listAgreedExperts(yearMeetingIds); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
reviewData.setName(thisYear.toString()); |
|
|
reviewData.setName(thisYear.toString()); |
|
|
reviewData.setAmount(reviewAoumtExpert.multiply(BigDecimal |
|
|
reviewData.setAmount(reviewAoumtExpert.multiply(BigDecimal |
|
|
.valueOf(yearMeetingExperts.size()))); |
|
|
.valueOf(yearMeetingExperts.size()))); |
|
@@ -91,7 +97,8 @@ public class ProjectCostStatisticsManage { |
|
|
reviewTwoYearTotal = reviewTwoYearTotal.add(reviewAoumtExpert.multiply(BigDecimal |
|
|
reviewTwoYearTotal = reviewTwoYearTotal.add(reviewAoumtExpert.multiply(BigDecimal |
|
|
.valueOf(yearMeetingExperts.size()))); |
|
|
.valueOf(yearMeetingExperts.size()))); |
|
|
} |
|
|
} |
|
|
reviewAvg.setAmount(reviewTwoYearTotal.divide(BigDecimal.valueOf(2))); |
|
|
|
|
|
|
|
|
reviewAvg.setAmount(reviewTwoYearTotal.divide(BigDecimal.valueOf(2),BigDecimal.ROUND_CEILING, |
|
|
|
|
|
RoundingMode.HALF_UP)); |
|
|
twoYearsAvg.add(reviewAvg); |
|
|
twoYearsAvg.add(reviewAvg); |
|
|
twoYearsAvg.add(pricingAvg); |
|
|
twoYearsAvg.add(pricingAvg); |
|
|
res.setTwoYearsReviews(twoYearsReviews); |
|
|
res.setTwoYearsReviews(twoYearsReviews); |
|
|