浏览代码

Merge branch '20230223_xt_api_new_branch' of http://git.shengws.com/csx/XT_New into 20230223_xt_api_new_branch

XMLWAN 2 年前
父节点
当前提交
cb3aec8377

+ 3 - 2
conf/app.conf 查看文件

1
 appname = 血透
1
 appname = 血透
2
 httpport = 9531
2
 httpport = 9531
3
-runmode = dev
3
+runmode = prod
4
 #dev/prod
4
 #dev/prod
5
 
5
 
6
 #
6
 #
146
 
146
 
147
 [dev]
147
 [dev]
148
 mobile_token_expiration_second = 604800
148
 mobile_token_expiration_second = 604800
149
+# httpdomain = http://new_mobile.xt.api.sgjyun.com
149
 httpdomain = https://api.xt.test.sgjyun.com
150
 httpdomain = https://api.xt.test.sgjyun.com
150
 sso_domain = https://testsso.sgjyun.com
151
 sso_domain = https://testsso.sgjyun.com
151
 call_domain = http://hf.szjkhd.com
152
 call_domain = http://hf.szjkhd.com
152
-front_end_domain = "https://xt.test.sgjyun.com/#"
153
+front_end_domain = "http://xt.test.sgjyun.com/#"
153
 
154
 
154
 readmysqlhost = rm-wz9rg531npf61q03tro.mysql.rds.aliyuncs.com
155
 readmysqlhost = rm-wz9rg531npf61q03tro.mysql.rds.aliyuncs.com
155
 readmysqlport = 3306
156
 readmysqlport = 3306

+ 6 - 6
controllers/base_api_controller.go 查看文件

82
 		userAdmin.ModifyTime = 1530786071
82
 		userAdmin.ModifyTime = 1530786071
83
 		var subscibe models.ServeSubscibe
83
 		var subscibe models.ServeSubscibe
84
 		subscibe.ID = 11
84
 		subscibe.ID = 11
85
-		subscibe.OrgId = 9671 //机构id
85
+		subscibe.OrgId = 10440 //机构id
86
 		subscibe.PeriodStart = 1547447814
86
 		subscibe.PeriodStart = 1547447814
87
 		subscibe.PeriodEnd = 1550039814
87
 		subscibe.PeriodEnd = 1550039814
88
 		subscibe.State = 1
88
 		subscibe.State = 1
92
 		subscibes := make(map[int64]*models.ServeSubscibe, 0)
92
 		subscibes := make(map[int64]*models.ServeSubscibe, 0)
93
 		subscibes[4] = &subscibe
93
 		subscibes[4] = &subscibe
94
 		var adminUserInfo service.AdminUserInfo
94
 		var adminUserInfo service.AdminUserInfo
95
-		adminUserInfo.CurrentOrgId = 9671  //机构id小英9675或4
96
-		adminUserInfo.CurrentAppId = 15729 //4
95
+		adminUserInfo.CurrentOrgId = 10440 //机构id小英9675或4
96
+		adminUserInfo.CurrentAppId = 15388 //4
97
 		adminUserInfo.AdminUser = &userAdmin
97
 		adminUserInfo.AdminUser = &userAdmin
98
 		adminUserInfo.Subscibes = subscibes
98
 		adminUserInfo.Subscibes = subscibes
99
 		this.SetSession("admin_user_info", &adminUserInfo)
99
 		this.SetSession("admin_user_info", &adminUserInfo)
328
 		userAdmin.ModifyTime = 1530786071
328
 		userAdmin.ModifyTime = 1530786071
329
 		var subscibe models.ServeSubscibe
329
 		var subscibe models.ServeSubscibe
330
 		subscibe.ID = 11
330
 		subscibe.ID = 11
331
-		subscibe.OrgId = 9671 //机构id小英9675或4
331
+		subscibe.OrgId = 10440 //机构id小英9675或4
332
 		subscibe.PeriodStart = 1538035409
332
 		subscibe.PeriodStart = 1538035409
333
 		subscibe.PeriodEnd = 1569571409
333
 		subscibe.PeriodEnd = 1569571409
334
 		subscibe.State = 1
334
 		subscibe.State = 1
338
 		subscibes := make(map[int64]*models.ServeSubscibe, 0)
338
 		subscibes := make(map[int64]*models.ServeSubscibe, 0)
339
 		subscibes[4] = &subscibe
339
 		subscibes[4] = &subscibe
340
 		var adminUserInfo service.AdminUserInfo
340
 		var adminUserInfo service.AdminUserInfo
341
-		adminUserInfo.CurrentOrgId = 9671  //机构id小英9675或4
342
-		adminUserInfo.CurrentAppId = 15729 //4
341
+		adminUserInfo.CurrentOrgId = 10440 //机构id小英9675或4
342
+		adminUserInfo.CurrentAppId = 15388 //4
343
 		adminUserInfo.AdminUser = &userAdmin
343
 		adminUserInfo.AdminUser = &userAdmin
344
 		adminUserInfo.Subscibes = subscibes
344
 		adminUserInfo.Subscibes = subscibes
345
 		this.SetSession("admin_user_info", &adminUserInfo)
345
 		this.SetSession("admin_user_info", &adminUserInfo)

+ 2 - 3
controllers/dialysis_api_controller.go 查看文件

1894
 	age := c.GetString("age")
1894
 	age := c.GetString("age")
1895
 	his_department := c.GetString("his_department")
1895
 	his_department := c.GetString("his_department")
1896
 	his_bed := c.GetString("his_bed")
1896
 	his_bed := c.GetString("his_bed")
1897
+	point_puncture := c.GetString("point_puncture")
1897
 	assessmentBeforeDislysis := models.PredialysisEvaluation{
1898
 	assessmentBeforeDislysis := models.PredialysisEvaluation{
1898
 		DialysisCount:                  dialysis_count,
1899
 		DialysisCount:                  dialysis_count,
1899
 		EmergencyTreatment:             emergency_treatment,
1900
 		EmergencyTreatment:             emergency_treatment,
1967
 		Age:                            age,
1968
 		Age:                            age,
1968
 		HisDepartment:                  his_department,
1969
 		HisDepartment:                  his_department,
1969
 		HisBed:                         his_bed,
1970
 		HisBed:                         his_bed,
1971
+		PointPuncture:                  point_puncture,
1970
 	}
1972
 	}
1971
 
1973
 
1972
 	appRole, _ := service.FindAdminRoleTypeById(adminUserInfo.CurrentOrgId, adminUserInfo.AdminUser.Id, adminUserInfo.CurrentAppId)
1974
 	appRole, _ := service.FindAdminRoleTypeById(adminUserInfo.CurrentOrgId, adminUserInfo.AdminUser.Id, adminUserInfo.CurrentAppId)
1984
 		err := service.AddSigleAssessmentBeforeDislysisRecord(&assessmentBeforeDislysis)
1986
 		err := service.AddSigleAssessmentBeforeDislysisRecord(&assessmentBeforeDislysis)
1985
 
1987
 
1986
 		if adminUserInfo.CurrentOrgId == 9671 || adminUserInfo.CurrentOrgId == 3877 || adminUserInfo.CurrentOrgId == 10469 {
1988
 		if adminUserInfo.CurrentOrgId == 9671 || adminUserInfo.CurrentOrgId == 3877 || adminUserInfo.CurrentOrgId == 10469 {
1987
-			fmt.Println("进来--------------------------------------")
1988
-			fmt.Println("evaluation.WeightBefore", weight_before)
1989
-			fmt.Println(" evaluation.DryWeight", dry_weight)
1990
 			var dewater_amount float64
1989
 			var dewater_amount float64
1991
 			dewater_amount = 0
1990
 			dewater_amount = 0
1992
 			if dry_weight > 0 {
1991
 			if dry_weight > 0 {

+ 4 - 1
controllers/doctors_api_controller.go 查看文件

1262
 
1262
 
1263
 	id, _ := this.GetInt64("id")
1263
 	id, _ := this.GetInt64("id")
1264
 	detail, err := service.GetHospitalSummaryDetail(id)
1264
 	detail, err := service.GetHospitalSummaryDetail(id)
1265
+	orgId := this.GetAdminUserInfo().CurrentOrgId
1266
+	operators, err := service.GetAdminUserEsOne(orgId)
1265
 	if err == nil {
1267
 	if err == nil {
1266
 		this.ServeSuccessJSON(map[string]interface{}{
1268
 		this.ServeSuccessJSON(map[string]interface{}{
1267
-			"detail": detail,
1269
+			"detail":    detail,
1270
+			"operators": operators,
1268
 		})
1271
 		})
1269
 		return
1272
 		return
1270
 	}
1273
 	}

+ 6 - 0
controllers/mobile_api_controllers/patient_api_controller.go 查看文件

2849
 
2849
 
2850
 		evaluation.HisBed = his_bed
2850
 		evaluation.HisBed = his_bed
2851
 	}
2851
 	}
2852
+
2853
+	if dataBody["point_puncture"] != nil && reflect.TypeOf(dataBody["point_puncture"]).String() == "string" {
2854
+		point_puncture := dataBody["point_puncture"].(string)
2855
+
2856
+		evaluation.PointPuncture = point_puncture
2857
+	}
2852
 	return
2858
 	return
2853
 }
2859
 }
2854
 
2860
 

+ 1 - 0
models/dialysis.go 查看文件

325
 	Age                            string  `gorm:"column:age" json:"age" form:"age"`
325
 	Age                            string  `gorm:"column:age" json:"age" form:"age"`
326
 	HisDepartment                  string  `gorm:"column:his_department" json:"his_department" form:"his_department"`
326
 	HisDepartment                  string  `gorm:"column:his_department" json:"his_department" form:"his_department"`
327
 	HisBed                         string  `gorm:"column:his_bed" json:"his_bed" form:"his_bed"`
327
 	HisBed                         string  `gorm:"column:his_bed" json:"his_bed" form:"his_bed"`
328
+	PointPuncture                  string  `gorm:"column:point_puncture" json:"point_puncture" form:"point_puncture"`
328
 }
329
 }
329
 
330
 
330
 func (PredialysisEvaluation) TableName() string {
331
 func (PredialysisEvaluation) TableName() string {

+ 1 - 1
service/dialysis_service.go 查看文件

896
 	// cur_date := time.Now().Format("2006-01-02")
896
 	// cur_date := time.Now().Format("2006-01-02")
897
 	key := strconv.FormatInt(orgid, 10) + ":starfes"
897
 	key := strconv.FormatInt(orgid, 10) + ":starfes"
898
 	starfes_str, _ := redis.Get(key).Result()
898
 	starfes_str, _ := redis.Get(key).Result()
899
-
899
+	redis.Set(key, "", time.Second)
900
 	if len(starfes_str) == 0 { //没有到缓存数据,从数据库中获取数据,进行缓存到redis
900
 	if len(starfes_str) == 0 { //没有到缓存数据,从数据库中获取数据,进行缓存到redis
901
 		db := readUserDb.Table("sgj_user_admin_role as x").Where("x.status = 1")
901
 		db := readUserDb.Table("sgj_user_admin_role as x").Where("x.status = 1")
902
 		err = db.Select("x.id,x.admin_user_id,x.org_id,x.app_id,x.role_id,x.user_name,x.avatar,x.user_type,s.creator,s.url,s.hash").Joins("left join sgj_user_admin_electronic_signature as s on s.creator = x.admin_user_id and s.status = 1").Where("x.org_id = ?", orgid).Scan(&es).Error
902
 		err = db.Select("x.id,x.admin_user_id,x.org_id,x.app_id,x.role_id,x.user_name,x.avatar,x.user_type,s.creator,s.url,s.hash").Joins("left join sgj_user_admin_electronic_signature as s on s.creator = x.admin_user_id and s.status = 1").Where("x.org_id = ?", orgid).Scan(&es).Error

+ 4 - 0
service/new_stock_service.go 查看文件

90
 		db = db.Where("x.sum_count = 0")
90
 		db = db.Where("x.sum_count = 0")
91
 	}
91
 	}
92
 
92
 
93
+	if good_type == 4 {
94
+		db = db.Where("x.sum_count > 0")
95
+	}
96
+
93
 	if len(keyword) > 0 {
97
 	if len(keyword) > 0 {
94
 		db = db.Where("good_name like ? or manufacturer in(?)", likeKey, ids)
98
 		db = db.Where("good_name like ? or manufacturer in(?)", likeKey, ids)
95
 	}
99
 	}

+ 1 - 1
service/patient_service.go 查看文件

533
 }
533
 }
534
 
534
 
535
 func FindPatientByDialysisNo(orgID int64, dialysisNo string) (patient models.Patients, err error) {
535
 func FindPatientByDialysisNo(orgID int64, dialysisNo string) (patient models.Patients, err error) {
536
-	err = readDb.Model(&models.Patients{}).Where("status=1 and user_org_id=? and dialysis_no=?", orgID, dialysisNo).First(&patient).Error
536
+	err = readDb.Model(&models.Patients{}).Where("status=1 and user_org_id=? and dialysis_no=? and lapseto = 1", orgID, dialysisNo).First(&patient).Error
537
 	return
537
 	return
538
 }
538
 }
539
 
539
 

+ 4 - 0
service/self_drug_service.go 查看文件

1816
 	if good_type == 3 {
1816
 	if good_type == 3 {
1817
 		db = db.Where("x.sum_count = 0")
1817
 		db = db.Where("x.sum_count = 0")
1818
 	}
1818
 	}
1819
+
1820
+	if good_type == 4 {
1821
+		db = db.Where("x.sum_count > 0")
1822
+	}
1819
 	if storehouse_id > 0 {
1823
 	if storehouse_id > 0 {
1820
 		db = db.Preload("DrugWarehouseInfo", "org_id = ? and status = 1 and storehouse_id = ? and is_check = 1", orgId, storehouse_id)
1824
 		db = db.Preload("DrugWarehouseInfo", "org_id = ? and status = 1 and storehouse_id = ? and is_check = 1", orgId, storehouse_id)
1821
 
1825