#2
iswith2024-11-05 23:21
|
这是医保要求用刷脸设备,通过每个人的刷脸后,获取返回数据(获取返回数据后再进行各类业务报销)
我用如下调用不成功,请版主和高手们帮助看看。先感谢!感谢!
vfp调用:(url 是医保一并下发的网址,cjson 是自己组合的 json 串,作为入参)
Url = "http://172.16.33.247/localcfc/api/hsecfc/localQrCodeQuery"
c_json='{"data":[{"businessType":"01203","deviceType":"","officeId":"32760","officeName":"内科",'
c_json=c_json+'"operatorId":"001","operatorName":"郑医生","orgId":"35020319001"}],"orgId":"35020319001","transType":"ec.query"}'
Declare Integer NationEcTrans In NationECCode.dll string,string
?NationEcTrans(@url,@cjson) && 返回的是 1701404 这7个数字,不是想要的数据
***********
有C#调用示例,是医保一并下发的文档内的实例
[DllImport("NationECCode.dll", CallingConvention = CallingConvention.StdCall)]
public static extern void NationEcTrans(string url, string input, IntPtr output);
public static string InOut(string url, string input)
{
IntPtr outPut = System.Runtime.InteropServices.Marshal.AllocHGlobal(2048);
NationEcTrans(url, input, outPut);
string retStr = System.Runtime.InteropServices.Marshal.PtrToStringAnsi(outPut);
System.Runtime.InteropServices.Marshal.FreeHGlobal(outPut);
return retStr;
}
static void Main(string[] args)
{
string toUrl = "http://172.16.33.247/localcfc/api/hsecfc/localQrCodeQuery";
string inPut = "{\"data\":{\"businessType\":\"01203\",\"deviceType\":\"\",\"officeId \":\"32760\",\"officeName\":\"123\",\"operatorId\":\"test001\",\"operatorName\":\"456\",
\"orgId\":\"35020319001\"},\"orgId\":\"35020319001\",\"transType\":\"ec.query\"}";
string outPut= InOut(toUrl, inPut);
Console.WriteLine("出参:"+ outPut);
Console.Read();
}
感谢能回复!!
[此贴子已经被作者于2024-11-5 22:13编辑过]