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
1d959cd9
Commit
1d959cd9
authored
Mar 15, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
80336bb5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
18 deletions
+54
-18
CustomerStatusEnum.cs
Edu.Common/Enum/Sale/CustomerStatusEnum.cs
+0
-3
RB_Course_Offer.cs
Edu.Model/Entity/Course/RB_Course_Offer.cs
+1
-1
RB_Course_Offer_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Course_Offer_ViewModel.cs
+17
-1
CourseOfferModule.cs
Edu.Module.Course/CourseOfferModule.cs
+20
-12
ClassController.cs
Edu.WebApi/Controllers/Course/ClassController.cs
+15
-1
CourseOfferController.cs
Edu.WebApi/Controllers/Course/CourseOfferController.cs
+1
-0
No files found.
Edu.Common/Enum/Sale/CustomerStatusEnum.cs
View file @
1d959cd9
using
Edu.Common.Plugin
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Common.Enum.Sale
{
...
...
Edu.Model/Entity/Course/RB_Course_Offer.cs
View file @
1d959cd9
...
...
@@ -125,6 +125,6 @@ namespace Edu.Model.Entity.Course
/// <summary>
/// 订单编号
/// </summary>
public
int
OrderId
{
get
;
set
;
}
public
string
OrderId
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Course/RB_Course_Offer_ViewModel.cs
View file @
1d959cd9
...
...
@@ -8,7 +8,7 @@ namespace Edu.Model.ViewModel.Course
/// <summary>
/// 课程报价单视图实体
/// </summary>
public
class
RB_Course_Offer_ViewModel
:
RB_Course_Offer
public
class
RB_Course_Offer_ViewModel
:
RB_Course_Offer
{
/// <summary>
/// 创建人
...
...
@@ -75,5 +75,21 @@ namespace Edu.Model.ViewModel.Course
/// 是否获取报价单详情
/// </summary>
public
int
IsGetDetails
{
get
;
set
;
}
/// <summary>
/// 订单Id列表
/// </summary>
public
List
<
int
>
OrderIdList
{
get
{
List
<
int
>
list
=
new
List
<
int
>();
if
(!
string
.
IsNullOrEmpty
(
this
.
OrderId
))
{
list
=
Common
.
ConvertHelper
.
StringToList
(
this
.
OrderId
);
}
return
list
;
}
}
}
}
Edu.Module.Course/CourseOfferModule.cs
View file @
1d959cd9
...
...
@@ -257,14 +257,16 @@ namespace Edu.Module.Course
[
TransactionCallHandler
]
public
virtual
bool
SetOfferCreateOrder
(
int
offerId
,
List
<
RB_Course_OfferDetails_ViewModel
>
detailList
)
{
bool
flag
=
false
;
var
offerModel
=
GetCourseOfferModule
(
offerId
);
var
emModel
=
accountRepository
.
GetEmployeeInfo
(
offerModel
.
CreateBy
);
string
orderIds
=
""
;
foreach
(
var
item
in
detailList
)
{
try
{
decimal
uPrice
=
item
.
OriginalPrice
/
item
.
JoinNum
;
int
OrderId
=
orderRepository
.
Insert
(
new
Model
.
Entity
.
Course
.
RB_Order
()
var
orderModel
=
new
Model
.
Entity
.
Course
.
RB_Order
()
{
ClassId
=
item
.
ClassId
,
Class_Price
=
uPrice
,
...
...
@@ -298,9 +300,13 @@ namespace Edu.Module.Course
UpdateBy
=
offerModel
.
CreateBy
,
UpdateTime
=
DateTime
.
Now
,
OfferId
=
offerId
});
if
(
OrderId
>
0
)
};
int
OrderId
=
orderRepository
.
Insert
(
orderModel
);
orderModel
.
OrderId
=
OrderId
;
flag
=
OrderId
>
0
;
if
(
flag
)
{
orderIds
+=
","
+
OrderId
;
if
(!
string
.
IsNullOrEmpty
(
item
.
Remark
))
{
order_RemarkRepository
.
Insert
(
new
Model
.
Entity
.
Course
.
RB_Order_Remark
()
...
...
@@ -325,14 +331,6 @@ namespace Edu.Module.Course
CreateBy
=
offerModel
.
CreateBy
,
CreateTime
=
DateTime
.
Now
});
//更新报价单订单编号
Dictionary
<
string
,
object
>
offerFileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Course_Offer_ViewModel
.
OrderId
),
OrderId
},
{
nameof
(
RB_Course_Offer_ViewModel
.
CustomerStatus
),
4
},
};
course_OfferRepository
.
Update
(
offerFileds
,
new
WhereHelper
(
nameof
(
RB_Course_Offer_ViewModel
.
Id
),
offerId
));
}
}
catch
(
Exception
ex
)
...
...
@@ -340,7 +338,17 @@ namespace Edu.Module.Course
LogHelper
.
Write
(
ex
,
"报价单创建订单失败,offerId:"
+
offerId
+
",DetailsId:"
+
item
.
DetailsId
+
",ClassId:"
+
item
.
ClassId
);
}
}
return
true
;
if
(!
string
.
IsNullOrEmpty
(
orderIds
))
{
//更新报价单订单编号
Dictionary
<
string
,
object
>
offerFileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Course_Offer_ViewModel
.
OrderId
),
orderIds
.
Substring
(
1
)
},
{
nameof
(
RB_Course_Offer_ViewModel
.
CustomerStatus
),
4
},
};
flag
=
course_OfferRepository
.
Update
(
offerFileds
,
new
WhereHelper
(
nameof
(
RB_Course_Offer_ViewModel
.
Id
),
offerId
));
}
return
flag
;
}
#
endregion
...
...
Edu.WebApi/Controllers/Course/ClassController.cs
View file @
1d959cd9
...
...
@@ -86,13 +86,27 @@ namespace Edu.WebApi.Controllers.Course
[
HttpPost
]
public
ApiResult
GetClassList
()
{
//是够添加默选项
int
IsAddDefault
=
base
.
ParmJObj
.
GetInt
(
"IsAddDefault"
);
var
query
=
new
RB_Class_ViewModel
()
{
CouseId
=
base
.
ParmJObj
.
GetInt
(
"CourseId"
)
CouseId
=
base
.
ParmJObj
.
GetInt
(
"CourseId"
)
,
};
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
query
.
School_Id
=
base
.
UserInfo
.
School_Id
;
var
list
=
classModule
.
GetClassListModule
(
query
);
if
(
list
==
null
)
{
list
=
new
List
<
RB_Class_ViewModel
>();
}
if
(
IsAddDefault
==
1
)
{
list
.
Insert
(
0
,
new
RB_Class_ViewModel
()
{
ClassId
=
0
,
ClassName
=
"请选择"
});
}
return
ApiResult
.
Success
(
data
:
list
);
}
...
...
Edu.WebApi/Controllers/Course/CourseOfferController.cs
View file @
1d959cd9
...
...
@@ -93,6 +93,7 @@ namespace Edu.WebApi.Controllers.Course
qitem
.
CustomerName
,
qitem
.
CustomerTel
,
qitem
.
JoinNum
,
qitem
.
OrderIdList
,
});
return
ApiResult
.
Success
(
data
:
pageModel
);
}
...
...
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