瀏覽代碼

no message

张保健 4 年之前
父節點
當前提交
2dbdc83475
共有 1 個文件被更改,包括 24 次插入0 次删除
  1. 24 0
      controllers/mobile_api_controllers/dialysis_api_controller.go

+ 24 - 0
controllers/mobile_api_controllers/dialysis_api_controller.go 查看文件

@@ -14,6 +14,9 @@ import (
14 14
 	"XT_New/service"
15 15
 	"XT_New/utils"
16 16
 	"math"
17
+	"net/http"
18
+	"net/url"
19
+	"github.com/astaxie/beego"
17 20
 )
18 21
 
19 22
 // type DialysisTestAPIController struct {
@@ -1436,6 +1439,16 @@ func (c *DialysisAPIController) Finish() {
1436 1439
 		dialysisOrder.FinishModifier = adminUserInfo.AdminUser.Id
1437 1440
 		dialysisOrder.EndTime = endDate.Unix()
1438 1441
 
1442
+		go func (){
1443
+			ssoDomain := beego.AppConfig.String("call_domain")
1444
+			api := ssoDomain + "/index/downpatient"
1445
+			values := make(url.Values)
1446
+			values.Set("org_id",  strconv.FormatInt(adminUserInfo.AdminUser.Id,10))
1447
+			values.Set("admin_user_id", strconv.FormatInt(nurseID,10))
1448
+			values.Set("patient_id",  strconv.FormatInt(id,10))
1449
+			http.PostForm(api, values)
1450
+		} ()
1451
+
1439 1452
 		if err == nil {
1440 1453
 			c.ServeSuccessJSON(map[string]interface{}{
1441 1454
 				"dialysisOrder":           dialysisOrder,
@@ -1733,6 +1746,17 @@ func (this *DialysisAPIController) StartDialysis() {
1733 1746
 		}
1734 1747
 	}
1735 1748
 
1749
+	go func (){
1750
+		ssoDomain := beego.AppConfig.String("call_domain")
1751
+		api := ssoDomain + "/index/uppatient"
1752
+		values := make(url.Values)
1753
+		values.Set("org_id",  strconv.FormatInt(adminUserInfo.Org.Id,10))
1754
+		values.Set("admin_user_id", strconv.FormatInt(nurseID,10))
1755
+		values.Set("patient_id",  strconv.FormatInt(patientID,10))
1756
+		values.Set("up_time",  strconv.FormatInt(startDate.Unix(),10))
1757
+		http.PostForm(api, values)
1758
+	} ()
1759
+
1736 1760
 	if createErr != nil {
1737 1761
 		this.ErrorLog("上机失败:%v", createErr)
1738 1762
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)