From dbb886f05af928ec4bd8b632fe7204f2551ef866 Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周日, 04 5月 2025 22:09:04 +0800 Subject: [PATCH] 2222 --- Weben_CMS专用代码生成器/Code/MainForm.cs | 34 ++++++++++++++++++++++++++++++++-- 1 files changed, 32 insertions(+), 2 deletions(-) diff --git "a/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/MainForm.cs" "b/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/MainForm.cs" index 0198e97..f5d5089 100644 --- "a/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/MainForm.cs" +++ "b/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/MainForm.cs" @@ -33,7 +33,7 @@ this.tb_ChinaComment.Text = "鐗╂枡鍩虹淇℃伅琛�";//涓枃娉ㄩ噴 this.tb_CreatePerson.Text = "shaocx";//鍒涘缓浜� this.tb_EntityName.Text = "WmsMaterial";//瀹炰綋绫诲悕 - this.tb_EntityProName.Text = "_wmsMaterial";//瀹炰綋绫诲璞″悕 + //this.tb_EntityProName.Text = "wmsMaterial";//瀹炰綋绫诲璞″悕 this.tb_EnumList.Text = "PurchaseType|PurchaseTypeEnum|PurchaseTypeDesc,MaterialType|MaterialTypeEnum|MaterialTypeDesc,IsMainBranch|YesNoEnum|IsMainBranchDesc"; this.cmb_DataSource.DropDownStyle = ComboBoxStyle.DropDownList; @@ -162,7 +162,8 @@ ChinaComment = chinaComment, NameSpacePath = wcf_NameSpacePath, ColumnNameList = columnList, - EntityName = entityName + EntityName = entityName, + EntityInstanceName = tableAlias }; //澶勭悊鏋氫妇绫诲瀷 List<EnumModel> enumList = new List<EnumModel>(); @@ -213,6 +214,35 @@ str_generate = ExportModel_Generate.CreateText(param); tf = TextHelper.Export2File_V2(entityFilePath, $"{param.EntityName}ExportModel.cs", tableName, str_generate, FileType.InputModel, filePrefixName, entityName, modulelogo); + //7銆佺敓鎴� Import 鏂囦欢 + str_generate = ImportModel_Generate.CreateText(param); + tf = TextHelper.Export2File_V2(entityFilePath, $"{param.EntityName}sImportModel.cs", tableName, str_generate, FileType.InputModel, filePrefixName, entityName, modulelogo); + + #endregion + + #region AppSerivice + + //8銆佺敓鎴� IAppService 鏂囦欢 + var appServiceFilePath = tbPath.Text + @"\server\src\CMS.Plugin." + tb_WCF_NameSpacePath.Text.Trim() + @".Application.Contracts\Services"; + str_generate = IAppService_Generate.CreateText(param); + tf = TextHelper.Export2File_V2(appServiceFilePath, $"I{param.EntityName}AppService.cs", tableName, str_generate, FileType.InputModel, filePrefixName, entityName, modulelogo); + + //9銆佺敓鎴� AppService 鏂囦欢 + appServiceFilePath = tbPath.Text + @"\server\src\CMS.Plugin." + tb_WCF_NameSpacePath.Text.Trim() + @".Application\Implements"; + str_generate = AppService_Generate.CreateText(param); + tf = TextHelper.Export2File_V2(appServiceFilePath, $"{param.EntityName}AppService.cs", tableName, str_generate, FileType.InputModel, filePrefixName, entityName, modulelogo); + + + #endregion + + #region Contorller + + //10銆佺敓鎴� Contorller 鏂囦欢 + var continerlllePath = tbPath.Text + @"\server\src\CMS.Plugin." + tb_WCF_NameSpacePath.Text.Trim() + @".Controller"; + str_generate = Controller_Generate.CreateText(param); + tf = TextHelper.Export2File_V2(continerlllePath, $"{param.EntityName}Controller.cs", tableName, str_generate, FileType.InputModel, filePrefixName, entityName, modulelogo); + + #endregion -- Gitblit v1.9.3