From 18e5f7bfe225b284dfc62033ef7963ead120a19f Mon Sep 17 00:00:00 2001 From: zhaowenxuan <chacca165@163.com> Date: 星期二, 18 三月 2025 17:43:11 +0800 Subject: [PATCH] 修改泾川手动检验检查 --- ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCustomerController.java | 45 ++++++++++++++++++++++++++------------------- 1 files changed, 26 insertions(+), 19 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 404743c..e7c76b4 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 @@ -241,7 +241,11 @@ tjCustomer1.setTjType(tjReservation.getTjType()); tjCustomer1.setCusName(tjReservation.getName()); tjCustomer1.setCusSex(Long.valueOf(tjReservation.getSex())); - tjCustomer1.setCusBrithday(DateUtil.parse(MatchUtils.getBirthDayByIdCard(tjReservation.getIdCard()), "yyyy-MM-dd")); + try { + tjCustomer1.setCusBrithday(DateUtil.parse(MatchUtils.getBirthDayByIdCard(tjReservation.getIdCard()), "yyyy-MM-dd")); + } catch (Exception e) { + return AjaxResult.error("韬唤璇佸彿涓嶆纭�"); + } tjCustomer1.setCusPhone(tjReservation.getPhoe()); tjCustomer1.setCusEmail(tjReservation.getEmail()); tjCustomer1.setCusAddr(tjReservation.getAddress()); @@ -261,7 +265,7 @@ tjCustomer1.setGroupingId(tjReservation.getGroupingId()); // if(null !=tjReservation.getCompanyId())tjCustomer1.setDictCompId(Long.valueOf(tjReservation.getCompanyId())); -// if(null !=tjReservation.getCompany())tjCustomer1.setCompName(tjReservation.getCompany()); + if(null !=tjReservation.getCompany())tjCustomer1.setCompName(tjReservation.getCompany()); // tjCustomerService.updateById(tjCustomer1); @@ -271,7 +275,11 @@ tjCustomer.setCusIdcard(tjReservation.getIdCard()); tjCustomer.setCusName(tjReservation.getName()); tjCustomer.setCusSex(Long.valueOf(tjReservation.getSex())); - tjCustomer.setCusBrithday(DateUtil.parse(MatchUtils.getBirthDayByIdCard(tjReservation.getIdCard()), "yyyy-MM-dd")); + try { + tjCustomer.setCusBrithday(DateUtil.parse(MatchUtils.getBirthDayByIdCard(tjReservation.getIdCard()), "yyyy-MM-dd")); + } catch (Exception e) { + return AjaxResult.error("韬唤璇佸彿涓嶆纭�"); + } tjCustomer.setCusPhone(tjReservation.getPhoe()); tjCustomer.setCusEmail(tjReservation.getEmail()); tjCustomer.setCusAddr(tjReservation.getAddress()); @@ -291,8 +299,8 @@ tjCustomer.setCusPassword(substring); tjCustomer.setTjType(tjReservation.getTjType()); tjCustomer.setPym(PinyinUtil.getFirstLetter(tjReservation.getName(),"")); -// if(null !=tjReservation.getCompanyId())tjCustomer.setDictCompId(Long.valueOf(tjReservation.getCompanyId())); -// if(null !=tjReservation.getCompany())tjCustomer.setCompName(tjReservation.getCompany()); + if(null !=tjReservation.getCompanyId())tjCustomer.setCompId(tjReservation.getCompanyId()); + if(null !=tjReservation.getCompany())tjCustomer.setCompName(tjReservation.getCompany()); if (null != key && key.equals("Y")) { AjaxResult result = controller.Outpincreateapply(tjCustomer); @@ -483,12 +491,13 @@ b = MatchUtils.isIdCard(cusIdcard); } } - } else { - if(cusIdcard.length()==9){ - b = MatchUtils.cardValidate(cusIdcard, tjCustomer.getIdType()); - } - } +// else { +// if(cusIdcard.length()==9){ +// b = MatchUtils.cardValidate(cusIdcard, tjCustomer.getIdType()); +// } +// +// } } else { return AjaxResult.error("璇烽�夋嫨璇佷欢绫诲瀷"); } @@ -504,20 +513,18 @@ wq.eq(TjCustomer::getCusIdcard, cusIdcard); TjCustomer customer = tjCustomerService.getOne(wq); if (customer != null) { -// BeanUtils.copyBeanProp(tjCustomer, customer); -// String substring = cusIdcard.substring(cusIdcard.length() - 6); -// substring = DigestUtils.md5DigestAsHex(substring.getBytes()); -// customer.setCusPassword(substring); -// customer.setCusBrithday(DateUtil.parse(MatchUtils.getBirthDayByIdCard(tjCustomer.getCusIdcard()), "yyyy-MM-dd")); -// return AjaxResult.success(tjCustomerService.updateById(customer)); return AjaxResult.error("璇ヤ汉鍛樺凡瀛樺湪"); } String substring = cusIdcard.substring(cusIdcard.length() - 6); substring = DigestUtils.md5DigestAsHex(substring.getBytes()); tjCustomer.setCusPassword(substring); -// if (tjCustomer.getIdType().equals("1")) { - tjCustomer.setCusBrithday(DateUtil.parse(MatchUtils.getBirthDayByIdCard(tjCustomer.getCusIdcard()), "yyyy-MM-dd")); -// } + if(cusIdcard.length()==18) { + try { + tjCustomer.setCusBrithday(DateUtil.parse(MatchUtils.getBirthDayByIdCard(tjCustomer.getCusIdcard()), "yyyy-MM-dd")); + } catch (Exception e) { + return AjaxResult.error("韬唤璇佸彿涓嶆纭�"); + } + } tjCustomer.setCusNumber(0L); tjCustomer.setPym(PinyinUtil.getFirstLetter(tjCustomer.getCusName(),"")); String config = sysConfigService.selectConfigByKey("sfkqdyhis"); -- Gitblit v1.8.0