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
29fba29b
Commit
29fba29b
authored
Sep 10, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
佣金财务单据调整
parent
6fe7ae3a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
4 deletions
+44
-4
UserModule.cs
Mall.Module.User/UserModule.cs
+40
-3
RB_Goods_OrderCommissionRepository.cs
....Repository/Product/RB_Goods_OrderCommissionRepository.cs
+4
-1
No files found.
Mall.Module.User/UserModule.cs
View file @
29fba29b
...
...
@@ -2418,6 +2418,7 @@ namespace Mall.Module.User
Remark
=
"订单号:"
+(
remitModel
?.
ReOrderNos
??
"暂无"
)+
" "
+
dstr
}
};
item
.
IsPublic
=
5
;
//默认平台虚拟账户
#
region
查询所有的订单
List
<
Model
.
Entity
.
Finance
.
RB_ECFinanceId_Relation
>
ECList
=
new
List
<
Model
.
Entity
.
Finance
.
RB_ECFinanceId_Relation
>();
...
...
@@ -2427,9 +2428,10 @@ namespace Mall.Module.User
if
(
string
.
IsNullOrEmpty
(
remitModel
.
ReVipIds
))
{
remitModel
.
ReVipIds
=
"[]"
;
}
List
<
int
>
reorderIdList
=
JsonConvert
.
DeserializeObject
<
List
<
int
>>(
remitModel
.
ReOrderIds
);
List
<
int
>
revipIdList
=
JsonConvert
.
DeserializeObject
<
List
<
int
>>(
remitModel
.
ReVipIds
);
List
<
RB_VipBuy_Commission_Extend
>
vipbuycList
=
new
List
<
RB_VipBuy_Commission_Extend
>();
if
(
revipIdList
.
Any
())
{
v
ar
v
ipbuycList
=
vipBuy_CommissionRepository
.
GetList
(
new
RB_VipBuy_Commission_Extend
()
{
TenantId
=
TenantId
,
MallBaseId
=
MallBaseId
,
VipIds
=
string
.
Join
(
","
,
revipIdList
)
});
vipbuycList
=
vipBuy_CommissionRepository
.
GetList
(
new
RB_VipBuy_Commission_Extend
()
{
TenantId
=
TenantId
,
MallBaseId
=
MallBaseId
,
VipIds
=
string
.
Join
(
","
,
revipIdList
)
});
//获取订单列表
if
(
vipbuycList
.
Where
(
x
=>
x
.
ReOrderId
>
0
).
Any
())
{
...
...
@@ -2438,8 +2440,11 @@ namespace Mall.Module.User
}
if
(
reorderIdList
.
Any
())
{
detailList
=
new
List
<
object
>();
//清空了 重新来赋值
reorderIdList
=
reorderIdList
.
Distinct
().
ToList
();
var
orderList
=
goods_OrderRepository
.
GetOrderList
(
new
RB_Goods_Order_Extend
()
{
TenantId
=
TenantId
,
MallBaseId
=
MallBaseId
,
OrderIds
=
string
.
Join
(
","
,
reorderIdList
)
});
var
orderDetailList
=
goods_OrderDetailRepository
.
GetOrderDetailList
(
new
RB_Goods_OrderDetail_Extend
()
{
TenantId
=
TenantId
,
MallBaseId
=
MallBaseId
,
OrderIds
=
string
.
Join
(
","
,
reorderIdList
)
});
var
oclist
=
goods_OrderCommissionRepository
.
GetOrderHaveCommissionList
(
string
.
Join
(
","
,
orderDetailList
.
Select
(
x
=>
x
.
Id
)),
remitModel
.
UserId
??
0
);
foreach
(
var
qitem
in
orderDetailList
)
{
ECList
.
Add
(
new
Model
.
Entity
.
Finance
.
RB_ECFinanceId_Relation
()
...
...
@@ -2447,10 +2452,42 @@ namespace Mall.Module.User
ECOrderId
=
qitem
.
OrderId
,
ECOrderDetailId
=
qitem
.
Id
});
#
region
2020
-
09
-
10
康晓菲需求
查询商品明细
var
omodel
=
orderList
.
Where
(
x
=>
x
.
OrderId
==
qitem
.
OrderId
).
FirstOrDefault
();
var
ocModel
=
oclist
.
Where
(
x
=>
x
.
OrderDetailId
==
qitem
.
Id
).
FirstOrDefault
();
if
(
ocModel
!=
null
)
{
if
(
ocModel
.
Commission
>
0
)
{
detailList
.
Add
(
new
{
CostTypeId
=
item
.
RemitCostTypeId
,
Number
=
1
,
OriginalMoney
=
ocModel
.
Commission
,
UnitPrice
=
ocModel
.
Commission
,
Remark
=
qitem
.
GoodsName
+
" "
+
qitem
.
Specification
+
" "
+
(
omodel
?.
OrderNo
??
""
)
});
}
}
else
{
var
vipModel
=
vipbuycList
.
Where
(
x
=>
x
.
ReOrderId
==
qitem
.
OrderId
).
FirstOrDefault
();
if
(
vipModel
!=
null
&&
vipModel
.
Commission
>
0
)
{
detailList
.
Add
(
new
{
CostTypeId
=
item
.
RemitCostTypeId
,
Number
=
1
,
OriginalMoney
=
vipModel
.
Commission
,
UnitPrice
=
vipModel
.
Commission
,
Remark
=
qitem
.
GoodsName
+
" "
+
qitem
.
Specification
+
" VIP"
+
(
omodel
?.
OrderNo
??
""
)
});
}
}
#
endregion
}
}
}
#
endregion
#
endregion
var
financeObj
=
new
{
CreateBy
=
erpEmpId
>
0
?
erpEmpId
.
ToString
()
:
Config
.
ExpendDirector
,
...
...
@@ -2465,7 +2502,7 @@ namespace Mall.Module.User
OrderSource
=
16
,
OtherType
=
11
,
ReFinanceId
=
remitId
,
Remark
=
"名称:"
+
umodel
.
Name
+
"("
+
umodel
.
Id
+
")"
+
" 姓名:"
+
DisModel
.
Name
+
" 手机:"
+
DisModel
.
Mobile
+
" "
+
System
.
DateTime
.
Now
.
ToString
(
"yyyy年MM月dd日"
)
+
"自动生成财务单据
"
,
Remark
=
"名称:"
+
umodel
.
Name
+
"("
+
umodel
.
Id
+
")"
+
" 姓名:"
+
DisModel
.
Name
+
" 手机:"
+
DisModel
.
Mobile
+
" "
+
System
.
DateTime
.
Now
.
ToString
(
"yyyy年MM月dd日"
)
+
"自动生成财务单据
,总计金额:"
+
Money
,
detailList
,
RB_Depart_Id
=
Config
.
ExpendDepartment
,
ECOrderList
=
ECList
...
...
Mall.Repository/Product/RB_Goods_OrderCommissionRepository.cs
View file @
29fba29b
...
...
@@ -433,9 +433,12 @@ left join rb_goods_orderaftersale oa on oc.OrderDetailId= oa.OrderDetialId and o
/// </summary>
/// <param name="OrderDetailIds"></param>
/// <returns></returns>
public
List
<
RB_Goods_OrderCommission_Extend
>
GetOrderHaveCommissionList
(
string
OrderDetailIds
)
public
List
<
RB_Goods_OrderCommission_Extend
>
GetOrderHaveCommissionList
(
string
OrderDetailIds
,
int
UserId
=
0
)
{
string
sql
=
$@"SELECT * FROM rb_goods_ordercommission oc WHERE oc.CommissionState=2 and oc.OrderDetailId in (
{
OrderDetailIds
}
)"
;
if
(
UserId
>
0
)
{
sql
+=
$@" and oc.UserId=
{
UserId
}
"
;
}
return
Get
<
RB_Goods_OrderCommission_Extend
>(
sql
).
ToList
();
}
...
...
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