From e6eb8c14f98921ba73a7efdfc1415c6483dc4112 Mon Sep 17 00:00:00 2001 From: zhaowenxuan <chacca165@163.com> Date: 星期五, 18 七月 2025 14:34:46 +0800 Subject: [PATCH] 查询时间范围条件 --- ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCustomerController.java | 45 +++++++++++++++++---------------------------- 1 files changed, 17 insertions(+), 28 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 1592fd9..86bb882 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 @@ -330,18 +330,16 @@ } } } 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()); + if(null != tjCustomer){ + 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); } @@ -354,16 +352,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); @@ -493,24 +482,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