|
@@ -38,7 +38,7 @@ import (
|
38
|
38
|
"syscall"
|
39
|
39
|
"time"
|
40
|
40
|
"unsafe"
|
41
|
|
-
|
|
41
|
+ "github.com/go-ole/go-ole"
|
42
|
42
|
"github.com/go-ole/go-ole/oleutil"
|
43
|
43
|
)
|
44
|
44
|
|
|
@@ -192,7 +192,7 @@ func HisManagerApiRegistRouters() {
|
192
|
192
|
|
193
|
193
|
}
|
194
|
194
|
func (c *HisApiController) FJ3501AND3502() {
|
195
|
|
- ids := c.getString("ids")
|
|
195
|
+ ids := c.GetString("ids")
|
196
|
196
|
admin_user_id, _ := c.GetInt64("admin_user_id")
|
197
|
197
|
roles, _ := service.GetAdminUserInfoByID(c.GetAdminUserInfo().CurrentOrgId, admin_user_id)
|
198
|
198
|
|
|
@@ -202,6 +202,7 @@ func (c *HisApiController) FJ3501AND3502() {
|
202
|
202
|
//库盘
|
203
|
203
|
for _, drug := range drugs {
|
204
|
204
|
if drug.IsPc == 0 && drug.IsBg == 0 {
|
|
205
|
+ number := strconv.FormatInt(time.Now().Unix(), 10) + "-" + strconv.FormatInt(drug.ID, 10) + "-" + "3501"
|
205
|
206
|
var struct3501 models.Struct3501
|
206
|
207
|
struct3501.OrgName = miConfig.OrgName
|
207
|
208
|
struct3501.AccessKey = miConfig.AccessKey
|
|
@@ -217,17 +218,22 @@ func (c *HisApiController) FJ3501AND3502() {
|
217
|
218
|
struct3501.FixmedinsHilistId = miConfig.Code
|
218
|
219
|
struct3501.FixmedinsHilistName = miConfig.OrgName
|
219
|
220
|
struct3501.RxFlag = "0"
|
220
|
|
- struct3501.Invdate = time.Unix(drug.Ctime, 0).Format("2006-01-02 15:04:05")
|
|
221
|
+ struct3501.Invdate = time.Unix(drug.Ctime, 0).Format("2006-01-02")
|
|
222
|
+ struct3501.ManuDate = time.Unix(drug.ProductDate, 0).Format("2006-01-02")
|
|
223
|
+
|
221
|
224
|
struct3501.MdtrtareaAdmvs = miConfig.MdtrtareaAdmvs
|
222
|
225
|
struct3501.InsuplcAdmdvs = miConfig.InsuplcAdmdvs
|
223
|
226
|
struct3501.InvCnt = strconv.FormatInt(drug.StockMaxNumber, 10)
|
224
|
|
- struct3501.ExpyEnd = time.Unix(drug.ExpiryDate, 0).Format("2006-01-02 15:04:05")
|
225
|
|
- struct3501.FixmedinsBchno = strconv.FormatInt(time.Now().Unix(), 10) + "-" + strconv.FormatInt(drug.ID, 10) + "-" + "3501"
|
|
227
|
+ struct3501.ExpyEnd = time.Unix(drug.ExpiryDate, 0).Format("2006-01-02")
|
|
228
|
+ struct3501.FixmedinsBchno = number
|
226
|
229
|
memo := make(map[string]interface{})
|
227
|
230
|
memo["pric"] = drug.Price
|
228
|
231
|
bytesData, _ := json.Marshal(memo)
|
229
|
232
|
struct3501.Memo = string(bytesData)
|
230
|
233
|
result1, result2, result3 := service.FJyb3501(struct3501)
|
|
234
|
+ saveLog(result1, result2, "3501", "3501")
|
|
235
|
+ //saveLog(result, requestLog, "2201", "挂号")
|
|
236
|
+
|
231
|
237
|
fmt.Println(result1)
|
232
|
238
|
fmt.Println(result2)
|
233
|
239
|
fmt.Println(result3)
|
|
@@ -240,6 +246,7 @@ func (c *HisApiController) FJ3501AND3502() {
|
240
|
246
|
struct3502.RxFlag = "0"
|
241
|
247
|
struct3502.InvChgTime = time.Now().Format("2006-01-02")
|
242
|
248
|
struct3502.OrgName = miConfig.OrgName
|
|
249
|
+ struct3501.Opter = roles.UserName
|
243
|
250
|
struct3502.AccessKey = miConfig.AccessKey
|
244
|
251
|
struct3502.RequestUrl = miConfig.Url
|
245
|
252
|
struct3502.SecretKey = miConfig.SecretKey
|
|
@@ -255,13 +262,15 @@ func (c *HisApiController) FJ3501AND3502() {
|
255
|
262
|
|
256
|
263
|
struct3502.Memo = ""
|
257
|
264
|
struct3502.InvChgType = "108"
|
258
|
|
- struct3501.FixmedinsBchno = strconv.FormatInt(time.Now().Unix(), 10) + "-" + strconv.FormatInt(drug.ID, 10) + "-" + "3502"
|
|
265
|
+ struct3502.FixmedinsBchno = number
|
259
|
266
|
struct3502.Cnt = strconv.FormatInt(drug.WarehousingCount, 10)
|
260
|
267
|
struct3502.Pric = fmt.Sprintf("%.2f", drug.BaseDrugLib.RetailPrice)
|
261
|
268
|
result11, result22, result33 := service.FJyb3502(struct3502)
|
262
|
269
|
fmt.Println(result11)
|
263
|
270
|
fmt.Println(result22)
|
264
|
271
|
fmt.Println(result33)
|
|
272
|
+ saveLog(result11, result22, "3502", "3502")
|
|
273
|
+
|
265
|
274
|
|
266
|
275
|
}
|
267
|
276
|
//变更
|
|
@@ -271,6 +280,7 @@ func (c *HisApiController) FJ3501AND3502() {
|
271
|
280
|
struct3502.FixmedinsHilistId = miConfig.Code
|
272
|
281
|
struct3502.FixmedinsHilistName = miConfig.OrgName
|
273
|
282
|
struct3502.FixmedinsCode = miConfig.Code
|
|
283
|
+ struct3502.Opter = roles.UserName
|
274
|
284
|
struct3502.RxFlag = "0"
|
275
|
285
|
struct3502.InvChgTime = time.Unix(drug.Ctime, 0).Format("2006-01-02 15:04:05")
|
276
|
286
|
struct3502.OrgName = miConfig.OrgName
|
|
@@ -288,10 +298,11 @@ func (c *HisApiController) FJ3501AND3502() {
|
288
|
298
|
struct3502.SignKey = miConfig.SignKey
|
289
|
299
|
struct3502.SecretKey = miConfig.SecretKey
|
290
|
300
|
|
291
|
|
- struct3502.FixmedinsBchno = ""
|
|
301
|
+ struct3502.FixmedinsBchno = drug.Bchno
|
292
|
302
|
struct3502.Cnt = strconv.FormatInt(drug.WarehousingCount, 10)
|
293
|
303
|
struct3502.Pric = fmt.Sprintf("%.2f", drug.BaseDrugLib.RetailPrice)
|
294
|
304
|
result1, result2, result3 := service.FJyb3502(struct3502)
|
|
305
|
+ saveLog(result1, result2, "3502", "3502")
|
295
|
306
|
fmt.Println(result1)
|
296
|
307
|
fmt.Println(result2)
|
297
|
308
|
fmt.Println(result3)
|
|
@@ -299,7 +310,7 @@ func (c *HisApiController) FJ3501AND3502() {
|
299
|
310
|
}
|
300
|
311
|
}
|
301
|
312
|
func (c *HisApiController) DeletePCandBG() {
|
302
|
|
- ids := c.getString("ids")
|
|
313
|
+ ids := c.GetString("ids")
|
303
|
314
|
id_arr := strings.Split(ids, ",")
|
304
|
315
|
admin_user_id, _ := c.GetInt64("admin_user_id")
|
305
|
316
|
roles, _ := service.GetAdminUserInfoByID(c.GetAdminUserInfo().CurrentOrgId, admin_user_id)
|
|
@@ -371,7 +382,7 @@ func (c *HisApiController) DeletePCandBG() {
|
371
|
382
|
}
|
372
|
383
|
|
373
|
384
|
func (c *HisApiController) DeleteXSandBG() {
|
374
|
|
- ids := c.getString("ids")
|
|
385
|
+ ids := c.GetString("ids")
|
375
|
386
|
id_arr := strings.Split(ids, ",")
|
376
|
387
|
admin_user_id, _ := c.GetInt64("admin_user_id")
|
377
|
388
|
roles, _ := service.GetAdminUserInfoByID(c.GetAdminUserInfo().CurrentOrgId, admin_user_id)
|
|
@@ -440,7 +451,7 @@ func (c *HisApiController) DeleteXSandBG() {
|
440
|
451
|
}
|
441
|
452
|
|
442
|
453
|
func (c *HisApiController) ChangeDrug() {
|
443
|
|
- ids := c.getString("ids")
|
|
454
|
+ ids := c.GetString("ids")
|
444
|
455
|
id_arr := strings.Split(ids, ",")
|
445
|
456
|
flows, _ := service.GetNewDrugFlowInfo(id_arr)
|
446
|
457
|
admin_user_id, _ := c.GetInt64("admin_user_id")
|