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
700413a1
Commit
700413a1
authored
May 14, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
cfbfd086
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
22 deletions
+32
-22
OrderModule.cs
Edu.Module.Course/OrderModule.cs
+30
-21
OrderController.cs
Edu.WebApi/Controllers/Course/OrderController.cs
+2
-1
No files found.
Edu.Module.Course/OrderModule.cs
View file @
700413a1
...
...
@@ -242,7 +242,7 @@ namespace Edu.Module.Course
/// <param name="userInfo"></param>
/// <returns></returns>
[
TransactionCallHandler
]
public
bool
SetClassOrder
(
RB_Order_ViewModel
demodel
,
UserInfo
userInfo
,
out
string
message
)
public
bool
SetClassOrder
(
RB_Order_ViewModel
demodel
,
UserInfo
userInfo
,
bool
isEditOrder
,
out
string
message
)
{
bool
flag
=
false
;
message
=
""
;
...
...
@@ -368,18 +368,23 @@ namespace Edu.Module.Course
MinPrice
=
spList
.
Where
(
x
=>
demodel
.
GuestNum
>=
x
.
PersionNum
).
OrderByDescending
(
x
=>
x
.
PersionNum
).
FirstOrDefault
().
PersionPrice
;
}
}
if
(
demodel
.
Unit_Price
<
MinPrice
)
//没有总经理修改订单权限
if
(!
isEditOrder
)
{
flag
=
false
;
message
=
"成交单价不能小于最低价格"
;
return
flag
;
}
if
(
demodel
.
PreferPrice
!=
(
demodel
.
Unit_Price
*
demodel
.
GuestNum
-
demodel
.
LessPrice
))
{
flag
=
false
;
message
=
"应收总额不正确"
;
return
flag
;
if
(
demodel
.
Unit_Price
<
MinPrice
)
{
flag
=
false
;
message
=
"成交单价不能小于最低价格"
;
return
flag
;
}
if
(
demodel
.
PreferPrice
!=
(
demodel
.
Unit_Price
*
demodel
.
GuestNum
-
demodel
.
LessPrice
))
{
flag
=
false
;
message
=
"应收总额不正确"
;
return
flag
;
}
}
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Order_ViewModel
.
GuestNum
),
demodel
.
GuestNum
},
...
...
@@ -494,18 +499,22 @@ namespace Edu.Module.Course
MinPrice
=
spList
.
Where
(
x
=>
demodel
.
GuestNum
>=
x
.
PersionNum
).
OrderByDescending
(
x
=>
x
.
PersionNum
).
FirstOrDefault
().
PersionPrice
;
}
}
if
(
demodel
.
Unit_Price
<
MinPrice
)
if
(
!
isEditOrder
)
{
flag
=
false
;
message
=
"成交单价不能小于最低价格"
;
return
flag
;
}
if
(
demodel
.
PreferPrice
!=
(
demodel
.
Unit_Price
*
demodel
.
GuestNum
-
demodel
.
LessPrice
))
{
flag
=
false
;
message
=
"应收总额不正确"
;
return
flag
;
if
(
demodel
.
Unit_Price
<
MinPrice
)
{
flag
=
false
;
message
=
"成交单价不能小于最低价格"
;
return
flag
;
}
if
(
demodel
.
PreferPrice
!=
(
demodel
.
Unit_Price
*
demodel
.
GuestNum
-
demodel
.
LessPrice
))
{
flag
=
false
;
message
=
"应收总额不正确"
;
return
flag
;
}
}
int
OrderId
=
orderRepository
.
Insert
(
demodel
);
flag
=
OrderId
>
0
;
if
(
flag
)
...
...
Edu.WebApi/Controllers/Course/OrderController.cs
View file @
700413a1
...
...
@@ -384,9 +384,10 @@ namespace Edu.WebApi.Controllers.Course
var
flag
=
false
;
string
message
=
""
;
if
(
demodel
.
OrderType
==
OrderTypeEnum
.
CourseOrder
)
{
flag
=
orderModule
.
SetClassOrder
(
demodel
,
userInfo
,
out
message
);
flag
=
orderModule
.
SetClassOrder
(
demodel
,
userInfo
,
base
.
CheckUserActionAuth
(
"Edit_Order"
),
out
message
);
}
else
{
...
...
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