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
6e3d7884
Commit
6e3d7884
authored
Mar 15, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
c9ac727d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
88 additions
and
2 deletions
+88
-2
RB_Course_Offer.cs
Edu.Model/Entity/Course/RB_Course_Offer.cs
+5
-0
RB_Course_OfferDetails_ViewModel.cs
...odel/ViewModel/Course/RB_Course_OfferDetails_ViewModel.cs
+15
-0
CourseModule.cs
Edu.Module.Course/CourseModule.cs
+41
-1
RB_Course_JobDetailsRepository.cs
Edu.Repository/Course/RB_Course_JobDetailsRepository.cs
+12
-0
ClassController.cs
Edu.WebApi/Controllers/Course/ClassController.cs
+4
-1
CourseOfferController.cs
Edu.WebApi/Controllers/Course/CourseOfferController.cs
+11
-0
No files found.
Edu.Model/Entity/Course/RB_Course_Offer.cs
View file @
6e3d7884
...
@@ -121,5 +121,10 @@ namespace Edu.Model.Entity.Course
...
@@ -121,5 +121,10 @@ namespace Edu.Model.Entity.Course
/// 客户人数
/// 客户人数
/// </summary>
/// </summary>
public
int
JoinNum
{
get
;
set
;
}
public
int
JoinNum
{
get
;
set
;
}
/// <summary>
/// 订单编号
/// </summary>
public
int
OrderId
{
get
;
set
;
}
}
}
}
}
Edu.Model/ViewModel/Course/RB_Course_OfferDetails_ViewModel.cs
View file @
6e3d7884
...
@@ -29,5 +29,20 @@ namespace Edu.Model.ViewModel.Course
...
@@ -29,5 +29,20 @@ namespace Edu.Model.ViewModel.Course
/// 课程源数据
/// 课程源数据
/// </summary>
/// </summary>
public
object
SourceData
{
get
;
set
;
}
public
object
SourceData
{
get
;
set
;
}
/// <summary>
/// 班级编号【转订单使用】
/// </summary>
public
int
ClassId
{
get
;
set
;
}
/// <summary>
/// 班级名称【转订单使用】
/// </summary>
public
string
ClassName
{
get
;
set
;
}
/// <summary>
/// 可选班级列表【转订单使用】
/// </summary>
public
List
<
object
>
ClassList
{
get
;
set
;
}
}
}
}
}
Edu.Module.Course/CourseModule.cs
View file @
6e3d7884
...
@@ -204,7 +204,6 @@ namespace Edu.Module.Course
...
@@ -204,7 +204,6 @@ namespace Edu.Module.Course
model
.
RenewOgPrice
=
0
;
model
.
RenewOgPrice
=
0
;
model
.
RenewSlPrice
=
0
;
model
.
RenewSlPrice
=
0
;
}
}
if
(
model
.
CourseId
>
0
)
if
(
model
.
CourseId
>
0
)
{
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
...
@@ -861,6 +860,47 @@ namespace Edu.Module.Course
...
@@ -861,6 +860,47 @@ namespace Edu.Module.Course
model
.
JobId
=
newId
;
model
.
JobId
=
newId
;
flag
=
newId
>
0
;
flag
=
newId
>
0
;
}
}
var
oldJobDetailsList
=
course_JobDetailsRepository
.
GetCourseJobDetailsListRepository
(
new
RB_Course_JobDetails_ViewModel
()
{
JobId
=
model
.
JobId
});
if
(
oldJobDetailsList
==
null
||
(
oldJobDetailsList
!=
null
&&
oldJobDetailsList
.
Count
==
0
))
{
if
(
model
.
JobDetailsList
!=
null
&&
model
.
JobDetailsList
.
Count
>
0
)
{
foreach
(
var
item
in
model
.
JobDetailsList
)
{
item
.
JobId
=
model
.
JobId
;
flag
=
course_JobDetailsRepository
.
Insert
(
item
)
>
0
;
}
}
else
{
//现在没有详情列表【直接删除以前的详情列表】
if
(
model
.
JobDetailsList
==
null
||
(
model
.
JobDetailsList
!=
null
&&
model
.
JobDetailsList
.
Count
==
0
))
{
course_JobDetailsRepository
.
RemoveCourseJobDetailsRepository
(
model
.
JobId
);
}
//找出差异的数据
var
deleteList
=
oldJobDetailsList
.
Where
(
qitem
=>
!
model
.
JobDetailsList
.
Any
(
oldItem
=>
qitem
.
DetailsId
==
oldItem
.
DetailsId
)).
ToList
();
foreach
(
var
dItem
in
deleteList
)
{
if
(
dItem
.
DetailsId
>
0
)
{
course_JobDetailsRepository
.
Delete
(
dItem
.
DetailsId
);
}
}
foreach
(
var
dItem
in
model
.
JobDetailsList
)
{
dItem
.
JobId
=
model
.
JobId
;
if
(
dItem
.
DetailsId
==
0
)
{
course_JobDetailsRepository
.
Insert
(
dItem
);
}
else
{
course_JobDetailsRepository
.
Update
(
dItem
);
}
}
}
}
return
flag
;
return
flag
;
}
}
...
...
Edu.Repository/Course/RB_Course_JobDetailsRepository.cs
View file @
6e3d7884
...
@@ -39,5 +39,17 @@ WHERE 1=1
...
@@ -39,5 +39,17 @@ WHERE 1=1
}
}
return
Get
<
RB_Course_JobDetails_ViewModel
>(
builder
.
ToString
()).
ToList
();
return
Get
<
RB_Course_JobDetails_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
}
/// <summary>
/// 根据作业编号删除作业
/// </summary>
/// <param name="JobId"></param>
/// <returns></returns>
public
bool
RemoveCourseJobDetailsRepository
(
int
JobId
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@" DELETE FROM RB_Course_JobDetails WHERE JobId={0} "
,
JobId
);
return
base
.
Execute
(
builder
.
ToString
())
>
0
;
}
}
}
}
}
Edu.WebApi/Controllers/Course/ClassController.cs
View file @
6e3d7884
...
@@ -86,7 +86,10 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -86,7 +86,10 @@ namespace Edu.WebApi.Controllers.Course
[
HttpPost
]
[
HttpPost
]
public
ApiResult
GetClassList
()
public
ApiResult
GetClassList
()
{
{
var
query
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
RB_Class_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
var
query
=
new
RB_Class_ViewModel
()
{
CouseId
=
base
.
ParmJObj
.
GetInt
(
"CourseId"
)
};
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
query
.
School_Id
=
base
.
UserInfo
.
School_Id
;
query
.
School_Id
=
base
.
UserInfo
.
School_Id
;
var
list
=
classModule
.
GetClassListModule
(
query
);
var
list
=
classModule
.
GetClassListModule
(
query
);
...
...
Edu.WebApi/Controllers/Course/CourseOfferController.cs
View file @
6e3d7884
...
@@ -247,5 +247,16 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -247,5 +247,16 @@ namespace Edu.WebApi.Controllers.Course
return
ApiResult
.
Success
(
data
:
data
);
return
ApiResult
.
Success
(
data
:
data
);
}
}
#
endregion
#
endregion
/// <summary>
/// 报价单转订单
/// </summary>
/// <returns></returns>
public
ApiResult
OfferTransOrder
()
{
var
offerId
=
base
.
ParmJObj
.
GetInt
(
"OfferId"
,
0
);
return
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