Pārlūkot izejas kodu

添加组织架构实体类

luocaiyang 3 gadi atpakaļ
vecāks
revīzija
b7ff437713

+ 12 - 0
wispro.sp.api/.config/dotnet-tools.json

@@ -0,0 +1,12 @@
+{
+  "version": 1,
+  "isRoot": true,
+  "tools": {
+    "dotnet-ef": {
+      "version": "6.0.0",
+      "commands": [
+        "dotnet-ef"
+      ]
+    }
+  }
+}

+ 4 - 3
wispro.sp.utility/IPEasyUtility.cs

@@ -32,7 +32,7 @@ namespace wispro.sp.utility
                 driver.Manage().Timeouts().PageLoad = TimeSpan.FromSeconds(500);
 
                 //进入登录界面
-                driver.Navigate().GoToUrl("http://47.106.221.167/Login.aspx");
+                driver.Navigate().GoToUrl(ConfigHelper.GetSectionValue("IPEasySetting:IPEasyWeb"));
 
                 //输入用户名和密码
                 driver.FindElement(By.Id("txtUser")).SendKeys(Account);
@@ -240,7 +240,7 @@ namespace wispro.sp.utility
                 driver.Manage().Timeouts().PageLoad = TimeSpan.FromSeconds(100);
 
                 //进入登录界面
-                driver.Navigate().GoToUrl("http://47.106.221.167/Login.aspx");
+                driver.Navigate().GoToUrl(ConfigHelper.GetSectionValue("IPEasySetting:IPEasyWeb"));
 
                 //输入用户名和密码
                 driver.FindElement(By.Id("txtUser")).SendKeys(Account);
@@ -332,8 +332,9 @@ namespace wispro.sp.utility
                 driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
                 driver.Manage().Timeouts().PageLoad = TimeSpan.FromSeconds(100);
 
+                
                 //进入登录界面
-                driver.Navigate().GoToUrl("http://47.106.221.167/Login.aspx");
+                driver.Navigate().GoToUrl(ConfigHelper.GetSectionValue("IPEasySetting:IPEasyWeb"));
 
                 //输入用户名和密码
                 driver.FindElement(By.Id("txtUser")).SendKeys(Account);

+ 3 - 1
wispro.sp.winClient/appsettings.json

@@ -5,6 +5,8 @@
     "Account": "caiyangl",
     "Password": "j)wx*lier*@3",
     "ChormeDriverPath": "D:\\source\\repos\\ConsoleApp2\\ConsoleApp2\\bin\\Debug",
-    "ScheduleSetting": "30 15 17 * * ? *"
+    "ScheduleSetting": "30 15 17 * * ? *",
+    "IPEasyWeb": "http://47.106.221.167/Login.aspx"
+
   }
 }

+ 46 - 0
wospro.sp.entity/Organization/Department.cs

@@ -0,0 +1,46 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace wispro.sp.entity
+{
+    /// <summary>
+    /// 部门
+    /// </summary>
+    public class Department
+    {
+        /// <summary>
+        /// Id
+        /// </summary>
+        public int Id { get; set; }
+
+        /// <summary>
+        /// 部门名称
+        /// </summary>
+        public string Name { get; set; }
+
+        /// <summary>
+        /// 祖先节点Id,用逗号(,)隔开
+        /// 例如:1,2,3
+        /// </summary>
+        public string ancestors { get; set; }
+
+        /// <summary>
+        /// 同层排序字段
+        /// </summary>
+        public int order_num { get; set; }
+
+        /// <summary>
+        /// 部门备注
+        /// </summary>
+
+        public string Memo { get; set; }
+        
+        /// <summary>
+        /// 上级部门Id
+        /// </summary>
+        public int parentId { get; set; }
+    }
+}

+ 37 - 0
wospro.sp.entity/Organization/DepartmentPosition.cs

@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace wispro.sp.entity
+{
+    public class DepartmentPosition
+    {
+        public int Id { get; set; }
+
+        /// <summary>
+        /// 部门
+        /// </summary>
+        public virtual Department department { get; set; }
+
+        /// <summary>
+        /// 部门Id
+        /// </summary>
+        public int departmentId { get; set; }
+
+
+        /// <summary>
+        /// 职位
+        /// </summary>
+        public virtual Position Position { get; set; }
+
+        /// <summary>
+        /// 职位Id
+        /// </summary>
+        public int PositionId { get; set; }
+
+        
+        public virtual List<Staff> Staffs { get; set; }
+    }
+}

+ 24 - 0
wospro.sp.entity/Organization/Position.cs

@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace wispro.sp.entity
+{
+    /// <summary>
+    /// 职位
+    /// </summary>
+    public class Position
+    {
+        /// <summary>
+        /// 职位Id
+        /// </summary>
+        public int Id { get; set; }
+
+        /// <summary>
+        /// 职位名称
+        /// </summary>
+        public string Name { get; set; }
+    }
+}

+ 36 - 0
wospro.sp.entity/Organization/Role.cs

@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace wispro.sp.entity
+{
+    /// <summary>
+    /// 用户角色
+    /// </summary>
+    public class Role
+    {
+        public int Id { get; set; }
+
+        /// <summary>
+        /// 角色名称
+        /// </summary>
+        public string Name { get; set; }
+
+        /// <summary>
+        /// 角色备注
+        /// </summary>
+        public string Memo { get; set; }
+
+        /// <summary>
+        /// 拥有角色用户
+        /// </summary>
+        public virtual List<Staff> Staffs { get; set; }
+
+        /// <summary>
+        /// 拥有角色的部门职位
+        /// </summary>
+        public virtual List<DepartmentPosition> DepartmentPositions { get; set; }
+    }
+}

wospro.sp.entity/Staff.cs → wospro.sp.entity/Organization/Staff.cs