test_user 1 ano atrás
pai
commit
6f03bba60d

+ 95 - 7
controllers/js/jsyb_controller.go Ver arquivo

@@ -50,15 +50,103 @@ func JSybRegistRouters() {
50 50
 	beego.Router("/jsyb/4101", &JSybController{}, "post:Get4101")
51 51
 	beego.Router("/jsyb/readcard", &JSybController{}, "get:ReadCard")
52 52
 
53
-	beego.Router("/jsyb/3501", &JSybController{}, "post:Get3501")
54
-	beego.Router("/jsyb/3502", &JSybController{}, "post:Get3502")
55
-	beego.Router("/jsyb/3503", &JSybController{}, "post:Get3503")
56
-	beego.Router("/jsyb/3504", &JSybController{}, "post:Get3504")
57
-	beego.Router("/jsyb/3505", &JSybController{}, "post:Get3505")
58
-	beego.Router("/jsyb/3506", &JSybController{}, "post:Get3506")
59
-	beego.Router("/jsyb/3507", &JSybController{}, "post:Get3507")
53
+	beego.Router("/jsyb/3260", &JSybController{}, "post:Get3260")
54
+	beego.Router("/jsyb/3261", &JSybController{}, "post:Get3261")
55
+	beego.Router("/jsyb/3262", &JSybController{}, "post:Get3262")
56
+	beego.Router("/jsyb/3263", &JSybController{}, "post:Get3263")
57
+	beego.Router("/jsyb/3264", &JSybController{}, "post:Get3264")
58
+	beego.Router("/jsyb/3265", &JSybController{}, "post:Get3265")
59
+	beego.Router("/jsyb/3266", &JSybController{}, "post:Get3266")
60
+	beego.Router("/jsyb/3267", &JSybController{}, "post:Get3267")
61
+	beego.Router("/jsyb/3268", &JSybController{}, "post:Get3268")
62
+	beego.Router("/jsyb/3269", &JSybController{}, "post:Get3269")
63
+	beego.Router("/jsyb/3270", &JSybController{}, "post:Get3270")
64
+	beego.Router("/jsyb/3271", &JSybController{}, "post:Get3271")
65
+	beego.Router("/jsyb/3272", &JSybController{}, "post:Get3272")
66
+	beego.Router("/jsyb/3273", &JSybController{}, "post:Get3273")
67
+	beego.Router("/jsyb/3274", &JSybController{}, "post:Get3274")
68
+	beego.Router("/jsyb/3275", &JSybController{}, "post:Get3275")
69
+	beego.Router("/jsyb/3276", &JSybController{}, "post:Get3276")
70
+	beego.Router("/jsyb/3277", &JSybController{}, "post:Get3277")
60 71
 
61 72
 }
73
+
74
+func (c *JSybController) Get3260() {
75
+	service.Jxyb3260()
76
+}
77
+func (c *JSybController) Get3261() {
78
+	service.Jxyb3261()
79
+
80
+}
81
+func (c *JSybController) Get3262() {
82
+	service.Jxyb3262()
83
+
84
+}
85
+func (c *JSybController) Get3263() {
86
+	service.Jxyb3263()
87
+
88
+}
89
+func (c *JSybController) Get3264() {
90
+	service.Jxyb3264()
91
+
92
+}
93
+func (c *JSybController) Get3265() {
94
+	service.Jxyb3265()
95
+
96
+}
97
+func (c *JSybController) Get3266() {
98
+	service.Jxyb3266()
99
+
100
+}
101
+func (c *JSybController) Get3267() {
102
+	service.Jxyb3267()
103
+
104
+}
105
+func (c *JSybController) Get3268() {
106
+	service.Jxyb3268()
107
+
108
+}
109
+func (c *JSybController) Get3269() {
110
+	service.Jxyb3269()
111
+
112
+}
113
+func (c *JSybController) Get3270() {
114
+	service.Jxyb3270()
115
+
116
+}
117
+
118
+func (c *JSybController) Get3271() {
119
+	service.Jxyb3271()
120
+
121
+}
122
+
123
+func (c *JSybController) Get3272() {
124
+	service.Jxyb3272()
125
+
126
+}
127
+
128
+func (c *JSybController) Get3273() {
129
+	service.Jxyb3273()
130
+
131
+}
132
+
133
+func (c *JSybController) Get3274() {
134
+	service.Jxyb3274()
135
+
136
+}
137
+
138
+func (c *JSybController) Get3275() {
139
+	service.Jxyb3275()
140
+
141
+}
142
+func (c *JSybController) Get3276() {
143
+	service.Jxyb3276()
144
+
145
+}
146
+func (c *JSybController) Get3277() {
147
+	service.Jxyb3277()
148
+}
149
+
62 150
 func (c *JSybController) Get3501() {
63 151
 	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
64 152
 	var respJSON map[string]interface{}

+ 402 - 22
controllers/sg/his_api_controller.go Ver arquivo

@@ -3,8 +3,12 @@ package sg
3 3
 import (
4 4
 	"archive/zip"
5 5
 	"bytes"
6
+	//"crypto/x509/pkix"
6 7
 	"encoding/json"
7 8
 	"fmt"
9
+	//"github.com/tjfoc/gmsm/sm2"
10
+	//"github.com/tjfoc/gmsm/sm3"
11
+
8 12
 	"gdyb/controllers"
9 13
 	"gdyb/enums"
10 14
 	"gdyb/models"
@@ -15,6 +19,7 @@ import (
15 19
 	"github.com/gorilla/websocket"
16 20
 	"github.com/jinzhu/gorm"
17 21
 	"github.com/shopspring/decimal"
22
+
18 23
 	"io"
19 24
 	"io/ioutil"
20 25
 	"math"
@@ -123,7 +128,281 @@ func HisManagerApiRegistRouters() {
123 128
 	//beego.Router("/api/CFYLJG009", &HisApiController{}, "get:GetCFYLJG009")
124 129
 	//beego.Router("/api/2205", &HisApiController{}, "get:Get2205")
125 130
 
131
+	beego.Router("/jsyb/3260", &HisApiController{}, "get:Get3260")
132
+	beego.Router("/jsyb/3261", &HisApiController{}, "get:Get3261")
133
+	beego.Router("/jsyb/3262", &HisApiController{}, "get:Get3262")
134
+	beego.Router("/jsyb/3263", &HisApiController{}, "get:Get3263")
135
+	beego.Router("/jsyb/3264", &HisApiController{}, "get:Get3264")
136
+	beego.Router("/jsyb/3265", &HisApiController{}, "get:Get3265")
137
+	beego.Router("/jsyb/3266", &HisApiController{}, "get:Get3266")
138
+	beego.Router("/jsyb/3267", &HisApiController{}, "get:Get3267")
139
+	beego.Router("/jsyb/3268", &HisApiController{}, "get:Get3268")
140
+	beego.Router("/jsyb/3269", &HisApiController{}, "get:Get3269")
141
+	beego.Router("/jsyb/3270", &HisApiController{}, "get:Get3270")
142
+	beego.Router("/jsyb/3271", &HisApiController{}, "get:Get3271")
143
+	beego.Router("/jsyb/3272", &HisApiController{}, "get:Get3272")
144
+	beego.Router("/jsyb/3273", &HisApiController{}, "get:Get3273")
145
+	beego.Router("/jsyb/3274", &HisApiController{}, "get:Get3274")
146
+	beego.Router("/jsyb/3275", &HisApiController{}, "get:Get3275")
147
+	beego.Router("/jsyb/3276", &HisApiController{}, "get:Get3276")
148
+	beego.Router("/jsyb/3277", &HisApiController{}, "get:Get3277")
149
+
150
+}
151
+func (c *HisApiController) Get3260() {
152
+	admin_user_id, _ := c.GetInt64("admin_user_id")
153
+
154
+	curRoles, _ := service.GetAdminUserInfoByID(c.GetAdminUserInfo().CurrentOrgId, admin_user_id)
155
+	miConfig, _ := service.FindMedicalInsuranceInfo(c.GetAdminUserInfo().CurrentOrgId)
156
+	var api string
157
+	if miConfig.MdtrtareaAdmvs == "320921" {
158
+		api = "http://192.168.2.3:9532/" + "jsyb/3260?" + "org_name=" + miConfig.OrgName + "&doctor=" + curRoles.UserName + "&doctor_name=" + curRoles.UserName + "&fixmedins_code=" + miConfig.Code +
159
+			"&insuplc_admdvs=" + miConfig.MdtrtareaAdmvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&cainfo=" + miConfig.Cainfo
160
+	} else {
161
+		api = "http://192.168.5.251:9532/" + "jsyb/3260?" + "org_name=" + miConfig.OrgName + "&doctor=" + curRoles.UserName + "&doctor_name=" + curRoles.UserName + "&fixmedins_code=" + miConfig.Code +
162
+			"&insuplc_admdvs=" + miConfig.MdtrtareaAdmvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&cainfo=" + miConfig.Cainfo
163
+	}
164
+
165
+}
166
+func (c *HisApiController) Get3261() {
167
+	admin_user_id, _ := c.GetInt64("admin_user_id")
168
+
169
+	curRoles, _ := service.GetAdminUserInfoByID(c.GetAdminUserInfo().CurrentOrgId, admin_user_id)
170
+	miConfig, _ := service.FindMedicalInsuranceInfo(c.GetAdminUserInfo().CurrentOrgId)
171
+	var api string
172
+	if miConfig.MdtrtareaAdmvs == "320921" {
173
+		api = "http://192.168.2.3:9532/" + "jsyb/3260?" + "org_name=" + miConfig.OrgName + "&doctor=" + curRoles.UserName + "&doctor_name=" + curRoles.UserName + "&fixmedins_code=" + miConfig.Code +
174
+			"&insuplc_admdvs=" + miConfig.MdtrtareaAdmvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&cainfo=" + miConfig.Cainfo
175
+	} else {
176
+		api = "http://192.168.5.251:9532/" + "jsyb/3260?" + "org_name=" + miConfig.OrgName + "&doctor=" + curRoles.UserName + "&doctor_name=" + curRoles.UserName + "&fixmedins_code=" + miConfig.Code +
177
+			"&insuplc_admdvs=" + miConfig.MdtrtareaAdmvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&cainfo=" + miConfig.Cainfo
178
+	}
179
+
126 180
 }
181
+func (c *HisApiController) Get3262() {
182
+	admin_user_id, _ := c.GetInt64("admin_user_id")
183
+
184
+	curRoles, _ := service.GetAdminUserInfoByID(c.GetAdminUserInfo().CurrentOrgId, admin_user_id)
185
+	miConfig, _ := service.FindMedicalInsuranceInfo(c.GetAdminUserInfo().CurrentOrgId)
186
+	var api string
187
+	if miConfig.MdtrtareaAdmvs == "320921" {
188
+		api = "http://192.168.2.3:9532/" + "jsyb/3260?" + "org_name=" + miConfig.OrgName + "&doctor=" + curRoles.UserName + "&doctor_name=" + curRoles.UserName + "&fixmedins_code=" + miConfig.Code +
189
+			"&insuplc_admdvs=" + miConfig.MdtrtareaAdmvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&cainfo=" + miConfig.Cainfo
190
+	} else {
191
+		api = "http://192.168.5.251:9532/" + "jsyb/3260?" + "org_name=" + miConfig.OrgName + "&doctor=" + curRoles.UserName + "&doctor_name=" + curRoles.UserName + "&fixmedins_code=" + miConfig.Code +
192
+			"&insuplc_admdvs=" + miConfig.MdtrtareaAdmvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&cainfo=" + miConfig.Cainfo
193
+	}
194
+
195
+}
196
+func (c *HisApiController) Get3263() {
197
+	admin_user_id, _ := c.GetInt64("admin_user_id")
198
+
199
+	curRoles, _ := service.GetAdminUserInfoByID(c.GetAdminUserInfo().CurrentOrgId, admin_user_id)
200
+	miConfig, _ := service.FindMedicalInsuranceInfo(c.GetAdminUserInfo().CurrentOrgId)
201
+	var api string
202
+	if miConfig.MdtrtareaAdmvs == "320921" {
203
+		api = "http://192.168.2.3:9532/" + "jsyb/3260?" + "org_name=" + miConfig.OrgName + "&doctor=" + curRoles.UserName + "&doctor_name=" + curRoles.UserName + "&fixmedins_code=" + miConfig.Code +
204
+			"&insuplc_admdvs=" + miConfig.MdtrtareaAdmvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&cainfo=" + miConfig.Cainfo
205
+	} else {
206
+		api = "http://192.168.5.251:9532/" + "jsyb/3260?" + "org_name=" + miConfig.OrgName + "&doctor=" + curRoles.UserName + "&doctor_name=" + curRoles.UserName + "&fixmedins_code=" + miConfig.Code +
207
+			"&insuplc_admdvs=" + miConfig.MdtrtareaAdmvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&cainfo=" + miConfig.Cainfo
208
+	}
209
+
210
+}
211
+func (c *HisApiController) Get3264() {
212
+	if miConfig.MdtrtareaAdmvs == "320921" {
213
+		api = "http://192.168.2.3:9532/" + "jsyb/3264?psn_no=" + PsnNo + "&insutype=" + insutype + "&cert_no=" + cert_no + "&ipt_otp_no=" + ipt_otp_no +
214
+			"&org_name=" + miConfig.OrgName + "&doctor=" + roles.UserName + "&doctor_name=" + doctor_info.UserName + "&fixmedins_code=" + miConfig.Code +
215
+			"&insuplc_admdvs=" + insuplc_admdvs_temp + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(id_card_type, 10) + "&dept_code=" + department.Number + "&dept=" + department.Name + "&doctor_id=" + doctor_info.DoctorNumber + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&verify_number=" + psn_info.VerifyNumber + "&cainfo=" + miConfig.Cainfo
216
+
217
+	} else {
218
+		api = "http://192.168.5.251:9532/" + "jsyb/3264?psn_no=" + PsnNo + "&insutype=" + insutype + "&cert_no=" + cert_no + "&ipt_otp_no=" + ipt_otp_no +
219
+			"&org_name=" + miConfig.OrgName + "&doctor=" + roles.UserName + "&doctor_name=" + doctor_info.UserName + "&fixmedins_code=" + miConfig.Code +
220
+			"&insuplc_admdvs=" + insuplc_admdvs_temp + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(id_card_type, 10) + "&dept_code=" + department.Number + "&dept=" + department.Name + "&doctor_id=" + doctor_info.DoctorNumber + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&verify_number=" + psn_info.VerifyNumber + "&cainfo=" + miConfig.Cainfo
221
+
222
+	}
223
+
224
+}
225
+func (c *HisApiController) Get3265() {
226
+	if miConfig.MdtrtareaAdmvs == "320921" {
227
+		api = "http://192.168.2.3:9532/" + "jsyb/3265?psn_no=" + PsnNo + "&insutype=" + insutype + "&cert_no=" + cert_no + "&ipt_otp_no=" + ipt_otp_no +
228
+			"&org_name=" + miConfig.OrgName + "&doctor=" + roles.UserName + "&doctor_name=" + doctor_info.UserName + "&fixmedins_code=" + miConfig.Code +
229
+			"&insuplc_admdvs=" + insuplc_admdvs_temp + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(id_card_type, 10) + "&dept_code=" + department.Number + "&dept=" + department.Name + "&doctor_id=" + doctor_info.DoctorNumber + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&verify_number=" + psn_info.VerifyNumber + "&cainfo=" + miConfig.Cainfo
230
+
231
+	} else {
232
+		api = "http://192.168.5.251:9532/" + "jsyb/3265?psn_no=" + PsnNo + "&insutype=" + insutype + "&cert_no=" + cert_no + "&ipt_otp_no=" + ipt_otp_no +
233
+			"&org_name=" + miConfig.OrgName + "&doctor=" + roles.UserName + "&doctor_name=" + doctor_info.UserName + "&fixmedins_code=" + miConfig.Code +
234
+			"&insuplc_admdvs=" + insuplc_admdvs_temp + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(id_card_type, 10) + "&dept_code=" + department.Number + "&dept=" + department.Name + "&doctor_id=" + doctor_info.DoctorNumber + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&verify_number=" + psn_info.VerifyNumber + "&cainfo=" + miConfig.Cainfo
235
+
236
+	}
237
+}
238
+func (c *HisApiController) Get3266() {
239
+	if miConfig.MdtrtareaAdmvs == "320921" {
240
+		api = "http://192.168.2.3:9532/" + "jsyb/3266?psn_no=" + PsnNo + "&insutype=" + insutype + "&cert_no=" + cert_no + "&ipt_otp_no=" + ipt_otp_no +
241
+			"&org_name=" + miConfig.OrgName + "&doctor=" + roles.UserName + "&doctor_name=" + doctor_info.UserName + "&fixmedins_code=" + miConfig.Code +
242
+			"&insuplc_admdvs=" + insuplc_admdvs_temp + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(id_card_type, 10) + "&dept_code=" + department.Number + "&dept=" + department.Name + "&doctor_id=" + doctor_info.DoctorNumber + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&verify_number=" + psn_info.VerifyNumber + "&cainfo=" + miConfig.Cainfo
243
+
244
+	} else {
245
+		api = "http://192.168.5.251:9532/" + "jsyb/3266?psn_no=" + PsnNo + "&insutype=" + insutype + "&cert_no=" + cert_no + "&ipt_otp_no=" + ipt_otp_no +
246
+			"&org_name=" + miConfig.OrgName + "&doctor=" + roles.UserName + "&doctor_name=" + doctor_info.UserName + "&fixmedins_code=" + miConfig.Code +
247
+			"&insuplc_admdvs=" + insuplc_admdvs_temp + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(id_card_type, 10) + "&dept_code=" + department.Number + "&dept=" + department.Name + "&doctor_id=" + doctor_info.DoctorNumber + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&verify_number=" + psn_info.VerifyNumber + "&cainfo=" + miConfig.Cainfo
248
+
249
+	}
250
+
251
+}
252
+func (c *HisApiController) Get3267() {
253
+	if miConfig.MdtrtareaAdmvs == "320921" {
254
+		api = "http://192.168.2.3:9532/" + "jsyb/3267?psn_no=" + PsnNo + "&insutype=" + insutype + "&cert_no=" + cert_no + "&ipt_otp_no=" + ipt_otp_no +
255
+			"&org_name=" + miConfig.OrgName + "&doctor=" + roles.UserName + "&doctor_name=" + doctor_info.UserName + "&fixmedins_code=" + miConfig.Code +
256
+			"&insuplc_admdvs=" + insuplc_admdvs_temp + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(id_card_type, 10) + "&dept_code=" + department.Number + "&dept=" + department.Name + "&doctor_id=" + doctor_info.DoctorNumber + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&verify_number=" + psn_info.VerifyNumber + "&cainfo=" + miConfig.Cainfo
257
+
258
+	} else {
259
+		api = "http://192.168.5.251:9532/" + "jsyb/3267?psn_no=" + PsnNo + "&insutype=" + insutype + "&cert_no=" + cert_no + "&ipt_otp_no=" + ipt_otp_no +
260
+			"&org_name=" + miConfig.OrgName + "&doctor=" + roles.UserName + "&doctor_name=" + doctor_info.UserName + "&fixmedins_code=" + miConfig.Code +
261
+			"&insuplc_admdvs=" + insuplc_admdvs_temp + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(id_card_type, 10) + "&dept_code=" + department.Number + "&dept=" + department.Name + "&doctor_id=" + doctor_info.DoctorNumber + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&verify_number=" + psn_info.VerifyNumber + "&cainfo=" + miConfig.Cainfo
262
+
263
+	}
264
+
265
+}
266
+func (c *HisApiController) Get3268() {
267
+	if miConfig.MdtrtareaAdmvs == "320921" {
268
+		api = "http://192.168.2.3:9532/" + "jsyb/3268?psn_no=" + PsnNo + "&insutype=" + insutype + "&cert_no=" + cert_no + "&ipt_otp_no=" + ipt_otp_no +
269
+			"&org_name=" + miConfig.OrgName + "&doctor=" + roles.UserName + "&doctor_name=" + doctor_info.UserName + "&fixmedins_code=" + miConfig.Code +
270
+			"&insuplc_admdvs=" + insuplc_admdvs_temp + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(id_card_type, 10) + "&dept_code=" + department.Number + "&dept=" + department.Name + "&doctor_id=" + doctor_info.DoctorNumber + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&verify_number=" + psn_info.VerifyNumber + "&cainfo=" + miConfig.Cainfo
271
+
272
+	} else {
273
+		api = "http://192.168.5.251:9532/" + "jsyb/3268?psn_no=" + PsnNo + "&insutype=" + insutype + "&cert_no=" + cert_no + "&ipt_otp_no=" + ipt_otp_no +
274
+			"&org_name=" + miConfig.OrgName + "&doctor=" + roles.UserName + "&doctor_name=" + doctor_info.UserName + "&fixmedins_code=" + miConfig.Code +
275
+			"&insuplc_admdvs=" + insuplc_admdvs_temp + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(id_card_type, 10) + "&dept_code=" + department.Number + "&dept=" + department.Name + "&doctor_id=" + doctor_info.DoctorNumber + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&verify_number=" + psn_info.VerifyNumber + "&cainfo=" + miConfig.Cainfo
276
+
277
+	}
278
+
279
+}
280
+func (c *HisApiController) Get3269() {
281
+	if miConfig.MdtrtareaAdmvs == "320921" {
282
+		api = "http://192.168.2.3:9532/" + "jsyb/3269?psn_no=" + PsnNo + "&insutype=" + insutype + "&cert_no=" + cert_no + "&ipt_otp_no=" + ipt_otp_no +
283
+			"&org_name=" + miConfig.OrgName + "&doctor=" + roles.UserName + "&doctor_name=" + doctor_info.UserName + "&fixmedins_code=" + miConfig.Code +
284
+			"&insuplc_admdvs=" + insuplc_admdvs_temp + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(id_card_type, 10) + "&dept_code=" + department.Number + "&dept=" + department.Name + "&doctor_id=" + doctor_info.DoctorNumber + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&verify_number=" + psn_info.VerifyNumber + "&cainfo=" + miConfig.Cainfo
285
+
286
+	} else {
287
+		api = "http://192.168.5.251:9532/" + "jsyb/3269?psn_no=" + PsnNo + "&insutype=" + insutype + "&cert_no=" + cert_no + "&ipt_otp_no=" + ipt_otp_no +
288
+			"&org_name=" + miConfig.OrgName + "&doctor=" + roles.UserName + "&doctor_name=" + doctor_info.UserName + "&fixmedins_code=" + miConfig.Code +
289
+			"&insuplc_admdvs=" + insuplc_admdvs_temp + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(id_card_type, 10) + "&dept_code=" + department.Number + "&dept=" + department.Name + "&doctor_id=" + doctor_info.DoctorNumber + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&verify_number=" + psn_info.VerifyNumber + "&cainfo=" + miConfig.Cainfo
290
+
291
+	}
292
+
293
+}
294
+func (c *HisApiController) Get3270() {
295
+	if miConfig.MdtrtareaAdmvs == "320921" {
296
+		api = "http://192.168.2.3:9532/" + "jsyb/3270?psn_no=" + PsnNo + "&insutype=" + insutype + "&cert_no=" + cert_no + "&ipt_otp_no=" + ipt_otp_no +
297
+			"&org_name=" + miConfig.OrgName + "&doctor=" + roles.UserName + "&doctor_name=" + doctor_info.UserName + "&fixmedins_code=" + miConfig.Code +
298
+			"&insuplc_admdvs=" + insuplc_admdvs_temp + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(id_card_type, 10) + "&dept_code=" + department.Number + "&dept=" + department.Name + "&doctor_id=" + doctor_info.DoctorNumber + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&verify_number=" + psn_info.VerifyNumber + "&cainfo=" + miConfig.Cainfo
299
+
300
+	} else {
301
+		api = "http://192.168.5.251:9532/" + "jsyb/3270?psn_no=" + PsnNo + "&insutype=" + insutype + "&cert_no=" + cert_no + "&ipt_otp_no=" + ipt_otp_no +
302
+			"&org_name=" + miConfig.OrgName + "&doctor=" + roles.UserName + "&doctor_name=" + doctor_info.UserName + "&fixmedins_code=" + miConfig.Code +
303
+			"&insuplc_admdvs=" + insuplc_admdvs_temp + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(id_card_type, 10) + "&dept_code=" + department.Number + "&dept=" + department.Name + "&doctor_id=" + doctor_info.DoctorNumber + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&verify_number=" + psn_info.VerifyNumber + "&cainfo=" + miConfig.Cainfo
304
+
305
+	}
306
+
307
+}
308
+func (c *HisApiController) Get3271() {
309
+	if miConfig.MdtrtareaAdmvs == "320921" {
310
+		api = "http://192.168.2.3:9532/" + "jsyb/3271?psn_no=" + PsnNo + "&insutype=" + insutype + "&cert_no=" + cert_no + "&ipt_otp_no=" + ipt_otp_no +
311
+			"&org_name=" + miConfig.OrgName + "&doctor=" + roles.UserName + "&doctor_name=" + doctor_info.UserName + "&fixmedins_code=" + miConfig.Code +
312
+			"&insuplc_admdvs=" + insuplc_admdvs_temp + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(id_card_type, 10) + "&dept_code=" + department.Number + "&dept=" + department.Name + "&doctor_id=" + doctor_info.DoctorNumber + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&verify_number=" + psn_info.VerifyNumber + "&cainfo=" + miConfig.Cainfo
313
+
314
+	} else {
315
+		api = "http://192.168.5.251:9532/" + "jsyb/3271?psn_no=" + PsnNo + "&insutype=" + insutype + "&cert_no=" + cert_no + "&ipt_otp_no=" + ipt_otp_no +
316
+			"&org_name=" + miConfig.OrgName + "&doctor=" + roles.UserName + "&doctor_name=" + doctor_info.UserName + "&fixmedins_code=" + miConfig.Code +
317
+			"&insuplc_admdvs=" + insuplc_admdvs_temp + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(id_card_type, 10) + "&dept_code=" + department.Number + "&dept=" + department.Name + "&doctor_id=" + doctor_info.DoctorNumber + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&verify_number=" + psn_info.VerifyNumber + "&cainfo=" + miConfig.Cainfo
318
+
319
+	}
320
+
321
+}
322
+func (c *HisApiController) Get3272() {
323
+	if miConfig.MdtrtareaAdmvs == "320921" {
324
+		api = "http://192.168.2.3:9532/" + "jsyb/3272?psn_no=" + PsnNo + "&insutype=" + insutype + "&cert_no=" + cert_no + "&ipt_otp_no=" + ipt_otp_no +
325
+			"&org_name=" + miConfig.OrgName + "&doctor=" + roles.UserName + "&doctor_name=" + doctor_info.UserName + "&fixmedins_code=" + miConfig.Code +
326
+			"&insuplc_admdvs=" + insuplc_admdvs_temp + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(id_card_type, 10) + "&dept_code=" + department.Number + "&dept=" + department.Name + "&doctor_id=" + doctor_info.DoctorNumber + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&verify_number=" + psn_info.VerifyNumber + "&cainfo=" + miConfig.Cainfo
327
+
328
+	} else {
329
+		api = "http://192.168.5.251:9532/" + "jsyb/3272?psn_no=" + PsnNo + "&insutype=" + insutype + "&cert_no=" + cert_no + "&ipt_otp_no=" + ipt_otp_no +
330
+			"&org_name=" + miConfig.OrgName + "&doctor=" + roles.UserName + "&doctor_name=" + doctor_info.UserName + "&fixmedins_code=" + miConfig.Code +
331
+			"&insuplc_admdvs=" + insuplc_admdvs_temp + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(id_card_type, 10) + "&dept_code=" + department.Number + "&dept=" + department.Name + "&doctor_id=" + doctor_info.DoctorNumber + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&verify_number=" + psn_info.VerifyNumber + "&cainfo=" + miConfig.Cainfo
332
+
333
+	}
334
+
335
+}
336
+func (c *HisApiController) Get3273() {
337
+	if miConfig.MdtrtareaAdmvs == "320921" {
338
+		api = "http://192.168.2.3:9532/" + "jsyb/3273?psn_no=" + PsnNo + "&insutype=" + insutype + "&cert_no=" + cert_no + "&ipt_otp_no=" + ipt_otp_no +
339
+			"&org_name=" + miConfig.OrgName + "&doctor=" + roles.UserName + "&doctor_name=" + doctor_info.UserName + "&fixmedins_code=" + miConfig.Code +
340
+			"&insuplc_admdvs=" + insuplc_admdvs_temp + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(id_card_type, 10) + "&dept_code=" + department.Number + "&dept=" + department.Name + "&doctor_id=" + doctor_info.DoctorNumber + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&verify_number=" + psn_info.VerifyNumber + "&cainfo=" + miConfig.Cainfo
341
+
342
+	} else {
343
+		api = "http://192.168.5.251:9532/" + "jsyb/3273?psn_no=" + PsnNo + "&insutype=" + insutype + "&cert_no=" + cert_no + "&ipt_otp_no=" + ipt_otp_no +
344
+			"&org_name=" + miConfig.OrgName + "&doctor=" + roles.UserName + "&doctor_name=" + doctor_info.UserName + "&fixmedins_code=" + miConfig.Code +
345
+			"&insuplc_admdvs=" + insuplc_admdvs_temp + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(id_card_type, 10) + "&dept_code=" + department.Number + "&dept=" + department.Name + "&doctor_id=" + doctor_info.DoctorNumber + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&verify_number=" + psn_info.VerifyNumber + "&cainfo=" + miConfig.Cainfo
346
+
347
+	}
348
+
349
+}
350
+func (c *HisApiController) Get3274() {
351
+	if miConfig.MdtrtareaAdmvs == "320921" {
352
+		api = "http://192.168.2.3:9532/" + "jsyb/3274?psn_no=" + PsnNo + "&insutype=" + insutype + "&cert_no=" + cert_no + "&ipt_otp_no=" + ipt_otp_no +
353
+			"&org_name=" + miConfig.OrgName + "&doctor=" + roles.UserName + "&doctor_name=" + doctor_info.UserName + "&fixmedins_code=" + miConfig.Code +
354
+			"&insuplc_admdvs=" + insuplc_admdvs_temp + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(id_card_type, 10) + "&dept_code=" + department.Number + "&dept=" + department.Name + "&doctor_id=" + doctor_info.DoctorNumber + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&verify_number=" + psn_info.VerifyNumber + "&cainfo=" + miConfig.Cainfo
355
+
356
+	} else {
357
+		api = "http://192.168.5.251:9532/" + "jsyb/3274?psn_no=" + PsnNo + "&insutype=" + insutype + "&cert_no=" + cert_no + "&ipt_otp_no=" + ipt_otp_no +
358
+			"&org_name=" + miConfig.OrgName + "&doctor=" + roles.UserName + "&doctor_name=" + doctor_info.UserName + "&fixmedins_code=" + miConfig.Code +
359
+			"&insuplc_admdvs=" + insuplc_admdvs_temp + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(id_card_type, 10) + "&dept_code=" + department.Number + "&dept=" + department.Name + "&doctor_id=" + doctor_info.DoctorNumber + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&verify_number=" + psn_info.VerifyNumber + "&cainfo=" + miConfig.Cainfo
360
+
361
+	}
362
+
363
+}
364
+func (c *HisApiController) Get3275() {
365
+	if miConfig.MdtrtareaAdmvs == "320921" {
366
+		api = "http://192.168.2.3:9532/" + "jsyb/3275?psn_no=" + PsnNo + "&insutype=" + insutype + "&cert_no=" + cert_no + "&ipt_otp_no=" + ipt_otp_no +
367
+			"&org_name=" + miConfig.OrgName + "&doctor=" + roles.UserName + "&doctor_name=" + doctor_info.UserName + "&fixmedins_code=" + miConfig.Code +
368
+			"&insuplc_admdvs=" + insuplc_admdvs_temp + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(id_card_type, 10) + "&dept_code=" + department.Number + "&dept=" + department.Name + "&doctor_id=" + doctor_info.DoctorNumber + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&verify_number=" + psn_info.VerifyNumber + "&cainfo=" + miConfig.Cainfo
369
+
370
+	} else {
371
+		api = "http://192.168.5.251:9532/" + "jsyb/3275?psn_no=" + PsnNo + "&insutype=" + insutype + "&cert_no=" + cert_no + "&ipt_otp_no=" + ipt_otp_no +
372
+			"&org_name=" + miConfig.OrgName + "&doctor=" + roles.UserName + "&doctor_name=" + doctor_info.UserName + "&fixmedins_code=" + miConfig.Code +
373
+			"&insuplc_admdvs=" + insuplc_admdvs_temp + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(id_card_type, 10) + "&dept_code=" + department.Number + "&dept=" + department.Name + "&doctor_id=" + doctor_info.DoctorNumber + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&verify_number=" + psn_info.VerifyNumber + "&cainfo=" + miConfig.Cainfo
374
+
375
+	}
376
+
377
+}
378
+func (c *HisApiController) Get3276() {
379
+	if miConfig.MdtrtareaAdmvs == "320921" {
380
+		api = "http://192.168.2.3:9532/" + "jsyb/3276?psn_no=" + PsnNo + "&insutype=" + insutype + "&cert_no=" + cert_no + "&ipt_otp_no=" + ipt_otp_no +
381
+			"&org_name=" + miConfig.OrgName + "&doctor=" + roles.UserName + "&doctor_name=" + doctor_info.UserName + "&fixmedins_code=" + miConfig.Code +
382
+			"&insuplc_admdvs=" + insuplc_admdvs_temp + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(id_card_type, 10) + "&dept_code=" + department.Number + "&dept=" + department.Name + "&doctor_id=" + doctor_info.DoctorNumber + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&verify_number=" + psn_info.VerifyNumber + "&cainfo=" + miConfig.Cainfo
383
+
384
+	} else {
385
+		api = "http://192.168.5.251:9532/" + "jsyb/3276?psn_no=" + PsnNo + "&insutype=" + insutype + "&cert_no=" + cert_no + "&ipt_otp_no=" + ipt_otp_no +
386
+			"&org_name=" + miConfig.OrgName + "&doctor=" + roles.UserName + "&doctor_name=" + doctor_info.UserName + "&fixmedins_code=" + miConfig.Code +
387
+			"&insuplc_admdvs=" + insuplc_admdvs_temp + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(id_card_type, 10) + "&dept_code=" + department.Number + "&dept=" + department.Name + "&doctor_id=" + doctor_info.DoctorNumber + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&verify_number=" + psn_info.VerifyNumber + "&cainfo=" + miConfig.Cainfo
388
+
389
+	}
390
+
391
+}
392
+func (c *HisApiController) Get3277() {
393
+	if miConfig.MdtrtareaAdmvs == "320921" {
394
+		api = "http://192.168.2.3:9532/" + "jsyb/3277?psn_no=" + PsnNo + "&insutype=" + insutype + "&cert_no=" + cert_no + "&ipt_otp_no=" + ipt_otp_no +
395
+			"&org_name=" + miConfig.OrgName + "&doctor=" + roles.UserName + "&doctor_name=" + doctor_info.UserName + "&fixmedins_code=" + miConfig.Code +
396
+			"&insuplc_admdvs=" + insuplc_admdvs_temp + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(id_card_type, 10) + "&dept_code=" + department.Number + "&dept=" + department.Name + "&doctor_id=" + doctor_info.DoctorNumber + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&verify_number=" + psn_info.VerifyNumber + "&cainfo=" + miConfig.Cainfo
397
+
398
+	} else {
399
+		api = "http://192.168.5.251:9532/" + "jsyb/3277?psn_no=" + PsnNo + "&insutype=" + insutype + "&cert_no=" + cert_no + "&ipt_otp_no=" + ipt_otp_no +
400
+			"&org_name=" + miConfig.OrgName + "&doctor=" + roles.UserName + "&doctor_name=" + doctor_info.UserName + "&fixmedins_code=" + miConfig.Code +
401
+			"&insuplc_admdvs=" + insuplc_admdvs_temp + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(id_card_type, 10) + "&dept_code=" + department.Number + "&dept=" + department.Name + "&doctor_id=" + doctor_info.DoctorNumber + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&verify_number=" + psn_info.VerifyNumber + "&cainfo=" + miConfig.Cainfo
402
+
403
+	}
404
+}
405
+
127 406
 func (c *HisApiController) GetCFYLJG001() {
128 407
 	admin_user_id, _ := c.GetInt64("admin_user_id")
129 408
 	patient_id, _ := c.GetInt64("patient_id")
@@ -137,6 +416,9 @@ func (c *HisApiController) GetCFYLJG001() {
137 416
 
138 417
 	his, _ := service.GetHisPatientRecord(c.GetAdminUserInfo().CurrentOrgId, his_patient_id)
139 418
 	psn, _ := service.GetPsnByPatientId(patient_id)
419
+	//patient, _ := service.GetPatientByID(c.GetAdminUserInfo().CurrentOrgId,patient_id)
420
+
421
+	//patient, _ := service.GetPatientByID(c.GetAdminUserInfo().CurrentOrgId,patient_id)
140 422
 
141 423
 	curRoles, _ := service.GetAdminUserInfoByID(c.GetAdminUserInfo().CurrentOrgId, admin_user_id)
142 424
 	miConfig, _ := service.FindMedicalInsuranceInfo(c.GetAdminUserInfo().CurrentOrgId)
@@ -151,6 +433,7 @@ func (c *HisApiController) GetCFYLJG001() {
151 433
 	}
152 434
 	recordDateTime := theTime.Unix()
153 435
 	prescriptions, _ := service.GetHisPrescriptionForMedType(c.GetAdminUserInfo().CurrentOrgId, patient_id, recordDateTime)
436
+	info, _ := service.FindLastPatientPrescriptionInfoTwo(c.GetAdminUserInfo().CurrentOrgId, patient_id, recordDateTime)
154 437
 	for _, item := range prescriptions {
155 438
 		doctor, _ := service.GetAdminUserInfoByID(c.GetAdminUserInfo().CurrentOrgId, item.Creator)
156 439
 		if his.IdCardType == 1 {
@@ -193,8 +476,8 @@ func (c *HisApiController) GetCFYLJG001() {
193 476
 		cFYLJG001.RxDrugCnt = count
194 477
 		cFYLJG001.ValiDays = "5"
195 478
 		ts := time.Unix(item.PreTime, 0)
196
-		record_time = ts.AddDate(0, 0, int(5)).Unix()
197
-		tempTime3 := time.Unix(record_time, 0)
479
+		record_time2 := ts.AddDate(0, 0, int(5)).Unix()
480
+		tempTime3 := time.Unix(record_time2, 0)
198 481
 		timeFormat3 := tempTime3.Format("2006-01-02 15:04:05")
199 482
 		cFYLJG001.ValiEndTime = timeFormat3
200 483
 		cFYLJG001.RxCotnFlag = "0"
@@ -203,7 +486,8 @@ func (c *HisApiController) GetCFYLJG001() {
203 486
 			drug.MedListCodg = subItem.BaseDrugLib.MedicalInsuranceNumber
204 487
 			drug.MedinsListCodg = subItem.BaseDrugLib.MedicalInsuranceNumber
205 488
 			drug.RxItemTypeCode = "11"
206
-			drug.DrugDosform = "" //TODO
489
+
490
+			drug.DrugDosform = "乳膏剂" //TODO
207 491
 			if subItem.BaseDrugLib.MinUnit != subItem.BaseDrugLib.DoseUnit {
208 492
 				drug.DrugSpec = subItem.BaseDrugLib.Dose + subItem.BaseDrugLib.DoseUnit + "*" + strconv.FormatInt(subItem.BaseDrugLib.MinNumber, 10) + subItem.BaseDrugLib.MinUnit + "/" + subItem.BaseDrugLib.MaxUnit
209 493
 			}
@@ -216,9 +500,9 @@ func (c *HisApiController) GetCFYLJG001() {
216 500
 			if subItem.Day > 0 {
217 501
 				ts := time.Unix(subItem.StartTime, 0)
218 502
 				record_time := ts.AddDate(0, 0, int(subItem.Day)).Unix()
219
-				tempTime3 := time.Unix(record_time, 0)
220
-				timeFormat3 := tempTime3.Format("2006-01-02") + " 23:59:00"
221
-				drug.MedcEndtime = timeFormat3
503
+				tempTime4 := time.Unix(record_time, 0)
504
+				timeFormat5 := tempTime4.Format("2006-01-02") + " 23:59:00"
505
+				drug.MedcEndtime = timeFormat5
222 506
 			} else {
223 507
 				tempTime2 := time.Unix(subItem.StartTime, 0)
224 508
 				timeFormatTwo := tempTime2.Format("2006-01-02") + " 23:59:00"
@@ -230,12 +514,15 @@ func (c *HisApiController) GetCFYLJG001() {
230 514
 			drug.DrugSumamt = fmt.Sprintf("%.2f", subItem.Price*subItem.PrescribingNumber)
231 515
 			drug.DrugCnt = subItem.PrescribingNumber
232 516
 			drug.DrugDosunt = subItem.PrescribingNumberUnit
517
+			drug.DrugGenname = subItem.AdviceName
518
+			drug.MedcWayCodg = subItem.DeliveryWay
519
+			//drug.DrugTotlcnt = subItem.PrescribingNumber
233 520
 			drug.SinDoscnt = subItem.SingleDose
234 521
 			drug.SinDosunt = subItem.SingleDoseUnit
235 522
 			drug.UsedFrquCodg = strconv.FormatInt(subItem.ID, 10)
236 523
 			drug.UsedFrquName = subItem.ExecutionFrequency
237 524
 			drug.DrugTotlcnt = fmt.Sprintf("%.2f", subItem.PrescribingNumber)
238
-			drug.DrugTotlcntEmp = fmt.Sprintf("%.2f", subItem.PrescribingNumberUnit)
525
+			drug.DrugTotlcntEmp = subItem.PrescribingNumberUnit
239 526
 			drug.HospApprFlag = "1"
240 527
 			cFYLJG001.List = append(cFYLJG001.List, drug)
241 528
 		}
@@ -248,11 +535,12 @@ func (c *HisApiController) GetCFYLJG001() {
248 535
 		cFYLJG001.Mdtrtinfo.PsnNo = his.PsnNo
249 536
 		cFYLJG001.Mdtrtinfo.PatnName = his.PsnName
250 537
 		cFYLJG001.Mdtrtinfo.Certno = his.IdCardNo
251
-		cFYLJG001.Mdtrtinfo.PatnAge = fmt.Sprintf("%.2f", his.Age)
252
-		cFYLJG001.Mdtrtinfo.PatnHgt = ""
253
-		cFYLJG001.Mdtrtinfo.PatnWt = ""
538
+		cFYLJG001.Mdtrtinfo.PsnCertType = "01"
539
+		cFYLJG001.Mdtrtinfo.PatnAge = fmt.Sprintf("%.1f", his.Age)
540
+		cFYLJG001.Mdtrtinfo.PatnHgt = "160" //todo
541
+		cFYLJG001.Mdtrtinfo.PatnWt = "58"   //todo
254 542
 		cFYLJG001.Mdtrtinfo.Gend = his.Gend
255
-		cFYLJG001.Mdtrtinfo.PatnAge = fmt.Sprintf("%.2f", his.Age)
543
+		cFYLJG001.Mdtrtinfo.PatnAge = fmt.Sprintf("%.1f", his.Age)
256 544
 		cFYLJG001.Mdtrtinfo.PrscDeptName = "肾内科"
257 545
 		cFYLJG001.Mdtrtinfo.PrscDeptCode = "A03.06"
258 546
 		cFYLJG001.Mdtrtinfo.DrCode = doctor.DoctorNumber
@@ -263,32 +551,38 @@ func (c *HisApiController) GetCFYLJG001() {
263 551
 		cFYLJG001.Mdtrtinfo.DrDeptName = "肾内科"
264 552
 		cFYLJG001.Mdtrtinfo.Caty = "A03.06"
265 553
 		tempTime2 := time.Now().Unix()
266
-		tempTime3 := time.Unix(tempTime2, 0)
267
-		timeFormatTwo := tempTime3.Format("2006-01-02 15:04:05")
554
+		tempTime6 := time.Unix(tempTime2, 0)
555
+		timeFormatTwo := tempTime6.Format("2006-01-02 15:04:05")
268 556
 		cFYLJG001.Mdtrtinfo.MdtrtTime = timeFormatTwo
269 557
 		cFYLJG001.Mdtrtinfo.DiseCodg = "M07803"
270 558
 		cFYLJG001.Mdtrtinfo.SpDiseFlag = "1"
271 559
 		cFYLJG001.Mdtrtinfo.MaindiagCode = "N18.500"
272 560
 		cFYLJG001.Mdtrtinfo.MaindiagName = "慢性肾脏病5期"
273
-		diagnosis_ids := strings.Split(his.Diagnosis, ",")
561
+
562
+		memo := make(map[string]interface{})
563
+		memo["insutype"] = his.Insutype
564
+		bytesData, _ := json.Marshal(memo)
565
+		cFYLJG001.Mdtrtinfo.Extras = string(bytesData)
566
+
567
+		diagnosis_ids := strings.Split(info.Diagnosis, ",")
274 568
 		var config []*models.HisXtDiagnoseConfig
275 569
 		for _, item := range diagnosis_ids {
276 570
 			id, _ := strconv.ParseInt(item, 10, 64)
277 571
 			diagnosisConfig, _ := service.FindDiagnoseById(id)
278 572
 			config = append(config, &diagnosisConfig)
279 573
 		}
280
-		for index, item := range config {
574
+		for index, subitem := range config {
281 575
 			if index == 0 {
282 576
 				var dia models.DiseInfo
283 577
 				dia.DiagType = "1"
284 578
 				dia.MaindiagFlag = "1"
285 579
 				dia.DiagSrtNo = strconv.FormatInt(int64(index+1), 10)
286
-				dia.DiagCode = item.CountryCode
287
-				dia.DiagName = item.ClassName
580
+				dia.DiagCode = subitem.CountryCode
581
+				dia.DiagName = subitem.ClassName
288 582
 				dia.DiagDept = "肾内科"
289 583
 				dia.DiagDrNo = doctor.DoctorNumber
290 584
 				dia.DiagDrName = doctor.UserName
291
-				tempTime3 := time.Unix(item.Ctime, 0)
585
+				tempTime3 := time.Unix(item.PreTime, 0)
292 586
 				timeFormatTwo := tempTime3.Format("2006-01-02 15:04:05")
293 587
 				dia.DiagTime = timeFormatTwo
294 588
 				cFYLJG001.Diseinfo = append(cFYLJG001.Diseinfo, dia)
@@ -297,12 +591,12 @@ func (c *HisApiController) GetCFYLJG001() {
297 591
 				dia.DiagType = "1"
298 592
 				dia.MaindiagFlag = "0"
299 593
 				dia.DiagSrtNo = strconv.FormatInt(int64(index+1), 10)
300
-				dia.DiagCode = item.CountryCode
301
-				dia.DiagName = item.ClassName
594
+				dia.DiagCode = subitem.CountryCode
595
+				dia.DiagName = subitem.ClassName
302 596
 				dia.DiagDept = "肾内科"
303 597
 				dia.DiagDrNo = doctor.DoctorNumber
304 598
 				dia.DiagDrName = doctor.UserName
305
-				tempTime3 := time.Unix(item.Ctime, 0)
599
+				tempTime3 := time.Unix(item.PreTime, 0)
306 600
 				timeFormatTwo := tempTime3.Format("2006-01-02 15:04:05")
307 601
 				dia.DiagTime = timeFormatTwo
308 602
 				cFYLJG001.Diseinfo = append(cFYLJG001.Diseinfo, dia)
@@ -315,8 +609,94 @@ func (c *HisApiController) GetCFYLJG001() {
315 609
 }
316 610
 func (c *HisApiController) GetCFYLJG002() {
317 611
 	admin_user_id, _ := c.GetInt64("admin_user_id")
612
+	id, _ := c.GetInt64("id")
613
+
318 614
 	curRoles, _ := service.GetAdminUserInfoByID(c.GetAdminUserInfo().CurrentOrgId, admin_user_id)
319 615
 	miConfig, _ := service.FindMedicalInsuranceInfo(c.GetAdminUserInfo().CurrentOrgId)
616
+	flow, _ := service.Getflow(id)
617
+	his, _ := service.GetHisPatientByNumber(flow.MID)
618
+
619
+	inputData := make(map[string]interface{})
620
+	inputData["rxtracecode"] = flow.RxTraceCode
621
+	inputData["hirxno"] = flow.HiRxno
622
+	inputData["mdtrtid"] = flow.MID
623
+	inputData["patnname"] = his.PsnName
624
+	inputData["psncerttype"] = his.PsnCertType
625
+	inputData["certno"] = his.Certno
626
+	inputData["fixmedinsname"] = miConfig.OrgName
627
+	inputData["fixmedinscode"] = miConfig.Code
628
+	inputData["drcode"] = ""
629
+	inputData["prscdrname"] = ""
630
+	inputData["phardeptname"] = ""
631
+	inputData["phardeptcode"] = ""
632
+	inputData["pharprofttlcodg"] = ""
633
+	inputData["pharprofttlname"] = ""
634
+	inputData["pharcode"] = ""
635
+	inputData["rxfrquname"] = ""
636
+	inputData["pharcerttype"] = ""
637
+	inputData["pharcertno"] = ""
638
+	inputData["pharname"] = ""
639
+	inputData["pharpraccertno"] = ""
640
+	inputData["pharchktime"] = ""
641
+	bytesData, _ := json.Marshal(inputData)
642
+	fmt.Println(bytesData)
643
+
644
+	//// 使用 SM3 计算 JSON 数据的哈希值
645
+	//hash := sm3.New()
646
+	//hash.Write(bytesData)
647
+	//hashValue := hash.Sum(nil)
648
+	//
649
+	//// 加载 SM2 私钥
650
+	//privateKeyBytes, err := ioutil.ReadFile("path/to/private_key.pem")
651
+	//if err != nil {
652
+	//	fmt.Println("Failed to read private key file:", err)
653
+	//	return
654
+	//}
655
+	//privateKey, err := sm2.ParsePKCS8PrivateKey(privateKeyBytes)
656
+	//if err != nil {
657
+	//	fmt.Println("Failed to parse private key:", err)
658
+	//	return
659
+	//}
660
+	//
661
+	//// 使用私钥对哈希值进行签名
662
+	//r, s, err := sm2.Sign(rand.Reader, privateKey.(*sm2.PrivateKey), hashValue, nil)
663
+	//if err != nil {
664
+	//	fmt.Println("Failed to sign data:", err)
665
+	//	return
666
+	//}
667
+	//signature, err := syntax.EncodeSM2Signature(r, s)
668
+	//if err != nil {
669
+	//	fmt.Println("Failed to encode signature:", err)
670
+	//	return
671
+	//}
672
+	//
673
+	//// 构建 CMS/PKCS#7 Detached 数据结构
674
+	//// 这里只包含签名值和原始数据
675
+	//signedData := &pkix.ContentInfo{
676
+	//	ContentType: pkix.SignedDataOID,
677
+	//	Content: &pkix.SignedData{
678
+	//		Version:          3,
679
+	//		DigestAlgorithms: []pkix.AlgorithmIdentifier{{Algorithm: sm3.OID}},
680
+	//		EncapContentInfo: pkix.EncapContentInfo{
681
+	//			EContentType: pkix.DataOID,
682
+	//			EContent:     jsonBytes,
683
+	//		},
684
+	//		Certificates:      []pkix.Certificate{},
685
+	//		CRLs:              []pkix.CertificateList{},
686
+	//		SignerInfos:       []pkix.SignerInfo{},
687
+	//		DigestEncryptionAlgorithm: pkix.AlgorithmIdentifier{
688
+	//			Algorithm: sm2.SignAlgorithmSM2WithSM3,
689
+	//		},
690
+	//		EncryptedDigest: signature,
691
+	//	},
692
+	//}
693
+	//
694
+	//// 使用 DER 编码进行序列化
695
+	//derBytes, err := syntax.Marshal(signedData)
696
+	//if err != nil {
697
+	//	fmt.Println("Failed to marshal CMS/PKCS#7 data:", err)
698
+	//	return
699
+	//}
320 700
 
321 701
 	service.GetCFYLJG002(miConfig.OrgName, curRoles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, "", "", "")
322 702
 
@@ -14419,7 +14799,7 @@ func (c *HisApiController) GetCheckAccount() {
14419 14799
 
14420 14800
 		} else if miConfig.MdtrtareaAdmvs == "150499" {
14421 14801
 			if clr_type == "11" {
14422
-				fixmedins_setl_cnt = 2
14802
+				fixmedins_setl_cnt = 0
14423 14803
 			}
14424 14804
 
14425 14805
 			//if clr_type == "21" {

+ 1 - 0
models/cfyljg.go Ver arquivo

@@ -220,6 +220,7 @@ type HisPrescriptionFlow struct {
220 220
 	SignDigest     string `gorm:"column:sign_digest" json:"sign_digest" form:"sign_digest"`
221 221
 	SignCertSn     string `gorm:"column:sign_cert_sn" json:"sign_cert_sn" form:"sign_cert_sn"`
222 222
 	SignCertDn     string `gorm:"column:sign_cert_dn" json:"sign_cert_dn" form:"sign_cert_dn"`
223
+	MID            string `gorm:"column:m_id" json:"m_id" form:"m_id"`
223 224
 }
224 225
 
225 226
 func (HisPrescriptionFlow) TableName() string {

+ 8 - 1
service/dianzichufang.go Ver arquivo

@@ -90,12 +90,14 @@ func GetCFYLJG001(org_name string, doctor string, fixmedins_code string, insuplc
90 90
 		rxdrug["sin_dosunt"] = item.SinDosunt
91 91
 		rxdrug["used_frqu_codg"] = item.UsedFrquCodg
92 92
 		rxdrug["used_frqu_name"] = item.UsedFrquName
93
+		rxdrug["drug_totlcnt"] = item.DrugTotlcnt
94
+
93 95
 		rxdrug["drug_totlcnt_emp"] = item.DrugTotlcntEmp
94 96
 		rxdrug["hosp_appr_flag"] = item.HospApprFlag
95 97
 		rxdrug["extras"] = item.Extras
96 98
 		rxdrugdetail = append(rxdrugdetail, rxdrug)
97 99
 	}
98
-	inputData["list"] = rxdrugdetail
100
+	inputData["rxdrugdetail"] = rxdrugdetail
99 101
 
100 102
 	mdtrtinfo := make(map[string]interface{})
101 103
 	mdtrtinfo["fixmedins_code"] = cFYLJG001.Mdtrtinfo.FixmedinsCode
@@ -647,3 +649,8 @@ func GetCFYLJG007(org_name string, doctor string, fixmedins_code string, insuplc
647 649
 	return str, inputLog
648 650
 
649 651
 }
652
+
653
+func Getflow(id int64) (flow models.HisPrescriptionFlow, err error) {
654
+	err = readDb.Model(&models.HisPrescriptionFlow{}).Where("id = ?", id).First(&flow).Error
655
+	return
656
+}

+ 564 - 0
service/jsyb_service.go Ver arquivo

@@ -2002,3 +2002,567 @@ func Jsyb3507(struct3507 models.Struct3507) (string, string) {
2002 2002
 	return HttpRequest(struct3507.RequestUrl, struct3507.AccessKey, struct3507.SecretKey, timestamp, string(bytesData)), string(bytesData)
2003 2003
 
2004 2004
 }
2005
+
2006
+//对账权限查询
2007
+func Jxyb3260(setl_optins 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) {
2008
+	// 生成签名
2009
+	timestamp := time.Now().Unix()
2010
+	// 生成输入报文
2011
+	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2012
+	input := make(map[string]interface{})
2013
+	inputData := make(map[string]interface{})
2014
+	inputMessage["infno"] = "3260"               // 交易编码
2015
+	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2016
+	inputData["fixmedins_name"] = org_name       //对帐结束时间
2017
+	inputData["fix_blng_admdvs"] = setl_optins   //医疗费总额
2018
+
2019
+	input["data"] = inputData
2020
+	inputMessage["input"] = input //交易输入
2021
+	bytesData, err := json.Marshal(inputMessage)
2022
+	fmt.Println(string(bytesData))
2023
+	if err != nil {
2024
+		fmt.Println(err.Error())
2025
+		return err.Error(), ""
2026
+	}
2027
+	request_url = request_url + "3260"
2028
+	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3260"), string(bytesData)
2029
+}
2030
+
2031
+//月度对账状态查询
2032
+func Jxyb3261(stmt_mon string, setl_optins 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) {
2033
+	// 生成签名
2034
+	timestamp := time.Now().Unix()
2035
+	// 生成输入报文
2036
+	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2037
+	input := make(map[string]interface{})
2038
+	inputData := make(map[string]interface{})
2039
+	inputMessage["infno"] = "3261"               // 交易编码
2040
+	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2041
+	inputData["fixmedins_name"] = org_name       //对帐结束时间
2042
+	inputData["fix_blng_admdvs"] = setl_optins   //医疗费总额
2043
+	inputData["stmt_mon"] = stmt_mon             //医疗费总额
2044
+
2045
+	input["data"] = inputData
2046
+	inputMessage["input"] = input //交易输入
2047
+	bytesData, err := json.Marshal(inputMessage)
2048
+	fmt.Println(string(bytesData))
2049
+	if err != nil {
2050
+		fmt.Println(err.Error())
2051
+		return err.Error(), ""
2052
+	}
2053
+	request_url = request_url + "3261"
2054
+	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3261"), string(bytesData)
2055
+}
2056
+func Jxyb3262(stmt_mon string, setl_optins 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) {
2057
+	// 生成签名
2058
+	timestamp := time.Now().Unix()
2059
+	// 生成输入报文
2060
+	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2061
+	input := make(map[string]interface{})
2062
+	inputData := make(map[string]interface{})
2063
+
2064
+	fixMonRecDetailFileIn := make(map[string]interface{})
2065
+	//fixMonRecDetailFileIns := []make(map[string]interface{})
2066
+	fixMonRecDetailFileIns := make([]map[string]interface{}, 0)
2067
+
2068
+	fund := make(map[string]interface{})
2069
+	fundList := make([]map[string]interface{}, 0)
2070
+
2071
+	inputMessage["infno"] = "3262" // 交易编码
2072
+	inputData["fixmedins_code"] = fixmedins_code
2073
+	inputData["fixmedins_name"] = org_name
2074
+	inputData["fix_fill_dept"] = ""
2075
+	inputData["fix_fill_psn_id"] = ""
2076
+	inputData["fix_fill_psn"] = ""
2077
+	inputData["fix_fill_date"] = ""
2078
+	inputData["stmt_loc"] = ""
2079
+	inputData["upld_btch"] = ""
2080
+
2081
+	fixMonRecDetailFileIn["insutype"] = ""
2082
+	fixMonRecDetailFileIn["psn_type"] = ""
2083
+	fixMonRecDetailFileIn["med_type"] = ""
2084
+	fixMonRecDetailFileIn["fix_blng_admdvs"] = ""
2085
+	fixMonRecDetailFileIn["insu_admdvs"] = ""
2086
+	fixMonRecDetailFileIn["psn_time"] = ""
2087
+	fixMonRecDetailFileIn["psn_cnt"] = ""
2088
+	fixMonRecDetailFileIn["medfee_sumamt"] = ""
2089
+	fixMonRecDetailFileIn["inscp_amt"] = ""
2090
+	fixMonRecDetailFileIn["fund_pay_sumamt"] = ""
2091
+	fixMonRecDetailFileIn["fund_key"] = ""
2092
+	fixMonRecDetailFileIns = append(fixMonRecDetailFileIns, fixMonRecDetailFileIn)
2093
+
2094
+	fund["fund_key"] = ""
2095
+	fund["fix_blng_admdvs"] = ""
2096
+	fund["insu_admdvs"] = ""
2097
+	fund["fix_blng_admdvs"] = ""
2098
+	fund["insu_admdvs"] = ""
2099
+	fund["fund_code"] = ""
2100
+	fund["fund_name"] = ""
2101
+	fund["fund_amt"] = ""
2102
+	fund["memo"] = ""
2103
+	fundList = append(fundList, fund)
2104
+
2105
+	inputData["fixMonRecDetailFileInList"] = fixMonRecDetailFileIns
2106
+	inputData["fundList"] = fundList
2107
+
2108
+	input["data"] = inputData
2109
+	inputMessage["input"] = input //交易输入
2110
+	bytesData, err := json.Marshal(inputMessage)
2111
+	fmt.Println(string(bytesData))
2112
+	if err != nil {
2113
+		fmt.Println(err.Error())
2114
+		return err.Error(), ""
2115
+	}
2116
+	request_url = request_url + "3262"
2117
+	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3261"), string(bytesData)
2118
+}
2119
+func Jxyb3263(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) {
2120
+	// 生成签名
2121
+	timestamp := time.Now().Unix()
2122
+	// 生成输入报文
2123
+	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2124
+	input := make(map[string]interface{})
2125
+	inputData := make(map[string]interface{})
2126
+	inputMessage["infno"] = "3263"               // 交易编码
2127
+	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2128
+	inputData["fixmedins_name"] = org_name       //对帐结束时间
2129
+	inputData["stmt_mon"] = ""                   //医疗费总额
2130
+	inputData["stmt_loc"] = ""                   //医疗费总额
2131
+	inputData["upld_btch"] = ""                  //医疗费总额
2132
+
2133
+	input["data"] = inputData
2134
+	inputMessage["input"] = input //交易输入
2135
+	bytesData, err := json.Marshal(inputMessage)
2136
+	fmt.Println(string(bytesData))
2137
+	if err != nil {
2138
+		fmt.Println(err.Error())
2139
+		return err.Error(), ""
2140
+	}
2141
+	request_url = request_url + "3263"
2142
+	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3263"), string(bytesData)
2143
+}
2144
+func Jxyb3264(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) {
2145
+	// 生成签名
2146
+	timestamp := time.Now().Unix()
2147
+	// 生成输入报文
2148
+	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2149
+	input := make(map[string]interface{})
2150
+	inputData := make(map[string]interface{})
2151
+	inputMessage["infno"] = "3264"               // 交易编码
2152
+	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2153
+	inputData["fixmedins_name"] = org_name       //对帐结束时间
2154
+	inputData["stmt_mon"] = ""                   //医疗费总额
2155
+	inputData["stmt_loc"] = ""                   //医疗费总额
2156
+	inputData["upld_btch"] = ""                  //医疗费总额
2157
+
2158
+	input["data"] = inputData
2159
+	inputMessage["input"] = input //交易输入
2160
+	bytesData, err := json.Marshal(inputMessage)
2161
+	fmt.Println(string(bytesData))
2162
+	if err != nil {
2163
+		fmt.Println(err.Error())
2164
+		return err.Error(), ""
2165
+	}
2166
+	request_url = request_url + "3264"
2167
+	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3264"), string(bytesData)
2168
+}
2169
+func Jxyb3265(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) {
2170
+	// 生成签名
2171
+	timestamp := time.Now().Unix()
2172
+	// 生成输入报文
2173
+	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2174
+	input := make(map[string]interface{})
2175
+	inputData := make(map[string]interface{})
2176
+
2177
+	solidifyId := make(map[string]interface{})
2178
+
2179
+	inputMessage["infno"] = "3265"               // 交易编码
2180
+	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2181
+	inputData["fixmedins_name"] = org_name       //对帐结束时间
2182
+	inputData["stmt_mon"] = ""                   //医疗费总额
2183
+	inputData["fix_fill_dept"] = ""              //对帐结束时间
2184
+	inputData["fix_fill_psn_id"] = ""            //对帐结束时间
2185
+	inputData["fix_fill_psn"] = ""               //对帐结束时间
2186
+	inputData["fix_fill_date"] = ""              //对帐结束时间
2187
+	inputData["stmt_loc"] = ""                   //医疗费总额
2188
+	inputData["upld_btch"] = ""                  //医疗费总额
2189
+
2190
+	inputData["solidifyIdList"] = "" //医疗费总额
2191
+
2192
+	input["data"] = inputData
2193
+	inputMessage["input"] = input //交易输入
2194
+	bytesData, err := json.Marshal(inputMessage)
2195
+	fmt.Println(string(bytesData))
2196
+	if err != nil {
2197
+		fmt.Println(err.Error())
2198
+		return err.Error(), ""
2199
+	}
2200
+	request_url = request_url + "3265"
2201
+	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3266"), string(bytesData)
2202
+}
2203
+func Jxyb3266(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) {
2204
+	// 生成签名
2205
+	timestamp := time.Now().Unix()
2206
+	// 生成输入报文
2207
+	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2208
+	input := make(map[string]interface{})
2209
+	inputData := make(map[string]interface{})
2210
+	inputMessage["infno"] = "3266"               // 交易编码
2211
+	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2212
+	inputData["fixmedins_name"] = org_name       //对帐结束时间
2213
+
2214
+	inputData["fix_blng_admdvs"] = setl_optins //对帐结束时间
2215
+	inputData["stmt_mon"] = ""                 //医疗费总额
2216
+	inputData["fix_fill_dept"] = setl_optins   //对帐结束时间
2217
+	inputData["fix_fill_psn_id"] = setl_optins //对帐结束时间
2218
+	inputData["fix_fill_psn"] = setl_optins    //对帐结束时间
2219
+	inputData["fix_fill_date"] = setl_optins   //对帐结束时间
2220
+	inputData["stmt_loc"] = ""                 //医疗费总额
2221
+	inputData["upld_btch"] = ""                //医疗费总额
2222
+
2223
+	input["data"] = inputData
2224
+	inputMessage["input"] = input //交易输入
2225
+	bytesData, err := json.Marshal(inputMessage)
2226
+	fmt.Println(string(bytesData))
2227
+	if err != nil {
2228
+		fmt.Println(err.Error())
2229
+		return err.Error(), ""
2230
+	}
2231
+	request_url = request_url + "3266"
2232
+	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3266"), string(bytesData)
2233
+}
2234
+func Jxyb3267(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) {
2235
+	// 生成签名
2236
+	timestamp := time.Now().Unix()
2237
+	// 生成输入报文
2238
+	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2239
+	input := make(map[string]interface{})
2240
+	inputData := make(map[string]interface{})
2241
+	inputMessage["infno"] = "3267"               // 交易编码
2242
+	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2243
+	inputData["fixmedins_name"] = org_name       //对帐结束时间
2244
+	inputData["stmt_mon"] = ""                   //医疗费总额
2245
+	inputData["stmt_loc"] = ""                   //医疗费总额
2246
+	inputData["upld_btch"] = ""                  //医疗费总额
2247
+
2248
+	input["data"] = inputData
2249
+	inputMessage["input"] = input //交易输入
2250
+	bytesData, err := json.Marshal(inputMessage)
2251
+	fmt.Println(string(bytesData))
2252
+	if err != nil {
2253
+		fmt.Println(err.Error())
2254
+		return err.Error(), ""
2255
+	}
2256
+	request_url = request_url + "3267"
2257
+	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3267"), string(bytesData)
2258
+}
2259
+func Jxyb3268(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) {
2260
+	// 生成签名
2261
+	timestamp := time.Now().Unix()
2262
+	// 生成输入报文
2263
+	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2264
+	input := make(map[string]interface{})
2265
+	inputData := make(map[string]interface{})
2266
+
2267
+	fixMonRecDetailFileIn := make(map[string]interface{})
2268
+	//fixMonRecDetailFileIns := []make(map[string]interface{})
2269
+	fixMonRecDetailFileIns := make([]map[string]interface{}, 0)
2270
+
2271
+	fund := make(map[string]interface{})
2272
+	fundList := make([]map[string]interface{}, 0)
2273
+
2274
+	inputMessage["infno"] = "3268"               // 交易编码
2275
+	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2276
+	inputData["fixmedins_name"] = org_name       //对帐结束时间
2277
+
2278
+	inputData["setl_mon"] = ""        //对帐结束时间
2279
+	inputData["fix_fill_dept"] = ""   //对帐结束时间
2280
+	inputData["fix_fill_psn_id"] = "" //对帐结束时间
2281
+	inputData["fix_fill_psn"] = ""    //对帐结束时间
2282
+	inputData["fix_fill_date"] = ""   //对帐结束时间
2283
+	inputData["stmt_loc"] = ""        //对帐结束时间
2284
+
2285
+	fixMonRecDetailFileIn["setl_date"] = ""
2286
+	fixMonRecDetailFileIn["insutype"] = ""
2287
+	fixMonRecDetailFileIn["psn_type"] = ""
2288
+	fixMonRecDetailFileIn["med_type"] = ""
2289
+	fixMonRecDetailFileIn["fix_blng_admdvs"] = ""
2290
+	fixMonRecDetailFileIn["insu_admdvs"] = ""
2291
+	fixMonRecDetailFileIn["psn_time"] = ""
2292
+	fixMonRecDetailFileIn["psn_cnt"] = ""
2293
+	fixMonRecDetailFileIn["medfee_sumamt"] = ""
2294
+	fixMonRecDetailFileIn["inscp_amt"] = ""
2295
+	fixMonRecDetailFileIn["fund_pay_sumamt"] = ""
2296
+	fixMonRecDetailFileIn["fund_key"] = ""
2297
+	fixMonRecDetailFileIns = append(fixMonRecDetailFileIns, fixMonRecDetailFileIn)
2298
+
2299
+	fund["fund_key"] = ""
2300
+	fund["fix_blng_admdvs"] = ""
2301
+	fund["insu_admdvs"] = ""
2302
+	fund["fix_blng_admdvs"] = ""
2303
+	fund["insu_admdvs"] = ""
2304
+	fund["fund_code"] = ""
2305
+	fund["fund_name"] = ""
2306
+	fund["fund_amt"] = ""
2307
+	fund["memo"] = ""
2308
+	fundList = append(fundList, fund)
2309
+
2310
+	inputData["fixDateRecDetailFileInList"] = fixMonRecDetailFileIns
2311
+	inputData["fundList"] = fundList
2312
+
2313
+	input["data"] = inputData
2314
+	inputMessage["input"] = input //交易输入
2315
+	bytesData, err := json.Marshal(inputMessage)
2316
+	fmt.Println(string(bytesData))
2317
+	if err != nil {
2318
+		fmt.Println(err.Error())
2319
+		return err.Error(), ""
2320
+	}
2321
+	request_url = request_url + "3268"
2322
+	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3267"), string(bytesData)
2323
+}
2324
+func Jxyb3269(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) {
2325
+	// 生成签名
2326
+	timestamp := time.Now().Unix()
2327
+	// 生成输入报文
2328
+	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2329
+	input := make(map[string]interface{})
2330
+	inputData := make(map[string]interface{})
2331
+	inputMessage["infno"] = "3269"               // 交易编码
2332
+	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2333
+	inputData["fixmedins_name"] = org_name       //对帐结束时间
2334
+	inputData["stmt_mon"] = ""                   //医疗费总额
2335
+	inputData["stmt_loc"] = ""                   //医疗费总额
2336
+
2337
+	input["data"] = inputData
2338
+	inputMessage["input"] = input //交易输入
2339
+	bytesData, err := json.Marshal(inputMessage)
2340
+	fmt.Println(string(bytesData))
2341
+	if err != nil {
2342
+		fmt.Println(err.Error())
2343
+		return err.Error(), ""
2344
+	}
2345
+	request_url = request_url + "3269"
2346
+	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3267"), string(bytesData)
2347
+}
2348
+func Jxyb3270(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) {
2349
+	// 生成签名
2350
+	timestamp := time.Now().Unix()
2351
+	// 生成输入报文
2352
+	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2353
+	input := make(map[string]interface{})
2354
+	inputData := make(map[string]interface{})
2355
+	inputMessage["infno"] = "3267"               // 交易编码
2356
+	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2357
+	inputData["fixmedins_name"] = org_name       //对帐结束时间
2358
+	inputData["stmt_mon"] = ""                   //医疗费总额
2359
+	inputData["stmt_loc"] = ""                   //医疗费总额
2360
+
2361
+	input["data"] = inputData
2362
+	inputMessage["input"] = input //交易输入
2363
+	bytesData, err := json.Marshal(inputMessage)
2364
+	fmt.Println(string(bytesData))
2365
+	if err != nil {
2366
+		fmt.Println(err.Error())
2367
+		return err.Error(), ""
2368
+	}
2369
+	request_url = request_url + "3270"
2370
+	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3267"), string(bytesData)
2371
+}
2372
+func Jxyb3271(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) {
2373
+	// 生成签名
2374
+	timestamp := time.Now().Unix()
2375
+	// 生成输入报文
2376
+	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2377
+	input := make(map[string]interface{})
2378
+	inputData := make(map[string]interface{})
2379
+	inputMessage["infno"] = "3271"               // 交易编码
2380
+	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2381
+	inputData["fixmedins_name"] = org_name       //对帐结束时间
2382
+
2383
+	inputData["fix_fill_dept"] = ""   //对帐结束时间
2384
+	inputData["fix_fill_psn_id"] = "" //对帐结束时间
2385
+	inputData["fix_fill_psn"] = ""    //对帐结束时间
2386
+	inputData["fix_fill_date"] = ""   //对帐结束时间
2387
+	inputData["stmt_loc"] = ""        //医疗费总额
2388
+
2389
+	input["data"] = inputData
2390
+	inputMessage["input"] = input //交易输入
2391
+	bytesData, err := json.Marshal(inputMessage)
2392
+	fmt.Println(string(bytesData))
2393
+	if err != nil {
2394
+		fmt.Println(err.Error())
2395
+		return err.Error(), ""
2396
+	}
2397
+	request_url = request_url + "3271"
2398
+	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3267"), string(bytesData)
2399
+}
2400
+func Jxyb3272(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) {
2401
+	// 生成签名
2402
+	timestamp := time.Now().Unix()
2403
+	// 生成输入报文
2404
+	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2405
+	input := make(map[string]interface{})
2406
+	inputData := make(map[string]interface{})
2407
+	inputMessage["infno"] = "3272"               // 交易编码
2408
+	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2409
+	inputData["fixmedins_name"] = org_name       //对帐结束时间
2410
+	inputData["fix_blng_admdvs"] = org_name      //对帐结束时间
2411
+	inputData["setl_mon"] = org_name             //对帐结束时间
2412
+	inputData["fix_fill_dept"] = org_name        //对帐结束时间
2413
+	inputData["fix_fill_psn_id"] = org_name      //对帐结束时间
2414
+	inputData["fix_fill_psn"] = org_name         //
2415
+	inputData["fix_fill_date"] = org_name        //对帐结束时间
2416
+	inputData["stmt_loc"] = org_name             //对帐结束时间
2417
+
2418
+	input["data"] = inputData
2419
+	inputMessage["input"] = input //交易输入
2420
+	bytesData, err := json.Marshal(inputMessage)
2421
+	fmt.Println(string(bytesData))
2422
+	if err != nil {
2423
+		fmt.Println(err.Error())
2424
+		return err.Error(), ""
2425
+	}
2426
+	request_url = request_url + "3272"
2427
+	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3267"), string(bytesData)
2428
+}
2429
+func Jxyb3273(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) {
2430
+	// 生成签名
2431
+	timestamp := time.Now().Unix()
2432
+	// 生成输入报文
2433
+	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2434
+	input := make(map[string]interface{})
2435
+	inputData := make(map[string]interface{})
2436
+	inputMessage["infno"] = "3273"               // 交易编码
2437
+	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2438
+	inputData["fixmedins_name"] = org_name       //对帐结束时间
2439
+	inputData["stmt_mon"] = ""                   //医疗费总额
2440
+	inputData["stmt_loc"] = ""                   //医疗费总额
2441
+
2442
+	input["data"] = inputData
2443
+	inputMessage["input"] = input //交易输入
2444
+	bytesData, err := json.Marshal(inputMessage)
2445
+	fmt.Println(string(bytesData))
2446
+	if err != nil {
2447
+		fmt.Println(err.Error())
2448
+		return err.Error(), ""
2449
+	}
2450
+	request_url = request_url + "3273"
2451
+	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3267"), string(bytesData)
2452
+}
2453
+func Jxyb3274(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) {
2454
+	// 生成签名
2455
+	timestamp := time.Now().Unix()
2456
+	// 生成输入报文
2457
+	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2458
+	input := make(map[string]interface{})
2459
+	inputData := make(map[string]interface{})
2460
+	inputMessage["infno"] = "3274"               // 交易编码
2461
+	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2462
+	inputData["fixmedins_name"] = org_name       //对帐结束时间
2463
+
2464
+	inputData["fix_blng_admdvs"] = "" //对帐结束时间
2465
+	inputData["setl_mon"] = ""        //对帐结束时间
2466
+	inputData["fix_fill_dept"] = ""   //对帐结束时间
2467
+	inputData["fix_fill_psn_id"] = "" //对帐结束时间
2468
+	inputData["fix_fill_psn"] = ""    //
2469
+	inputData["fix_fill_date"] = ""   //对帐结束时间
2470
+	inputData["stmt_loc"] = ""        //对帐结束时间
2471
+
2472
+	input["data"] = inputData
2473
+	inputMessage["input"] = input //交易输入
2474
+	bytesData, err := json.Marshal(inputMessage)
2475
+	fmt.Println(string(bytesData))
2476
+	if err != nil {
2477
+		fmt.Println(err.Error())
2478
+		return err.Error(), ""
2479
+	}
2480
+	request_url = request_url + "3274"
2481
+	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3267"), string(bytesData)
2482
+}
2483
+func Jxyb3275(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) {
2484
+	// 生成签名
2485
+	timestamp := time.Now().Unix()
2486
+	// 生成输入报文
2487
+	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2488
+	input := make(map[string]interface{})
2489
+	inputData := make(map[string]interface{})
2490
+	fund := make(map[string]interface{})
2491
+	fundList := make([]map[string]interface{}, 0)
2492
+
2493
+	inputMessage["infno"] = "3275" // 交易编码
2494
+
2495
+	inputData["dcla_cal"] = ""        //医疗费总额
2496
+	inputData["setlym"] = ""          //医疗费总额
2497
+	inputData["fix_blng_admdvs"] = "" //医疗费总额
2498
+	inputData["insu_admdvs"] = ""     //医疗费总额
2499
+	inputData["medfee_sumamt"] = ""   //医疗费总额
2500
+	inputData["med_sumfee"] = ""      //医疗费总额
2501
+	inputData["fund_appy_sum"] = ""   //医疗费总额
2502
+	inputData["cash_payamt"] = ""     //医疗费总额
2503
+
2504
+	fund["dcla_cal"] = ""
2505
+	fund["setlym"] = ""
2506
+	fund["fix_blng_admdvs"] = ""
2507
+	fund["insu_admdvs"] = ""
2508
+	fund["fund_code"] = ""
2509
+	fund["fund_name"] = ""
2510
+	fund["fund_amt"] = ""
2511
+	fund["memo"] = ""
2512
+	fundList = append(fundList, fund)
2513
+
2514
+	inputData["fundList"] = fundList
2515
+
2516
+	input["data"] = inputData
2517
+	inputMessage["input"] = input //交易输入
2518
+	bytesData, err := json.Marshal(inputMessage)
2519
+	fmt.Println(string(bytesData))
2520
+	if err != nil {
2521
+		fmt.Println(err.Error())
2522
+		return err.Error(), ""
2523
+	}
2524
+	request_url = request_url + "3275"
2525
+	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3267"), string(bytesData)
2526
+}
2527
+func Jxyb3276(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) {
2528
+	// 生成签名
2529
+	timestamp := time.Now().Unix()
2530
+	// 生成输入报文
2531
+	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2532
+	input := make(map[string]interface{})
2533
+	inputData := make(map[string]interface{})
2534
+	inputMessage["infno"] = "3276" // 交易编码
2535
+	inputData["upld_btch_no"] = "" //医疗费总额
2536
+	input["data"] = inputData
2537
+	inputMessage["input"] = input //交易输入
2538
+	bytesData, err := json.Marshal(inputMessage)
2539
+	fmt.Println(string(bytesData))
2540
+	if err != nil {
2541
+		fmt.Println(err.Error())
2542
+		return err.Error(), ""
2543
+	}
2544
+	request_url = request_url + "3276"
2545
+	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3267"), string(bytesData)
2546
+}
2547
+func Jxyb3277(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) {
2548
+	// 生成签名
2549
+	timestamp := time.Now().Unix()
2550
+	// 生成输入报文
2551
+	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2552
+	input := make(map[string]interface{})
2553
+	inputData := make(map[string]interface{})
2554
+	inputMessage["infno"] = "3277"               // 交易编码
2555
+	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2556
+	inputData["fixmedins_name"] = org_name       //对帐结束时间
2557
+	inputData["stmt_mon"] = ""                   //医疗费总额
2558
+	input["data"] = inputData
2559
+	inputMessage["input"] = input //交易输入
2560
+	bytesData, err := json.Marshal(inputMessage)
2561
+	fmt.Println(string(bytesData))
2562
+	if err != nil {
2563
+		fmt.Println(err.Error())
2564
+		return err.Error(), ""
2565
+	}
2566
+	request_url = request_url + "3277"
2567
+	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3267"), string(bytesData)
2568
+}

+ 0 - 217
service/jx_service.go Ver arquivo

@@ -2538,220 +2538,3 @@ func Jxyb3203(fixmedins_setl_cnt int64, acct_pay float64, fund_pay_sumamt float6
2538 2538
 	request_url = request_url + "3203"
2539 2539
 	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3203"), string(bytesData)
2540 2540
 }
2541
-
2542
-//对账权限查询
2543
-func Jxyb3260(setl_optins 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) {
2544
-	// 生成签名
2545
-	timestamp := time.Now().Unix()
2546
-	// 生成输入报文
2547
-	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2548
-	input := make(map[string]interface{})
2549
-	inputData := make(map[string]interface{})
2550
-	inputMessage["infno"] = "3260"               // 交易编码
2551
-	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2552
-	inputData["fixmedins_name"] = org_name       //对帐结束时间
2553
-	inputData["fix_blng_admdvs"] = setl_optins   //医疗费总额
2554
-
2555
-	input["data"] = inputData
2556
-	inputMessage["input"] = input //交易输入
2557
-	bytesData, err := json.Marshal(inputMessage)
2558
-	fmt.Println(string(bytesData))
2559
-	if err != nil {
2560
-		fmt.Println(err.Error())
2561
-		return err.Error(), ""
2562
-	}
2563
-	request_url = request_url + "3260"
2564
-	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3260"), string(bytesData)
2565
-}
2566
-
2567
-//月度对账状态查询
2568
-func Jxyb3261(stmt_mon string, setl_optins 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) {
2569
-	// 生成签名
2570
-	timestamp := time.Now().Unix()
2571
-	// 生成输入报文
2572
-	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2573
-	input := make(map[string]interface{})
2574
-	inputData := make(map[string]interface{})
2575
-	inputMessage["infno"] = "3261"               // 交易编码
2576
-	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2577
-	inputData["fixmedins_name"] = org_name       //对帐结束时间
2578
-	inputData["fix_blng_admdvs"] = setl_optins   //医疗费总额
2579
-	inputData["stmt_mon"] = stmt_mon             //医疗费总额
2580
-
2581
-	input["data"] = inputData
2582
-	inputMessage["input"] = input //交易输入
2583
-	bytesData, err := json.Marshal(inputMessage)
2584
-	fmt.Println(string(bytesData))
2585
-	if err != nil {
2586
-		fmt.Println(err.Error())
2587
-		return err.Error(), ""
2588
-	}
2589
-	request_url = request_url + "3261"
2590
-	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3261"), string(bytesData)
2591
-}
2592
-
2593
-//func Jxyb3262(stmt_mon string, setl_optins 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) {
2594
-//	// 生成签名
2595
-//	timestamp := time.Now().Unix()
2596
-//	// 生成输入报文
2597
-//	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2598
-//	input := make(map[string]interface{})
2599
-//	inputData := make(map[string]interface{})
2600
-//	inputMessage["infno"] = "3262" // 交易编码
2601
-//	inputData["fixmedins_code"] = fixmedins_code
2602
-//	inputData["fixmedins_name"] = org_name
2603
-//	inputData["fix_fill_dept"] = fix_fill_dept
2604
-//	inputData["fix_fill_psn_id"] = fix_fill_psn_id
2605
-//	inputData["fix_fill_psn"] = fix_fill_psn
2606
-//	inputData["fix_fill_date"] = fix_fill_date
2607
-//	inputData["stmt_loc"] = stmt_loc
2608
-//	inputData["upld_btch"] = upld_btch
2609
-//
2610
-//	input["data"] = inputData
2611
-//	inputMessage["input"] = input //交易输入
2612
-//	bytesData, err := json.Marshal(inputMessage)
2613
-//	fmt.Println(string(bytesData))
2614
-//	if err != nil {
2615
-//		fmt.Println(err.Error())
2616
-//		return err.Error(), ""
2617
-//	}
2618
-//	request_url = request_url + "3261"
2619
-//	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3261"), string(bytesData)
2620
-//}
2621
-
2622
-func Jxyb3263(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) {
2623
-	// 生成签名
2624
-	timestamp := time.Now().Unix()
2625
-	// 生成输入报文
2626
-	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2627
-	input := make(map[string]interface{})
2628
-	inputData := make(map[string]interface{})
2629
-	inputMessage["infno"] = "3263"               // 交易编码
2630
-	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2631
-	inputData["fixmedins_name"] = org_name       //对帐结束时间
2632
-	inputData["stmt_mon"] = ""                   //医疗费总额
2633
-	inputData["stmt_loc"] = ""                   //医疗费总额
2634
-	inputData["upld_btch"] = ""                  //医疗费总额
2635
-
2636
-	input["data"] = inputData
2637
-	inputMessage["input"] = input //交易输入
2638
-	bytesData, err := json.Marshal(inputMessage)
2639
-	fmt.Println(string(bytesData))
2640
-	if err != nil {
2641
-		fmt.Println(err.Error())
2642
-		return err.Error(), ""
2643
-	}
2644
-	request_url = request_url + "3263"
2645
-	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3263"), string(bytesData)
2646
-}
2647
-func Jxyb3264(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) {
2648
-	// 生成签名
2649
-	timestamp := time.Now().Unix()
2650
-	// 生成输入报文
2651
-	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2652
-	input := make(map[string]interface{})
2653
-	inputData := make(map[string]interface{})
2654
-	inputMessage["infno"] = "3264"               // 交易编码
2655
-	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2656
-	inputData["fixmedins_name"] = org_name       //对帐结束时间
2657
-	inputData["stmt_mon"] = ""                   //医疗费总额
2658
-	inputData["stmt_loc"] = ""                   //医疗费总额
2659
-	inputData["upld_btch"] = ""                  //医疗费总额
2660
-
2661
-	input["data"] = inputData
2662
-	inputMessage["input"] = input //交易输入
2663
-	bytesData, err := json.Marshal(inputMessage)
2664
-	fmt.Println(string(bytesData))
2665
-	if err != nil {
2666
-		fmt.Println(err.Error())
2667
-		return err.Error(), ""
2668
-	}
2669
-	request_url = request_url + "3264"
2670
-	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3264"), string(bytesData)
2671
-}
2672
-
2673
-func Jxyb3265(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) {
2674
-	// 生成签名
2675
-	timestamp := time.Now().Unix()
2676
-	// 生成输入报文
2677
-	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2678
-	input := make(map[string]interface{})
2679
-	inputData := make(map[string]interface{})
2680
-	inputMessage["infno"] = "3266"               // 交易编码
2681
-	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2682
-	inputData["fixmedins_name"] = org_name       //对帐结束时间
2683
-	inputData["stmt_mon"] = ""                   //医疗费总额
2684
-	inputData["fix_fill_dept"] = setl_optins     //对帐结束时间
2685
-	inputData["fix_fill_psn_id"] = setl_optins   //对帐结束时间
2686
-	inputData["fix_fill_psn"] = setl_optins      //对帐结束时间
2687
-	inputData["fix_fill_date"] = setl_optins     //对帐结束时间
2688
-	inputData["stmt_loc"] = ""                   //医疗费总额
2689
-	inputData["upld_btch"] = ""                  //医疗费总额
2690
-
2691
-	input["data"] = inputData
2692
-	inputMessage["input"] = input //交易输入
2693
-	bytesData, err := json.Marshal(inputMessage)
2694
-	fmt.Println(string(bytesData))
2695
-	if err != nil {
2696
-		fmt.Println(err.Error())
2697
-		return err.Error(), ""
2698
-	}
2699
-	request_url = request_url + "3266"
2700
-	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3266"), string(bytesData)
2701
-}
2702
-func Jxyb3266(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) {
2703
-	// 生成签名
2704
-	timestamp := time.Now().Unix()
2705
-	// 生成输入报文
2706
-	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2707
-	input := make(map[string]interface{})
2708
-	inputData := make(map[string]interface{})
2709
-	inputMessage["infno"] = "3266"               // 交易编码
2710
-	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2711
-	inputData["fixmedins_name"] = org_name       //对帐结束时间
2712
-
2713
-	inputData["fix_blng_admdvs"] = setl_optins //对帐结束时间
2714
-	inputData["stmt_mon"] = ""                 //医疗费总额
2715
-	inputData["fix_fill_dept"] = setl_optins   //对帐结束时间
2716
-	inputData["fix_fill_psn_id"] = setl_optins //对帐结束时间
2717
-	inputData["fix_fill_psn"] = setl_optins    //对帐结束时间
2718
-	inputData["fix_fill_date"] = setl_optins   //对帐结束时间
2719
-	inputData["stmt_loc"] = ""                 //医疗费总额
2720
-	inputData["upld_btch"] = ""                //医疗费总额
2721
-
2722
-	input["data"] = inputData
2723
-	inputMessage["input"] = input //交易输入
2724
-	bytesData, err := json.Marshal(inputMessage)
2725
-	fmt.Println(string(bytesData))
2726
-	if err != nil {
2727
-		fmt.Println(err.Error())
2728
-		return err.Error(), ""
2729
-	}
2730
-	request_url = request_url + "3266"
2731
-	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3266"), string(bytesData)
2732
-}
2733
-func Jxyb3267(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) {
2734
-	// 生成签名
2735
-	timestamp := time.Now().Unix()
2736
-	// 生成输入报文
2737
-	inputMessage := SetJXInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, cainfo)
2738
-	input := make(map[string]interface{})
2739
-	inputData := make(map[string]interface{})
2740
-	inputMessage["infno"] = "3267"               // 交易编码
2741
-	inputData["fixmedins_code"] = fixmedins_code // 对帐开始时间
2742
-	inputData["fixmedins_name"] = org_name       //对帐结束时间
2743
-	inputData["stmt_mon"] = ""                   //医疗费总额
2744
-	inputData["stmt_loc"] = ""                   //医疗费总额
2745
-	inputData["upld_btch"] = ""                  //医疗费总额
2746
-
2747
-	input["data"] = inputData
2748
-	inputMessage["input"] = input //交易输入
2749
-	bytesData, err := json.Marshal(inputMessage)
2750
-	fmt.Println(string(bytesData))
2751
-	if err != nil {
2752
-		fmt.Println(err.Error())
2753
-		return err.Error(), ""
2754
-	}
2755
-	request_url = request_url + "3267"
2756
-	return JXHttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData), "3267"), string(bytesData)
2757
-}