Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
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
黄奎
mall.oytour.com
Commits
fedef7b8
Commit
fedef7b8
authored
Sep 21, 2020
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'sdzq-ld' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
into sdzq
parents
73606fb2
dffbc1a7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
9 deletions
+24
-9
GuideCarModule.cs
Mall.Module.Product/GuideCarModule.cs
+9
-4
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+15
-5
No files found.
Mall.Module.Product/GuideCarModule.cs
View file @
fedef7b8
...
...
@@ -1918,6 +1918,7 @@ namespace Mall.Module.Product
bool
address_enable
=
true
;
//地址Ok
bool
date_enable
=
true
;
//日期ok
string
date_remark
=
""
;
//日期无法下单备注
int
seat_number
=
0
;
//座位数量
List
<
object
>
goods_list
=
new
List
<
object
>();
var
guidebaseModel
=
guideCar_BaseRepository
.
GetList
(
new
RB_GuideCar_Base_Extend
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
}).
FirstOrDefault
();
if
(
demodel
.
DetailList
.
Any
())
...
...
@@ -2007,11 +2008,15 @@ namespace Mall.Module.Product
//初始化值
foreach
(
var
item
in
demodel
.
DetailList
)
{
seat_number
=
item
.
Number
??
0
;
var
gmodel
=
gList
.
Where
(
x
=>
x
.
Id
==
item
.
GoodsId
).
FirstOrDefault
();
if
(
gmodel
==
null
||
gmodel
.
GoodsStatus
!=
1
||
gmodel
.
GoodsClassify
!=
1
)
{
continue
;
}
if
(
gmodel
.
CarType
!=
GuideCarGoodsTypeEnum
.
Line
)
{
item
.
Number
=
1
;
//s设置成一个人表示一口价 保险费算人头数
}
var
categoryList
=
clist
.
Where
(
x
=>
x
.
GoodsId
==
item
.
GoodsId
).
ToList
();
#
region
图片
...
...
@@ -2404,7 +2409,7 @@ namespace Mall.Module.Product
date_remark
=
"出发日期不在可预定日期内,请重新选择出发日期"
;
}
var
targetModel
=
targetList
.
FirstOrDefault
();
if
(
targetModel
==
null
||
targetModel
.
ReserveNum
+
(
item
.
Number
??
0
)
>
(
gmodel
.
RideNum
??
0
))
if
(
targetModel
==
null
||
targetModel
.
ReserveNum
+
seat_number
>
(
gmodel
.
RideNum
??
0
))
{
date_enable
=
false
;
date_remark
=
"剩余座位数不足,请重新选择出发日期"
;
...
...
@@ -2427,14 +2432,14 @@ namespace Mall.Module.Product
//保险
decimal
qInsuranceMoney
=
(
guidebaseModel
?.
SalePrice
??
0
);
decimal
qInsuranceCostMoney
=
(
guidebaseModel
?.
CostPrice
??
0
);
InsuranceMoney
+=
qInsuranceMoney
*
(
item
.
Number
??
0
)
;
InsuranceMoney
+=
qInsuranceMoney
*
seat_number
;
#
endregion
goods_list
.
Add
(
new
{
id
=
gmodel
.
Id
,
name
=
gmodel
.
Name
,
categoryIdList
=
item
.
CategoryIdList
,
num
=
item
.
N
umber
,
num
=
seat_n
umber
,
surplus_num
=
(
gmodel
.
RideNum
??
0
)
-
(
targetModel
?.
ReserveNum
??
0
),
forehead_integral
=
gmodel
.
PointsDeduction
,
forehead_integral_type
=
gmodel
.
PointsDeductionType
,
...
...
@@ -2468,7 +2473,7 @@ namespace Mall.Module.Product
id
=
x
.
Id
,
pic_url
=
x
.
Path
}),
number
=
item
.
N
umber
,
number
=
seat_n
umber
,
goods_share_level
=
DistributionCommissionList
.
Where
(
x
=>
x
.
GoodsId
==
gmodel
.
Id
).
Select
(
x
=>
new
{
share_commission_first
=
x
.
OneCommission
,
...
...
Mall.Module.Product/OrderModule.cs
View file @
fedef7b8
...
...
@@ -3842,6 +3842,7 @@ namespace Mall.Module.Product
List
<
RB_Goods_CouponModel
>
GoodsCouponList
=
new
List
<
RB_Goods_CouponModel
>();
//商品优惠卷 价格(每个商品优惠的价格)
decimal
CouponsMoney
=
0
;
//优惠卷验证
decimal
InsuranceMoney
=
0
;
//保险金额
int
seat_number
=
0
;
//座位数量
#
region
优惠卷初始化
List
<
RB_Member_DiscountCoupon_Extend
>
cList
=
new
List
<
RB_Member_DiscountCoupon_Extend
>();
List
<
Model
.
Extend
.
MarketingCenter
.
RB_DiscountCoupon_Extend
>
dcList
=
new
List
<
Model
.
Extend
.
MarketingCenter
.
RB_DiscountCoupon_Extend
>();
...
...
@@ -3908,6 +3909,7 @@ namespace Mall.Module.Product
foreach
(
var
item
in
demodel
.
DetailList
)
{
seat_number
=
item
.
Number
??
0
;
var
gmodel
=
gList
.
Where
(
x
=>
x
.
Id
==
item
.
GoodsId
).
FirstOrDefault
();
if
(
gmodel
==
null
||
gmodel
.
GoodsStatus
!=
1
||
gmodel
.
GoodsClassify
!=
1
)
{
...
...
@@ -3917,6 +3919,9 @@ namespace Mall.Module.Product
{
return
ApiResult
.
Failed
(
"商品服务类型不一致"
);
}
if
(
gmodel
.
CarType
!=
GuideCarGoodsTypeEnum
.
Line
)
{
item
.
Number
=
1
;
//设置为单人 用于计算一口价
}
int
uday
=
Convert
.
ToInt32
((
gmodel
.
UseDay
??
0
).
Equals
(
Convert
.
ToDecimal
(
0.5
))
?
1
:
(
gmodel
.
UseDay
??
0
));
if
(
demodel
.
TripSTime
.
Value
.
AddDays
(
uday
-
1
).
ToString
(
"yyyy-MM-dd"
)
!=
demodel
.
TripETime
.
Value
.
ToString
(
"yyyy-MM-dd"
))
{
...
...
@@ -3952,7 +3957,7 @@ namespace Mall.Module.Product
if
(
gmodel
.
CarType
==
GuideCarGoodsTypeEnum
.
Line
&&
gmodel
.
IsSpell
==
1
)
{
var
targetModel
=
targetList
.
FirstOrDefault
();
if
((
gmodel
.
RideNum
??
0
)
-
(
targetModel
.
ReserveNum
)
<
(
item
.
Number
??
0
)
)
if
((
gmodel
.
RideNum
??
0
)
-
(
targetModel
.
ReserveNum
)
<
seat_number
)
{
return
ApiResult
.
Failed
(
"商品剩余座位数不足,剩余:"
+
((
gmodel
.
RideNum
??
0
)
-
(
targetModel
.
ReserveNum
)));
}
...
...
@@ -3966,7 +3971,7 @@ namespace Mall.Module.Product
return
ApiResult
.
Failed
(
qitem
.
Date
.
Value
.
ToString
(
"yyyy-MM-dd"
)
+
"已被预定,无法下单"
);
}
//验证座位数量
if
((
gmodel
.
RideNum
??
0
)
-
(
qitem
.
ReserveNum
)
<
(
item
.
Number
??
0
)
)
if
((
gmodel
.
RideNum
??
0
)
-
(
qitem
.
ReserveNum
)
<
seat_number
)
{
return
ApiResult
.
Failed
(
qitem
.
Date
.
Value
.
ToString
(
"yyyy-MM-dd"
)
+
"剩余座位数不足,剩余:"
+
((
gmodel
.
RideNum
??
0
)
-
(
qitem
.
ReserveNum
)));
}
...
...
@@ -4334,8 +4339,8 @@ namespace Mall.Module.Product
}
item
.
FreightMoney
=
0
;
item
.
InsuranceMoney
=
(
guidebaseModel
?.
SalePrice
??
0
)
*
(
item
.
Number
??
0
)
;
item
.
InsuranceCostMoney
=
(
guidebaseModel
?.
CostPrice
??
0
)
*
(
item
.
Number
??
0
)
;
item
.
InsuranceMoney
=
(
guidebaseModel
?.
SalePrice
??
0
)
*
seat_number
;
item
.
InsuranceCostMoney
=
(
guidebaseModel
?.
CostPrice
??
0
)
*
seat_number
;
InsuranceMoney
+=
(
item
.
InsuranceMoney
??
0
);
item
.
CommentGiveIntegral
=
0
;
...
...
@@ -4347,9 +4352,14 @@ namespace Mall.Module.Product
}
else
{
item
.
CommentGiveIntegral
=
Convert
.
ToInt32
((
gmodel
.
IntegralComment
??
0
)
*
(
item
.
Number
??
0
)
);
item
.
CommentGiveIntegral
=
Convert
.
ToInt32
((
gmodel
.
IntegralComment
??
0
));
}
}
if
(
gmodel
.
CarType
!=
GuideCarGoodsTypeEnum
.
Line
)
{
item
.
Number
=
seat_number
;
}
}
}
if
(
CouponsMoney
!=
demodel
.
CouponMoney
)
...
...
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