Browse Source

Merge branch 'master' of http://git.shengws.com/csx/gdyb

test_user 3 weeks ago
parent
commit
a749421dcb
2 changed files with 152 additions and 29 deletions
  1. 47 2
      controllers/sg/his_api_controller.go
  2. 105 27
      service/gdyb_service.go

+ 47 - 2
controllers/sg/his_api_controller.go View File

158
 	beego.Router("/api/3276", &HisApiController{}, "get:Get3276")
158
 	beego.Router("/api/3276", &HisApiController{}, "get:Get3276")
159
 	beego.Router("/api/3277", &HisApiController{}, "get:Get3277")
159
 	beego.Router("/api/3277", &HisApiController{}, "get:Get3277")
160
 
160
 
161
+	beego.Router("/api/3103", &HisApiController{}, "get:Get3103")
162
+
161
 	beego.Router("/api/comfirm/upload", &HisApiController{}, "get:Get4102")
163
 	beego.Router("/api/comfirm/upload", &HisApiController{}, "get:Get4102")
162
 
164
 
163
 	beego.Router("/api/batch/check_drug", &HisApiController{}, "get:Drugscheck")
165
 	beego.Router("/api/batch/check_drug", &HisApiController{}, "get:Drugscheck")
9108
 
9110
 
9109
 }
9111
 }
9110
 
9112
 
9111
-func (c *HisApiController) Get2505() {
9113
+func (c *HisApiController) Get3103() {
9114
+	admin_user_id, _ := c.GetInt64("admin_user_id")
9115
+	warm_type, _ := c.GetInt64("warm_type")
9116
+	fk_state, _ := c.GetInt64("fk_state")
9117
+	warm_ids := c.GetString("warm_ids")
9118
+	desc := c.GetString("desc")
9119
+	miConfig, _ := service.FindMedicalInsuranceInfo(c.GetAdminUserInfo().CurrentOrgId)
9120
+	curRoles, _ := service.GetAdminUserInfoByID(c.GetAdminUserInfo().CurrentOrgId, admin_user_id)
9121
+	result, requestLog := service.Gdyb3103(miConfig.OrgName, curRoles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, warm_type, warm_ids, fk_state, desc)
9122
+	saveLog(result, requestLog, "3103", "反馈")
9123
+	var res2 ResultSix
9124
+	var respJSON2 map[string]interface{}
9125
+	if err := json.Unmarshal([]byte(string(result)), &respJSON2); err != nil {
9126
+		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
9127
+		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
9128
+		return
9129
+	}
9130
+	userJSONBytes2, _ := json.Marshal(respJSON2)
9131
+	if err := json.Unmarshal(userJSONBytes2, &res2); err != nil {
9132
+		utils.ErrorLog("解析失败:%v", err)
9133
+		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
9134
+		return
9135
+	}
9136
+	if res2.Infcode != 0 {
9137
+		c.ServeSuccessJSON(map[string]interface{}{
9138
+			"failed_code": -10,
9139
+			"msg":         res2.ErrMsg,
9140
+		})
9141
+		return
9142
+
9143
+	} else {
9144
+		c.ServeSuccessJSON(map[string]interface{}{
9145
+			"msg": "反馈成功",
9146
+		})
9147
+		return
9148
+	}
9149
+}
9150
+
9151
+func (c *HisApiController) Get3103() {
9112
 	admin_user_id, _ := c.GetInt64("admin_user_id")
9152
 	admin_user_id, _ := c.GetInt64("admin_user_id")
9113
 	miConfig, _ := service.FindMedicalInsuranceInfo(10375)
9153
 	miConfig, _ := service.FindMedicalInsuranceInfo(10375)
9114
 	curRoles, _ := service.GetAdminUserInfoByID(c.GetAdminUserInfo().CurrentOrgId, admin_user_id)
9154
 	curRoles, _ := service.GetAdminUserInfoByID(c.GetAdminUserInfo().CurrentOrgId, admin_user_id)
26964
 									c.ServeSuccessJSON(map[string]interface{}{
27004
 									c.ServeSuccessJSON(map[string]interface{}{
26965
 										"failed_code": -10,
27005
 										"failed_code": -10,
26966
 										"failed_type": 100,
27006
 										"failed_type": 100,
27007
+										"warm_type":   1,
26967
 										"msg":         res3101.Output.Result,
27008
 										"msg":         res3101.Output.Result,
26968
 									})
27009
 									})
26969
 									return
27010
 									return
30519
 								c.ServeSuccessJSON(map[string]interface{}{
30560
 								c.ServeSuccessJSON(map[string]interface{}{
30520
 									"failed_code": -10,
30561
 									"failed_code": -10,
30521
 									"failed_type": 100,
30562
 									"failed_type": 100,
30563
+									"warm_type":   2,
30522
 									"msg":         result3101.Output.Result,
30564
 									"msg":         result3101.Output.Result,
30523
 								})
30565
 								})
30524
 								return
30566
 								return
32472
 									c.ServeSuccessJSON(map[string]interface{}{
32514
 									c.ServeSuccessJSON(map[string]interface{}{
32473
 										"failed_code": -10,
32515
 										"failed_code": -10,
32474
 										"failed_type": 100,
32516
 										"failed_type": 100,
32517
+										"warm_type":   1,
32475
 										"msg":         result3101.Output.Result,
32518
 										"msg":         result3101.Output.Result,
32476
 									})
32519
 									})
32477
 									return
32520
 									return
33730
 									c.ServeSuccessJSON(map[string]interface{}{
33773
 									c.ServeSuccessJSON(map[string]interface{}{
33731
 										"failed_code": -10,
33774
 										"failed_code": -10,
33732
 										"failed_type": 100,
33775
 										"failed_type": 100,
33733
-										"msg":         result3101.Output.Result,
33776
+
33777
+										"msg": result3101.Output.Result,
33734
 									})
33778
 									})
33735
 
33779
 
33736
 									return
33780
 									return
33881
 										c.ServeSuccessJSON(map[string]interface{}{
33925
 										c.ServeSuccessJSON(map[string]interface{}{
33882
 											"failed_code": -10,
33926
 											"failed_code": -10,
33883
 											"failed_type": 100,
33927
 											"failed_type": 100,
33928
+											"warm_type":   2,
33884
 											"msg":         result3101.Output.Result,
33929
 											"msg":         result3101.Output.Result,
33885
 										})
33930
 										})
33886
 										return
33931
 										return

+ 105 - 27
service/gdyb_service.go View File

217
 
217
 
218
 	//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/1101"
218
 	//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/1101"
219
 
219
 
220
- {
220
+	{
221
 		request, err := http.NewRequest("POST", url, reader)
221
 		request, err := http.NewRequest("POST", url, reader)
222
 		if err != nil {
222
 		if err != nil {
223
 			fmt.Println(err.Error())
223
 			fmt.Println(err.Error())
307
 		url = gdyb_url + "2201"
307
 		url = gdyb_url + "2201"
308
 	}
308
 	}
309
 
309
 
310
-	  {
310
+	{
311
 		request, err := http.NewRequest("POST", url, reader)
311
 		request, err := http.NewRequest("POST", url, reader)
312
 		if err != nil {
312
 		if err != nil {
313
 			fmt.Println(err.Error())
313
 			fmt.Println(err.Error())
413
 		url = gdyb_url + "2201"
413
 		url = gdyb_url + "2201"
414
 	}
414
 	}
415
 
415
 
416
-	  {
416
+	{
417
 		fmt.Println(url)
417
 		fmt.Println(url)
418
 		fmt.Println(gdyb_paasid)
418
 		fmt.Println(gdyb_paasid)
419
 		fmt.Println(secret_key)
419
 		fmt.Println(secret_key)
734
 	} else {
734
 	} else {
735
 		url = gdyb_url + "2203"
735
 		url = gdyb_url + "2203"
736
 	}
736
 	}
737
- {
737
+	{
738
 		request, err := http.NewRequest("POST", url, reader)
738
 		request, err := http.NewRequest("POST", url, reader)
739
 		if err != nil {
739
 		if err != nil {
740
 			fmt.Println(err.Error())
740
 			fmt.Println(err.Error())
843
 		url = gdyb_url + "2203"
843
 		url = gdyb_url + "2203"
844
 	}
844
 	}
845
 
845
 
846
- {
846
+	{
847
 
847
 
848
 		request, err := http.NewRequest("POST", url, reader)
848
 		request, err := http.NewRequest("POST", url, reader)
849
 		if err != nil {
849
 		if err != nil {
942
 	var url string
942
 	var url string
943
 
943
 
944
 	url = gdyb_url + "2203"
944
 	url = gdyb_url + "2203"
945
-{
945
+	{
946
 
946
 
947
 		request, err := http.NewRequest("POST", url, reader)
947
 		request, err := http.NewRequest("POST", url, reader)
948
 		if err != nil {
948
 		if err != nil {
1242
 
1242
 
1243
 	//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/2204"
1243
 	//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/2204"
1244
 
1244
 
1245
- {
1245
+	{
1246
 
1246
 
1247
 		request, err := http.NewRequest("POST", url, reader)
1247
 		request, err := http.NewRequest("POST", url, reader)
1248
 		if err != nil {
1248
 		if err != nil {
1551
 	//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/2205"
1551
 	//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/2205"
1552
 
1552
 
1553
 	//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/2205"
1553
 	//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/2205"
1554
-{
1554
+	{
1555
 		request, err := http.NewRequest("POST", url, reader)
1555
 		request, err := http.NewRequest("POST", url, reader)
1556
 		fmt.Println(err)
1556
 		fmt.Println(err)
1557
 
1557
 
1626
 			inputData["mdtrt_cert_no"] = certNo // 就诊凭证编号
1626
 			inputData["mdtrt_cert_no"] = certNo // 就诊凭证编号
1627
 		}
1627
 		}
1628
 	}
1628
 	}
1629
-	 {
1629
+	{
1630
 		inputData["med_type"] = med_type // 医疗类别 11 普通门诊  12 门诊挂号
1630
 		inputData["med_type"] = med_type // 医疗类别 11 普通门诊  12 门诊挂号
1631
 	}
1631
 	}
1632
 
1632
 
1671
 
1671
 
1672
 	//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/2206"
1672
 	//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/2206"
1673
 
1673
 
1674
-	 {
1674
+	{
1675
 		request, err := http.NewRequest("POST", url, reader)
1675
 		request, err := http.NewRequest("POST", url, reader)
1676
 		if err != nil {
1676
 		if err != nil {
1677
 			fmt.Println(err.Error())
1677
 			fmt.Println(err.Error())
1743
 	if med_type == "1111" || med_type == "1112" {
1743
 	if med_type == "1111" || med_type == "1112" {
1744
 		med_type = "11"
1744
 		med_type = "11"
1745
 	}
1745
 	}
1746
- {
1746
+	{
1747
 		inputData["med_type"] = med_type // 医疗类别 11 普通门诊  12 门诊挂号
1747
 		inputData["med_type"] = med_type // 医疗类别 11 普通门诊  12 门诊挂号
1748
 	}
1748
 	}
1749
 	inputData["medfee_sumamt"] = total           // 医疗费总额
1749
 	inputData["medfee_sumamt"] = total           // 医疗费总额
1786
 	//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/2207"
1786
 	//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/2207"
1787
 
1787
 
1788
 	//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/2207"
1788
 	//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/2207"
1789
- {
1789
+	{
1790
 
1790
 
1791
 		request, err := http.NewRequest("POST", url, reader)
1791
 		request, err := http.NewRequest("POST", url, reader)
1792
 		if err != nil {
1792
 		if err != nil {
1893
 
1893
 
1894
 	//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/2207"
1894
 	//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/2207"
1895
 
1895
 
1896
- {
1896
+	{
1897
 
1897
 
1898
 		request, err := http.NewRequest("POST", url, reader)
1898
 		request, err := http.NewRequest("POST", url, reader)
1899
 		if err != nil {
1899
 		if err != nil {
1982
 
1982
 
1983
 	//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/2208"
1983
 	//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/2208"
1984
 
1984
 
1985
-	 {
1985
+	{
1986
 		request, err := http.NewRequest("POST", url, reader)
1986
 		request, err := http.NewRequest("POST", url, reader)
1987
 		if err != nil {
1987
 		if err != nil {
1988
 			fmt.Println(err.Error())
1988
 			fmt.Println(err.Error())
5795
 	} else {
5795
 	} else {
5796
 		url = gdyb_url + "3260"
5796
 		url = gdyb_url + "3260"
5797
 	}
5797
 	}
5798
- {
5798
+	{
5799
 
5799
 
5800
 		//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/1101"
5800
 		//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/1101"
5801
 		request, err := http.NewRequest("POST", url, reader)
5801
 		request, err := http.NewRequest("POST", url, reader)
6237
 		url = gdyb_url + "3262"
6237
 		url = gdyb_url + "3262"
6238
 	}
6238
 	}
6239
 
6239
 
6240
-	 {
6240
+	{
6241
 
6241
 
6242
 		//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/1101"
6242
 		//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/1101"
6243
 		request, err := http.NewRequest("POST", url, reader)
6243
 		request, err := http.NewRequest("POST", url, reader)
6329
 		url = gdyb_url + "9001"
6329
 		url = gdyb_url + "9001"
6330
 	}
6330
 	}
6331
 
6331
 
6332
- {
6332
+	{
6333
 
6333
 
6334
 		//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/1101"
6334
 		//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/1101"
6335
 
6335
 
6414
 		url = gdyb_url + "9001"
6414
 		url = gdyb_url + "9001"
6415
 	}
6415
 	}
6416
 
6416
 
6417
-	 {
6417
+	{
6418
 
6418
 
6419
 		//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/1101"
6419
 		//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/1101"
6420
 
6420
 
6578
 		url = gdyb_url + "1101"
6578
 		url = gdyb_url + "1101"
6579
 	}
6579
 	}
6580
 
6580
 
6581
- {
6581
+	{
6582
 
6582
 
6583
 		//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/1101"
6583
 		//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/1101"
6584
 		request, err := http.NewRequest("POST", url, reader)
6584
 		request, err := http.NewRequest("POST", url, reader)
6747
 	input["invinfo"] = inputData
6747
 	input["invinfo"] = inputData
6748
 	inputMessage["input"] = input //交易输入
6748
 	inputMessage["input"] = input //交易输入
6749
 
6749
 
6750
-
6751
 	bytesData, err := json.Marshal(inputMessage)
6750
 	bytesData, err := json.Marshal(inputMessage)
6752
 	fmt.Println(string(bytesData))
6751
 	fmt.Println(string(bytesData))
6753
 	if err != nil {
6752
 	if err != nil {
7063
 	inputData["rxno"] = struct3505.Rxno                   // 人员编号 (来自1101接口返回)
7062
 	inputData["rxno"] = struct3505.Rxno                   // 人员编号 (来自1101接口返回)
7064
 	inputData["rx_circ_flag"] = struct3505.RxCircFlag     // 人员编号 (来自1101接口返回)
7063
 	inputData["rx_circ_flag"] = struct3505.RxCircFlag     // 人员编号 (来自1101接口返回)
7065
 
7064
 
7066
-	inputData["rtal_docno"] = struct3505.RtalDocno // 人员编号 (来自1101接口返回)
7067
-	inputData["stoout_no"] = struct3505.StooutNo   // 人员编号 (来自1101接口返回)
7065
+	inputData["rtal_docno"] = struct3505.RtalDocno          // 人员编号 (来自1101接口返回)
7066
+	inputData["stoout_no"] = struct3505.StooutNo            // 人员编号 (来自1101接口返回)
7068
 	inputData["MDTRT_SETL_TYPE"] = struct3505.MdtrtSetlType // 人员编号 (来自1101接口返回)
7067
 	inputData["MDTRT_SETL_TYPE"] = struct3505.MdtrtSetlType // 人员编号 (来自1101接口返回)
7069
 
7068
 
7070
 	inputData["bchno"] = struct3505.Bchno                          // 人员编号 (来自1101接口返回)
7069
 	inputData["bchno"] = struct3505.Bchno                          // 人员编号 (来自1101接口返回)
7071
-	inputData["drug_trac_codg"] = "--"        // 人员编号 (来自1101接口返回)
7070
+	inputData["drug_trac_codg"] = "--"                             // 人员编号 (来自1101接口返回)
7072
 	inputData["drug_prod_barc"] = struct3505.DrugProdBarc          // 人员编号 (来自1101接口返回)
7071
 	inputData["drug_prod_barc"] = struct3505.DrugProdBarc          // 人员编号 (来自1101接口返回)
7073
 	inputData["shelf_posi"] = struct3505.ShelfPosi                 // 人员编号 (来自1101接口返回)
7072
 	inputData["shelf_posi"] = struct3505.ShelfPosi                 // 人员编号 (来自1101接口返回)
7074
 	inputData["sel_retn_cnt"] = struct3505.SelRetnCnt              // 人员编号 (来自1101接口返回)
7073
 	inputData["sel_retn_cnt"] = struct3505.SelRetnCnt              // 人员编号 (来自1101接口返回)
7214
 	inputMessage := SetGdInputMessage(timestamp, struct3507.OrgName, struct3507.Opter, struct3507.FixmedinsCode, struct3507.InsuplcAdmdvs, struct3507.MdtrtareaAdmvs, struct3507.Cainfo)
7213
 	inputMessage := SetGdInputMessage(timestamp, struct3507.OrgName, struct3507.Opter, struct3507.FixmedinsCode, struct3507.InsuplcAdmdvs, struct3507.MdtrtareaAdmvs, struct3507.Cainfo)
7215
 	input := make(map[string]interface{})
7214
 	input := make(map[string]interface{})
7216
 	inputData := make(map[string]interface{})
7215
 	inputData := make(map[string]interface{})
7217
-	inputMessage["infno"] = "3507"                          // 交易编码
7216
+	inputMessage["infno"] = "3507"                           // 交易编码
7218
 	inputData["fixmedins_bchno"] = struct3507.FixmedinsBchno // 人员编号 (来自1101接口返回)
7217
 	inputData["fixmedins_bchno"] = struct3507.FixmedinsBchno // 人员编号 (来自1101接口返回)
7219
-	inputData["inv_data_type"] = struct3507.InvDataType     // 人员编号 (来自1101接口返回)
7218
+	inputData["inv_data_type"] = struct3507.InvDataType      // 人员编号 (来自1101接口返回)
7220
 
7219
 
7221
 	input["data"] = inputData
7220
 	input["data"] = inputData
7222
 	inputMessage["input"] = input //交易输入
7221
 	inputMessage["input"] = input //交易输入
8538
 	inputData["bchno"] = struct3505.Bchno // 人员编号 (来自1101接口返回)
8537
 	inputData["bchno"] = struct3505.Bchno // 人员编号 (来自1101接口返回)
8539
 	codes := strings.Split(struct3505.DrugTracCodg, ",")
8538
 	codes := strings.Split(struct3505.DrugTracCodg, ",")
8540
 
8539
 
8541
-	inputData["drug_trac_codg"] = codes[0]          // 人员编号 (来自1101接口返回)
8540
+	inputData["drug_trac_codg"] = codes[0]                         // 人员编号 (来自1101接口返回)
8542
 	inputData["drug_prod_barc"] = struct3505.DrugProdBarc          // 人员编号 (来自1101接口返回)
8541
 	inputData["drug_prod_barc"] = struct3505.DrugProdBarc          // 人员编号 (来自1101接口返回)
8543
 	inputData["shelf_posi"] = struct3505.ShelfPosi                 // 人员编号 (来自1101接口返回)
8542
 	inputData["shelf_posi"] = struct3505.ShelfPosi                 // 人员编号 (来自1101接口返回)
8544
 	inputData["sel_retn_cnt"] = struct3505.SelRetnCnt              // 人员编号 (来自1101接口返回)
8543
 	inputData["sel_retn_cnt"] = struct3505.SelRetnCnt              // 人员编号 (来自1101接口返回)
8550
 
8549
 
8551
 	//codes = strings.Split(struct3505.DrugTracCodg, ",")
8550
 	//codes = strings.Split(struct3505.DrugTracCodg, ",")
8552
 	for _, item := range codes {
8551
 	for _, item := range codes {
8553
-		if len(item) > 0{
8552
+		if len(item) > 0 {
8554
 			druginputData := make(map[string]interface{})
8553
 			druginputData := make(map[string]interface{})
8555
 			druginputData["drug_trac_codg"] = item
8554
 			druginputData["drug_trac_codg"] = item
8556
 			feedetail = append(feedetail, druginputData)
8555
 			feedetail = append(feedetail, druginputData)
9311
 	//inputMessage["sign_no"] = "GZYBCS4101A20220202"
9310
 	//inputMessage["sign_no"] = "GZYBCS4101A20220202"
9312
 	return inputMessage
9311
 	return inputMessage
9313
 }
9312
 }
9313
+
9314
+func Gdyb3103(org_name string, opera string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, secret_key string, warm_type int64, ids string, dspo_way int64, desc string) (string, string) {
9315
+	fmt.Println(opera)
9316
+
9317
+	// 生成签名
9318
+	nonce := GetRandomString(32)
9319
+	timestamp := time.Now().Unix()
9320
+	signature := setSignature(timestamp, nonce, secret_key)
9321
+
9322
+	// 生成输入报文
9323
+	inputMessage := SetInputMessagenosign(nonce, timestamp, org_name, opera, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs)
9324
+	input := make(map[string]interface{})
9325
+	inputData := make(map[string]interface{})
9326
+	inputMessage["infno"] = "3103" // 交易编码
9327
+
9328
+	inputData["warn_type"] = warm_type // 人员编号 (来自1101接口返回)
9329
+
9330
+	id_arr := strings.Split(ids, "~")
9331
+	feedetail := make([]map[string]interface{}, 0)
9332
+	for _, item := range id_arr {
9333
+		feedetailInfo := make(map[string]interface{})
9334
+		feedetailInfo["warn_rslt_id"] = item
9335
+		feedetailInfo["dspo_way"] = dspo_way // 就诊 ID(来自2201接口返回)
9336
+		feedetailInfo["dspo_way_rea"] = desc // 人员编号 (来自1101接口返回)
9337
+		feedetail = append(feedetail, feedetailInfo)
9338
+	}
9339
+	inputData["warns"] = feedetail
9340
+	input["data"] = inputData
9341
+	inputMessage["input"] = input //交易输入
9342
+
9343
+	var requestLog string
9344
+	bytesData, err := json.Marshal(inputMessage)
9345
+	requestLog = string(bytesData)
9346
+	fmt.Println(string(bytesData))
9347
+	if err != nil {
9348
+		fmt.Println(err.Error())
9349
+		return err.Error(), ""
9350
+	}
9351
+	reader := bytes.NewReader(bytesData)
9352
+	//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_api/prd/hsa/hgs/2201"
9353
+	//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/2201"
9354
+
9355
+	gdyb_url := beego.AppConfig.String("gdyb_url")
9356
+	gdyb_paasid := beego.AppConfig.String("gdyb_paasid")
9357
+
9358
+	var url string
9359
+
9360
+	url = gdyb_url + "3103"
9361
+
9362
+	{
9363
+		request, err := http.NewRequest("POST", url, reader)
9364
+		if err != nil {
9365
+			fmt.Println(err.Error())
9366
+			return err.Error(), ""
9367
+		}
9368
+
9369
+		request.Header.Set("Content-Type", "application/json;charset=UTF-8")
9370
+		request.Header.Set("x-tif-paasid", gdyb_paasid)
9371
+		request.Header.Set("x-tif-signature", signature)
9372
+		request.Header.Set("x-tif-timestamp", strconv.FormatInt(timestamp, 10))
9373
+		request.Header.Set("x-tif-nonce", nonce)
9374
+
9375
+		client := http.Client{}
9376
+		resp, err := client.Do(request)
9377
+		if err != nil {
9378
+			fmt.Println(err.Error())
9379
+			return err.Error(), ""
9380
+		}
9381
+		respBytes, err := ioutil.ReadAll(resp.Body)
9382
+		if err != nil {
9383
+			fmt.Println(err.Error())
9384
+			return err.Error(), ""
9385
+		}
9386
+		str := string(respBytes)
9387
+		fmt.Println(str)
9388
+		return str, requestLog
9389
+
9390
+	}
9391
+}