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 class CreateOrderInput
|
||||||
{
|
{
|
||||||
public OrderInfo OrderInfo { get; set; }
|
public NoInfo NoInfo { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 客户id
|
/// 客户id
|
||||||
|
|||||||
@ -4,13 +4,13 @@ namespace SJZY.Track.Application.Dtos.ProvideServices;
|
|||||||
|
|
||||||
public class LinkOrderInput
|
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>
|
/// <summary>
|
||||||
/// 订单类型
|
/// 订单类型
|
||||||
|
|||||||
@ -29,17 +29,17 @@ public class OrderService: ApplicationService
|
|||||||
public async Task<bool> CreateOrderAsync(CreateOrderInput input)
|
public async Task<bool> CreateOrderAsync(CreateOrderInput input)
|
||||||
{
|
{
|
||||||
if (await _orderRepository.IsAnyAsync(x =>
|
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
|
var order = new OrderEntity
|
||||||
{
|
{
|
||||||
CustomId = input.ClientId,
|
CustomId = input.ClientId,
|
||||||
OrderDetails = JsonConvert.SerializeObject(input.Details),
|
OrderDetails = JsonConvert.SerializeObject(input.Details),
|
||||||
OrderNo = input.OrderInfo.OrderNo,
|
OrderNo = input.NoInfo.OrderNo,
|
||||||
OrderType = input.OrderInfo.NoType,
|
OrderType = input.NoInfo.NoType,
|
||||||
SubSystemId = CurrentUserRequest.SubSystemId
|
SubSystemId = CurrentUserRequest.SubSystemId
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,8 @@
|
|||||||
/// 轨迹订单关联表(1:N)
|
/// 轨迹订单关联表(1:N)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarTable("t_order_link")]
|
[SugarTable("t_order_link")]
|
||||||
public class OrderLinkEntity : IFullAuditedBasicEntitys
|
public class OrderLinkEntity : ICreateBaicEntity,
|
||||||
|
ISoftDeleteBasicEntity
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -14,15 +15,41 @@ public class OrderLinkEntity : IFullAuditedBasicEntitys
|
|||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 关联的订单id
|
/// 订单类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName = "LinkOrderId")]
|
[SugarColumn(ColumnName = "OrderType")]
|
||||||
public int LinkOrderId { get; set; }
|
public int OrderType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 订单号
|
||||||
|
/// </summary>
|
||||||
|
[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>
|
||||||
/// 订单id
|
/// 创建人
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName = "OrderId")]
|
public int CreateUserId { get; set; }
|
||||||
public int OrderId { get; set; }
|
|
||||||
|
/// <summary>
|
||||||
|
/// 创建时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? CreateTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否删除(已解绑)
|
||||||
|
/// </summary>
|
||||||
|
public bool IsDeleted { get; set; }
|
||||||
}
|
}
|
||||||
@ -4,7 +4,7 @@
|
|||||||
/// 轨迹订单模板表(1:N)
|
/// 轨迹订单模板表(1:N)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarTable("t_order_template")]
|
[SugarTable("t_order_template")]
|
||||||
public class OrderTemplateEntity : IFullAuditedBasicEntitys
|
public class OrderTemplateEntity : ICreateBaicEntity
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -31,4 +31,6 @@ public class OrderTemplateEntity : IFullAuditedBasicEntitys
|
|||||||
[SugarColumn(ColumnName = "TrackTemplateId")]
|
[SugarColumn(ColumnName = "TrackTemplateId")]
|
||||||
public int TrackTemplateId { get; set; }
|
public int TrackTemplateId { get; set; }
|
||||||
|
|
||||||
|
public int CreateUserId { get; set; }
|
||||||
|
public DateTime? CreateTime { get; set; }
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user