From 1502f0836f5d2703881e00c500b66a86ed84c989 Mon Sep 17 00:00:00 2001
From: zjh <zjh@888>
Date: 星期四, 13 六月 2024 16:06:48 +0800
Subject: [PATCH] zjh 本地 2024/06/13 --2

---
 ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCustomerController.java |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 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 35a03ec..c7cff1e 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
@@ -28,6 +28,7 @@
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.DigestUtils;
 import org.springframework.web.bind.annotation.*;
 import com.ltkj.common.core.controller.BaseController;
@@ -349,6 +350,7 @@
      */
     @PostMapping
     @ApiOperation(value = "鏂板瀹㈡埛")
+    @Transactional
     public AjaxResult add(@RequestBody @ApiParam(value = "瀹㈡埛瀵硅薄淇℃伅") TjCustomer tjCustomer) {
         if (null == tjCustomer.getCusIdcard() || null == tjCustomer.getCusPhone()) {
             return AjaxResult.error("璇疯緭鍏ヨ韩浠借瘉鍙锋垨鎵嬫満鍙�");
@@ -400,6 +402,10 @@
         if(null !=config && config.equals("Y")){
             AjaxResult tjCustomer1 = suijieHisXinXi(tjCustomer, date);
             if (tjCustomer1 != null) return tjCustomer1;
+        }else {
+            if (tjCustomerService.save(tjCustomer)) {
+                return AjaxResult.success(tjCustomer);
+            }
         }
         return AjaxResult.error();
 }
@@ -438,15 +444,15 @@
                                 String hisRegistrationId = resultDatasss.get("his_registration_id").toString();
                                 if (null != hisRegistrationId) {
                                     //闂ㄨ瘖鍖荤敓鎺ヨ瘖
-                                    AjaxResult result3 = controller.Outpinconapply(hisRegistrationId, date, SecurityUtils.getUsername());
+                                    AjaxResult result3 = controller.Outpinconapply(hisRegistrationId, date,"00029");
                                     String result4 = getAjaxResult(result3);
                                     JSONObject object2 = getJSONObject(result4);
                                     String code2 = object2.getStr("ResultCode");
                                     if (code2.equals("0")) {
                                         Map<String, Object> data = object2.getJSONObject("ResultData");
-                                        String toString = data.get("his_registration_id").toString();
-//                                        tjCustomer.setPationId(pationid);
-                                        tjCustomer.setCardId(toString);
+                                        String hisRegistrationId1 = data.get("his_registration_id").toString();
+                                        tjCustomer.setPationId(pationid);
+                                        tjCustomer.setCardId(hisRegistrationId1);
 //                                        tjCustomerService.updateById(tjCustomer);
                                     }
                                 }

--
Gitblit v1.8.0