Browse Source

Merge branch 'master' of http://code.qiyue666.com/pengcong001/bbwy

AddValidOverTime
506583276@qq.com 2 years ago
parent
commit
22a71893f2
  1. 22
      BBWY.Server.Business/PlatformSDK/JDBusiness.cs
  2. 11
      BBWY.Server.Business/PlatformSDK/PlatformSDKBusiness.cs
  3. 2
      BBWY.Server.Business/QiKu/QiKuBusiness.cs
  4. 10
      BBWY.Server.Model/Dto/Request/JD/GetJDInStorePurchaseOrderDetailRequest.cs
  5. 34
      BBWY.Server.Model/Dto/Response/JD/JDInStoreOrderDetail.cs
  6. 11
      JD.API/Controllers/PlatformSDKController.cs

22
BBWY.Server.Business/PlatformSDK/JDBusiness.cs

@ -1460,5 +1460,27 @@ namespace BBWY.Server.Business
res.Json = JObject.Parse(res.Body);
return res.Json;
}
public override IList<JDInStoreOrderDetail> GetJDInStorePurchaseOrderList(GetJDInStorePurchaseOrderListRequest request)
{
var jdClient = GetJdClient(request.AppKey, request.AppSecret);
var req = new EclpPoQueryPoOrderRequest();
req.poOrderNo = request.PoOrderNos;
var res = jdClient.Execute(req, request.AppToken, DateTime.Now.ToLocalTime());
if (res.Json == null)
res.Json = JObject.Parse(res.Body);
if (!string.IsNullOrEmpty(res.ErrorMsg) || !string.IsNullOrEmpty(res.ErrMsg))
throw new BusinessException(!string.IsNullOrEmpty(res.ErrMsg) ? res.ErrMsg : res.ErrorMsg);
return res.Json["jingdong_eclp_po_queryPoOrder_responce"]["queryPoModelList"].Children().Select(x => new JDInStoreOrderDetail()
{
deptNo = x.Value<string>("deptNo"),
isvPoOrderNo = x.Value<string>("isvPoOrderNo"),
poOrderNo = x.Value<string>("poOrderNo"),
poOrderStatus = x.Value<string>("poOrderStatus"),
storageStatus = x.Value<string>("storageStatus"),
supplierNo = x.Value<string>("supplierNo"),
whNo = x.Value<string>("whNo")
}).ToList();
}
}
}

11
BBWY.Server.Business/PlatformSDK/PlatformSDKBusiness.cs

@ -238,5 +238,16 @@ namespace BBWY.Server.Business
{
throw new NotImplementedException();
}
/// <summary>
/// 获取入库采购单列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
/// <exception cref="NotImplementedException"></exception>
public virtual IList<JDInStoreOrderDetail> GetJDInStorePurchaseOrderList(GetJDInStorePurchaseOrderListRequest request)
{
throw new NotImplementedException();
}
}
}

2
BBWY.Server.Business/QiKu/QiKuBusiness.cs

@ -5,9 +5,7 @@ using BBWY.Server.Model.Dto;
using Microsoft.Extensions.Options;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Org.BouncyCastle.Ocsp;
using System.Linq;
using Yitter.IdGenerator;
namespace BBWY.Server.Business.QiKu
{

10
BBWY.Server.Model/Dto/Request/JD/GetJDInStorePurchaseOrderDetailRequest.cs

@ -4,11 +4,19 @@ using System.Text;
namespace BBWY.Server.Model.Dto
{
public class GetJDInStorePurchaseOrderDetailRequest:PlatformRequest
public class GetJDInStorePurchaseOrderDetailRequest : PlatformRequest
{
/// <summary>
/// 入库采购单号
/// </summary>
public string PoOrderNo { get; set; }
}
public class GetJDInStorePurchaseOrderListRequest : PlatformRequest
{
/// <summary>
/// 入库采购单号,逗号间隔,最多100个
/// </summary>
public string PoOrderNos { get; set; }
}
}

34
BBWY.Server.Model/Dto/Response/JD/JDInStoreOrderDetail.cs

@ -0,0 +1,34 @@
namespace BBWY.Server.Model.Dto
{
public class JDInStoreOrderDetail
{
public string poOrderNo { get; set; }
public string isvPoOrderNo { get; set; }
/// <summary>
/// 开放平台事业部编号
/// </summary>
public string deptNo { get; set; }
/// <summary>
/// 开放平台库房编号
/// </summary>
public string whNo { get; set; }
/// <summary>
/// 开放平台供应商编号
/// </summary>
public string supplierNo { get; set; }
/// <summary>
/// 采购入库单状态:4等待箱明细、5等待序列号清单、6待集单、10新建、15追加中、16已集单、20初始、30预约、31单据申报、32入园放行、33理货申报、34入库放行、40叫号、50验收、51 TC验收、60上架、70完成、80异常、81未完成、82申报失败、90取消中、91取消成功、92取消失败、93待取消、94等待取消中、95库房修改;最大长度4字符
/// </summary>
public string poOrderStatus { get; set; }
/// <summary>
/// 采购入库单入库状态;1:有差异待确认,2:无差异已确认,3:待确认,4:有差异已确认
/// </summary>
public string storageStatus { get; set; }
}
}

11
JD.API/Controllers/PlatformSDKController.cs

@ -389,6 +389,17 @@ namespace JD.API.API.Controllers
return platformSDKBusinessList.FirstOrDefault(p => p.Platform == request.Platform).GetJDInStorePurchaseOrderDetail(request);
}
/// <summary>
/// 获取京东入库单列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
public IList<JDInStoreOrderDetail> GetJDInStorePurchaseOrderList([FromBody] GetJDInStorePurchaseOrderListRequest request)
{
return platformSDKBusinessList.FirstOrDefault(p => p.Platform == request.Platform).GetJDInStorePurchaseOrderList(request);
}
/// <summary>
/// 获取京东供应商详情
/// </summary>

Loading…
Cancel
Save