| | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.domain.*; |
| | | import com.ruoyi.domain.dto.zfEventdto; |
| | | import com.ruoyi.mapper.ZfDoctorMapper; |
| | | import com.ruoyi.service.*; |
| | | import com.ruoyi.service.ZfDoctorService; |
| | |
| | | |
| | | private LambdaQueryWrapper<ZfDoctor> buildCondition(ZfDoctor zfDoctor, List<Long> familyIdList) { |
| | | LambdaQueryWrapper<ZfDoctor> lqw = new LambdaQueryWrapper<>(); |
| | | lqw.in(ZfDoctor::getFamilyId, familyIdList); |
| | | lqw.in(familyIdList != null,ZfDoctor::getFamilyId, familyIdList); |
| | | lqw.orderByDesc(ZfDoctor::getCreateTime); |
| | | lqw.like(StringUtils.isNotEmpty(zfDoctor.getType()), ZfDoctor::getType, zfDoctor.getType()) |
| | | .like(StringUtils.isNotEmpty(zfDoctor.getSymptom()), ZfDoctor::getSymptom, zfDoctor.getSymptom()) |
| | |
| | | .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()); |
| | | 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 (CollectionUtils.isNotEmpty(zfDoctor.getCompanionList())) { |
| | | List<String> companionList = zfDoctor.getCompanionList(); |
| | |
| | | |
| | | @Override |
| | | public String getModuleCode() { |
| | | return "2043"; |
| | | return "药方"; |
| | | } |
| | | |
| | | @Override |
| | | public List<?> search(String companion, Date happenStartTime, Date happenEndTime) { |
| | | public List<?> search(String companion, Date happenStartTime, Date happenEndTime, String hasAttachment) { |
| | | |
| | | ZfDoctor zfDoctor = new ZfDoctor(); |
| | | String[] split = companion.split(","); |
| | |
| | | |
| | | zfDoctor.setCompanionList(list); zfDoctor.setHappenStartTime(happenStartTime); |
| | | zfDoctor.setHappenEndTime(happenEndTime); |
| | | return selectByCondition(zfDoctor); |
| | | zfDoctor.setHasAttachment(hasAttachment); |
| | | return doctorList(zfDoctor); |
| | | } |
| | | |
| | | public List<zfEventdto> doctorList(ZfDoctor zfDoctor) { |
| | | |
| | | LambdaQueryWrapper<ZfDoctor> lqw = buildCondition(zfDoctor, null); |
| | | List<ZfDoctor> beanRecords = list(lqw); |
| | | return encapData(beanRecords); |
| | | } |
| | | |
| | | public List<zfEventdto> encapData(List<ZfDoctor> lis) |
| | | { |
| | | List<zfEventdto> daoRes = new ArrayList<>() ; |
| | | for(ZfDoctor obj : lis) |
| | | { |
| | | zfEventdto atd = new zfEventdto(); |
| | | atd.setId(Math.toIntExact(obj.getId())); |
| | | atd.setModule("药方"); |
| | | atd.setName(obj.getCompanion()); |
| | | atd.setCreateTime(obj.getCreateTime()); |
| | | daoRes.add(atd); |
| | | } |
| | | return daoRes; |
| | | } |
| | | |
| | | // public LambdaQueryWrapper<ZfDoctor> buildCondition2(List<Long> ids) { |