陈勇
2024-11-19 36343b85b0c883ebfdf3c17b173f263fd2bfcb93
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs
@@ -1,4 +1,5 @@
using WIDESEA_DTO;
using WIDESEA_Common;
using WIDESEA_DTO;
namespace WIDESEA_StorageBasicService;
@@ -82,7 +83,26 @@
        }
    }
    public override WebResponseContent UpdateData(SaveModel saveModel)
    {
        int id = saveModel.MainData["id"].ObjToInt();
        int status = saveModel.MainData["locationStatus"].ObjToInt();
        var location = BaseDal.QueryFirst(x => x.Id == id);
        LocationChangeRecordDto changeRecordDto = new LocationChangeRecordDto()
        {
            AfterStatus = status,
            BeforeStatus = location.LocationStatus,
            TaskNum = 0,
            LocationId = id,
            LocationCode = location.LocationCode,
            ChangeType = (int)StatusChangeTypeEnum.ManualOperation
        };
        _locationStatusChangeRecordRepository.AddStatusChangeRecord(changeRecordDto);
        return base.UpdateData(saveModel);
    }
    #region 创建原始货位数据
@@ -115,7 +135,7 @@
                        LocationType = locType,
                        Remark = "",
                        Depth = locType > 1 ? (((line - 1) % 4) + 1) == 2 || (((line - 1) % 4) + 1) == 3 ? 1 : 2 : 1,
                        RoadwayNo = locType > 1 ? $"SC{((line - 1) / 4) + 1}" : $"SC{((line - 1) / 2) + 1}",
                        RoadwayNo = locType > 1 ? $"FRSC{((line - 1) / 4) + 1}" : $"FRSC{((line - 1) / 2) + 1}",
                        LocationStatus = LocationEnum.Free.ObjToInt(),
                        AreaId = areaId,
                        Creater = "systeam",
@@ -225,7 +245,7 @@
                SourceAddress = originalLocationID,
                TaskNum = taskNo,
                TargetAddress = emptyLocation.LocationCode,
                TaskState = InTaskStatusEnum.RelocationNew.ObjToInt(),
                //TaskState = TaskInStatusEnum.RelocationNew.ObjToInt(),
                TaskType = TaskTypeEnum.RelocationIn.ObjToInt(),
            };
@@ -304,8 +324,6 @@
    }
    #endregion 创建初始货位方法
    #endregion 内部方法
}