| | |
| | | Dt_LocationInfo newLocation; |
| | | //æ¥èµ°è´§ä½ï¼è¿è¡çæç§»åºä»»å¡ |
| | | int Locationtype = 9; //é»è®¤ä¸º9 |
| | | if (locationInfos.LocationType== (int)LocationStatusEnum.InStock) |
| | | if (dt_StockInfo.MaterialType == (int)InventoryMaterialType.æå) |
| | | { |
| | | Locationtype = 11; |
| | | } |
| | | else if (dt_StockInfo.MaterialType == (int)InventoryMaterialType.åææ) |
| | | { |
| | | Locationtype = 10; |
| | | } |
| | | newLocation = _basicService.LocationInfoService.GetLocation(locationInfos.RoadwayNo,Locationtype); //æ¿å°äºç§»åºåçè´§ä½ |
| | | if (newLocation != null) |
| | |
| | | Creater = "WMS", |
| | | CreateDate = DateTime.Now, |
| | | TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)), |
| | | MaterialType = dt_StockInfo.MaterialType |
| | | }; |
| | | _unitOfWorkManage.BeginTran(); |
| | | if (locationInfos.LocationStatus == LocationStatusEnum.InStock.ObjToInt()) |
| | |
| | | { |
| | | RoadwayNo = "2"; |
| | | } |
| | | Dt_LocationInfo locationInfos = _basicService.LocationInfoService.Repository.QueryFirst(x => x.RoadwayNo == RoadwayNo && x.LocationStatus == LocationStatusEnum.Pallet.ObjToInt()); |
| | | Dt_LocationInfo locationInfos = _basicService.LocationInfoService.Repository.QueryFirst(x => x.RoadwayNo == RoadwayNo && x.EnableStatus != (int)EnableStatusEnum.Disable && x.Depth==1 && x.LocationStatus == LocationStatusEnum.Pallet.ObjToInt()); |
| | | if(locationInfos == null) |
| | | { |
| | | locationInfos = _basicService.LocationInfoService.Repository.QueryFirst(x => x.RoadwayNo == RoadwayNo && x.Depth == 2 && x.EnableStatus != (int)EnableStatusEnum.Disable && x.LocationStatus == LocationStatusEnum.Pallet.ObjToInt()); |
| | | } |
| | | |
| | | if (locationInfos != null) |
| | | { |
| | | Dt_StockInfo dt_StockInfo = _stockService.StockInfoService.Repository.QueryFirst(x => x.LocationCode == locationInfos.LocationCode); |
| | |
| | | Depth = locationInfos.Depth, |
| | | CreateDate = DateTime.Now, |
| | | PalletCodequantity = (int)dt_StockInfo.Materialweight, |
| | | MaterialType = dt_StockInfo.MaterialType |
| | | }; |
| | | |
| | | _unitOfWorkManage.BeginTran(); |
| | |
| | | CreateDate = DateTime.Now, |
| | | PalletCodequantity = (int)dt_StockInfo[i].Materialweight, |
| | | PLCTo = generate.TargetAddress == "R01-002-041-011-01" ? 1 : 2, |
| | | MaterialType = dt_StockInfo[i].MaterialType |
| | | }; |
| | | |
| | | _unitOfWorkManage.BeginTran(); |
| | |
| | | Creater = "WMS", |
| | | Depth = locationinfo.Depth, |
| | | CreateDate = DateTime.Now, |
| | | MaterialType= stockt.MaterialType |
| | | }; |
| | | dtstockt.Add(stockt); |
| | | locations.Add(locationinfo); |
| | |
| | | Depth = locationinfo.Depth, |
| | | CreateDate = DateTime.Now, |
| | | PLCTo = int.Parse(saveModel.DelKeys[1].ToString()), |
| | | |
| | | MaterialType=stockt.MaterialType |
| | | }; |
| | | dtstockt.Add(stockt); |
| | | locations.Add(locationinfo); |
| | |
| | | else if(task.TaskType == (int)TaskTypeEnum.Inbound || task.TaskType == (int)TaskTypeEnum.PalletInbound) |
| | | { |
| | | //å¤çåºåºçé»è¾ |
| | | Dt_LocationInfo locationinfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.SourceAddress); |
| | | Dt_LocationInfo locationinfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.TargetAddress); |
| | | if (locationinfo.LocationStatus == LocationStatusEnum.Lock.ObjToInt() || locationinfo.LocationStatus == LocationStatusEnum.PalletLock.ObjToInt()) |
| | | { |
| | | locationinfo.LocationStatus = LocationStatusEnum.Free.ObjToInt(); |