diff --git a/Application/PdaDto/AllLocationInfo.cs b/Application/PdaDto/AllLocationInfo.cs new file mode 100644 index 0000000..8488b19 --- /dev/null +++ b/Application/PdaDto/AllLocationInfo.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Application.PdaDto +{ + public class AllLocationInfo + { + public string LocationCode { get; set; } = ""; + + public int Amount { get; set; } + + public int LocationStatus { get; set; } + } +} \ No newline at end of file diff --git a/Application/WcsTaskApplication.cs b/Application/WcsTaskApplication.cs index 9cd7c91..88621d6 100644 --- a/Application/WcsTaskApplication.cs +++ b/Application/WcsTaskApplication.cs @@ -347,24 +347,22 @@ namespace Application try { List Locationlist = sqlSugarClient.Queryable().LeftJoin((wbi,wpi) => wbi.ContainerCode == wpi.PalletInfoCode).ToList(); - List locationInfos = new List(); - foreach (WmsBaseLocation location in Locationlist) + List locationInfos = new List(); + foreach (var location in Locationlist) { if (location != null) { WmsPalletInfo wmsPalletInfo = sqlSugarClient.Queryable().Where(t => t.PalletInfoCode == location.ContainerCode).First(); - LocationInfo locationInfo = new LocationInfo(); + AllLocationInfo locationInfo = new AllLocationInfo(); locationInfo.LocationCode = location.AgvPositionCode; - locationInfo.PalletInfoCode = wmsPalletInfo.PalletInfoCode; locationInfo.Amount = wmsPalletInfo.Amount; locationInfo.LocationStatus = location.LocationStatus; locationInfos.Add(locationInfo); } else { - LocationInfo locationInfo = new LocationInfo(); + AllLocationInfo locationInfo = new AllLocationInfo(); locationInfo.LocationCode = ""; - locationInfo.PalletInfoCode = ""; locationInfo.Amount = 0; locationInfo.LocationStatus = 0; locationInfos.Add(locationInfo);