| | |
| | | MaterielCode = materielInfo.MaterielCode, |
| | | MaterielName=materielInfo.MaterielName, |
| | | }; |
| | | if (wide>1200) |
| | | if (wide>=1160) |
| | | { |
| | | stockInfo.PalletType = 2; |
| | | } |
| | |
| | | BSTResponse<BSTStockInfoDTO> bSTResponse = _invokeERPService.BSTStockAsync(item.PalletCode).DeserializeObject<BSTResponse<BSTStockInfoDTO>>(); |
| | | if (bSTResponse.Code == 500) |
| | | { |
| | | throw new Exception($"æªæ¾å°æ¡ç {item.PalletCode}䏿ERPåºåä¸åå¨"); |
| | | content.Message += $"æ¡ç {item.PalletCode}䏿ERPåºåä¸åå¨,"; |
| | | continue; |
| | | } |
| | | BSTStockInfoDTO bSTStockInfoDTO = bSTResponse.Data ?? throw new Exception($"䏿ERPæªè¿å{item.PalletCode}çåºåä¿¡æ¯"); |
| | | if (item.StockLength != bSTStockInfoDTO.StockMeter && bSTStockInfoDTO.StockMeter>0) |
| | |
| | | BaseDal.DeleteAndMoveIntoHty(stockInfosDel, App.User.UserId > 0 ? OperateTypeEnum.äººå·¥å®æ : OperateTypeEnum.èªå¨å®æ); |
| | | } |
| | | _unitOfWorkManage.CommitTran(); |
| | | content.OK("æ´æ°æå"); |
| | | content.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | |
| | | return BaseDal.GetStockInfos(materielCode, width, locationCodes); |
| | | } |
| | | /// <summary> |
| | | /// è·åèåç¼åå¯ç¨åºå |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<Dt_StockInfo> GetUseOldCacheStocks(string materielCode, decimal width) |
| | | { |
| | | return Db.Queryable<Dt_StockInfo>().Where(x => x.MaterielCode.StartsWith(materielCode) && x.StockStatus == StockStatusEmun.èåéææå.ObjToInt() && x.MaterielWide == width && x.StockOutLength <= 0 && x.StockLength > 0).OrderBy(x => x.CreateDate).ToList(); |
| | | } |
| | | public List<Dt_StockInfo> GetUseableStocks(string materielCode, int warehoseId) |
| | | { |
| | | List<string> locationCodes = _basicRepository.LocationInfoRepository.GetCanOutLocationCodes(warehoseId); |