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
e2ba7ba3
Commit
e2ba7ba3
authored
Dec 08, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
6c93fdad
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
84 additions
and
7 deletions
+84
-7
RB_Order.cs
Edu.Model/Entity/Course/RB_Order.cs
+4
-0
OrderModule.cs
Edu.Module.Course/OrderModule.cs
+37
-6
OrderController.cs
Edu.WebApi/Controllers/Course/OrderController.cs
+41
-0
ThirdController.cs
Edu.WebApi/Controllers/Third/ThirdController.cs
+2
-1
No files found.
Edu.Model/Entity/Course/RB_Order.cs
View file @
e2ba7ba3
...
...
@@ -56,6 +56,10 @@ namespace Edu.Model.Entity.Course
/// </summary>
public
decimal
DiscountMoney
{
get
;
set
;
}
/// <summary>
/// 平台税金
/// </summary>
public
decimal
PlatformTax
{
get
;
set
;
}
/// <summary>
/// 订单状态 枚举
/// </summary>
public
OrderStateEnum
OrderState
{
get
;
set
;
}
...
...
Edu.Module.Course/OrderModule.cs
View file @
e2ba7ba3
...
...
@@ -334,6 +334,26 @@ namespace Edu.Module.Course
}
}
/// <summary>
/// 获取订单详情
/// </summary>
/// <param name="orderId"></param>
/// <returns></returns>
public
RB_Order_ViewModel
GetClassOrderInfo
(
int
orderId
)
{
return
orderRepository
.
GetEntity
<
RB_Order_ViewModel
>(
orderId
);
}
/// <summary>
/// 获取订单阶梯价格
/// </summary>
/// <param name="orderId"></param>
/// <returns></returns>
public
List
<
RB_Order_StepPrice_ViewModel
>
GetClassOrderSetpPrice
(
int
orderId
)
{
return
order_StepPriceRepository
.
GetList
(
new
RB_Order_StepPrice_ViewModel
()
{
OrderId
=
orderId
});
}
/// <summary>
/// 获取日志列表
/// </summary>
...
...
@@ -1061,18 +1081,29 @@ namespace Edu.Module.Course
/// </summary>
/// <param name="orderId"></param>
/// <param name="income"></param>
/// <param name="platformTax"></param>
/// <param name="refund"></param>
/// <param name="empModel"></param>
/// <returns></returns>
public
bool
UpdateEduOrderIncome
(
int
orderId
,
decimal
income
,
decimal
refund
,
Employee_ViewModel
empModel
)
public
bool
UpdateEduOrderIncome
(
int
orderId
,
decimal
income
,
decimal
platformTax
,
decimal
refund
,
Employee_ViewModel
empModel
)
{
var
orderModel
=
orderRepository
.
GetEntity
(
orderId
);
if
(
orderModel
==
null
)
{
return
false
;
}
if
(
orderModel
.
Income
==
income
&&
orderModel
.
Refund
==
refund
)
{
return
true
;
}
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Order_ViewModel
.
Income
),
income
},
{
nameof
(
RB_Order_ViewModel
.
Refund
),
refund
}
};
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
};
string
LogContent
;
if
(
income
>=
0
)
{
keyValues
.
Add
(
nameof
(
RB_Order_ViewModel
.
Income
),
income
);
keyValues
.
Add
(
nameof
(
RB_Order_ViewModel
.
PlatformTax
),
platformTax
);
LogContent
=
$",更新订单实收【
{
income
}
】平台税金【
{
platformTax
}
】"
;
}
else
if
(
refund
>=
0
)
{
keyValues
.
Add
(
nameof
(
RB_Order_ViewModel
.
Refund
),
refund
);
LogContent
=
$",退款【
{
refund
}
】"
;
}
else
{
return
false
;
}
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Order_ViewModel
.
OrderId
),
...
...
@@ -1090,7 +1121,7 @@ namespace Edu.Module.Course
CreateBy
=
empModel
.
Id
,
CreateTime
=
DateTime
.
Now
,
Group_Id
=
empModel
.
Group_Id
,
LogContent
=
$"【
{
empModel
.
EmployeeName
}
(
{
empModel
.
Id
}
)】单据审核通过
,更新订单实收【
{
income
}
】,退款【
{
refund
}
】
"
,
LogContent
=
$"【
{
empModel
.
EmployeeName
}
(
{
empModel
.
Id
}
)】单据审核通过
{
LogContent
}
"
,
School_Id
=
empModel
.
School_Id
,
SourceId
=
orderId
});
...
...
Edu.WebApi/Controllers/Course/OrderController.cs
View file @
e2ba7ba3
...
...
@@ -273,6 +273,47 @@ namespace Edu.WebApi.Controllers.Course
return
orderModule
.
SetClassOrder
(
demodel
,
userInfo
);
}
/// <summary>
/// 获取订单详情
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetClassOrderInfo
()
{
var
userInfo
=
base
.
UserInfo
;
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
int
OrderId
=
parms
.
GetInt
(
"OrderId"
,
0
);
if
(
OrderId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
var
model
=
orderModule
.
GetClassOrderInfo
(
OrderId
);
if
(
model
==
null
)
{
return
ApiResult
.
Failed
(
"订单不存在"
);
}
var
list
=
orderModule
.
GetClassOrderSetpPrice
(
OrderId
);
return
ApiResult
.
Success
(
""
,
new
{
OrderInfo
=
new
{
model
.
OrderId
,
model
.
GuestNum
,
model
.
Class_Price
,
model
.
Unit_Price
,
model
.
PreferPrice
,
model
.
OrderSource
,
OrderSourceName
=
model
.
OrderSource
.
ToName
(),
model
.
SaleRemark
},
StepPriceList
=
list
.
Select
(
x
=>
new
{
x
.
Id
,
x
.
PersionNum
,
x
.
PersionPrice
})
});
}
/// <summary>
/// 取消订单
/// </summary>
...
...
Edu.WebApi/Controllers/Third/ThirdController.cs
View file @
e2ba7ba3
...
...
@@ -136,6 +136,7 @@ namespace Edu.WebApi.Controllers.Third
int
EmployeeId
=
parms
.
GetInt
(
"EmployeeId"
,
0
);
int
OrderId
=
parms
.
GetInt
(
"OrderId"
,
0
);
decimal
Income
=
parms
.
GetDecimal
(
"Income"
);
decimal
PlatformTax
=
parms
.
GetDecimal
(
"PlatformTax"
);
decimal
Refund
=
parms
.
GetDecimal
(
"Refund"
);
if
(
EmployeeId
<=
0
)
{
...
...
@@ -151,7 +152,7 @@ namespace Edu.WebApi.Controllers.Third
return
ApiResult
.
ParamIsNull
(
message
:
"当前员工编号不存在!"
);
}
bool
flag
=
orderModule
.
UpdateEduOrderIncome
(
OrderId
,
Income
,
Refund
,
empModel
);
bool
flag
=
orderModule
.
UpdateEduOrderIncome
(
OrderId
,
Income
,
PlatformTax
,
Refund
,
empModel
);
if
(
flag
)
{
return
ApiResult
.
Success
();
...
...
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