test_user 1 year ago
parent
commit
d4897f4e9e

+ 70 - 20
controllers/js/jsyb_controller.go View File

66
 	beego.Router("/jsyb/3273", &JSybController{}, "post:Get3273")
66
 	beego.Router("/jsyb/3273", &JSybController{}, "post:Get3273")
67
 	beego.Router("/jsyb/3274", &JSybController{}, "post:Get3274")
67
 	beego.Router("/jsyb/3274", &JSybController{}, "post:Get3274")
68
 	beego.Router("/jsyb/3275", &JSybController{}, "post:Get3275")
68
 	beego.Router("/jsyb/3275", &JSybController{}, "post:Get3275")
69
-	beego.Router("/jsyb/3276", &JSybController{}, "post:Get3276")
70
-	beego.Router("/jsyb/3277", &JSybController{}, "post:Get3277")
69
+	//beego.Router("/jsyb/3276", &JSybController{}, "post:Get3276")
70
+	//beego.Router("/jsyb/3277", &JSybController{}, "post:Get3277")
71
 
71
 
72
 }
72
 }
73
 
73
 
81
 	url := c.GetString("url")
81
 	url := c.GetString("url")
82
 	ak := c.GetString("ak")
82
 	ak := c.GetString("ak")
83
 	cainfo := c.GetString("cainfo")
83
 	cainfo := c.GetString("cainfo")
84
+	fmt.Println(org_name)
85
+	fmt.Println(doctor)
86
+
87
+	fmt.Println(fixmedins_code)
88
+	fmt.Println(insuplc_admdvs)
89
+	fmt.Println(mdtrtarea_admvs)
90
+	fmt.Println(secret_key)
91
+	fmt.Println(url)
92
+	fmt.Println(ak)
93
+	fmt.Println(cainfo)
94
+
84
 	result, request := service.Jxyb3260(mdtrtarea_admvs, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo)
95
 	result, request := service.Jxyb3260(mdtrtarea_admvs, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo)
85
 	saveJsLog(result, request, "3260", "3260", org_name)
96
 	saveJsLog(result, request, "3260", "3260", org_name)
86
 	var dat2 map[string]interface{}
97
 	var dat2 map[string]interface{}
108
 	url := c.GetString("url")
119
 	url := c.GetString("url")
109
 	ak := c.GetString("ak")
120
 	ak := c.GetString("ak")
110
 	cainfo := c.GetString("cainfo")
121
 	cainfo := c.GetString("cainfo")
111
-	month := c.GetString("month")
112
-	result, request := service.Jxyb3261(month, mdtrtarea_admvs, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo)
122
+	setl_mon := c.GetString("setl_mon")
123
+	result, request := service.Jxyb3261(setl_mon, mdtrtarea_admvs, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo)
113
 	saveJsLog(result, request, "3261", "3261", org_name)
124
 	saveJsLog(result, request, "3261", "3261", org_name)
114
 	var dat2 map[string]interface{}
125
 	var dat2 map[string]interface{}
115
 	if err := json.Unmarshal([]byte(request), &dat2); err == nil {
126
 	if err := json.Unmarshal([]byte(request), &dat2); err == nil {
133
 		return
144
 		return
134
 	}
145
 	}
135
 	userJSONBytes, _ := json.Marshal(respJSON["datas"])
146
 	userJSONBytes, _ := json.Marshal(respJSON["datas"])
136
-	var hp []models.FixMonRecDetailFileIn
147
+	var hp []models.FixMonRecDetailFileInTwo
137
 	if err := json.Unmarshal(userJSONBytes, &hp); err != nil {
148
 	if err := json.Unmarshal(userJSONBytes, &hp); err != nil {
138
 		utils.ErrorLog("解析失败:%v", err)
149
 		utils.ErrorLog("解析失败:%v", err)
139
 		return
150
 		return
140
 	}
151
 	}
152
+	fmt.Println(hp)
141
 
153
 
142
 	userJSONBytes2, _ := json.Marshal(respJSON["fund"])
154
 	userJSONBytes2, _ := json.Marshal(respJSON["fund"])
143
 	var fund []models.Fund
155
 	var fund []models.Fund
160
 	fix_fill_psn := respJSON["fix_fill_psn"].(string)
172
 	fix_fill_psn := respJSON["fix_fill_psn"].(string)
161
 	fix_fill_date := respJSON["fix_fill_date"].(string)
173
 	fix_fill_date := respJSON["fix_fill_date"].(string)
162
 	stmt_loc := respJSON["stmt_loc"].(string)
174
 	stmt_loc := respJSON["stmt_loc"].(string)
175
+	setl_mon := respJSON["setl_mon"].(string)
163
 
176
 
164
-	result, request := service.Jxyb3262(org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo, upld_btch, fix_fill_dept, fix_fill_psn_id, fix_fill_psn, fix_fill_date, stmt_loc, hp, fund)
177
+	result, request := service.Jxyb3262(setl_mon, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo, upld_btch, fix_fill_dept, fix_fill_psn_id, fix_fill_psn, fix_fill_date, stmt_loc, hp, fund)
165
 	saveJsLog(result, request, "3262", "3262", org_name)
178
 	saveJsLog(result, request, "3262", "3262", org_name)
166
 	var dat2 map[string]interface{}
179
 	var dat2 map[string]interface{}
167
 	if err := json.Unmarshal([]byte(request), &dat2); err == nil {
180
 	if err := json.Unmarshal([]byte(request), &dat2); err == nil {
184
 		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
197
 		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
185
 		return
198
 		return
186
 	}
199
 	}
200
+
187
 	org_name := respJSON["org_name"].(string)
201
 	org_name := respJSON["org_name"].(string)
188
 	doctor := respJSON["doctor"].(string)
202
 	doctor := respJSON["doctor"].(string)
189
 	fixmedins_code := respJSON["fixmedins_code"].(string)
203
 	fixmedins_code := respJSON["fixmedins_code"].(string)
222
 		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
236
 		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
223
 		return
237
 		return
224
 	}
238
 	}
239
+
240
+	userJSONBytes, _ := json.Marshal(respJSON["solidify_id"])
241
+	var hp []string
242
+	if err := json.Unmarshal(userJSONBytes, &hp); err != nil {
243
+		utils.ErrorLog("解析失败:%v", err)
244
+		return
245
+	}
246
+
225
 	org_name := respJSON["org_name"].(string)
247
 	org_name := respJSON["org_name"].(string)
226
 	doctor := respJSON["doctor"].(string)
248
 	doctor := respJSON["doctor"].(string)
227
 	fixmedins_code := respJSON["fixmedins_code"].(string)
249
 	fixmedins_code := respJSON["fixmedins_code"].(string)
234
 	upld_btch := respJSON["upld_btch"].(string)
256
 	upld_btch := respJSON["upld_btch"].(string)
235
 	stmt_loc := respJSON["stmt_loc"].(string)
257
 	stmt_loc := respJSON["stmt_loc"].(string)
236
 	setl_mon := respJSON["setl_mon"].(string)
258
 	setl_mon := respJSON["setl_mon"].(string)
237
-	result, request := service.Jxyb3264(setl_mon, stmt_loc, upld_btch, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo)
259
+	result, request := service.Jxyb3264(setl_mon, stmt_loc, upld_btch, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo, hp)
238
 	saveJsLog(result, request, "3264", "3264", org_name)
260
 	saveJsLog(result, request, "3264", "3264", org_name)
239
 	var dat2 map[string]interface{}
261
 	var dat2 map[string]interface{}
240
 	if err := json.Unmarshal([]byte(request), &dat2); err == nil {
262
 	if err := json.Unmarshal([]byte(request), &dat2); err == nil {
258
 		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
280
 		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
259
 		return
281
 		return
260
 	}
282
 	}
283
+
284
+	userJSONBytes, _ := json.Marshal(respJSON["solidify_id"])
285
+	var hp []string
286
+	if err := json.Unmarshal(userJSONBytes, &hp); err != nil {
287
+		utils.ErrorLog("解析失败:%v", err)
288
+		return
289
+	}
290
+
261
 	org_name := respJSON["org_name"].(string)
291
 	org_name := respJSON["org_name"].(string)
262
 	doctor := respJSON["doctor"].(string)
292
 	doctor := respJSON["doctor"].(string)
263
 	fixmedins_code := respJSON["fixmedins_code"].(string)
293
 	fixmedins_code := respJSON["fixmedins_code"].(string)
274
 	fix_fill_psn_id := respJSON["fix_fill_psn_id"].(string)
304
 	fix_fill_psn_id := respJSON["fix_fill_psn_id"].(string)
275
 	fix_fill_psn := respJSON["fix_fill_psn"].(string)
305
 	fix_fill_psn := respJSON["fix_fill_psn"].(string)
276
 	fix_fill_date := respJSON["fix_fill_date"].(string)
306
 	fix_fill_date := respJSON["fix_fill_date"].(string)
277
-	result, request := service.Jxyb3265(setl_mon, fix_fill_dept, fix_fill_psn_id, fix_fill_psn, fix_fill_date, stmt_loc, upld_btch, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo)
307
+	result, request := service.Jxyb3265(setl_mon, fix_fill_dept, fix_fill_psn_id, fix_fill_psn, fix_fill_date, stmt_loc, upld_btch, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo, hp)
278
 	saveJsLog(result, request, "3265", "3265", org_name)
308
 	saveJsLog(result, request, "3265", "3265", org_name)
279
 	var dat2 map[string]interface{}
309
 	var dat2 map[string]interface{}
280
 	if err := json.Unmarshal([]byte(request), &dat2); err == nil {
310
 	if err := json.Unmarshal([]byte(request), &dat2); err == nil {
309
 	cainfo := respJSON["cainfo"].(string)
339
 	cainfo := respJSON["cainfo"].(string)
310
 	upld_btch := respJSON["upld_btch"].(string)
340
 	upld_btch := respJSON["upld_btch"].(string)
311
 	stmt_loc := respJSON["stmt_loc"].(string)
341
 	stmt_loc := respJSON["stmt_loc"].(string)
312
-	stmt_mon := respJSON["stmt_mon"].(string)
342
+	stmt_mon := respJSON["setl_mon"].(string)
313
 	fix_fill_dept := respJSON["fix_fill_dept"].(string)
343
 	fix_fill_dept := respJSON["fix_fill_dept"].(string)
314
 	fix_fill_psn_id := respJSON["fix_fill_psn_id"].(string)
344
 	fix_fill_psn_id := respJSON["fix_fill_psn_id"].(string)
315
 	fix_fill_psn := respJSON["fix_fill_psn"].(string)
345
 	fix_fill_psn := respJSON["fix_fill_psn"].(string)
349
 	cainfo := respJSON["cainfo"].(string)
379
 	cainfo := respJSON["cainfo"].(string)
350
 	upld_btch := respJSON["upld_btch"].(string)
380
 	upld_btch := respJSON["upld_btch"].(string)
351
 	stmt_loc := respJSON["stmt_loc"].(string)
381
 	stmt_loc := respJSON["stmt_loc"].(string)
352
-	stmt_mon := respJSON["stmt_mon"].(string)
353
-	result, request := service.Jxyb3267(stmt_mon, stmt_loc, upld_btch, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo)
382
+	setl_mon := respJSON["setl_mon"].(string)
383
+	result, request := service.Jxyb3267(setl_mon, stmt_loc, upld_btch, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo)
354
 	saveJsLog(result, request, "3267", "3267", org_name)
384
 	saveJsLog(result, request, "3267", "3267", org_name)
355
 	var dat2 map[string]interface{}
385
 	var dat2 map[string]interface{}
356
 	if err := json.Unmarshal([]byte(request), &dat2); err == nil {
386
 	if err := json.Unmarshal([]byte(request), &dat2); err == nil {
376
 		return
406
 		return
377
 	}
407
 	}
378
 	userJSONBytes, _ := json.Marshal(respJSON["datas"])
408
 	userJSONBytes, _ := json.Marshal(respJSON["datas"])
379
-	var hp []models.FixMonRecDetailFileIn
409
+	var hp []models.FixMonRecDetailFileInTwo
380
 	if err := json.Unmarshal(userJSONBytes, &hp); err != nil {
410
 	if err := json.Unmarshal(userJSONBytes, &hp); err != nil {
381
 		utils.ErrorLog("解析失败:%v", err)
411
 		utils.ErrorLog("解析失败:%v", err)
382
 		return
412
 		return
403
 	fix_fill_psn := respJSON["fix_fill_psn"].(string)
433
 	fix_fill_psn := respJSON["fix_fill_psn"].(string)
404
 	fix_fill_date := respJSON["fix_fill_date"].(string)
434
 	fix_fill_date := respJSON["fix_fill_date"].(string)
405
 	stmt_loc := respJSON["stmt_loc"].(string)
435
 	stmt_loc := respJSON["stmt_loc"].(string)
406
-	result, request := service.Jxyb3268(org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo, upld_btch, fix_fill_dept, fix_fill_psn_id, fix_fill_psn, fix_fill_date, stmt_loc, hp, fund)
436
+	setl_mon := respJSON["setl_mon"].(string)
437
+
438
+	result, request := service.Jxyb3268(setl_mon, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo, upld_btch, fix_fill_dept, fix_fill_psn_id, fix_fill_psn, fix_fill_date, stmt_loc, hp, fund)
407
 	saveJsLog(result, request, "3268", "3268", org_name)
439
 	saveJsLog(result, request, "3268", "3268", org_name)
408
 	var dat2 map[string]interface{}
440
 	var dat2 map[string]interface{}
409
 	if err := json.Unmarshal([]byte(request), &dat2); err == nil {
441
 	if err := json.Unmarshal([]byte(request), &dat2); err == nil {
437
 	ak := respJSON["ak"].(string)
469
 	ak := respJSON["ak"].(string)
438
 	cainfo := respJSON["cainfo"].(string)
470
 	cainfo := respJSON["cainfo"].(string)
439
 	stmt_loc := respJSON["stmt_loc"].(string)
471
 	stmt_loc := respJSON["stmt_loc"].(string)
440
-	stmt_mon := respJSON["setl_mon"].(string)
472
+	setl_mon := respJSON["setl_mon"].(string)
441
 
473
 
442
-	result, request := service.Jxyb3269(stmt_mon, stmt_loc, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo)
474
+	result, request := service.Jxyb3269(setl_mon, stmt_loc, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo)
443
 	saveJsLog(result, request, "3269", "3269", org_name)
475
 	saveJsLog(result, request, "3269", "3269", org_name)
444
 	var dat2 map[string]interface{}
476
 	var dat2 map[string]interface{}
445
 	if err := json.Unmarshal([]byte(request), &dat2); err == nil {
477
 	if err := json.Unmarshal([]byte(request), &dat2); err == nil {
463
 		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
495
 		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
464
 		return
496
 		return
465
 	}
497
 	}
498
+	userJSONBytes, _ := json.Marshal(respJSON["solidify_id"])
499
+	var hp []string
500
+	if err := json.Unmarshal(userJSONBytes, &hp); err != nil {
501
+		utils.ErrorLog("解析失败:%v", err)
502
+		return
503
+	}
466
 	org_name := respJSON["org_name"].(string)
504
 	org_name := respJSON["org_name"].(string)
467
 	doctor := respJSON["doctor"].(string)
505
 	doctor := respJSON["doctor"].(string)
468
 	fixmedins_code := respJSON["fixmedins_code"].(string)
506
 	fixmedins_code := respJSON["fixmedins_code"].(string)
473
 	ak := respJSON["ak"].(string)
511
 	ak := respJSON["ak"].(string)
474
 	cainfo := respJSON["cainfo"].(string)
512
 	cainfo := respJSON["cainfo"].(string)
475
 	stmt_loc := respJSON["stmt_loc"].(string)
513
 	stmt_loc := respJSON["stmt_loc"].(string)
476
-	stmt_mon := respJSON["setl_mon"].(string)
514
+	//stmt_mon := respJSON["setl_mon"].(string)
515
+	setl_mon := respJSON["setl_mon"].(string)
477
 
516
 
478
-	result, request := service.Jxyb3270(stmt_mon, stmt_loc, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo)
517
+	result, request := service.Jxyb3270(setl_mon, stmt_loc, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo, hp)
479
 	saveJsLog(result, request, "3270", "3270", org_name)
518
 	saveJsLog(result, request, "3270", "3270", org_name)
480
 	var dat2 map[string]interface{}
519
 	var dat2 map[string]interface{}
481
 	if err := json.Unmarshal([]byte(request), &dat2); err == nil {
520
 	if err := json.Unmarshal([]byte(request), &dat2); err == nil {
499
 		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
538
 		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
500
 		return
539
 		return
501
 	}
540
 	}
541
+	userJSONBytes, _ := json.Marshal(respJSON["solidify_id"])
542
+	var hp []string
543
+	if err := json.Unmarshal(userJSONBytes, &hp); err != nil {
544
+		utils.ErrorLog("解析失败:%v", err)
545
+		return
546
+	}
547
+
502
 	org_name := respJSON["org_name"].(string)
548
 	org_name := respJSON["org_name"].(string)
503
 	doctor := respJSON["doctor"].(string)
549
 	doctor := respJSON["doctor"].(string)
504
 	fixmedins_code := respJSON["fixmedins_code"].(string)
550
 	fixmedins_code := respJSON["fixmedins_code"].(string)
513
 	fix_fill_psn_id := respJSON["fix_fill_psn_id"].(string)
559
 	fix_fill_psn_id := respJSON["fix_fill_psn_id"].(string)
514
 	fix_fill_psn := respJSON["fix_fill_psn"].(string)
560
 	fix_fill_psn := respJSON["fix_fill_psn"].(string)
515
 	fix_fill_date := respJSON["fix_fill_date"].(string)
561
 	fix_fill_date := respJSON["fix_fill_date"].(string)
516
-	result, request := service.Jxyb3271(fix_fill_dept, fix_fill_psn_id, fix_fill_psn, fix_fill_date, stmt_loc, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo)
562
+	setl_mon := respJSON["setl_mon"].(string)
563
+
564
+	result, request := service.Jxyb3271(setl_mon, fix_fill_dept, fix_fill_psn_id, fix_fill_psn, fix_fill_date, stmt_loc, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo, hp)
517
 	saveJsLog(result, request, "3271", "3271", org_name)
565
 	saveJsLog(result, request, "3271", "3271", org_name)
518
 	var dat2 map[string]interface{}
566
 	var dat2 map[string]interface{}
519
 	if err := json.Unmarshal([]byte(request), &dat2); err == nil {
567
 	if err := json.Unmarshal([]byte(request), &dat2); err == nil {
588
 	ak := respJSON["ak"].(string)
636
 	ak := respJSON["ak"].(string)
589
 	cainfo := respJSON["cainfo"].(string)
637
 	cainfo := respJSON["cainfo"].(string)
590
 	stmt_loc := respJSON["stmt_loc"].(string)
638
 	stmt_loc := respJSON["stmt_loc"].(string)
591
-	stmt_mon := respJSON["stmt_mon"].(string)
592
-	result, request := service.Jxyb3273(stmt_mon, stmt_loc, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo)
639
+	//stmt_mon := respJSON["stmt_mon"].(string)
640
+	setl_mon := respJSON["setl_mon"].(string)
641
+
642
+	result, request := service.Jxyb3273(setl_mon, stmt_loc, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo)
593
 	saveJsLog(result, request, "3273", "3273", org_name)
643
 	saveJsLog(result, request, "3273", "3273", org_name)
594
 	var dat2 map[string]interface{}
644
 	var dat2 map[string]interface{}
595
 	if err := json.Unmarshal([]byte(request), &dat2); err == nil {
645
 	if err := json.Unmarshal([]byte(request), &dat2); err == nil {

File diff suppressed because it is too large
+ 1525 - 1060
controllers/sg/his_api_controller.go


+ 10 - 7
main.go View File

1600
 
1600
 
1601
 func GetbrBatchSettleList() {
1601
 func GetbrBatchSettleList() {
1602
 	org_id, _ := beego.AppConfig.Int64("org_id")
1602
 	org_id, _ := beego.AppConfig.Int64("org_id")
1603
-	//var orders []*models.HisOrder
1604
-	var orders []*models.HisOrderError
1603
+	var orders []*models.HisOrder
1604
+	//var orders []*models.HisOrderError
1605
 
1605
 
1606
-	orders, _ = service.GetAllHisOrderErr10278()
1606
+	orders, _ = service.GetAllHisOrder10278()
1607
 	for _, item := range orders {
1607
 	for _, item := range orders {
1608
-		order_id := item.PatientId
1608
+		order_id := item.ID
1609
 		order, _ := service.GetHisOrderByIDTwo(order_id)
1609
 		order, _ := service.GetHisOrderByIDTwo(order_id)
1610
 		//roles, _ := service.GetDoctorListTwo(org_id)
1610
 		//roles, _ := service.GetDoctorListTwo(org_id)
1611
 		his, _ := service.GetHisPatientByNumber(order.MdtrtId)
1611
 		his, _ := service.GetHisPatientByNumber(order.MdtrtId)
1624
 		}
1624
 		}
1625
 
1625
 
1626
 		sickConfig, _ := service.FindSickById(his.SickType)
1626
 		sickConfig, _ := service.FindSickById(his.SickType)
1627
-		service.Gdyb2203A(his.PsnNo, his.Number, doctor_info.UserName, department.Name, miConfig.OrgName, "14", doctor_info.DoctorNumber, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, sickConfig.ContentCode, sickConfig.ClassName, curRoles.UserName, configTwo, strings.Split(time.Unix(his.RecordDate, 0).Format("2006-01-02 15:04:05"), " ")[0]+" 22:00:00")
1627
+		if order.MedType == "1111" || order.MedType == "1112" {
1628
+			order.MedType = "11"
1629
+		}
1630
+		service.Gdyb2203A(his.PsnNo, his.Number, doctor_info.UserName, department.Name, miConfig.OrgName, order.MedType, doctor_info.DoctorNumber, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, sickConfig.ContentCode, sickConfig.ClassName, curRoles.UserName, configTwo, strings.Split(time.Unix(his.RecordDate, 0).Format("2006-01-02 15:04:05"), " ")[0]+" 22:00:00")
1628
 
1631
 
1629
 		depart, _ := service.GetDepartMentDetail(curRoles.DepartmentId)
1632
 		depart, _ := service.GetDepartMentDetail(curRoles.DepartmentId)
1630
 		pre, _ := service.GetNewHisPrescriptionByNumber(order.Number)
1633
 		pre, _ := service.GetNewHisPrescriptionByNumber(order.Number)
2324
 					ErrMsg:    res.ErrMsg + "解析失败",
2327
 					ErrMsg:    res.ErrMsg + "解析失败",
2325
 					Status:    1,
2328
 					Status:    1,
2326
 					PatientId: order_id,
2329
 					PatientId: order_id,
2327
-					Stage:     10278,
2330
+					Stage:     10278000,
2328
 				}
2331
 				}
2329
 				service.CreateErrMsgLog(errlog)
2332
 				service.CreateErrMsgLog(errlog)
2330
 				continue
2333
 				continue
2340
 				ErrMsg:    res.ErrMsg,
2343
 				ErrMsg:    res.ErrMsg,
2341
 				Status:    1,
2344
 				Status:    1,
2342
 				PatientId: order_id,
2345
 				PatientId: order_id,
2343
-				Stage:     10278,
2346
+				Stage:     10278000,
2344
 			}
2347
 			}
2345
 			service.CreateErrMsgLog(errlog)
2348
 			service.CreateErrMsgLog(errlog)
2346
 			continue
2349
 			continue

+ 37 - 24
models/model32xx.go View File

3
 type JSResult3260 struct {
3
 type JSResult3260 struct {
4
 	ErrMsg      string `json:"err_msg"`
4
 	ErrMsg      string `json:"err_msg"`
5
 	InfRefmsgid string `json:"inf_refmsgid"`
5
 	InfRefmsgid string `json:"inf_refmsgid"`
6
-	Infcode     int64  `json:"infcode"`
6
+	Infcode     string `json:"infcode"`
7
 	Output      struct {
7
 	Output      struct {
8
 		Data struct {
8
 		Data struct {
9
 			FixmedinsCode string `json:"fixmedins_code"`
9
 			FixmedinsCode string `json:"fixmedins_code"`
21
 type JSResult3261 struct {
21
 type JSResult3261 struct {
22
 	ErrMsg      string `json:"err_msg"`
22
 	ErrMsg      string `json:"err_msg"`
23
 	InfRefmsgid string `json:"inf_refmsgid"`
23
 	InfRefmsgid string `json:"inf_refmsgid"`
24
-	Infcode     int64  `json:"infcode"`
24
+	Infcode     string `json:"infcode"`
25
 	Output      struct {
25
 	Output      struct {
26
 		Data struct {
26
 		Data struct {
27
 			FixmedinsCode string `json:"fixmedins_code"`
27
 			FixmedinsCode string `json:"fixmedins_code"`
37
 }
37
 }
38
 
38
 
39
 type FixMonRecDetailFileIn struct {
39
 type FixMonRecDetailFileIn struct {
40
+	Insutype      string `json:"insutype"`
41
+	PsnType       string `json:"psn_type"`
42
+	MedType       string `json:"med_type"`
43
+	FixBlngAdmdvs string `json:"fix_blng_admdvs,omitempty"`
44
+	InsuAdmdvs    string `json:"insu_admdvs,omitempty"`
45
+	PsnTime       int    `json:"psn_time"`
46
+	PsnCnt        int    `json:"psn_cnt"`
47
+	Sumamt        string `json:"sumamt"`
48
+	Amt           string `json:"amt"`
49
+	Fund          string `json:"fund"`
50
+	FundKey       string `json:"fund_key"`
51
+}
52
+
53
+type FixMonRecDetailFileInTwo struct {
54
+	SetlDate      string  `json:"setl_date"`
40
 	Insutype      string  `json:"insutype"`
55
 	Insutype      string  `json:"insutype"`
41
 	PsnType       string  `json:"psn_type"`
56
 	PsnType       string  `json:"psn_type"`
42
 	MedType       string  `json:"med_type"`
57
 	MedType       string  `json:"med_type"`
63
 type JSResult3263 struct {
78
 type JSResult3263 struct {
64
 	ErrMsg      string `json:"err_msg"`
79
 	ErrMsg      string `json:"err_msg"`
65
 	InfRefmsgid string `json:"inf_refmsgid"`
80
 	InfRefmsgid string `json:"inf_refmsgid"`
66
-	Infcode     int64  `json:"infcode"`
67
-	Output      struct {
68
-		Data []struct {
69
-			SolidifyID    string  `json:"solidify_id"`
70
-			FixmedinsCode string  `json:"fixmedins_code"`
71
-			FixmedinsName string  `json:"fixmedins_name"`
72
-			FixBlngAdmdvs string  `json:"fix_blng_admdvs"`
73
-			SetlMon       string  `json:"setl_mon"`
74
-			Insutype      string  `json:"insutype"`
75
-			PsnType       string  `json:"psn_type,omitempty"`
76
-			MedType       string  `json:"med_type"`
77
-			InsuAdmdvs    string  `json:"insu_admdvs,omitempty"`
78
-			PsnTime       int     `json:"psn_time"`
79
-			PsnCnt        int     `json:"psn_cnt"`
80
-			MedfeeSumAmt  float64 `json:"medfee_sumamt"`
81
-			InscpAmt      float64 `json:"inscp_amt"`
82
-			FundCode      string  `json:"fund_code"`
83
-			FundName      string  `json:"fund_name,omitempty"`
84
-			FundAmt       float64 `json:"fund_amt"`
85
-		} `json:"data"`
81
+	Infcode     string `json:"infcode"`
82
+	Output      []struct {
83
+		SolidifyID    string  `json:"solidify_id"`
84
+		FixmedinsCode string  `json:"fixmedins_code"`
85
+		FixmedinsName string  `json:"fixmedins_name"`
86
+		FixBlngAdmdvs string  `json:"fix_blng_admdvs"`
87
+		SetlMon       string  `json:"setl_mon"`
88
+		Insutype      string  `json:"insutype"`
89
+		PsnType       string  `json:"psn_type,omitempty"`
90
+		MedType       string  `json:"med_type"`
91
+		InsuAdmdvs    string  `json:"insu_admdvs,omitempty"`
92
+		PsnTime       int     `json:"psn_time"`
93
+		PsnCnt        int     `json:"psn_cnt"`
94
+		MedfeeSumAmt  float64 `json:"medfee_sumamt"`
95
+		InscpAmt      float64 `json:"inscp_amt"`
96
+		FundCode      string  `json:"fund_code"`
97
+		FundName      string  `json:"fund_name,omitempty"`
98
+		FundAmt       float64 `json:"fund_amt"`
86
 	} `json:"output"`
99
 	} `json:"output"`
87
 	RefmsgTime  string      `json:"refmsg_time"`
100
 	RefmsgTime  string      `json:"refmsg_time"`
88
 	RespondTime string      `json:"respond_time"`
101
 	RespondTime string      `json:"respond_time"`
93
 type JSResult3264 struct {
106
 type JSResult3264 struct {
94
 	ErrMsg      string `json:"err_msg"`
107
 	ErrMsg      string `json:"err_msg"`
95
 	InfRefmsgid string `json:"inf_refmsgid"`
108
 	InfRefmsgid string `json:"inf_refmsgid"`
96
-	Infcode     int64  `json:"infcode"`
109
+	Infcode     string `json:"infcode"`
97
 	Output      struct {
110
 	Output      struct {
98
 		Data struct {
111
 		Data struct {
99
 			SolidifyID []string `json:"solidifyIdList,omitempty"`
112
 			SolidifyID []string `json:"solidifyIdList,omitempty"`
195
 	Cainfo      interface{} `json:"cainfo"`
208
 	Cainfo      interface{} `json:"cainfo"`
196
 	ErrMsg      string      `json:"err_msg"`
209
 	ErrMsg      string      `json:"err_msg"`
197
 	InfRefmsgid string      `json:"inf_refmsgid"`
210
 	InfRefmsgid string      `json:"inf_refmsgid"`
198
-	Infcode     int64       `json:"infcode"`
211
+	Infcode     string      `json:"infcode"`
199
 	Output      struct {
212
 	Output      struct {
200
 	} `json:"output"`
213
 	} `json:"output"`
201
 	RefmsgTime  string      `json:"refmsg_time"`
214
 	RefmsgTime  string      `json:"refmsg_time"`

+ 2 - 2
service/gdyb_service.go View File

686
 		med_type = "11"
686
 		med_type = "11"
687
 	}
687
 	}
688
 
688
 
689
-	inputMessage["infno"] = "2203"     // 交易编码
689
+	inputMessage["infno"] = "2203A"    // 交易编码
690
 	inputData["mdtrt_id"] = mdtrtId    // 就诊 ID(来自2201接口返回)
690
 	inputData["mdtrt_id"] = mdtrtId    // 就诊 ID(来自2201接口返回)
691
 	inputData["psn_no"] = psnNo        // 人员编号 (来自1101接口返回)
691
 	inputData["psn_no"] = psnNo        // 人员编号 (来自1101接口返回)
692
 	inputData["med_type"] = med_type   // 医疗类别 16门诊特殊病
692
 	inputData["med_type"] = med_type   // 医疗类别 16门诊特殊病
735
 	if fixmedins_code == "H15049901371" {
735
 	if fixmedins_code == "H15049901371" {
736
 		url = gdyb_url
736
 		url = gdyb_url
737
 	} else {
737
 	} else {
738
-		url = gdyb_url + "2203"
738
+		url = gdyb_url + "2203A"
739
 	}
739
 	}
740
 
740
 
741
 	if insuplc_admdvs == "421300" {
741
 	if insuplc_admdvs == "421300" {

+ 5 - 5
service/his_service.go View File

1501
 }
1501
 }
1502
 
1502
 
1503
 func GetAllHisOrder10278() (his []*models.HisOrder, err error) {
1503
 func GetAllHisOrder10278() (his []*models.HisOrder, err error) {
1504
-	err = readDb.Model(&models.HisOrder{}).Where("id = 263631 and user_org_id = 10278  AND status = 1  AND  order_status = 2 AND setl_id <> ''  AND med_type = '14' AND setl_time >= '2023-04-01 00:00:00'").Order("setl_time asc").Find(&his).Error
1504
+	err = readDb.Model(&models.HisOrder{}).Where(" user_org_id = 10278  AND status = 1  AND  order_status = 2 AND setl_id <> ''  AND setl_time >= '2023-06-01 00:00:00'").Order("setl_time asc").Find(&his).Error
1505
 	fmt.Println(err)
1505
 	fmt.Println(err)
1506
 	return
1506
 	return
1507
 }
1507
 }
1592
 	return
1592
 	return
1593
 }
1593
 }
1594
 
1594
 
1595
-func GetOrderByTimeTen(start_time int64, end_time int64, org_id int64) (orders []*models.FixMonRecDetailFileIn, err error) {
1596
-	err = readDb.Raw("SELECT CONCAT(insutype, '99', med_type, '555555') AS fund_key, insutype, `psn_type`, `med_type`, COUNT(DISTINCT `certno`) AS psn_cnt, count(*) as psn_time, sum(medfee_sumamt) as medfee_sumamt, sum(inscp_scp_amt) as inscp_scp_amt, sum(fund_pay_sumamt) as fund_pay_sumamt FROM his_order where user_org_id = ? and status = 1 and order_status = 2 and setl_time >= ? and setl_time <= ? GROUP BY fund_key", org_id, start_time, end_time).Scan(&orders).Error
1595
+func GetOrderByTimeTen(start_time string, end_time string, org_id int64) (orders []models.FixMonRecDetailFileIn, err error) {
1596
+	err = readDb.Raw("SELECT CONCAT(insutype, '99', med_type, '555555') AS fund_key, insutype, '99' as `psn_type` , `med_type`, COUNT(DISTINCT `certno`) AS psn_cnt, count(*) as psn_time, sum(medfee_sumamt) as sumamt, sum(inscp_scp_amt) as amt, sum(fund_pay_sumamt) as fund FROM his_order where user_org_id = ? and status = 1 and order_status = 2 and setl_time >= ? and setl_time <= ? GROUP BY fund_key", org_id, start_time+" 00:00:00", end_time+" 23:00:00").Scan(&orders).Error
1597
 	return
1597
 	return
1598
 }
1598
 }
1599
 
1599
 
1600
-func GetOrderDetailByTimeTen(start_time int64, end_time int64, org_id int64, fund_key string) (fund []models.FundDetail, err error) {
1601
-	err = readDb.Raw("SELECT CONCAT(insutype, '99', med_type, '555555') as fund_key,  `setl_detail`  FROM his_order where user_org_id = 10188 and status = 1 and order_status = 2 and setl_time >= '2023-04-01 00:00:00' and setl_time <= '2023-04-30 23:59:59'  and CONCAT(insutype, '99', med_type, '555555')  = ?", org_id, start_time, end_time, fund_key).Scan(&fund).Error
1600
+func GetOrderDetailByTimeTen(start_time string, end_time string, org_id int64, fund_key string) (fund []models.FundDetail, err error) {
1601
+	err = readDb.Raw("SELECT CONCAT(insutype, '99', med_type, '555555') as fund_key,  `setl_detail`  FROM his_order where user_org_id = ? and status = 1 and order_status = 2 and setl_time >= ? and setl_time <= ?  and CONCAT(insutype, '99', med_type, '555555')  = ?", org_id, start_time+" 00:00:00", end_time+" 23:59:00", fund_key).Scan(&fund).Error
1602
 	return
1602
 	return
1603
 }
1603
 }
1604
 
1604
 

+ 61 - 23
service/hn_service.go View File

60
 		return err.Error(), ""
60
 		return err.Error(), ""
61
 	}
61
 	}
62
 	request_url = request_url + "1101"
62
 	request_url = request_url + "1101"
63
-	return HNHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "1101"), inputLog
63
+	timestamp2 := time.Now().UnixNano() / int64(time.Millisecond)
64
+
65
+	return HNHttpRequest(request_url, access_key, secret_key, timestamp2, string(bytesData), "1101"), inputLog
64
 }
66
 }
65
 
67
 
66
 //人员基本信息版本2
68
 //人员基本信息版本2
108
 		return err.Error(), ""
110
 		return err.Error(), ""
109
 	}
111
 	}
110
 	request_url = request_url + "1101"
112
 	request_url = request_url + "1101"
111
-	return HNHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "1101"), inputLog
113
+	timestamp2 := time.Now().UnixNano() / int64(time.Millisecond)
114
+
115
+	return HNHttpRequest(request_url, access_key, secret_key, timestamp2, string(bytesData), "1101"), inputLog
112
 }
116
 }
113
 
117
 
114
 func Hnyb1101B(org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, secret_key string, request_url string, access_key string, Token string, cainfo string, id_card_no string) (string, string) {
118
 func Hnyb1101B(org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, secret_key string, request_url string, access_key string, Token string, cainfo string, id_card_no string) (string, string) {
140
 		return err.Error(), ""
144
 		return err.Error(), ""
141
 	}
145
 	}
142
 	request_url = request_url + "1101"
146
 	request_url = request_url + "1101"
143
-	return HNHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "1101"), inputLog
147
+	timestamp2 := time.Now().UnixNano() / int64(time.Millisecond)
148
+
149
+	return HNHttpRequest(request_url, access_key, secret_key, timestamp2, string(bytesData), "1101"), inputLog
144
 }
150
 }
145
 
151
 
146
 func Hnyb1101ForEleCert(org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, secret_key string, request_url string, access_key string, Token string, cainfo string, id_card_no string, name string) (string, string) {
152
 func Hnyb1101ForEleCert(org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, secret_key string, request_url string, access_key string, Token string, cainfo string, id_card_no string, name string) (string, string) {
171
 		return err.Error(), ""
177
 		return err.Error(), ""
172
 	}
178
 	}
173
 	request_url = request_url + "1101"
179
 	request_url = request_url + "1101"
174
-	return HNHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "1101"), inputLog
180
+	timestamp2 := time.Now().UnixNano() / int64(time.Millisecond)
181
+
182
+	return HNHttpRequest(request_url, access_key, secret_key, timestamp2, string(bytesData), "1101"), inputLog
175
 }
183
 }
176
 
184
 
177
 // 门诊挂号
185
 // 门诊挂号
231
 	}
239
 	}
232
 
240
 
233
 	request_url = request_url + "2201"
241
 	request_url = request_url + "2201"
234
-	return HNHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "2201"), requestLog
242
+	timestamp2 := time.Now().UnixNano() / int64(time.Millisecond)
243
+
244
+	return HNHttpRequest(request_url, access_key, secret_key, timestamp2, string(bytesData), "2201"), requestLog
235
 
245
 
236
 }
246
 }
237
 
247
 
264
 	}
274
 	}
265
 
275
 
266
 	request_url = request_url + "2202"
276
 	request_url = request_url + "2202"
277
+	timestamp2 := time.Now().UnixNano() / int64(time.Millisecond)
278
+
267
 	//fmt.Println(HttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData)))
279
 	//fmt.Println(HttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData)))
268
-	return HNHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "2202"), requestLog
280
+	return HNHttpRequest(request_url, access_key, secret_key, timestamp2, string(bytesData), "2202"), requestLog
269
 }
281
 }
270
 
282
 
271
 // 门诊就诊信息上传
283
 // 门诊就诊信息上传
324
 	}
336
 	}
325
 	request_url = request_url + "2203"
337
 	request_url = request_url + "2203"
326
 	//fmt.Println(HttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData)))
338
 	//fmt.Println(HttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData)))
339
+	timestamp2 := time.Now().UnixNano() / int64(time.Millisecond)
327
 
340
 
328
-	return HNHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "2203"), requestLog, timestamp
341
+	return HNHttpRequest(request_url, access_key, secret_key, timestamp2, string(bytesData), "2203"), requestLog, timestamp
329
 }
342
 }
330
 
343
 
331
 // 门诊就诊信息上传
344
 // 门诊就诊信息上传
387
 	}
400
 	}
388
 	request_url = request_url + "2203"
401
 	request_url = request_url + "2203"
389
 	//fmt.Println(HttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData)))
402
 	//fmt.Println(HttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData)))
403
+	timestamp2 := time.Now().UnixNano() / int64(time.Millisecond)
390
 
404
 
391
-	return HNHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "2203"), requestLog
405
+	return HNHttpRequest(request_url, access_key, secret_key, timestamp2, string(bytesData), "2203"), requestLog
392
 }
406
 }
393
 
407
 
394
 //  门诊费用明细信息上传
408
 //  门诊费用明细信息上传
395
 func Hnyb2204(psnNo string, mdtrtId string, hisPrescription []*models.HisPrescription, chrg_bchno string, org_name string, doctor string, dept string, fixmedins_code string, dept_code string, doctor_id string, insuplc_admdvs string, mdtrtarea_admvs string, secret_key string, balance_accounts_type string, diag_code string, request_url string, access_key string, new_doctor_name string, time_stamp_2203 string, cainfo string) (string, string) {
409
 func Hnyb2204(psnNo string, mdtrtId string, hisPrescription []*models.HisPrescription, chrg_bchno string, org_name string, doctor string, dept string, fixmedins_code string, dept_code string, doctor_id string, insuplc_admdvs string, mdtrtarea_admvs string, secret_key string, balance_accounts_type string, diag_code string, request_url string, access_key string, new_doctor_name string, time_stamp_2203 string, cainfo string) (string, string) {
396
 	// 生成签名
410
 	// 生成签名
397
 	//timestamp := time.Now().Unix()
411
 	//timestamp := time.Now().Unix()
398
-	timestamp := time.Now().Unix()
412
+	//timestamp := time.Now().Unix()
399
 
413
 
400
 	timestamp2 := time.Now().Unix()
414
 	timestamp2 := time.Now().Unix()
401
 
415
 
578
 
592
 
579
 	request_url = request_url + "2204"
593
 	request_url = request_url + "2204"
580
 	//fmt.Println(HNHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData)))
594
 	//fmt.Println(HNHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData)))
595
+	timestamp5 := time.Now().UnixNano() / int64(time.Millisecond)
581
 
596
 
582
-	return HNHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "2204"), requestLog
597
+	return HNHttpRequest(request_url, access_key, secret_key, timestamp5, string(bytesData), "2204"), requestLog
583
 }
598
 }
584
 
599
 
585
 //  门诊费用明细信息撤销
600
 //  门诊费用明细信息撤销
612
 		return err.Error(), ""
627
 		return err.Error(), ""
613
 	}
628
 	}
614
 	request_url = request_url + "2205"
629
 	request_url = request_url + "2205"
615
-	return HNHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "2205"), requestLog
630
+	timestamp2 := time.Now().UnixNano() / int64(time.Millisecond)
631
+
632
+	return HNHttpRequest(request_url, access_key, secret_key, timestamp2, string(bytesData), "2205"), requestLog
616
 }
633
 }
617
 
634
 
618
 //  门诊预结算
635
 //  门诊预结算
679
 	}
696
 	}
680
 	request_url = request_url + "2206"
697
 	request_url = request_url + "2206"
681
 	//fmt.Println(HNHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData)))
698
 	//fmt.Println(HNHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData)))
699
+	timestamp2 := time.Now().UnixNano() / int64(time.Millisecond)
682
 
700
 
683
-	return HNHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "2206"), requestLog
701
+	return HNHttpRequest(request_url, access_key, secret_key, timestamp2, string(bytesData), "2206"), requestLog
684
 
702
 
685
 }
703
 }
686
 
704
 
749
 	}
767
 	}
750
 	request_url = request_url + "2206"
768
 	request_url = request_url + "2206"
751
 	//fmt.Println(HNHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData)))
769
 	//fmt.Println(HNHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData)))
770
+	timestamp2 := time.Now().UnixNano() / int64(time.Millisecond)
752
 
771
 
753
-	return HNHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "2206"), requestLog
772
+	return HNHttpRequest(request_url, access_key, secret_key, timestamp2, string(bytesData), "2206"), requestLog
754
 
773
 
755
 }
774
 }
756
 
775
 
815
 		return err.Error(), ""
834
 		return err.Error(), ""
816
 	}
835
 	}
817
 	request_url = request_url + "2207"
836
 	request_url = request_url + "2207"
818
-	return HNHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "2207"), string(bytesData)
837
+	timestamp2 := time.Now().UnixNano() / int64(time.Millisecond)
838
+
839
+	return HNHttpRequest(request_url, access_key, secret_key, timestamp2, string(bytesData), "2207"), string(bytesData)
819
 
840
 
820
 }
841
 }
821
 
842
 
882
 		return err.Error(), ""
903
 		return err.Error(), ""
883
 	}
904
 	}
884
 	request_url = request_url + "2207"
905
 	request_url = request_url + "2207"
885
-	return HNHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "2207"), string(bytesData)
906
+	timestamp2 := time.Now().UnixNano() / int64(time.Millisecond)
907
+
908
+	return HNHttpRequest(request_url, access_key, secret_key, timestamp2, string(bytesData), "2207"), string(bytesData)
886
 
909
 
887
 }
910
 }
888
 
911
 
944
 	}
967
 	}
945
 	request_url = request_url + "2207A"
968
 	request_url = request_url + "2207A"
946
 	//fmt.Println(HNHttpRequestHNHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData)))
969
 	//fmt.Println(HNHttpRequestHNHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData)))
970
+	timestamp2 := time.Now().UnixNano() / int64(time.Millisecond)
947
 
971
 
948
-	return HNHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "2207A"), string(bytesData)
972
+	return HNHttpRequest(request_url, access_key, secret_key, timestamp2, string(bytesData), "2207A"), string(bytesData)
949
 
973
 
950
 }
974
 }
951
 
975
 
973
 		return err.Error(), ""
997
 		return err.Error(), ""
974
 	}
998
 	}
975
 	request_url = request_url + "2208"
999
 	request_url = request_url + "2208"
976
-	return HNHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "2208"), string(bytesData)
1000
+	timestamp2 := time.Now().UnixNano() / int64(time.Millisecond)
1001
+
1002
+	return HNHttpRequest(request_url, access_key, secret_key, timestamp2, string(bytesData), "2208"), string(bytesData)
977
 
1003
 
978
 }
1004
 }
979
 
1005
 
997
 	}
1023
 	}
998
 	baseParams.RequestUrl = baseParams.RequestUrl + "5203"
1024
 	baseParams.RequestUrl = baseParams.RequestUrl + "5203"
999
 	//fmt.Println(HNHttpRequest(baseParams.RequestUrl, baseParams.AccessKey, baseParams.SecretKey, timestamp, string(bytesData)))
1025
 	//fmt.Println(HNHttpRequest(baseParams.RequestUrl, baseParams.AccessKey, baseParams.SecretKey, timestamp, string(bytesData)))
1026
+	timestamp2 := time.Now().UnixNano() / int64(time.Millisecond)
1000
 
1027
 
1001
-	return HNHttpRequest(baseParams.RequestUrl, baseParams.AccessKey, baseParams.SecretKey, timestamp, string(bytesData), "5203"), string(bytesData)
1028
+	return HNHttpRequest(baseParams.RequestUrl, baseParams.AccessKey, baseParams.SecretKey, timestamp2, string(bytesData), "5203"), string(bytesData)
1002
 }
1029
 }
1003
 
1030
 
1004
 //CBS总线
1031
 //CBS总线
1113
 	}
1140
 	}
1114
 
1141
 
1115
 	request_url = request_url + "5301"
1142
 	request_url = request_url + "5301"
1116
-	return HNHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "5301"), string(bytesData)
1143
+	timestamp2 := time.Now().UnixNano() / int64(time.Millisecond)
1144
+
1145
+	return HNHttpRequest(request_url, access_key, secret_key, timestamp2, string(bytesData), "5301"), string(bytesData)
1117
 
1146
 
1118
 }
1147
 }
1119
 
1148
 
1148
 		return err.Error(), ""
1177
 		return err.Error(), ""
1149
 	}
1178
 	}
1150
 	request_url = request_url + "2503"
1179
 	request_url = request_url + "2503"
1151
-	return HNHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "2503"), string(bytesData)
1180
+	timestamp2 := time.Now().UnixNano() / int64(time.Millisecond)
1181
+
1182
+	return HNHttpRequest(request_url, access_key, secret_key, timestamp2, string(bytesData), "2503"), string(bytesData)
1152
 }
1183
 }
1153
 
1184
 
1154
 func Hnyb3201(fixmedins_setl_cnt int64, acct_pay float64, fund_pay_sumamt float64, medfee_sumamt float64, stmt_begndate string, stmt_enddate string, setl_optins string, clr_type string, insutype string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, request_url string, access_key string, secret_key string, cainfo string) (string, string) {
1185
 func Hnyb3201(fixmedins_setl_cnt int64, acct_pay float64, fund_pay_sumamt float64, medfee_sumamt float64, stmt_begndate string, stmt_enddate string, setl_optins string, clr_type string, insutype string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, request_url string, access_key string, secret_key string, cainfo string) (string, string) {
1179
 		return err.Error(), ""
1210
 		return err.Error(), ""
1180
 	}
1211
 	}
1181
 	request_url = request_url + "3201"
1212
 	request_url = request_url + "3201"
1182
-	return HNHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3201"), string(bytesData)
1213
+	timestamp2 := time.Now().UnixNano() / int64(time.Millisecond)
1214
+
1215
+	return HNHttpRequest(request_url, access_key, secret_key, timestamp2, string(bytesData), "3201"), string(bytesData)
1183
 }
1216
 }
1184
 
1217
 
1185
 func Hnyb9001(org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, secret_key string, admin_user_id int64, request_url string, cainfo string, access_key string) (string, string) {
1218
 func Hnyb9001(org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, secret_key string, admin_user_id int64, request_url string, cainfo string, access_key string) (string, string) {
1240
 	//return str, ""
1273
 	//return str, ""
1241
 
1274
 
1242
 	request_url = request_url + "9001"
1275
 	request_url = request_url + "9001"
1243
-	return HNHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "9001"), string(bytesData)
1276
+	timestamp2 := time.Now().UnixNano() / int64(time.Millisecond)
1277
+
1278
+	return HNHttpRequest(request_url, access_key, secret_key, timestamp2, string(bytesData), "9001"), string(bytesData)
1244
 
1279
 
1245
 }
1280
 }
1246
 
1281
 
1714
 	fmt.Println(string(bytesData))
1749
 	fmt.Println(string(bytesData))
1715
 
1750
 
1716
 	params.RequestUrl = params.RequestUrl + "4101"
1751
 	params.RequestUrl = params.RequestUrl + "4101"
1717
-	return HNHttpRequest(params.RequestUrl, params.AccessKey, params.SecretKey, timestamp, string(bytesData), "4101"), string(bytesData)
1752
+	timestamp2 := time.Now().UnixNano() / int64(time.Millisecond)
1753
+
1754
+	return HNHttpRequest(params.RequestUrl, params.AccessKey, params.SecretKey, timestamp2, string(bytesData), "4101"), string(bytesData)
1718
 
1755
 
1719
 }
1756
 }
1720
 
1757
 
1746
 		return err.Error(), ""
1783
 		return err.Error(), ""
1747
 	}
1784
 	}
1748
 	struct3501.RequestUrl = struct3501.RequestUrl + "3501"
1785
 	struct3501.RequestUrl = struct3501.RequestUrl + "3501"
1786
+
1749
 	return HNHttpRequest(struct3501.RequestUrl, struct3501.AccessKey, struct3501.SecretKey, timestamp, string(bytesData), "3501"), string(bytesData)
1787
 	return HNHttpRequest(struct3501.RequestUrl, struct3501.AccessKey, struct3501.SecretKey, timestamp, string(bytesData), "3501"), string(bytesData)
1750
 
1788
 
1751
 }
1789
 }

+ 103 - 78
service/jsyb_service.go View File

2009
 	timestamp := time.Now().Unix()
2009
 	timestamp := time.Now().Unix()
2010
 	// 生成输入报文
2010
 	// 生成输入报文
2011
 	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2011
 	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2012
-	input := make(map[string]interface{})
2012
+	//input := make(map[string]interface{})
2013
 	inputData := make(map[string]interface{})
2013
 	inputData := make(map[string]interface{})
2014
 	inputMessage["infno"] = "3260"               // 交易编码
2014
 	inputMessage["infno"] = "3260"               // 交易编码
2015
 	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2015
 	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2016
 	inputData["fixmedins_name"] = org_name       //对帐结束时间
2016
 	inputData["fixmedins_name"] = org_name       //对帐结束时间
2017
 	inputData["fix_blng_admdvs"] = setl_optins   //医疗费总额
2017
 	inputData["fix_blng_admdvs"] = setl_optins   //医疗费总额
2018
 
2018
 
2019
-	input["data"] = inputData
2020
-	inputMessage["input"] = input //交易输入
2019
+	//input["data"] = inputData
2020
+	inputMessage["input"] = inputData //交易输入
2021
 	bytesData, err := json.Marshal(inputMessage)
2021
 	bytesData, err := json.Marshal(inputMessage)
2022
 	fmt.Println(string(bytesData))
2022
 	fmt.Println(string(bytesData))
2023
 	if err != nil {
2023
 	if err != nil {
2025
 		return err.Error(), ""
2025
 		return err.Error(), ""
2026
 	}
2026
 	}
2027
 	request_url = request_url + "3260"
2027
 	request_url = request_url + "3260"
2028
-	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3260"), string(bytesData)
2028
+	return HttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData)), string(bytesData)
2029
 }
2029
 }
2030
 
2030
 
2031
 // 月度对账状态查询
2031
 // 月度对账状态查询
2034
 	timestamp := time.Now().Unix()
2034
 	timestamp := time.Now().Unix()
2035
 	// 生成输入报文
2035
 	// 生成输入报文
2036
 	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2036
 	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2037
-	input := make(map[string]interface{})
2037
+	//input := make(map[string]interface{})
2038
 	inputData := make(map[string]interface{})
2038
 	inputData := make(map[string]interface{})
2039
 	inputMessage["infno"] = "3261"               // 交易编码
2039
 	inputMessage["infno"] = "3261"               // 交易编码
2040
 	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2040
 	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2042
 	inputData["fix_blng_admdvs"] = setl_optins   //医疗费总额
2042
 	inputData["fix_blng_admdvs"] = setl_optins   //医疗费总额
2043
 	inputData["stmt_mon"] = stmt_mon             //医疗费总额
2043
 	inputData["stmt_mon"] = stmt_mon             //医疗费总额
2044
 
2044
 
2045
-	input["data"] = inputData
2046
-	inputMessage["input"] = input //交易输入
2045
+	//input["data"] = inputData
2046
+	inputMessage["input"] = inputData //交易输入
2047
 	bytesData, err := json.Marshal(inputMessage)
2047
 	bytesData, err := json.Marshal(inputMessage)
2048
 	fmt.Println(string(bytesData))
2048
 	fmt.Println(string(bytesData))
2049
 	if err != nil {
2049
 	if err != nil {
2051
 		return err.Error(), ""
2051
 		return err.Error(), ""
2052
 	}
2052
 	}
2053
 	request_url = request_url + "3261"
2053
 	request_url = request_url + "3261"
2054
-	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3261"), string(bytesData)
2054
+	return HttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData)), string(bytesData)
2055
 }
2055
 }
2056
-func Jxyb3262(org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, request_url string, access_key string, secret_key string, cainfo string, upld_btch string, fix_fill_dept string, fix_fill_psn_id string, fix_fill_psn string, fix_fill_date string, stmt_loc string, hp []models.FixMonRecDetailFileIn, funds []models.Fund) (string, string) {
2056
+func Jxyb3262(setl_mon, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, request_url string, access_key string, secret_key string, cainfo string, upld_btch string, fix_fill_dept string, fix_fill_psn_id string, fix_fill_psn string, fix_fill_date string, stmt_loc string, hp []models.FixMonRecDetailFileInTwo, funds []models.Fund) (string, string) {
2057
 	// 生成签名
2057
 	// 生成签名
2058
 	timestamp := time.Now().Unix()
2058
 	timestamp := time.Now().Unix()
2059
 	// 生成输入报文
2059
 	// 生成输入报文
2060
 	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2060
 	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2061
-	input := make(map[string]interface{})
2061
+	//input := make(map[string]interface{})
2062
 	inputData := make(map[string]interface{})
2062
 	inputData := make(map[string]interface{})
2063
 
2063
 
2064
 	fixMonRecDetailFileIns := make([]map[string]interface{}, 0)
2064
 	fixMonRecDetailFileIns := make([]map[string]interface{}, 0)
2072
 	inputData["fix_fill_date"] = fix_fill_date
2072
 	inputData["fix_fill_date"] = fix_fill_date
2073
 	inputData["stmt_loc"] = stmt_loc
2073
 	inputData["stmt_loc"] = stmt_loc
2074
 	inputData["upld_btch"] = upld_btch
2074
 	inputData["upld_btch"] = upld_btch
2075
+	inputData["setl_mon"] = setl_mon
2075
 
2076
 
2076
 	for _, item := range hp {
2077
 	for _, item := range hp {
2077
 		fixMonRecDetailFileIn := make(map[string]interface{})
2078
 		fixMonRecDetailFileIn := make(map[string]interface{})
2078
 		fixMonRecDetailFileIn["insutype"] = item.Insutype
2079
 		fixMonRecDetailFileIn["insutype"] = item.Insutype
2079
 		fixMonRecDetailFileIn["psn_type"] = item.PsnType
2080
 		fixMonRecDetailFileIn["psn_type"] = item.PsnType
2080
 		fixMonRecDetailFileIn["med_type"] = item.MedType
2081
 		fixMonRecDetailFileIn["med_type"] = item.MedType
2081
-		fixMonRecDetailFileIn["fix_blng_admdvs"] = item.FixBlngAdmdvs
2082
-		fixMonRecDetailFileIn["insu_admdvs"] = item.InsuAdmdvs
2082
+		fixMonRecDetailFileIn["fix_blng_admdvs"] = mdtrtarea_admvs
2083
+		fixMonRecDetailFileIn["insu_admdvs"] = insuplc_admdvs
2083
 		fixMonRecDetailFileIn["psn_time"] = item.PsnTime
2084
 		fixMonRecDetailFileIn["psn_time"] = item.PsnTime
2084
 		fixMonRecDetailFileIn["psn_cnt"] = item.PsnCnt
2085
 		fixMonRecDetailFileIn["psn_cnt"] = item.PsnCnt
2085
 		fixMonRecDetailFileIn["medfee_sumamt"] = item.MedfeeSumAmt
2086
 		fixMonRecDetailFileIn["medfee_sumamt"] = item.MedfeeSumAmt
2104
 
2105
 
2105
 	inputData["fixMonRecDetailFileInList"] = fixMonRecDetailFileIns
2106
 	inputData["fixMonRecDetailFileInList"] = fixMonRecDetailFileIns
2106
 	inputData["fundList"] = fundList
2107
 	inputData["fundList"] = fundList
2107
-	input["data"] = inputData
2108
-	inputMessage["input"] = input //交易输入
2108
+	//input["data"] = inputData
2109
+	inputMessage["input"] = inputData //交易输入
2109
 	bytesData, err := json.Marshal(inputMessage)
2110
 	bytesData, err := json.Marshal(inputMessage)
2110
 	fmt.Println(string(bytesData))
2111
 	fmt.Println(string(bytesData))
2111
 	if err != nil {
2112
 	if err != nil {
2113
 		return err.Error(), ""
2114
 		return err.Error(), ""
2114
 	}
2115
 	}
2115
 	request_url = request_url + "3262"
2116
 	request_url = request_url + "3262"
2116
-	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3262"), string(bytesData)
2117
+	return HttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData)), string(bytesData)
2117
 }
2118
 }
2118
 func Jxyb3263(stmt_mon string, stmt_loc string, upld_btch string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, request_url string, access_key string, secret_key string, cainfo string) (string, string) {
2119
 func Jxyb3263(stmt_mon string, stmt_loc string, upld_btch string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, request_url string, access_key string, secret_key string, cainfo string) (string, string) {
2119
 	// 生成签名
2120
 	// 生成签名
2120
 	timestamp := time.Now().Unix()
2121
 	timestamp := time.Now().Unix()
2121
 	// 生成输入报文
2122
 	// 生成输入报文
2122
 	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2123
 	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2123
-	input := make(map[string]interface{})
2124
+	//input := make(map[string]interface{})
2124
 	inputData := make(map[string]interface{})
2125
 	inputData := make(map[string]interface{})
2125
 	inputMessage["infno"] = "3263"               // 交易编码
2126
 	inputMessage["infno"] = "3263"               // 交易编码
2126
 	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2127
 	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2127
 	inputData["fixmedins_name"] = org_name       //对帐结束时间
2128
 	inputData["fixmedins_name"] = org_name       //对帐结束时间
2128
-	inputData["stmt_mon"] = stmt_mon             //医疗费总额
2129
+	inputData["setl_mon"] = stmt_mon             //医疗费总额
2129
 	inputData["stmt_loc"] = stmt_loc             //医疗费总额
2130
 	inputData["stmt_loc"] = stmt_loc             //医疗费总额
2130
 	inputData["upld_btch"] = upld_btch           //医疗费总额
2131
 	inputData["upld_btch"] = upld_btch           //医疗费总额
2131
 
2132
 
2132
-	input["data"] = inputData
2133
-	inputMessage["input"] = input //交易输入
2133
+	//input["data"] = inputData
2134
+	inputMessage["input"] = inputData //交易输入
2134
 	bytesData, err := json.Marshal(inputMessage)
2135
 	bytesData, err := json.Marshal(inputMessage)
2135
 	fmt.Println(string(bytesData))
2136
 	fmt.Println(string(bytesData))
2136
 	if err != nil {
2137
 	if err != nil {
2138
 		return err.Error(), ""
2139
 		return err.Error(), ""
2139
 	}
2140
 	}
2140
 	request_url = request_url + "3263"
2141
 	request_url = request_url + "3263"
2141
-	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3263"), string(bytesData)
2142
+	return HttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData)), string(bytesData)
2142
 }
2143
 }
2143
-func Jxyb3264(stmt_mon string, stmt_loc string, upld_btch string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, request_url string, access_key string, secret_key string, cainfo string) (string, string) {
2144
+func Jxyb3264(stmt_mon string, stmt_loc string, upld_btch string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, request_url string, access_key string, secret_key string, cainfo string, hp []string) (string, string) {
2144
 	// 生成签名
2145
 	// 生成签名
2145
 	timestamp := time.Now().Unix()
2146
 	timestamp := time.Now().Unix()
2146
 	// 生成输入报文
2147
 	// 生成输入报文
2147
 	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2148
 	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2148
-	input := make(map[string]interface{})
2149
+	//input := make(map[string]interface{})
2149
 	inputData := make(map[string]interface{})
2150
 	inputData := make(map[string]interface{})
2150
 	inputMessage["infno"] = "3264"               // 交易编码
2151
 	inputMessage["infno"] = "3264"               // 交易编码
2151
 	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2152
 	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2152
 	inputData["fixmedins_name"] = org_name       //对帐结束时间
2153
 	inputData["fixmedins_name"] = org_name       //对帐结束时间
2153
-	inputData["stmt_mon"] = stmt_mon             //医疗费总额
2154
+	inputData["setl_mon"] = stmt_mon             //医疗费总额
2154
 	inputData["stmt_loc"] = stmt_loc             //医疗费总额
2155
 	inputData["stmt_loc"] = stmt_loc             //医疗费总额
2155
 	inputData["upld_btch"] = upld_btch           //医疗费总额
2156
 	inputData["upld_btch"] = upld_btch           //医疗费总额
2157
+	//inputData["solidifyIdList"] = hp          //医疗费总额
2158
+	if len(hp) == 0 {
2159
+		inputData["solidifyIdList"] = make([]string, 0) //医疗费总额
2160
+	} else {
2161
+		inputData["solidifyIdList"] = hp //医疗费总额
2156
 
2162
 
2157
-	input["data"] = inputData
2158
-	inputMessage["input"] = input //交易输入
2163
+	}
2164
+	//input["data"] = inputData
2165
+	inputMessage["input"] = inputData //交易输入
2159
 	bytesData, err := json.Marshal(inputMessage)
2166
 	bytesData, err := json.Marshal(inputMessage)
2160
 	fmt.Println(string(bytesData))
2167
 	fmt.Println(string(bytesData))
2161
 	if err != nil {
2168
 	if err != nil {
2163
 		return err.Error(), ""
2170
 		return err.Error(), ""
2164
 	}
2171
 	}
2165
 	request_url = request_url + "3264"
2172
 	request_url = request_url + "3264"
2166
-	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3264"), string(bytesData)
2173
+	return HttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData)), string(bytesData)
2167
 }
2174
 }
2168
-func Jxyb3265(stmt_mon string, fix_fill_dept string, fix_fill_psn_id string, fix_fill_psn string, fix_fill_date string, stmt_loc string, upld_btch string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, request_url string, access_key string, secret_key string, cainfo string) (string, string) {
2175
+func Jxyb3265(stmt_mon string, fix_fill_dept string, fix_fill_psn_id string, fix_fill_psn string, fix_fill_date string, stmt_loc string, upld_btch string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, request_url string, access_key string, secret_key string, cainfo string, hp []string) (string, string) {
2169
 	// 生成签名
2176
 	// 生成签名
2170
 	timestamp := time.Now().Unix()
2177
 	timestamp := time.Now().Unix()
2171
 	// 生成输入报文
2178
 	// 生成输入报文
2172
 	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2179
 	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2173
-	input := make(map[string]interface{})
2180
+	//input := make(map[string]interface{})
2174
 	inputData := make(map[string]interface{})
2181
 	inputData := make(map[string]interface{})
2175
 
2182
 
2176
 	//solidifyId := make(map[string]interface{})
2183
 	//solidifyId := make(map[string]interface{})
2178
 	inputMessage["infno"] = "3265"                 // 交易编码
2185
 	inputMessage["infno"] = "3265"                 // 交易编码
2179
 	inputData["fixmedins_code"] = fixmedins_code   // 对帐开始时间
2186
 	inputData["fixmedins_code"] = fixmedins_code   // 对帐开始时间
2180
 	inputData["fixmedins_name"] = org_name         //对帐结束时间
2187
 	inputData["fixmedins_name"] = org_name         //对帐结束时间
2181
-	inputData["stmt_mon"] = stmt_mon               //医疗费总额
2188
+	inputData["setl_mon"] = stmt_mon               //医疗费总额
2182
 	inputData["fix_fill_dept"] = fix_fill_dept     //对帐结束时间
2189
 	inputData["fix_fill_dept"] = fix_fill_dept     //对帐结束时间
2183
 	inputData["fix_fill_psn_id"] = fix_fill_psn_id //对帐结束时间
2190
 	inputData["fix_fill_psn_id"] = fix_fill_psn_id //对帐结束时间
2184
 	inputData["fix_fill_psn"] = fix_fill_psn       //对帐结束时间
2191
 	inputData["fix_fill_psn"] = fix_fill_psn       //对帐结束时间
2185
 	inputData["fix_fill_date"] = fix_fill_date     //对帐结束时间
2192
 	inputData["fix_fill_date"] = fix_fill_date     //对帐结束时间
2186
 	inputData["stmt_loc"] = stmt_loc               //医疗费总额
2193
 	inputData["stmt_loc"] = stmt_loc               //医疗费总额
2187
 	inputData["upld_btch"] = upld_btch             //医疗费总额
2194
 	inputData["upld_btch"] = upld_btch             //医疗费总额
2195
+	fmt.Println(hp)
2196
+	if len(hp) == 0 {
2197
+		inputData["solidifyIdList"] = make([]string, 0) //医疗费总额
2198
+	} else {
2199
+		inputData["solidifyIdList"] = hp //医疗费总额
2188
 
2200
 
2189
-	inputData["solidifyIdList"] = "" //医疗费总额
2201
+	}
2190
 
2202
 
2191
-	input["data"] = inputData
2192
-	inputMessage["input"] = input //交易输入
2203
+	//input["data"] = inputData
2204
+	inputMessage["input"] = inputData //交易输入
2193
 	bytesData, err := json.Marshal(inputMessage)
2205
 	bytesData, err := json.Marshal(inputMessage)
2194
 	fmt.Println(string(bytesData))
2206
 	fmt.Println(string(bytesData))
2195
 	if err != nil {
2207
 	if err != nil {
2197
 		return err.Error(), ""
2209
 		return err.Error(), ""
2198
 	}
2210
 	}
2199
 	request_url = request_url + "3265"
2211
 	request_url = request_url + "3265"
2200
-	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3265"), string(bytesData)
2212
+	return HttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData)), string(bytesData)
2201
 }
2213
 }
2202
 func Jxyb3266(stmt_mon string, fix_fill_dept string, fix_fill_psn_id string, fix_fill_psn string, fix_fill_date string, stmt_loc string, upld_btch string, fix_blng_admdvs string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, request_url string, access_key string, secret_key string, cainfo string) (string, string) {
2214
 func Jxyb3266(stmt_mon string, fix_fill_dept string, fix_fill_psn_id string, fix_fill_psn string, fix_fill_date string, stmt_loc string, upld_btch string, fix_blng_admdvs string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, request_url string, access_key string, secret_key string, cainfo string) (string, string) {
2203
 	// 生成签名
2215
 	// 生成签名
2204
 	timestamp := time.Now().Unix()
2216
 	timestamp := time.Now().Unix()
2205
 	// 生成输入报文
2217
 	// 生成输入报文
2206
 	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2218
 	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2207
-	input := make(map[string]interface{})
2219
+	//input := make(map[string]interface{})
2208
 	inputData := make(map[string]interface{})
2220
 	inputData := make(map[string]interface{})
2209
 	inputMessage["infno"] = "3266"               // 交易编码
2221
 	inputMessage["infno"] = "3266"               // 交易编码
2210
 	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2222
 	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2211
 	inputData["fixmedins_name"] = org_name       //对帐结束时间
2223
 	inputData["fixmedins_name"] = org_name       //对帐结束时间
2212
 
2224
 
2213
 	inputData["fix_blng_admdvs"] = fix_blng_admdvs //对帐结束时间
2225
 	inputData["fix_blng_admdvs"] = fix_blng_admdvs //对帐结束时间
2214
-	inputData["stmt_mon"] = stmt_mon               //医疗费总额
2226
+	inputData["setl_mon"] = stmt_mon               //医疗费总额
2215
 	inputData["fix_fill_dept"] = fix_fill_dept     //对帐结束时间
2227
 	inputData["fix_fill_dept"] = fix_fill_dept     //对帐结束时间
2216
 	inputData["fix_fill_psn_id"] = fix_fill_psn_id //对帐结束时间
2228
 	inputData["fix_fill_psn_id"] = fix_fill_psn_id //对帐结束时间
2217
 	inputData["fix_fill_psn"] = fix_fill_psn       //对帐结束时间
2229
 	inputData["fix_fill_psn"] = fix_fill_psn       //对帐结束时间
2219
 	inputData["stmt_loc"] = stmt_loc               //医疗费总额
2231
 	inputData["stmt_loc"] = stmt_loc               //医疗费总额
2220
 	inputData["upld_btch"] = upld_btch             //医疗费总额
2232
 	inputData["upld_btch"] = upld_btch             //医疗费总额
2221
 
2233
 
2222
-	input["data"] = inputData
2223
-	inputMessage["input"] = input //交易输入
2234
+	//input["data"] = inputData
2235
+	inputMessage["input"] = inputData //交易输入
2224
 	bytesData, err := json.Marshal(inputMessage)
2236
 	bytesData, err := json.Marshal(inputMessage)
2225
 	fmt.Println(string(bytesData))
2237
 	fmt.Println(string(bytesData))
2226
 	if err != nil {
2238
 	if err != nil {
2228
 		return err.Error(), ""
2240
 		return err.Error(), ""
2229
 	}
2241
 	}
2230
 	request_url = request_url + "3266"
2242
 	request_url = request_url + "3266"
2231
-	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3266"), string(bytesData)
2243
+	return HttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData)), string(bytesData)
2232
 }
2244
 }
2233
 func Jxyb3267(stmt_mon string, stmt_loc string, upld_btch string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, request_url string, access_key string, secret_key string, cainfo string) (string, string) {
2245
 func Jxyb3267(stmt_mon string, stmt_loc string, upld_btch string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, request_url string, access_key string, secret_key string, cainfo string) (string, string) {
2234
 	// 生成签名
2246
 	// 生成签名
2235
 	timestamp := time.Now().Unix()
2247
 	timestamp := time.Now().Unix()
2236
 	// 生成输入报文
2248
 	// 生成输入报文
2237
 	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2249
 	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2238
-	input := make(map[string]interface{})
2250
+	//input := make(map[string]interface{})
2239
 	inputData := make(map[string]interface{})
2251
 	inputData := make(map[string]interface{})
2240
 	inputMessage["infno"] = "3267"               // 交易编码
2252
 	inputMessage["infno"] = "3267"               // 交易编码
2241
 	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2253
 	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2242
 	inputData["fixmedins_name"] = org_name       //对帐结束时间
2254
 	inputData["fixmedins_name"] = org_name       //对帐结束时间
2243
-	inputData["stmt_mon"] = stmt_mon             //医疗费总额
2255
+	inputData["setl_mon"] = stmt_mon             //医疗费总额
2244
 	inputData["stmt_loc"] = stmt_loc             //医疗费总额
2256
 	inputData["stmt_loc"] = stmt_loc             //医疗费总额
2245
 	inputData["upld_btch"] = upld_btch           //医疗费总额
2257
 	inputData["upld_btch"] = upld_btch           //医疗费总额
2246
 
2258
 
2247
-	input["data"] = inputData
2248
-	inputMessage["input"] = input //交易输入
2259
+	//input["data"] = inputData
2260
+	inputMessage["input"] = inputData //交易输入
2249
 	bytesData, err := json.Marshal(inputMessage)
2261
 	bytesData, err := json.Marshal(inputMessage)
2250
 	fmt.Println(string(bytesData))
2262
 	fmt.Println(string(bytesData))
2251
 	if err != nil {
2263
 	if err != nil {
2253
 		return err.Error(), ""
2265
 		return err.Error(), ""
2254
 	}
2266
 	}
2255
 	request_url = request_url + "3267"
2267
 	request_url = request_url + "3267"
2256
-	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3267"), string(bytesData)
2268
+	return HttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData)), string(bytesData)
2257
 }
2269
 }
2258
-func Jxyb3268(org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, request_url string, access_key string, secret_key string, cainfo string, upld_btch string, fix_fill_dept string, fix_fill_psn_id string, fix_fill_psn string, fix_fill_date string, stmt_loc string, hp []models.FixMonRecDetailFileIn, funds []models.Fund) (string, string) {
2270
+func Jxyb3268(setl_mon string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, request_url string, access_key string, secret_key string, cainfo string, upld_btch string, fix_fill_dept string, fix_fill_psn_id string, fix_fill_psn string, fix_fill_date string, stmt_loc string, hp []models.FixMonRecDetailFileInTwo, funds []models.Fund) (string, string) {
2259
 	// 生成签名
2271
 	// 生成签名
2260
 	timestamp := time.Now().Unix()
2272
 	timestamp := time.Now().Unix()
2261
 	// 生成输入报文
2273
 	// 生成输入报文
2262
 	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2274
 	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2263
-	input := make(map[string]interface{})
2275
+	//input := make(map[string]interface{})
2264
 	inputData := make(map[string]interface{})
2276
 	inputData := make(map[string]interface{})
2265
 
2277
 
2266
 	fixMonRecDetailFileIns := make([]map[string]interface{}, 0)
2278
 	fixMonRecDetailFileIns := make([]map[string]interface{}, 0)
2269
 	inputMessage["infno"] = "3268"               // 交易编码
2281
 	inputMessage["infno"] = "3268"               // 交易编码
2270
 	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2282
 	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2271
 	inputData["fixmedins_name"] = org_name       //对帐结束时间
2283
 	inputData["fixmedins_name"] = org_name       //对帐结束时间
2284
+	inputData["upld_btch"] = upld_btch
2272
 
2285
 
2273
-	inputData["setl_mon"] = "" //对帐结束时间
2286
+	inputData["setl_mon"] = setl_mon //对帐结束时间
2274
 	inputData["fix_fill_dept"] = fix_fill_dept
2287
 	inputData["fix_fill_dept"] = fix_fill_dept
2275
 	inputData["fix_fill_psn_id"] = fix_fill_psn_id
2288
 	inputData["fix_fill_psn_id"] = fix_fill_psn_id
2276
 	inputData["fix_fill_psn"] = fix_fill_psn
2289
 	inputData["fix_fill_psn"] = fix_fill_psn
2279
 
2292
 
2280
 	for _, item := range hp {
2293
 	for _, item := range hp {
2281
 		fixMonRecDetailFileIn := make(map[string]interface{})
2294
 		fixMonRecDetailFileIn := make(map[string]interface{})
2282
-		fixMonRecDetailFileIn["setl_date"] = ""
2295
+		fixMonRecDetailFileIn["setl_date"] = item.SetlDate
2283
 		fixMonRecDetailFileIn["insutype"] = item.Insutype
2296
 		fixMonRecDetailFileIn["insutype"] = item.Insutype
2284
 		fixMonRecDetailFileIn["psn_type"] = item.PsnType
2297
 		fixMonRecDetailFileIn["psn_type"] = item.PsnType
2285
 		fixMonRecDetailFileIn["med_type"] = item.MedType
2298
 		fixMonRecDetailFileIn["med_type"] = item.MedType
2286
-		fixMonRecDetailFileIn["fix_blng_admdvs"] = item.FixBlngAdmdvs
2287
-		fixMonRecDetailFileIn["insu_admdvs"] = item.InsuAdmdvs
2299
+		fixMonRecDetailFileIn["fix_blng_admdvs"] = mdtrtarea_admvs
2300
+		fixMonRecDetailFileIn["insu_admdvs"] = insuplc_admdvs
2288
 		fixMonRecDetailFileIn["psn_time"] = item.PsnTime
2301
 		fixMonRecDetailFileIn["psn_time"] = item.PsnTime
2289
 		fixMonRecDetailFileIn["psn_cnt"] = item.PsnCnt
2302
 		fixMonRecDetailFileIn["psn_cnt"] = item.PsnCnt
2290
 		fixMonRecDetailFileIn["medfee_sumamt"] = item.MedfeeSumAmt
2303
 		fixMonRecDetailFileIn["medfee_sumamt"] = item.MedfeeSumAmt
2311
 	inputData["fixDateRecDetailFileInList"] = fixMonRecDetailFileIns
2324
 	inputData["fixDateRecDetailFileInList"] = fixMonRecDetailFileIns
2312
 	inputData["fundList"] = fundList
2325
 	inputData["fundList"] = fundList
2313
 
2326
 
2314
-	input["data"] = inputData
2315
-	inputMessage["input"] = input //交易输入
2327
+	//input["data"] = inputData
2328
+	inputMessage["input"] = inputData //交易输入
2316
 	bytesData, err := json.Marshal(inputMessage)
2329
 	bytesData, err := json.Marshal(inputMessage)
2317
 	fmt.Println(string(bytesData))
2330
 	fmt.Println(string(bytesData))
2318
 	if err != nil {
2331
 	if err != nil {
2320
 		return err.Error(), ""
2333
 		return err.Error(), ""
2321
 	}
2334
 	}
2322
 	request_url = request_url + "3268"
2335
 	request_url = request_url + "3268"
2323
-	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3268"), string(bytesData)
2336
+	return HttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData)), string(bytesData)
2324
 }
2337
 }
2325
 func Jxyb3269(stmt_mon string, stmt_loc string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, request_url string, access_key string, secret_key string, cainfo string) (string, string) {
2338
 func Jxyb3269(stmt_mon string, stmt_loc string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, request_url string, access_key string, secret_key string, cainfo string) (string, string) {
2326
 	// 生成签名
2339
 	// 生成签名
2327
 	timestamp := time.Now().Unix()
2340
 	timestamp := time.Now().Unix()
2328
 	// 生成输入报文
2341
 	// 生成输入报文
2329
 	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2342
 	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2330
-	input := make(map[string]interface{})
2343
+	//input := make(map[string]interface{})
2331
 	inputData := make(map[string]interface{})
2344
 	inputData := make(map[string]interface{})
2332
 	inputMessage["infno"] = "3269"               // 交易编码
2345
 	inputMessage["infno"] = "3269"               // 交易编码
2333
 	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2346
 	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2334
 	inputData["fixmedins_name"] = org_name       //对帐结束时间
2347
 	inputData["fixmedins_name"] = org_name       //对帐结束时间
2335
-	inputData["stmt_mon"] = stmt_mon             //医疗费总额
2348
+	inputData["setl_mon"] = stmt_mon             //医疗费总额
2336
 	inputData["stmt_loc"] = stmt_loc             //医疗费总额
2349
 	inputData["stmt_loc"] = stmt_loc             //医疗费总额
2337
 
2350
 
2338
-	input["data"] = inputData
2339
-	inputMessage["input"] = input //交易输入
2351
+	//input["data"] = inputData
2352
+	inputMessage["input"] = inputData //交易输入
2340
 	bytesData, err := json.Marshal(inputMessage)
2353
 	bytesData, err := json.Marshal(inputMessage)
2341
 	fmt.Println(string(bytesData))
2354
 	fmt.Println(string(bytesData))
2342
 	if err != nil {
2355
 	if err != nil {
2344
 		return err.Error(), ""
2357
 		return err.Error(), ""
2345
 	}
2358
 	}
2346
 	request_url = request_url + "3269"
2359
 	request_url = request_url + "3269"
2347
-	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3269"), string(bytesData)
2360
+	return HttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData)), string(bytesData)
2348
 }
2361
 }
2349
-func Jxyb3270(stmt_mon string, stmt_loc string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, request_url string, access_key string, secret_key string, cainfo string) (string, string) {
2362
+func Jxyb3270(setl_mon string, stmt_loc string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, request_url string, access_key string, secret_key string, cainfo string, hp []string) (string, string) {
2350
 	// 生成签名
2363
 	// 生成签名
2351
 	timestamp := time.Now().Unix()
2364
 	timestamp := time.Now().Unix()
2352
 	// 生成输入报文
2365
 	// 生成输入报文
2353
 	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2366
 	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2354
-	input := make(map[string]interface{})
2367
+	//input := make(map[string]interface{})
2355
 	inputData := make(map[string]interface{})
2368
 	inputData := make(map[string]interface{})
2356
 	inputMessage["infno"] = "3270"               // 交易编码
2369
 	inputMessage["infno"] = "3270"               // 交易编码
2357
 	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2370
 	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2358
 	inputData["fixmedins_name"] = org_name       //对帐结束时间
2371
 	inputData["fixmedins_name"] = org_name       //对帐结束时间
2359
-	inputData["stmt_mon"] = stmt_mon             //医疗费总额
2372
+	inputData["setl_mon"] = setl_mon             //医疗费总额
2360
 	inputData["stmt_loc"] = stmt_loc             //医疗费总额
2373
 	inputData["stmt_loc"] = stmt_loc             //医疗费总额
2374
+	//inputData["solidifyIdList"] = hp          //医疗费总额
2375
+	if len(hp) == 0 {
2376
+		inputData["solidifyIdList"] = make([]string, 0) //医疗费总额
2377
+	} else {
2378
+		inputData["solidifyIdList"] = hp //医疗费总额
2361
 
2379
 
2362
-	input["data"] = inputData
2363
-	inputMessage["input"] = input //交易输入
2380
+	}
2381
+	//input["data"] = inputData
2382
+	inputMessage["input"] = inputData //交易输入
2364
 	bytesData, err := json.Marshal(inputMessage)
2383
 	bytesData, err := json.Marshal(inputMessage)
2365
 	fmt.Println(string(bytesData))
2384
 	fmt.Println(string(bytesData))
2366
 	if err != nil {
2385
 	if err != nil {
2368
 		return err.Error(), ""
2387
 		return err.Error(), ""
2369
 	}
2388
 	}
2370
 	request_url = request_url + "3270"
2389
 	request_url = request_url + "3270"
2371
-	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3270"), string(bytesData)
2390
+	return HttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData)), string(bytesData)
2372
 }
2391
 }
2373
-func Jxyb3271(fix_fill_dept string, fix_fill_psn_id string, fix_fill_psn string, fix_fill_date string, stmt_loc string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, request_url string, access_key string, secret_key string, cainfo string) (string, string) {
2392
+func Jxyb3271(stmt_mon string, fix_fill_dept string, fix_fill_psn_id string, fix_fill_psn string, fix_fill_date string, stmt_loc string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, request_url string, access_key string, secret_key string, cainfo string, hp []string) (string, string) {
2374
 	// 生成签名
2393
 	// 生成签名
2375
 	timestamp := time.Now().Unix()
2394
 	timestamp := time.Now().Unix()
2376
 	// 生成输入报文
2395
 	// 生成输入报文
2377
 	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2396
 	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2378
-	input := make(map[string]interface{})
2397
+	//input := make(map[string]interface{})
2379
 	inputData := make(map[string]interface{})
2398
 	inputData := make(map[string]interface{})
2380
 	inputMessage["infno"] = "3271"               // 交易编码
2399
 	inputMessage["infno"] = "3271"               // 交易编码
2381
 	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2400
 	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2382
 	inputData["fixmedins_name"] = org_name       //对帐结束时间
2401
 	inputData["fixmedins_name"] = org_name       //对帐结束时间
2402
+	inputData["setl_mon"] = stmt_mon             //医疗费总额
2383
 
2403
 
2384
 	inputData["fix_fill_dept"] = fix_fill_dept     //对帐结束时间
2404
 	inputData["fix_fill_dept"] = fix_fill_dept     //对帐结束时间
2385
 	inputData["fix_fill_psn_id"] = fix_fill_psn_id //对帐结束时间
2405
 	inputData["fix_fill_psn_id"] = fix_fill_psn_id //对帐结束时间
2386
 	inputData["fix_fill_psn"] = fix_fill_psn       //对帐结束时间
2406
 	inputData["fix_fill_psn"] = fix_fill_psn       //对帐结束时间
2387
 	inputData["fix_fill_date"] = fix_fill_date     //对帐结束时间
2407
 	inputData["fix_fill_date"] = fix_fill_date     //对帐结束时间
2388
 	inputData["stmt_loc"] = stmt_loc               //医疗费总额
2408
 	inputData["stmt_loc"] = stmt_loc               //医疗费总额
2409
+	if len(hp) == 0 {
2410
+		inputData["solidifyIdList"] = make([]string, 0) //医疗费总额
2411
+	} else {
2412
+		inputData["solidifyIdList"] = hp //医疗费总额
2389
 
2413
 
2390
-	input["data"] = inputData
2391
-	inputMessage["input"] = input //交易输入
2414
+	}
2415
+	//input["data"] = inputData
2416
+	inputMessage["input"] = inputData //交易输入
2392
 	bytesData, err := json.Marshal(inputMessage)
2417
 	bytesData, err := json.Marshal(inputMessage)
2393
 	fmt.Println(string(bytesData))
2418
 	fmt.Println(string(bytesData))
2394
 	if err != nil {
2419
 	if err != nil {
2396
 		return err.Error(), ""
2421
 		return err.Error(), ""
2397
 	}
2422
 	}
2398
 	request_url = request_url + "3271"
2423
 	request_url = request_url + "3271"
2399
-	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3271"), string(bytesData)
2424
+	return HttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData)), string(bytesData)
2400
 }
2425
 }
2401
 func Jxyb3272(setl_mon string, fix_fill_dept string, fix_fill_psn_id string, fix_fill_psn string, fix_fill_date string, stmt_loc string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, request_url string, access_key string, secret_key string, cainfo string) (string, string) {
2426
 func Jxyb3272(setl_mon string, fix_fill_dept string, fix_fill_psn_id string, fix_fill_psn string, fix_fill_date string, stmt_loc string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, request_url string, access_key string, secret_key string, cainfo string) (string, string) {
2402
 	// 生成签名
2427
 	// 生成签名
2403
 	timestamp := time.Now().Unix()
2428
 	timestamp := time.Now().Unix()
2404
 	// 生成输入报文
2429
 	// 生成输入报文
2405
 	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2430
 	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2406
-	input := make(map[string]interface{})
2431
+	//input := make(map[string]interface{})
2407
 	inputData := make(map[string]interface{})
2432
 	inputData := make(map[string]interface{})
2408
 	inputMessage["infno"] = "3272"                 // 交易编码
2433
 	inputMessage["infno"] = "3272"                 // 交易编码
2409
 	inputData["fixmedins_code"] = fixmedins_code   // 对帐开始时间
2434
 	inputData["fixmedins_code"] = fixmedins_code   // 对帐开始时间
2416
 	inputData["fix_fill_date"] = fix_fill_date     //对帐结束时间
2441
 	inputData["fix_fill_date"] = fix_fill_date     //对帐结束时间
2417
 	inputData["stmt_loc"] = stmt_loc               //对帐结束时间
2442
 	inputData["stmt_loc"] = stmt_loc               //对帐结束时间
2418
 
2443
 
2419
-	input["data"] = inputData
2420
-	inputMessage["input"] = input //交易输入
2444
+	//input["data"] = inputData
2445
+	inputMessage["input"] = inputData //交易输入
2421
 	bytesData, err := json.Marshal(inputMessage)
2446
 	bytesData, err := json.Marshal(inputMessage)
2422
 	fmt.Println(string(bytesData))
2447
 	fmt.Println(string(bytesData))
2423
 	if err != nil {
2448
 	if err != nil {
2425
 		return err.Error(), ""
2450
 		return err.Error(), ""
2426
 	}
2451
 	}
2427
 	request_url = request_url + "3272"
2452
 	request_url = request_url + "3272"
2428
-	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3272"), string(bytesData)
2453
+	return HttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData)), string(bytesData)
2429
 }
2454
 }
2430
 func Jxyb3273(stmt_mon string, stmt_loc string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, request_url string, access_key string, secret_key string, cainfo string) (string, string) {
2455
 func Jxyb3273(stmt_mon string, stmt_loc string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, request_url string, access_key string, secret_key string, cainfo string) (string, string) {
2431
 	// 生成签名
2456
 	// 生成签名
2432
 	timestamp := time.Now().Unix()
2457
 	timestamp := time.Now().Unix()
2433
 	// 生成输入报文
2458
 	// 生成输入报文
2434
 	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2459
 	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2435
-	input := make(map[string]interface{})
2460
+	//input := make(map[string]interface{})
2436
 	inputData := make(map[string]interface{})
2461
 	inputData := make(map[string]interface{})
2437
 	inputMessage["infno"] = "3273"               // 交易编码
2462
 	inputMessage["infno"] = "3273"               // 交易编码
2438
 	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2463
 	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2439
 	inputData["fixmedins_name"] = org_name       //对帐结束时间
2464
 	inputData["fixmedins_name"] = org_name       //对帐结束时间
2440
-	inputData["stmt_mon"] = stmt_mon             //医疗费总额
2465
+	inputData["setl_mon"] = stmt_mon             //医疗费总额
2441
 	inputData["stmt_loc"] = stmt_loc             //医疗费总额
2466
 	inputData["stmt_loc"] = stmt_loc             //医疗费总额
2442
 
2467
 
2443
-	input["data"] = inputData
2444
-	inputMessage["input"] = input //交易输入
2468
+	//input["data"] = inputData
2469
+	inputMessage["input"] = inputData //交易输入
2445
 	bytesData, err := json.Marshal(inputMessage)
2470
 	bytesData, err := json.Marshal(inputMessage)
2446
 	fmt.Println(string(bytesData))
2471
 	fmt.Println(string(bytesData))
2447
 	if err != nil {
2472
 	if err != nil {
2449
 		return err.Error(), ""
2474
 		return err.Error(), ""
2450
 	}
2475
 	}
2451
 	request_url = request_url + "3273"
2476
 	request_url = request_url + "3273"
2452
-	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3273"), string(bytesData)
2477
+	return HttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData)), string(bytesData)
2453
 }
2478
 }
2454
 func Jxyb3274(setl_mon string, fix_fill_dept string, fix_fill_psn_id string, fix_fill_psn string, fix_fill_date string, stmt_loc string, upld_btch string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, request_url string, access_key string, secret_key string, cainfo string) (string, string) {
2479
 func Jxyb3274(setl_mon string, fix_fill_dept string, fix_fill_psn_id string, fix_fill_psn string, fix_fill_date string, stmt_loc string, upld_btch string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, request_url string, access_key string, secret_key string, cainfo string) (string, string) {
2455
 	// 生成签名
2480
 	// 生成签名
2479
 		return err.Error(), ""
2504
 		return err.Error(), ""
2480
 	}
2505
 	}
2481
 	request_url = request_url + "3274"
2506
 	request_url = request_url + "3274"
2482
-	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3274"), string(bytesData)
2507
+	return HttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData)), string(bytesData)
2483
 }
2508
 }
2484
 func Jxyb3275(org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, request_url string, access_key string, secret_key string, cainfo string) (string, string) {
2509
 func Jxyb3275(org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, request_url string, access_key string, secret_key string, cainfo string) (string, string) {
2485
 	// 生成签名
2510
 	// 生成签名

+ 43 - 1
service/jx_service.go View File

2226
 	fmt.Println(string(bytesData))
2226
 	fmt.Println(string(bytesData))
2227
 
2227
 
2228
 	params.RequestUrl = params.RequestUrl + "4101"
2228
 	params.RequestUrl = params.RequestUrl + "4101"
2229
-	return JXHttpRequest(params.RequestUrl, params.AccessKey, params.SecretKey, timestamp, string(bytesData), "4101"), string(bytesData)
2229
+	return JXHttpRequest(params.RequestUrl, params.AccessKey, params.SecretKey, timestamp, string(bytesData), "4101A"), string(bytesData)
2230
+
2231
+}
2232
+func Jxyb4102(psn_no string, setl_id string, params models.PublicParams, stas_type string) (string, string) {
2233
+	timestamp := time.Now().Unix()
2234
+	inputMessage := SetJXInputMessage(timestamp, params.FixmedinsName, params.OpterName, params.FixmedinsCode, params.InsuplcAdmdvs, params.MdtrtareaAdmvs, params.Cainfo)
2235
+	// 生成输入报文
2236
+	input := make(map[string]interface{})
2237
+	inputData := make(map[string]interface{})
2238
+	inputMessage["infno"] = "4102" // 交易编码
2239
+
2240
+	inputData["setl_id"] = setl_id     // 结算 ID  必填
2241
+	inputData["psn_no"] = psn_no       // 结算 ID  必填
2242
+	inputData["stas_type"] = stas_type // 结算 ID  必填
2243
+
2244
+	input["data"] = inputData
2245
+	inputMessage["input"] = input //交易输入
2246
+	bytesData, _ := json.Marshal(inputMessage)
2247
+	fmt.Println(string(bytesData))
2248
+
2249
+	params.RequestUrl = params.RequestUrl + "4102"
2250
+	return JXHttpRequest(params.RequestUrl, params.AccessKey, params.SecretKey, timestamp, string(bytesData), "4102"), string(bytesData)
2251
+
2252
+}
2253
+
2254
+func Jxyb4103(psn_no string, setl_id string, params models.PublicParams) (string, string) {
2255
+	timestamp := time.Now().Unix()
2256
+	inputMessage := SetJXInputMessage(timestamp, params.FixmedinsName, params.OpterName, params.FixmedinsCode, params.InsuplcAdmdvs, params.MdtrtareaAdmvs, params.Cainfo)
2257
+	// 生成输入报文
2258
+	input := make(map[string]interface{})
2259
+	inputData := make(map[string]interface{})
2260
+	inputMessage["infno"] = "4103" // 交易编码
2261
+
2262
+	inputData["setl_id"] = setl_id // 结算 ID  必填
2263
+	inputData["psn_no"] = psn_no   // 结算 ID  必填
2264
+
2265
+	input["data"] = inputData
2266
+	inputMessage["input"] = input //交易输入
2267
+	bytesData, _ := json.Marshal(inputMessage)
2268
+	fmt.Println(string(bytesData))
2269
+
2270
+	params.RequestUrl = params.RequestUrl + "4103"
2271
+	return JXHttpRequest(params.RequestUrl, params.AccessKey, params.SecretKey, timestamp, string(bytesData), "4103"), string(bytesData)
2230
 
2272
 
2231
 }
2273
 }
2232
 
2274