|
|
|
|
@ -346,31 +346,39 @@ namespace Application
|
|
|
|
|
PadResponse padResponse = new PadResponse();
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
List<WmsBaseLocation> Locationlist = sqlSugarClient.Queryable<WmsBaseLocation>().LeftJoin<WmsPalletInfo>((wbi,wpi) => wbi.ContainerCode == wpi.PalletInfoCode).ToList();
|
|
|
|
|
List<AllLocationInfo> locationInfos = new List<AllLocationInfo>();
|
|
|
|
|
foreach (var location in Locationlist)
|
|
|
|
|
{
|
|
|
|
|
if (location != null)
|
|
|
|
|
{
|
|
|
|
|
WmsPalletInfo wmsPalletInfo = sqlSugarClient.Queryable<WmsPalletInfo>().Where(t => t.PalletInfoCode == location.ContainerCode).First();
|
|
|
|
|
AllLocationInfo locationInfo = new AllLocationInfo();
|
|
|
|
|
locationInfo.LocationCode = location.AgvPositionCode;
|
|
|
|
|
locationInfo.Amount = wmsPalletInfo.Amount;
|
|
|
|
|
locationInfo.LocationStatus = location.LocationStatus;
|
|
|
|
|
locationInfos.Add(locationInfo);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
AllLocationInfo locationInfo = new AllLocationInfo();
|
|
|
|
|
locationInfo.LocationCode = "";
|
|
|
|
|
locationInfo.Amount = 0;
|
|
|
|
|
locationInfo.LocationStatus = 0;
|
|
|
|
|
locationInfos.Add(locationInfo);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
List<WmsBaseLocation> Locationlist = sqlSugarClient.Queryable<WmsBaseLocation>()
|
|
|
|
|
.LeftJoin<WmsPalletInfo>((wbi,wpi) => wbi.ContainerCode == wpi.PalletInfoCode)
|
|
|
|
|
.Select((wbi, wpi) => new WmsBaseLocation
|
|
|
|
|
{
|
|
|
|
|
AgvPositionCode = wbi.AgvPositionCode,
|
|
|
|
|
LocationStatus = wbi.LocationStatus,
|
|
|
|
|
Amount = wpi.Amount,
|
|
|
|
|
|
|
|
|
|
}).ToList();
|
|
|
|
|
//List<AllLocationInfo> locationInfos = new List<AllLocationInfo>();
|
|
|
|
|
//foreach (var location in Locationlist)
|
|
|
|
|
//{
|
|
|
|
|
// if (location != null)
|
|
|
|
|
// {
|
|
|
|
|
// WmsPalletInfo wmsPalletInfo = sqlSugarClient.Queryable<WmsPalletInfo>().Where(t => t.PalletInfoCode == location.ContainerCode).First();
|
|
|
|
|
// AllLocationInfo locationInfo = new AllLocationInfo();
|
|
|
|
|
// locationInfo.LocationCode = location.AgvPositionCode;
|
|
|
|
|
// locationInfo.Amount = wmsPalletInfo.Amount;
|
|
|
|
|
// locationInfo.LocationStatus = location.LocationStatus;
|
|
|
|
|
// locationInfos.Add(locationInfo);
|
|
|
|
|
// }
|
|
|
|
|
// else
|
|
|
|
|
// {
|
|
|
|
|
// AllLocationInfo locationInfo = new AllLocationInfo();
|
|
|
|
|
// locationInfo.LocationCode = "";
|
|
|
|
|
// locationInfo.Amount = 0;
|
|
|
|
|
// locationInfo.LocationStatus = 0;
|
|
|
|
|
// locationInfos.Add(locationInfo);
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
padResponse.code = "200";
|
|
|
|
|
padResponse.message = "成功";
|
|
|
|
|
padResponse.data = locationInfos;
|
|
|
|
|
padResponse.data = Locationlist;
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
|