From 561c40186ee1a0134c5f671cf4ed24badcdcd6a3 Mon Sep 17 00:00:00 2001
From: pan <antony1029@163.com>
Date: 星期一, 01 十二月 2025 09:56:32 +0800
Subject: [PATCH] 提交
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs | 71 +++++++++++++++++++++++++++++------
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs | 2
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 4 ++
3 files changed, 64 insertions(+), 13 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_OutboundService/OutboundPickingService.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_OutboundService/OutboundPickingService.cs"
index fd2dbf8..196b146 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_OutboundService/OutboundPickingService.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_OutboundService/OutboundPickingService.cs"
@@ -2681,7 +2681,7 @@
}
}
- public async Task<WebResponseContent> NoStockOutSubmit(NoStockOutSubmit noStockOutSubmit)
+ public async Task<WebResponseContent> NoStockOutSubmit(NoStockOutSubmit noStockOutSubmit)
{
try
{
@@ -2935,9 +2935,9 @@
}
- // Dt_InboundOrder inboundOrder = GetInboundOrder(materielGroupDTO.OrderNo);
+ // Dt_InboundOrder inboundOrder = GetInboundOrder(materielGroupDTO.OrderNo);
- var dbinboundOrderDetails = Db.Queryable<Dt_PickingRecord>().Where(x=>x.OrderNo== materielGroupDTO.OrderNo && !x.IsCancelled && x.Barcode==materielGroupDTO.Barcodes).ToList();
+ var dbinboundOrderDetails = Db.Queryable<Dt_PickingRecord>().Where(x => x.OrderNo == materielGroupDTO.OrderNo && !x.IsCancelled && x.Barcode == materielGroupDTO.Barcodes).ToList();
if (dbinboundOrderDetails != null && !dbinboundOrderDetails.Any())
{
@@ -2950,13 +2950,38 @@
- (bool, string, object?) result = CheckMaterielGroupParam(materielGroupDTO, materielCodes, stockInfo);
+ (bool, string, object?) result = CheckMaterielGroupParam(materielGroupDTO, materielCodes, stockInfo);
if (!result.Item1) return content = WebResponseContent.Instance.Error(result.Item2);
if (stockInfo == null)
{
stockInfo = new Dt_StockInfo() { PalletType = (int)PalletTypeEnum.None, LocationType = materielGroupDTO.locationType.ObjToInt() };
stockInfo.Details = new List<Dt_StockInfoDetail>();
+ }
+ var inboindId = 0; Dt_InboundOrder dt_InboundOrder = null;
+ var dbinbound = _inboundOrderRepository.QueryData(x => x.InboundOrderNo == dbinboundOrderDetails.First().OrderNo).First();
+ if (dbinbound == null)
+ {
+ dt_InboundOrder = new Dt_InboundOrder
+ {
+ WarehouseId = 0,
+ InboundOrderNo = dbinboundOrderDetails.First()?.OrderNo,
+ UpperOrderNo = dbinboundOrderDetails.First()?.OrderNo,
+ SupplierId = dbinboundOrderDetails.First()?.SupplyCode,
+ OrderType = InOrderTypeEnum.InternalAllocat.ObjToInt(),
+
+ BusinessType = InOrderTypeEnum.InternalAllocat.ObjToInt().ToString(),
+
+ FactoryArea = dbinboundOrderDetails.First()?.FactoryArea,
+ Remark = "",
+ Details = new List<Dt_InboundOrderDetail>()
+ };
+ inboindId = _inboundOrderRepository.AddData(dt_InboundOrder);
+ }
+ else
+ {
+ dt_InboundOrder = new Dt_InboundOrder { Details = new List<Dt_InboundOrderDetail>() };
+ inboindId = dbinbound.Id;
}
foreach (var item in dbinboundOrderDetails)
@@ -2976,12 +3001,34 @@
BarcodeUnit = item.BarcodeUnit,
FactoryArea = item.FactoryArea,
Status = 0,
- OrderNo = item.OrderNo,
+ OrderNo = item.OrderNo,
+ BusinessType = InOrderTypeEnum.InternalAllocat.ObjToInt().ToString()
- });
+ });
item.WarehouseCode = item.WarehouseCode;
+
+ dt_InboundOrder.Details.Add(new Dt_InboundOrderDetail
+ {
+ OrderId = inboindId,
+ MaterielCode = item.MaterielCode,
+ MaterielName = "",
+ BatchNo = item.BatchNo,
+ OrderQuantity = item.PickQuantity,
+ ReceiptQuantity = 0,
+ OverInQuantity = 0,
+ Unit = item.BarcodeUnit,
+ RowNo = 0,
+ lineNo = item.lineNo,
+ SupplyCode = item.SupplyCode,
+ WarehouseCode = item.WarehouseCode,
+ Barcode = item.Barcode,
+ OutBoxbarcodes = "",
+ BarcodeQty = (decimal)item.BarcodeQty,
+ BarcodeUnit = item.BarcodeUnit
+ });
}
+ _inboundOrderDetailService.Db.Insertable<Dt_InboundOrderDetail>(dt_InboundOrder.Details);
if (stockInfo.Id == 0)
{
stockInfo.PalletCode = materielGroupDTO.PalletCode;
@@ -2994,7 +3041,7 @@
try
{
_unitOfWorkManage.BeginTran();
-
+
_stockService.StockInfoService.AddMaterielGroup(stockInfo);
_unitOfWorkManage.CommitTran();
return WebResponseContent.Instance.OK();
@@ -3003,7 +3050,7 @@
{
_unitOfWorkManage.RollbackTran();
return WebResponseContent.Instance.Error(ex.Message);
- }
+ }
}
catch (Exception ex)
{
@@ -3016,9 +3063,9 @@
return content;
}
-
- public (bool, string, object?) CheckMaterielGroupParam(BarcodeMaterielGroupDTO materielGroupDTO, List<string> barcodeCodes, Dt_StockInfo stockInfo)
+
+ public (bool, string, object?) CheckMaterielGroupParam(BarcodeMaterielGroupDTO materielGroupDTO, List<string> barcodeCodes, Dt_StockInfo stockInfo)
{
(bool, string, object?) result = ModelValidate.ValidateModelData(materielGroupDTO);
if (!result.Item1) return result;
@@ -3037,8 +3084,8 @@
{
return (false, $"{barcodeCodes[0]} 鏉$爜鍦ㄥ簱瀛樹腑宸插瓨鍦�", materielGroupDTO);
}
-
-
+
+
return (true, "鎴愬姛", materielGroupDTO);
}
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_TaskInfoService/TaskService.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_TaskInfoService/TaskService.cs"
index 10a9c81..12d77ec 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_TaskInfoService/TaskService.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_TaskInfoService/TaskService.cs"
@@ -327,6 +327,10 @@
{
}
+ else if (inboundOrder.OrderType == InOrderTypeEnum.InternalAllocat.ObjToInt()) //鏅轰粨璋冩櫤浠�
+ {
+ _logger.LogInformation($"InboundTaskCompleted 鍥炲啓MES : {inboundOrder.InboundOrderNo } ,ordertype: {InOrderTypeEnum.InternalAllocat.ObjToInt()} " );
+ }
else
{
if (inboundOrder != null && inboundOrder.OrderStatus == InOrderStatusEnum.鍏ュ簱瀹屾垚.ObjToInt())
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_TaskInfoService/TaskService_Inbound.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_TaskInfoService/TaskService_Inbound.cs"
index 6f78e76..2028d49 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_TaskInfoService/TaskService_Inbound.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_TaskInfoService/TaskService_Inbound.cs"
@@ -32,7 +32,7 @@
Dt_Task dbtask = Repository.Db.Queryable<Dt_Task>().Where(x => x.PalletCode == palletCode).OrderByDescending(x=>x.CreateDate).First();
if (dbtask != null)
{
- _logger.LogInformation(dbtask.TaskType.ToString());
+ _logger.LogInformation($"浠诲姟绫诲瀷{dbtask.TaskType.ToString()} ,{dbtask.TaskNum} ");
if (dbtask.TaskType == TaskTypeEnum.Outbound.ObjToInt())
{
return WebResponseContent.Instance.Error($"鍑哄簱寰呭垎鎷d换鍔�");
--
Gitblit v1.9.3