From 2a85542341319a4085b04ec9a6a667be6ae799df Mon Sep 17 00:00:00 2001
From: zhaowenxuan <chacca165@163.com>
Date: 星期五, 01 八月 2025 16:01:00 +0800
Subject: [PATCH] 弃检见附件以及主键医师不打印

---
 ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCustomerController.java |   58 +++++++++++++++++++++-------------------------------------
 1 files changed, 21 insertions(+), 37 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 def672b..855bbd2 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
@@ -163,11 +163,6 @@
                         return AjaxResult.error("韬唤璇佸彿鐮侀敊璇�");
                     }
                 }
-//                if(cusIdcard.length()==9){
-//                    if (!MatchUtils.cardValidates(cusIdcard)) {
-//                        return AjaxResult.error("韬唤璇佸彿鐮侀敊璇�");
-//                    }
-//                }
             }
 
 
@@ -269,6 +264,7 @@
 
 //                    if(null !=tjReservation.getCompanyId())tjCustomer1.setDictCompId(Long.valueOf(tjReservation.getCompanyId()));
                     if(null !=tjReservation.getCompany())tjCustomer1.setCompName(tjReservation.getCompany());
+                    if(null !=tjReservation.getDepartment())tjCustomer1.setDepartment(tjReservation.getDepartment());
 
 //                    tjCustomerService.updateById(tjCustomer1);
 
@@ -286,8 +282,8 @@
                     tjCustomer.setCusPhone(tjReservation.getPhoe());
                     tjCustomer.setCusEmail(tjReservation.getEmail());
                     tjCustomer.setCusAddr(tjReservation.getAddress());
-                    tjCustomer.setCusMarryStatus(String.valueOf(tjReservation.getMarriage()));
-                    tjCustomer.setCusNational(String.valueOf(tjReservation.getNation()));
+                    tjCustomer.setCusMarryStatus(String.valueOf(tjReservation.getMarriage())==null ?"0": tjReservation.getMarriage().toString());
+                    tjCustomer.setCusNational(String.valueOf(tjReservation.getNation()) ==null ? "0": tjReservation.getNation().toString());
 
                     tjCustomer.setIdType(tjReservation.getIdType());
                     tjCustomer.setAge(tjReservation.getAge());
@@ -304,7 +300,7 @@
                     tjCustomer.setPym(PinyinUtil.getFirstLetter(tjReservation.getName(),""));
                     if(null !=tjReservation.getCompanyId())tjCustomer.setCompId(tjReservation.getCompanyId());
                     if(null !=tjReservation.getCompany())tjCustomer.setCompName(tjReservation.getCompany());
-
+                    if(null !=tjReservation.getDepartment())tjCustomer.setDepartment(tjReservation.getDepartment());
                     if (null != key && key.equals("Y")) {
                         AjaxResult result = controller.Outpincreateapply(tjCustomer);
                         String result1 = getAjaxResult(result);
@@ -317,7 +313,7 @@
                                 String pationid = resultData.get("PationId").toString();
                                 if (null != pationid) {
                                     tjCustomer.setPationId(pationid);
-                                    tjCustomerService.save(tjCustomer);
+//                                    tjCustomerService.save(tjCustomer);
                                     //淇濆瓨娉ㄥ唽鍏ュ弬鍑哄弬
                                     resultData.put("cardId",pationid);
                                     JSONObject object4 = JSONUtil.parseObj(resultData);
@@ -329,18 +325,15 @@
                             }
                         }
                     } else if(null != s && s.equalsIgnoreCase("Y")) {
-                        TjCustomer requestCommonHisApi = isRequestCommonHisApi(tjCustomer);
-                        if (null !=requestCommonHisApi){
-                            tjCustomerService.save(requestCommonHisApi);
-                        }
-                    }else {
-                        tjCustomerService.save(tjCustomer);
+                        tjCustomer = isRequestCommonHisApi(tjCustomer);
                     }
-                    tjCustomer.setTeamNo(tjReservation.getTeamNo());
-                    tjCustomer.setCompId(tjReservation.getCompanyId());
-                    tjCustomer.setReservationId(tjReservation.getId());
-                    tjCustomer.setDiscount(tjReservation.getDiscount());
-                    tjCustomer.setGroupingId(tjReservation.getGroupingId());
+                        tjCustomerService.save(tjCustomer);
+                        tjCustomer.setTeamNo(tjReservation.getTeamNo());
+                        tjCustomer.setCompId(tjReservation.getCompanyId());
+                        tjCustomer.setReservationId(tjReservation.getId());
+                        tjCustomer.setDiscount(tjReservation.getDiscount());
+                        tjCustomer.setGroupingId(tjReservation.getGroupingId());
+
                     return success(tjCustomer);
                 }
 
@@ -353,16 +346,7 @@
             if (null == tjCustomerServiceOne) {
                 return AjaxResult.error("璇ヤ汉鍛樹俊鎭笉瀛樺湪璇峰厛杩涜鐧昏!!!");
             }
-//            if (null != key && key.equals("Y")) {
-                String cardId = tjCustomerServiceOne.getCardId();
-                if (null != cardId && !cardId.equals("0")) {
-//                    int i = tjOrderService.selectTjOrderByCardId(cardId);
-//                    if (i > 0) {
-//                        return AjaxResult.error("涓嶅彲閲嶅绛惧埌");
-//                    }
-                }
 
-//            }
             if(!tjCustomerServiceOne.getAge().equals(String.valueOf(DateUtil.ageOfNow(tjCustomerServiceOne.getCusBrithday())))){
                 tjCustomerServiceOne.setAge(String.valueOf(DateUtil.ageOfNow(tjCustomerServiceOne.getCusBrithday())));
                 tjCustomerService.updateById(tjCustomerServiceOne);
@@ -492,24 +476,24 @@
                 if(sfjysfzh.equalsIgnoreCase("Y")){
                     if(cusIdcard.length()==18){
                         b = MatchUtils.isIdCard(cusIdcard);
+                    }else {
+                        return AjaxResult.error("璇疯緭鍏ュ崄鍏綅鍙风殑璇佷欢鍙�!");
                     }
                 }
             }
-//            else {
-//                if(cusIdcard.length()==9){
-//                    b = MatchUtils.cardValidate(cusIdcard, tjCustomer.getIdType());
-//                }
-//
-//            }
         } else {
             return AjaxResult.error("璇烽�夋嫨璇佷欢绫诲瀷");
         }
-        if (!b) return AjaxResult.error("璇佷欢鍙锋湁璇�");
+        if (!b) return AjaxResult.error("璇佷欢鍙锋湁璇�,璇锋鏌ヨ瘉浠跺彿鏄惁鏈夋晥!");
+
 
         //鍒ゆ柇韬唤璇佸彿鏍煎紡鏄惁姝g‘
+        if (tjCustomer.getCusPhone().length() != 11)
+            return AjaxResult.error("璇疯緭鍏ュ崄涓�浣嶅彿鐨勬墜鏈哄彿!");
+
         if(sfjysjh.equalsIgnoreCase("Y")){
             if (!(MatchUtils.isMobileNO(tjCustomer.getCusPhone())))
-                return AjaxResult.error("鎵嬫満鍙烽敊璇�");
+                return AjaxResult.error("鎵嬫満鍙烽敊璇�,璇锋鏌ユ墜鏈哄彿鏄惁鏈夋晥!");
         }
 
         LambdaQueryWrapper<TjCustomer> wq = new LambdaQueryWrapper<>();

--
Gitblit v1.8.0