From 070b9f3ea747fc763f999e4cc6b86b202f48a237 Mon Sep 17 00:00:00 2001
From: heshaofeng <heshaofeng@hnkhzn.com>
Date: 星期四, 12 三月 2026 18:07:51 +0800
Subject: [PATCH] 1
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
index 3355b93..b099aa3 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
@@ -50,9 +50,10 @@
private readonly IBasicService _basicService;
private readonly IRepository<Dt_AllocateOrder> _allocateOrderRepository;
private readonly IRepository<Dt_OutboundOrder> _outboundOrderRepository;
+ private readonly IRepository<Dt_OutboundOrderDetail> _outboundOrderDetailRepository;
public IRepository<Dt_InboundOrder> Repository => BaseDal;
- public InboundOrderService(IRepository<Dt_InboundOrder> BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IRepository<Dt_InboundOrderDetail> inboundOrderDetailRepository, IRepository<Dt_Task> taskRepository, IStockService stockService, IInboundOrderDetailService inboundOrderDetailService, IMaterialUnitService materialUnitService, IRepository<Dt_StockInfoDetail> stockDetailRepository, IRepository<Dt_InboundOrder> inboundOrderRepository, IRepository<Dt_WarehouseArea> warehouseAreaRepository, IRepository<Dt_StockInfo> stockRepository, IRepository<Dt_LocationType> locationTypeRepository, IMaterielInfoService materielInfoService, IBasicService basicService, IRepository<Dt_LocationInfo> locationInfoRepository, IRepository<Dt_AllocateOrder> allocateOrderRepository, IRepository<Dt_OutboundOrder> outboundOrderRepository) : base(BaseDal)
+ public InboundOrderService(IRepository<Dt_InboundOrder> BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IRepository<Dt_InboundOrderDetail> inboundOrderDetailRepository, IRepository<Dt_Task> taskRepository, IStockService stockService, IInboundOrderDetailService inboundOrderDetailService, IMaterialUnitService materialUnitService, IRepository<Dt_StockInfoDetail> stockDetailRepository, IRepository<Dt_InboundOrder> inboundOrderRepository, IRepository<Dt_WarehouseArea> warehouseAreaRepository, IRepository<Dt_StockInfo> stockRepository, IRepository<Dt_LocationType> locationTypeRepository, IMaterielInfoService materielInfoService, IBasicService basicService, IRepository<Dt_LocationInfo> locationInfoRepository, IRepository<Dt_AllocateOrder> allocateOrderRepository, IRepository<Dt_OutboundOrder> outboundOrderRepository, IRepository<Dt_OutboundOrderDetail> outboundOrderDetailRepository) : base(BaseDal)
{
_mapper = mapper;
_unitOfWorkManage = unitOfWorkManage;
@@ -71,6 +72,7 @@
_locationInfoRepository = locationInfoRepository;
_allocateOrderRepository = allocateOrderRepository;
_outboundOrderRepository = outboundOrderRepository;
+ _outboundOrderDetailRepository = outboundOrderDetailRepository;
}
public async Task<WebResponseContent> ReceiveInboundOrder(List<Dt_InboundOrder> models, int operateType)
@@ -1031,10 +1033,23 @@
}
else if (outbound != null)
{
- if(outbound.OrderStatus !=(int)OutOrderStatusEnum.鏈紑濮� && outbound.OrderStatus != (int)OutOrderStatusEnum.鍑哄簱涓�)
+ if(outbound.OrderStatus ==(int)OutOrderStatusEnum.鍑哄簱瀹屾垚)
{
return WebResponseContent.Instance.Error($"璇ュ崟鎹姸鎬佷笉鍙互鍏抽棴");
}
+ if(outbound.OrderStatus == (int)OutOrderStatusEnum.鍑哄簱涓�)
+ {
+ var outboundDetails = _outboundOrderDetailRepository.QueryData(x => x.OrderId == outbound.Id);
+ if (outboundDetails == null)
+ {
+ return WebResponseContent.Instance.Error("璇ュ崟鎹姸鎬佷笉鑳藉叧闂�");
+ }
+ var detailStatus = outboundDetails.All(x => x.LockQuantity == x.OverOutQuantity);
+ if (!detailStatus)
+ {
+ return WebResponseContent.Instance.Error("璇ュ崟鎹湁姝e湪鍑哄簱鐨勭墿鏂欙紝涓嶈兘鍏抽棴");
+ }
+ }
outbound.OrderStatus = (int)OutOrderStatusEnum.鍏抽棴;
outbound.Operator = App.User.UserName;
_outboundOrderRepository.UpdateData(outbound);
--
Gitblit v1.9.3