| | |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Common.WareHouseEnum; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Core.BaseServices; |
| | |
| | | } |
| | | public IRepository<Dt_InventoryInfo> Repository => BaseDal; |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// è·ååºå |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public WebResponseContent GetInventory() |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | List<object> lists = new List<object>(); |
| | | #region å·å»åº |
| | | string WareCodeLD = WarehouseEnum.å·å»åº.ObjToInt().ToString("000"); |
| | | var LDQty = Convert.ToInt32(BaseDal.QueryData(x => x.WarehouseCode == WareCodeLD).Sum(x => x.StockQuantity)); |
| | | lists.Add(new |
| | | { |
| | | name = WarehouseEnum.å·å»åº.ObjToString(), |
| | | count = LDQty |
| | | }); |
| | | #endregion |
| | | #region éº»ç²¾åº |
| | | string WareCodeMJ = WarehouseEnum.麻精åº.ObjToInt().ToString("000"); |
| | | var MJQty = Convert.ToInt32(BaseDal.QueryData(x => x.WarehouseCode == WareCodeMJ).Sum(x => x.StockQuantity)); |
| | | lists.Add(new |
| | | { |
| | | name = WarehouseEnum.麻精åº.ObjToString(), |
| | | count = MJQty |
| | | }); |
| | | #endregion |
| | | #region å¤§ä»¶åº |
| | | string WareCodeDJ = WarehouseEnum.大件åº.ObjToInt().ToString("000"); |
| | | var DJQty = Convert.ToInt32(BaseDal.QueryData(x => x.WarehouseCode == WareCodeDJ).Sum(x => x.StockQuantity)); |
| | | lists.Add(new |
| | | { |
| | | name = WarehouseEnum.大件åº.ObjToString(), |
| | | count = DJQty |
| | | }); |
| | | #endregion |
| | | content.OK(data: lists); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |