|
@@ -0,0 +1,33 @@
|
|
1
|
+package controllers
|
|
2
|
+
|
|
3
|
+import (
|
|
4
|
+ "XT/controllers"
|
|
5
|
+ "XT_New/enums"
|
|
6
|
+ "XT_New/service"
|
|
7
|
+ "fmt"
|
|
8
|
+ "github.com/astaxie/beego"
|
|
9
|
+)
|
|
10
|
+
|
|
11
|
+type PatientAPIController struct {
|
|
12
|
+ controllers.BaseAuthAPIController
|
|
13
|
+}
|
|
14
|
+
|
|
15
|
+func PatientRouters() {
|
|
16
|
+ beego.Router("/api/patient/getbloodDialysisPatient", &PatientAPIController{}, "Get:GetBloodDialysisPatient")
|
|
17
|
+}
|
|
18
|
+
|
|
19
|
+func (this *PatientAPIController) GetBloodDialysisPatient() {
|
|
20
|
+ //adminUser := this.GetAdminUserInfo()
|
|
21
|
+ //orgId := adminUser.CurrentOrgId
|
|
22
|
+ //fmt.Print("orgId")
|
|
23
|
+ fmt.Print("-----------------------触发了咩哟u")
|
|
24
|
+ patient, err := service.GetBloodDialysisPatient(7957)
|
|
25
|
+ fmt.Print("报错------------------", err)
|
|
26
|
+ if err != nil {
|
|
27
|
+ this.ServeFailJsonSend(enums.ErrorCodeDataException, "添加设备失败")
|
|
28
|
+ return
|
|
29
|
+ }
|
|
30
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
31
|
+ "patient": patient,
|
|
32
|
+ })
|
|
33
|
+}
|