| | |
| | | LocationType = LocationTypeEnum.Undefined.ObjToInt(), |
| | | RoadwayNo = $"{initializationLocationDTO.Roadway.ToString()}", |
| | | Row = i + 1, |
| | | Depth = depth, |
| | | Depth = 1, |
| | | }; |
| | | locationInfo.LocationCode = $"{locationInfo.RoadwayNo}-{locationInfo.Row.ToString().PadLeft(3, '0')}-{locationInfo.Column.ToString().PadLeft(3, '0')}-{locationInfo.Layer.ToString().PadLeft(3, '0')}-{locationInfo.Depth.ToString().PadLeft(2, '0')}"; |
| | | locationInfo.LocationName = $"{locationInfo.RoadwayNo}å··é{locationInfo.Row.ToString().PadLeft(3, '0')}è¡{locationInfo.Column.ToString().PadLeft(3, '0')}å{locationInfo.Layer.ToString().PadLeft(3, '0')}å±{locationInfo.Depth.ToString().PadLeft(2, '0')}æ·±"; |
| | |
| | | return groupLocations; |
| | | } |
| | | |
| | | public Dt_LocationInfo? GetLocationInfoSC(string v) |
| | | { |
| | | //Dt_LocationInfo dt_Location = BaseDal.QueryFirst(x => x.LocationStatus == (int)LocationStatusEnum.Free&& x.RoadwayNo == v &&x.EnableStatus == (int)EnableStatusEnum.Normal); |
| | | Dt_LocationInfo dt_LocationInfo = BaseDal.Db.Queryable<Dt_LocationInfo>() |
| | | .Where(x => x.LocationStatus == (int)LocationStatusEnum.Free |
| | | && x.RoadwayNo == v |
| | | && x.EnableStatus == (int)EnableStatusEnum.Normal) |
| | | .OrderBy("Layer DESC, CASE WHEN Row = 1 THEN 1 WHEN Row = 4 THEN 2 WHEN Row = 2 THEN 3 ELSE 4 END ASC") |
| | | .First(); |
| | | |
| | | return dt_LocationInfo; |
| | | } |
| | | |
| | | public Dt_LocationInfo? GetLocationInfoSC2(string v) |
| | | { |
| | | Dt_LocationInfo dt_LocationInfo = Db.Queryable<Dt_LocationInfo>() |
| | | .Where(x => x.LocationStatus == (int)LocationStatusEnum.Free |
| | | && x.RoadwayNo == v |
| | | && x.EnableStatus == (int)EnableStatusEnum.Normal) |
| | | .OrderBy("Layer DESC") |
| | | .First();// Layerä»å¤§å°å°æåº |
| | | |
| | | return dt_LocationInfo; |
| | | } |
| | | |
| | | public class LocationCache |
| | | { |