|
@@ -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
|
|
16
|
15
|
"math"
|
|
@@ -460,6 +459,8 @@ func (c *SZHisApiController) ReadCard() {
|
460
|
459
|
|
461
|
460
|
|
462
|
461
|
|
|
462
|
+
|
|
463
|
+
|
463
|
464
|
|
464
|
465
|
|
465
|
466
|
|
|
@@ -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
|
|
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
|