|
@@ -255,7 +255,7 @@ public class BillGenerationServiceImpl {
|
|
|
*/
|
|
|
public SwBillManagementUnpaidDo produceBill(SwUserManagementDo swUserManagementDo, SwWaterUsageEntryDo swWaterUsageEntryDo) {
|
|
|
// 上次抄表数
|
|
|
- BigDecimal lastreading = swWaterUsageEntryDo.getLastreading();
|
|
|
+ BigDecimal lastreading = swWaterUsageEntryDo.getLastreading()==null?BigDecimal.ZERO:swWaterUsageEntryDo.getLastreading();
|
|
|
// 本次抄表数
|
|
|
BigDecimal thisreading = swWaterUsageEntryDo.getThisreading();
|
|
|
|
|
@@ -297,7 +297,6 @@ public class BillGenerationServiceImpl {
|
|
|
if (swBillManagementUnpaidDo.getLastmeterreadingdate() == null) {
|
|
|
monthDiff = 1L;
|
|
|
} else {
|
|
|
-
|
|
|
YearMonth localDate1 = YearMonth.from(swBillManagementUnpaidDo.getLastmeterreadingdate().toInstant().atZone(ZoneId.systemDefault()).toLocalDate());
|
|
|
YearMonth localDate2 = YearMonth.from(swBillManagementUnpaidDo.getThismeterreadingdate().toInstant().atZone(ZoneId.systemDefault()).toLocalDate());
|
|
|
// 计算月份差(不考虑天数)
|