ソースを参照

修改首页付款数据图表根据type查询数据

LiFei 5 年 前
コミット
1f4dc087b3

+ 3 - 2
happy-cloud-wisdom/happy-cloud-wisdom-biz/src/main/java/org/jeecg/modules/hlwpayment/controller/HlwPaymentDetailController.java

@@ -373,15 +373,16 @@ public class HlwPaymentDetailController extends JeecgController<HlwPaymentDetail
         //存放图表所需年月+付款数据
         List<Map> list1 = new ArrayList<>();
         //当天时间
+        LocalDate localDate = LocalDate.now();
         LocalDate lastDate = LocalDate.now();
         //前一个月开始倒推6个月
         for (int i = 0; i < 6; i++) {
             Map map = new HashMap();
             //type=1获取前6个数据,type=2获取前前6个月数据
             if("1".equals(type)){
-                 lastDate = lastDate.minusMonths(i + 1);
+                 lastDate = localDate.minusMonths(i + 1);
             }else{
-                 lastDate = lastDate.minusMonths(i + 7);
+                 lastDate = localDate.minusMonths(i + 7);
             }
             Double monthPayment1 = hlwPaymentDetailService.monthPayment(DateUtils.asDate(lastDate));
             map.put("value", monthPayment1);