소스 검색

科室模板修改5

wangfeng 5 년 전
부모
커밋
2638504bd5

+ 8 - 0
icss-service/src/main/java/com/diagbot/facade/DoctorInfoFacade.java

@@ -2,9 +2,11 @@ package com.diagbot.facade;
 
 import com.diagbot.client.TranServiceClient;
 import com.diagbot.dto.DoctorInfoDTO;
+import com.diagbot.dto.HospitalDeptInfoAllDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.util.RespDTOUtil;
 import com.diagbot.vo.DoctorInfoVO;
+import com.diagbot.vo.HospitalCodeVo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
@@ -32,4 +34,10 @@ public class DoctorInfoFacade {
         return doctorInfoDTOList.data;
     }
 
+    public List<HospitalDeptInfoAllDTO> getHospitalDeptInfoAll(HospitalCodeVo hospitalCodeVo) {
+        RespDTO<List<HospitalDeptInfoAllDTO>> data = tranServiceClient.getHospitalDeptInfoAll(hospitalCodeVo);
+        RespDTOUtil.respNGDealCover(data, "获取所有科室信息失败");
+        return data.data;
+
+    }
 }

+ 5 - 1
icss-service/src/main/java/com/diagbot/facade/TemplateAdminFacade.java

@@ -226,9 +226,13 @@ public class TemplateAdminFacade extends TemplateInfoServiceImpl {
         QueryWrapper<TemplateInfo> templateInfoQuery = new QueryWrapper<>();
         templateInfoQuery
                 .eq("id", templateIdVO.getId())
-                .eq("is_deleted", IsDeleteEnum.N.getKey());
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("template_type",TemplateTypeEnum.AdminTemplate.getKey());
         TemplateInfoDTO data = new TemplateInfoDTO();
         TemplateInfo datas = getOne(templateInfoQuery, false);
+        if(datas==null){
+            throw new CommonException(CommonErrorCode.NOT_EXISTS, "该模板不存在!");
+        }
         //过滤
         BeanUtil.copyProperties(datas, data);
         return data;

+ 1 - 0
icss-service/src/main/java/com/diagbot/web/DictionaryInfoController.java

@@ -40,4 +40,5 @@ public class DictionaryInfoController {
         Map<Long, List<DictionaryInfoDTO>> data = dictionaryFacade.getList();
         return RespDTO.onSuc(data);
     }
+
 }

+ 10 - 1
icss-service/src/main/java/com/diagbot/web/DoctorInfoController.java

@@ -2,9 +2,11 @@ package com.diagbot.web;
 
 import com.diagbot.annotation.SysLogger;
 import com.diagbot.dto.DoctorInfoDTO;
+import com.diagbot.dto.HospitalDeptInfoAllDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.facade.DoctorInfoFacade;
 import com.diagbot.vo.DoctorInfoVO;
+import com.diagbot.vo.HospitalCodeVo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -30,7 +32,7 @@ import java.util.List;
 @Api(value = "医生信息API", tags = { "医生信息API" })
 @SuppressWarnings("unchecked")
 @ApiIgnore
-@Deprecated
+//@Deprecated
 public class DoctorInfoController {
 
     @Autowired
@@ -46,4 +48,11 @@ public class DoctorInfoController {
         List<DoctorInfoDTO> data = doctorInfoFacade.getDoctorInfo(doctorInfoVo);
         return RespDTO.onSuc(data);
     }
+    @ApiOperation(value = "根据医院编码搜索医院所有科室信息[by:wangfeng] ", notes = "hospitalCode:医院编码<br>")
+    @PostMapping("/getHospitalDeptInfoAll")
+    @SysLogger("getHospitalDeptInfoAll")
+    public RespDTO<List<HospitalDeptInfoAllDTO>> getHospitalDeptInfoAll(@RequestBody @Valid HospitalCodeVo hospitalCodeVo) {
+        List<HospitalDeptInfoAllDTO> data = doctorInfoFacade.getHospitalDeptInfoAll(hospitalCodeVo);
+        return RespDTO.onSuc(data);
+    }
 }