Browse Source

Merge branch '20200710_xt_api_new_branch' of http://git.shengws.com/csx/XT_New into 20200710_xt_api_new_branch

XMLWAN 4 years ago
parent
commit
d9316b2dc6

+ 1 - 1
conf/app.conf View File

@@ -142,7 +142,7 @@ aliquid = 83
142 142
 [dev]
143 143
 mobile_token_expiration_second = 3600
144 144
 httpdomain = http://new_mobile.xt.api.sgjyun.com
145
-sso_domain = https://testsso.sgjyun.com
145
+sso_domain = http://localhost:8091
146 146
 front_end_domain = "http://xt.test.sgjyun.com/#"
147 147
 
148 148
 readmysqlhost = rm-wz9rg531npf61q03tro.mysql.rds.aliyuncs.com

+ 2 - 2
controllers/mobile_api_controllers/login_api_controller.go View File

@@ -32,8 +32,8 @@ func (this *LoginAPIController) LoginByPwd() {
32 32
 	}
33 33
 	ip := utils.GetIP(this.Ctx.Request)
34 34
 
35
-	//ssoDomain := beego.AppConfig.String("sso_domain")
36
-	ssoDomain := "http://localhost:8091"
35
+	ssoDomain := beego.AppConfig.String("sso_domain")
36
+	//ssoDomain := "http://localhost:8091"
37 37
 	api := ssoDomain + "/m/login/pwd"
38 38
 	values := make(url.Values)
39 39
 	values.Set("mobile", mobile)

+ 4 - 1
controllers/new_mobile_api_controllers/index_evaluation_api_controller.go View File

@@ -177,8 +177,11 @@ func (this *IndexEvaluationApiController) GetPatientInspectionChartData() {
177 177
 	}
178 178
 
179 179
 	data, _ := statistics_service.GetPatientInspectionChartData(adminUserInfo.Org.Id, theStartTIme, theEndtTIme, project_id, item_id, patient_id)
180
+	references, _ := statistics_service.FindOrgQualityControlStandardInspectionReferenceById(adminUserInfo.Org.Id, project_id, item_id)
181
+
180 182
 	this.ServeSuccessJSON(map[string]interface{}{
181
-		"data": data,
183
+		"data":       data,
184
+		"references": references,
182 185
 	})
183 186
 
184 187
 }

+ 4 - 1
controllers/pc_index_evaluation_api_controller.go View File

@@ -206,8 +206,11 @@ func (this *PCIndexEvaluationApiController) GetPatientInspectionChartData() {
206 206
 	}
207 207
 
208 208
 	data, _ := statistics_service.GetPatientInspectionChartData(adminUserInfo.CurrentOrgId, theStartTIme, theEndtTIme, project_id, item_id, patient_id)
209
+	references, _ := statistics_service.FindOrgQualityControlStandardInspectionReferenceById(adminUserInfo.CurrentOrgId, project_id, item_id)
210
+
209 211
 	this.ServeSuccessJSON(map[string]interface{}{
210
-		"data": data,
212
+		"data":       data,
213
+		"references": references,
211 214
 	})
212 215
 
213 216
 }

+ 1 - 1
models/patient_models.go View File

@@ -119,7 +119,7 @@ type InfectiousDiseases struct {
119 119
 }
120 120
 
121 121
 func (InfectiousDiseases) TableName() string {
122
-	return "xt_patients_infectious_diseases"
122
+	return " xt_patients_infectious_diseases"
123 123
 }
124 124
 
125 125
 type DialysisPrescription struct {

+ 6 - 0
service/statistics_service/index_evaluation_service.go View File

@@ -1764,3 +1764,9 @@ func GetOrgPatients(user_org_id int64) (patient *[]VMPatient, err error) {
1764 1764
 	}
1765 1765
 	return &tempPatient, nil
1766 1766
 }
1767
+
1768
+func FindOrgQualityControlStandardInspectionReferenceById(user_org_id int64, project_id int64, item_id int64) (references InspectionReference, err error) {
1769
+	db := service.XTReadDB()
1770
+	err = db.Raw("Select reference.project_name as project_name,qcs.inspection_major as project_id, qcs.inspection_minor as id,reference.item_name as item_name,qcs.range_type as range_type,reference.range_min as range_min, reference.range_max as range_max,reference.unit as  unit  from xt_quality_control_standard qcs Left JOIN xt_inspection_reference reference ON  qcs.inspection_major = reference.project_id and qcs.inspection_minor = reference.id and  (reference.org_id = ? OR org_id = 0)  Where qcs.user_org_id = ?  AND qcs.status = 1 AND qcs.inspection_major = ? AND qcs.inspection_minor = ?", user_org_id, user_org_id, project_id, item_id).Scan(&references).Error
1771
+	return
1772
+}