Explorar el Código

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

陈少旭 hace 3 semanas
padre
commit
77629a6000

+ 423 - 0
controllers/ah/ahyb_controller.go Ver fichero

@@ -64,8 +64,431 @@ func AHybRegistRouters() {
64 64
 	beego.Router("/ahyb/2406", &AHybController{}, "post:Get2406")
65 65
 	beego.Router("/ahyb/readcardcharge", &AHybController{}, "get:Readcardcharge")
66 66
 
67
+
68
+
69
+
70
+	beego.Router("/ahyb/2406", &AHybController{}, "post:Get2406")
71
+	beego.Router("/ahyb/2406", &AHybController{}, "post:Get2406")
72
+
73
+
74
+}
75
+func (c *JSybController) Get3501() {
76
+	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
77
+	var respJSON map[string]interface{}
78
+	if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
79
+		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
80
+		return
81
+	}
82
+
83
+	userJSONBytes, _ := json.Marshal(respJSON["struct_3501s"])
84
+	var struct3501 models.Struct3501
85
+	if err := json.Unmarshal(userJSONBytes, &struct3501); err != nil {
86
+		utils.ErrorLog("解析失败:%v", err)
87
+		return
88
+	}
89
+
90
+	result, request_log := service.Jsyb3501(struct3501)
91
+	saveJsLog(result, request_log, "3501", "库存盘点", struct3501.OrgName)
92
+	var dat2 map[string]interface{}
93
+	if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
94
+	} else {
95
+	}
96
+	var dat map[string]interface{}
97
+	if err := json.Unmarshal([]byte(result), &dat); err == nil {
98
+	} else {
99
+
100
+	}
101
+	c.ServeSuccessJSON(map[string]interface{}{
102
+		"pre":         dat,
103
+		"request_log": dat2,
104
+	})
105
+
106
+}
107
+func (c *JSybController) Get3502() {
108
+	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
109
+	var respJSON map[string]interface{}
110
+	if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
111
+		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
112
+		return
113
+	}
114
+
115
+	userJSONBytes, _ := json.Marshal(respJSON["struct_3502s"])
116
+	var struct3502s models.Struct3502
117
+	if err := json.Unmarshal(userJSONBytes, &struct3502s); err != nil {
118
+		utils.ErrorLog("解析失败:%v", err)
119
+		return
120
+	}
121
+
122
+	result, request_log := service.Jsyb3502(struct3502s)
123
+	saveJsLog(result, request_log, "3502", "库存变更", struct3502s.OrgName)
124
+	var dat2 map[string]interface{}
125
+	if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
126
+	} else {
127
+	}
128
+	var dat map[string]interface{}
129
+	if err := json.Unmarshal([]byte(result), &dat); err == nil {
130
+	} else {
131
+
132
+	}
133
+	c.ServeSuccessJSON(map[string]interface{}{
134
+		"pre":         dat,
135
+		"request_log": dat2,
136
+	})
137
+
138
+}
139
+func (c *JSybController) Get3503() {
140
+	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
141
+	var respJSON map[string]interface{}
142
+	if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
143
+		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
144
+		return
145
+	}
146
+
147
+	userJSONBytes, _ := json.Marshal(respJSON["struct_3503s"])
148
+	var struct3503 models.Struct3503
149
+	if err := json.Unmarshal(userJSONBytes, &struct3503); err != nil {
150
+		utils.ErrorLog("解析失败:%v", err)
151
+		return
152
+	}
153
+	fmt.Println(struct3503)
154
+
155
+	result, request_log := service.Jsyb3503(struct3503)
156
+	saveJsLog(result, request_log, "3503", "库存采购", struct3503.OrgName)
157
+	var dat2 map[string]interface{}
158
+	if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
159
+	} else {
160
+	}
161
+	var dat map[string]interface{}
162
+	if err := json.Unmarshal([]byte(result), &dat); err == nil {
163
+	} else {
164
+
165
+	}
166
+	c.ServeSuccessJSON(map[string]interface{}{
167
+		"pre":         dat,
168
+		"request_log": dat2,
169
+	})
170
+
171
+}
172
+func (c *JSybController) Get3504() {
173
+	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
174
+	var respJSON map[string]interface{}
175
+	if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
176
+		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
177
+		return
178
+	}
179
+
180
+	userJSONBytes, _ := json.Marshal(respJSON["struct_3504s"])
181
+	var struct3504 []models.Struct3504
182
+	if err := json.Unmarshal(userJSONBytes, &struct3504); err != nil {
183
+		utils.ErrorLog("解析失败:%v", err)
184
+		return
185
+	}
186
+
187
+	result, request_log := service.Jsyb3504(struct3504[0])
188
+	saveJsLog(result, request_log, "3504", "库存盘点", struct3504[0].OrgName)
189
+	var dat2 map[string]interface{}
190
+	if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
191
+	} else {
192
+	}
193
+	var dat map[string]interface{}
194
+	if err := json.Unmarshal([]byte(result), &dat); err == nil {
195
+	} else {
196
+
197
+	}
198
+	c.ServeSuccessJSON(map[string]interface{}{
199
+		"pre":         dat,
200
+		"request_log": dat2,
201
+	})
202
+
203
+}
204
+func (c *JSybController) Get3505() {
205
+	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
206
+	var respJSON map[string]interface{}
207
+	if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
208
+		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
209
+		return
210
+	}
211
+
212
+	userJSONBytes, _ := json.Marshal(respJSON["struct_3505s"])
213
+	var struct3505 models.Struct3505
214
+	if err := json.Unmarshal(userJSONBytes, &struct3505); err != nil {
215
+		utils.ErrorLog("解析失败:%v", err)
216
+		return
217
+	}
218
+
219
+	result, request_log := service.Jsyb3505(struct3505)
220
+	saveJsLog(result, request_log, "3505", "销售", struct3505.OrgName)
221
+	var dat2 map[string]interface{}
222
+	if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
223
+	} else {
224
+	}
225
+	var dat map[string]interface{}
226
+	if err := json.Unmarshal([]byte(result), &dat); err == nil {
227
+	} else {
228
+
229
+	}
230
+	c.ServeSuccessJSON(map[string]interface{}{
231
+		"pre":         dat,
232
+		"request_log": dat2,
233
+	})
234
+
235
+}
236
+func (c *JSybController) Get3506() {
237
+	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
238
+	var respJSON map[string]interface{}
239
+	if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
240
+		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
241
+		return
242
+	}
243
+
244
+	userJSONBytes, _ := json.Marshal(respJSON["struct_3506s"])
245
+	var struct3506 models.Struct3506
246
+	if err := json.Unmarshal(userJSONBytes, &struct3506); err != nil {
247
+		utils.ErrorLog("解析失败:%v", err)
248
+		return
249
+	}
250
+
251
+	result, request_log := service.Jsyb3506(struct3506)
252
+	saveJsLog(result, request_log, "3506", "销售退库", struct3506.OrgName)
253
+	var dat2 map[string]interface{}
254
+	if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
255
+	} else {
256
+	}
257
+	var dat map[string]interface{}
258
+	if err := json.Unmarshal([]byte(result), &dat); err == nil {
259
+	} else {
260
+
261
+	}
262
+	c.ServeSuccessJSON(map[string]interface{}{
263
+		"pre":         dat,
264
+		"request_log": dat2,
265
+	})
266
+
267
+}
268
+func (c *JSybController) Get3507() {
269
+	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
270
+	var respJSON map[string]interface{}
271
+	if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
272
+		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
273
+		return
274
+	}
275
+
276
+	userJSONBytes, _ := json.Marshal(respJSON["struct_3507s"])
277
+	var struct3507 models.Struct3507
278
+	if err := json.Unmarshal(userJSONBytes, &struct3507); err != nil {
279
+		utils.ErrorLog("解析失败:%v", err)
280
+		return
281
+	}
282
+
283
+	result, request_log := service.Jsyb3507(struct3507)
284
+	saveJsLog(result, request_log, "3507", "库存盘点", struct3507.OrgName)
285
+	var dat2 map[string]interface{}
286
+	if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
287
+	} else {
288
+	}
289
+	var dat map[string]interface{}
290
+	if err := json.Unmarshal([]byte(result), &dat); err == nil {
291
+	} else {
292
+
293
+	}
294
+	c.ServeSuccessJSON(map[string]interface{}{
295
+		"pre":         dat,
296
+		"request_log": dat2,
297
+	})
298
+
299
+}
300
+func (c *JSybController) Get3508() {
301
+	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
302
+	var respJSON map[string]interface{}
303
+	if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
304
+		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
305
+		return
306
+	}
307
+
308
+	userJSONBytes, _ := json.Marshal(respJSON["struct_3508s"])
309
+	var struct3508 models.Struct3508
310
+	if err := json.Unmarshal(userJSONBytes, &struct3508); err != nil {
311
+		utils.ErrorLog("解析失败:%v", err)
312
+		return
313
+	}
314
+
315
+	result, request_log := service.Jsyb3508(struct3508)
316
+	saveJsLog(result, request_log, "3508", "库存查询", struct3508.OrgName)
317
+	var dat2 map[string]interface{}
318
+	if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
319
+	} else {
320
+	}
321
+	var dat map[string]interface{}
322
+	if err := json.Unmarshal([]byte(result), &dat); err == nil {
323
+	} else {
324
+
325
+	}
326
+	c.ServeSuccessJSON(map[string]interface{}{
327
+		"pre":         dat,
328
+		"request_log": dat2,
329
+	})
330
+
331
+}
332
+func (c *JSybController) Get3509() {
333
+	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
334
+	var respJSON map[string]interface{}
335
+	if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
336
+		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
337
+		return
338
+	}
339
+
340
+	userJSONBytes, _ := json.Marshal(respJSON["struct_3509s"])
341
+	var struct3509 models.Struct3509
342
+	if err := json.Unmarshal(userJSONBytes, &struct3509); err != nil {
343
+		utils.ErrorLog("解析失败:%v", err)
344
+		return
345
+	}
346
+
347
+	result, request_log := service.Jsyb3509(struct3509)
348
+	saveJsLog(result, request_log, "3509", "库存查询", struct3509.OrgName)
349
+	var dat2 map[string]interface{}
350
+	if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
351
+	} else {
352
+	}
353
+	var dat map[string]interface{}
354
+	if err := json.Unmarshal([]byte(result), &dat); err == nil {
355
+	} else {
356
+
357
+	}
358
+	c.ServeSuccessJSON(map[string]interface{}{
359
+		"pre":         dat,
360
+		"request_log": dat2,
361
+	})
362
+
363
+}
364
+func (c *JSybController) Get3510() {
365
+	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
366
+	var respJSON map[string]interface{}
367
+	if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
368
+		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
369
+		return
370
+	}
371
+
372
+	userJSONBytes, _ := json.Marshal(respJSON["struct_3510s"])
373
+	var struct3510 models.Struct3510
374
+	if err := json.Unmarshal(userJSONBytes, &struct3510); err != nil {
375
+		utils.ErrorLog("解析失败:%v", err)
376
+		return
377
+	}
378
+
379
+	result, request_log := service.Jsyb3510(struct3510)
380
+	saveJsLog(result, request_log, "3510", "库存盘点", struct3510.OrgName)
381
+	var dat2 map[string]interface{}
382
+	if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
383
+	} else {
384
+	}
385
+	var dat map[string]interface{}
386
+	if err := json.Unmarshal([]byte(result), &dat); err == nil {
387
+	} else {
388
+
389
+	}
390
+	c.ServeSuccessJSON(map[string]interface{}{
391
+		"pre":         dat,
392
+		"request_log": dat2,
393
+	})
394
+
395
+}
396
+func (c *JSybController) Get3511() {
397
+	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
398
+	var respJSON map[string]interface{}
399
+	if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
400
+		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
401
+		return
402
+	}
403
+
404
+	userJSONBytes, _ := json.Marshal(respJSON["struct_3511s"])
405
+	var struct3511 models.Struct3511
406
+	if err := json.Unmarshal(userJSONBytes, &struct3511); err != nil {
407
+		utils.ErrorLog("解析失败:%v", err)
408
+		return
409
+	}
410
+
411
+	result, request_log := service.Jsyb3511(struct3511)
412
+	saveJsLog(result, request_log, "3511", "库存查询", struct3511.OrgName)
413
+	var dat2 map[string]interface{}
414
+	if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
415
+	} else {
416
+	}
417
+	var dat map[string]interface{}
418
+	if err := json.Unmarshal([]byte(result), &dat); err == nil {
419
+	} else {
420
+
421
+	}
422
+	c.ServeSuccessJSON(map[string]interface{}{
423
+		"pre":         dat,
424
+		"request_log": dat2,
425
+	})
426
+
427
+}
428
+func (c *JSybController) Get3512() {
429
+	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
430
+	var respJSON map[string]interface{}
431
+	if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
432
+		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
433
+		return
434
+	}
435
+
436
+	userJSONBytes, _ := json.Marshal(respJSON["struct_3512s"])
437
+	var struct3512 models.Struct3512
438
+	if err := json.Unmarshal(userJSONBytes, &struct3512); err != nil {
439
+		utils.ErrorLog("解析失败:%v", err)
440
+		return
441
+	}
442
+
443
+	result, request_log := service.Jsyb3512(struct3512)
444
+	saveJsLog(result, request_log, "3512", "3512查询", struct3512.OrgName)
445
+	var dat2 map[string]interface{}
446
+	if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
447
+	} else {
448
+	}
449
+	var dat map[string]interface{}
450
+	if err := json.Unmarshal([]byte(result), &dat); err == nil {
451
+	} else {
452
+
453
+	}
454
+	c.ServeSuccessJSON(map[string]interface{}{
455
+		"pre":         dat,
456
+		"request_log": dat2,
457
+	})
458
+
67 459
 }
460
+func (c *JSybController) Get3513() {
461
+	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
462
+	var respJSON map[string]interface{}
463
+	if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
464
+		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
465
+		return
466
+	}
467
+
468
+	userJSONBytes, _ := json.Marshal(respJSON["struct_3513s"])
469
+	var struct3513 models.Struct3513
470
+	if err := json.Unmarshal(userJSONBytes, &struct3513); err != nil {
471
+		utils.ErrorLog("解析失败:%v", err)
472
+		return
473
+	}
68 474
 
475
+	result, request_log := service.Jsyb3513(struct3513)
476
+	saveJsLog(result, request_log, "3513", "库存盘点", struct3513.OrgName)
477
+	var dat2 map[string]interface{}
478
+	if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
479
+	} else {
480
+	}
481
+	var dat map[string]interface{}
482
+	if err := json.Unmarshal([]byte(result), &dat); err == nil {
483
+	} else {
484
+
485
+	}
486
+	c.ServeSuccessJSON(map[string]interface{}{
487
+		"pre":         dat,
488
+		"request_log": dat2,
489
+	})
490
+
491
+}
69 492
 func (c *AHybController) Readcardcharge() {
70 493
 	fixmedins_code := c.GetString("fixmedins_code")
71 494
 	secret_key := c.GetString("secret_key")

+ 0 - 1
controllers/js/jsyb_controller.go Ver fichero

@@ -1078,7 +1078,6 @@ func (c *JSybController) Get3507() {
1078 1078
 	})
1079 1079
 
1080 1080
 }
1081
-
1082 1081
 func (c *JSybController) Get3508() {
1083 1082
 	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
1084 1083
 	var respJSON map[string]interface{}

+ 94 - 6
controllers/sg/his_api_controller.go Ver fichero

@@ -34,6 +34,8 @@ import (
34 34
 	"syscall"
35 35
 	"time"
36 36
 	"unsafe"
37
+	"github.com/go-ole/go-ole"
38
+
37 39
 )
38 40
 
39 41
 type HisApiController struct {
@@ -228,11 +230,11 @@ func (c *HisApiController) Get3201() {
228 230
 }
229 231
 
230 232
 func (c *HisApiController) TestNet() {
231
-	c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
232
-	return
233
-	//c.ServeSuccessJSON(map[string]interface{}{
234
-	//	"msg": "成功",
235
-	//})
233
+	//c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
234
+	//return
235
+	c.ServeSuccessJSON(map[string]interface{}{
236
+		"msg": "成功",
237
+	})
236 238
 }
237 239
 
238 240
 func (c *HisApiController) Get3508() {
@@ -5460,6 +5462,11 @@ func SaleStock(org_id int64, pre models.HisPrescription, drug *models.DrugFlow,
5460 5462
 		struct3505.PharName = "资美红"
5461 5463
 		struct3505.PharPracCertNo = "D440904006635"
5462 5464
 	}
5465
+
5466
+	if org_id == 10480 {
5467
+		struct3505.PharName = "陈思"
5468
+		struct3505.PharPracCertNo = "30220240434110010470"
5469
+	}
5463 5470
 	order := service.GetHisOrderByNumber(pre.BatchNumber)
5464 5471
 	struct3505.SetlId = order.SetlId
5465 5472
 	struct3505.MdtrtSn = order.MdtrtId
@@ -5527,6 +5534,9 @@ func SaleStock(org_id int64, pre models.HisPrescription, drug *models.DrugFlow,
5527 5534
 	} else if strings.HasPrefix(miConfig.MdtrtareaAdmvs[0:3], "361") {
5528 5535
 		result1, result2 := service.JXyb3505(struct3505, struct3505.SecretKey, struct3505.AccessKey, struct3505.RequestUrl)
5529 5536
 		return result1, result2
5537
+	} else if miConfig.MdtrtareaAdmvs == "341203" {
5538
+		result1, result2 := service.AHyb3505(struct3505, struct3505.SecretKey, struct3505.RequestUrl)
5539
+		return result1, result2
5530 5540
 	} else if miConfig.MdtrtareaAdmvs == "340699" {
5531 5541
 		result1, result2 := service.AHyb3505(struct3505, struct3505.SecretKey, struct3505.RequestUrl)
5532 5542
 		return result1, result2
@@ -26952,6 +26962,19 @@ func (c *HisApiController) GetRegisterInfo() {
26952 26962
 
26953 26963
 								fmt.Println(record_time_two)
26954 26964
 
26965
+
26966
+								if his.IdCardType == 2 {
26967
+									IdCardNo = psn_info.Certno
26968
+									psn_info.VerifyNumber = psn_info.Certno
26969
+								} else if his.IdCardType == 4 {
26970
+									IdCardNo = psn_info.Certno
26971
+								}else{
26972
+									bas := strings.Split(psn_info.CardInfo, "|")
26973
+									IdCardNo = bas[2]
26974
+
26975
+								}
26976
+
26977
+
26955 26978
 								result, requestLog = service.Gdyb2201A(psn_info.PsnNo, insutype, IdCardNo, miConfig.OrgName, roles.UserName, ipt_otp_no, department.Name, miConfig.Code, department.Number, doctor_info.DoctorNumber, insuplc_admdvs_temp, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, id_card_type, doctor_info.UserName, record_time_two, psn_info.VerifyNumber, admin_user_id)
26956 26979
 								saveLog(result, requestLog, "2201A", "挂号")
26957 26980
 								if miConfig.Code == "H15049901371" {
@@ -26996,6 +27019,49 @@ func (c *HisApiController) GetRegisterInfo() {
26996 27019
 						json.Unmarshal([]byte(psn_info.Insuinfo), &rf)
26997 27020
 						//var insutypes []*ResultFive
26998 27021
 						var insutype string
27022
+
27023
+
27024
+
27025
+						var insutypes []*ResultFive
27026
+
27027
+						var is390 int = 0
27028
+						var is310 int = 0
27029
+
27030
+						for _, item := range rf {
27031
+							if (item.Insutype == "390" && item.PsnInsuStas == "1") || (item.Insutype == "310" && item.PsnInsuStas == "1") {
27032
+								insutypes = append(insutypes, item)
27033
+							}
27034
+						}
27035
+
27036
+						if len(insutypes) == 1 {
27037
+							insutype = insutypes[0].Insutype
27038
+							//insuplc_admdvs = insutypes[0].InsuplcAdmdvs
27039
+						} else {
27040
+							for _, i := range insutypes {
27041
+								if i.Insutype == "390" {
27042
+									is390 = 1
27043
+								}
27044
+
27045
+								if i.Insutype == "310" {
27046
+									is310 = 1
27047
+								}
27048
+							}
27049
+						}
27050
+						if is390 == 1 {
27051
+							insutype = "390"
27052
+						}
27053
+
27054
+						if is310 == 1 {
27055
+							insutype = "310"
27056
+						}
27057
+
27058
+						if len(insutypes) == 0 {
27059
+							insutype = "310"
27060
+						}
27061
+
27062
+
27063
+
27064
+
26999 27065
 						if social_type > 0 {
27000 27066
 							insutype = strconv.FormatInt(social_type, 10)
27001 27067
 						}
@@ -33113,8 +33179,9 @@ func (c *HisApiController) GetPreUploadInfo() {
33113 33179
 						var result string
33114 33180
 						var request_log string
33115 33181
 						if his.IdCardType == 2 {
33182
+							insutype = strconv.FormatInt(his.SocialType, 10)
33116 33183
 
33117
-							result, request_log = service.Jxyb2206(his.PsnNo, his.Number, chrg_bchno, his.IdCardNo, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, strconv.FormatInt(reg_type, 10), his.IdCardType, 0, 0, 0, 0, his.IdType, miConfig.Url, miConfig.AccessKey, his.IdCardNo, "")
33184
+							result, request_log = service.Jxyb2206(his.PsnNo, his.Number, chrg_bchno, his.IdCardNo,insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, strconv.FormatInt(reg_type, 10), his.IdCardType, 0, 0, 0, 0, his.IdType, miConfig.Url, miConfig.AccessKey, his.IdCardNo, "")
33118 33185
 
33119 33186
 						} else if his.IdCardType == 1 {
33120 33187
 							psn_info, _ := service.GetPsnByPatientId(his.PatientId)
@@ -33130,6 +33197,7 @@ func (c *HisApiController) GetPreUploadInfo() {
33130 33197
 									psn_type = item.PsnType
33131 33198
 								}
33132 33199
 							}
33200
+							insutype = strconv.FormatInt(his.SocialType, 10)
33133 33201
 
33134 33202
 							result, request_log = service.Jxyb2206Two(his.PsnNo, his.Number, chrg_bchno, psn_info.VerifyNumber, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, strconv.FormatInt(reg_type, 10), his.IdCardType, 0, 0, 0, 0, his.IdType, miConfig.Url, miConfig.AccessKey, basNumber, "", card_sn, his.PsnCertType, his.Certno, psn_type, his.PsnName)
33135 33203
 
@@ -33147,6 +33215,7 @@ func (c *HisApiController) GetPreUploadInfo() {
33147 33215
 									psn_type = item.PsnType
33148 33216
 								}
33149 33217
 							}
33218
+							insutype = strconv.FormatInt(his.SocialType, 10)
33150 33219
 
33151 33220
 							//psn_info, _ := service.GetPsnByPatientId(his.PatientId)
33152 33221
 							result, request_log = service.Jxyb2206Two(his.PsnNo, his.Number, chrg_bchno, psn_info.VerifyNumber, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, strconv.FormatInt(reg_type, 10), his.IdCardType, 0, 0, 0, 0, his.IdType, miConfig.Url, miConfig.AccessKey, psn_info.VerifyNumber, "", "", his.PsnCertType, his.Certno, psn_type, his.PsnName)
@@ -33171,6 +33240,7 @@ func (c *HisApiController) GetPreUploadInfo() {
33171 33240
 						var result string
33172 33241
 						var request_log string
33173 33242
 						if his.IdCardType == 2 {
33243
+							insutype = strconv.FormatInt(his.SocialType, 10)
33174 33244
 
33175 33245
 							result, request_log = service.Jxyb2206(his.PsnNo, his.Number, chrg_bchno, his.IdCardNo, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, strconv.FormatInt(reg_type, 10), his.IdCardType, 0, 0, 0, 0, his.IdType, miConfig.Url, miConfig.AccessKey, his.IdCardNo, "")
33176 33246
 
@@ -33188,6 +33258,7 @@ func (c *HisApiController) GetPreUploadInfo() {
33188 33258
 									psn_type = item.PsnType
33189 33259
 								}
33190 33260
 							}
33261
+							insutype = strconv.FormatInt(his.SocialType, 10)
33191 33262
 
33192 33263
 							result, request_log = service.Jxyb2206Two(his.PsnNo, his.Number, chrg_bchno, psn_info.VerifyNumber, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, strconv.FormatInt(reg_type, 10), his.IdCardType, 0, 0, 0, 0, his.IdType, miConfig.Url, miConfig.AccessKey, basNumber, "", card_sn, his.PsnCertType, his.Certno, psn_type, his.PsnName)
33193 33264
 
@@ -33796,6 +33867,14 @@ func (c *HisApiController) GetPreUploadInfo() {
33796 33867
 										if his.IdCardType == 4 {
33797 33868
 											result, request_log = service.Gdyb2206(his.PsnNo, his.Number, chrg_bchno, psn_info.VerifyNumber, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, strconv.FormatInt(reg_type, 10), his.IdCardType, 0, 0, 0, 0, his.IdType, admin_user_id)
33798 33869
 										} else {
33870
+											if his.IdCardType == 2 {
33871
+												cert_no = psn_info.Certno
33872
+												psn_info.VerifyNumber = psn_info.Certno
33873
+											} else {
33874
+												bas := strings.Split(psn_info.CardInfo, "|")
33875
+												cert_no = bas[2]
33876
+
33877
+											}
33799 33878
 											result, request_log = service.Gdyb2206(his.PsnNo, his.Number, chrg_bchno, cert_no, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, strconv.FormatInt(reg_type, 10), his.IdCardType, 0, 0, 0, 0, his.IdType, admin_user_id)
33800 33879
 
33801 33880
 										}
@@ -33819,6 +33898,15 @@ func (c *HisApiController) GetPreUploadInfo() {
33819 33898
 								if his.IdCardType == 4 {
33820 33899
 									result, request_log = service.Gdyb2206(his.PsnNo, his.Number, chrg_bchno, psn_info.VerifyNumber, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, strconv.FormatInt(reg_type, 10), his.IdCardType, 0, 0, 0, 0, his.IdType, admin_user_id)
33821 33900
 								} else {
33901
+
33902
+									if his.IdCardType == 2 {
33903
+										cert_no = psn_info.Certno
33904
+										psn_info.VerifyNumber = psn_info.Certno
33905
+									} else {
33906
+										bas := strings.Split(psn_info.CardInfo, "|")
33907
+										cert_no = bas[2]
33908
+
33909
+									}
33822 33910
 									result, request_log = service.Gdyb2206(his.PsnNo, his.Number, chrg_bchno, cert_no, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, strconv.FormatInt(reg_type, 10), his.IdCardType, 0, 0, 0, 0, his.IdType, admin_user_id)
33823 33911
 
33824 33912
 								}

+ 1 - 1
service/gdyb_service.go Ver fichero

@@ -7068,7 +7068,7 @@ func Gdyb3505(struct3505 models.Struct3505, secret_key string) (string, string)
7068 7068
 	inputData["MDTRT_SETL_TYPE"] = struct3505.MdtrtSetlType // 人员编号 (来自1101接口返回)
7069 7069
 
7070 7070
 	inputData["bchno"] = struct3505.Bchno                          // 人员编号 (来自1101接口返回)
7071
-	inputData["drug_trac_codg"] = struct3505.DrugTracCodg          // 人员编号 (来自1101接口返回)
7071
+	inputData["drug_trac_codg"] = "--"        // 人员编号 (来自1101接口返回)
7072 7072
 	inputData["drug_prod_barc"] = struct3505.DrugProdBarc          // 人员编号 (来自1101接口返回)
7073 7073
 	inputData["shelf_posi"] = struct3505.ShelfPosi                 // 人员编号 (来自1101接口返回)
7074 7074
 	inputData["sel_retn_cnt"] = struct3505.SelRetnCnt              // 人员编号 (来自1101接口返回)