瀏覽代碼

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

zhoutg 6 年之前
父節點
當前提交
4ba6e49df8

+ 7 - 1
icss-service/src/main/java/com/diagbot/dto/ReadInquiryDTO.java

@@ -25,6 +25,12 @@ public class ReadInquiryDTO{
 	@ApiModelProperty(value="内容JSON字符串")
 	private String dataJson;
 	
-	private List<InquiryDetail> details;
+    /**
+     * 类型:0:结构化 1:文本模式
+     */
+	@ApiModelProperty(value="类型:0:结构化 1:文本模式")
+    private Integer sign;
+	
+	private List<InquiryDetail> detailList;
 	
 }

+ 1 - 1
icss-service/src/main/java/com/diagbot/entity/InquiryInfo.java

@@ -92,7 +92,7 @@ public class InquiryInfo implements Serializable {
     private String diagnose;
 
     /**
-     * 类型:1:结构化 2:文本模式
+     * 类型:0:结构化 1:文本模式
      */
     private Integer sign;
 

+ 3 - 2
icss-service/src/main/java/com/diagbot/facade/InquiryInfoFacade.java

@@ -136,15 +136,16 @@ public class InquiryInfoFacade extends InquiryInfoServiceImpl {
 
         if (inquiryInfo != null) {
             readInquiryDTO.setDataJson(inquiryInfo.getDataJson());
+            BeanUtil.copyProperties(inquiryInfo, readInquiryDTO);
             
             QueryWrapper<InquiryDetail> inquiryDetailQe = new QueryWrapper<>();
             inquiryDetailQe.eq("inquiry_id", inquiryInfo.getId());
-            readInquiryDTO.setDetails(inquiryDetailFacade.list(inquiryDetailQe));
+            readInquiryDTO.setDetailList(inquiryDetailFacade.list(inquiryDetailQe).stream().sorted((a,b)->a.getType()-b.getType()).collect(Collectors.toList()));
         }
 
         return readInquiryDTO;
     }
-    
+
     /**
      * 获取最近一次其他史信息
      *

+ 2 - 2
icss-service/src/main/java/com/diagbot/facade/TemplateInfoFacade.java

@@ -64,8 +64,8 @@ public class TemplateInfoFacade extends TemplateInfoServiceImpl {
         QueryWrapper<TemplateInfo> templateInfoFand = new QueryWrapper<>();
         templateInfoFand.eq("is_deleted", IsDeleteEnum.N.getKey())
                 .eq("id", templateInfoRevampVO.getId());
-        TemplateInfo data = getOne(templateInfoFand);
-        if (data == null) {
+        int sum = count(templateInfoFand);
+        if (sum == 0) {
             throw new CommonException(CommonErrorCode.NOT_EXISTS, "该模板不存在");
         }
         //2.再判断该医生下模板名是否重复重在

+ 0 - 31
icss-service/src/main/java/com/diagbot/web/DiseaseController.java

@@ -1,31 +0,0 @@
-package com.diagbot.web;
-
-import com.diagbot.annotation.SysLogger;
-import com.diagbot.dto.RespDTO;
-import io.swagger.annotations.Api;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * @Description:
- * @Author:zhaops
- * @time: 2018/11/30 17:25
- */
-@RestController
-@RequestMapping("/disease")
-@SuppressWarnings("unchecked")
-@Api(value = "诊断相关API", tags = { "诊断相关API" })
-public class DiseaseController {
-
-    /**
-     * 根据诊断获取治疗方案
-     *
-     * @return
-     */
-    @PostMapping("/getTreatmentPlanByDisease")
-    @SysLogger("getTreatmentPlanByDisease")
-    public RespDTO<Boolean> getTreatmentPlanByDisease() {
-        return RespDTO.onSuc(true);
-    }
-}

+ 2 - 0
icss-service/src/main/java/com/diagbot/web/TreatmentController.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;
 
@@ -36,6 +37,7 @@ public class TreatmentController {
                     "dis:诊断<br>")
     @PostMapping("/getTreatment")
     @SysLogger("getTreatment")
+    @ApiIgnore
     public RespDTO<TreatmentDTO> getTreatment(@RequestBody @Valid TreatmentVO treatmentVO) {
         //TreatmentDTO data = treatmentFacade.getTreatment(treatmentVO);
         return RespDTO.onSuc(null);

+ 6 - 8
icss-service/src/main/resources/mapper/PatientInfoMapper.xml

@@ -57,15 +57,13 @@
 		d.id_no as patientIdNo,
 		ROUND(DATEDIFF(CURDATE(), d.birthday)/365.2422) as patientAge
 		FROM tran_hospital_info a LEFT JOIN tran_hospital_dept b 
-		ON a.`code`=b.hospital_code
+		ON a.`code`=b.hospital_code and b.`status`=1 and b.is_deleted='N' and b.`code`=#{hospitalDeptCode} 	
 		LEFT JOIN tran_doctor_info c 
-		ON b.hospital_code=c.hospital_code and b.`code`=c.hospital_dept_code
+		ON b.hospital_code=c.hospital_code and b.`code`=c.hospital_dept_code and c.is_deleted='N' and c.`code`=#{doctorCode}
 		LEFT JOIN tran_patient_info d 
-		ON c.hospital_code=d.hospital_code
-		WHERE a.is_deleted='N' AND b.is_deleted='N'
-		AND c.is_deleted='N' AND d.is_deleted='N'
-		AND a.`status`=1 AND b.`status`=1	
-		AND a.`code`=#{hospitalCode} AND b.`code`=#{hospitalDeptCode} 
-		AND c.`code`=#{doctorCode} AND d.`code`=#{patientCode}
+		ON a.code=d.hospital_code and d.is_deleted='N' and d.`code`=#{patientCode}
+		WHERE a.is_deleted='N' 
+		AND a.`status`=1
+		AND a.`code`=#{hospitalCode} 
     </select>
 </mapper>

+ 2 - 8
icssman-service/src/main/java/com/diagbot/facade/VersionInfoFacade.java

@@ -181,12 +181,6 @@ public class VersionInfoFacade extends VersionInfoServiceImpl {
     public boolean updateVersionInfoAll(VersionInfoAllVO versionInfoVO) {
         // 1.先判断数据是否存在有效
     	checkExist(versionInfoVO.getId());
-/*        QueryWrapper<VersionInfo> VersionInfoFand = new QueryWrapper<>();
-        VersionInfoFand.eq("is_deleted", IsDeleteEnum.N.getKey()).eq("id", versionInfoVO.getId());
-        VersionInfo data = getOne(VersionInfoFand);
-        if (data == null) {
-            throw new CommonException(CommonErrorCode.NOT_EXISTS, "该数据不存在");
-        }*/
         // 2.判断该版本号是否存在名字相同的数据
         QueryWrapper<VersionInfo> templateInfoFand = new QueryWrapper<>();
         templateInfoFand.eq("name", versionInfoVO.getName()).eq("is_deleted", IsDeleteEnum.N.getKey());
@@ -244,8 +238,8 @@ public class VersionInfoFacade extends VersionInfoServiceImpl {
     	 // 1.先判断数据是否存在有效
         QueryWrapper<VersionInfo> VersionInfoFand = new QueryWrapper<>();
         VersionInfoFand.eq("is_deleted", IsDeleteEnum.N.getKey()).eq("id", id);
-        VersionInfo data = getOne(VersionInfoFand);
-        if (data == null) {
+        int sum = count(VersionInfoFand);
+        if (sum == 0) {
             throw new CommonException(CommonErrorCode.NOT_EXISTS, "该数据不存在");
         }
     }