一体化读卡服务
🛖 概述
一个结合普通设备测试、读卡测试、广州市医保读卡、广东省医保读卡、国家医保库扫码、刷脸的程序。
本地端测试工具、WEB服务端读卡程序、加密机读卡程序。
是一个测试程序、是一个服务程序、是一个.NET组件、是一个自动读卡到记事本光标的工具。
支持:T6、T60、T10、D8、Z90、F11、通用身份证阅读器、扫码墩、扫码枪。
🚲 程序介绍
界面如下
左边操作区,右边数据区(数据均自动写入log日志目录)。
点击不同的操作按钮,会进入相对于的操作界面。
🚙 功能介绍
测试设备基本功能
测试设备是否正常连接;这里可以读设备信息,读出设备的版本信息、UID号。也可以读USB ID,读取电脑连接的PID VID,已确认设备是否连接到电脑上。
有几个基本的读卡、扫码按钮。
这里的操作都是本地设备操作、读卡操作,不需要联网。
广州市 医保读卡测试
这里是广州医保库测试使用的,必须有医保网才能用。
详细见
广东省 医保读卡测试
这里是广东省医保库测试使用的,必须有医保网才能用。
详细见
国家医保扫码、刷脸测试
这个是医保码和扫码的测试,也是必须有医保网才能用;
医保码扫码可以用读卡器、扫码墩、扫码枪。
刷脸需要线安装号刷脸设备的驱动程序,并且设备正常联网。
详细见
增值服务
略
其它工具
一些杂七杂八的功能,如读M1卡、CPU卡、医保网检测什么的。
🚋 配置文件 Setting.ini
配置文件由于设置程序的状态以及工作模式,主要注意的是Web服务(Httpserver),以及Reader服务。
[Application]
AllowCloseButton=true
# AllowCloseButton =true ,点关闭,就是关闭程序。
# AllowCloseButton =false ,点关闭,不会关闭程序,只是把程序隐藏起来,只保留右下角图标。
HideWindows=false
[ListBox]
AutoClear=True
AutoLog=True
AutoRock=True
FormatJson=True
MsgboxTips=True
[ServiceSetting]
PublicUrl=http://working.cyber2025.xyz
[HttpServer]
Enable=false
Url=http://127.0.0.1:12580/
#启用WEB服务可以在启动后把程序隐藏起来,HideWindows=true
[Reader]
Enable=false
Type=1
# 读卡输出到光标模式
# 1 读非接触卡序列号
# 2 读身份证号
# 4 P30国家库扫码,带快捷键 Ctrl+shift+R 及 Ctrl + 8
[RemoteLogServer]
Enable=False
IP=192.168.0.188
Port=10086
Package=True
MaxLength=2048
🚎 Web调用
软件的Web调用是基于HTTP POST 的,服务程序运行后会监听URL。
网页、程序对URL进行HTTP POST ,把操作指令发到服务程序,服务程序就会做相应的读卡操作。
第一步
配置文件设置,启动HTTP服务。
[Application]
AllowCloseButton=false
# AllowCloseButton =false ,点关闭,不会关闭程序,只是把程序隐藏起来,只保留右下角图标。
HideWindows=true
。
。
。
[HttpServer]
Enable=true
Url=http://127.0.0.1:12580/
#启用WEB服务可以在启动后把程序隐藏起来,HideWindows=true任何修改配置文件,保存后,都需要重新运行程序,才会生效。
第二步
运行 “运行一体化读卡服务程序.exe”,电脑会有气泡提示,程序已启动、HTTP服务已启动。程序会在任务栏右下角生成一个红钥匙的图标。
需要推出程序,可以在图标上右键,退出。
HTTP POST 命令。
命令在 commands.json 中
{
"获取USB设备ID": {
"commandType": "BasicOption",
"command": "ReadUsbID"
},
"读设备信息": {
"commandType": "BasicOption",
"command": "ReadDeviceInfo",
"port": 100,
"baud": 115200
},
"读社保卡基本信息": {
"commandType": "BasicOption",
"command": "SSCardInfo",
"port": 100,
"baud": 115200
},
"读社保卡持卡人信息": {
"commandType": "BasicOption",
"command": "SSCardHolderInfo",
"port": 100,
"baud": 115200
},
"读身份证": {
"commandType": "BasicOption",
"command": "IDCard",
"sPhotoPath": ".\\photo.bmp",
"port": 100,
"baud": 115200
},
"内置扫码": {
"commandType": "BasicOption",
"command": "InsideQRCode",
"iTimeOut": 30,
"port": 100,
"baud": 115200
},
"外接P30扫码": {
"commandType": "BasicOption",
"command": "OutsideQRCode",
"iTimeOut": 30,
"port": 100,
"baud": 115200
},
"读磁卡": {
"commandType": "BasicOption",
"command": "MagCard",
"iTimeOut": 30,
"port": 100,
"baud": 115200
},
"公网加密机读三代卡": {
"commandType": "BasicOption",
"command": "ReadSSCardByCloudDecoding"
},
"广州市医保库读社保卡": {
"commandType": "GZSSCard",
"command": "ReadCardBasGZ",
"url": "http://phar.gd.hsip.gov.cn/gdyb_api/prd/api/card/initDll",
"user": "H44012345678"
},
"广州市医保库读身份证": {
"commandType": "GZSSCard",
"command": "ReadIDCardGZ",
"url": "http://phar.gd.hsip.gov.cn/gdyb_api/prd/api/card/initDll",
"user": "H44012345678"
},
"广州市医保库内置扫码": {
"commandType": "GZSSCard",
"command": "GetTwoBarCodes",
"url": "http://phar.gd.hsip.gov.cn/gdyb_api/prd/api/card/initDll",
"user": "H44012345678"
},
"广州市医保库外接键盘扫码": {
"commandType": "GZSSCard",
"command": "GetTwoBarCodesByExtP30",
"url": "http://phar.gd.hsip.gov.cn/gdyb_api/prd/api/card/initDll",
"user": "H44012345678"
},
"广州市医保库读磁条医保卡": {
"commandType": "GZSSCard",
"command": "ReadMedicalCardGZ",
"url": "http://phar.gd.hsip.gov.cn/gdyb_api/prd/api/card/initDll",
"user": "H44012345678"
},
"广东省医保库读社保卡": {
"commandType": "GDSSCard",
"command": "ReadCardBas",
"url": "http://hosp.gd.hsip.gov.cn/gdyb_api/prd/api/card/initDll",
"user": "H44012345678"
},
"广东省医保库读身份证": {
"commandType": "GDSSCard",
"command": "ReadSFZ",
"url": "http://hosp.gd.hsip.gov.cn/gdyb_api/prd/api/card/initDll",
"user": "H44012345678"
},
"广东省医保库内置扫码": {
"commandType": "GDSSCard",
"command": "GetQRBase",
"url": "http://hosp.gd.hsip.gov.cn/gdyb_api/prd/api/card/initDll",
"user": "H44012345678"
},
"广东省医保库外接键盘扫码": {
"commandType": "GDSSCard",
"command": "GetQRBaseByExtP30",
"url": "http://hosp.gd.hsip.gov.cn/gdyb_api/prd/api/card/initDll",
"user": "H44012345678"
},
"跨地区库操作(iReadCardBas)": {
"commandType": "SSCardDriver",
"command": "iReadCardBas",
"iType": 3
},
"跨地区库操作(iReadCard)": {
"commandType": "SSCardDriver",
"command": "iReadCard",
"iType": 3,
"iAuthType": 1,
"sCardInfo": "442000D1560000052800000C312CCEEB|T08244609|",
"sFileAddress": "3F00EF05|01|02|03|04|05|06|07|$"
},
"跨地区库操作(iReadCardBas_HSM_Step1)": {
"commandType": "SSCardDriver",
"command": "iReadCardBas_HSM_Step1",
"iType": 3
},
"跨地区库操作(iReadCardBas_HSM_Step2)": {
"commandType": "SSCardDriver",
"command": "iReadCardBas_HSM_Step2",
"sKey": ""
},
"跨地区库操作(iReadCard_HSM_Step1)": {
"commandType": "SSCardDriver",
"command": "iReadCard_HSM_Step1",
"iType": 3,
"iAuthType": 1,
"sCardInfo": "442000D1560000052800000C312CCEEB|T08244609|",
"sFileAddress": "3F00EF05|01|02|03|04|05|06|07|$"
},
"跨地区库操作(iReadCard_HSM_Step2)": {
"commandType": "SSCardDriver",
"command": "iReadCard_HSM_Step2",
"sKey": ""
},
"跨地区库操作(iReadIdentityMsg)": {
"commandType": "SSCardDriver",
"command": "iReadIdentityMsg",
"sPhotoPath": ".\\photo.bmp"
},
"国家医保库操作(NationEcTrans)": {
"commandType": "NationEcTrans",
"command": "NationEcTrans",
"sUrl": "https://igb.hsa.gdgov.cn/prd_nation_eccode/prd_eccode/localcfc/api/hsecfc/localQrCodeQuery",
"sInData": {
"data": {
"businessType": "01101",
"deviceType": "",
"officeId": "32760",
"officeName": "消化内科",
"operatorId": "test001",
"operatorName": "超级管理员",
"orgId": "H44010400081"
},
"orgId": "H44010400081",
"transType": "ec.query"
}
},
"身份证阅读器读身份证": {
"commandType": "SDTApi",
"command": "ReadIDCard",
"iPort": 1001
}
}可以打开测试WEB.html ,加载 commands.json。进行操作。
🚕 Reader模式
这个通过配置文件
[Reader]
Enable=true
Type=1
# 读卡输出到光标模式
# 1 读非接触卡序列号
# 2 读身份证号
# 4 P30国家库扫码,带快捷键 Ctrl+shift+R 及 Ctrl + 8配置后,程序启动后会按照Type类型自动读卡,并输出到光标的位置。
🚚 其它
自动升级功能
程序启动会检测版本,有新版本会自动下载,下次启动时就会提示升级。
下载地址
程序(压缩分段上传)
解压方法:
- 下载全部文件到一个文件夹中。
- 选择001文件,解压即可。