From 9155df2aeab5b0d95c89dd928dbaefbfbaeae9d1 Mon Sep 17 00:00:00 2001
From: zjh <1084500556@qq.com>
Date: 星期四, 05 九月 2024 17:10:35 +0800
Subject: [PATCH] zjh 2024-09-05

---
 ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCustomerController.java |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 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 1626a30..f4de56a 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
@@ -4,6 +4,7 @@
 import javax.servlet.http.HttpServletResponse;
 
 import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.date.DateUnit;
 import cn.hutool.core.date.DateUtil;
 import cn.hutool.extra.pinyin.PinyinUtil;
 import cn.hutool.json.JSONArray;
@@ -151,8 +152,8 @@
 //                    return AjaxResult.error("韬唤璇佸彿鐮侀敊璇�");
 //                }
 //            }
-            Date dates = new Date();
-            final String date = DateUtil.format(dates, "yyyy-MM-dd HH:mm:ss");
+//            Date dates = new Date();
+//            final String date = DateUtil.format(dates, "yyyy-MM-dd HH:mm:ss");
 
             final String getInfoFromSqlData = sysConfigService.selectConfigByKey("getInfoFromSqlData");
             if ("Y".equals(getInfoFromSqlData)) {
@@ -215,7 +216,8 @@
 //                if (DateUtil.endOfDay(new Date()).before(tjReservation.getReservationTime())) {
 //                    return AjaxResult.error("鏈埌棰勭害鏃堕棿");
 //                }
-                if (null != tjReservation.getReservationTime() && DateUtil.endOfDay(tjReservation.getReservationTime()).before(new Date())) {
+                if (null != tjReservation.getReservationTime() && DateUtil.endOfDay(DateUtil.offsetDay(tjReservation.getReservationTime(),
+                        tjReservation.getYxts())).before(new Date())) {
                     tjReservation.setIsExpire(1);
                     tjReservationService.updateById(tjReservation);
                     return AjaxResult.error("瀵逛笉璧锋偍鐨勯绾﹀凡瓒呮椂璇烽噸鏂伴绾�");
@@ -239,7 +241,7 @@
                     tjCustomer1.setAgeUnit(tjReservation.getAgeUnit());
                     tjCustomer1.setCareer(tjReservation.getCareer());
                     tjCustomer1.setPym(PinyinUtil.getFirstLetter(tjReservation.getName(),""));
-                    if (null != key && key.equals("Y"))
+/*                    if (null != key && key.equals("Y"))
                     {
                         AjaxResult result = controller.Outpincreateapply(tjCustomer1);
                         String result1 = getAjaxResult(result);
@@ -251,7 +253,7 @@
                             if (null != resultData && resultData.size() > 0) {
                                 String pationid = resultData.get("PationId").toString();
                                 if (null != pationid) {
-                                    tjCustomer1.setPationId(pationid);
+//                                    tjCustomer1.setPationId(pationid);
                                     tjCustomerService.updateById(tjCustomer1);
                                     //淇濆瓨娉ㄥ唽鍏ュ弬鍑哄弬
                                     resultData.put("cardId",pationid);
@@ -265,7 +267,7 @@
                         }
                     }else {
                         tjCustomerService.updateById(tjCustomer1);
-                    }
+                    }*/
                     tjCustomer1.setTeamNo(tjReservation.getTeamNo());
                     tjCustomer1.setCompId(tjReservation.getCompanyId());
                     tjCustomer1.setReservationId(tjReservation.getId());
@@ -509,7 +511,7 @@
                 String pationid = resultData.get("PationId").toString();
                 if (null != pationid) {
                     tjCustomer.setPationId(pationid);
-                    tjCustomerService.updateById(tjCustomer);
+//                    tjCustomerService.updateById(tjCustomer);
                     //淇濆瓨娉ㄥ唽鍏ュ弬鍑哄弬
                     resultData.put("cardId",pationid);
                     JSONObject object4 = JSONUtil.parseObj(resultData);
@@ -556,7 +558,6 @@
         if (tjCustomerService.updateById(tjCustomer)) {
             String config = sysConfigService.selectConfigByKey("sfkqdyhis");
             if (null != config && config.equals("Y")) {
-                tjCustomer.setPationId(customer.getPationId());
                 AjaxResult result = controller.Outpincreateapply(tjCustomer);
                 String result1 = getAjaxResult(result);
                 JSONObject object = getJSONObject(result1);

--
Gitblit v1.8.0