合并解决冲突

This commit is contained in:
moyongzhen 2024-03-13 09:38:49 +08:00
commit aafb73e232
3 changed files with 24 additions and 8 deletions

View File

@ -22,10 +22,20 @@ public class GetPageTrackOrderInput : PageInfoInput
/// </summary>
public int TabType { get; set; }
///// <summary>
///// 当tab选中 0 默认不传 1 直接写死传值 [1,4] 2 传 [2,4]
///// </summary>
//public List<int>? QuestionTypeIds { get; set; }
/// <summary>
/// 当tab选中 0 默认不传 1 直接写死传值 [1,4] 2 传 [2,4]
/// 订单类型
/// </summary>
public List<int>? QuestionTypeIds { get; set; }
public int? TrackOrderType { get; set; }
/// <summary>
/// 客户id
/// </summary>
public int? CustomerId { get; set; }
/// <summary>
/// 创建时间开始

View File

@ -23,10 +23,6 @@ namespace SJZY.Track.Domain.Dtos.Order
/// </summary>
public int TabType { get; set; }
/// <summary>
/// 当tab选中 1 直接写死传值 [1,4] 2 传 [2,4]
/// </summary>
public List<int>? QuestionTypeIds { get; set; }
/// <summary>
/// 单号
@ -97,7 +93,7 @@ namespace SJZY.Track.Domain.Dtos.Order
/// <summary>
/// 客户id
/// </summary>
public int CustomerId { get; set; }
public int CustomerId { get; set; }
///// <summary>
///// 订单明细(json)

View File

@ -5,6 +5,7 @@ using SJZY.Track.Domain.Aggregates.TrackTemplateAggregate;
using SJZY.Track.Domain.Dtos.Order;
using SJZY.Track.Domain.VEntities;
using SJZY.Track.Repository.VData.Entitys;
using SqlSugar;
namespace SJZY.Track.Repository.Repositories;
@ -121,10 +122,19 @@ public class OrderRepository : BasicRepository<OrderEntity>, IOrderRepository, I
public async Task<UnifyPageResultDto<TrackOrderVO>> GetPageTrackOrder(GetPageTrackOrderInputVO input)
{
List<string> orderNoList = new List<string>();
List<int> questionTypeIds = new List<int>();
if (!input.OrderNos.IsNullOrWhiteSpace())
{
orderNoList = input.OrderNos.Split(new char[] { ',', ',', ':', ':' }).ToList();
}
if (input.TabType==1)
{
questionTypeIds= new List<int> { 1, 4 };
}
else if (input.TabType==2)
{
questionTypeIds= new List<int> { 2, 4 };
}
var pageList = await Context.Queryable<OrderEntity>()
.LeftJoin<VExternalSubjectEntity>((a, b) => a.CustomId == b.Id && b.IsDeleted == false)
@ -139,7 +149,7 @@ public class OrderRepository : BasicRepository<OrderEntity>, IOrderRepository, I
(a, b, c) => a.CreateTime <= input.CreateTimeEnd)
.WhereIF(input.CustomerId>0, (a, b, c) => a.CustomId==input.CustomerId)
.WhereIF(input.TrackOrderType>0, (a, b, c) => a.OrderType==input.TrackOrderType)
.WhereIF(input.TabType>0 && (!input.QuestionTypeIds.IsNullOrEmpty()), (a, b, c) => input.QuestionTypeIds.Contains(a.QuestionType))
.WhereIF(input.TabType>0 && (!questionTypeIds.IsNullOrEmpty()), (a, b, c) => questionTypeIds.Contains(a.QuestionType))
.OrderByDescending((a, b, c) => a.CreateTime)
.Select((a, b, c) => new TrackOrderVO
{