dengjunjie
2024-10-30 810fe2bcf1888eacd926f3caa604f033483d20c9
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/LocationInfoService.cs
@@ -41,7 +41,34 @@
        {
            return base.DeleteData(keys);
        }
        /// <summary>
        /// ä¿®æ”¹è´§ä½çš„禁用状态
        /// </summary>
        /// <param name="saveModel"></param>
        /// <returns></returns>
        public WebResponseContent UpdateEnableStatus(SaveModel saveModel)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                List<Dt_LocationInfo> locationInfos = Repository.QueryData(x => saveModel.DelKeys.Contains(x.Id));
                var values = Enum.GetValues(typeof(EnableStatusEnum));
                var Index = saveModel.Extra.ObjToInt();
                var EnableStatus = (EnableStatusEnum)values.GetValue(Index);
                locationInfos.ForEach(x =>
                {
                    x.EnableStatus = EnableStatus.ObjToInt();
                });
                Repository.UpdateData(locationInfos);
                content.OK();
            }
            catch (Exception ex)
            {
                content.Error(ex.Message);
            }
            return content;
        }
        public WebResponseContent LocationEnableStatus(int[] keys)
        {
            List<Dt_LocationInfo> locationInfos = Repository.QueryData(x => keys.Contains(x.Id));
@@ -101,13 +128,15 @@
                                LocationType = LocationTypeEnum.Cube.ObjToInt(),
                                RoadwayNo = initializationLocationDTO.Roadway,
                                Row = i + 1,
                                MaxQty = i == 1 ? 24 : 12,
                                CurrentQty = 0,
                            };
                            if (initializationLocationDTO.IsSingleDepth)
                            {
                                locationInfo.Depth = 1;
                                locationInfo.LocationCode = $"R{initializationLocationDTO.Roadway.ToString().PadLeft(2, '0')}-{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 = $"R{initializationLocationDTO.Roadway.ToString().PadLeft(2, '0')}巷道{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.LocationCode = $"{locationInfo.Row.ToString().PadLeft(3, '0')}-{locationInfo.Column.ToString().PadLeft(3, '0')}-{locationInfo.Layer.ToString().PadLeft(3, '0')}";
                                locationInfo.LocationName = $"{locationInfo.Row.ToString().PadLeft(3, '0')}行{locationInfo.Column.ToString().PadLeft(3, '0')}列{locationInfo.Layer.ToString().PadLeft(3, '0')}层";
                            }
                            else
                            {