| | |
| | | |
| | | public DateTime DateTime { get; set; } |
| | | } |
| | | |
| | | |
| | | |
| | | public WebResponseContent GetArea() |
| | | { |
| | | // WarehouseIdåç»ï¼ç¶åæ¯RoadwayNo |
| | | var result = BaseDal.QueryData() |
| | | .GroupBy(x => x.WarehouseId) |
| | | .Select(g => new { |
| | | WarehouseId = g.Key, |
| | | RoadwayNo = g.Select(x => x.RoadwayNo).Distinct().ToList() |
| | | }) |
| | | .ToList(); |
| | | return WebResponseContent.Instance.OK("æå", result); |
| | | } |
| | | |
| | | public WebResponseContent GetLocationStatus(int WarehouseId, string RoadwayNo) |
| | | { |
| | | // æ ¼å¼{å±,{è¿ä¸å±çåæ°æ®}} |
| | | var locations = BaseDal.QueryData(x => x.WarehouseId == WarehouseId && x.RoadwayNo == RoadwayNo) |
| | | .Select(x => new |
| | | { |
| | | x.RoadwayNo, |
| | | x.WarehouseId, |
| | | x.Row, |
| | | x.Column, |
| | | x.Layer, |
| | | x.Depth, |
| | | x.LocationType, |
| | | x.LocationStatus, |
| | | x.EnableStatus |
| | | }) |
| | | .ToList(); |
| | | |
| | | // å¦ææ²¡ææ¾å°æ°æ®ï¼è¿å空å表è䏿¯null |
| | | if (locations == null || !locations.Any()) |
| | | { |
| | | return WebResponseContent.Instance.OK("æªæ¾å°å¯¹åºå··éçè´§ä½æ°æ®", new List<object>()); |
| | | } |
| | | |
| | | // ä¿®æ¹ä¸ºå±ä¸é¢æ¾ææåçä¿¡æ¯ |
| | | var result = locations |
| | | .GroupBy(x => x.Layer) // æå±åç» |
| | | .Select(layerGroup => new |
| | | { |
| | | layer = layerGroup.Key, |
| | | columns = layerGroup.GroupBy(x => x.Column) // æ¯å±ä¸æååç» |
| | | .Select(columnGroup => new |
| | | { |
| | | column = columnGroup.Key, |
| | | depths = columnGroup.Select(d => new |
| | | { |
| | | row = d.Row, |
| | | depth = d.Depth, |
| | | locationType = d.LocationType, |
| | | locationStatus = d.LocationStatus, |
| | | enableStatus = d.EnableStatus |
| | | }).ToList() |
| | | }).ToList() |
| | | }).ToList(); |
| | | |
| | | return WebResponseContent.Instance.OK("æå", result); |
| | | } |
| | | } |
| | | } |