From 51bd4ac4f323fab99ff9ac20763ca15af0e53a57 Mon Sep 17 00:00:00 2001
From: heshaofeng <heshaofeng@hnkhzn.com>
Date: 星期四, 22 一月 2026 21:51:15 +0800
Subject: [PATCH] 1
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs | 21 +++++++++++++++++----
1 files changed, 17 insertions(+), 4 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/InboundService.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/InboundService.cs"
index 6b902bd..5990115 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/InboundService.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/InboundService.cs"
@@ -3,6 +3,7 @@
using MailKit.Search;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
using Org.BouncyCastle.Asn1.X509;
+using Org.BouncyCastle.Bcpg;
using SixLabors.ImageSharp;
using SqlSugar;
using System;
@@ -54,7 +55,8 @@
private readonly IRepository<Dt_MesReturnRecord> _mesReturnRecord;
private readonly ILocationInfoService _locationInfoService;
private readonly IRepository<Dt_TakeStockOrder> _takeStockOrder;
- public InboundService(IUnitOfWorkManage unitOfWorkManage, IInboundOrderDetailService inboundOrderDetailService, IInboundOrderService inbounOrderService, IRepository<Dt_InboundOrder> inboundOrderRepository, IRepository<Dt_WarehouseArea> warehouseAreaRepository, IRepository<Dt_LocationType> locationTypeRepository, IRepository<Dt_StockInfo> stockInfoRepository, IRepository<Dt_InboundOrderDetail> inboundOrderDetailRepository, IStockService stockService, IRepository<Dt_Task> taskRepository,IRepository<Dt_AllocateMaterialInfo> allocateMaterialInfo, HttpClientHelper httpClientHelper, IRepository<Dt_MesReturnRecord> mesReturnRecord,ILocationInfoService locationInfoService,IRepository<Dt_TakeStockOrder> takeStockOrder)
+ private readonly IRepository<Dt_StockInfoDetail> _stockInfoDetailRepository;
+ public InboundService(IUnitOfWorkManage unitOfWorkManage, IInboundOrderDetailService inboundOrderDetailService, IInboundOrderService inbounOrderService, IRepository<Dt_InboundOrder> inboundOrderRepository, IRepository<Dt_WarehouseArea> warehouseAreaRepository, IRepository<Dt_LocationType> locationTypeRepository, IRepository<Dt_StockInfo> stockInfoRepository, IRepository<Dt_InboundOrderDetail> inboundOrderDetailRepository, IStockService stockService, IRepository<Dt_Task> taskRepository,IRepository<Dt_AllocateMaterialInfo> allocateMaterialInfo, HttpClientHelper httpClientHelper, IRepository<Dt_MesReturnRecord> mesReturnRecord,ILocationInfoService locationInfoService,IRepository<Dt_TakeStockOrder> takeStockOrder,IRepository<Dt_StockInfoDetail> stockInfoDetailRepository)
{
_unitOfWorkManage = unitOfWorkManage;
InboundOrderDetailService = inboundOrderDetailService;
@@ -71,6 +73,7 @@
_mesReturnRecord = mesReturnRecord;
_locationInfoService = locationInfoService;
_takeStockOrder = takeStockOrder;
+ _stockInfoDetailRepository = stockInfoDetailRepository;
}
public async Task<WebResponseContent> GroupPallet(GroupPalletDto palletDto)
@@ -93,7 +96,11 @@
if (details.Count() <= 0)
{
- var inbounddetail =_inboundOrderDetailRepository.QueryFirst(x => x.Barcode == palletDto.Barcode);
+ var inbounddetail =_inboundOrderDetailRepository.QueryFirst(x => x.Barcode == palletDto.Barcode || x.OutBoxbarcodes == palletDto.Barcode);
+ if(inbounddetail == null)
+ {
+ return content.Error($"鏉$爜{palletDto.Barcode}涓嶅瓨鍦�");
+ }
var inbound = _inboundOrderRepository.Db.Queryable<Dt_InboundOrder>().Where(x => x.Id == inbounddetail.OrderId).First();
if (inbound == null)
{
@@ -113,7 +120,13 @@
d.SupplyCode,
d.WarehouseCode
}).ToList();
- return content.Error("璇风‘璁ゆ槸鍚﹀凡缁忕粍鐩�",detail);
+ var palletId = _stockInfoDetailRepository.QueryFirst(x => x.Barcode == palletDto.Barcode);
+ if (palletId == null)
+ {
+ return content.Error($"鏉$爜鏉$爜{palletDto.Barcode}涓嶅瓨鍦�");
+ }
+ var pallet =_stockInfoRepository.QueryFirst(x => x.Id == palletId.StockId);
+ return content.Error($"鏉$爜{palletDto.Barcode}宸茬粡缁勫埌{pallet.PalletCode}",detail);
}
inboundOrder = _inboundOrderRepository.Db.Queryable<Dt_InboundOrder>().Includes(x=>x.Details).Where(x => x.Id == details.First().OrderId).First();
@@ -810,7 +823,7 @@
Dt_ReCheckOrder reCheckOrder = _stockInfoRepository.Db.Queryable<Dt_ReCheckOrder>().Where(x => x.MaterielCode == stockInfoDetail.MaterielCode && x.BatchNo == stockInfoDetail.BatchNo && x.OrderNo == stockInfoDetail.OrderNo && (x.Result == 1 || x.Result == 2 )).First();
if(reCheckOrder == null)
{
- return content.Error($"璇ラ噸妫�鏉$爜鐨勬壒娆″湪閲嶆鍗曚腑鏈嬁鍒伴噸妫�缁撴灉锛岃妫�娴嬮噸妫�鍗晎reCheckOrder.OrderNo}鐘舵��");
+ return content.Error($"璇ラ噸妫�鏉$爜鐨勬壒娆″湪閲嶆鍗曚腑鏈嬁鍒伴噸妫�缁撴灉锛岃妫�鏌ラ噸妫�鍗曚腑鐗╂枡{stockInfoDetail.MaterielCode}鍜寋stockInfoDetail.BatchNo}鐗╂枡鎵规鐘舵��");
}
int newStatus = reCheckOrder.Result == 1 ? StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt(): StockStatusEmun.鎵嬪姩鍐荤粨.ObjToInt();
--
Gitblit v1.9.3