| | |
| | | List<Dt_StockInfo> GetOutboundStocks(List<Dt_StockInfo> stockInfos, string materielCode, float needQuantity, out float residueQuantity); |
| | | |
| | | List<Dt_StockInfo> GetUseableStocks(string materielCode, string batchNo, int warehoseId); |
| | | WebResponseContent StockQueryData(SaveModel saveModel); |
| | | } |
| | | } |
| | |
| | | { |
| | | throw new Exception($"æªæ¾å°åºå详æ
"); |
| | | } |
| | | List<Dt_OutStockLockInfo> stockLockInfos = BaseDal.QueryData(x => x.StockId == stockInfo.Id); |
| | | List<Dt_OutStockLockInfo> stockLockInfos = BaseDal.QueryData(x => x.StockId == stockInfo.Id&&x.Status< OutLockStockStatusEnum.åºåºå®æ.ObjToInt()); |
| | | return stockLockInfos; |
| | | } |
| | | catch (Exception ex) |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | public WebResponseContent StockQueryData(SaveModel saveModel) |
| | | { |
| | | try |
| | | { |
| | | var barcode = saveModel.MainData["barcode"].ToString(); |
| | | var warehouseId = saveModel.MainData["warehouseId"].ObjToInt(); |
| | | Dt_StockInfo stockInfo = BaseDal.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == barcode && x.WarehouseId == warehouseId).Includes(x => x.Details).First(); |
| | | if (stockInfo == null) throw new Exception("æªæ¾å°æçä¿¡æ¯"); |
| | | return WebResponseContent.Instance.OK(data: stockInfo); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | |
| | | { |
| | | return Service.GetStockSelectViews(orderId, materielCode); |
| | | } |
| | | /// <summary> |
| | | /// æ ¹æ®æçååºåºæ¥è¯¢åºåä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="saveModel"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("StockQueryData")] |
| | | public WebResponseContent StockQueryData([FromBody] SaveModel saveModel) |
| | | { |
| | | return Service.StockQueryData(saveModel); |
| | | } |
| | | } |
| | | } |