From 5c8312d4c1ccc5c739bd7c519edfe7c754a1f0ff Mon Sep 17 00:00:00 2001
From: lvzb <35200379@qq.com>
Date: Thu, 6 Jun 2024 16:46:52 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Outgoing/TransferNoteConverter.cs | 27 ++++++++++++++-----
...lannedIssueRequestForDongyangAppService.cs | 2 +-
...nnedReceiptRequestForDongyangAppService.cs | 3 +--
3 files changed, 23 insertions(+), 9 deletions(-)
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TransferNoteConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TransferNoteConverter.cs
index ea522406e..0bdeb4e58 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TransferNoteConverter.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TransferNoteConverter.cs
@@ -19,6 +19,7 @@ public class TransferNoteConverter : IOutgoingConverter
{
private readonly string billtype_s = "4002";
private readonly string billtype_w = "4033";
+ private readonly string billtype_issue = "4026";//线边仓领料单
private readonly IOutgoingFromWmsManager _outgoingFromWmsManager;
private readonly IOutgoingToExternalManager _outgoingToExternalManager;
private readonly IDepartmentAppService _departmentAppService;
@@ -77,11 +78,20 @@ public class TransferNoteConverter : IOutgoingConverter
if (exchangeReceipt.Type != EnumTransSubType.Transfer_Customer.ToString())
{
outgoingToExternal.DataType = EnumOutgoingDataType.TransferForErp.ToString();
- var putawayNoteScontrol = BuildScontrolDataInterface(exchangeReceipt, dt_w);
+ var putawayNoteScontrol = BuildScontrolDataInterface(exchangeReceipt, dt_w, billtype_s);
outgoingToExternal.DestinationDataContent = JsonSerializer.Serialize(putawayNoteScontrol);
WipDetails =details.GroupBy(r => new { r.Number, r.ItemCode, r.FromLocationErpCode , r.ToLocationErpCode }).Select(p => new TransferNoteDetailExchangeDto { Qty = p.Sum(itm => itm.Qty), Number = p.Key.Number, ItemCode = p.Key.ItemCode, FromLocationErpCode = p.Key.FromLocationErpCode, ToLocationErpCode=p.Key.ToLocationErpCode }).ToList();
+ }
+ else if (exchangeReceipt.Type != EnumTransSubType.Depot_Issue_WIP.ToString())//立库生成的线边仓领料单
+ {
+ outgoingToExternal.DataType = EnumOutgoingDataType.TransferForErp.ToString();
+ var putawayNoteScontrol = BuildScontrolDataInterface(exchangeReceipt, dt_w, billtype_issue);
+ outgoingToExternal.DestinationDataContent = JsonSerializer.Serialize(putawayNoteScontrol);
+
+ WipDetails = details.GroupBy(r => new { r.Number, r.ItemCode, r.FromLocationErpCode, r.ToLocationErpCode }).Select(p => new TransferNoteDetailExchangeDto { Qty = p.Sum(itm => itm.Qty), Number = p.Key.Number, ItemCode = p.Key.ItemCode, FromLocationErpCode = p.Key.FromLocationErpCode, ToLocationErpCode = p.Key.ToLocationErpCode }).ToList();
+
}
else
{
@@ -119,7 +129,12 @@ public class TransferNoteConverter : IOutgoingConverter
if (exchangeReceipt.Type != EnumTransSubType.Transfer_Customer.ToString())
{
- var putawayNoteDetailScmsend = BuildScmsendDataInterfaceDetail(exchangeReceipt, detail, dt_w);
+ var putawayNoteDetailScmsend = BuildScmsendDataInterfaceDetail(exchangeReceipt, detail, dt_w, billtype_s);
+ outgoingDetailToExternal.DestinationDataContent = JsonSerializer.Serialize(putawayNoteDetailScmsend);
+ }
+ else if (exchangeReceipt.Type != EnumTransSubType.Depot_Issue_WIP.ToString())//立库生成的线边仓领料单
+ {
+ var putawayNoteDetailScmsend = BuildScmsendDataInterfaceDetail(exchangeReceipt, detail, dt_w, billtype_issue);
outgoingDetailToExternal.DestinationDataContent = JsonSerializer.Serialize(putawayNoteDetailScmsend);
}
else
@@ -146,7 +161,7 @@ public class TransferNoteConverter : IOutgoingConverter
///
///
///
- private Scontrol BuildScontrolDataInterface(TransferNoteExchangeDto exchangeOrder, string dt_w)
+ private Scontrol BuildScontrolDataInterface(TransferNoteExchangeDto exchangeOrder, string dt_w,string type)
{
var ret = new Scontrol()
{
@@ -154,7 +169,7 @@ public class TransferNoteConverter : IOutgoingConverter
scontrol_dt_w = dt_w,
scontrol_stat = "Y",
scontrol_dt_k = "",
- scontrol_type = billtype_s,
+ scontrol_type = type,
scontrol_id = 0,//明细中最大scmsend_id
};
return ret;
@@ -165,11 +180,11 @@ public class TransferNoteConverter : IOutgoingConverter
///
///
///
- private Scmsend BuildScmsendDataInterfaceDetail(TransferNoteExchangeDto exchangeOrder, TransferNoteDetailExchangeDto exchangeDetailOrder, string dt_w)
+ private Scmsend BuildScmsendDataInterfaceDetail(TransferNoteExchangeDto exchangeOrder, TransferNoteDetailExchangeDto exchangeDetailOrder, string dt_w,string type)
{
var ret = new Scmsend()
{
- scmsend_type = billtype_s,
+ scmsend_type = type,
scmsend_dt_w = dt_w,
scmsend_nbr = exchangeOrder.Number,
scmsend_stat1 = "0",
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedIssueRequests/UnplannedIssueRequestForDongyangAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedIssueRequests/UnplannedIssueRequestForDongyangAppService.cs
index e4628b64c..4c24c6ed6 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedIssueRequests/UnplannedIssueRequestForDongyangAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedIssueRequests/UnplannedIssueRequestForDongyangAppService.cs
@@ -109,7 +109,7 @@ public class UnplannedIssueRequestForDongyangAppService : UnplannedIssueRequestA
$"或{EnumLocationType.SEMI.GetDisplayName()}" +
$"或{EnumLocationType.FG.GetDisplayName()}】");
}
- unplannedIssueRequest.DirectCreateNote = false;
+ // unplannedIssueRequest.DirectCreateNote = false;
input.IsPackingCode = true;//只查询带箱码的推荐
}
if (unplannedIssueRequest.UnplannedIssueType == EnumUnplannedIssueType.Wip)
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedReceiptRequests/UnplannedReceiptRequestForDongyangAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedReceiptRequests/UnplannedReceiptRequestForDongyangAppService.cs
index 847368731..8f1bac0d2 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedReceiptRequests/UnplannedReceiptRequestForDongyangAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedReceiptRequests/UnplannedReceiptRequestForDongyangAppService.cs
@@ -60,7 +60,6 @@ public class UnplannedReceiptRequestForDongyangAppService : UnplannedReceiptRequ
{
await SetDetailPropertiesAsync(item).ConfigureAwait(false);
}
-
entity.AutoCompleteJob = false; //任务到记录
entity.AutoSubmit = true;
entity.AutoAgree = true;
@@ -111,7 +110,7 @@ public class UnplannedReceiptRequestForDongyangAppService : UnplannedReceiptRequ
$"或{EnumLocationType.SEMI.GetDisplayName()}】" +
$"或{EnumLocationType.FG.GetDisplayName()}】");
}
- unplannedReceiptRequest.DirectCreateNote = false;
+ // unplannedReceiptRequest.DirectCreateNote = false;
//需要复制一个这个方法 去掉区域参数 换成库位参数
//RecommendBalanceRequestInput input = new RecommendBalanceRequestInput();
//input.ItemCode = detail.ItemCode;