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
c47fd47c
Commit
c47fd47c
authored
Sep 11, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单取消调整
parent
9cbc38ea
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
105 additions
and
29 deletions
+105
-29
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+101
-28
AppletOrderController.cs
Mall.WebApi/Controllers/Product/AppletOrderController.cs
+2
-1
OrderController.cs
Mall.WebApi/Controllers/Product/OrderController.cs
+2
-0
No files found.
Mall.Module.Product/OrderModule.cs
View file @
c47fd47c
...
...
@@ -5875,7 +5875,8 @@ namespace Mall.Module.Product
TripSTime = item.TripSTime,
UseDay = item.UseDay,
InsuranceMoney = item.InsuranceMoney,
InsuranceCostMoney
=
item
.
InsuranceCostMoney
InsuranceCostMoney = item.InsuranceCostMoney,
InsuranceFinanceId = 0
}, trans);
item.Id = detailId;
if (detailId > 0 && SatisfiedGoodsList.Any())
...
...
@@ -5900,7 +5901,8 @@ namespace Mall.Module.Product
}, trans);
}
}
if (IsSDGoods == false)
{
//更新商品数量
Dictionary<string, object> keyValues = new Dictionary<string, object>() {
{ nameof(RB_Goods.InventoryNum),item.InventoryNum-(item.Number??0)}
...
...
@@ -5967,6 +5969,7 @@ namespace Mall.Module.Product
TenantId = demodel.TenantId
}, trans);
}
}
#region 更新司导商品预约时间
if (IsSDGoods) {
...
...
@@ -8690,6 +8693,74 @@ namespace Mall.Module.Product
};
goods_SpecificationPriceRepository.Update(keyValues2, wheres2, trans);
}
if (item.OrderType == OrderTypeEnum.SDGoods)
{
//更新商品可预定日期
var tdlist = goods_TargetDateRepository.GetList(new RB_Goods_TargetDate_Extend() { GoodsId = item.GoodsId ?? 0, StartTime = item.TripSTime.Value.ToString("yyyy-MM-dd"), EndTime = item.TripETime.Value.ToString("yyyy-MM-dd") });
if (item.CarType == GuideCarGoodsTypeEnum.Line && item.IsSpell == 1)
{
//只调整第一天的 其他天 直接表示已预订了
var fristModel = tdlist.Where(x => x.Date == Convert.ToDateTime(item.TripSTime.Value.ToString("yyyy-MM-dd"))).FirstOrDefault();
//第一条更新数量 如果OK咯 更新已预定
if (fristModel != null)
{
Dictionary<string, object> keyValues1 = new Dictionary<string, object>
{
{ nameof(RB_Goods_TargetDate.IsReserve), 1 },
{ nameof(RB_Goods_TargetDate.ReserveNum), (fristModel.ReserveNum) - (item.Number ?? 0) }
};
List<WhereHelper> wheres1 = new List<WhereHelper>() {
new WhereHelper(){
FiledName=nameof(RB_Goods_TargetDate.Id),
FiledValue=fristModel.Id,
OperatorEnum=OperatorEnum.Equal
}
};
goods_TargetDateRepository.Update(keyValues1, wheres1, trans);
if ((fristModel.ReserveNum) - (item.Number ?? 0) <= 0)
{
//其他的直接改未预定
foreach (var qitem in tdlist.Where(x => x.Date != Convert.ToDateTime(item.TripSTime.Value.ToString("yyyy-MM-dd")) && x.IsReserve == 2))
{
Dictionary<string, object> keyValues2 = new Dictionary<string, object>() {
{ nameof(RB_Goods_TargetDate.IsReserve),1},
{ nameof(RB_Goods_TargetDate.ReserveNum),0},
};
List<WhereHelper> wheres2 = new List<WhereHelper>() {
new WhereHelper(){
FiledName=nameof(RB_Goods_TargetDate.Id),
FiledValue=qitem.Id,
OperatorEnum=OperatorEnum.Equal
}
};
goods_TargetDateRepository.Update(keyValues2, wheres2, trans);
}
}
}
}
else
{
//直接回滚所有的日期 为可预定
foreach (var qitem in tdlist)
{
Dictionary<string, object> keyValues1 = new Dictionary<string, object>() {
{ nameof(RB_Goods_TargetDate.IsReserve),1},
{ nameof(RB_Goods_TargetDate.ReserveNum),0},
};
List<WhereHelper> wheres1 = new List<WhereHelper>() {
new WhereHelper(){
FiledName=nameof(RB_Goods_TargetDate.Id),
FiledValue=qitem.Id,
OperatorEnum=OperatorEnum.Equal
}
};
goods_TargetDateRepository.Update(keyValues1, wheres1, trans);
}
}
}
else
{
//更新商品表库存
Dictionary<string, object> keyValues1 = new Dictionary<string, object>() {
{ nameof(RB_Goods.InventoryNum), (gmodel.InventoryNum??0)+(item.Number??0)}
...
...
@@ -8702,6 +8773,7 @@ namespace Mall.Module.Product
}
};
goodsRepository.Update(keyValues1, wheres1, trans);
}
goods_LogRepository.Insert(new RB_Goods_Log()
{
Id = 0,
...
...
@@ -10700,6 +10772,7 @@ namespace Mall.Module.Product
x.FreeShippingRemarks,
x.SmallShopsCostPrice,
CouponMoney = x.CouponMoney ?? 0,
InsuranceMoney = x.InsuranceMoney ?? 0,
IntegralMoney = x.IntegralMoney ?? 0,
IntegralNumber = x.IntegralNumber ?? 0,
})
...
...
Mall.WebApi/Controllers/Product/AppletOrderController.cs
View file @
c47fd47c
...
...
@@ -252,7 +252,8 @@ namespace Mall.WebApi.Controllers.MallBase
y
.
Final_Price
,
y
.
Number
,
y
.
IsComment
,
y
.
FreeShippingRemarks
y
.
FreeShippingRemarks
,
InsuranceMoney
=
y
.
InsuranceMoney
??
0
}),
x
.
OrderStatus
,
OrderStatusName
=
x
.
OrderStatus
.
GetEnumName
(),
...
...
Mall.WebApi/Controllers/Product/OrderController.cs
View file @
c47fd47c
...
...
@@ -132,6 +132,8 @@ namespace Mall.WebApi.Controllers.MallBase
y
.
YFMoney
,
y
.
PayMoney
,
CouponMoney
=
y
.
CouponMoney
??
0
,
InsuranceMoney
=
y
.
InsuranceMoney
??
0
,
InsuranceCostMoney
=
y
.
InsuranceCostMoney
??
0
,
IntegralMoney
=
y
.
IntegralMoney
??
0
,
IntegralNumber
=
y
.
IntegralNumber
??
0
,
SFinanceList
=
y
.
FinanceList
.
Where
(
z
=>
z
.
Type
==
1
).
Select
(
z
=>
new
...
...
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