|
|
@ -1136,7 +1136,7 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// 对比BC与海运出口订单(任务台使用)
|
|
|
|
/// 对比BC与海运出口订单(任务台使用)
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
public async Task<DataResult<(bool isExistsDiff, List<CompareResultDetailInfo>)>> CompareBcWithSeaExportTask(TaskFlowDataContext dataContext)
|
|
|
|
public async Task<DataResult<CompareResultInfo>> CompareBcWithSeaExportTask(TaskFlowDataContext dataContext)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var taskBcInfo = dataContext.Get<TaskBCInfo?>(TaskFlowDataNameConst.TaskBCInfo) ?? throw new ArgumentException($"缺少参数:{nameof(TaskFlowDataNameConst.TaskBCInfo)}");
|
|
|
|
var taskBcInfo = dataContext.Get<TaskBCInfo?>(TaskFlowDataNameConst.TaskBCInfo) ?? throw new ArgumentException($"缺少参数:{nameof(TaskFlowDataNameConst.TaskBCInfo)}");
|
|
|
|
var taskBcCtnList = dataContext.Get<List<TaskBCCTNInfo>?>(TaskFlowDataNameConst.TaskBCCtnList) ?? throw new ArgumentException($"缺少参数:{nameof(TaskFlowDataNameConst.TaskBCCtnList)}");
|
|
|
|
var taskBcCtnList = dataContext.Get<List<TaskBCCTNInfo>?>(TaskFlowDataNameConst.TaskBCCtnList) ?? throw new ArgumentException($"缺少参数:{nameof(TaskFlowDataNameConst.TaskBCCtnList)}");
|
|
|
@ -1174,18 +1174,19 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
SeaExport = seaExport,
|
|
|
|
SeaExport = seaExport,
|
|
|
|
OpCtnList = seaExportCtnList
|
|
|
|
OpCtnList = seaExportCtnList
|
|
|
|
};
|
|
|
|
};
|
|
|
|
(bool isExistsDiff, List<CompareResultDetailInfo>) result = await CompareBcWithSeaExport(compareDto);
|
|
|
|
var result = await CompareBcWithSeaExport(compareDto);
|
|
|
|
|
|
|
|
|
|
|
|
dataContext.Set(TaskFlowDataNameConst.BcCompareBcWithSeaExportIsExistsDiff, result.isExistsDiff);
|
|
|
|
dataContext.Set(TaskFlowDataNameConst.BcCompareWithSeaExportResult, result);
|
|
|
|
|
|
|
|
|
|
|
|
return DataResult<(bool isExistsDiff, List<CompareResultDetailInfo>)>.Success(result);
|
|
|
|
return DataResult<CompareResultInfo>.Success(result);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// 对比BC与海运出口订单
|
|
|
|
/// 对比BC与海运出口订单
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
public async Task<(bool isExistsDiff, List<CompareResultDetailInfo>)> CompareBcWithSeaExport(CompareBcWithSeaExportDto compareDto)
|
|
|
|
public async Task<CompareResultInfo> CompareBcWithSeaExport(CompareBcWithSeaExportDto compareDto)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
var taskBcInfo = compareDto.TaskBCInfo;
|
|
|
|
var taskBcInfo = compareDto.TaskBCInfo;
|
|
|
|
var taskBcCtnList = compareDto.TaskBCCtnList;
|
|
|
|
var taskBcCtnList = compareDto.TaskBCCtnList;
|
|
|
|
var seaExport = compareDto.SeaExport;
|
|
|
|
var seaExport = compareDto.SeaExport;
|
|
|
@ -1257,7 +1258,7 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
|
|
|
|
|
|
|
|
logger.LogInformation($"批次={batchNo} taskBcInfo.id={taskBcInfo.Id} seaExport.id={seaExport.Id} 请求BC对比订单结果完成,耗时:{timeDiff}ms,是否成功:{(compareResult?.succ == true ? "成功" : "失败")} ");
|
|
|
|
logger.LogInformation($"批次={batchNo} taskBcInfo.id={taskBcInfo.Id} seaExport.id={seaExport.Id} 请求BC对比订单结果完成,耗时:{timeDiff}ms,是否成功:{(compareResult?.succ == true ? "成功" : "失败")} ");
|
|
|
|
|
|
|
|
|
|
|
|
if (compareResult != null)
|
|
|
|
if (compareResult != null && compareResult?.succ == true)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
logger.LogInformation($"批次={batchNo} BC对比订单结果={JsonConvert.SerializeObject(compareResult)}");
|
|
|
|
logger.LogInformation($"批次={batchNo} BC对比订单结果={JsonConvert.SerializeObject(compareResult)}");
|
|
|
|
DateTime nowDate = DateTime.Now;
|
|
|
|
DateTime nowDate = DateTime.Now;
|
|
|
@ -1303,13 +1304,22 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
it.UpdateUserName
|
|
|
|
it.UpdateUserName
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return new CompareResultInfo()
|
|
|
|
return (compareResult.extra.IsExistsDiff, compareResult.extra.ShowDetailList);
|
|
|
|
{
|
|
|
|
|
|
|
|
IsExistsDiff = compareResult.extra.IsExistsDiff,
|
|
|
|
|
|
|
|
ShowDetailList = compareResult.extra.ShowDetailList,
|
|
|
|
|
|
|
|
DetailList = compareResult.extra.DetailList,
|
|
|
|
|
|
|
|
IsSuccess = true
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
//return (compareResult.extra.IsExistsDiff, compareResult.extra.ShowDetailList);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
logger.LogError($"批次={batchNo} BC对比订单结果为空");
|
|
|
|
logger.LogError($"批次={batchNo} BC对比订单结果为空");
|
|
|
|
throw new Exception($"批次={batchNo} BC对比订单结果为空");
|
|
|
|
return new CompareResultInfo()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
IsSuccess = false
|
|
|
|
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|