From 3dcb170f7e0ecbcf406953e81b3cf739cc120b7a Mon Sep 17 00:00:00 2001
From: zjh <zjh@888>
Date: 星期五, 22 十二月 2023 15:31:11 +0800
Subject: [PATCH] zjh 本地 2023/12/22 -3/

---
 ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCustomerController.java |   41 ++++++++++++++++++++++-------------------
 1 files changed, 22 insertions(+), 19 deletions(-)

diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCustomerController.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCustomerController.java
index f49efda..d720ab8 100644
--- a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCustomerController.java
+++ b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCustomerController.java
@@ -18,6 +18,7 @@
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
+import org.apache.ibatis.annotations.Param;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.util.DigestUtils;
 import org.springframework.web.bind.annotation.*;
@@ -65,8 +66,10 @@
 
     @GetMapping("/newGetTjPat")
     @ApiOperation(value = "鏌ヨhis鏁版嵁搴撹繑鍥炴柊鐨勬暟鎹�")
-    public AjaxResult newGetTjPat() {
-        List<Map<String, Object>> maps = testMapper.newGetTjPat();
+    public AjaxResult newGetTjPat(@RequestParam(required = false)String pacCode,
+                                  @RequestParam(required = false)String pacName,
+                                  @RequestParam(required = false)String pacRemark) {
+        List<Map<String, Object>> maps = testMapper.newGetTjPat(pacCode,pacName,pacRemark);
         DynamicDataSourceContextHolder.clearDataSourceType();
         return AjaxResult.success(maps);
     }
@@ -108,24 +111,24 @@
                     if(null==ltkjTjPat){
                         tjvLtkjvtjpatService.save(tjPatByIdCard);
                     }
-                }
-                DynamicDataSourceContextHolder.clearDataSourceType();
-                //鍐嶆牴鎹韩浠借瘉鍙峰啓customer琛�
-                TjCustomer tjCustomer = tjCustomerService.getTjCustomerByCusIdCard(cusIdcard);
-                if(null == tjCustomer){
-                    testMapper.getTjPatByCusId(cusIdcard);
-                    LambdaQueryWrapper<TjCustomer> qw = new LambdaQueryWrapper<>();
-                    qw.eq(TjCustomer::getCusIdcard, cusIdcard);
-                    TjCustomer customer = tjCustomerService.getOne(qw);
-                    customer.setReservationId(customer.getCardId());
-                    extracted(customer);
-                    return success(customer);
-                }else {
-                    tjCustomer.setReservationId(tjCustomer.getCardId());
-                    extracted(tjCustomer);
-                    return success(tjCustomer);
-                }
+                    DynamicDataSourceContextHolder.clearDataSourceType();
+                    //鍐嶆牴鎹韩浠借瘉鍙峰啓customer琛�
+                    TjCustomer tjCustomer = tjCustomerService.getTjCustomerByCusIdCard(cusIdcard);
+                    if(null == tjCustomer){
+                        testMapper.getTjPatByCusId(cusIdcard);
+                        LambdaQueryWrapper<TjCustomer> qw = new LambdaQueryWrapper<>();
+                        qw.eq(TjCustomer::getCusIdcard, cusIdcard);
+                        TjCustomer customer = tjCustomerService.getOne(qw);
+                        customer.setReservationId(customer.getCardId());
+                        extracted(customer);
+                        return success(customer);
+                    }else {
+                        tjCustomer.setReservationId(tjCustomer.getCardId());
+                        extracted(tjCustomer);
+                        return success(tjCustomer);
+                    }
 
+                }
             }
             //end====2023.12.12
             LambdaQueryWrapper<TjReservation> wq = new LambdaQueryWrapper<>();

--
Gitblit v1.8.0