From b4b44f2021dbf083b7057fb7e192b72d08b4bf17 Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期二, 22 十月 2024 09:23:29 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TApplyChargingPileController.java |   22 ++++++++++++++++++----
 1 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TApplyChargingPileController.java b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TApplyChargingPileController.java
index 328a1fb..4170703 100644
--- a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TApplyChargingPileController.java
+++ b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TApplyChargingPileController.java
@@ -6,6 +6,7 @@
 import com.ruoyi.chargingPile.api.model.Partner;
 import com.ruoyi.chargingPile.api.model.Site;
 import com.ruoyi.common.core.utils.WebUtils;
+import com.ruoyi.common.core.web.domain.BasePojo;
 import com.ruoyi.common.core.web.page.PageInfo;
 import com.ruoyi.order.api.model.ExportUidDto;
 import com.ruoyi.order.api.feignClient.OrderClient;
@@ -98,12 +99,16 @@
     /**
      * 建桩申请
      */
-    @Log(title = "建桩申请", businessType = BusinessType.INSERT,operatorType = OperatorType.MOBILE)
     @ApiOperation(tags = {"小程序-建桩申请"},value = "建桩申请")
     @PostMapping(value = "/add")
     public AjaxResult<Boolean> add(@RequestBody TApplyChargingPileDTO dto) {
         // 验证验证码
-        String code = redisService.getCacheObject(dto.getLandlordPhone() + Constants.APPLY_CHARGING);
+        String code;
+        if(dto.getLandlordHandling().equals(1)){
+            code = redisService.getCacheObject(dto.getLandlordPhone() + Constants.APPLY_CHARGING);
+        }else {
+            code = redisService.getCacheObject(dto.getAgentPhone() + Constants.APPLY_CHARGING);
+        }
         if(StringUtils.isEmpty(code)){
             return AjaxResult.error("验证码已过期,请重新获取验证码!");
         }
@@ -116,7 +121,7 @@
         return AjaxResult.ok(applyChargingPileService.save(dto));
     }
 
-    @Log(title = "建桩申请", businessType = BusinessType.INSERT,operatorType = OperatorType.MOBILE)
+    @Log(title = "【申请建桩】添加建桩申请", businessType = BusinessType.INSERT)
     @ApiOperation(tags = {"后台-申请表单-申请建桩"},value = "建桩申请")
     @PostMapping(value = "/manage/add")
     public AjaxResult<Boolean> manageAdd(@RequestBody TApplyChargingPile dto) {
@@ -126,9 +131,10 @@
 
     @ApiOperation(tags = {"后台-申请表单-申请建桩"},value = "列表")
     @PostMapping(value = "/page")
-    public AjaxResult<Page<TApplyChargingPile>> page(ApplyChargingQuery applyChargingQuery) {
+    public AjaxResult<Page<TApplyChargingPile>> page(@RequestBody ApplyChargingQuery applyChargingQuery) {
         Page<TApplyChargingPile> page = applyChargingPileService.lambdaQuery()
                 .like(applyChargingQuery.getLandlordPhone() != null && !applyChargingQuery.getLandlordPhone().equals(""), TApplyChargingPile::getLandlordPhone, applyChargingQuery.getLandlordPhone())
+                .orderByDesc(BasePojo::getCreateTime )
                 .page(Page.of(applyChargingQuery.getPageCurr(), applyChargingQuery.getPageSize()));
         return AjaxResult.ok(page);
     }
@@ -136,6 +142,7 @@
 
     @ApiOperation(tags = {"后台-申请表单-申请建桩"},value = "导出")
     @PutMapping(value = "/export")
+    @Log(title = "【申请建桩】导出建桩申请列表", businessType = BusinessType.EXPORT)
     public R export(String landlordPhone,HttpServletResponse response) {
         try {
         response.setCharacterEncoding(Constants.UTF8);
@@ -249,6 +256,7 @@
 
     @ApiOperation(value = "下载-已出账", tags = {"管理后台-充电算账单"})
     @PutMapping("/downloadBill")
+    @Log(title = "【充电算账单】下载算账单", businessType = BusinessType.EXPORT)
     public R downloadBill(@RequestBody ExportUidDto uid, HttpServletResponse response)
     {
         ChargingListQuery chargingListQuery = new ChargingListQuery();
@@ -289,6 +297,7 @@
     }
     @ApiOperation(value = "下载", tags = {"管理后台-账户结算账单"})
     @PutMapping("/downloadAccount")
+    @Log(title = "【账户结算账单】下载账单", businessType = BusinessType.EXPORT)
     public R downloadAccount(@RequestBody ChargingListQuery dto,HttpServletResponse response)
     {   dto.setPageCurr(1);
         dto.setPageSize(99999999);
@@ -323,6 +332,7 @@
 
     @ApiOperation(value = "导出", tags = {"管理后台-结算汇总表"})
     @PutMapping("/downloadSettlementTotal")
+    @Log(title = "【结算汇总表】下载汇总表", businessType = BusinessType.EXPORT)
     public R downloadSettlementTotal(@RequestBody ExportUidDto uid,HttpServletResponse response)
     {
         SettlementTotalVO data = chargingOrderClient.settlementTotalR(uid.getTime()).getData();
@@ -358,6 +368,7 @@
     }
     @ApiOperation(value = "下载", tags = {"管理后台-结算表记录"})
     @PutMapping("/downloadSettlement")
+    @Log(title = "【结算表记录】下载结算表", businessType = BusinessType.EXPORT)
     public R downloadSettlement(@RequestBody ExportUidDto uid,HttpServletResponse response)
     {
         TSettlementConfirm data = chargingOrderClient.downloadSettlement(uid.getUid()).getData();
@@ -410,6 +421,7 @@
 
     @ApiOperation(value = "下载-未出账", tags = {"管理后台-充电算账单"})
     @PutMapping("/download")
+    @Log(title = "【充电算账单】下载算账单", businessType = BusinessType.EXPORT)
     public R download(String uid,HttpServletResponse response)
     {
         ChargingListQuery chargingListQuery = new ChargingListQuery();
@@ -466,6 +478,7 @@
 
     @ApiOperation(tags = {"后台-申请表单-申请建桩"},value = "修改备注")
     @PostMapping(value = "/remark")
+    @Log(title = "【申请建桩】修改备注", businessType = BusinessType.UPDATE)
     public AjaxResult<TApplyChargingPile> remark(@RequestBody ApplyChargingRemarkDto applyChargingRemarkDt) {
         TApplyChargingPile byId = applyChargingPileService.getById(applyChargingRemarkDt.getId());
         byId.setRemark(applyChargingRemarkDt.getRemark());
@@ -474,6 +487,7 @@
     }
     @ApiOperation(tags = {"后台-申请表单-申请建桩"},value = "删除")
     @DeleteMapping(value = "/remark")
+    @Log(title = "【申请建桩】删除建桩申请", businessType = BusinessType.DELETE)
     public AjaxResult remark(String ids) {
 
         String[] split = ids.split(",");

--
Gitblit v1.7.1