1.获取全部机台信息

master
zhangxy 5 months ago
parent d7e8792dcd
commit 7e15b73a95

@ -12,5 +12,7 @@ namespace Application.PdaDto
public string PalletInfoCode { get; set; } = "";
public int Amount { get; set; }
public int LocationStatus { get; set; }
}
}

@ -346,10 +346,33 @@ namespace Application
PadResponse padResponse = new PadResponse();
try
{
List<WmsBaseLocation> list = sqlSugarClient.Queryable<WmsBaseLocation>().Where(x => !string.IsNullOrEmpty(x.AgvPositionCode)).ToList();
List<WmsBaseLocation> Locationlist = sqlSugarClient.Queryable<WmsBaseLocation>().Where(x => !string.IsNullOrEmpty(x.AgvPositionCode)).ToList();
List<LocationInfo> locationInfos = new List<LocationInfo>();
foreach (WmsBaseLocation location in Locationlist)
{
if (location != null)
{
WmsPalletInfo wmsPalletInfo = sqlSugarClient.Queryable<WmsPalletInfo>().Where(t => t.PalletInfoCode == location.ContainerCode).First();
LocationInfo locationInfo = new LocationInfo();
locationInfo.LocationCode = location.AgvPositionCode;
locationInfo.PalletInfoCode = wmsPalletInfo.PalletInfoCode;
locationInfo.Amount = wmsPalletInfo.Amount;
locationInfo.LocationStatus = location.LocationStatus;
locationInfos.Add(locationInfo);
}
else
{
LocationInfo locationInfo = new LocationInfo();
locationInfo.LocationCode = "";
locationInfo.PalletInfoCode = "";
locationInfo.Amount = 0;
locationInfo.LocationStatus = 0;
locationInfos.Add(locationInfo);
}
}
padResponse.code = "200";
padResponse.message = "成功";
padResponse.data = list;
padResponse.data = locationInfos;
}
catch (Exception ex)
{

Loading…
Cancel
Save