Xiaojh преди 4 години
родител
ревизия
aa29eea758

+ 1 - 2
smart-city-platform/src/main/java/com/bz/smart_city/service/impl/pay/AmountWaterUsedAmountServiceImpl.java

@@ -960,8 +960,6 @@ public class AmountWaterUsedAmountServiceImpl implements AmountWaterUsedAmountSe
                             //预存余额-用水金额=用水余额
                             balance = remaining.subtract(fee);
                         }
-                    }else{
-                        balance =  BigDecimal.ZERO;
                     }
                     //查询该户是否有历史欠费
                     BigDecimal historyDebt = payPayReceivableMapper.getHistoryDebt(siteId,customerId,accountId);
@@ -971,6 +969,7 @@ public class AmountWaterUsedAmountServiceImpl implements AmountWaterUsedAmountSe
                     payRechargeaccountMapper.updateBalance(balance,new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()),payRechargeaccountDto.getId());
                     //修改账户用水余额字段跟预计费日期
                     log.info("【"+payRechargeaccountDto.getAccountnumber()+"】户:用水余额:"+balance+",预计费日期:"+new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
+                    balance =  BigDecimal.ZERO;
                 }
             }
         }else{

+ 3 - 2
smart-city-platform/src/main/java/com/bz/smart_city/service/impl/pay/PayChargeSurveyServiceImpl.java

@@ -625,9 +625,10 @@ public class PayChargeSurveyServiceImpl implements PayChargeSurveyService {
             //先获取本年度结算水量(按自然年)
             Calendar date = Calendar.getInstance();
             //当前年
-            Integer currentYear = Integer.valueOf(date.get(Calendar.YEAR));
+            //Integer currentYear = Integer.valueOf(date.get(Calendar.YEAR));
+            Integer currentYear = year;
             //当前月
-            Integer currentMont = Integer.valueOf(date.get(Calendar.MONTH));
+            Integer currentMont = month;
             String startDate = currentYear+"-"+"01";
             String endDate = currentYear+"-"+String.format("%02d",month);
             //当前年月累计用水量