XMLWAN 4 years ago
parent
commit
27faff5430
2 changed files with 14 additions and 1 deletions
  1. 13 0
      models/patient_models.go
  2. 1 1
      service/data.go

+ 13 - 0
models/patient_models.go View File

@@ -744,6 +744,19 @@ func (XtInspection) TableName() string {
744 744
 	return "xt_inspection"
745 745
 }
746 746
 
747
+type BloodXtPatients struct {
748
+	ID         int64  `gorm:"column:id" json:"id" form:"id"`
749
+	UserOrgId  int64  `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
750
+	DialysisNo string `gorm:"column:dialysis_no" json:"dialysis_no" form:"dialysis_no"`
751
+	Name       string `gorm:"column:name" json:"name" form:"name"`
752
+	IdCardNo   string `gorm:"column:id_card_no" json:"id_card_no" form:"id_card_no"`
753
+}
754
+
755
+func (BloodXtPatients) TableName() string {
756
+
757
+	return "xt_patients"
758
+}
759
+
747 760
 type XtPatients struct {
748 761
 	ID                           int64   `gorm:"column:id" json:"id" form:"id"`
749 762
 	UserOrgId                    int64   `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`

+ 1 - 1
service/data.go View File

@@ -12,7 +12,7 @@ import (
12 12
 func GetConfigList(orgID int64) (dataconfig interface{}, err error) {
13 13
 	var configList []*models.Dataconfig
14 14
 
15
-	err = readDb.Model(&models.Dataconfig{}).Where("(org_id in (0,?) and status = 1) or (status = 0 and delete_id_system > 0 and org_id = ?)", orgID, orgID).Order("orders desc, id asc").Find(&configList).Error
15
+	err = readDb.Model(&models.Dataconfig{}).Where("(org_id in (0,?) and status = 1) or (status = 0 and delete_id_system > 0 and org_id = ?)", orgID, orgID).Order("orders asc, id asc").Find(&configList).Error
16 16
 	if err != nil {
17 17
 		return nil, err
18 18
 	}