| | |
| | | substring = DigestUtils.md5DigestAsHex(substring.getBytes()); |
| | | tjCustomer.setCusPassword(substring); |
| | | try { |
| | | tjCustomer.setCusBrithday(MatchUtils.getBirthDayByIdCard(cusIdcard)); |
| | | // tjCustomer.setCusBrithday(MatchUtils.getBirthDayByIdCard(cusIdcard)); |
| | | } catch (Exception e) { |
| | | return AjaxResult.error("身份证号不正确"); |
| | | } |
| | |
| | | } |
| | | map.put ("shenFenZh", customer.getCusIdcard ()); |
| | | map.put ("danWeiBh",""); |
| | | map.put ("chuShengRq", DateUtil.format(customer.getCusBrithday(),"yyyy-MM-dd")); |
| | | map.put ("chuShengRq",customer.getCusBrithday()); |
| | | map.put ("lianXiDz", customer.getCusAddr()); |
| | | map.put ("lianXiDh", customer.getCusPhone ()); |
| | | map.put ("feiYongLb",""); |
| | |
| | | } |
| | | map.put ("shenFenZh", customer.getCusIdcard ()); |
| | | map.put ("danWeiBh",""); |
| | | map.put ("chuShengRq", DateUtil.format(customer.getCusBrithday(),"yyyy-MM-dd")); |
| | | map.put ("chuShengRq", customer.getCusBrithday()); |
| | | map.put ("lianXiDz", customer.getCusAddr()); |
| | | map.put ("lianXiDh", customer.getCusPhone ()); |
| | | map.put ("feiYongLb",""); |
| | |
| | | }else { |
| | | map.put ("brxb",9); |
| | | } |
| | | map.put ("csrq", DateUtil.format(customer.getCusBrithday(),"yyyy-MM-dd")); |
| | | map.put ("csrq", customer.getCusBrithday()); |
| | | map.put ("brnl", customer.getAge ()); |
| | | map.put ("brnldw", customer.getAgeUnit ()); |
| | | map.put ("addr", customer.getCusAddr()); |
| | |
| | | lisSaveSqdxxDto.setBrxm(tjCustomer.getCusName()); |
| | | lisSaveSqdxxDto.setBrdm(PinyinUtil.getFirstLetter(tjCustomer.getCusName(),"")); |
| | | lisSaveSqdxxDto.setXb(tjCustomer.getCusSex()==1?"2":"1"); |
| | | lisSaveSqdxxDto.setCsrq(DateFormatUtils.format(tjCustomer.getCusBrithday(), "yyyy-MM-dd")); |
| | | AgeResult ageResult = DateUtils.calculateAge(tjCustomer.getCusBrithday()); |
| | | lisSaveSqdxxDto.setNl(String.valueOf(ageResult.getAge())); |
| | | lisSaveSqdxxDto.setNldw(String.valueOf(ageResult.getUnit())); |
| | | // lisSaveSqdxxDto.setCsrq(DateFormatUtils.format(tjCustomer.getCusBrithday(), "yyyy-MM-dd")); |
| | | // AgeResult ageResult = DateUtils.calculateAge(tjCustomer.getCusBrithday()); |
| | | // lisSaveSqdxxDto.setNl(String.valueOf(ageResult.getAge())); |
| | | // lisSaveSqdxxDto.setNldw(String.valueOf(ageResult.getUnit())); |
| | | lisSaveSqdxxDto.setSfzh(tjCustomer.getCusIdcard()); |
| | | lisSaveSqdxxDto.setLxdh(tjCustomer.getCusPhone()); |
| | | lisSaveSqdxxDto.setJtzz(""); |
| | |
| | | lisSaveSqdxxDto.setBrxm(tjCustomer.getCusName()); |
| | | lisSaveSqdxxDto.setBrdm(PinyinUtil.getFirstLetter(tjCustomer.getCusName(), "")); |
| | | lisSaveSqdxxDto.setXb(tjCustomer.getCusSex() == 1 ? "2" : "1"); |
| | | lisSaveSqdxxDto.setCsrq(DateFormatUtils.format(tjCustomer.getCusBrithday(), "yyyy-MM-dd")); |
| | | AgeResult ageResult = DateUtils.calculateAge(tjCustomer.getCusBrithday()); |
| | | lisSaveSqdxxDto.setCsrq(tjCustomer.getCusBrithday()); |
| | | AgeResult ageResult = DateUtils.calculateAge(DateUtil.parse(tjCustomer.getCusBrithday(), "yyyy-MM-dd")); |
| | | lisSaveSqdxxDto.setNl(String.valueOf(ageResult.getAge())); |
| | | lisSaveSqdxxDto.setNldw(String.valueOf(ageResult.getUnit())); |
| | | lisSaveSqdxxDto.setSfzh(tjCustomer.getCusIdcard()); |
| | |
| | | lisSaveSqdxxDto.setBrxm(tjCustomer.getCusName()); |
| | | lisSaveSqdxxDto.setBrdm(PinyinUtil.getFirstLetter(tjCustomer.getCusName(), "")); |
| | | lisSaveSqdxxDto.setXb(tjCustomer.getCusSex() == 1 ? "2" : "1"); |
| | | lisSaveSqdxxDto.setCsrq(DateFormatUtils.format(tjCustomer.getCusBrithday(), "yyyy-MM-dd")); |
| | | AgeResult ageResult = DateUtils.calculateAge(tjCustomer.getCusBrithday()); |
| | | lisSaveSqdxxDto.setCsrq(tjCustomer.getCusBrithday()); |
| | | AgeResult ageResult = DateUtils.calculateAge(DateUtil.parse(tjCustomer.getCusBrithday(), "yyyy-MM-dd")); |
| | | lisSaveSqdxxDto.setNl(String.valueOf(ageResult.getAge())); |
| | | lisSaveSqdxxDto.setNldw(String.valueOf(ageResult.getUnit())); |
| | | lisSaveSqdxxDto.setSfzh(tjCustomer.getCusIdcard()); |
| | |
| | | savePacsApply.setExamNo(tjOrder.getCardId()); |
| | | savePacsApply.setName(tjCustomer.getCusName()); |
| | | savePacsApply.setSex(tjCustomer.getCusSex() == 1 ? "2" : "1"); |
| | | AgeResult ageResult = DateUtils.calculateAge(tjCustomer.getCusBrithday()); |
| | | AgeResult ageResult = DateUtils.calculateAge(DateUtil.parse(tjCustomer.getCusBrithday(), "yyyy-MM-dd")); |
| | | savePacsApply.setAge(String.valueOf(ageResult.getAge())); |
| | | savePacsApply.setAgeUnit(String.valueOf(ageResult.getUnit())); |
| | | savePacsApply.setBirthday(DateFormatUtils.format(tjCustomer.getCusBrithday(), "yyyy-MM-dd")); |
| | | savePacsApply.setBirthday(tjCustomer.getCusBrithday()); |
| | | savePacsApply.setCardNumber(tjCustomer.getCusIdcard()); |
| | | savePacsApply.setTel(tjCustomer.getCusPhone()); |
| | | Date date = new Date(); |
| | |
| | | project.setProScope((list26.get(0).getTjStandardLtValue() == null ? " " : list26.get(0).getTjStandardLtValue()) + "-" + (list26.get(0).getTjStandardGtValue() == null ? " " : list26.get(0).getTjStandardGtValue())); |
| | | } else { |
| | | Long cusSex = customer.getCusSex(); |
| | | Date cusBrithday = customer.getCusBrithday(); |
| | | String cusBrithday = customer.getCusBrithday(); |
| | | int age = DateUtil.ageOfNow(cusBrithday); |
| | | for (TjStandard tjStandard : list26) { |
| | | LambdaQueryWrapper<TjStandard> wq8 = new LambdaQueryWrapper<>(); |
| | |
| | | |
| | | // if(null !=tjReservation.getCompanyId())tjCustomer1.setDictCompId(Long.valueOf(tjReservation.getCompanyId())); |
| | | if(null !=tjReservation.getCompany())tjCustomer1.setCompName(tjReservation.getCompany()); |
| | | if(null !=tjReservation.getDepartment())tjCustomer1.setDepartment(tjReservation.getDepartment()); |
| | | |
| | | // tjCustomerService.updateById(tjCustomer1); |
| | | |
| | |
| | | tjCustomer.setPym(PinyinUtil.getFirstLetter(tjReservation.getName(),"")); |
| | | if(null !=tjReservation.getCompanyId())tjCustomer.setCompId(tjReservation.getCompanyId()); |
| | | if(null !=tjReservation.getCompany())tjCustomer.setCompName(tjReservation.getCompany()); |
| | | if(null !=tjReservation.getDepartment())tjCustomer.setDepartment(tjReservation.getDepartment()); |
| | | |
| | | if (null != key && key.equals("Y")) { |
| | | AjaxResult result = controller.Outpincreateapply(tjCustomer); |
| | |
| | | } |
| | | map.put("cusName", tjCustomer.getCusName()); |
| | | map.put("cusSex", tjCustomer.getCusSex()); |
| | | map.put("cusBrithday", tjCustomer.getCusBrithday() != null ? DateUtil.format(tjCustomer.getCusBrithday(), "yyyy-MM-dd") : ""); |
| | | map.put("cusBrithday", tjCustomer.getCusBrithday() != null ? tjCustomer.getCusBrithday() : ""); |
| | | map.put("cusAddr", tjCustomer.getCusAddr()); |
| | | map.put("cusPhone", tjCustomer.getCusPhone()); |
| | | map.put("compName",""); |
| | |
| | | map.put("cusSex",tjCustomer.getCusSex()); |
| | | map.put("cusIdCard",tjCustomer.getCusIdcard()); |
| | | map.put("compId",""); |
| | | map.put("cusBrithday",tjCustomer.getCusBrithday() != null ? DateUtil.format(tjCustomer.getCusBrithday(), "yyyy-MM-dd") : ""); |
| | | map.put("cusBrithday",tjCustomer.getCusBrithday() != null ? tjCustomer.getCusBrithday() : ""); |
| | | map.put("cusAddr",tjCustomer.getCusAddr()); |
| | | map.put("cusPhone",tjCustomer.getCusPhone()); |
| | | map.put("compName",""); |
| | |
| | | TjCustomer customer = new TjCustomer(); |
| | | if(null !=vo.getPhone())customer.setCusPhone(vo.getPhone()); |
| | | customer.setCusName(vo.getName()); |
| | | customer.setCusBrithday(new Date()); |
| | | customer.setCusBrithday(DateUtil.format(new Date(), "yyyy-MM-dd")); |
| | | customer.setCusSex(0L); |
| | | customerService.save(customer); |
| | | Date date=new Date(); |
| | |
| | | return AjaxResult.error("该项目正在套餐中使用,暂时不能停用"); |
| | | } |
| | | if(tjProject.getProParentId() !=0){ |
| | | LambdaQueryWrapper<TjProject> wq = new LambdaQueryWrapper<>(); |
| | | wq.eq(TjProject::getProParentId, tjProject.getProParentId()); |
| | | wq.eq(TjProject::getProStatus,0); |
| | | List<TjProject> list = tjProjectService.list(wq); |
| | | // LambdaQueryWrapper<TjProject> wq = new LambdaQueryWrapper<>(); |
| | | // wq.eq(TjProject::getProParentId, tjProject.getProParentId()); |
| | | // wq.eq(TjProject::getProStatus,0); |
| | | // List<TjProject> list = tjProjectService.list(wq); |
| | | List<TjProject> list = tjProjectService.getTjProjectListBySoneId(tjProject.getProParentId().toString()); |
| | | if (null != list && !list.isEmpty()) { |
| | | int i = list.size(); |
| | | if(i<2) return AjaxResult.error("至少保留一个子项目,不可全部停用!!!"); |
| | |
| | | tjOrderDetail.setStandard(list2.get(0)); |
| | | } else { |
| | | Long cusSex = customer.getCusSex(); |
| | | Date cusBrithday = customer.getCusBrithday(); |
| | | String cusBrithday = customer.getCusBrithday(); |
| | | int age = DateUtil.ageOfNow(cusBrithday); |
| | | for (TjStandard tjStandard : list2) { |
| | | LambdaQueryWrapper<TjStandard> wq8 = new LambdaQueryWrapper<>(); |
| | |
| | | tjOrderDetail.setStandard(list2.get(0)); |
| | | } else { |
| | | Long cusSex = customer.getCusSex(); |
| | | Date cusBrithday = customer.getCusBrithday(); |
| | | String cusBrithday = customer.getCusBrithday(); |
| | | int age = DateUtil.ageOfNow(cusBrithday); |
| | | for (TjStandard tjStandard : list2) { |
| | | LambdaQueryWrapper<TjStandard> wq8 = new LambdaQueryWrapper<>(); |
| | |
| | | // tjReservation.setIsExpire(2); |
| | | if(tjReservation.getIsExpire()==null) tjReservation.setIsExpire(2); |
| | | List<TjReservation> list = tjReservationService.selectTjReservationList(tjReservation); |
| | | // if(null !=list && list.size()>0){ |
| | | // for (TjReservation reservation : list) { |
| | | // reservation.setName(MatchUtils.hideCusName(reservation.getName())); |
| | | // reservation.setPhoe(MatchUtils.hidePhoneNum(reservation.getPhoe())); |
| | | // reservation.setIdCard(MatchUtils.hideIdCardNum(reservation.getIdCard())); |
| | | // } |
| | | // } |
| | | return getDataTable(list); |
| | | } |
| | | |
| | |
| | | } else { |
| | | reportVo.setPacName("无"); |
| | | } |
| | | Date cusBrithday = tjCustomer.getCusBrithday(); |
| | | String cusBrithday = tjCustomer.getCusBrithday(); |
| | | int age = DateUtil.ageOfNow(cusBrithday); |
| | | reportVo.setCusAge(age); |
| | | reportVo.setCusPhone(tjCustomer.getCusPhone()); |
| | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | import java.time.ZoneId; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.regex.Matcher; |
| | | import java.util.regex.Pattern; |
| | |
| | | /** |
| | | * @desc 通过身份证获取出生日期 |
| | | */ |
| | | public static Date getBirthDayByIdCard(String idCard) throws Exception { |
| | | /* public static Date getBirthDayByIdCard(String idCard) throws Exception { |
| | | if (!isIdCard(idCard)) { |
| | | throw new Exception("身份证不正确"); |
| | | } |
| | |
| | | // 设置固定时分秒 |
| | | dateTime = dateTime.withHour(12).withMinute(34).withSecond(56); |
| | | return Date.from(dateTime.atZone(ZoneId.systemDefault()).toInstant()); |
| | | }*/ |
| | | |
| | | |
| | | public static String getBirthDayByIdCard(String idCard) throws Exception { |
| | | if (!isIdCard(idCard)) { |
| | | throw new Exception("身份证不正确"); |
| | | } |
| | | // 获取身份证的出生年月日串 |
| | | String birth = getIdCardBirthDayStr(idCard); |
| | | // 获取年月日 |
| | | int year = Integer.parseInt(birth.substring(0, 4)); |
| | | int month = Integer.parseInt(birth.substring(4, 6)); |
| | | int day = Integer.parseInt(birth.substring(6, 8)); |
| | | String sr = year + "-" + month + "-" + day; |
| | | |
| | | // 解析为 Date |
| | | Date date = DateUtil.parse(sr, "yyyy-MM-dd"); |
| | | // 转换为 LocalDateTime |
| | | LocalDateTime dateTime = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime(); |
| | | // 设置固定时分秒 |
| | | dateTime = dateTime.withHour(12).withMinute(34).withSecond(56); |
| | | |
| | | // 格式化为字符串返回 |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | return dateTime.format(formatter); |
| | | } |
| | | |
| | | /** |
| | |
| | | @Excel(name = "出生日期", width = 30, dateFormat = "yyyy-MM-dd") |
| | | @ApiModelProperty(value = "出生日期") |
| | | @ExcelImport("出生日期") |
| | | private Date cusBrithday; |
| | | private String cusBrithday; |
| | | |
| | | /** |
| | | * 现居住地址 |
| | |
| | | |
| | | private String compName; |
| | | |
| | | @ApiModelProperty("单位部门") |
| | | @TableField(exist = false) |
| | | private String department; |
| | | |
| | | private String hisJzkh; |
| | | |
| | | @TableField(exist = false) |
| | |
| | | // @ExcelImport("出生日期") |
| | | @Excel(name = "出生日期",sort = 6,dateFormat = "yyyy/MM/dd") |
| | | @ApiModelProperty("出生日期") |
| | | private Date birthday; |
| | | private String birthday; |
| | | |
| | | /** |
| | | * 联系电话 |
| | |
| | | //多条标准 根据客户年龄性别判断 |
| | | //性别 |
| | | Long cusSex = customer.getCusSex(); |
| | | Date cusBrithday = customer.getCusBrithday(); |
| | | String cusBrithday = customer.getCusBrithday(); |
| | | //年龄 |
| | | int age = DateUtil.ageOfNow(cusBrithday); |
| | | //遍历判断标准 |
| | |
| | | <if test="yykssj != null and yyjssj != null ">and reservation_time BETWEEN #{yykssj} and #{yyjssj} </if> |
| | | <if test="isExpire != null ">and is_expire = #{isExpire}</if> |
| | | <if test="szd != null ">and szd = #{szd}</if> |
| | | and deleted = '0' |
| | | and deleted = 0 |
| | | </where> |
| | | ORDER BY create_time desc |
| | | </select> |