修复bug
This commit is contained in:
@@ -144,11 +144,12 @@ namespace WMS.Web.Domain.Services
|
||||
MaterialId = new ErpNumberDto(_erpBasicDataExtendService.GetMaterialNumber(materials, entity.MaterialId)),
|
||||
UnitId = new ErpNumberDto(unitNumber), //物料带出来
|
||||
StockId = new ErpNumberDto(stock.Code),
|
||||
SubStockId =new ErpSubStockDto(resSub.Data.FirstOrDefault(f => f.Id == entity.Erp_SubStockId).Code),
|
||||
SubStockId = new ErpSubStockDto(stock.Code, resSub.Data.FirstOrDefault(f => f.Id == entity.Erp_SubStockId)?.Code),
|
||||
BeforeQty = entity.BeforeQty,
|
||||
AfterQty = entity.AfterQty,
|
||||
FinalQty = entity.FinalQty,
|
||||
Fnote = ""
|
||||
FinalQty = entity.ResultType == TakeStockType.Profit ? entity.FinalQty : 0,
|
||||
LossQty = entity.ResultType == TakeStockType.Loss ? entity.FinalQty : 0,
|
||||
Fnote = entity.ResultType == TakeStockType.Loss ? "wms盘亏单同步" : "wms盘盈单同步"
|
||||
});
|
||||
ErpTakeStockSaveDto dto = new ErpTakeStockSaveDto()
|
||||
{
|
||||
@@ -173,7 +174,7 @@ namespace WMS.Web.Domain.Services
|
||||
/// <param name="dto"></param>
|
||||
/// <param name="type"></param>
|
||||
/// <returns></returns>
|
||||
private async Task<(Result result, SyncStatus syncStatus,string erpId)> ErpOperate(ErpTakeStockSaveDto dto, FormIdParam type)
|
||||
private async Task<(Result result, SyncStatus syncStatus, string erpId)> ErpOperate(ErpTakeStockSaveDto dto, FormIdParam type)
|
||||
{
|
||||
string formId = type.ToString();
|
||||
_logger.LogInformation($"盘点单->开始同步金蝶 单号:{dto.BillNo} 数据: {JsonConvert.SerializeObject(dto)}");
|
||||
@@ -181,7 +182,7 @@ namespace WMS.Web.Domain.Services
|
||||
if (!res_s.IsSuccess)
|
||||
{
|
||||
_logger.LogInformation($"盘点单->保存失败 单号:{dto.BillNo} 错误:{res_s.Message}");
|
||||
return (Result.ReFailure(res_s.Message, res_s.Status), SyncStatus.Fail,"");
|
||||
return (Result.ReFailure(res_s.Message, res_s.Status), SyncStatus.Fail, "");
|
||||
}
|
||||
//提交
|
||||
_logger.LogInformation($"盘点单->保存成功 开始提交 单号:{dto.BillNo}");
|
||||
|
||||
Reference in New Issue
Block a user