From 6081db6f036f8ad77959e7b04cca54f7c9cc8a0d Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周五, 09 5月 2025 09:41:23 +0800
Subject: [PATCH] 优化

---
 Weben_CMS专用代码生成器/Code/MainForm.cs |   25 +++++++++++++++++++------
 1 files changed, 19 insertions(+), 6 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 8f187c0..d77673e 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"
@@ -10,6 +10,8 @@
 using GenerateCode_WeiBen_WMS.Model;
 using GenerateCode_WeiBen_WMS.Utility;
 using System.Xml;
+using System.Linq;
+using GenerateCode_GEBrilliantFactory.Model;
 
 namespace GenerateCode_GEBrilliantFactory
 {
@@ -165,7 +167,7 @@
                 string entityName = this.tb_EntityName.Text.Trim();//瀹炰綋绫诲悕
                 string tableAlias = this.tb_EntityProName.Text.Trim();//瀹炰綋绫诲璞″悕/琛ㄥ埆鍚�
                 string orderByName = this.tb_OrderBy.Text.Trim();//鎺掑簭瀛楁鍚嶇О
-                string routePrefix = this.tb_RoutePrefix.Text.Trim();//WCF璺敱鍓嶇紑
+                string _tb_VueRootFolerName = this.tb_VueRootFolerName.Text.Trim();//WCF璺敱鍓嶇紑
                 string connStr = this.lbl_DataSource.Text.Trim();//鏁版嵁搴撹繛鎺ュ瓧绗︿覆
                 if (connStr == "")
                 {
@@ -185,10 +187,10 @@
                     this.tb_Primary.Focus();
                     return;
                 }
-                if (routePrefix == "")
+                if (_tb_VueRootFolerName == "")
                 {
-                    MessageBox.Show("璇疯緭鍏CF璺敱鍓嶇紑锛�");
-                    this.tb_RoutePrefix.Focus();
+                    MessageBox.Show("璇疯緭鍏� 鍓嶇鏍规枃浠跺す鍚嶇О锛�");
+                    this.tb_VueRootFolerName.Focus();
                     return;
                 }
                 if (wcf_NameSpacePath == "")
@@ -204,6 +206,12 @@
                 if (columnList.Count == 0)
                 {
                     MessageBox.Show("娌℃湁鑾峰彇鍒拌〃涓嬮潰鐨勫垪闆嗗悎锛�");
+                    return;
+                }
+                //澧炲姞鏍¢獙
+                if (columnList.Where(x => x.ColumnName.ToUpper() == SystemCommonVar.c_creator.ToUpper()).Count() == 0)
+                {
+                    MessageBox.Show($"琛ㄤ腑娌℃湁瀛楁{SystemCommonVar.c_creator}锛�");
                     return;
                 }
 
@@ -273,7 +281,8 @@
                 //CreateModelFile(columnList, tableName, filePrefixName, wcf_NameSpacePath, createPerson, chinaComment, entityName, modulelogo);
                 //CreateModelParamFile(columnList, tableName, filePrefixName, wcf_NameSpacePath, createPerson, chinaComment, entityName, modulelogo);
                 genCodeRootPath = tbPath.Text + @"\" + tb_WCF_NameSpacePath.Text.Trim();
-                var webFolerPath = (tb_WCF_NameSpacePath.Text.Trim() + "_Web").ToLower();
+                //var webFolerPath = (tb_WCF_NameSpacePath.Text.Trim() + "_Web").ToLower();
+                var webFolerPath = _tb_VueRootFolerName;
                 #region 瀹炰綋绫�
                 var entityFilePath = genCodeRootPath + @"\server\src\CMS.Plugin." + tb_WCF_NameSpacePath.Text.Trim() + @".Application.Contracts\Dtos\" + tb_EntityName.Text.Trim();
                 //1銆佺敓鎴� 鍒嗛〉鏌ヨ瀹炰綋 鏂囦欢
@@ -636,7 +645,7 @@
             tb_FileName.Enabled = false;
             tb_Modulelogo.Enabled = false;
             tb_WCF_NameSpacePath.Enabled = true;
-            tb_RoutePrefix.Enabled = false;
+            tb_VueRootFolerName.Enabled = false;
         }
 
         private void cmb_DataSource_SelectedIndexChanged(object sender, EventArgs e)
@@ -759,6 +768,9 @@
                             case "鏋氫妇绫诲瀷瀛楁闆嗗悎":
                                 entity.鏋氫妇绫诲瀷瀛楁闆嗗悎 = propertyValue;
                                 break;
+                            case "鍓嶇鏍规枃浠跺す鍚嶇О":
+                                entity.鍓嶇鏍规枃浠跺す鍚嶇О = propertyValue;
+                                break;
                         }
                     }
                 }
@@ -793,6 +805,7 @@
                 this.tb_EnumList.Text = entity.鏋氫妇绫诲瀷瀛楁闆嗗悎;
                 this.tb_ValidateRepeatName.Text = entity.閲嶅鎬ф牎楠屽瓧娈�;
                 this.tb_DeleteAlertAttr.Text = entity.鍒犻櫎鎻愮ず瀛楁;
+                this.tb_VueRootFolerName.Text = entity.鍓嶇鏍规枃浠跺す鍚嶇О;
 
             }
             catch (FileNotFoundException)

--
Gitblit v1.9.3