|
@@ -2322,7 +2322,7 @@ func (c *HisApiController) ReadCard() {
|
2322
|
2322
|
fmt.Println("initFlag")
|
2323
|
2323
|
|
2324
|
2324
|
if initFlag == 0 {
|
2325
|
|
- c.TestGetJiangXiBasBaseInit()
|
|
2325
|
+ c.TestGetHnBasBaseInit()
|
2326
|
2326
|
}
|
2327
|
2327
|
basStr := c.GetBasBaseInfo()
|
2328
|
2328
|
if len(basStr) == 0 {
|
|
@@ -3464,6 +3464,24 @@ func (c *HisApiController) HandleJiangXiReadCard() {
|
3464
|
3464
|
return
|
3465
|
3465
|
}
|
3466
|
3466
|
}
|
|
3467
|
+func (c *HisApiController) TestGetHnBasBaseInit() {
|
|
3468
|
+ DllDef := syscall.MustLoadDLL("SSCard.dll")
|
|
3469
|
+ Iinit := DllDef.MustFindProc("Init")
|
|
3470
|
+
|
|
3471
|
+
|
|
3472
|
+ ret, _, err := Iinit.Call(StrPtr("http://10.93.32.89:20001/hsa-hgs-adapt/api/card/initDll"), StrPtr("430802"))
|
|
3473
|
+ if ret != 0 {
|
|
3474
|
+ fmt.Println("SSCard的报错原因:", err)
|
|
3475
|
+ fmt.Println("SSCard的运算结果为:", ret)
|
|
3476
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeReadCardException)
|
|
3477
|
+ return
|
|
3478
|
+ }
|
|
3479
|
+
|
|
3480
|
+ result := int(ret)
|
|
3481
|
+ fmt.Println("SSCard的运算结果为1:", result)
|
|
3482
|
+ initFlag = 1
|
|
3483
|
+ return
|
|
3484
|
+}
|
3467
|
3485
|
|
3468
|
3486
|
func (c *HisApiController) TestGetJiangXiBasBaseInit() {
|
3469
|
3487
|
DllDef := syscall.MustLoadDLL("SSCard.dll")
|