瀏覽代碼

Merge branch 'master' of http://git.shengws.com/csx/gdyb

csx 4 年之前
父節點
當前提交
0a7fcf914d
共有 4 個文件被更改,包括 136 次插入46 次删除
  1. 111 22
      controllers/sz/sz_his_api_controller.go
  2. 二進制
      gdyb
  3. 23 22
      models/his_models.go
  4. 2 2
      service/sz_his_service.go

+ 111 - 22
controllers/sz/sz_his_api_controller.go 查看文件

@@ -9,8 +9,7 @@ import (
9 9
 	"gdyb/service"
10 10
 	"gdyb/utils"
11 11
 	"github.com/astaxie/beego"
12
-	"github.com/axgle/mahonia"
13
-	"math/rand"
12
+
14 13
 
15 14
 	//"github.com/axgle/mahonia"
16 15
 	"math"
@@ -460,6 +459,8 @@ func (c *SZHisApiController) ReadCard() {
460 459
 //		if adminRole.ID == 0 {
461 460
 //
462 461
 //			doctor_name = ""
462
+//			doctor_code = "1001"
463
+//			doctor_name = ""
463 464
 //			doctor_code = ""
464 465
 //
465 466
 //		} else {
@@ -2799,8 +2800,12 @@ func (c *SZHisApiController) GetDrugList() {
2799 2800
 
2800 2801
 	adminUserInfo := c.GetAdminUserInfo()
2801 2802
 	orgId := adminUserInfo.CurrentOrgId
2802
-	fmt.Println(orgId)
2803
+	admin_user_id, _ := c.GetInt64("admin_user_id")
2804
+	roles, _ := service.GetAdminUserInfoByID(orgId, admin_user_id)
2805
+	fmt.Println("222222222222", roles)
2806
+	fmt.Println("rolessssssss", roles.UserName)
2803 2807
 	ids := c.GetString("ids")
2808
+
2804 2809
 	stringarr := strings.Split(ids, ",")
2805 2810
 	idss := make([]int64, 0)
2806 2811
 	for _, item := range stringarr {
@@ -2826,7 +2831,7 @@ func (c *SZHisApiController) GetDrugList() {
2826 2831
 	var doctor_name string
2827 2832
 	var doctor_code string
2828 2833
 
2829
-	doctor_name = "黄亦轩"
2834
+	doctor_name = roles.UserName
2830 2835
 	doctor_code = "1001"
2831 2836
 
2832 2837
 	var isSuccess bool = true
@@ -2892,6 +2897,8 @@ func (c *SZHisApiController) GetTreatmentProject() {
2892 2897
 	ids := c.GetString("ids")
2893 2898
 	stringarr := strings.Split(ids, ",")
2894 2899
 	idss := make([]int64, 0)
2900
+	admin_user_id, _ := c.GetInt64("admin_user_id")
2901
+	roles, _ := service.GetAdminUserInfoByID(orgId, admin_user_id)
2895 2902
 	for _, item := range stringarr {
2896 2903
 		itemsss, _ := strconv.ParseInt(item, 10, 64)
2897 2904
 		id := int64(itemsss)
@@ -2905,7 +2912,7 @@ func (c *SZHisApiController) GetTreatmentProject() {
2905 2912
 	miConfig, _ := service.FindMedicalInsuranceInfo(orgId)
2906 2913
 	var doctor_name string
2907 2914
 	var doctor_code string
2908
-	doctor_name = "黄亦轩"
2915
+	doctor_name = roles.UserName
2909 2916
 	doctor_code = "1001"
2910 2917
 	var isSuccess bool = true
2911 2918
 	for _, item := range list {
@@ -2960,6 +2967,8 @@ func (c *SZHisApiController) GetRevocation() {
2960 2967
 	adminUserInfo := c.GetAdminUserInfo()
2961 2968
 	orgId := adminUserInfo.CurrentOrgId
2962 2969
 	id, _ := c.GetInt64("id")
2970
+	admin_user_id, _ := c.GetInt64("admin_user_id")
2971
+	roles, _ := service.GetAdminUserInfoByID(orgId, admin_user_id)
2963 2972
 	//用来区分是药品的撤销还是耗材的撤销  1.药品  2.诊疗项目 3.材料 5.辅助器具项目
2964 2973
 	is_mark, _ := c.GetInt64("is_mark")
2965 2974
 	type_id, _ := c.GetInt64("type_id")
@@ -2974,7 +2983,7 @@ func (c *SZHisApiController) GetRevocation() {
2974 2983
 			var doctor_name string
2975 2984
 			var doctor_code string
2976 2985
 
2977
-			doctor_name = "黄亦轩"
2986
+			doctor_name = roles.UserName
2978 2987
 			doctor_code = "1001"
2979 2988
 
2980 2989
 			var pagesize int = 50
@@ -3078,7 +3087,7 @@ func (c *SZHisApiController) GetRevocation() {
3078 3087
 			var doctor_name string
3079 3088
 			var doctor_code string
3080 3089
 
3081
-			doctor_name = "黄亦轩"
3090
+			doctor_name = roles.UserName
3082 3091
 			doctor_code = "1001"
3083 3092
 
3084 3093
 			var isSuccess bool = true
@@ -3143,7 +3152,7 @@ func (c *SZHisApiController) GetRevocation() {
3143 3152
 			var doctor_name string
3144 3153
 			var doctor_code string
3145 3154
 
3146
-			doctor_name = "黄亦轩"
3155
+			doctor_name = roles.UserName
3147 3156
 			doctor_code = "1001"
3148 3157
 
3149 3158
 			var pagesize int = 50
@@ -3214,7 +3223,7 @@ func (c *SZHisApiController) GetRevocation() {
3214 3223
 		fmt.Println("is_marke", is_mark)
3215 3224
 		//备案
3216 3225
 		if is_mark == 0 {
3217
-			fmt.Println("进来饿了吗32222222")
3226
+
3218 3227
 			adminUserInfo := c.GetAdminUserInfo()
3219 3228
 			orgId := adminUserInfo.CurrentOrgId
3220 3229
 
@@ -3224,7 +3233,7 @@ func (c *SZHisApiController) GetRevocation() {
3224 3233
 			miConfig, _ := service.FindMedicalInsuranceInfo(orgId)
3225 3234
 			var doctor_name string
3226 3235
 			var doctor_code string
3227
-			doctor_name = "黄亦轩"
3236
+			doctor_name = roles.UserName
3228 3237
 			doctor_code = "1001"
3229 3238
 			var isSuccess bool = true
3230 3239
 			for _, item := range list {
@@ -3286,7 +3295,7 @@ func (c *SZHisApiController) GetRevocation() {
3286 3295
 			var doctor_name string
3287 3296
 			var doctor_code string
3288 3297
 
3289
-			doctor_name = "黄亦轩"
3298
+			doctor_name = roles.UserName
3290 3299
 			doctor_code = "1001"
3291 3300
 
3292 3301
 			var pagesize int = 50
@@ -3367,7 +3376,7 @@ func (c *SZHisApiController) GetRevocation() {
3367 3376
 			var doctor_name string
3368 3377
 			var doctor_code string
3369 3378
 
3370
-			doctor_name = "黄亦轩"
3379
+			doctor_name = roles.UserName
3371 3380
 			doctor_code = "1001"
3372 3381
 
3373 3382
 			var isSuccess bool = true
@@ -3429,6 +3438,8 @@ func (c *SZHisApiController) GetDoctorList() {
3429 3438
 	fmt.Println("or3gi", orgid)
3430 3439
 	ids := c.GetString("ids")
3431 3440
 	fmt.Println("ids2222222222", ids)
3441
+	admin_user_id, _ := c.GetInt64("admin_user_id")
3442
+	roles, _ := service.GetAdminUserInfoByID(orgid, admin_user_id)
3432 3443
 	stringarr := strings.Split(ids, ",")
3433 3444
 	idss := make([]int64, 0)
3434 3445
 	for _, item := range stringarr {
@@ -3455,7 +3466,7 @@ func (c *SZHisApiController) GetDoctorList() {
3455 3466
 	var doctor_name string
3456 3467
 	var doctor_code string
3457 3468
 
3458
-	doctor_name = "黄亦轩"
3469
+	doctor_name = roles.UserName
3459 3470
 	doctor_code = "1001"
3460 3471
 
3461 3472
 	var isSuccess bool = true
@@ -3523,7 +3534,7 @@ func (c *SZHisApiController) GetDoctorList() {
3523 3534
 		}
3524 3535
 		if res.Transreturncode == "00000000" {
3525 3536
 			//批量插入数据
3526
-			_, err := service.UpdateAdminUserRoleById(item.AdminUserId)
3537
+			_, err := service.UpdateAdminUserRoleById(item.AdminUserId, orgid)
3527 3538
 			fmt.Println("err2222", err)
3528 3539
 		} else {
3529 3540
 			isSuccess = false
@@ -3548,7 +3559,8 @@ func (c *SZHisApiController) GetMedicalList() {
3548 3559
 	id, _ := c.GetInt64("id")
3549 3560
 	fmt.Println("id22222222", id)
3550 3561
 	is_mark, _ := c.GetInt64("is_mark")
3551
-
3562
+	admin_user_id, _ := c.GetInt64("admin_user_id")
3563
+	roles, _ := service.GetAdminUserInfoByID(orgId, admin_user_id)
3552 3564
 	//去登记
3553 3565
 	if is_mark == 0 {
3554 3566
 		list, _ := service.GetDoctorListByDetail(orgId, id)
@@ -3567,18 +3579,54 @@ func (c *SZHisApiController) GetMedicalList() {
3567 3579
 		var doctor_name string
3568 3580
 		var doctor_code string
3569 3581
 
3570
-		doctor_name = "黄亦轩"
3582
+		doctor_name = roles.UserName
3571 3583
 		doctor_code = "1001"
3572 3584
 
3573 3585
 		var isSuccess bool = true
3574 3586
 
3575 3587
 		for _, item := range list {
3576 3588
 			fmt.Println("医护类别", item.Mobile)
3577
-			sex := strconv.FormatInt(item.Sex, 10)
3578
-			card_type := strconv.FormatInt(item.CardType, 10)
3579
-			is_active := strconv.FormatInt(item.IsActive, 10)
3580 3589
 
3581 3590
 			detail := &models.DocDetail{
3591
+				UserName:                                item.UserName,                                                       //医护姓名
3592
+				RoleId:                                  item.Name,                                                           //医护人员类别
3593
+				Sex:                                     strconv.FormatInt(item.Sex, 10),                                     //性别
3594
+				CardType:                                strconv.FormatInt(item.CardType, 10),                                //证件类型
3595
+				IdCard:                                  item.IdCard,                                                         //证件号码
3596
+				Phone:                                   item.Mobile,                                                         //联系电话
3597
+				WorkMajorName:                           item.WorkMajorName,                                                  // 现从事专业名称
3598
+				Nation:                                  item.Nation,                                                         //民族
3599
+				BirthDay:                                20201022,                                                            // 出生日期
3600
+				WorkTime:                                20201022,                                                            //参加工作日期
3601
+				Education:                               strconv.FormatInt(item.Education, 10),                               //学历
3602
+				StudyMajorName:                          item.StudyMajorName,                                                 //所学的专业名称
3603
+				CertificateCode:                         item.MedicalCode,                                                    //医(药)师执业证书编码
3604
+				MedicalCode:                             item.DoctorCode,                                                     //医(药)师资格证编码
3605
+				MedicalRangeCode:                        strconv.FormatInt(item.DoctorRangeCode, 10),                         //医师执业范围代码
3606
+				MedicalLevel:                            strconv.FormatInt(item.DoctorLevel, 10),                             //医生执业资格证中的医师级别
3607
+				TypeJob:                                 strconv.FormatInt(item.DoctorTypeJob, 10),                           //医生执业资格证中的执业类别
3608
+				DoctorNumber:                            item.DoctorNumber,                                                   //医保医师编号
3609
+				Licensing:                               strconv.FormatInt(item.Licensing, 10),                               //多点执业标志
3610
+				DoctorServiceStatus:                     "",                                                                  //医师医保服务资格状态
3611
+				MonitoringLevel:                         "",                                                                  //监控等级
3612
+				DrugPsychotropicSubstances:              "",                                                                  //毒麻精神药品资格
3613
+				HealthCareCode:                          "",                                                                  // 母婴保健技术考核合格证书编号
3614
+				PlanningTechnicalServiceCode:            "",                                                                  //计划生育技术服务人员合格证编号
3615
+				PharmacistType:                          "",                                                                  //药师类别
3616
+				PharmacistPracticeCategory:              "",                                                                  //药师执业类别
3617
+				PharmacistsLicensing:                    "",                                                                  //药师执业范围
3618
+				PharmacistRegistrationNumber:            "",                                                                  //执业药师注册证编号
3619
+				OfficeCode:                              "",                                                                  //科室编码
3620
+				JobNumber:                               item.JobNumber,                                                      //工号
3621
+				PostName:                                "",                                                                  //职位名称
3622
+				TechnicalJobLevelCode:                   "",                                                                  //专业技术职务级别编码
3623
+				IsActive:                                strconv.FormatInt(item.IsActive, 10),                                //在职与否
3624
+				PrescriptionQualificationIdentification: strconv.FormatInt(item.PrescriptionQualificationIdentification, 10), //处方资格标识
3625
+				IdentificationOutpatients:               strconv.FormatInt(item.IdentificationOutpatients, 10),               //门诊大病医师标识
3626
+				OutpatientIllnessCategory:               item.OutpatientIllnessCategory,                                      //门诊大病类别
3627
+				StartTime:                               20201010,                                                            //开始日期
3628
+				StaffCode:                               "",                                                                  //医护人员编码
3629
+				EndTime:                                 0,                                                                   // 结束日期
3582 3630
 				UserName:                     item.UserName,
3583 3631
 				RoleId:                       item.Name,
3584 3632
 				Sex:                          sex,
@@ -3636,7 +3684,7 @@ func (c *SZHisApiController) GetMedicalList() {
3636 3684
 			}
3637 3685
 			if res.Transreturncode == "00000000" {
3638 3686
 				//登记成功
3639
-				service.UpdateAdminUserRoleById(item.ID)
3687
+				service.UpdateAdminUserRoleById(item.ID, orgId)
3640 3688
 
3641 3689
 			} else {
3642 3690
 				isSuccess = false
@@ -3677,6 +3725,45 @@ func (c *SZHisApiController) GetMedicalList() {
3677 3725
 		for _, item := range list {
3678 3726
 			fmt.Println("医护类别", item.Name)
3679 3727
 			detail := &models.DocDetail{
3728
+				UserName:                                item.UserName,                                                       //医护姓名
3729
+				RoleId:                                  item.Name,                                                           //医护人员类别
3730
+				Sex:                                     strconv.FormatInt(item.Sex, 10),                                     //性别
3731
+				CardType:                                strconv.FormatInt(item.CardType, 10),                                //证件类型
3732
+				IdCard:                                  item.IdCard,                                                         //证件号码
3733
+				Phone:                                   item.Mobile,                                                         //联系电话
3734
+				WorkMajorName:                           item.WorkMajorName,                                                  // 现从事专业名称
3735
+				Nation:                                  item.Nation,                                                         //民族
3736
+				BirthDay:                                20201022,                                                            // 出生日期
3737
+				WorkTime:                                20201022,                                                            //参加工作日期
3738
+				Education:                               strconv.FormatInt(item.Education, 10),                               //学历
3739
+				StudyMajorName:                          item.StudyMajorName,                                                 //所学的专业名称
3740
+				CertificateCode:                         item.MedicalCode,                                                    //医(药)师执业证书编码
3741
+				MedicalCode:                             item.DoctorCode,                                                     //医(药)师资格证编码
3742
+				MedicalRangeCode:                        strconv.FormatInt(item.DoctorRangeCode, 10),                         //医师执业范围代码
3743
+				MedicalLevel:                            strconv.FormatInt(item.DoctorLevel, 10),                             //医生执业资格证中的医师级别
3744
+				TypeJob:                                 strconv.FormatInt(item.DoctorTypeJob, 10),                           //医生执业资格证中的执业类别
3745
+				DoctorNumber:                            item.DoctorNumber,                                                   //医保医师编号
3746
+				Licensing:                               strconv.FormatInt(item.Licensing, 10),                               //多点执业标志
3747
+				DoctorServiceStatus:                     "",                                                                  //医师医保服务资格状态
3748
+				MonitoringLevel:                         "",                                                                  //监控等级
3749
+				DrugPsychotropicSubstances:              "",                                                                  //毒麻精神药品资格
3750
+				HealthCareCode:                          "",                                                                  // 母婴保健技术考核合格证书编号
3751
+				PlanningTechnicalServiceCode:            "",                                                                  //计划生育技术服务人员合格证编号
3752
+				PharmacistType:                          "",                                                                  //药师类别
3753
+				PharmacistPracticeCategory:              "",                                                                  //药师执业类别
3754
+				PharmacistsLicensing:                    "",                                                                  //药师执业范围
3755
+				PharmacistRegistrationNumber:            "",                                                                  //执业药师注册证编号
3756
+				OfficeCode:                              "",                                                                  //科室编码
3757
+				JobNumber:                               item.JobNumber,                                                      //工号
3758
+				PostName:                                "",                                                                  //职位名称
3759
+				TechnicalJobLevelCode:                   "",                                                                  //专业技术职务级别编码
3760
+				IsActive:                                strconv.FormatInt(item.IsActive, 10),                                //在职与否
3761
+				PrescriptionQualificationIdentification: strconv.FormatInt(item.PrescriptionQualificationIdentification, 10), //处方资格标识
3762
+				IdentificationOutpatients:               strconv.FormatInt(item.IdentificationOutpatients, 10),               //门诊大病医师标识
3763
+				OutpatientIllnessCategory:               item.OutpatientIllnessCategory,                                      //门诊大病类别
3764
+				StartTime:                               20201010,                                                            //开始日期
3765
+				StaffCode:                               "",                                                                  //医护人员编码
3766
+				EndTime:                                 0,                                                                   // 结束日期
3680 3767
 				StaffCode:                    "H27224269",
3681 3768
 				UserName:                     item.UserName,
3682 3769
 				RoleId:                       item.Name,
@@ -3735,7 +3822,7 @@ func (c *SZHisApiController) GetMedicalList() {
3735 3822
 			}
3736 3823
 			if res.Transreturncode == "00000000" {
3737 3824
 				//去撤销
3738
-				service.UpdateAdminUserRoleById(item.ID)
3825
+				service.UpdateAdminUserRoleById(item.ID, orgId)
3739 3826
 			} else {
3740 3827
 				isSuccess = false
3741 3828
 				//失败
@@ -3882,6 +3969,8 @@ func (c *SZHisApiController) GetGoodsList() {
3882 3969
 
3883 3970
 	ids := c.GetString("ids")
3884 3971
 	fmt.Println("ids2222222222", ids)
3972
+	admin_user_id, _ := c.GetInt64("admin_user_id")
3973
+	roles, _ := service.GetAdminUserInfoByID(orgId, admin_user_id)
3885 3974
 	stringarr := strings.Split(ids, ",")
3886 3975
 	idss := make([]int64, 0)
3887 3976
 	for _, item := range stringarr {
@@ -3897,7 +3986,7 @@ func (c *SZHisApiController) GetGoodsList() {
3897 3986
 	var doctor_name string
3898 3987
 	var doctor_code string
3899 3988
 
3900
-	doctor_name = "黄亦轩"
3989
+	doctor_name = roles.UserName
3901 3990
 	doctor_code = "1001"
3902 3991
 
3903 3992
 	var isSuccess bool = true

二進制
gdyb 查看文件


+ 23 - 22
models/his_models.go 查看文件

@@ -1148,28 +1148,29 @@ func (MyGoodInformation) TableName() string {
1148 1148
 }
1149 1149
 
1150 1150
 type MySgjUserAdminRole struct {
1151
-	ID                                      int64  `gorm:"column:id" json:"id" form:"id"`
1152
-	AdminUserId                             int64  `gorm:"column:admin_user_id" json:"admin_user_id" form:"admin_user_id"`
1153
-	OrgId                                   int64  `gorm:"column:org_id" json:"org_id" form:"org_id"`
1154
-	AppId                                   int64  `gorm:"column:app_id" json:"app_id" form:"app_id"`
1155
-	RoleId                                  int64  `gorm:"column:role_id" json:"role_id" form:"role_id"`
1156
-	UserName                                string `gorm:"column:user_name" json:"user_name" form:"user_name"`
1157
-	Avatar                                  string `gorm:"column:avatar" json:"avatar" form:"avatar"`
1158
-	UserType                                int64  `gorm:"column:user_type" json:"user_type" form:"user_type"`
1159
-	UserTitle                               int64  `gorm:"column:user_title" json:"user_title" form:"user_title"`
1160
-	Intro                                   string `gorm:"column:intro" json:"intro" form:"intro"`
1161
-	Status                                  int64  `gorm:"column:status" json:"status" form:"status"`
1162
-	Ctime                                   int64  `gorm:"column:ctime" json:"ctime" form:"ctime"`
1163
-	Mtime                                   int64  `gorm:"column:mtime" json:"mtime" form:"mtime"`
1164
-	UserTitleName                           string `gorm:"column:user_title_name" json:"user_title_name" form:"user_title_name"`
1165
-	RoleIds                                 string `gorm:"column:role_ids" json:"role_ids" form:"role_ids"`
1166
-	Message                                 string `gorm:"column:message" json:"message" form:"message"`
1167
-	Sex                                     int64  `gorm:"column:sex" json:"sex" form:"sex"`
1168
-	Birthday                                int64  `gorm:"column:birthday" json:"birthday" form:"birthday"`
1169
-	Sort                                    int64  `gorm:"column:sort" json:"sort" form:"sort"`
1170
-	IsSort                                  int64  `gorm:"column:is_sort" json:"is_sort" form:"is_sort"`
1171
-	Department                              string `gorm:"column:department" json:"department" form:"department"`
1172
-	DepartmentId                            int64  `gorm:"column:department_id" json:"department_id" form:"department_id"`
1151
+	ID            int64  `gorm:"column:id" json:"id" form:"id"`
1152
+	AdminUserId   int64  `gorm:"column:admin_user_id" json:"admin_user_id" form:"admin_user_id"`
1153
+	OrgId         int64  `gorm:"column:org_id" json:"org_id" form:"org_id"`
1154
+	AppId         int64  `gorm:"column:app_id" json:"app_id" form:"app_id"`
1155
+	RoleId        int64  `gorm:"column:role_id" json:"role_id" form:"role_id"`
1156
+	UserName      string `gorm:"column:user_name" json:"user_name" form:"user_name"`
1157
+	Avatar        string `gorm:"column:avatar" json:"avatar" form:"avatar"`
1158
+	UserType      int64  `gorm:"column:user_type" json:"user_type" form:"user_type"`
1159
+	UserTitle     int64  `gorm:"column:user_title" json:"user_title" form:"user_title"`
1160
+	Intro         string `gorm:"column:intro" json:"intro" form:"intro"`
1161
+	Status        int64  `gorm:"column:status" json:"status" form:"status"`
1162
+	Ctime         int64  `gorm:"column:ctime" json:"ctime" form:"ctime"`
1163
+	Mtime         int64  `gorm:"column:mtime" json:"mtime" form:"mtime"`
1164
+	UserTitleName string `gorm:"column:user_title_name" json:"user_title_name" form:"user_title_name"`
1165
+	RoleIds       string `gorm:"column:role_ids" json:"role_ids" form:"role_ids"`
1166
+	Message       string `gorm:"column:message" json:"message" form:"message"`
1167
+	Sex           int64  `gorm:"column:sex" json:"sex" form:"sex"`
1168
+	Birthday      int64  `gorm:"column:birthday" json:"birthday" form:"birthday"`
1169
+	Sort          int64  `gorm:"column:sort" json:"sort" form:"sort"`
1170
+	IsSort        int64  `gorm:"column:is_sort" json:"is_sort" form:"is_sort"`
1171
+	Department    string `gorm:"column:department" json:"department" form:"department"`
1172
+	DepartmentId  int64  `gorm:"column:department_id" json:"department_id" form:"department_id"`
1173
+
1173 1174
 	Age                                     int64  `gorm:"column:age" json:"age" form:"age"`
1174 1175
 	Nation                                  string `gorm:"column:nation" json:"nation" form:"nation"`
1175 1176
 	CardType                                int64  `gorm:"column:card_type" json:"card_type" form:"card_type"`

+ 2 - 2
service/sz_his_service.go 查看文件

@@ -1429,10 +1429,10 @@ func UpdateMyProjectById(id int64) (models.MyHisProject, error) {
1429 1429
 	return project, err
1430 1430
 }
1431 1431
 
1432
-func UpdateAdminUserRoleById(id int64) (models.MySgjUserAdminRole, error) {
1432
+func UpdateAdminUserRoleById(id int64, orgid int64) (models.MySgjUserAdminRole, error) {
1433 1433
 
1434 1434
 	role := models.MySgjUserAdminRole{}
1435
-	err = UserWriteDB().Model(&role).Where("admin_user_id = ?", id).Updates(map[string]interface{}{"is_mark = ?": 1}).Error
1435
+	err = UserWriteDB().Model(&role).Where("admin_user_id = ? and org_id = ?", id, orgid).Updates(map[string]interface{}{"is_mark = ?": 1}).Error
1436 1436
 	return role, err
1437 1437
 }
1438 1438