Browse Source

接口修改

dev_DY_CC
lvzb 11 months ago
parent
commit
5c8312d4c1
  1. 27
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TransferNoteConverter.cs
  2. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedIssueRequests/UnplannedIssueRequestForDongyangAppService.cs
  3. 3
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedReceiptRequests/UnplannedReceiptRequestForDongyangAppService.cs

27
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
/// </summary>
/// <param name="exchangeOrder"></param>
/// <returns></returns>
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
/// <param name="exchangeOrder"></param>
/// <param name="exchangeDetailOrder"></param>
/// <returns></returns>
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",

2
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)

3
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;

Loading…
Cancel
Save