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
bb0e365c
Commit
bb0e365c
authored
Aug 18, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交成本单据
parent
64ddbd57
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
37 deletions
+47
-37
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+43
-32
OrderController.cs
Mall.WebApi/Controllers/Product/OrderController.cs
+1
-1
SupplierController.cs
Mall.WebApi/Controllers/User/SupplierController.cs
+3
-4
No files found.
Mall.Module.Product/OrderModule.cs
View file @
bb0e365c
...
@@ -8887,7 +8887,7 @@ namespace Mall.Module.Product
...
@@ -8887,7 +8887,7 @@ namespace Mall.Module.Product
/// <param name="tenantId"></param>
/// <param name="tenantId"></param>
/// <param name="mallBaseId"></param>
/// <param name="mallBaseId"></param>
/// <returns></returns>
/// <returns></returns>
public
bool
SetOrderSupplierId
(
int
type
,
int
LivePeopleNum
,
decimal
LiveCommission
,
List
<
RB_Goods_OrderDetail_Extend
>
orderList
,
int
tenantId
,
int
mallBaseId
)
public
bool
UpdateOrderDetailLive
(
int
type
,
int
LivePeopleNum
,
decimal
LiveCommission
,
List
<
RB_Goods_OrderDetail_Extend
>
orderList
,
int
tenantId
,
int
mallBaseId
)
{
{
Dictionary
<
string
,
object
>
keyValues
;
Dictionary
<
string
,
object
>
keyValues
;
...
@@ -8915,41 +8915,52 @@ namespace Mall.Module.Product
...
@@ -8915,41 +8915,52 @@ namespace Mall.Module.Product
return
false
;
return
false
;
}
}
bool
flag
=
false
;
bool
flag
=
false
;
foreach
(
var
item
in
orderList
)
var
trans
=
goods_OrderDetailRepository
.
DbTransaction
;
try
{
{
List
<
WhereHelper
>
wheres1
=
new
List
<
WhereHelper
>()
{
foreach
(
var
item
in
orderList
)
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods_OrderDetail
.
Id
),
FiledValue
=
item
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods_OrderDetail
.
TenantId
),
FiledValue
=
tenantId
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods_OrderDetail
.
MallBaseId
),
FiledValue
=
mallBaseId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
flag
=
goods_OrderDetailRepository
.
Update
(
keyValues
,
wheres1
);
if
(
flag
)
{
{
//记录日志
List
<
WhereHelper
>
wheres1
=
new
List
<
WhereHelper
>()
{
Task
.
Run
(()
=>
goods_LogRepository
.
Insert
(
new
RB_Goods_Log
()
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods_OrderDetail
.
Id
),
FiledValue
=
item
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods_OrderDetail
.
TenantId
),
FiledValue
=
tenantId
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods_OrderDetail
.
MallBaseId
),
FiledValue
=
mallBaseId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
flag
=
goods_OrderDetailRepository
.
Update
(
keyValues
,
wheres1
,
trans
);
if
(
flag
)
{
{
//Content = "修改订单商品:" + item.GoodsName + "供应商ID:" + SupplierId + ";供应商历史ID:" + orderModel.SupplierId.ToString(),
//记录日志
CreateDate
=
DateTime
.
Now
,
goods_LogRepository
.
Insert
(
new
RB_Goods_Log
()
Id
=
0
,
{
MallBaseId
=
mallBaseId
,
Content
=
"修改订单商品:"
+
item
.
GoodsName
+
((
type
==
1
||
type
==
2
)
?
(
"主播人数:"
+
LivePeopleNum
+
"原主播人数:"
+
item
.
LivePeopleNum
)
:
""
)
+
((
type
==
1
||
type
==
3
)
?
(
"主播返佣金额:"
+
LiveCommission
+
"原佣金:"
+
item
.
LiveCommission
)
:
""
),
SourceId
=
item
.
OrderId
,
CreateDate
=
DateTime
.
Now
,
TenantId
=
tenantId
,
Id
=
0
,
Type
=
1
MallBaseId
=
mallBaseId
,
}));
SourceId
=
item
.
OrderId
,
TenantId
=
tenantId
,
Type
=
1
},
trans
);
}
}
}
goods_OrderDetailRepository
.
DBSession
.
Commit
();
}
catch
(
Exception
ex
)
{
LogHelper
.
Write
(
ex
,
"UpdateOrderDetailLive"
);
goods_OrderDetailRepository
.
DBSession
.
Rollback
(
"UpdateOrderDetailLive"
);
return
false
;
}
}
return
flag
;
return
flag
;
...
...
Mall.WebApi/Controllers/Product/OrderController.cs
View file @
bb0e365c
...
@@ -1085,7 +1085,7 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -1085,7 +1085,7 @@ namespace Mall.WebApi.Controllers.MallBase
}
}
bool
flag
=
orderModule
.
SetOrderSupplierId
(
Type
,
LivePeopleNum
,
LiveCommission
,
orderDetailsList
,
req
.
TenantId
,
req
.
MallBaseId
);
bool
flag
=
orderModule
.
UpdateOrderDetailLive
(
Type
,
LivePeopleNum
,
LiveCommission
,
orderDetailsList
,
req
.
TenantId
,
req
.
MallBaseId
);
if
(
flag
)
if
(
flag
)
{
{
return
ApiResult
.
Success
();
return
ApiResult
.
Success
();
...
...
Mall.WebApi/Controllers/User/SupplierController.cs
View file @
bb0e365c
...
@@ -388,16 +388,15 @@ namespace Mall.WebApi.Controllers.User
...
@@ -388,16 +388,15 @@ namespace Mall.WebApi.Controllers.User
decimal
totalMonry
=
0
;
decimal
totalMonry
=
0
;
if
(
demodel
.
IsSelectAll
==
0
)
if
(
demodel
.
IsSelectAll
==
0
)
{
{
totalMonry
=
result
.
Sum
(
x
=>
((
x
.
CostMoney
??
0
)
*
(
x
.
Number
??
0
))
+
(
x
.
FreightCostMoney
??
0
));
totalMonry
=
(
result
.
Where
(
x
=>
x
.
FinanceType
==
1
).
Sum
(
x
=>
((
x
.
CostMoney
??
0
)
*
(
x
.
Number
??
0
))))
+
(
result
.
Where
(
x
=>
x
.
FinanceType
==
2
).
Sum
(
x
=>
x
.
FreightCostMoney
??
0
));
}
}
else
if
(
demodel
.
IsSelectAll
==
1
)
else
if
(
demodel
.
IsSelectAll
==
1
)
{
{
totalMonry
=
result
.
Sum
(
x
=>
((
x
.
CostMoney
??
0
)
*
(
x
.
Number
??
0
)));
totalMonry
=
result
.
Where
(
x
=>
x
.
FinanceType
==
1
).
Sum
(
x
=>
((
x
.
CostMoney
??
0
)
*
(
x
.
Number
??
0
)));
}
}
else
if
(
demodel
.
IsSelectAll
==
2
)
else
if
(
demodel
.
IsSelectAll
==
2
)
{
{
totalMonry
=
result
.
Sum
(
x
=>
(
x
.
FreightCostMoney
??
0
));
totalMonry
=
result
.
Where
(
x
=>
x
.
FinanceType
==
2
).
Sum
(
x
=>
(
x
.
FreightCostMoney
??
0
));
}
}
var
financeObj
=
new
var
financeObj
=
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