From 50aeb4c0145561bc137732bc4d383a890bd401dd Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期二, 12 九月 2023 18:56:57 +0800
Subject: [PATCH] 组织架构去掉分页 班组管理,角色管理,岗位管理导入功能开发

---
 VueWebCoreApi/Controllers/BasicSettingController.cs |   10 
 /dev/null                                           |    0 
 VueWebCoreApi/DLL/DAL/ExcelCheckDAL.cs              |   18 
 VueWebCoreApi/VueWebCoreApi.csproj                  |    2 
 VueWebCoreApi/wwwroot/Excel/人员管理.xls                |    0 
 VueWebCoreApi/DLL/BLL/BasicSettingBLL.cs            |    4 
 VueWebCoreApi/Tools/ImportExcelData.cs              |  572 +++++++++++++++++++++++++++------------------------
 VueWebCoreApi/DLL/DAL/BasicSettingDAL.cs            |   12 
 VueWebCoreApi/wwwroot/Excel/角色管理.xls                |    0 
 VueWebCoreApi/wwwroot/Excel/岗位管理.xls                |    0 
 VueWebCoreApi/wwwroot/Excel/班组管理.xls                |    0 
 11 files changed, 319 insertions(+), 299 deletions(-)

diff --git a/VueWebCoreApi/Controllers/BasicSettingController.cs b/VueWebCoreApi/Controllers/BasicSettingController.cs
index 5130dc8..b2b572c 100644
--- a/VueWebCoreApi/Controllers/BasicSettingController.cs
+++ b/VueWebCoreApi/Controllers/BasicSettingController.cs
@@ -31,20 +31,14 @@
         /// </summary>
         /// <param name="storg_code">缁勭粐缂栫爜</param>
         /// <param name="storg_name">缁勭粐鍚嶇О</param>
-        /// <param name="page">椤电爜</param>
-        /// <param name="rows">姣忛〉鏄剧ず鏉℃暟</param>
-        /// <param name="prop">鎺掑簭瀛楁</param>
-        /// <param name="order">鎺掑簭瑙勫垯</param>
         /// <returns></returns>
         [Route(template: "STorgData")]
         [HttpGet]
-        public JsonResult STorgData(string storg_code,string storg_name, int page = 0, int rows = 0, string prop = null, string order = null)
+        public JsonResult STorgData(string storg_code,string storg_name)
         {
             var token = HttpContext.Request.Headers["Token"].ToString();
             User us = JwtTools.Denocode(token.ToString());
-            int startNum = rows * (page - 1) + 1;  //璧峰璁板綍rowNum
-            int endNum = rows * page;   //缁撴潫璁板綍 rowNum
-            mes = BasicSettingBLL.STorgData(storg_code,storg_name,startNum,endNum,prop,order);
+            mes = BasicSettingBLL.STorgData(storg_code,storg_name);
             return Json(mes);
         }
         #endregion
diff --git a/VueWebCoreApi/DLL/BLL/BasicSettingBLL.cs b/VueWebCoreApi/DLL/BLL/BasicSettingBLL.cs
index 171e822..6525c2a 100644
--- a/VueWebCoreApi/DLL/BLL/BasicSettingBLL.cs
+++ b/VueWebCoreApi/DLL/BLL/BasicSettingBLL.cs
@@ -116,9 +116,9 @@
 
 
         #region[缁勭粐鏋舵瀯,鏌ヨ缁勭粐淇℃伅]
-        public static ToMessage STorgData(string storg_code, string storg_name, int startNum, int endNum, string prop, string order)
+        public static ToMessage STorgData(string storg_code, string storg_name)
         {
-            return BasicSettingDAL.STorgData(storg_code, storg_name, startNum, endNum, prop, order);
+            return BasicSettingDAL.STorgData(storg_code, storg_name);
         }
         #endregion
 
diff --git a/VueWebCoreApi/DLL/DAL/BasicSettingDAL.cs b/VueWebCoreApi/DLL/DAL/BasicSettingDAL.cs
index ae634a7..32b019b 100644
--- a/VueWebCoreApi/DLL/DAL/BasicSettingDAL.cs
+++ b/VueWebCoreApi/DLL/DAL/BasicSettingDAL.cs
@@ -680,7 +680,7 @@
 
 
         #region[缁勭粐鏋舵瀯,鏌ヨ缁勭粐淇℃伅]
-        public static ToMessage STorgData(string storg_code, string storg_name, int startNum, int endNum, string prop, string order)
+        public static ToMessage STorgData(string storg_code, string storg_name)
         {
             var dynamicParams = new DynamicParameters();
             string search = "";
@@ -696,18 +696,16 @@
                     search += "and T.torg_name like '%'+@storg_name+'%' ";
                     dynamicParams.Add("@storg_name", storg_name);
                 }
-                // --------------鏌ヨ鎸囧畾鏁版嵁--------------
-                var total = 0; //鎬绘潯鏁�
                 var sql = @"select T.id,T.parent_id,T.torg_code,T.torg_name,T.status,T.leve,T.torg_seq,
                             T.lm_user  as usercode,U.username,T.lm_date  
                             from TOrganization T
                             left join  TUser U on T.lm_user=U.usercode
-                            where 1=1" + search + "";
-                var data = DapperHelper.GetPageList<object>(sql, dynamicParams, prop, order, startNum, endNum, out total);
+                            where 1=1" + search + " order by T.lm_date desc";
+                var data = DapperHelper.selectdata(sql, dynamicParams);
                 mes.code = "200";
                 mes.Message = "鏌ヨ鎴愬姛!";
-                mes.count = total;
-                mes.data = data.ToList();
+                mes.count = data.Rows.Count;
+                mes.data = data;
             }
             catch (Exception e)
             {
diff --git a/VueWebCoreApi/DLL/DAL/ExcelCheckDAL.cs b/VueWebCoreApi/DLL/DAL/ExcelCheckDAL.cs
index aa9e0d2..eda4ac9 100644
--- a/VueWebCoreApi/DLL/DAL/ExcelCheckDAL.cs
+++ b/VueWebCoreApi/DLL/DAL/ExcelCheckDAL.cs
@@ -24,16 +24,16 @@
                     Message = ImportExcelData.Zerro(savePath, out StuCode);
                     break;
                 case "1"://宀椾綅绠$悊
-                    Message = ImportExcelData.One(savePath, out StuCode);
+                    Message = ImportExcelData.One(dataTable, out StuCode);
                     break;
                 case "2"://鐝粍绠$悊
-                    Message = ImportExcelData.Two(savePath, out StuCode);
+                    Message = ImportExcelData.Two(dataTable, out StuCode);
                     break;
                 case "3"://浜哄憳绠$悊
                     Message = ImportExcelData.Three(dataTable, out StuCode);
                     break;
                 case "4"://瑙掕壊绠$悊
-                    Message = ImportExcelData.Four(savePath, out StuCode);
+                    Message = ImportExcelData.Four(dataTable, out StuCode);
                     break;
                 case "5"://寰�鏉ュ崟浣�
                     Message = ImportExcelData.Five(savePath, out StuCode);
@@ -122,16 +122,16 @@
                     list = ImportExcelData.ZerroData(savePath, out stuCode, out message, out count);
                     break;
                 case "1": //宀椾綅绠$悊
-                    list = ImportExcelData.OneData(savePath, out stuCode, out message, out count);
+                    list = ImportExcelData.OneData(dataTable, out stuCode, out message, out count);
                     break;
                 case "2"://鐝粍绠$悊
-                    list = ImportExcelData.TwoData(savePath, out stuCode, out message, out count);
+                    list = ImportExcelData.TwoData(dataTable, out stuCode, out message, out count);
                     break;
                 case "3"://浜哄憳绠$悊
                     list = ImportExcelData.ThreeData(dataTable, out stuCode, out message, out count);
                     break;
                 case "4"://瑙掕壊绠$悊
-                    list = ImportExcelData.FourData(savePath, out stuCode, out message, out count);
+                    list = ImportExcelData.FourData(dataTable, out stuCode, out message, out count);
                     break;
                 case "5"://寰�鏉ュ崟浣�
                     list = ImportExcelData.FiveData(savePath, out stuCode, out message, out count);
@@ -212,16 +212,16 @@
                     Message = ImportExcelData.ZerroSubmit(savePath, User, out StuCode);
                     break;
                 case "1": //宀椾綅绠$悊
-                    Message = ImportExcelData.OneSubmit(savePath, User, out StuCode);
+                    Message = ImportExcelData.OneSubmit(dataTable, us, out StuCode);
                     break;
                 case "2"://鐝粍绠$悊
-                    Message = ImportExcelData.TwoSubmit(savePath, User, out StuCode);
+                    Message = ImportExcelData.TwoSubmit(dataTable, us, out StuCode);
                     break;
                 case "3"://浜哄憳绠$悊
                     Message = ImportExcelData.ThreeSubmit(dataTable, us, out StuCode);
                     break;
                 case "4"://瑙掕壊绠$悊
-                    Message = ImportExcelData.FourSubmit(savePath, User, out StuCode);
+                    Message = ImportExcelData.FourSubmit(dataTable, us, out StuCode);
                     break;
                 case "5"://寰�鏉ュ崟浣�
                     Message = ImportExcelData.FiveSubmit(savePath, User, out StuCode);
diff --git a/VueWebCoreApi/Tools/ImportExcelData.cs b/VueWebCoreApi/Tools/ImportExcelData.cs
index ce6197a..ea6ae86 100644
--- a/VueWebCoreApi/Tools/ImportExcelData.cs
+++ b/VueWebCoreApi/Tools/ImportExcelData.cs
@@ -27,89 +27,45 @@
         #endregion
 
         #region銆怑xcel妯℃澘涓婁紶楠岃瘉,宀椾綅绠$悊妯℃澘銆�
-        public static string One(string FileCode, out string code)
+        public static string One(List<DataTable> excelTable, out string code)
         {
             string Message = "";
             code = "";
-            List<DataTable> excelTable = new List<DataTable>();
-            excelTable = ImportExcel.ExcelToTableList(FileCode);
-            if (excelTable.Count != 4)
+            if (excelTable.Count != 1)
             {
-                code = "300";
+                code = "301";
                 Message = "瀵煎叆妯℃澘涓嶇鍚堣鑼�,璇锋鏌heet鏁�";
                 return Message;
 
             }
             else if (excelTable[0].Columns.Count != 4)
             {
-                code = "300";
-                Message = "瑙掕壊绫诲瀷妯℃澘涓嶇鍚堣鑼�,璇锋鏌ュ垪鍚嶅瓧娈垫暟";
+                code = "301";
+                Message = "宀椾綅娓呭崟妯℃澘涓嶇鍚堣鑼�,璇锋鏌ュ垪鍚嶅瓧娈垫暟";
                 return Message;
             }
-            else if (excelTable[1].Columns.Count != 6)
+            else if (excelTable[0].Columns[0].ColumnName != "*宀椾綅缂栧彿(鍞竴)")
             {
-                code = "300";
-                Message = "妯℃澘瑙掕壊娓呭崟涓嶇鍚堣鑼�,璇锋鏌ュ垪鍚嶅瓧娈垫暟";
+                code = "301";
+                Message = "宀椾綅娓呭崟妯℃澘锛氳〃澶翠俊鎭笉绗﹀悎瑙勮寖,绗�1鍒楀簲涓簕*宀椾綅缂栧彿(鍞竴)}";
                 return Message;
             }
-            else if (excelTable[0].Columns[0].ColumnName != "搴忓彿")
+            else if (excelTable[0].Columns[1].ColumnName != "*宀椾綅鍚嶇О")
             {
-                code = "300";
-                Message = "瑙掕壊绫诲瀷妯℃澘锛氳〃澶翠俊鎭笉绗﹀悎瑙勮寖,绗�1鍒楀簲涓簕搴忓彿}";
+                code = "301";
+                Message = "宀椾綅娓呭崟妯℃澘锛氳〃澶翠俊鎭笉绗﹀悎瑙勮寖,绗�2鍒楀簲涓簕*宀椾綅鍚嶇О}";
                 return Message;
             }
-            else if (excelTable[0].Columns[1].ColumnName != "缁勭粐缂栫爜")
+            else if (excelTable[0].Columns[2].ColumnName != "*鐘舵��")
             {
-                code = "300";
-                Message = "瑙掕壊绫诲瀷妯℃澘锛氳〃澶翠俊鎭笉绗﹀悎瑙勮寖,绗�1鍒楀簲涓簕缁勭粐缂栫爜}";
+                code = "301";
+                Message = "宀椾綅娓呭崟妯℃澘锛氳〃澶翠俊鎭笉绗﹀悎瑙勮寖,绗�3鍒楀簲涓簕*鐘舵�亇";
                 return Message;
             }
-            else if (excelTable[0].Columns[2].ColumnName != "瑙掕壊绫诲瀷缂栧彿(鍞竴)")
+            else if (excelTable[0].Columns[3].ColumnName != "鎻忚堪")
             {
-                code = "300";
-                Message = "瑙掕壊绫诲瀷妯℃澘锛氳〃澶翠俊鎭笉绗﹀悎瑙勮寖,绗�2鍒楀簲涓簕瑙掕壊绫诲瀷缂栧彿(鍞竴)}";
-                return Message;
-            }
-            else if (excelTable[0].Columns[3].ColumnName != "瑙掕壊绫诲瀷鍚嶇О")
-            {
-                code = "300";
-                Message = "瑙掕壊绫诲瀷妯℃澘锛氳〃澶翠俊鎭笉绗﹀悎瑙勮寖,绗�3鍒楀簲涓簕瑙掕壊绫诲瀷鍚嶇О}";
-                return Message;
-            }
-            else if (excelTable[1].Columns[0].ColumnName != "搴忓彿")
-            {
-                code = "300";
-                Message = "瑙掕壊娓呭崟妯℃澘锛氳〃澶翠俊鎭笉绗﹀悎瑙勮寖,绗�1鍒楀簲涓簕搴忓彿}";
-                return Message;
-            }
-            else if (excelTable[1].Columns[1].ColumnName != "缁勭粐缂栫爜")
-            {
-                code = "300";
-                Message = "瑙掕壊娓呭崟妯℃澘锛氳〃澶翠俊鎭笉绗﹀悎瑙勮寖,绗�1鍒楀簲涓簕缁勭粐缂栫爜}";
-                return Message;
-            }
-            else if (excelTable[1].Columns[2].ColumnName != "瑙掕壊缂栧彿(鍞竴)")
-            {
-                code = "300";
-                Message = "瑙掕壊娓呭崟妯℃澘锛氳〃澶翠俊鎭笉绗﹀悎瑙勮寖,绗�2鍒楀簲涓簕瑙掕壊缂栧彿(鍞竴)}";
-                return Message;
-            }
-            else if (excelTable[1].Columns[3].ColumnName != "瑙掕壊濮撳悕")
-            {
-                code = "300";
-                Message = "瑙掕壊娓呭崟妯℃澘锛氳〃澶翠俊鎭笉绗﹀悎瑙勮寖,绗�3鍒楀簲涓簕瑙掕壊濮撳悕}";
-                return Message;
-            }
-            else if (excelTable[1].Columns[4].ColumnName != "瑙掕壊绫诲瀷缂栫爜")
-            {
-                code = "300";
-                Message = "瑙掕壊娓呭崟妯℃澘锛氳〃澶翠俊鎭笉绗﹀悎瑙勮寖,绗�4鍒楀簲涓簕瑙掕壊绫诲瀷缂栫爜}";
-                return Message;
-            }
-            else if (excelTable[1].Columns[5].ColumnName != "瑙掕壊鎻忚堪")
-            {
-                code = "300";
-                Message = "瑙掕壊娓呭崟妯℃澘锛氳〃澶翠俊鎭笉绗﹀悎瑙勮寖,绗�5鍒楀簲涓簕瑙掕壊鎻忚堪}";
+                code = "301";
+                Message = "宀椾綅娓呭崟妯℃澘锛氳〃澶翠俊鎭笉绗﹀悎瑙勮寖,绗�4鍒楀簲涓簕鎻忚堪}";
                 return Message;
             }
             else
@@ -122,11 +78,52 @@
         #endregion
 
         #region銆怑xcel妯℃澘涓婁紶楠岃瘉,鐝粍绠$悊妯℃澘銆�
-        public static string Two(string FileCode, out string code)
+        public static string Two(List<DataTable> excelTable, out string code)
         {
             string Message = "";
             code = "";
-           
+            if (excelTable.Count != 1)
+            {
+                code = "301";
+                Message = "瀵煎叆妯℃澘涓嶇鍚堣鑼�,璇锋鏌heet鏁�";
+                return Message;
+
+            }
+            else if (excelTable[0].Columns.Count != 4)
+            {
+                code = "301";
+                Message = "鐝粍娓呭崟妯℃澘涓嶇鍚堣鑼�,璇锋鏌ュ垪鍚嶅瓧娈垫暟";
+                return Message;
+            }
+            else if (excelTable[0].Columns[0].ColumnName != "*鐝粍缂栧彿(鍞竴)")
+            {
+                code = "301";
+                Message = "鐝粍娓呭崟妯℃澘锛氳〃澶翠俊鎭笉绗﹀悎瑙勮寖,绗�1鍒楀簲涓簕*鐝粍缂栧彿(鍞竴)}";
+                return Message;
+            }
+            else if (excelTable[0].Columns[1].ColumnName != "*鐝粍鍚嶇О")
+            {
+                code = "301";
+                Message = "鐝粍娓呭崟妯℃澘锛氳〃澶翠俊鎭笉绗﹀悎瑙勮寖,绗�2鍒楀簲涓簕*鐝粍鍚嶇О}";
+                return Message;
+            }
+            else if (excelTable[0].Columns[2].ColumnName != "*鐘舵��")
+            {
+                code = "301";
+                Message = "鐝粍娓呭崟妯℃澘锛氳〃澶翠俊鎭笉绗﹀悎瑙勮寖,绗�3鍒楀簲涓簕*鐘舵�亇";
+                return Message;
+            }
+            else if (excelTable[0].Columns[3].ColumnName != "鎻忚堪")
+            {
+                code = "301";
+                Message = "鐝粍娓呭崟妯℃澘锛氳〃澶翠俊鎭笉绗﹀悎瑙勮寖,绗�4鍒楀簲涓簕鎻忚堪}";
+                return Message;
+            }
+            else
+            {
+                code = "200";
+                Message = "妯℃澘妫�楠岄�氳繃";
+            }
             return Message;
         }
         #endregion
@@ -219,65 +216,57 @@
         #endregion
 
         #region銆怑xcel妯℃澘涓婁紶楠岃瘉,瑙掕壊绠″崟妯℃澘銆�
-        public static string Four(string FileCode, out string code)
+        public static string Four(List<DataTable> excelTable, out string code)
         {
             string Message = "";
             code = "";
-            List<DataTable> excelTable = new List<DataTable>();
-            excelTable = ImportExcel.ExcelToTableList(FileCode);
-            if (excelTable.Count != 2)
+            if (excelTable.Count != 1)
             {
-                code = "300";
+                code = "301";
                 Message = "瀵煎叆妯℃澘涓嶇鍚堣鑼�,璇锋鏌heet鏁�";
                 return Message;
 
             }
-            else if (excelTable[0].Columns.Count != 7)
+            else if (excelTable[0].Columns.Count != 6)
             {
-                code = "300";
-                Message = "寰�鏉ュ崟浣嶆ā鏉夸笉绗﹀悎瑙勮寖,璇锋鏌ュ垪鍚嶅瓧娈垫暟";
+                code = "301";
+                Message = "瑙掕壊娓呭崟妯℃澘涓嶇鍚堣鑼�,璇锋鏌ュ垪鍚嶅瓧娈垫暟";
                 return Message;
             }
-            else if (excelTable[0].Columns[0].ColumnName != "搴忓彿")
+            else if (excelTable[0].Columns[0].ColumnName != "*瑙掕壊缂栧彿(鍞竴)")
             {
-                code = "300";
-                Message = "寰�鏉ュ崟浣嶆ā鏉夸笉绗﹀悎瑙勮寖锛氳〃澶翠俊鎭笉绗﹀悎瑙勮寖,绗�1鍒楀簲涓簕搴忓彿}";
+                code = "301";
+                Message = "瑙掕壊娓呭崟妯℃澘锛氳〃澶翠俊鎭笉绗﹀悎瑙勮寖,绗�1鍒楀簲涓簕*瑙掕壊缂栧彿(鍞竴)}";
                 return Message;
             }
-            else if (excelTable[0].Columns[1].ColumnName != "寰�鏉ュ崟浣嶇紪鍙�(鍞竴)")
+            else if (excelTable[0].Columns[1].ColumnName != "*瑙掕壊鍚嶇О")
             {
-                code = "300";
-                Message = "寰�鏉ュ崟浣嶆ā鏉夸笉绗﹀悎瑙勮寖锛氳〃澶翠俊鎭笉绗﹀悎瑙勮寖,绗�2鍒楀簲涓簕寰�鏉ュ崟浣嶇紪鍙�(鍞竴)}";
+                code = "301";
+                Message = "瑙掕壊娓呭崟妯℃澘锛氳〃澶翠俊鎭笉绗﹀悎瑙勮寖,绗�2鍒楀簲涓簕*瑙掕壊鍚嶇О}";
                 return Message;
             }
-            else if (excelTable[0].Columns[2].ColumnName != "寰�鏉ュ崟浣嶅悕绉�")
+            else if (excelTable[0].Columns[2].ColumnName != "*鐘舵��")
             {
-                code = "300";
-                Message = "寰�鏉ュ崟浣嶆ā鏉夸笉绗﹀悎瑙勮寖锛氳〃澶翠俊鎭笉绗﹀悎瑙勮寖,绗�3鍒楀簲涓簕寰�鏉ュ崟浣嶅悕绉皚";
+                code = "301";
+                Message = "瑙掕壊娓呭崟妯℃澘锛氳〃澶翠俊鎭笉绗﹀悎瑙勮寖,绗�3鍒楀簲涓簕*鐘舵�亇";
                 return Message;
             }
-            else if (excelTable[0].Columns[3].ColumnName != "寰�鏉ュ崟浣嶅睘鎬�")
+            else if (excelTable[0].Columns[3].ColumnName != "鏁版嵁鑼冨洿")
             {
-                code = "300";
-                Message = "寰�鏉ュ崟浣嶆ā鏉夸笉绗﹀悎瑙勮寖锛氳〃澶翠俊鎭笉绗﹀悎瑙勮寖,绗�4鍒楀簲涓簕寰�鏉ュ崟浣嶅睘鎬";
+                code = "301";
+                Message = "瑙掕壊娓呭崟妯℃澘锛氳〃澶翠俊鎭笉绗﹀悎瑙勮寖,绗�4鍒楀簲涓簕鏁版嵁鑼冨洿}";
                 return Message;
             }
-            else if (excelTable[0].Columns[4].ColumnName != "鑱旂郴浜�")
+            else if (excelTable[0].Columns[4].ColumnName != "鏁版嵁鏉冮檺")
             {
-                code = "300";
-                Message = "寰�鏉ュ崟浣嶆ā鏉夸笉绗﹀悎瑙勮寖锛氳〃澶翠俊鎭笉绗﹀悎瑙勮寖,绗�5鍒楀簲涓簕鑱旂郴浜簘";
+                code = "301";
+                Message = "瑙掕壊娓呭崟妯℃澘锛氳〃澶翠俊鎭笉绗﹀悎瑙勮寖,绗�5鍒楀簲涓簕鏁版嵁鏉冮檺}";
                 return Message;
             }
-            else if (excelTable[0].Columns[5].ColumnName != "鑱旂郴鏂瑰紡")
+            else if (excelTable[0].Columns[5].ColumnName != "鎻忚堪")
             {
-                code = "300";
-                Message = "寰�鏉ュ崟浣嶆ā鏉夸笉绗﹀悎瑙勮寖锛氳〃澶翠俊鎭笉绗﹀悎瑙勮寖,绗�6鍒楀簲涓簕鑱旂郴鏂瑰紡}";
-                return Message;
-            }
-            else if (excelTable[0].Columns[6].ColumnName != "鍦板潃")
-            {
-                code = "300";
-                Message = "寰�鏉ュ崟浣嶆ā鏉夸笉绗﹀悎瑙勮寖锛氳〃澶翠俊鎭笉绗﹀悎瑙勮寖,绗�7鍒楀簲涓簕鍦板潃}";
+                code = "301";
+                Message = "瑙掕壊娓呭崟妯℃澘锛氳〃澶翠俊鎭笉绗﹀悎瑙勮寖,绗�6鍒楀簲涓簕鎻忚堪}";
                 return Message;
             }
             else
@@ -1815,7 +1804,7 @@
         #endregion
 
         #region銆怑xcel涓婁紶鏁版嵁楠岃瘉,宀椾綅绠$悊銆�
-        public static List<ExcelErro> OneData(string FileCode, out string StuCode, out string message, out int count)
+        public static List<ExcelErro> OneData(List<DataTable> excelTable, out string StuCode, out string message, out int count)
         {
             message = "";
             StuCode = "";
@@ -1824,121 +1813,38 @@
             var dynamicParams = new DynamicParameters();
             DataTable dt;
             List<ExcelErro> list = new List<ExcelErro>();
-            List<DataTable> excelTable = new List<DataTable>();
-            list = ImportExcel.ExcelToTableListErro(FileCode);    //楠岃瘉Excel鏁版嵁蹇呭~瀛楁鏄惁涓虹┖銆佸敮涓�瀛楁鏄惁閲嶅
-            excelTable = ImportExcel.ExcelToTableList(FileCode);  //鑾峰彇Excel鏁版嵁
-            //涓昏〃
-            for (int j = 0; j < excelTable[0].Rows.Count; j++)
+            list = ImportExcel.InportExcelToTableListErro(excelTable);    //楠岃瘉Excel鏁版嵁蹇呭~瀛楁鏄惁涓虹┖銆佸敮涓�瀛楁鏄惁閲嶅
+            //宀椾綅琛�
+            for (int k = 0; k < excelTable[0].Rows.Count; k++)
             {
-                if (excelTable[1].Rows[j][1].ToString().Trim() != null && excelTable[1].Rows[j][1].ToString().Trim() != "")
+                if (excelTable[0].Rows[k][0].ToString().Trim() != null && excelTable[0].Rows[k][0].ToString().Trim() != "")
                 {
-                    sql = @"select *  from TOrganization where org_code=@org_code";
-                    dynamicParams.Add("@org_code", excelTable[1].Rows[j][1].ToString().Trim());
-                    dt = DapperHelper.selectdata(sql, dynamicParams);
-                    if (dt == null || dt.Rows.Count <= 0)
-                    {
-                        ExcelErro erro = new ExcelErro();
-                        erro.RoeNumber = "/";
-                        erro.ErrorField = "{缁勭粐缂栫爜}";
-                        erro.ErrorCont = "瑙掕壊绫诲瀷琛�:{缁勭粐缂栫爜}瀛楁" + excelTable[1].Rows[j][1].ToString().Trim() + "涓嶅瓨鍦�";
-                        list.Add(erro);
-                    }
-                }
-                if (excelTable[0].Rows[j][2].ToString().Trim() != null && excelTable[0].Rows[j][2].ToString().Trim() != "")
-                {
-                    sql = @"select *  from TRoleType where roletype_code=@roletype_code";
-                    dynamicParams.Add("@roletype_code", excelTable[0].Rows[j][2].ToString().Trim());
+                    sql = @"select *  from TPost where postcode=@postcode";
+                    dynamicParams.Add("@postcode", excelTable[0].Rows[k][0].ToString().Trim());
                     dt = DapperHelper.selectdata(sql, dynamicParams);
                     if (dt.Rows.Count > 0)
                     {
                         ExcelErro erro = new ExcelErro();
                         erro.RoeNumber = "/";
-                        erro.ErrorField = "{瑙掕壊绫诲瀷缂栫爜(鍞竴)}";
-                        erro.ErrorCont = "鐝粍琛�:{瑙掕壊绫诲瀷缂栫爜(鍞竴)}瀛楁" + excelTable[0].Rows[j][2].ToString().Trim() + "宸插瓨鍦�";
+                        erro.ErrorField = "{*宀椾綅缂栧彿(鍞竴)}";
+                        erro.ErrorCont = "宀椾綅琛�:{*宀椾綅缂栧彿(鍞竴)}瀛楁" + excelTable[0].Rows[k][0].ToString().Trim() + "宸插瓨鍦�";
                         list.Add(erro);
                     }
                 }
-            }
-            //瀛愯〃
-            for (int k = 0; k < excelTable[1].Rows.Count; k++)
-            {
-                if (excelTable[1].Rows[k][2].ToString().Trim() != null && excelTable[1].Rows[k][2].ToString().Trim() != "")
+                if (excelTable[0].Rows[k][1].ToString().Trim() != null && excelTable[0].Rows[k][1].ToString().Trim() != "")
                 {
-                    sql = @"select *  from TRole where role_code=@role_code";
-                    dynamicParams.Add("@role_code", excelTable[1].Rows[k][2].ToString().Trim());
+                    sql = @"select *  from TPost where postname=@postname";
+                    dynamicParams.Add("@postname", excelTable[0].Rows[k][1].ToString().Trim());
                     dt = DapperHelper.selectdata(sql, dynamicParams);
                     if (dt.Rows.Count > 0)
                     {
                         ExcelErro erro = new ExcelErro();
                         erro.RoeNumber = "/";
-                        erro.ErrorField = "{瑙掕壊缂栧彿(鍞竴)}";
-                        erro.ErrorCont = "瑙掕壊琛�:{瑙掕壊缂栧彿(鍞竴)}瀛楁" + excelTable[1].Rows[k][2].ToString().Trim() + "宸插瓨鍦�";
+                        erro.ErrorField = "{*宀椾綅鍚嶇О}";
+                        erro.ErrorCont = "宀椾綅琛�:{*宀椾綅鍚嶇О}瀛楁" + excelTable[1].Rows[k][1].ToString().Trim() + "宸插瓨鍦�";
                         list.Add(erro);
                     }
                 }
-                if (excelTable[1].Rows[k][1].ToString().Trim() != null && excelTable[1].Rows[k][1].ToString().Trim() != "")
-                {
-                    sql = @"select *  from TOrganization where org_code=@org_code";
-                    dynamicParams.Add("@org_code", excelTable[1].Rows[k][1].ToString().Trim());
-                    dt = DapperHelper.selectdata(sql, dynamicParams);
-                    if (dt == null || dt.Rows.Count <= 0)
-                    {
-                        ExcelErro erro = new ExcelErro();
-                        erro.RoeNumber = "/";
-                        erro.ErrorField = "{缁勭粐缂栫爜}";
-                        erro.ErrorCont = "瑙掕壊琛�:{缁勭粐缂栫爜}瀛楁" + excelTable[1].Rows[k][1].ToString().Trim() + "涓嶅瓨鍦�";
-                        list.Add(erro);
-                    }
-                }
-                if (excelTable[1].Rows[k][4].ToString().Trim() != null && excelTable[1].Rows[k][4].ToString().Trim() != "")
-                {
-                    sql = @"select torg_code  from TRoleType where roletype_code=@roletype_code";
-                    dynamicParams.Add("@roletype_code", excelTable[1].Rows[k][4].ToString().Trim());
-                    dt = DapperHelper.selectdata(sql, dynamicParams);
-                    if (dt != null && dt.Rows.Count > 0)
-                    {
-                        if (dt.Rows[0]["torg_code"].ToString() != excelTable[1].Rows[k][1].ToString().Trim())
-                        {
-                            ExcelErro erro = new ExcelErro();
-                            erro.RoeNumber = "/";
-                            erro.ErrorField = "{瑙掕壊绫诲瀷缂栫爜}";
-                            erro.ErrorCont = "瑙掕壊琛�:{瑙掕壊绫诲瀷缂栫爜}瀛楁" + excelTable[1].Rows[k][4].ToString().Trim() + " 涓嶆槸缁勭粐缂栫爜:" + excelTable[1].Rows[k][1].ToString().Trim() + "涓嬬殑瑙掕壊缁�";
-                            list.Add(erro);
-                        }
-                    }
-                }
-            }
-            //鍒ゆ柇瀛愯〃缁勭粐缂栫爜涓嶅瓨鍦ㄤ簬涓昏〃缁勭粐缂栫爜涓殑鏁版嵁
-            var dt2 = from r in excelTable[1].AsEnumerable()
-                      where !(
-                          from rr in excelTable[0].AsEnumerable()
-                          select rr.Field<string>("缁勭粐缂栫爜")
-                      ).Contains(r.Field<string>("缁勭粐缂栫爜"))
-                      select r;
-            List<DataRow> listRow2 = dt2.ToList();
-            if (listRow2.Count > 0)
-            {
-                ExcelErro erro = new ExcelErro();
-                erro.RoeNumber = "/";
-                erro.ErrorField = "{缁勭粐缂栫爜}";
-                erro.ErrorCont = "瑙掕壊琛�:{缁勭粐缂栫爜}瀛楁涓湁鍊煎湪瑙掕壊绫诲瀷琛�:{缁勭粐缂栫爜}涓笉瀛樺湪";
-                list.Add(erro);
-            }
-            //鍒ゆ柇瀛愯〃澶栭敭涓嶅瓨鍦ㄤ簬涓昏〃涓婚敭涓殑鏁版嵁
-            var dt3 = from r in excelTable[1].AsEnumerable()
-                      where !(
-                          from rr in excelTable[0].AsEnumerable()
-                          select rr.Field<string>("瑙掕壊绫诲瀷缂栧彿(鍞竴)")
-                      ).Contains(r.Field<string>("瑙掕壊绫诲瀷缂栫爜"))
-                      select r;
-            List<DataRow> listRow = dt3.ToList();
-            if (listRow.Count > 0)
-            {
-                ExcelErro erro = new ExcelErro();
-                erro.RoeNumber = "/";
-                erro.ErrorField = "{瑙掕壊绫诲瀷缂栫爜}";
-                erro.ErrorCont = "瑙掕壊琛�:{瑙掕壊绫诲瀷缂栫爜}瀛楁涓湁鍊煎湪瑙掕壊绫诲瀷琛�:{瑙掕壊绫诲瀷缂栧彿(鍞竴)}涓笉瀛樺湪";
-                list.Add(erro);
             }
             if (list.Count > 0)
             {
@@ -1962,15 +1868,65 @@
         #endregion
 
         #region銆怑xcel涓婁紶鏁版嵁楠岃瘉,鐝粍绠$悊銆�
-        public static List<ExcelErro> TwoData(string FileCode, out string StuCode, out string message, out int count)
+        public static List<ExcelErro> TwoData(List<DataTable> excelTable, out string StuCode, out string message, out int count)
         {
             message = "";
             StuCode = "";
             count = 0;
             string sql = "";
+            var dynamicParams = new DynamicParameters();
             DataTable dt;
             List<ExcelErro> list = new List<ExcelErro>();
-
+            list = ImportExcel.InportExcelToTableListErro(excelTable);    //楠岃瘉Excel鏁版嵁蹇呭~瀛楁鏄惁涓虹┖銆佸敮涓�瀛楁鏄惁閲嶅
+            //鐝粍琛�
+            for (int k = 0; k < excelTable[0].Rows.Count; k++)
+            {
+                if (excelTable[0].Rows[k][0].ToString().Trim() != null && excelTable[0].Rows[k][0].ToString().Trim() != "")
+                {
+                    sql = @"select *  from TGroup where usergroupcode=@usergroupcode";
+                    dynamicParams.Add("@usergroupcode", excelTable[0].Rows[k][0].ToString().Trim());
+                    dt = DapperHelper.selectdata(sql, dynamicParams);
+                    if (dt.Rows.Count > 0)
+                    {
+                        ExcelErro erro = new ExcelErro();
+                        erro.RoeNumber = "/";
+                        erro.ErrorField = "{*鐝粍缂栧彿(鍞竴)}";
+                        erro.ErrorCont = "鐝粍琛�:{*鐝粍缂栧彿(鍞竴)}瀛楁" + excelTable[0].Rows[k][0].ToString().Trim() + "宸插瓨鍦�";
+                        list.Add(erro);
+                    }
+                }
+                if (excelTable[0].Rows[k][1].ToString().Trim() != null && excelTable[0].Rows[k][1].ToString().Trim() != "")
+                {
+                    sql = @"select *  from TGroup where usergroupname=@usergroupname";
+                    dynamicParams.Add("@usergroupname", excelTable[0].Rows[k][1].ToString().Trim());
+                    dt = DapperHelper.selectdata(sql, dynamicParams);
+                    if (dt.Rows.Count > 0)
+                    {
+                        ExcelErro erro = new ExcelErro();
+                        erro.RoeNumber = "/";
+                        erro.ErrorField = "{*鐝粍鍚嶇О}";
+                        erro.ErrorCont = "鐝粍琛�:{*鐝粍鍚嶇О}瀛楁" + excelTable[1].Rows[k][1].ToString().Trim() + "宸插瓨鍦�";
+                        list.Add(erro);
+                    }
+                }
+            }
+            if (list.Count > 0)
+            {
+                int index = 0;
+                foreach (ExcelErro item in list)
+                {
+                    index++;
+                    item.Seq = index.ToString();
+                }
+                StuCode = "301";
+                message = "鏁版嵁楠岃瘉澶辫触";
+            }
+            else
+            {
+                StuCode = "200";
+                message = "鏁版嵁楠岃瘉鎴愬姛";
+                count = excelTable[0].Rows.Count;
+            }
             return list;
         }
         #endregion
@@ -2138,33 +2094,91 @@
         #endregion
 
         #region銆怑xcel涓婁紶鏁版嵁楠岃瘉,瑙掕壊绠$悊銆�
-        public static List<ExcelErro> FourData(string FileCode, out string StuCode, out string message, out int count)
+        public static List<ExcelErro> FourData(List<DataTable> excelTable, out string StuCode, out string message, out int count)
         {
             message = "";
             StuCode = "";
             count = 0;
             string sql = "";
-            DataTable dt;
             var dynamicParams = new DynamicParameters();
+            DataTable dt;
             List<ExcelErro> list = new List<ExcelErro>();
-            DataTable excelTable = new DataTable();
-            list = ImportExcel.ExcelToTableErro(FileCode);    //楠岃瘉Excel鏁版嵁蹇呭~瀛楁鏄惁涓虹┖銆佸敮涓�瀛楁鏄惁閲嶅
-            excelTable = ImportExcel.ExcelToTable(FileCode);  //鑾峰彇Excel鏁版嵁
-            for (int i = 0; i < excelTable.Rows.Count; i++)
+            list = ImportExcel.InportExcelToTableListErro(excelTable);    //楠岃瘉Excel鏁版嵁蹇呭~瀛楁鏄惁涓虹┖銆佸敮涓�瀛楁鏄惁閲嶅
+            //鐝粍琛�
+            for (int k = 0; k < excelTable[0].Rows.Count; k++)
             {
-                if (excelTable.Rows[i][1].ToString().Trim() != null && excelTable.Rows[i][1].ToString().Trim() != "")
+                if (excelTable[0].Rows[k][0].ToString().Trim() != null && excelTable[0].Rows[k][0].ToString().Trim() != "")
                 {
-                    sql = @"select code  from TCustomer where code=@code";
-
-                    dynamicParams.Add("@code", excelTable.Rows[i][1].ToString().Trim());
+                    sql = @"select *  from TRole where rolecode=@rolecode";
+                    dynamicParams.Add("@rolecode", excelTable[0].Rows[k][0].ToString().Trim());
                     dt = DapperHelper.selectdata(sql, dynamicParams);
                     if (dt.Rows.Count > 0)
                     {
                         ExcelErro erro = new ExcelErro();
                         erro.RoeNumber = "/";
-                        erro.ErrorField = "{寰�鏉ュ崟浣嶇紪鐮�(鍞竴)}";
-                        erro.ErrorCont = "寰�鏉ュ崟浣嶈〃:{寰�鏉ュ崟浣嶇紪鐮�(鍞竴)}瀛楁" + excelTable.Rows[i][1].ToString().Trim() + "宸插瓨鍦�";
+                        erro.ErrorField = "{*瑙掕壊缂栧彿(鍞竴)}";
+                        erro.ErrorCont = "瑙掕壊琛�:{*瑙掕壊缂栧彿(鍞竴)}瀛楁" + excelTable[0].Rows[k][0].ToString().Trim() + "宸插瓨鍦�";
                         list.Add(erro);
+                    }
+                }
+                if (excelTable[0].Rows[k][1].ToString().Trim() != null && excelTable[0].Rows[k][1].ToString().Trim() != "")
+                {
+                    sql = @"select *  from TRole where rolename=@rolename";
+                    dynamicParams.Add("@rolename", excelTable[0].Rows[k][1].ToString().Trim());
+                    dt = DapperHelper.selectdata(sql, dynamicParams);
+                    if (dt.Rows.Count > 0)
+                    {
+                        ExcelErro erro = new ExcelErro();
+                        erro.RoeNumber = "/";
+                        erro.ErrorField = "{*瑙掕壊鍚嶇О}";
+                        erro.ErrorCont = "瑙掕壊琛�:{*瑙掕壊鍚嶇О}瀛楁" + excelTable[1].Rows[k][1].ToString().Trim() + "宸插瓨鍦�";
+                        list.Add(erro);
+                    }
+                }
+                if (excelTable[0].Rows[k][3].ToString().Trim() != null && excelTable[0].Rows[k][3].ToString().Trim() != "")
+                {
+                    if (excelTable[0].Rows[k][3].ToString().Trim() == "鑷畾涔�") 
+                    {
+                        if (excelTable[0].Rows[k][4].ToString().Trim() == null && excelTable[0].Rows[k][4].ToString().Trim() == "")
+                        {
+                            ExcelErro erro = new ExcelErro();
+                            erro.RoeNumber = "/";
+                            erro.ErrorField = "{鏁版嵁鏉冮檺}";
+                            erro.ErrorCont = "瑙掕壊琛�:{鏁版嵁鑼冨洿}瀛楁涓猴細" + excelTable[1].Rows[k][3].ToString().Trim() + "鏃�,{鏁版嵁鏉冮檺}瀛楁涓嶈兘涓虹┖";
+                            list.Add(erro);
+                        }
+                        else 
+                        {
+                            //鍒ゆ柇鏁版嵁鏉冮檺缂栫爜鏄惁鍚堢悊
+                            if (excelTable[0].Rows[k][4].ToString().Trim() != null && excelTable[0].Rows[k][4].ToString().Trim() != "")
+                            {
+                                string[] torgcode = Array.ConvertAll<string, string>(excelTable[0].Rows[k][4].ToString().Trim().Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries), s => s.ToString()); //string鍒嗗壊杞瑂tring[] 
+                                sql = @"select postcode  from TOrganization  where torg_code in @torgcode";
+                                dynamicParams.Add("@torgcode", torgcode);
+                                dt = DapperHelper.selectdata(sql, dynamicParams);
+                                if (dt != null && dt.Rows.Count > 0)
+                                {
+                                    string[] values = excelTable[0].Rows[k][4].ToString().Trim().Split(',');
+                                    var unmatchedValues = values.Except(dt.AsEnumerable().Select(row => row.Field<string>("torg_code")));
+                                    foreach (var value in unmatchedValues)
+                                    {
+                                        ExcelErro erro = new ExcelErro();
+                                        erro.RoeNumber = (k + 1).ToString();
+                                        erro.ErrorField = "{鏁版嵁鏉冮檺}";
+                                        erro.ErrorCont = "瑙掕壊琛�:{鏁版嵁鏉冮檺}瀛楁" + value + " 涓嶆槸鏈夋晥鐨勭粍缁囩紪鐮�";
+                                        list.Add(erro);
+                                    }
+                                }
+                                else
+                                {
+                                    ExcelErro erro = new ExcelErro();
+                                    erro.RoeNumber = (k + 1).ToString();
+                                    erro.ErrorField = "{鏁版嵁鏉冮檺}";
+                                    erro.ErrorCont = "瑙掕壊琛�:{鏁版嵁鏉冮檺}瀛楁" + excelTable[0].Rows[k][4].ToString().Trim() + " 涓嶆槸鏈夋晥鐨勭粍缁囩紪鐮�";
+                                    list.Add(erro);
+                                }
+                            }
+                        }
                     }
                 }
             }
@@ -2183,7 +2197,7 @@
             {
                 StuCode = "200";
                 message = "鏁版嵁楠岃瘉鎴愬姛";
-                count = excelTable.Rows.Count;
+                count = excelTable[0].Rows.Count;
             }
             return list;
         }
@@ -3335,53 +3349,32 @@
         #endregion
 
         #region銆怑xcel鏁版嵁涓婁紶,宀椾綅绠$悊銆�
-        public static string OneSubmit(string FileCode, string User, out string StuCode)
+        public static string OneSubmit(List<DataTable> excelTable, User us, out string StuCode)
         {
             string message = "";
             StuCode = "";
             string sql = "";
-            string ZZName = "", Enable = "", WageType = "";
-            DataTable dt;
             List<object> list = new List<object>();
             var dynamicParams = new DynamicParameters();
             try
             {
                 list.Clear();
-                List<DataTable> excelTable = new List<DataTable>();
-                excelTable = ImportExcel.ExcelToTableList(FileCode);
-                //瀵煎叆瑙掕壊绫诲瀷
-                for (int k = 0; k < excelTable[0].Rows.Count; k++)
+                //瀵煎叆宀椾綅
+                for (int i = 0; i < excelTable[0].Rows.Count; i++)
                 {
-                    sql = @"insert into TRoleType(roletype_code,roletype_name,torg_code) 
-                            values(@roletype_code,@roletype_name,@torg_code)";
+                    sql = @"insert into TPost(postcode,postname,status,description,lm_user,lm_date) 
+                            values(@postcode,@postname,@status,@description,@lm_user,@lm_date)";
                     list.Add(new
                     {
                         str = sql,
                         parm = new
                         {
-                            roletype_code = excelTable[0].Rows[k][2].ToString().Trim(),
-                            roletype_name = excelTable[0].Rows[k][3].ToString().Trim(),
-                            torg_code = excelTable[0].Rows[k][1].ToString().Trim()
-                        }
-                    });
-                }
-                //瀵煎叆瑙掕壊
-                for (int i = 0; i < excelTable[1].Rows.Count; i++)
-                {
-                    sql = @"insert into TRole(role_code,role_name,roletype_code,description,lm_user,lm_date,torg_code) 
-                            values(@role_code,@role_name,@roletype_code,@description,@Operator,@CreateDate,@torg_code)";
-                    list.Add(new
-                    {
-                        str = sql,
-                        parm = new
-                        {
-                            role_code = excelTable[1].Rows[i][2].ToString().Trim(),
-                            role_name = excelTable[1].Rows[i][3].ToString().Trim(),
-                            roletype_code = excelTable[1].Rows[i][4].ToString().Trim(),
-                            description = excelTable[1].Rows[i][5].ToString().Trim(),
-                            Operator = User,
-                            CreateDate = DateTime.Now.ToString(),
-                            torg_code = excelTable[1].Rows[i][1].ToString().Trim()
+                            usercode = excelTable[0].Rows[i][0].ToString().Trim(),
+                            username = excelTable[0].Rows[i][1].ToString().Trim(),
+                            status = excelTable[0].Rows[i][2].ToString().Trim(),
+                            description = excelTable[0].Rows[i][3].ToString().Trim(),
+                            lm_user = us.usercode,
+                            lm_date = DateTime.Now.ToString()
                         }
                     });
                 }
@@ -3407,13 +3400,46 @@
         #endregion
 
         #region銆怑xcel鏁版嵁涓婁紶,鍒嗙粍绠$悊銆�
-        public static string  TwoSubmit(string FileCode, string User, out string StuCode)
+        public static string  TwoSubmit(List<DataTable> excelTable, User us, out string StuCode)
         {
             string message = "";
             StuCode = "";
+            string sql = "";
+            List<object> list = new List<object>();
+            var dynamicParams = new DynamicParameters();
             try
             {
-
+                list.Clear();
+                //瀵煎叆鐝粍
+                for (int i = 0; i < excelTable[0].Rows.Count; i++)
+                {
+                    sql = @"insert into TGroup(usergroupcode,usergroupname,status,description,lm_user,lm_date) 
+                            values(@usergroupcode,@usergroupname,@status,@description,@lm_user,@lm_date)";
+                    list.Add(new
+                    {
+                        str = sql,
+                        parm = new
+                        {
+                            usergroupcode = excelTable[0].Rows[i][0].ToString().Trim(),
+                            usergroupname = excelTable[0].Rows[i][1].ToString().Trim(),
+                            status = excelTable[0].Rows[i][2].ToString().Trim(),
+                            description = excelTable[0].Rows[i][3].ToString().Trim(),
+                            lm_user = us.usercode,
+                            lm_date = DateTime.Now.ToString()
+                        }
+                    });
+                }
+                bool aa = DapperHelper.DoTransaction(list);
+                if (aa)
+                {
+                    StuCode = "200";
+                    message = "瀵煎叆鎴愬姛锛�";
+                }
+                else
+                {
+                    StuCode = "300";
+                    message = "瀵煎叆澶辫触锛�";
+                }
             }
             catch (Exception e)
             {
@@ -3491,53 +3517,57 @@
         #endregion
 
         #region銆怑xcel鏁版嵁涓婁紶,瑙掕壊绠$悊銆�
-        public static string FourSubmit(string FileCode, string User, out string StuCode)
+        public static string FourSubmit(List<DataTable> excelTable, User us, out string StuCode)
         {
             string message = "";
             StuCode = "";
-            string sql = "";
-            DataTable dt;
+            string sql = "", datarange = "", datapermissions = "";
             List<object> list = new List<object>();
             var dynamicParams = new DynamicParameters();
             try
             {
                 list.Clear();
-                DataTable excelTable = new DataTable();
-                excelTable = ImportExcel.ExcelToTable(FileCode);
-                //瀵煎叆寰�鏉ュ崟浣嶈〃
-                for (int i = 0; i < excelTable.Rows.Count; i++)
+                //瀵煎叆瑙掕壊
+                for (int i = 0; i < excelTable[0].Rows.Count; i++)
                 {
-                    string Type = "";
-                    switch (excelTable.Rows[i][3].ToString().Trim())
+                    if (excelTable[0].Rows[i][3].ToString().Trim() != null && excelTable[0].Rows[i][3].ToString().Trim() != "")
                     {
-                        case "渚涘簲鍟�":
-                            Type = "226";
-                            break;
-                        case "瀹㈡埛":
-                            Type = "211";
-                            break;
-                        case "瀹㈡埛/渚涘簲鍟�":
-                            Type = "228";
-                            break;
-                        default:
-                            break;
+                        //鏁版嵁鑼冨洿
+                        switch (excelTable[0].Rows[i][3].ToString().Trim())
+                        {
+                            case "鍏ㄩ儴":
+                                datarange = "ALL";
+                                break;
+                            case "鏈骇":
+                                datarange = "LEVEL";
+                                break;
+                            case "鏈汉":
+                                datarange = "PERSON";
+                                break;
+                            case "鑷畾涔�":
+                                datarange = "CUSTOM";
+                                datapermissions = excelTable[0].Rows[i][4].ToString().Trim();
+                                break;
+                            default:
+                                break;
+                        }
                     }
 
-                    sql = @"insert into TCustomer(code,name,type,conttacts,conttphone,addr,lm_user,lm_date) 
-                            values(@code,@name,@type,@conttacts,@conttphone,@addr,@Operator,@CreateDate)";
+                    sql = @"insert into TRole(rolecode,rolename,status,datarange,datapermissions,identifying,description,lm_user,lm_date) 
+                            values(@rolecode,@rolename,@status,@datarange,@datapermissions,@identifying,@description,@lm_user,@lm_date)";
                     list.Add(new
                     {
                         str = sql,
                         parm = new
                         {
-                            code = excelTable.Rows[i][1].ToString().Trim(),
-                            name = excelTable.Rows[i][2].ToString().Trim(),
-                            type = Type,
-                            conttacts = excelTable.Rows[i][4].ToString().Trim(),
-                            conttphone = excelTable.Rows[i][5].ToString().Trim(),
-                            addr = excelTable.Rows[i][6].ToString().Trim(),
-                            Operator = User,
-                            CreateDate = DateTime.Now.ToString()
+                            rolecode = excelTable[0].Rows[i][0].ToString().Trim(),
+                            rolename = excelTable[0].Rows[i][1].ToString().Trim(),
+                            status = excelTable[0].Rows[i][2].ToString().Trim(),
+                            datarange = datarange,
+                            datapermissions = datapermissions,
+                            description = excelTable[0].Rows[i][5].ToString().Trim(),
+                            lm_user = us.usercode,
+                            lm_date = DateTime.Now.ToString()
                         }
                     });
                 }
diff --git a/VueWebCoreApi/VueWebCoreApi.csproj b/VueWebCoreApi/VueWebCoreApi.csproj
index 6e05c24..2231a49 100644
--- a/VueWebCoreApi/VueWebCoreApi.csproj
+++ b/VueWebCoreApi/VueWebCoreApi.csproj
@@ -53,10 +53,8 @@
 	  <None Include="wwwroot\Excel\浠撳簱搴撲綅娓呭崟.xls" />
 	  <None Include="wwwroot\Excel\寰�鏉ュ崟浣�.xls" />
 	  <None Include="wwwroot\Excel\鐗╂枡娓呭崟.xls" />
-	  <None Include="wwwroot\Excel\鐢ㄦ埛娓呭崟.xls" />
 	  <None Include="wwwroot\Excel\缂洪櫡瀹氫箟.xls" />
 	  <None Include="wwwroot\Excel\鑺傛媿宸ヤ环.xls" />
-	  <None Include="wwwroot\Excel\瑙掕壊娓呭崟.xls" />
 	  <None Include="wwwroot\Excel\璁惧淇濆吇鏍囧噯.xls" />
 	  <None Include="wwwroot\Excel\璁惧淇濆吇椤圭洰.xls" />
 	  <None Include="wwwroot\Excel\璁惧娓呭崟.xls" />
diff --git "a/VueWebCoreApi/wwwroot/Excel/\347\224\250\346\210\267\346\270\205\345\215\225.xls" "b/VueWebCoreApi/wwwroot/Excel/\344\272\272\345\221\230\347\256\241\347\220\206.xls"
similarity index 93%
rename from "VueWebCoreApi/wwwroot/Excel/\347\224\250\346\210\267\346\270\205\345\215\225.xls"
rename to "VueWebCoreApi/wwwroot/Excel/\344\272\272\345\221\230\347\256\241\347\220\206.xls"
index 655ba9a..ad9a4c5 100644
--- "a/VueWebCoreApi/wwwroot/Excel/\347\224\250\346\210\267\346\270\205\345\215\225.xls"
+++ "b/VueWebCoreApi/wwwroot/Excel/\344\272\272\345\221\230\347\256\241\347\220\206.xls"
Binary files differ
diff --git "a/VueWebCoreApi/wwwroot/Excel/\347\224\250\346\210\267\346\270\205\345\215\225.xls" "b/VueWebCoreApi/wwwroot/Excel/\345\262\227\344\275\215\347\256\241\347\220\206.xls"
similarity index 76%
copy from "VueWebCoreApi/wwwroot/Excel/\347\224\250\346\210\267\346\270\205\345\215\225.xls"
copy to "VueWebCoreApi/wwwroot/Excel/\345\262\227\344\275\215\347\256\241\347\220\206.xls"
index 655ba9a..b00a08a 100644
--- "a/VueWebCoreApi/wwwroot/Excel/\347\224\250\346\210\267\346\270\205\345\215\225.xls"
+++ "b/VueWebCoreApi/wwwroot/Excel/\345\262\227\344\275\215\347\256\241\347\220\206.xls"
Binary files differ
diff --git "a/VueWebCoreApi/wwwroot/Excel/\347\224\250\346\210\267\346\270\205\345\215\225.xls" "b/VueWebCoreApi/wwwroot/Excel/\347\217\255\347\273\204\347\256\241\347\220\206.xls"
similarity index 76%
copy from "VueWebCoreApi/wwwroot/Excel/\347\224\250\346\210\267\346\270\205\345\215\225.xls"
copy to "VueWebCoreApi/wwwroot/Excel/\347\217\255\347\273\204\347\256\241\347\220\206.xls"
index 655ba9a..f96e344 100644
--- "a/VueWebCoreApi/wwwroot/Excel/\347\224\250\346\210\267\346\270\205\345\215\225.xls"
+++ "b/VueWebCoreApi/wwwroot/Excel/\347\217\255\347\273\204\347\256\241\347\220\206.xls"
Binary files differ
diff --git "a/VueWebCoreApi/wwwroot/Excel/\350\247\222\350\211\262\346\270\205\345\215\225.xls" "b/VueWebCoreApi/wwwroot/Excel/\350\247\222\350\211\262\346\270\205\345\215\225.xls"
deleted file mode 100644
index 7accda8..0000000
--- "a/VueWebCoreApi/wwwroot/Excel/\350\247\222\350\211\262\346\270\205\345\215\225.xls"
+++ /dev/null
Binary files differ
diff --git "a/VueWebCoreApi/wwwroot/Excel/\347\224\250\346\210\267\346\270\205\345\215\225.xls" "b/VueWebCoreApi/wwwroot/Excel/\350\247\222\350\211\262\347\256\241\347\220\206.xls"
similarity index 82%
copy from "VueWebCoreApi/wwwroot/Excel/\347\224\250\346\210\267\346\270\205\345\215\225.xls"
copy to "VueWebCoreApi/wwwroot/Excel/\350\247\222\350\211\262\347\256\241\347\220\206.xls"
index 655ba9a..99ab7a4 100644
--- "a/VueWebCoreApi/wwwroot/Excel/\347\224\250\346\210\267\346\270\205\345\215\225.xls"
+++ "b/VueWebCoreApi/wwwroot/Excel/\350\247\222\350\211\262\347\256\241\347\220\206.xls"
Binary files differ

--
Gitblit v1.9.3