test_user 2 years ago
parent
commit
eab08892c2
2 changed files with 21 additions and 3 deletions
  1. 19 1
      controllers/sg/his_api_controller.go
  2. 2 2
      controllers/zh/zh_his_api_controller.go

+ 19 - 1
controllers/sg/his_api_controller.go View File

2322
 			fmt.Println("initFlag")
2322
 			fmt.Println("initFlag")
2323
 
2323
 
2324
 			if initFlag == 0 {
2324
 			if initFlag == 0 {
2325
-				c.TestGetJiangXiBasBaseInit()
2325
+				c.TestGetHnBasBaseInit()
2326
 			}
2326
 			}
2327
 			basStr := c.GetBasBaseInfo()
2327
 			basStr := c.GetBasBaseInfo()
2328
 			if len(basStr) == 0 {
2328
 			if len(basStr) == 0 {
3464
 		return
3464
 		return
3465
 	}
3465
 	}
3466
 }
3466
 }
3467
+func (c *HisApiController) TestGetHnBasBaseInit() {
3468
+	DllDef := syscall.MustLoadDLL("SSCard.dll")
3469
+	Iinit := DllDef.MustFindProc("Init")
3470
+	//miConfig, _ := service.FindMedicalInsuranceInfo(c.GetAdminUserInfo().CurrentOrgId)
3471
+	//http://10.77.211.236/CSB/hsa-fsi-1303
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
 func (c *HisApiController) TestGetJiangXiBasBaseInit() {
3486
 func (c *HisApiController) TestGetJiangXiBasBaseInit() {
3469
 	DllDef := syscall.MustLoadDLL("SSCard.dll")
3487
 	DllDef := syscall.MustLoadDLL("SSCard.dll")

+ 2 - 2
controllers/zh/zh_his_api_controller.go View File

2516
 		if record.MedType == 14 {
2516
 		if record.MedType == 14 {
2517
 			if record.InsutypeType == "390" {
2517
 			if record.InsutypeType == "390" {
2518
 
2518
 
2519
-				data["med_type"] = "9933"
2519
+				data["med_type"] = ""
2520
 
2520
 
2521
 			} else if record.InsutypeType == "310" {
2521
 			} else if record.InsutypeType == "310" {
2522
 
2522
 
2523
-				data["med_type"] = "990502"
2523
+				data["med_type"] = ""
2524
 
2524
 
2525
 			}
2525
 			}
2526
 
2526