XMLWAN 4 years ago
parent
commit
515c610c46

+ 3 - 2
controllers/dialysis_api_controller.go View File

@@ -3030,7 +3030,7 @@ func (c *DialysisApiController) PostAssessmentAfterDislysis() {
3030 3030
 		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
3031 3031
 		return
3032 3032
 	}
3033
-
3033
+	fmt.Println("丰管业配置", data.SealingFluidDispose)
3034 3034
 	assessment, _ := service.FindAssessmentAfterDislysisById(adminUserInfo.CurrentOrgId, patient, recordDate.Unix())
3035 3035
 	assessment.DialysisOrderId = data.DialysisOrderId
3036 3036
 	assessment.Evaluator = adminUserInfo.AdminUser.Id
@@ -3171,7 +3171,8 @@ func (c *DialysisApiController) PostAssessmentBeforeDislysis() {
3171 3171
 	dialysis_interphase := c.GetString("dialysis_interphase")
3172 3172
 	symptom_before_dialysis := c.GetString("symptom_before_dialysis")
3173 3173
 	bloodAccessPartOperaId, _ := c.GetInt64("blood_access_part_opera_id", 0)
3174
-	bloodAccessPartId, _ := c.GetInt64("blood_access_part_id", 0)
3174
+	//bloodAccessPartId, _ := c.GetInt64("blood_access_part_id", 0)
3175
+	bloodAccessPartId := c.GetString("blood_access_part_id")
3175 3176
 	internalFistula := c.GetString("internal_fistula")
3176 3177
 	internal_fistula_skin := c.GetString("internal_fistula_skin")
3177 3178
 	catheter := c.GetString("catheter")

+ 2 - 1
controllers/mobile_api_controllers/dialysis_api_controller.go View File

@@ -802,7 +802,8 @@ func (c *DialysisAPIController) PostAssessmentAfterDislysis() {
802 802
 	dialysis_during, _ := c.GetInt64("dialysis_during", 0)
803 803
 	stroke_volume, _ := c.GetInt64("stroke_volume", 0)
804 804
 	blood_flow, _ := c.GetInt64("blood_flow", 0)
805
-	sealing_fluid_dispose, _ := c.GetInt64("sealing_fluid_dispose", 0)
805
+	//sealing_fluid_dispose, _ := c.GetInt64("sealing_fluid_dispose", 0)
806
+	sealing_fluid_dispose := c.GetString("sealing_fluid_dispose")
806 807
 	sealing_fluid_special := c.GetString("sealing_fluid_special")
807 808
 	dosage_of_anticoagulants, _ := c.GetFloat("dosage_of_anticoagulants")
808 809
 	supine_systolic_blood_pressure := c.GetString("supine_systolic_blood_pressure")

+ 6 - 2
controllers/mobile_api_controllers/patient_api_controller.go View File

@@ -1524,10 +1524,14 @@ func predialysisEvaluationFormData(evaluation *models.PredialysisEvaluation, dat
1524 1524
 		evaluation.MachineType = machine_type
1525 1525
 	}
1526 1526
 
1527
-	if dataBody["blood_access_part_id"] != nil && reflect.TypeOf(dataBody["blood_access_part_id"]).String() == "float64" {
1528
-		blood_access_part_id := int64(dataBody["blood_access_part_id"].(float64))
1527
+	if dataBody["blood_access_part_id"] != nil && reflect.TypeOf(dataBody["blood_access_part_id"]).String() == "string" {
1528
+		blood_access_part_id := dataBody["blood_access_part_id"].(string)
1529 1529
 		evaluation.BloodAccessPartId = blood_access_part_id
1530 1530
 	}
1531
+	//if dataBody["blood_access_part_id"] != nil && reflect.TypeOf(dataBody["blood_access_part_id"]).String() == "float64" {
1532
+	//	blood_access_part_id := int64(dataBody["blood_access_part_id"].(float64))
1533
+	//	evaluation.BloodAccessPartId = blood_access_part_id
1534
+	//}
1531 1535
 	if dataBody["blood_access_part_opera_id"] != nil && reflect.TypeOf(dataBody["blood_access_part_opera_id"]).String() == "float64" {
1532 1536
 		blood_access_part_opera_id := int64(dataBody["blood_access_part_opera_id"].(float64))
1533 1537
 		evaluation.BloodAccessPartOperaId = blood_access_part_opera_id

+ 2 - 2
controllers/new_mobile_api_controllers/new_role_api_controller.go View File

@@ -172,7 +172,7 @@ func (this *NewRoleApiController) CreateAdminUser() {
172 172
 	userTitle := this.GetString("title")
173 173
 	user_type, _ := this.GetInt("user_type", 0)
174 174
 	user_title, _ := this.GetInt("user_title", 0)
175
-
175
+	sort, _ := this.GetInt64("sort")
176 176
 	if len(mobile) == 0 || len(name) == 0 || len(role_ids) <= 0 {
177 177
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
178 178
 		return
@@ -185,7 +185,7 @@ func (this *NewRoleApiController) CreateAdminUser() {
185 185
 		return
186 186
 	} else {
187 187
 		if adminUser == nil { //新增账号和用户
188
-			_, password, createErr := service.CreateGeneralAdminUser(adminUserInfo.Org.Id, adminUserInfo.App.Id, mobile, name, userTitle, role_ids, user_type, user_title)
188
+			_, password, createErr := service.CreateGeneralAdminUser(adminUserInfo.Org.Id, adminUserInfo.App.Id, mobile, name, userTitle, role_ids, user_type, user_title, sort)
189 189
 			if createErr != nil {
190 190
 				//beego.Error("创建管理员失败:", createErr)
191 191
 				this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDBCreate)

+ 2 - 2
models/dialysis.go View File

@@ -237,7 +237,7 @@ type PredialysisEvaluation struct {
237 237
 	CreatedTime                 int64   `gorm:"column:created_time" json:"created_time"`
238 238
 	UpdatedTime                 int64   `gorm:"column:updated_time" json:"updated_time"`
239 239
 	Modifier                    int64   `gorm:"column:modifier" json:"modifier"`
240
-	BloodAccessPartId           int64   `gorm:"column:blood_access_part_id" json:"blood_access_part_id"`
240
+	BloodAccessPartId           string  `gorm:"column:blood_access_part_id" json:"blood_access_part_id"`
241 241
 	BloodAccessPartOperaId      int64   `gorm:"column:blood_access_part_opera_id" json:"blood_access_part_opera_id"`
242 242
 	IsHemorrhage                int64   `gorm:"column:is_hemorrhage" json:"is_hemorrhage"`
243 243
 	Hemorrhage                  string  `gorm:"column:hemorrhage" json:"hemorrhage"`
@@ -560,7 +560,7 @@ type AssessmentAfterDislysis struct {
560 560
 	StrokeVolume                    int64   `gorm:"column:stroke_volume" json:"stroke_volume" form:"stroke_volume"`
561 561
 	Channel                         int64   `gorm:"column:channel" json:"channel" form:"channel"`
562 562
 	BloodFlow                       int64   `gorm:"column:blood_flow" json:"blood_flow" form:"blood_flow"`
563
-	SealingFluidDispose             int64   `gorm:"column:sealing_fluid_dispose" json:"sealing_fluid_dispose" form:"sealing_fluid_dispose"`
563
+	SealingFluidDispose             string  `gorm:"column:sealing_fluid_dispose" json:"sealing_fluid_dispose" form:"sealing_fluid_dispose"`
564 564
 	SealingFluidSpecial             string  `gorm:"column:sealing_fluid_special" json:"sealing_fluid_special" form:"sealing_fluid_special"`
565 565
 	DosageOfAnticoagulants          float64 `gorm:"column:dosage_of_anticoagulants" json:"dosage_of_anticoagulants" form:"dosage_of_anticoagulants"`
566 566
 	SupineSystolicBloodPressure     string  `gorm:"column:supine_systolic_blood_pressure" json:"supine_systolic_blood_pressure" form:"supine_systolic_blood_pressure"`

+ 1 - 0
models/role_models.go View File

@@ -59,6 +59,7 @@ type App_Role struct {
59 59
 	Message         string `gorm:"column:message" json:"message" form:"message"`
60 60
 	Sex             int64  `gorm:"column:sex" json:"sex" form:"sex"`
61 61
 	Birthday        int64  `gorm:"column:birthday" json:"birthday" form:"birthday"`
62
+	Sort            int64  `gorm:"column:sort" json:"sort" form:"sort"`
62 63
 }
63 64
 
64 65
 func (App_Role) TableName() string {

+ 2 - 2
service/print_data_service/schedule_dialysis/print_schedule_dialysis_models.go View File

@@ -229,7 +229,7 @@ type AssessmentBeforeDislysisVM struct {
229 229
 	Creater                        int64   `gorm:"column:creater" json:"creater"`
230 230
 	Remark                         string  `gorm:"column:remark" json:"remark"`
231 231
 	Modifier                       int64   `gorm:"column:modifier" json:"modifier"`
232
-	BloodAccessPartId              int64   `gorm:"column:blood_access_part_id" json:"blood_access_part_id"`
232
+	BloodAccessPartId              string  `gorm:"column:blood_access_part_id" json:"blood_access_part_id"`
233 233
 	BloodAccessPartOperaId         int64   `gorm:"column:blood_access_part_opera_id" json:"blood_access_part_opera_id"`
234 234
 	IsHemorrhage                   int64   `gorm:"column:is_hemorrhage" json:"is_hemorrhage"`
235 235
 	Hemorrhage                     string  `gorm:"column:hemorrhage" json:"hemorrhage"`
@@ -334,7 +334,7 @@ type AssessmentAfterDislysisVM struct {
334 334
 	DialysisDuring                  int64   `gorm:"column:dialysis_during" json:"dialysis_during" form:"dialysis_during"`
335 335
 	StrokeVolume                    int64   `gorm:"column:stroke_volume" json:"stroke_volume" form:"stroke_volume"`
336 336
 	BloodFlow                       int64   `gorm:"column:blood_flow" json:"blood_flow" form:"blood_flow"`
337
-	SealingFluidDispose             int64   `gorm:"column:sealing_fluid_dispose" json:"sealing_fluid_dispose" form:"sealing_fluid_dispose"`
337
+	SealingFluidDispose             string  `gorm:"column:sealing_fluid_dispose" json:"sealing_fluid_dispose" form:"sealing_fluid_dispose"`
338 338
 	SealingFluidSpecial             string  `gorm:"column:sealing_fluid_special" json:"sealing_fluid_special" form:"sealing_fluid_special"`
339 339
 }
340 340
 

+ 4 - 2
service/role_service.go View File

@@ -130,6 +130,7 @@ type AdminUserManageViewModel struct {
130 130
 	TitleName       string `gorm:"-" json:"title_name"`
131 131
 	IsSubSuperAdmin bool   `gorm:"-" json:"is_sub_super_admin"`
132 132
 	//mobile          string `gorm:"-" json:"mobile"`
133
+	Sort int `gorm:"sort" json:"sort"`
133 134
 }
134 135
 
135 136
 func GetAdminUsersAndLoginInfo(orgID int64, appID int64, page int, count int) ([]*AdminUserManageViewModel, int, error) {
@@ -140,7 +141,7 @@ func GetAdminUsersAndLoginInfo(orgID int64, appID int64, page int, count int) ([
140 141
 		page = 1
141 142
 	}
142 143
 	var viewModels []*AdminUserManageViewModel = make([]*AdminUserManageViewModel, 0)
143
-	rows, err := readUserDb.Raw("SELECT u_a_r.admin_user_id, u_a_r.user_name, u_a_r.user_title, u_l.ip, u_l.ctime, u_a_r.status,u_a_r.avatar,u_a_r.role_ids FROM sgj_user_admin_role AS u_a_r  LEFT JOIN (SELECT * FROM (SELECT admin_user_id, org_id, app_id, ip, ctime FROM sgj_user_admin_login_log WHERE org_id = ? AND app_id = ?  ORDER BY ctime DESC) AS t GROUP BY admin_user_id) AS u_l ON u_a_r.org_id = u_l.org_id AND u_a_r.app_id = u_l.app_id AND u_a_r.admin_user_id = u_l.admin_user_id WHERE u_a_r.org_id = ? AND u_a_r.app_id = ? GROUP BY u_a_r.admin_user_id LIMIT ? OFFSET ?;", orgID, appID, orgID, appID, count, (page-1)*count).Rows()
144
+	rows, err := readUserDb.Raw("SELECT u_a_r.admin_user_id, u_a_r.user_name, u_a_r.user_title, u_l.ip, u_l.ctime, u_a_r.status,u_a_r.avatar,u_a_r.role_ids,u_a_r.sort FROM sgj_user_admin_role AS u_a_r   LEFT JOIN (SELECT * FROM (SELECT admin_user_id, org_id, app_id, ip, ctime FROM sgj_user_admin_login_log WHERE org_id = ? AND app_id = ?  ORDER BY ctime DESC) AS t GROUP BY admin_user_id) AS u_l  ON u_a_r.org_id = u_l.org_id AND u_a_r.app_id = u_l.app_id AND u_a_r.admin_user_id = u_l.admin_user_id WHERE u_a_r.org_id = ? AND u_a_r.app_id = ? GROUP BY u_a_r.admin_user_id order by u_a_r.sort LIMIT ? OFFSET ?;", orgID, appID, orgID, appID, count, (page-1)*count).Rows()
144 145
 	defer rows.Close()
145 146
 	if err != nil {
146 147
 		if err == gorm.ErrRecordNotFound {
@@ -308,7 +309,7 @@ func IsUserSuperAdminWithMobile(mobile string) (bool, error) {
308 309
 	return user.IsSuperAdmin, nil
309 310
 }
310 311
 
311
-func CreateGeneralAdminUser(orgID int64, appID int64, mobile string, name string, userTitle string, roleIds string, user_type int, user_title int) (*models.AdminUser, string, error) {
312
+func CreateGeneralAdminUser(orgID int64, appID int64, mobile string, name string, userTitle string, roleIds string, user_type int, user_title int, sort int64) (*models.AdminUser, string, error) {
312 313
 	now := time.Now().Unix()
313 314
 	tx := writeUserDb.Begin()
314 315
 	var adminUser models.AdminUser
@@ -344,6 +345,7 @@ func CreateGeneralAdminUser(orgID int64, appID int64, mobile string, name string
344 345
 		CreateTime:    now,
345 346
 		ModifyTime:    now,
346 347
 		RoleIds:       roleIds,
348
+		Sort:          sort,
347 349
 	}
348 350
 	if createApp_RoleErr := tx.Create(&app_role).Error; createApp_RoleErr != nil {
349 351
 		tx.Rollback()

+ 1 - 1
service/statistics_service/index_models.go View File

@@ -35,7 +35,7 @@ type VMPredialysisEvaluation struct {
35 35
 	DryWeight                 float64                   `gorm:"column:dry_weight" json:"dry_weight"`
36 36
 	WeighingBefore            float64                   `gorm:"column:weighing_before" json:"weighing_before"`
37 37
 	WeightBefore              float64                   `gorm:"column:weight_before" json:"weight_before"`
38
-	BloodAccessPartId         int64                     `gorm:"column:blood_access_part_id" json:"blood_access_part_id"`
38
+	BloodAccessPartId         string                    `gorm:"column:blood_access_part_id" json:"blood_access_part_id"`
39 39
 	VMAssessmentAfterDislysis VMAssessmentAfterDislysis `gorm:"ForeignKey:PatientId,AssessmentDate;AssociationForeignKey:PatientId,AssessmentDate" json:"after"`
40 40
 	VMPatients                VMPatients                `gorm:"ForeignKey:ID;AssociationForeignKey:PatientId" json:"patient"`
41 41
 	LastAfterWeight           float64                   `gorm:"-" json:"last_after_weight"`