28169 hace 1 año
padre
commit
8f09ab884b
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  1. 1 1
      models/patient_models.go
  2. 1 1
      service/patient_service.go

+ 1 - 1
models/patient_models.go Ver fichero

@@ -2167,7 +2167,7 @@ type XtDeviceValsualMap struct {
2167 2167
 	XtDeviceValsualFuzhuV        []*XtDeviceValsualFuzhuV        `gorm:"ForeignKey:PatientId;AssociationForeignKey:PatientId" json:"DeviceValsualFuzhuV"`
2168 2168
 	XtDeviceValsualTextArr       []*XtDeviceValsualTextArr       `gorm:"ForeignKey:PatientId;AssociationForeignKey:PatientId" json:"DeviceValsualTextArr"`
2169 2169
 	XtDeviceValsualVLeft         []*XtDeviceValsualVLeft         `gorm:"ForeignKey:PatientId;AssociationForeignKey:PatientId" json:"XtDeviceValsualVLeft"`
2170
-	XtDeviceValusalMapArr        []*XtDeviceValusalMapArr        `gorm:"ForeignKey:PatientId;AssociationForeignKey:PatientId" json:"DeviceValusalMapArr "`
2170
+	DeviceValusalMapArr          []*XtDeviceValusalMapArr        `gorm:"ForeignKey:PatientId;AssociationForeignKey:PatientId" json:"DeviceValusalMapArr"`
2171 2171
 	XtDeviceValusalMapVrr        []*XtDeviceValusalMapVrr        `gorm:"ForeignKey:PatientId;AssociationForeignKey:PatientId" json:"DeviceValusalMapVrr"`
2172 2172
 }
2173 2173
 

+ 1 - 1
service/patient_service.go Ver fichero

@@ -3085,7 +3085,7 @@ func CreateDeviceValsualMap(valsualMap models.XtDeviceValsualMap) error {
3085 3085
 func GetPatientSitemap(patient_id int64, user_org_id int64) (models.XtDeviceValsualMap, error) {
3086 3086
 
3087 3087
 	valsualMap := models.XtDeviceValsualMap{}
3088
-	err := XTReadDB().Where("patient_id = ? and status =1 and user_org_id = ?", patient_id, user_org_id).Preload("XtDeviceValsualALeft", "status=1 and user_org_id =?", user_org_id).Preload("XtDeviceValsualVLeft", "status=1 and user_org_id =?", user_org_id).Preload("XtDeviceValsualMapFangxiangA", "status=1 and user_org_id =?", user_org_id).Preload("XtDeviceValsualMapFangxiangV", "status=1 and user_org_id =?", user_org_id).Preload("XtDeviceValsualFuzhuA", "status=1 and user_org_id =?", user_org_id).Preload("XtDeviceValsualFuzhuV", "status=1 and user_org_id =?", user_org_id).Preload("XtDeviceValsualTextArr", "status=1 and user_org_id =?", user_org_id).Preload("XtDeviceValusalMapArr", "status=1 and user_org_id =?", user_org_id).Preload("XtDeviceValusalMapVrr", "status=1 and user_org_id =?", user_org_id).Find(&valsualMap).Error
3088
+	err := XTReadDB().Where("patient_id = ? and status =1 and user_org_id = ?", patient_id, user_org_id).Preload("XtDeviceValsualALeft", "status=1 and user_org_id =?", user_org_id).Preload("XtDeviceValsualVLeft", "status=1 and user_org_id =?", user_org_id).Preload("XtDeviceValsualMapFangxiangA", "status=1 and user_org_id =?", user_org_id).Preload("XtDeviceValsualMapFangxiangV", "status=1 and user_org_id =?", user_org_id).Preload("XtDeviceValsualFuzhuA", "status=1 and user_org_id =?", user_org_id).Preload("XtDeviceValsualFuzhuV", "status=1 and user_org_id =?", user_org_id).Preload("XtDeviceValsualTextArr", "status=1 and user_org_id =?", user_org_id).Preload("DeviceValusalMapArr", "status=1 and user_org_id =?", user_org_id).Preload("XtDeviceValusalMapVrr", "status=1 and user_org_id =?", user_org_id).Find(&valsualMap).Error
3089 3089
 	return valsualMap, err
3090 3090
 }
3091 3091