52 lines
1.7 KiB
C#
52 lines
1.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Documents;
|
|
using WCS.Model;
|
|
using WCS.Model.ApiModel.Home;
|
|
using WCS.Model.ApiModel.LocationInfo;
|
|
using 智慧物流软件系统.Api;
|
|
|
|
namespace 智慧物流软件系统.Tool
|
|
{
|
|
public static class GetBaseData
|
|
{
|
|
public static List<ShelfTypeModel> GetShelfType()
|
|
{
|
|
var body = new RequestBase()
|
|
{
|
|
UserName = LocalStatic.CurrentUser,
|
|
DeviceType = LocalFile.Config.DeviceType,
|
|
};
|
|
|
|
var Result = ApiHelp.GetDataFromHttp<PageQueryResponse<ShelfTypeModel>>(LocalFile.Config.ApiIpHost + "home/getShelfTypes", body, "POST");
|
|
if (Result != null && Result.Data != null && Result.Data.Lists.Count() > 0)
|
|
{
|
|
return Result.Data.Lists;
|
|
}
|
|
else { return new List<ShelfTypeModel>(); }
|
|
}
|
|
|
|
public static List<LocationAreaInfoModel> GetLocationAreaInfos()
|
|
{
|
|
var body = new RequestBase()
|
|
{
|
|
UserName = LocalStatic.CurrentUser,
|
|
DeviceType = LocalFile.Config.DeviceType,
|
|
};
|
|
|
|
var Result = ApiHelp.GetDataFromHttp<PageQueryResponse<LocationAreaInfoModel>>(LocalFile.Config.ApiIpHost + "locationInfo/getLocationAreas", body, "POST");
|
|
if (Result != null && Result.Data != null && Result.Data.Lists.Count() > 0)
|
|
{
|
|
return Result.Data.Lists;
|
|
}
|
|
else
|
|
{
|
|
return new List<LocationAreaInfoModel>();
|
|
}
|
|
}
|
|
}
|
|
}
|