| | |
| | | order.setTjCustomerAge(DateUtil.ageOfNow(tjCustomer.getCusBrithday())); |
| | | order.setGrMoBanId(reportService.getGrMoBanIds()); |
| | | order.setTjCustomerName(MatchUtils.hideCusName(tjCustomer.getCusName())); |
| | | order.setTjCustomerPhone(MatchUtils.hidePhoneNum(tjCustomer.getCusPhone())); |
| | | order.setTjCusIdCard(MatchUtils.hideIdCardNum(tjCustomer.getCusIdcard())); |
| | | if(null!=tjCustomer.getCusPhone())order.setTjCustomerPhone(MatchUtils.hidePhoneNum(tjCustomer.getCusPhone())); |
| | | if(null!=tjCustomer.getCusIdcard())order.setTjCusIdCard(MatchUtils.hideIdCardNum(tjCustomer.getCusIdcard())); |
| | | } |
| | | String firmId = order.getFirmId(); |
| | | if (firmId != null && null != iDictCompService.getById(String.valueOf(order.getFirmId()))) { |
| | |
| | | order.setTjCustomerAge(DateUtil.ageOfNow(tjCustomer.getCusBrithday())); |
| | | order.setGrMoBanId(reportService.getGrMoBanIds()); |
| | | order.setTjCustomerName(MatchUtils.hideCusName(tjCustomer.getCusName())); |
| | | order.setTjCustomerPhone(MatchUtils.hidePhoneNum(tjCustomer.getCusPhone())); |
| | | order.setTjCusIdCard(MatchUtils.hideIdCardNum(tjCustomer.getCusIdcard())); |
| | | if(null!=tjCustomer.getCusPhone())order.setTjCustomerPhone(MatchUtils.hidePhoneNum(tjCustomer.getCusPhone())); |
| | | if(null!=tjCustomer.getCusIdcard())order.setTjCusIdCard(MatchUtils.hideIdCardNum(tjCustomer.getCusIdcard())); |
| | | } |
| | | String firmId = order.getFirmId(); |
| | | if (firmId != null && null != iDictCompService.getById(String.valueOf(order.getFirmId()))) { |
| | |
| | | |
| | | List<TjOrder> list = Optional.ofNullable(tjOrderService.list(wq)).get(); |
| | | if (list.size() > 0) { |
| | | List<TjOrder> list1 = new ArrayList<>(); |
| | | for (TjOrder order : list) { |
| | | TjCustomer tjCustomer = tjCustomerService.selectTjCustomerByCusId(order.getUserId()); |
| | | if (null != tjCustomer) { |
| | | order.setTjCustomerSex(tjCustomer.getCusSex()); |
| | | order.setTjCustomerAge(DateUtil.ageOfNow(tjCustomer.getCusBrithday())); |
| | | order.setGrMoBanId(reportService.getGrMoBanIds()); |
| | | order.setTjCustomerName(MatchUtils.hideCusName(tjCustomer.getCusName())); |
| | | order.setTjCustomerPhone(MatchUtils.hidePhoneNum(tjCustomer.getCusPhone())); |
| | | order.setTjCusIdCard(MatchUtils.hideIdCardNum(tjCustomer.getCusIdcard())); |
| | | asyncService.getPrintOrderList(list); |
| | | if(redisCache.hasKey("getPrintOrderList")){ |
| | | if(null !=type && type==0){ |
| | | List<TjOrder> list1 = redisCache.getCacheMapValue("getPrintOrderList", "0"); |
| | | collect = list1.stream().skip((long) (pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList()); |
| | | } |
| | | String firmId = order.getFirmId(); |
| | | if (firmId != null && null != iDictCompService.selectDictCompByDrugManufacturerId(String.valueOf(order.getFirmId()))) { |
| | | order.setDictCompName(iDictCompService.selectDictCompByDrugManufacturerId(String.valueOf(order.getFirmId())).getCnName()); |
| | | if(null !=type && type==1){ |
| | | List<TjOrder> list1 = redisCache.getCacheMapValue("getPrintOrderList","1"); |
| | | collect = list1.stream().skip((long) (pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList()); |
| | | } |
| | | if (null != order.getPacId()) { |
| | | if (null != tjPackageService.getById(order.getPacId())) { |
| | | order.setPacName(tjPackageService.getById(order.getPacId()).getPacName()); |
| | | } |
| | | if (null != dwDeptService.getById(order.getPacId())) { |
| | | order.setPacName(dwDeptService.getById(order.getPacId()).getDwDeptName()); |
| | | } |
| | | } |
| | | //从打印记录查出最新打印时间 |
| | | TjPrintOrder one = printOrderService.getTjPrintOrderByTjNum(order.getTjNumber()); |
| | | if (null != type && type == 1 && one != null) { |
| | | order.setPrintTime(one.getCreateTime()); |
| | | order.setPrintName(one.getCreateBy()); |
| | | order.setType(1); |
| | | list1.add(order); |
| | | } |
| | | if (null != type && type == 0 && one == null) { |
| | | order.setType(0); |
| | | list1.add(order); |
| | | } |
| | | }else { |
| | | List<TjOrder> list1 = new ArrayList<>(); |
| | | extracted(type, list, list1); |
| | | collect = list1.stream().skip((long) (pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList()); |
| | | } |
| | | collect = list1.stream().skip((long) (pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList()); |
| | | } |
| | | if (null != collect) { |
| | | map.put("total", collect.size()); |
| | |
| | | return AjaxResult.success(map); |
| | | } |
| | | |
| | | private void extracted(Integer type, List<TjOrder> list, List<TjOrder> list1) { |
| | | for (TjOrder order : list) { |
| | | TjCustomer tjCustomer = tjCustomerService.selectTjCustomerByCusId(order.getUserId()); |
| | | if (null != tjCustomer) { |
| | | order.setTjCustomerSex(tjCustomer.getCusSex()); |
| | | order.setTjCustomerAge(DateUtil.ageOfNow(tjCustomer.getCusBrithday())); |
| | | order.setGrMoBanId(reportService.getGrMoBanIds()); |
| | | order.setTjCustomerName(MatchUtils.hideCusName(tjCustomer.getCusName())); |
| | | if(null!=tjCustomer.getCusPhone())order.setTjCustomerPhone(MatchUtils.hidePhoneNum(tjCustomer.getCusPhone())); |
| | | if(null!=tjCustomer.getCusIdcard())order.setTjCusIdCard(MatchUtils.hideIdCardNum(tjCustomer.getCusIdcard())); |
| | | } |
| | | String firmId = order.getFirmId(); |
| | | if (firmId != null && null != iDictCompService.selectDictCompByDrugManufacturerId(String.valueOf(order.getFirmId()))) { |
| | | order.setDictCompName(iDictCompService.selectDictCompByDrugManufacturerId(String.valueOf(order.getFirmId())).getCnName()); |
| | | } |
| | | if (null != order.getPacId()) { |
| | | if (null != tjPackageService.getById(order.getPacId())) { |
| | | order.setPacName(tjPackageService.getById(order.getPacId()).getPacName()); |
| | | } |
| | | if (null != dwDeptService.getById(order.getPacId())) { |
| | | order.setPacName(dwDeptService.getById(order.getPacId()).getDwDeptName()); |
| | | } |
| | | } |
| | | //从打印记录查出最新打印时间 |
| | | TjPrintOrder one = printOrderService.getTjPrintOrderByTjNum(order.getTjNumber()); |
| | | if (null != type && type == 1 && one != null) { |
| | | order.setPrintTime(one.getCreateTime()); |
| | | order.setPrintName(one.getCreateBy()); |
| | | order.setType(1); |
| | | list1.add(order); |
| | | } |
| | | if (null != type && type == 0 && one == null) { |
| | | order.setType(0); |
| | | list1.add(order); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导出体检记录列表 |