From 03a4584d7d58fc073649a3ef821e1b2ebc0ed6cb Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期日, 30 七月 2023 05:04:49 +0800
Subject: [PATCH] 更新管理页面

---
 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TDriverController.java |   27 ++++++++++++++++++++-------
 1 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TDriverController.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TDriverController.java
index 105d4af..d9a2a73 100644
--- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TDriverController.java
+++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TDriverController.java
@@ -36,10 +36,7 @@
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.ui.Model;
 import org.springframework.util.StringUtils;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
@@ -136,9 +133,11 @@
         TDriverResp tDriverResp = new TDriverResp();
         BeanUtils.copyProperties(tDriver,tDriverResp);
 
-        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
-        String format1 = format.format(tDriverResp.getFirstCertificateTime());
-        tDriverResp.setFirstCertificateTimeStr(format1);
+        if(Objects.nonNull(tDriverResp.getFirstCertificateTime())){
+            SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+            String format1 = format.format(tDriverResp.getFirstCertificateTime());
+            tDriverResp.setFirstCertificateTimeStr(format1);
+        }
 //        tDriverResp.setFirstCertificateTime(format.parse(format1));
 
         // 查询邀请人
@@ -173,6 +172,7 @@
         }
 
         model.addAttribute("item",tDriverResp);
+        model.addAttribute("driver",tDriver);
         LogObjectHolder.me().set(tDriver);
         return PREFIX + "tDriver_edit.html";
     }
@@ -911,4 +911,17 @@
             e.printStackTrace();
         }
     }
+
+
+    /**
+     * 获取详情中的汇总数据查询
+     * @param id
+     * @param time
+     * @return
+     */
+    @ResponseBody
+    @PostMapping("/querySummaryData")
+    public Object querySummaryData(Integer id, String time){
+        return tDriverService.querySummaryData(id, time);
+    }
 }

--
Gitblit v1.7.1