金蝶同步数据调整

This commit is contained in:
18942506660
2024-03-06 11:53:39 +08:00
parent 252e7926ac
commit 4221de3d75
2 changed files with 26 additions and 0 deletions

View File

@@ -4664,6 +4664,13 @@
<param name="isTransaction"></param> <param name="isTransaction"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:WMS.Web.Domain.Services.OutStockTaskService.SsynDateComparison(WMS.Web.Domain.Entitys.OutStockTask,System.Collections.Generic.List{WMS.Web.Core.Dto.Erp.OutStock.ErpDeliveryNoticeOutStockResultDto})">
<summary>
金蝶数据同步时比对数据
金蝶单据明细行删除后wms明细数量调整为0
</summary>
<returns></returns>
</member>
<member name="M:WMS.Web.Domain.Services.OutStockTaskService.BillQueryForDeliveryNoticeOutStock(System.Boolean,System.Collections.Generic.List{System.String},System.Nullable{System.DateTime})"> <member name="M:WMS.Web.Domain.Services.OutStockTaskService.BillQueryForDeliveryNoticeOutStock(System.Boolean,System.Collections.Generic.List{System.String},System.Nullable{System.DateTime})">
<summary> <summary>
发货通知单同步数据 发货通知单同步数据

View File

@@ -8,6 +8,7 @@ using System.Threading.Tasks;
using WMS.Web.Core.Dto; using WMS.Web.Core.Dto;
using WMS.Web.Core.Dto.Erp.OutStock; using WMS.Web.Core.Dto.Erp.OutStock;
using WMS.Web.Core.Dto.Login; using WMS.Web.Core.Dto.Login;
using WMS.Web.Core.Help;
using WMS.Web.Core.Internal.Results; using WMS.Web.Core.Internal.Results;
using WMS.Web.Domain.Entitys; using WMS.Web.Domain.Entitys;
using WMS.Web.Domain.Infrastructure; using WMS.Web.Domain.Infrastructure;
@@ -195,6 +196,24 @@ namespace WMS.Web.Domain.Services
/// <returns></returns> /// <returns></returns>
public Result SsynDateComparison(OutStockTask outStockTask, List<ErpDeliveryNoticeOutStockResultDto> erp_list) public Result SsynDateComparison(OutStockTask outStockTask, List<ErpDeliveryNoticeOutStockResultDto> erp_list)
{ {
var erpDetails = outStockTask.Details.SelectMany(s => s.ErpDetails).ToList().Clone();
foreach (var d in outStockTask.Details)
{
foreach (var ed in d.ErpDetails)
{
//没有找到这条出库任务单里的来源单信息,则跳过这条数据(有些合并的单据,当前没有找到金蝶对应的单据(时间超出范围了等情况))
var erp_o = erp_list.Where(w => w.SourceBillNo == ed.SourceBillNo).ToList();
if (erp_o.Count() == 0) continue;
var erp_d = erp_list.Where(w => w.MaterialId == d.MaterialId && ed.Erp_DetailId == w.Erp_DetailId).ToList();
if (erp_d.Count() == 0)
{
//金蝶删除明细数据后 wms对应数据修改为0
ed.AccruedQty = 0;
d.AccruedQty = d.ErpDetails.Sum(s => s.AccruedQty);
}
}
}
return Result.ReSuccess(); return Result.ReSuccess();
} }