From c15fce36365c4e6c75615cf64b6c932b941312c4 Mon Sep 17 00:00:00 2001 From: zjh <zjh@888> Date: 星期一, 04 三月 2024 18:07:21 +0800 Subject: [PATCH] zjh 本地 2024/03/4 -1 --- ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCustomerController.java | 21 ++++++++++++++++----- 1 files changed, 16 insertions(+), 5 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 9b89654..b46cc9d 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 @@ -80,7 +80,6 @@ public AjaxResult getInfoByIdCard(@RequestParam @ApiParam(value = "瀹㈡埛韬唤璇佸彿") String cusIdcard) { if (!"".equals(cusIdcard) && cusIdcard != null) { //鍒ゆ柇韬唤璇佸彿鏍煎紡鏄惁姝g‘ - // TODO: 2023/2/10 鍒ゆ柇韬唤璇佸彿鏍煎紡鏄惁姝g‘ // if(cusIdcard.length()==18){ // if (! MatchUtils.isIdCard(cusIdcard)) { // return AjaxResult.error("韬唤璇佸彿鐮侀敊璇�"); @@ -98,8 +97,11 @@ LtkjTjPat tjPatByIdCard = testMapper.getTjPatByIdCard(cusIdcard); if(null != tjPatByIdCard){ String fcardNo = tjPatByIdCard.getFcardNo(); - if(null !=fcardNo){ + if(null !=fcardNo && !fcardNo.equals("")){ fcardNo=fcardNo.trim(); + tjPatByIdCard.setFcardNo(fcardNo); + }else { + fcardNo=cusIdcard.trim(); tjPatByIdCard.setFcardNo(fcardNo); } //鏍规嵁韬唤璇佸彿浠庢暟鎹簱鎷夸俊鎭� 娌℃湁鐨勮瘽淇濆瓨 @@ -222,6 +224,12 @@ //浠巋is琛ㄦ姄鏁版嵁 LtkjMiddleHead pat = testMapper.getMiddleHeadByPartId(customer.getCardId()); if (null != pat) { + LambdaQueryWrapper<LtkjMiddleHead> wq1=new LambdaQueryWrapper<>(); + wq1.eq(LtkjMiddleHead::getFeadId,customer.getCardId()); + headService.remove(wq1); + LambdaQueryWrapper<LtkjMiddleDetail> wq0=new LambdaQueryWrapper<>(); + wq0.eq(LtkjMiddleDetail::getFheadId,pat.getFeadId()); + middleDetailService.remove(wq0); List<LtkjMiddleDetail> list = testMapper.getMiddleDetailByFeadId(pat.getFeadId()); DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.MASTER.name()); LtkjMiddleHead o = headService.getMiddleHeadByPartId(customer.getCardId()); @@ -293,9 +301,10 @@ if(null !=tjCustomer.getIdType()){ if(tjCustomer.getIdType().equals("1")){ b = MatchUtils.isIdCard(cusIdcard); - }else { - b = MatchUtils.cardValidate(cusIdcard, tjCustomer.getIdType()); } +// else { +// b = MatchUtils.cardValidate(cusIdcard, tjCustomer.getIdType()); +// } }else { return AjaxResult.error("璇烽�夋嫨璇佷欢绫诲瀷"); } @@ -320,7 +329,9 @@ String substring = cusIdcard.substring(cusIdcard.length() - 6); substring = DigestUtils.md5DigestAsHex(substring.getBytes()); tjCustomer.setCusPassword(substring); - tjCustomer.setCusBrithday(DateUtil.parse(MatchUtils.getBirthDayByIdCard(tjCustomer.getCusIdcard()), "yyyy-MM-dd")); + if(tjCustomer.getIdType().equals("1")){ + tjCustomer.setCusBrithday(DateUtil.parse(MatchUtils.getBirthDayByIdCard(tjCustomer.getCusIdcard()), "yyyy-MM-dd")); + } tjCustomer.setCusNumber(0L); if (tjCustomerService.save(tjCustomer)) { return AjaxResult.success(tjCustomer); -- Gitblit v1.8.0