ソースを参照

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

test_user 4 ヶ月 前
コミット
1c11933e57
共有3 個のファイルを変更した170 個の追加23 個の削除を含む
  1. 105 7
      controllers/sg/his_api_controller.go
  2. 35 0
      models/models_3501.go
  3. 30 16
      service/fj_service.go

+ 105 - 7
controllers/sg/his_api_controller.go ファイルの表示

@@ -186,13 +186,17 @@ func HisManagerApiRegistRouters() {
186 186
 	beego.Router("/api/pc_bg", &HisApiController{}, "get:FJ3501AND3502")
187 187
 	//删除库盘和变更
188 188
 	beego.Router("/api/delete_pc_bg", &HisApiController{}, "get:DeletePCandBG")
189
-	beego.Router("/api/delete_pc_bg", &HisApiController{}, "get:DeleteXSandBG")
189
+	beego.Router("/api/delete_xs_bg", &HisApiController{}, "get:DeleteXSandBG")
190 190
 	//药品变更
191 191
 	beego.Router("/api/changedrug", &HisApiController{}, "get:ChangeDrug")
192 192
 
193 193
 }
194 194
 func (c *HisApiController) FJ3501AND3502() {
195 195
 	ids := c.getString("ids")
196
+	//ids := c.getint("admin_")
197
+	admin_user_id, _ := c.GetInt64("admin_user_id")
198
+	roles, _ := service.GetAdminUserInfoByID(c.GetAdminUserInfo().CurrentOrgId, admin_user_id)
199
+
196 200
 	id_arr := strings.Split(ids, ",")
197 201
 	drugs, _ := service.GetNewDrugWarehouseInfo(id_arr)
198 202
 	miConfig, _ := service.FindMedicalInsuranceInfo(c.GetAdminUserInfo().CurrentOrgId)
@@ -202,7 +206,13 @@ func (c *HisApiController) FJ3501AND3502() {
202 206
 			var struct3501 models.Struct3501
203 207
 			struct3501.OrgName = miConfig.OrgName
204 208
 			struct3501.AccessKey = miConfig.AccessKey
209
+			struct3501.Opter = roles.UserName
205 210
 			struct3501.RequestUrl = miConfig.Url
211
+			struct3501.Url = miConfig.Url
212
+			struct3501.AppId = miConfig.Cainfo
213
+			struct3501.AppSecret = miConfig.AppSecret
214
+			struct3501.Enckey = miConfig.EncKey
215
+			struct3501.SignKey = miConfig.SignKey
206 216
 			struct3501.SecretKey = miConfig.SecretKey
207 217
 			struct3501.MedListCodg = drug.BaseDrugLib.MedicalInsuranceNumber
208 218
 			struct3501.FixmedinsHilistId = miConfig.Code
@@ -213,9 +223,8 @@ func (c *HisApiController) FJ3501AND3502() {
213 223
 			struct3501.InsuplcAdmdvs = miConfig.InsuplcAdmdvs
214 224
 			struct3501.InvCnt = strconv.FormatInt(drug.StockMaxNumber, 10)
215 225
 			struct3501.ExpyEnd = time.Unix(drug.ExpiryDate, 0).Format("2006-01-02 15:04:05")
216
-			//todo 批次号规则需要在咨询下保健
217
-			struct3501.FixmedinsBchno = ""
218
-			struct3501.Memo = ""
226
+			struct3501.FixmedinsBchno = strconv.FormatInt(time.Now().Unix(), 10) + "-" + strconv.FormatInt(drug.ID, 10) + "-" + "3501"
227
+			struct3501.Memo = "入库"
219 228
 			result1, result2, result3 := service.FJyb3501(struct3501)
220 229
 			fmt.Println(result1)
221 230
 			fmt.Println(result2)
@@ -227,15 +236,23 @@ func (c *HisApiController) FJ3501AND3502() {
227 236
 			struct3502.FixmedinsHilistName = miConfig.OrgName
228 237
 			struct3502.FixmedinsCode = miConfig.Code
229 238
 			struct3502.RxFlag = "0"
230
-			struct3502.InvChgTime = time.Unix(drug.Ctime, 0).Format("2006-01-02 15:04:05")
239
+			struct3502.InvChgTime = time.Now().Format("2006-01-02")
231 240
 			struct3502.OrgName = miConfig.OrgName
232 241
 			struct3502.AccessKey = miConfig.AccessKey
233 242
 			struct3502.RequestUrl = miConfig.Url
234 243
 			struct3502.SecretKey = miConfig.SecretKey
235 244
 			struct3502.MdtrtareaAdmvs = miConfig.MdtrtareaAdmvs
236 245
 			struct3502.InsuplcAdmdvs = miConfig.InsuplcAdmdvs
246
+
247
+			struct3502.Url = miConfig.Url
248
+			struct3502.AppId = miConfig.Cainfo
249
+			struct3502.AppSecret = miConfig.AppSecret
250
+			struct3502.Enckey = miConfig.EncKey
251
+			struct3502.SignKey = miConfig.SignKey
252
+			struct3502.SecretKey = miConfig.SecretKey
253
+
237 254
 			struct3502.InvChgType = "102"
238
-			struct3502.FixmedinsBchno = ""
255
+			struct3501.FixmedinsBchno = strconv.FormatInt(time.Now().Unix(), 10) + "-" + strconv.FormatInt(drug.ID, 10) + "-" + "3502"
239 256
 			struct3502.Cnt = strconv.FormatInt(drug.WarehousingCount, 10)
240 257
 			struct3502.Pric = fmt.Sprintf("%.2f", drug.BaseDrugLib.RetailPrice)
241 258
 			result11, result22, result33 := service.FJyb3502(struct3502)
@@ -260,6 +277,14 @@ func (c *HisApiController) FJ3501AND3502() {
260 277
 			struct3502.MdtrtareaAdmvs = miConfig.MdtrtareaAdmvs
261 278
 			struct3502.InsuplcAdmdvs = miConfig.InsuplcAdmdvs
262 279
 			struct3502.InvChgType = "102"
280
+
281
+			struct3502.Url = miConfig.Url
282
+			struct3502.AppId = miConfig.Cainfo
283
+			struct3502.AppSecret = miConfig.AppSecret
284
+			struct3502.Enckey = miConfig.EncKey
285
+			struct3502.SignKey = miConfig.SignKey
286
+			struct3502.SecretKey = miConfig.SecretKey
287
+
263 288
 			struct3502.FixmedinsBchno = ""
264 289
 			struct3502.Cnt = strconv.FormatInt(drug.WarehousingCount, 10)
265 290
 			struct3502.Pric = fmt.Sprintf("%.2f", drug.BaseDrugLib.RetailPrice)
@@ -270,9 +295,13 @@ func (c *HisApiController) FJ3501AND3502() {
270 295
 		}
271 296
 	}
272 297
 }
298
+
273 299
 func (c *HisApiController) DeletePCandBG() {
274 300
 	ids := c.getString("ids")
275 301
 	id_arr := strings.Split(ids, ",")
302
+	admin_user_id, _ := c.GetInt64("admin_user_id")
303
+	roles, _ := service.GetAdminUserInfoByID(c.GetAdminUserInfo().CurrentOrgId, admin_user_id)
304
+
276 305
 	drugs, _ := service.GetNewDrugWarehouseInfo(id_arr)
277 306
 	miConfig, _ := service.FindMedicalInsuranceInfo(c.GetAdminUserInfo().CurrentOrgId)
278 307
 	for _, item := range drugs {
@@ -280,12 +309,20 @@ func (c *HisApiController) DeletePCandBG() {
280 309
 			var struct3507 models.Struct3507
281 310
 			struct3507.FixmedinsBchno = ""
282 311
 			struct3507.InvDataType = "1"
312
+			struct3507.Opter = roles.UserName
283 313
 			struct3507.OrgName = miConfig.OrgName
284 314
 			struct3507.AccessKey = miConfig.AccessKey
285 315
 			struct3507.RequestUrl = miConfig.Url
286 316
 			struct3507.SecretKey = miConfig.SecretKey
287 317
 			struct3507.MdtrtareaAdmvs = miConfig.MdtrtareaAdmvs
288 318
 			struct3507.InsuplcAdmdvs = miConfig.InsuplcAdmdvs
319
+
320
+			struct3507.Url = miConfig.Url
321
+			struct3507.AppId = miConfig.Cainfo
322
+			struct3507.AppSecret = miConfig.AppSecret
323
+			struct3507.Enckey = miConfig.EncKey
324
+			struct3507.SignKey = miConfig.SignKey
325
+			struct3507.SecretKey = miConfig.SecretKey
289 326
 			service.FJyb3507(struct3507)
290 327
 
291 328
 			var struct3507_2 models.Struct3507
@@ -295,6 +332,14 @@ func (c *HisApiController) DeletePCandBG() {
295 332
 			struct3507_2.SecretKey = miConfig.SecretKey
296 333
 			struct3507_2.MdtrtareaAdmvs = miConfig.MdtrtareaAdmvs
297 334
 			struct3507_2.InsuplcAdmdvs = miConfig.InsuplcAdmdvs
335
+
336
+			struct3507_2.Url = miConfig.Url
337
+			struct3507_2.AppId = miConfig.Cainfo
338
+			struct3507_2.AppSecret = miConfig.AppSecret
339
+			struct3507_2.Enckey = miConfig.EncKey
340
+			struct3507_2.SignKey = miConfig.SignKey
341
+			struct3507_2.SecretKey = miConfig.SecretKey
342
+
298 343
 			struct3507_2.FixmedinsBchno = ""
299 344
 			struct3507_2.InvDataType = "2"
300 345
 			service.FJyb3507(struct3507_2)
@@ -307,6 +352,13 @@ func (c *HisApiController) DeletePCandBG() {
307 352
 			struct3507.SecretKey = miConfig.SecretKey
308 353
 			struct3507.MdtrtareaAdmvs = miConfig.MdtrtareaAdmvs
309 354
 			struct3507.InsuplcAdmdvs = miConfig.InsuplcAdmdvs
355
+
356
+			struct3507.Url = miConfig.Url
357
+			struct3507.AppId = miConfig.Cainfo
358
+			struct3507.AppSecret = miConfig.AppSecret
359
+			struct3507.Enckey = miConfig.EncKey
360
+			struct3507.SignKey = miConfig.SignKey
361
+			struct3507.SecretKey = miConfig.SecretKey
310 362
 			struct3507.FixmedinsBchno = ""
311 363
 			struct3507.InvDataType = "1"
312 364
 			service.FJyb3507(struct3507)
@@ -319,10 +371,13 @@ func (c *HisApiController) DeletePCandBG() {
319 371
 func (c *HisApiController) DeleteXSandBG() {
320 372
 	ids := c.getString("ids")
321 373
 	id_arr := strings.Split(ids, ",")
374
+	admin_user_id, _ := c.GetInt64("admin_user_id")
375
+	roles, _ := service.GetAdminUserInfoByID(c.GetAdminUserInfo().CurrentOrgId, admin_user_id)
376
+
322 377
 	drugs, _ := service.GetNewDrugWarehouseInfo(id_arr)
323 378
 	miConfig, _ := service.FindMedicalInsuranceInfo(c.GetAdminUserInfo().CurrentOrgId)
324 379
 	for _, item := range drugs {
325
-		if item.is == 1 && item.IsBg == 1 {
380
+		if item.IsPc == 1 && item.IsBg == 1 {
326 381
 			var struct3507 models.Struct3507
327 382
 			struct3507.FixmedinsBchno = ""
328 383
 			struct3507.InvDataType = "1"
@@ -332,6 +387,16 @@ func (c *HisApiController) DeleteXSandBG() {
332 387
 			struct3507.SecretKey = miConfig.SecretKey
333 388
 			struct3507.MdtrtareaAdmvs = miConfig.MdtrtareaAdmvs
334 389
 			struct3507.InsuplcAdmdvs = miConfig.InsuplcAdmdvs
390
+
391
+			struct3507.Url = miConfig.Url
392
+			struct3507.AppId = miConfig.Cainfo
393
+			struct3507.AppSecret = miConfig.AppSecret
394
+			struct3507.Enckey = miConfig.EncKey
395
+			struct3507.SignKey = miConfig.SignKey
396
+			struct3507.SecretKey = miConfig.SecretKey
397
+			struct3507.FixmedinsBchno = ""
398
+			struct3507.InvDataType = "1"
399
+
335 400
 			service.FJyb3507(struct3507)
336 401
 
337 402
 			var struct3507_2 models.Struct3507
@@ -343,6 +408,15 @@ func (c *HisApiController) DeleteXSandBG() {
343 408
 			struct3507_2.InsuplcAdmdvs = miConfig.InsuplcAdmdvs
344 409
 			struct3507_2.FixmedinsBchno = ""
345 410
 			struct3507_2.InvDataType = "2"
411
+
412
+			struct3507_2.Url = miConfig.Url
413
+			struct3507_2.AppId = miConfig.Cainfo
414
+			struct3507_2.AppSecret = miConfig.AppSecret
415
+			struct3507_2.Enckey = miConfig.EncKey
416
+			struct3507_2.SignKey = miConfig.SignKey
417
+			struct3507_2.SecretKey = miConfig.SecretKey
418
+			struct3507_2.FixmedinsBchno = ""
419
+			struct3507_2.InvDataType = "1"
346 420
 			service.FJyb3507(struct3507_2)
347 421
 		}
348 422
 		if item.IsPc == 1 && item.IsBg == 0 {
@@ -439,6 +513,14 @@ func ChangeStock(count int64, drug models.HisDoctorAdviceInfo, miConfig models.M
439 513
 	struct3502.SecretKey = miConfig.SecretKey
440 514
 	struct3502.MdtrtareaAdmvs = miConfig.MdtrtareaAdmvs
441 515
 	struct3502.InsuplcAdmdvs = miConfig.InsuplcAdmdvs
516
+
517
+	struct3502.Url = miConfig.Url
518
+	struct3502.AppId = miConfig.Cainfo
519
+	struct3502.AppSecret = miConfig.AppSecret
520
+	struct3502.Enckey = miConfig.EncKey
521
+	struct3502.SignKey = miConfig.SignKey
522
+	struct3502.SecretKey = miConfig.SecretKey
523
+
442 524
 	struct3502.InvChgType = chgType
443 525
 	struct3502.FixmedinsBchno = ""
444 526
 	struct3502.Cnt = strconv.FormatInt(count, 10)
@@ -468,6 +550,14 @@ func SaleStock(org_id int64, pre models.HisPrescription, drug models.HisDoctorAd
468 550
 	struct3505.ExpyEnd = ""
469 551
 	struct3505.RxFlag = "0"
470 552
 	struct3505.TrdnFlag = "1"
553
+
554
+	struct3505.Url = miConfig.Url
555
+	struct3505.AppId = miConfig.Cainfo
556
+	struct3505.AppSecret = miConfig.AppSecret
557
+	struct3505.Enckey = miConfig.EncKey
558
+	struct3505.SignKey = miConfig.SignKey
559
+	struct3505.SecretKey = miConfig.SecretKey
560
+
471 561
 	struct3505.RtalDocno = order.Number
472 562
 	strValue := fmt.Sprintf("%.2f", drug.PrescribingNumber)
473 563
 	struct3505.SelRetnCnt = strValue
@@ -518,6 +608,14 @@ func CancleSaleStock(org_id int64, pre models.HisPrescription, drug models.HisDo
518 608
 	struct3506.SecretKey = miConfig.SecretKey
519 609
 	struct3506.MdtrtareaAdmvs = miConfig.MdtrtareaAdmvs
520 610
 	struct3506.InsuplcAdmdvs = miConfig.InsuplcAdmdvs
611
+
612
+	struct3506.Url = miConfig.Url
613
+	struct3506.AppId = miConfig.Cainfo
614
+	struct3506.AppSecret = miConfig.AppSecret
615
+	struct3506.Enckey = miConfig.EncKey
616
+	struct3506.SignKey = miConfig.SignKey
617
+	struct3506.SecretKey = miConfig.SecretKey
618
+
521 619
 	result1, result2, result3 := service.FJyb3506(struct3506)
522 620
 	fmt.Println(result1)
523 621
 	fmt.Println(result2)

+ 35 - 0
models/models_3501.go ファイルの表示

@@ -27,6 +27,11 @@ type Struct3501 struct {
27 27
 	PurcRetnCnt         string
28 28
 	PurcRetnStoinTime   string
29 29
 	PurcRetnOpterName   string
30
+	Url                 string
31
+	AppId               string
32
+	AppSecret           string
33
+	SignKey             string
34
+	Enckey              string
30 35
 }
31 36
 type Struct3502 struct {
32 37
 	MedListCodg         string
@@ -53,6 +58,11 @@ type Struct3502 struct {
53 58
 	RequestUrl          string
54 59
 	AccessKey           string
55 60
 	Cainfo              string
61
+	Url                 string
62
+	AppId               string
63
+	AppSecret           string
64
+	SignKey             string
65
+	Enckey              string
56 66
 }
57 67
 type Struct3503 struct {
58 68
 	MedListCodg         string
@@ -85,6 +95,11 @@ type Struct3503 struct {
85 95
 	RequestUrl          string
86 96
 	AccessKey           string
87 97
 	Cainfo              string
98
+	Url                 string
99
+	AppId               string
100
+	AppSecret           string
101
+	SignKey             string
102
+	Enckey              string
88 103
 }
89 104
 type Struct3504 struct {
90 105
 	MedListCodg         string
@@ -113,6 +128,11 @@ type Struct3504 struct {
113 128
 	RequestUrl          string
114 129
 	AccessKey           string
115 130
 	Cainfo              string
131
+	Url                 string
132
+	AppId               string
133
+	AppSecret           string
134
+	SignKey             string
135
+	Enckey              string
116 136
 }
117 137
 type Struct3505 struct {
118 138
 	MedListCodg         string
@@ -161,6 +181,11 @@ type Struct3505 struct {
161 181
 	AccessKey           string
162 182
 	Cainfo              string
163 183
 	MdtrtSetlType       string
184
+	Url                 string
185
+	AppId               string
186
+	AppSecret           string
187
+	SignKey             string
188
+	Enckey              string
164 189
 }
165 190
 type Struct3506 struct {
166 191
 	MedListCodg         string
@@ -194,6 +219,11 @@ type Struct3506 struct {
194 219
 	AccessKey           string
195 220
 	Cainfo              string
196 221
 	MdtrtSn             string
222
+	Url                 string
223
+	AppId               string
224
+	AppSecret           string
225
+	SignKey             string
226
+	Enckey              string
197 227
 }
198 228
 type Struct3507 struct {
199 229
 	FixmedinsBchno string
@@ -207,6 +237,11 @@ type Struct3507 struct {
207 237
 	RequestUrl     string
208 238
 	AccessKey      string
209 239
 	Cainfo         string
240
+	Url            string
241
+	AppId          string
242
+	AppSecret      string
243
+	SignKey        string
244
+	Enckey         string
210 245
 }
211 246
 
212 247
 type XtDrugInventory struct {

+ 30 - 16
service/fj_service.go ファイルの表示

@@ -3013,20 +3013,17 @@ func ReadEleCardForSettle(code string, user_name string, id int64) (string, stri
3013 3013
 
3014 3014
 }
3015 3015
 
3016
-//
3017
-//func GetLastPsnByInsOrg(patient_id int64) (psn models.HisPsn, err error){
3018
-//	err := readDb.Model(&models.HisPsn{}).Where("patient_id = ? AND insuplc_admdvs <> ''",patient_id).Last(&psn).Error
3019
-//	return
3020
-//}
3021
-
3022 3016
 func FJyb3501(struct3501 models.Struct3501) (string, string, string) {
3023 3017
 	timestamp := time.Now().Unix()
3018
+	nonce := GetRandomString(32)
3019
+
3024 3020
 	// 生成输入报文
3025
-	inputMessage := SetJSInputMessage(timestamp, struct3501.OrgName, struct3501.Opter, struct3501.FixmedinsHilistId, struct3501.InsuplcAdmdvs, struct3501.MdtrtareaAdmvs, struct3501.Cainfo)
3021
+	//SetFjInputMessage
3022
+	inputMessage := SetFjInputMessage(nonce, timestamp, struct3501.OrgName, struct3501.Opter, struct3501.FixmedinsHilistId, struct3501.InsuplcAdmdvs, struct3501.MdtrtareaAdmvs, struct3501.Url, struct3501.AppId, struct3501.AppSecret, struct3501.SignKey, struct3501.Enckey)
3026 3023
 	input := make(map[string]interface{})
3027 3024
 	inputData := make(map[string]interface{})
3028 3025
 	druginputData := make(map[string]interface{})
3029
-	druginputData2 := make(map[string]interface{})
3026
+	//druginputData2 := make(map[string]interface{})
3030 3027
 
3031 3028
 	inputMessage["infno"] = "3501"                                  // 交易编码
3032 3029
 	inputData["med_list_codg"] = struct3501.MedListCodg             // 定点医药机构目录编号
@@ -3040,9 +3037,9 @@ func FJyb3501(struct3501 models.Struct3501) (string, string, string) {
3040 3037
 	inputData["manu_date"] = struct3501.ManuDate                    // 人员编号 (来自1101接口返回)
3041 3038
 	inputData["expy_end"] = struct3501.ExpyEnd                      // 人员编号 (来自1101接口返回)
3042 3039
 	inputData["memo"] = ""                                          // 人员编号 (来自1101接口返回)
3043
-	druginputData["drug_trac_codg"] = ""
3044
-	druginputData2["drugtracinfo"] = druginputData
3045
-	inputData["drug_trac_info"] = druginputData2
3040
+	druginputData["drug_trac_codg"] = "123"
3041
+	//druginputData2["drugtracinfo"] = druginputData
3042
+	inputData["drug_trac_info"] = druginputData
3046 3043
 	input["invinfo"] = inputData
3047 3044
 	inputMessage["input"] = input //交易输入
3048 3045
 	bytesData, err := json.Marshal(inputMessage)
@@ -3060,10 +3057,16 @@ func FJyb3501(struct3501 models.Struct3501) (string, string, string) {
3060 3057
 
3061 3058
 	return output, requestLog, err_msg
3062 3059
 }
3060
+
3063 3061
 func FJyb3502(struct3502 models.Struct3502) (string, string, string) {
3064 3062
 	timestamp := time.Now().Unix()
3063
+	nonce := GetRandomString(32)
3064
+	inputMessage := SetFjInputMessage(nonce, timestamp, struct3502.OrgName, struct3502.Opter, struct3502.FixmedinsHilistId, struct3502.InsuplcAdmdvs, struct3502.MdtrtareaAdmvs, struct3502.Url, struct3502.AppId, struct3502.AppSecret, struct3502.SignKey, struct3502.Enckey)
3065
+
3066
+	//inputMessage := SetInputMessag/**/e(nonce, timestamp, struct3502.OrgName, struct3502.Opter, struct3502.FixmedinsHilistId, struct3502.InsuplcAdmdvs, struct3502.MdtrtareaAdmvs)
3067
+
3065 3068
 	// 生成输入报文
3066
-	inputMessage := SetJSInputMessage(timestamp, struct3502.OrgName, struct3502.Opter, struct3502.FixmedinsCode, struct3502.InsuplcAdmdvs, struct3502.MdtrtareaAdmvs, struct3502.Cainfo)
3069
+	//inputMessage := SetJSInputMessage(timestamp, struct3502.OrgName, struct3502.Opter, struct3502.FixmedinsCode, struct3502.InsuplcAdmdvs, struct3502.MdtrtareaAdmvs, struct3502.Cainfo)
3067 3070
 	input := make(map[string]interface{})
3068 3071
 	inputData := make(map[string]interface{})
3069 3072
 	druginputData := make(map[string]interface{})
@@ -3107,10 +3110,16 @@ func FJyb3502(struct3502 models.Struct3502) (string, string, string) {
3107 3110
 	return output, requestLog, err_msg
3108 3111
 
3109 3112
 }
3113
+
3110 3114
 func FJyb3505(struct3505 models.Struct3505) (string, string, string) {
3111 3115
 	timestamp := time.Now().Unix()
3116
+	nonce := GetRandomString(32)
3117
+	//inputMessage := SetInputMessage(nonce, timestamp, struct3505.OrgName, struct3505.Opter, struct3505.FixmedinsHilistId, struct3505.InsuplcAdmdvs, struct3505.MdtrtareaAdmvs)
3118
+
3119
+	inputMessage := SetFjInputMessage(nonce, timestamp, struct3505.OrgName, struct3505.Opter, struct3505.FixmedinsHilistId, struct3505.InsuplcAdmdvs, struct3505.MdtrtareaAdmvs, struct3505.Url, struct3505.AppId, struct3505.AppSecret, struct3505.SignKey, struct3505.Enckey)
3120
+
3112 3121
 	// 生成输入报文
3113
-	inputMessage := SetJSInputMessage(timestamp, struct3505.OrgName, struct3505.Opter, struct3505.FixmedinsHilistId, struct3505.InsuplcAdmdvs, struct3505.MdtrtareaAdmvs, struct3505.Cainfo)
3122
+	//inputMessage := SetJSInputMessage(timestamp, struct3505.OrgName, struct3505.Opter, struct3505.FixmedinsHilistId, struct3505.InsuplcAdmdvs, struct3505.MdtrtareaAdmvs, struct3505.Cainfo)
3114 3123
 	input := make(map[string]interface{})
3115 3124
 	inputData := make(map[string]interface{})
3116 3125
 	druginputData := make(map[string]interface{})
@@ -3181,10 +3190,14 @@ func FJyb3505(struct3505 models.Struct3505) (string, string, string) {
3181 3190
 	return output, requestLog, err_msg
3182 3191
 
3183 3192
 }
3193
+
3184 3194
 func FJyb3506(struct3506 models.Struct3506) (string, string, string) {
3185 3195
 	timestamp := time.Now().Unix()
3196
+	nonce := GetRandomString(32)
3197
+	//inputMessage := SetInputMessage(nonce, timestamp, struct3506.OrgName, struct3506.Opter, struct3506.FixmedinsHilistId, struct3506.InsuplcAdmdvs, struct3506.MdtrtareaAdmvs)
3198
+	inputMessage := SetFjInputMessage(nonce, timestamp, struct3506.OrgName, struct3506.Opter, struct3506.FixmedinsHilistId, struct3506.InsuplcAdmdvs, struct3506.MdtrtareaAdmvs, struct3506.Url, struct3506.AppId, struct3506.AppSecret, struct3506.SignKey, struct3506.Enckey)
3199
+
3186 3200
 	// 生成输入报文
3187
-	inputMessage := SetJSInputMessage(timestamp, struct3506.OrgName, struct3506.Opter, struct3506.FixmedinsCode, struct3506.InsuplcAdmdvs, struct3506.MdtrtareaAdmvs, struct3506.Cainfo)
3188 3201
 	input := make(map[string]interface{})
3189 3202
 	inputData := make(map[string]interface{})
3190 3203
 	druginputData := make(map[string]interface{})
@@ -3236,10 +3249,11 @@ func FJyb3506(struct3506 models.Struct3506) (string, string, string) {
3236 3249
 	return output, requestLog, err_msg
3237 3250
 
3238 3251
 }
3252
+
3239 3253
 func FJyb3507(struct3507 models.Struct3507) (string, string, string) {
3240 3254
 	timestamp := time.Now().Unix()
3241
-	// 生成输入报文
3242
-	inputMessage := SetJSInputMessage(timestamp, struct3507.OrgName, struct3507.Opter, struct3507.FixmedinsCode, struct3507.InsuplcAdmdvs, struct3507.MdtrtareaAdmvs, struct3507.Cainfo)
3255
+	nonce := GetRandomString(32)
3256
+	inputMessage := SetFjInputMessage(nonce, timestamp, struct3507.OrgName, struct3507.Opter, struct3507.FixmedinsCode, struct3507.InsuplcAdmdvs, struct3507.MdtrtareaAdmvs, struct3507.Url, struct3507.AppId, struct3507.AppSecret, struct3507.SignKey, struct3507.Enckey)
3243 3257
 	input := make(map[string]interface{})
3244 3258
 	inputData := make(map[string]interface{})
3245 3259
 	inputMessage["infno"] = "3507"                          // 交易编码