Browse Source

eos接口修改、tyrp接口修改出货单汇总明细

集成Redis
lvzb 2 years ago
parent
commit
2efe5514c3
  1. 2
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Eos/Arrives/ArriveNote.cs
  2. 4
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ArriveConverter.cs
  3. 12
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/DeliverNoteConverter.cs
  4. 2
      be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/PutawayNote/PutawayNoteDetailExchangeDto.cs
  5. 3
      be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore/OutgoingFromWms/OutgoingFromWmsEfCoreRepository.cs

2
be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Eos/Arrives/ArriveNote.cs

@ -39,7 +39,7 @@ public class ArriveNote : Entity<decimal>
/// <summary> /// <summary>
/// 生产时间 /// 生产时间
/// </summary> /// </summary>
public DateTime ProductDate { get; set; } public DateTime? ProductDate { get; set; }
/// <summary> /// <summary>
/// 生产批次 /// 生产批次
/// </summary> /// </summary>

4
be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ArriveConverter.cs

@ -105,6 +105,10 @@ public class ArriveConverter : IOutgoingConverter
{ {
detail.ShipDate = null; detail.ShipDate = null;
} }
if (detail.ProduceDate == nulltime)
{
detail.ProduceDate = null;
}
var arrive = new ArriveNote() var arrive = new ArriveNote()
{ {
PlanBillNo = detail.PoNumber, PlanBillNo = detail.PoNumber,

12
be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/DeliverNoteConverter.cs

@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text.Json; using System.Text.Json;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.ObjectMapping; using Volo.Abp.ObjectMapping;
@ -65,7 +66,9 @@ public class DeliverNoteConverter : IOutgoingConverter
#endregion #endregion
#region 明细 #region 明细
foreach (var detail in wmsReceipt.Details) var WipDetails = wmsReceipt.Details.GroupBy(r=>new { r.Number,r.ItemCode,r.FromLocationErpCode}).Select(p => new DeliverNoteDetailExchangeDto { Qty = p.Sum(itm => itm.Qty), Number = p.Key.Number, ItemCode = p.Key.ItemCode, FromLocationErpCode = p.Key.FromLocationErpCode });
foreach (var detail in WipDetails)
{ {
var outgoingDetailToExternal = new OutgoingToExternal() var outgoingDetailToExternal = new OutgoingToExternal()
{ {
@ -73,7 +76,7 @@ public class DeliverNoteConverter : IOutgoingConverter
TableType = EnumExchangeTableType.DetailTable, TableType = EnumExchangeTableType.DetailTable,
DataAction = outgoingFromWms.DataAction, DataAction = outgoingFromWms.DataAction,
SourceSystem = EnumSystemType.WMS.ToString(), SourceSystem = EnumSystemType.WMS.ToString(),
SourceDataId = detail.Id.ToString(), SourceDataId = detail.Number.ToString(),
SourceDataGroupCode = wmsReceipt.Number, SourceDataGroupCode = wmsReceipt.Number,
SourceDataDetailCode = detail.ItemCode, SourceDataDetailCode = detail.ItemCode,
Writer = nameof(TyrpOutgoingBackgroundWorker), Writer = nameof(TyrpOutgoingBackgroundWorker),
@ -81,9 +84,8 @@ public class DeliverNoteConverter : IOutgoingConverter
DestinationDataId = "", DestinationDataId = "",
}; };
outgoingDetailToExternal.SetEffectiveDate(outgoingFromWms.EffectiveDate); outgoingDetailToExternal.SetEffectiveDate(outgoingFromWms.EffectiveDate);
var exchangeReceiptDetail = _objectMapper.Map<DeliverNoteDetailDTO, DeliverNoteDetailExchangeDto>(detail); outgoingDetailToExternal.SourceDataContent = JsonSerializer.Serialize(detail);
outgoingDetailToExternal.SourceDataContent = JsonSerializer.Serialize(exchangeReceiptDetail); var purchaseOrderDetail = BuildDataInterfaceDetail(exchangeReceipt, detail);
var purchaseOrderDetail = BuildDataInterfaceDetail(exchangeReceipt, exchangeReceiptDetail);
outgoingDetailToExternal.DestinationDataContent = JsonSerializer.Serialize(purchaseOrderDetail); outgoingDetailToExternal.DestinationDataContent = JsonSerializer.Serialize(purchaseOrderDetail);
outgoingToExternalList.Add(outgoingDetailToExternal); outgoingToExternalList.Add(outgoingDetailToExternal);
} }

2
be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/PutawayNote/PutawayNoteDetailExchangeDto.cs

@ -65,7 +65,7 @@ public class PutawayNoteDetailExchangeDto
/// 生产时间 /// 生产时间
/// </summary> /// </summary>
[Display(Name = "生产时间")] [Display(Name = "生产时间")]
public DateTime ProduceDate { get; set; } = DateTime.Now; public DateTime? ProduceDate { get; set; } = DateTime.Now;
/// <summary> /// <summary>
/// 发货单号 /// 发货单号
/// </summary> /// </summary>

3
be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore/OutgoingFromWms/OutgoingFromWmsEfCoreRepository.cs

@ -1,3 +1,4 @@
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -28,6 +29,8 @@ public class OutgoingFromWmsEfCoreRepository : SfsEfCoreRepositoryBase<DataExcha
public virtual async Task<List<OutgoingFromWms>> GetListAsync(EnumOutgoingDataType dataType, EnumSystemType toSystemType) public virtual async Task<List<OutgoingFromWms>> GetListAsync(EnumOutgoingDataType dataType, EnumSystemType toSystemType)
{ {
// DateTime.TryParse("2023-09-09", out DateTime aa);
var dbSet = await GetDbSetAsync().ConfigureAwait(false); var dbSet = await GetDbSetAsync().ConfigureAwait(false);
var entities = await dbSet var entities = await dbSet
.Where(p => p.Status == EnumExchangeDataStatus.Unread .Where(p => p.Status == EnumExchangeDataStatus.Unread

Loading…
Cancel
Save