1
Huangxiaoqiang-03
2024-11-05 f82511343cf2c8ecf3981954e7eb92172d72a905
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService.cs
@@ -168,15 +168,18 @@
            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)
@@ -189,27 +192,12 @@
        {
            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)
        {
@@ -221,10 +209,12 @@
            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);