| | |
| | | { |
| | | 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)); |
| | |
| | | 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 |
| | | { |