| | |
| | | List<String> jysqdh = orderService.getHuoQuBlJysqdh(order.getCardId(),bldh); |
| | | // }else { |
| | | // 2.1.6.5 作废门诊检查申请 |
| | | if (null != jcsqdh && jcsqdh.size()>0) { |
| | | if (null != jcsqdh && !jcsqdh.isEmpty()) { |
| | | for (String s : jcsqdh) { |
| | | AjaxResult result = controller.Outpindelexamapply(order.getCardId(), ysbm, s); |
| | | String result1 = getAjaxResult(result); |
| | |
| | | } |
| | | |
| | | //2.1.6.3 作废门诊检验申请 |
| | | if (null != jysqdh && jysqdh.size()>0) { |
| | | if (null != jysqdh && !jysqdh.isEmpty()) { |
| | | for (String s : jysqdh) { |
| | | ajaxResult = controller.Outpindeltestapply(order.getCardId(), ysbm, s); |
| | | result2 = getAjaxResult(ajaxResult); |
| | |
| | | } |
| | | |
| | | //2.1.6.9 作废门诊治疗处置申请 |
| | | if (null != zlsqdh && zlsqdh.size()>0) { |
| | | if (null != zlsqdh && !zlsqdh.isEmpty()) { |
| | | for (String s : zlsqdh) { |
| | | ajaxResult = controller.Outpintdelreatapply(order.getCardId(), ysbm, s); |
| | | result2 = getAjaxResult(ajaxResult); |
| | |
| | | } |
| | | |
| | | //作废药品申请 |
| | | if(null !=cfhs && cfhs.size()>0){ |
| | | if(null !=cfhs && !cfhs.isEmpty()){ |
| | | for (String cfh : cfhs) { |
| | | AjaxResult result = controller.Outpindelmedicapply(order.getCardId(), ysbm, cfh); |
| | | String result1 = getAjaxResult(result); |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | public void ZfBlHisApiMethod(String tjh,String bldh) { |
| | | |
| | | TjOrder order = orderService.getOrderByTjNum(tjh); |
| | | if(null !=order){ |
| | | String ysbm = configService.selectConfigByKey("request_default_ysbm"); |
| | | |
| | | List<String> zlsqdh = orderService.getHuoQuBlZlsqdh(order.getCardId(),bldh); |
| | | List<String> jcsqdh = orderService.getHuoQuBlJcsqdh(order.getCardId(),bldh); |
| | | List<String> jysqdh = orderService.getHuoQuBlJysqdh(order.getCardId(),bldh); |
| | | List<String> cfhs = cfService.getCfBlhs(order.getCardId(),bldh); |
| | | |
| | | AjaxResult ajaxResult = null; |
| | | String result2 = null; |
| | | JSONObject object1 = null; |
| | | String code1 = null; |
| | | log.info("查询前"); |
| | | TjCustomer customer1 = customerService.getById(order.getUserId()); |
| | | log.info("customer1 ->{}",customer1); |
| | | List<String> bljcsqdhByPacs = orderService.getBljcsqdhByPacs(order.getCardId(), bldh); |
| | | log.info("bljcsqdhByPacs ->{}",bljcsqdhByPacs); |
| | | // 作废检查申请 |
| | | if (bljcsqdhByPacs != null && !bljcsqdhByPacs.isEmpty()){ |
| | | for (String sqdh : bljcsqdhByPacs) { |
| | | AjaxResult cancelPacsAjaxResult = pacsApiMethodService.updatePacsApply(sqdh, order.getCardId(), customer1.getCusName()); |
| | | log.info("作废检查 pacs返回 ->{}",JSONUtil.toJsonStr(cancelPacsAjaxResult)); |
| | | String result = cancelPacsAjaxResult.get("data").toString(); |
| | | JSONObject object = JSONUtil.parseObj(result); |
| | | String code = object.getStr("ResultCode"); |
| | | if(code.equals("1")){ |
| | | orderService.delHuoQuBlJcsqdh(order.getCardId(),bldh); |
| | | } |
| | | } |
| | | } |
| | | List<String> bljysqdhByLis = orderService.getBljysqdhByLis(order.getCardId(), bldh); |
| | | log.info("bljysqdhByLis ->{}",bljysqdhByLis); |
| | | // 作废检验申请 |
| | | if (bljysqdhByLis != null && !bljysqdhByLis.isEmpty()){ |
| | | for (String sqdh : bljysqdhByLis) { |
| | | AjaxResult cancelLisAjaxResult = lisApiMethod.cancel(sqdh, order.getCardId(), customer1.getCusName()); |
| | | log.info("作废检验 lis返回 ->{}",JSONUtil.toJsonStr(cancelLisAjaxResult)); |
| | | String result = cancelLisAjaxResult.get("data").toString(); |
| | | JSONObject object = JSONUtil.parseObj(result); |
| | | String code= object.getStr("ResultCode"); |
| | | if(code.equals("1")){ |
| | | orderService.delHuoQuBlJysqdh(order.getCardId(),bldh); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | if (null != jcsqdh && !jcsqdh.isEmpty()) { |
| | | for (String s : jcsqdh) { |
| | | AjaxResult result = controller.Outpindelexamapply(order.getCardId(), ysbm, s); |
| | | String result1 = getAjaxResult(result); |
| | | JSONObject object = getJSONObject(result1); |
| | | String code = object.getStr("ResultCode"); |
| | | if (code.equals("0")) { |
| | | orderService.delHuoQuBlJcsqdh(order.getCardId(),bldh); |
| | | } |
| | | } |
| | | } |
| | | |
| | | //2.1.6.3 作废门诊检验申请 |
| | | if (null != jysqdh && !jysqdh.isEmpty()) { |
| | | for (String s : jysqdh) { |
| | | ajaxResult = controller.Outpindeltestapply(order.getCardId(), ysbm, s); |
| | | result2 = getAjaxResult(ajaxResult); |
| | | object1 = getJSONObject(result2); |
| | | code1 = object1.getStr("ResultCode"); |
| | | if (code1.equals("0")) { |
| | | orderService.delHuoQuBlJysqdh(order.getCardId(),bldh); |
| | | } |
| | | } |
| | | } |
| | | |
| | | //2.1.6.9 作废门诊治疗处置申请 |
| | | if (null != zlsqdh && !zlsqdh.isEmpty()) { |
| | | for (String s : zlsqdh) { |
| | | ajaxResult = controller.Outpintdelreatapply(order.getCardId(), ysbm, s); |
| | | result2 = getAjaxResult(ajaxResult); |
| | | object1 = getJSONObject(result2); |
| | | code1 = object1.getStr("ResultCode"); |
| | | if (code1.equals("0")) { |
| | | orderService.delHuoQuZlsqdh(order.getCardId(),bldh); |
| | | } |
| | | } |
| | | } |
| | | |
| | | //作废药品申请 |
| | | if(null !=cfhs && !cfhs.isEmpty()){ |
| | | for (String cfh : cfhs) { |
| | | AjaxResult result = controller.Outpindelmedicapply(order.getCardId(), ysbm, cfh); |
| | | String result1 = getAjaxResult(result); |
| | | JSONObject object = getJSONObject(result1); |
| | | String code = object.getStr("ResultCode"); |
| | | if(null !=code && code.equals("0")){ |
| | | cfService.delCfByCardId(cfh); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | //获取门诊结算记录 |
| | | @Transactional |
| | | public void getHisMzJsJl(TjOrder order) { |
| | |
| | | makeHisJianYanTable(document, map, dictHosp, color); |
| | | |
| | | printReport = new HashMap<>(); |
| | | pacsJianChaData(tjOrder.getTjNumber(), printReport, tjOrder, customer); |
| | | // pacsJianChaData(tjOrder.getTjNumber(), printReport, tjOrder, customer); |
| | | newpacsJianChaData(tjOrder.getTjNumber(), printReport, tjOrder, customer); |
| | | try { |
| | | notHuaYanTable(document, printReport, dictHosp, color, true); |
| | | // notHuaYanTable(document, printReport, dictHosp, color, true); |
| | | pacsTable(document, printReport, dictHosp, color, true); |
| | | } catch (DocumentException e) { |
| | | log.error("pacs项目填充表格异常"); |
| | | log.error(String.valueOf(e)); |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | private void pacsTable(Document document1, Map<TjOrderRemark, List<TjPdfVO>> printReport, DictHosp dictHosp, String colorStr, boolean isPacs)throws DocumentException{ |
| | | try { |
| | | List<TjReportSpecialProject> tjReportSpecialProjects = tjReportSpecialProjectService.list(); |
| | | for (Map.Entry<TjOrderRemark, List<TjPdfVO>> entry : printReport.entrySet()) { |
| | | |
| | | if (entry.getValue() == null || entry.getValue().isEmpty()) continue; |
| | | //判断该项目是否需要打印报告 |
| | | |
| | | TjOrderRemark orderRemark = entry.getKey(); |
| | | List<TjPdfVO> value = entry.getValue().stream().distinct().collect(Collectors.toList()); |
| | | if (StrUtil.isBlank(value.get(0).getProResult()) && (StrUtil.isBlank(value.get(0).getTs()) && StrUtil.isBlank(value.get(0).getSj()))) { |
| | | continue; |
| | | } |
| | | String titleName = null; |
| | | |
| | | if (entry.getValue().get(0).getProName().contains(";")) |
| | | titleName = entry.getValue().get(0).getProName(); |
| | | else titleName = orderRemark.getProName(); |
| | | // 设置标题字体样式 |
| | | Font titleFonts = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | | Paragraph paragraph = PdfUtils.setParagraph(titleFonts, titleName); |
| | | |
| | | if (StrUtil.isBlank(value.get(0).getProResult()) && (StrUtil.isBlank(value.get(0).getTs().replaceAll("\n","")) |
| | | && StrUtil.isBlank(value.get(0).getSj().replaceAll("\n","")))) { |
| | | continue; |
| | | } |
| | | Font titleFont = PdfUtils.setFont(DEFAULT_TITLE_FONT_SIZE); |
| | | titleFont.setStyle(Font.BOLD); |
| | | PdfPCell cellTitle = new PdfPCell(PdfUtils.setParagraph(titleFont, titleName)); |
| | | cellTitle.setBorder(Rectangle.NO_BORDER); |
| | | Color color = Color.decode("#B4CDCD"); |
| | | cellTitle.setBackgroundColor(new BaseColor(color.getRed(), color.getGreen(), color.getBlue())); // 设置背景颜色(十六进制 RGB) |
| | | // 创建表格并添加单元格 |
| | | PdfPTable tableTitle = new PdfPTable(1); |
| | | tableTitle.setWidthPercentage(100); |
| | | tableTitle.addCell(cellTitle); |
| | | // 将表格添加到文档中 |
| | | document1.add(tableTitle); |
| | | |
| | | if (!value.isEmpty()) { |
| | | if (value.size() > 1) { |
| | | Long pid = Long.valueOf(value.get(0).getPid()); |
| | | Optional<TjReportSpecialProject> match = tjReportSpecialProjects.stream() |
| | | .filter(item -> item.getProId().equals(pid)) |
| | | .findFirst(); |
| | | if (match.isPresent()) { |
| | | reportSpecialProject(document1, entry, paragraph, value,match.get()); |
| | | } else { |
| | | String[] titles = {"体检项目", "体检结果", "单位"}; |
| | | Font headFont = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | | Font textFont = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | | PdfPTable table = PdfUtils.setTable2(headFont, textFont, titles, value, isPacs, new float[]{240, 240, 240}); |
| | | document1.add(table); |
| | | } |
| | | |
| | | } else { |
| | | Font remarkFonts = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | | |
| | | if (isPacs) { |
| | | Paragraph pp; |
| | | Paragraph ppp; |
| | | |
| | | if (StrUtil.isNotBlank(value.get(0).getSj()) || StrUtil.isNotBlank(value.get(0).getProResult())) { |
| | | pp = PdfUtils.setParagraph(remarkFonts, "检查所见:"); |
| | | document1.add(pp); |
| | | ppp = new Paragraph(value.get(0).getSj() != null ? value.get(0).getSj().replaceAll("\n","") : value.get(0).getProResult().replaceAll("\n",""), remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | } |
| | | |
| | | pp = PdfUtils.setParagraph(remarkFonts, "检查提示:"); |
| | | document1.add(pp); |
| | | ppp = new Paragraph((value.get(0).getTs() != null ? value.get(0).getTs().replaceAll("\n","") : value.get(0).getProResult().replaceAll("\n","")), remarkFonts); |
| | | paragraph.setAlignment(Element.ALIGN_LEFT); |
| | | paragraph.setLeading(5f); |
| | | document1.add(ppp); |
| | | |
| | | } else { |
| | | Long pid = Long.valueOf(value.get(0).getPid()); |
| | | Optional<TjReportSpecialProject> match = tjReportSpecialProjects.stream() |
| | | .filter(item -> item.getProId().equals(pid)) |
| | | .findFirst(); |
| | | if (match.isPresent()) { |
| | | reportSpecialProject(document1, entry, paragraph, value,match.get()); |
| | | } else { |
| | | String[] titles = {"体检项目", "体检结果"}; |
| | | Font headFont = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | | Font textFont = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | | PdfPTable table = PdfUtils.setTable2(headFont, textFont, titles, value, false, new float[]{240, 300}); |
| | | document1.add(table); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } else { |
| | | String[] titles = {"体检项目", "体检结果", "单位"}; |
| | | Font headFont = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | | Font textFont = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | | PdfPTable table = PdfUtils.setTable(headFont, textFont, titles, value, isPacs); |
| | | document1.add(table); |
| | | } |
| | | |
| | | |
| | | //判断备注是否为空 空不能显示null |
| | | if (entry.getKey().getRemark() == null) { |
| | | entry.getKey().setRemark(""); |
| | | } |
| | | // if (!dictHosp.getHospName().equals("澄合矿务局中心医院")){ |
| | | if (!true) { |
| | | String remark = "备注:" + entry.getKey().getRemark(); |
| | | if (entry.getKey().getRemark().length() > 50) { |
| | | int j = 0; |
| | | for (int i = 0; i < remark.length() / 50; i++) { |
| | | String substring = remark.substring(j, j + 50); |
| | | Font remarkFonts = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | | Paragraph pp = PdfUtils.setParagraph(remarkFonts, substring); |
| | | document1.add(pp); |
| | | j = j + 50; |
| | | } |
| | | if (remark.length() % 50 != 0) { |
| | | String substring = remark.substring((remark.length() / 50) * 50, remark.length() - 1); |
| | | Font remarkFonts = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | | Paragraph pp = PdfUtils.setParagraph(remarkFonts, substring); |
| | | document1.add(pp); |
| | | } |
| | | } else { |
| | | Font remarkFonts = PdfUtils.setFont(DEFAULT_FONT_SIZE); |
| | | Paragraph pp = PdfUtils.setParagraph(remarkFonts, remark); |
| | | document1.add(pp); |
| | | } |
| | | } |
| | | //判断主检医师是否为空 空不能显示null |
| | | zhuJianYiShi(document1, entry, orderRemark.getCreateTime(), dictHosp); |
| | | // if (!dictHosp.getHospName().equals("澄合矿务局中心医院")) { |
| | | if (!true) { |
| | | //分割线 |
| | | LineSeparator objectName = new LineSeparator(); |
| | | document1.add(objectName); |
| | | } |
| | | |
| | | |
| | | } |
| | | } catch (NumberFormatException e) { |
| | | throw new RuntimeException(e); |
| | | } catch (DocumentException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 目前写死 只有碳13、14 模板都是一样的只不过参考值不同 |
| | | * 凌云:{"dy":"4.0","xy":"4.0","title":"阳性参考值:","dystr":"DOB值: ≥ ${dy} HP-阳性","xystr":" < ${xy} 正常","en":"DOB"} |
| | |
| | | } |
| | | tjPdfVO.setProId(String.valueOf(tjOrderDetail.getProject().getProId())); |
| | | tjPdfVO.setPid(String.valueOf(tjProject.getProParentId())); |
| | | tjPdfVO.setXh(tjProject.getXh()); |
| | | // LambdaQueryWrapper<LtkjExamJcbgd> wrapper = new LambdaQueryWrapper<>(); |
| | | // wrapper.eq(LtkjExamJcbgd::getTjh, tjNumber); |
| | | // wrapper.eq(LtkjExamJcbgd::getXmdm, String.valueOf(tjOrderDetail.getProject().getProParentId())); |
| | |
| | | } |
| | | } |
| | | if(!tjPdfVOS.isEmpty()){ |
| | | tjPdfVOS=tjPdfVOS.stream().sorted(Comparator.comparing(TjPdfVO::getProName, Collator.getInstance(Locale.CHINA))).collect(Collectors.toList()); |
| | | tjPdfVOS = tjPdfVOS.stream() |
| | | .sorted(Comparator.comparingInt( |
| | | tjPdfVO -> tjPdfVO.getProName().length() // 根据名字的长度排序 |
| | | )) |
| | | .collect(Collectors.toList()); |
| | | // tjPdfVOS=tjPdfVOS.stream().sorted(Comparator.comparing(TjPdfVO::getProName, Collator.getInstance(Locale.CHINA))).collect(Collectors.toList()); |
| | | // tjPdfVOS = tjPdfVOS.stream() |
| | | // .sorted(Comparator.comparingInt( |
| | | // tjPdfVO -> tjPdfVO.getProName().length() // 根据名字的长度排序 |
| | | // )) |
| | | // .collect(Collectors.toList()); |
| | | tjPdfVOS=tjPdfVOS.stream().sorted(Comparator.comparing(TjPdfVO::getXh)).collect(Collectors.toList()); |
| | | } |
| | | printReport.put(entry.getKey(), tjPdfVOS); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | private void newpacsJianChaData(String tjNumber, Map<TjOrderRemark, List<TjPdfVO>> printReport, TjOrder one, TjCustomer customer) { |
| | | try { |
| | | List<TjOrderRemark> tjOrderRemarks = tjOrderRemarkService.newpacsJianChaData(tjNumber); |
| | | for (TjOrderRemark tjOrderRemark : tjOrderRemarks) { |
| | | List<TjPdfVO> tjPdfVOS = new ArrayList<>(); |
| | | TjPdfVO tjPdfVO = new TjPdfVO(); |
| | | tjPdfVO.setProResult(null); |
| | | tjPdfVO.setExc(0L); |
| | | tjPdfVO.setCompany("/"); |
| | | tjPdfVO.setProId(tjOrderRemark.getProsId()); |
| | | String yxbx = tjOrderRemark.getRemark(); |
| | | String bgNr = tjOrderRemark.getJgbx(); |
| | | // 正则表达式:匹配数字后跟 '.' 或 '、' |
| | | String regex = "\\d+[\\.,、]"; |
| | | // 使用正则替换,匹配的数字后添加换行符 |
| | | if(StringUtil.isNotBlank(yxbx)) yxbx = yxbx.replaceAll(regex, "\n$0"); |
| | | if(StringUtil.isBlank(bgNr)) bgNr = ""; |
| | | if(StringUtil.isBlank(yxbx)) yxbx = ""; |
| | | tjPdfVO.setTs(yxbx); |
| | | tjPdfVO.setSj(bgNr); |
| | | tjPdfVO.setShys(tjOrderRemark.getDoctorName()); |
| | | tjPdfVO.setProName(tjOrderRemark.getProName()); |
| | | tjPdfVOS.add(tjPdfVO); |
| | | printReport.put(tjOrderRemark, tjPdfVOS); |
| | | } |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 设置用户信息 |
| | | * |
| | |
| | | // @Async("async") |
| | | // @Transactional |
| | | public Boolean iundividualCharges(TjFlowingWater tjFlowingWater, TjOrder order, TjCustomer customer, SysUser sysUser, String jxbz) { |
| | | try { |
| | | Date dates = new Date(); |
| | | final String date = DateUtil.format(dates, "yyyy-MM-dd HH:mm:ss"); |
| | | |
| | |
| | | addCaiYangDengJi(detailLists, !detailLists.isEmpty(), order, sysUser, jxbz); |
| | | String isUseMx = configService.selectConfigByKey("jcxhis_is_use_mx"); |
| | | AjaxResult result; |
| | | try { |
| | | if (isUseMx.equalsIgnoreCase("Y")) |
| | | result = tijianbulushenqing(customer, date, order.getCardId(), jxbz, jianChaProjects, (tjFlowingWater.getPayType() == 6L || tjFlowingWater.getPayStasus() == 1L)); |
| | | else |
| | | result = tijianbulushenqingJinchuanNew(customer, date, order.getCardId(), jxbz, jianChaProjects,(tjFlowingWater.getPayType() == 6L || tjFlowingWater.getPayStasus() == 1L)); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return result.get("code").toString().equals("200"); |
| | | } else { |
| | | List<TjOrderDetail> detailLists = tjOrderDetailService.getCaiYangDengJiJxbz(order.getOrderId(), jxbz); |
| | | addCaiYangDengJiByDiaoYongShiTu(detailLists, !detailLists.isEmpty(), order, sysUser, jxbz); |
| | | } |
| | | } |
| | | |
| | | return true; |
| | | }catch (Exception e){ |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | public void addCaiYangDengJiByDiaoYongShiTu(List<TjOrderDetail> detailList, boolean detailList1, TjOrder order, SysUser sysUser, String jxbz) { |
| | |
| | | } |
| | | } catch (Exception e) { |
| | | log.error(e.getMessage()); |
| | | throw new RuntimeException(); |
| | | } |
| | | } |
| | | |
| | |
| | | private static ArrayList<String> ids = null; |
| | | |
| | | public AjaxResult tijianbulushenqingJinchuanNew(TjCustomer customer, String date, String cardId, String jxbz, ArrayList<TjProject> jianChaProjects, Boolean isTuanTiPiao) { |
| | | try { |
| | | mapJinchuan = new ArrayList<>(); |
| | | ids = new ArrayList<>(); |
| | | tijianbulushenqingOld(customer, date, cardId, jxbz, jianChaProjects, isTuanTiPiao); |
| | | |
| | | tijianbulushenqingJinchuan(customer, date, cardId, jxbz, jianChaProjects, isTuanTiPiao); |
| | | return AjaxResult.success(); |
| | | //return AjaxResult.success(); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | public AjaxResult tijianbulushenqingJinchuan(TjCustomer customer, String date, String cardId, String jxbz, ArrayList<TjProject> jianChaProjects, Boolean isTuanTiPiao) { |
| | | try { |
| | | TjOrder order = orderService.getOrderByCardId(cardId); |
| | | if (null != order) { |
| | | String dept = configService.selectConfigByKey("request_default_dept"); |
| | |
| | | tree.setCreateTime(DateUtil.date()); |
| | | ltkjJianchajianyanTreeService.save(tree); |
| | | } |
| | | // TODO 个人以及团体 暂不向采样管理写数据 |
| | | // HIS发送无法合并操作 无法获取LIS的检验序号 条码无法打印 |
| | | // TjOrder tjOrder = orderService.getOrderByCardId(cardId); |
| | | // if(null !=tjOrder){ |
| | | // List<TjOrderDetail> dengJi = tjOrderDetailService.getCaiYangDengJi(tjOrder.getOrderId()); |
| | | // tjSysAsyncService.addCaiYangDengJi(dengJi,!dengJi.isEmpty(),tjOrder, SecurityUtils.getLoginUser().getUser(), null); |
| | | // } |
| | | }else { |
| | | throw new RuntimeException(); |
| | | } |
| | | } |
| | | } |
| | |
| | | tree.setCreateTime(DateUtil.date()); |
| | | ltkjJianchajianyanTreeService.save(tree); |
| | | } |
| | | }else { |
| | | throw new RuntimeException(); |
| | | } |
| | | } |
| | | } |
| | |
| | | tree.setCreateTime(DateUtil.date()); |
| | | ltkjJianchajianyanTreeService.save(tree); |
| | | } |
| | | }else { |
| | | throw new RuntimeException(); |
| | | } |
| | | } |
| | | } |
| | |
| | | cf.setCreateTime(new Date()); |
| | | cfService.save(cf); |
| | | } |
| | | }else { |
| | | throw new RuntimeException(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return AjaxResult.success(); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | // 体检对his申请单调用方法 |
| | | public AjaxResult tijianbulushenqingOld(TjCustomer customer, String date, String cardId, String jxbz, ArrayList<TjProject> jianChaProjects, Boolean isTuanTiPiao) { |
| | | try { |
| | | TjOrder order = orderService.getOrderByCardId(cardId); |
| | | if (null != order) { |
| | | String dept = configService.selectConfigByKey("request_default_dept"); |
| | |
| | | tree.setCreateTime(DateUtil.date()); |
| | | ltkjJianchajianyanTreeService.save(tree); |
| | | } |
| | | }else { |
| | | throw new RuntimeException(); |
| | | } |
| | | } |
| | | |
| | |
| | | tree.setCreateTime(DateUtil.date()); |
| | | ltkjJianchajianyanTreeService.save(tree); |
| | | } |
| | | }else { |
| | | throw new RuntimeException(); |
| | | } |
| | | } |
| | | |
| | |
| | | tree.setCreateTime(DateUtil.date()); |
| | | ltkjJianchajianyanTreeService.save(tree); |
| | | } |
| | | }else { |
| | | throw new RuntimeException(); |
| | | } |
| | | } |
| | | /* |
| | |
| | | } |
| | | } |
| | | return AjaxResult.success(); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | /**/ |
| | |
| | | // } |
| | | |
| | | public AjaxResult tijianbulushenqing(TjCustomer customer, String date, String cardId, String jxbz, ArrayList<TjProject> jianChaProjects, Boolean isTuanTiPiao) { |
| | | try { |
| | | TjOrder order = orderService.getOrderByCardId(cardId); |
| | | if (null != order) { |
| | | String dept = configService.selectConfigByKey("request_default_dept"); |
| | |
| | | log.info("分组后 ->{}",JSONUtil.toJsonStr(listMap)); |
| | | boolean save = lisApiMethod.save(listMap, order, customer); |
| | | if (!save) { |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return AjaxResult.error("处理失败"); |
| | | throw new RuntimeException(); |
| | | } |
| | | for (TjSampling tjSampling : list) { |
| | | tjSampling.setIsSignFor("0"); |
| | |
| | | } |
| | | Boolean confirmed = samplingServiceApi.confirmSamplingApi(ids, "Y", "N"); |
| | | if (!confirmed) |
| | | return AjaxResult.error("处理失败"); |
| | | throw new RuntimeException(); |
| | | } |
| | | } |
| | | |
| | |
| | | // List<TjOrderDetail> dengJi = tjOrderDetailService.getCaiYangDengJi(tjOrder.getOrderId()); |
| | | // tjSysAsyncService.addCaiYangDengJi(dengJi,!dengJi.isEmpty(),tjOrder, SecurityUtils.getLoginUser().getUser(), null); |
| | | // } |
| | | }else { |
| | | throw new RuntimeException(); |
| | | } |
| | | } |
| | | } |
| | |
| | | tree.setCreateTime(DateUtil.date()); |
| | | ltkjJianchajianyanTreeService.save(tree); |
| | | } |
| | | }else { |
| | | throw new RuntimeException(); |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | tree.setCreateTime(DateUtil.date()); |
| | | ltkjJianchajianyanTreeService.save(tree); |
| | | } |
| | | }else { |
| | | throw new RuntimeException(); |
| | | } |
| | | } |
| | | } |
| | |
| | | cf.setCreateTime(new Date()); |
| | | cfService.save(cf); |
| | | } |
| | | }else { |
| | | throw new RuntimeException(); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | return AjaxResult.success(); |
| | | } catch (RuntimeException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | public void pacsReg(TjOrder order, TjCustomer customer, ArrayList<TjProject> jianChaProjects) { |
| | |
| | | if (dels.isEmpty()) { |
| | | continue; |
| | | } |
| | | dels = dels.stream().sorted(Comparator.comparing(TjOrderDetail::getProName, Collator.getInstance(Locale.CHINA))).collect(Collectors.toList()); |
| | | dels = dels.stream() |
| | | .sorted(Comparator.comparingInt( |
| | | tjPdfVO -> tjPdfVO.getProName().length() // 根据名字的长度排序 |
| | | )) |
| | | .collect(Collectors.toList()); |
| | | // dels = dels.stream().sorted(Comparator.comparing(TjOrderDetail::getProName, Collator.getInstance(Locale.CHINA))).collect(Collectors.toList()); |
| | | // dels = dels.stream() |
| | | // .sorted(Comparator.comparingInt( |
| | | // tjPdfVO -> tjPdfVO.getProName().length() // 根据名字的长度排序 |
| | | // )) |
| | | // .collect(Collectors.toList()); |
| | | dels = dels.stream().sorted(Comparator.comparing(TjOrderDetail::getXh)).collect(Collectors.toList()); |
| | | parent.put("sons", dels); |
| | | parent.put("remark", remark.getRemark()); |
| | | parent.put("jgbx", remark.getJgbx()); |
| | |
| | | |
| | | // 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); |
| | | String result1 = getAjaxResult(result); |
| | |
| | | import com.ltkj.system.service.ISysConfigService; |
| | | import com.ltkj.system.service.ISysDeptService; |
| | | import com.ltkj.system.service.ISysUserService; |
| | | import com.ltkj.web.controller.his.HisApiMethod; |
| | | import com.ltkj.web.wxUtils.HttpClientUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | import jodd.util.StringUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.transaction.NoTransactionException; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | private TjOrderController tjOrderController; |
| | | @Autowired |
| | | private ITbTransitionService tbTransitionService; |
| | | |
| | | @Autowired |
| | | private HisApiMethod hisApiMethod; |
| | | /** |
| | | * 查询该体检号对应的订单流水列表 |
| | | */ |
| | |
| | | Date dates = new Date(); |
| | | String jxbz = DateUtil.format(dates, "yyyyMMddHHmmss") + order.getOrderId(); |
| | | //异步单项收费明细 |
| | | try { |
| | | Boolean b = asyncService.iundividualCharges(tjFlowingWater, order, customer, sysUser, jxbz); |
| | | if (!b) { |
| | | } catch (NoTransactionException e) { |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | hisApiMethod.ZfBlHisApiMethod(order.getTjNumber(), jxbz); |
| | | return AjaxResult.error(); |
| | | } |
| | | |
| | |
| | | if (checkType != null) { |
| | | wq.eq(TjProject::getProCheckType, checkType); |
| | | } |
| | | wq.orderByAsc(TjProject::getXh); |
| | | List<TjProject> tjProjects = tjProjectService.list(wq); |
| | | // List<TjProject> tjProjects = tjProjectService.getAllChildListById(proId); |
| | | if (tjProjects != null) { |
| | |
| | | @TableField(exist = false) |
| | | private String isBlack; |
| | | |
| | | @ApiModelProperty("单位部门") |
| | | @TableField(exist = false) |
| | | private String department; |
| | | |
| | | private Long dictCompId; |
| | | |
| | | private String compName; |
| | |
| | | |
| | | @TableField(exist = false) |
| | | private String orgType; |
| | | @TableField(exist = false) |
| | | private Integer xh; |
| | | |
| | | @Override |
| | | public String toString() { |
| | |
| | | * 碳13id |
| | | */ |
| | | private String pid; |
| | | |
| | | private Integer xh; |
| | | } |
| | |
| | | @TableField(exist = false) |
| | | private String packId; |
| | | |
| | | @TableField(exist = false) |
| | | private String dwDeptName; |
| | | |
| | | @TableField(exist = false) |
| | | private String groupingName; |
| | | |
| | | //单项ids |
| | | @TableField(exist = false) |
| | | private List<Long> proIdList; |
| | |
| | | */ |
| | | private String groupingId; |
| | | |
| | | @ApiModelProperty(value = "分组名") |
| | | @TableField(exist = false) |
| | | private String groupingName; |
| | | |
| | | @ApiModelProperty(value = "应收价格") |
| | | @TableField(exist = false) |
| | |
| | | " LEFT JOIN sys_dept d ON p.dept_id = d.dept_id\n" + |
| | | " WHERE order_id = #{orderId} AND p.pro_parent_id <>0 AND o.is_return = #{type}") |
| | | List<ProFcListVo> getFcList(@Param("orderId") Long orderId, @Param("type") Integer type); |
| | | |
| | | |
| | | @Select("call newpacsJianChaData(#{tjnumber,mode=IN},1)") |
| | | List<TjOrderDetail> newgetDetailByOrderIdAndParId(String tjNumber); |
| | | } |
| | |
| | | void csymxmxzqtyybcjk(@Param("tjh")String tjNum,@Param("xmid") String proId,@Param("yy") String yy, |
| | | @Param("kslx") String orgType,@Param("czy") String czy,@Param("czydm") String czydm); |
| | | |
| | | |
| | | @Select("call newpacsJianChaData(#{tjnumber,mode=IN},0)") |
| | | List<TjOrderRemark> newpacsJianChaData(String tjnumber); |
| | | } |
| | |
| | | List<ProFcListVo> getFcList(Long orderId, Integer type); |
| | | |
| | | AjaxResult updFcPro(String json); |
| | | |
| | | List<TjOrderDetail> newgetDetailByOrderIdAndParId(String tjNumber); |
| | | } |
| | |
| | | int updateTjOrderRemarkByTjzt(String tjNumber,String proId); |
| | | |
| | | void csymxmxzqtyybcjk(String tjNum, String proId, String yy, String orgType, String czy, String czydm); |
| | | |
| | | List<TjOrderRemark> newpacsJianChaData(String tjNumber); |
| | | } |
| | |
| | | } |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @Override |
| | | public List<TjOrderDetail> newgetDetailByOrderIdAndParId(String tjNumber) { |
| | | return tjOrderDetailMapper.newgetDetailByOrderIdAndParId(tjNumber); |
| | | } |
| | | } |
| | |
| | | mapper.csymxmxzqtyybcjk( tjNum, proId, yy, orgType, czy, czydm); |
| | | } |
| | | |
| | | @Override |
| | | public List<TjOrderRemark> newpacsJianChaData(String tjNumber) { |
| | | return mapper.newpacsJianChaData(tjNumber); |
| | | } |
| | | |
| | | } |
| | |
| | | </sql> |
| | | |
| | | <select id="selectTjReservationList" parameterType="TjReservation" resultMap="TjReservationResult"> |
| | | <include refid="selectTjReservationVo"/> |
| | | SELECT a.* ,b.dw_dept_name ,b.grouping_name FROM |
| | | tj_reservation a |
| | | LEFT JOIN tj_dw_grouping b ON b.id = a.grouping_id |
| | | <where> |
| | | <if test="name != null and name != ''">and name =#{name}</if> |
| | | <if test="idCard != null and idCard != ''">and id_card = #{idCard}</if> |
| | | <if test="phoe != null and phoe != ''">and phoe = #{phoe}</if> |
| | | <if test="company != null and company != ''">and company like concat('%', #{company}, '%')</if> |
| | | <if test="companyId != null and companyId != ''">and company_id = #{companyId} </if> |
| | | <if test="yykssj != null and yyjssj != null ">and reservation_time BETWEEN #{yykssj} and #{yyjssj} </if> |
| | | <if test="isExpire != null ">and is_expire = #{isExpire}</if> |
| | | and deleted = '0' |
| | | <if test="name != null and name != ''">and a.name =#{name}</if> |
| | | <if test="idCard != null and idCard != ''">and a.id_card = #{idCard}</if> |
| | | <if test="phoe != null and phoe != ''">and a.phoe = #{phoe}</if> |
| | | <if test="company != null and company != ''">and a.company like concat('%', #{company}, '%')</if> |
| | | <if test="companyId != null and companyId != ''">and a.company_id = #{companyId} </if> |
| | | <if test="yykssj != null and yyjssj != null ">and a.reservation_time BETWEEN #{yykssj} and #{yyjssj} </if> |
| | | <if test="isExpire != null ">and a.is_expire = #{isExpire}</if> |
| | | </where> |
| | | ORDER BY create_time desc |
| | | and a.deleted = 0 |
| | | ORDER BY a.create_time desc |
| | | </select> |
| | | |
| | | |