Merge pull request '😁 feat(流水号): 新增通用流水号功能模块' (#396) from jasondom/Admin.NET.Pro:v2 into v2
Reviewed-on: https://code.adminnet.top/Admin.NET/Admin.NET.Pro/pulls/396
This commit is contained in:
commit
695780afbf
@ -19,6 +19,13 @@ public class TestCodeGenDemo : EntityBase
|
||||
[SugarColumn(ColumnName = "Id", ColumnDescription = "主键Id", IsPrimaryKey = true, IsIdentity = false)]
|
||||
public new Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 流水号
|
||||
/// </summary>
|
||||
[BindSerial(SerialTypeEnum.Other)]
|
||||
[SugarColumn(ColumnDescription = "流水号", Length = 128)]
|
||||
public string? SeqNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 文本
|
||||
/// </summary>
|
||||
|
||||
24
Admin.NET/Admin.NET.Core/Attribute/BindSerialAttribute.cs
Normal file
24
Admin.NET/Admin.NET.Core/Attribute/BindSerialAttribute.cs
Normal file
@ -0,0 +1,24 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
|
||||
/// <summary>
|
||||
/// 绑定序列号特性类
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Property, AllowMultiple = true)]
|
||||
public class BindSerialAttribute(SerialTypeEnum type, bool isGlobal = false) : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// 序列号类型
|
||||
/// </summary>
|
||||
public SerialTypeEnum Type { get; set; } = type;
|
||||
|
||||
/// <summary>
|
||||
/// 是否全局
|
||||
/// </summary>
|
||||
public bool IsGlobal { get; set; } = isGlobal;
|
||||
}
|
||||
@ -115,4 +115,9 @@ public class CacheConst
|
||||
/// 列配置缓存
|
||||
/// </summary>
|
||||
public const string KeyColumnCustom = "sys_column_custom:";
|
||||
|
||||
/// <summary>
|
||||
/// 流水号分布式锁缓存
|
||||
/// </summary>
|
||||
public const string KeySerialLock = "sys_serial_lock";
|
||||
}
|
||||
85
Admin.NET/Admin.NET.Core/Entity/SysSerial.cs
Normal file
85
Admin.NET/Admin.NET.Core/Entity/SysSerial.cs
Normal file
@ -0,0 +1,85 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
|
||||
/// <summary>
|
||||
/// 系统流水号表
|
||||
/// </summary>
|
||||
[SugarTable(null, "系统流水号表")]
|
||||
[SugarIndex("u_{table}_tt", nameof(Type), OrderByType.Asc, nameof(TenantId), OrderByType.Asc, IsUnique = true)]
|
||||
public class SysSerial : EntityTenantId
|
||||
{
|
||||
/// <summary>
|
||||
/// 序列号
|
||||
/// </summary>
|
||||
[IgnoreUpdateSeedColumn]
|
||||
[SugarColumn(ColumnDescription = "序列号")]
|
||||
[Required]
|
||||
public virtual long Seq { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 有效期
|
||||
/// </summary>
|
||||
[Required]
|
||||
[IgnoreUpdateSeedColumn]
|
||||
[SugarColumn(ColumnDescription = "有效期")]
|
||||
public virtual DateTime Expy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 使用分类
|
||||
/// </summary>
|
||||
[Required]
|
||||
[SugarColumn(ColumnDescription = "使用分类")]
|
||||
public virtual SerialTypeEnum Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 重置间隔
|
||||
/// </summary>
|
||||
[Required]
|
||||
[SugarColumn(ColumnDescription = "重置间隔")]
|
||||
public virtual ResetIntervalEnum ResetInterval { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 格式化表达式
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "格式化表达式", Length = 128)]
|
||||
[MaxLength(128)]
|
||||
public virtual string Formater { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 最小值
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "最小值")]
|
||||
public virtual long Min { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 最大值
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "最大值")]
|
||||
public virtual long Max { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "排序")]
|
||||
public virtual int OrderNo { get; set; } = 100;
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
[Required]
|
||||
[SugarColumn(ColumnDescription = "状态")]
|
||||
public virtual StatusEnum Status { get; set; } = StatusEnum.Enable;
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
[IgnoreUpdateSeedColumn]
|
||||
[SugarColumn(ColumnDescription = "备注", Length = 128)]
|
||||
[MaxLength(128)]
|
||||
public virtual string? Remark { get; set; }
|
||||
}
|
||||
@ -876,4 +876,34 @@ public enum ErrorCodeEnum
|
||||
/// </summary>
|
||||
[ErrorCodeItemMetadata("编码已存在")]
|
||||
C1003,
|
||||
|
||||
/// <summary>
|
||||
/// 流水号服务繁忙,请稍后重试
|
||||
/// </summary>
|
||||
[ErrorCodeItemMetadata("流水号服务繁忙,请稍后重试")]
|
||||
S0001,
|
||||
|
||||
/// <summary>
|
||||
/// 流水号配置不存在
|
||||
/// </summary>
|
||||
[ErrorCodeItemMetadata("流水号配置不存在")]
|
||||
S0002,
|
||||
|
||||
/// <summary>
|
||||
/// 流水号已超出最大序号
|
||||
/// </summary>
|
||||
[ErrorCodeItemMetadata("流水号已超出最大序号")]
|
||||
S0004,
|
||||
|
||||
/// <summary>
|
||||
/// 流水号配置更新失败
|
||||
/// </summary>
|
||||
[ErrorCodeItemMetadata("流水号配置更新失败")]
|
||||
S0005,
|
||||
|
||||
/// <summary>
|
||||
/// 无效的流水号重置类型
|
||||
/// </summary>
|
||||
[ErrorCodeItemMetadata("无效的流水号重置类型")]
|
||||
S0006
|
||||
}
|
||||
38
Admin.NET/Admin.NET.Core/Enum/ResetIntervalEnum.cs
Normal file
38
Admin.NET/Admin.NET.Core/Enum/ResetIntervalEnum.cs
Normal file
@ -0,0 +1,38 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
|
||||
/// <summary>
|
||||
/// 重置间隔枚举
|
||||
/// </summary>
|
||||
[Description("重置间隔枚举")]
|
||||
public enum ResetIntervalEnum
|
||||
{
|
||||
/// <summary>
|
||||
/// 从不重置
|
||||
/// </summary>
|
||||
[Description("从不重置")]
|
||||
Never = 1,
|
||||
|
||||
/// <summary>
|
||||
/// 日
|
||||
/// </summary>
|
||||
[Description("日")]
|
||||
Day = 2,
|
||||
|
||||
/// <summary>
|
||||
/// 月
|
||||
/// </summary>
|
||||
[Description("月")]
|
||||
Month = 3,
|
||||
|
||||
/// <summary>
|
||||
/// 年
|
||||
/// </summary>
|
||||
[Description("年")]
|
||||
Year = 4,
|
||||
}
|
||||
20
Admin.NET/Admin.NET.Core/Enum/SerialTypeEnum.cs
Normal file
20
Admin.NET/Admin.NET.Core/Enum/SerialTypeEnum.cs
Normal file
@ -0,0 +1,20 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
|
||||
/// <summary>
|
||||
/// 系统流水号类型枚举
|
||||
/// </summary>
|
||||
[Description("系统流水号类型枚举")]
|
||||
public enum SerialTypeEnum
|
||||
{
|
||||
/// <summary>
|
||||
/// 其他
|
||||
/// </summary>
|
||||
[Description("其他")]
|
||||
Other = 999,
|
||||
}
|
||||
@ -179,13 +179,20 @@ public class SysMenuSeedData : ISqlSugarEntitySeedData<SysMenu>
|
||||
new SysMenu{ Id=1310000000445, Pid=1310000000441, Title="获取支付订单详情(微信接口)", Permission="sysWechatPay/payInfoFromWechat", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
new SysMenu{ Id=1310000000446, Pid=1310000000441, Title="退款申请", Permission="sysWechatPay/refundDomestic", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
|
||||
new SysMenu{ Id=1310000000451, Pid=1310000000301, Title="更新日志", Path="/platform/upgrade", Name="sysUpgrade", Component="/system/upgrade/index", Icon="ele-Paperclip", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=220 },
|
||||
new SysMenu{ Id=1310000000451, Pid=1310000000301, Title="更新日志", Path="/platform/upgrade", Name="sysUpgrade", Component="/system/upgrade/index", Icon="ele-Paperclip", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=240 },
|
||||
|
||||
//new SysMenu{ Id=1310000000461, Pid=1310000000301, Title="数据库备份", Path="/platform/dbBackup", Name="dbBackup", Component="/system/database/dbBackup", Icon="ele-Coin", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=240 },
|
||||
//new SysMenu{ Id=1310000000462, Pid=1310000000461, Title="查询", Permission="dbBackup/page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
//new SysMenu{ Id=1310000000463, Pid=1310000000461, Title="删除", Permission="dbBackup/delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
//new SysMenu{ Id=1310000000464, Pid=1310000000461, Title="增加", Permission="dbBackup/add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
|
||||
new SysMenu{ Id=1310000000471, Pid=1310000000301, Title="流水管理", Path="/platform/serial", Name="sysSerial", Component="/system/serial/index", Icon="ele-Link", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=250 },
|
||||
new SysMenu{ Id=1310000000472, Pid=1310000000471, Title="查询", Permission="sysSerial/page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
new SysMenu{ Id=1310000000473, Pid=1310000000471, Title="编辑", Permission="sysSerial/update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
new SysMenu{ Id=1310000000474, Pid=1310000000471, Title="增加", Permission="sysSerial/add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
new SysMenu{ Id=1310000000475, Pid=1310000000471, Title="删除", Permission="sysSerial/delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
new SysMenu{ Id=1310000000476, Pid=1310000000471, Title="设置状态", Permission="sysSerial/setStatus", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
|
||||
new SysMenu{ Id=1310000000501, Pid=0, Title="日志管理", Path="/log", Name="log", Component="Layout", Icon="ele-DocumentCopy", Type=MenuTypeEnum.Dir, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=12000 },
|
||||
new SysMenu{ Id=1310000000511, Pid=1310000000501, Title="访问日志", Path="/log/logvis", Name="sysLogVis", Component="/system/log/logvis/index", Icon="ele-Document", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
new SysMenu{ Id=1310000000512, Pid=1310000000511, Title="查询", Permission="sysLogVis/page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
|
||||
247
Admin.NET/Admin.NET.Core/Service/Serial/Dto/SerialInput.cs
Normal file
247
Admin.NET/Admin.NET.Core/Service/Serial/Dto/SerialInput.cs
Normal file
@ -0,0 +1,247 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.Service;
|
||||
|
||||
/// <summary>
|
||||
/// 本地序列基础输入参数
|
||||
/// </summary>
|
||||
public class SerialBaseInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 流水号
|
||||
/// </summary>
|
||||
public virtual long? Seq { get; set; }
|
||||
|
||||
///// <summary>
|
||||
///// 有效期
|
||||
///// </summary>
|
||||
//public virtual DateTime? Expy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 使用分类
|
||||
/// </summary>
|
||||
public virtual SerialTypeEnum? Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 重置间隔
|
||||
/// </summary>
|
||||
public virtual ResetIntervalEnum? ResetInterval { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表达式
|
||||
/// </summary>
|
||||
public virtual string Formater { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 最小值
|
||||
/// </summary>
|
||||
public virtual long? Min { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
public virtual int? OrderNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 最大值
|
||||
/// </summary>
|
||||
public virtual long? Max { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public virtual StatusEnum? Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public virtual string Remark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 租户Id
|
||||
/// </summary>
|
||||
public virtual long? TenantId { get; set; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 本地序列分页查询输入参数
|
||||
/// </summary>
|
||||
public class PageSerialInput : BasePageInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 关键字查询
|
||||
/// </summary>
|
||||
public string SearchKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 使用分类
|
||||
/// </summary>
|
||||
[Dict(nameof(SerialTypeEnum), AllowNullValue = true)]
|
||||
public SerialTypeEnum? Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
[Dict(nameof(StatusEnum), AllowNullValue = true)]
|
||||
public StatusEnum? Status { get; set; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 本地序列增加输入参数
|
||||
/// </summary>
|
||||
public class AddSerialInput : SerialBaseInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 使用分类
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "使用分类不能为空")]
|
||||
[Enum]
|
||||
public override SerialTypeEnum? Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 重置间隔
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "重置间隔不能为空")]
|
||||
[Dict(nameof(ResetIntervalEnum))]
|
||||
public override ResetIntervalEnum? ResetInterval { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表达式
|
||||
/// </summary>
|
||||
[RegularExpression("\\{SEQ\\}", ErrorMessage = "表达式必须包含序列化插槽")]
|
||||
[Required(ErrorMessage = "表达式不能为空")]
|
||||
public override string Formater { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 最小值
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "最小值不能为空")]
|
||||
public override long? Min { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "排序不能为空")]
|
||||
public override int? OrderNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 最大值
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "最大值不能为空")]
|
||||
public override long? Max { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public override string Remark { get; set; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 本地序列更新输入参数
|
||||
/// </summary>
|
||||
public class UpdateSerialInput : SerialBaseInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键Id
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "主键Id不能为空")]
|
||||
public long? Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 流水号
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "流水号不能为空")]
|
||||
public override long? Seq { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 使用分类
|
||||
/// </summary>
|
||||
[Enum]
|
||||
[Required(ErrorMessage = "使用分类不能为空")]
|
||||
public override SerialTypeEnum? Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 重置间隔
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "重置间隔不能为空")]
|
||||
[Dict(nameof(ResetIntervalEnum))]
|
||||
public override ResetIntervalEnum? ResetInterval { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表达式
|
||||
/// </summary>
|
||||
[RegularExpression("\\{SEQ\\}", ErrorMessage = "表达式必须包含序列化插槽")]
|
||||
[Required(ErrorMessage = "表达式不能为空")]
|
||||
public override string Formater { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 最小值
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "最小值不能为空")]
|
||||
public override long? Min { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "排序不能为空")]
|
||||
public override int? OrderNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 最大值
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "最大值不能为空")]
|
||||
public override long? Max { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "状态不能为空")]
|
||||
[Dict(nameof(StatusEnum))]
|
||||
public override StatusEnum? Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public override string Remark { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class PreviewSysSerialInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 生成表达式
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "生成表达式不能为空")]
|
||||
public string Formater { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 序号
|
||||
/// </summary>
|
||||
[Range(0, long.MaxValue, ErrorMessage = "流水号必须大于等于0")]
|
||||
public long Seq { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 最大序号
|
||||
/// </summary>
|
||||
[Range(1, long.MaxValue, ErrorMessage = "最大序号必须大于等于1")]
|
||||
public long Max { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取下一个输入参数
|
||||
/// </summary>
|
||||
public class GetNextSeqInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 使用分类
|
||||
/// </summary>
|
||||
[Dict(nameof(SerialTypeEnum))]
|
||||
public virtual SerialTypeEnum? Type { get; set; }
|
||||
}
|
||||
68
Admin.NET/Admin.NET.Core/Service/Serial/Dto/SerialOutput.cs
Normal file
68
Admin.NET/Admin.NET.Core/Service/Serial/Dto/SerialOutput.cs
Normal file
@ -0,0 +1,68 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.Service;
|
||||
|
||||
/// <summary>
|
||||
/// 本地序列输出参数
|
||||
/// </summary>
|
||||
public class PageSerialOutput
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键Id
|
||||
/// </summary>
|
||||
public long? Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 流水号
|
||||
/// </summary>
|
||||
public long? Seq { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 有效期
|
||||
/// </summary>
|
||||
public DateTime? Expy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 使用分类
|
||||
/// </summary>
|
||||
public SerialTypeEnum? Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 重置间隔
|
||||
/// </summary>
|
||||
public ResetIntervalEnum? ResetInterval { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表达式
|
||||
/// </summary>
|
||||
public string Formater { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 最小值
|
||||
/// </summary>
|
||||
public long? Min { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
public int? OrderNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 最大值
|
||||
/// </summary>
|
||||
public long? Max { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public StatusEnum? Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Remark { get; set; }
|
||||
}
|
||||
294
Admin.NET/Admin.NET.Core/Service/Serial/SysSerialService.cs
Normal file
294
Admin.NET/Admin.NET.Core/Service/Serial/SysSerialService.cs
Normal file
@ -0,0 +1,294 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.Service;
|
||||
|
||||
/// <summary>
|
||||
/// 系统流水号服务 🧩
|
||||
/// </summary>
|
||||
[ApiDescriptionSettings(Order = 100, Description = "系统流水号")]
|
||||
public class SysSerialService : IDynamicApiController, ITransient
|
||||
{
|
||||
private readonly SqlSugarRepository<SysSerial> _sysSerialRep;
|
||||
private readonly SysCacheService _sysCacheService;
|
||||
|
||||
private readonly UserManager _userManager;
|
||||
private readonly ISqlSugarClient _db;
|
||||
|
||||
public SysSerialService(SqlSugarRepository<SysSerial> sysSerialRep,
|
||||
SysCacheService sysCacheService, ISqlSugarClient db,
|
||||
UserManager userManager)
|
||||
{
|
||||
_db = db;
|
||||
_userManager = userManager;
|
||||
_sysSerialRep = sysSerialRep;
|
||||
_sysCacheService = sysCacheService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询本地序列 🔖
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[DisplayName("分页查询本地序列")]
|
||||
[ApiDescriptionSettings(Name = "Page"), HttpPost]
|
||||
public async Task<SqlSugarPagedList<PageSerialOutput>> Page(PageSerialInput input)
|
||||
{
|
||||
input.Keyword = input.Keyword?.Trim();
|
||||
var query = _sysSerialRep.AsQueryable().Where(u => u.TenantId == _userManager.TenantId)
|
||||
.WhereIF(input.Type != null, u => u.Type == input.Type)
|
||||
.WhereIF(input.Status != null, u => u.Status == input.Status)
|
||||
.Select<PageSerialOutput>();
|
||||
query = query.MergeTable();
|
||||
return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取本地序列详情 ℹ️
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[DisplayName("获取本地序列详情")]
|
||||
[ApiDescriptionSettings(Name = "Detail"), HttpGet]
|
||||
public async Task<SysSerial> Detail([FromQuery]BaseIdInput input)
|
||||
{
|
||||
return await _sysSerialRep.GetFirstAsync(u => u.Id == input.Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加本地序列 ➕
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[DisplayName("增加本地序列")]
|
||||
[ApiDescriptionSettings(Name = "Add"), HttpPost]
|
||||
public async Task<long> Add(AddSerialInput input)
|
||||
{
|
||||
var isExist = await _sysSerialRep.IsAnyAsync(u => u.Type == input.Type && u.TenantId == _userManager.TenantId);
|
||||
if (isExist) throw Oops.Oh(ErrorCodeEnum.D1006);
|
||||
|
||||
var entity = input.Adapt<SysSerial>();
|
||||
entity.Expy = DateTime.Now;
|
||||
entity.Seq = 1;
|
||||
return await _sysSerialRep.InsertAsync(entity) ? entity.Id : default;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新本地序列 ✏️
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[DisplayName("更新本地序列")]
|
||||
[ApiDescriptionSettings(Name = "Update"), HttpPost]
|
||||
public async Task Update(UpdateSerialInput input)
|
||||
{
|
||||
var seq = await _sysSerialRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002);
|
||||
var isExist = await _sysSerialRep.IsAnyAsync(u => u.Type == input.Type && u.TenantId == _userManager.TenantId && input.Id != seq.Id);
|
||||
if (isExist) throw Oops.Oh(ErrorCodeEnum.D1006);
|
||||
|
||||
var entity = input.Adapt<SysSerial>();
|
||||
await _sysSerialRep.AsUpdateable(entity).IgnoreColumns(u => new { u.Expy, u.Seq }).ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除本地序列 ❌
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[DisplayName("删除本地序列")]
|
||||
[ApiDescriptionSettings(Name = "Delete"), HttpPost]
|
||||
public async Task Delete(BaseIdInput input)
|
||||
{
|
||||
var entity = await _sysSerialRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002);
|
||||
await _sysSerialRep.DeleteAsync(entity); //真删除
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置本地序列状态 🚫
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[DisplayName("设置本地序列状态")]
|
||||
[ApiDescriptionSettings(Name = "SetStatus"), HttpPost]
|
||||
public async Task SetStatus(BaseStatusInput input)
|
||||
{
|
||||
await _sysSerialRep.AsUpdateable().SetColumns(u => u.Status, input.Status).Where(u => u.Id == input.Id).ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取流水号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[DisplayName("获取流水号"), HttpPost]
|
||||
public async Task<string> NextSeqNo(GetNextSeqInput input)
|
||||
{
|
||||
return await NextSeqNo(input.Type);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取全局流水号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[DisplayName("获取全局流水号"), HttpPost]
|
||||
public async Task<string> GlobalNextSeqNo(GetNextSeqInput input)
|
||||
{
|
||||
return await NextSeqNo(input.Type, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 预览流水号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[DisplayName("预览流水号"), HttpPost]
|
||||
public string Preview(PreviewSysSerialInput input)
|
||||
{
|
||||
return FormatSeqNo(new()
|
||||
{
|
||||
Formater = input.Formater,
|
||||
Seq = input.Seq,
|
||||
Max = input.Max,
|
||||
}, DateTime.Now);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取插槽列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[DisplayName("获取插槽列表")]
|
||||
public List<string> GetSlotList()
|
||||
{
|
||||
return GetSlotMap(0, 1, DateTime.Now).Select(k => k.Key).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取流水号
|
||||
/// </summary>
|
||||
/// <param name="type">类型</param>
|
||||
/// <param name="isGlobal">是否是全局唯一流水号</param>
|
||||
/// <param name="isTran">是否开启事务</param>
|
||||
/// <returns></returns>
|
||||
[NonAction]
|
||||
public async Task<string> NextSeqNo(SerialTypeEnum? type, bool isGlobal = false, bool isTran = true)
|
||||
{
|
||||
// 获取租户Id, 以及分布式锁缓存键名
|
||||
long tenantId = isGlobal ? SqlSugarConst.DefaultTenantId : _userManager.TenantId;
|
||||
string cacheKey = $"{CacheConst.KeySerialLock}:{tenantId}:{type}";
|
||||
|
||||
// 获取分布式锁
|
||||
using var distributedLock = _sysCacheService.BeginCacheLock(cacheKey, 1000) ?? throw Oops.Oh(ErrorCodeEnum.S0001);
|
||||
|
||||
// 记录流水号生成耗时
|
||||
var stopWatch = Stopwatch.StartNew();
|
||||
try
|
||||
{
|
||||
// 查询系统流水号配置
|
||||
var seq = await _sysSerialRep.AsQueryable().IgnoreTenant().FirstAsync(u =>
|
||||
u.Type == type && u.Status == StatusEnum.Enable && u.TenantId == tenantId) ?? throw Oops.Oh(ErrorCodeEnum.S0002);
|
||||
|
||||
// 尝试重置系统流水号配置
|
||||
var nowDate = DateTime.Now;
|
||||
TryRestSeqNo(seq, nowDate);
|
||||
|
||||
// 检查是否超出最大值
|
||||
seq.Seq++;
|
||||
if (seq.Seq > seq.Max) throw Oops.Oh(ErrorCodeEnum.S0004);
|
||||
|
||||
// 开启事务
|
||||
using var uow = _db.CreateContext(isTran);
|
||||
|
||||
// 更新失败,抛出异常
|
||||
await _db.RunWithoutFilter(async () =>
|
||||
{
|
||||
if (!await _sysSerialRep.UpdateAsync(u => new() { Expy = seq.Expy, Seq = seq.Seq }, u => u.Id == seq.Id))
|
||||
throw Oops.Oh(ErrorCodeEnum.S0005);
|
||||
});
|
||||
|
||||
uow.Commit();
|
||||
return FormatSeqNo(seq, nowDate);
|
||||
}
|
||||
finally
|
||||
{
|
||||
stopWatch.Stop();
|
||||
Console.WriteLine($"流水号【{type.GetDescription()}】生成耗时:{stopWatch.ElapsedMilliseconds}毫秒");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 重置系统流水号配置
|
||||
/// </summary>
|
||||
/// <param name="seq"></param>
|
||||
/// <param name="nowDate"></param>
|
||||
private void TryRestSeqNo(SysSerial seq, DateTime nowDate)
|
||||
{
|
||||
switch (seq.ResetInterval)
|
||||
{
|
||||
case ResetIntervalEnum.Never:
|
||||
break;
|
||||
case ResetIntervalEnum.Day:
|
||||
if (nowDate.Date != seq.Expy.Date)
|
||||
{
|
||||
seq.Expy = nowDate.Date;
|
||||
seq.Seq = seq.Min;
|
||||
}
|
||||
break;
|
||||
case ResetIntervalEnum.Month:
|
||||
if (nowDate.Month != seq.Expy.Month || nowDate.Year != seq.Expy.Year)
|
||||
{
|
||||
seq.Expy = nowDate.Date;
|
||||
seq.Seq = seq.Min;
|
||||
}
|
||||
break;
|
||||
case ResetIntervalEnum.Year:
|
||||
if (nowDate.Year != seq.Expy.Year)
|
||||
{
|
||||
seq.Expy = nowDate.Date;
|
||||
seq.Seq = seq.Min;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw Oops.Oh(ErrorCodeEnum.S0006);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按格式渲染流水号
|
||||
/// </summary>
|
||||
/// <param name="seq"></param>
|
||||
/// <param name="nowDate"></param>
|
||||
/// <returns></returns>
|
||||
private string FormatSeqNo(SysSerial seq, DateTime nowDate)
|
||||
{
|
||||
var replacements = GetSlotMap(seq.Seq, seq.Max, nowDate);
|
||||
return Regex.Replace(seq.Formater, @"\{.*?\}", match =>
|
||||
{
|
||||
string key = match.Value;
|
||||
if (replacements.TryGetValue(key, out var valueFunc)) return valueFunc();
|
||||
throw Oops.Oh("无效插槽: {0}", key);
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取插槽映射表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[NonAction]
|
||||
private Dictionary<string, Func<string>> GetSlotMap(long seq, long max, DateTime nowDate)
|
||||
{
|
||||
// 使用 "插槽名 - 代理方法" 映射表,这样匹配到的插槽才渲染,减少不必要的运算
|
||||
return new Dictionary<string, Func<string>>
|
||||
{
|
||||
["{yyyy}"] = () => nowDate.Year.ToString(),
|
||||
["{yy}"] = () => nowDate.Year.ToString()[2..],
|
||||
["{MM}"] = () => nowDate.Month.ToString("D2"),
|
||||
["{dd}"] = () => nowDate.Day.ToString("D2"),
|
||||
["{HH}"] = () => nowDate.Hour.ToString("D2"),
|
||||
["{mm}"] = () => nowDate.Minute.ToString("D2"),
|
||||
["{ss}"] = () => nowDate.Second.ToString("D2"),
|
||||
["{SEQ}"] = () => seq.ToString("D" + max.ToString().Length),
|
||||
["{TenantId}"] = () => _userManager.TenantId.ToString(),
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -4,9 +4,10 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
using System.Text.Json;
|
||||
using Minio.DataModel;
|
||||
using NewLife.IO;
|
||||
using NewLife.Reflection;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
|
||||
@ -594,4 +595,57 @@ public static class SqlSugarExtension
|
||||
}
|
||||
|
||||
#endregion 简称操作
|
||||
|
||||
#region 流水号操作
|
||||
/// <summary>
|
||||
/// 包含流水号特性的类型属性缓存表
|
||||
/// </summary>
|
||||
private static readonly ConcurrentDictionary<Type, Dictionary<string, (PropertyInfo Prop, BindSerialAttribute Attr)>?> _serialPropCache = new();
|
||||
|
||||
/// <summary>
|
||||
/// 系统通用服务
|
||||
/// </summary>
|
||||
private static readonly Lazy<SysSerialService> _lazySysSerialService = new(() => App.GetService<SysSerialService>());
|
||||
|
||||
/// <summary>
|
||||
/// 自动生成流水号到绑定字段
|
||||
/// </summary>
|
||||
/// <param name="entityInfo"></param>
|
||||
public static void SetSerialProperty(this DataFilterModel entityInfo)
|
||||
{
|
||||
// 仅处理新增操作
|
||||
if (entityInfo.OperationType is not DataFilterType.InsertByObject) return;
|
||||
|
||||
var entityValue = entityInfo.EntityValue;
|
||||
var entityType = entityValue.GetType();
|
||||
|
||||
// 仅在目标属性值为空时触发自动生成
|
||||
if (entityValue.GetValue(entityInfo.PropertyName) != null) return;
|
||||
|
||||
// 获取或创建类型属性缓存(原子化操作避免竞争条件)
|
||||
var propDict = _serialPropCache.GetOrAdd(entityType, type =>
|
||||
{
|
||||
// 反射获取带[BindSerial]特性的属性,预存属性元数据
|
||||
var props = type.GetProperties()
|
||||
.Where(p => p.IsDefined(typeof(BindSerialAttribute)))
|
||||
.Select(p => (p, p.GetCustomAttribute<BindSerialAttribute>()!))
|
||||
.ToDictionary(t => t.p.Name, t => (t.p, t.Item2));
|
||||
|
||||
return props.Any() ? props : null;
|
||||
});
|
||||
|
||||
// 无绑定属性或当前属性不匹配时提前结束
|
||||
if (propDict == null || !propDict.TryGetValue(entityInfo.PropertyName, out var propData)) return;
|
||||
|
||||
// 解构预存的属性和特性信息
|
||||
var (_, attribute) = propData;
|
||||
|
||||
// 使用线程安全的延迟初始化服务实例获取流水号
|
||||
var serial = _lazySysSerialService.Value
|
||||
.NextSeqNo(attribute.Type, attribute.IsGlobal)
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
entityInfo.SetValue(serial);
|
||||
}
|
||||
#endregion 流水号操作
|
||||
}
|
||||
@ -286,6 +286,9 @@ public static class SqlSugarSetup
|
||||
// 设置绑定简称字段数据
|
||||
entityInfo.SetTextAbbrProperty();
|
||||
|
||||
// 设置绑定流水号字段数据
|
||||
entityInfo.SetSerialProperty();
|
||||
|
||||
//// 自定义数据审计
|
||||
//SqlSugarDataExecuting.Execute(oldValue, entityInfo);
|
||||
};
|
||||
|
||||
@ -60,6 +60,7 @@ export * from './apis/sys-report-data-source-api';
|
||||
export * from './apis/sys-report-group-api';
|
||||
export * from './apis/sys-role-api';
|
||||
export * from './apis/sys-schedule-api';
|
||||
export * from './apis/sys-serial-api';
|
||||
export * from './apis/sys-server-api';
|
||||
export * from './apis/sys-sms-api';
|
||||
export * from './apis/sys-tenant-api';
|
||||
|
||||
892
Web/src/api-services/system/apis/sys-serial-api.ts
Normal file
892
Web/src/api-services/system/apis/sys-serial-api.ts
Normal file
@ -0,0 +1,892 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
import { Configuration } from '../configuration';
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
||||
import { AddSerialInput } from '../models';
|
||||
import { AdminNETResultInt64 } from '../models';
|
||||
import { AdminNETResultListString } from '../models';
|
||||
import { AdminNETResultSqlSugarPagedListPageSerialOutput } from '../models';
|
||||
import { AdminNETResultString } from '../models';
|
||||
import { AdminNETResultSysSerial } from '../models';
|
||||
import { BaseIdInput } from '../models';
|
||||
import { BaseStatusInput } from '../models';
|
||||
import { GetNextSeqInput } from '../models';
|
||||
import { PageSerialInput } from '../models';
|
||||
import { PreviewSysSerialInput } from '../models';
|
||||
import { UpdateSerialInput } from '../models';
|
||||
/**
|
||||
* SysSerialApi - axios parameter creator
|
||||
* @export
|
||||
*/
|
||||
export const SysSerialApiAxiosParamCreator = function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary 增加本地序列 ➕
|
||||
* @param {AddSerialInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysSerialAddPost: async (body?: AddSerialInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysSerial/add`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication Bearer required
|
||||
// http bearer authentication required
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken()
|
||||
: await configuration.accessToken;
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
|
||||
|
||||
const query = new URLSearchParams(localVarUrlObj.search);
|
||||
for (const key in localVarQueryParameter) {
|
||||
query.set(key, localVarQueryParameter[key]);
|
||||
}
|
||||
for (const key in options.params) {
|
||||
query.set(key, options.params[key]);
|
||||
}
|
||||
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
||||
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 删除本地序列 ❌
|
||||
* @param {BaseIdInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysSerialDeletePost: async (body?: BaseIdInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysSerial/delete`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication Bearer required
|
||||
// http bearer authentication required
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken()
|
||||
: await configuration.accessToken;
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
|
||||
|
||||
const query = new URLSearchParams(localVarUrlObj.search);
|
||||
for (const key in localVarQueryParameter) {
|
||||
query.set(key, localVarQueryParameter[key]);
|
||||
}
|
||||
for (const key in options.params) {
|
||||
query.set(key, options.params[key]);
|
||||
}
|
||||
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
||||
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取本地序列详情 ℹ️
|
||||
* @param {number} id 主键Id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysSerialDetailGet: async (id: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
if (id === null || id === undefined) {
|
||||
throw new RequiredError('id','Required parameter id was null or undefined when calling apiSysSerialDetailGet.');
|
||||
}
|
||||
const localVarPath = `/api/sysSerial/detail`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication Bearer required
|
||||
// http bearer authentication required
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken()
|
||||
: await configuration.accessToken;
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
if (id !== undefined) {
|
||||
localVarQueryParameter['Id'] = id;
|
||||
}
|
||||
|
||||
const query = new URLSearchParams(localVarUrlObj.search);
|
||||
for (const key in localVarQueryParameter) {
|
||||
query.set(key, localVarQueryParameter[key]);
|
||||
}
|
||||
for (const key in options.params) {
|
||||
query.set(key, options.params[key]);
|
||||
}
|
||||
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取全局流水号
|
||||
* @param {GetNextSeqInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysSerialGlobalNextSeqNoPost: async (body?: GetNextSeqInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysSerial/globalNextSeqNo`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication Bearer required
|
||||
// http bearer authentication required
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken()
|
||||
: await configuration.accessToken;
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
|
||||
|
||||
const query = new URLSearchParams(localVarUrlObj.search);
|
||||
for (const key in localVarQueryParameter) {
|
||||
query.set(key, localVarQueryParameter[key]);
|
||||
}
|
||||
for (const key in options.params) {
|
||||
query.set(key, options.params[key]);
|
||||
}
|
||||
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
||||
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取流水号
|
||||
* @param {GetNextSeqInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysSerialNextSeqNoPost: async (body?: GetNextSeqInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysSerial/nextSeqNo`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication Bearer required
|
||||
// http bearer authentication required
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken()
|
||||
: await configuration.accessToken;
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
|
||||
|
||||
const query = new URLSearchParams(localVarUrlObj.search);
|
||||
for (const key in localVarQueryParameter) {
|
||||
query.set(key, localVarQueryParameter[key]);
|
||||
}
|
||||
for (const key in options.params) {
|
||||
query.set(key, options.params[key]);
|
||||
}
|
||||
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
||||
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 分页查询本地序列 🔖
|
||||
* @param {PageSerialInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysSerialPagePost: async (body?: PageSerialInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysSerial/page`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication Bearer required
|
||||
// http bearer authentication required
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken()
|
||||
: await configuration.accessToken;
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
|
||||
|
||||
const query = new URLSearchParams(localVarUrlObj.search);
|
||||
for (const key in localVarQueryParameter) {
|
||||
query.set(key, localVarQueryParameter[key]);
|
||||
}
|
||||
for (const key in options.params) {
|
||||
query.set(key, options.params[key]);
|
||||
}
|
||||
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
||||
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 预览流水号
|
||||
* @param {PreviewSysSerialInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysSerialPreviewPost: async (body?: PreviewSysSerialInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysSerial/preview`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication Bearer required
|
||||
// http bearer authentication required
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken()
|
||||
: await configuration.accessToken;
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
|
||||
|
||||
const query = new URLSearchParams(localVarUrlObj.search);
|
||||
for (const key in localVarQueryParameter) {
|
||||
query.set(key, localVarQueryParameter[key]);
|
||||
}
|
||||
for (const key in options.params) {
|
||||
query.set(key, options.params[key]);
|
||||
}
|
||||
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
||||
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 设置本地序列状态 🚫
|
||||
* @param {BaseStatusInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysSerialSetStatusPost: async (body?: BaseStatusInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysSerial/setStatus`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication Bearer required
|
||||
// http bearer authentication required
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken()
|
||||
: await configuration.accessToken;
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
|
||||
|
||||
const query = new URLSearchParams(localVarUrlObj.search);
|
||||
for (const key in localVarQueryParameter) {
|
||||
query.set(key, localVarQueryParameter[key]);
|
||||
}
|
||||
for (const key in options.params) {
|
||||
query.set(key, options.params[key]);
|
||||
}
|
||||
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
||||
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取插槽列表
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysSerialSlotListGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysSerial/slotList`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication Bearer required
|
||||
// http bearer authentication required
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken()
|
||||
: await configuration.accessToken;
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
const query = new URLSearchParams(localVarUrlObj.search);
|
||||
for (const key in localVarQueryParameter) {
|
||||
query.set(key, localVarQueryParameter[key]);
|
||||
}
|
||||
for (const key in options.params) {
|
||||
query.set(key, options.params[key]);
|
||||
}
|
||||
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 更新本地序列 ✏️
|
||||
* @param {UpdateSerialInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysSerialUpdatePost: async (body?: UpdateSerialInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysSerial/update`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication Bearer required
|
||||
// http bearer authentication required
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken()
|
||||
: await configuration.accessToken;
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
|
||||
|
||||
const query = new URLSearchParams(localVarUrlObj.search);
|
||||
for (const key in localVarQueryParameter) {
|
||||
query.set(key, localVarQueryParameter[key]);
|
||||
}
|
||||
for (const key in options.params) {
|
||||
query.set(key, options.params[key]);
|
||||
}
|
||||
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
||||
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* SysSerialApi - functional programming interface
|
||||
* @export
|
||||
*/
|
||||
export const SysSerialApiFp = function(configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary 增加本地序列 ➕
|
||||
* @param {AddSerialInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysSerialAddPost(body?: AddSerialInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultInt64>>> {
|
||||
const localVarAxiosArgs = await SysSerialApiAxiosParamCreator(configuration).apiSysSerialAddPost(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 删除本地序列 ❌
|
||||
* @param {BaseIdInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysSerialDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
||||
const localVarAxiosArgs = await SysSerialApiAxiosParamCreator(configuration).apiSysSerialDeletePost(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取本地序列详情 ℹ️
|
||||
* @param {number} id 主键Id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysSerialDetailGet(id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultSysSerial>>> {
|
||||
const localVarAxiosArgs = await SysSerialApiAxiosParamCreator(configuration).apiSysSerialDetailGet(id, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取全局流水号
|
||||
* @param {GetNextSeqInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysSerialGlobalNextSeqNoPost(body?: GetNextSeqInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultString>>> {
|
||||
const localVarAxiosArgs = await SysSerialApiAxiosParamCreator(configuration).apiSysSerialGlobalNextSeqNoPost(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取流水号
|
||||
* @param {GetNextSeqInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysSerialNextSeqNoPost(body?: GetNextSeqInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultString>>> {
|
||||
const localVarAxiosArgs = await SysSerialApiAxiosParamCreator(configuration).apiSysSerialNextSeqNoPost(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 分页查询本地序列 🔖
|
||||
* @param {PageSerialInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysSerialPagePost(body?: PageSerialInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultSqlSugarPagedListPageSerialOutput>>> {
|
||||
const localVarAxiosArgs = await SysSerialApiAxiosParamCreator(configuration).apiSysSerialPagePost(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 预览流水号
|
||||
* @param {PreviewSysSerialInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysSerialPreviewPost(body?: PreviewSysSerialInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultString>>> {
|
||||
const localVarAxiosArgs = await SysSerialApiAxiosParamCreator(configuration).apiSysSerialPreviewPost(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 设置本地序列状态 🚫
|
||||
* @param {BaseStatusInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysSerialSetStatusPost(body?: BaseStatusInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
||||
const localVarAxiosArgs = await SysSerialApiAxiosParamCreator(configuration).apiSysSerialSetStatusPost(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取插槽列表
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysSerialSlotListGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultListString>>> {
|
||||
const localVarAxiosArgs = await SysSerialApiAxiosParamCreator(configuration).apiSysSerialSlotListGet(options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 更新本地序列 ✏️
|
||||
* @param {UpdateSerialInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysSerialUpdatePost(body?: UpdateSerialInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
||||
const localVarAxiosArgs = await SysSerialApiAxiosParamCreator(configuration).apiSysSerialUpdatePost(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* SysSerialApi - factory interface
|
||||
* @export
|
||||
*/
|
||||
export const SysSerialApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary 增加本地序列 ➕
|
||||
* @param {AddSerialInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysSerialAddPost(body?: AddSerialInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultInt64>> {
|
||||
return SysSerialApiFp(configuration).apiSysSerialAddPost(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 删除本地序列 ❌
|
||||
* @param {BaseIdInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysSerialDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
||||
return SysSerialApiFp(configuration).apiSysSerialDeletePost(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取本地序列详情 ℹ️
|
||||
* @param {number} id 主键Id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysSerialDetailGet(id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultSysSerial>> {
|
||||
return SysSerialApiFp(configuration).apiSysSerialDetailGet(id, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取全局流水号
|
||||
* @param {GetNextSeqInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysSerialGlobalNextSeqNoPost(body?: GetNextSeqInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultString>> {
|
||||
return SysSerialApiFp(configuration).apiSysSerialGlobalNextSeqNoPost(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取流水号
|
||||
* @param {GetNextSeqInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysSerialNextSeqNoPost(body?: GetNextSeqInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultString>> {
|
||||
return SysSerialApiFp(configuration).apiSysSerialNextSeqNoPost(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 分页查询本地序列 🔖
|
||||
* @param {PageSerialInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysSerialPagePost(body?: PageSerialInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultSqlSugarPagedListPageSerialOutput>> {
|
||||
return SysSerialApiFp(configuration).apiSysSerialPagePost(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 预览流水号
|
||||
* @param {PreviewSysSerialInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysSerialPreviewPost(body?: PreviewSysSerialInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultString>> {
|
||||
return SysSerialApiFp(configuration).apiSysSerialPreviewPost(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 设置本地序列状态 🚫
|
||||
* @param {BaseStatusInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysSerialSetStatusPost(body?: BaseStatusInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
||||
return SysSerialApiFp(configuration).apiSysSerialSetStatusPost(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取插槽列表
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysSerialSlotListGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultListString>> {
|
||||
return SysSerialApiFp(configuration).apiSysSerialSlotListGet(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 更新本地序列 ✏️
|
||||
* @param {UpdateSerialInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysSerialUpdatePost(body?: UpdateSerialInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
||||
return SysSerialApiFp(configuration).apiSysSerialUpdatePost(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* SysSerialApi - object-oriented interface
|
||||
* @export
|
||||
* @class SysSerialApi
|
||||
* @extends {BaseAPI}
|
||||
*/
|
||||
export class SysSerialApi extends BaseAPI {
|
||||
/**
|
||||
*
|
||||
* @summary 增加本地序列 ➕
|
||||
* @param {AddSerialInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysSerialApi
|
||||
*/
|
||||
public async apiSysSerialAddPost(body?: AddSerialInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultInt64>> {
|
||||
return SysSerialApiFp(this.configuration).apiSysSerialAddPost(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 删除本地序列 ❌
|
||||
* @param {BaseIdInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysSerialApi
|
||||
*/
|
||||
public async apiSysSerialDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
||||
return SysSerialApiFp(this.configuration).apiSysSerialDeletePost(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 获取本地序列详情 ℹ️
|
||||
* @param {number} id 主键Id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysSerialApi
|
||||
*/
|
||||
public async apiSysSerialDetailGet(id: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultSysSerial>> {
|
||||
return SysSerialApiFp(this.configuration).apiSysSerialDetailGet(id, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 获取全局流水号
|
||||
* @param {GetNextSeqInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysSerialApi
|
||||
*/
|
||||
public async apiSysSerialGlobalNextSeqNoPost(body?: GetNextSeqInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultString>> {
|
||||
return SysSerialApiFp(this.configuration).apiSysSerialGlobalNextSeqNoPost(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 获取流水号
|
||||
* @param {GetNextSeqInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysSerialApi
|
||||
*/
|
||||
public async apiSysSerialNextSeqNoPost(body?: GetNextSeqInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultString>> {
|
||||
return SysSerialApiFp(this.configuration).apiSysSerialNextSeqNoPost(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 分页查询本地序列 🔖
|
||||
* @param {PageSerialInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysSerialApi
|
||||
*/
|
||||
public async apiSysSerialPagePost(body?: PageSerialInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultSqlSugarPagedListPageSerialOutput>> {
|
||||
return SysSerialApiFp(this.configuration).apiSysSerialPagePost(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 预览流水号
|
||||
* @param {PreviewSysSerialInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysSerialApi
|
||||
*/
|
||||
public async apiSysSerialPreviewPost(body?: PreviewSysSerialInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultString>> {
|
||||
return SysSerialApiFp(this.configuration).apiSysSerialPreviewPost(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 设置本地序列状态 🚫
|
||||
* @param {BaseStatusInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysSerialApi
|
||||
*/
|
||||
public async apiSysSerialSetStatusPost(body?: BaseStatusInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
||||
return SysSerialApiFp(this.configuration).apiSysSerialSetStatusPost(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 获取插槽列表
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysSerialApi
|
||||
*/
|
||||
public async apiSysSerialSlotListGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultListString>> {
|
||||
return SysSerialApiFp(this.configuration).apiSysSerialSlotListGet(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 更新本地序列 ✏️
|
||||
* @param {UpdateSerialInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysSerialApi
|
||||
*/
|
||||
public async apiSysSerialUpdatePost(body?: UpdateSerialInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
||||
return SysSerialApiFp(this.configuration).apiSysSerialUpdatePost(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
99
Web/src/api-services/system/models/add-serial-input.ts
Normal file
99
Web/src/api-services/system/models/add-serial-input.ts
Normal file
@ -0,0 +1,99 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { ResetIntervalEnum } from './reset-interval-enum';
|
||||
import { SerialTypeEnum } from './serial-type-enum';
|
||||
import { StatusEnum } from './status-enum';
|
||||
/**
|
||||
* 本地序列增加输入参数
|
||||
*
|
||||
* @export
|
||||
* @interface AddSerialInput
|
||||
*/
|
||||
export interface AddSerialInput {
|
||||
|
||||
/**
|
||||
* 流水号
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AddSerialInput
|
||||
*/
|
||||
seq?: number | null;
|
||||
|
||||
/**
|
||||
* @type {StatusEnum}
|
||||
* @memberof AddSerialInput
|
||||
*/
|
||||
status?: StatusEnum;
|
||||
|
||||
/**
|
||||
* 租户Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AddSerialInput
|
||||
*/
|
||||
tenantId?: number | null;
|
||||
|
||||
/**
|
||||
* @type {SerialTypeEnum}
|
||||
* @memberof AddSerialInput
|
||||
*/
|
||||
type: SerialTypeEnum;
|
||||
|
||||
/**
|
||||
* @type {ResetIntervalEnum}
|
||||
* @memberof AddSerialInput
|
||||
*/
|
||||
resetInterval: ResetIntervalEnum;
|
||||
|
||||
/**
|
||||
* 格式化
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddSerialInput
|
||||
*/
|
||||
formater: string;
|
||||
|
||||
/**
|
||||
* 最小值
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AddSerialInput
|
||||
*/
|
||||
min: number;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AddSerialInput
|
||||
*/
|
||||
orderNo: number;
|
||||
|
||||
/**
|
||||
* 最大值
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AddSerialInput
|
||||
*/
|
||||
max: number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddSerialInput
|
||||
*/
|
||||
remark?: string | null;
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { SqlSugarPagedListPageSerialOutput } from './sql-sugar-paged-list-page-serial-output';
|
||||
/**
|
||||
* 全局返回结果
|
||||
*
|
||||
* @export
|
||||
* @interface AdminNETResultSqlSugarPagedListPageSerialOutput
|
||||
*/
|
||||
export interface AdminNETResultSqlSugarPagedListPageSerialOutput {
|
||||
|
||||
/**
|
||||
* 状态码
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AdminNETResultSqlSugarPagedListPageSerialOutput
|
||||
*/
|
||||
code?: number;
|
||||
|
||||
/**
|
||||
* 类型success、warning、error
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AdminNETResultSqlSugarPagedListPageSerialOutput
|
||||
*/
|
||||
type?: string | null;
|
||||
|
||||
/**
|
||||
* 错误信息
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AdminNETResultSqlSugarPagedListPageSerialOutput
|
||||
*/
|
||||
message?: string | null;
|
||||
|
||||
/**
|
||||
* @type {SqlSugarPagedListPageSerialOutput}
|
||||
* @memberof AdminNETResultSqlSugarPagedListPageSerialOutput
|
||||
*/
|
||||
result?: SqlSugarPagedListPageSerialOutput;
|
||||
|
||||
/**
|
||||
* 附加数据
|
||||
*
|
||||
* @type {any}
|
||||
* @memberof AdminNETResultSqlSugarPagedListPageSerialOutput
|
||||
*/
|
||||
extras?: any | null;
|
||||
|
||||
/**
|
||||
* 时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof AdminNETResultSqlSugarPagedListPageSerialOutput
|
||||
*/
|
||||
time?: Date;
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { SysSerial } from './sys-serial';
|
||||
/**
|
||||
* 全局返回结果
|
||||
*
|
||||
* @export
|
||||
* @interface AdminNETResultSysSerial
|
||||
*/
|
||||
export interface AdminNETResultSysSerial {
|
||||
|
||||
/**
|
||||
* 状态码
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AdminNETResultSysSerial
|
||||
*/
|
||||
code?: number;
|
||||
|
||||
/**
|
||||
* 类型success、warning、error
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AdminNETResultSysSerial
|
||||
*/
|
||||
type?: string | null;
|
||||
|
||||
/**
|
||||
* 错误信息
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AdminNETResultSysSerial
|
||||
*/
|
||||
message?: string | null;
|
||||
|
||||
/**
|
||||
* @type {SysSerial}
|
||||
* @memberof AdminNETResultSysSerial
|
||||
*/
|
||||
result?: SysSerial;
|
||||
|
||||
/**
|
||||
* 附加数据
|
||||
*
|
||||
* @type {any}
|
||||
* @memberof AdminNETResultSysSerial
|
||||
*/
|
||||
extras?: any | null;
|
||||
|
||||
/**
|
||||
* 时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof AdminNETResultSysSerial
|
||||
*/
|
||||
time?: Date;
|
||||
}
|
||||
29
Web/src/api-services/system/models/get-next-seq-input.ts
Normal file
29
Web/src/api-services/system/models/get-next-seq-input.ts
Normal file
@ -0,0 +1,29 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { SerialTypeEnum } from './serial-type-enum';
|
||||
/**
|
||||
* 获取下一个输入参数
|
||||
*
|
||||
* @export
|
||||
* @interface GetNextSeqInput
|
||||
*/
|
||||
export interface GetNextSeqInput {
|
||||
|
||||
/**
|
||||
* @type {SerialTypeEnum}
|
||||
* @memberof GetNextSeqInput
|
||||
*/
|
||||
type?: SerialTypeEnum;
|
||||
}
|
||||
@ -19,6 +19,7 @@ export * from './add-report-data-source-input';
|
||||
export * from './add-report-group-input';
|
||||
export * from './add-role-input';
|
||||
export * from './add-schedule-input';
|
||||
export * from './add-serial-input';
|
||||
export * from './add-subscribe-message-template-input';
|
||||
export * from './add-sys-ldap-input';
|
||||
export * from './add-tenant-input';
|
||||
@ -103,6 +104,7 @@ export * from './admin-netresult-sql-sugar-paged-list-oauth-user-output';
|
||||
export * from './admin-netresult-sql-sugar-paged-list-open-access-output';
|
||||
export * from './admin-netresult-sql-sugar-paged-list-page-pos-output';
|
||||
export * from './admin-netresult-sql-sugar-paged-list-page-role-output';
|
||||
export * from './admin-netresult-sql-sugar-paged-list-page-serial-output';
|
||||
export * from './admin-netresult-sql-sugar-paged-list-report-config-output';
|
||||
export * from './admin-netresult-sql-sugar-paged-list-sys-code-gen';
|
||||
export * from './admin-netresult-sql-sugar-paged-list-sys-config';
|
||||
@ -146,6 +148,7 @@ export * from './admin-netresult-sys-notice';
|
||||
export * from './admin-netresult-sys-print';
|
||||
export * from './admin-netresult-sys-report-layout-config';
|
||||
export * from './admin-netresult-sys-schedule';
|
||||
export * from './admin-netresult-sys-serial';
|
||||
export * from './admin-netresult-sys-upgrade';
|
||||
export * from './admin-netresult-sys-user';
|
||||
export * from './admin-netresult-sys-wechat-pay';
|
||||
@ -274,6 +277,7 @@ export * from './generate-qrimage-un-limit-input';
|
||||
export * from './generate-signature-input';
|
||||
export * from './generate-signature-output';
|
||||
export * from './generic-parameter-attributes';
|
||||
export * from './get-next-seq-input';
|
||||
export * from './get-refund-domestic-refund-by-out-refund-number-response';
|
||||
export * from './goods-detail';
|
||||
export * from './gpu-info';
|
||||
@ -373,6 +377,8 @@ export * from './page-report-config-input';
|
||||
export * from './page-report-data-source-input';
|
||||
export * from './page-role-input';
|
||||
export * from './page-role-output';
|
||||
export * from './page-serial-input';
|
||||
export * from './page-serial-output';
|
||||
export * from './page-sys-wechat-pay-input';
|
||||
export * from './page-tenant-input';
|
||||
export * from './page-upgrade-input';
|
||||
@ -383,6 +389,7 @@ export * from './parameter-info';
|
||||
export * from './platform-type-enum';
|
||||
export * from './pos-input';
|
||||
export * from './pos-output';
|
||||
export * from './preview-sys-serial-input';
|
||||
export * from './print-type-enum';
|
||||
export * from './promotion';
|
||||
export * from './property-attributes';
|
||||
@ -397,6 +404,7 @@ export * from './report-config-output';
|
||||
export * from './report-config-parse-sql-input';
|
||||
export * from './report-data-source-output';
|
||||
export * from './reset-column-custom-input';
|
||||
export * from './reset-interval-enum';
|
||||
export * from './reset-pwd-user-input';
|
||||
export * from './role-api-input';
|
||||
export * from './role-dto';
|
||||
@ -417,6 +425,7 @@ export * from './search';
|
||||
export * from './security-rule-set';
|
||||
export * from './seed-type';
|
||||
export * from './send-subscribe-message-input';
|
||||
export * from './serial-type-enum';
|
||||
export * from './serialization-format';
|
||||
export * from './set-nick-name-input';
|
||||
export * from './signature-input';
|
||||
@ -429,6 +438,7 @@ export * from './sql-sugar-paged-list-oauth-user-output';
|
||||
export * from './sql-sugar-paged-list-open-access-output';
|
||||
export * from './sql-sugar-paged-list-page-pos-output';
|
||||
export * from './sql-sugar-paged-list-page-role-output';
|
||||
export * from './sql-sugar-paged-list-page-serial-output';
|
||||
export * from './sql-sugar-paged-list-report-config-output';
|
||||
export * from './sql-sugar-paged-list-sys-code-gen';
|
||||
export * from './sql-sugar-paged-list-sys-config';
|
||||
@ -504,6 +514,7 @@ export * from './sys-report-group';
|
||||
export * from './sys-report-layout-config';
|
||||
export * from './sys-report-param';
|
||||
export * from './sys-schedule';
|
||||
export * from './sys-serial';
|
||||
export * from './sys-upgrade';
|
||||
export * from './sys-user';
|
||||
export * from './sys-user-ext-org';
|
||||
@ -550,6 +561,7 @@ export * from './update-report-data-source-input';
|
||||
export * from './update-report-group-input';
|
||||
export * from './update-role-input';
|
||||
export * from './update-schedule-input';
|
||||
export * from './update-serial-input';
|
||||
export * from './update-sys-ldap-input';
|
||||
export * from './update-tenant-input';
|
||||
export * from './update-user-input';
|
||||
@ -571,4 +583,4 @@ export * from './wechat-user-login';
|
||||
export * from './wx-open-id-login-input';
|
||||
export * from './wx-open-id-output';
|
||||
export * from './wx-phone-output';
|
||||
export * from './yes-no-enum';
|
||||
export * from './yes-no-enum';
|
||||
106
Web/src/api-services/system/models/page-serial-input.ts
Normal file
106
Web/src/api-services/system/models/page-serial-input.ts
Normal file
@ -0,0 +1,106 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { Filter } from './filter';
|
||||
import { Search } from './search';
|
||||
import { SerialTypeEnum } from './serial-type-enum';
|
||||
import { StatusEnum } from './status-enum';
|
||||
/**
|
||||
* 本地序列分页查询输入参数
|
||||
*
|
||||
* @export
|
||||
* @interface PageSerialInput
|
||||
*/
|
||||
export interface PageSerialInput {
|
||||
|
||||
/**
|
||||
* @type {Search}
|
||||
* @memberof PageSerialInput
|
||||
*/
|
||||
search?: Search;
|
||||
|
||||
/**
|
||||
* 模糊查询关键字
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PageSerialInput
|
||||
*/
|
||||
keyword?: string | null;
|
||||
|
||||
/**
|
||||
* @type {Filter}
|
||||
* @memberof PageSerialInput
|
||||
*/
|
||||
filter?: Filter;
|
||||
|
||||
/**
|
||||
* 当前页码
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PageSerialInput
|
||||
*/
|
||||
page?: number;
|
||||
|
||||
/**
|
||||
* 页码容量
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PageSerialInput
|
||||
*/
|
||||
pageSize?: number;
|
||||
|
||||
/**
|
||||
* 排序字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PageSerialInput
|
||||
*/
|
||||
field?: string | null;
|
||||
|
||||
/**
|
||||
* 排序方向
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PageSerialInput
|
||||
*/
|
||||
order?: string | null;
|
||||
|
||||
/**
|
||||
* 降序排序
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PageSerialInput
|
||||
*/
|
||||
descStr?: string | null;
|
||||
|
||||
/**
|
||||
* 关键字查询
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PageSerialInput
|
||||
*/
|
||||
searchKey?: string | null;
|
||||
|
||||
/**
|
||||
* @type {SerialTypeEnum}
|
||||
* @memberof PageSerialInput
|
||||
*/
|
||||
type?: SerialTypeEnum;
|
||||
|
||||
/**
|
||||
* @type {StatusEnum}
|
||||
* @memberof PageSerialInput
|
||||
*/
|
||||
status?: StatusEnum;
|
||||
}
|
||||
107
Web/src/api-services/system/models/page-serial-output.ts
Normal file
107
Web/src/api-services/system/models/page-serial-output.ts
Normal file
@ -0,0 +1,107 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { ResetIntervalEnum } from './reset-interval-enum';
|
||||
import { SerialTypeEnum } from './serial-type-enum';
|
||||
import { StatusEnum } from './status-enum';
|
||||
/**
|
||||
* 本地序列输出参数
|
||||
*
|
||||
* @export
|
||||
* @interface PageSerialOutput
|
||||
*/
|
||||
export interface PageSerialOutput {
|
||||
|
||||
/**
|
||||
* 主键Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PageSerialOutput
|
||||
*/
|
||||
id?: number | null;
|
||||
|
||||
/**
|
||||
* 流水号
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PageSerialOutput
|
||||
*/
|
||||
seq?: number | null;
|
||||
|
||||
/**
|
||||
* 有效期
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof PageSerialOutput
|
||||
*/
|
||||
expy?: Date | null;
|
||||
|
||||
/**
|
||||
* @type {SerialTypeEnum}
|
||||
* @memberof PageSerialOutput
|
||||
*/
|
||||
type?: SerialTypeEnum;
|
||||
|
||||
/**
|
||||
* @type {ResetIntervalEnum}
|
||||
* @memberof PageSerialOutput
|
||||
*/
|
||||
resetInterval?: ResetIntervalEnum;
|
||||
|
||||
/**
|
||||
* 格式化
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PageSerialOutput
|
||||
*/
|
||||
formater?: string | null;
|
||||
|
||||
/**
|
||||
* 最小值
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PageSerialOutput
|
||||
*/
|
||||
min?: number | null;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PageSerialOutput
|
||||
*/
|
||||
orderNo?: number | null;
|
||||
|
||||
/**
|
||||
* 最大值
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PageSerialOutput
|
||||
*/
|
||||
max?: number | null;
|
||||
|
||||
/**
|
||||
* @type {StatusEnum}
|
||||
* @memberof PageSerialOutput
|
||||
*/
|
||||
status?: StatusEnum;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PageSerialOutput
|
||||
*/
|
||||
remark?: string | null;
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @export
|
||||
* @interface PreviewSysSerialInput
|
||||
*/
|
||||
export interface PreviewSysSerialInput {
|
||||
|
||||
/**
|
||||
* 生成表达式
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PreviewSysSerialInput
|
||||
*/
|
||||
formater: string;
|
||||
|
||||
/**
|
||||
* 序号
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PreviewSysSerialInput
|
||||
*/
|
||||
seq?: number;
|
||||
|
||||
/**
|
||||
* 最大序号
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PreviewSysSerialInput
|
||||
*/
|
||||
max?: number;
|
||||
}
|
||||
26
Web/src/api-services/system/models/reset-interval-enum.ts
Normal file
26
Web/src/api-services/system/models/reset-interval-enum.ts
Normal file
@ -0,0 +1,26 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
* 重置间隔枚举<br /> 从不重置 Never = 1<br /> 日 Day = 2<br /> 月 Month = 3<br /> 年 Year = 4<br />
|
||||
* @export
|
||||
* @enum {string}
|
||||
*/
|
||||
export enum ResetIntervalEnum {
|
||||
NUMBER_1 = 1,
|
||||
NUMBER_2 = 2,
|
||||
NUMBER_3 = 3,
|
||||
NUMBER_4 = 4
|
||||
}
|
||||
|
||||
23
Web/src/api-services/system/models/serial-type-enum.ts
Normal file
23
Web/src/api-services/system/models/serial-type-enum.ts
Normal file
@ -0,0 +1,23 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
* 系统流水号类型枚举<br /> 其他 Other = 999<br />
|
||||
* @export
|
||||
* @enum {string}
|
||||
*/
|
||||
export enum SerialTypeEnum {
|
||||
NUMBER_999 = 999
|
||||
}
|
||||
|
||||
@ -0,0 +1,79 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { PageSerialOutput } from './page-serial-output';
|
||||
/**
|
||||
* 分页泛型集合
|
||||
*
|
||||
* @export
|
||||
* @interface SqlSugarPagedListPageSerialOutput
|
||||
*/
|
||||
export interface SqlSugarPagedListPageSerialOutput {
|
||||
|
||||
/**
|
||||
* 页码
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SqlSugarPagedListPageSerialOutput
|
||||
*/
|
||||
page?: number;
|
||||
|
||||
/**
|
||||
* 页容量
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SqlSugarPagedListPageSerialOutput
|
||||
*/
|
||||
pageSize?: number;
|
||||
|
||||
/**
|
||||
* 总条数
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SqlSugarPagedListPageSerialOutput
|
||||
*/
|
||||
total?: number;
|
||||
|
||||
/**
|
||||
* 总页数
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SqlSugarPagedListPageSerialOutput
|
||||
*/
|
||||
totalPages?: number;
|
||||
|
||||
/**
|
||||
* 当前页集合
|
||||
*
|
||||
* @type {Array<PageSerialOutput>}
|
||||
* @memberof SqlSugarPagedListPageSerialOutput
|
||||
*/
|
||||
items?: Array<PageSerialOutput> | null;
|
||||
|
||||
/**
|
||||
* 是否有上一页
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof SqlSugarPagedListPageSerialOutput
|
||||
*/
|
||||
hasPrevPage?: boolean;
|
||||
|
||||
/**
|
||||
* 是否有下一页
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof SqlSugarPagedListPageSerialOutput
|
||||
*/
|
||||
hasNextPage?: boolean;
|
||||
}
|
||||
115
Web/src/api-services/system/models/sys-serial.ts
Normal file
115
Web/src/api-services/system/models/sys-serial.ts
Normal file
@ -0,0 +1,115 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { ResetIntervalEnum } from './reset-interval-enum';
|
||||
import { SerialTypeEnum } from './serial-type-enum';
|
||||
import { StatusEnum } from './status-enum';
|
||||
/**
|
||||
* 系统流水号表
|
||||
*
|
||||
* @export
|
||||
* @interface SysSerial
|
||||
*/
|
||||
export interface SysSerial {
|
||||
|
||||
/**
|
||||
* 雪花Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysSerial
|
||||
*/
|
||||
id?: number;
|
||||
|
||||
/**
|
||||
* 租户Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysSerial
|
||||
*/
|
||||
tenantId?: number | null;
|
||||
|
||||
/**
|
||||
* 序列号
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysSerial
|
||||
*/
|
||||
seq: number;
|
||||
|
||||
/**
|
||||
* 有效期
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof SysSerial
|
||||
*/
|
||||
expy: Date;
|
||||
|
||||
/**
|
||||
* @type {SerialTypeEnum}
|
||||
* @memberof SysSerial
|
||||
*/
|
||||
type: SerialTypeEnum;
|
||||
|
||||
/**
|
||||
* @type {ResetIntervalEnum}
|
||||
* @memberof SysSerial
|
||||
*/
|
||||
resetInterval: ResetIntervalEnum;
|
||||
|
||||
/**
|
||||
* 格式化
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysSerial
|
||||
*/
|
||||
formater?: string | null;
|
||||
|
||||
/**
|
||||
* 最小值
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysSerial
|
||||
*/
|
||||
min?: number;
|
||||
|
||||
/**
|
||||
* 最大值
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysSerial
|
||||
*/
|
||||
max?: number;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysSerial
|
||||
*/
|
||||
orderNo?: number;
|
||||
|
||||
/**
|
||||
* @type {StatusEnum}
|
||||
* @memberof SysSerial
|
||||
*/
|
||||
status: StatusEnum;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysSerial
|
||||
*/
|
||||
remark?: string | null;
|
||||
}
|
||||
107
Web/src/api-services/system/models/update-serial-input.ts
Normal file
107
Web/src/api-services/system/models/update-serial-input.ts
Normal file
@ -0,0 +1,107 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { ResetIntervalEnum } from './reset-interval-enum';
|
||||
import { SerialTypeEnum } from './serial-type-enum';
|
||||
import { StatusEnum } from './status-enum';
|
||||
/**
|
||||
* 本地序列更新输入参数
|
||||
*
|
||||
* @export
|
||||
* @interface UpdateSerialInput
|
||||
*/
|
||||
export interface UpdateSerialInput {
|
||||
|
||||
/**
|
||||
* 租户Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof UpdateSerialInput
|
||||
*/
|
||||
tenantId?: number | null;
|
||||
|
||||
/**
|
||||
* 主键Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof UpdateSerialInput
|
||||
*/
|
||||
id: number;
|
||||
|
||||
/**
|
||||
* 流水号
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof UpdateSerialInput
|
||||
*/
|
||||
seq: number;
|
||||
|
||||
/**
|
||||
* @type {SerialTypeEnum}
|
||||
* @memberof UpdateSerialInput
|
||||
*/
|
||||
type: SerialTypeEnum;
|
||||
|
||||
/**
|
||||
* @type {ResetIntervalEnum}
|
||||
* @memberof UpdateSerialInput
|
||||
*/
|
||||
resetInterval: ResetIntervalEnum;
|
||||
|
||||
/**
|
||||
* 格式化
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateSerialInput
|
||||
*/
|
||||
formater: string;
|
||||
|
||||
/**
|
||||
* 最小值
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof UpdateSerialInput
|
||||
*/
|
||||
min: number;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof UpdateSerialInput
|
||||
*/
|
||||
orderNo: number;
|
||||
|
||||
/**
|
||||
* 最大值
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof UpdateSerialInput
|
||||
*/
|
||||
max: number;
|
||||
|
||||
/**
|
||||
* @type {StatusEnum}
|
||||
* @memberof UpdateSerialInput
|
||||
*/
|
||||
status: StatusEnum;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateSerialInput
|
||||
*/
|
||||
remark?: string | null;
|
||||
}
|
||||
171
Web/src/views/system/serial/component/editSysSerialDialog.vue
Normal file
171
Web/src/views/system/serial/component/editSysSerialDialog.vue
Normal file
@ -0,0 +1,171 @@
|
||||
<template>
|
||||
<div class="sysSerial-container">
|
||||
<el-dialog v-model="state.showDialog" :width="800" draggable :close-on-click-modal="false">
|
||||
<template #header>
|
||||
<div style="color: #fff">
|
||||
<span>{{ state.title }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<el-form :model="state.ruleForm" ref="ruleFormRef" label-width="auto" :rules="rules">
|
||||
<el-row :gutter="35">
|
||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||
<el-form-item label="序列号" prop="seq">
|
||||
<el-input-number v-model="state.ruleForm.seq" placeholder="请输入序列号" clearable :disabled="true" class="w100" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||
<el-form-item label="使用分类" prop="type">
|
||||
<g-sys-dict v-model="state.ruleForm.type" :code="'SerialTypeEnum'" render-as="select" clearable :disabled="state.disabled" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||
<el-form-item label="重置间隔" prop="resetInterval">
|
||||
<g-sys-dict v-model="state.ruleForm.resetInterval" :code="'ResetIntervalEnum'" render-as="select" clearable :disabled="state.disabled" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||
<el-form-item label="表达式" prop="formater">
|
||||
<el-input v-model="state.ruleForm.formater" placeholder="表达式样例:R{yyyy}{MM}{dd}{HH}{mm}{ss}{SEQ}" clearable :disabled="state.disabled">
|
||||
<template #append>
|
||||
<el-dropdown placement="bottom" @command="(val: any) => state.ruleForm.formater += val">
|
||||
<el-button> 插槽 </el-button>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item v-for="key in state.slotList" :key="key" :command="key">{{key}}</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||
<el-form-item label="最小值" prop="min">
|
||||
<el-input-number v-model="state.ruleForm.min" placeholder="请输入最小值" clearable :disabled="state.disabled" class="w100" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||
<el-form-item label="排序" prop="orderNo">
|
||||
<el-input-number v-model="state.ruleForm.orderNo" placeholder="请输入排序" clearable :disabled="state.disabled" class="w100" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||
<el-form-item label="最大值" prop="max">
|
||||
<el-input-number v-model="state.ruleForm.max" placeholder="请输入最大值" clearable :disabled="state.disabled" class="w100" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="state.ruleForm.remark" placeholder="请输入备注" clearable :disabled="state.disabled" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20" v-if="state.previewSeqNo">
|
||||
<el-form-item label="预览">
|
||||
{{ state.previewSeqNo }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="() => (state.showDialog = false)">取 消</el-button>
|
||||
<el-button type="warning" icon="ele-View" @click="preview" v-reclick="500">预览</el-button>
|
||||
<el-button v-if="!state.disabled" @click="submit" type="primary" v-reclick="1000">确 定</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" name="sysSerial" setup>
|
||||
import { ref, reactive, onMounted } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import type { FormRules } from 'element-plus';
|
||||
import { getAPI } from '/@/utils/axios-utils';
|
||||
import { SysSerialApi } from '/@/api-services/system/api';
|
||||
import { UpdateSerialInput } from '/@/api-services/system/models';
|
||||
|
||||
//父级传递来的函数,用于回调
|
||||
const emit = defineEmits(['handleQuery']);
|
||||
const ruleFormRef = ref();
|
||||
const state = reactive({
|
||||
title: '',
|
||||
loading: false,
|
||||
disabled: false,
|
||||
showDialog: false,
|
||||
previewSeqNo: '',
|
||||
slotList: [] as any[],
|
||||
ruleForm: {} as UpdateSerialInput,
|
||||
});
|
||||
|
||||
// 自行添加其他规则
|
||||
const rules = ref<FormRules>({
|
||||
type: [{ required: true, message: '请选择使用分类!', trigger: 'change' }],
|
||||
formater: [{ required: true, message: '请选择格式化!', trigger: 'blur' }],
|
||||
resetInterval: [{ required: true, message: '请选择重置方式!', trigger: 'blur' }],
|
||||
min: [{ required: true, message: '请输入最小值!', trigger: 'blur' }],
|
||||
orderNo: [{ required: true, message: '请输入排序!', trigger: 'blur' }],
|
||||
max: [{ required: true, message: '请输入最大值!', trigger: 'blur' }],
|
||||
status: [{ required: true, message: '请选择状态!', trigger: 'change' }],
|
||||
});
|
||||
|
||||
// 页面加载时
|
||||
onMounted(async () => {
|
||||
state.slotList = await getAPI(SysSerialApi).apiSysSerialSlotListGet().then(({data}) => data.result ?? []);
|
||||
});
|
||||
|
||||
// 打开弹窗
|
||||
const openDialog = async (row: any, title: string) => {
|
||||
state.title = title;
|
||||
state.disabled = title?.endsWith('详情');
|
||||
state.showDialog = true;
|
||||
ruleFormRef.value?.resetFields();
|
||||
row = JSON.parse(JSON.stringify(row ?? { status: 1, orderNo: 100 }));
|
||||
state.ruleForm = row.id ? await getAPI(SysSerialApi).apiSysSerialDetailGet(row.id).then((res) => res.data.result ?? row) : row;
|
||||
state.ruleForm.formater ??= '';
|
||||
};
|
||||
|
||||
// 关闭弹窗
|
||||
const closeDialog = () => {
|
||||
emit('handleQuery');
|
||||
state.showDialog = false;
|
||||
};
|
||||
|
||||
// 预览
|
||||
const preview = () => {
|
||||
getAPI(SysSerialApi).apiSysSerialPreviewPost(state.ruleForm).then(res => {
|
||||
if (res.data.result) {
|
||||
ElMessage.success("获取成功");
|
||||
state.previewSeqNo = res.data.result;
|
||||
state.ruleForm.seq ??= 0;
|
||||
state.ruleForm.seq += 1;
|
||||
} else {
|
||||
ElMessage.error("预览失败");
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 提交
|
||||
const submit = async () => {
|
||||
ruleFormRef.value.validate(async (isValid: boolean, fields?: any) => {
|
||||
if (isValid) {
|
||||
let values = JSON.parse(JSON.stringify(state.ruleForm));
|
||||
// 处理多选字段值
|
||||
if (state.ruleForm.id) {
|
||||
await getAPI(SysSerialApi).apiSysSerialUpdatePost(values);
|
||||
} else {
|
||||
await getAPI(SysSerialApi).apiSysSerialAddPost(values);
|
||||
}
|
||||
closeDialog();
|
||||
} else {
|
||||
ElMessage({
|
||||
message: `表单有${Object.keys(fields).length}处验证失败,请修改后再提交`,
|
||||
type: 'error',
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
//将属性或者函数暴露给父组件
|
||||
defineExpose({ openDialog });
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
||||
204
Web/src/views/system/serial/index.vue
Normal file
204
Web/src/views/system/serial/index.vue
Normal file
@ -0,0 +1,204 @@
|
||||
<template>
|
||||
<div class="sysSerial-container">
|
||||
<el-card shadow="hover" :body-style="{ padding: '5px', display: 'flex', width: '100%', height: '100%', alignItems: 'start' }">
|
||||
<el-form :model="state.queryParams" ref="queryForm" :show-message="false" :inlineMessage="true" label-width="auto" style="flex: 1 1 0%">
|
||||
<el-row :gutter="10">
|
||||
<el-col class="mb5" :sm="12" :md="8" :lg="6" :xl="6">
|
||||
<el-form-item label="使用分类" prop="type">
|
||||
<g-sys-dict v-model="state.queryParams.type" :code="'SerialTypeEnum'" render-as="select" clearable @keyup.enter.native="handleQuery(false)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col class="mb5" :sm="12" :md="8" :lg="6" :xl="6">
|
||||
<el-form-item label="状态" prop="status">
|
||||
<g-sys-dict v-model="state.queryParams.status" :code="'StatusEnum'" render-as="select" clearable @keyup.enter.native="handleQuery(false)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-divider style="height: calc(100% - 5px); margin: 0 10px" direction="vertical" />
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-button-group>
|
||||
<el-button type="primary" icon="ele-Search" @click="handleQuery(false)" v-auth="'sysSerial/page'"> 查询 </el-button>
|
||||
<el-button icon="ele-Refresh" @click="resetQuery"> 重置 </el-button>
|
||||
</el-button-group>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<vxe-card class="full-height" style="margin-top: 5px">
|
||||
<vxe-grid ref="xGrid" class="xGrid-style" v-bind="options" v-on="gridEvents">
|
||||
<template #toolbar_buttons>
|
||||
<el-button type="primary" icon="ele-Plus" @click="handleAdd" v-auth="'sysSerial/add'"> 新增 </el-button>
|
||||
</template>
|
||||
<template #toolbar_tools></template>
|
||||
<template #empty><el-empty :image-size="200" /></template>
|
||||
<template #row_record="{ row }"><ModifyRecord :data="row" /></template>
|
||||
<template #row_expy="{ row, $index }">
|
||||
{{ commonFun.dateFormatYMDHMS(row, $index, row.expy) }}
|
||||
</template>
|
||||
<template #row_type="{ row, $index }">
|
||||
<g-sys-dict v-model="row.type" :code="'SerialTypeEnum'" />
|
||||
</template>
|
||||
<template #row_resetInterval="{ row, $index }">
|
||||
<g-sys-dict v-model="row.resetInterval" :code="'ResetIntervalEnum'" />
|
||||
</template>
|
||||
<template #row_status="{ row, $index }">
|
||||
<el-switch v-model="row.status" :active-value="1" :inactive-value="2" disabled />
|
||||
</template>
|
||||
<template #row_buttons="{ row }">
|
||||
<el-button icon="ele-Delete" size="small" text type="danger" @click="handleDelete(row)" v-auth="'sysSerial/delete'">删除</el-button>
|
||||
<el-button icon="ele-Edit" size="small" text type="primary" @click="handleEdit(row)" v-auth="'sysSerial/update'">编辑</el-button>
|
||||
<el-button icon="ele-Warning" size="small" text type="primary" @click="handleDetail(row)" v-auth="'sysSerial/detail'">详情</el-button>
|
||||
</template>
|
||||
</vxe-grid>
|
||||
</vxe-card>
|
||||
<EditSysSerialDialog ref="editSysSerialDialogRef" @handleQuery="handleQuery" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="sysSerial">
|
||||
import { onMounted, reactive, ref } from 'vue';
|
||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
import { VxeGridInstance, VxeGridListeners, VxeGridPropTypes } from 'vxe-table';
|
||||
import { useVxeTable } from '/@/hooks/useVxeTableOptionsHook';
|
||||
import commonFunction from '/@/utils/commonFunction';
|
||||
import { Local } from '/@/utils/storage';
|
||||
import { getAPI } from '/@/utils/axios-utils';
|
||||
import { SysSerialApi } from '/@/api-services/system/api';
|
||||
import { PageSerialInput, PageSerialOutput } from '/@/api-services/system/models';
|
||||
import ModifyRecord from '/@/components/table/modifyRecord.vue';
|
||||
import EditSysSerialDialog from './component/editSysSerialDialog.vue';
|
||||
|
||||
const commonFun = commonFunction();
|
||||
const xGrid = ref<VxeGridInstance>();
|
||||
const editSysSerialDialogRef = ref<InstanceType<typeof EditSysSerialDialog>>();
|
||||
const state = reactive({
|
||||
queryParams: {} as PageSerialInput,
|
||||
showAdvanceQueryUI: false,
|
||||
localPageParam: {
|
||||
pageSize: 20 as number,
|
||||
defaultSort: { field: 'id', order: 'asc', descStr: 'desc' },
|
||||
},
|
||||
visible: false,
|
||||
});
|
||||
|
||||
// 本地存储参数
|
||||
const localPageParamKey = 'localPageParam:sysSerial';
|
||||
// 表格参数配置
|
||||
const options = useVxeTable<PageSerialOutput>(
|
||||
{
|
||||
id: 'sysSerial',
|
||||
name: '流水号',
|
||||
columns: [
|
||||
// { type: 'checkbox', width: 40, fixed: 'left' },
|
||||
// { field: 'seq', type: 'seq', title: '序号', width: 60, fixed: 'left' },
|
||||
{ field: 'seq', title: '序列号', minWidth: 80, showOverflow: 'tooltip' },
|
||||
{ field: 'expy', title: '有效期', minWidth: 150, showOverflow: 'tooltip', slots: { default: 'row_expy' } },
|
||||
{ field: 'type', title: '使用分类', minWidth: 150, showOverflow: 'tooltip', slots: { default: 'row_type' } },
|
||||
{ field: 'resetInterval', title: '重置间隔', minWidth: 120, showOverflow: 'tooltip', slots: { default: 'row_resetInterval' } },
|
||||
{ field: 'formater', title: '表达式', minWidth: 220, showOverflow: 'tooltip' },
|
||||
{ field: 'min', title: '最小值', minWidth: 80, showOverflow: 'tooltip' },
|
||||
{ field: 'max', title: '最大值', minWidth: 150, showOverflow: 'tooltip' },
|
||||
{ field: 'orderNo', title: '排序', minWidth: 100, sortable: true, showOverflow: 'tooltip' },
|
||||
{ field: 'status', title: '状态', minWidth: 100, showOverflow: 'tooltip', slots: { default: 'row_status' } },
|
||||
{ field: 'remark', title: '备注', minWidth: 150, showOverflow: 'tooltip' },
|
||||
{ field: 'record', title: '修改记录', width: 100, showOverflow: 'tooltip', slots: { default: 'row_record' } },
|
||||
{ field: 'buttons', title: '操作', fixed: 'right', width: 200, showOverflow: true, slots: { default: 'row_buttons' } },
|
||||
],
|
||||
},
|
||||
// vxeGrid配置参数(此处可覆写任何参数),参考vxe-table官方文档
|
||||
{
|
||||
// 代理配置
|
||||
proxyConfig: { autoLoad: false, ajax: { query: ({ page, sort }) => handleQueryApi(page, sort) } },
|
||||
// 排序配置
|
||||
sortConfig: { defaultSort: Local.get(localPageParamKey)?.defaultSort || state.localPageParam.defaultSort },
|
||||
// 分页配置
|
||||
pagerConfig: { pageSize: Local.get(localPageParamKey)?.pageSize || state.localPageParam.pageSize },
|
||||
// 导入配置
|
||||
// importConfig: { remote: true, importMethod: (options: any) => handleImport(options), slots: { top: 'import_sysSerial' } },
|
||||
// 工具栏配置
|
||||
toolbarConfig: { import: false, export: true },
|
||||
}
|
||||
);
|
||||
|
||||
// 页面初始化
|
||||
onMounted(async () => {
|
||||
state.localPageParam = Local.get(localPageParamKey) || state.localPageParam;
|
||||
handleQuery(true);
|
||||
});
|
||||
|
||||
// 查询api
|
||||
const handleQueryApi = (page: VxeGridPropTypes.ProxyAjaxQueryPageParams, sort: VxeGridPropTypes.ProxyAjaxQuerySortCheckedParams) => {
|
||||
const params = Object.assign(state.queryParams, { page: page.currentPage, pageSize: page.pageSize, field: sort.field, order: sort.order, descStr: 'desc' }) as PageSerialInput;
|
||||
return getAPI(SysSerialApi).apiSysSerialPagePost(params);
|
||||
};
|
||||
|
||||
// 查询操作
|
||||
const handleQuery = async (reset = false) => {
|
||||
options.loading = true;
|
||||
reset ? await xGrid.value?.commitProxy('reload') : await xGrid.value?.commitProxy('query');
|
||||
options.loading = false;
|
||||
};
|
||||
|
||||
// 重置操作
|
||||
const resetQuery = async () => {
|
||||
state.queryParams.type = undefined;
|
||||
state.queryParams.status = undefined;
|
||||
await xGrid.value?.commitProxy('reload');
|
||||
};
|
||||
|
||||
// 打开新增页面
|
||||
const handleAdd = () => {
|
||||
editSysSerialDialogRef.value?.openDialog(undefined, '添加流水号');
|
||||
};
|
||||
|
||||
// 打开编辑页面
|
||||
const handleEdit = async (row: any) => {
|
||||
editSysSerialDialogRef.value?.openDialog(row, '编辑流水号');
|
||||
};
|
||||
|
||||
// 打开详情页面
|
||||
const handleDetail = async (row: any) => {
|
||||
editSysSerialDialogRef.value?.openDialog(row, '流水号详情');
|
||||
};
|
||||
|
||||
// 删除
|
||||
const handleDelete = (row: any) => {
|
||||
ElMessageBox.confirm(`确定删除记录?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(async () => {
|
||||
await getAPI(SysSerialApi).apiSysSerialDeletePost({ id: row.id });
|
||||
await handleQuery();
|
||||
ElMessage.success('删除成功');
|
||||
})
|
||||
.catch(() => {});
|
||||
};
|
||||
|
||||
// 表格事件
|
||||
const gridEvents: VxeGridListeners<PageSerialOutput> = {
|
||||
// 只对 pager-config 配置时有效,分页发生改变时会触发该事件
|
||||
async pageChange({ pageSize }) {
|
||||
state.localPageParam.pageSize = pageSize;
|
||||
Local.set(localPageParamKey, state.localPageParam);
|
||||
},
|
||||
// 当排序条件发生变化时会触发该事件
|
||||
async sortChange({ field, order }) {
|
||||
state.localPageParam.defaultSort = { field: field, order: order!, descStr: 'desc' };
|
||||
Local.set(localPageParamKey, state.localPageParam);
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
:deep(.el-card) {
|
||||
overflow: visible !important;
|
||||
}
|
||||
.full-height {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: calc(100% - 40px);
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user