Browse Source

历史排班

28169 1 year ago
parent
commit
2a4c1ee534

+ 4 - 4
controllers/base_api_controller.go View File

@@ -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 = 15487 //4
95
+		adminUserInfo.CurrentOrgId = 9671 //机构id小英9675或4
96
+		adminUserInfo.CurrentAppId = 3427 //4
97 97
 		adminUserInfo.AdminUser = &userAdmin
98 98
 		adminUserInfo.Subscibes = subscibes
99 99
 		this.SetSession("admin_user_info", &adminUserInfo)
@@ -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 = 15487 //4
341
+		adminUserInfo.CurrentOrgId = 9671 //机构id小英9675或4
342
+		adminUserInfo.CurrentAppId = 3427 //4
343 343
 		adminUserInfo.AdminUser = &userAdmin
344 344
 		adminUserInfo.Subscibes = subscibes
345 345
 		this.SetSession("admin_user_info", &adminUserInfo)

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

@@ -3808,12 +3808,13 @@ func (c *PatientApiController) CreateGroupAdvice() {
3808 3808
 				}
3809 3809
 			}
3810 3810
 
3811
+			fmt.Println("admin==================", adminUserInfo.Org.Id)
3811 3812
 			//长沙南雅
3812 3813
 			if adminUserInfo.Org.Id == 3877 || adminUserInfo.Org.Id == 10340 || adminUserInfo.Org.Id == 9671 {
3813 3814
 
3814 3815
 				//查询该患者今日有没有双人核对
3815 3816
 				check, _ := service.MobileGetDoubleCheckSix(adminUserInfo.Org.Id, patientInfo.ID, RecordDate)
3816
-
3817
+				fmt.Println("check----------------", check)
3817 3818
 				if check.ID > 0 {
3818 3819
 					advice.Checker = check.Modifier
3819 3820
 					advice.CheckState = 1

+ 16 - 2
controllers/patient_api_controller.go View File

@@ -1323,7 +1323,7 @@ func (c *PatientApiController) CreateGroupAdvice() {
1323 1323
 			return
1324 1324
 		}
1325 1325
 		adviceName, _ := adviceNameM["advice_name"].(string)
1326
-		fmt.Println("adviceceNMAE--------------------------------", adviceName)
1326
+
1327 1327
 		if len(adviceName) == 0 {
1328 1328
 			utils.ErrorLog("len(advice_name) == 0")
1329 1329
 			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
@@ -1418,9 +1418,22 @@ func (c *PatientApiController) CreateGroupAdvice() {
1418 1418
 		}
1419 1419
 
1420 1420
 		remark, _ := adviceNameM["remark"].(string)
1421
-		fmt.Println("哦哦撒搜哦搜搜哦remark-----------------------------------", remark)
1421
+
1422 1422
 		advice.Remark = remark
1423 1423
 
1424
+		if adminUserInfo.CurrentOrgId == 3877 || adminUserInfo.CurrentOrgId == 10340 || adminUserInfo.CurrentOrgId == 9671 {
1425
+			if advice.PrescribingNumber == 0 {
1426
+				advice.PrescribingNumber = 1
1427
+			}
1428
+			//查询该患者今日有没有双人核对
1429
+			check, _ := service.MobileGetDoubleCheckSix(adminUserInfo.CurrentOrgId, patientInfo.ID, advice.AdviceDate)
1430
+			fmt.Println("chek", check)
1431
+			if check.ID > 0 {
1432
+				advice.Checker = check.Modifier
1433
+				advice.CheckState = 1
1434
+				advice.CheckTime = time.Now().Unix()
1435
+			}
1436
+		}
1424 1437
 		if adviceType == 1 {
1425 1438
 
1426 1439
 			if adviceNameM["frequency_type"] != nil || reflect.TypeOf(adviceNameM["frequency_type"]).String() == "float64" {
@@ -1448,6 +1461,7 @@ func (c *PatientApiController) CreateGroupAdvice() {
1448 1461
 				}
1449 1462
 				advice.PushStartTime = startTime
1450 1463
 			}
1464
+
1451 1465
 		}
1452 1466
 
1453 1467
 		if adviceNameM["children"] != nil && reflect.TypeOf(adviceNameM["children"]).String() == "string" {