Browse Source

提交代码

陈少旭 7 months ago
parent
commit
ccc097d490
2 changed files with 13 additions and 6 deletions
  1. 3 0
      controllers/statistics_api_controller.go
  2. 10 6
      service/statistis_qc_service.go

+ 3 - 0
controllers/statistics_api_controller.go View File

@@ -146,6 +146,9 @@ func (c *StatisticsApiController) GetPatientBP() {
146 146
 		}
147 147
 		endTime = theTime.Unix()
148 148
 	}
149
+	fmt.Println(startTime)
150
+	fmt.Println(endTime)
151
+
149 152
 	item, _ := service.GetNewDialysisBloodChartData(c.GetAdminUserInfo().CurrentOrgId, startTime, endTime, statistics_type)
150 153
 	c.ServeSuccessJSON(map[string]interface{}{
151 154
 		"list": item,

+ 10 - 6
service/statistis_qc_service.go View File

@@ -1248,14 +1248,18 @@ type Patient struct {
1248 1248
 	IDCardNo string `gorm:"column:id_card_no"`
1249 1249
 }
1250 1250
 
1251
+func (Patient) TableName() string {
1252
+	return "xt_patients"
1253
+}
1254
+
1251 1255
 // xt_assessment_before_dislysis model
1252 1256
 type Assessment struct {
1253
-	ID             uint      `gorm:"id"`
1254
-	PatientID      uint      `gorm:"column:patient_id"`
1255
-	SystolicBP     int       `gorm:"column:systolic_blood_pressure"`
1256
-	DiastolicBP    int       `gorm:"column:diastolic_blood_pressure"`
1257
-	AssessmentDate time.Time `gorm:"column:assessment_date"`
1258
-	UserOrgID      int       `gorm:"column:user_org_id"`
1257
+	ID             uint    `gorm:"id"`
1258
+	PatientID      uint    `gorm:"column:patient_id"`
1259
+	SystolicBP     float64 `gorm:"column:systolic_blood_pressure"`
1260
+	DiastolicBP    float64 `gorm:"column:diastolic_blood_pressure"`
1261
+	AssessmentDate int64   `gorm:"column:assessment_date"`
1262
+	UserOrgID      int     `gorm:"column:user_org_id"`
1259 1263
 }
1260 1264
 
1261 1265
 func (Assessment) TableName() string {