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
4a12898d
Commit
4a12898d
authored
Jul 15, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
4b1246d4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
119 additions
and
1 deletion
+119
-1
RB_Order_Change.cs
Edu.Model/Entity/EduTask/RB_Order_Change.cs
+7
-0
Edu.Module.EduTask.csproj
Edu.Module.EduTask/Edu.Module.EduTask.csproj
+1
-0
OrderChangeModule.cs
Edu.Module.EduTask/OrderChangeModule.cs
+48
-1
RB_Order_ChangeRepository.cs
Edu.Repository/EduTask/RB_Order_ChangeRepository.cs
+2
-0
OrderChangeController.cs
Edu.WebApi/Controllers/EduTask/OrderChangeController.cs
+61
-0
No files found.
Edu.Model/Entity/EduTask/RB_Order_Change.cs
View file @
4a12898d
...
...
@@ -20,6 +20,11 @@ namespace Edu.Model.Entity.EduTask
/// </summary>
public
int
SourceOrderId
{
get
;
set
;
}
/// <summary>
/// 学员编号
/// </summary>
public
int
OrderGuestId
{
get
;
set
;
}
/// <summary>
/// 变更类型(1-转班,2-分拆)
/// </summary>
...
...
@@ -74,5 +79,7 @@ namespace Edu.Model.Entity.EduTask
/// 更新时间
/// </summary>
public
DateTime
UpdateTime
{
get
;
set
;
}
}
}
Edu.Module.EduTask/Edu.Module.EduTask.csproj
View file @
4a12898d
...
...
@@ -7,6 +7,7 @@
<ItemGroup>
<ProjectReference Include="..\Edu.Aop\Edu.Aop.csproj" />
<ProjectReference Include="..\Edu.Cache\Edu.Cache.csproj" />
<ProjectReference Include="..\Edu.Module.Course\Edu.Module.Course.csproj" />
<ProjectReference Include="..\Edu.Repository\Edu.Repository.csproj" />
</ItemGroup>
...
...
Edu.Module.EduTask/OrderChangeModule.cs
View file @
4a12898d
using
Edu.AOP.CustomerAttribute
;
using
Edu.Model.Entity.EduTask
;
using
Edu.Model.ViewModel.EduTask
;
using
Edu.Module.Course
;
using
Edu.Repository.Course
;
using
Edu.Repository.EduTask
;
using
System
;
using
System.Collections.Generic
;
...
...
@@ -8,6 +10,9 @@ using System.Text;
namespace
Edu.Module.EduTask
{
/// <summary>
/// 订单转班、分拆处理类
/// </summary>
public
class
OrderChangeModule
{
/// <summary>
...
...
@@ -20,6 +25,26 @@ namespace Edu.Module.EduTask
/// </summary>
private
readonly
RB_Education_ReceiptRepository
education_ReceiptRepository
=
new
RB_Education_ReceiptRepository
();
/// <summary>
/// 订单仓储层对象
/// </summary>
private
readonly
RB_OrderRepository
orderRepository
=
new
RB_OrderRepository
();
/// <summary>
/// 班级仓储层对象
/// </summary>
private
readonly
RB_ClassRepository
classRepository
=
new
RB_ClassRepository
();
/// <summary>
/// 课程仓储层对象
/// </summary>
private
readonly
RB_CourseRepository
courseRepository
=
new
RB_CourseRepository
();
/// <summary>
/// 订单处理类对象
/// </summary>
private
readonly
OrderModule
orderModule
=
new
OrderModule
();
/// <summary>
/// 新增订单转班、分拆
/// </summary>
...
...
@@ -38,7 +63,7 @@ namespace Edu.Module.EduTask
var
educationReceipt
=
new
RB_Education_Receipt
()
{
Id
=
0
,
Title
=
"转班申请"
,
Title
=
"
订单
转班申请"
,
ReceiptType
=
Common
.
Enum
.
Finance
.
ReceiptTypeEnum
.
OrderTransClass
,
RelationId
=
newId
,
OrderId
=
model
.
SourceOrderId
,
...
...
@@ -55,5 +80,27 @@ namespace Edu.Module.EduTask
}
return
flag
;
}
/// <summary>
/// 订单转班处理类方法
/// </summary>
/// <returns></returns>
public
bool
UpdateOrderChangeModule
(
RB_Education_Receipt
receiptModel
)
{
bool
flag
=
false
;
if
(
receiptModel
.
RelationId
>
0
)
{
var
orderChangeModel
=
order_ChangeRepository
.
GetEntity
<
RB_Order_Change_ViewModel
>(
receiptModel
.
RelationId
);
if
(
orderChangeModel
!=
null
&&
orderChangeModel
.
Id
>
0
)
{
var
oldOrderModel
=
orderRepository
.
GetEntity
(
orderChangeModel
.
SourceOrderId
);
var
newClassModel
=
classRepository
.
GetEntity
(
orderChangeModel
.
NewClassId
);
var
newCourseModel
=
courseRepository
.
GetEntity
(
orderChangeModel
.
NewCourseId
);
//orderModule.SetClassOrderCareOfClass
}
}
return
flag
;
}
}
}
Edu.Repository/EduTask/RB_Order_ChangeRepository.cs
View file @
4a12898d
...
...
@@ -42,5 +42,7 @@ WHERE 1=1
}
return
Get
<
RB_Order_Change_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
}
}
Edu.WebApi/Controllers/EduTask/OrderChangeController.cs
0 → 100644
View file @
4a12898d
using
Edu.Common.API
;
using
Edu.Common.Plugin
;
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
;
namespace
Edu.WebApi.Controllers.EduTask
{
/// <summary>
/// 订单转班、分拆控制器
/// </summary>
[
Route
(
"api/[controller]/[action]"
)]
[
ApiExceptionFilter
]
[
ApiController
]
[
EnableCors
(
"AllowCors"
)]
public
class
OrderChangeController
:
BaseController
{
/// <summary>
/// 订单转班、分拆处理类对象
/// </summary>
private
readonly
OrderChangeModule
orderChangeModule
=
AOP
.
AOPHelper
.
CreateAOPObject
<
OrderChangeModule
>();
/// <summary>
/// 班级处理类对象
/// </summary>
private
readonly
ClassModule
classModule
=
AOP
.
AOPHelper
.
CreateAOPObject
<
ClassModule
>();
/// <summary>
/// 新增订单转班申请
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetOrderChange
()
{
var
model
=
new
RB_Order_Change_ViewModel
()
{
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
SourceOrderId
=
base
.
ParmJObj
.
GetInt
(
"SourceOrderId"
),
ChangeType
=
base
.
ParmJObj
.
GetInt
(
"ChangeType"
),
NewClassId
=
base
.
ParmJObj
.
GetInt
(
"NewClassId"
),
NewCourseId
=
base
.
ParmJObj
.
GetInt
(
"NewCourseId"
),
EffectiveDate
=
base
.
ParmJObj
.
GetDateTime
(
"EffectiveDate"
),
Remarks
=
base
.
ParmJObj
.
GetStringValue
(
"Remarks"
),
OrderGuestId
=
base
.
ParmJObj
.
GetInt
(
"OrderGuestId"
),
};
var
classModel
=
classModule
.
GetClassModule
(
model
.
NewClassId
);
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
=
orderChangeModule
.
SetOrderChangeModule
(
model
,
out
string
message
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
(
message
:
message
);
}
}
}
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