diff --git a/irisMemory/Authority/AuthConfig.cs b/irisMemory/Authority/AuthConfig.cs
index 2893210..c397fc2 100644
--- a/irisMemory/Authority/AuthConfig.cs
+++ b/irisMemory/Authority/AuthConfig.cs
@@ -9,7 +9,9 @@
bool hasOpenDoorAuthority;
bool hasTempDtAuthority;
bool hasWorkAuthority;
+ bool hasPrintTestAuthority;
PrintDt printDt;
+ PrintUrl printUrl;
DoorDt doorDt;
TempDt tempDt;
@@ -65,6 +67,8 @@
}
}
+ public PrintUrl PrintUrl { get => printUrl; set => printUrl = value; }
+
public bool HasTempDtAuthority
{
get
@@ -104,19 +108,24 @@
}
}
+ public bool HasPrintTestAuthority { get => hasPrintTestAuthority; set => hasPrintTestAuthority = value; }
+
public AuthConfig()
{
string doorAu = ConfigHelper.GetAppConfig("doorSystemEnable");
string printAu = ConfigHelper.GetAppConfig("printEnable");
string tempAu = ConfigHelper.GetAppConfig("tempEnable");
string workAu = ConfigHelper.GetAppConfig("workEnable");
+ string printTestAu = ConfigHelper.GetAppConfig("printTestEnable");
HasPrintAuthority = printAu == "true" ? true : false;
HasOpenDoorAuthority = doorAu == "true" ? true : false;
HasTempDtAuthority = tempAu == "true" ? true : false;
HasWorkAuthority = workAu == "true" ? true : false;
+ HasPrintTestAuthority = printTestAu == "true" ? true : false;
PrintDt = new PrintDt();
+ PrintUrl = new PrintUrl();
DoorDt = new DoorDt();
TempDt = new TempDt();
}
@@ -173,6 +182,18 @@
}
}
+ public class PrintUrl
+ {
+ string url;
+
+ public PrintUrl()
+ {
+ Url = ConfigHelper.GetAppConfig("printTestUrl");
+ }
+
+ public string Url { get => url; set => url = value; }
+ }
+
public class DoorDt
{
bool needPermisson;
diff --git a/irisMemory/Authority/AuthConfig.cs b/irisMemory/Authority/AuthConfig.cs
index 2893210..c397fc2 100644
--- a/irisMemory/Authority/AuthConfig.cs
+++ b/irisMemory/Authority/AuthConfig.cs
@@ -9,7 +9,9 @@
bool hasOpenDoorAuthority;
bool hasTempDtAuthority;
bool hasWorkAuthority;
+ bool hasPrintTestAuthority;
PrintDt printDt;
+ PrintUrl printUrl;
DoorDt doorDt;
TempDt tempDt;
@@ -65,6 +67,8 @@
}
}
+ public PrintUrl PrintUrl { get => printUrl; set => printUrl = value; }
+
public bool HasTempDtAuthority
{
get
@@ -104,19 +108,24 @@
}
}
+ public bool HasPrintTestAuthority { get => hasPrintTestAuthority; set => hasPrintTestAuthority = value; }
+
public AuthConfig()
{
string doorAu = ConfigHelper.GetAppConfig("doorSystemEnable");
string printAu = ConfigHelper.GetAppConfig("printEnable");
string tempAu = ConfigHelper.GetAppConfig("tempEnable");
string workAu = ConfigHelper.GetAppConfig("workEnable");
+ string printTestAu = ConfigHelper.GetAppConfig("printTestEnable");
HasPrintAuthority = printAu == "true" ? true : false;
HasOpenDoorAuthority = doorAu == "true" ? true : false;
HasTempDtAuthority = tempAu == "true" ? true : false;
HasWorkAuthority = workAu == "true" ? true : false;
+ HasPrintTestAuthority = printTestAu == "true" ? true : false;
PrintDt = new PrintDt();
+ PrintUrl = new PrintUrl();
DoorDt = new DoorDt();
TempDt = new TempDt();
}
@@ -173,6 +182,18 @@
}
}
+ public class PrintUrl
+ {
+ string url;
+
+ public PrintUrl()
+ {
+ Url = ConfigHelper.GetAppConfig("printTestUrl");
+ }
+
+ public string Url { get => url; set => url = value; }
+ }
+
public class DoorDt
{
bool needPermisson;
diff --git a/irisPrint/Impl/PrintHelper.cs b/irisPrint/Impl/PrintHelper.cs
index 2bc14d5..047f9f6 100644
--- a/irisPrint/Impl/PrintHelper.cs
+++ b/irisPrint/Impl/PrintHelper.cs
@@ -1,7 +1,9 @@
using irisPrint.service;
using System;
+using System.IO;
using System.Net;
using System.Net.Sockets;
+using System.Text;
using System.Threading;
namespace irisPrint.Impl
@@ -18,6 +20,32 @@
SendInfo(printParam);
}
+ public void PrintTest(String iDCardNo, String destUrl)
+ {
+ string url = destUrl + "?userId=" + iDCardNo;
+
+ HttpGet(url);
+ }
+
+ private string HttpGet(string url)
+ {
+ //创建
+ HttpWebRequest httpWebRequest = (HttpWebRequest)HttpWebRequest.Create(url);
+ //设置请求方法
+ httpWebRequest.Method = "GET";
+ //请求超时时间
+ httpWebRequest.Timeout = 20000;
+ //发送请求
+ HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
+ //利用Stream流读取返回数据
+ StreamReader streamReader = new StreamReader(httpWebResponse.GetResponseStream(), Encoding.UTF8);
+ //获得最终数据,一般是json
+ string responseContent = streamReader.ReadToEnd();
+ streamReader.Close();
+ httpWebResponse.Close();
+ return responseContent;
+ }
+
private void SendInfo(PrintParam printParam)
{
diff --git a/irisMemory/Authority/AuthConfig.cs b/irisMemory/Authority/AuthConfig.cs
index 2893210..c397fc2 100644
--- a/irisMemory/Authority/AuthConfig.cs
+++ b/irisMemory/Authority/AuthConfig.cs
@@ -9,7 +9,9 @@
bool hasOpenDoorAuthority;
bool hasTempDtAuthority;
bool hasWorkAuthority;
+ bool hasPrintTestAuthority;
PrintDt printDt;
+ PrintUrl printUrl;
DoorDt doorDt;
TempDt tempDt;
@@ -65,6 +67,8 @@
}
}
+ public PrintUrl PrintUrl { get => printUrl; set => printUrl = value; }
+
public bool HasTempDtAuthority
{
get
@@ -104,19 +108,24 @@
}
}
+ public bool HasPrintTestAuthority { get => hasPrintTestAuthority; set => hasPrintTestAuthority = value; }
+
public AuthConfig()
{
string doorAu = ConfigHelper.GetAppConfig("doorSystemEnable");
string printAu = ConfigHelper.GetAppConfig("printEnable");
string tempAu = ConfigHelper.GetAppConfig("tempEnable");
string workAu = ConfigHelper.GetAppConfig("workEnable");
+ string printTestAu = ConfigHelper.GetAppConfig("printTestEnable");
HasPrintAuthority = printAu == "true" ? true : false;
HasOpenDoorAuthority = doorAu == "true" ? true : false;
HasTempDtAuthority = tempAu == "true" ? true : false;
HasWorkAuthority = workAu == "true" ? true : false;
+ HasPrintTestAuthority = printTestAu == "true" ? true : false;
PrintDt = new PrintDt();
+ PrintUrl = new PrintUrl();
DoorDt = new DoorDt();
TempDt = new TempDt();
}
@@ -173,6 +182,18 @@
}
}
+ public class PrintUrl
+ {
+ string url;
+
+ public PrintUrl()
+ {
+ Url = ConfigHelper.GetAppConfig("printTestUrl");
+ }
+
+ public string Url { get => url; set => url = value; }
+ }
+
public class DoorDt
{
bool needPermisson;
diff --git a/irisPrint/Impl/PrintHelper.cs b/irisPrint/Impl/PrintHelper.cs
index 2bc14d5..047f9f6 100644
--- a/irisPrint/Impl/PrintHelper.cs
+++ b/irisPrint/Impl/PrintHelper.cs
@@ -1,7 +1,9 @@
using irisPrint.service;
using System;
+using System.IO;
using System.Net;
using System.Net.Sockets;
+using System.Text;
using System.Threading;
namespace irisPrint.Impl
@@ -18,6 +20,32 @@
SendInfo(printParam);
}
+ public void PrintTest(String iDCardNo, String destUrl)
+ {
+ string url = destUrl + "?userId=" + iDCardNo;
+
+ HttpGet(url);
+ }
+
+ private string HttpGet(string url)
+ {
+ //创建
+ HttpWebRequest httpWebRequest = (HttpWebRequest)HttpWebRequest.Create(url);
+ //设置请求方法
+ httpWebRequest.Method = "GET";
+ //请求超时时间
+ httpWebRequest.Timeout = 20000;
+ //发送请求
+ HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
+ //利用Stream流读取返回数据
+ StreamReader streamReader = new StreamReader(httpWebResponse.GetResponseStream(), Encoding.UTF8);
+ //获得最终数据,一般是json
+ string responseContent = streamReader.ReadToEnd();
+ streamReader.Close();
+ httpWebResponse.Close();
+ return responseContent;
+ }
+
private void SendInfo(PrintParam printParam)
{
diff --git a/irisPrint/service/PrintInterface.cs b/irisPrint/service/PrintInterface.cs
index 5ba47c2..5e24e8f 100644
--- a/irisPrint/service/PrintInterface.cs
+++ b/irisPrint/service/PrintInterface.cs
@@ -8,5 +8,7 @@
public interface PrintInterface
{
void Print(String iDCardNo, String deviceSN, String destIP, String destPort);
+
+ void PrintTest(String iDCardNo, String destUrl);
}
}
diff --git a/irisMemory/Authority/AuthConfig.cs b/irisMemory/Authority/AuthConfig.cs
index 2893210..c397fc2 100644
--- a/irisMemory/Authority/AuthConfig.cs
+++ b/irisMemory/Authority/AuthConfig.cs
@@ -9,7 +9,9 @@
bool hasOpenDoorAuthority;
bool hasTempDtAuthority;
bool hasWorkAuthority;
+ bool hasPrintTestAuthority;
PrintDt printDt;
+ PrintUrl printUrl;
DoorDt doorDt;
TempDt tempDt;
@@ -65,6 +67,8 @@
}
}
+ public PrintUrl PrintUrl { get => printUrl; set => printUrl = value; }
+
public bool HasTempDtAuthority
{
get
@@ -104,19 +108,24 @@
}
}
+ public bool HasPrintTestAuthority { get => hasPrintTestAuthority; set => hasPrintTestAuthority = value; }
+
public AuthConfig()
{
string doorAu = ConfigHelper.GetAppConfig("doorSystemEnable");
string printAu = ConfigHelper.GetAppConfig("printEnable");
string tempAu = ConfigHelper.GetAppConfig("tempEnable");
string workAu = ConfigHelper.GetAppConfig("workEnable");
+ string printTestAu = ConfigHelper.GetAppConfig("printTestEnable");
HasPrintAuthority = printAu == "true" ? true : false;
HasOpenDoorAuthority = doorAu == "true" ? true : false;
HasTempDtAuthority = tempAu == "true" ? true : false;
HasWorkAuthority = workAu == "true" ? true : false;
+ HasPrintTestAuthority = printTestAu == "true" ? true : false;
PrintDt = new PrintDt();
+ PrintUrl = new PrintUrl();
DoorDt = new DoorDt();
TempDt = new TempDt();
}
@@ -173,6 +182,18 @@
}
}
+ public class PrintUrl
+ {
+ string url;
+
+ public PrintUrl()
+ {
+ Url = ConfigHelper.GetAppConfig("printTestUrl");
+ }
+
+ public string Url { get => url; set => url = value; }
+ }
+
public class DoorDt
{
bool needPermisson;
diff --git a/irisPrint/Impl/PrintHelper.cs b/irisPrint/Impl/PrintHelper.cs
index 2bc14d5..047f9f6 100644
--- a/irisPrint/Impl/PrintHelper.cs
+++ b/irisPrint/Impl/PrintHelper.cs
@@ -1,7 +1,9 @@
using irisPrint.service;
using System;
+using System.IO;
using System.Net;
using System.Net.Sockets;
+using System.Text;
using System.Threading;
namespace irisPrint.Impl
@@ -18,6 +20,32 @@
SendInfo(printParam);
}
+ public void PrintTest(String iDCardNo, String destUrl)
+ {
+ string url = destUrl + "?userId=" + iDCardNo;
+
+ HttpGet(url);
+ }
+
+ private string HttpGet(string url)
+ {
+ //创建
+ HttpWebRequest httpWebRequest = (HttpWebRequest)HttpWebRequest.Create(url);
+ //设置请求方法
+ httpWebRequest.Method = "GET";
+ //请求超时时间
+ httpWebRequest.Timeout = 20000;
+ //发送请求
+ HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
+ //利用Stream流读取返回数据
+ StreamReader streamReader = new StreamReader(httpWebResponse.GetResponseStream(), Encoding.UTF8);
+ //获得最终数据,一般是json
+ string responseContent = streamReader.ReadToEnd();
+ streamReader.Close();
+ httpWebResponse.Close();
+ return responseContent;
+ }
+
private void SendInfo(PrintParam printParam)
{
diff --git a/irisPrint/service/PrintInterface.cs b/irisPrint/service/PrintInterface.cs
index 5ba47c2..5e24e8f 100644
--- a/irisPrint/service/PrintInterface.cs
+++ b/irisPrint/service/PrintInterface.cs
@@ -8,5 +8,7 @@
public interface PrintInterface
{
void Print(String iDCardNo, String deviceSN, String destIP, String destPort);
+
+ void PrintTest(String iDCardNo, String destUrl);
}
}
diff --git a/irisRefactor/App.config b/irisRefactor/App.config
index 111d6ce..2b5f8f1 100644
--- a/irisRefactor/App.config
+++ b/irisRefactor/App.config
@@ -57,6 +57,10 @@
+
+
+
+
diff --git a/irisMemory/Authority/AuthConfig.cs b/irisMemory/Authority/AuthConfig.cs
index 2893210..c397fc2 100644
--- a/irisMemory/Authority/AuthConfig.cs
+++ b/irisMemory/Authority/AuthConfig.cs
@@ -9,7 +9,9 @@
bool hasOpenDoorAuthority;
bool hasTempDtAuthority;
bool hasWorkAuthority;
+ bool hasPrintTestAuthority;
PrintDt printDt;
+ PrintUrl printUrl;
DoorDt doorDt;
TempDt tempDt;
@@ -65,6 +67,8 @@
}
}
+ public PrintUrl PrintUrl { get => printUrl; set => printUrl = value; }
+
public bool HasTempDtAuthority
{
get
@@ -104,19 +108,24 @@
}
}
+ public bool HasPrintTestAuthority { get => hasPrintTestAuthority; set => hasPrintTestAuthority = value; }
+
public AuthConfig()
{
string doorAu = ConfigHelper.GetAppConfig("doorSystemEnable");
string printAu = ConfigHelper.GetAppConfig("printEnable");
string tempAu = ConfigHelper.GetAppConfig("tempEnable");
string workAu = ConfigHelper.GetAppConfig("workEnable");
+ string printTestAu = ConfigHelper.GetAppConfig("printTestEnable");
HasPrintAuthority = printAu == "true" ? true : false;
HasOpenDoorAuthority = doorAu == "true" ? true : false;
HasTempDtAuthority = tempAu == "true" ? true : false;
HasWorkAuthority = workAu == "true" ? true : false;
+ HasPrintTestAuthority = printTestAu == "true" ? true : false;
PrintDt = new PrintDt();
+ PrintUrl = new PrintUrl();
DoorDt = new DoorDt();
TempDt = new TempDt();
}
@@ -173,6 +182,18 @@
}
}
+ public class PrintUrl
+ {
+ string url;
+
+ public PrintUrl()
+ {
+ Url = ConfigHelper.GetAppConfig("printTestUrl");
+ }
+
+ public string Url { get => url; set => url = value; }
+ }
+
public class DoorDt
{
bool needPermisson;
diff --git a/irisPrint/Impl/PrintHelper.cs b/irisPrint/Impl/PrintHelper.cs
index 2bc14d5..047f9f6 100644
--- a/irisPrint/Impl/PrintHelper.cs
+++ b/irisPrint/Impl/PrintHelper.cs
@@ -1,7 +1,9 @@
using irisPrint.service;
using System;
+using System.IO;
using System.Net;
using System.Net.Sockets;
+using System.Text;
using System.Threading;
namespace irisPrint.Impl
@@ -18,6 +20,32 @@
SendInfo(printParam);
}
+ public void PrintTest(String iDCardNo, String destUrl)
+ {
+ string url = destUrl + "?userId=" + iDCardNo;
+
+ HttpGet(url);
+ }
+
+ private string HttpGet(string url)
+ {
+ //创建
+ HttpWebRequest httpWebRequest = (HttpWebRequest)HttpWebRequest.Create(url);
+ //设置请求方法
+ httpWebRequest.Method = "GET";
+ //请求超时时间
+ httpWebRequest.Timeout = 20000;
+ //发送请求
+ HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
+ //利用Stream流读取返回数据
+ StreamReader streamReader = new StreamReader(httpWebResponse.GetResponseStream(), Encoding.UTF8);
+ //获得最终数据,一般是json
+ string responseContent = streamReader.ReadToEnd();
+ streamReader.Close();
+ httpWebResponse.Close();
+ return responseContent;
+ }
+
private void SendInfo(PrintParam printParam)
{
diff --git a/irisPrint/service/PrintInterface.cs b/irisPrint/service/PrintInterface.cs
index 5ba47c2..5e24e8f 100644
--- a/irisPrint/service/PrintInterface.cs
+++ b/irisPrint/service/PrintInterface.cs
@@ -8,5 +8,7 @@
public interface PrintInterface
{
void Print(String iDCardNo, String deviceSN, String destIP, String destPort);
+
+ void PrintTest(String iDCardNo, String destUrl);
}
}
diff --git a/irisRefactor/App.config b/irisRefactor/App.config
index 111d6ce..2b5f8f1 100644
--- a/irisRefactor/App.config
+++ b/irisRefactor/App.config
@@ -57,6 +57,10 @@
+
+
+
+
diff --git a/irisRefactor/FrmService/Form1.cs b/irisRefactor/FrmService/Form1.cs
index 77e5276..bd1b29e 100644
--- a/irisRefactor/FrmService/Form1.cs
+++ b/irisRefactor/FrmService/Form1.cs
@@ -534,7 +534,21 @@
LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, ProMemory.stringBuilder.ToString());
LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "当前测温:"+ProMemory.tempString.ToString());
-
+
+ // 国产打印机测试
+ if (ProMemory.appConfig.AuthConfig.HasPrintTestAuthority)
+ {
+ PrintInterface print = new PrintHelper();
+ string destUrl = ProMemory.appConfig.AuthConfig.PrintUrl.Url;
+ print.PrintTest(idCardNo, destUrl);
+
+ ProMemory.stringBuilder.Clear();
+ ProMemory.stringBuilder.Append("print person:");
+ ProMemory.stringBuilder.Append(name);
+
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, ProMemory.stringBuilder.ToString());
+ }
+
}
catch (Exception e)
{
diff --git a/irisMemory/Authority/AuthConfig.cs b/irisMemory/Authority/AuthConfig.cs
index 2893210..c397fc2 100644
--- a/irisMemory/Authority/AuthConfig.cs
+++ b/irisMemory/Authority/AuthConfig.cs
@@ -9,7 +9,9 @@
bool hasOpenDoorAuthority;
bool hasTempDtAuthority;
bool hasWorkAuthority;
+ bool hasPrintTestAuthority;
PrintDt printDt;
+ PrintUrl printUrl;
DoorDt doorDt;
TempDt tempDt;
@@ -65,6 +67,8 @@
}
}
+ public PrintUrl PrintUrl { get => printUrl; set => printUrl = value; }
+
public bool HasTempDtAuthority
{
get
@@ -104,19 +108,24 @@
}
}
+ public bool HasPrintTestAuthority { get => hasPrintTestAuthority; set => hasPrintTestAuthority = value; }
+
public AuthConfig()
{
string doorAu = ConfigHelper.GetAppConfig("doorSystemEnable");
string printAu = ConfigHelper.GetAppConfig("printEnable");
string tempAu = ConfigHelper.GetAppConfig("tempEnable");
string workAu = ConfigHelper.GetAppConfig("workEnable");
+ string printTestAu = ConfigHelper.GetAppConfig("printTestEnable");
HasPrintAuthority = printAu == "true" ? true : false;
HasOpenDoorAuthority = doorAu == "true" ? true : false;
HasTempDtAuthority = tempAu == "true" ? true : false;
HasWorkAuthority = workAu == "true" ? true : false;
+ HasPrintTestAuthority = printTestAu == "true" ? true : false;
PrintDt = new PrintDt();
+ PrintUrl = new PrintUrl();
DoorDt = new DoorDt();
TempDt = new TempDt();
}
@@ -173,6 +182,18 @@
}
}
+ public class PrintUrl
+ {
+ string url;
+
+ public PrintUrl()
+ {
+ Url = ConfigHelper.GetAppConfig("printTestUrl");
+ }
+
+ public string Url { get => url; set => url = value; }
+ }
+
public class DoorDt
{
bool needPermisson;
diff --git a/irisPrint/Impl/PrintHelper.cs b/irisPrint/Impl/PrintHelper.cs
index 2bc14d5..047f9f6 100644
--- a/irisPrint/Impl/PrintHelper.cs
+++ b/irisPrint/Impl/PrintHelper.cs
@@ -1,7 +1,9 @@
using irisPrint.service;
using System;
+using System.IO;
using System.Net;
using System.Net.Sockets;
+using System.Text;
using System.Threading;
namespace irisPrint.Impl
@@ -18,6 +20,32 @@
SendInfo(printParam);
}
+ public void PrintTest(String iDCardNo, String destUrl)
+ {
+ string url = destUrl + "?userId=" + iDCardNo;
+
+ HttpGet(url);
+ }
+
+ private string HttpGet(string url)
+ {
+ //创建
+ HttpWebRequest httpWebRequest = (HttpWebRequest)HttpWebRequest.Create(url);
+ //设置请求方法
+ httpWebRequest.Method = "GET";
+ //请求超时时间
+ httpWebRequest.Timeout = 20000;
+ //发送请求
+ HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
+ //利用Stream流读取返回数据
+ StreamReader streamReader = new StreamReader(httpWebResponse.GetResponseStream(), Encoding.UTF8);
+ //获得最终数据,一般是json
+ string responseContent = streamReader.ReadToEnd();
+ streamReader.Close();
+ httpWebResponse.Close();
+ return responseContent;
+ }
+
private void SendInfo(PrintParam printParam)
{
diff --git a/irisPrint/service/PrintInterface.cs b/irisPrint/service/PrintInterface.cs
index 5ba47c2..5e24e8f 100644
--- a/irisPrint/service/PrintInterface.cs
+++ b/irisPrint/service/PrintInterface.cs
@@ -8,5 +8,7 @@
public interface PrintInterface
{
void Print(String iDCardNo, String deviceSN, String destIP, String destPort);
+
+ void PrintTest(String iDCardNo, String destUrl);
}
}
diff --git a/irisRefactor/App.config b/irisRefactor/App.config
index 111d6ce..2b5f8f1 100644
--- a/irisRefactor/App.config
+++ b/irisRefactor/App.config
@@ -57,6 +57,10 @@
+
+
+
+
diff --git a/irisRefactor/FrmService/Form1.cs b/irisRefactor/FrmService/Form1.cs
index 77e5276..bd1b29e 100644
--- a/irisRefactor/FrmService/Form1.cs
+++ b/irisRefactor/FrmService/Form1.cs
@@ -534,7 +534,21 @@
LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, ProMemory.stringBuilder.ToString());
LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, "当前测温:"+ProMemory.tempString.ToString());
-
+
+ // 国产打印机测试
+ if (ProMemory.appConfig.AuthConfig.HasPrintTestAuthority)
+ {
+ PrintInterface print = new PrintHelper();
+ string destUrl = ProMemory.appConfig.AuthConfig.PrintUrl.Url;
+ print.PrintTest(idCardNo, destUrl);
+
+ ProMemory.stringBuilder.Clear();
+ ProMemory.stringBuilder.Append("print person:");
+ ProMemory.stringBuilder.Append(name);
+
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, ProMemory.stringBuilder.ToString());
+ }
+
}
catch (Exception e)
{
diff --git a/irisRefactor/FrmService/Form2.cs b/irisRefactor/FrmService/Form2.cs
index 70bf7b2..602e0f8 100644
--- a/irisRefactor/FrmService/Form2.cs
+++ b/irisRefactor/FrmService/Form2.cs
@@ -344,11 +344,23 @@
NoDoorSound();
//考勤
- ProMemory.irisRecordsService.insertRecordsLocal(personId, dtNow, "",
- devCode, doorCode, inoutType);
+ ProMemory.irisRecordsService.insertRecordsLocal(personId, dtNow, "", devCode, doorCode, inoutType);
LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, ProMemory.stringBuilder.ToString());
+ // 国产打印机测试
+ if (ProMemory.appConfig.AuthConfig.HasPrintTestAuthority)
+ {
+ PrintInterface print = new PrintHelper();
+ string destUrl = ProMemory.appConfig.AuthConfig.PrintUrl.Url;
+ print.PrintTest(idCardNo, destUrl);
+
+ ProMemory.stringBuilder.Clear();
+ ProMemory.stringBuilder.Append("print person:");
+ ProMemory.stringBuilder.Append(name);
+
+ LogHelper.WriteInfoLog(MethodBase.GetCurrentMethod().DeclaringType, ProMemory.stringBuilder.ToString());
+ }
}
catch (Exception e)
{