From cbf06cbb2e7988fdee53507dede034756ebfbf59 Mon Sep 17 00:00:00 2001
From: hutongqing <hutongqing@hnkhzn.com>
Date: 星期二, 14 一月 2025 15:47:40 +0800
Subject: [PATCH] 1
---
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs | 44 ++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 44 insertions(+), 0 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
index b4686f5..8a57f20 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
@@ -407,6 +407,41 @@
_inboundRepository.InboundOrderRepository.UpdateData(inboundOrder);
_recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfo, stockInfoDetails, beforeQuantity, totalQuantity, StockChangeTypeEnum.Inbound);
_unitOfWorkManage.CommitTran();
+
+ #region 涓婃姤ERP鍏ュ簱瀹屾垚
+ List<ERPInboundDetailModel> detailModels = new List<ERPInboundDetailModel>();
+ foreach (var item in stockInfo.Details)
+ {
+ ERPInboundDetailModel detailModel = new ERPInboundDetailModel()
+ {
+ ExpiryDate = item.EffectiveDate ?? "",
+ LocationCode = warehouse.WarehouseCode,
+ MaterialsCode = item.MaterielCode,
+ MfgDate = item.ProductionDate ?? "",
+ QtyCustoms = "0",
+ Quantity = item.StockQuantity.ToString(),
+ Rack = stockInfo.LocationCode,
+ ReceiptCode = inboundOrder.UpperOrderNo,
+ ReceiptSerNo = item.InboundOrderRowNo.ToString()
+ };
+ detailModels.Add(detailModel);
+ }
+ ERPInboundModel eRPInboundModel = new ERPInboundModel()
+ {
+ Code = inboundOrder.InboundOrderNo,
+ CreatorCode = inboundOrder.Creater,
+ EntDate = inboundOrder.CreateDate.ToString("yyyy-MM-dd HH:mm:ss"),
+ StockDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
+ SuppliersId = inboundOrder.SupplierId,
+ Type = "S",
+ UniqueTag = inboundOrder.Id.ToString(),
+ WarehouseCode = warehouse.WarehouseCode,
+ Way = 1,
+ Details = detailModels
+ };
+ //鎺ㄩ�丒RP 娴嬭瘯娉ㄩ噴
+ _invokeERPService.InvokeInboundOrderApi(eRPInboundModel);
+ #endregion
content.OK();
}
catch (Exception ex)
@@ -870,6 +905,15 @@
return PalletTypeEnum.LargestPallet.ObjToInt();
}
}
+ else if (warehouse.WarehouseCode == WarehouseEnum.HA153.ObjToString())
+ {
+ Dt_PalletTypeInfo palletTypeInfo = _palletTypeInfoRepository.QueryFirst(x => x.CodeStartStr == palletCode.Substring(0, 1));
+ if (palletTypeInfo == null)
+ {
+ throw new Exception($"鎵樼洏鍙烽敊璇�");
+ }
+ return palletTypeInfo.PalletType;
+ }
else if (warehouse.WarehouseCode == WarehouseEnum.HA152.ObjToString())
{
Dt_PalletTypeInfo palletTypeInfo = _palletTypeInfoRepository.QueryFirst(x => x.CodeStartStr == palletCode.Substring(0, 2));
--
Gitblit v1.9.3