From 921025a90df15c6d822aca51753c773c30f56adf Mon Sep 17 00:00:00 2001 From: xuhy <3313886187@qq.com> Date: 星期六, 07 九月 2024 17:55:25 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/FinancialSettlementController.java | 31 ++++++++++++++++++++++++++----- 1 files changed, 26 insertions(+), 5 deletions(-) diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/FinancialSettlementController.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/FinancialSettlementController.java index 3ec44b2..92990e1 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/FinancialSettlementController.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/FinancialSettlementController.java @@ -13,8 +13,10 @@ import com.ruoyi.common.redis.service.RedisService; import com.ruoyi.common.security.service.TokenService; import com.ruoyi.order.api.dto.SettlementConfirmAdd; +import com.ruoyi.order.api.model.TChargingOrder; import com.ruoyi.order.api.model.TSettlementConfirm; import com.ruoyi.order.api.query.SettlementListQuery; +import com.ruoyi.order.api.vo.SettlementTotalVO; import com.ruoyi.order.vo.ChargingOrderListInfoVO; import com.ruoyi.order.api.vo.ChargingOrderTimeVO; import com.ruoyi.order.api.model.ChargingListQuery; @@ -28,6 +30,8 @@ import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; +import java.time.format.DateTimeFormatter; +import java.util.List; /** * <p> @@ -60,10 +64,16 @@ } @GetMapping(value = "/settlementTotal") - @ApiOperation(value = "结算确认表-列表查询", tags = {"管理后台-财务结算"}) - @ApiParam(name = "time", value = "汇报时间yyyy-MM") - public AjaxResult<ChargingOrderListInfoVO> settlementTotal(String time) { - return AjaxResult.success(null); + @ApiOperation(value = "结算汇总-列表查询", tags = {"管理后台-财务结算"}) + @ApiParam(name = "time", value = "汇报时间2024-01-01 00:00:00") + public AjaxResult<SettlementTotalVO> settlementTotal(String time) { + SettlementTotalVO res = chargingOrderService.settlementTotal(time); + return AjaxResult.success(res); + } + @GetMapping(value = "/settlementTotalR") + public R<SettlementTotalVO> settlementTotalR( String time) { + SettlementTotalVO res = chargingOrderService.settlementTotal(time); + return R.ok(res); } @PostMapping(value = "/settlementAdd") @ApiOperation(value = "结算确认表-生成/保存结算确认表", tags = {"管理后台-财务结算"}) @@ -79,7 +89,18 @@ } @GetMapping(value = "/downloadSettlement/{uid}") public R<TSettlementConfirm> downloadSettlement(@PathVariable("uid") String uid) { - return R.ok(tSettlementConfirmService.getById(uid)); + TSettlementConfirm byId = tSettlementConfirmService.getById(uid); + if (byId!=null){ + List<TChargingOrder> list = chargingOrderService.lambdaQuery().eq(TChargingOrder::getSiteId, byId.getSiteId()) + .between(TChargingOrder::getStartTime, byId.getStartTime(), byId.getEndTime()) + .eq(TChargingOrder::getStatus, 5) + .eq(TChargingOrder::getRechargePaymentStatus, 2).list(); + byId.setList(list); + String format = byId.getStartTime().format(DateTimeFormatter.ofPattern("yyyy年MM月dd日HH:mm:ss")); + String format1 = byId.getEndTime().format(DateTimeFormatter.ofPattern("yyyy年MM月dd日HH:mm:ss")); + byId.setTime(format+"至"+format1); + } + return R.ok(byId); } } -- Gitblit v1.7.1