|
@@ -3,6 +3,7 @@ package com.diagbot.facade;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.diagbot.dto.GetTopPatientInfoDTO;
|
|
|
import com.diagbot.dto.PatientInfoDTO;
|
|
|
+import com.diagbot.entity.DeptInfo;
|
|
|
import com.diagbot.entity.DoctorPageMode;
|
|
|
import com.diagbot.entity.PatientInfo;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
@@ -10,7 +11,6 @@ import com.diagbot.service.impl.PatientInfoServiceImpl;
|
|
|
import com.diagbot.util.DateUtil;
|
|
|
import com.diagbot.vo.GetTopPatientInfoVO;
|
|
|
import com.diagbot.vo.PatientInfoVO;
|
|
|
-
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
@@ -22,9 +22,11 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|
|
*/
|
|
|
@Component
|
|
|
public class PatientInfoFacade extends PatientInfoServiceImpl {
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private DoctorPageModeFacade doctorPageModeFacade;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private DoctorPageModeFacade doctorPageModeFacade;
|
|
|
+ @Autowired
|
|
|
+ private DeptInfoFacade deptInfoFacade;
|
|
|
|
|
|
/**
|
|
|
* 获取患者信息
|
|
@@ -47,14 +49,22 @@ public class PatientInfoFacade extends PatientInfoServiceImpl {
|
|
|
GetTopPatientInfoDTO getTopPatientInfoDTO = baseMapper.getTopPatientInfo(getTopPatientInfoVO);
|
|
|
getTopPatientInfoDTO.setSystemTime(DateUtil.now());
|
|
|
getTopPatientInfoDTO.setRecordId(getTopPatientInfoVO.getRecordId());
|
|
|
-
|
|
|
+
|
|
|
+ QueryWrapper<DeptInfo> deptInfoQ = new QueryWrapper<>();
|
|
|
+ deptInfoQ.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("id", getTopPatientInfoDTO.getSelfDeptId());
|
|
|
+ DeptInfo deptInfo = deptInfoFacade.getOne(deptInfoQ);
|
|
|
+ if (null != deptInfo) {
|
|
|
+ getTopPatientInfoDTO.setSelfDeptName(deptInfo.getName());
|
|
|
+ }
|
|
|
+
|
|
|
QueryWrapper<DoctorPageMode> doctorPageModeQe = new QueryWrapper<>();
|
|
|
doctorPageModeQe.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
doctorPageModeQe.eq("doctor_id", getTopPatientInfoDTO.getDoctorId());
|
|
|
DoctorPageMode doctorPageMode = doctorPageModeFacade.getOne(doctorPageModeQe);
|
|
|
- if(doctorPageMode!=null){
|
|
|
- getTopPatientInfoDTO.setModeClassify(doctorPageMode.getModeClassify());
|
|
|
- getTopPatientInfoDTO.setModeValue(doctorPageMode.getModeValue());
|
|
|
+ if (doctorPageMode != null) {
|
|
|
+ getTopPatientInfoDTO.setModeClassify(doctorPageMode.getModeClassify());
|
|
|
+ getTopPatientInfoDTO.setModeValue(doctorPageMode.getModeValue());
|
|
|
}
|
|
|
return getTopPatientInfoDTO;
|
|
|
}
|