Browse Source

Merge branch 'master' of http://git.shengws.com/csx/XT_New

csx 4 years ago
parent
commit
3b546b645d

+ 13 - 0
controllers/new_mobile_api_controllers/new_dialysis_api_controller.go View File

@@ -2608,3 +2608,16 @@ func (this *NewDialysisApiController) GetOrgs() {
2608 2608
 		"orgs": orgs,
2609 2609
 	})
2610 2610
 }
2611
+
2612
+func (this *NewDialysisApiController) GetNewPatientId() {
2613
+	id, _ := this.GetInt64("id")
2614
+	fmt.Println("id是---", id)
2615
+	patients, err := service.GetPatientNewId(id)
2616
+	if err != nil {
2617
+		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
2618
+		return
2619
+	}
2620
+	this.ServeSuccessJSON(map[string]interface{}{
2621
+		"patient": patients,
2622
+	})
2623
+}

+ 1 - 1
controllers/new_mobile_api_controllers/new_mobile_api_router_register.go View File

@@ -154,5 +154,5 @@ func NewMobileAPIControllersRegisterRouters() {
154 154
 	beego.Router("/m/api/patient/getroleposition", &NewDialysisApiController{}, "Get:GetRolePosition")
155 155
 	beego.Router("/m/api/patient/getmobile", &NewDialysisApiController{}, "Get:GetMobile")
156 156
 	beego.Router("/m/api/patient/getorgs", &NewDialysisApiController{}, "Get:GetOrgs")
157
-
157
+	beego.Router("/m/api/patient/getnewpatientid", &NewDialysisApiController{}, "Get:GetNewPatientId")
158 158
 }

+ 6 - 0
service/patientmanage_service.go View File

@@ -242,6 +242,12 @@ func GetPatientDetailTwo(id int64) (models.XtPatientsNew, error) {
242 242
 	return patients, err
243 243
 }
244 244
 
245
+func GetPatientNewId(id int64) (models.XtPatientsNew, error) {
246
+	patientsNew := models.XtPatientsNew{}
247
+	err := XTReadDB().Where("blood_id = ? and status = 1", id).Find(&patientsNew).Error
248
+	return patientsNew, err
249
+}
250
+
245 251
 func GetPatientDiseasesTwo(id int64) []int64 {
246 252
 	var dis []models.XtPatientsInfectiousDiseases
247 253
 	ids := make([]int64, 0)