From 0705cb6170a9ba77ba48bbb6dcebb9cf3d73cbea Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期二, 14 十月 2025 02:12:25 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn
---
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs | 38 ++++++++++++++++++++++++--------------
1 files changed, 24 insertions(+), 14 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs"
index d96efaa..7b1f8e9 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs"
@@ -30,7 +30,7 @@
/// MES鎴愬搧鍏ュ簱鍗曟帴鏀�
/// </summary>
/// <returns></returns>
- public MesResponseContent BagInfoSync(MesBagInfoModel bagInfoModel)
+ public MesResponseContent BagInfoSync(MesBagInfoModel bagInfoModel, string formSign = "")
{
MesResponseContent content = new MesResponseContent();
try
@@ -74,6 +74,10 @@
}
if (bagInfoModel.BatchNo.Substring(0, 3).ToUpper() == "CPK")
{
+ if (warehouse.WarehouseCode==WarehouseEnum.HA73.ToString())
+ {
+ return content.Error($"鐮斿彂浠撳睘鎬т笉鑳藉叆骞冲簱");
+ }
WebResponseContent inProRespone = InPKProStock(bagInfoModel, proDetailsExists, warehouse);
if (!inProRespone.Status)
{
@@ -107,6 +111,7 @@
ERPOrder = child.ERPOrder,
SaleOrder = child.SaleOrder,
MoNumber = child.MoNumber,
+ IsFineWorks=item.IsFineWorks,
};
mesProInOrderDetails.Add(mesProInOrderDetail);
}
@@ -165,25 +170,29 @@
WarehouseId = warehouse.WarehouseId,
PalletType = proStockInfo.PalletType,
MaterielCode = proStockInfo.proStockInfoDetails.Where(x => x.ProStockId == proStockInfo.Id).FirstOrDefault()?.ProductCode,
- Quantity = (float)proStockInfo.proStockInfoDetails.Where(x => x.ProStockId == proStockInfo.Id).Sum(x => x.StockPcsQty)
+ Quantity = (float)proStockInfo.proStockInfoDetails.Where(x => x.ProStockId == proStockInfo.Id).Sum(x => x.StockPcsQty),
+ BatchNo = proStockInfo.proStockInfoDetails.Where(x => x.ProStockId == proStockInfo.Id).FirstOrDefault()?.LotNumber,
};
_unitOfWorkManage.BeginTran();
int taskId = BaseDal.AddData(newTask);
newTask.TaskId = taskId;
Db.InsertNav(proStockInfo).Include(x => x.proStockInfoDetails).ExecuteCommand();
//涓婁紶ERP
- WebResponseContent responseContent = _inboundOrderService.FeedbackProIn(mesProInOrder);
+ if (string.IsNullOrEmpty(formSign))
+ {
+ WebResponseContent responseContent = _inboundOrderService.FeedbackProIn(mesProInOrder);
+ if (!responseContent.Status)
+ {
+ //mesProInOrder.UpErpStatus = WhetherEnum.False.ObjToInt();
+ //mesProInOrder.Remark = responseContent.Message;
+ throw new Exception(responseContent.Message);
+ }
+ else
+ {
+ mesProInOrder.UpErpStatus = WhetherEnum.True.ObjToInt();
+ }
+ }
_proInStatisticsService.SaveStatic(bagInfoModel);
- if (!responseContent.Status)
- {
- //mesProInOrder.UpErpStatus = WhetherEnum.False.ObjToInt();
- //mesProInOrder.Remark = responseContent.Message;
- throw new Exception(responseContent.Message);
- }
- else
- {
- mesProInOrder.UpErpStatus = WhetherEnum.True.ObjToInt();
- }
Db.InsertNav(mesProInOrder).Include(x => x.Details).ExecuteCommand();
_unitOfWorkManage.CommitTran();
//鎺ㄩ�佷换鍔�
@@ -435,7 +444,7 @@
mesShipOrderDetails.Add(orderDetail);
MesShipmentOrderSync shipmentOrderSync = new MesShipmentOrderSync()
{
- ShipmentOrder = proOutOrder.ProOutOrderNo+"-"+ outProStockInfo.TaskNum,
+ ShipmentOrder = proOutOrder.ProOutOrderNo,
PlantShipDate = proOutOrder.PlantShipDate.ToString("yyyy-MM-dd HH:mm:ss"),
Customer = proOutOrderDetail.EndCustomer,
FactoryCode = proOutOrderDetail.FactoryCode,
@@ -663,6 +672,7 @@
throw new Exception("鍚屾MES搴撳瓨鏉垮嚭搴撳け璐�,閿欒:" + responseContent.Message);
}
_unitOfWorkManage.CommitTran();
+ PushTasksToWCS(tasks);
}
return content.OK($"鎻愪緵杩斿簱鍗曟帴鏀舵垚鍔�,ReceiveDown:{model.ReceiveDown}");
}
--
Gitblit v1.9.3