|
|
|
@ -232,7 +232,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
public static string IDCardRead(string content) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try |
|
|
|
|
{ |
|
|
|
|
var param = content.ConvertToAnonymousType(new |
|
|
|
@ -268,7 +268,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
catch (Exception ex) |
|
|
|
|
{ |
|
|
|
|
//Log.Error("读取身份证卡号异常: " + ex.Message + ""); |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" +""+ "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + "" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
SubmitLogs(result, "IDCardRead"); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
@ -329,7 +329,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
catch (Exception ex) |
|
|
|
|
{ |
|
|
|
|
//Log.Error("打印排队票据异常: " + ex.Message + ""); |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" +"" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + "" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
SubmitLogs(result, "SendByPrint"); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
@ -369,25 +369,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
{ |
|
|
|
|
Task.Run(() => |
|
|
|
|
{ |
|
|
|
|
try |
|
|
|
|
{ |
|
|
|
|
if (Typrocess != null) |
|
|
|
|
{ |
|
|
|
|
// 如果进程还在运行 |
|
|
|
|
if (!Typrocess.HasExited) |
|
|
|
|
{ |
|
|
|
|
// 发送SIGTERM信号来停止进程 |
|
|
|
|
Typrocess.Kill(); |
|
|
|
|
// 等待进程真正停止 |
|
|
|
|
Typrocess.WaitForExit(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
catch (Exception ex) |
|
|
|
|
{ |
|
|
|
|
//Log.Error("停止失败: " + ex.Message + ""); |
|
|
|
|
} |
|
|
|
|
// AutoAudio(false, ""); |
|
|
|
|
Task.Run(() => { string command = $"pkill sox"; ShllCommad(command); }); |
|
|
|
|
}); |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + param.code + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"data\":\"" + "停止播放成功" + "\"}"; |
|
|
|
|
SubmitLogs(result, "payleText"); |
|
|
|
@ -414,12 +396,15 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
Task.Run(() => { string command = $"sox {ttsStr} -d"; ShllCommad(command); }); |
|
|
|
|
string filename = Path.GetFileName(ttsStr); |
|
|
|
|
Log.Info(filename); |
|
|
|
|
string source_file = dirpath + $"/{filename}"; |
|
|
|
|
Log.Info(source_file); |
|
|
|
|
string command = $"cp {ttsStr} -t {dirpath} && mv {source_file} {tempFile}"; |
|
|
|
|
ShllCommad(command); |
|
|
|
|
if (!string.IsNullOrEmpty(ywid)) |
|
|
|
|
{ |
|
|
|
|
string filename = Path.GetFileName(ttsStr); |
|
|
|
|
Log.Info(filename); |
|
|
|
|
string source_file = dirpath + $"/{filename}"; |
|
|
|
|
Log.Info(source_file); |
|
|
|
|
string command = $"cp {ttsStr} -t {dirpath} && mv {source_file} {tempFile}"; |
|
|
|
|
ShllCommad(command); |
|
|
|
|
} |
|
|
|
|
result = "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + param.code + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"data\":\"" + "开始播放" + "\"}"; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -437,7 +422,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
catch (Exception ex) |
|
|
|
|
{ |
|
|
|
|
//Log.Error("文字语音播报异常2: " + ex.Message + ""); |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" +"" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + "" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
SubmitLogs(result, "payleText"); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
@ -492,7 +477,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
catch (Exception ex) |
|
|
|
|
{ |
|
|
|
|
//Log.Error("文字语音播报异常2: " + ex.Message + ""); |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + ""+ "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + "" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -521,6 +506,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
param = Utils.ImagesByRotate(param, 90); |
|
|
|
|
//关闭 |
|
|
|
|
//StopSn("0"); |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + code + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"suffix\":\"jpg\",\"data\":\"" + param + "\"}"; |
|
|
|
@ -531,7 +517,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
//打开高拍仪 |
|
|
|
|
string param = OpenSn("0"); |
|
|
|
|
string param = OpenSn(Parame.gpydevIndex); |
|
|
|
|
if (string.IsNullOrEmpty(param)) |
|
|
|
|
{ |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + code + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"suffix\":\"jpg\",\"data\":\"" + "扫描仪打开失败" + "\"}"; |
|
|
|
@ -554,6 +540,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
string base64 = Utils.ImagesByRotate(param, 90); |
|
|
|
|
//关闭 |
|
|
|
|
//StopSn("0"); |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + code + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"suffix\":\"jpg\",\"data\":\"" + param + "\"}"; |
|
|
|
@ -582,7 +569,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
public static string OpenSign(string content) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try |
|
|
|
|
{ |
|
|
|
|
var param = content.ConvertToAnonymousType(new |
|
|
|
@ -615,7 +602,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
catch (Exception ex) |
|
|
|
|
{ |
|
|
|
|
//Log.Error("打开签字版异常: " + ex.Message + ""); |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + ""+ "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + "" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
SubmitLogs(result, "OpenSign"); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
@ -637,7 +624,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
Task.Run(() => HttpPostResponseBySign("close", 2, "",5)); |
|
|
|
|
Task.Run(() => HttpPostResponseBySign("close", 2, "", 5)); |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"suffix\":\"jpg\",\"data\":\"" + "签字版已关闭" + "\"}"; |
|
|
|
|
SubmitLogs(result, "openCamera"); |
|
|
|
|
return result; |
|
|
|
@ -832,7 +819,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
public static string PrintFile(string content) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try |
|
|
|
|
{ |
|
|
|
|
var param = content.ConvertToAnonymousType(new |
|
|
|
@ -965,7 +952,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
public static string PalyFile(string content) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try |
|
|
|
|
{ |
|
|
|
|
var param = content.ConvertToAnonymousType(new |
|
|
|
@ -991,18 +978,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
{ |
|
|
|
|
Task.Run(() => |
|
|
|
|
{ |
|
|
|
|
if (Typrocess != null) |
|
|
|
|
{ |
|
|
|
|
// 如果进程还在运行 |
|
|
|
|
if (!Typrocess.HasExited) |
|
|
|
|
{ |
|
|
|
|
// 发送SIGTERM信号来停止进程 |
|
|
|
|
Typrocess.Kill(); |
|
|
|
|
// 等待进程真正停止 |
|
|
|
|
Typrocess.WaitForExit(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//AutoAudio(ispaly, ""); |
|
|
|
|
Task.Run(() => { string command = $"pkill sox"; ShllCommad(command); }); |
|
|
|
|
}); |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + param.code + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"data\":\"" + "停止播放成功" + "\"}"; |
|
|
|
|
SubmitLogs(result, "PalyFile"); |
|
|
|
@ -1014,18 +990,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
{ |
|
|
|
|
Task.Run(() => |
|
|
|
|
{ |
|
|
|
|
if (Typrocess != null) |
|
|
|
|
{ |
|
|
|
|
// 如果进程还在运行 |
|
|
|
|
if (!Typrocess.HasExited) |
|
|
|
|
{ |
|
|
|
|
// 发送SIGTERM信号来停止进程 |
|
|
|
|
Typrocess.Kill(); |
|
|
|
|
// 等待进程真正停止 |
|
|
|
|
Typrocess.WaitForExit(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//AutoAudio(ispaly, ""); |
|
|
|
|
Task.Run(() => { string command = $"pkill sox"; ShllCommad(command); }); |
|
|
|
|
}); |
|
|
|
|
Uri uri = new Uri(url); |
|
|
|
|
//返回 123.xlsx |
|
|
|
@ -1155,10 +1120,13 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
string name = string.Empty; |
|
|
|
|
foreach (JObject jo2 in jo1) |
|
|
|
|
{ |
|
|
|
|
devidx = jo2["dev_idx"].ToString(); |
|
|
|
|
name = jo2["name"].ToString(); |
|
|
|
|
// // Log.Info(name); |
|
|
|
|
break; |
|
|
|
|
if (name.Contains(Parame.gpyVersion)) |
|
|
|
|
{ |
|
|
|
|
devidx = jo2["dev_idx"].ToString(); |
|
|
|
|
Parame.gpydevIndex = devidx; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return devidx; |
|
|
|
|
} |
|
|
|
@ -1380,7 +1348,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 签字版 |
|
|
|
|
/// </summary> |
|
|
|
|
private static async void HttpPostResponseBySign(string type, int typeCode, string code,int timeout) |
|
|
|
|
private static async void HttpPostResponseBySign(string type, int typeCode, string code, int timeout) |
|
|
|
|
{ |
|
|
|
|
try |
|
|
|
|
{ |
|
|
|
@ -1419,7 +1387,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 指紋 |
|
|
|
|
/// </summary> |
|
|
|
|
private static async void HttpPostResponseByFinger(string type, int typeCode,int timeout) |
|
|
|
|
private static async void HttpPostResponseByFinger(string type, int typeCode, int timeout) |
|
|
|
|
{ |
|
|
|
|
try |
|
|
|
|
{ |
|
|
|
|