|
|
@@ -45,6 +45,7 @@ import org.springframework.stereotype.Component; |
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
import java.io.IOException; |
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.time.LocalDate; |
|
|
|
import java.time.LocalDateTime; |
|
|
|
import java.time.format.DateTimeFormatter; |
|
|
@@ -209,7 +210,13 @@ public class ConstructionManage { |
|
|
|
if(CollUtil.isEmpty(payments)){ |
|
|
|
return Collections.emptyList(); |
|
|
|
} |
|
|
|
return payments.stream().map(p -> BeanUtil.copyProperties(p,PaymentPlanVO.class)) |
|
|
|
return payments.stream().map(p -> { |
|
|
|
PaymentPlanVO vo = BeanUtil.copyProperties(p, PaymentPlanVO.class); |
|
|
|
vo.setRatio((Objects.isNull(p.getPlanAmount())||p.getPlanAmount().compareTo(BigDecimal.ZERO) == 0) ? "0%" |
|
|
|
: p.getPaymentAmount().multiply(BigDecimal.valueOf(100)) |
|
|
|
.divide(p.getPlanAmount(),BigDecimal.ROUND_CEILING,BigDecimal.ROUND_CEILING) + "%"); |
|
|
|
return vo; |
|
|
|
}) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
} |
|
|
|
|
|
|
|