|
@@ -100,6 +100,12 @@ func HisManagerApiRegistRouters() {
|
100
|
100
|
beego.Router("/api/4209", &HisApiController{}, "get:Get4209")
|
101
|
101
|
//
|
102
|
102
|
|
|
103
|
+ beego.Router("/api/allopatry/get", &HisApiController{}, "get:GetAllopatry")
|
|
104
|
+ beego.Router("/api/comfirmallopatry/post", &HisApiController{}, "post:ComfirmAllopatry")
|
|
105
|
+ beego.Router("/api/allopatry/refund", &HisApiController{}, "post:RefundAllopatry")
|
|
106
|
+
|
|
107
|
+ //beego.Router("/api/2205", &HisApiController{}, "get:Get2205")
|
|
108
|
+
|
103
|
109
|
}
|
104
|
110
|
|
105
|
111
|
func (c *HisApiController) Get2505() {
|
|
@@ -3066,6 +3072,12 @@ func (c *HisApiController) ReadCard() {
|
3066
|
3072
|
patient, _ := service.GetPatientByIDCard(id_card_no, miConfig.UserOrgId)
|
3067
|
3073
|
|
3068
|
3074
|
basStr := cardnum + "|" + cardCode + "|" + id_card_no + "|" + name
|
|
3075
|
+
|
|
3076
|
+ result2, requestLog2, errMsgLog2 := service.FJybidcomfirm(cardnum, miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, id_card_type, cardCode, certificates, miConfig.Url, miConfig.Cainfo, miConfig.AppSecret, miConfig.SignKey, miConfig.EncKey, patient.Name)
|
|
3077
|
+ fmt.Println(result2)
|
|
3078
|
+ fmt.Println(requestLog2)
|
|
3079
|
+ fmt.Println(errMsgLog2)
|
|
3080
|
+
|
3069
|
3081
|
result, requestLog, errMsgLog := service.FJyb1101(cardnum, miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, id_card_type, cardCode, certificates, miConfig.Url, miConfig.Cainfo, miConfig.AppSecret, miConfig.SignKey, miConfig.EncKey, patient.Name)
|
3070
|
3082
|
saveLog(result, requestLog, "1101", "获取人员信息")
|
3071
|
3083
|
fmt.Println(errMsgLog)
|
|
@@ -3432,7 +3444,7 @@ func (c *HisApiController) ReadCard() {
|
3432
|
3444
|
fmt.Println(cardNumber)
|
3433
|
3445
|
patient, _ := service.GetPatientByIDCard(basNumber, miConfig.UserOrgId)
|
3434
|
3446
|
|
3435
|
|
- result := service.Gdyb1101B(basNumber, miConfig.OrgName, roles.UserName, miConfig.Code, bas[0], miConfig.MdtrtareaAdmvs, miConfig.SecretKey, id_card_type, card_sn, certificates, patient.Name, cardNumber)
|
|
3447
|
+ result := service.Gdyb1101f(basNumber, miConfig.OrgName, roles.UserName, miConfig.Code, bas[0], miConfig.MdtrtareaAdmvs, miConfig.SecretKey, id_card_type, card_sn, certificates, patient.Name, cardNumber)
|
3436
|
3448
|
var dat map[string]interface{}
|
3437
|
3449
|
if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
3438
|
3450
|
fmt.Println(dat)
|
|
@@ -3500,7 +3512,7 @@ func (c *HisApiController) ReadCard() {
|
3500
|
3512
|
insutype = "310"
|
3501
|
3513
|
}
|
3502
|
3514
|
if len(insutypes) == 0 {
|
3503
|
|
- insutype = "390"
|
|
3515
|
+ insutype = "310"
|
3504
|
3516
|
}
|
3505
|
3517
|
for _, item := range rf {
|
3506
|
3518
|
if item.Insutype == insutype {
|
|
@@ -8358,7 +8370,7 @@ func (c *HisApiController) GetRegisterInfo() {
|
8358
|
8370
|
var result string
|
8359
|
8371
|
var requestLog string
|
8360
|
8372
|
if miConfig.UserOrgId == 10138 {
|
8361
|
|
- if id_card_type != 4 || id_card_type != 2 {
|
|
8373
|
+ if id_card_type != 4 || id_card_type != 1 {
|
8362
|
8374
|
var insa string
|
8363
|
8375
|
if len(patient.InsuplcAdmdvs) > 0 {
|
8364
|
8376
|
insa = patient.InsuplcAdmdvs
|
|
@@ -8857,6 +8869,45 @@ func (c *HisApiController) GetRegisterInfo() {
|
8857
|
8869
|
psn_info, _ := service.GetPsnByPatientId(id)
|
8858
|
8870
|
if id_card_type == 4 || id_card_type == 1 {
|
8859
|
8871
|
insuplc_admdvs_temp = psn_info.InsuplcAdmdvs
|
|
8872
|
+
|
|
8873
|
+ }
|
|
8874
|
+ var rf []*ResultFive
|
|
8875
|
+ json.Unmarshal([]byte(psn_info.Insuinfo), &rf)
|
|
8876
|
+ var insutypes []*ResultFive
|
|
8877
|
+ var insutype string
|
|
8878
|
+ var is390 int = 0
|
|
8879
|
+ var is310 int = 0
|
|
8880
|
+
|
|
8881
|
+ for _, item := range rf {
|
|
8882
|
+ if (item.Insutype == "390" && item.PsnInsuStas == "1") || (item.Insutype == "310" && item.PsnInsuStas == "1") {
|
|
8883
|
+ insutypes = append(insutypes, item)
|
|
8884
|
+ }
|
|
8885
|
+ }
|
|
8886
|
+
|
|
8887
|
+ if len(insutypes) == 1 {
|
|
8888
|
+ insutype = insutypes[0].Insutype
|
|
8889
|
+ insuplc_admdvs = insutypes[0].InsuplcAdmdvs
|
|
8890
|
+ } else {
|
|
8891
|
+ for _, i := range insutypes {
|
|
8892
|
+ if i.Insutype == "390" {
|
|
8893
|
+ is390 = 1
|
|
8894
|
+ }
|
|
8895
|
+
|
|
8896
|
+ if i.Insutype == "310" {
|
|
8897
|
+ is310 = 1
|
|
8898
|
+ }
|
|
8899
|
+ }
|
|
8900
|
+ }
|
|
8901
|
+ if is390 == 1 {
|
|
8902
|
+ insutype = "390"
|
|
8903
|
+ }
|
|
8904
|
+
|
|
8905
|
+ if is310 == 1 {
|
|
8906
|
+ insutype = "310"
|
|
8907
|
+ }
|
|
8908
|
+
|
|
8909
|
+ if len(insutypes) == 0 {
|
|
8910
|
+ insutype = "310"
|
8860
|
8911
|
}
|
8861
|
8912
|
|
8862
|
8913
|
result, requestLog := service.Gdyb2201A(PsnNo, insutype, IdCardNo, miConfig.OrgName, roles.UserName, ipt_otp_no, department.Name, miConfig.Code, department.Number, doctor_info.DoctorNumber, insuplc_admdvs_temp, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, id_card_type, doctor_info.UserName, record_time, psn_info.VerifyNumber)
|
|
@@ -9234,6 +9285,11 @@ func (c *HisApiController) GetUploadInfo() {
|
9234
|
9285
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
9235
|
9286
|
return
|
9236
|
9287
|
}
|
|
9288
|
+
|
|
9289
|
+ result2, src_request, _ := service.FJyb2205(his.PsnNo, his.Number, "0000", miConfig.OrgName, roles.UserName, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, miConfig.Code, miConfig.Url, miConfig.Code, miConfig.AppSecret, miConfig.SignKey, miConfig.EncKey)
|
|
9290
|
+ fmt.Println(result2)
|
|
9291
|
+ fmt.Println(src_request)
|
|
9292
|
+
|
9237
|
9293
|
} else {
|
9238
|
9294
|
if miConfig.MdtrtareaAdmvs == "440781" { //
|
9239
|
9295
|
result, requestLog = service.Gdyb2203A(his.PsnNo, his.Number, doctor_info.UserName, department.Name, miConfig.OrgName, strconv.FormatInt(reg_type, 10), doctor_info.DoctorNumber, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, sickConfig.ContentCode, sickConfig.ClassName, roles.UserName, config, begin_time)
|
|
@@ -10059,6 +10115,7 @@ func (c *HisApiController) GetUploadInfo() {
|
10059
|
10115
|
order.CvlservFlag = res.Output.Setlinfo.CvlservFlag
|
10060
|
10116
|
order.SetlTime = res.Output.Setlinfo.SetlTime
|
10061
|
10117
|
order.MdtrtCertType = res.Output.Setlinfo.MdtrtCertType
|
|
10118
|
+
|
10062
|
10119
|
if res.Output.Setlinfo.MedType == "140101" {
|
10063
|
10120
|
order.MedType = "14"
|
10064
|
10121
|
|
|
@@ -10562,6 +10619,14 @@ func (c *HisApiController) GetUploadInfo() {
|
10562
|
10619
|
order.CvlservFlag = res.Output.Setlinfo.CvlservFlag
|
10563
|
10620
|
order.SetlTime = res.Output.Setlinfo.SetlTime
|
10564
|
10621
|
order.MdtrtCertType = res.Output.Setlinfo.MdtrtCertType
|
|
10622
|
+ order.PayWays = pay_ways
|
|
10623
|
+ order.AcctUsedFlag = acct_used_flag
|
|
10624
|
+ order.WechatPay = wechat_pay
|
|
10625
|
+ order.AliPay = ali_pay
|
|
10626
|
+ order.JifenPay = jifen_pay
|
|
10627
|
+ order.BandCardPay = band_card_pay
|
|
10628
|
+ order.CashPay = cash_pay
|
|
10629
|
+ order.OthDesc = oth_desc
|
10565
|
10630
|
//order.MedType = res.Output.Setlinfo.MedType
|
10566
|
10631
|
if reg_type == 1112 {
|
10567
|
10632
|
order.MedType = "1112"
|
|
@@ -13428,7 +13493,7 @@ func (c *HisApiController) GetCheckAccount() {
|
13428
|
13493
|
}
|
13429
|
13494
|
api := "http://172.16.13.254:9532/" + "nmyb/3201?" +
|
13430
|
13495
|
"insutype=" + insutype +
|
13431
|
|
- "&clr_type=" + "51" +
|
|
13496
|
+ "&clr_type=" + clr_type +
|
13432
|
13497
|
"&setl_optins=" + clr_org +
|
13433
|
13498
|
"&stmt_begndate=" + start_time +
|
13434
|
13499
|
"&stm_enddate=" + end_time +
|
|
@@ -15969,123 +16034,132 @@ func (c *HisApiController) ReversalData() {
|
15969
|
16034
|
}
|
15970
|
16035
|
}
|
15971
|
16036
|
|
15972
|
|
-//func (c *HisApiController) GetAllopatry() {
|
15973
|
|
-// year := c.GetString("year")
|
15974
|
|
-// month := c.GetString("month")
|
15975
|
|
-// admin_user_id, _ := c.GetInt64("admin_user_id")
|
15976
|
|
-// adminUser := c.GetAdminUserInfo()
|
15977
|
|
-// miConfig, _ := service.FindMedicalInsuranceInfo(adminUser.CurrentOrgId)
|
15978
|
|
-// roles, _ := service.GetAdminUserInfoByID(adminUser.CurrentOrgId, admin_user_id)
|
15979
|
|
-// result, _ := service.Gdyb9001(miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, 1669)
|
15980
|
|
-//
|
15981
|
|
-// var dat map[string]interface{}
|
15982
|
|
-// if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
15983
|
|
-// fmt.Println(dat)
|
15984
|
|
-// } else {
|
15985
|
|
-// fmt.Println(err)
|
15986
|
|
-// }
|
15987
|
|
-// userJSONBytes, _ := json.Marshal(dat)
|
15988
|
|
-// var res models.Result9001
|
15989
|
|
-// if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
15990
|
|
-// utils.ErrorLog("解析失败:%v", err)
|
15991
|
|
-// c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
15992
|
|
-// return
|
15993
|
|
-// }
|
15994
|
|
-//
|
15995
|
|
-// result2, _ := service.Gdyb3260(miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, year, month, res.Output.Signinoutb.SignNo)
|
15996
|
|
-// var dat2 map[string]interface{}
|
15997
|
|
-// if err := json.Unmarshal([]byte(result2), &dat2); err == nil {
|
15998
|
|
-// fmt.Println(dat)
|
15999
|
|
-// } else {
|
16000
|
|
-// fmt.Println(err)
|
16001
|
|
-// }
|
16002
|
|
-// userJSONBytes2, _ := json.Marshal(dat2)
|
16003
|
|
-// var res2 models.Result3260
|
16004
|
|
-// if err := json.Unmarshal(userJSONBytes2, &res2); err != nil {
|
16005
|
|
-// utils.ErrorLog("解析失败:%v", err)
|
16006
|
|
-// c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
16007
|
|
-// return
|
16008
|
|
-// }
|
16009
|
|
-// if res2.Infcode == 0 {
|
16010
|
|
-// c.ServeSuccessJSON(map[string]interface{}{
|
16011
|
|
-// "list": res2.Output.Data,
|
16012
|
|
-// })
|
16013
|
|
-// return
|
16014
|
|
-// } else {
|
16015
|
|
-// c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
16016
|
|
-// return
|
16017
|
|
-// }
|
16018
|
|
-//
|
16019
|
|
-//}
|
|
16037
|
+func (c *HisApiController) GetAllopatry() {
|
|
16038
|
+ year := c.GetString("year")
|
|
16039
|
+ month := c.GetString("month")
|
|
16040
|
+ admin_user_id, _ := c.GetInt64("admin_user_id")
|
|
16041
|
+ adminUser := c.GetAdminUserInfo()
|
|
16042
|
+ miConfig, _ := service.FindMedicalInsuranceInfo(adminUser.CurrentOrgId)
|
|
16043
|
+ roles, _ := service.GetAdminUserInfoByID(adminUser.CurrentOrgId, admin_user_id)
|
|
16044
|
+ result, _ := service.Gdyb9001Two(miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, admin_user_id)
|
16020
|
16045
|
|
16021
|
|
-//func (c *HisApiController) ComfirmAllopatry() {
|
16022
|
|
-// year := c.GetString("year")
|
16023
|
|
-// month := c.GetString("month")
|
16024
|
|
-// admin_user_id, _ := c.GetInt64("admin_user_id")
|
16025
|
|
-// adminUser := c.GetAdminUserInfo()
|
16026
|
|
-// miConfig, _ := service.FindMedicalInsuranceInfo(adminUser.CurrentOrgId)
|
16027
|
|
-// roles, _ := service.GetAdminUserInfoByID(adminUser.CurrentOrgId, admin_user_id)
|
16028
|
|
-// result, _ := service.Gdyb9001(miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, 1669)
|
16029
|
|
-// var dat map[string]interface{}
|
16030
|
|
-// if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
16031
|
|
-// fmt.Println(dat)
|
16032
|
|
-// } else {
|
16033
|
|
-// fmt.Println(err)
|
16034
|
|
-// }
|
16035
|
|
-// userJSONBytes, _ := json.Marshal(dat)
|
16036
|
|
-// var res models.Result9001
|
16037
|
|
-// if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
16038
|
|
-// utils.ErrorLog("解析失败:%v", err)
|
16039
|
|
-// c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
16040
|
|
-// return
|
16041
|
|
-// }
|
16042
|
|
-//
|
16043
|
|
-// result2, _ := service.Gdyb3260(miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, year, month, res.Output.Signinoutb.SignNo)
|
16044
|
|
-// var dat2 map[string]interface{}
|
16045
|
|
-// if err := json.Unmarshal([]byte(result2), &dat2); err == nil {
|
16046
|
|
-// fmt.Println(dat)
|
16047
|
|
-// } else {
|
16048
|
|
-// fmt.Println(err)
|
16049
|
|
-// }
|
16050
|
|
-// userJSONBytes2, _ := json.Marshal(dat2)
|
16051
|
|
-// var res2 models.Result3260
|
16052
|
|
-// if err := json.Unmarshal(userJSONBytes2, &res2); err != nil {
|
16053
|
|
-// utils.ErrorLog("解析失败:%v", err)
|
16054
|
|
-// c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
16055
|
|
-// return
|
16056
|
|
-// }
|
16057
|
|
-//
|
16058
|
|
-// if res2.Infcode == 0 {
|
16059
|
|
-// result, _, msgId := service.Gdyb3261(miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, year, month, res2)
|
16060
|
|
-// var dat map[string]interface{}
|
16061
|
|
-// if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
16062
|
|
-// fmt.Println(dat)
|
16063
|
|
-// } else {
|
16064
|
|
-// fmt.Println(err)
|
16065
|
|
-// }
|
16066
|
|
-// userJSONBytes, _ := json.Marshal(dat)
|
16067
|
|
-// var res3 models.Result3261
|
16068
|
|
-// if err := json.Unmarshal(userJSONBytes, &res3); err != nil {
|
16069
|
|
-// utils.ErrorLog("解析失败:%v", err)
|
16070
|
|
-// c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
16071
|
|
-// return
|
16072
|
|
-// }
|
16073
|
|
-//
|
16074
|
|
-// if res3.Infcode == 0 {
|
16075
|
|
-// record := &models.HisYidiClearRecord{
|
16076
|
|
-// UserOrgId: c.GetAdminUserInfo().CurrentOrgId,
|
16077
|
|
-// Ctime: time.Now().Unix(),
|
16078
|
|
-// Mtime: time.Now().Unix(),
|
16079
|
|
-// Status: 1,
|
16080
|
|
-// MsgId: msgId,
|
16081
|
|
-// }
|
16082
|
|
-// service.SaveClearRecord(record)
|
16083
|
|
-// c.ServeSuccessJSON(map[string]interface{}{
|
16084
|
|
-// "msg": "提取成功",
|
16085
|
|
-// })
|
16086
|
|
-// }
|
16087
|
|
-// }
|
16088
|
|
-//}
|
|
16046
|
+ var dat map[string]interface{}
|
|
16047
|
+ if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
|
16048
|
+ fmt.Println(dat)
|
|
16049
|
+ } else {
|
|
16050
|
+ fmt.Println(err)
|
|
16051
|
+ }
|
|
16052
|
+ userJSONBytes, _ := json.Marshal(dat)
|
|
16053
|
+ var res models.Result9001
|
|
16054
|
+ if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
16055
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
16056
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
16057
|
+ return
|
|
16058
|
+ }
|
|
16059
|
+ fmt.Println(res.Output.Signinoutb)
|
|
16060
|
+ fmt.Println(res.Output.Signinoutb.SignNo)
|
|
16061
|
+ fmt.Println(string(userJSONBytes))
|
|
16062
|
+
|
|
16063
|
+ result2, _ := service.Gdyb3260(miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, year, month, res.Output.Signinoutb.SignNo)
|
|
16064
|
+ var dat2 map[string]interface{}
|
|
16065
|
+ if err := json.Unmarshal([]byte(result2), &dat2); err == nil {
|
|
16066
|
+ fmt.Println(dat)
|
|
16067
|
+ } else {
|
|
16068
|
+ fmt.Println(err)
|
|
16069
|
+ }
|
|
16070
|
+ userJSONBytes2, _ := json.Marshal(dat2)
|
|
16071
|
+ var res2 models.Result3260
|
|
16072
|
+ if err := json.Unmarshal(userJSONBytes2, &res2); err != nil {
|
|
16073
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
16074
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
16075
|
+ return
|
|
16076
|
+ }
|
|
16077
|
+ if res2.Infcode == 0 {
|
|
16078
|
+ result3, _, _ := service.Gdyb3261(miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, year, month, res2)
|
|
16079
|
+ var dat2 map[string]interface{}
|
|
16080
|
+ if err := json.Unmarshal([]byte(result3), &dat2); err == nil {
|
|
16081
|
+ fmt.Println(dat)
|
|
16082
|
+ } else {
|
|
16083
|
+ fmt.Println(err)
|
|
16084
|
+ }
|
|
16085
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
16086
|
+ "list": res2.Output.Data,
|
|
16087
|
+ })
|
|
16088
|
+ return
|
|
16089
|
+ } else {
|
|
16090
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
16091
|
+ return
|
|
16092
|
+ }
|
|
16093
|
+}
|
|
16094
|
+
|
|
16095
|
+func (c *HisApiController) ComfirmAllopatry() {
|
|
16096
|
+ year := c.GetString("year")
|
|
16097
|
+ month := c.GetString("month")
|
|
16098
|
+ admin_user_id, _ := c.GetInt64("admin_user_id")
|
|
16099
|
+ adminUser := c.GetAdminUserInfo()
|
|
16100
|
+ miConfig, _ := service.FindMedicalInsuranceInfo(adminUser.CurrentOrgId)
|
|
16101
|
+ roles, _ := service.GetAdminUserInfoByID(adminUser.CurrentOrgId, admin_user_id)
|
|
16102
|
+ result, _ := service.Gdyb9001Two(miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, admin_user_id)
|
|
16103
|
+ var dat map[string]interface{}
|
|
16104
|
+ if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
|
16105
|
+ fmt.Println(dat)
|
|
16106
|
+ } else {
|
|
16107
|
+ fmt.Println(err)
|
|
16108
|
+ }
|
|
16109
|
+ userJSONBytes, _ := json.Marshal(dat)
|
|
16110
|
+ var res models.Result9001
|
|
16111
|
+ if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
16112
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
16113
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
16114
|
+ return
|
|
16115
|
+ }
|
|
16116
|
+
|
|
16117
|
+ result2, _ := service.Gdyb3260(miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, year, month, res.Output.Signinoutb.SignNo)
|
|
16118
|
+ var dat2 map[string]interface{}
|
|
16119
|
+ if err := json.Unmarshal([]byte(result2), &dat2); err == nil {
|
|
16120
|
+ fmt.Println(dat)
|
|
16121
|
+ } else {
|
|
16122
|
+ fmt.Println(err)
|
|
16123
|
+ }
|
|
16124
|
+ userJSONBytes2, _ := json.Marshal(dat2)
|
|
16125
|
+ var res2 models.Result3260
|
|
16126
|
+ if err := json.Unmarshal(userJSONBytes2, &res2); err != nil {
|
|
16127
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
16128
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
16129
|
+ return
|
|
16130
|
+ }
|
|
16131
|
+
|
|
16132
|
+ if res2.Infcode == 0 {
|
|
16133
|
+ result, _, msgId := service.Gdyb3261(miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, year, month, res2)
|
|
16134
|
+ var dat map[string]interface{}
|
|
16135
|
+ if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
|
16136
|
+ fmt.Println(dat)
|
|
16137
|
+ } else {
|
|
16138
|
+ fmt.Println(err)
|
|
16139
|
+ }
|
|
16140
|
+ userJSONBytes, _ := json.Marshal(dat)
|
|
16141
|
+ var res3 models.Result3261
|
|
16142
|
+ if err := json.Unmarshal(userJSONBytes, &res3); err != nil {
|
|
16143
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
16144
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
16145
|
+ return
|
|
16146
|
+ }
|
|
16147
|
+
|
|
16148
|
+ if res3.Infcode == 0 {
|
|
16149
|
+ record := &models.HisYidiClearRecord{
|
|
16150
|
+ UserOrgId: c.GetAdminUserInfo().CurrentOrgId,
|
|
16151
|
+ Ctime: time.Now().Unix(),
|
|
16152
|
+ Mtime: time.Now().Unix(),
|
|
16153
|
+ Status: 1,
|
|
16154
|
+ MsgId: msgId,
|
|
16155
|
+ }
|
|
16156
|
+ service.SaveClearRecord(record)
|
|
16157
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
16158
|
+ "msg": "提取成功",
|
|
16159
|
+ })
|
|
16160
|
+ }
|
|
16161
|
+ }
|
|
16162
|
+}
|
16089
|
16163
|
|
16090
|
16164
|
func (c *HisApiController) RefundAllopatry() {
|
16091
|
16165
|
year := c.GetString("year")
|