Browse Source

获取量表内容

zhoutg 6 years ago
parent
commit
09b7ed3f48

+ 22 - 0
icss-service/src/main/java/com/diagbot/facade/ScaleContentFacade.java

@@ -38,4 +38,26 @@ public class ScaleContentFacade extends ScaleContentServiceImpl {
         }
         return data;
     }
+
+
+    /**
+     * 返回诊断量表列表
+     *
+     * @return
+     */
+    public List<ScaleContent> getContent(Long scaleId, String pushContent) {
+        //获取内容列表
+        List<ScaleContent> data = this.list(new QueryWrapper<ScaleContent>()
+                .eq("scale_id", scaleId)
+                .orderByAsc("order_no"));
+
+        //看需是否要调用大数据
+        for(ScaleContent scaleContent : data) {
+            if(ScaleTypeEnum.PUSH.getKey() == scaleContent.getType()) {
+                scaleContent.setContent(pushContent);
+                break;
+            }
+        }
+        return data;
+    }
 }

+ 1 - 2
icss-service/src/main/java/com/diagbot/web/DisScaleController.java

@@ -8,7 +8,6 @@ import com.diagbot.facade.DisScaleFacade;
 import com.diagbot.facade.ScaleContentFacade;
 import com.diagbot.vo.DisScaleVO;
 import com.diagbot.vo.PushVO;
-import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -28,7 +27,7 @@ import java.util.List;
  */
 @RestController
 @RequestMapping("/scale")
-@Api(value = "诊断量表API", tags = { "诊断量表API" })
+//@Api(value = "诊断量表API", tags = { "诊断量表API" })
 @SuppressWarnings("unchecked")
 public class DisScaleController {