| | |
| | | private readonly IInboundOrderRepository _inboundOrderRepository; |
| | | private readonly IOutboundOrderDetailRepository _outboundOrderDetailRepository; |
| | | private readonly IOutboundOrderRepository _outboundOrderRepository; |
| | | public LargeScreenController(ILocationInfoService locationInfoService, ITaskRepository taskRepository, ITask_HtyRepository taskHtyRepository, IInboundOrderDetailRepository inboundOrderDetailRepository, IInboundOrderRepository inboundOrderRepository, IOutboundOrderDetailRepository outboundOrderDetailRepository, IOutboundOrderRepository outboundOrderRepository, IStockInfoDetailRepository stockInfoDetailRepository) |
| | | private readonly IInventoryInfoRepository _inventoryInfoRepository; |
| | | public LargeScreenController(ILocationInfoService locationInfoService, ITaskRepository taskRepository, ITask_HtyRepository taskHtyRepository, IInboundOrderDetailRepository inboundOrderDetailRepository, IInboundOrderRepository inboundOrderRepository, IOutboundOrderDetailRepository outboundOrderDetailRepository, IOutboundOrderRepository outboundOrderRepository, IStockInfoDetailRepository stockInfoDetailRepository, IInventoryInfoRepository inventoryInfoRepository) |
| | | { |
| | | _locationInfoService = locationInfoService; |
| | | _taskRepository = taskRepository; |
| | |
| | | _outboundOrderDetailRepository = outboundOrderDetailRepository; |
| | | _outboundOrderRepository = outboundOrderRepository; |
| | | _stockInfoDetailRepository = stockInfoDetailRepository; |
| | | _inventoryInfoRepository = inventoryInfoRepository; |
| | | } |
| | | [HttpPost, Route("GetStockInfos")] |
| | | public WebResponseContent GetStockInfos() |
| | | { |
| | | WebResponseContent webResponseContent = new WebResponseContent(); |
| | | List<Dt_StockInfoDetail> _StockInfoDetails = _stockInfoDetailRepository.QueryData(x => x.Status == StockStatusEmun.å·²å
¥åº.ObjToInt()); |
| | | //List<Dt_StockInfoDetail> _StockInfoDetails = _stockInfoDetailRepository.QueryData(x => x.Status == StockStatusEmun.å·²å
¥åº.ObjToInt()); |
| | | List<StockInfo> stocks = new List<StockInfo>(); |
| | | foreach (var item in _StockInfoDetails.GroupBy(x => x.MaterielCode)) |
| | | List<Dt_InventoryInfo> inventoryInfos = _inventoryInfoRepository.QueryData(x => x.StockStatus == StockStatusEmun.å·²å
¥åº.ObjToInt()); |
| | | foreach (var item in inventoryInfos.GroupBy(x => x.MaterielCode)) |
| | | { |
| | | StockInfo stockInfo = new StockInfo() |
| | | { |
| | |
| | | Dt_InboundOrder _InboundOrder = inboundOrders.Where(x => x.Id == item.OrderId).First(); |
| | | BoundOrderDTO boundOrderDTO = new BoundOrderDTO() |
| | | { |
| | | OrderNo = _InboundOrder.OrderNo, |
| | | Quantity = item.ReceiptQuantity, |
| | | BatchNo = item.BatchNo, |
| | | MaterielCode = item.MaterielCode, |
| | | MaterielName = item.MaterielName, |
| | |
| | | Dt_OutboundOrder _OutboundOrder = outboundOrders.Where(x => x.Id == item.OrderId).First(); |
| | | BoundOrderDTO boundOrderDTO = new BoundOrderDTO() |
| | | { |
| | | OrderNo = _OutboundOrder.OrderNo, |
| | | Quantity = item.LockQuantity, |
| | | BatchNo = item.BatchNo, |
| | | MaterielCode = item.MaterielCode, |
| | | MaterielName = item.MaterielName, |
| | |
| | | List<Dt_Task_Hty> Task_Hties = Task_YearHties.Where(x => x.InsertTime.Date == date.Date).ToList(); |
| | | List<Dt_Task_Hty> ZTask_Hties = Task_YearHties.Where(x => x.InsertTime.Date == date1.Date).ToList(); |
| | | |
| | | List<Dt_Task_Hty> _Task_InYearHties = Task_YearHties.Where(x => x.TaskType == TaskInboundTypeEnum.Inbound.ObjToInt() || x.TaskType == TaskInboundTypeEnum.PalletInbound.ObjToInt()).ToList(); |
| | | List<Dt_Task_Hty> _Task_OutYearHties = Task_YearHties.Where(x => x.TaskType == TaskOutboundTypeEnum.Outbound.ObjToInt() || x.TaskType == TaskOutboundTypeEnum.PalletOutbound.ObjToInt()).ToList(); |
| | | List<Dt_Task_Hty> _Task_InYearHties = Task_YearHties.Where(x => x.TaskType == TaskInboundTypeEnum.Inbound.ObjToInt() || x.TaskType == TaskInboundTypeEnum.PalletInbound.ObjToInt() || x.TaskType == TaskInboundTypeEnum.InQuality.ObjToInt()).ToList(); |
| | | List<Dt_Task_Hty> _Task_OutYearHties = Task_YearHties.Where(x => x.TaskType == TaskOutboundTypeEnum.Outbound.ObjToInt() || x.TaskType == TaskOutboundTypeEnum.PalletOutbound.ObjToInt() || x.TaskType == TaskOutboundTypeEnum.OutQuality.ObjToInt()).ToList(); |
| | | |
| | | List<Dt_Task_Hty> _Task_InMonthHties = _Task_InYearHties.Where(x => x.InsertTime.Month == date.Month).ToList(); |
| | | List<Dt_Task_Hty> _Task_OutMonthHties = _Task_OutYearHties.Where(x => x.InsertTime.Month == date.Month).ToList(); |
| | |
| | | var name = model.MainData["Name"].ToString(); |
| | | |
| | | List<Dt_Task_Hty> task_Hties = new List<Dt_Task_Hty>(); |
| | | List<Dt_InventoryInfo> inventoryInfos = _inventoryInfoRepository.QueryData(x => x.StockStatus == StockStatusEmun.åºåºä¸.ObjToInt() || x.StockStatus == StockStatusEmun.å·²å
¥åº.ObjToInt()); |
| | | if (name != "å
¥åº") |
| | | { |
| | | task_Hties = _taskHtyRepository.QueryData(x => x.TaskType == TaskOutboundTypeEnum.Outbound.ObjToInt() || x.TaskType == TaskOutboundTypeEnum.PalletOutbound.ObjToInt()).ToList(); |
| | | task_Hties = _taskHtyRepository.QueryData(x => x.TaskType == TaskOutboundTypeEnum.Outbound.ObjToInt() || x.TaskType == TaskOutboundTypeEnum.PalletOutbound.ObjToInt() || x.TaskType == TaskOutboundTypeEnum.OutQuality.ObjToInt()).ToList(); |
| | | var task_htys = task_Hties.Where(x => x.InsertTime.Date == DateTime.Now.Date).ToList(); |
| | | var tasks = _taskRepository.QueryData(x => x.TaskType == TaskOutboundTypeEnum.Outbound.ObjToInt() || x.TaskType == TaskOutboundTypeEnum.PalletOutbound.ObjToInt()).ToList(); |
| | | var tasks = _taskRepository.QueryData(x => x.TaskType == TaskOutboundTypeEnum.Outbound.ObjToInt() || x.TaskType == TaskOutboundTypeEnum.PalletOutbound.ObjToInt() || x.TaskType == TaskOutboundTypeEnum.OutQuality.ObjToInt()).ToList(); |
| | | |
| | | List<Dt_OutboundOrderDetail> outboundOrderDetails = _outboundOrderDetailRepository.QueryData(x => x.OrderDetailStatus < OrderDetailStatusEnum.Outbound.ObjToInt()).ToList(); |
| | | //List<Dt_OutboundOrderDetail> outboundOrderDetails = _outboundOrderDetailRepository.QueryData(x => x.OrderDetailStatus < OrderDetailStatusEnum.Outbound.ObjToInt()).ToList(); |
| | | webResponseContent.OK(data: new |
| | | { |
| | | task_Htiesqty = task_Hties.Count, |
| | | task_htysqty = task_htys.Count, |
| | | tasksqty = tasks.Count, |
| | | inboundOrderDetailsqty = outboundOrderDetails.Sum(x => x.OrderQuantity - x.OverOutQuantity) |
| | | inboundOrderDetailsqty = inventoryInfos.Count,//outboundOrderDetails.Sum(x => x.OrderQuantity - x.OverOutQuantity) |
| | | }); |
| | | } |
| | | else |
| | | { |
| | | task_Hties = _taskHtyRepository.QueryData(x => x.TaskType == TaskInboundTypeEnum.Inbound.ObjToInt() || x.TaskType == TaskInboundTypeEnum.PalletInbound.ObjToInt()).ToList(); |
| | | task_Hties = _taskHtyRepository.QueryData(x => x.TaskType == TaskInboundTypeEnum.Inbound.ObjToInt() || x.TaskType == TaskInboundTypeEnum.PalletInbound.ObjToInt() || x.TaskType == TaskInboundTypeEnum.InQuality.ObjToInt()).ToList(); |
| | | var task_htys = task_Hties.Where(x => x.InsertTime.Date == DateTime.Now.Date).ToList(); |
| | | var tasks = _taskRepository.QueryData(x => x.TaskType == TaskInboundTypeEnum.Inbound.ObjToInt() || x.TaskType == TaskInboundTypeEnum.PalletInbound.ObjToInt()).ToList(); |
| | | var tasks = _taskRepository.QueryData(x => x.TaskType == TaskInboundTypeEnum.Inbound.ObjToInt() || x.TaskType == TaskInboundTypeEnum.PalletInbound.ObjToInt() || x.TaskType == TaskInboundTypeEnum.InQuality.ObjToInt()).ToList(); |
| | | |
| | | List<Dt_InboundOrderDetail> inboundOrderDetails = _inboundOrderDetailRepository.QueryData(x => x.OrderDetailStatus <= OrderDetailStatusEnum.GroupAndInbound.ObjToInt()).ToList(); |
| | | //List<Dt_InboundOrderDetail> inboundOrderDetails = _inboundOrderDetailRepository.QueryData(x => x.OrderDetailStatus <= OrderDetailStatusEnum.GroupAndInbound.ObjToInt()).ToList(); |
| | | webResponseContent.OK(data: new |
| | | { |
| | | task_Htiesqty = task_Hties.Count, |
| | | task_htysqty = task_htys.Count, |
| | | tasksqty = tasks.Count, |
| | | inboundOrderDetailsqty = inboundOrderDetails.Sum(x => x.OrderQuantity - x.OverInQuantity) |
| | | inboundOrderDetailsqty = inventoryInfos.Count,//inboundOrderDetails.Sum(x => x.OrderQuantity - x.OverInQuantity) |
| | | }); |
| | | } |
| | | return webResponseContent; |