|
@ -30,7 +30,7 @@ using System.Security.Cryptography; |
|
|
namespace Win_in.Sfs.Scp.WebApi |
|
|
namespace Win_in.Sfs.Scp.WebApi |
|
|
{ |
|
|
{ |
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// 零件服务
|
|
|
/// ASN服务(X12Asn Service)
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
[Authorize] |
|
|
[Authorize] |
|
|
[Route(RouteConsts.X12Asn)] |
|
|
[Route(RouteConsts.X12Asn)] |
|
@ -48,7 +48,7 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// 按ID获取零件 (Get X12Asn by ID)
|
|
|
/// 按ID获取ASN (Get X12Asn by ID)
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
/// <param name="id">唯一ID(unique ID)</param>
|
|
|
/// <param name="id">唯一ID(unique ID)</param>
|
|
|
/// <returns></returns>
|
|
|
/// <returns></returns>
|
|
@ -62,7 +62,7 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// 按条件获取零件列表 (Get X12Asn list by request condition)
|
|
|
/// 按条件获取ASN分页列表 (Get X12Asn paged list by request condition)
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
/// <param name="requestDTO">请求条件DTO(Request condition DTO)</param>
|
|
|
/// <param name="requestDTO">请求条件DTO(Request condition DTO)</param>
|
|
|
/// <returns></returns>
|
|
|
/// <returns></returns>
|
|
@ -73,6 +73,13 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
return await base.GetListAsync(requestDTO); |
|
|
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] |
|
|
[HttpGet] |
|
|
[Route("unread-list")] |
|
|
[Route("unread-list")] |
|
|
public async Task<List<X12AsnDTO>> GetUnreadListAsync(string site, int count, bool autoUpdateStatus) |
|
|
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] |
|
|
[HttpGet] |
|
|
[Route("between-id")] |
|
|
[Route("between-id")] |
|
|
public async Task<List<X12AsnDTO>> GetListAsync(string site, long beginUid, long endUid) |
|
|
public async Task<List<X12AsnDTO>> GetListAsync(string site, long beginUid, long endUid) |
|
@ -103,7 +117,14 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
return dtos; |
|
|
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] |
|
|
[HttpGet] |
|
|
[Route("between-date")] |
|
|
[Route("between-date")] |
|
|
public async Task<List<X12AsnDTO>> GetListAsync(string site, DateTime beginDate, DateTime endDate) |
|
|
public async Task<List<X12AsnDTO>> GetListAsync(string site, DateTime beginDate, DateTime endDate) |
|
@ -120,6 +141,13 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
return dtos; |
|
|
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] |
|
|
[HttpGet] |
|
|
[Route("by-id")] |
|
|
[Route("by-id")] |
|
|
public async Task<X12AsnDTO> GetAsync(string site, long uid) |
|
|
public async Task<X12AsnDTO> GetAsync(string site, long uid) |
|
@ -136,6 +164,13 @@ namespace Win_in.Sfs.Scp.WebApi |
|
|
return dto; |
|
|
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] |
|
|
[HttpGet] |
|
|
[Route("by-number")] |
|
|
[Route("by-number")] |
|
|
public async Task<X12AsnDTO> GetAsync(string site, string 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] |
|
|
[HttpPost] |
|
|
[Route("update-status")] |
|
|
[Route("update-status")] |
|
|
public async Task<X12AsnDTO> UpdateStatusAsync(string site, string number, EnumExchangeDataStatus status) |
|
|
public async Task<X12AsnDTO> UpdateStatusAsync(string site, string number, EnumExchangeDataStatus status) |
|
|