入库任务单拉取修改
This commit is contained in:
@@ -822,7 +822,7 @@ namespace WMS.Web.Domain.Services
|
|||||||
_logger.LogInformation($"入库单->审核失败 单号:{billNo} erp明细Id:{erpDetail.ErpDetailId} 错误:{resSubmit.Message}");
|
_logger.LogInformation($"入库单->审核失败 单号:{billNo} erp明细Id:{erpDetail.ErpDetailId} 错误:{resSubmit.Message}");
|
||||||
return (resSubmit, SyncStatus.CheckFail, o_dto.Numbers.First());
|
return (resSubmit, SyncStatus.CheckFail, o_dto.Numbers.First());
|
||||||
}
|
}
|
||||||
_logger.LogInformation($"同步金蝶成功");
|
_logger.LogInformation($"入库单->同步金蝶成功->单号:{billNo} erp明细Id:{erpDetail.ErpDetailId}");
|
||||||
return (Result.ReSuccess(), SyncStatus.Success, o_dto.Numbers.First());
|
return (Result.ReSuccess(), SyncStatus.Success, o_dto.Numbers.First());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -308,37 +308,37 @@ namespace WMS.Web.Domain.Services
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
////
|
//金蝶修改了物料:老物料,应收数量修改为0,新物料新增一条
|
||||||
//var noMartDetails = new List<InStockTaskDetails>();
|
var noMartDetails = new List<InStockTaskDetails>();
|
||||||
//var data_list_details_new = data_list.SelectMany(x => x.Details).ToList();
|
var data_list_details_new = data_list.SelectMany(x => x.Details).ToList();
|
||||||
//data_list_details_new.ForEach(x =>
|
data_list_details_new.ForEach(x =>
|
||||||
//{
|
{
|
||||||
// //2.1.1对比erp的物料信息
|
//2.1.1对比erp的物料信息
|
||||||
// var erp_data = erp_list.Where(t => t.ErpDetailId == x.ErpDetailId).FirstOrDefault();
|
var erp_data = erp_list.Where(t => t.ErpDetailId == x.ErpDetailId).FirstOrDefault();
|
||||||
// if (erp_data != null)
|
if (erp_data != null)
|
||||||
// {
|
{
|
||||||
// if (erp_data.MaterialId != x.MaterialId)
|
if (erp_data.MaterialId != x.MaterialId)
|
||||||
// {
|
{
|
||||||
// //明细的物料改变了:新的物料重新添加一条明细
|
//明细的物料改变了:新的物料重新添加一条明细
|
||||||
// var Add_task_no_materials = _mapper.Map<InStockTaskDetails>(erp_data);
|
var Add_task_no_materials = _mapper.Map<InStockTaskDetails>(erp_data);
|
||||||
// noMartDetails.Add(Add_task_no_materials);
|
noMartDetails.Add(Add_task_no_materials);
|
||||||
// //给老的物料应收数量改为0
|
//给老的物料应收数量改为0
|
||||||
// x.AccruedQty = 0;
|
x.AccruedQty = 0;
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// else
|
else
|
||||||
// {
|
{
|
||||||
// x.AccruedQty = 0;
|
x.AccruedQty = 0;
|
||||||
// }
|
}
|
||||||
//});
|
});
|
||||||
////明细的物料改变了:新的物料重新添加一条明细
|
//明细的物料改变了:新的物料重新添加一条明细
|
||||||
//if (noMartDetails.Count != 0)
|
if (noMartDetails.Count != 0)
|
||||||
//{
|
{
|
||||||
// foreach (var item in noMartDetails)
|
foreach (var item in noMartDetails)
|
||||||
// {
|
{
|
||||||
// data_list_details_new.Add(item);
|
data_list_details_new.Add(item);
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
|
|
||||||
//2.2.提交修改
|
//2.2.提交修改
|
||||||
var isSuccess = await _inStockTaskRepositories.UpdateRange(data_list, isTransaction);
|
var isSuccess = await _inStockTaskRepositories.UpdateRange(data_list, isTransaction);
|
||||||
|
|||||||
Reference in New Issue
Block a user