| | |
| | | private ISysDictDataService dictDataService; |
| | | @Autowired |
| | | private ISysConfigService configService; |
| | | @Autowired |
| | | private IDictCompService dictCompService; |
| | | @Autowired |
| | | private ITjDwDeptService tjDwDeptService; |
| | | @Autowired |
| | | private ITjDwGroupingService tjDwGroupingService; |
| | | |
| | | @Value("${path.filePath}") |
| | | private String value; |
| | |
| | | //年龄 |
| | | tjReservation.setAge(String.valueOf(MatchUtils.getAgeByIdCard(tjReservation.getIdCard()))); |
| | | //出生日期 |
| | | tjReservation.setBirthday(DateUtil.parse(MatchUtils.getBirthDayByIdCard(tjReservation.getIdCard()), "yyyy-MM-dd")); |
| | | try { |
| | | tjReservation.setBirthday(DateUtil.parse(MatchUtils.getBirthDayByIdCard(tjReservation.getIdCard()), "yyyy-MM-dd")); |
| | | } catch (Exception e) { |
| | | return AjaxResult.error("身份证号不正确"); |
| | | } |
| | | |
| | | if (null != groupingMan && groupingMan.getSex().equals(String.valueOf(tjReservation.getSex()))) { |
| | | |
| | |
| | | //年龄 |
| | | tjReservation.setAge(String.valueOf(MatchUtils.getAgeByIdCard(tjReservation.getIdCard()))); |
| | | //出生日期 |
| | | tjReservation.setBirthday(DateUtil.parse(MatchUtils.getBirthDayByIdCard(tjReservation.getIdCard()), "yyyy-MM-dd")); |
| | | try { |
| | | tjReservation.setBirthday(DateUtil.parse(MatchUtils.getBirthDayByIdCard(tjReservation.getIdCard()), "yyyy-MM-dd")); |
| | | } catch (Exception e) { |
| | | return AjaxResult.error("身份证号不正确"); |
| | | } |
| | | |
| | | TjDwDept dwDept = dwDeptService.getOne(new LambdaQueryWrapper<TjDwDept>().eq(TjDwDept::getDwDeptName, tjReservation.getDwxm())); |
| | | if (null != dwDept) { |
| | |
| | | return AjaxResult.error("请选择预约对象"); |
| | | } |
| | | |
| | | @GetMapping("/linkage") |
| | | public String linkage(@RequestParam("pid") String pid, @RequestParam("type") String type) { |
| | | switch (type){ |
| | | case "1": |
| | | List<DictComp> list = dictCompService.list(); |
| | | List<HashMap<String, Object>> collect = list.stream().map(i -> { |
| | | HashMap<String, Object> hashMap = new HashMap<>(); |
| | | hashMap.put("value", i.getDrugManufacturerId()); |
| | | hashMap.put("text", i.getCnName()); |
| | | return hashMap; |
| | | }).collect(Collectors.toList()); |
| | | return JSONUtil.toJsonStr(collect); |
| | | case "2": |
| | | List<TjDwDept> list1 = tjDwDeptService.getDwDeptListByTjDwDeptId(pid); |
| | | List<HashMap<String, Object>> collect1 = list1.stream().map(i -> { |
| | | HashMap<String, Object> hashMap = new HashMap<>(); |
| | | hashMap.put("value", i.getId()); |
| | | hashMap.put("text", i.getDwDeptName()); |
| | | return hashMap; |
| | | }).collect(Collectors.toList()); |
| | | return JSONUtil.toJsonStr(collect1); |
| | | case "3": |
| | | LambdaQueryWrapper<TjDwGrouping> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(TjDwGrouping::getDwDeptId,pid); |
| | | List<TjDwGrouping> list2 = tjDwGroupingService.list(wrapper); |
| | | List<HashMap<String, Object>> collect2 = list2.stream().map(i -> { |
| | | HashMap<String, Object> hashMap = new HashMap<>(); |
| | | hashMap.put("value", i.getId()); |
| | | hashMap.put("text", i.getGroupingName()); |
| | | return hashMap; |
| | | }).collect(Collectors.toList()); |
| | | return JSONUtil.toJsonStr(collect2); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | } |