| | |
| | | throw new Exception($"æªæ¾å°æ¡ç {stockInfoOld.PalletCode}䏿ERPåºåä¸åå¨"); |
| | | } |
| | | BSTStockInfoDTO bSTStockInfoDTO = bSTResponse.Data ?? throw new Exception($"䏿ERPæªè¿å{stockInfoOld.PalletCode}çåºåä¿¡æ¯"); |
| | | if (stockInfoOld.StockLength <= 0 || bSTStockInfoDTO.StockMeter<=0) |
| | | { |
| | | throw new Exception($"{stockInfoOld.RfidCode}ç»å®æ¡ç {stockInfoOld.PalletCode}åºå为0"); |
| | | } |
| | | stockInfoOld.IsPick = WhetherEnum.False.ObjToInt(); |
| | | decimal stockLength = bSTStockInfoDTO.StockMeter; |
| | | if (weight != bSTStockInfoDTO.Qty && weight < stockInfoOld.InitialWeight) |
| | | decimal errWeight = Math.Abs(weight - bSTStockInfoDTO.Qty); |
| | | if (weight != bSTStockInfoDTO.Qty && weight < stockInfoOld.InitialWeight && errWeight <= AppSettings.Get("ErrWeight").ObjToInt()) |
| | | { |
| | | Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.MaterialSourceId == stockInfoOld.MaterielId); |
| | | int gramWeight = (int)(materielInfo.MaterielWeight * 1000); |
| | |
| | | Paper_code = stockInfoOld.PalletCode, |
| | | Estimate_weight = bSTStockInfoDTO.Qty, |
| | | Actual_weight = weight, |
| | | Error_weight = Math.Abs(weight - bSTStockInfoDTO.Qty), |
| | | Error_weight = errWeight, |
| | | Weigh_time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), |
| | | Operator = "LiKu", |
| | | Width = bSTStockInfoDTO.W, |
| | |
| | | stockInfoOld.StockLength = stockLength; |
| | | stockInfoOld.StockOutLength = 0; |
| | | stockInfoOld.WarehouseId = WarehouseEnum.LLDYL.ObjToInt(); |
| | | List<Dt_OutLineView> outLineViewsDel = _outboundRepository.OutLineViewRepository.QueryData(x=>x.PalletCode==stockInfoOld.PalletCode); |
| | | if (outLineViewsDel.Count>0) |
| | | { |
| | | _outboundRepository.OutLineViewRepository.DeleteData(outLineViewsDel); |
| | | } |
| | | content.OK("æå",data:stockInfoOld); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | { |
| | | item.Count -= count.Count; |
| | | } |
| | | if (item.Count >= 50 && count?.Count<=2) |
| | | { |
| | | return item.RoadwayNo; |
| | | } |
| | | } |
| | | return locationCounts.Where(x => x.Count > 0).OrderByDescending(x => x.Count).FirstOrDefault()?.RoadwayNo ?? ""; |
| | | } |