Forráskód Böngészése

Merge remote-tracking branch 'origin/dev/icss' into dev/icss

wangyu 6 éve
szülő
commit
505449bd9f

+ 6 - 0
icss-service/src/main/java/com/diagbot/dto/GetTopPatientInfoDTO.java

@@ -51,6 +51,12 @@ public class GetTopPatientInfoDTO {
 	 */
 	@ApiModelProperty(value="自己科室id")
 	private Long selfDeptId;
+	
+	/**
+	 * 自己科室名称
+	 */
+	@ApiModelProperty(value="自己科室名称")
+	private String selfDeptName;
     
     /**
      * 医院科室编码

+ 18 - 8
icss-service/src/main/java/com/diagbot/facade/PatientInfoFacade.java

@@ -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;
     }

+ 2 - 0
icss-service/src/main/java/com/diagbot/web/DeptInfoController.java

@@ -13,6 +13,7 @@ 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;
 
@@ -28,6 +29,7 @@ import javax.validation.Valid;
 @RequestMapping("/deptInfo")
 @Api(value = "科室信息API", tags = { "科室信息API" })
 @SuppressWarnings("unchecked")
+@ApiIgnore
 public class DeptInfoController {
 
     @Autowired

+ 2 - 0
icss-service/src/main/java/com/diagbot/web/DoctorInfoController.java

@@ -13,6 +13,7 @@ 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;
 import java.util.List;
@@ -29,6 +30,7 @@ import java.util.List;
 @RequestMapping("/doctorInfo")
 @Api(value = "医生信息API", tags = { "医生信息API" })
 @SuppressWarnings("unchecked")
+@ApiIgnore
 public class DoctorInfoController {
 
     @Autowired

+ 2 - 0
icss-service/src/main/java/com/diagbot/web/HospitalInfoController.java

@@ -12,6 +12,7 @@ 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;
 import java.util.List;
@@ -25,6 +26,7 @@ import java.util.List;
 @RequestMapping("/hospitalInfo")
 @Api(value = "医院信息API", tags = { "医院信息API" })
 @SuppressWarnings("unchecked")
+@ApiIgnore
 public class HospitalInfoController {
 
     @Autowired

+ 2 - 0
icss-service/src/main/java/com/diagbot/web/PatientInfoController.java

@@ -15,6 +15,7 @@ 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;
 
@@ -39,6 +40,7 @@ public class PatientInfoController {
                     "hospitalCode:医院编号,必填<br>")
     @PostMapping("/getPatientInfo")
     @SysLogger("getPatientInfo")
+    @ApiIgnore
     public RespDTO<PatientInfoDTO> getPatientInfo(@Valid @RequestBody PatientInfoVO patientInfoVO) {
         PatientInfoDTO data = patientInfoFacade.getPatientInfo(patientInfoVO);
         return RespDTO.onSuc(data);

+ 9 - 3
icssman-service/src/main/java/com/diagbot/facade/RetrievalFacade.java

@@ -8,6 +8,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;
 
+import com.diagbot.util.ListUtil;
 import org.apache.commons.lang.time.DateFormatUtils;
 import org.apache.poi.hssf.usermodel.HSSFDateUtil;
 import org.apache.poi.hssf.usermodel.HSSFWorkbook;
@@ -65,8 +66,11 @@ public class RetrievalFacade extends RetrievalServiceImpl {
      * @return
      */
     public List<GetRetrievalsByTagDTO> getRetrievalsByTag(GetRetrievalsByTagVO getRetrievalsByTagVO) {
-
-        return this.baseMapper.getRetrievalsByTag(getRetrievalsByTagVO);
+    	List<GetRetrievalsByTagDTO> retList = baseMapper.getRetrievalsByTag(getRetrievalsByTagVO);
+    	if(ListUtil.isEmpty(retList)){
+    		throw new CommonException(CommonErrorCode.NOT_EXISTS);
+    	}
+        return retList;
     }
 
     /**
@@ -78,7 +82,9 @@ public class RetrievalFacade extends RetrievalServiceImpl {
     public Boolean delRetrievalsByQuesId(DelRetrievalsByQuesIdVO delRetrievalsByQuesIdVO) {
     	QueryWrapper<RetrievalMapping> mappingQe = new QueryWrapper<>();
     	mappingQe.eq("question_id", delRetrievalsByQuesIdVO.getQuestionId());
-    	
+    	if(retrievalMappingFacade.count(mappingQe)==0){
+    		throw new CommonException(CommonErrorCode.NOT_EXISTS);
+    	}
 		String userId = UserUtils.getCurrentPrincipleID();
 		RetrievalMapping retrievalMapping = new RetrievalMapping();
 		retrievalMapping.setGmtModified(DateUtil.now());

+ 2 - 2
icssman-service/src/main/java/com/diagbot/vo/GetRetrievalsByTagVO.java

@@ -1,6 +1,6 @@
 package com.diagbot.vo;
 
-import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
 
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
@@ -21,13 +21,13 @@ public class GetRetrievalsByTagVO {
      * 标签id
      */
 	@ApiModelProperty(value="标签id")
+	@NotNull(message="标签id必传")
     private Long questionId;
 	
 	/**
 	 * 标签名称
 	 */
 	@ApiModelProperty(value="标签名称",required=true)
-	@NotBlank(message="标签名称必传")
 	private String questionName;