| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class ZfDoctorServiceImpl extends ServiceImpl<ZfDoctorMapper, ZfDoctor> implements ZfDoctorService { |
| | | public class ZfDoctorServiceImpl extends ServiceImpl<ZfDoctorMapper, ZfDoctor> implements ZfDoctorService,ModuleSearchable { |
| | | |
| | | @Resource |
| | | ZInfoUserService zInfoUserService; |
| | |
| | | //加上父母家族id |
| | | idList.add(fatherFaId); |
| | | idList.add(motherFaId); |
| | | |
| | | List<Long> fms = zInfoUserService.findByUaidToFaid(myself.getUaid()).stream().map(ZInfoUser::getFamilyId).collect(Collectors.toList()); |
| | | if(!fms.isEmpty()) |
| | | { |
| | | idList.addAll(fms); |
| | | } |
| | | // String familyIds = listFamilyIds(); |
| | | // String secondFamilyAuthority = listSecondFamilyIds() |
| | | LambdaQueryWrapper<ZfDoctor> lqw = buildCondition(zfDoctor, idList); |
| | |
| | | public List<ZfDoctor> markOwnData(Long familyId,Long fatherFamilyId, Long motherFamilyId, List<ZfDoctor> beanRecords) { |
| | | return beanRecords.stream().peek( |
| | | bean -> { |
| | | if (bean.getFamilyId() == familyId||(fatherFamilyId!=0L && fatherFamilyId==familyId)||(motherFamilyId!=0L && motherFamilyId==familyId)) { |
| | | if (Objects.equals(bean.getFamilyId(), familyId) ||(fatherFamilyId!=0L && fatherFamilyId.equals(familyId))||(motherFamilyId!=0L && motherFamilyId.equals(familyId))) { |
| | | bean.setOwnData(1); |
| | | } else { |
| | | bean.setOwnData(0); |
| | |
| | | .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.between(zfDoctor.getHappenStartTime() != null && zfDoctor.getHappenEndTime() != null, ZfDoctor::getCreateTime, zfDoctor.getHappenStartTime(), zfDoctor.getHappenEndTime()); |
| | | |
| | | if (StringUtils.isNotEmpty(zfDoctor.getPrescription())) { |
| | | lqw.and(wrapper -> { |
| | | wrapper.like(StringUtils.isNotEmpty(zfDoctor.getPrescription()), ZfDoctor::getWmedical, zfDoctor.getPrescription()) |
| | |
| | | }); |
| | | } |
| | | return lqw; |
| | | } |
| | | |
| | | @Override |
| | | public String getModuleCode() { |
| | | return "2043"; |
| | | } |
| | | |
| | | @Override |
| | | public List<?> search(String companion, Date happenStartTime, Date happenEndTime) { |
| | | |
| | | ZfDoctor zfDoctor = new ZfDoctor(); |
| | | zfDoctor.setCompanion(companion); |
| | | zfDoctor.setHappenStartTime(happenStartTime); |
| | | zfDoctor.setHappenEndTime(happenEndTime); |
| | | return selectByCondition(zfDoctor); |
| | | } |
| | | |
| | | // public LambdaQueryWrapper<ZfDoctor> buildCondition2(List<Long> ids) { |
| | |
| | | // } |
| | | |
| | | |
| | | } |
| | | } |