Pārlūkot izejas kodu

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

rgb 6 gadi atpakaļ
vecāks
revīzija
e05c6aaa6d

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

@@ -89,6 +89,7 @@ public class InquiryInfoFacade extends InquiryInfoServiceImpl {
         inquiryInfoSave.setDataJson(saveInquiryVO.getDataJson());
         if (inquiryInfo == null) {
             inquiryInfoSave.setGmtCreate(now);
+            inquiryInfoSave.setGmtModified(now);
             this.save(inquiryInfoSave);
             inquiryId = inquiryInfoSave.getId();
         } else {
@@ -196,9 +197,9 @@ public class InquiryInfoFacade extends InquiryInfoServiceImpl {
             queryWrapper.le("gmt_create", hisInquirysVO.getEndDate());
         }
         if (hisInquirysVO.getOrderType() == 1) {
-            queryWrapper.orderByDesc("gmt_create");
+            queryWrapper.orderByDesc("gmt_modified");
         } else if (hisInquirysVO.getOrderType() == 2) {
-            queryWrapper.orderByAsc("gmt_create");
+            queryWrapper.orderByAsc("gmt_modified");
         }
         List<InquiryInfo> inquiryInfoList = this.list(queryWrapper);
         if (inquiryInfoList.size() == 0) {

+ 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);

+ 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, "该数据不存在");
         }
     }

+ 1 - 0
icssman-service/src/main/java/com/diagbot/vo/QuestionPageVO.java

@@ -15,4 +15,5 @@ public class QuestionPageVO extends Page {
 
     private String type;
     private String tagName;
+    private String tagType;
 }

+ 5 - 3
icssman-service/src/main/resources/mapper/QuestionInfoMapper.xml

@@ -100,14 +100,16 @@
 
 
     <select id="getList" resultType="com.diagbot.dto.QuestionPageDTO">
-        SELECT a.* FROM `icss_question_info` a WHERE
-        a.is_deleted = 'N'
-        <if test="type != null and type != ''">
+        SELECT a.* FROM `icss_question_info` a WHERE a.is_deleted = 'N'
+        <if test="type != null">
             AND a.type = #{type}
         </if>
         <if test="tagName != null and tagName != ''">
             AND a.name like concat ('%', #{tagName}, '%')
         </if>
+        <if test="tagType != null and tagType != ''">
+            AND a.tag_type = #{tagType}
+        </if>
         order by a.gmt_create desc
 
     </select>