28169 1 nedēļu atpakaļ
vecāks
revīzija
cc385f49e2

+ 4 - 4
controllers/base_api_controller.go Parādīt failu

@@ -83,7 +83,7 @@ func (this *BaseAuthAPIController) Prepare() {
83 83
 		userAdmin.ModifyTime = 1530786071
84 84
 		var subscibe models.ServeSubscibe
85 85
 		subscibe.ID = 11
86
-		subscibe.OrgId = 10702 //机构id
86
+		subscibe.OrgId = 10164 //机构id
87 87
 		subscibe.PeriodStart = 1547447814
88 88
 		subscibe.PeriodEnd = 1550039814
89 89
 		subscibe.State = 1
@@ -93,7 +93,7 @@ func (this *BaseAuthAPIController) Prepare() {
93 93
 		subscibes := make(map[int64]*models.ServeSubscibe, 0)
94 94
 		subscibes[4] = &subscibe
95 95
 		var adminUserInfo service.AdminUserInfo
96
-		adminUserInfo.CurrentOrgId = 10702 //机构id小英9675或4
96
+		adminUserInfo.CurrentOrgId = 10164 //机构id小英9675或4
97 97
 		adminUserInfo.CurrentAppId = 12123 //4
98 98
 		adminUserInfo.AdminUser = &userAdmin
99 99
 		adminUserInfo.Subscibes = subscibes
@@ -329,7 +329,7 @@ func (this *BaseServeAPIController) Prepare() {
329 329
 		userAdmin.ModifyTime = 1530786071
330 330
 		var subscibe models.ServeSubscibe
331 331
 		subscibe.ID = 11
332
-		subscibe.OrgId = 10702 //机构id小英9675或4
332
+		subscibe.OrgId = 10164 //机构id小英9675或4
333 333
 		subscibe.PeriodStart = 1538035409
334 334
 		subscibe.PeriodEnd = 1569571409
335 335
 		subscibe.State = 1
@@ -339,7 +339,7 @@ func (this *BaseServeAPIController) Prepare() {
339 339
 		subscibes := make(map[int64]*models.ServeSubscibe, 0)
340 340
 		subscibes[4] = &subscibe
341 341
 		var adminUserInfo service.AdminUserInfo
342
-		adminUserInfo.CurrentOrgId = 10702 //机构id小英9675或4
342
+		adminUserInfo.CurrentOrgId = 10164 //机构id小英9675或4
343 343
 		adminUserInfo.CurrentAppId = 12123 //4
344 344
 		adminUserInfo.AdminUser = &userAdmin
345 345
 		adminUserInfo.Subscibes = subscibes

+ 14 - 0
controllers/doctors_api_controller.go Parādīt failu

@@ -75,6 +75,9 @@ func DoctorApiRegistRouters() {
75 75
 	beego.Router("/api/schedule/getdoctoradvicemonthlist", &DoctorsApiController{}, "Get:GetDoctorAdivceMonthList")
76 76
 
77 77
 	beego.Router("/api/schedule/gethisprescriptionprojectmonthlist", &DoctorsApiController{}, "Get:GetHisPrescriptionProjectMonthList")
78
+
79
+	beego.Router("/api/mobilealldoctors", &DoctorsApiController{}, "Get:GetMobileAllDoctorList")
80
+
78 81
 }
79 82
 
80 83
 func (c *DoctorsApiController) ScheduleAdvices() {
@@ -1861,3 +1864,14 @@ func (c *DoctorsApiController) GetHisPrescriptionProjectMonthList() {
1861 1864
 		"projectMonthList": projectMonthList,
1862 1865
 	})
1863 1866
 }
1867
+
1868
+func (c *DoctorsApiController) GetMobileAllDoctorList() {
1869
+
1870
+	orgId := c.GetAdminUserInfo().CurrentOrgId
1871
+
1872
+	adminRoles, _ := service.GetMobileAllDoctorList(orgId)
1873
+
1874
+	c.ServeSuccessJSON(map[string]interface{}{
1875
+		"doctors": adminRoles,
1876
+	})
1877
+}

+ 26 - 0
controllers/mobile_api_controllers/patient_api_controller.go Parādīt failu

@@ -4313,12 +4313,38 @@ func (c *PatientApiController) EditAssessmentBeforeDislysis() {
4313 4313
 	}
4314 4314
 
4315 4315
 	if adminUserInfo.Org.Id == 10597 {
4316
+
4316 4317
 		if evaluation.ID > 0 {
4318
+
4317 4319
 			dialysisPrescribeOne, _ := service.MobileGetDialysisPrescribeOne(adminUserInfo.Org.Id, id, theAssessmentDateTime)
4318 4320
 			if dialysisPrescribeOne.ID > 0 && evaluation.ID > 0 {
4319 4321
 				dewater_amount = evaluation.WeightBefore - evaluation.DryWeight - evaluation.AdditionalWeight
4320 4322
 				service.UpdateMobileGetDialysisPrescribeOne(dialysisPrescribeOne.ID, dewater_amount)
4321 4323
 			}
4324
+			keyThree := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(mode_id, 10) + ":dialysis_prescribe_by_mode"
4325
+			redis := service.RedisClient()
4326
+			//清空key 值
4327
+			redis.Set(keyThree, "", time.Second)
4328
+
4329
+			keyFour := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(mode_id, 10) + ":system_dialysis_prescribe"
4330
+			//清空key 值
4331
+			redis.Set(keyFour, "", time.Second)
4332
+			keyFive := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(theAssessmentDateTime, 10) + ":schedual_detail"
4333
+			redis.Set(keyFive, "", time.Second)
4334
+
4335
+			keySix := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(theAssessmentDateTime, 10) + ":prescriptions_list_all"
4336
+			redis.Set(keySix, "", time.Second)
4337
+
4338
+			keySeven := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(theAssessmentDateTime, 10) + ":dialysis_prescribe_by_mode"
4339
+			redis.Set(keySeven, "", time.Second)
4340
+
4341
+			keyNight := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(theAssessmentDateTime, 10) + ":" + strconv.FormatInt(mode_id, 10) + ":dialysis_prescribe"
4342
+			redis.Set(keyNight, "", time.Second)
4343
+			var recordDateStr = time.Now().Format("2006-01-02")
4344
+			keyOne := "scheduals_" + recordDateStr + "_" + strconv.FormatInt(adminUserInfo.Org.Id, 10)
4345
+			//清空key 值
4346
+			redis.Set(keyOne, "", time.Second)
4347
+
4322 4348
 		}
4323 4349
 	}
4324 4350
 

+ 7 - 0
service/doctor_advice_service.go Parādīt failu

@@ -591,3 +591,10 @@ func GetHisPrescriptionProjectMonthList(user_org_id int64, start_time int64, end
591 591
 
592 592
 	return project, err
593 593
 }
594
+
595
+func GetMobileAllDoctorList(orgid int64) (list []*models.SgjUserAdminRole, err error) {
596
+
597
+	err = UserReadDB().Where("org_id = ? and status=1", orgid).Find(&list).Error
598
+
599
+	return list, err
600
+}