浏览代码

拉取代码

XMLWAN 4 年前
父节点
当前提交
9e2f1eae3c
共有 4 个文件被更改,包括 135 次插入123 次删除
  1. 110 99
      controllers/sz/sz_his_api_controller.go
  2. 二进制
      gdyb
  3. 23 22
      models/his_models.go
  4. 2 2
      service/sz_his_service.go

+ 110 - 99
controllers/sz/sz_his_api_controller.go 查看文件

408
 //		custom_project_name = "专家"
408
 //		custom_project_name = "专家"
409
 //		allPrice = 10
409
 //		allPrice = 10
410
 //
410
 //
411
-//		break
411
+//		breakxuan
412
 //	}
412
 //	}
413
 //
413
 //
414
 //	if his.ID == 0 {
414
 //	if his.ID == 0 {
417
 //		var doctor_code string
417
 //		var doctor_code string
418
 //		if adminRole.ID == 0 {
418
 //		if adminRole.ID == 0 {
419
 //
419
 //
420
-//			doctor_name = "黄亦轩"
420
+//			doctor_name = ""
421
 //			doctor_code = "1001"
421
 //			doctor_code = "1001"
422
 //
422
 //
423
 //		} else {
423
 //		} else {
2655
 
2655
 
2656
 	adminUserInfo := c.GetAdminUserInfo()
2656
 	adminUserInfo := c.GetAdminUserInfo()
2657
 	orgId := adminUserInfo.CurrentOrgId
2657
 	orgId := adminUserInfo.CurrentOrgId
2658
-	fmt.Println(orgId)
2658
+	admin_user_id, _ := c.GetInt64("admin_user_id")
2659
+	roles, _ := service.GetAdminUserInfoByID(orgId, admin_user_id)
2660
+	fmt.Println("222222222222", roles)
2661
+	fmt.Println("rolessssssss", roles.UserName)
2659
 	ids := c.GetString("ids")
2662
 	ids := c.GetString("ids")
2663
+
2660
 	stringarr := strings.Split(ids, ",")
2664
 	stringarr := strings.Split(ids, ",")
2661
 	idss := make([]int64, 0)
2665
 	idss := make([]int64, 0)
2662
 	for _, item := range stringarr {
2666
 	for _, item := range stringarr {
2682
 	var doctor_name string
2686
 	var doctor_name string
2683
 	var doctor_code string
2687
 	var doctor_code string
2684
 
2688
 
2685
-	doctor_name = "黄亦轩"
2689
+	doctor_name = roles.UserName
2686
 	doctor_code = "1001"
2690
 	doctor_code = "1001"
2687
 
2691
 
2688
 	var isSuccess bool = true
2692
 	var isSuccess bool = true
2748
 	ids := c.GetString("ids")
2752
 	ids := c.GetString("ids")
2749
 	stringarr := strings.Split(ids, ",")
2753
 	stringarr := strings.Split(ids, ",")
2750
 	idss := make([]int64, 0)
2754
 	idss := make([]int64, 0)
2755
+	admin_user_id, _ := c.GetInt64("admin_user_id")
2756
+	roles, _ := service.GetAdminUserInfoByID(orgId, admin_user_id)
2751
 	for _, item := range stringarr {
2757
 	for _, item := range stringarr {
2752
 		itemsss, _ := strconv.ParseInt(item, 10, 64)
2758
 		itemsss, _ := strconv.ParseInt(item, 10, 64)
2753
 		id := int64(itemsss)
2759
 		id := int64(itemsss)
2761
 	miConfig, _ := service.FindMedicalInsuranceInfo(orgId)
2767
 	miConfig, _ := service.FindMedicalInsuranceInfo(orgId)
2762
 	var doctor_name string
2768
 	var doctor_name string
2763
 	var doctor_code string
2769
 	var doctor_code string
2764
-	doctor_name = "黄亦轩"
2770
+	doctor_name = roles.UserName
2765
 	doctor_code = "1001"
2771
 	doctor_code = "1001"
2766
 	var isSuccess bool = true
2772
 	var isSuccess bool = true
2767
 	for _, item := range list {
2773
 	for _, item := range list {
2816
 	adminUserInfo := c.GetAdminUserInfo()
2822
 	adminUserInfo := c.GetAdminUserInfo()
2817
 	orgId := adminUserInfo.CurrentOrgId
2823
 	orgId := adminUserInfo.CurrentOrgId
2818
 	id, _ := c.GetInt64("id")
2824
 	id, _ := c.GetInt64("id")
2825
+	admin_user_id, _ := c.GetInt64("admin_user_id")
2826
+	roles, _ := service.GetAdminUserInfoByID(orgId, admin_user_id)
2819
 	//用来区分是药品的撤销还是耗材的撤销  1.药品  2.诊疗项目 3.材料 5.辅助器具项目
2827
 	//用来区分是药品的撤销还是耗材的撤销  1.药品  2.诊疗项目 3.材料 5.辅助器具项目
2820
 	is_mark, _ := c.GetInt64("is_mark")
2828
 	is_mark, _ := c.GetInt64("is_mark")
2821
 	type_id, _ := c.GetInt64("type_id")
2829
 	type_id, _ := c.GetInt64("type_id")
2830
 			var doctor_name string
2838
 			var doctor_name string
2831
 			var doctor_code string
2839
 			var doctor_code string
2832
 
2840
 
2833
-			doctor_name = "黄亦轩"
2841
+			doctor_name = roles.UserName
2834
 			doctor_code = "1001"
2842
 			doctor_code = "1001"
2835
 
2843
 
2836
 			var pagesize int = 50
2844
 			var pagesize int = 50
2935
 			var doctor_name string
2943
 			var doctor_name string
2936
 			var doctor_code string
2944
 			var doctor_code string
2937
 
2945
 
2938
-			doctor_name = "黄亦轩"
2946
+			doctor_name = roles.UserName
2939
 			doctor_code = "1001"
2947
 			doctor_code = "1001"
2940
 
2948
 
2941
 			var isSuccess bool = true
2949
 			var isSuccess bool = true
3000
 			var doctor_name string
3008
 			var doctor_name string
3001
 			var doctor_code string
3009
 			var doctor_code string
3002
 
3010
 
3003
-			doctor_name = "黄亦轩"
3011
+			doctor_name = roles.UserName
3004
 			doctor_code = "1001"
3012
 			doctor_code = "1001"
3005
 
3013
 
3006
 			var pagesize int = 50
3014
 			var pagesize int = 50
3071
 		fmt.Println("is_marke", is_mark)
3079
 		fmt.Println("is_marke", is_mark)
3072
 		//备案
3080
 		//备案
3073
 		if is_mark == 0 {
3081
 		if is_mark == 0 {
3074
-			fmt.Println("进来饿了吗32222222")
3082
+
3075
 			adminUserInfo := c.GetAdminUserInfo()
3083
 			adminUserInfo := c.GetAdminUserInfo()
3076
 			orgId := adminUserInfo.CurrentOrgId
3084
 			orgId := adminUserInfo.CurrentOrgId
3077
 
3085
 
3081
 			miConfig, _ := service.FindMedicalInsuranceInfo(orgId)
3089
 			miConfig, _ := service.FindMedicalInsuranceInfo(orgId)
3082
 			var doctor_name string
3090
 			var doctor_name string
3083
 			var doctor_code string
3091
 			var doctor_code string
3084
-			doctor_name = "黄亦轩"
3092
+			doctor_name = roles.UserName
3085
 			doctor_code = "1001"
3093
 			doctor_code = "1001"
3086
 			var isSuccess bool = true
3094
 			var isSuccess bool = true
3087
 			for _, item := range list {
3095
 			for _, item := range list {
3143
 			var doctor_name string
3151
 			var doctor_name string
3144
 			var doctor_code string
3152
 			var doctor_code string
3145
 
3153
 
3146
-			doctor_name = "黄亦轩"
3154
+			doctor_name = roles.UserName
3147
 			doctor_code = "1001"
3155
 			doctor_code = "1001"
3148
 
3156
 
3149
 			var pagesize int = 50
3157
 			var pagesize int = 50
3224
 			var doctor_name string
3232
 			var doctor_name string
3225
 			var doctor_code string
3233
 			var doctor_code string
3226
 
3234
 
3227
-			doctor_name = "黄亦轩"
3235
+			doctor_name = roles.UserName
3228
 			doctor_code = "1001"
3236
 			doctor_code = "1001"
3229
 
3237
 
3230
 			var isSuccess bool = true
3238
 			var isSuccess bool = true
3286
 	fmt.Println("or3gi", orgid)
3294
 	fmt.Println("or3gi", orgid)
3287
 	ids := c.GetString("ids")
3295
 	ids := c.GetString("ids")
3288
 	fmt.Println("ids2222222222", ids)
3296
 	fmt.Println("ids2222222222", ids)
3297
+	admin_user_id, _ := c.GetInt64("admin_user_id")
3298
+	roles, _ := service.GetAdminUserInfoByID(orgid, admin_user_id)
3289
 	stringarr := strings.Split(ids, ",")
3299
 	stringarr := strings.Split(ids, ",")
3290
 	idss := make([]int64, 0)
3300
 	idss := make([]int64, 0)
3291
 	for _, item := range stringarr {
3301
 	for _, item := range stringarr {
3312
 	var doctor_name string
3322
 	var doctor_name string
3313
 	var doctor_code string
3323
 	var doctor_code string
3314
 
3324
 
3315
-	doctor_name = "黄亦轩"
3325
+	doctor_name = roles.UserName
3316
 	doctor_code = "1001"
3326
 	doctor_code = "1001"
3317
 
3327
 
3318
 	var isSuccess bool = true
3328
 	var isSuccess bool = true
3380
 		}
3390
 		}
3381
 		if res.Transreturncode == "00000000" {
3391
 		if res.Transreturncode == "00000000" {
3382
 			//批量插入数据
3392
 			//批量插入数据
3383
-			_, err := service.UpdateAdminUserRoleById(item.AdminUserId)
3393
+			_, err := service.UpdateAdminUserRoleById(item.AdminUserId, orgid)
3384
 			fmt.Println("err2222", err)
3394
 			fmt.Println("err2222", err)
3385
 		} else {
3395
 		} else {
3386
 			isSuccess = false
3396
 			isSuccess = false
3405
 	id, _ := c.GetInt64("id")
3415
 	id, _ := c.GetInt64("id")
3406
 	fmt.Println("id22222222", id)
3416
 	fmt.Println("id22222222", id)
3407
 	is_mark, _ := c.GetInt64("is_mark")
3417
 	is_mark, _ := c.GetInt64("is_mark")
3408
-
3418
+	admin_user_id, _ := c.GetInt64("admin_user_id")
3419
+	roles, _ := service.GetAdminUserInfoByID(orgId, admin_user_id)
3409
 	//去登记
3420
 	//去登记
3410
 	if is_mark == 0 {
3421
 	if is_mark == 0 {
3411
 		list, _ := service.GetDoctorListByDetail(orgId, id)
3422
 		list, _ := service.GetDoctorListByDetail(orgId, id)
3424
 		var doctor_name string
3435
 		var doctor_name string
3425
 		var doctor_code string
3436
 		var doctor_code string
3426
 
3437
 
3427
-		doctor_name = "黄亦轩"
3438
+		doctor_name = roles.UserName
3428
 		doctor_code = "1001"
3439
 		doctor_code = "1001"
3429
 
3440
 
3430
 		var isSuccess bool = true
3441
 		var isSuccess bool = true
3431
 
3442
 
3432
 		for _, item := range list {
3443
 		for _, item := range list {
3433
 			fmt.Println("医护类别", item.Mobile)
3444
 			fmt.Println("医护类别", item.Mobile)
3434
-			sex := strconv.FormatInt(item.Sex, 10)
3435
-			card_type := strconv.FormatInt(item.CardType, 10)
3436
-			is_active := strconv.FormatInt(item.IsActive, 10)
3437
 
3445
 
3438
 			detail := &models.DocDetail{
3446
 			detail := &models.DocDetail{
3439
-				UserName:                                item.UserName,
3440
-				RoleId:                                  item.Name,
3441
-				Sex:                                     sex,
3442
-				CardType:                                card_type,
3443
-				IdCard:                                  item.IdCard,
3444
-				Phone:                                   item.Mobile,
3445
-				WorkMajorName:                           item.WorkMajorName,
3446
-				Nation:                                  item.Nation,
3447
-				BirthDay:                                20201022,
3448
-				WorkTime:                                12,
3449
-				Education:                               strconv.FormatInt(item.Education, 10),
3450
-				StudyMajorName:                          item.StudyMajorName,
3451
-				CertificateCode:                         "",                                           //证书编码
3452
-				MedicalCode:                             item.MedicalCode,                             //医师资格编码
3453
-				MedicalRangeCode:                        strconv.FormatInt(item.MedicalRangeCode, 10), //医师执业范围代码
3454
-				MedicalLevel:                            strconv.FormatInt(item.MedicalLevel, 10),     //医生级别
3455
-				TypeJob:                                 strconv.FormatInt(item.DoctorTypeJob, 10),    //职业类别
3456
-				DoctorNumber:                            item.DoctorNumber,                            //医师编号
3457
-				Licensing:                               strconv.FormatInt(item.Licensing, 10),        //职业标志
3458
-				DoctorServiceStatus:                     "",                                           //医师医保服务资格状态
3459
-				MonitoringLevel:                         "",                                           //监控等级
3460
-				DrugPsychotropicSubstances:              "",                                           //毒麻精神药品资格
3461
-				HealthCareCode:                          "",                                           // 母婴保健技术考核合格证书编号
3462
-				PlanningTechnicalServiceCode:            "",                                           //计划生育技术服务人员合格证编号
3463
-				PharmacistType:                          "",                                           //药师类别
3464
-				PharmacistPracticeCategory:              "",                                           //药师执业类别
3465
-				PharmacistsLicensing:                    "",                                           //药师执业范围
3466
-				PharmacistRegistrationNumber:            item.PharmacistRegistrationNumber,            //执业药师注册证编号
3467
-				OfficeCode:                              "",                                           //科室编码
3468
-				JobNumber:                               item.JobNumber,                               //工号
3469
-				PostName:                                "",                                           //职位名称
3470
-				TechnicalJobLevelCode:                   "",                                           //专业技术职务级别编码
3471
-				IsActive:                                is_active,                                    //在职与否
3472
-				PrescriptionQualificationIdentification: item.PharmacistRegistrationNumber,            //处方资格标识
3473
-				IdentificationOutpatients:               "",                                           //门诊大病医师标识
3474
-				OutpatientIllnessCategory:               item.OutpatientIllnessCategory,               //门诊大病类别
3475
-				StartTime:                               20201012,                                     //开始日期
3476
-
3447
+				UserName:                                item.UserName,                                                       //医护姓名
3448
+				RoleId:                                  item.Name,                                                           //医护人员类别
3449
+				Sex:                                     strconv.FormatInt(item.Sex, 10),                                     //性别
3450
+				CardType:                                strconv.FormatInt(item.CardType, 10),                                //证件类型
3451
+				IdCard:                                  item.IdCard,                                                         //证件号码
3452
+				Phone:                                   item.Mobile,                                                         //联系电话
3453
+				WorkMajorName:                           item.WorkMajorName,                                                  // 现从事专业名称
3454
+				Nation:                                  item.Nation,                                                         //民族
3455
+				BirthDay:                                20201022,                                                            // 出生日期
3456
+				WorkTime:                                20201022,                                                            //参加工作日期
3457
+				Education:                               strconv.FormatInt(item.Education, 10),                               //学历
3458
+				StudyMajorName:                          item.StudyMajorName,                                                 //所学的专业名称
3459
+				CertificateCode:                         item.MedicalCode,                                                    //医(药)师执业证书编码
3460
+				MedicalCode:                             item.DoctorCode,                                                     //医(药)师资格证编码
3461
+				MedicalRangeCode:                        strconv.FormatInt(item.DoctorRangeCode, 10),                         //医师执业范围代码
3462
+				MedicalLevel:                            strconv.FormatInt(item.DoctorLevel, 10),                             //医生执业资格证中的医师级别
3463
+				TypeJob:                                 strconv.FormatInt(item.DoctorTypeJob, 10),                           //医生执业资格证中的执业类别
3464
+				DoctorNumber:                            item.DoctorNumber,                                                   //医保医师编号
3465
+				Licensing:                               strconv.FormatInt(item.Licensing, 10),                               //多点执业标志
3466
+				DoctorServiceStatus:                     "",                                                                  //医师医保服务资格状态
3467
+				MonitoringLevel:                         "",                                                                  //监控等级
3468
+				DrugPsychotropicSubstances:              "",                                                                  //毒麻精神药品资格
3469
+				HealthCareCode:                          "",                                                                  // 母婴保健技术考核合格证书编号
3470
+				PlanningTechnicalServiceCode:            "",                                                                  //计划生育技术服务人员合格证编号
3471
+				PharmacistType:                          "",                                                                  //药师类别
3472
+				PharmacistPracticeCategory:              "",                                                                  //药师执业类别
3473
+				PharmacistsLicensing:                    "",                                                                  //药师执业范围
3474
+				PharmacistRegistrationNumber:            "",                                                                  //执业药师注册证编号
3475
+				OfficeCode:                              "",                                                                  //科室编码
3476
+				JobNumber:                               item.JobNumber,                                                      //工号
3477
+				PostName:                                "",                                                                  //职位名称
3478
+				TechnicalJobLevelCode:                   "",                                                                  //专业技术职务级别编码
3479
+				IsActive:                                strconv.FormatInt(item.IsActive, 10),                                //在职与否
3480
+				PrescriptionQualificationIdentification: strconv.FormatInt(item.PrescriptionQualificationIdentification, 10), //处方资格标识
3481
+				IdentificationOutpatients:               strconv.FormatInt(item.IdentificationOutpatients, 10),               //门诊大病医师标识
3482
+				OutpatientIllnessCategory:               item.OutpatientIllnessCategory,                                      //门诊大病类别
3483
+				StartTime:                               20201010,                                                            //开始日期
3484
+				StaffCode:                               "",                                                                  //医护人员编码
3485
+				EndTime:                                 0,                                                                   // 结束日期
3477
 			}
3486
 			}
3478
 			result := service.SzybYS001(doctor_name, doctor_code, miConfig.Code, detail)
3487
 			result := service.SzybYS001(doctor_name, doctor_code, miConfig.Code, detail)
3479
 			fmt.Println("reuslt9999999999999999", result)
3488
 			fmt.Println("reuslt9999999999999999", result)
3494
 			}
3503
 			}
3495
 			if res.Transreturncode == "00000000" {
3504
 			if res.Transreturncode == "00000000" {
3496
 				//登记成功
3505
 				//登记成功
3497
-				service.UpdateAdminUserRoleById(item.ID)
3506
+				service.UpdateAdminUserRoleById(item.ID, orgId)
3498
 
3507
 
3499
 			} else {
3508
 			} else {
3500
 				isSuccess = false
3509
 				isSuccess = false
3535
 		for _, item := range list {
3544
 		for _, item := range list {
3536
 			fmt.Println("医护类别", item.Name)
3545
 			fmt.Println("医护类别", item.Name)
3537
 			detail := &models.DocDetail{
3546
 			detail := &models.DocDetail{
3538
-				StaffCode:                               "H27224269",
3539
-				UserName:                                item.UserName,
3540
-				RoleId:                                  item.Name,
3541
-				Sex:                                     "1",
3542
-				CardType:                                "01",
3543
-				IdCard:                                  "430526199408156511",
3544
-				Phone:                                   "13318464642",
3545
-				WorkMajorName:                           "医生",
3546
-				Nation:                                  "01",
3547
-				BirthDay:                                20201022,
3548
-				WorkTime:                                20201022,
3549
-				Education:                               "21",
3550
-				StudyMajorName:                          "医生",
3551
-				CertificateCode:                         "y2222222", //证书编码
3552
-				MedicalCode:                             "y2222222", //医师资格编
3553
-				MedicalRangeCode:                        "101",      //医师执业范围代码
3554
-				MedicalLevel:                            "1",        //医生级
3555
-				TypeJob:                                 "1",        //职业类别
3556
-				DoctorNumber:                            "22222",    //医师编号b
3557
-				Licensing:                               "1",        //职业标志
3558
-				DoctorServiceStatus:                     "1",        //医师医保服务资格状态
3559
-				MonitoringLevel:                         "1",        //监控等级
3560
-				DrugPsychotropicSubstances:              "1",        //毒麻精神药品资格
3561
-				HealthCareCode:                          "1001",     // 母婴保健技术考核合格证书编号
3562
-				PlanningTechnicalServiceCode:            "1002",     //计划生育技术服务人员合格证编号
3563
-				PharmacistType:                          "1",        //药师类别
3564
-				PharmacistPracticeCategory:              "1",        //药师执业类别
3565
-				PharmacistsLicensing:                    "1",        //药师执业范围
3566
-				PharmacistRegistrationNumber:            "000200",   //执业药师注册证编号
3567
-				OfficeCode:                              "9933",     //科室编码
3568
-				JobNumber:                               "82021344", //工号
3569
-				PostName:                                "主任",       //职位名称
3570
-				TechnicalJobLevelCode:                   "231",      //专业技术职务级别编码
3571
-				IsActive:                                "1",        //在职与否
3572
-				PrescriptionQualificationIdentification: "1",        //处方资格标识
3573
-				IdentificationOutpatients:               "1",        //门诊大病医师标识
3574
-				OutpatientIllnessCategory:               "血友病",      //门诊大病类别
3575
-				StartTime:                               20210311,   //开始日期
3576
-
3547
+				UserName:                                item.UserName,                                                       //医护姓名
3548
+				RoleId:                                  item.Name,                                                           //医护人员类别
3549
+				Sex:                                     strconv.FormatInt(item.Sex, 10),                                     //性别
3550
+				CardType:                                strconv.FormatInt(item.CardType, 10),                                //证件类型
3551
+				IdCard:                                  item.IdCard,                                                         //证件号码
3552
+				Phone:                                   item.Mobile,                                                         //联系电话
3553
+				WorkMajorName:                           item.WorkMajorName,                                                  // 现从事专业名称
3554
+				Nation:                                  item.Nation,                                                         //民族
3555
+				BirthDay:                                20201022,                                                            // 出生日期
3556
+				WorkTime:                                20201022,                                                            //参加工作日期
3557
+				Education:                               strconv.FormatInt(item.Education, 10),                               //学历
3558
+				StudyMajorName:                          item.StudyMajorName,                                                 //所学的专业名称
3559
+				CertificateCode:                         item.MedicalCode,                                                    //医(药)师执业证书编码
3560
+				MedicalCode:                             item.DoctorCode,                                                     //医(药)师资格证编码
3561
+				MedicalRangeCode:                        strconv.FormatInt(item.DoctorRangeCode, 10),                         //医师执业范围代
3562
+				MedicalLevel:                            strconv.FormatInt(item.DoctorLevel, 10),                             //医生执业资格证中的医师级别
3563
+				TypeJob:                                 strconv.FormatInt(item.DoctorTypeJob, 10),                           //医生执业资格证中的执业类
3564
+				DoctorNumber:                            item.DoctorNumber,                                                   //医保医师编号
3565
+				Licensing:                               strconv.FormatInt(item.Licensing, 10),                               //多点执业标志
3566
+				DoctorServiceStatus:                     "",                                                                  //医师医保服务资格状态
3567
+				MonitoringLevel:                         "",                                                                  //监控等级
3568
+				DrugPsychotropicSubstances:              "",                                                                  //毒麻精神药品资格
3569
+				HealthCareCode:                          "",                                                                  // 母婴保健技术考核合格证书编号
3570
+				PlanningTechnicalServiceCode:            "",                                                                  //计划生育技术服务人员合格证编号
3571
+				PharmacistType:                          "",                                                                  //药师类别
3572
+				PharmacistPracticeCategory:              "",                                                                  //药师执业类别
3573
+				PharmacistsLicensing:                    "",                                                                  //药师执业范围
3574
+				PharmacistRegistrationNumber:            "",                                                                  //执业药师注册证编号
3575
+				OfficeCode:                              "",                                                                  //科室编码
3576
+				JobNumber:                               item.JobNumber,                                                      //工号
3577
+				PostName:                                "",                                                                  //职位名称
3578
+				TechnicalJobLevelCode:                   "",                                                                  //专业技术职务级别编码
3579
+				IsActive:                                strconv.FormatInt(item.IsActive, 10),                                //在职与否
3580
+				PrescriptionQualificationIdentification: strconv.FormatInt(item.PrescriptionQualificationIdentification, 10), //处方资格标识
3581
+				IdentificationOutpatients:               strconv.FormatInt(item.IdentificationOutpatients, 10),               //门诊大病医师标识
3582
+				OutpatientIllnessCategory:               item.OutpatientIllnessCategory,                                      //门诊大病类别
3583
+				StartTime:                               20201010,                                                            //开始日期
3584
+				StaffCode:                               "",                                                                  //医护人员编码
3585
+				EndTime:                                 0,                                                                   // 结束日期
3577
 			}
3586
 			}
3578
 			result := service.SzybYS002(doctor_name, doctor_code, miConfig.Code, detail)
3587
 			result := service.SzybYS002(doctor_name, doctor_code, miConfig.Code, detail)
3579
 			fmt.Println("reuslt9999999999999999", result)
3588
 			fmt.Println("reuslt9999999999999999", result)
3594
 			}
3603
 			}
3595
 			if res.Transreturncode == "00000000" {
3604
 			if res.Transreturncode == "00000000" {
3596
 				//去撤销
3605
 				//去撤销
3597
-				service.UpdateAdminUserRoleById(item.ID)
3606
+				service.UpdateAdminUserRoleById(item.ID, orgId)
3598
 			} else {
3607
 			} else {
3599
 				isSuccess = false
3608
 				isSuccess = false
3600
 				//失败
3609
 				//失败
3741
 
3750
 
3742
 	ids := c.GetString("ids")
3751
 	ids := c.GetString("ids")
3743
 	fmt.Println("ids2222222222", ids)
3752
 	fmt.Println("ids2222222222", ids)
3753
+	admin_user_id, _ := c.GetInt64("admin_user_id")
3754
+	roles, _ := service.GetAdminUserInfoByID(orgId, admin_user_id)
3744
 	stringarr := strings.Split(ids, ",")
3755
 	stringarr := strings.Split(ids, ",")
3745
 	idss := make([]int64, 0)
3756
 	idss := make([]int64, 0)
3746
 	for _, item := range stringarr {
3757
 	for _, item := range stringarr {
3756
 	var doctor_name string
3767
 	var doctor_name string
3757
 	var doctor_code string
3768
 	var doctor_code string
3758
 
3769
 
3759
-	doctor_name = "黄亦轩"
3770
+	doctor_name = roles.UserName
3760
 	doctor_code = "1001"
3771
 	doctor_code = "1001"
3761
 
3772
 
3762
 	var isSuccess bool = true
3773
 	var isSuccess bool = true

二进制
gdyb 查看文件


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

1148
 }
1148
 }
1149
 
1149
 
1150
 type MySgjUserAdminRole struct {
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
 	Age                                     int64  `gorm:"column:age" json:"age" form:"age"`
1174
 	Age                                     int64  `gorm:"column:age" json:"age" form:"age"`
1174
 	Nation                                  string `gorm:"column:nation" json:"nation" form:"nation"`
1175
 	Nation                                  string `gorm:"column:nation" json:"nation" form:"nation"`
1175
 	CardType                                int64  `gorm:"column:card_type" json:"card_type" form:"card_type"`
1176
 	CardType                                int64  `gorm:"column:card_type" json:"card_type" form:"card_type"`

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

1425
 	return project, err
1425
 	return project, err
1426
 }
1426
 }
1427
 
1427
 
1428
-func UpdateAdminUserRoleById(id int64) (models.MySgjUserAdminRole, error) {
1428
+func UpdateAdminUserRoleById(id int64, orgid int64) (models.MySgjUserAdminRole, error) {
1429
 
1429
 
1430
 	role := models.MySgjUserAdminRole{}
1430
 	role := models.MySgjUserAdminRole{}
1431
-	err = UserWriteDB().Model(&role).Where("admin_user_id = ?", id).Updates(map[string]interface{}{"is_mark = ?": 1}).Error
1431
+	err = UserWriteDB().Model(&role).Where("admin_user_id = ? and org_id = ?", id, orgid).Updates(map[string]interface{}{"is_mark = ?": 1}).Error
1432
 	return role, err
1432
 	return role, err
1433
 }
1433
 }
1434
 
1434