2024-07-27 01:44:19 +00:00
|
|
|
|
using DeviceRepair.Utils;
|
|
|
|
|
using TsSFCDevice.Client.Biz.Base.Service;
|
2024-07-22 07:50:10 +00:00
|
|
|
|
|
|
|
|
|
namespace TsSFCDevice.Client.Biz.Base.Utils
|
|
|
|
|
{
|
|
|
|
|
public class Utility
|
|
|
|
|
{
|
2024-07-27 01:44:19 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// 默认的WebService超时时间(默认5分钟)
|
|
|
|
|
/// </summary>
|
|
|
|
|
public const int DEFAULT_SERVICE_TIMEOUT = 300000;
|
|
|
|
|
|
|
|
|
|
#region WebServiceSOAP验证头用户信息
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// WebServiceSOAP验证头用户
|
|
|
|
|
/// </summary>
|
|
|
|
|
private const string SOPHeadUserName = "TECHSCAN_Myl";
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// WebServiceSOAP验证头用户密码
|
|
|
|
|
/// </summary>
|
|
|
|
|
private const string SOPHeadUserPass = "^____^#####*****^____^";
|
|
|
|
|
#endregion
|
|
|
|
|
|
2024-07-22 07:50:10 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取当前WebService服务对象
|
|
|
|
|
/// </summary>
|
|
|
|
|
private static TsSFCMainSvc @m_DevMainService;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取当前WebService服务对象
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static TsSFCMainSvc @SfcBizService
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
if (@m_DevMainService == null)
|
|
|
|
|
{
|
|
|
|
|
@m_DevMainService = new TsSFCMainSvc(
|
2024-07-27 01:44:19 +00:00
|
|
|
|
SOPHeadUserName,
|
|
|
|
|
SOPHeadUserPass,
|
|
|
|
|
"",
|
|
|
|
|
$"http://{DeviceRepair.Utils.Config.Configurations.Properties.ServiceIP}/{DeviceRepair.Utils.Config.Configurations.Properties.ServiceName}/MainService.asmx");
|
2024-07-22 07:50:10 +00:00
|
|
|
|
}
|
|
|
|
|
return @m_DevMainService;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-07-27 01:44:19 +00:00
|
|
|
|
private static SysRuntimeInfo m_SystemRuntimeInfo;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 当前系统运行时信息对象
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static SysRuntimeInfo SystemRuntimeInfo
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
if (m_SystemRuntimeInfo == null)
|
|
|
|
|
{
|
|
|
|
|
m_SystemRuntimeInfo = new SysRuntimeInfo()
|
|
|
|
|
{
|
|
|
|
|
ComputerName = ComputerHelper.GetComputerName
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
return m_SystemRuntimeInfo;
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
m_SystemRuntimeInfo = value;
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-07-22 07:50:10 +00:00
|
|
|
|
}
|
|
|
|
|
}
|