|
|
@@ -15,6 +15,7 @@ import lombok.AllArgsConstructor;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.math.RoundingMode;
|
|
|
import java.text.DecimalFormat;
|
|
|
import java.time.LocalDate;
|
|
|
@@ -156,6 +157,7 @@ public class PbCseFeeobjupdateServiceImpl extends MPJBaseServiceImpl<PbCseFeeobj
|
|
|
feeobjupdateMPJLambdaWrapper
|
|
|
.selectAs(PbCseFeeitem2::getShortname, PbVXssfdetail::getFeeitemname)
|
|
|
.selectAs(PbCseFeeobjupdate::getPersonalid, PbVXssfdetail::getPersonalid)
|
|
|
+ .selectAs(PbVXssfdetail::getMny, PbVXssfdetail::getMny)
|
|
|
.leftJoin(PbVXssfdetail.class, PbVXssfdetail::getPersonalid, PbCseFeeobjupdate::getPersonalid)
|
|
|
.leftJoin(PbCseFeeitem2.class, PbCseFeeitem2::getFeeitemname, PbVXssfdetail::getFeeitemname)
|
|
|
.eq(dto.getYear() != null, PbCseFeeobjupdate::getEnteryear, dto.getYear())
|
|
|
@@ -165,6 +167,10 @@ public class PbCseFeeobjupdateServiceImpl extends MPJBaseServiceImpl<PbCseFeeobj
|
|
|
|
|
|
//收费项目情况统计
|
|
|
Map<String, Long> pbVXssfdetailMap = pbVXssfdetails.stream().collect(Collectors.groupingBy(PbVXssfdetail::getFeeitemname, Collectors.counting()));
|
|
|
+ Map<String, BigDecimal> pbVXssfdetailSumMap = pbVXssfdetails.stream()
|
|
|
+ .collect(Collectors.groupingBy(PbVXssfdetail::getFeeitemname,
|
|
|
+ Collectors.mapping(PbVXssfdetail::getMny, Collectors.reducing(BigDecimal.ZERO, BigDecimal::add))));
|
|
|
+
|
|
|
List<ChargingSituationVo> chargingSituationVoRes = new ArrayList<>();
|
|
|
DecimalFormat df = new DecimalFormat("#.##");
|
|
|
for (Map.Entry<String, Long> entry : pbVXssfdetailMap.entrySet()) {
|
|
|
@@ -178,6 +184,9 @@ public class PbCseFeeobjupdateServiceImpl extends MPJBaseServiceImpl<PbCseFeeobj
|
|
|
setUnpaid(result.getRegistrationPopulation() - entry.getValue());
|
|
|
setRateOfPayment(df.format((double)entry.getValue()/result.getRegistrationPopulation()*100) + "%");
|
|
|
}
|
|
|
+ if(pbVXssfdetailSumMap.get(entry.getKey()) != null){
|
|
|
+ setRecordedmoney(pbVXssfdetailSumMap.get(entry.getKey()).setScale(2, RoundingMode.DOWN));
|
|
|
+ }
|
|
|
}});
|
|
|
}
|
|
|
result.setChargingSituationVoList(chargingSituationVoRes);
|