1.新类型

master
zhangxy 5 months ago
parent 3e0d06d4ff
commit 41d39dfbf7

@ -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; }
}
}

@ -347,24 +347,22 @@ namespace Application
try try
{ {
List<WmsBaseLocation> Locationlist = sqlSugarClient.Queryable<WmsBaseLocation>().LeftJoin<WmsPalletInfo>((wbi,wpi) => wbi.ContainerCode == wpi.PalletInfoCode).ToList(); List<WmsBaseLocation> Locationlist = sqlSugarClient.Queryable<WmsBaseLocation>().LeftJoin<WmsPalletInfo>((wbi,wpi) => wbi.ContainerCode == wpi.PalletInfoCode).ToList();
List<LocationInfo> locationInfos = new List<LocationInfo>(); List<AllLocationInfo> locationInfos = new List<AllLocationInfo>();
foreach (WmsBaseLocation location in Locationlist) foreach (var location in Locationlist)
{ {
if (location != null) if (location != null)
{ {
WmsPalletInfo wmsPalletInfo = sqlSugarClient.Queryable<WmsPalletInfo>().Where(t => t.PalletInfoCode == location.ContainerCode).First(); WmsPalletInfo wmsPalletInfo = sqlSugarClient.Queryable<WmsPalletInfo>().Where(t => t.PalletInfoCode == location.ContainerCode).First();
LocationInfo locationInfo = new LocationInfo(); AllLocationInfo locationInfo = new AllLocationInfo();
locationInfo.LocationCode = location.AgvPositionCode; locationInfo.LocationCode = location.AgvPositionCode;
locationInfo.PalletInfoCode = wmsPalletInfo.PalletInfoCode;
locationInfo.Amount = wmsPalletInfo.Amount; locationInfo.Amount = wmsPalletInfo.Amount;
locationInfo.LocationStatus = location.LocationStatus; locationInfo.LocationStatus = location.LocationStatus;
locationInfos.Add(locationInfo); locationInfos.Add(locationInfo);
} }
else else
{ {
LocationInfo locationInfo = new LocationInfo(); AllLocationInfo locationInfo = new AllLocationInfo();
locationInfo.LocationCode = ""; locationInfo.LocationCode = "";
locationInfo.PalletInfoCode = "";
locationInfo.Amount = 0; locationInfo.Amount = 0;
locationInfo.LocationStatus = 0; locationInfo.LocationStatus = 0;
locationInfos.Add(locationInfo); locationInfos.Add(locationInfo);

Loading…
Cancel
Save