diff --git a/Admin.NET/Admin.NET.Core/Entity/SysCodeGen.cs b/Admin.NET/Admin.NET.Core/Entity/SysCodeGen.cs index c2a9340f737f1b273dee43eaadbfc6960783cdbe..13c99987f58d3b1f560b7d981ed12853a2a4a002 100644 --- a/Admin.NET/Admin.NET.Core/Entity/SysCodeGen.cs +++ b/Admin.NET/Admin.NET.Core/Entity/SysCodeGen.cs @@ -16,6 +16,20 @@ namespace Admin.NET.Core; [SysTable] public class SysCodeGen : EntityBase { + /// + /// 支持打印类型 + /// + [SugarColumn(ColumnDescription = "支持打印类型", Length = 32)] + [MaxLength(32)] + public string? PrintType { get; set; } + + /// + /// 打印模版名称 + /// + [SugarColumn(ColumnDescription = "打印模版名称", Length = 32)] + [MaxLength(32)] + public string? PrintName { get; set; } + /// /// 作者姓名 /// diff --git a/Admin.NET/Admin.NET.Core/SeedData/SysDictDataSeedData.cs b/Admin.NET/Admin.NET.Core/SeedData/SysDictDataSeedData.cs index 653aa6142483d6a6c96b012350ecb2220ca4d14e..0aa72bb0b0ac4209cbf11a7f92b1e72e11f37336 100644 --- a/Admin.NET/Admin.NET.Core/SeedData/SysDictDataSeedData.cs +++ b/Admin.NET/Admin.NET.Core/SeedData/SysDictDataSeedData.cs @@ -74,6 +74,9 @@ public class SysDictDataSeedData : ISqlSugarEntitySeedData new SysDictData{ Id=1300000000603, DictTypeId=1300000000106, Value="部门", Code="301", OrderNo=102, Remark="部门", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-02-10 00:00:00") }, new SysDictData{ Id=1300000000604, DictTypeId=1300000000106, Value="区域", Code="401", OrderNo=103, Remark="区域", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-02-10 00:00:00") }, new SysDictData{ Id=1300000000605, DictTypeId=1300000000106, Value="组", Code="501", OrderNo=104, Remark="组", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-02-10 00:00:00") }, + + new SysDictData{ Id=1300000000701, DictTypeId=1300000000107, Value="不需要", Code="off", OrderNo=100, Remark="不需要打印支持", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-12-04 00:00:00") }, + new SysDictData{ Id=1300000000702, DictTypeId=1300000000107, Value="绑定打印模版", Code="custom", OrderNo=101, Remark="绑定打印模版", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-12-04 00:00:00") }, }; } } \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/SeedData/SysDictTypeSeedData.cs b/Admin.NET/Admin.NET.Core/SeedData/SysDictTypeSeedData.cs index 695b234fe8b381170b861ba397f40b76fd237f91..6c27ac938b5ab29342402cfdbad36c2214b25b56 100644 --- a/Admin.NET/Admin.NET.Core/SeedData/SysDictTypeSeedData.cs +++ b/Admin.NET/Admin.NET.Core/SeedData/SysDictTypeSeedData.cs @@ -28,6 +28,7 @@ public class SysDictTypeSeedData : ISqlSugarEntitySeedData new SysDictType{ Id=1300000000104, Name="代码生成方式", Code="code_gen_create_type", OrderNo=103, Remark="代码生成方式", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, new SysDictType{ Id=1300000000105, Name="代码生成基类", Code="code_gen_base_class", OrderNo=104, Remark="代码生成基类", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, new SysDictType{ Id=1300000000106, Name="机构类型", Code="org_type", OrderNo=105, Remark="机构类型", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-02-10 00:00:00") }, + new SysDictType{ Id=1300000000107, Name="代码生成支持打印类型", Code="code_gen_print_type", OrderNo=106, Remark="代码生成支持打印类型", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-12-04 00:00:00") }, }; } } \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/Service/CodeGen/CustomViewEngine.cs b/Admin.NET/Admin.NET.Core/Service/CodeGen/CustomViewEngine.cs index ebf22e3cd29bb5505a3145b966d5d1f94f16cb81..d0dba185d6477ea89f4070bc4d13c7eb6b8774e8 100644 --- a/Admin.NET/Admin.NET.Core/Service/CodeGen/CustomViewEngine.cs +++ b/Admin.NET/Admin.NET.Core/Service/CodeGen/CustomViewEngine.cs @@ -27,6 +27,10 @@ public class CustomViewEngine : ViewEngineModel /// public string ConfigId { get; set; } = SqlSugarConst.MainConfigId; + public string PrintType { get; set; } + + public string PrintName { get; set; } + public string AuthorName { get; set; } public string BusName { get; set; } diff --git a/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/CodeGenInput.cs b/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/CodeGenInput.cs index e05211da0ce9c514d0b4ce29dffbdd70e0649d46..94d55b15c91b3dc2a5b16bfa057c9f6247db0f6b 100644 --- a/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/CodeGenInput.cs +++ b/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/CodeGenInput.cs @@ -14,6 +14,16 @@ namespace Admin.NET.Core.Service; /// public class CodeGenInput : BasePageInput { + /// + /// 支持打印类型 + /// + public virtual string PrintType { get; set; } + + /// + /// 打印模版名称 + /// + public virtual string PrintName { get; set; } + /// /// 作者姓名 /// diff --git a/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/CodeGenOutput.cs b/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/CodeGenOutput.cs index 87b5c08f59f3c45667888f66b35a524c870f8fc5..dd61f0e83707c54eefc01b9b6c2ab13f3c9d86bb 100644 --- a/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/CodeGenOutput.cs +++ b/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/CodeGenOutput.cs @@ -19,6 +19,16 @@ public class CodeGenOutput /// public long Id { get; set; } + /// + /// 支持打印类型 + /// + public string PrintType { get; set; } + + /// + /// 打印模版名称 + /// + public string PrintName { get; set; } + /// /// 作者姓名 /// diff --git a/Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenService.cs b/Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenService.cs index febd77ddeb1b458afbee51e74c2abac196b212d5..36b094c22605aa77d4a17193f3f08345301fb179 100644 --- a/Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenService.cs +++ b/Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenService.cs @@ -329,6 +329,8 @@ public class SysCodeGenService : IDynamicApiController, ITransient var data = new CustomViewEngine(_db) { ConfigId = input.ConfigId, + PrintType = input.PrintType, + PrintName = input.PrintName, AuthorName = input.AuthorName, BusName = input.BusName, NameSpace = input.NameSpace, diff --git a/Admin.NET/Admin.NET.Web.Entry/wwwroot/Template/index.vue.vm b/Admin.NET/Admin.NET.Web.Entry/wwwroot/Template/index.vue.vm index 7902dac5d03ca0b2df8b72a2a9fb7276df6c052a..7bd850c09d4ac7572baa97ed2dde79e1b5ffe4bc 100644 --- a/Admin.NET/Admin.NET.Web.Entry/wwwroot/Template/index.vue.vm +++ b/Admin.NET/Admin.NET.Web.Entry/wwwroot/Template/index.vue.vm @@ -160,8 +160,14 @@ } } } - -