Commit 125b1efe by lizefeng

优化采购单推送的异常处理

parent f76ea3f4
......@@ -9,6 +9,7 @@ namespace AutoTurnOver.Models.ApiDto
/// </summary>
public class ApiSendMessageInputDto
{
public int saas_company_id { get; set; }
public string platform { get; set; }
public string order_no { get; set; }
......
......@@ -152,9 +152,9 @@ namespace AutoTurnOver.Services
if (skus != null && skus.Count >= 1)
{
// 判断提取出来的sku 是否是我们想推送的sku ,但凡有一个不是我们想推送的,就抛异常
if (skus.Any(s => data.bi_buyplandetail.Any(sku => !sku.bd_sku.Equals(s, StringComparison.OrdinalIgnoreCase))))
if (skus.Any(s => !data.bi_buyplandetail.Any(sku => sku.bd_sku.Equals(s, StringComparison.OrdinalIgnoreCase))))
{
throw new Exception("采购系统异常:-------------采购系统抛出来的异常sku在源推送sku中未找到-------源异常消息: " + result.Message);
throw new Exception($"采购系统异常:-------------采购系统抛出来的异常sku {skus.ToJson()} 在源推送sku中未找到-------源异常消息: " + result.Message);
}
else
{
......
......@@ -409,6 +409,7 @@ namespace AutoTurnOver.Services
{
var send_data = new ApiSendMessageInputDto()
{
saas_company_id = 1,
content = data.content,
letterType = 6,
order_no = item.order_id,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment