zjh
2025-07-31 2ba86da39808ff8388531cc1f608d69822bee41c
ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisPDFUtil.java
@@ -2859,7 +2859,10 @@
                doctorNameDefault = entry.getValue().get(0).getShys();
            }
            Font doctorFonts = PdfUtils.setFont(9);
            if (key.equals("Y")) {
            if (entry.getValue().get(0).getIsShowYiShi() == null){
                entry.getValue().get(0).setIsShowYiShi(true);
            }
            if (key.equals("Y") && entry.getValue().get(0).getIsShowYiShi()) {
                String qmImg = dictUserInfoMapper.selectQmImgInnerJoinUserByUserId(String.valueOf(sysUser.getUserId()));
                if (null != qmImg && StrUtil.isNotBlank(qmImg)) {
                    Paragraph elements = new Paragraph();
@@ -2897,7 +2900,7 @@
                    df.setAlignment(Element.ALIGN_RIGHT);
                    document1.add(df);
                }
            } else {
            } else if (entry.getValue().get(0).getIsShowYiShi()) {
                String doctorName = "主检医师:" + doctorNameDefault;
                if (createTime != null)
                    doctorName = "检查时间:" + new SimpleDateFormat("yyyy-MM-dd").format(createTime) + "             主检医师:" + doctorNameDefault;
@@ -2928,9 +2931,9 @@
            List<LtkjHybgd> hybgds = ltkjHybgdService.getReportJianYanBaoGaoDanList(hysqd.getTmh());
            if(null !=hybgds && !hybgds.isEmpty()){
//                hybgds = hybgds.stream().distinct().collect(Collectors.toList());
                hybgds = new ArrayList<>(hybgds.stream()
                        .collect(Collectors.toMap(LtkjHybgd::getJcxm, p -> p, (existing, replacement) -> existing))
                        .values());
//                hybgds = new ArrayList<>(hybgds.stream()
//                        .collect(Collectors.toMap(LtkjHybgd::getJcxm, p -> p, (existing, replacement) -> existing))
//                        .values());
                Map<String, List<LtkjHybgd>> listMap = hybgds.stream().collect(Collectors.groupingBy(LtkjHybgd::getJyjg));
@@ -2941,7 +2944,7 @@
                    LambdaQueryWrapper<SysDictData> wrapper = new LambdaQueryWrapper<>();
                    wrapper.eq(SysDictData::getDictType,"qj_type");
                    wrapper.eq(SysDictData::getDictLabel,firstKey);
                    List<SysDictData> dictList = sysDictDataService.list();
                    List<SysDictData> dictList = sysDictDataService.list(wrapper);
                    if (!dictList.isEmpty()) {
                        isGroupOnce = true;
                        groupOnceProResult = firstKey;
@@ -3050,12 +3053,13 @@
                        } catch (Exception ignored) {
                        }
                    }
                    String key = sysConfigService.selectConfigByKey("is_report_pdf_use_ysqm");
                    if (null != shys && null != shysmc && key.equals("Y")) {
                        hashSet.add(shysmc + "|" + shys);
                    } else {
                        if (null != shysmc) hashSet.add(shysmc);
                    }
                    // 结果弃检重复去除医师打印
//                    String key = sysConfigService.selectConfigByKey("is_report_pdf_use_ysqm");
//                    if (null != shys && null != shysmc && key.equals("Y")) {
//                        hashSet.add(shysmc + "|" + shys);
//                    } else {
//                        if (null != shysmc) hashSet.add(shysmc);
//                    }
                    ArrayList<String> strings = new ArrayList<>();
                    strings.add(xmmc);
                    strings.add(groupOnceProResult);
@@ -3068,10 +3072,11 @@
                    HashMap<String, Object> map = new HashMap<>();
                    map.put("data", lists);
                    map.put("jyys", hashSet);
                    if (StrUtil.isNotBlank(shsj)) {
                        shsj = shsj.split(" ")[0];
                    }
                    map.put("shsj", shsj);
//                    if (StrUtil.isNotBlank(shsj)) {
//                        shsj = shsj.split(" ")[0];
//                    }
//                    map.put("shsj", shsj);
                    map.put("shsj","");
                    data.put(xmmc, map);
                }
            }
@@ -3313,6 +3318,7 @@
//                        LambdaQueryWrapper<LtkjExamJcbgd> wrapper = new LambdaQueryWrapper<>();
//                        wrapper.eq(LtkjExamJcbgd::getTjh, tjNumber);
//                        wrapper.eq(LtkjExamJcbgd::getXmdm, String.valueOf(tjOrderDetail.getProject().getProParentId()));
                            tjPdfVO.setIsShowYiShi(true);
                            tjPdfVOS.add(tjPdfVO);
                        }
                    }
@@ -3329,6 +3335,7 @@
                    tjPdfVO.setProId(String.valueOf(orderRemark.getProId()));
                    tjPdfVO.setPid(String.valueOf(orderRemark.getProId()));
                    tjPdfVO.setXh(1);
                    tjPdfVO.setIsShowYiShi(false);
                    tjPdfVOS.add(tjPdfVO);
                }
            }