From c0e49798942411b5dc57169d50f707c0bb247d25 Mon Sep 17 00:00:00 2001
From: yangpeixing <yangpeixing@hnkhzn.com>
Date: 星期一, 02 三月 2026 15:02:39 +0800
Subject: [PATCH] 1
---
WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs | 32 ++----
WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs | 10 +
WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 11 +-
WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrderService.cs | 235 ++++++++++++++++++++--------------------------
WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Service/InboundOrderDetailService.cs | 5
WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/NewPartialTaskService_Outbound.cs | 2
6 files changed, 134 insertions(+), 161 deletions(-)
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrderService.cs b/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrderService.cs
index d841b3d..56e688d 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrderService.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrderService.cs
@@ -469,7 +469,8 @@
Dt_InboundOrderDetail notGroupDetail = new Dt_InboundOrderDetail();
- notGroupDetail = inboundOrder.Details.Where(x => x.OrderDetailStatus <= OrderDetailStatusEnum.Inbounding.ObjToInt() && x.MaterielCode == model.MaterielCode && x.BatchNo == model.LotNo).FirstOrDefault();
+ notGroupDetail = inboundOrder.Details.Where(x => x.OrderDetailStatus <= OrderDetailStatusEnum.Inbounding.ObjToInt() && x.MaterielCode == model.MaterielCode && x.SupplierBatch == model.LotNo && x.OrderQuantity > x.ReceiptQuantity).FirstOrDefault();
+
if (notGroupDetail.MaterielType == 1)
{
stockInfo.WarehouseId = 6;
@@ -1298,7 +1299,7 @@
public int GetPalletType(Dt_Warehouse warehouse, string palletCode)
{
- if (warehouse.WarehouseCode == WarehouseEnum.SC01_BC.ObjToString())
+ if (warehouse.WarehouseCode.Contains("BC"))
{
Dt_PalletTypeInfo palletTypeInfo = _palletTypeInfoRepository.QueryFirst(x => x.CodeStartStr == palletCode.Substring(0, 3));
if (palletTypeInfo == null)
@@ -1316,35 +1317,7 @@
}
return palletTypeInfo.PalletType;
}
-
- //else if (warehouse.WarehouseCode == WarehouseEnum.HA152.ObjToString())
- //{
- // Dt_PalletTypeInfo palletTypeInfo = _palletTypeInfoRepository.QueryFirst(x => x.CodeStartStr == palletCode.Substring(0, 2));
- // if (palletTypeInfo == null)
- // {
- // throw new Exception($"鎵樼洏鍙烽敊璇�");
- // }
- // return palletTypeInfo.PalletType;
- //}
- //else if (warehouse.WarehouseCode == WarehouseEnum.HA57.ObjToString())
- //{
- // Dt_PalletTypeInfo palletTypeInfo = _palletTypeInfoRepository.QueryFirst(x => x.CodeStartStr == palletCode.Substring(0, 3));
- // if (palletTypeInfo == null)
- // {
- // throw new Exception($"鎵樼洏鍙烽敊璇�");
- // }
- // return palletTypeInfo.PalletType;
- //}
- //else if (warehouse.WarehouseCode == WarehouseEnum.HA58.ObjToString())
- //{
- // Dt_PalletTypeInfo palletTypeInfo = _palletTypeInfoRepository.QueryFirst(x => x.CodeStartStr == palletCode.Substring(0, 2));
- // if (palletTypeInfo == null)
- // {
- // throw new Exception($"鎵樼洏鍙烽敊璇�");
- // }
- // return palletTypeInfo.PalletType;
- //}
- return -1;
+ return 0;
}
/// <summary>
/// 鍒ゆ柇姝g‘鏃堕棿鏍煎紡
@@ -1581,7 +1554,7 @@
{
OrderId = orderDetail1.OrderId,
MaterielCode = item.MaterielCode,
- MaterielType=item.MaterielType,
+ MaterielType = item.MaterielType,
BatchNo = item.BatchNo,
OrderQuantity = item.OrderQuantity,
ReceiptQuantity = 0,
@@ -1777,11 +1750,11 @@
List<Dt_InboundOrder> dt_ReceiveOrders = new List<Dt_InboundOrder>();
if (string.IsNullOrEmpty(orderNo))
{
- dt_ReceiveOrders = Db.Queryable<Dt_InboundOrder>().Where(x => x.OrderStatus < InboundStatusEnum.鍏ュ簱瀹屾垚.ObjToInt() && x.WarehouseId == warehouseId).Includes(x => x.Details).OrderByDescending(x => x.CreateDate).ToPageList(pageNo, 10);
+ dt_ReceiveOrders = Db.Queryable<Dt_InboundOrder>().Where(x => x.OrderStatus < InboundStatusEnum.鍏ュ簱瀹屾垚.ObjToInt() && x.WarehouseId == warehouseId).Includes(x => x.Details).OrderByDescending(x => x.CreateDate).ToPageList(pageNo, 50);
}
else
{
- dt_ReceiveOrders = Db.Queryable<Dt_InboundOrder>().Where(x => (x.OrderNo.Contains(orderNo)) && x.OrderStatus < InboundStatusEnum.鍏ュ簱瀹屾垚.ObjToInt() && x.WarehouseId == warehouseId).Includes(x => x.Details).OrderByDescending(x => x.CreateDate).ToPageList(pageNo, 10);
+ dt_ReceiveOrders = Db.Queryable<Dt_InboundOrder>().Where(x => (x.OrderNo.Contains(orderNo)) && x.OrderStatus < InboundStatusEnum.鍏ュ簱瀹屾垚.ObjToInt() && x.WarehouseId == warehouseId).Includes(x => x.Details).OrderByDescending(x => x.CreateDate).ToPageList(pageNo, 50);
}
content.OK(data: dt_ReceiveOrders);
@@ -1944,7 +1917,7 @@
}
//鍙嶆嫞鍥炲簱鍗�
public WebResponseContent ReceiveReturnOrder(List<HouseReturnOrder> houseReturnOrder)
- {
+ {
try
{
Random random = new Random();
@@ -1952,119 +1925,119 @@
_unitOfWorkManage.BeginTran();
foreach (var item in houseReturnOrder)
{
- int randomNum = random.Next(1, 1000);
- string datePart = DateTime.Now.ToString("yyyyMMdd");
- Dt_ReturnOrder returnOrder = _returnOrderRepository.QueryFirst(x => x.LPNNo == item.LPNNo && x.OrderStatus == InOrderStatusEnum.鏈紑濮�.ObjToInt());
- if (returnOrder == null)
+ int randomNum = random.Next(1, 1000);
+ string datePart = DateTime.Now.ToString("yyyyMMdd");
+ Dt_ReturnOrder returnOrder = _returnOrderRepository.QueryFirst(x => x.LPNNo == item.LPNNo && x.OrderStatus == InOrderStatusEnum.鏈紑濮�.ObjToInt());
+ if (returnOrder == null)
+ {
+ Dt_ReturnOrder newReturnOrder = new Dt_ReturnOrder
{
- Dt_ReturnOrder newReturnOrder = new Dt_ReturnOrder
- {
- OrderType = OrderTypeEnum.鍙嶆嫞鍥炲簱鍗�.ObjToInt(),
- MaterielCode = item.MaterielCode,
- MaterielName = item.MaterielName,
+ OrderType = OrderTypeEnum.鍙嶆嫞鍥炲簱鍗�.ObjToInt(),
+ MaterielCode = item.MaterielCode,
+ MaterielName = item.MaterielName,
MaterieSpec = item.MaterieSpec,
- BatchNo = item.BatchNo,
- OrderQuantity = item.OrderQuantity,
+ BatchNo = item.BatchNo,
+ OrderQuantity = item.OrderQuantity,
Remark = item.Remark,
- LinId = item.LinId,
- LPNNo = item.LPNNo,
+ LinId = item.LinId,
+ LPNNo = item.LPNNo,
LocationCode = item.LocationCode,
WarehouseCode = item.WarehouseCode,
System = item.System,
- OrderStatus = InOrderStatusEnum.鏈紑濮�.ObjToInt(),
- Creater = "SMOM",
- CreateDate = DateTime.Now
- };
- _returnOrderRepository.AddData(newReturnOrder);
+ OrderStatus = InOrderStatusEnum.鏈紑濮�.ObjToInt(),
+ Creater = "SMOM",
+ CreateDate = DateTime.Now
+ };
+ _returnOrderRepository.AddData(newReturnOrder);
Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo, Dt_StockInfoDetail>((stock, detail) => stock.Id == detail.StockId).Where((stock, detail) => stock.PalletCode == item.LPNNo && stock.LocationCode == item.LocationCode).First();
- Dt_OutboundOrderDetail outboundOrderDetail = new Dt_OutboundOrderDetail();
- Dt_OutboundOrder outboundOrder = new Dt_OutboundOrder();
- if (stockInfo == null)
- {
+ Dt_OutboundOrderDetail outboundOrderDetail = new Dt_OutboundOrderDetail();
+ Dt_OutboundOrder outboundOrder = new Dt_OutboundOrder();
+ if (stockInfo == null)
+ {
Dt_Warehouse warehouse = _warehouseService.Repository.QueryData(x => x.WarehouseCode == item.WarehouseCode).FirstOrDefault();
- if (warehouse == null)
- {
+ if (warehouse == null)
+ {
return WebResponseContent.Instance.Error($"璇ヤ粨搴撶紪鍙穥item.WarehouseCode}鏈厤缃�");
- }
- Dt_StockInfoDetail stockInfoDetail = new Dt_StockInfoDetail
- {
- MaterielCode = item.MaterielCode,
- MaterielName = item.MaterielName,
+ }
+ Dt_StockInfoDetail stockInfoDetail = new Dt_StockInfoDetail
+ {
+ MaterielCode = item.MaterielCode,
+ MaterielName = item.MaterielName,
MaterieSpec = item.MaterieSpec,
- BatchNo = item.BatchNo,
- LinId = item.LinId,
- Status = StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt(),
- Creater = "SMOM",
- CreateDate = DateTime.Now,
- OrderNo = newReturnOrder.OrderNo,
- StockQuantity = item.OrderQuantity,
- };
- Dt_StockInfo stockInfo1 = new Dt_StockInfo
- {
- PalletCode = item.LPNNo,
- WarehouseId = warehouse.WarehouseId,
- BatchNo = item.BatchNo,
- PalletType = GetPalletType(warehouse, item.LPNNo),
- IsFull = true,
- StockStatus = (int)StockStatusEmun.鍙嶆嫞鍏ュ簱,
- Creater = "WMS",
- CreateDate = DateTime.Now,
- MaterialType = (int)InventoryMaterialType.鍘熸潗鏂�,
- Materialweight = 0,
- Wlstatus = (int)InventoryMaterialStatus.鍚堟牸,
- Mgeneratetime = DateTime.Now,
- Details = new List<Dt_StockInfoDetail> { stockInfoDetail }
- };
- Db.InsertNav(stockInfo1).Include(x => x.Details).ExecuteCommand();
- }
- else
- {
- outboundOrderDetail = new Dt_OutboundOrderDetail
- {
- MaterielCode = item.MaterielCode,
- MaterielName = item.MaterielName,
- MaterieSpec = item.MaterieSpec,
- BatchNo = item.BatchNo,
- OrderQuantity = stockInfo.Details.Sum(x => x.StockQuantity),
- Remark = item.Remark,
- LinId = item.LinId,
- LPNNo = item.LPNNo,
- Creater = "SMOM",
- CreateDate = DateTime.Now,
- LocationName = item.LocationCode
- };
- outboundOrder = new Dt_OutboundOrder
- {
- OrderNo = "FJCK" + $"{datePart}{randomNum}",
- UpperOrderNo = "WMSFJCK" + $"{datePart}{randomNum}",
- OrderStatus = OutOrderStatusEnum.鏈紑濮�.ObjToInt(),
- OrderType = OrderTypeEnum.鍙嶆嫞鍑哄簱鍗�.ObjToInt(),
- InoutType = InoutTypeEnum.OtherOut.ToString(),
- System = item.System,
- Creater = "SMOM",
- CreateDate = DateTime.Now,
- CreateType = OrderCreateTypeEnum.UpperSystemPush.ObjToInt(),
- Details = new List<Dt_OutboundOrderDetail> { outboundOrderDetail }
- };
- Db.InsertNav(outboundOrder).Include(x => x.Details).ExecuteCommand();
- }
-
+ BatchNo = item.BatchNo,
+ LinId = item.LinId,
+ Status = StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt(),
+ Creater = "SMOM",
+ CreateDate = DateTime.Now,
+ OrderNo = newReturnOrder.OrderNo,
+ StockQuantity = item.OrderQuantity,
+ };
+ Dt_StockInfo stockInfo1 = new Dt_StockInfo
+ {
+ PalletCode = item.LPNNo,
+ WarehouseId = warehouse.WarehouseId,
+ BatchNo = item.BatchNo,
+ PalletType = GetPalletType(warehouse, item.LPNNo),
+ IsFull = true,
+ StockStatus = (int)StockStatusEmun.鍙嶆嫞鍏ュ簱,
+ Creater = "WMS",
+ CreateDate = DateTime.Now,
+ MaterialType = (int)InventoryMaterialType.鍘熸潗鏂�,
+ Materialweight = 0,
+ Wlstatus = (int)InventoryMaterialStatus.鍚堟牸,
+ Mgeneratetime = DateTime.Now,
+ Details = new List<Dt_StockInfoDetail> { stockInfoDetail }
+ };
+ Db.InsertNav(stockInfo1).Include(x => x.Details).ExecuteCommand();
}
else
{
- Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo, Dt_StockInfoDetail>((stock, detail) => stock.Id == detail.StockId).Where((stock, detail) => stock.PalletCode == item.LPNNo && stock.StockStatus == StockStatusEmun.浣欐枡閫�搴�.ObjToInt()).First();
- stockInfo.StockStatus = StockStatusEmun.鍙嶆嫞鍏ュ簱.ObjToInt();
- returnOrder.LinId = item.LinId;
+ outboundOrderDetail = new Dt_OutboundOrderDetail
+ {
+ MaterielCode = item.MaterielCode,
+ MaterielName = item.MaterielName,
+ MaterieSpec = item.MaterieSpec,
+ BatchNo = item.BatchNo,
+ OrderQuantity = stockInfo.Details.Sum(x => x.StockQuantity),
+ Remark = item.Remark,
+ LinId = item.LinId,
+ LPNNo = item.LPNNo,
+ Creater = "SMOM",
+ CreateDate = DateTime.Now,
+ LocationName = item.LocationCode
+ };
+ outboundOrder = new Dt_OutboundOrder
+ {
+ OrderNo = "FJCK" + $"{datePart}{randomNum}",
+ UpperOrderNo = "WMSFJCK" + $"{datePart}{randomNum}",
+ OrderStatus = OutOrderStatusEnum.鏈紑濮�.ObjToInt(),
+ OrderType = OrderTypeEnum.鍙嶆嫞鍑哄簱鍗�.ObjToInt(),
+ InoutType = InoutTypeEnum.OtherOut.ToString(),
+ System = item.System,
+ Creater = "SMOM",
+ CreateDate = DateTime.Now,
+ CreateType = OrderCreateTypeEnum.UpperSystemPush.ObjToInt(),
+ Details = new List<Dt_OutboundOrderDetail> { outboundOrderDetail }
+ };
+ Db.InsertNav(outboundOrder).Include(x => x.Details).ExecuteCommand();
+ }
+
+ }
+ else
+ {
+ Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo, Dt_StockInfoDetail>((stock, detail) => stock.Id == detail.StockId).Where((stock, detail) => stock.PalletCode == item.LPNNo && stock.StockStatus == StockStatusEmun.浣欐枡閫�搴�.ObjToInt()).First();
+ stockInfo.StockStatus = StockStatusEmun.鍙嶆嫞鍏ュ簱.ObjToInt();
+ returnOrder.LinId = item.LinId;
returnOrder.System = item.System;
returnOrder.WarehouseCode = item.WarehouseCode;
returnOrder.LocationCode = item.LocationCode;
- returnOrder.OrderType = OrderTypeEnum.鍙嶆嫞鍥炲簱鍗�.ObjToInt();
- returnOrder.OrderQuantity += item.OrderQuantity;
- returnOrder.ReceiptQuantity += item.OrderQuantity;
- _returnOrderRepository.UpdateData(returnOrder);
- _stockRepository.StockInfoRepository.UpdateData(stockInfo);
+ returnOrder.OrderType = OrderTypeEnum.鍙嶆嫞鍥炲簱鍗�.ObjToInt();
+ returnOrder.OrderQuantity += item.OrderQuantity;
+ returnOrder.ReceiptQuantity += item.OrderQuantity;
+ _returnOrderRepository.UpdateData(returnOrder);
+ _stockRepository.StockInfoRepository.UpdateData(stockInfo);
- }
+ }
}
_unitOfWorkManage.CommitTran();
return WebResponseContent.Instance.OK();
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Service/InboundOrderDetailService.cs b/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Service/InboundOrderDetailService.cs
index 483cfce..8d5a384 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Service/InboundOrderDetailService.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Service/InboundOrderDetailService.cs
@@ -57,7 +57,10 @@
{
string orderNo = saveModel.MainData["orderNo"].ToString();
Dt_InboundOrder inboundOrder = Db.Queryable<Dt_InboundOrder>().Where(x => x.OrderNo == orderNo).Includes(x => x.Details).First();
- content.OK(data: inboundOrder.Details);
+ if (inboundOrder != null)
+ {
+ content.OK(data: inboundOrder.Details);
+ }
}
catch (Exception ex)
{
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/NewPartialTaskService_Outbound.cs b/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/NewPartialTaskService_Outbound.cs
index 8c7a3ae..94278e9 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/NewPartialTaskService_Outbound.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/NewPartialTaskService_Outbound.cs
@@ -444,7 +444,7 @@
}
}
}
-
+
}
_unitOfWorkManage.CommitTran();
}
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs b/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs
index 803d1cb..766fb14 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs
@@ -645,9 +645,8 @@
//鏌ヨ浠撳簱鎵樼洏璐х墿绫诲瀷
public int GetPalletType(Dt_Warehouse warehouse, string palletCode)
{
- if (warehouse.WarehouseCode == WarehouseEnum.SC01_BC.ObjToString() || warehouse.WarehouseCode == WarehouseEnum.SC02_BC.ObjToString())
+ if (warehouse.WarehouseCode.Contains("BC"))
{
-
Dt_PalletTypeInfo palletTypeInfo = _palletTypeInfoRepository.QueryFirst(x => x.CodeStartStr == palletCode.Substring(0, 3));
if (palletTypeInfo == null)
{
@@ -655,25 +654,16 @@
}
return palletTypeInfo.PalletType;
}
- //else if (warehouse.WarehouseCode == WarehouseEnum.HA152.ObjToString())
- //{
- // Dt_PalletTypeInfo palletTypeInfo = _palletTypeInfoRepository.QueryFirst(x => x.CodeStartStr == palletCode.Substring(0, 2));
- // if (palletTypeInfo == null)
- // {
- // throw new Exception($"鎵樼洏鍙烽敊璇�");
- // }
- // return palletTypeInfo.PalletType;
- //}
- //else if (warehouse.WarehouseCode == WarehouseEnum.HA57.ObjToString())
- //{
- // Dt_PalletTypeInfo palletTypeInfo = _palletTypeInfoRepository.QueryFirst(x => x.CodeStartStr == palletCode.Substring(0, 3));
- // if (palletTypeInfo == null)
- // {
- // throw new Exception($"鎵樼洏鍙烽敊璇�");
- // }
- // return palletTypeInfo.PalletType;
- //}
- return 3;
+ else
+ {
+ Dt_PalletTypeInfo palletTypeInfo = _palletTypeInfoRepository.QueryFirst(x => x.CodeStartStr == palletCode.Substring(0, 2));
+ if (palletTypeInfo == null)
+ {
+ throw new Exception($"鎵樼洏鍙烽敊璇�");
+ }
+ return palletTypeInfo.PalletType;
+ }
+ return 0;
}
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs b/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs
index 88e91e2..64abb64 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs
@@ -1161,7 +1161,15 @@
BaseDal.AddData(tasks);
_basicService.LocationInfoService.Repository.UpdateLocationStatus(locationInfos, locationStatus);
_unitOfWorkManage.CommitTran();
- PushTasksToWCS(tasks);
+ if (tasks.FirstOrDefault().PalletCode.Contains("BC"))
+ {
+ PushTasksToWCS(tasks);
+ }
+ else
+ {
+ PushTasksWCS(tasks);
+ }
+
content.OK();
}
catch (Exception ex)
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs b/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
index 9eccfaa..b8909c6 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
@@ -901,7 +901,7 @@
.ToList();
Dt_InboundOrder? dt_InboundOrder = _inboundService.InbounOrderService.Db.Queryable<Dt_InboundOrder>().Where(x => x.OrderNo == inboundOrder.OrderNo).Includes(x => x.Details).First();
- if (StockInfos.Count == 0) throw new Exception("鏈壘鍒板簱瀛樹俊鎭�");
+ if (StockInfos.Count == 0) throw new Exception("鏈壘鍒板簱瀛樹俊鎭�");
var houseSyncretism = new NewHouseInboundPassBack
{
@@ -1783,7 +1783,7 @@
.Where(x => x.OrderId == outboundOrder.Id)
.ToList();
}
- if ((outboundOrderDetails == null && outboundOrderDetails1 == null) || (outboundOrderDetails.Count == 0 && outboundOrderDetails1.Count == 0))
+ if ((outboundOrderDetails == null && outboundOrderDetails1 == null) || (outboundOrderDetails.Count == 0 && outboundOrderDetails1.Count == 0))
{
throw new Exception($"鏈壘鍒版墭鐩� {stockInfo.PalletCode} 鍦ㄨ揣浣� {stockInfo.LocationCode} 涓婄殑鍑哄簱鍗曟槑缁�");
}
@@ -2278,7 +2278,7 @@
outboundOrderDetails.Add(outboundOrderDetail);
}
- for (var i = 0; i<outboundOrderDetails.Count; i++)
+ for (var i = 0; i < outboundOrderDetails.Count; i++)
{
if (outboundOrderDetails[i].LocationName != null && outboundOrderDetails[i].LocationName != "")
{
@@ -3589,12 +3589,11 @@
{
Console.WriteLine($"馃搫 姝e湪鎵撳嵃鍒� {printerName}: {Path.GetFileName(filePath)}");
- string command = $"lpr -P {printerName} \"{filePath}\"";
+ // 浣跨敤 lp 鍛戒护锛屾坊鍔� -o raw 閫夐」
+ string command = $"lp -d {printerName} -o raw \"{filePath}\"";
ExecuteShellCommand(command);
}
-
-
/// <summary>
/// 鎵ц Shell 鍛戒护
/// </summary>
--
Gitblit v1.9.3