Merge branch 'S01-轨迹中台' of http://192.168.80.50:3000/Dotnet/SJZY.Track.Api into S01-轨迹中台
This commit is contained in:
commit
f00cc899b1
@ -4,7 +4,7 @@ namespace SJZY.Track.Application.Dtos.ProvideServices;
|
||||
|
||||
public class CreateOrderInput
|
||||
{
|
||||
public OrderInfo OrderInfo { get; set; }
|
||||
public NoInfo NoInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 客户id
|
||||
|
||||
@ -4,13 +4,13 @@ namespace SJZY.Track.Application.Dtos.ProvideServices;
|
||||
|
||||
public class LinkOrderInput
|
||||
{
|
||||
public OrderInfo OrderInfo { get; set; }
|
||||
public NoInfo NoInfo { get; set; }
|
||||
|
||||
public List<OrderInfo> LinkedOrderInfos { get; set; }
|
||||
public List<NoInfo> LinkedOrderInfos { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class OrderInfo
|
||||
public class NoInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 订单类型
|
||||
|
||||
@ -29,17 +29,17 @@ public class OrderService: ApplicationService
|
||||
public async Task<bool> CreateOrderAsync(CreateOrderInput input)
|
||||
{
|
||||
if (await _orderRepository.IsAnyAsync(x =>
|
||||
x.OrderType == input.OrderInfo.NoType && x.OrderNo == input.OrderInfo.OrderNo))
|
||||
x.OrderType == input.NoInfo.NoType && x.OrderNo == input.NoInfo.OrderNo))
|
||||
{
|
||||
throw new BusinessException(message: $"单号:{input.OrderInfo.OrderNo}已存在");
|
||||
throw new BusinessException(message: $"单号:{input.NoInfo.OrderNo}已存在");
|
||||
}
|
||||
|
||||
var order = new OrderEntity
|
||||
{
|
||||
CustomId = input.ClientId,
|
||||
OrderDetails = JsonConvert.SerializeObject(input.Details),
|
||||
OrderNo = input.OrderInfo.OrderNo,
|
||||
OrderType = input.OrderInfo.NoType,
|
||||
OrderNo = input.NoInfo.OrderNo,
|
||||
OrderType = input.NoInfo.NoType,
|
||||
SubSystemId = CurrentUserRequest.SubSystemId
|
||||
};
|
||||
|
||||
|
||||
@ -4,7 +4,8 @@
|
||||
/// 轨迹订单关联表(1:N)
|
||||
/// </summary>
|
||||
[SugarTable("t_order_link")]
|
||||
public class OrderLinkEntity : IFullAuditedBasicEntitys
|
||||
public class OrderLinkEntity : ICreateBaicEntity,
|
||||
ISoftDeleteBasicEntity
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
@ -14,15 +15,41 @@ public class OrderLinkEntity : IFullAuditedBasicEntitys
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联的订单id
|
||||
/// 订单类型
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "LinkOrderId")]
|
||||
public int LinkOrderId { get; set; }
|
||||
[SugarColumn(ColumnName = "OrderType")]
|
||||
public int OrderType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 订单id
|
||||
/// 订单号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "OrderId")]
|
||||
public int OrderId { get; set; }
|
||||
[SugarColumn(ColumnName = "OrderNo")]
|
||||
public string OrderNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联的订单类型
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "LinkOrderType")]
|
||||
public int LinkOrderType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联的订单号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "LinkOrderNo")]
|
||||
public string LinkOrderNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
public int CreateUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public DateTime? CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否删除(已解绑)
|
||||
/// </summary>
|
||||
public bool IsDeleted { get; set; }
|
||||
}
|
||||
@ -4,7 +4,7 @@
|
||||
/// 轨迹订单模板表(1:N)
|
||||
/// </summary>
|
||||
[SugarTable("t_order_template")]
|
||||
public class OrderTemplateEntity : IFullAuditedBasicEntitys
|
||||
public class OrderTemplateEntity : ICreateBaicEntity
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
@ -31,4 +31,6 @@ public class OrderTemplateEntity : IFullAuditedBasicEntitys
|
||||
[SugarColumn(ColumnName = "TrackTemplateId")]
|
||||
public int TrackTemplateId { get; set; }
|
||||
|
||||
public int CreateUserId { get; set; }
|
||||
public DateTime? CreateTime { get; set; }
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user