Beispiel #1
0
        public void SubmitBatch(string warehouseId)
        {
            if (!repository.IsUsingForStorageLocation(warehouseId))
            {
                throw new Exception("货架中有库位正在使用中,不能创建库位列表");
            }

            if (GetList(warehouseId)?.Count() > 0)
            {
                throw new Exception("库位已经存在,不能重新创建!");
            }

            List <StorageLocationEntity> list = new List <StorageLocationEntity>();

            var shelftEntity = warehouseApp.FindEntity(warehouseId);
            var preEnCode    = warehouseApp.GetStorageLocationPreEncode(warehouseId);

            for (int i = 1; i <= shelftEntity.F_ShelfLayer; i++)
            {
                for (int n = 1; n <= shelftEntity.F_ShelfNumber; n++)
                {
                    StorageLocationEntity entity = new StorageLocationEntity();
                    entity.Create();
                    entity.F_Status       = 0;
                    entity.F_EnabledMark  = true;
                    entity.F_EnCode       = preEnCode + i.ToString("00") + n.ToString("00");
                    entity.F_LayerNumber  = i;
                    entity.F_SortCode     = n;
                    entity.F_LocationType = 1;//拣货
                    entity.F_Warehouse    = warehouseId;
                    list.Add(entity);
                }
            }
            repository.SubmitBatch(list);
        }
Beispiel #2
0
 public Warehouse GetForm(int keyValue)
 {
     return(service.FindEntity(keyValue));
 }
Beispiel #3
0
 public WarehouseEntity GetForm(string keyValue)
 {
     return(repository.FindEntity(keyValue));
 }