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
4b519014
Commit
4b519014
authored
Jul 14, 2021
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
ecda565b
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
344 additions
and
3 deletions
+344
-3
RB_Order_Guest.cs
Edu.Model/Entity/Course/RB_Order_Guest.cs
+1
-1
RB_Student_StopClass.cs
Edu.Model/Entity/EduTask/RB_Student_StopClass.cs
+85
-0
RB_Student_StopClass_ViewModel.cs
...Model/ViewModel/EduTask/RB_Student_StopClass_ViewModel.cs
+24
-0
StopStudentClassModule.cs
Edu.Module.EduTask/StopStudentClassModule.cs
+94
-0
RB_Education_ReceiptRepository.cs
Edu.Repository/EduTask/RB_Education_ReceiptRepository.cs
+9
-0
RB_Student_StopClassRepository.cs
Edu.Repository/EduTask/RB_Student_StopClassRepository.cs
+37
-0
StopStudentClassController.cs
Edu.WebApi/Controllers/EduTask/StopStudentClassController.cs
+90
-0
appsettings.json
Edu.WebApi/appsettings.json
+4
-2
No files found.
Edu.Model/Entity/Course/RB_Order_Guest.cs
View file @
4b519014
...
...
@@ -32,7 +32,7 @@ namespace Edu.Model.Entity.Course
public
string
GuestName
{
get
;
set
;
}
/// <summary>
/// 状态 1正常 2退学 3-申请中,4-驳回申请,5-停课
/// 状态 1正常 2退学 3-申请中,4-驳回申请,5-停课
,6-停课申请中
/// </summary>
public
int
GuestState
{
get
;
set
;
}
...
...
Edu.Model/Entity/EduTask/RB_Student_StopClass.cs
0 → 100644
View file @
4b519014
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.EduTask
{
/// <summary>
/// 学生停课申请实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Student_StopClass
{
/// <summary>
/// 主键(调课编号)
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 班级编号
/// </summary>
public
int
ClassId
{
get
;
set
;
}
/// <summary>
/// 课程编号
/// </summary>
public
int
CourseId
{
get
;
set
;
}
/// <summary>
/// 学生id
/// </summary>
public
int
OrderGuestId
{
get
;
set
;
}
/// <summary>
/// 集团编号
/// </summary>
public
int
Group_Id
{
get
;
set
;
}
/// <summary>
/// 学校编号
/// </summary>
public
int
School_Id
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateTime
{
get
;
set
;
}
/// <summary>
/// 修改人
/// </summary>
public
int
UpdateBy
{
get
;
set
;
}
/// <summary>
/// 更新时间
/// </summary>
public
DateTime
UpdateTime
{
get
;
set
;
}
/// <summary>
/// 1-审核通过,其他值表示审核中或者驳回了可以不管,此处只是记录最后的审核状态,方便定时器更新学生的停课状态
/// </summary>
public
int
IsAuditThrough
{
get
;
set
;
}
// <summary>
/// 生效日期
/// </summary>
public
DateTime
?
TakeEffectTime
{
get
;
set
;
}
/// <summary>
/// 申请备注
/// </summary>
public
string
Remarks
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/EduTask/RB_Student_StopClass_ViewModel.cs
0 → 100644
View file @
4b519014
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Edu.Model.Entity.EduTask
;
namespace
Edu.Model.ViewModel.EduTask
{
/// <summary>
/// 学员停课申请实体扩展表
/// </summary>
public
class
RB_Student_StopClass_ViewModel
:
RB_Student_StopClass
{
/// <summary>
/// 班级名称
/// </summary>
public
string
ClassName
{
get
;
set
;
}
/// <summary>
/// 多个ids
/// </summary>
public
string
Q_Student_StopClass_Ids
{
get
;
set
;
}
}
}
Edu.Module.EduTask/StopStudentClassModule.cs
0 → 100644
View file @
4b519014
using
Edu.Model.Entity.EduTask
;
using
Edu.Model.ViewModel.EduTask
;
using
Edu.Repository.EduTask
;
using
System.Collections.Generic
;
using
VT.FW.AOP.CustomerAttribute
;
using
VT.FW.DB
;
namespace
Edu.Module.EduTask
{
/// <summary>
/// 调课计划处理类
/// </summary>
public
class
StopStudentClassModule
{
/// <summary>
/// 教务单据仓储层对象
/// </summary>
private
readonly
RB_Education_ReceiptRepository
education_ReceiptRepository
=
new
RB_Education_ReceiptRepository
();
/// <summary>
/// 停课计划仓储层对象
/// </summary>
private
readonly
RB_Student_StopClassRepository
student_StopClassRepository
=
new
RB_Student_StopClassRepository
();
/// <summary>
/// 获取调课计划列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Student_StopClass_ViewModel
>
GetStudentStopClassListRepository
(
RB_Student_StopClass_ViewModel
query
)
{
return
student_StopClassRepository
.
GetStudentStopClassListRepository
(
query
);
}
//public bool UpdateChangeClassPlan(int id)
//{
// return change_ClassPlanRepository.UpdateChangeClassPlan(id);
//}
/// <summary>
/// 新增修改停课申请
/// </summary>
/// <returns></returns>
[
TransactionCallHandler
]
public
virtual
bool
SetStudentStopClassModule
(
RB_Student_StopClass_ViewModel
extModel
)
{
bool
flag
=
false
;
if
(
extModel
.
Id
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_StopClass_ViewModel
.
OrderGuestId
),
extModel
.
OrderGuestId
},
{
nameof
(
RB_Student_StopClass_ViewModel
.
ClassId
),
extModel
.
ClassId
},
{
nameof
(
RB_Student_StopClass_ViewModel
.
CourseId
),
extModel
.
CourseId
},
{
nameof
(
RB_Student_StopClass_ViewModel
.
TakeEffectTime
),
extModel
.
TakeEffectTime
},
{
nameof
(
RB_Student_StopClass_ViewModel
.
UpdateBy
),
extModel
.
UpdateBy
},
{
nameof
(
RB_Student_StopClass_ViewModel
.
UpdateTime
),
extModel
.
UpdateTime
},
};
flag
=
student_StopClassRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Student_StopClass_ViewModel
.
Id
),
extModel
.
Id
));
}
else
{
var
newId
=
student_StopClassRepository
.
Insert
(
extModel
);
extModel
.
Id
=
newId
;
flag
=
newId
>
0
;
if
(
flag
)
{
var
educationReceipt
=
new
RB_Education_Receipt
()
{
Id
=
0
,
Title
=
"停课申请"
,
ReceiptType
=
Common
.
Enum
.
Finance
.
ReceiptTypeEnum
.
StopClass
,
RelationId
=
newId
,
ClassId
=
extModel
.
ClassId
,
Group_Id
=
extModel
.
Group_Id
,
School_Id
=
extModel
.
School_Id
,
CreateBy
=
extModel
.
CreateBy
,
CreateTime
=
extModel
.
CreateTime
,
UpdateBy
=
extModel
.
UpdateBy
,
UpdateTime
=
extModel
.
UpdateTime
,
VerifyStatus
=
Common
.
Enum
.
EduTask
.
EduTaskRrocessStatus
.
NotAudit
};
flag
=
education_ReceiptRepository
.
SetEducationReceiptRepository
(
educationReceipt
,
out
string
message
);
}
}
return
flag
;
}
}
}
Edu.Repository/EduTask/RB_Education_ReceiptRepository.cs
View file @
4b519014
...
...
@@ -167,6 +167,15 @@ WHERE 1=1
return
false
;
}
}
else
if
(
model
.
ReceiptType
==
Common
.
Enum
.
Finance
.
ReceiptTypeEnum
.
StopClass
)
{
flowModel
=
flowRepository
.
GetFlowRepository
(
Common
.
Config
.
StopClassFlowId
);
if
(
flowModel
==
null
)
{
message
=
"未配置调课流程!"
;
return
false
;
}
}
if
(
flowModel
?.
FlowNodeList
?.
Count
==
0
)
{
message
=
"未配置审核流程!"
;
...
...
Edu.Repository/EduTask/RB_Student_StopClassRepository.cs
0 → 100644
View file @
4b519014
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
Edu.Model.Entity.EduTask
;
using
Edu.Model.ViewModel.EduTask
;
namespace
Edu.Repository.EduTask
{
public
class
RB_Student_StopClassRepository
:
BaseRepository
<
RB_Student_StopClass
>
{
/// <summary>
/// 获取调课计划列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Student_StopClass_ViewModel
>
GetStudentStopClassListRepository
(
RB_Student_StopClass_ViewModel
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*,IFNULL(B.ClassName,'') AS ClassName
FROM RB_Student_StopClass AS A LEFT JOIN rb_class AS B ON A.ClassId=B.ClassId
WHERE 1=1
"
);
if
(
query
!=
null
)
{
if
(!
string
.
IsNullOrEmpty
(
query
.
Q_Student_StopClass_Ids
))
{
builder
.
AppendFormat
(
@" AND A.{0} IN ({1}) "
,
nameof
(
RB_Student_StopClass_ViewModel
.
Id
),
query
.
Q_Student_StopClass_Ids
);
}
}
return
Get
<
RB_Student_StopClass_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
}
}
Edu.WebApi/Controllers/EduTask/StopStudentClassController.cs
0 → 100644
View file @
4b519014
using
Edu.Common.API
;
using
Edu.Common.Enum.Course
;
using
Edu.Common.Plugin
;
using
Edu.Model.ViewModel.Course
;
using
Edu.Model.ViewModel.EduTask
;
using
Edu.Module.Course
;
using
Edu.Module.EduTask
;
using
Edu.WebApi.Filter
;
using
Microsoft.AspNetCore.Cors
;
using
Microsoft.AspNetCore.Mvc
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
namespace
Edu.WebApi.Controllers.EduTask
{
/// <summary>
/// 改变流程相关申请
/// </summary>
[
Route
(
"api/[controller]/[action]"
)]
[
ApiExceptionFilter
]
[
ApiController
]
[
EnableCors
(
"AllowCors"
)]
public
class
StopStudentClassController
:
BaseController
{
/// <summary>
/// 调课处理类对象
/// </summary>
private
readonly
StopStudentClassModule
stopStudentClassModule
=
AOP
.
AOPHelper
.
CreateAOPObject
<
StopStudentClassModule
>();
/// <summary>
/// 班级处理类对象
/// </summary>
private
readonly
ClassModule
classModule
=
AOP
.
AOPHelper
.
CreateAOPObject
<
ClassModule
>();
/// <summary>
/// 新增修改班级调课
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetStudentStopClass
()
{
var
model
=
new
RB_Student_StopClass_ViewModel
()
{
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
ClassId
=
base
.
ParmJObj
.
GetInt
(
"ClassId"
),
CourseId
=
base
.
ParmJObj
.
GetInt
(
"CourseId"
),
OrderGuestId
=
base
.
ParmJObj
.
GetInt
(
"OrderGuestId"
),
Remarks
=
base
.
ParmJObj
.
GetStringValue
(
"Remarks"
)
};
var
classModel
=
classModule
.
GetClassModule
(
model
.
ClassId
);
try
{
string
takeEffectTime
=
base
.
ParmJObj
.
GetStringValue
(
"TakeEffectTime"
);
if
(
string
.
IsNullOrWhiteSpace
(
takeEffectTime
))
{
return
ApiResult
.
Failed
(
"请选择生效日期"
);
}
model
.
TakeEffectTime
=
Convert
.
ToDateTime
(
takeEffectTime
);
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"SetStudentStopClass"
);
}
if
(
model
.
Id
==
0
)
{
model
.
CreateBy
=
base
.
UserInfo
.
Id
;
model
.
CreateTime
=
DateTime
.
Now
;
model
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
model
.
School_Id
=
classModel
.
School_Id
;
}
model
.
UpdateBy
=
base
.
UserInfo
.
Id
;
model
.
UpdateTime
=
DateTime
.
Now
;
bool
flag
=
stopStudentClassModule
.
SetStudentStopClassModule
(
model
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
//public ApiResult TestUpdateClassPlan()
//{
// int id = base.ParmJObj.GetInt("Id");
// var result = changeClassPlanModule.UpdateChangeClassPlan(id);
// return ApiResult.Success("");
//}
}
}
Edu.WebApi/appsettings.json
View file @
4b519014
...
...
@@ -19,7 +19,7 @@
"SettlementRate"
:
"0.60"
,
"SellCommissionFFBL"
:
"0.15"
,
"JwtSecretKey"
:
"@VIITTOREBORN*2018"
,
"MallJwtSecretKey"
:
"@VIITTOREBORN*2018"
,
"MallJwtSecretKey"
:
"@VIITTOREBORN*2018
123
"
,
"JwtExpirTime"
:
86400
,
"IsSendMsg"
:
2
,
"AllowedHosts"
:
"*"
,
...
...
@@ -81,5 +81,7 @@
//值班时间验证日期
"DutyDate"
:
"2021-06-30"
,
//调课流程编号
"ChangeClassFlowId"
:
2
"ChangeClassFlowId"
:
2
,
//停课流程编号
"StopClassFlowId"
:
3
}
\ No newline at end of file
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