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
ae96b6c1
Commit
ae96b6c1
authored
Sep 23, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
e8cc690b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
76 additions
and
2 deletions
+76
-2
RB_Assist_ViewModel.cs
Edu.Model/ViewModel/User/RB_Assist_ViewModel.cs
+5
-0
RB_Teacher_ViewModel.cs
Edu.Model/ViewModel/User/RB_Teacher_ViewModel.cs
+5
-0
AssistModule.cs
Edu.Module.User/AssistModule.cs
+52
-1
UserController.cs
Edu.WebApi/Controllers/User/UserController.cs
+14
-1
No files found.
Edu.Model/ViewModel/User/RB_Assist_ViewModel.cs
View file @
ae96b6c1
...
...
@@ -39,5 +39,10 @@ namespace Edu.Model.ViewModel.User
/// 更新时间
/// </summary>
public
string
UpdateTimeStr
{
get
{
return
Common
.
ConvertHelper
.
FormatTime
(
this
.
UpdateTime
);
}
}
/// <summary>
/// 审核状态字符串
/// </summary>
public
string
AuditStatusStr
{
get
{
return
Common
.
Plugin
.
EnumHelper
.
GetEnumName
(
this
.
AuditStatus
);
}
}
}
}
\ No newline at end of file
Edu.Model/ViewModel/User/RB_Teacher_ViewModel.cs
View file @
ae96b6c1
...
...
@@ -39,5 +39,10 @@ namespace Edu.Model.ViewModel.User
/// 修改时间
/// </summary>
public
string
UpdateTimeStr
{
get
{
return
Common
.
ConvertHelper
.
FormatTime
(
this
.
UpdateTime
);
}
}
/// <summary>
/// 审核状态字符串
/// </summary>
public
string
AuditStatusStr
{
get
{
return
Common
.
Plugin
.
EnumHelper
.
GetEnumName
(
this
.
AuditStatus
);
}
}
}
}
\ No newline at end of file
Edu.Module.User/AssistModule.cs
View file @
ae96b6c1
using
Edu.Common.Enum
;
using
Edu.AOP.CustomerAttribute
;
using
Edu.Common.Enum
;
using
Edu.Common.Enum.User
;
using
Edu.Model.CacheModel
;
using
Edu.Model.Entity.User
;
using
Edu.Model.ViewModel.User
;
using
Edu.Repository.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
VT.FW.DB
;
...
...
@@ -18,6 +22,11 @@ namespace Edu.Module.User
/// </summary>
private
readonly
RB_AssistRepository
assistRepository
=
new
RB_AssistRepository
();
/// <summary>
/// 账号处理类
/// </summary>
private
readonly
AccountModule
accountModule
=
new
AccountModule
();
/// <summary>
/// 获取助教列表
/// </summary>
...
...
@@ -100,5 +109,47 @@ namespace Edu.Module.User
flag
=
assistRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Assist
.
AId
),
AId
));
return
flag
;
}
/// <summary>
/// 讲师审核
/// </summary>
/// <param name="AId">助教编号</param>
/// <param name="AuditStatus">审核状态</param>
/// <param name="AuditRemark">审核备注</param>
/// <param name="user">用户信息</param>
/// <returns></returns>
[
TransactionCallHandler
]
public
virtual
bool
AuditAssistModule
(
int
AId
,
int
AuditStatus
,
string
AuditRemark
,
UserInfo
user
)
{
bool
flag
=
false
;
var
model
=
GetAssistModule
(
AId
);
if
(
model
!=
null
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Assist_ViewModel
.
AuditStatus
),
AuditStatus
},
{
nameof
(
RB_Assist_ViewModel
.
Remark
),
AuditRemark
},
};
flag
=
assistRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Assist_ViewModel
.
AId
),
AId
));
AccountStatusEnum
statusEnum
=
(
AccountStatusEnum
)
AuditStatus
;
if
(
statusEnum
==
AccountStatusEnum
.
Pass
&&
flag
)
{
flag
=
accountModule
.
SetAccountModule
(
new
RB_Account_ViewModel
()
{
Account
=
model
.
AssistTel
,
Password
=
Common
.
DES
.
Encrypt
(
Common
.
Config
.
DefaultPwd
),
AccountType
=
AccountTypeEnum
.
Assist
,
AccountId
=
model
.
AId
,
CreateBy
=
user
.
Id
,
UpdateBy
=
user
.
Id
,
CreateTime
=
DateTime
.
Now
,
UpdateTime
=
DateTime
.
Now
,
Group_Id
=
model
.
Group_Id
,
School_Id
=
model
.
School_Id
,
});
}
}
return
flag
;
}
}
}
Edu.WebApi/Controllers/User/UserController.cs
View file @
ae96b6c1
...
...
@@ -376,7 +376,6 @@ namespace Edu.WebApi.Controllers.User
extModel
.
UpdateBy
=
base
.
UserInfo
.
Id
;
extModel
.
UpdateTime
=
DateTime
.
Now
;
extModel
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
//extModel.School_Id = base.UserInfo.School_Id;
extModel
.
AuditStatus
=
Common
.
Enum
.
User
.
AccountStatusEnum
.
Normal
;
bool
flag
=
assistModule
.
SetAssistModule
(
extModel
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
...
...
@@ -405,6 +404,20 @@ namespace Edu.WebApi.Controllers.User
var
flag
=
assistModule
.
RemoveAssistModule
(
AId
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 助教审核
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
AuditAssist
()
{
var
AId
=
base
.
ParmJObj
.
GetInt
(
"AId"
,
0
);
int
AuditStatus
=
base
.
ParmJObj
.
GetInt
(
"AuditStatus"
,
1
);
string
AuditRemark
=
base
.
ParmJObj
.
GetStringValue
(
"AuditRemark"
);
var
flag
=
assistModule
.
AuditAssistModule
(
AId
,
AuditStatus
,
AuditRemark
,
base
.
UserInfo
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
#
endregion
#
region
学生管理
...
...
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