zqy
18 小时以前 31b53ed4e328090798dae35cecc9f5a60cdccd67
zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java
@@ -467,10 +467,21 @@
            .like(StringUtils.isNotEmpty(zfDoctor.getWmedical()), ZfDoctor::getWmedical, zfDoctor.getWmedical())
            .like(StringUtils.isNotEmpty(zfDoctor.getCmedical()), ZfDoctor::getCmedical, zfDoctor.getCmedical())
            .like(StringUtils.isNotEmpty(zfDoctor.getRemark()), ZfDoctor::getRemark, zfDoctor.getRemark());
        if (zfDoctor.getHasAttachment() != null && zfDoctor.getHasAttachment().equals("是")) {
            lqw.apply("url IS NOT NULL AND url != ''");
        }//        lqw.like(StringUtils.isNotEmpty(zfDoctor.getCompanion()),ZfDoctor::getCompanion,zfDoctor.getCompanion());
        if (StringUtils.isNotEmpty(zfDoctor.getIsHide())) {
            lqw.and(wrapper -> wrapper
                .ne(ZfDoctor::getIsHide, "是")
                .or()
                .isNull(ZfDoctor::getIsHide)
            );
        }
        if (zfDoctor.getHasAttachment() != null) {
            if (zfDoctor.getHasAttachment().equals("是")) {
                lqw.apply("url IS NOT NULL AND url != ''");
            }
            else {
                lqw.apply("(url IS NULL OR url = '')");
            }        }
        if (CollectionUtils.isNotEmpty(zfDoctor.getCompanionList())) {
            List<String> companionList = zfDoctor.getCompanionList();
@@ -484,7 +495,7 @@
            if (!companionList.isEmpty()) {
                // 确保所有参与人都在companion字段中
                for (String companion : companionList) {
                    lqw.apply("FIND_IN_SET({0}, REPLACE(REPLACE(companion, ' ', ''), ',', ',')) > 0",
                    lqw.apply("FIND_IN_SET({0}, REPLACE(REPLACE(REPLACE(people, ' ', ''), ',', ','),';',',')) > 0",
                        companion);
                }
            }
@@ -517,6 +528,7 @@
        zfDoctor.setCompanionList(list);        zfDoctor.setHappenStartTime(happenStartTime);
        zfDoctor.setHappenEndTime(happenEndTime);
        zfDoctor.setHasAttachment(hasAttachment);
        zfDoctor.setIsHide("否");
        return doctorList(zfDoctor);
    }