|
|
@ -30,7 +30,7 @@ using System.Security.Cryptography; |
|
|
|
namespace Win_in.Sfs.Scp.WebApi |
|
|
|
{ |
|
|
|
/// <summary>
|
|
|
|
/// 零件服务
|
|
|
|
/// ASN服务(X12Asn Service)
|
|
|
|
/// </summary>
|
|
|
|
[Authorize] |
|
|
|
[Route(RouteConsts.X12Asn)] |
|
|
@ -48,7 +48,7 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 按ID获取零件 (Get X12Asn by ID)
|
|
|
|
/// 按ID获取ASN (Get X12Asn by ID)
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="id">唯一ID(unique ID)</param>
|
|
|
|
/// <returns></returns>
|
|
|
@ -62,7 +62,7 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 按条件获取零件列表 (Get X12Asn list by request condition)
|
|
|
|
/// 按条件获取ASN分页列表 (Get X12Asn paged list by request condition)
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="requestDTO">请求条件DTO(Request condition DTO)</param>
|
|
|
|
/// <returns></returns>
|
|
|
@ -73,6 +73,13 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
|
return await base.GetListAsync(requestDTO); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 获取未读ASN列表(Get unread X12Asn list)
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="site">地点(Site)</param>
|
|
|
|
/// <param name="count">数量(Count)</param>
|
|
|
|
/// <param name="autoUpdateStatus">是否自动更新状态(Auto update data status to finish)</param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpGet] |
|
|
|
[Route("unread-list")] |
|
|
|
public async Task<List<X12AsnDTO>> GetUnreadListAsync(string site, int count, bool autoUpdateStatus) |
|
|
@ -86,7 +93,14 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 根据UID范围获取ASN列表(Get X12Asn list by UID range)
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="site">地点(Site)</param>
|
|
|
|
/// <param name="beginUid">开始UID(Begin UID)</param>
|
|
|
|
/// <param name="endUid">结束UID(End UID)</param>
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <exception cref="BadHttpRequestException"></exception>
|
|
|
|
[HttpGet] |
|
|
|
[Route("between-id")] |
|
|
|
public async Task<List<X12AsnDTO>> GetListAsync(string site, long beginUid, long endUid) |
|
|
@ -103,7 +117,14 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
|
return dtos; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 根据日期范围获取ASN列表(Get X12Asn list by date range)
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="site">地点(Site)</param>
|
|
|
|
/// <param name="beginDate">开始日期(Begin date)</param>
|
|
|
|
/// <param name="endDate">结束日期(End date)</param>
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <exception cref="BadHttpRequestException"></exception>
|
|
|
|
[HttpGet] |
|
|
|
[Route("between-date")] |
|
|
|
public async Task<List<X12AsnDTO>> GetListAsync(string site, DateTime beginDate, DateTime endDate) |
|
|
@ -120,6 +141,13 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
|
return dtos; |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 根据UID获取ASN(Get X12Asn by UID)
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="site">地点(Site)</param>
|
|
|
|
/// <param name="uid">UID(UID)</param>
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <exception cref="BadHttpRequestException"></exception>
|
|
|
|
[HttpGet] |
|
|
|
[Route("by-id")] |
|
|
|
public async Task<X12AsnDTO> GetAsync(string site, long uid) |
|
|
@ -136,6 +164,13 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
|
return dto; |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 根据单据编号获取ANS(Get X12Asn by asn number)
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="site">地点(Site)</param>
|
|
|
|
/// <param name="number">单据编号(Asn number)</param>
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <exception cref="BadHttpRequestException"></exception>
|
|
|
|
[HttpGet] |
|
|
|
[Route("by-number")] |
|
|
|
public async Task<X12AsnDTO> GetAsync(string site, string number) |
|
|
@ -153,6 +188,20 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 根据单据编号更新ASN状态(Update X12Asn Status by asn number)
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="site">地点(Site)</param>
|
|
|
|
/// <param name="number">单据编号(Asn number)</param>
|
|
|
|
/// <param name="status">状态(Status)
|
|
|
|
/// 0: 新增(new)
|
|
|
|
/// 1: 处理中(Processing)
|
|
|
|
/// 2: 完成(Finish)
|
|
|
|
/// 9: 搁置(Hold)
|
|
|
|
/// -1: 错误(Error)
|
|
|
|
/// </param>
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <exception cref="BadHttpRequestException"></exception>
|
|
|
|
[HttpPost] |
|
|
|
[Route("update-status")] |
|
|
|
public async Task<X12AsnDTO> UpdateStatusAsync(string site, string number, EnumExchangeDataStatus status) |
|
|
|