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
7eea27bb
Commit
7eea27bb
authored
Jul 23, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
初始化 商品规格成本
parent
e3a13482
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
141 additions
and
104 deletions
+141
-104
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+2
-2
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+37
-3
FinanceModule.cs
Mall.WindowsService/Module/FinanceModule.cs
+102
-99
No files found.
Mall.Module.Product/OrderModule.cs
View file @
7eea27bb
...
...
@@ -2297,7 +2297,7 @@ namespace Mall.Module.Product
item
.
InventoryNum
=
gmodel
.
InventoryNum
??
0
;
item
.
CommissionPrice
=
gmodel
.
Commission
;
// 粉象 返佣金额
item
.
CostMoney
=
(
gmodel
.
IsCustomSpecification
==
2
)?(
gmodel
.
CostPrice
??
0
):(
speciPList
.
Where
(
x
=>
x
.
GoodsId
==
item
.
GoodsId
&&
x
.
SpecificationSort
==
item
.
SpecificationSort
).
FirstOrDefault
().
CostMoney
);
//gmodel.CostPrice ?? 0;
item
.
CostMoney
=
(
gmodel
.
IsCustomSpecification
==
2
)
?
(
gmodel
.
CostPrice
??
0
)
:
(
speciPList
.
Where
(
x
=>
x
.
GoodsId
==
item
.
GoodsId
&&
x
.
SpecificationSort
==
item
.
SpecificationSort
).
FirstOrDefault
()?.
CostMoney
??
0
);
//gmodel.CostPrice ?? 0;
item
.
PresentFXGrade
=
gmodel
.
PresentFXGrade
??
0
;
//赠送粉象分销等级
item
.
PresentFXMonth
=
gmodel
.
PresentFXMonth
??
0
;
...
...
@@ -7092,7 +7092,7 @@ namespace Mall.Module.Product
}
#
region
粉象等级赠送
2020
-
07
-
21
if
(
dlist
.
Any
())
if
(
dlist
.
Where
(
x
=>
x
.
PresentFXGrade
>
0
).
Any
())
{
var
demodel
=
new
RB_Goods_Order_Extend
{
...
...
Mall.Module.Product/ProductModule.cs
View file @
7eea27bb
...
...
@@ -5763,6 +5763,10 @@ namespace Mall.Module.Product
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Goods_SpecificationPrice
.
Commission
),
TotalMoney
}
};
if
(
qitem
.
CostMoney
<=
0
)
{
keyValues
.
Add
(
nameof
(
RB_Goods_SpecificationPrice
.
CostMoney
),
item
.
CostPrice
??
0
);
}
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods_SpecificationPrice
.
Id
),
...
...
@@ -5776,14 +5780,20 @@ namespace Mall.Module.Product
else
{
//详细设置咯 对比规格更新
foreach
(
var
qitem
in
dc1list
.
Where
(
x
=>
x
.
DistributorGrade
==
74
))
{
foreach
(
var
qitem
in
dc1list
.
Where
(
x
=>
x
.
DistributorGrade
==
74
))
{
decimal
TotalMoney
=
(
qitem
.
OneCommission
??
0
)
+
(
qitem
.
TwoCommission
??
0
)
+
(
qitem
.
ThreeCommission
??
0
);
var
spmodel
=
sp1list
.
Where
(
x
=>
x
.
SpecificationSort
==
qitem
.
SpecificationSort
).
FirstOrDefault
();
if
(
spmodel
!=
null
)
{
if
(
spmodel
!=
null
)
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Goods_SpecificationPrice
.
Commission
),
TotalMoney
}
};
if
(
spmodel
.
CostMoney
<=
0
)
{
keyValues
.
Add
(
nameof
(
RB_Goods_SpecificationPrice
.
CostMoney
),
item
.
CostPrice
??
0
);
}
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods_SpecificationPrice
.
Id
),
...
...
@@ -5796,7 +5806,8 @@ namespace Mall.Module.Product
}
}
}
else
{
else
{
//没有自定义规格 直接弄主表返佣金额
var
dcmodel
=
dc1list
.
Where
(
x
=>
x
.
DistributorGrade
==
74
).
FirstOrDefault
();
decimal
TotalMoney
=
(
dcmodel
.
OneCommission
??
0
)
+
(
dcmodel
.
TwoCommission
??
0
)
+
(
dcmodel
.
ThreeCommission
??
0
);
...
...
@@ -5813,6 +5824,29 @@ namespace Mall.Module.Product
goodsRepository
.
Update
(
keyValues
,
wheres
);
}
}
else
{
//只更新成本
if
(
item
.
IsCustomSpecification
==
1
)
{
var
sp1list
=
splist
.
Where
(
x
=>
x
.
GoodsId
==
item
.
Id
).
ToList
();
foreach
(
var
qitem
in
sp1list
)
{
if
(
qitem
.
CostMoney
<=
0
)
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Goods_SpecificationPrice
.
CostMoney
),
item
.
CostPrice
??
0
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods_SpecificationPrice
.
Id
),
FiledValue
=
qitem
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
goods_SpecificationPriceRepository
.
Update
(
keyValues
,
wheres
);
}
}
}
}
}
}
...
...
Mall.WindowsService/Module/FinanceModule.cs
View file @
7eea27bb
This diff is collapsed.
Click to expand it.
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