轨迹详情列表支持订单号+子系统
This commit is contained in:
parent
52b9429996
commit
85d0b9efe1
@ -1,3 +1,4 @@
|
|||||||
|
using System.Linq.Expressions;
|
||||||
using SJZY.Expand.AliyunOSS;
|
using SJZY.Expand.AliyunOSS;
|
||||||
using SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
using SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||||
using SJZY.Track.Application.Contract.Dtos.TrackOrder;
|
using SJZY.Track.Application.Contract.Dtos.TrackOrder;
|
||||||
@ -108,11 +109,20 @@ public class TrackOrderService : ApplicationService
|
|||||||
/// 根据订单id获取轨迹明细列表
|
/// 根据订单id获取轨迹明细列表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="orderId"></param>
|
/// <param name="orderId"></param>
|
||||||
|
/// <param name="orderNo"></param>
|
||||||
|
/// <param name="systemId"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost("GetDetails")]
|
[HttpPost("GetDetails")]
|
||||||
public async Task<List<TrackOrderDetailDto>> GetTracksAsync(int orderId)
|
public async Task<List<TrackOrderDetailDto>> GetTracksAsync(int orderId, string orderNo, int systemId)
|
||||||
{
|
{
|
||||||
var subSystemId = await _orderRepository.GetFirstAsync(x => x.Id == orderId, x => x.SubSystemId);
|
Expression<Func<OrderEntity, bool>> whereExpression = null;
|
||||||
|
if (orderId > 0)
|
||||||
|
whereExpression = m => m.Id == orderId;
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(orderNo) && systemId > 0)
|
||||||
|
whereExpression = m => m.OrderNo == orderNo && m.SubSystemId == systemId;
|
||||||
|
|
||||||
|
var subSystemId = await _orderRepository.GetFirstAsync(whereExpression, x => x.SubSystemId);
|
||||||
if (subSystemId == default)
|
if (subSystemId == default)
|
||||||
{
|
{
|
||||||
throw new BusinessException(message: "订单不存在");
|
throw new BusinessException(message: "订单不存在");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user