test_user 4 週之前
父節點
當前提交
9742cc1744
共有 2 個文件被更改,包括 286 次插入286 次删除
  1. 269 275
      controllers/nm/nm_controller.go
  2. 17 11
      controllers/sg/his_api_controller.go

+ 269 - 275
controllers/nm/nm_controller.go 查看文件

@@ -78,281 +78,275 @@ func NmybRegistRouters() {
78 78
 	beego.Router("/nmyb/3512", &NmController{}, "get:Post3512")
79 79
 	beego.Router("/nmyb/3513", &NmController{}, "get:Post3513")
80 80
 
81
-	beego.Router("/nmyb/001", &NmController{}, "get:Post001")
82
-	beego.Router("/nmyb/002", &NmController{}, "get:Post002")
83
-	beego.Router("/nmyb/003", &NmController{}, "get:Post003")
84
-	beego.Router("/nmyb/004", &NmController{}, "get:Post004")
85
-	beego.Router("/nmyb/005", &NmController{}, "get:Post005")
86
-	beego.Router("/nmyb/006", &NmController{}, "get:Post006")
87
-	beego.Router("/nmyb/007", &NmController{}, "get:Post007")
88
-	beego.Router("/nmyb/008", &NmController{}, "get:Post008")
89
-
90
-}
91
-func (c *NmController) Post001() {
92
-	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
93
-	var respJSON map[string]interface{}
94
-	if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
95
-		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
96
-		return
97
-	}
98
-
99
-	userJSONBytes, _ := json.Marshal(respJSON["struct_001"])
100
-	var struct3501 models.CFYLJG001
101
-	if err := json.Unmarshal(userJSONBytes, &struct3501); err != nil {
102
-		utils.ErrorLog("解析失败:%v", err)
103
-		return
104
-	}
105
-
106
-	result, request_log := service.GetAHCFYLJG001("")
107
-	saveJsLog(result, request_log, "3501", "库存盘点", struct3501.OrgName)
108
-	var dat2 map[string]interface{}
109
-	if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
110
-	} else {
111
-	}
112
-	var dat map[string]interface{}
113
-	if err := json.Unmarshal([]byte(result), &dat); err == nil {
114
-	} else {
115
-
116
-	}
117
-	c.ServeSuccessJSON(map[string]interface{}{
118
-		"pre":         dat,
119
-		"request_log": dat2,
120
-	})
121
-
122
-}
123
-func (c *NmController) Post002() {
124
-
125
-	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
126
-	var respJSON map[string]interface{}
127
-	if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
128
-		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
129
-		return
130
-	}
131
-
132
-	userJSONBytes, _ := json.Marshal(respJSON["struct_3501s"])
133
-	var struct3501 models.Struct3501
134
-	if err := json.Unmarshal(userJSONBytes, &struct3501); err != nil {
135
-		utils.ErrorLog("解析失败:%v", err)
136
-		return
137
-	}
138
-
139
-	result, request_log := service.NMyb3501(struct3501, struct3501.SecretKey)
140
-	saveJsLog(result, request_log, "3501", "库存盘点", struct3501.OrgName)
141
-	var dat2 map[string]interface{}
142
-	if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
143
-	} else {
144
-	}
145
-	var dat map[string]interface{}
146
-	if err := json.Unmarshal([]byte(result), &dat); err == nil {
147
-	} else {
148
-
149
-	}
150
-	c.ServeSuccessJSON(map[string]interface{}{
151
-		"pre":         dat,
152
-		"request_log": dat2,
153
-	})
154
-
155
-}
156
-
157
-func (c *NmController) Post003() {
158
-	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
159
-	var respJSON map[string]interface{}
160
-	if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
161
-		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
162
-		return
163
-	}
164
-
165
-	userJSONBytes, _ := json.Marshal(respJSON["struct_3501s"])
166
-	var struct3501 models.Struct3501
167
-	if err := json.Unmarshal(userJSONBytes, &struct3501); err != nil {
168
-		utils.ErrorLog("解析失败:%v", err)
169
-		return
170
-	}
171
-
172
-	result, request_log := service.NMyb3501(struct3501, struct3501.SecretKey)
173
-	saveJsLog(result, request_log, "3501", "库存盘点", struct3501.OrgName)
174
-	var dat2 map[string]interface{}
175
-	if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
176
-	} else {
177
-	}
178
-	var dat map[string]interface{}
179
-	if err := json.Unmarshal([]byte(result), &dat); err == nil {
180
-	} else {
181
-
182
-	}
183
-	c.ServeSuccessJSON(map[string]interface{}{
184
-		"pre":         dat,
185
-		"request_log": dat2,
186
-	})
187
-
188
-}
189
-
190
-func (c *NmController) Post004() {
191
-	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
192
-	var respJSON map[string]interface{}
193
-	if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
194
-		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
195
-		return
196
-	}
197
-
198
-	userJSONBytes, _ := json.Marshal(respJSON["struct_3501s"])
199
-	var struct3501 models.Struct3501
200
-	if err := json.Unmarshal(userJSONBytes, &struct3501); err != nil {
201
-		utils.ErrorLog("解析失败:%v", err)
202
-		return
203
-	}
204
-
205
-	result, request_log := service.NMyb3501(struct3501, struct3501.SecretKey)
206
-	saveJsLog(result, request_log, "3501", "库存盘点", struct3501.OrgName)
207
-	var dat2 map[string]interface{}
208
-	if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
209
-	} else {
210
-	}
211
-	var dat map[string]interface{}
212
-	if err := json.Unmarshal([]byte(result), &dat); err == nil {
213
-	} else {
214
-
215
-	}
216
-	c.ServeSuccessJSON(map[string]interface{}{
217
-		"pre":         dat,
218
-		"request_log": dat2,
219
-	})
220
-
221
-}
222
-
223
-func (c *NmController) Post005() {
224
-	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
225
-	var respJSON map[string]interface{}
226
-	if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
227
-		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
228
-		return
229
-	}
230
-
231
-	userJSONBytes, _ := json.Marshal(respJSON["struct_3501s"])
232
-	var struct3501 models.Struct3501
233
-	if err := json.Unmarshal(userJSONBytes, &struct3501); err != nil {
234
-		utils.ErrorLog("解析失败:%v", err)
235
-		return
236
-	}
237
-
238
-	result, request_log := service.NMyb3501(struct3501, struct3501.SecretKey)
239
-	saveJsLog(result, request_log, "3501", "库存盘点", struct3501.OrgName)
240
-	var dat2 map[string]interface{}
241
-	if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
242
-	} else {
243
-	}
244
-	var dat map[string]interface{}
245
-	if err := json.Unmarshal([]byte(result), &dat); err == nil {
246
-	} else {
247
-
248
-	}
249
-	c.ServeSuccessJSON(map[string]interface{}{
250
-		"pre":         dat,
251
-		"request_log": dat2,
252
-	})
253
-
254
-}
255
-
256
-func (c *NmController) Post006() {
257
-	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
258
-	var respJSON map[string]interface{}
259
-	if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
260
-		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
261
-		return
262
-	}
263
-
264
-	userJSONBytes, _ := json.Marshal(respJSON["struct_3501s"])
265
-	var struct3501 models.Struct3501
266
-	if err := json.Unmarshal(userJSONBytes, &struct3501); err != nil {
267
-		utils.ErrorLog("解析失败:%v", err)
268
-		return
269
-	}
270
-
271
-	result, request_log := service.NMyb3501(struct3501, struct3501.SecretKey)
272
-	saveJsLog(result, request_log, "3501", "库存盘点", struct3501.OrgName)
273
-	var dat2 map[string]interface{}
274
-	if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
275
-	} else {
276
-	}
277
-	var dat map[string]interface{}
278
-	if err := json.Unmarshal([]byte(result), &dat); err == nil {
279
-	} else {
280
-
281
-	}
282
-	c.ServeSuccessJSON(map[string]interface{}{
283
-		"pre":         dat,
284
-		"request_log": dat2,
285
-	})
286
-
287
-}
288
-
289
-func (c *NmController) Post007() {
290
-
291
-	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
292
-	var respJSON map[string]interface{}
293
-	if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
294
-		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
295
-		return
296
-	}
297
-
298
-	userJSONBytes, _ := json.Marshal(respJSON["struct_3501s"])
299
-	var struct3501 models.Struct3501
300
-	if err := json.Unmarshal(userJSONBytes, &struct3501); err != nil {
301
-		utils.ErrorLog("解析失败:%v", err)
302
-		return
303
-	}
304
-
305
-	result, request_log := service.NMyb3501(struct3501, struct3501.SecretKey)
306
-	saveJsLog(result, request_log, "3501", "库存盘点", struct3501.OrgName)
307
-	var dat2 map[string]interface{}
308
-	if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
309
-	} else {
310
-	}
311
-	var dat map[string]interface{}
312
-	if err := json.Unmarshal([]byte(result), &dat); err == nil {
313
-	} else {
314
-
315
-	}
316
-	c.ServeSuccessJSON(map[string]interface{}{
317
-		"pre":         dat,
318
-		"request_log": dat2,
319
-	})
320
-
321
-}
322
-
323
-func (c *NmController) Post008() {
324
-
325
-	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
326
-	var respJSON map[string]interface{}
327
-	if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
328
-		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
329
-		return
330
-	}
331
-
332
-	userJSONBytes, _ := json.Marshal(respJSON["struct_3501s"])
333
-	var struct3501 models.Struct3501
334
-	if err := json.Unmarshal(userJSONBytes, &struct3501); err != nil {
335
-		utils.ErrorLog("解析失败:%v", err)
336
-		return
337
-	}
338
-
339
-	result, request_log := service.NMyb3501(struct3501, struct3501.SecretKey)
340
-	saveJsLog(result, request_log, "3501", "库存盘点", struct3501.OrgName)
341
-	var dat2 map[string]interface{}
342
-	if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
343
-	} else {
344
-	}
345
-	var dat map[string]interface{}
346
-	if err := json.Unmarshal([]byte(result), &dat); err == nil {
347
-	} else {
348
-
349
-	}
350
-	c.ServeSuccessJSON(map[string]interface{}{
351
-		"pre":         dat,
352
-		"request_log": dat2,
353
-	})
354
-
355
-}
81
+	//beego.Router("/nmyb/001", &NmController{}, "get:Post001")
82
+	//beego.Router("/nmyb/002", &NmController{}, "get:Post002")
83
+	//beego.Router("/nmyb/003", &NmController{}, "get:Post003")
84
+	//beego.Router("/nmyb/004", &NmController{}, "get:Post004")
85
+	//beego.Router("/nmyb/005", &NmController{}, "get:Post005")
86
+	//beego.Router("/nmyb/006", &NmController{}, "get:Post006")
87
+	//beego.Router("/nmyb/007", &NmController{}, "get:Post007")
88
+	//beego.Router("/nmyb/008", &NmController{}, "get:Post008")
89
+
90
+}
91
+//func (c *NmController) Post001() {
92
+//	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
93
+//	var respJSON map[string]interface{}
94
+//	if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
95
+//		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
96
+//		return
97
+//	}
98
+//
99
+//	userJSONBytes, _ := json.Marshal(respJSON["struct_001"])
100
+//	var struct3501 models.CFYLJG001
101
+//	if err := json.Unmarshal(userJSONBytes, &struct3501); err != nil {
102
+//		utils.ErrorLog("解析失败:%v", err)
103
+//		return
104
+//	}
105
+//
106
+//	result, request_log := service.GetAHCFYLJG001("")
107
+//	saveJsLog(result, request_log, "3501", "库存盘点", struct3501.OrgName)
108
+//	var dat2 map[string]interface{}
109
+//	if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
110
+//	} else {
111
+//	}
112
+//	var dat map[string]interface{}
113
+//	if err := json.Unmarshal([]byte(result), &dat); err == nil {
114
+//	} else {
115
+//
116
+//	}
117
+//	c.ServeSuccessJSON(map[string]interface{}{
118
+//		"pre":         dat,
119
+//		"request_log": dat2,
120
+//	})
121
+//
122
+//}
123
+//func (c *NmController) Post002() {
124
+//
125
+//	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
126
+//	var respJSON map[string]interface{}
127
+//	if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
128
+//		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
129
+//		return
130
+//	}
131
+//
132
+//	userJSONBytes, _ := json.Marshal(respJSON["struct_3501s"])
133
+//	var struct3501 models.Struct3501
134
+//	if err := json.Unmarshal(userJSONBytes, &struct3501); err != nil {
135
+//		utils.ErrorLog("解析失败:%v", err)
136
+//		return
137
+//	}
138
+//
139
+//	result, request_log := service.NMyb3501(struct3501, struct3501.SecretKey)
140
+//	saveJsLog(result, request_log, "3501", "库存盘点", struct3501.OrgName)
141
+//	var dat2 map[string]interface{}
142
+//	if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
143
+//	} else {
144
+//	}
145
+//	var dat map[string]interface{}
146
+//	if err := json.Unmarshal([]byte(result), &dat); err == nil {
147
+//	} else {
148
+//
149
+//	}
150
+//	c.ServeSuccessJSON(map[string]interface{}{
151
+//		"pre":         dat,
152
+//		"request_log": dat2,
153
+//	})
154
+//
155
+//}
156
+//func (c *NmController) Post003() {
157
+//	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
158
+//	var respJSON map[string]interface{}
159
+//	if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
160
+//		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
161
+//		return
162
+//	}
163
+//
164
+//	userJSONBytes, _ := json.Marshal(respJSON["struct_3501s"])
165
+//	var struct3501 models.Struct3501
166
+//	if err := json.Unmarshal(userJSONBytes, &struct3501); err != nil {
167
+//		utils.ErrorLog("解析失败:%v", err)
168
+//		return
169
+//	}
170
+//
171
+//	result, request_log := service.NMyb3501(struct3501, struct3501.SecretKey)
172
+//	saveJsLog(result, request_log, "3501", "库存盘点", struct3501.OrgName)
173
+//	var dat2 map[string]interface{}
174
+//	if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
175
+//	} else {
176
+//	}
177
+//	var dat map[string]interface{}
178
+//	if err := json.Unmarshal([]byte(result), &dat); err == nil {
179
+//	} else {
180
+//
181
+//	}
182
+//	c.ServeSuccessJSON(map[string]interface{}{
183
+//		"pre":         dat,
184
+//		"request_log": dat2,
185
+//	})
186
+//
187
+//}
188
+//func (c *NmController) Post004() {
189
+//	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
190
+//	var respJSON map[string]interface{}
191
+//	if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
192
+//		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
193
+//		return
194
+//	}
195
+//
196
+//	userJSONBytes, _ := json.Marshal(respJSON["struct_3501s"])
197
+//	var struct3501 models.Struct3501
198
+//	if err := json.Unmarshal(userJSONBytes, &struct3501); err != nil {
199
+//		utils.ErrorLog("解析失败:%v", err)
200
+//		return
201
+//	}
202
+//
203
+//	result, request_log := service.NMyb3501(struct3501, struct3501.SecretKey)
204
+//	saveJsLog(result, request_log, "3501", "库存盘点", struct3501.OrgName)
205
+//	var dat2 map[string]interface{}
206
+//	if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
207
+//	} else {
208
+//	}
209
+//	var dat map[string]interface{}
210
+//	if err := json.Unmarshal([]byte(result), &dat); err == nil {
211
+//	} else {
212
+//
213
+//	}
214
+//	c.ServeSuccessJSON(map[string]interface{}{
215
+//		"pre":         dat,
216
+//		"request_log": dat2,
217
+//	})
218
+//
219
+//}
220
+//func (c *NmController) Post005() {
221
+//	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
222
+//	var respJSON map[string]interface{}
223
+//	if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
224
+//		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
225
+//		return
226
+//	}
227
+//
228
+//	userJSONBytes, _ := json.Marshal(respJSON["struct_3501s"])
229
+//	var struct3501 models.Struct3501
230
+//	if err := json.Unmarshal(userJSONBytes, &struct3501); err != nil {
231
+//		utils.ErrorLog("解析失败:%v", err)
232
+//		return
233
+//	}
234
+//
235
+//	result, request_log := service.NMyb3501(struct3501, struct3501.SecretKey)
236
+//	saveJsLog(result, request_log, "3501", "库存盘点", struct3501.OrgName)
237
+//	var dat2 map[string]interface{}
238
+//	if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
239
+//	} else {
240
+//	}
241
+//	var dat map[string]interface{}
242
+//	if err := json.Unmarshal([]byte(result), &dat); err == nil {
243
+//	} else {
244
+//
245
+//	}
246
+//	c.ServeSuccessJSON(map[string]interface{}{
247
+//		"pre":         dat,
248
+//		"request_log": dat2,
249
+//	})
250
+//
251
+//}
252
+//func (c *NmController) Post006() {
253
+//	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
254
+//	var respJSON map[string]interface{}
255
+//	if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
256
+//		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
257
+//		return
258
+//	}
259
+//
260
+//	userJSONBytes, _ := json.Marshal(respJSON["struct_3501s"])
261
+//	var struct3501 models.Struct3501
262
+//	if err := json.Unmarshal(userJSONBytes, &struct3501); err != nil {
263
+//		utils.ErrorLog("解析失败:%v", err)
264
+//		return
265
+//	}
266
+//
267
+//	result, request_log := service.NMyb3501(struct3501, struct3501.SecretKey)
268
+//	saveJsLog(result, request_log, "3501", "库存盘点", struct3501.OrgName)
269
+//	var dat2 map[string]interface{}
270
+//	if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
271
+//	} else {
272
+//	}
273
+//	var dat map[string]interface{}
274
+//	if err := json.Unmarshal([]byte(result), &dat); err == nil {
275
+//	} else {
276
+//
277
+//	}
278
+//	c.ServeSuccessJSON(map[string]interface{}{
279
+//		"pre":         dat,
280
+//		"request_log": dat2,
281
+//	})
282
+//
283
+//}
284
+//func (c *NmController) Post007() {
285
+//
286
+//	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
287
+//	var respJSON map[string]interface{}
288
+//	if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
289
+//		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
290
+//		return
291
+//	}
292
+//
293
+//	userJSONBytes, _ := json.Marshal(respJSON["struct_3501s"])
294
+//	var struct3501 models.Struct3501
295
+//	if err := json.Unmarshal(userJSONBytes, &struct3501); err != nil {
296
+//		utils.ErrorLog("解析失败:%v", err)
297
+//		return
298
+//	}
299
+//
300
+//	result, request_log := service.NMyb3501(struct3501, struct3501.SecretKey)
301
+//	saveJsLog(result, request_log, "3501", "库存盘点", struct3501.OrgName)
302
+//	var dat2 map[string]interface{}
303
+//	if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
304
+//	} else {
305
+//	}
306
+//	var dat map[string]interface{}
307
+//	if err := json.Unmarshal([]byte(result), &dat); err == nil {
308
+//	} else {
309
+//
310
+//	}
311
+//	c.ServeSuccessJSON(map[string]interface{}{
312
+//		"pre":         dat,
313
+//		"request_log": dat2,
314
+//	})
315
+//
316
+//}
317
+//func (c *NmController) Post008() {
318
+//
319
+//	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
320
+//	var respJSON map[string]interface{}
321
+//	if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
322
+//		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
323
+//		return
324
+//	}
325
+//
326
+//	userJSONBytes, _ := json.Marshal(respJSON["struct_3501s"])
327
+//	var struct3501 models.Struct3501
328
+//	if err := json.Unmarshal(userJSONBytes, &struct3501); err != nil {
329
+//		utils.ErrorLog("解析失败:%v", err)
330
+//		return
331
+//	}
332
+//
333
+//	result, request_log := service.NMyb3501(struct3501, struct3501.SecretKey)
334
+//	saveJsLog(result, request_log, "3501", "库存盘点", struct3501.OrgName)
335
+//	var dat2 map[string]interface{}
336
+//	if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
337
+//	} else {
338
+//	}
339
+//	var dat map[string]interface{}
340
+//	if err := json.Unmarshal([]byte(result), &dat); err == nil {
341
+//	} else {
342
+//
343
+//	}
344
+//	c.ServeSuccessJSON(map[string]interface{}{
345
+//		"pre":         dat,
346
+//		"request_log": dat2,
347
+//	})
348
+//
349
+//}
356 350
 
357 351
 func (c *NmController) Post3501() {
358 352
 	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)

+ 17 - 11
controllers/sg/his_api_controller.go 查看文件

@@ -34,6 +34,7 @@ import (
34 34
 	"syscall"
35 35
 	"time"
36 36
 	"unsafe"
37
+	"github.com/go-ole/go-ole"
37 38
 )
38 39
 
39 40
 type HisApiController struct {
@@ -1806,7 +1807,7 @@ func (c *HisApiController) DeletePCandBG() {
1806 1807
 	var err []string
1807 1808
 	for _, item := range drugs {
1808 1809
 		if item.IsPc == 1 {
1809
-			var res FJ3502Result
1810
+			var res FJ3507Result
1810 1811
 
1811 1812
 			var struct3507 models.Struct3507
1812 1813
 			struct3507.FixmedinsBchno = item.Bchno
@@ -28917,6 +28918,11 @@ func (c *HisApiController) GetUploadInfo() {
28917 28918
 	pay_ways := c.GetString("pay_ways")
28918 28919
 	oth_desc := c.GetString("oth_desc")
28919 28920
 
28921
+
28922
+	pack_num, _ := c.GetInt64("pack_num")
28923
+	good_pack_num, _ := c.GetInt64("good_pack_num")
28924
+
28925
+
28920 28926
 	pay_price, _ := c.GetFloat("pay_price")
28921 28927
 	pay_card_no := c.GetString("pay_card_no")
28922 28928
 
@@ -30265,7 +30271,7 @@ func (c *HisApiController) GetUploadInfo() {
30265 30271
 								"&insuplc_admdvs=" + his.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs +
30266 30272
 								"&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(his.IdCardType, 10) +
30267 30273
 								"&certificates=" + strconv.FormatInt(his.IdType, 10) + "&cert_no=" + cert_no +
30268
-								"&insutype=" + insutype + "&total=" + allTotal + "&med_type=" + strconv.FormatInt(reg_type, 10) + "&acct_used_flag=" + acct_used_flag
30274
+								"&insutype=" + insutype + "&total=" + allTotal + "&med_type=" + strconv.FormatInt(reg_type, 10) + "&acct_used_flag=" + acct_used_flag + "&pack_num=" + strconv.FormatInt(pack_num, 10)+ "&good_pack_num=" + strconv.FormatInt(good_pack_num, 10)
30269 30275
 
30270 30276
 							resp, requestErr := http.Get(api)
30271 30277
 							if requestErr != nil {
@@ -30325,7 +30331,7 @@ func (c *HisApiController) GetUploadInfo() {
30325 30331
 								"&insuplc_admdvs=" + his.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs +
30326 30332
 								"&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(his.IdCardType, 10) +
30327 30333
 								"&certificates=" + strconv.FormatInt(his.IdType, 10) + "&cert_no=" + cert_no +
30328
-								"&insutype=" + insutype + "&total=" + allTotal + "&med_type=" + strconv.FormatInt(reg_type, 10) + "&acct_used_flag=" + acct_used_flag
30334
+								"&insutype=" + insutype + "&total=" + allTotal + "&med_type=" + strconv.FormatInt(reg_type, 10) + "&acct_used_flag=" + acct_used_flag+ "&pack_num=" + strconv.FormatInt(pack_num, 10)+ "&good_pack_num=" + strconv.FormatInt(good_pack_num, 10)
30329 30335
 
30330 30336
 							resp, requestErr := http.Get(api)
30331 30337
 							if requestErr != nil {
@@ -30385,7 +30391,7 @@ func (c *HisApiController) GetUploadInfo() {
30385 30391
 								"&insuplc_admdvs=" + his.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs +
30386 30392
 								"&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(his.IdCardType, 10) +
30387 30393
 								"&certificates=" + strconv.FormatInt(his.IdType, 10) + "&cert_no=" + cert_no +
30388
-								"&insutype=" + insutype + "&total=" + allTotal + "&med_type=" + strconv.FormatInt(reg_type, 10) + "&acct_used_flag=" + acct_used_flag
30394
+								"&insutype=" + insutype + "&total=" + allTotal + "&med_type=" + strconv.FormatInt(reg_type, 10) + "&acct_used_flag=" + acct_used_flag+ "&pack_num=" + strconv.FormatInt(pack_num, 10)+ "&good_pack_num=" + strconv.FormatInt(good_pack_num, 10)
30389 30395
 
30390 30396
 							resp, requestErr := http.Get(api)
30391 30397
 							if requestErr != nil {
@@ -30445,7 +30451,7 @@ func (c *HisApiController) GetUploadInfo() {
30445 30451
 								"&insuplc_admdvs=" + his.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs +
30446 30452
 								"&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(his.IdCardType, 10) +
30447 30453
 								"&certificates=" + strconv.FormatInt(his.IdType, 10) + "&cert_no=" + cert_no +
30448
-								"&insutype=" + insutype + "&total=" + allTotal + "&med_type=" + strconv.FormatInt(reg_type, 10) + "&acct_used_flag=" + acct_used_flag
30454
+								"&insutype=" + insutype + "&total=" + allTotal + "&med_type=" + strconv.FormatInt(reg_type, 10) + "&acct_used_flag=" + acct_used_flag+ "&pack_num=" + strconv.FormatInt(pack_num, 10)+ "&good_pack_num=" + strconv.FormatInt(good_pack_num, 10)
30449 30455
 
30450 30456
 							resp, requestErr := http.Get(api)
30451 30457
 							if requestErr != nil {
@@ -30532,7 +30538,7 @@ func (c *HisApiController) GetUploadInfo() {
30532 30538
 											"&insuplc_admdvs=" + his.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs +
30533 30539
 											"&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(his.IdCardType, 10) +
30534 30540
 											"&certificates=" + strconv.FormatInt(his.IdType, 10) + "&cert_no=" + cert_no +
30535
-											"&insutype=" + insutype + "&total=" + allTotal + "&med_type=" + strconv.FormatInt(reg_type, 10) + "&acct_used_flag=" + acct_used_flag + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&verify_number=" + psn_info.VerifyNumber + "&cainfo=" + miConfig.Cainfo + "&mdtrt_grp_type=" + his.MdtrtGrpType
30541
+											"&insutype=" + insutype + "&total=" + allTotal + "&med_type=" + strconv.FormatInt(reg_type, 10) + "&acct_used_flag=" + acct_used_flag + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&verify_number=" + psn_info.VerifyNumber + "&cainfo=" + miConfig.Cainfo + "&mdtrt_grp_type=" + his.MdtrtGrpType+ "&pack_num=" + strconv.FormatInt(pack_num, 10)+ "&good_pack_num=" + strconv.FormatInt(good_pack_num, 10)
30536 30542
 									} else if miConfig.MdtrtareaAdmvs == "320921" {
30537 30543
 										api = "http://192.168.2.3:9532/" + "jsyb/2207?psn_no=" + his.PsnNo + "&mdtrt_id=" +
30538 30544
 											his.Number + "&chrg_bchno=" + chrg_bchno + "&org_name=" + miConfig.OrgName +
@@ -30540,7 +30546,7 @@ func (c *HisApiController) GetUploadInfo() {
30540 30546
 											"&insuplc_admdvs=" + his.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs +
30541 30547
 											"&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(his.IdCardType, 10) +
30542 30548
 											"&certificates=" + strconv.FormatInt(his.IdType, 10) + "&cert_no=" + cert_no +
30543
-											"&insutype=" + insutype + "&total=" + allTotal + "&med_type=" + strconv.FormatInt(reg_type, 10) + "&acct_used_flag=" + acct_used_flag + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&verify_number=" + psn_info.VerifyNumber + "&cainfo=" + miConfig.Cainfo + "&mdtrt_grp_type=" + his.MdtrtGrpType
30549
+											"&insutype=" + insutype + "&total=" + allTotal + "&med_type=" + strconv.FormatInt(reg_type, 10) + "&acct_used_flag=" + acct_used_flag + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&verify_number=" + psn_info.VerifyNumber + "&cainfo=" + miConfig.Cainfo + "&mdtrt_grp_type=" + his.MdtrtGrpType+ "&pack_num=" + strconv.FormatInt(pack_num, 10)+ "&good_pack_num=" + strconv.FormatInt(good_pack_num, 10)
30544 30550
 									} else {
30545 30551
 										api = "http://192.168.5.251:9532/" + "jsyb/2207?psn_no=" + his.PsnNo + "&mdtrt_id=" +
30546 30552
 											his.Number + "&chrg_bchno=" + chrg_bchno + "&org_name=" + miConfig.OrgName +
@@ -30548,7 +30554,7 @@ func (c *HisApiController) GetUploadInfo() {
30548 30554
 											"&insuplc_admdvs=" + his.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs +
30549 30555
 											"&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(his.IdCardType, 10) +
30550 30556
 											"&certificates=" + strconv.FormatInt(his.IdType, 10) + "&cert_no=" + cert_no +
30551
-											"&insutype=" + insutype + "&total=" + allTotal + "&med_type=" + strconv.FormatInt(reg_type, 10) + "&acct_used_flag=" + acct_used_flag + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&verify_number=" + psn_info.VerifyNumber + "&cainfo=" + miConfig.Cainfo + "&mdtrt_grp_type=" + his.MdtrtGrpType
30557
+											"&insutype=" + insutype + "&total=" + allTotal + "&med_type=" + strconv.FormatInt(reg_type, 10) + "&acct_used_flag=" + acct_used_flag + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&verify_number=" + psn_info.VerifyNumber + "&cainfo=" + miConfig.Cainfo + "&mdtrt_grp_type=" + his.MdtrtGrpType+ "&pack_num=" + strconv.FormatInt(pack_num, 10)+ "&good_pack_num=" + strconv.FormatInt(good_pack_num, 10)
30552 30558
 
30553 30559
 									}
30554 30560
 
@@ -30611,7 +30617,7 @@ func (c *HisApiController) GetUploadInfo() {
30611 30617
 								"&insuplc_admdvs=" + his.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs +
30612 30618
 								"&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(his.IdCardType, 10) +
30613 30619
 								"&certificates=" + strconv.FormatInt(his.IdType, 10) + "&cert_no=" + cert_no +
30614
-								"&insutype=" + insutype + "&total=" + allTotal + "&med_type=" + strconv.FormatInt(reg_type, 10) + "&acct_used_flag=" + acct_used_flag + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&cainfo=" + miConfig.Cainfo + "&mdtrt_grp_type=" + his.MdtrtGrpType + "&verify_number=" + verify_number
30620
+								"&insutype=" + insutype + "&total=" + allTotal + "&med_type=" + strconv.FormatInt(reg_type, 10) + "&acct_used_flag=" + acct_used_flag + "&url=" + miConfig.Url + "&ak=" + miConfig.AccessKey + "&cainfo=" + miConfig.Cainfo + "&mdtrt_grp_type=" + his.MdtrtGrpType + "&verify_number=" + verify_number + "&pack_num=" + strconv.FormatInt(pack_num, 10)+ "&good_pack_num=" + strconv.FormatInt(good_pack_num, 10)
30615 30621
 
30616 30622
 							resp, requestErr := http.Get(api)
30617 30623
 							if requestErr != nil {
@@ -30653,12 +30659,12 @@ func (c *HisApiController) GetUploadInfo() {
30653 30659
 							if his.IdCardType == 4 {
30654 30660
 								psn_info, _ := service.GetPsnByPatientId(his.PatientId)
30655 30661
 								cert_no = psn_info.VerifyNumber
30656
-								result2, src_resquest, _ = service.FJyb2207ForToken(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, tempOrder.FulamtOwnpayAmt, tempOrder.OverlmtSelfPay, tempOrder.PreselfpayAmt, tempOrder.InscpScpAmt, his.IdType, acct_used_flag, miConfig.Url, miConfig.Code, miConfig.AppSecret, miConfig.SignKey, miConfig.EncKey)
30662
+								result2, src_resquest, _ = service.FJyb2207ForToken(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, tempOrder.FulamtOwnpayAmt, tempOrder.OverlmtSelfPay, tempOrder.PreselfpayAmt, tempOrder.InscpScpAmt, his.IdType, acct_used_flag, miConfig.Url, miConfig.Code, miConfig.AppSecret, miConfig.SignKey, miConfig.EncKey,tempOrder.PackNum,tempOrder.GoodPackNum)
30657 30663
 
30658 30664
 							} else if his.IdCardType == 1 {
30659 30665
 								psn_info, _ := service.GetPsnByPatientId(his.PatientId)
30660 30666
 								cert_no = strings.Split(psn_info.CardInfo, "|")[0]
30661
-								result2, src_resquest, _ = service.FJyb2207(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, tempOrder.FulamtOwnpayAmt, tempOrder.OverlmtSelfPay, tempOrder.PreselfpayAmt, tempOrder.InscpScpAmt, his.IdType, acct_used_flag, miConfig.Url, miConfig.Code, miConfig.AppSecret, miConfig.SignKey, miConfig.EncKey)
30667
+								result2, src_resquest, _ = service.FJyb2207(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, tempOrder.FulamtOwnpayAmt, tempOrder.OverlmtSelfPay, tempOrder.PreselfpayAmt, tempOrder.InscpScpAmt, his.IdType, acct_used_flag, miConfig.Url, miConfig.Code, miConfig.AppSecret, miConfig.SignKey, miConfig.EncKey,tempOrder.PackNum,tempOrder.GoodPackNum)
30662 30668
 							}
30663 30669
 
30664 30670
 							//result2, src_resquest = service.Gdyb2207(his.PsnNo, his.Number, chrg_bchno, cert_no, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, strconv.FormatInt(reg_type, 10), his.IdCardType, 0, 0, 0, 0, his.IdType, acct_used_flag)