test_user 1 gadu atpakaļ
vecāks
revīzija
d4897f4e9e

+ 70 - 20
controllers/js/jsyb_controller.go Parādīt failu

@@ -66,8 +66,8 @@ func JSybRegistRouters() {
66 66
 	beego.Router("/jsyb/3273", &JSybController{}, "post:Get3273")
67 67
 	beego.Router("/jsyb/3274", &JSybController{}, "post:Get3274")
68 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,6 +81,17 @@ func (c *JSybController) Get3260() {
81 81
 	url := c.GetString("url")
82 82
 	ak := c.GetString("ak")
83 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 95
 	result, request := service.Jxyb3260(mdtrtarea_admvs, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo)
85 96
 	saveJsLog(result, request, "3260", "3260", org_name)
86 97
 	var dat2 map[string]interface{}
@@ -108,8 +119,8 @@ func (c *JSybController) Get3261() {
108 119
 	url := c.GetString("url")
109 120
 	ak := c.GetString("ak")
110 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 124
 	saveJsLog(result, request, "3261", "3261", org_name)
114 125
 	var dat2 map[string]interface{}
115 126
 	if err := json.Unmarshal([]byte(request), &dat2); err == nil {
@@ -133,11 +144,12 @@ func (c *JSybController) Get3262() {
133 144
 		return
134 145
 	}
135 146
 	userJSONBytes, _ := json.Marshal(respJSON["datas"])
136
-	var hp []models.FixMonRecDetailFileIn
147
+	var hp []models.FixMonRecDetailFileInTwo
137 148
 	if err := json.Unmarshal(userJSONBytes, &hp); err != nil {
138 149
 		utils.ErrorLog("解析失败:%v", err)
139 150
 		return
140 151
 	}
152
+	fmt.Println(hp)
141 153
 
142 154
 	userJSONBytes2, _ := json.Marshal(respJSON["fund"])
143 155
 	var fund []models.Fund
@@ -160,8 +172,9 @@ func (c *JSybController) Get3262() {
160 172
 	fix_fill_psn := respJSON["fix_fill_psn"].(string)
161 173
 	fix_fill_date := respJSON["fix_fill_date"].(string)
162 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 178
 	saveJsLog(result, request, "3262", "3262", org_name)
166 179
 	var dat2 map[string]interface{}
167 180
 	if err := json.Unmarshal([]byte(request), &dat2); err == nil {
@@ -184,6 +197,7 @@ func (c *JSybController) Get3263() {
184 197
 		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
185 198
 		return
186 199
 	}
200
+
187 201
 	org_name := respJSON["org_name"].(string)
188 202
 	doctor := respJSON["doctor"].(string)
189 203
 	fixmedins_code := respJSON["fixmedins_code"].(string)
@@ -222,6 +236,14 @@ func (c *JSybController) Get3264() {
222 236
 		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
223 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 247
 	org_name := respJSON["org_name"].(string)
226 248
 	doctor := respJSON["doctor"].(string)
227 249
 	fixmedins_code := respJSON["fixmedins_code"].(string)
@@ -234,7 +256,7 @@ func (c *JSybController) Get3264() {
234 256
 	upld_btch := respJSON["upld_btch"].(string)
235 257
 	stmt_loc := respJSON["stmt_loc"].(string)
236 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 260
 	saveJsLog(result, request, "3264", "3264", org_name)
239 261
 	var dat2 map[string]interface{}
240 262
 	if err := json.Unmarshal([]byte(request), &dat2); err == nil {
@@ -258,6 +280,14 @@ func (c *JSybController) Get3265() {
258 280
 		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
259 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 291
 	org_name := respJSON["org_name"].(string)
262 292
 	doctor := respJSON["doctor"].(string)
263 293
 	fixmedins_code := respJSON["fixmedins_code"].(string)
@@ -274,7 +304,7 @@ func (c *JSybController) Get3265() {
274 304
 	fix_fill_psn_id := respJSON["fix_fill_psn_id"].(string)
275 305
 	fix_fill_psn := respJSON["fix_fill_psn"].(string)
276 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 308
 	saveJsLog(result, request, "3265", "3265", org_name)
279 309
 	var dat2 map[string]interface{}
280 310
 	if err := json.Unmarshal([]byte(request), &dat2); err == nil {
@@ -309,7 +339,7 @@ func (c *JSybController) Get3266() {
309 339
 	cainfo := respJSON["cainfo"].(string)
310 340
 	upld_btch := respJSON["upld_btch"].(string)
311 341
 	stmt_loc := respJSON["stmt_loc"].(string)
312
-	stmt_mon := respJSON["stmt_mon"].(string)
342
+	stmt_mon := respJSON["setl_mon"].(string)
313 343
 	fix_fill_dept := respJSON["fix_fill_dept"].(string)
314 344
 	fix_fill_psn_id := respJSON["fix_fill_psn_id"].(string)
315 345
 	fix_fill_psn := respJSON["fix_fill_psn"].(string)
@@ -349,8 +379,8 @@ func (c *JSybController) Get3267() {
349 379
 	cainfo := respJSON["cainfo"].(string)
350 380
 	upld_btch := respJSON["upld_btch"].(string)
351 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 384
 	saveJsLog(result, request, "3267", "3267", org_name)
355 385
 	var dat2 map[string]interface{}
356 386
 	if err := json.Unmarshal([]byte(request), &dat2); err == nil {
@@ -376,7 +406,7 @@ func (c *JSybController) Get3268() {
376 406
 		return
377 407
 	}
378 408
 	userJSONBytes, _ := json.Marshal(respJSON["datas"])
379
-	var hp []models.FixMonRecDetailFileIn
409
+	var hp []models.FixMonRecDetailFileInTwo
380 410
 	if err := json.Unmarshal(userJSONBytes, &hp); err != nil {
381 411
 		utils.ErrorLog("解析失败:%v", err)
382 412
 		return
@@ -403,7 +433,9 @@ func (c *JSybController) Get3268() {
403 433
 	fix_fill_psn := respJSON["fix_fill_psn"].(string)
404 434
 	fix_fill_date := respJSON["fix_fill_date"].(string)
405 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 439
 	saveJsLog(result, request, "3268", "3268", org_name)
408 440
 	var dat2 map[string]interface{}
409 441
 	if err := json.Unmarshal([]byte(request), &dat2); err == nil {
@@ -437,9 +469,9 @@ func (c *JSybController) Get3269() {
437 469
 	ak := respJSON["ak"].(string)
438 470
 	cainfo := respJSON["cainfo"].(string)
439 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 475
 	saveJsLog(result, request, "3269", "3269", org_name)
444 476
 	var dat2 map[string]interface{}
445 477
 	if err := json.Unmarshal([]byte(request), &dat2); err == nil {
@@ -463,6 +495,12 @@ func (c *JSybController) Get3270() {
463 495
 		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
464 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 504
 	org_name := respJSON["org_name"].(string)
467 505
 	doctor := respJSON["doctor"].(string)
468 506
 	fixmedins_code := respJSON["fixmedins_code"].(string)
@@ -473,9 +511,10 @@ func (c *JSybController) Get3270() {
473 511
 	ak := respJSON["ak"].(string)
474 512
 	cainfo := respJSON["cainfo"].(string)
475 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 518
 	saveJsLog(result, request, "3270", "3270", org_name)
480 519
 	var dat2 map[string]interface{}
481 520
 	if err := json.Unmarshal([]byte(request), &dat2); err == nil {
@@ -499,6 +538,13 @@ func (c *JSybController) Get3271() {
499 538
 		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
500 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 548
 	org_name := respJSON["org_name"].(string)
503 549
 	doctor := respJSON["doctor"].(string)
504 550
 	fixmedins_code := respJSON["fixmedins_code"].(string)
@@ -513,7 +559,9 @@ func (c *JSybController) Get3271() {
513 559
 	fix_fill_psn_id := respJSON["fix_fill_psn_id"].(string)
514 560
 	fix_fill_psn := respJSON["fix_fill_psn"].(string)
515 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 565
 	saveJsLog(result, request, "3271", "3271", org_name)
518 566
 	var dat2 map[string]interface{}
519 567
 	if err := json.Unmarshal([]byte(request), &dat2); err == nil {
@@ -588,8 +636,10 @@ func (c *JSybController) Get3273() {
588 636
 	ak := respJSON["ak"].(string)
589 637
 	cainfo := respJSON["cainfo"].(string)
590 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 643
 	saveJsLog(result, request, "3273", "3273", org_name)
594 644
 	var dat2 map[string]interface{}
595 645
 	if err := json.Unmarshal([]byte(request), &dat2); err == nil {

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1525 - 1060
controllers/sg/his_api_controller.go


+ 10 - 7
main.go Parādīt failu

@@ -1600,12 +1600,12 @@ func GetblBatchSettleList() {
1600 1600
 
1601 1601
 func GetbrBatchSettleList() {
1602 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 1607
 	for _, item := range orders {
1608
-		order_id := item.PatientId
1608
+		order_id := item.ID
1609 1609
 		order, _ := service.GetHisOrderByIDTwo(order_id)
1610 1610
 		//roles, _ := service.GetDoctorListTwo(org_id)
1611 1611
 		his, _ := service.GetHisPatientByNumber(order.MdtrtId)
@@ -1624,7 +1624,10 @@ func GetbrBatchSettleList() {
1624 1624
 		}
1625 1625
 
1626 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 1632
 		depart, _ := service.GetDepartMentDetail(curRoles.DepartmentId)
1630 1633
 		pre, _ := service.GetNewHisPrescriptionByNumber(order.Number)
@@ -2324,7 +2327,7 @@ func GetbrBatchSettleList() {
2324 2327
 					ErrMsg:    res.ErrMsg + "解析失败",
2325 2328
 					Status:    1,
2326 2329
 					PatientId: order_id,
2327
-					Stage:     10278,
2330
+					Stage:     10278000,
2328 2331
 				}
2329 2332
 				service.CreateErrMsgLog(errlog)
2330 2333
 				continue
@@ -2340,7 +2343,7 @@ func GetbrBatchSettleList() {
2340 2343
 				ErrMsg:    res.ErrMsg,
2341 2344
 				Status:    1,
2342 2345
 				PatientId: order_id,
2343
-				Stage:     10278,
2346
+				Stage:     10278000,
2344 2347
 			}
2345 2348
 			service.CreateErrMsgLog(errlog)
2346 2349
 			continue

+ 37 - 24
models/model32xx.go Parādīt failu

@@ -3,7 +3,7 @@ package models
3 3
 type JSResult3260 struct {
4 4
 	ErrMsg      string `json:"err_msg"`
5 5
 	InfRefmsgid string `json:"inf_refmsgid"`
6
-	Infcode     int64  `json:"infcode"`
6
+	Infcode     string `json:"infcode"`
7 7
 	Output      struct {
8 8
 		Data struct {
9 9
 			FixmedinsCode string `json:"fixmedins_code"`
@@ -21,7 +21,7 @@ type JSResult3260 struct {
21 21
 type JSResult3261 struct {
22 22
 	ErrMsg      string `json:"err_msg"`
23 23
 	InfRefmsgid string `json:"inf_refmsgid"`
24
-	Infcode     int64  `json:"infcode"`
24
+	Infcode     string `json:"infcode"`
25 25
 	Output      struct {
26 26
 		Data struct {
27 27
 			FixmedinsCode string `json:"fixmedins_code"`
@@ -37,6 +37,21 @@ type JSResult3261 struct {
37 37
 }
38 38
 
39 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 55
 	Insutype      string  `json:"insutype"`
41 56
 	PsnType       string  `json:"psn_type"`
42 57
 	MedType       string  `json:"med_type"`
@@ -63,26 +78,24 @@ type Fund struct {
63 78
 type JSResult3263 struct {
64 79
 	ErrMsg      string `json:"err_msg"`
65 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 99
 	} `json:"output"`
87 100
 	RefmsgTime  string      `json:"refmsg_time"`
88 101
 	RespondTime string      `json:"respond_time"`
@@ -93,7 +106,7 @@ type JSResult3263 struct {
93 106
 type JSResult3264 struct {
94 107
 	ErrMsg      string `json:"err_msg"`
95 108
 	InfRefmsgid string `json:"inf_refmsgid"`
96
-	Infcode     int64  `json:"infcode"`
109
+	Infcode     string `json:"infcode"`
97 110
 	Output      struct {
98 111
 		Data struct {
99 112
 			SolidifyID []string `json:"solidifyIdList,omitempty"`
@@ -195,7 +208,7 @@ type JSResultEmpty struct {
195 208
 	Cainfo      interface{} `json:"cainfo"`
196 209
 	ErrMsg      string      `json:"err_msg"`
197 210
 	InfRefmsgid string      `json:"inf_refmsgid"`
198
-	Infcode     int64       `json:"infcode"`
211
+	Infcode     string      `json:"infcode"`
199 212
 	Output      struct {
200 213
 	} `json:"output"`
201 214
 	RefmsgTime  string      `json:"refmsg_time"`

+ 2 - 2
service/gdyb_service.go Parādīt failu

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

+ 5 - 5
service/his_service.go Parādīt failu

@@ -1501,7 +1501,7 @@ func GetOrderError10138(org_id int64) (order []*models.HisOrderError, err error)
1501 1501
 }
1502 1502
 
1503 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 1505
 	fmt.Println(err)
1506 1506
 	return
1507 1507
 }
@@ -1592,13 +1592,13 @@ func GetHisPrescriptionForMedType(org_id int64, patient_id int64, record_date in
1592 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 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 1602
 	return
1603 1603
 }
1604 1604
 

+ 61 - 23
service/hn_service.go Parādīt failu

@@ -60,7 +60,9 @@ func Hnyb1101(certNo string, org_name string, doctor string, fixmedins_code stri
60 60
 		return err.Error(), ""
61 61
 	}
62 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 68
 //人员基本信息版本2
@@ -108,7 +110,9 @@ func Hnybyb1101A(certNo string, org_name string, doctor string, fixmedins_code s
108 110
 		return err.Error(), ""
109 111
 	}
110 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 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,7 +144,9 @@ func Hnyb1101B(org_name string, doctor string, fixmedins_code string, insuplc_ad
140 144
 		return err.Error(), ""
141 145
 	}
142 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 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,7 +177,9 @@ func Hnyb1101ForEleCert(org_name string, doctor string, fixmedins_code string, i
171 177
 		return err.Error(), ""
172 178
 	}
173 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,7 +239,9 @@ func Hnyb2201(psnNo string, insutype string, certNo string, org_name string, ope
231 239
 	}
232 240
 
233 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,8 +274,10 @@ func Hnyb2202(psnNo string, mdtrtId string, ipt_otp_no string, org_name string,
264 274
 	}
265 275
 
266 276
 	request_url = request_url + "2202"
277
+	timestamp2 := time.Now().UnixNano() / int64(time.Millisecond)
278
+
267 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,8 +336,9 @@ func Hnyb2203(psnNo string, mdtrtId string, doctor string, department string, or
324 336
 	}
325 337
 	request_url = request_url + "2203"
326 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,15 +400,16 @@ func Hnyb2203A(psnNo string, mdtrtId string, doctor string, department string, o
387 400
 	}
388 401
 	request_url = request_url + "2203"
389 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 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 411
 	//timestamp := time.Now().Unix()
398
-	timestamp := time.Now().Unix()
412
+	//timestamp := time.Now().Unix()
399 413
 
400 414
 	timestamp2 := time.Now().Unix()
401 415
 
@@ -578,8 +592,9 @@ func Hnyb2204(psnNo string, mdtrtId string, hisPrescription []*models.HisPrescri
578 592
 
579 593
 	request_url = request_url + "2204"
580 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,7 +627,9 @@ func Hnyb2205(psnNo string, mdtrtId string, chrgBchno string, org_name string, d
612 627
 		return err.Error(), ""
613 628
 	}
614 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,8 +696,9 @@ func Hnyb2206(psnNo string, mdtrtId string, chrgBchno string, certNo string, ins
679 696
 	}
680 697
 	request_url = request_url + "2206"
681 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,8 +767,9 @@ func Hnyb2206Two(psnNo string, mdtrtId string, chrgBchno string, certNo string,
749 767
 	}
750 768
 	request_url = request_url + "2206"
751 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,7 +834,9 @@ func Hnyb2207(psnNo string, mdtrtId string, chrgBchno string, certNo string, ins
815 834
 		return err.Error(), ""
816 835
 	}
817 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,7 +903,9 @@ func Hnyb2207Two(psnNo string, mdtrtId string, chrgBchno string, certNo string,
882 903
 		return err.Error(), ""
883 904
 	}
884 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,8 +967,9 @@ func Hnyb2207A(psnNo string, mdtrtId string, chrgBchno string, certNo string, in
944 967
 	}
945 968
 	request_url = request_url + "2207A"
946 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,7 +997,9 @@ func Hnyb2208(psnNo string, mdtrtId string, setlId string, org_name string, doct
973 997
 		return err.Error(), ""
974 998
 	}
975 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,8 +1023,9 @@ func Hnyb5203(baseParams models.BaseParams, businessParams models.BusinessParams
997 1023
 	}
998 1024
 	baseParams.RequestUrl = baseParams.RequestUrl + "5203"
999 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 1031
 //CBS总线
@@ -1113,7 +1140,9 @@ func Hnyb5301(psnNo string, org_name string, doctor string, fixmedins_code strin
1113 1140
 	}
1114 1141
 
1115 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,7 +1177,9 @@ func Hnyb2503(psnNo string, insutype string, org_name string, doctor string, fix
1148 1177
 		return err.Error(), ""
1149 1178
 	}
1150 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 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,7 +1210,9 @@ func Hnyb3201(fixmedins_setl_cnt int64, acct_pay float64, fund_pay_sumamt float6
1179 1210
 		return err.Error(), ""
1180 1211
 	}
1181 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 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,7 +1273,9 @@ func Hnyb9001(org_name string, doctor string, fixmedins_code string, insuplc_adm
1240 1273
 	//return str, ""
1241 1274
 
1242 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,7 +1749,9 @@ func Hnyb4101(struct4101 Struct4101, params models.PublicParams) (string, string
1714 1749
 	fmt.Println(string(bytesData))
1715 1750
 
1716 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,6 +1783,7 @@ func Hnyb3501(struct3501 models.Struct3501) (string, string) {
1746 1783
 		return err.Error(), ""
1747 1784
 	}
1748 1785
 	struct3501.RequestUrl = struct3501.RequestUrl + "3501"
1786
+
1749 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 Parādīt failu

@@ -2009,15 +2009,15 @@ func Jxyb3260(setl_optins string, org_name string, doctor string, fixmedins_code
2009 2009
 	timestamp := time.Now().Unix()
2010 2010
 	// 生成输入报文
2011 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 2013
 	inputData := make(map[string]interface{})
2014 2014
 	inputMessage["infno"] = "3260"               // 交易编码
2015 2015
 	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2016 2016
 	inputData["fixmedins_name"] = org_name       //对帐结束时间
2017 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 2021
 	bytesData, err := json.Marshal(inputMessage)
2022 2022
 	fmt.Println(string(bytesData))
2023 2023
 	if err != nil {
@@ -2025,7 +2025,7 @@ func Jxyb3260(setl_optins string, org_name string, doctor string, fixmedins_code
2025 2025
 		return err.Error(), ""
2026 2026
 	}
2027 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,7 +2034,7 @@ func Jxyb3261(stmt_mon string, setl_optins string, org_name string, doctor strin
2034 2034
 	timestamp := time.Now().Unix()
2035 2035
 	// 生成输入报文
2036 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 2038
 	inputData := make(map[string]interface{})
2039 2039
 	inputMessage["infno"] = "3261"               // 交易编码
2040 2040
 	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
@@ -2042,8 +2042,8 @@ func Jxyb3261(stmt_mon string, setl_optins string, org_name string, doctor strin
2042 2042
 	inputData["fix_blng_admdvs"] = setl_optins   //医疗费总额
2043 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 2047
 	bytesData, err := json.Marshal(inputMessage)
2048 2048
 	fmt.Println(string(bytesData))
2049 2049
 	if err != nil {
@@ -2051,14 +2051,14 @@ func Jxyb3261(stmt_mon string, setl_optins string, org_name string, doctor strin
2051 2051
 		return err.Error(), ""
2052 2052
 	}
2053 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 2058
 	timestamp := time.Now().Unix()
2059 2059
 	// 生成输入报文
2060 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 2062
 	inputData := make(map[string]interface{})
2063 2063
 
2064 2064
 	fixMonRecDetailFileIns := make([]map[string]interface{}, 0)
@@ -2072,14 +2072,15 @@ func Jxyb3262(org_name string, doctor string, fixmedins_code string, insuplc_adm
2072 2072
 	inputData["fix_fill_date"] = fix_fill_date
2073 2073
 	inputData["stmt_loc"] = stmt_loc
2074 2074
 	inputData["upld_btch"] = upld_btch
2075
+	inputData["setl_mon"] = setl_mon
2075 2076
 
2076 2077
 	for _, item := range hp {
2077 2078
 		fixMonRecDetailFileIn := make(map[string]interface{})
2078 2079
 		fixMonRecDetailFileIn["insutype"] = item.Insutype
2079 2080
 		fixMonRecDetailFileIn["psn_type"] = item.PsnType
2080 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 2084
 		fixMonRecDetailFileIn["psn_time"] = item.PsnTime
2084 2085
 		fixMonRecDetailFileIn["psn_cnt"] = item.PsnCnt
2085 2086
 		fixMonRecDetailFileIn["medfee_sumamt"] = item.MedfeeSumAmt
@@ -2104,8 +2105,8 @@ func Jxyb3262(org_name string, doctor string, fixmedins_code string, insuplc_adm
2104 2105
 
2105 2106
 	inputData["fixMonRecDetailFileInList"] = fixMonRecDetailFileIns
2106 2107
 	inputData["fundList"] = fundList
2107
-	input["data"] = inputData
2108
-	inputMessage["input"] = input //交易输入
2108
+	//input["data"] = inputData
2109
+	inputMessage["input"] = inputData //交易输入
2109 2110
 	bytesData, err := json.Marshal(inputMessage)
2110 2111
 	fmt.Println(string(bytesData))
2111 2112
 	if err != nil {
@@ -2113,24 +2114,24 @@ func Jxyb3262(org_name string, doctor string, fixmedins_code string, insuplc_adm
2113 2114
 		return err.Error(), ""
2114 2115
 	}
2115 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 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 2121
 	timestamp := time.Now().Unix()
2121 2122
 	// 生成输入报文
2122 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 2125
 	inputData := make(map[string]interface{})
2125 2126
 	inputMessage["infno"] = "3263"               // 交易编码
2126 2127
 	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2127 2128
 	inputData["fixmedins_name"] = org_name       //对帐结束时间
2128
-	inputData["stmt_mon"] = stmt_mon             //医疗费总额
2129
+	inputData["setl_mon"] = stmt_mon             //医疗费总额
2129 2130
 	inputData["stmt_loc"] = stmt_loc             //医疗费总额
2130 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 2135
 	bytesData, err := json.Marshal(inputMessage)
2135 2136
 	fmt.Println(string(bytesData))
2136 2137
 	if err != nil {
@@ -2138,24 +2139,30 @@ func Jxyb3263(stmt_mon string, stmt_loc string, upld_btch string, org_name strin
2138 2139
 		return err.Error(), ""
2139 2140
 	}
2140 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 2146
 	timestamp := time.Now().Unix()
2146 2147
 	// 生成输入报文
2147 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 2150
 	inputData := make(map[string]interface{})
2150 2151
 	inputMessage["infno"] = "3264"               // 交易编码
2151 2152
 	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2152 2153
 	inputData["fixmedins_name"] = org_name       //对帐结束时间
2153
-	inputData["stmt_mon"] = stmt_mon             //医疗费总额
2154
+	inputData["setl_mon"] = stmt_mon             //医疗费总额
2154 2155
 	inputData["stmt_loc"] = stmt_loc             //医疗费总额
2155 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 2166
 	bytesData, err := json.Marshal(inputMessage)
2160 2167
 	fmt.Println(string(bytesData))
2161 2168
 	if err != nil {
@@ -2163,14 +2170,14 @@ func Jxyb3264(stmt_mon string, stmt_loc string, upld_btch string, org_name strin
2163 2170
 		return err.Error(), ""
2164 2171
 	}
2165 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 2177
 	timestamp := time.Now().Unix()
2171 2178
 	// 生成输入报文
2172 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 2181
 	inputData := make(map[string]interface{})
2175 2182
 
2176 2183
 	//solidifyId := make(map[string]interface{})
@@ -2178,18 +2185,23 @@ func Jxyb3265(stmt_mon string, fix_fill_dept string, fix_fill_psn_id string, fix
2178 2185
 	inputMessage["infno"] = "3265"                 // 交易编码
2179 2186
 	inputData["fixmedins_code"] = fixmedins_code   // 对帐开始时间
2180 2187
 	inputData["fixmedins_name"] = org_name         //对帐结束时间
2181
-	inputData["stmt_mon"] = stmt_mon               //医疗费总额
2188
+	inputData["setl_mon"] = stmt_mon               //医疗费总额
2182 2189
 	inputData["fix_fill_dept"] = fix_fill_dept     //对帐结束时间
2183 2190
 	inputData["fix_fill_psn_id"] = fix_fill_psn_id //对帐结束时间
2184 2191
 	inputData["fix_fill_psn"] = fix_fill_psn       //对帐结束时间
2185 2192
 	inputData["fix_fill_date"] = fix_fill_date     //对帐结束时间
2186 2193
 	inputData["stmt_loc"] = stmt_loc               //医疗费总额
2187 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 2205
 	bytesData, err := json.Marshal(inputMessage)
2194 2206
 	fmt.Println(string(bytesData))
2195 2207
 	if err != nil {
@@ -2197,21 +2209,21 @@ func Jxyb3265(stmt_mon string, fix_fill_dept string, fix_fill_psn_id string, fix
2197 2209
 		return err.Error(), ""
2198 2210
 	}
2199 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 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 2216
 	timestamp := time.Now().Unix()
2205 2217
 	// 生成输入报文
2206 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 2220
 	inputData := make(map[string]interface{})
2209 2221
 	inputMessage["infno"] = "3266"               // 交易编码
2210 2222
 	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2211 2223
 	inputData["fixmedins_name"] = org_name       //对帐结束时间
2212 2224
 
2213 2225
 	inputData["fix_blng_admdvs"] = fix_blng_admdvs //对帐结束时间
2214
-	inputData["stmt_mon"] = stmt_mon               //医疗费总额
2226
+	inputData["setl_mon"] = stmt_mon               //医疗费总额
2215 2227
 	inputData["fix_fill_dept"] = fix_fill_dept     //对帐结束时间
2216 2228
 	inputData["fix_fill_psn_id"] = fix_fill_psn_id //对帐结束时间
2217 2229
 	inputData["fix_fill_psn"] = fix_fill_psn       //对帐结束时间
@@ -2219,8 +2231,8 @@ func Jxyb3266(stmt_mon string, fix_fill_dept string, fix_fill_psn_id string, fix
2219 2231
 	inputData["stmt_loc"] = stmt_loc               //医疗费总额
2220 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 2236
 	bytesData, err := json.Marshal(inputMessage)
2225 2237
 	fmt.Println(string(bytesData))
2226 2238
 	if err != nil {
@@ -2228,24 +2240,24 @@ func Jxyb3266(stmt_mon string, fix_fill_dept string, fix_fill_psn_id string, fix
2228 2240
 		return err.Error(), ""
2229 2241
 	}
2230 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 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 2247
 	timestamp := time.Now().Unix()
2236 2248
 	// 生成输入报文
2237 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 2251
 	inputData := make(map[string]interface{})
2240 2252
 	inputMessage["infno"] = "3267"               // 交易编码
2241 2253
 	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2242 2254
 	inputData["fixmedins_name"] = org_name       //对帐结束时间
2243
-	inputData["stmt_mon"] = stmt_mon             //医疗费总额
2255
+	inputData["setl_mon"] = stmt_mon             //医疗费总额
2244 2256
 	inputData["stmt_loc"] = stmt_loc             //医疗费总额
2245 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 2261
 	bytesData, err := json.Marshal(inputMessage)
2250 2262
 	fmt.Println(string(bytesData))
2251 2263
 	if err != nil {
@@ -2253,14 +2265,14 @@ func Jxyb3267(stmt_mon string, stmt_loc string, upld_btch string, org_name strin
2253 2265
 		return err.Error(), ""
2254 2266
 	}
2255 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 2272
 	timestamp := time.Now().Unix()
2261 2273
 	// 生成输入报文
2262 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 2276
 	inputData := make(map[string]interface{})
2265 2277
 
2266 2278
 	fixMonRecDetailFileIns := make([]map[string]interface{}, 0)
@@ -2269,8 +2281,9 @@ func Jxyb3268(org_name string, doctor string, fixmedins_code string, insuplc_adm
2269 2281
 	inputMessage["infno"] = "3268"               // 交易编码
2270 2282
 	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2271 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 2287
 	inputData["fix_fill_dept"] = fix_fill_dept
2275 2288
 	inputData["fix_fill_psn_id"] = fix_fill_psn_id
2276 2289
 	inputData["fix_fill_psn"] = fix_fill_psn
@@ -2279,12 +2292,12 @@ func Jxyb3268(org_name string, doctor string, fixmedins_code string, insuplc_adm
2279 2292
 
2280 2293
 	for _, item := range hp {
2281 2294
 		fixMonRecDetailFileIn := make(map[string]interface{})
2282
-		fixMonRecDetailFileIn["setl_date"] = ""
2295
+		fixMonRecDetailFileIn["setl_date"] = item.SetlDate
2283 2296
 		fixMonRecDetailFileIn["insutype"] = item.Insutype
2284 2297
 		fixMonRecDetailFileIn["psn_type"] = item.PsnType
2285 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 2301
 		fixMonRecDetailFileIn["psn_time"] = item.PsnTime
2289 2302
 		fixMonRecDetailFileIn["psn_cnt"] = item.PsnCnt
2290 2303
 		fixMonRecDetailFileIn["medfee_sumamt"] = item.MedfeeSumAmt
@@ -2311,8 +2324,8 @@ func Jxyb3268(org_name string, doctor string, fixmedins_code string, insuplc_adm
2311 2324
 	inputData["fixDateRecDetailFileInList"] = fixMonRecDetailFileIns
2312 2325
 	inputData["fundList"] = fundList
2313 2326
 
2314
-	input["data"] = inputData
2315
-	inputMessage["input"] = input //交易输入
2327
+	//input["data"] = inputData
2328
+	inputMessage["input"] = inputData //交易输入
2316 2329
 	bytesData, err := json.Marshal(inputMessage)
2317 2330
 	fmt.Println(string(bytesData))
2318 2331
 	if err != nil {
@@ -2320,23 +2333,23 @@ func Jxyb3268(org_name string, doctor string, fixmedins_code string, insuplc_adm
2320 2333
 		return err.Error(), ""
2321 2334
 	}
2322 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 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 2340
 	timestamp := time.Now().Unix()
2328 2341
 	// 生成输入报文
2329 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 2344
 	inputData := make(map[string]interface{})
2332 2345
 	inputMessage["infno"] = "3269"               // 交易编码
2333 2346
 	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2334 2347
 	inputData["fixmedins_name"] = org_name       //对帐结束时间
2335
-	inputData["stmt_mon"] = stmt_mon             //医疗费总额
2348
+	inputData["setl_mon"] = stmt_mon             //医疗费总额
2336 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 2353
 	bytesData, err := json.Marshal(inputMessage)
2341 2354
 	fmt.Println(string(bytesData))
2342 2355
 	if err != nil {
@@ -2344,23 +2357,29 @@ func Jxyb3269(stmt_mon string, stmt_loc string, org_name string, doctor string,
2344 2357
 		return err.Error(), ""
2345 2358
 	}
2346 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 2364
 	timestamp := time.Now().Unix()
2352 2365
 	// 生成输入报文
2353 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 2368
 	inputData := make(map[string]interface{})
2356 2369
 	inputMessage["infno"] = "3270"               // 交易编码
2357 2370
 	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2358 2371
 	inputData["fixmedins_name"] = org_name       //对帐结束时间
2359
-	inputData["stmt_mon"] = stmt_mon             //医疗费总额
2372
+	inputData["setl_mon"] = setl_mon             //医疗费总额
2360 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 2383
 	bytesData, err := json.Marshal(inputMessage)
2365 2384
 	fmt.Println(string(bytesData))
2366 2385
 	if err != nil {
@@ -2368,27 +2387,33 @@ func Jxyb3270(stmt_mon string, stmt_loc string, org_name string, doctor string,
2368 2387
 		return err.Error(), ""
2369 2388
 	}
2370 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 2394
 	timestamp := time.Now().Unix()
2376 2395
 	// 生成输入报文
2377 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 2398
 	inputData := make(map[string]interface{})
2380 2399
 	inputMessage["infno"] = "3271"               // 交易编码
2381 2400
 	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2382 2401
 	inputData["fixmedins_name"] = org_name       //对帐结束时间
2402
+	inputData["setl_mon"] = stmt_mon             //医疗费总额
2383 2403
 
2384 2404
 	inputData["fix_fill_dept"] = fix_fill_dept     //对帐结束时间
2385 2405
 	inputData["fix_fill_psn_id"] = fix_fill_psn_id //对帐结束时间
2386 2406
 	inputData["fix_fill_psn"] = fix_fill_psn       //对帐结束时间
2387 2407
 	inputData["fix_fill_date"] = fix_fill_date     //对帐结束时间
2388 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 2417
 	bytesData, err := json.Marshal(inputMessage)
2393 2418
 	fmt.Println(string(bytesData))
2394 2419
 	if err != nil {
@@ -2396,14 +2421,14 @@ func Jxyb3271(fix_fill_dept string, fix_fill_psn_id string, fix_fill_psn string,
2396 2421
 		return err.Error(), ""
2397 2422
 	}
2398 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 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 2428
 	timestamp := time.Now().Unix()
2404 2429
 	// 生成输入报文
2405 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 2432
 	inputData := make(map[string]interface{})
2408 2433
 	inputMessage["infno"] = "3272"                 // 交易编码
2409 2434
 	inputData["fixmedins_code"] = fixmedins_code   // 对帐开始时间
@@ -2416,8 +2441,8 @@ func Jxyb3272(setl_mon string, fix_fill_dept string, fix_fill_psn_id string, fix
2416 2441
 	inputData["fix_fill_date"] = fix_fill_date     //对帐结束时间
2417 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 2446
 	bytesData, err := json.Marshal(inputMessage)
2422 2447
 	fmt.Println(string(bytesData))
2423 2448
 	if err != nil {
@@ -2425,23 +2450,23 @@ func Jxyb3272(setl_mon string, fix_fill_dept string, fix_fill_psn_id string, fix
2425 2450
 		return err.Error(), ""
2426 2451
 	}
2427 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 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 2457
 	timestamp := time.Now().Unix()
2433 2458
 	// 生成输入报文
2434 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 2461
 	inputData := make(map[string]interface{})
2437 2462
 	inputMessage["infno"] = "3273"               // 交易编码
2438 2463
 	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2439 2464
 	inputData["fixmedins_name"] = org_name       //对帐结束时间
2440
-	inputData["stmt_mon"] = stmt_mon             //医疗费总额
2465
+	inputData["setl_mon"] = stmt_mon             //医疗费总额
2441 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 2470
 	bytesData, err := json.Marshal(inputMessage)
2446 2471
 	fmt.Println(string(bytesData))
2447 2472
 	if err != nil {
@@ -2449,7 +2474,7 @@ func Jxyb3273(stmt_mon string, stmt_loc string, org_name string, doctor string,
2449 2474
 		return err.Error(), ""
2450 2475
 	}
2451 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 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,7 +2504,7 @@ func Jxyb3274(setl_mon string, fix_fill_dept string, fix_fill_psn_id string, fix
2479 2504
 		return err.Error(), ""
2480 2505
 	}
2481 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 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 Parādīt failu

@@ -2226,7 +2226,49 @@ func Jxyb4101(struct4101 Struct4101, params models.PublicParams) (string, string
2226 2226
 	fmt.Println(string(bytesData))
2227 2227
 
2228 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