From e15f561a1f9eddfde503d59baf45a860b131928e Mon Sep 17 00:00:00 2001
From: fei.wang <wf18701153496@163.com>
Date: 星期三, 13 八月 2025 14:22:50 +0800
Subject: [PATCH] 更新最新版代码

---
 src/main/java/com/flow/controller/TbFuwuqiController.java |   49 ++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 36 insertions(+), 13 deletions(-)

diff --git a/src/main/java/com/flow/controller/TbFuwuqiController.java b/src/main/java/com/flow/controller/TbFuwuqiController.java
index e992fcc..07184f2 100644
--- a/src/main/java/com/flow/controller/TbFuwuqiController.java
+++ b/src/main/java/com/flow/controller/TbFuwuqiController.java
@@ -1,18 +1,19 @@
 package com.flow.controller;
 
 
-import com.flow.pojo.Card;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.flow.mapper.OperationLogMapper;
+import com.flow.mapper.TbFuwuqiMapper;
+import com.flow.pojo.OperationLog;
 import com.flow.pojo.TbFuwuqi;
 import com.flow.service.CompanyService;
+import com.flow.service.OperationLogService;
 import com.flow.service.TbFuwuqiService;
 import com.flow.util.result;
 import com.flow.util.resultutil;
 import com.github.pagehelper.PageInfo;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 import org.springframework.web.servlet.ModelAndView;
 
 import java.text.ParseException;
@@ -29,9 +30,17 @@
     @Autowired
     CompanyService companyService;
 
-    @GetMapping({"findTbFuwuqi"})
-    result<List<TbFuwuqi>> findBangZhu(Integer page, Integer limit) throws ParseException {
-        PageInfo<TbFuwuqi> cz = this.tbFuwuqiService.FindTbFuwuqi(page, limit);
+    @Autowired
+    OperationLogService operationLogService;
+    @Autowired
+    TbFuwuqiMapper tbFuwuqiMapper;
+    @Autowired
+    OperationLogMapper operationLogMapper;
+
+//    @RequestMapping(value = "findTbFuwuqi", method = RequestMethod.GET, produces = "application/json; charset=utf-8")
+    @PostMapping({"findTbFuwuqi"})
+    result<List<TbFuwuqi>> findBangZhu(Integer page, Integer limit,String entry) throws ParseException {
+        PageInfo<TbFuwuqi> cz = this.tbFuwuqiService.FindTbFuwuqi(page, limit,entry);
         for(int i = 0; i < cz.getSize(); ++i) {
             if (((TbFuwuqi)cz.getList().get(i)).getCompany() != null) {
                 SimpleDateFormat date2 = new SimpleDateFormat("yyyy-MM-dd");
@@ -46,6 +55,7 @@
                     ((TbFuwuqi)cz.getList().get(i)).setRemainingdays(+num11/24/60/60/1000+"澶�");
                 }
                 if (!((TbFuwuqi)cz.getList().get(i)).getRemainingdays().equals("0澶�") || !((TbFuwuqi)cz.getList().get(i)).getRemainingdays().equals(+num11/24/60/60/1000+"澶�") ){
+                    System.out.println("鎵撳嵃鏁版嵁==========銆嬨�嬨�嬨�嬨�嬨�嬨�嬨�嬨�嬨��");
                     this.tbFuwuqiService.UpdateTbFuwuqi((TbFuwuqi)cz.getList().get(i));
                 }
 //
@@ -54,8 +64,9 @@
         return resultutil.returnSuccess(cz.getTotal(), cz.getList());
     }
 
-    @GetMapping({"findTbFuwuqiZi"})
+    @PostMapping({"findTbFuwuqiZi"})
     result<List<TbFuwuqi>> findTbFuwuqiZi(String Zong, Integer page, Integer limit) throws ParseException {
+        System.out.println(Zong);
         PageInfo<TbFuwuqi> cz = this.tbFuwuqiService.findTbFuwuqiZi(Zong, page, limit);
         for(int i = 0; i < cz.getSize(); ++i) {
             if (((TbFuwuqi)cz.getList().get(i)).getCompany() != null) {
@@ -71,6 +82,7 @@
                     ((TbFuwuqi)cz.getList().get(i)).setRemainingdays(+num11/24/60/60/1000+"澶�");
                 }
                 if (!((TbFuwuqi)cz.getList().get(i)).getRemainingdays().equals("0澶�") || !((TbFuwuqi)cz.getList().get(i)).getRemainingdays().equals(+num11/24/60/60/1000+"澶�") ){
+                    System.out.println("222222222222");
                     this.tbFuwuqiService.UpdateTbFuwuqi((TbFuwuqi)cz.getList().get(i));
                 }
             }
@@ -85,21 +97,32 @@
         this.tbFuwuqiService.addTbFuwuqi(tbFuwuqi);
         modelAndView.addObject("suoshu", this.companyService.findSuoShu());
         modelAndView.setViewName("/page/Fuwuqi.jsp");
-
         return modelAndView;
     }
 
     @PostMapping({"UpdateTbFuwuqi"})
     public ModelAndView UpdateCard(TbFuwuqi tbFuwuqi) {
         this.tbFuwuqiService.UpdateTbFuwuqi(tbFuwuqi);
+        QueryWrapper queryWrapper = new QueryWrapper();
+        queryWrapper.eq("id", tbFuwuqi.getId());
+        TbFuwuqi tbFuwuqi1 = tbFuwuqiMapper.selectOne(queryWrapper);
+        OperationLog operationLog = new OperationLog();
+        operationLog.setCaozuotype("淇敼");
+        operationLog.setCaozuocontent("淇敼鏈嶅姟鍣細"+tbFuwuqi1.getServername());
+        operationLog.setCaozuoname(tbFuwuqi1.getCaozuoname());
+        operationLogService.addOperationLog(operationLog);
+        Date date = new Date();
+        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        operationLog.setCaozuodate(formatter.format(date));
+        operationLogMapper.insert(operationLog);
         ModelAndView modelAndView = new ModelAndView();
         modelAndView.setViewName("/page/Fuwuqi.jsp");
         return modelAndView;
     }
 
     @PostMapping({"DeleteTbFuwuqi"})
-    public int DeleteCard(String num) {
-        return this.tbFuwuqiService.DeleteTbFuwuqi(num);
+    public int DeleteCard(String num,String caozuoname) {
+        return this.tbFuwuqiService.DeleteTbFuwuqi(num,caozuoname);
     }
 
     @PostMapping({"tbFuwuqiSearch"})
@@ -125,10 +148,10 @@
         }
         return resultutil.returnSuccess(cz.getTotal(), cz.getList());
     }
-
     @PostMapping({"ifFuwuqi"})
     public TbFuwuqi ifFuwuqi(TbFuwuqi tbFuwuqi) {
         return this.tbFuwuqiService.ifFuwuqi(tbFuwuqi);
     }
 
+
 }

--
Gitblit v1.9.3