2023-04-28 12:21:24 +08:00

28 lines
838 B
C#

using Foresight.Fleet.Services.Inspection.Package;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IronIntel.Contractor
{
public class InspectionManager
{
public static byte[] GetInspectionPackage(string sessionid, string custid, string pkgid, out string name)
{
var client = FleetServiceClientHelper.CreateClient<InspectPackageProvider>();
client.SessionID = sessionid;
byte[] buffer = client._GetPackageContent(custid, pkgid);
if (buffer != null)
{
var pkg = InspectPackage.FromBuffer(buffer);
name = pkg.PackageName + ".ins";
return buffer;
}
name = "";
return null;
}
}
}