瀏覽代碼

耗材参数

XMLWAN 4 年之前
父節點
當前提交
06880a01da
共有 2 個文件被更改,包括 14 次插入15 次删除
  1. 13 14
      controllers/dialysis_api_controller.go
  2. 1 1
      controllers/mobile_api_controllers/dialysis_api_controller.go

+ 13 - 14
controllers/dialysis_api_controller.go 查看文件

109
 	if qhsj > 0 {
109
 	if qhsj > 0 {
110
 		queueConfig.Qhsj = qhsj
110
 		queueConfig.Qhsj = qhsj
111
 	}
111
 	}
112
-	
112
+
113
 	jzdcbbcs, _ := c.GetInt64("jzdcbbcs", 0)
113
 	jzdcbbcs, _ := c.GetInt64("jzdcbbcs", 0)
114
 	if jzdcbbcs > 0 {
114
 	if jzdcbbcs > 0 {
115
 		queueConfig.Jzdcbbcs = jzdcbbcs
115
 		queueConfig.Jzdcbbcs = jzdcbbcs
122
 
122
 
123
 	jzjhyc, _ := c.GetInt64("jzjhyc", 0)
123
 	jzjhyc, _ := c.GetInt64("jzjhyc", 0)
124
 	queueConfig.Jzjhyc = jzjhyc
124
 	queueConfig.Jzjhyc = jzjhyc
125
-	
126
 
125
 
127
 	sjdcbbcs, _ := c.GetInt64("sjdcbbcs", 0)
126
 	sjdcbbcs, _ := c.GetInt64("sjdcbbcs", 0)
128
 	if sjdcbbcs > 0 {
127
 	if sjdcbbcs > 0 {
137
 	sjjhyc, _ := c.GetInt64("sjjhyc", 0)
136
 	sjjhyc, _ := c.GetInt64("sjjhyc", 0)
138
 	queueConfig.Sjjhyc = sjjhyc
137
 	queueConfig.Sjjhyc = sjjhyc
139
 
138
 
140
-
141
 	txxqyxs, _ := c.GetInt64("txxqyxs", 0)
139
 	txxqyxs, _ := c.GetInt64("txxqyxs", 0)
142
 	queueConfig.Txxqyxs = txxqyxs
140
 	queueConfig.Txxqyxs = txxqyxs
143
 
141
 
144
 	txglsyxs, _ := c.GetInt64("txglsyxs", 0)
142
 	txglsyxs, _ := c.GetInt64("txglsyxs", 0)
145
 	queueConfig.Txglsyxs = txglsyxs
143
 	queueConfig.Txglsyxs = txglsyxs
146
-	
144
+
147
 	queueConfig.UpdateTime = time.Now().Unix()
145
 	queueConfig.UpdateTime = time.Now().Unix()
148
 
146
 
149
 	service.UpDateQueueCallInfo(queueConfig)
147
 	service.UpDateQueueCallInfo(queueConfig)
233
 	safe_package, _ := c.GetInt64("package", 0)
231
 	safe_package, _ := c.GetInt64("package", 0)
234
 	a_liquid, _ := c.GetInt64("a_liquid", 0)
232
 	a_liquid, _ := c.GetInt64("a_liquid", 0)
235
 	preImpules, _ := c.GetFloat("pre_impulse", 0)
233
 	preImpules, _ := c.GetFloat("pre_impulse", 0)
236
-	fmt.Println("========================================================", preImpules)
234
+	fmt.Println("", preImpules)
237
 
235
 
238
 	anticoagulant_stop_time_hour, _ := c.GetInt64("anticoagulant_stop_time_hour", 0)
236
 	anticoagulant_stop_time_hour, _ := c.GetInt64("anticoagulant_stop_time_hour", 0)
239
 	anticoagulant_stop_time_min, _ := c.GetInt64("anticoagulant_stop_time_min", 0)
237
 	anticoagulant_stop_time_min, _ := c.GetInt64("anticoagulant_stop_time_min", 0)
2508
 	}
2506
 	}
2509
 	utils.ErrorLog("%v", dataBody)
2507
 	utils.ErrorLog("%v", dataBody)
2510
 
2508
 
2511
-	timeLayout := "2006-01-02 15:04"
2512
-	loc, _ := time.LoadLocation("Local")
2509
+	//timeLayout := "2006-01-02 15:04"
2510
+	//loc, _ := time.LoadLocation("Local")
2513
 
2511
 
2514
 	timeLayout2 := "2006-01-02"
2512
 	timeLayout2 := "2006-01-02"
2515
 	loc2, _ := time.LoadLocation("Local")
2513
 	loc2, _ := time.LoadLocation("Local")
2526
 	}
2524
 	}
2527
 	adviceDate, _ := dataBody["advice_date"].(string)
2525
 	adviceDate, _ := dataBody["advice_date"].(string)
2528
 	theTime, err := time.ParseInLocation(timeLayout2, adviceDate, loc2)
2526
 	theTime, err := time.ParseInLocation(timeLayout2, adviceDate, loc2)
2527
+	fmt.Println("the-----------------", theTime)
2529
 	AdviceDate := theTime.Unix()
2528
 	AdviceDate := theTime.Unix()
2530
 	RecordDate := theTime.Unix()
2529
 	RecordDate := theTime.Unix()
2531
 
2530
 
2538
 		utils.ErrorLog("len(start_time) == 0")
2537
 		utils.ErrorLog("len(start_time) == 0")
2539
 		return
2538
 		return
2540
 	}
2539
 	}
2541
-	theTime, err = time.ParseInLocation(timeLayout, startTime, loc)
2542
-	if err != nil {
2543
-		utils.ErrorLog(err.Error())
2544
-		return
2545
-	}
2540
+	//theTimeUnix, err := time.ParseInLocation(timeLayout2, startTime, loc2)
2541
+	//if err != nil {
2542
+	//	utils.ErrorLog(err.Error())
2543
+	//	return
2544
+	//}
2546
 	StartTime := theTime.Unix()
2545
 	StartTime := theTime.Unix()
2547
-
2546
+	fmt.Println("startTIME", StartTime)
2548
 	Remark := ""
2547
 	Remark := ""
2549
 	if dataBody["remark"] != nil && reflect.TypeOf(dataBody["remark"]).String() == "string" {
2548
 	if dataBody["remark"] != nil && reflect.TypeOf(dataBody["remark"]).String() == "string" {
2550
 		remark, _ := dataBody["remark"].(string)
2549
 		remark, _ := dataBody["remark"].(string)
2677
 			advice.TemplateId = template_id
2676
 			advice.TemplateId = template_id
2678
 		}
2677
 		}
2679
 
2678
 
2680
-		if adviceNameM["child"] != nil && reflect.TypeOf(adviceNameM["child"]).String() == "string" {
2679
+		if adviceNameM["execution_frequency"] != nil && reflect.TypeOf(adviceNameM["execution_frequency"]).String() == "string" {
2681
 			executionFrequency, _ := adviceNameM["execution_frequency"].(string)
2680
 			executionFrequency, _ := adviceNameM["execution_frequency"].(string)
2682
 			advice.ExecutionFrequency = executionFrequency
2681
 			advice.ExecutionFrequency = executionFrequency
2683
 		}
2682
 		}

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

1686
 	}
1686
 	}
1687
 
1687
 
1688
 	//只针对广慈医院
1688
 	//只针对广慈医院
1689
-	if template.TemplateId == 26 || template.TemplateId == 25 {
1689
+	if template.TemplateId == 26 || template.TemplateId == 25 || template.TemplateId == 28 {
1690
 		// 查询病人是否有透前评估数据
1690
 		// 查询病人是否有透前评估数据
1691
 		befor, errcode := service.GetAssessmentBefor(adminUserInfo.Org.Id, patientID, recordDate.Unix())
1691
 		befor, errcode := service.GetAssessmentBefor(adminUserInfo.Org.Id, patientID, recordDate.Unix())
1692
 		//如果有数据就插入
1692
 		//如果有数据就插入