| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | |
| | | .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()); |
| | | lqw.like(StringUtils.isNotEmpty(zfDoctor.getCompanion()),ZfDoctor::getCompanion,zfDoctor.getCompanion()); |
| | | // lqw.like(StringUtils.isNotEmpty(zfDoctor.getCompanion()),ZfDoctor::getCompanion,zfDoctor.getCompanion()); |
| | | |
| | | if (CollectionUtils.isNotEmpty(zfDoctor.getCompanionList())) { |
| | | List<String> companionList = zfDoctor.getCompanionList(); |
| | | |
| | | // 清理和去重 |
| | | companionList = companionList.stream() |
| | | .map(String::trim) |
| | | .filter(s -> !s.isEmpty()) |
| | | .distinct() |
| | | .collect(Collectors.toList()); |
| | | |
| | | if (!companionList.isEmpty()) { |
| | | // 确保所有参与人都在companion字段中 |
| | | for (String companion : companionList) { |
| | | lqw.apply("FIND_IN_SET({0}, REPLACE(REPLACE(companion, ' ', ''), ',', ',')) > 0", |
| | | companion); |
| | | } |
| | | } |
| | | } |
| | | |
| | | lqw.between(zfDoctor.getHappenStartTime() != null && zfDoctor.getHappenEndTime() != null, ZfDoctor::getCreateTime, zfDoctor.getHappenStartTime(), zfDoctor.getHappenEndTime()); |
| | | |
| | | if (StringUtils.isNotEmpty(zfDoctor.getPrescription())) { |
| | |
| | | public List<?> search(String companion, Date happenStartTime, Date happenEndTime) { |
| | | |
| | | ZfDoctor zfDoctor = new ZfDoctor(); |
| | | zfDoctor.setCompanion(companion); |
| | | zfDoctor.setHappenStartTime(happenStartTime); |
| | | String[] split = companion.split(","); |
| | | List<String> list = Arrays.asList(split); |
| | | |
| | | zfDoctor.setCompanionList(list); zfDoctor.setHappenStartTime(happenStartTime); |
| | | zfDoctor.setHappenEndTime(happenEndTime); |
| | | return selectByCondition(zfDoctor); |
| | | } |