Browse Source

采购单列表增加订单留言

AddValidOverTime
shanji 2 years ago
parent
commit
9d5c6afa03
  1. 26
      BBWY.Server.Business/PurchaseOrderV2/BatchPurchase/BatchPurchaseBusiness.cs
  2. 25
      BBWY.Server.Model/Dto/Response/PurchaseOrderV2/PurchaseOrderMessageResponse.cs
  3. 2
      BBWY.Server.Model/Dto/Response/PurchaseOrderV2/PurchaseOrderV2Response.cs

26
BBWY.Server.Business/PurchaseOrderV2/BatchPurchase/BatchPurchaseBusiness.cs

@ -973,7 +973,7 @@ namespace BBWY.Server.Business
var httpResult = restApiService.SendRequest("http://bbwyb.qiyue666.com",
"api/order/BatchGetPurchaseExpressOrderList",
purchaseOrderIdList,
new Dictionary<string, string>() { { "Authorization", $"{token}" } },
new Dictionary<string, string>() { { "Authorization", token } },
HttpMethod.Post);
if (httpResult.StatusCode == System.Net.HttpStatusCode.OK)
{
@ -998,6 +998,30 @@ namespace BBWY.Server.Business
}
try
{
var httpResult = restApiService.SendRequest("http://bbwyb.qiyue666.com",
"api/ordermessage/getordersmessagelist",
purchaseOrderIdList,
new Dictionary<string, string>() { { "Authorization", token } },
HttpMethod.Post);
if (httpResult.StatusCode == System.Net.HttpStatusCode.OK)
{
var response = JsonConvert.DeserializeObject<ApiResponse<IList<PurchaseOrderMessageResponse>>>(httpResult.Content);
if (response.Success)
{
foreach (var purchaseOrder in purchaseOrderList)
{
purchaseOrder.OrderMessageList = response.Data.Where(x => x.OrderId == purchaseOrder.Id).ToList();
}
}
}
}
catch (Exception ex)
{
}
return new PurchaseOrderV2ListResponse() { Count = total, ItemList = purchaseOrderList };
}

25
BBWY.Server.Model/Dto/Response/PurchaseOrderV2/PurchaseOrderMessageResponse.cs

@ -0,0 +1,25 @@
using System;
namespace BBWY.Server.Model.Dto
{
public class PurchaseOrderMessageResponse
{
public long Id { get; set; }
public DateTime? CreateTime { get; set; }
public string CreatorId { get; set; }
public string CreatorName { get; set; }
public string Message { get; set; }
public string OrderId { get; set; }
public string OrderSn { get; set; }
//public long? ShopId { get; set; }
public string From { get; set; }
}
}

2
BBWY.Server.Model/Dto/Response/PurchaseOrderV2/PurchaseOrderV2Response.cs

@ -7,6 +7,8 @@ namespace BBWY.Server.Model.Dto
{
public string PurchaseAccountName { get; set; }
public IList<PurchaseOrderSkuResponse> ItemList { get; set; }
public IList<PurchaseOrderMessageResponse> OrderMessageList { get; set; }
}
public class PurchaseOrderV2ListResponse

Loading…
Cancel
Save