Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
Education
Commits
7cdf2f51
Commit
7cdf2f51
authored
Dec 07, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
bf4bf393
681fb74b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
400 additions
and
34 deletions
+400
-34
RB_Class_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Class_ViewModel.cs
+8
-0
DepartmentTree_ViewModel.cs
Edu.Model/ViewModel/User/DepartmentTree_ViewModel.cs
+1
-1
ClassModule.cs
Edu.Module.Course/ClassModule.cs
+254
-26
DepartmentModule.cs
Edu.Module.User/DepartmentModule.cs
+67
-7
RB_Class_PlanRepository.cs
Edu.Repository/Course/RB_Class_PlanRepository.cs
+16
-0
ClassController.cs
Edu.WebApi/Controllers/Course/ClassController.cs
+37
-0
UserController.cs
Edu.WebApi/Controllers/User/UserController.cs
+16
-0
Startup.cs
Edu.WebApi/Startup.cs
+1
-0
No files found.
Edu.Model/ViewModel/Course/RB_Class_ViewModel.cs
View file @
7cdf2f51
...
@@ -97,5 +97,13 @@ namespace Edu.Model.ViewModel.Course
...
@@ -97,5 +97,13 @@ namespace Edu.Model.ViewModel.Course
/// 查询可报名 1是
/// 查询可报名 1是
/// </summary>
/// </summary>
public
int
Q_CanApply
{
get
;
set
;
}
public
int
Q_CanApply
{
get
;
set
;
}
/// 选中的周几/或日期数组
/// </summary>
public
List
<
string
>
WeekDayList
{
get
;
set
;
}
/// <summary>
/// 默认上课时间
/// </summary>
public
List
<
RB_Class_Time_ViewModel
>
DefaultPlanTimeList
{
get
;
set
;
}
}
}
}
}
\ No newline at end of file
Edu.Model/ViewModel/User/DepartmentTree_ViewModel.cs
View file @
7cdf2f51
...
@@ -34,7 +34,7 @@ namespace Edu.Model.ViewModel.User
...
@@ -34,7 +34,7 @@ namespace Edu.Model.ViewModel.User
public
int
IsCompany
{
get
;
set
;
}
public
int
IsCompany
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 数据类型(1-部门,2-员工)
/// 数据类型(1-部门,2-员工
,3-岗位
)
/// </summary>
/// </summary>
public
int
DataType
{
get
;
set
;
}
public
int
DataType
{
get
;
set
;
}
...
...
Edu.Module.Course/ClassModule.cs
View file @
7cdf2f51
This diff is collapsed.
Click to expand it.
Edu.Module.User/DepartmentModule.cs
View file @
7cdf2f51
...
@@ -21,10 +21,11 @@ namespace Edu.Module.User
...
@@ -21,10 +21,11 @@ namespace Edu.Module.User
/// </summary>
/// </summary>
private
readonly
RB_AccountRepository
accountRepository
=
new
RB_AccountRepository
();
private
readonly
RB_AccountRepository
accountRepository
=
new
RB_AccountRepository
();
/// <summary>
/// <summary>
///
学校
仓储层对象
///
岗位
仓储层对象
/// </summary>
/// </summary>
private
readonly
RB_
SchoolRepository
schoolRepository
=
new
RB_School
Repository
();
private
readonly
RB_
PostRepository
postRepository
=
new
RB_Post
Repository
();
/// <summary>
/// <summary>
/// 获取部门分页列表
/// 获取部门分页列表
...
@@ -132,19 +133,24 @@ namespace Edu.Module.User
...
@@ -132,19 +133,24 @@ namespace Edu.Module.User
/// 获取部门结构树
/// 获取部门结构树
/// </summary>
/// </summary>
/// <param name="query"></param>
/// <param name="query"></param>
/// <param name="query">是否查询员工</param>
/// <param name="isQueryEmployee">是否查询员工</param>
/// <param name="isQueryPost">是否岗位</param>
/// <returns></returns>
/// <returns></returns>
public
List
<
DepartmentTree_ViewModel
>
GetDepartmentTreeModule
(
RB_Department_ViewModel
query
,
bool
isQueryEmployee
=
false
)
public
List
<
DepartmentTree_ViewModel
>
GetDepartmentTreeModule
(
RB_Department_ViewModel
query
,
bool
isQueryEmployee
=
false
,
bool
isQueryPost
=
false
)
{
{
//树形结构列表
//树形结构列表
List
<
DepartmentTree_ViewModel
>
list
=
new
List
<
DepartmentTree_ViewModel
>();
List
<
DepartmentTree_ViewModel
>
list
=
new
List
<
DepartmentTree_ViewModel
>();
//所有的部门列表
//所有的部门列表
var
deptList
=
GetDepartmentListModule
(
query
);
var
deptList
=
GetDepartmentListModule
(
query
);
//员工列表
var
empList
=
new
List
<
Employee_ViewModel
>();
var
empList
=
new
List
<
Employee_ViewModel
>();
//岗位列表
var
postList
=
new
List
<
RB_Post_ViewModel
>();
if
(
deptList
==
null
)
if
(
deptList
==
null
)
{
{
deptList
=
new
List
<
RB_Department_ViewModel
>();
deptList
=
new
List
<
RB_Department_ViewModel
>();
}
}
//查询员工
if
(
isQueryEmployee
)
if
(
isQueryEmployee
)
{
{
empList
=
accountRepository
.
GetEmployeeListRepository
(
new
Employee_ViewModel
()
empList
=
accountRepository
.
GetEmployeeListRepository
(
new
Employee_ViewModel
()
...
@@ -153,6 +159,13 @@ namespace Edu.Module.User
...
@@ -153,6 +159,13 @@ namespace Edu.Module.User
School_Id
=
query
.
School_Id
School_Id
=
query
.
School_Id
});
});
}
}
if
(
isQueryPost
)
{
postList
=
postRepository
.
GetPostListRepository
(
new
RB_Post_ViewModel
()
{
Group_Id
=
query
.
Group_Id
,
});
}
if
(
deptList
!=
null
&&
deptList
.
Count
>
0
)
if
(
deptList
!=
null
&&
deptList
.
Count
>
0
)
{
{
var
firstList
=
new
List
<
RB_Department_ViewModel
>();
var
firstList
=
new
List
<
RB_Department_ViewModel
>();
...
@@ -200,7 +213,30 @@ namespace Edu.Module.User
...
@@ -200,7 +213,30 @@ namespace Edu.Module.User
}
}
}
}
#
endregion
#
endregion
var
childList
=
GetDeptTreeList
(
fItem
.
DeptId
,
deptList
,
empList
:
empList
);
#
region
添加岗位
if
(
isQueryPost
)
{
var
tempPostList
=
postList
?.
Where
(
qitem
=>
qitem
.
RB_Dept_Id
==
fItem
.
DeptId
)?.
ToList
();
if
(
tempPostList
!=
null
&&
tempPostList
.
Count
>
0
)
{
foreach
(
var
pItem
in
tempPostList
)
{
tModel
.
ChildList
.
Add
(
new
DepartmentTree_ViewModel
()
{
DeptId
=
pItem
.
PostId
,
DeptName
=
pItem
.
PostName
,
ParentId
=
0
,
ChildList
=
new
List
<
DepartmentTree_ViewModel
>(),
School_Id
=
fItem
.
School_Id
,
DataType
=
3
,
});
}
}
}
#
endregion
var
childList
=
GetDeptTreeList
(
fItem
.
DeptId
,
deptList
,
empList
:
empList
,
postList
:
postList
);
if
(
childList
!=
null
&&
childList
.
Count
>
0
)
if
(
childList
!=
null
&&
childList
.
Count
>
0
)
{
{
tModel
.
ChildList
.
AddRange
(
childList
);
tModel
.
ChildList
.
AddRange
(
childList
);
...
@@ -219,7 +255,7 @@ namespace Edu.Module.User
...
@@ -219,7 +255,7 @@ namespace Edu.Module.User
/// <param name="parentId">父节点编号</param>
/// <param name="parentId">父节点编号</param>
/// <param name="sourceList">数据源列表</param>
/// <param name="sourceList">数据源列表</param>
/// <param name="empList">员工列表</param>
/// <param name="empList">员工列表</param>
private
List
<
DepartmentTree_ViewModel
>
GetDeptTreeList
(
int
parentId
,
List
<
RB_Department_ViewModel
>
sourceList
,
List
<
Employee_ViewModel
>
empList
=
null
)
private
List
<
DepartmentTree_ViewModel
>
GetDeptTreeList
(
int
parentId
,
List
<
RB_Department_ViewModel
>
sourceList
,
List
<
Employee_ViewModel
>
empList
=
null
,
List
<
RB_Post_ViewModel
>
postList
=
null
)
{
{
List
<
DepartmentTree_ViewModel
>
treeList
=
new
List
<
DepartmentTree_ViewModel
>();
List
<
DepartmentTree_ViewModel
>
treeList
=
new
List
<
DepartmentTree_ViewModel
>();
foreach
(
var
item
in
sourceList
.
Where
(
qitem
=>
qitem
.
ParentId
==
parentId
))
foreach
(
var
item
in
sourceList
.
Where
(
qitem
=>
qitem
.
ParentId
==
parentId
))
...
@@ -234,6 +270,7 @@ namespace Edu.Module.User
...
@@ -234,6 +270,7 @@ namespace Edu.Module.User
IsCompany
=
item
.
IsCompany
,
IsCompany
=
item
.
IsCompany
,
DataType
=
1
,
DataType
=
1
,
};
};
#
region
添加员工信息
#
region
添加员工信息
if
(
empList
!=
null
&&
empList
.
Count
>
0
)
if
(
empList
!=
null
&&
empList
.
Count
>
0
)
{
{
...
@@ -255,7 +292,30 @@ namespace Edu.Module.User
...
@@ -255,7 +292,30 @@ namespace Edu.Module.User
}
}
}
}
#
endregion
#
endregion
var
childList
=
GetDeptTreeList
(
item
.
DeptId
,
sourceList
);
#
region
添加岗位
if
(
postList
!=
null
&&
postList
.
Count
>
0
)
{
var
tempPostList
=
postList
?.
Where
(
qitem
=>
qitem
.
RB_Dept_Id
==
item
.
DeptId
)?.
ToList
();
if
(
tempPostList
!=
null
&&
tempPostList
.
Count
>
0
)
{
foreach
(
var
pItem
in
tempPostList
)
{
model
.
ChildList
.
Add
(
new
DepartmentTree_ViewModel
()
{
DeptId
=
pItem
.
PostId
,
DeptName
=
pItem
.
PostName
,
ParentId
=
0
,
ChildList
=
new
List
<
DepartmentTree_ViewModel
>(),
School_Id
=
item
.
School_Id
,
DataType
=
3
,
});
}
}
}
#
endregion
var
childList
=
GetDeptTreeList
(
item
.
DeptId
,
sourceList
,
empList
:
empList
,
postList
:
postList
);
if
(
childList
!=
null
&&
childList
.
Count
>
0
)
if
(
childList
!=
null
&&
childList
.
Count
>
0
)
{
{
model
.
ChildList
.
AddRange
(
childList
);
model
.
ChildList
.
AddRange
(
childList
);
...
...
Edu.Repository/Course/RB_Class_PlanRepository.cs
View file @
7cdf2f51
...
@@ -3,6 +3,7 @@ using Edu.Model.ViewModel.Course;
...
@@ -3,6 +3,7 @@ using Edu.Model.ViewModel.Course;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Edu.Repository.Course
namespace
Edu.Repository.Course
{
{
...
@@ -38,6 +39,21 @@ WHERE 1=1
...
@@ -38,6 +39,21 @@ WHERE 1=1
return
Get
<
RB_Class_Plan_ViewModel
>(
builder
.
ToString
()).
ToList
();
return
Get
<
RB_Class_Plan_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
}
/// <summary>
/// 判断是否存在
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
CheckExistsRepository
(
RB_Class_Plan_ViewModel
model
)
{
List
<
WhereHelper
>
list
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(
nameof
(
RB_Class_Plan_ViewModel
.
ClassId
),
model
.
ClassId
),
new
WhereHelper
(
nameof
(
RB_Class_Plan_ViewModel
.
ClassDate
),
model
.
ClassDate
),
};
return
base
.
Exists
(
list
);
}
/// <summary>
/// <summary>
/// 根据班级编号删除班级上课计划
/// 根据班级编号删除班级上课计划
/// </summary>
/// </summary>
...
...
Edu.WebApi/Controllers/Course/ClassController.cs
View file @
7cdf2f51
...
@@ -97,6 +97,7 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -97,6 +97,7 @@ namespace Edu.WebApi.Controllers.Course
{
{
var
extModel
=
new
RB_Class_ViewModel
()
var
extModel
=
new
RB_Class_ViewModel
()
{
{
ClassId
=
base
.
ParmJObj
.
GetInt
(
"ClassId"
),
CreateBy
=
UserInfo
.
Id
,
CreateBy
=
UserInfo
.
Id
,
CreateTime
=
DateTime
.
Now
,
CreateTime
=
DateTime
.
Now
,
UpdateBy
=
UserInfo
.
Id
,
UpdateBy
=
UserInfo
.
Id
,
...
@@ -124,6 +125,42 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -124,6 +125,42 @@ namespace Edu.WebApi.Controllers.Course
CompleteProgress
=
base
.
ParmJObj
.
GetInt
(
"CompleteProgress"
),
CompleteProgress
=
base
.
ParmJObj
.
GetInt
(
"CompleteProgress"
),
School_Id
=
base
.
ParmJObj
.
GetInt
(
"School_Id"
),
School_Id
=
base
.
ParmJObj
.
GetInt
(
"School_Id"
),
};
};
try
{
string
ClassStepPriceListStr
=
base
.
ParmJObj
.
GetStringValue
(
"ClassStepPriceList"
);
if
(!
string
.
IsNullOrEmpty
(
ClassStepPriceListStr
))
{
extModel
.
ClassStepPriceList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
RB_Class_StepPrice_ViewModel
>>(
ClassStepPriceListStr
);
}
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"SetClass_ClassStepPriceList"
);
}
try
{
string
WeekDayListStr
=
base
.
ParmJObj
.
GetStringValue
(
"WeekDayList"
);
if
(!
string
.
IsNullOrEmpty
(
WeekDayListStr
))
{
extModel
.
WeekDayList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
string
>>(
WeekDayListStr
);
}
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"SetClass_WeekDayList"
);
}
try
{
string
DefaultPlanTimeListStr
=
base
.
ParmJObj
.
GetStringValue
(
"DefaultPlanTimeList"
);
if
(!
string
.
IsNullOrEmpty
(
DefaultPlanTimeListStr
))
{
extModel
.
DefaultPlanTimeList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
RB_Class_Time_ViewModel
>>(
DefaultPlanTimeListStr
);
}
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"SetClass_DefaultPlanTimeList"
);
}
bool
flag
=
classModule
.
SetClassModule
(
extModel
);
bool
flag
=
classModule
.
SetClassModule
(
extModel
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
}
...
...
Edu.WebApi/Controllers/User/UserController.cs
View file @
7cdf2f51
...
@@ -912,6 +912,22 @@ namespace Edu.WebApi.Controllers.User
...
@@ -912,6 +912,22 @@ namespace Edu.WebApi.Controllers.User
return
ApiResult
.
Success
(
data
:
list
);
return
ApiResult
.
Success
(
data
:
list
);
}
}
/// <summary>
/// 获取部门岗位树形列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetDeptPostTree
()
{
var
query
=
new
RB_Department_ViewModel
()
{
Group_Id
=
base
.
UserInfo
.
Group_Id
,
School_Id
=
base
.
ParmJObj
.
GetInt
(
"School_Id"
)
};
var
list
=
departmentModule
.
GetDepartmentTreeModule
(
query
,
isQueryPost
:
true
);
return
ApiResult
.
Success
(
data
:
list
);
}
/// <summary>
/// <summary>
/// 获取组织机构图
/// 获取组织机构图
/// </summary>
/// </summary>
...
...
Edu.WebApi/Startup.cs
View file @
7cdf2f51
...
@@ -39,6 +39,7 @@ namespace Edu.WebApi
...
@@ -39,6 +39,7 @@ namespace Edu.WebApi
"http://localhost:8400"
,
"http://localhost:8400"
,
"http://localhost:8081"
,
"http://localhost:8081"
,
"http://localhost:8080"
,
"http://localhost:8080"
,
"http://localhost:8181"
,
"http://localhost:8082"
,
"http://localhost:8082"
,
"http://127.0.0.1:50512"
,
"http://127.0.0.1:50512"
,
"http://127.0.0.1:20224"
,
"http://127.0.0.1:20224"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment