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
2846f5d4
Commit
2846f5d4
authored
Jan 11, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
9e9b119f
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
104 additions
and
11 deletions
+104
-11
RB_School_ViewModel.cs
Edu.Model/ViewModel/User/RB_School_ViewModel.cs
+5
-0
AssistModule.cs
Edu.Module.User/AssistModule.cs
+31
-1
EmployeeModule.cs
Edu.Module.User/EmployeeModule.cs
+0
-3
ManagerModule.cs
Edu.Module.User/ManagerModule.cs
+32
-4
TeacherModule.cs
Edu.Module.User/TeacherModule.cs
+32
-2
RB_SchoolRepository.cs
Edu.Repository/User/RB_SchoolRepository.cs
+4
-0
UserController.cs
Edu.WebApi/Controllers/User/UserController.cs
+0
-1
No files found.
Edu.Model/ViewModel/User/RB_School_ViewModel.cs
View file @
2846f5d4
...
...
@@ -55,5 +55,10 @@ namespace Edu.Model.ViewModel.User
/// 管理者姓名
/// </summary>
public
string
ManagerName
{
get
;
set
;
}
/// <summary>
/// 学校编号
/// </summary>
public
string
QSIds
{
get
;
set
;
}
}
}
Edu.Module.User/AssistModule.cs
View file @
2846f5d4
...
...
@@ -44,6 +44,16 @@ namespace Edu.Module.User
/// </summary>
private
readonly
UserChangeLogModule
userChangeLogModule
=
new
UserChangeLogModule
();
/// <summary>
/// 校区管理仓储层对象
/// </summary>
private
readonly
RB_SchoolRepository
schoolRepository
=
new
RB_SchoolRepository
();
/// <summary>
/// 账号仓储层对象
/// </summary>
private
readonly
RB_AccountRepository
accountRepository
=
new
RB_AccountRepository
();
/// <summary>
/// 获取助教列表
/// </summary>
...
...
@@ -242,8 +252,14 @@ namespace Edu.Module.User
{
nameof
(
RB_Assist
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Assist
.
UpdateTime
),
model
.
UpdateTime
},
{
nameof
(
RB_Assist
.
Dept_Id
),
model
.
Dept_Id
},
{
nameof
(
RB_Assist
.
School_Id
),
model
.
School_Id
},
};
string
logContent
=
""
;
if
(
model
.
School_Id
!=
oldModel
.
School_Id
)
{
var
schoolList
=
schoolRepository
.
GetSchoolListRepository
(
new
RB_School_ViewModel
()
{
QSIds
=
model
.
School_Id
+
","
+
oldModel
.
School_Id
});
logContent
+=
string
.
Format
(
",将校区由【{0}】修改为【{1}】。"
,
(
schoolList
.
Where
(
qitem
=>
qitem
.
SId
==
oldModel
.
School_Id
)?.
FirstOrDefault
()?.
SName
??
"总部"
),
(
schoolList
.
Where
(
qitem
=>
qitem
.
SId
==
model
.
School_Id
)?.
FirstOrDefault
()?.
DeptName
??
"总部"
));
}
if
(
model
.
Dept_Id
!=
oldModel
.
Dept_Id
)
{
var
deptList
=
departmentRepository
.
GetDepartmentListRepository
(
new
RB_Department_ViewModel
()
{
QDeptIds
=
model
.
Dept_Id
+
","
+
oldModel
.
Dept_Id
});
...
...
@@ -254,8 +270,22 @@ namespace Edu.Module.User
//新增日志
userChangeLogModule
.
SetUserChangeLogModule
(
model
.
CreateBy
,
model
.
Group_Id
,
model
.
School_Id
,
logContent
,
model
.
AId
,
AccountTypeEnum
.
Assist
);
}
//修改账号表
Dictionary
<
string
,
object
>
accountFileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Account_ViewModel
.
School_Id
),
model
.
School_Id
},
};
List
<
WhereHelper
>
accountWhere
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(
nameof
(
RB_Account_ViewModel
.
AccountId
),
model
.
AId
),
new
WhereHelper
(
nameof
(
RB_Account_ViewModel
.
AccountType
),
(
int
)
AccountTypeEnum
.
Assist
),
};
flag
=
accountRepository
.
Update
(
accountFileds
,
accountWhere
);
if
(
flag
)
{
flag
=
assistRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Assist
.
AId
),
model
.
AId
));
}
}
else
{
var
newId
=
assistRepository
.
Insert
(
model
);
...
...
Edu.Module.User/EmployeeModule.cs
View file @
2846f5d4
...
...
@@ -286,7 +286,6 @@ namespace Edu.Module.User
UpdateBy
=
extModel
.
UpdateBy
,
UpdateTime
=
extModel
.
UpdateTime
,
Dept_Id
=
extModel
.
Dept_Id
});
break
;
case
Common
.
Enum
.
User
.
AccountTypeEnum
.
Teacher
:
...
...
@@ -299,7 +298,6 @@ namespace Edu.Module.User
UpdateBy
=
extModel
.
UpdateBy
,
UpdateTime
=
extModel
.
UpdateTime
,
Dept_Id
=
extModel
.
Dept_Id
});
break
;
case
Common
.
Enum
.
User
.
AccountTypeEnum
.
Assist
:
...
...
@@ -312,7 +310,6 @@ namespace Edu.Module.User
UpdateBy
=
extModel
.
UpdateBy
,
UpdateTime
=
extModel
.
UpdateTime
,
Dept_Id
=
extModel
.
Dept_Id
});
break
;
}
...
...
Edu.Module.User/ManagerModule.cs
View file @
2846f5d4
...
...
@@ -43,6 +43,16 @@ namespace Edu.Module.User
/// </summary>
private
readonly
UserChangeLogModule
userChangeLogModule
=
new
UserChangeLogModule
();
/// <summary>
/// 校区管理
/// </summary>
private
readonly
RB_SchoolRepository
schoolRepository
=
new
RB_SchoolRepository
();
/// <summary>
/// 账号仓储层对象
/// </summary>
private
readonly
RB_AccountRepository
accountRepository
=
new
RB_AccountRepository
();
/// <summary>
/// 获取管理者列表
/// </summary>
...
...
@@ -198,14 +208,17 @@ namespace Edu.Module.User
var
oldModel
=
GetManagerModule
(
model
.
MId
);
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Manager_ViewModel
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Manager_ViewModel
.
UpdateTime
),
model
.
UpdateTime
},
{
nameof
(
RB_Manager_ViewModel
.
Dept_Id
),
model
.
Dept_Id
},
{
nameof
(
RB_Manager_ViewModel
.
School_Id
),
model
.
School_Id
},
};
string
logContent
=
""
;
if
(
model
.
School_Id
!=
oldModel
.
School_Id
)
{
var
schoolList
=
schoolRepository
.
GetSchoolListRepository
(
new
RB_School_ViewModel
()
{
QSIds
=
model
.
School_Id
+
","
+
oldModel
.
School_Id
});
logContent
+=
string
.
Format
(
",将校区由【{0}】修改为【{1}】。"
,
(
schoolList
.
Where
(
qitem
=>
qitem
.
SId
==
oldModel
.
School_Id
)?.
FirstOrDefault
()?.
SName
??
"总部"
),
(
schoolList
.
Where
(
qitem
=>
qitem
.
SId
==
model
.
School_Id
)?.
FirstOrDefault
()?.
DeptName
??
"总部"
));
}
if
(
model
.
Dept_Id
!=
oldModel
.
Dept_Id
)
{
var
deptList
=
departmentRepository
.
GetDepartmentListRepository
(
new
RB_Department_ViewModel
()
{
QDeptIds
=
model
.
Dept_Id
+
","
+
oldModel
.
Dept_Id
});
...
...
@@ -217,8 +230,23 @@ namespace Edu.Module.User
//新增日志
userChangeLogModule
.
SetUserChangeLogModule
(
model
.
CreateBy
,
model
.
Group_Id
,
model
.
School_Id
,
logContent
,
model
.
MId
,
AccountTypeEnum
.
Admin
);
}
//修改账号表
Dictionary
<
string
,
object
>
accountFileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Account_ViewModel
.
School_Id
),
model
.
School_Id
},
};
List
<
WhereHelper
>
accountWhere
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(
nameof
(
RB_Account_ViewModel
.
AccountId
),
model
.
MId
),
new
WhereHelper
(
nameof
(
RB_Account_ViewModel
.
AccountType
),
(
int
)
AccountTypeEnum
.
Admin
),
};
flag
=
accountRepository
.
Update
(
accountFileds
,
accountWhere
);
if
(
flag
)
{
flag
=
managerRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Manager_ViewModel
.
MId
),
model
.
MId
));
}
}
return
flag
;
}
...
...
Edu.Module.User/TeacherModule.cs
View file @
2846f5d4
...
...
@@ -51,6 +51,16 @@ namespace Edu.Module.User
/// </summary>
private
readonly
RB_ClassRepository
classRepository
=
new
RB_ClassRepository
();
/// <summary>
/// 校区管理
/// </summary>
private
readonly
RB_SchoolRepository
schoolRepository
=
new
RB_SchoolRepository
();
/// <summary>
/// 账号仓储层对象
/// </summary>
private
readonly
RB_AccountRepository
accountRepository
=
new
RB_AccountRepository
();
/// <summary>
/// 获取讲师列表
/// </summary>
...
...
@@ -269,9 +279,14 @@ namespace Edu.Module.User
{
nameof
(
RB_Teacher_ViewModel
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Teacher_ViewModel
.
UpdateTime
),
model
.
UpdateTime
},
{
nameof
(
RB_Teacher_ViewModel
.
Dept_Id
),
model
.
Dept_Id
},
{
nameof
(
RB_Teacher_ViewModel
.
School_Id
),
model
.
School_Id
},
};
string
logContent
=
""
;
if
(
model
.
School_Id
!=
oldModel
.
School_Id
)
{
var
schoolList
=
schoolRepository
.
GetSchoolListRepository
(
new
RB_School_ViewModel
()
{
QSIds
=
model
.
School_Id
+
","
+
oldModel
.
School_Id
});
logContent
+=
string
.
Format
(
",将校区由【{0}】修改为【{1}】。"
,
(
schoolList
.
Where
(
qitem
=>
qitem
.
SId
==
oldModel
.
School_Id
)?.
FirstOrDefault
()?.
SName
??
"总部"
),
(
schoolList
.
Where
(
qitem
=>
qitem
.
SId
==
model
.
School_Id
)?.
FirstOrDefault
()?.
DeptName
??
"总部"
));
}
if
(
model
.
Dept_Id
!=
oldModel
.
Dept_Id
)
{
var
deptList
=
departmentRepository
.
GetDepartmentListRepository
(
new
RB_Department_ViewModel
()
{
QDeptIds
=
model
.
Dept_Id
+
","
+
oldModel
.
Dept_Id
});
...
...
@@ -282,8 +297,23 @@ namespace Edu.Module.User
//新增日志
userChangeLogModule
.
SetUserChangeLogModule
(
model
.
CreateBy
,
model
.
Group_Id
,
model
.
School_Id
,
logContent
,
model
.
TId
,
AccountTypeEnum
.
Teacher
);
}
//修改账号表
Dictionary
<
string
,
object
>
accountFileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Account_ViewModel
.
School_Id
),
model
.
School_Id
},
};
List
<
WhereHelper
>
accountWhere
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(
nameof
(
RB_Account_ViewModel
.
AccountId
),
model
.
TId
),
new
WhereHelper
(
nameof
(
RB_Account_ViewModel
.
AccountType
),
(
int
)
AccountTypeEnum
.
Teacher
),
};
flag
=
accountRepository
.
Update
(
accountFileds
,
accountWhere
);
if
(
flag
)
{
flag
=
teacherRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Teacher_ViewModel
.
TId
),
model
.
TId
));
}
}
else
{
var
newId
=
teacherRepository
.
Insert
(
model
);
...
...
Edu.Repository/User/RB_SchoolRepository.cs
View file @
2846f5d4
...
...
@@ -58,6 +58,10 @@ WHERE 1=1
{
builder
.
AppendFormat
(
" AND s.{0}={1} "
,
nameof
(
RB_School_ViewModel
.
SId
),
query
.
SId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QSIds
))
{
builder
.
AppendFormat
(
" AND s.{0} IN({1}) "
,
nameof
(
RB_School_ViewModel
.
SId
),
query
.
QSIds
);
}
if
(
query
.
Group_Id
>
0
)
{
builder
.
AppendFormat
(
" AND s.{0}={1} "
,
nameof
(
RB_School_ViewModel
.
Group_Id
),
query
.
Group_Id
);
...
...
Edu.WebApi/Controllers/User/UserController.cs
View file @
2846f5d4
...
...
@@ -782,7 +782,6 @@ namespace Edu.WebApi.Controllers.User
extModel
.
UpdateTime
=
DateTime
.
Now
;
extModel
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
extModel
.
CreateBy
=
base
.
UserInfo
.
Id
;
extModel
.
School_Id
=
base
.
UserInfo
.
School_Id
;
bool
flag
=
employeeModule
.
SetEmployeeDeptModule
(
extModel
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
...
...
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