From 9cf381f93354a5f0fcaf14bd3ab118886d589f80 Mon Sep 17 00:00:00 2001 From: zjh <1084500556@qq.com> Date: 星期三, 06 八月 2025 13:38:01 +0800 Subject: [PATCH] zjh20250806 --- ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCustomerController.java | 23 +++++++++-------------- 1 files changed, 9 insertions(+), 14 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 86bb882..8ec252f 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 @@ -151,6 +151,7 @@ @PostMapping(value = "/cusIdcard") @ApiOperation(value = "鏍规嵁韬唤璇佸彿鑾峰彇鐢ㄦ埛淇℃伅") // @Log(title = "瀹㈡埛韬唤淇℃伅", businessType = BusinessType.EXPORT) + @RepeatSubmit public AjaxResult getInfoByIdCard(@RequestParam @ApiParam(value = "瀹㈡埛韬唤璇佸彿") String cusIdcard) { if (!"".equals(cusIdcard) && cusIdcard != null) { @@ -163,11 +164,6 @@ return AjaxResult.error("韬唤璇佸彿鐮侀敊璇�"); } } -// if(cusIdcard.length()==9){ -// if (!MatchUtils.cardValidates(cusIdcard)) { -// return AjaxResult.error("韬唤璇佸彿鐮侀敊璇�"); -// } -// } } @@ -234,9 +230,7 @@ tjReservationService.updateById(tjReservation); return AjaxResult.error("瀵逛笉璧锋偍鐨勯绾﹀凡瓒呮椂璇烽噸鏂伴绾�"); } - LambdaQueryWrapper<TjCustomer> qw = new LambdaQueryWrapper<>(); - qw.eq(TjCustomer::getCusIdcard, cusIdcard); - TjCustomer tjCustomer1 = tjCustomerService.getOne(qw); + TjCustomer tjCustomer1 = tjCustomerService.getTjCustomerByCusIdCard(cusIdcard); if (tjCustomer1 != null) { // if (null != tjReservation.getCompanyId()) tjCustomer1.setDictCompId(Long.valueOf(tjReservation.getCompanyId())); // if (null != tjReservation.getCompany()) tjCustomer1.setCompName(tjReservation.getCompany()); @@ -287,8 +281,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()); @@ -318,7 +312,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); @@ -332,14 +326,15 @@ } else if(null != s && s.equalsIgnoreCase("Y")) { tjCustomer = isRequestCommonHisApi(tjCustomer); } - if(null != tjCustomer){ - tjCustomerService.save(tjCustomer); +// TjCustomer tjCustomerByCusIdCard = tjCustomerService.getTjCustomerByCusIdCard(cusIdcard); +// if(null != tjCustomerByCusIdCard) + 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); } -- Gitblit v1.8.0