XMLWAN il y a 4 ans
Parent
révision
b948ccde9e

+ 2 - 2
controllers/manage_api_controller.go Voir le fichier

@@ -2944,9 +2944,9 @@ func (this *MachineApiController) SaveMode() {
2944 2944
 	if errcode == gorm.ErrRecordNotFound {
2945 2945
 		err = service.SaveMode(&mode)
2946 2946
 	} else if errcode == nil {
2947
-		fmt.Print("设备型号已存在")
2947
+		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeCreateConfig)
2948
+		return
2948 2949
 	} else {
2949
-		fmt.Print("设备型号已存在")
2950 2950
 	}
2951 2951
 	if err != nil {
2952 2952
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeCreateConfig)

+ 0 - 1
controllers/mobile_api_controllers/dialysis_api_controller_extend.go Voir le fichier

@@ -83,7 +83,6 @@ func (this *DialysisAPIController) AddMonitorRecord() {
83 83
 	symptom := this.GetString("symptom")
84 84
 	dispose := this.GetString("dispose")
85 85
 	conductivity, _ := this.GetFloat("conductivity")
86
-	fmt.Println("4444444444444444", conductivity)
87 86
 	displacement_flow_quantity, _ := this.GetFloat("displacement_flow_quantity")
88 87
 	blood_oxygen_saturation := this.GetString("blood_oxygen_saturation")
89 88
 	result := this.GetString("result")

+ 1 - 0
models/patient_models.go Voir le fichier

@@ -348,6 +348,7 @@ type PatientDialysisRecord struct {
348 348
 	AssessmentAfterDislysis AssessmentAfterDislysis `json:"assessment_after_dislysis" gorm:"foreignkey:AssessmentDate;AssociationForeignKey:DialysisDate;"`
349 349
 	TreatmentSummary        TreatmentSummary        `json:"treatment_summary" gorm:"foreignkey:AssessmentDate;AssociationForeignKey:DialysisDate;"`
350 350
 	Device                  DeviceNumber            `json:"device" gorm:"foreignkey:ID;AssociationForeignKey:BedID;"`
351
+	MonitoringRecord        []MonitoringRecord      `json:"monitoring_record" gorm:"foreignkey:MonitoringDate;AssociationForeignKey:DialysisDate;"`
351 352
 }
352 353
 
353 354
 type DialysisPrescriptionAddtional struct {

+ 1 - 0
service/patientmanage_service.go Voir le fichier

@@ -841,6 +841,7 @@ func GetDialysisrecord(patientID int64, start int64, end int64, limit int64, pag
841 841
 	var orders []*models.PatientDialysisRecord
842 842
 
843 843
 	db := readDb.Table("xt_dialysis_order as do").
844
+		Preload("MonitoringRecord", "patient_id = ? and user_org_id = ? and status = 1", patientID, orgID).
844 845
 		Preload("DialysisPrescription", "patient_id=? and user_org_id=? and status=1", patientID, orgID).
845 846
 		Preload("PredialysisEvaluation", "patient_id=? and user_org_id=? and status=1", patientID, orgID).
846 847
 		Preload("DialysisPrescription", func(db *gorm.DB) *gorm.DB {