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
Show 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
}
/// <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
/// 成本单据ID
/// </summary>
public
int
CostFinanceId
{
get
;
set
;
}
/// <summary>
/// 运费成本单据ID
/// </summary>
public
int
FreightFinanceId
{
get
;
set
;
}
/// <summary>
/// 积分赠送
/// </summary>
...
...
Mall.Model/Entity/Property/RB_WarehouseOut_Apply.cs
View file @
887a1820
...
...
@@ -62,14 +62,7 @@ namespace Mall.Model.Entity.Property
set
;
}
/// <summary>
/// 供应商id
/// </summary>
public
int
SupplierId
{
get
;
set
;
}
/// <summary>
/// 公司
/// </summary>
...
...
Mall.Model/Extend/Product/RB_Goods_OrderDetail_Extend.cs
View file @
887a1820
...
...
@@ -145,5 +145,12 @@ namespace Mall.Model.Extend.Product
/// 供应商名称
/// </summary>
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
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
>();
...
...
@@ -210,7 +210,7 @@ namespace Mall.Module.BaseSetUp
{
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
>()
{
...
...
@@ -220,7 +220,7 @@ namespace Mall.Module.BaseSetUp
{
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
();
}
catch
(
Exception
ex
)
...
...
@@ -499,7 +499,7 @@ namespace Mall.Module.BaseSetUp
public
RB_Logistics_Rules_Extend
GetPinkageModel
(
RB_Logistics_Rules_Extend
query
)
{
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
});
model
.
List
=
new
List
<
RB_Logistics_RulesRegion_Extend
>();
...
...
@@ -524,6 +524,7 @@ namespace Mall.Module.BaseSetUp
if
(
model
.
ID
==
0
)
{
rulesId
=
logisticsRulesRepository
.
Insert
(
model
,
trans
);
flag
=
rulesId
>
0
;
}
else
{
...
...
@@ -544,7 +545,7 @@ namespace Mall.Module.BaseSetUp
{
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
())
...
...
@@ -555,7 +556,7 @@ namespace Mall.Module.BaseSetUp
model
.
List
.
ForEach
(
x
=>
x
.
RulesPriceId
=
rulesId
);
model
.
List
.
ForEach
(
x
=>
x
.
RulesType
=
model
.
RulesType
);
model
.
List
.
ForEach
(
x
=>
x
.
MallBaseId
=
model
.
MallBaseId
);
flag
=
logisticsRulesRegionRepository
.
InsertBatch
(
model
.
List
,
trans
);
logisticsRulesRegionRepository
.
InsertBatch
(
model
.
List
,
trans
);
}
logisticsRulesRepository
.
DBSession
.
Commit
();
...
...
Mall.Repository/Product/RB_Goods_OrderDetailRepository.cs
View file @
887a1820
...
...
@@ -98,6 +98,8 @@ namespace Mall.Repository.Product
}
if
(
dmodel
.
IsFinance
>
0
)
{
if
(
dmodel
.
IsSelectAll
==
1
)
{
if
(
dmodel
.
IsFinance
==
1
)
{
...
...
@@ -107,7 +109,29 @@ namespace Mall.Repository.Product
{
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
{
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
))
{
...
...
@@ -168,8 +192,9 @@ where {where} order by o.CreateDate desc";
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
SupplierId
)}
=
{
dmodel
.
SupplierId
}
"
;
}
if
(
dmodel
.
IsFinance
>
0
)
{
if
(
dmodel
.
IsSelectAll
==
1
)
{
if
(
dmodel
.
IsFinance
==
1
)
{
...
...
@@ -180,6 +205,40 @@ where {where} order by o.CreateDate desc";
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
{
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
())
{
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
{
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
();
}
...
...
@@ -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
}
"
);
}
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
();
}
...
...
Mall.Repository/Property/RB_WarehouseOut_GoodsRepository.cs
View file @
887a1820
...
...
@@ -146,6 +146,11 @@ namespace Mall.Repository.Property
{
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
();
}
...
...
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
}
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
))
{
...
...
Mall.WebApi/Controllers/Property/WarehouseOutController.cs
View file @
887a1820
...
...
@@ -77,10 +77,7 @@ namespace Mall.WebApi.Controllers.Property
{
return
ApiResult
.
ParamIsNull
(
"请传递参数"
);
}
if
(
demodel
.
SupplierId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请选择供应商"
);
}
if
(
demodel
.
WarehouseOutGoodsList
==
null
||
!
demodel
.
WarehouseOutGoodsList
.
Any
())
{
return
ApiResult
.
ParamIsNull
(
"请选择商品"
);
...
...
Mall.WebApi/Controllers/User/SupplierController.cs
View file @
887a1820
...
...
@@ -228,6 +228,7 @@ namespace Mall.WebApi.Controllers.User
x
.
CostMoney
,
x
.
FreightCostMoney
,
x
.
CostFinanceId
,
x
.
FreightFinanceId
,
x
.
Id
,
x
.
OrderId
});
...
...
@@ -256,6 +257,7 @@ namespace Mall.WebApi.Controllers.User
record
.
MallBaseId
=
demodel
.
MallBaseId
;
record
.
TenantId
=
demodel
.
TenantId
;
record
.
Type
=
2
;
record
.
IsFinanceAll
=
demodel
.
IsSelectAll
;
record
.
CreateDate
=
System
.
DateTime
.
Now
;
record
.
RecordDetailList
=
new
List
<
RB_Finance_RecordDetail
>();
...
...
@@ -275,6 +277,8 @@ namespace Mall.WebApi.Controllers.User
return
ApiResult
.
Failed
(
"供应商账户信息不存在"
);
}
foreach
(
var
orderGoodsItem
in
list
)
{
if
(
demodel
.
IsSelectAll
==
0
||
demodel
.
IsSelectAll
==
1
)
{
if
(
orderGoodsItem
.
CostMoney
>
0
)
{
...
...
@@ -284,6 +288,9 @@ namespace Mall.WebApi.Controllers.User
result
.
Add
(
newOrderGoods
);
}
}
else
if
(
demodel
.
IsSelectAll
==
0
||
demodel
.
IsSelectAll
==
2
)
{
if
(
orderGoodsItem
.
FreightCostMoney
.
HasValue
&&
orderGoodsItem
.
FreightCostMoney
.
Value
>
0
)
{
var
newOrderGoods
=
new
RB_Goods_OrderDetail_Extend
();
...
...
@@ -291,6 +298,7 @@ namespace Mall.WebApi.Controllers.User
newOrderGoods
.
FinanceType
=
2
;
result
.
Add
(
newOrderGoods
);
}
}
RB_Finance_RecordDetail
financeRecordDetail
=
new
RB_Finance_RecordDetail
{
...
...
@@ -319,6 +327,21 @@ namespace Mall.WebApi.Controllers.User
UnitPrice
=
x
.
FinanceType
==
1
?
((
x
.
CostMoney
??
0
))
:
x
.
FreightCostMoney
,
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
{
CreateBy
=
Config
.
ExpendDirector
,
...
...
@@ -326,7 +349,7 @@ namespace Mall.WebApi.Controllers.User
ClientType
=
supplierModel
.
ClientBankAccount
.
Type
,
ClientID
=
supplierModel
.
BankAccountId
,
CurrencyId
=
financeConfigurineModel
.
CurrencyId
,
WBMoney
=
result
.
Sum
(
x
=>
((
x
.
CostMoney
??
0
)
*
(
x
.
Number
??
0
))
+
(
x
.
FreightCostMoney
??
0
))
,
WBMoney
=
totalMonry
,
RB_Branch_Id
=
Config
.
ExpendBranchId
,
PayDate
=
System
.
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
),
TemplateId
=
financeConfigurineModel
.
WorkFlowId
,
...
...
@@ -334,7 +357,7 @@ namespace Mall.WebApi.Controllers.User
OtherType
=
13
,
Remark
=
System
.
DateTime
.
Now
.
ToString
(
"yyyy年MM月dd日"
)
+
"生成财务单据"
,
detailList
,
RB_Depart_Id
=
Config
.
ExpendDepartment
RB_Depart_Id
=
Config
.
ExpendDepartment
};
string
sign
=
EncryptionHelper
.
AesEncrypt
(
JsonHelper
.
Serialize
(
financeObj
),
Config
.
FinanceKey
);
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