|
@@ -85,6 +85,8 @@ func HisManagerApiRegistRouters() {
|
85
|
85
|
|
86
|
86
|
beego.Router("/api/3202", &HisApiController{}, "get:Post3202")
|
87
|
87
|
|
|
88
|
+ beego.Router("/api/3501", &HisApiController{}, "post:Post3501")
|
|
89
|
+
|
88
|
90
|
}
|
89
|
91
|
|
90
|
92
|
type Result3101 struct {
|
|
@@ -13270,3 +13272,550 @@ func (c *HisApiController) Post3202() {
|
13270
|
13272
|
}
|
13271
|
13273
|
}
|
13272
|
13274
|
}
|
|
13275
|
+
|
|
13276
|
+func (c *HisApiController) Post3501() {
|
|
13277
|
+ miConfig, _ := service.FindMedicalInsuranceInfo(c.GetAdminUserInfo().CurrentOrgId)
|
|
13278
|
+ data := make(map[string]interface{})
|
|
13279
|
+ var struct3501s []models.Struct3501
|
|
13280
|
+ var struct3501 models.Struct3501
|
|
13281
|
+ struct3501.OrgName = miConfig.OrgName
|
|
13282
|
+ struct3501.AccessKey = miConfig.AccessKey
|
|
13283
|
+ struct3501.RequestUrl = miConfig.Url
|
|
13284
|
+ struct3501.SecretKey = miConfig.SecretKey
|
|
13285
|
+ struct3501.ManuDate = "2022-08-17"
|
|
13286
|
+ struct3501.FixmedinsBchno = ""
|
|
13287
|
+ struct3501.ManuLotnum = ""
|
|
13288
|
+ struct3501.RxFlag = "0"
|
|
13289
|
+ struct3501.ExpyEnd = "2022-08-17"
|
|
13290
|
+ struct3501.Invdate = "2022-08-17"
|
|
13291
|
+ struct3501.InvCnt = "20.25"
|
|
13292
|
+ struct3501.Memo = ""
|
|
13293
|
+ struct3501.MedListCodg = "XB01ABD056B002020200517"
|
|
13294
|
+ struct3501.FixmedinsHilistId = miConfig.Code
|
|
13295
|
+ struct3501.FixmedinsHilistName = miConfig.OrgName
|
|
13296
|
+ struct3501s = append(struct3501s, struct3501)
|
|
13297
|
+ data["struct_3501s"] = struct3501s
|
|
13298
|
+ client := &http.Client{}
|
|
13299
|
+ bytesData, _ := json.Marshal(data)
|
|
13300
|
+ var req *http.Request
|
|
13301
|
+
|
|
13302
|
+ if miConfig.MdtrtareaAdmvs == "320921" {
|
|
13303
|
+ req, _ = http.NewRequest("POST", "http://192.168.2.110:9532/"+"jsyb/3501", bytes.NewReader(bytesData))
|
|
13304
|
+ } else {
|
|
13305
|
+ req, _ = http.NewRequest("POST", "http://192.168.5.251:9532/"+"jsyb/3501", bytes.NewReader(bytesData))
|
|
13306
|
+ }
|
|
13307
|
+
|
|
13308
|
+ resp, _ := client.Do(req)
|
|
13309
|
+ defer resp.Body.Close()
|
|
13310
|
+ body, ioErr := ioutil.ReadAll(resp.Body)
|
|
13311
|
+ if ioErr != nil {
|
|
13312
|
+ utils.ErrorLog("接口返回数据读取失败: %v", ioErr)
|
|
13313
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
13314
|
+ return
|
|
13315
|
+ }
|
|
13316
|
+ var respJSON map[string]interface{}
|
|
13317
|
+ if err := json.Unmarshal([]byte(body), &respJSON); err != nil {
|
|
13318
|
+ utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
|
|
13319
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
13320
|
+ return
|
|
13321
|
+ }
|
|
13322
|
+ var res ResultSix
|
|
13323
|
+ var resSix10265 ResultSix10265
|
|
13324
|
+
|
|
13325
|
+ respJSON = respJSON["data"].(map[string]interface{})["request_log"].(map[string]interface{})
|
|
13326
|
+ result, _ := json.Marshal(respJSON)
|
|
13327
|
+ if err := json.Unmarshal([]byte(result), &resSix10265); err != nil {
|
|
13328
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
13329
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
13330
|
+ return
|
|
13331
|
+ }
|
|
13332
|
+ res.InfRefmsgid = resSix10265.InfRefmsgid
|
|
13333
|
+ res.Output = resSix10265.Output
|
|
13334
|
+ res.ErrMsg = resSix10265.ErrMsg
|
|
13335
|
+ res.Cainfo = resSix10265.Cainfo
|
|
13336
|
+ res.WarnMsg = resSix10265.WarnMsg
|
|
13337
|
+ infocode, _ := strconv.ParseInt(resSix10265.Infcode, 10, 64)
|
|
13338
|
+ res.Infcode = infocode
|
|
13339
|
+
|
|
13340
|
+ if infocode == 0 {
|
|
13341
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
13342
|
+ "msg": "上传成功",
|
|
13343
|
+ })
|
|
13344
|
+ return
|
|
13345
|
+
|
|
13346
|
+ } else {
|
|
13347
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
13348
|
+ "failed_code": -10,
|
|
13349
|
+ "msg": res.ErrMsg,
|
|
13350
|
+ })
|
|
13351
|
+ return
|
|
13352
|
+ }
|
|
13353
|
+}
|
|
13354
|
+func (c *HisApiController) Post3502() {
|
|
13355
|
+ miConfig, _ := service.FindMedicalInsuranceInfo(c.GetAdminUserInfo().CurrentOrgId)
|
|
13356
|
+ data := make(map[string]interface{})
|
|
13357
|
+ var struct3502s []models.Struct3502
|
|
13358
|
+ var struct3502 models.Struct3502
|
|
13359
|
+ struct3502.OrgName = miConfig.OrgName
|
|
13360
|
+ struct3502.AccessKey = miConfig.AccessKey
|
|
13361
|
+ struct3502.RequestUrl = miConfig.Url
|
|
13362
|
+ struct3502.SecretKey = miConfig.SecretKey
|
|
13363
|
+ struct3502.ManuDate = "2022-08-15"
|
|
13364
|
+ struct3502.FixmedinsBchno = ""
|
|
13365
|
+ struct3502.ManuLotnum = ""
|
|
13366
|
+ struct3502.RxFlag = "0"
|
|
13367
|
+ struct3502.ExpyEnd = "2022-08-15"
|
|
13368
|
+ struct3502.Invdate = "2022-08-15"
|
|
13369
|
+ struct3502.InvCnt = "20.25"
|
|
13370
|
+ struct3502.Memo = ""
|
|
13371
|
+ struct3502.MedListCodg = "XB01ABD056B002020200517"
|
|
13372
|
+ struct3502.FixmedinsHilistId = miConfig.Code
|
|
13373
|
+ struct3502.FixmedinsHilistName = miConfig.OrgName
|
|
13374
|
+ struct3502s = append(struct3502s, struct3502)
|
|
13375
|
+ data["struct_3502s"] = struct3502s
|
|
13376
|
+ client := &http.Client{}
|
|
13377
|
+ bytesData, _ := json.Marshal(data)
|
|
13378
|
+ var req *http.Request
|
|
13379
|
+
|
|
13380
|
+ if miConfig.MdtrtareaAdmvs == "320921" {
|
|
13381
|
+ req, _ = http.NewRequest("POST", "http://192.168.2.110:9532/"+"jsyb/3501", bytes.NewReader(bytesData))
|
|
13382
|
+ } else {
|
|
13383
|
+ req, _ = http.NewRequest("POST", "http://192.168.5.251:9532/"+"jsyb/3501", bytes.NewReader(bytesData))
|
|
13384
|
+ }
|
|
13385
|
+
|
|
13386
|
+ resp, _ := client.Do(req)
|
|
13387
|
+ defer resp.Body.Close()
|
|
13388
|
+ body, ioErr := ioutil.ReadAll(resp.Body)
|
|
13389
|
+ if ioErr != nil {
|
|
13390
|
+ utils.ErrorLog("接口返回数据读取失败: %v", ioErr)
|
|
13391
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
13392
|
+ return
|
|
13393
|
+ }
|
|
13394
|
+ var respJSON map[string]interface{}
|
|
13395
|
+ if err := json.Unmarshal([]byte(body), &respJSON); err != nil {
|
|
13396
|
+ utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
|
|
13397
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
13398
|
+ return
|
|
13399
|
+ }
|
|
13400
|
+ var res ResultSix
|
|
13401
|
+ var resSix10265 ResultSix10265
|
|
13402
|
+
|
|
13403
|
+ respJSON = respJSON["data"].(map[string]interface{})["request_log"].(map[string]interface{})
|
|
13404
|
+ result, _ := json.Marshal(respJSON)
|
|
13405
|
+ if err := json.Unmarshal([]byte(result), &resSix10265); err != nil {
|
|
13406
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
13407
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
13408
|
+ return
|
|
13409
|
+ }
|
|
13410
|
+ res.InfRefmsgid = resSix10265.InfRefmsgid
|
|
13411
|
+ res.Output = resSix10265.Output
|
|
13412
|
+ res.ErrMsg = resSix10265.ErrMsg
|
|
13413
|
+ res.Cainfo = resSix10265.Cainfo
|
|
13414
|
+ res.WarnMsg = resSix10265.WarnMsg
|
|
13415
|
+ infocode, _ := strconv.ParseInt(resSix10265.Infcode, 10, 64)
|
|
13416
|
+ res.Infcode = infocode
|
|
13417
|
+
|
|
13418
|
+ if infocode == 0 {
|
|
13419
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
13420
|
+ "msg": "上传成功",
|
|
13421
|
+ })
|
|
13422
|
+ return
|
|
13423
|
+
|
|
13424
|
+ } else {
|
|
13425
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
13426
|
+ "failed_code": -10,
|
|
13427
|
+ "msg": res.ErrMsg,
|
|
13428
|
+ })
|
|
13429
|
+ return
|
|
13430
|
+ }
|
|
13431
|
+}
|
|
13432
|
+func (c *HisApiController) Post3503() {
|
|
13433
|
+ miConfig, _ := service.FindMedicalInsuranceInfo(c.GetAdminUserInfo().CurrentOrgId)
|
|
13434
|
+ data := make(map[string]interface{})
|
|
13435
|
+ var struct3501s []models.Struct3501
|
|
13436
|
+ var struct3501 models.Struct3501
|
|
13437
|
+ struct3501.OrgName = miConfig.OrgName
|
|
13438
|
+ struct3501.AccessKey = miConfig.AccessKey
|
|
13439
|
+ struct3501.RequestUrl = miConfig.Url
|
|
13440
|
+ struct3501.SecretKey = miConfig.SecretKey
|
|
13441
|
+ struct3501.ManuDate = "2022-08-15"
|
|
13442
|
+ struct3501.FixmedinsBchno = ""
|
|
13443
|
+ struct3501.ManuLotnum = ""
|
|
13444
|
+ struct3501.RxFlag = "0"
|
|
13445
|
+ struct3501.ExpyEnd = "2022-08-15"
|
|
13446
|
+ struct3501.Invdate = "2022-08-15"
|
|
13447
|
+ struct3501.InvCnt = "20.25"
|
|
13448
|
+ struct3501.Memo = ""
|
|
13449
|
+ struct3501.MedListCodg = "XB01ABD056B002020200517"
|
|
13450
|
+ struct3501.FixmedinsHilistId = miConfig.Code
|
|
13451
|
+ struct3501.FixmedinsHilistName = miConfig.OrgName
|
|
13452
|
+ struct3501s = append(struct3501s, struct3501)
|
|
13453
|
+ data["struct_3501s"] = struct3501s
|
|
13454
|
+ client := &http.Client{}
|
|
13455
|
+ bytesData, _ := json.Marshal(data)
|
|
13456
|
+ var req *http.Request
|
|
13457
|
+
|
|
13458
|
+ if miConfig.MdtrtareaAdmvs == "320921" {
|
|
13459
|
+ req, _ = http.NewRequest("POST", "http://192.168.2.110:9532/"+"jsyb/3501", bytes.NewReader(bytesData))
|
|
13460
|
+ } else {
|
|
13461
|
+ req, _ = http.NewRequest("POST", "http://192.168.5.251:9532/"+"jsyb/3501", bytes.NewReader(bytesData))
|
|
13462
|
+ }
|
|
13463
|
+
|
|
13464
|
+ resp, _ := client.Do(req)
|
|
13465
|
+ defer resp.Body.Close()
|
|
13466
|
+ body, ioErr := ioutil.ReadAll(resp.Body)
|
|
13467
|
+ if ioErr != nil {
|
|
13468
|
+ utils.ErrorLog("接口返回数据读取失败: %v", ioErr)
|
|
13469
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
13470
|
+ return
|
|
13471
|
+ }
|
|
13472
|
+ var respJSON map[string]interface{}
|
|
13473
|
+ if err := json.Unmarshal([]byte(body), &respJSON); err != nil {
|
|
13474
|
+ utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
|
|
13475
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
13476
|
+ return
|
|
13477
|
+ }
|
|
13478
|
+ var res ResultSix
|
|
13479
|
+ var resSix10265 ResultSix10265
|
|
13480
|
+
|
|
13481
|
+ respJSON = respJSON["data"].(map[string]interface{})["request_log"].(map[string]interface{})
|
|
13482
|
+ result, _ := json.Marshal(respJSON)
|
|
13483
|
+ if err := json.Unmarshal([]byte(result), &resSix10265); err != nil {
|
|
13484
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
13485
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
13486
|
+ return
|
|
13487
|
+ }
|
|
13488
|
+ res.InfRefmsgid = resSix10265.InfRefmsgid
|
|
13489
|
+ res.Output = resSix10265.Output
|
|
13490
|
+ res.ErrMsg = resSix10265.ErrMsg
|
|
13491
|
+ res.Cainfo = resSix10265.Cainfo
|
|
13492
|
+ res.WarnMsg = resSix10265.WarnMsg
|
|
13493
|
+ infocode, _ := strconv.ParseInt(resSix10265.Infcode, 10, 64)
|
|
13494
|
+ res.Infcode = infocode
|
|
13495
|
+
|
|
13496
|
+ if infocode == 0 {
|
|
13497
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
13498
|
+ "msg": "上传成功",
|
|
13499
|
+ })
|
|
13500
|
+ return
|
|
13501
|
+
|
|
13502
|
+ } else {
|
|
13503
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
13504
|
+ "failed_code": -10,
|
|
13505
|
+ "msg": res.ErrMsg,
|
|
13506
|
+ })
|
|
13507
|
+ return
|
|
13508
|
+ }
|
|
13509
|
+}
|
|
13510
|
+func (c *HisApiController) Post3504() {
|
|
13511
|
+ miConfig, _ := service.FindMedicalInsuranceInfo(c.GetAdminUserInfo().CurrentOrgId)
|
|
13512
|
+ data := make(map[string]interface{})
|
|
13513
|
+ var struct3501s []models.Struct3501
|
|
13514
|
+ var struct3501 models.Struct3501
|
|
13515
|
+ struct3501.OrgName = miConfig.OrgName
|
|
13516
|
+ struct3501.AccessKey = miConfig.AccessKey
|
|
13517
|
+ struct3501.RequestUrl = miConfig.Url
|
|
13518
|
+ struct3501.SecretKey = miConfig.SecretKey
|
|
13519
|
+ struct3501.ManuDate = "2022-08-15"
|
|
13520
|
+ struct3501.FixmedinsBchno = ""
|
|
13521
|
+ struct3501.ManuLotnum = ""
|
|
13522
|
+ struct3501.RxFlag = "0"
|
|
13523
|
+ struct3501.ExpyEnd = "2022-08-15"
|
|
13524
|
+ struct3501.Invdate = "2022-08-15"
|
|
13525
|
+ struct3501.InvCnt = "20.25"
|
|
13526
|
+ struct3501.Memo = ""
|
|
13527
|
+ struct3501.MedListCodg = "XB01ABD056B002020200517"
|
|
13528
|
+ struct3501.FixmedinsHilistId = miConfig.Code
|
|
13529
|
+ struct3501.FixmedinsHilistName = miConfig.OrgName
|
|
13530
|
+ struct3501s = append(struct3501s, struct3501)
|
|
13531
|
+ data["struct_3501s"] = struct3501s
|
|
13532
|
+ client := &http.Client{}
|
|
13533
|
+ bytesData, _ := json.Marshal(data)
|
|
13534
|
+ var req *http.Request
|
|
13535
|
+
|
|
13536
|
+ if miConfig.MdtrtareaAdmvs == "320921" {
|
|
13537
|
+ req, _ = http.NewRequest("POST", "http://192.168.2.110:9532/"+"jsyb/3501", bytes.NewReader(bytesData))
|
|
13538
|
+ } else {
|
|
13539
|
+ req, _ = http.NewRequest("POST", "http://192.168.5.251:9532/"+"jsyb/3501", bytes.NewReader(bytesData))
|
|
13540
|
+ }
|
|
13541
|
+
|
|
13542
|
+ resp, _ := client.Do(req)
|
|
13543
|
+ defer resp.Body.Close()
|
|
13544
|
+ body, ioErr := ioutil.ReadAll(resp.Body)
|
|
13545
|
+ if ioErr != nil {
|
|
13546
|
+ utils.ErrorLog("接口返回数据读取失败: %v", ioErr)
|
|
13547
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
13548
|
+ return
|
|
13549
|
+ }
|
|
13550
|
+ var respJSON map[string]interface{}
|
|
13551
|
+ if err := json.Unmarshal([]byte(body), &respJSON); err != nil {
|
|
13552
|
+ utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
|
|
13553
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
13554
|
+ return
|
|
13555
|
+ }
|
|
13556
|
+ var res ResultSix
|
|
13557
|
+ var resSix10265 ResultSix10265
|
|
13558
|
+
|
|
13559
|
+ respJSON = respJSON["data"].(map[string]interface{})["request_log"].(map[string]interface{})
|
|
13560
|
+ result, _ := json.Marshal(respJSON)
|
|
13561
|
+ if err := json.Unmarshal([]byte(result), &resSix10265); err != nil {
|
|
13562
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
13563
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
13564
|
+ return
|
|
13565
|
+ }
|
|
13566
|
+ res.InfRefmsgid = resSix10265.InfRefmsgid
|
|
13567
|
+ res.Output = resSix10265.Output
|
|
13568
|
+ res.ErrMsg = resSix10265.ErrMsg
|
|
13569
|
+ res.Cainfo = resSix10265.Cainfo
|
|
13570
|
+ res.WarnMsg = resSix10265.WarnMsg
|
|
13571
|
+ infocode, _ := strconv.ParseInt(resSix10265.Infcode, 10, 64)
|
|
13572
|
+ res.Infcode = infocode
|
|
13573
|
+
|
|
13574
|
+ if infocode == 0 {
|
|
13575
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
13576
|
+ "msg": "上传成功",
|
|
13577
|
+ })
|
|
13578
|
+ return
|
|
13579
|
+
|
|
13580
|
+ } else {
|
|
13581
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
13582
|
+ "failed_code": -10,
|
|
13583
|
+ "msg": res.ErrMsg,
|
|
13584
|
+ })
|
|
13585
|
+ return
|
|
13586
|
+ }
|
|
13587
|
+}
|
|
13588
|
+func (c *HisApiController) Post3505() {
|
|
13589
|
+ miConfig, _ := service.FindMedicalInsuranceInfo(c.GetAdminUserInfo().CurrentOrgId)
|
|
13590
|
+ data := make(map[string]interface{})
|
|
13591
|
+ var struct3501s []models.Struct3501
|
|
13592
|
+ var struct3501 models.Struct3501
|
|
13593
|
+ struct3501.OrgName = miConfig.OrgName
|
|
13594
|
+ struct3501.AccessKey = miConfig.AccessKey
|
|
13595
|
+ struct3501.RequestUrl = miConfig.Url
|
|
13596
|
+ struct3501.SecretKey = miConfig.SecretKey
|
|
13597
|
+ struct3501.ManuDate = "2022-08-15"
|
|
13598
|
+ struct3501.FixmedinsBchno = ""
|
|
13599
|
+ struct3501.ManuLotnum = ""
|
|
13600
|
+ struct3501.RxFlag = "0"
|
|
13601
|
+ struct3501.ExpyEnd = "2022-08-15"
|
|
13602
|
+ struct3501.Invdate = "2022-08-15"
|
|
13603
|
+ struct3501.InvCnt = "20.25"
|
|
13604
|
+ struct3501.Memo = ""
|
|
13605
|
+ struct3501.MedListCodg = "XB01ABD056B002020200517"
|
|
13606
|
+ struct3501.FixmedinsHilistId = miConfig.Code
|
|
13607
|
+ struct3501.FixmedinsHilistName = miConfig.OrgName
|
|
13608
|
+ struct3501s = append(struct3501s, struct3501)
|
|
13609
|
+ data["struct_3501s"] = struct3501s
|
|
13610
|
+ client := &http.Client{}
|
|
13611
|
+ bytesData, _ := json.Marshal(data)
|
|
13612
|
+ var req *http.Request
|
|
13613
|
+
|
|
13614
|
+ if miConfig.MdtrtareaAdmvs == "320921" {
|
|
13615
|
+ req, _ = http.NewRequest("POST", "http://192.168.2.110:9532/"+"jsyb/3501", bytes.NewReader(bytesData))
|
|
13616
|
+ } else {
|
|
13617
|
+ req, _ = http.NewRequest("POST", "http://192.168.5.251:9532/"+"jsyb/3501", bytes.NewReader(bytesData))
|
|
13618
|
+ }
|
|
13619
|
+
|
|
13620
|
+ resp, _ := client.Do(req)
|
|
13621
|
+ defer resp.Body.Close()
|
|
13622
|
+ body, ioErr := ioutil.ReadAll(resp.Body)
|
|
13623
|
+ if ioErr != nil {
|
|
13624
|
+ utils.ErrorLog("接口返回数据读取失败: %v", ioErr)
|
|
13625
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
13626
|
+ return
|
|
13627
|
+ }
|
|
13628
|
+ var respJSON map[string]interface{}
|
|
13629
|
+ if err := json.Unmarshal([]byte(body), &respJSON); err != nil {
|
|
13630
|
+ utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
|
|
13631
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
13632
|
+ return
|
|
13633
|
+ }
|
|
13634
|
+ var res ResultSix
|
|
13635
|
+ var resSix10265 ResultSix10265
|
|
13636
|
+
|
|
13637
|
+ respJSON = respJSON["data"].(map[string]interface{})["request_log"].(map[string]interface{})
|
|
13638
|
+ result, _ := json.Marshal(respJSON)
|
|
13639
|
+ if err := json.Unmarshal([]byte(result), &resSix10265); err != nil {
|
|
13640
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
13641
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
13642
|
+ return
|
|
13643
|
+ }
|
|
13644
|
+ res.InfRefmsgid = resSix10265.InfRefmsgid
|
|
13645
|
+ res.Output = resSix10265.Output
|
|
13646
|
+ res.ErrMsg = resSix10265.ErrMsg
|
|
13647
|
+ res.Cainfo = resSix10265.Cainfo
|
|
13648
|
+ res.WarnMsg = resSix10265.WarnMsg
|
|
13649
|
+ infocode, _ := strconv.ParseInt(resSix10265.Infcode, 10, 64)
|
|
13650
|
+ res.Infcode = infocode
|
|
13651
|
+
|
|
13652
|
+ if infocode == 0 {
|
|
13653
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
13654
|
+ "msg": "上传成功",
|
|
13655
|
+ })
|
|
13656
|
+ return
|
|
13657
|
+
|
|
13658
|
+ } else {
|
|
13659
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
13660
|
+ "failed_code": -10,
|
|
13661
|
+ "msg": res.ErrMsg,
|
|
13662
|
+ })
|
|
13663
|
+ return
|
|
13664
|
+ }
|
|
13665
|
+}
|
|
13666
|
+func (c *HisApiController) Post3506() {
|
|
13667
|
+ miConfig, _ := service.FindMedicalInsuranceInfo(c.GetAdminUserInfo().CurrentOrgId)
|
|
13668
|
+ data := make(map[string]interface{})
|
|
13669
|
+ var struct3501s []models.Struct3501
|
|
13670
|
+ var struct3501 models.Struct3501
|
|
13671
|
+ struct3501.OrgName = miConfig.OrgName
|
|
13672
|
+ struct3501.AccessKey = miConfig.AccessKey
|
|
13673
|
+ struct3501.RequestUrl = miConfig.Url
|
|
13674
|
+ struct3501.SecretKey = miConfig.SecretKey
|
|
13675
|
+ struct3501.ManuDate = "2022-08-15"
|
|
13676
|
+ struct3501.FixmedinsBchno = ""
|
|
13677
|
+ struct3501.ManuLotnum = ""
|
|
13678
|
+ struct3501.RxFlag = "0"
|
|
13679
|
+ struct3501.ExpyEnd = "2022-08-15"
|
|
13680
|
+ struct3501.Invdate = "2022-08-15"
|
|
13681
|
+ struct3501.InvCnt = "20.25"
|
|
13682
|
+ struct3501.Memo = ""
|
|
13683
|
+ struct3501.MedListCodg = "XB01ABD056B002020200517"
|
|
13684
|
+ struct3501.FixmedinsHilistId = miConfig.Code
|
|
13685
|
+ struct3501.FixmedinsHilistName = miConfig.OrgName
|
|
13686
|
+ struct3501s = append(struct3501s, struct3501)
|
|
13687
|
+ data["struct_3501s"] = struct3501s
|
|
13688
|
+ client := &http.Client{}
|
|
13689
|
+ bytesData, _ := json.Marshal(data)
|
|
13690
|
+ var req *http.Request
|
|
13691
|
+
|
|
13692
|
+ if miConfig.MdtrtareaAdmvs == "320921" {
|
|
13693
|
+ req, _ = http.NewRequest("POST", "http://192.168.2.110:9532/"+"jsyb/3501", bytes.NewReader(bytesData))
|
|
13694
|
+ } else {
|
|
13695
|
+ req, _ = http.NewRequest("POST", "http://192.168.5.251:9532/"+"jsyb/3501", bytes.NewReader(bytesData))
|
|
13696
|
+ }
|
|
13697
|
+
|
|
13698
|
+ resp, _ := client.Do(req)
|
|
13699
|
+ defer resp.Body.Close()
|
|
13700
|
+ body, ioErr := ioutil.ReadAll(resp.Body)
|
|
13701
|
+ if ioErr != nil {
|
|
13702
|
+ utils.ErrorLog("接口返回数据读取失败: %v", ioErr)
|
|
13703
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
13704
|
+ return
|
|
13705
|
+ }
|
|
13706
|
+ var respJSON map[string]interface{}
|
|
13707
|
+ if err := json.Unmarshal([]byte(body), &respJSON); err != nil {
|
|
13708
|
+ utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
|
|
13709
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
13710
|
+ return
|
|
13711
|
+ }
|
|
13712
|
+ var res ResultSix
|
|
13713
|
+ var resSix10265 ResultSix10265
|
|
13714
|
+
|
|
13715
|
+ respJSON = respJSON["data"].(map[string]interface{})["request_log"].(map[string]interface{})
|
|
13716
|
+ result, _ := json.Marshal(respJSON)
|
|
13717
|
+ if err := json.Unmarshal([]byte(result), &resSix10265); err != nil {
|
|
13718
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
13719
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
13720
|
+ return
|
|
13721
|
+ }
|
|
13722
|
+ res.InfRefmsgid = resSix10265.InfRefmsgid
|
|
13723
|
+ res.Output = resSix10265.Output
|
|
13724
|
+ res.ErrMsg = resSix10265.ErrMsg
|
|
13725
|
+ res.Cainfo = resSix10265.Cainfo
|
|
13726
|
+ res.WarnMsg = resSix10265.WarnMsg
|
|
13727
|
+ infocode, _ := strconv.ParseInt(resSix10265.Infcode, 10, 64)
|
|
13728
|
+ res.Infcode = infocode
|
|
13729
|
+
|
|
13730
|
+ if infocode == 0 {
|
|
13731
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
13732
|
+ "msg": "上传成功",
|
|
13733
|
+ })
|
|
13734
|
+ return
|
|
13735
|
+
|
|
13736
|
+ } else {
|
|
13737
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
13738
|
+ "failed_code": -10,
|
|
13739
|
+ "msg": res.ErrMsg,
|
|
13740
|
+ })
|
|
13741
|
+ return
|
|
13742
|
+ }
|
|
13743
|
+}
|
|
13744
|
+func (c *HisApiController) Post3507() {
|
|
13745
|
+ miConfig, _ := service.FindMedicalInsuranceInfo(c.GetAdminUserInfo().CurrentOrgId)
|
|
13746
|
+ data := make(map[string]interface{})
|
|
13747
|
+ var struct3501s []models.Struct3501
|
|
13748
|
+ var struct3501 models.Struct3501
|
|
13749
|
+ struct3501.OrgName = miConfig.OrgName
|
|
13750
|
+ struct3501.AccessKey = miConfig.AccessKey
|
|
13751
|
+ struct3501.RequestUrl = miConfig.Url
|
|
13752
|
+ struct3501.SecretKey = miConfig.SecretKey
|
|
13753
|
+ struct3501.ManuDate = "2022-08-15"
|
|
13754
|
+ struct3501.FixmedinsBchno = ""
|
|
13755
|
+ struct3501.ManuLotnum = ""
|
|
13756
|
+ struct3501.RxFlag = "0"
|
|
13757
|
+ struct3501.ExpyEnd = "2022-08-15"
|
|
13758
|
+ struct3501.Invdate = "2022-08-15"
|
|
13759
|
+ struct3501.InvCnt = "20.25"
|
|
13760
|
+ struct3501.Memo = ""
|
|
13761
|
+ struct3501.MedListCodg = "XB01ABD056B002020200517"
|
|
13762
|
+ struct3501.FixmedinsHilistId = miConfig.Code
|
|
13763
|
+ struct3501.FixmedinsHilistName = miConfig.OrgName
|
|
13764
|
+ struct3501s = append(struct3501s, struct3501)
|
|
13765
|
+ data["struct_3501s"] = struct3501s
|
|
13766
|
+ client := &http.Client{}
|
|
13767
|
+ bytesData, _ := json.Marshal(data)
|
|
13768
|
+ var req *http.Request
|
|
13769
|
+
|
|
13770
|
+ if miConfig.MdtrtareaAdmvs == "320921" {
|
|
13771
|
+ req, _ = http.NewRequest("POST", "http://192.168.2.110:9532/"+"jsyb/3501", bytes.NewReader(bytesData))
|
|
13772
|
+ } else {
|
|
13773
|
+ req, _ = http.NewRequest("POST", "http://192.168.5.251:9532/"+"jsyb/3501", bytes.NewReader(bytesData))
|
|
13774
|
+ }
|
|
13775
|
+
|
|
13776
|
+ resp, _ := client.Do(req)
|
|
13777
|
+ defer resp.Body.Close()
|
|
13778
|
+ body, ioErr := ioutil.ReadAll(resp.Body)
|
|
13779
|
+ if ioErr != nil {
|
|
13780
|
+ utils.ErrorLog("接口返回数据读取失败: %v", ioErr)
|
|
13781
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
13782
|
+ return
|
|
13783
|
+ }
|
|
13784
|
+ var respJSON map[string]interface{}
|
|
13785
|
+ if err := json.Unmarshal([]byte(body), &respJSON); err != nil {
|
|
13786
|
+ utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
|
|
13787
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
13788
|
+ return
|
|
13789
|
+ }
|
|
13790
|
+ var res ResultSix
|
|
13791
|
+ var resSix10265 ResultSix10265
|
|
13792
|
+
|
|
13793
|
+ respJSON = respJSON["data"].(map[string]interface{})["request_log"].(map[string]interface{})
|
|
13794
|
+ result, _ := json.Marshal(respJSON)
|
|
13795
|
+ if err := json.Unmarshal([]byte(result), &resSix10265); err != nil {
|
|
13796
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
13797
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
13798
|
+ return
|
|
13799
|
+ }
|
|
13800
|
+ res.InfRefmsgid = resSix10265.InfRefmsgid
|
|
13801
|
+ res.Output = resSix10265.Output
|
|
13802
|
+ res.ErrMsg = resSix10265.ErrMsg
|
|
13803
|
+ res.Cainfo = resSix10265.Cainfo
|
|
13804
|
+ res.WarnMsg = resSix10265.WarnMsg
|
|
13805
|
+ infocode, _ := strconv.ParseInt(resSix10265.Infcode, 10, 64)
|
|
13806
|
+ res.Infcode = infocode
|
|
13807
|
+
|
|
13808
|
+ if infocode == 0 {
|
|
13809
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
13810
|
+ "msg": "上传成功",
|
|
13811
|
+ })
|
|
13812
|
+ return
|
|
13813
|
+
|
|
13814
|
+ } else {
|
|
13815
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
13816
|
+ "failed_code": -10,
|
|
13817
|
+ "msg": res.ErrMsg,
|
|
13818
|
+ })
|
|
13819
|
+ return
|
|
13820
|
+ }
|
|
13821
|
+}
|