Kaynağa Gözat

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

XMLWAN 2 yıl önce
ebeveyn
işleme
cb3aec8377

+ 3 - 2
conf/app.conf Dosyayı Görüntüle

@@ -1,6 +1,6 @@
1 1
 appname = 血透
2 2
 httpport = 9531
3
-runmode = dev
3
+runmode = prod
4 4
 #dev/prod
5 5
 
6 6
 #
@@ -146,10 +146,11 @@ aliquid = 83
146 146
 
147 147
 [dev]
148 148
 mobile_token_expiration_second = 604800
149
+# httpdomain = http://new_mobile.xt.api.sgjyun.com
149 150
 httpdomain = https://api.xt.test.sgjyun.com
150 151
 sso_domain = https://testsso.sgjyun.com
151 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 155
 readmysqlhost = rm-wz9rg531npf61q03tro.mysql.rds.aliyuncs.com
155 156
 readmysqlport = 3306

+ 6 - 6
controllers/base_api_controller.go Dosyayı Görüntüle

@@ -82,7 +82,7 @@ func (this *BaseAuthAPIController) Prepare() {
82 82
 		userAdmin.ModifyTime = 1530786071
83 83
 		var subscibe models.ServeSubscibe
84 84
 		subscibe.ID = 11
85
-		subscibe.OrgId = 9671 //机构id
85
+		subscibe.OrgId = 10440 //机构id
86 86
 		subscibe.PeriodStart = 1547447814
87 87
 		subscibe.PeriodEnd = 1550039814
88 88
 		subscibe.State = 1
@@ -92,8 +92,8 @@ func (this *BaseAuthAPIController) Prepare() {
92 92
 		subscibes := make(map[int64]*models.ServeSubscibe, 0)
93 93
 		subscibes[4] = &subscibe
94 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 97
 		adminUserInfo.AdminUser = &userAdmin
98 98
 		adminUserInfo.Subscibes = subscibes
99 99
 		this.SetSession("admin_user_info", &adminUserInfo)
@@ -328,7 +328,7 @@ func (this *BaseServeAPIController) Prepare() {
328 328
 		userAdmin.ModifyTime = 1530786071
329 329
 		var subscibe models.ServeSubscibe
330 330
 		subscibe.ID = 11
331
-		subscibe.OrgId = 9671 //机构id小英9675或4
331
+		subscibe.OrgId = 10440 //机构id小英9675或4
332 332
 		subscibe.PeriodStart = 1538035409
333 333
 		subscibe.PeriodEnd = 1569571409
334 334
 		subscibe.State = 1
@@ -338,8 +338,8 @@ func (this *BaseServeAPIController) Prepare() {
338 338
 		subscibes := make(map[int64]*models.ServeSubscibe, 0)
339 339
 		subscibes[4] = &subscibe
340 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 343
 		adminUserInfo.AdminUser = &userAdmin
344 344
 		adminUserInfo.Subscibes = subscibes
345 345
 		this.SetSession("admin_user_info", &adminUserInfo)

+ 2 - 3
controllers/dialysis_api_controller.go Dosyayı Görüntüle

@@ -1894,6 +1894,7 @@ func (c *DialysisApiController) PostAssessmentBeforeDislysis() {
1894 1894
 	age := c.GetString("age")
1895 1895
 	his_department := c.GetString("his_department")
1896 1896
 	his_bed := c.GetString("his_bed")
1897
+	point_puncture := c.GetString("point_puncture")
1897 1898
 	assessmentBeforeDislysis := models.PredialysisEvaluation{
1898 1899
 		DialysisCount:                  dialysis_count,
1899 1900
 		EmergencyTreatment:             emergency_treatment,
@@ -1967,6 +1968,7 @@ func (c *DialysisApiController) PostAssessmentBeforeDislysis() {
1967 1968
 		Age:                            age,
1968 1969
 		HisDepartment:                  his_department,
1969 1970
 		HisBed:                         his_bed,
1971
+		PointPuncture:                  point_puncture,
1970 1972
 	}
1971 1973
 
1972 1974
 	appRole, _ := service.FindAdminRoleTypeById(adminUserInfo.CurrentOrgId, adminUserInfo.AdminUser.Id, adminUserInfo.CurrentAppId)
@@ -1984,9 +1986,6 @@ func (c *DialysisApiController) PostAssessmentBeforeDislysis() {
1984 1986
 		err := service.AddSigleAssessmentBeforeDislysisRecord(&assessmentBeforeDislysis)
1985 1987
 
1986 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 1989
 			var dewater_amount float64
1991 1990
 			dewater_amount = 0
1992 1991
 			if dry_weight > 0 {

+ 4 - 1
controllers/doctors_api_controller.go Dosyayı Görüntüle

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

+ 6 - 0
controllers/mobile_api_controllers/patient_api_controller.go Dosyayı Görüntüle

@@ -2849,6 +2849,12 @@ func predialysisEvaluationFormData(evaluation *models.PredialysisEvaluation, dat
2849 2849
 
2850 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 2858
 	return
2853 2859
 }
2854 2860
 

+ 1 - 0
models/dialysis.go Dosyayı Görüntüle

@@ -325,6 +325,7 @@ type PredialysisEvaluation struct {
325 325
 	Age                            string  `gorm:"column:age" json:"age" form:"age"`
326 326
 	HisDepartment                  string  `gorm:"column:his_department" json:"his_department" form:"his_department"`
327 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 331
 func (PredialysisEvaluation) TableName() string {

+ 1 - 1
service/dialysis_service.go Dosyayı Görüntüle

@@ -896,7 +896,7 @@ func GetAllStarfEs(orgid int64) (es []*models.SgjUserAdminRoles, err error) {
896 896
 	// cur_date := time.Now().Format("2006-01-02")
897 897
 	key := strconv.FormatInt(orgid, 10) + ":starfes"
898 898
 	starfes_str, _ := redis.Get(key).Result()
899
-
899
+	redis.Set(key, "", time.Second)
900 900
 	if len(starfes_str) == 0 { //没有到缓存数据,从数据库中获取数据,进行缓存到redis
901 901
 		db := readUserDb.Table("sgj_user_admin_role as x").Where("x.status = 1")
902 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 Dosyayı Görüntüle

@@ -90,6 +90,10 @@ func GetGoodStockList(orgId int64, storehouse_id int64, good_type int64, keyword
90 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 97
 	if len(keyword) > 0 {
94 98
 		db = db.Where("good_name like ? or manufacturer in(?)", likeKey, ids)
95 99
 	}

+ 1 - 1
service/patient_service.go Dosyayı Görüntüle

@@ -533,7 +533,7 @@ func ChechLastDialysisNo(orgID int64) (dialysisNo int64) {
533 533
 }
534 534
 
535 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 537
 	return
538 538
 }
539 539
 

+ 4 - 0
service/self_drug_service.go Dosyayı Görüntüle

@@ -1816,6 +1816,10 @@ func GetDrugStockCountList(orgId int64, storehouse_id int64, good_type int64, ke
1816 1816
 	if good_type == 3 {
1817 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 1823
 	if storehouse_id > 0 {
1820 1824
 		db = db.Preload("DrugWarehouseInfo", "org_id = ? and status = 1 and storehouse_id = ? and is_check = 1", orgId, storehouse_id)
1821 1825