|
|
|
@ -36,12 +36,12 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
Parame.socket = socket; |
|
|
|
|
socket.OnOpen = () => |
|
|
|
|
{ |
|
|
|
|
string result = "{\"keycode\":\"" + "" + "\",\"message\":\"seccse\",\"code\":\"200\",\"status\":true,\"data\":\"连接成功\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + "" + "\",\"message\":\"seccse\",\"code\":\"200\",\"status\":true,\"data\":\"连接成功\"}"; |
|
|
|
|
socket.Send(result); |
|
|
|
|
}; |
|
|
|
|
socket.OnClose = () => |
|
|
|
|
{ |
|
|
|
|
string result = "{\"keycode\":\"" + "" + "\",\"message\":\"seccse\",\"code\":\"200\",\"status\":true,\"data\":\"连接关闭\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + "" + "\",\"message\":\"seccse\",\"code\":\"200\",\"status\":true,\"data\":\"连接关闭\"}"; |
|
|
|
|
socket.Send(result); |
|
|
|
|
}; |
|
|
|
|
socket.OnMessage = message => |
|
|
|
@ -140,21 +140,21 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
result = openKey(keycode); |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
result = "{\"keycode\":\"" + "" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"无效指令\"}"; |
|
|
|
|
result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + "" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"无效指令\"}"; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
result = "{\"keycode\":\"" + "hert" + "\",\"message\":\"seccse\",\"code\":\"400\",\"status\":true,\"data\":\"参数解析错误\"}"; |
|
|
|
|
result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + "hert" + "\",\"message\":\"seccse\",\"code\":\"400\",\"status\":true,\"data\":\"参数解析错误\"}"; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
catch { result = "{\"keycode\":\"" + "hert" + "\",\"message\":\"seccse\",\"code\":\"400\",\"status\":true,\"data\":\"参数解析错误\"}"; } |
|
|
|
|
catch { result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + "hert" + "\",\"message\":\"seccse\",\"code\":\"400\",\"status\":true,\"data\":\"参数解析错误\"}"; } |
|
|
|
|
finally { } |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
result = "{\"keycode\":\"" + "" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"无效指令\"}"; |
|
|
|
|
result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + "" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"无效指令\"}"; |
|
|
|
|
} |
|
|
|
|
try |
|
|
|
|
{ |
|
|
|
@ -164,18 +164,18 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
//byte[] bytes = SerializeContent(result); |
|
|
|
|
socket.Send(result); |
|
|
|
|
} |
|
|
|
|
catch { result = "{\"keycode\":\"" + "hert" + "\",\"message\":\"seccse\",\"code\":\"400\",\"status\":true,\"data\":\"返回参数失败\"}"; } |
|
|
|
|
catch { result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + "hert" + "\",\"message\":\"seccse\",\"code\":\"400\",\"status\":true,\"data\":\"返回参数失败\"}"; } |
|
|
|
|
finally { } |
|
|
|
|
} |
|
|
|
|
//监听心跳并且回复客户端“已ping作为关键字” |
|
|
|
|
else if (content == "ping") |
|
|
|
|
{ |
|
|
|
|
string result = "{\"keycode\":\"" + "hert" + "\",\"message\":\"seccse\",\"code\":\"200\",\"status\":true,\"data\":\"收到客户端心跳\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + "hert" + "\",\"message\":\"seccse\",\"code\":\"200\",\"status\":true,\"data\":\"收到客户端心跳\"}"; |
|
|
|
|
socket.Send(result); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
string result = "{\"keycode\":\"" + "hert" + "\",\"message\":\"seccse\",\"code\":\"200\",\"status\":true,\"data\":\"收到客户端心跳\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + "hert" + "\",\"message\":\"seccse\",\"code\":\"200\",\"status\":true,\"data\":\"收到客户端心跳\"}"; |
|
|
|
|
socket.Send(result); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
@ -235,17 +235,17 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
string result = IdcardStr; |
|
|
|
|
if (string.IsNullOrEmpty(IdcardStr)) |
|
|
|
|
{ |
|
|
|
|
result = "{\"keycode\":\"" + code + "\",\"message\":\"fali\",\"code\":\"400\",\"status\":false,\"data\":\"" + "读取身份证失败" + "\"}"; |
|
|
|
|
result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"message\":\"fali\",\"code\":\"400\",\"status\":false,\"data\":\"" + "读取身份证失败" + "\"}"; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
if (IdcardStr == "500") |
|
|
|
|
{ |
|
|
|
|
result = "{\"keycode\":\"" + code + "\",\"message\":\"fali\",\"code\":\"400\",\"status\":false,\"data\":\"" + "身份证持有者非本人" + "\"}"; |
|
|
|
|
result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"message\":\"fali\",\"code\":\"400\",\"status\":false,\"data\":\"" + "身份证持有者非本人" + "\"}"; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
result = "{\"keycode\":\"" + code + "\",\"message\":\"seccse\",\"code\":\"200\",\"status\":true,\"data\":" + IdcardStr + "}"; |
|
|
|
|
result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"message\":\"seccse\",\"code\":\"200\",\"status\":true,\"data\":" + IdcardStr + "}"; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
SubmitLogs(result, "IDCardRead"); |
|
|
|
@ -254,7 +254,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
catch (Exception ex) |
|
|
|
|
{ |
|
|
|
|
//Log.Error("读取身份证卡号异常: " + ex.Message + ""); |
|
|
|
|
string result = "{\"keycode\":\"" + code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
SubmitLogs(result, "IDCardRead"); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
@ -282,7 +282,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
{ |
|
|
|
|
if (param == null) |
|
|
|
|
{ |
|
|
|
|
return "{\"keycode\":\"" + "" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "参数解析错误" + "\"}"; |
|
|
|
|
return "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + "" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "参数解析错误" + "\"}"; |
|
|
|
|
} |
|
|
|
|
string ph = param.ph; |
|
|
|
|
string ddrs = param.ddrs; |
|
|
|
@ -292,7 +292,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
if (!isFuncisFuncObject("SendByPrint")) |
|
|
|
|
{ |
|
|
|
|
//Utils.MessagesBox("打印排队票据设备未授权使用"); |
|
|
|
|
return "{\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "打印排队票据设备未授权使用" + "\"}"; |
|
|
|
|
return "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "打印排队票据设备未授权使用" + "\"}"; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
@ -300,13 +300,13 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
var data = print.SendPrint(ph, ddrs, qrcode, ywmc); |
|
|
|
|
if (data == 0) |
|
|
|
|
{ |
|
|
|
|
string result = "{\"keycode\":\"" + param.code + "\",\"message\":\"seccse\",\"code\":\"200\",\"status\":true,\"data\":\"" + "打印成功" + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"seccse\",\"code\":\"200\",\"status\":true,\"data\":\"" + "打印成功" + "\"}"; |
|
|
|
|
SubmitLogs(result, "SendByPrint"); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
string result = "{\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + (data == 1 ? "打印失败" : (data == 2 ? "打印机未连接" : "打印机初始化失败")) + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + (data == 1 ? "打印失败" : (data == 2 ? "打印机未连接" : "打印机初始化失败")) + "\"}"; |
|
|
|
|
SubmitLogs(result, "SendByPrint"); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
@ -315,7 +315,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
catch (Exception ex) |
|
|
|
|
{ |
|
|
|
|
//Log.Error("打印排队票据异常: " + ex.Message + ""); |
|
|
|
|
string result = "{\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
SubmitLogs(result, "SendByPrint"); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
@ -348,14 +348,14 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
{ |
|
|
|
|
if (param == null) |
|
|
|
|
{ |
|
|
|
|
return "{\"keycode\":\"" + "" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "参数解析错误" + "\"}"; |
|
|
|
|
return "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + "" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "参数解析错误" + "\"}"; |
|
|
|
|
} |
|
|
|
|
string text = param.text; |
|
|
|
|
bool ispaye = param.ispaye; |
|
|
|
|
if (!isFuncisFuncObject("payleText")) |
|
|
|
|
{ |
|
|
|
|
//Utils.MessagesBox("文字语音播报设备未授权使用"); |
|
|
|
|
return "{\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "文字语音播报设备未授权使用" + "\"}"; |
|
|
|
|
return "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "文字语音播报设备未授权使用" + "\"}"; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
@ -383,7 +383,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
} |
|
|
|
|
// AutoAudio(false, ""); |
|
|
|
|
}); |
|
|
|
|
string result = "{\"keycode\":\"" + param.code + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"data\":\"" + "停止播放成功" + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"data\":\"" + "停止播放成功" + "\"}"; |
|
|
|
|
SubmitLogs(result, "payleText"); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
@ -394,13 +394,13 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
string result = string.Empty; |
|
|
|
|
if (string.IsNullOrEmpty(ttsStr)) |
|
|
|
|
{ |
|
|
|
|
result = "{\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "播放失败" + "\"}"; |
|
|
|
|
result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "播放失败" + "\"}"; |
|
|
|
|
SubmitLogs(result, "payleText"); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
Task.Run(() => { string command = $"sox {ttsStr} -d"; ShllCommad(command); }); |
|
|
|
|
result = "{\"keycode\":\"" + param.code + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"data\":\"" + "开始播放" + "\"}"; |
|
|
|
|
result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"data\":\"" + "开始播放" + "\"}"; |
|
|
|
|
} |
|
|
|
|
SubmitLogs(result, "payleText"); |
|
|
|
|
return result; |
|
|
|
@ -410,7 +410,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
catch (Exception ex) |
|
|
|
|
{ |
|
|
|
|
//Log.Error("文字语音播报异常2: " + ex.Message + ""); |
|
|
|
|
string result = "{\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
SubmitLogs(result, "payleText"); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
@ -434,7 +434,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
{ |
|
|
|
|
//关闭 |
|
|
|
|
//StopSn("0"); |
|
|
|
|
string result = "{\"keycode\":\"" + code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"suffix\":\"jpg\",\"data\":\"" + "获取图片失败" + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"suffix\":\"jpg\",\"data\":\"" + "获取图片失败" + "\"}"; |
|
|
|
|
SubmitLogs(result, "openCamera"); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
@ -442,7 +442,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
{ |
|
|
|
|
//关闭 |
|
|
|
|
//StopSn("0"); |
|
|
|
|
string result = "{\"keycode\":\"" + code + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"suffix\":\"jpg\",\"data\":\"" + param + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"suffix\":\"jpg\",\"data\":\"" + param + "\"}"; |
|
|
|
|
SubmitLogs(result, "openCamera"); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
@ -453,7 +453,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
string param = OpenSn("0"); |
|
|
|
|
if (string.IsNullOrEmpty(param)) |
|
|
|
|
{ |
|
|
|
|
string result = "{\"keycode\":\"" + code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"suffix\":\"jpg\",\"data\":\"" + "扫描仪打开失败" + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"suffix\":\"jpg\",\"data\":\"" + "扫描仪打开失败" + "\"}"; |
|
|
|
|
SubmitLogs(result, "openCamera"); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
@ -467,7 +467,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
{ |
|
|
|
|
//关闭 |
|
|
|
|
//StopSn("0"); |
|
|
|
|
string result = "{\"keycode\":\"" + code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"suffix\":\"jpg\",\"data\":\"" + "获取图片失败" + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"suffix\":\"jpg\",\"data\":\"" + "获取图片失败" + "\"}"; |
|
|
|
|
SubmitLogs(result, "openCamera"); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
@ -475,7 +475,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
{ |
|
|
|
|
//关闭 |
|
|
|
|
//StopSn("0"); |
|
|
|
|
string result = "{\"keycode\":\"" + code + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"suffix\":\"jpg\",\"data\":\"" + param + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"suffix\":\"jpg\",\"data\":\"" + param + "\"}"; |
|
|
|
|
SubmitLogs(result, "openCamera"); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
@ -488,7 +488,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
catch (Exception ex) |
|
|
|
|
{ |
|
|
|
|
//Log.Error("打开高拍仪并且进行快速扫描文件异常: " + ex.Message + ""); |
|
|
|
|
string result = "{\"keycode\":\"" + code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
SubmitLogs(result, "openCamera"); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
@ -509,12 +509,12 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
{ |
|
|
|
|
if (param == null) |
|
|
|
|
{ |
|
|
|
|
return "{\"keycode\":\"" + "" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "参数解析错误" + "\"}"; |
|
|
|
|
return "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + "" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "参数解析错误" + "\"}"; |
|
|
|
|
} |
|
|
|
|
if (!isFuncisFuncObject("OpenSign")) |
|
|
|
|
{ |
|
|
|
|
//Utils.MessagesBox("签字版设备未授权使用"); |
|
|
|
|
return "{\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "签字版设备未授权使用" + "\"}"; |
|
|
|
|
return "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "签字版设备未授权使用" + "\"}"; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
@ -528,7 +528,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
catch (Exception ex) |
|
|
|
|
{ |
|
|
|
|
//Log.Error("打开签字版异常: " + ex.Message + ""); |
|
|
|
|
string result = "{\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
SubmitLogs(result, "OpenSign"); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
@ -546,12 +546,12 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
if (!isFuncisFuncObject("OpenSign")) |
|
|
|
|
{ |
|
|
|
|
//Utils.MessagesBox("签字版设备未授权使用"); |
|
|
|
|
return "{\"keycode\":\"" + code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "签字版设备未授权使用" + "\"}"; |
|
|
|
|
return "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "签字版设备未授权使用" + "\"}"; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
Task.Run(() => HttpPostResponseBySign("close", 2, "")); |
|
|
|
|
string result = "{\"keycode\":\"" + code + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"suffix\":\"jpg\",\"data\":\"" + "签字版已关闭" + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"suffix\":\"jpg\",\"data\":\"" + "签字版已关闭" + "\"}"; |
|
|
|
|
SubmitLogs(result, "openCamera"); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
@ -559,7 +559,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
catch (Exception ex) |
|
|
|
|
{ |
|
|
|
|
//Log.Error("关闭签字版异常: " + ex.Message + ""); |
|
|
|
|
string result = "{\"keycode\":\"" + code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
SubmitLogs(result, "OpenSign"); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
@ -581,12 +581,12 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
{ |
|
|
|
|
if (param == null) |
|
|
|
|
{ |
|
|
|
|
return "{\"keycode\":\"" + "" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "参数解析错误" + "\"}"; |
|
|
|
|
return "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + "" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "参数解析错误" + "\"}"; |
|
|
|
|
} |
|
|
|
|
if (!isFuncisFuncObject("ReadFingerData")) |
|
|
|
|
{ |
|
|
|
|
//Utils.MessagesBox("指纹设备未授权使用"); |
|
|
|
|
return "{\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "指纹设备未授权使用" + "\"}"; |
|
|
|
|
return "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "指纹设备未授权使用" + "\"}"; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
@ -597,12 +597,12 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
string result = string.Empty; |
|
|
|
|
if (string.IsNullOrEmpty(fingerStr)) |
|
|
|
|
{ |
|
|
|
|
result = "{\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "关闭失败" + "\"}"; |
|
|
|
|
result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "关闭失败" + "\"}"; |
|
|
|
|
SubmitLogs(result, "ReadFingerData"); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
result = "{\"keycode\":\"" + param.code + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"data\":\"" + "关闭成功" + "\"}"; |
|
|
|
|
result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"data\":\"" + "关闭成功" + "\"}"; |
|
|
|
|
} |
|
|
|
|
SubmitLogs(result, "ReadFingerData"); |
|
|
|
|
return result; |
|
|
|
@ -615,12 +615,12 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
Log.Info("指纹数据" + fingerStr); |
|
|
|
|
if (string.IsNullOrEmpty(fingerStr)) |
|
|
|
|
{ |
|
|
|
|
result = "{\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "读取失败" + "\"}"; |
|
|
|
|
result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "读取失败" + "\"}"; |
|
|
|
|
SubmitLogs(result, "ReadFingerData"); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
result = "{\"keycode\":\"" + param.code + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"suffix\":\"jpg\",\"data\":\"" + fingerStr + "\"}"; |
|
|
|
|
result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"suffix\":\"jpg\",\"data\":\"" + fingerStr + "\"}"; |
|
|
|
|
} |
|
|
|
|
SubmitLogs(result, "ReadFingerData"); |
|
|
|
|
return result; |
|
|
|
@ -630,7 +630,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
catch (Exception ex) |
|
|
|
|
{ |
|
|
|
|
//Log.Error("指纹异常: " + ex.Message + ""); |
|
|
|
|
string result = "{\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
SubmitLogs(result, "ReadFingerData"); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
@ -657,14 +657,14 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
{ |
|
|
|
|
if (param == null) |
|
|
|
|
{ |
|
|
|
|
return "{\"keycode\":\"" + "" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "参数解析错误" + "\"}"; |
|
|
|
|
return "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + "" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "参数解析错误" + "\"}"; |
|
|
|
|
} |
|
|
|
|
bool isopen = param.isopen; |
|
|
|
|
string url = param.url; |
|
|
|
|
if (!isFuncisFuncObject("SoundRecording")) |
|
|
|
|
{ |
|
|
|
|
Utils.MessagesBox("录音设备未授权使用"); |
|
|
|
|
return "{\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "录音设备未授权使用" + "\"}"; |
|
|
|
|
return "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "录音设备未授权使用" + "\"}"; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
@ -682,13 +682,13 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
MatchCollection mc = re.Matches(url);//获取的是一个数组 |
|
|
|
|
string reurl = mc[0].ToString() + "://" + mc[1].ToString() + urlpath; |
|
|
|
|
|
|
|
|
|
string result = "{\"keycode\":\"" + param.code + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"suffix\":\"wav\",\"data\":\"" + reurl + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"suffix\":\"wav\",\"data\":\"" + reurl + "\"}"; |
|
|
|
|
SubmitLogs(result, "SoundRecording"); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
string result = "{\"keycode\":\"" + param.code + "\",\"message\":\"fali\",\"code\":\"400\",\"status\":false,\"suffix\":\"wav\",\"data\":\"" + "结束录音失败" + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"fali\",\"code\":\"400\",\"status\":false,\"suffix\":\"wav\",\"data\":\"" + "结束录音失败" + "\"}"; |
|
|
|
|
SubmitLogs(result, "SoundRecording"); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
@ -697,13 +697,13 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
{ |
|
|
|
|
if (StartRecording()) |
|
|
|
|
{ |
|
|
|
|
string result = "{\"keycode\":\"" + param.code + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"suffix\":\"wav\",\"data\":\"" + "开始录音" + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"suffix\":\"wav\",\"data\":\"" + "开始录音" + "\"}"; |
|
|
|
|
SubmitLogs(result, "SoundRecording"); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
string result = "{\"keycode\":\"" + param.code + "\",\"message\":\"fali\",\"code\":\"400\",\"status\":false,\"suffix\":\"wav\",\"data\":\"" + "录音失败" + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"fali\",\"code\":\"400\",\"status\":false,\"suffix\":\"wav\",\"data\":\"" + "录音失败" + "\"}"; |
|
|
|
|
SubmitLogs(result, "SoundRecording"); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
@ -713,14 +713,14 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
if (StopRecording()) |
|
|
|
|
{ |
|
|
|
|
srpath = string.Empty; |
|
|
|
|
string result = "{\"keycode\":\"" + param.code + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"suffix\":\"wav\",\"data\":\"" + "取消录音" + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"suffix\":\"wav\",\"data\":\"" + "取消录音" + "\"}"; |
|
|
|
|
SubmitLogs(result, "SoundRecording"); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
srpath = string.Empty; |
|
|
|
|
string result = "{\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"suffix\":\"wav\",\"data\":\"" + "取消录音失败" + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"suffix\":\"wav\",\"data\":\"" + "取消录音失败" + "\"}"; |
|
|
|
|
SubmitLogs(result, "SoundRecording"); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
@ -731,7 +731,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
catch (Exception ex) |
|
|
|
|
{ |
|
|
|
|
//Log.Error("开始录音、取消录音、结束录音异常: " + ex.Message + ""); |
|
|
|
|
string result = "{\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
SubmitLogs(result, "SoundRecording"); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
@ -754,14 +754,14 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
{ |
|
|
|
|
if (param == null) |
|
|
|
|
{ |
|
|
|
|
return "{\"keycode\":\"" + "" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "参数解析错误" + "\"}"; |
|
|
|
|
return "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + "" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "参数解析错误" + "\"}"; |
|
|
|
|
} |
|
|
|
|
string url = param.url; |
|
|
|
|
string ext = param.ext; |
|
|
|
|
if (!isFuncisFuncObject("PrintFile")) |
|
|
|
|
{ |
|
|
|
|
//Utils.MessagesBox("打印机设备未授权使用"); |
|
|
|
|
return "{\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "打印机设备未授权使用" + "\"}"; |
|
|
|
|
return "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "打印机设备未授权使用" + "\"}"; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
@ -791,7 +791,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
string command = $"lp -d {PrinterName} {path}"; |
|
|
|
|
ShllCommad(command); |
|
|
|
|
}); |
|
|
|
|
string result = "{\"keycode\":\"" + param.code + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"data\":\"" + "打印成功" + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"data\":\"" + "打印成功" + "\"}"; |
|
|
|
|
SubmitLogs(result, "PrintFile"); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
@ -799,7 +799,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
catch (Exception ex) |
|
|
|
|
{ |
|
|
|
|
//Log.Error("根据文件地址在线打印异常: " + ex.Message + ""); |
|
|
|
|
string result = "{\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
SubmitLogs(result, "PrintFile"); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
@ -825,12 +825,12 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
{ |
|
|
|
|
if (param == null) |
|
|
|
|
{ |
|
|
|
|
return "{\"keycode\":\"" + "" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "参数解析错误" + "\"}"; |
|
|
|
|
return "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + "" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "参数解析错误" + "\"}"; |
|
|
|
|
} |
|
|
|
|
if (!isFuncisFuncObject("PrintBase64")) |
|
|
|
|
{ |
|
|
|
|
//Utils.MessagesBox("打印机设备未授权使用"); |
|
|
|
|
return "{\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "打印机设备未授权使用" + "\"}"; |
|
|
|
|
return "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "打印机设备未授权使用" + "\"}"; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
@ -855,14 +855,14 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
string command = $"lp -d {PrinterName} {path}"; |
|
|
|
|
ShllCommad(command); |
|
|
|
|
}); |
|
|
|
|
string result = "{\"keycode\":\"" + param.code + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"data\":\"" + "打印成功" + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"data\":\"" + "打印成功" + "\"}"; |
|
|
|
|
SubmitLogs(result, "PrintBase64"); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
catch (Exception ex) |
|
|
|
|
{ |
|
|
|
|
string result = "{\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
SubmitLogs(result, "PrintBase64"); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
@ -886,14 +886,14 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
{ |
|
|
|
|
if (param == null) |
|
|
|
|
{ |
|
|
|
|
return "{\"keycode\":\"" + "" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "参数解析错误" + "\"}"; |
|
|
|
|
return "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + "" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "参数解析错误" + "\"}"; |
|
|
|
|
} |
|
|
|
|
string url = param.url; |
|
|
|
|
bool ispaly = param.ispaye; |
|
|
|
|
if (!isFuncisFuncObject("PalyFile")) |
|
|
|
|
{ |
|
|
|
|
//Utils.MessagesBox("音频设备未授权使用"); |
|
|
|
|
return "{\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "音频设备未授权使用" + "\"}"; |
|
|
|
|
return "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "音频设备未授权使用" + "\"}"; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
@ -914,7 +914,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
} |
|
|
|
|
//AutoAudio(ispaly, ""); |
|
|
|
|
}); |
|
|
|
|
string result = "{\"keycode\":\"" + param.code + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"data\":\"" + "停止播放成功" + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"data\":\"" + "停止播放成功" + "\"}"; |
|
|
|
|
SubmitLogs(result, "PalyFile"); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
@ -967,7 +967,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
ShllCommad(command); |
|
|
|
|
//AutoAudio(ispaly, path); |
|
|
|
|
}); |
|
|
|
|
string result = "{\"keycode\":\"" + param.code + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"data\":\"" + "开始播放" + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"data\":\"" + "开始播放" + "\"}"; |
|
|
|
|
SubmitLogs(result, "PalyFile"); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
@ -975,7 +975,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
} |
|
|
|
|
catch (Exception ex) |
|
|
|
|
{ |
|
|
|
|
string result = "{\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"keycode\":\"" + param.code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
SubmitLogs(result, "PalyFile"); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
@ -994,12 +994,12 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
{ |
|
|
|
|
Bash("/usr/bin/python3 /usr/bin/onboard"); |
|
|
|
|
}); |
|
|
|
|
return "{\"keycode\":\"" + code + "\",\"message\":\"seccse\",\"code\":\"200\",\"status\":true,\"data\":\"" + "唤醒键盘成功" + "\"}"; |
|
|
|
|
return "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"message\":\"seccse\",\"code\":\"200\",\"status\":true,\"data\":\"" + "唤醒键盘成功" + "\"}"; |
|
|
|
|
} |
|
|
|
|
catch (Exception ex) |
|
|
|
|
{ |
|
|
|
|
//Log.Error("唤醒键盘异常: " + ex.Message + ""); |
|
|
|
|
return "{\"keycode\":\"" + code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
return "{\"timestamp\":\"" + Utils.GetTimestamp()+ "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|