From 84312c20c230d0606ecd760d7c0b1c5917210d2b Mon Sep 17 00:00:00 2001
From: zjh <1084500556@qq.com>
Date: 星期二, 31 十月 2023 17:39:37 +0800
Subject: [PATCH] zjh 2023/10/31--1

---
 ltkj-admin/src/main/java/com/ltkj/web/controller/service/TjSysAsyncServiceImpl.java |   24 ++++++++++--------------
 1 files changed, 10 insertions(+), 14 deletions(-)

diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/service/TjSysAsyncServiceImpl.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/service/TjSysAsyncServiceImpl.java
index c5e3e31..f006bfd 100644
--- a/ltkj-admin/src/main/java/com/ltkj/web/controller/service/TjSysAsyncServiceImpl.java
+++ b/ltkj-admin/src/main/java/com/ltkj/web/controller/service/TjSysAsyncServiceImpl.java
@@ -26,6 +26,7 @@
 import java.util.*;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import java.util.stream.Collectors;
@@ -886,7 +887,6 @@
     @Override
     @Async("async")
     public void saveNewReservationConfirm(List<TjReservation> rightList) {
-        long l = System.currentTimeMillis();
         if(null !=rightList && rightList.size()>0){
             //鍒涘缓绾跨▼姹�
             ExecutorService threadPool = Executors.newFixedThreadPool(rightList.size());
@@ -908,16 +908,13 @@
                 });
             }
         }
-        long ll = System.currentTimeMillis();
-
-        System.out.println("杩欐浠g爜鎵ц鏃堕棿涓�"+ (ll-l));
     }
 
     @Override
     @Async("async")
     public void updateCheckType(String tjNum) {
-//        AjaxResult ajaxResult = getAjaxResult(tjNum);
         redisCache.setCacheMapValue("updateCheckType"+tjNum,tjNum,getAjaxResult(tjNum));
+        redisCache.setHashKeyExpireTime("updateCheckType"+tjNum,7L, TimeUnit.DAYS);
     }
 
     @Override
@@ -944,6 +941,7 @@
         }else {
             redisCache.setCacheMapValue("getOrderDetailByProParentId"+tjNumber,proParentId,getOrderDetailByProParentId(proParentId,tjNumber));
         }
+        redisCache.setHashKeyExpireTime("getOrderDetailByProParentId"+tjNumber,7L,TimeUnit.DAYS);
 
     }
 
@@ -1316,14 +1314,12 @@
         return customerList;
     }
     //鎬绘鐐瑰嚮浣撴淇℃伅璇︽儏
-    private AjaxResult getAjaxResult(String tjNumber) {
+    private List<Map<String, Object>> getAjaxResult(String tjNumber) {
         List<Map<String, Object>> list = new ArrayList<>();
         TjOrder one = orderService.getOrderByTjNum(tjNumber);
-
         if (one == null) {
-            return AjaxResult.error("鏆傛棤鏁版嵁锛侊紒");
+            return list;
         }
-
         TjCustomer customer = tjCustomerService.getById(one.getUserId());
         List<TjOrderRemark> remarkList = orderRemarkService.getRemarkListByTjNumAndType(tjNumber);
 
@@ -1340,7 +1336,11 @@
                 if (null != tjOrderDetails && tjOrderDetails.size() > 0) {
                     for (TjOrderDetail tjOrderDetail : tjOrderDetails) {
                         final TjProject byId = projectService.selectTjProjectByProId(tjOrderDetail.getProId());
+                         if(null==byId){
+                             tjOrderDetailService.removeById(tjOrderDetail.getOrderDetailId());
+                        }else {
                         tjOrderDetail.setProject(byId);
+                        }
                         List<TjStandard> list2 = tjStandardService.getTjStandardListByProId(String.valueOf(tjOrderDetail.getProId()));
                         if (list2.size() == 0) {
                             tjOrderDetail.setStandard(new TjStandard());
@@ -1366,14 +1366,10 @@
                         parent.put("doctorName", userService.getById(remark.getDoctorName()).getNickName());
                     }
                     list.add(parent);
-                } else {
-                    return AjaxResult.success("璇ュ鎴锋病鏈変綋妫�椤圭洰鏁版嵁");
                 }
-//                }
             }
-            return AjaxResult.success(list);
         }
-        return AjaxResult.success("璇ュ鎴锋病鏈変綋妫�椤圭洰鏁版嵁锛�");
+        return list;
     }
     //宸茬鏀�/鏈鏀�
     private List<Map<String, Object>>  getYWqsResult(int a) {

--
Gitblit v1.8.0