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
f4f5718b
Commit
f4f5718b
authored
Mar 15, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报价单 创建订单
parent
3bad3bbb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
80 additions
and
7 deletions
+80
-7
RB_Order.cs
Edu.Model/Entity/Course/RB_Order.cs
+5
-0
CourseOfferModule.cs
Edu.Module.Course/CourseOfferModule.cs
+74
-6
RB_AccountRepository.cs
Edu.Repository/User/RB_AccountRepository.cs
+1
-1
No files found.
Edu.Model/Entity/Course/RB_Order.cs
View file @
f4f5718b
...
...
@@ -148,5 +148,10 @@ namespace Edu.Model.Entity.Course
/// 续费订单号
/// </summary>
public
int
RenewOrderId
{
get
;
set
;
}
/// <summary>
/// 报价单id
/// </summary>
public
int
OfferId
{
get
;
set
;
}
}
}
Edu.Module.Course/CourseOfferModule.cs
View file @
f4f5718b
using
Edu.AOP.CustomerAttribute
;
using
Edu.Common.Plugin
;
using
Edu.Model.ViewModel.Course
;
using
Edu.Repository.Course
;
using
Edu.Repository.Log
;
using
Edu.Repository.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
VT.FW.DB
;
...
...
@@ -35,6 +38,10 @@ namespace Edu.Module.Course
/// 用户日志
/// </summary>
private
readonly
RB_User_ChangeLogRepository
changeLogRepository
=
new
RB_User_ChangeLogRepository
();
/// <summary>
/// 账号
/// </summary>
private
readonly
RB_AccountRepository
accountRepository
=
new
RB_AccountRepository
();
/// 课程处理类对象
/// </summary>
...
...
@@ -247,14 +254,75 @@ namespace Edu.Module.Course
/// <param name="offerId"></param>
/// <param name="detailList"></param>
/// <returns></returns>
public
bool
SetOfferCreateOrder
(
int
offerId
,
List
<
RB_Course_OfferDetails_ViewModel
>
detailList
)
{
public
bool
SetOfferCreateOrder
(
int
offerId
,
List
<
RB_Course_OfferDetails_ViewModel
>
detailList
,
int
createBy
)
{
var
emModel
=
accountRepository
.
GetEmployeeInfo
(
createBy
);
foreach
(
var
item
in
detailList
)
{
//decimal uPrice = item.OriginalPrice/item
int
OrderId
=
orderRepository
.
Insert
(
new
Model
.
Entity
.
Course
.
RB_Order
()
try
{
decimal
uPrice
=
item
.
OriginalPrice
/
item
.
JoinNum
;
int
OrderId
=
orderRepository
.
Insert
(
new
Model
.
Entity
.
Course
.
RB_Order
()
{
ClassId
=
item
.
ClassId
,
Class_Price
=
uPrice
,
CommissionMoney
=
-
1
,
CreateBy
=
createBy
,
CreateTime
=
DateTime
.
Now
,
Dept_Id
=
emModel
?.
Dept_Id
??
0
,
School_Id
=
emModel
?.
School_Id
??
0
,
Group_Id
=
emModel
?.
Group_Id
??
0
,
DirectorRemark
=
""
,
DiscountMoney
=
item
.
DiscountPrice
,
EnterID
=
createBy
,
ExtraDeductMoney
=
0
,
ExtraRewardMoney
=
0
,
GuestNum
=
item
.
JoinNum
,
Income
=
0
,
IsCommissionGive
=
0
,
OrderForm
=
Common
.
Enum
.
Course
.
OrderFormEnum
.
Computer
,
OrderId
=
0
,
OrderSource
=
Common
.
Enum
.
Course
.
OrderSourceEnum
.
Employee
,
OrderState
=
Common
.
Enum
.
Course
.
OrderStateEnum
.
Normal
,
PlatformTax
=
0
,
PreferPrice
=
item
.
OriginalPrice
,
RectorRemark
=
""
,
Refund
=
0
,
RenewOrderId
=
0
,
SaleRemark
=
item
.
Remark
,
TeacherRemark
=
""
,
TradeWay
=
Common
.
Enum
.
Course
.
TradeWayEnum
.
OnLine
,
Unit_Price
=
uPrice
,
UpdateBy
=
createBy
,
UpdateTime
=
DateTime
.
Now
,
OfferId
=
offerId
});
if
(
OrderId
>
0
)
{
order_RemarkRepository
.
Insert
(
new
Model
.
Entity
.
Course
.
RB_Order_Remark
()
{
Id
=
0
,
OrderId
=
OrderId
,
Type
=
1
,
Content
=
item
.
Remark
,
CreateBy
=
createBy
,
CreateTime
=
DateTime
.
Now
});
changeLogRepository
.
Insert
(
new
Model
.
Entity
.
Log
.
RB_User_ChangeLog
()
{
Id
=
0
,
AccountType
=
emModel
?.
AccountType
??
0
,
Type
=
2
,
SourceId
=
OrderId
,
LogContent
=
"由报价单自动创建订单"
,
School_Id
=
emModel
?.
School_Id
??
0
,
Group_Id
=
emModel
?.
Group_Id
??
0
,
CreateBy
=
createBy
,
CreateTime
=
DateTime
.
Now
});
}
}
catch
(
Exception
ex
)
{
ClassId
=
item
.
ClassId
,
Class_Price
=
1
});
LogHelper
.
Write
(
ex
,
"报价单创建订单失败,offerId:"
+
offerId
+
",DetailsId:"
+
item
.
DetailsId
+
",ClassId:"
+
item
.
ClassId
);
}
}
return
true
;
}
...
...
Edu.Repository/User/RB_AccountRepository.cs
View file @
f4f5718b
...
...
@@ -488,7 +488,7 @@ WHERE 1=1 {4}
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.Id,A.Account,A.Group_Id,A.School_Id,A.EmployeeName,A.UserIcon
SELECT A.Id,A.Account,A.Group_Id,A.School_Id,A.EmployeeName,A.UserIcon
,A.AccountType
,IFNULL(G.GroupName,'') AS GroupName,IFNULL(s.SName,'') AS SchoolName
,IFNULL(d.DeptId,0) AS Dept_Id,IFNULL(d.DeptName,'') AS DeptName,IFNULL(p.PostId,0) AS Post_Id, IFNULL(p.PostName,'') AS PostName
FROM
...
...
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