| | |
| | | try |
| | | { |
| | | Dt_LocationInfo result = isDepth(locations); |
| | | if (result != null) |
| | | if (!black) |
| | | { |
| | | int beforeStatusEnd = result.LocationStatus; |
| | | if (result != null) |
| | | { |
| | | int beforeStatusEnd = result.LocationStatus; |
| | | |
| | | result.LocationStatus = LocationStatusEnum.Free.ObjToInt(); |
| | | result.LocationStatus = LocationStatusEnum.Free.ObjToInt(); |
| | | |
| | | BaseDal.UpdateData(result); |
| | | BaseDal.UpdateData(result); |
| | | |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(result, beforeStatusEnd, changType, "", TaskNum); |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(result, beforeStatusEnd, changType, "", TaskNum); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | { |
| | | if (locationInfo.Depth == 2) |
| | | { |
| | | if (locationInfo.Row == 1 || locationInfo.Row == 5) |
| | | { |
| | | Dt_LocationInfo dt_LocationInfo = BaseDal.QueryFirst(x => x.Row == locationInfo.Row + 1 && x.Layer == locationInfo.Layer && x.Column == locationInfo.Column && x.RoadwayNo == locationInfo.RoadwayNo); |
| | | |
| | | if (dt_LocationInfo != null) |
| | | { |
| | | return dt_LocationInfo; |
| | | } |
| | | |
| | | } |
| | | else if (locationInfo.Row == 4 || locationInfo.Row == 8) |
| | | { |
| | | Dt_LocationInfo dt_LocationInfo = BaseDal.QueryFirst(x => x.Row == locationInfo.Row + 1 && x.Layer == locationInfo.Layer && x.Column == locationInfo.Column && x.RoadwayNo == locationInfo.RoadwayNo); |
| | | |
| | | if (dt_LocationInfo != null) |
| | | { |
| | | return dt_LocationInfo; |
| | | } |
| | | } |
| | | return AdjacentDepthLocation(locationInfo.LocationCode); |
| | | } |
| | | return null; |
| | | else |
| | | { |
| | | return null; |
| | | } |
| | | } |
| | | public void RelocationLock(Dt_LocationInfo locationInfo, Dt_LocationInfo locationInfos, int TaskNum) |
| | | { |
| | |
| | | if (beforeStartStatus == LocationStatusEnum.Pallet.ObjToInt()) |
| | | { |
| | | locationInfos.LocationStatus = LocationStatusEnum.PalletLock.ObjToInt(); |
| | | locationInfo.LocationStatus = LocationStatusEnum.PalletLock.ObjToInt(); |
| | | } |
| | | else |
| | | { |
| | | locationInfos.LocationStatus = LocationStatusEnum.Lock.ObjToInt(); |
| | | locationInfo.LocationStatus = LocationStatusEnum.Lock.ObjToInt(); |
| | | } |
| | | |
| | | BaseDal.UpdateData(locationInfo); |