DeviceManager/TsSFCDeivceClient/Biz/CommonApi.cs

44 lines
1.3 KiB
C#
Raw Normal View History

2024-07-17 02:32:45 +00:00
using DeviceRepair.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TsSFCDeivceClient.Biz
{
public class CommonApi
{
private static CommonApi manager;
public static CommonApi Instance { get { if (manager == null) { manager = new CommonApi(); } return manager; } }
public APIResponseData GetTheEquipmentInMaintenance(string EquipmentCode)
{
APIResponseData apiResponseData = new APIResponseData() { Code = -1, Message = "接口调用失败!" };
try
{
return HttpHelper.Instance.Get($"{RunConfig.config.ServiceApiUrl}{DeviceApiUrlConstValue.GetTheEquipmentInMaintenance}{EquipmentCode}");
}
catch (Exception ex)
{
throw;
}
}
public APIResponseData GetTsSFCUserAuths(Guid userGuid)
{
APIResponseData apiResponseData = new APIResponseData() { Code = -1, Message = "接口调用失败!" };
try
{
return HttpHelper.Instance.Get($"{RunConfig.config.ServiceApiUrl}{DeviceApiUrlConstValue.GetTsSFCUserAuths}{userGuid}");
}
catch (Exception ex)
{
throw;
}
}
}
}