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
f84a7e29
Commit
f84a7e29
authored
Sep 10, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
8f82e169
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
82 additions
and
16 deletions
+82
-16
RB_Finance_Configurine.cs
Mall.Model/Entity/Finance/RB_Finance_Configurine.cs
+12
-0
RB_Finance_RecordDetail.cs
Mall.Model/Entity/Finance/RB_Finance_RecordDetail.cs
+4
-0
RB_Goods_OrderDetail.cs
Mall.Model/Entity/Product/RB_Goods_OrderDetail.cs
+5
-0
RB_Goods_OrderDetail_Extend.cs
Mall.Model/Extend/Product/RB_Goods_OrderDetail_Extend.cs
+8
-2
RB_Goods_OrderDetailRepository.cs
Mall.Repository/Product/RB_Goods_OrderDetailRepository.cs
+4
-0
SupplierController.cs
Mall.WebApi/Controllers/User/SupplierController.cs
+49
-14
No files found.
Mall.Model/Entity/Finance/RB_Finance_Configurine.cs
View file @
f84a7e29
...
...
@@ -78,6 +78,8 @@ namespace Mall.Model.Entity.User
get
;
set
;
}
/// <summary>
/// 退款费用
/// </summary>
...
...
@@ -98,6 +100,16 @@ namespace Mall.Model.Entity.User
/// 运杂费用id
/// </summary>
public
int
?
ExpensesCostTypeId
{
get
;
set
;
}
/// <summary>
/// 保险成本费用
/// </summary>
public
int
?
InsuranceCostTypeId
{
get
;
set
;
}
/// <summary>
/// RemitCostTypeId
/// </summary>
...
...
Mall.Model/Entity/Finance/RB_Finance_RecordDetail.cs
View file @
f84a7e29
...
...
@@ -113,5 +113,9 @@ namespace Mall.Model.Entity.Finance
set
;
}
/// <summary>
/// 保险成本价格
/// </summary>
public
decimal
?
InsuranceCostMoney
{
get
;
set
;
}
}
}
Mall.Model/Entity/Product/RB_Goods_OrderDetail.cs
View file @
f84a7e29
...
...
@@ -216,6 +216,11 @@ namespace Mall.Model.Entity.Product
/// </summary>
public
int
FreightFinanceId
{
get
;
set
;
}
/// <summary>
/// 保险成本单据id
/// </summary>
public
int
InsuranceFinanceId
{
get
;
set
;
}
/// <summary>
/// 积分赠送
/// </summary>
...
...
Mall.Model/Extend/Product/RB_Goods_OrderDetail_Extend.cs
View file @
f84a7e29
...
...
@@ -159,7 +159,7 @@ namespace Mall.Model.Extend.Product
/// <summary>
/// 1-商品,2-运费
/// 1-商品,2-运费
,3-保险
/// </summary>
public
int
FinanceType
{
get
;
set
;
}
#
endregion
...
...
@@ -192,10 +192,16 @@ namespace Mall.Model.Extend.Product
/// <summary>
/// 是否查询所有,0-全部,1-成本,2-运费
/// 是否查询所有,0-全部,1-成本,2-运费
,3-保险成本
/// </summary>
public
int
IsSelectAll
{
get
;
set
;
}
/// <summary>
/// 订单分类 0正常订单 1司导订单
/// </summary>
public
int
OrderClassify
{
get
;
set
;
}
/// <summary>
/// 规格key(出库的规格),没有修改为
/// </summary>
...
...
Mall.Repository/Product/RB_Goods_OrderDetailRepository.cs
View file @
f84a7e29
...
...
@@ -196,6 +196,10 @@ where {where} order by o.CreateDate desc";
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(
dmodel
.
OrderClassify
>
-
1
)
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
OrderClassify
)}
=
{
dmodel
.
OrderClassify
}
"
;
}
if
(
dmodel
.
OrderType
>
0
)
{
...
...
Mall.WebApi/Controllers/User/SupplierController.cs
View file @
f84a7e29
...
...
@@ -298,9 +298,6 @@ namespace Mall.WebApi.Controllers.User
{
if
(
orderGoodsItem
.
CostMoney
>
0
&&
orderGoodsItem
.
CostFinanceId
<=
0
)
{
//var newOrderGoods = new RB_Goods_OrderDetail_Extend();
//newOrderGoods = orderGoodsItem;
//newOrderGoods.FinanceType = 1;
var
newOrderGoods
=
new
RB_Goods_OrderDetail_Extend
{
FinanceType
=
1
,
...
...
@@ -311,7 +308,8 @@ namespace Mall.WebApi.Controllers.User
OrderNo
=
orderGoodsItem
.
OrderNo
,
Id
=
orderGoodsItem
.
Id
,
CostMoney
=
orderGoodsItem
.
CostMoney
,
FreightCostMoney
=
orderGoodsItem
.
FreightCostMoney
FreightCostMoney
=
orderGoodsItem
.
FreightCostMoney
,
InsuranceCostMoney
=
orderGoodsItem
.
InsuranceCostMoney
};
OrderDetailPaid
+=
((
orderGoodsItem
.
CostMoney
??
0
)
*
(
orderGoodsItem
.
Number
??
0
));
result
.
Add
(
newOrderGoods
);
...
...
@@ -319,11 +317,9 @@ namespace Mall.WebApi.Controllers.User
}
if
(
demodel
.
IsSelectAll
==
0
||
demodel
.
IsSelectAll
==
2
)
{
if
(
orderGoodsItem
.
FreightCostMoney
.
HasValue
&&
orderGoodsItem
.
FreightCostMoney
.
Value
>
0
&&
orderGoodsItem
.
FreightFinanceId
<=
0
)
{
//var newOrderGoods = new RB_Goods_OrderDetail_Extend();
//newOrderGoods = orderGoodsItem;
//newOrderGoods.FinanceType = 2;
var
newOrderGoods
=
new
RB_Goods_OrderDetail_Extend
{
FinanceType
=
2
,
...
...
@@ -334,12 +330,38 @@ namespace Mall.WebApi.Controllers.User
OrderNo
=
orderGoodsItem
.
OrderNo
,
Id
=
orderGoodsItem
.
Id
,
CostMoney
=
orderGoodsItem
.
CostMoney
,
FreightCostMoney
=
orderGoodsItem
.
FreightCostMoney
FreightCostMoney
=
orderGoodsItem
.
FreightCostMoney
,
InsuranceCostMoney
=
orderGoodsItem
.
InsuranceCostMoney
};
OrderDetailPaid
+=
(
orderGoodsItem
.
FreightCostMoney
??
0
);
result
.
Add
(
newOrderGoods
);
}
}
if
(
demodel
.
IsSelectAll
==
0
||
demodel
.
IsSelectAll
==
3
)
{
if
(
orderGoodsItem
.
InsuranceCostMoney
.
HasValue
&&
orderGoodsItem
.
InsuranceCostMoney
.
Value
>
0
&&
orderGoodsItem
.
InsuranceFinanceId
<=
0
)
{
var
newOrderGoods
=
new
RB_Goods_OrderDetail_Extend
{
FinanceType
=
3
,
Final_Price
=
orderGoodsItem
.
Final_Price
,
Number
=
1
,
FreightMoney
=
orderGoodsItem
.
FreightMoney
,
GoodsName
=
orderGoodsItem
.
GoodsName
,
OrderNo
=
orderGoodsItem
.
OrderNo
,
Id
=
orderGoodsItem
.
Id
,
CostMoney
=
orderGoodsItem
.
CostMoney
,
FreightCostMoney
=
orderGoodsItem
.
FreightCostMoney
,
InsuranceCostMoney
=
orderGoodsItem
.
InsuranceCostMoney
};
OrderDetailPaid
+=
((
orderGoodsItem
.
InsuranceCostMoney
??
0
)
*
(
orderGoodsItem
.
Number
??
0
));
result
.
Add
(
newOrderGoods
);
}
}
RB_Finance_RecordDetail_Extend
financeRecordDetail
=
new
RB_Finance_RecordDetail_Extend
{
...
...
@@ -358,6 +380,7 @@ namespace Mall.WebApi.Controllers.User
Unit_Price
=
orderGoodsItem
.
CostMoney
,
Number
=
orderGoodsItem
.
Number
,
OrderDetailPaid
=
OrderDetailPaid
,
InsuranceCostMoney
=
((
orderGoodsItem
.
InsuranceCostMoney
??
0
)
*
(
orderGoodsItem
.
Number
??
0
)),
};
record
.
RecordDetailList
.
Add
(
financeRecordDetail
);
...
...
@@ -370,17 +393,25 @@ namespace Mall.WebApi.Controllers.User
ECList
=
ECList
.
Distinct
().
ToList
();
var
detailList
=
result
.
Select
(
x
=>
new
{
CostTypeId
=
x
.
FinanceType
==
1
?
financeConfigurineModel
.
CBCostTypeId
:
financeConfigurineModel
.
ExpensesCostTypeId
,
Number
=
x
.
FinanceType
==
1
?
x
.
Number
:
1
,
OriginalMoney
=
x
.
FinanceType
==
1
?
((
x
.
CostMoney
??
0
)
*
(
x
.
Number
??
0
))
:
x
.
FreightCostMoney
,
UnitPrice
=
x
.
FinanceType
==
1
?
((
x
.
CostMoney
??
0
))
:
x
.
FreightCostMoney
,
CostTypeId
=
x
.
FinanceType
==
1
?
financeConfigurineModel
.
CBCostTypeId
:
(
x
.
FinanceType
==
2
?
financeConfigurineModel
.
ExpensesCostTypeId
:
financeConfigurineModel
.
InsuranceCostTypeId
),
// CostTypeId = x.FinanceType == 1 ? financeConfigurineModel.CBCostTypeId : financeConfigurineModel.ExpensesCostTypeId,
Number
=
(
x
.
FinanceType
==
1
||
x
.
FinanceType
==
3
)
?
x
.
Number
:
1
,
OriginalMoney
=
x
.
FinanceType
==
1
?
((
x
.
CostMoney
??
0
)
*
(
x
.
Number
??
0
))
:
(
x
.
FinanceType
==
2
?
x
.
FreightCostMoney
:
((
x
.
InsuranceCostMoney
??
0
)
*
(
x
.
Number
??
0
))),
UnitPrice
=
x
.
FinanceType
==
1
?
((
x
.
CostMoney
??
0
))
:
(
x
.
FinanceType
==
2
?
x
.
FreightCostMoney
:
(
x
.
InsuranceCostMoney
??
0
)),
Remark
=
x
.
GoodsName
+
x
.
Specification
+
x
.
OrderNo
});
decimal
totalMonry
=
0
;
if
(
demodel
.
IsSelectAll
==
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
));
if
(
demodel
.
OrderClassify
==
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
{
totalMonry
=
(
result
.
Where
(
x
=>
x
.
FinanceType
==
1
).
Sum
(
x
=>
((
x
.
CostMoney
??
0
)
*
(
x
.
Number
??
0
))))
+
(
result
.
Where
(
x
=>
x
.
FinanceType
==
3
).
Sum
(
x
=>
((
x
.
InsuranceCostMoney
??
0
)
*
(
x
.
Number
??
0
))));
}
}
else
if
(
demodel
.
IsSelectAll
==
1
)
{
...
...
@@ -390,10 +421,14 @@ namespace Mall.WebApi.Controllers.User
{
totalMonry
=
result
.
Where
(
x
=>
x
.
FinanceType
==
2
).
Sum
(
x
=>
(
x
.
FreightCostMoney
??
0
));
}
else
if
(
demodel
.
IsSelectAll
==
3
)
{
totalMonry
=
result
.
Where
(
x
=>
x
.
FinanceType
==
2
).
Sum
(
x
=>
((
x
.
InsuranceCostMoney
??
0
)
*
(
x
.
Number
??
0
)));
}
var
financeObj
=
new
{
CreateBy
=
demodel
.
FinanceCreateBy
==
0
?
Config
.
ExpendDirector
:
demodel
.
FinanceCreateBy
.
ToString
(),
IsPublic
=
demodel
.
IsPublic
,
// supplierModel.ClientBankAccount.AccountType, //financeConfigurineModel.AccountType,
IsPublic
=
demodel
.
IsPublic
,
ClientType
=
supplierModel
.
ClientBankAccount
.
Type
,
ClientID
=
supplierModel
.
BankAccountId
,
CurrencyId
=
financeConfigurineModel
.
CurrencyId
,
...
...
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