|
@@ -1,8 +1,12 @@
|
|
|
package com.diagbot.facade.his;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.diagbot.dto.GetEntryDefectImproveDeptDTO;
|
|
|
import com.diagbot.dto.RespDTO;
|
|
|
import com.diagbot.dto.his.DoctorHosDTO;
|
|
|
+import com.diagbot.entity.MedNurse;
|
|
|
import com.diagbot.entity.his.DoctorHos;
|
|
|
import com.diagbot.service.impl.his.DoctorHosServiceImpl;
|
|
|
import com.diagbot.util.BeanUtil;
|
|
@@ -34,4 +38,30 @@ public class DoctorHosFacade extends DoctorHosServiceImpl {
|
|
|
}
|
|
|
return dto;
|
|
|
}
|
|
|
+
|
|
|
+ public IPage<DoctorHosDTO> getDoctorPage(DoctorHosVO doctorHosVO){
|
|
|
+ IPage<DoctorHosDTO> pageDto = new Page<>();
|
|
|
+ try{
|
|
|
+ QueryWrapper<DoctorHos> query = new QueryWrapper<>();
|
|
|
+ query.notIn("JOB","护士");
|
|
|
+ if(StringUtil.isNotEmpty(doctorHosVO.getKeyString())){
|
|
|
+ query.like("USER_ID",doctorHosVO.getKeyString().toUpperCase()).or()
|
|
|
+ .like("NAME",doctorHosVO.getKeyString()).or()
|
|
|
+ .like("DEPT_CODE",doctorHosVO.getKeyString()).or()
|
|
|
+ .like("DEPT_NAME",doctorHosVO.getKeyString());
|
|
|
+ }
|
|
|
+ Page<DoctorHos> pageHos = new Page<>(doctorHosVO.getCurrent(),doctorHosVO.getSize());
|
|
|
+ IPage<DoctorHos> hosPage=this.baseMapper.selectPage(pageHos,query);
|
|
|
+ List<DoctorHosDTO> dtoList=Lists.newLinkedList();
|
|
|
+ hosPage.getRecords().forEach(s->{
|
|
|
+ DoctorHosDTO dto=new DoctorHosDTO();
|
|
|
+ BeanUtil.copyProperties(s,dto);
|
|
|
+ dtoList.add(dto);
|
|
|
+ });
|
|
|
+ pageDto.setRecords(dtoList);
|
|
|
+ }catch (Exception e){
|
|
|
+ log.error("获取医生信息异常"+e.getMessage(),new Throwable());
|
|
|
+ }
|
|
|
+ return pageDto;
|
|
|
+ }
|
|
|
}
|