|
@@ -330,8 +330,6 @@ func SZHisManagerApiRegistRouters() {
|
330
|
330
|
beego.Router("/sz/api/register/get", &SZHisApiController{}, "get:GetRegisterInfo")
|
331
|
331
|
|
332
|
332
|
|
333
|
|
-
|
334
|
|
-
|
335
|
333
|
|
336
|
334
|
|
337
|
335
|
beego.Router("/sz/api/settle/get", &SZHisApiController{}, "get:GetSettleInfo")
|
|
@@ -3378,8 +3376,6 @@ func (c *SZHisApiController) GetDrugList() {
|
3378
|
3376
|
orgId := adminUserInfo.CurrentOrgId
|
3379
|
3377
|
admin_user_id, _ := c.GetInt64("admin_user_id")
|
3380
|
3378
|
roles, _ := service.GetAdminUserInfoByID(orgId, admin_user_id)
|
3381
|
|
- fmt.Println("222222222222", roles)
|
3382
|
|
- fmt.Println("rolessssssss", roles.UserName)
|
3383
|
3379
|
ids := c.GetString("ids")
|
3384
|
3380
|
|
3385
|
3381
|
stringarr := strings.Split(ids, ",")
|
|
@@ -3395,14 +3391,6 @@ func (c *SZHisApiController) GetDrugList() {
|
3395
|
3391
|
|
3396
|
3392
|
|
3397
|
3393
|
drugs, _ := service.GetDrugDosageForm(orgId)
|
3398
|
|
- for _, item := range list {
|
3399
|
|
-
|
3400
|
|
- for _, it := range drugs {
|
3401
|
|
- if item.DrugDosageForm == it.Value {
|
3402
|
|
- item.DrugDosageName = it.Name
|
3403
|
|
- }
|
3404
|
|
- }
|
3405
|
|
- }
|
3406
|
3394
|
miConfig, _ := service.FindMedicalInsuranceInfo(orgId)
|
3407
|
3395
|
var doctor_name string
|
3408
|
3396
|
var doctor_code string
|
|
@@ -3411,12 +3399,13 @@ func (c *SZHisApiController) GetDrugList() {
|
3411
|
3399
|
doctor_code = "1001"
|
3412
|
3400
|
|
3413
|
3401
|
var isSuccess bool = true
|
3414
|
|
-
|
|
3402
|
+ timeLayout := "20060102"
|
3415
|
3403
|
|
3416
|
3404
|
for _, item := range list {
|
3417
|
|
- detail := &models.DrugDetail{
|
|
3405
|
+ recordDate := time.Unix(item.RecordDate, 0).Format(timeLayout)
|
3418
|
3406
|
|
3419
|
|
- MedicalInsuranceNumber: item.MedicalInsuranceNumber,
|
|
3407
|
+ detail := &models.DrugDetail{
|
|
3408
|
+ MedicalInsuranceNumber: item.SocialSecurityDirectoryCode,
|
3420
|
3409
|
Code: item.Code,
|
3421
|
3410
|
DrugName: item.DrugName,
|
3422
|
3411
|
DrugSpec: item.DrugSpec,
|
|
@@ -3426,6 +3415,14 @@ func (c *SZHisApiController) GetDrugList() {
|
3426
|
3415
|
RetailPrice: item.RetailPrice,
|
3427
|
3416
|
LastPrice: item.LastPrice,
|
3428
|
3417
|
LimitRemark: item.LimitRemark,
|
|
3418
|
+ PrescriptionMark: strconv.FormatInt(item.PrescriptionMark, 10),
|
|
3419
|
+ RecordDate: recordDate,
|
|
3420
|
+ }
|
|
3421
|
+
|
|
3422
|
+ for _, it := range drugs {
|
|
3423
|
+ if item.DrugDosageForm == it.Value {
|
|
3424
|
+ detail.DrugDosageName = it.Code
|
|
3425
|
+ }
|
3429
|
3426
|
}
|
3430
|
3427
|
|
3431
|
3428
|
result := service.SzybML008(doctor_name, doctor_code, miConfig.Code, detail)
|
|
@@ -3462,11 +3459,17 @@ func (c *SZHisApiController) GetDrugList() {
|
3462
|
3459
|
return
|
3463
|
3460
|
}
|
3464
|
3461
|
fmt.Println(isSuccess)
|
|
3462
|
+
|
|
3463
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
3464
|
+ "failed_code": -10,
|
|
3465
|
+ "msg": res.Transreturnmessage,
|
|
3466
|
+ })
|
|
3467
|
+ return
|
3465
|
3468
|
}
|
3466
|
3469
|
}
|
3467
|
3470
|
|
3468
|
3471
|
func (c *SZHisApiController) GetTreatmentProject() {
|
3469
|
|
- fmt.Println("触发了吗2222222222")
|
|
3472
|
+
|
3470
|
3473
|
adminUserInfo := c.GetAdminUserInfo()
|
3471
|
3474
|
orgId := adminUserInfo.CurrentOrgId
|
3472
|
3475
|
|
|
@@ -3480,28 +3483,33 @@ func (c *SZHisApiController) GetTreatmentProject() {
|
3480
|
3483
|
id := int64(itemsss)
|
3481
|
3484
|
idss = append(idss, id)
|
3482
|
3485
|
}
|
3483
|
|
- fmt.Println("idsss", idss)
|
|
3486
|
+
|
3484
|
3487
|
|
3485
|
|
-
|
|
3488
|
+
|
3486
|
3489
|
list, _ := service.GetBathchMyPorjecgList(idss)
|
3487
|
|
- fmt.Println("list2222222222", list)
|
|
3490
|
+
|
3488
|
3491
|
miConfig, _ := service.FindMedicalInsuranceInfo(orgId)
|
3489
|
3492
|
var doctor_name string
|
3490
|
3493
|
var doctor_code string
|
3491
|
3494
|
doctor_name = roles.UserName
|
3492
|
3495
|
doctor_code = "1001"
|
3493
|
3496
|
var isSuccess bool = true
|
|
3497
|
+
|
3494
|
3498
|
for _, item := range list {
|
|
3499
|
+
|
3495
|
3500
|
detail := &models.MyHisProject{
|
3496
|
3501
|
MedicalCode: item.MedicalCode,
|
3497
|
3502
|
ProjectName: item.ProjectName,
|
3498
|
3503
|
Price: item.Price,
|
3499
|
3504
|
Category: item.Category,
|
3500
|
3505
|
Remark: item.Remark,
|
|
3506
|
+ SocialSecurityDirectoryCode: item.SocialSecurityDirectoryCode,
|
|
3507
|
+ SpecailProject: item.SpecailProject,
|
|
3508
|
+ RecordDate: item.RecordDate,
|
3501
|
3509
|
}
|
3502
|
3510
|
|
3503
|
3511
|
result := service.SzybML009(doctor_name, doctor_code, miConfig.Code, detail)
|
3504
|
|
- fmt.Println("reuslt9999999999999999", result)
|
|
3512
|
+
|
3505
|
3513
|
var dat map[string]interface{}
|
3506
|
3514
|
if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
3507
|
3515
|
fmt.Println(dat)
|
|
@@ -3523,7 +3531,7 @@ func (c *SZHisApiController) GetTreatmentProject() {
|
3523
|
3531
|
if res.Transreturncode == "00000000" {
|
3524
|
3532
|
|
3525
|
3533
|
_, err := service.UpdateProjectById(item.ID)
|
3526
|
|
- fmt.Println("err22222", err)
|
|
3534
|
+ fmt.Println("err", err)
|
3527
|
3535
|
} else {
|
3528
|
3536
|
isSuccess = false
|
3529
|
3537
|
|
|
@@ -3534,6 +3542,11 @@ func (c *SZHisApiController) GetTreatmentProject() {
|
3534
|
3542
|
return
|
3535
|
3543
|
}
|
3536
|
3544
|
fmt.Println(isSuccess)
|
|
3545
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
3546
|
+ "failed_code": -10,
|
|
3547
|
+ "msg": res.Transreturnmessage,
|
|
3548
|
+ })
|
|
3549
|
+ return
|
3537
|
3550
|
}
|
3538
|
3551
|
|
3539
|
3552
|
}
|
|
@@ -3548,7 +3561,7 @@ func (c *SZHisApiController) GetRevocation() {
|
3548
|
3561
|
|
3549
|
3562
|
is_mark, _ := c.GetInt64("is_mark")
|
3550
|
3563
|
type_id, _ := c.GetInt64("type_id")
|
3551
|
|
- fmt.Println("type_id2222222", type_id)
|
|
3564
|
+
|
3552
|
3565
|
if type_id == 1 {
|
3553
|
3566
|
|
3554
|
3567
|
if is_mark == 1 {
|
|
@@ -3585,7 +3598,7 @@ func (c *SZHisApiController) GetRevocation() {
|
3585
|
3598
|
fmt.Println(list[start-1 : stop])
|
3586
|
3599
|
var customs []*models.DrugDetail
|
3587
|
3600
|
for _, item := range list {
|
3588
|
|
- fmt.Println("医疗机构编码", item.MedicalInsuranceNumber, item.Code)
|
|
3601
|
+
|
3589
|
3602
|
detail := &models.DrugDetail{
|
3590
|
3603
|
|
3591
|
3604
|
SocialSecurityDirectoryCode: item.MedicalInsuranceNumber,
|
|
@@ -3623,7 +3636,7 @@ func (c *SZHisApiController) GetRevocation() {
|
3623
|
3636
|
if res.Transreturncode == "00000000" {
|
3624
|
3637
|
|
3625
|
3638
|
_, err := service.UpdateDrugByIdDetail(id)
|
3626
|
|
- fmt.Println("err22222", err)
|
|
3639
|
+ fmt.Println("err", err)
|
3627
|
3640
|
} else {
|
3628
|
3641
|
isSuccess = false
|
3629
|
3642
|
|
|
@@ -3635,6 +3648,11 @@ func (c *SZHisApiController) GetRevocation() {
|
3635
|
3648
|
return
|
3636
|
3649
|
}
|
3637
|
3650
|
fmt.Println(isSuccess)
|
|
3651
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
3652
|
+ "failed_code": -10,
|
|
3653
|
+ "msg": res.Transreturnmessage,
|
|
3654
|
+ })
|
|
3655
|
+ return
|
3638
|
3656
|
}
|
3639
|
3657
|
|
3640
|
3658
|
}
|
|
@@ -3644,21 +3662,12 @@ func (c *SZHisApiController) GetRevocation() {
|
3644
|
3662
|
|
3645
|
3663
|
adminUserInfo := c.GetAdminUserInfo()
|
3646
|
3664
|
orgId := adminUserInfo.CurrentOrgId
|
3647
|
|
- fmt.Println(orgId)
|
|
3665
|
+
|
3648
|
3666
|
|
3649
|
3667
|
list, _ := service.GetDrugListByDetail(orgId, id)
|
3650
|
3668
|
|
3651
|
3669
|
drugs, _ := service.GetDrugDosageForm(orgId)
|
3652
|
|
- for _, item := range list {
|
3653
|
|
- fmt.Println(item.DrugDosageForm)
|
3654
|
|
- for _, it := range drugs {
|
3655
|
3670
|
|
3656
|
|
- if item.DrugDosageForm == it.Value {
|
3657
|
|
- item.DrugDosageName = it.Name
|
3658
|
|
- }
|
3659
|
|
- }
|
3660
|
|
- }
|
3661
|
|
- fmt.Print("长度", len(list))
|
3662
|
3671
|
miConfig, _ := service.FindMedicalInsuranceInfo(orgId)
|
3663
|
3672
|
var doctor_name string
|
3664
|
3673
|
var doctor_code string
|
|
@@ -3670,7 +3679,7 @@ func (c *SZHisApiController) GetRevocation() {
|
3670
|
3679
|
|
3671
|
3680
|
|
3672
|
3681
|
for _, item := range list {
|
3673
|
|
- fmt.Print("长度", item.MedicalInsuranceNumber, item.Code)
|
|
3682
|
+
|
3674
|
3683
|
detail := &models.DrugDetail{
|
3675
|
3684
|
MedicalInsuranceNumber: item.MedicalInsuranceNumber,
|
3676
|
3685
|
SocialSecurityDirectoryCode: item.MedicalInsuranceNumber,
|
|
@@ -3685,6 +3694,13 @@ func (c *SZHisApiController) GetRevocation() {
|
3685
|
3694
|
LimitRemark: item.LimitRemark,
|
3686
|
3695
|
}
|
3687
|
3696
|
|
|
3697
|
+ for _, it := range drugs {
|
|
3698
|
+
|
|
3699
|
+ if item.DrugDosageForm == it.Value {
|
|
3700
|
+ detail.DrugDosageName = it.Code
|
|
3701
|
+ }
|
|
3702
|
+ }
|
|
3703
|
+
|
3688
|
3704
|
result := service.SzybML008(doctor_name, doctor_code, miConfig.Code, detail)
|
3689
|
3705
|
|
3690
|
3706
|
var dat map[string]interface{}
|
|
@@ -3712,13 +3728,18 @@ func (c *SZHisApiController) GetRevocation() {
|
3712
|
3728
|
fmt.Println("err", err)
|
3713
|
3729
|
}
|
3714
|
3730
|
fmt.Println(isSuccess)
|
|
3731
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
3732
|
+ "failed_code": -10,
|
|
3733
|
+ "msg": res.Transreturnmessage,
|
|
3734
|
+ })
|
|
3735
|
+ return
|
3715
|
3736
|
}
|
3716
|
3737
|
|
3717
|
3738
|
}
|
3718
|
3739
|
}
|
3719
|
3740
|
|
3720
|
3741
|
if type_id == 2 {
|
3721
|
|
- fmt.Println("222222222222222q2")
|
|
3742
|
+
|
3722
|
3743
|
|
3723
|
3744
|
if is_mark == 1 {
|
3724
|
3745
|
|
|
@@ -3794,9 +3815,14 @@ func (c *SZHisApiController) GetRevocation() {
|
3794
|
3815
|
return
|
3795
|
3816
|
}
|
3796
|
3817
|
fmt.Println(isSuccess)
|
|
3818
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
3819
|
+ "failed_code": -10,
|
|
3820
|
+ "msg": res.Transreturnmessage,
|
|
3821
|
+ })
|
|
3822
|
+ return
|
3797
|
3823
|
}
|
3798
|
3824
|
}
|
3799
|
|
- fmt.Println("is_marke", is_mark)
|
|
3825
|
+
|
3800
|
3826
|
|
3801
|
3827
|
if is_mark == 0 {
|
3802
|
3828
|
|
|
@@ -3822,7 +3848,7 @@ func (c *SZHisApiController) GetRevocation() {
|
3822
|
3848
|
}
|
3823
|
3849
|
|
3824
|
3850
|
result := service.SzybML009(doctor_name, doctor_code, miConfig.Code, detail)
|
3825
|
|
- fmt.Println("reuslt9999999999999999", result)
|
|
3851
|
+ fmt.Println("reuslt", result)
|
3826
|
3852
|
var dat map[string]interface{}
|
3827
|
3853
|
if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
3828
|
3854
|
fmt.Println(dat)
|
|
@@ -3844,7 +3870,7 @@ func (c *SZHisApiController) GetRevocation() {
|
3844
|
3870
|
if res.Transreturncode == "00000000" {
|
3845
|
3871
|
|
3846
|
3872
|
_, err := service.UpdateProjectById(item.ID)
|
3847
|
|
- fmt.Println("err22222", err)
|
|
3873
|
+ fmt.Println("err", err)
|
3848
|
3874
|
} else {
|
3849
|
3875
|
isSuccess = false
|
3850
|
3876
|
|
|
@@ -3856,6 +3882,11 @@ func (c *SZHisApiController) GetRevocation() {
|
3856
|
3882
|
return
|
3857
|
3883
|
}
|
3858
|
3884
|
fmt.Println(isSuccess)
|
|
3885
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
3886
|
+ "failed_code": -10,
|
|
3887
|
+ "msg": res.Transreturnmessage,
|
|
3888
|
+ })
|
|
3889
|
+ return
|
3859
|
3890
|
}
|
3860
|
3891
|
}
|
3861
|
3892
|
}
|
|
@@ -3936,6 +3967,11 @@ func (c *SZHisApiController) GetRevocation() {
|
3936
|
3967
|
return
|
3937
|
3968
|
}
|
3938
|
3969
|
fmt.Println(isSuccess)
|
|
3970
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
3971
|
+ "failed_code": -10,
|
|
3972
|
+ "msg": res.Transreturnmessage,
|
|
3973
|
+ })
|
|
3974
|
+ return
|
3939
|
3975
|
}
|
3940
|
3976
|
}
|
3941
|
3977
|
|
|
@@ -3943,10 +3979,10 @@ func (c *SZHisApiController) GetRevocation() {
|
3943
|
3979
|
|
3944
|
3980
|
adminUserInfo := c.GetAdminUserInfo()
|
3945
|
3981
|
orgId := adminUserInfo.CurrentOrgId
|
3946
|
|
- fmt.Println("3344555555555", orgId)
|
|
3982
|
+
|
3947
|
3983
|
|
3948
|
3984
|
list, _ := service.GetGoodListByDetail(orgId, id)
|
3949
|
|
- fmt.Println("list22222", list)
|
|
3985
|
+
|
3950
|
3986
|
|
3951
|
3987
|
miConfig, _ := service.FindMedicalInsuranceInfo(orgId)
|
3952
|
3988
|
var doctor_name string
|
|
@@ -3957,7 +3993,7 @@ func (c *SZHisApiController) GetRevocation() {
|
3957
|
3993
|
|
3958
|
3994
|
var isSuccess bool = true
|
3959
|
3995
|
for _, item := range list {
|
3960
|
|
- fmt.Println("生产厂商", item.ManufacturerName)
|
|
3996
|
+
|
3961
|
3997
|
detail := &models.XtGoodInformation{
|
3962
|
3998
|
GoodName: item.GoodName,
|
3963
|
3999
|
SocialSecurityDirectoryCode: item.SocialSecurityDirectoryCode,
|
|
@@ -3971,7 +4007,7 @@ func (c *SZHisApiController) GetRevocation() {
|
3971
|
4007
|
}
|
3972
|
4008
|
|
3973
|
4009
|
result := service.SzybYML007(doctor_name, doctor_code, miConfig.Code, detail)
|
3974
|
|
- fmt.Println("reuslt8888", result)
|
|
4010
|
+ fmt.Println("reuslt", result)
|
3975
|
4011
|
var dat map[string]interface{}
|
3976
|
4012
|
if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
3977
|
4013
|
fmt.Println(dat)
|
|
@@ -3984,22 +4020,33 @@ func (c *SZHisApiController) GetRevocation() {
|
3984
|
4020
|
var res Result
|
3985
|
4021
|
if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
3986
|
4022
|
utils.ErrorLog("解析失败:%v", err)
|
3987
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
4023
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
4024
|
+ "failed_code": -10,
|
|
4025
|
+ "msg": res.Transreturnmessage,
|
|
4026
|
+ })
|
3988
|
4027
|
return
|
3989
|
4028
|
}
|
3990
|
4029
|
if res.Transreturncode == "00000000" {
|
3991
|
4030
|
|
3992
|
4031
|
|
3993
|
4032
|
_, err := service.UpdateGoodInformaitonByDetail(item.ID)
|
3994
|
|
- fmt.Println("err2222222", err)
|
|
4033
|
+ fmt.Println("err", err)
|
3995
|
4034
|
} else {
|
3996
|
4035
|
isSuccess = false
|
3997
|
4036
|
|
3998
|
4037
|
|
3999
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorDrugPreSettleFaildParamWrong)
|
|
4038
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
4039
|
+ "failed_code": -10,
|
|
4040
|
+ "msg": res.Transreturnmessage,
|
|
4041
|
+ })
|
4000
|
4042
|
return
|
4001
|
4043
|
}
|
4002
|
4044
|
fmt.Println(isSuccess)
|
|
4045
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
4046
|
+ "failed_code": -10,
|
|
4047
|
+ "msg": res.Transreturnmessage,
|
|
4048
|
+ })
|
|
4049
|
+ return
|
4003
|
4050
|
}
|
4004
|
4051
|
}
|
4005
|
4052
|
|
|
@@ -4011,9 +4058,9 @@ func (c *SZHisApiController) GetDoctorList() {
|
4011
|
4058
|
|
4012
|
4059
|
adminUserInfo := c.GetAdminUserInfo()
|
4013
|
4060
|
orgid := adminUserInfo.CurrentOrgId
|
4014
|
|
- fmt.Println("or3gi", orgid)
|
|
4061
|
+
|
4015
|
4062
|
ids := c.GetString("ids")
|
4016
|
|
- fmt.Println("ids2222222222", ids)
|
|
4063
|
+
|
4017
|
4064
|
admin_user_id, _ := c.GetInt64("admin_user_id")
|
4018
|
4065
|
roles, _ := service.GetAdminUserInfoByID(orgid, admin_user_id)
|
4019
|
4066
|
stringarr := strings.Split(ids, ",")
|
|
@@ -4027,7 +4074,7 @@ func (c *SZHisApiController) GetDoctorList() {
|
4027
|
4074
|
|
4028
|
4075
|
|
4029
|
4076
|
list, _ := service.GetBatchDoctorList(idss)
|
4030
|
|
- fmt.Println("list22222222222", list)
|
|
4077
|
+
|
4031
|
4078
|
|
4032
|
4079
|
roleList, _ := service.GetRoleList(orgid)
|
4033
|
4080
|
|
|
@@ -4048,7 +4095,7 @@ func (c *SZHisApiController) GetDoctorList() {
|
4048
|
4095
|
var isSuccess bool = true
|
4049
|
4096
|
|
4050
|
4097
|
for _, item := range list {
|
4051
|
|
- fmt.Println("医护类别", item.StudyMajorName)
|
|
4098
|
+
|
4052
|
4099
|
detail := &models.DocDetail{
|
4053
|
4100
|
UserName: item.UserName,
|
4054
|
4101
|
RoleId: item.Name,
|
|
@@ -4057,7 +4104,7 @@ func (c *SZHisApiController) GetDoctorList() {
|
4057
|
4104
|
IdCard: item.IdCard,
|
4058
|
4105
|
Phone: item.Mobile,
|
4059
|
4106
|
WorkMajorName: item.WorkMajorName,
|
4060
|
|
- Nation: item.Nation,
|
|
4107
|
+ Nation: "1",
|
4061
|
4108
|
BirthDay: 20201022,
|
4062
|
4109
|
WorkTime: 20201022,
|
4063
|
4110
|
Education: strconv.FormatInt(item.Education, 10),
|
|
@@ -4092,7 +4139,7 @@ func (c *SZHisApiController) GetDoctorList() {
|
4092
|
4139
|
}
|
4093
|
4140
|
|
4094
|
4141
|
result := service.SzybYS001(doctor_name, doctor_code, miConfig.Code, detail)
|
4095
|
|
- fmt.Println("reuslt9999999999999999", result)
|
|
4142
|
+ fmt.Println("reuslt", result)
|
4096
|
4143
|
var dat map[string]interface{}
|
4097
|
4144
|
if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
4098
|
4145
|
fmt.Println(dat)
|
|
@@ -4105,13 +4152,16 @@ func (c *SZHisApiController) GetDoctorList() {
|
4105
|
4152
|
var res Result
|
4106
|
4153
|
if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
4107
|
4154
|
utils.ErrorLog("解析失败:%v", err)
|
4108
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
4155
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
4156
|
+ "failed_code": -10,
|
|
4157
|
+ "msg": res.Transreturnmessage,
|
|
4158
|
+ })
|
4109
|
4159
|
return
|
4110
|
4160
|
}
|
4111
|
4161
|
if res.Transreturncode == "00000000" {
|
4112
|
4162
|
|
4113
|
4163
|
_, err := service.UpdateAdminUserRoleById(item.AdminUserId, orgid)
|
4114
|
|
- fmt.Println("err2222", err)
|
|
4164
|
+ fmt.Println("err", err)
|
4115
|
4165
|
} else {
|
4116
|
4166
|
isSuccess = false
|
4117
|
4167
|
|
|
@@ -4123,6 +4173,11 @@ func (c *SZHisApiController) GetDoctorList() {
|
4123
|
4173
|
return
|
4124
|
4174
|
}
|
4125
|
4175
|
fmt.Println(isSuccess)
|
|
4176
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
4177
|
+ "failed_code": -10,
|
|
4178
|
+ "msg": res.Transreturnmessage,
|
|
4179
|
+ })
|
|
4180
|
+ return
|
4126
|
4181
|
}
|
4127
|
4182
|
|
4128
|
4183
|
}
|
|
@@ -4133,14 +4188,14 @@ func (c *SZHisApiController) GetMedicalList() {
|
4133
|
4188
|
orgId := adminUserInfo.CurrentOrgId
|
4134
|
4189
|
|
4135
|
4190
|
id, _ := c.GetInt64("id")
|
4136
|
|
- fmt.Println("id22222222", id)
|
|
4191
|
+
|
4137
|
4192
|
is_mark, _ := c.GetInt64("is_mark")
|
4138
|
4193
|
admin_user_id, _ := c.GetInt64("admin_user_id")
|
4139
|
4194
|
roles, _ := service.GetAdminUserInfoByID(orgId, admin_user_id)
|
4140
|
4195
|
|
4141
|
4196
|
if is_mark == 0 {
|
4142
|
4197
|
list, _ := service.GetDoctorListByDetail(orgId, id)
|
4143
|
|
- fmt.Println("list22222222222", list)
|
|
4198
|
+
|
4144
|
4199
|
|
4145
|
4200
|
roleList, _ := service.GetRoleList(orgId)
|
4146
|
4201
|
|
|
@@ -4161,7 +4216,6 @@ func (c *SZHisApiController) GetMedicalList() {
|
4161
|
4216
|
var isSuccess bool = true
|
4162
|
4217
|
|
4163
|
4218
|
for _, item := range list {
|
4164
|
|
- fmt.Println("医护类别", item.Mobile)
|
4165
|
4219
|
|
4166
|
4220
|
detail := &models.DocDetail{
|
4167
|
4221
|
UserName: item.UserName,
|
|
@@ -4205,7 +4259,7 @@ func (c *SZHisApiController) GetMedicalList() {
|
4205
|
4259
|
EndTime: 0,
|
4206
|
4260
|
}
|
4207
|
4261
|
result := service.SzybYS001(doctor_name, doctor_code, miConfig.Code, detail)
|
4208
|
|
- fmt.Println("reuslt9999999999999999", result)
|
|
4262
|
+
|
4209
|
4263
|
var dat map[string]interface{}
|
4210
|
4264
|
if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
4211
|
4265
|
fmt.Println(dat)
|
|
@@ -4218,7 +4272,10 @@ func (c *SZHisApiController) GetMedicalList() {
|
4218
|
4272
|
var res Result
|
4219
|
4273
|
if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
4220
|
4274
|
utils.ErrorLog("解析失败:%v", err)
|
4221
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
4275
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
4276
|
+ "failed_code": -10,
|
|
4277
|
+ "msg": res.Transreturnmessage,
|
|
4278
|
+ })
|
4222
|
4279
|
return
|
4223
|
4280
|
}
|
4224
|
4281
|
if res.Transreturncode == "00000000" {
|
|
@@ -4236,6 +4293,11 @@ func (c *SZHisApiController) GetMedicalList() {
|
4236
|
4293
|
return
|
4237
|
4294
|
}
|
4238
|
4295
|
fmt.Println(isSuccess)
|
|
4296
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
4297
|
+ "failed_code": -10,
|
|
4298
|
+ "msg": res.Transreturnmessage,
|
|
4299
|
+ })
|
|
4300
|
+ return
|
4239
|
4301
|
}
|
4240
|
4302
|
}
|
4241
|
4303
|
|
|
@@ -4262,7 +4324,6 @@ func (c *SZHisApiController) GetMedicalList() {
|
4262
|
4324
|
|
4263
|
4325
|
var isSuccess bool = true
|
4264
|
4326
|
for _, item := range list {
|
4265
|
|
- fmt.Println("医护类别", item.Name)
|
4266
|
4327
|
detail := &models.DocDetail{
|
4267
|
4328
|
UserName: item.UserName,
|
4268
|
4329
|
RoleId: item.Name,
|
|
@@ -4305,7 +4366,7 @@ func (c *SZHisApiController) GetMedicalList() {
|
4305
|
4366
|
EndTime: 0,
|
4306
|
4367
|
}
|
4307
|
4368
|
result := service.SzybYS002(doctor_name, doctor_code, miConfig.Code, detail)
|
4308
|
|
- fmt.Println("reuslt9999999999999999", result)
|
|
4369
|
+
|
4309
|
4370
|
var dat map[string]interface{}
|
4310
|
4371
|
if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
4311
|
4372
|
fmt.Println(dat)
|
|
@@ -4318,7 +4379,10 @@ func (c *SZHisApiController) GetMedicalList() {
|
4318
|
4379
|
var res Result
|
4319
|
4380
|
if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
4320
|
4381
|
utils.ErrorLog("解析失败:%v", err)
|
4321
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
4382
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
4383
|
+ "failed_code": -10,
|
|
4384
|
+ "msg": res.Transreturnmessage,
|
|
4385
|
+ })
|
4322
|
4386
|
return
|
4323
|
4387
|
}
|
4324
|
4388
|
if res.Transreturncode == "00000000" {
|
|
@@ -4335,6 +4399,11 @@ func (c *SZHisApiController) GetMedicalList() {
|
4335
|
4399
|
return
|
4336
|
4400
|
}
|
4337
|
4401
|
fmt.Println(isSuccess)
|
|
4402
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
4403
|
+ "failed_code": -10,
|
|
4404
|
+ "msg": res.Transreturnmessage,
|
|
4405
|
+ })
|
|
4406
|
+ return
|
4338
|
4407
|
|
4339
|
4408
|
}
|
4340
|
4409
|
}
|
|
@@ -4387,7 +4456,7 @@ func (c *SZHisApiController) GetUpdateMedicalList() {
|
4387
|
4456
|
fmt.Println(list[start-1 : stop])
|
4388
|
4457
|
var customs []*models.DocDetail
|
4389
|
4458
|
for _, item := range list {
|
4390
|
|
- fmt.Println("医护类别", item.Name)
|
|
4459
|
+
|
4391
|
4460
|
detail := &models.DocDetail{
|
4392
|
4461
|
StaffCode: "",
|
4393
|
4462
|
UserName: item.UserName,
|
|
@@ -4399,7 +4468,7 @@ func (c *SZHisApiController) GetUpdateMedicalList() {
|
4399
|
4468
|
WorkMajorName: "",
|
4400
|
4469
|
Nation: "",
|
4401
|
4470
|
BirthDay: 20201022,
|
4402
|
|
- WorkTime: 12,
|
|
4471
|
+ WorkTime: 20201022,
|
4403
|
4472
|
Education: "",
|
4404
|
4473
|
StudyMajorName: "",
|
4405
|
4474
|
CertificateCode: "",
|
|
@@ -4423,17 +4492,17 @@ func (c *SZHisApiController) GetUpdateMedicalList() {
|
4423
|
4492
|
PostName: "",
|
4424
|
4493
|
TechnicalJobLevelCode: "",
|
4425
|
4494
|
IsActive: "",
|
4426
|
|
- PrescriptionQualificationIdentification: "",
|
4427
|
|
- IdentificationOutpatients: "",
|
4428
|
|
- OutpatientIllnessCategory: "",
|
4429
|
|
- StartTime: 1233,
|
4430
|
|
- EndTime: 123333,
|
|
4495
|
+ PrescriptionQualificationIdentification: "",
|
|
4496
|
+ IdentificationOutpatients: "",
|
|
4497
|
+ OutpatientIllnessCategory: "",
|
|
4498
|
+ StartTime: 20201022,
|
|
4499
|
+ EndTime: 20201022,
|
4431
|
4500
|
}
|
4432
|
4501
|
customs = append(customs, detail)
|
4433
|
4502
|
}
|
4434
|
4503
|
|
4435
|
4504
|
result := service.SzybYS003(doctor_name, doctor_code, miConfig.Code, customs)
|
4436
|
|
- fmt.Println("reuslt9999999999999999", result)
|
|
4505
|
+
|
4437
|
4506
|
var dat map[string]interface{}
|
4438
|
4507
|
if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
4439
|
4508
|
fmt.Println(dat)
|
|
@@ -4446,7 +4515,10 @@ func (c *SZHisApiController) GetUpdateMedicalList() {
|
4446
|
4515
|
var res Result
|
4447
|
4516
|
if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
4448
|
4517
|
utils.ErrorLog("解析失败:%v", err)
|
4449
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
4518
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
4519
|
+ "failed_code": -10,
|
|
4520
|
+ "msg": res.Transreturnmessage,
|
|
4521
|
+ })
|
4450
|
4522
|
return
|
4451
|
4523
|
}
|
4452
|
4524
|
if res.Transreturncode == "00000000" {
|
|
@@ -4455,11 +4527,18 @@ func (c *SZHisApiController) GetUpdateMedicalList() {
|
4455
|
4527
|
isSuccess = false
|
4456
|
4528
|
|
4457
|
4529
|
|
4458
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorDrugPreSettleFaildParamWrong)
|
|
4530
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
4531
|
+ "failed_code": -10,
|
|
4532
|
+ "msg": res.Transreturnmessage,
|
|
4533
|
+ })
|
4459
|
4534
|
return
|
4460
|
4535
|
}
|
4461
|
4536
|
fmt.Println(isSuccess)
|
4462
|
|
-
|
|
4537
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
4538
|
+ "failed_code": -10,
|
|
4539
|
+ "msg": res.Transreturnmessage,
|
|
4540
|
+ })
|
|
4541
|
+ return
|
4463
|
4542
|
}
|
4464
|
4543
|
}
|
4465
|
4544
|
|
|
@@ -4469,7 +4548,7 @@ func (c *SZHisApiController) GetGoodsList() {
|
4469
|
4548
|
orgId := adminUserInfo.CurrentOrgId
|
4470
|
4549
|
|
4471
|
4550
|
ids := c.GetString("ids")
|
4472
|
|
- fmt.Println("ids2222222222", ids)
|
|
4551
|
+
|
4473
|
4552
|
admin_user_id, _ := c.GetInt64("admin_user_id")
|
4474
|
4553
|
roles, _ := service.GetAdminUserInfoByID(orgId, admin_user_id)
|
4475
|
4554
|
stringarr := strings.Split(ids, ",")
|
|
@@ -4481,7 +4560,7 @@ func (c *SZHisApiController) GetGoodsList() {
|
4481
|
4560
|
}
|
4482
|
4561
|
|
4483
|
4562
|
list, _ := service.GetBatchGoodInformationList(idss)
|
4484
|
|
- fmt.Println("list22222", list)
|
|
4563
|
+
|
4485
|
4564
|
|
4486
|
4565
|
miConfig, _ := service.FindMedicalInsuranceInfo(orgId)
|
4487
|
4566
|
var doctor_name string
|
|
@@ -4492,7 +4571,6 @@ func (c *SZHisApiController) GetGoodsList() {
|
4492
|
4571
|
|
4493
|
4572
|
var isSuccess bool = true
|
4494
|
4573
|
for _, item := range list {
|
4495
|
|
- fmt.Println("生产厂商", item.ManufacturerName)
|
4496
|
4574
|
detail := &models.XtGoodInformation{
|
4497
|
4575
|
GoodName: item.GoodName,
|
4498
|
4576
|
SocialSecurityDirectoryCode: item.SocialSecurityDirectoryCode,
|
|
@@ -4506,7 +4584,7 @@ func (c *SZHisApiController) GetGoodsList() {
|
4506
|
4584
|
}
|
4507
|
4585
|
|
4508
|
4586
|
result := service.SzybYML007(doctor_name, doctor_code, miConfig.Code, detail)
|
4509
|
|
- fmt.Println("reuslt8888", result)
|
|
4587
|
+ fmt.Println("reuslt", result)
|
4510
|
4588
|
var dat map[string]interface{}
|
4511
|
4589
|
if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
4512
|
4590
|
fmt.Println(dat)
|
|
@@ -4526,7 +4604,7 @@ func (c *SZHisApiController) GetGoodsList() {
|
4526
|
4604
|
|
4527
|
4605
|
|
4528
|
4606
|
_, err := service.UpdateGoodInformaitonByDetail(item.ID)
|
4529
|
|
- fmt.Println("err2222222", err)
|
|
4607
|
+ fmt.Println("err", err)
|
4530
|
4608
|
} else {
|
4531
|
4609
|
isSuccess = false
|
4532
|
4610
|
|
|
@@ -4538,6 +4616,11 @@ func (c *SZHisApiController) GetGoodsList() {
|
4538
|
4616
|
return
|
4539
|
4617
|
}
|
4540
|
4618
|
fmt.Println(isSuccess)
|
|
4619
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
4620
|
+ "failed_code": -10,
|
|
4621
|
+ "msg": res.Transreturnmessage,
|
|
4622
|
+ })
|
|
4623
|
+ return
|
4541
|
4624
|
}
|
4542
|
4625
|
}
|
4543
|
4626
|
|