From d9c99e0480b4910cdb134778dd5c314b35ec4cf2 Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期一, 29 九月 2025 10:05:23 +0800 Subject: [PATCH] 1 --- 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Interface/LargeScreenController.cs | 34 +++++++++++++++++++--------------- 1 files changed, 19 insertions(+), 15 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Interface/LargeScreenController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Interface/LargeScreenController.cs" index cb1ea08..c5c0602 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Interface/LargeScreenController.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Interface/LargeScreenController.cs" @@ -30,7 +30,8 @@ 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; @@ -40,14 +41,16 @@ _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() { @@ -90,7 +93,7 @@ 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, @@ -111,7 +114,7 @@ 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, @@ -141,8 +144,8 @@ 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(); @@ -174,34 +177,35 @@ 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; -- Gitblit v1.9.3