| | |
| | | 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); |
| | | |
| | |
| | | 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); |
| | |
| | | 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"); |