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
887a1820
Commit
887a1820
authored
Jul 13, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
e47294ad
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
139 additions
and
49 deletions
+139
-49
RB_Finance_Record.cs
Mall.Model/Entity/Finance/RB_Finance_Record.cs
+5
-0
RB_Goods_OrderDetail.cs
Mall.Model/Entity/Product/RB_Goods_OrderDetail.cs
+6
-0
RB_WarehouseOut_Apply.cs
Mall.Model/Entity/Property/RB_WarehouseOut_Apply.cs
+1
-8
RB_Goods_OrderDetail_Extend.cs
Mall.Model/Extend/Product/RB_Goods_OrderDetail_Extend.cs
+7
-0
MallBaseModule.cs
Mall.Module.BaseSetUp/MallBaseModule.cs
+8
-7
RB_Goods_OrderDetailRepository.cs
Mall.Repository/Product/RB_Goods_OrderDetailRepository.cs
+67
-8
RB_WarehouseOut_ApplyRepository.cs
Mall.Repository/Property/RB_WarehouseOut_ApplyRepository.cs
+2
-8
RB_WarehouseOut_GoodsRepository.cs
Mall.Repository/Property/RB_WarehouseOut_GoodsRepository.cs
+5
-0
RB_Member_UserRepository.cs
Mall.Repository/User/RB_Member_UserRepository.cs
+1
-1
WarehouseOutController.cs
Mall.WebApi/Controllers/Property/WarehouseOutController.cs
+1
-4
SupplierController.cs
Mall.WebApi/Controllers/User/SupplierController.cs
+36
-13
No files found.
Mall.Model/Entity/Finance/RB_Finance_Record.cs
View file @
887a1820
...
@@ -65,5 +65,10 @@ namespace Mall.Model.Entity.Finance
...
@@ -65,5 +65,10 @@ namespace Mall.Model.Entity.Finance
}
}
/// <summary>
/// 是否是成本与运费一起制单,0-全部,1-成本,2-运费
/// </summary>
public
int
IsFinanceAll
{
get
;
set
;
}
}
}
}
}
Mall.Model/Entity/Product/RB_Goods_OrderDetail.cs
View file @
887a1820
...
@@ -204,6 +204,12 @@ namespace Mall.Model.Entity.Product
...
@@ -204,6 +204,12 @@ namespace Mall.Model.Entity.Product
/// 成本单据ID
/// 成本单据ID
/// </summary>
/// </summary>
public
int
CostFinanceId
{
get
;
set
;
}
public
int
CostFinanceId
{
get
;
set
;
}
/// <summary>
/// 运费成本单据ID
/// </summary>
public
int
FreightFinanceId
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 积分赠送
/// 积分赠送
/// </summary>
/// </summary>
...
...
Mall.Model/Entity/Property/RB_WarehouseOut_Apply.cs
View file @
887a1820
...
@@ -62,14 +62,7 @@ namespace Mall.Model.Entity.Property
...
@@ -62,14 +62,7 @@ namespace Mall.Model.Entity.Property
set
;
set
;
}
}
/// <summary>
/// 供应商id
/// </summary>
public
int
SupplierId
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 公司
/// 公司
/// </summary>
/// </summary>
...
...
Mall.Model/Extend/Product/RB_Goods_OrderDetail_Extend.cs
View file @
887a1820
...
@@ -145,5 +145,12 @@ namespace Mall.Model.Extend.Product
...
@@ -145,5 +145,12 @@ namespace Mall.Model.Extend.Product
/// 供应商名称
/// 供应商名称
/// </summary>
/// </summary>
public
string
SupplierName
{
get
;
set
;
}
public
string
SupplierName
{
get
;
set
;
}
/// <summary>
/// 是否查询所有,0-全部,1-成本,2-运费
/// </summary>
public
int
IsSelectAll
{
get
;
set
;
}
}
}
}
}
Mall.Module.BaseSetUp/MallBaseModule.cs
View file @
887a1820
...
@@ -174,7 +174,7 @@ namespace Mall.Module.BaseSetUp
...
@@ -174,7 +174,7 @@ namespace Mall.Module.BaseSetUp
if
(
ListPrice
!=
null
&&
ListPrice
.
Any
())
if
(
ListPrice
!=
null
&&
ListPrice
.
Any
())
{
{
listLogisticsRulesRegion
=
logisticsRulesRegionRepository
.
GetListRepository
(
new
RB_Logistics_RulesRegion_Extend
{
TenantId
=
query
.
TenantId
,
RulesType
=
model
.
RulesType
,
MallBaseId
=
query
.
MallBaseId
,
PriceIds
=
string
.
Join
(
","
,
ListPrice
.
Select
(
x
=>
x
.
ID
))
});
listLogisticsRulesRegion
=
logisticsRulesRegionRepository
.
GetListRepository
(
new
RB_Logistics_RulesRegion_Extend
{
TenantId
=
query
.
TenantId
,
RulesType
=
model
.
RulesType
,
MallBaseId
=
query
.
MallBaseId
,
PriceIds
=
string
.
Join
(
","
,
ListPrice
.
Select
(
x
=>
x
.
ID
))
});
}
}
model
.
Detail
=
new
List
<
RB_Logistics_RulesPrice_Extend
>();
model
.
Detail
=
new
List
<
RB_Logistics_RulesPrice_Extend
>();
...
@@ -210,7 +210,7 @@ namespace Mall.Module.BaseSetUp
...
@@ -210,7 +210,7 @@ namespace Mall.Module.BaseSetUp
{
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Logistics_Rules
.
MallBaseId
),
FiledValue
=
query
.
MallBaseId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Logistics_Rules
.
MallBaseId
),
FiledValue
=
query
.
MallBaseId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
};
flag
=
logisticsRulesRepository
.
Update
(
fileds
,
whereHelpers
,
trans
);
flag
=
logisticsRulesRepository
.
Update
(
fileds
,
whereHelpers
,
trans
);
IDictionary
<
string
,
object
>
filedsDefault
=
new
Dictionary
<
string
,
object
>()
IDictionary
<
string
,
object
>
filedsDefault
=
new
Dictionary
<
string
,
object
>()
{
{
...
@@ -220,7 +220,7 @@ namespace Mall.Module.BaseSetUp
...
@@ -220,7 +220,7 @@ namespace Mall.Module.BaseSetUp
{
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Logistics_Rules
.
ID
),
FiledValue
=
query
.
ID
,
OperatorEnum
=
OperatorEnum
.
Equal
}
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Logistics_Rules
.
ID
),
FiledValue
=
query
.
ID
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
};
flag
=
logisticsRulesRepository
.
Update
(
filedsDefault
,
whereHelpersDefault
,
trans
);
flag
=
logisticsRulesRepository
.
Update
(
filedsDefault
,
whereHelpersDefault
,
trans
);
logisticsRulesRepository
.
DBSession
.
Commit
();
logisticsRulesRepository
.
DBSession
.
Commit
();
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
...
@@ -499,13 +499,13 @@ namespace Mall.Module.BaseSetUp
...
@@ -499,13 +499,13 @@ namespace Mall.Module.BaseSetUp
public
RB_Logistics_Rules_Extend
GetPinkageModel
(
RB_Logistics_Rules_Extend
query
)
public
RB_Logistics_Rules_Extend
GetPinkageModel
(
RB_Logistics_Rules_Extend
query
)
{
{
RB_Logistics_Rules_Extend
model
=
logisticsRulesRepository
.
GetLogisticsRulesList
(
query
).
FirstOrDefault
();
RB_Logistics_Rules_Extend
model
=
logisticsRulesRepository
.
GetLogisticsRulesList
(
query
).
FirstOrDefault
();
if
(
model
!=
null
)
if
(
model
!=
null
)
{
{
List
<
RB_Logistics_RulesRegion_Extend
>
listLogisticsRulesRegion
=
logisticsRulesRegionRepository
.
GetListRepository
(
new
RB_Logistics_RulesRegion_Extend
{
TenantId
=
query
.
TenantId
,
RulesType
=
query
.
RulesType
,
MallBaseId
=
query
.
MallBaseId
,
RulesPriceId
=
model
.
ID
});
List
<
RB_Logistics_RulesRegion_Extend
>
listLogisticsRulesRegion
=
logisticsRulesRegionRepository
.
GetListRepository
(
new
RB_Logistics_RulesRegion_Extend
{
TenantId
=
query
.
TenantId
,
RulesType
=
query
.
RulesType
,
MallBaseId
=
query
.
MallBaseId
,
RulesPriceId
=
model
.
ID
});
model
.
List
=
new
List
<
RB_Logistics_RulesRegion_Extend
>();
model
.
List
=
new
List
<
RB_Logistics_RulesRegion_Extend
>();
model
.
List
=
listLogisticsRulesRegion
;
model
.
List
=
listLogisticsRulesRegion
;
}
}
return
model
;
return
model
;
}
}
...
@@ -524,6 +524,7 @@ namespace Mall.Module.BaseSetUp
...
@@ -524,6 +524,7 @@ namespace Mall.Module.BaseSetUp
if
(
model
.
ID
==
0
)
if
(
model
.
ID
==
0
)
{
{
rulesId
=
logisticsRulesRepository
.
Insert
(
model
,
trans
);
rulesId
=
logisticsRulesRepository
.
Insert
(
model
,
trans
);
flag
=
rulesId
>
0
;
}
}
else
else
{
{
...
@@ -544,7 +545,7 @@ namespace Mall.Module.BaseSetUp
...
@@ -544,7 +545,7 @@ namespace Mall.Module.BaseSetUp
{
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Logistics_RulesRegion
.
ID
),
FiledValue
=
itemRegion
.
ID
,
OperatorEnum
=
OperatorEnum
.
Equal
}
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Logistics_RulesRegion
.
ID
),
FiledValue
=
itemRegion
.
ID
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
};
flag
=
logisticsRulesRegionRepository
.
Update
(
filedsRegion
,
whereHelpersRegion
,
trans
);
logisticsRulesRegionRepository
.
Update
(
filedsRegion
,
whereHelpersRegion
,
trans
);
}
}
}
}
if
(
model
.
List
!=
null
&&
model
.
List
.
Any
())
if
(
model
.
List
!=
null
&&
model
.
List
.
Any
())
...
@@ -555,7 +556,7 @@ namespace Mall.Module.BaseSetUp
...
@@ -555,7 +556,7 @@ namespace Mall.Module.BaseSetUp
model
.
List
.
ForEach
(
x
=>
x
.
RulesPriceId
=
rulesId
);
model
.
List
.
ForEach
(
x
=>
x
.
RulesPriceId
=
rulesId
);
model
.
List
.
ForEach
(
x
=>
x
.
RulesType
=
model
.
RulesType
);
model
.
List
.
ForEach
(
x
=>
x
.
RulesType
=
model
.
RulesType
);
model
.
List
.
ForEach
(
x
=>
x
.
MallBaseId
=
model
.
MallBaseId
);
model
.
List
.
ForEach
(
x
=>
x
.
MallBaseId
=
model
.
MallBaseId
);
flag
=
logisticsRulesRegionRepository
.
InsertBatch
(
model
.
List
,
trans
);
logisticsRulesRegionRepository
.
InsertBatch
(
model
.
List
,
trans
);
}
}
logisticsRulesRepository
.
DBSession
.
Commit
();
logisticsRulesRepository
.
DBSession
.
Commit
();
...
...
Mall.Repository/Product/RB_Goods_OrderDetailRepository.cs
View file @
887a1820
...
@@ -99,15 +99,39 @@ namespace Mall.Repository.Product
...
@@ -99,15 +99,39 @@ namespace Mall.Repository.Product
if
(
dmodel
.
IsFinance
>
0
)
if
(
dmodel
.
IsFinance
>
0
)
{
{
if
(
dmodel
.
Is
Finance
==
1
)
if
(
dmodel
.
Is
SelectAll
==
1
)
{
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
CostFinanceId
)}
>0"
;
if
(
dmodel
.
IsFinance
==
1
)
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
CostFinanceId
)}
>0"
;
}
else
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
CostFinanceId
)}
<=0"
;
}
}
else
if
(
dmodel
.
IsSelectAll
==
2
)
{
if
(
dmodel
.
IsFinance
==
1
)
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
FreightFinanceId
)}
>0"
;
}
else
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
FreightFinanceId
)}
<=0"
;
}
}
}
else
else
{
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
CostFinanceId
)}
<=0"
;
if
(
dmodel
.
IsFinance
==
1
)
{
where
+=
$@" and (od.
{
nameof
(
RB_Goods_OrderDetail
.
FreightFinanceId
)}
>0 or od.
{
nameof
(
RB_Goods_OrderDetail
.
CostFinanceId
)}
>0)"
;
}
else
{
where
+=
$@" and (od.
{
nameof
(
RB_Goods_OrderDetail
.
FreightFinanceId
)}
<=0 or od.
{
nameof
(
RB_Goods_OrderDetail
.
CostFinanceId
)}
<= 0)"
;
}
}
}
}
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
StartTime
))
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
StartTime
))
{
{
...
@@ -168,18 +192,53 @@ where {where} order by o.CreateDate desc";
...
@@ -168,18 +192,53 @@ where {where} order by o.CreateDate desc";
{
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
SupplierId
)}
=
{
dmodel
.
SupplierId
}
"
;
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
SupplierId
)}
=
{
dmodel
.
SupplierId
}
"
;
}
}
if
(
dmodel
.
IsFinance
>
0
)
if
(
dmodel
.
IsFinance
>
0
)
{
{
if
(
dmodel
.
Is
Finance
==
1
)
if
(
dmodel
.
Is
SelectAll
==
1
)
{
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
CostFinanceId
)}
>0"
;
if
(
dmodel
.
IsFinance
==
1
)
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
CostFinanceId
)}
>0"
;
}
else
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
CostFinanceId
)}
<=0"
;
}
}
else
if
(
dmodel
.
IsSelectAll
==
2
)
{
if
(
dmodel
.
IsFinance
==
1
)
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
FreightFinanceId
)}
>0"
;
}
else
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
FreightFinanceId
)}
<=0"
;
}
}
}
else
else
{
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
CostFinanceId
)}
<=0"
;
if
(
dmodel
.
IsFinance
==
1
)
{
where
+=
$@" and (od.
{
nameof
(
RB_Goods_OrderDetail
.
FreightFinanceId
)}
>0 or od.
{
nameof
(
RB_Goods_OrderDetail
.
CostFinanceId
)}
>0)"
;
}
else
{
where
+=
$@" and (od.
{
nameof
(
RB_Goods_OrderDetail
.
FreightFinanceId
)}
<=0 or od.
{
nameof
(
RB_Goods_OrderDetail
.
CostFinanceId
)}
<= 0)"
;
}
}
}
}
}
////if (dmodel.IsFinance > 0)
////{
//// if (dmodel.IsFinance == 1)
//// {
//// where += $@" and od.{nameof(RB_Goods_OrderDetail.CostFinanceId)}>0";
//// }
//// else
//// {
//// where += $@" and od.{nameof(RB_Goods_OrderDetail.CostFinanceId)}<=0";
//// }
////}
if
(
dmodel
.
IdList
!=
null
&&
dmodel
.
IdList
.
Any
())
if
(
dmodel
.
IdList
!=
null
&&
dmodel
.
IdList
.
Any
())
{
{
string
ids
=
string
.
Join
(
","
,
dmodel
.
IdList
.
Select
(
x
=>
x
));
string
ids
=
string
.
Join
(
","
,
dmodel
.
IdList
.
Select
(
x
=>
x
));
...
...
Mall.Repository/Property/RB_WarehouseOut_ApplyRepository.cs
View file @
887a1820
...
@@ -50,10 +50,7 @@ LEFT JOIN (SELECT ApplyId,COUNT(*) as Delivered from rb_warehouseout_goods where
...
@@ -50,10 +50,7 @@ LEFT JOIN (SELECT ApplyId,COUNT(*) as Delivered from rb_warehouseout_goods where
{
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_WarehouseOut_Apply_Extend
.
OutStatus
)}
=
{
query
.
OutStatus
}
"
);
builder
.
Append
(
$" AND a.
{
nameof
(
RB_WarehouseOut_Apply_Extend
.
OutStatus
)}
=
{
query
.
OutStatus
}
"
);
}
}
if
(
query
.
SupplierId
>
0
)
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_WarehouseOut_Apply_Extend
.
SupplierId
)}
=
{
query
.
SupplierId
}
"
);
}
}
}
return
GetPage
<
RB_WarehouseOut_Apply_Extend
>(
pageIndex
,
pageSize
,
out
rowCount
,
builder
.
ToString
()).
ToList
();
return
GetPage
<
RB_WarehouseOut_Apply_Extend
>(
pageIndex
,
pageSize
,
out
rowCount
,
builder
.
ToString
()).
ToList
();
}
}
...
@@ -90,10 +87,7 @@ LEFT JOIN (SELECT ApplyId,COUNT(*) as Delivered from rb_warehouseout_goods where
...
@@ -90,10 +87,7 @@ LEFT JOIN (SELECT ApplyId,COUNT(*) as Delivered from rb_warehouseout_goods where
{
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_WarehouseOut_Apply_Extend
.
ApplyStatus
)}
=
{
query
.
ApplyStatus
}
"
);
builder
.
Append
(
$" AND a.
{
nameof
(
RB_WarehouseOut_Apply_Extend
.
ApplyStatus
)}
=
{
query
.
ApplyStatus
}
"
);
}
}
if
(
query
.
SupplierId
>
0
)
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_WarehouseOut_Apply_Extend
.
SupplierId
)}
=
{
query
.
SupplierId
}
"
);
}
}
}
return
Get
<
RB_WarehouseOut_Apply_Extend
>(
builder
.
ToString
()).
ToList
();
return
Get
<
RB_WarehouseOut_Apply_Extend
>(
builder
.
ToString
()).
ToList
();
}
}
...
...
Mall.Repository/Property/RB_WarehouseOut_GoodsRepository.cs
View file @
887a1820
...
@@ -146,6 +146,11 @@ namespace Mall.Repository.Property
...
@@ -146,6 +146,11 @@ namespace Mall.Repository.Property
{
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_WarehouseOut_Goods_Extend
.
SupplierId
)}
=
{
query
.
SupplierId
}
"
);
builder
.
Append
(
$" AND a.
{
nameof
(
RB_WarehouseOut_Goods_Extend
.
SupplierId
)}
=
{
query
.
SupplierId
}
"
);
}
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
OrderGoodsIds
))
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_WarehouseOut_Goods_Extend
.
OrderGoodsId
)}
in (
{
query
.
OrderGoodsIds
}
)"
);
}
}
}
return
Get
<
RB_WarehouseOut_Goods_Extend
>(
builder
.
ToString
()).
ToList
();
return
Get
<
RB_WarehouseOut_Goods_Extend
>(
builder
.
ToString
()).
ToList
();
}
}
...
...
Mall.Repository/User/RB_Member_UserRepository.cs
View file @
887a1820
...
@@ -533,7 +533,7 @@ WHERE u.TenantId={tenantId} and u.MallBaseId={mallBaseId} and u.SuperiorId ={use
...
@@ -533,7 +533,7 @@ WHERE u.TenantId={tenantId} and u.MallBaseId={mallBaseId} and u.SuperiorId ={use
}
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
Name
))
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
Name
))
{
{
where
+=
$@" and (a.
{
nameof
(
RB_Member_User
.
Name
)}
like '%
{
dmodel
.
Name
}
%' or a.
{
nameof
(
RB_Member_User
.
Id
)}
like '%
{
dmodel
.
Name
}
%
')"
;
where
+=
$@" and (a.
{
nameof
(
RB_Member_User
.
Name
)}
like '%
{
dmodel
.
Name
}
%' or a.
{
nameof
(
RB_Member_User
.
Id
)}
= '
{
dmodel
.
Name
}
')"
;
}
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
AliasName
))
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
AliasName
))
{
{
...
...
Mall.WebApi/Controllers/Property/WarehouseOutController.cs
View file @
887a1820
...
@@ -77,10 +77,7 @@ namespace Mall.WebApi.Controllers.Property
...
@@ -77,10 +77,7 @@ namespace Mall.WebApi.Controllers.Property
{
{
return
ApiResult
.
ParamIsNull
(
"请传递参数"
);
return
ApiResult
.
ParamIsNull
(
"请传递参数"
);
}
}
if
(
demodel
.
SupplierId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请选择供应商"
);
}
if
(
demodel
.
WarehouseOutGoodsList
==
null
||
!
demodel
.
WarehouseOutGoodsList
.
Any
())
if
(
demodel
.
WarehouseOutGoodsList
==
null
||
!
demodel
.
WarehouseOutGoodsList
.
Any
())
{
{
return
ApiResult
.
ParamIsNull
(
"请选择商品"
);
return
ApiResult
.
ParamIsNull
(
"请选择商品"
);
...
...
Mall.WebApi/Controllers/User/SupplierController.cs
View file @
887a1820
...
@@ -228,6 +228,7 @@ namespace Mall.WebApi.Controllers.User
...
@@ -228,6 +228,7 @@ namespace Mall.WebApi.Controllers.User
x
.
CostMoney
,
x
.
CostMoney
,
x
.
FreightCostMoney
,
x
.
FreightCostMoney
,
x
.
CostFinanceId
,
x
.
CostFinanceId
,
x
.
FreightFinanceId
,
x
.
Id
,
x
.
Id
,
x
.
OrderId
x
.
OrderId
});
});
...
@@ -256,6 +257,7 @@ namespace Mall.WebApi.Controllers.User
...
@@ -256,6 +257,7 @@ namespace Mall.WebApi.Controllers.User
record
.
MallBaseId
=
demodel
.
MallBaseId
;
record
.
MallBaseId
=
demodel
.
MallBaseId
;
record
.
TenantId
=
demodel
.
TenantId
;
record
.
TenantId
=
demodel
.
TenantId
;
record
.
Type
=
2
;
record
.
Type
=
2
;
record
.
IsFinanceAll
=
demodel
.
IsSelectAll
;
record
.
CreateDate
=
System
.
DateTime
.
Now
;
record
.
CreateDate
=
System
.
DateTime
.
Now
;
record
.
RecordDetailList
=
new
List
<
RB_Finance_RecordDetail
>();
record
.
RecordDetailList
=
new
List
<
RB_Finance_RecordDetail
>();
...
@@ -276,20 +278,26 @@ namespace Mall.WebApi.Controllers.User
...
@@ -276,20 +278,26 @@ namespace Mall.WebApi.Controllers.User
}
}
foreach
(
var
orderGoodsItem
in
list
)
foreach
(
var
orderGoodsItem
in
list
)
{
{
if
(
orderGoodsItem
.
CostMoney
>
0
)
if
(
demodel
.
IsSelectAll
==
0
||
demodel
.
IsSelectAll
==
1
)
{
{
var
newOrderGoods
=
new
RB_Goods_OrderDetail_Extend
();
if
(
orderGoodsItem
.
CostMoney
>
0
)
newOrderGoods
=
orderGoodsItem
;
{
newOrderGoods
.
FinanceType
=
1
;
var
newOrderGoods
=
new
RB_Goods_OrderDetail_Extend
();
result
.
Add
(
newOrderGoods
);
newOrderGoods
=
orderGoodsItem
;
newOrderGoods
.
FinanceType
=
1
;
result
.
Add
(
newOrderGoods
);
}
}
}
if
(
orderGoodsItem
.
FreightCostMoney
.
HasValue
&&
orderGoodsItem
.
FreightCostMoney
.
Value
>
0
)
else
if
(
demodel
.
IsSelectAll
==
0
||
demodel
.
IsSelectAll
==
2
)
{
{
var
newOrderGoods
=
new
RB_Goods_OrderDetail_Extend
();
if
(
orderGoodsItem
.
FreightCostMoney
.
HasValue
&&
orderGoodsItem
.
FreightCostMoney
.
Value
>
0
)
newOrderGoods
=
orderGoodsItem
;
{
newOrderGoods
.
FinanceType
=
2
;
var
newOrderGoods
=
new
RB_Goods_OrderDetail_Extend
();
result
.
Add
(
newOrderGoods
);
newOrderGoods
=
orderGoodsItem
;
newOrderGoods
.
FinanceType
=
2
;
result
.
Add
(
newOrderGoods
);
}
}
}
RB_Finance_RecordDetail
financeRecordDetail
=
new
RB_Finance_RecordDetail
RB_Finance_RecordDetail
financeRecordDetail
=
new
RB_Finance_RecordDetail
{
{
...
@@ -319,6 +327,21 @@ namespace Mall.WebApi.Controllers.User
...
@@ -319,6 +327,21 @@ namespace Mall.WebApi.Controllers.User
UnitPrice
=
x
.
FinanceType
==
1
?
((
x
.
CostMoney
??
0
))
:
x
.
FreightCostMoney
,
UnitPrice
=
x
.
FinanceType
==
1
?
((
x
.
CostMoney
??
0
))
:
x
.
FreightCostMoney
,
Remark
=
x
.
GoodsName
+
x
.
OrderNo
Remark
=
x
.
GoodsName
+
x
.
OrderNo
});
});
decimal
totalMonry
=
0
;
if
(
demodel
.
IsSelectAll
==
0
)
{
totalMonry
=
result
.
Sum
(
x
=>
((
x
.
CostMoney
??
0
)
*
(
x
.
Number
??
0
))
+
(
x
.
FreightCostMoney
??
0
));
}
else
if
(
demodel
.
IsSelectAll
==
1
)
{
totalMonry
=
result
.
Sum
(
x
=>
((
x
.
CostMoney
??
0
)
*
(
x
.
Number
??
0
)));
}
else
if
(
demodel
.
IsSelectAll
==
2
)
{
totalMonry
=
result
.
Sum
(
x
=>
(
x
.
FreightCostMoney
??
0
));
}
var
financeObj
=
new
var
financeObj
=
new
{
{
CreateBy
=
Config
.
ExpendDirector
,
CreateBy
=
Config
.
ExpendDirector
,
...
@@ -326,7 +349,7 @@ namespace Mall.WebApi.Controllers.User
...
@@ -326,7 +349,7 @@ namespace Mall.WebApi.Controllers.User
ClientType
=
supplierModel
.
ClientBankAccount
.
Type
,
ClientType
=
supplierModel
.
ClientBankAccount
.
Type
,
ClientID
=
supplierModel
.
BankAccountId
,
ClientID
=
supplierModel
.
BankAccountId
,
CurrencyId
=
financeConfigurineModel
.
CurrencyId
,
CurrencyId
=
financeConfigurineModel
.
CurrencyId
,
WBMoney
=
result
.
Sum
(
x
=>
((
x
.
CostMoney
??
0
)
*
(
x
.
Number
??
0
))
+
(
x
.
FreightCostMoney
??
0
))
,
WBMoney
=
totalMonry
,
RB_Branch_Id
=
Config
.
ExpendBranchId
,
RB_Branch_Id
=
Config
.
ExpendBranchId
,
PayDate
=
System
.
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
),
PayDate
=
System
.
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
),
TemplateId
=
financeConfigurineModel
.
WorkFlowId
,
TemplateId
=
financeConfigurineModel
.
WorkFlowId
,
...
@@ -334,7 +357,7 @@ namespace Mall.WebApi.Controllers.User
...
@@ -334,7 +357,7 @@ namespace Mall.WebApi.Controllers.User
OtherType
=
13
,
OtherType
=
13
,
Remark
=
System
.
DateTime
.
Now
.
ToString
(
"yyyy年MM月dd日"
)
+
"生成财务单据"
,
Remark
=
System
.
DateTime
.
Now
.
ToString
(
"yyyy年MM月dd日"
)
+
"生成财务单据"
,
detailList
,
detailList
,
RB_Depart_Id
=
Config
.
ExpendDepartment
RB_Depart_Id
=
Config
.
ExpendDepartment
};
};
string
sign
=
EncryptionHelper
.
AesEncrypt
(
JsonHelper
.
Serialize
(
financeObj
),
Config
.
FinanceKey
);
string
sign
=
EncryptionHelper
.
AesEncrypt
(
JsonHelper
.
Serialize
(
financeObj
),
Config
.
FinanceKey
);
var
resultInfo
=
new
var
resultInfo
=
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