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
5fc637e4
Commit
5fc637e4
authored
Aug 18, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
直播佣金
parent
00a4b7c7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
67 additions
and
4 deletions
+67
-4
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+3
-3
RB_Goods_OrderDetailRepository.cs
Mall.Repository/Product/RB_Goods_OrderDetailRepository.cs
+61
-0
OrderController.cs
Mall.WebApi/Controllers/Product/OrderController.cs
+3
-1
No files found.
Mall.Module.Product/OrderModule.cs
View file @
5fc637e4
...
...
@@ -5937,7 +5937,7 @@ namespace Mall.Module.Product
/// <param name="mallBaseId"></param>
/// <param name="erpEmpId"></param>
/// <returns></returns>
public
string
SetLiveGoodsOrderFinance
(
int
isPublic
,
List
<
int
>
accountIdList
,
List
<
int
>
orderdetailIdList
,
int
tenantId
,
int
mallBaseId
,
int
erpEmpId
)
public
string
SetLiveGoodsOrderFinance
(
int
isPublic
,
List
<
int
>
accountIdList
,
List
<
int
>
orderdetailIdList
,
string
LiveTime
,
int
tenantId
,
int
mallBaseId
,
int
erpEmpId
)
{
int
accountNum
=
accountIdList
.
Count
();
string
orderdetailIds
=
string
.
Join
(
","
,
orderdetailIdList
);
...
...
@@ -5975,7 +5975,7 @@ namespace Mall.Module.Product
decimal
dMoney
=
(
qitem
.
LiveCommission
??
0
)
/
accountNum
;
detailList
.
Add
(
new
{
CostTypeId
=
item
.
RemitCostTypeId
,
CostTypeId
=
65
,
//写死 其他费用
Number
=
1
,
OriginalMoney
=
dMoney
,
UnitPrice
=
dMoney
,
...
...
@@ -5997,7 +5997,7 @@ namespace Mall.Module.Product
OrderSource
=
16
,
OtherType
=
20
,
ReFinanceId
=
0
,
Remark
=
DateTime
.
Now
.
ToString
(
"yyyy年MM月dd日"
)
+
"自动生成财务单据(主播订单佣金)
"
,
Remark
=
DateTime
.
Now
.
ToString
(
"yyyy年MM月dd日"
)
+
"自动生成财务单据(主播订单佣金)
直播日期:"
+
LiveTime
,
detailList
,
RB_Depart_Id
=
Config
.
ExpendDepartment
};
...
...
Mall.Repository/Product/RB_Goods_OrderDetailRepository.cs
View file @
5fc637e4
...
...
@@ -301,7 +301,68 @@ where {where} order by o.CreateDate desc";
}
/// <summary>
/// 获取直播订单分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="count"></param>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Goods_OrderDetail_Extend
>
GetLiveGoodsOrderPageList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Goods_OrderDetail_Extend
dmodel
)
{
string
where
=
$" 1=1 and o.
{
nameof
(
RB_Goods_Order
.
Status
)}
=0 and and o.OrderStatus =5 and o.Recycled=2 and oa.ReOrderId is null "
;
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
StartTime
))
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
CreateDate
)}
>='
{
dmodel
.
StartTime
}
'"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
EndTime
))
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
CreateDate
)}
<='
{
dmodel
.
EndTime
}
23:59:59'"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
OrderNo
))
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
OrderNo
)}
like '%
{
dmodel
.
OrderNo
}
%'"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
GoodsName
))
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
GoodsName
)}
like '%
{
dmodel
.
GoodsName
}
%'"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
ProductCode
))
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
ProductCode
)}
like '%
{
dmodel
.
ProductCode
}
%'"
;
}
if
(
dmodel
.
IsLiveOrder
==
1
)
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
LiveCommission
)}
>0"
;
}
if
(
dmodel
.
FinanceStatus
==
1
)
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
LiveFinanceIds
)}
<> ''"
;
}
else
if
(
dmodel
.
FinanceStatus
==
2
)
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
LiveFinanceIds
)}
= ''"
;
}
string
sql
=
$@"SELECT od.*,o.OrderNo FROM rb_goods_orderdetail od
INNER JOIN rb_goods_order o on o.OrderId=od.OrderId
left join rb_goods_orderaftersale oa on od.Id= oa.OrderDetialId and oa.Type=1 and oa.Status=0 and oa.ReOrderStatus in (1,2,3,4,5)
where
{
where
}
order by o.CreateDate desc"
;
return
GetPage
<
RB_Goods_OrderDetail_Extend
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
}
/// <summary>
/// 获取订单商品列表
...
...
Mall.WebApi/Controllers/Product/OrderController.cs
View file @
5fc637e4
...
...
@@ -1118,6 +1118,7 @@ namespace Mall.WebApi.Controllers.MallBase
demodel
.
TenantId
=
parms
.
TenantId
;
demodel
.
MallBaseId
=
parms
.
MallBaseId
;
demodel
.
IsLiveOrder
=
1
;
var
list
=
orderModule
.
GetLiveGoodsOrderPageList
(
pagelist
.
pageIndex
,
pagelist
.
pageSize
,
out
long
count
,
demodel
);
pagelist
.
count
=
Convert
.
ToInt32
(
count
);
pagelist
.
pageData
=
list
.
Select
(
y
=>
new
...
...
@@ -1148,6 +1149,7 @@ namespace Mall.WebApi.Controllers.MallBase
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
int
IsPublic
=
parms
.
GetInt
(
"IsPublic"
,
0
);
//账户类型
int
ErpEmpId
=
parms
.
GetInt
(
"ErpEmpId"
,
0
);
string
LiveTime
=
parms
.
GetStringValue
(
"LiveTime"
);
//直播时间
if
(
ErpEmpId
<=
0
)
{
ErpEmpId
=
req
.
ERPEmpId
;
}
...
...
@@ -1185,7 +1187,7 @@ namespace Mall.WebApi.Controllers.MallBase
return
ApiResult
.
ParamIsNull
(
"请选择订单列表"
);
}
string
msg
=
orderModule
.
SetLiveGoodsOrderFinance
(
IsPublic
,
AccountIdList
,
OrderdetailIdList
,
req
.
TenantId
,
req
.
MallBaseId
,
ErpEmpId
);
string
msg
=
orderModule
.
SetLiveGoodsOrderFinance
(
IsPublic
,
AccountIdList
,
OrderdetailIdList
,
LiveTime
,
req
.
TenantId
,
req
.
MallBaseId
,
ErpEmpId
);
if
(
msg
==
""
)
{
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