From 4132f870d80d531771b61bb0e45ff575857a7625 Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期六, 26 十月 2024 09:01:15 +0800 Subject: [PATCH] bug修改 --- ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ChargingBillController.java | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ChargingBillController.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ChargingBillController.java index 2920aa0..ae00e91 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ChargingBillController.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ChargingBillController.java @@ -245,14 +245,12 @@ chargingBillExport.setCode(byId.getCode()); chargingBillExport.setAccountType("微信商户"); chargingBillExport.setType(byId.getType().toString()); - chargingBillExport.setBillType("月账单"); LocalDateTime billTime = byId.getBillTime(); // 将billTime 减去一个月 转化为yyyy-MM格式字符串 billTime = billTime.minusMonths(1); chargingBillExport.setBillWeek(DateUtils.parseDateToStr("yyyy-MM",DateUtils.toDate(billTime))); chargingBillExport.setBillTime(DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss",DateUtils.toDate(billTime))); - chargingBillExport.setState("未出账"); List<Site> data = siteClient.getSiteByIds(Arrays.asList(byId.getSiteId())).getData(); if (!data.isEmpty()){ chargingBillExport.setSiteName(data.get(0).getName()); @@ -320,7 +318,7 @@ if (one!=null){ chargingBillRefundExport.setRechargeSerialNumber(one.getSerailNumber()); chargingBillRefundExport.setCode(one.getCode()); - chargingBillRefundExport.setPayTime(DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss",DateUtils.toDate(tChargingOrder.getPayTime()))); + chargingBillRefundExport.setPayTime(tChargingOrder.getPayTime()!=null?DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss",DateUtils.toDate(tChargingOrder.getPayTime())):""); if (tChargingOrder.getRefundTime()!=null){ chargingBillRefundExport.setRefundTime(DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss",DateUtils.toDate(tChargingOrder.getRefundTime()))); } @@ -334,7 +332,7 @@ chargingBillPayExport.setId(i+""); chargingBillPayExport.setRechargeSerialNumber(tChargingOrder.getRechargeSerialNumber()); chargingBillPayExport.setCode(tChargingOrder.getCode()); - chargingBillPayExport.setPayTime(DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss",DateUtils.toDate(tChargingOrder.getPayTime()))); + chargingBillPayExport.setPayTime(tChargingOrder.getPayTime()!=null?DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss",DateUtils.toDate(tChargingOrder.getPayTime())):""); chargingBillPayExport.setPaymentAmount(tChargingOrder.getOrderAmount().toString()); chargingBillPayExport.setTotal(""); chargingBillPayExports.add(chargingBillPayExport); -- Gitblit v1.7.1