| | |
| | | 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("请选择证件类型"); |
| | | } |
| | |
| | | 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)tjCustomer.setCusBrithday(DateUtil.parse(MatchUtils.getBirthDayByIdCard(tjCustomer.getCusIdcard()), "yyyy-MM-dd")); |
| | | tjCustomer.setCusNumber(0L); |
| | | tjCustomer.setPym(PinyinUtil.getFirstLetter(tjCustomer.getCusName(),"")); |
| | | String config = sysConfigService.selectConfigByKey("sfkqdyhis"); |