Browse Source

页面顶部信息修改

rgb 6 years ago
parent
commit
bc92462ea9

+ 24 - 15
icss-service/src/main/java/com/diagbot/facade/PatientInfoFacade.java

@@ -1,23 +1,25 @@
 package com.diagbot.facade;
 
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.RequestBody;
+
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.diagbot.client.TranServiceClient;
+import com.diagbot.dto.DeptInfoDTO;
 import com.diagbot.dto.GetTopPatientInfoDTO;
 import com.diagbot.dto.PatientInfoDTO;
 import com.diagbot.dto.RespDTO;
-import com.diagbot.entity.DeptInfo;
 import com.diagbot.entity.DoctorPageMode;
 import com.diagbot.entity.PatientInfo;
 import com.diagbot.enums.IsDeleteEnum;
 import com.diagbot.util.RespDTOUtil;
+import com.diagbot.vo.DeptInfoVO;
 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;
-
-import java.util.List;
-import java.util.Map;
 
 /**
  * @Description: 患者业务逻辑
@@ -58,14 +60,21 @@ public class PatientInfoFacade {
 
         GetTopPatientInfoDTO getTopPatientInfoDTO = respDTO.data;
 
-        QueryWrapper<DeptInfo> deptInfoQ = new QueryWrapper<>();
-        deptInfoQ.eq("is_deleted", IsDeleteEnum.N.getKey())
-                .eq("name", getTopPatientInfoDTO.getSelfDeptName());
-        DeptInfo deptInfo = deptInfoFacade.getOne(deptInfoQ);
-        if (null != deptInfo) {
-            getTopPatientInfoDTO.setSelfDeptName(deptInfo.getName());
-            getTopPatientInfoDTO.setSelfDeptId(deptInfo.getId());
-        }
+//        QueryWrapper<DeptInfo> deptInfoQ = new QueryWrapper<>();
+//        deptInfoQ.eq("is_deleted", IsDeleteEnum.N.getKey())
+//                .eq("name", getTopPatientInfoDTO.getSelfDeptName());
+//        DeptInfo deptInfo = deptInfoFacade.getOne(deptInfoQ);
+//        if (null != deptInfo) {
+//            getTopPatientInfoDTO.setSelfDeptName(deptInfo.getName());
+//            getTopPatientInfoDTO.setSelfDeptId(deptInfo.getId());
+//        }
+        
+        DeptInfoVO deptInfoVO = new DeptInfoVO();
+        deptInfoVO.setHospitalCode(getTopPatientInfoVO.getHospitalCode());
+        deptInfoVO.setDeptCode(getTopPatientInfoVO.getHospitalDeptCode());
+        DeptInfoDTO deptInfoDTO = deptInfoFacade.getDeptInfo(deptInfoVO);
+        getTopPatientInfoDTO.setSelfDeptId(deptInfoDTO.getConceptId());
+        getTopPatientInfoDTO.setSelfDeptName(deptInfoDTO.getName());
 
         QueryWrapper<DoctorPageMode> doctorPageModeQe = new QueryWrapper<>();
         doctorPageModeQe.eq("is_deleted", IsDeleteEnum.N.getKey());

+ 9 - 7
icss-service/src/main/java/com/diagbot/web/PatientInfoController.java

@@ -1,6 +1,14 @@
 package com.diagbot.web;
 
 
+import javax.validation.Valid;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
 import com.diagbot.annotation.SysLogger;
 import com.diagbot.dto.GetTopPatientInfoDTO;
 import com.diagbot.dto.PatientInfoDTO;
@@ -8,17 +16,11 @@ import com.diagbot.dto.RespDTO;
 import com.diagbot.facade.PatientInfoFacade;
 import com.diagbot.vo.GetTopPatientInfoVO;
 import com.diagbot.vo.PatientInfoVO;
+
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
 import springfox.documentation.annotations.ApiIgnore;
 
-import javax.validation.Valid;
-
 /**
  * <p>
  * 患者信息表 前端控制器