| | |
| | | order.setTjCustomerAge(DateUtil.ageOfNow(tjCustomer.getCusBrithday())); |
| | | order.setTjCustomerName(MatchUtils.hideCusName(tjCustomer.getCusName())); |
| | | order.setTjCustomerPhone(MatchUtils.hidePhoneNum(tjCustomer.getCusPhone())); |
| | | order.setTjCusIdCard(MatchUtils.hideIdCardNum(tjCustomer.getCusIdcard())); |
| | | if (tjCustomer.getCusIdcard()!=null){ |
| | | 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()))) { |
| | |
| | | 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()); |
| | |
| | | } |
| | | map.put("list", collect); |
| | | 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); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | return success(tjOrderService.selectTjOrderByOrderId(orderId)); |
| | | } |
| | | |
| | | |
| | | |
| | | @GetMapping("/getIsRequired") |
| | | @ApiOperation(value = "根据参数配置获取是否必填项(身份证、性别、电话、照片、是否直接下单)") |
| | | public AjaxResult getIsRequired() { |
| | | Map<String,String> res=new HashMap<>(); |
| | | res.put("has_idcard",configService.selectConfigByKey("has_idcard")); |
| | | res.put("has_sex",configService.selectConfigByKey("has_sex")); |
| | | res.put("is_phone",configService.selectConfigByKey("is_phone")); |
| | | res.put("mall_hasPhoto",configService.selectConfigByKey("mall_hasPhoto")); |
| | | res.put("has_charge",configService.selectConfigByKey("has_charge")); |
| | | return AjaxResult.success(res); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 体检签到登记接口 |
| | | */ |