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
21de4655
Commit
21de4655
authored
Jun 09, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
06e0b0cc
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
186 additions
and
4 deletions
+186
-4
Config.cs
Mall.Common/Config.cs
+11
-0
RB_Goods_Order.cs
Mall.Model/Entity/Product/RB_Goods_Order.cs
+2
-0
RB_Goods_OrderDetail.cs
Mall.Model/Entity/Product/RB_Goods_OrderDetail.cs
+6
-0
RB_Goods_OrderDetail_Extend.cs
Mall.Model/Extend/Product/RB_Goods_OrderDetail_Extend.cs
+12
-0
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+16
-0
RB_Goods_OrderDetailRepository.cs
Mall.Repository/Product/RB_Goods_OrderDetailRepository.cs
+76
-3
SupplierController.cs
Mall.WebApi/Controllers/User/SupplierController.cs
+61
-1
appsettings.json
Mall.WebApi/appsettings.json
+1
-0
appsettings.json
Mall.WindowsService/appsettings.json
+1
-0
No files found.
Mall.Common/Config.cs
View file @
21de4655
...
...
@@ -397,6 +397,17 @@ namespace Mall.Common
}
}
/// <summary>
/// 生成付款成本财务单据
/// </summary>
public
static
string
PaymentFinanceApi
{
get
{
return
new
ConfigurationBuilder
().
Add
(
new
JsonConfigurationSource
{
Path
=
"appsettings.json"
}).
Build
().
GetSection
(
"PaymentFinanceApi"
).
Value
;
}
}
}
}
\ No newline at end of file
Mall.Model/Entity/Product/RB_Goods_Order.cs
View file @
21de4655
...
...
@@ -295,5 +295,7 @@ namespace Mall.Model.Entity.Product
/// 拒绝取消订单得备注
/// </summary>
public
string
RejectRemark
{
get
;
set
;
}
}
}
Mall.Model/Entity/Product/RB_Goods_OrderDetail.cs
View file @
21de4655
...
...
@@ -198,5 +198,11 @@ namespace Mall.Model.Entity.Product
/// 供应商id
/// </summary>
public
int
SupplierId
{
get
;
set
;
}
/// <summary>
/// 成本单据ID
/// </summary>
public
int
CostFinanceId
{
get
;
set
;
}
}
}
Mall.Model/Extend/Product/RB_Goods_OrderDetail_Extend.cs
View file @
21de4655
...
...
@@ -110,5 +110,17 @@ namespace Mall.Model.Extend.Product
/// </summary>
public
int
FinanceType
{
get
;
set
;
}
#
endregion
#
region
供应商商品信息
public
string
StartTime
{
get
;
set
;
}
public
string
EndTime
{
get
;
set
;
}
/// <summary>
/// 是否制单
/// </summary>
public
int
IsFinance
{
get
;
set
;
}
#
endregion
}
}
Mall.Module.Product/OrderModule.cs
View file @
21de4655
...
...
@@ -6509,5 +6509,21 @@ namespace Mall.Module.Product
return
OrderId
>
0
;
}
#
endregion
#
region
供应商订单商品信息
/// <summary>
/// 获取订单商品分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="count"></param>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Goods_OrderDetail_Extend
>
GetSupplierOrderPageList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Goods_OrderDetail_Extend
dmodel
)
{
return
goods_OrderDetailRepository
.
GetSupplierOrderPageList
(
pageIndex
,
pageSize
,
out
count
,
dmodel
);
}
#
endregion
}
}
Mall.Repository/Product/RB_Goods_OrderDetailRepository.cs
View file @
21de4655
...
...
@@ -33,7 +33,7 @@ namespace Mall.Repository.Product
{
where
+=
$@" and
{
nameof
(
RB_Goods_OrderDetail
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
OrderDetailIds
))
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
OrderDetailIds
))
{
where
+=
$@" and
{
nameof
(
RB_Goods_OrderDetail
.
Id
)}
in(
{
dmodel
.
OrderDetailIds
}
)"
;
}
...
...
@@ -45,7 +45,8 @@ namespace Mall.Repository.Product
{
where
+=
$@" and
{
nameof
(
RB_Goods_OrderDetail
.
OrderType
)}
=
{(
int
)
dmodel
.
OrderType
}
"
;
}
if
(
dmodel
.
IsComment
>
0
)
{
if
(
dmodel
.
IsComment
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Goods_OrderDetail
.
IsComment
)}
=
{(
int
)
dmodel
.
IsComment
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
GoodsName
))
...
...
@@ -56,7 +57,7 @@ namespace Mall.Repository.Product
{
where
+=
$@" and
{
nameof
(
RB_Goods_OrderDetail
.
ProductCode
)}
like '%
{
dmodel
.
ProductCode
}
%'"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
OrderIds
))
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
OrderIds
))
{
where
+=
$@" and
{
nameof
(
RB_Goods_OrderDetail
.
OrderId
)}
in(
{
dmodel
.
OrderIds
}
)"
;
}
...
...
@@ -64,5 +65,77 @@ namespace Mall.Repository.Product
string
sql
=
$@"SELECT * FROM rb_goods_orderdetail where
{
where
}
order by Id asc"
;
return
Get
<
RB_Goods_OrderDetail_Extend
>(
sql
).
ToList
();
}
/// <summary>
/// 获取订单商品分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="count"></param>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Goods_OrderDetail_Extend
>
GetSupplierOrderPageList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Goods_OrderDetail_Extend
dmodel
)
{
string
where
=
$" 1=1 and o.
{
nameof
(
RB_Goods_Order
.
Status
)}
=0 and o.OrderStatus in(2,3,4,5,6) "
;
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(
dmodel
.
OrderType
>
0
)
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
OrderType
)}
=
{
dmodel
.
OrderType
}
"
;
}
if
(
dmodel
.
SupplierId
>
0
)
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
SupplierId
)}
=
{
dmodel
.
SupplierId
}
"
;
}
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
(!
string
.
IsNullOrEmpty
(
dmodel
.
StartTime
))
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
CreateDate
)}
>='
{
dmodel
.
StartTime
}
'"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
EndTime
))
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
CreateDate
)}
<='
{
dmodel
.
EndTime
}
23:59:59'"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
OrderNo
))
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
OrderNo
)}
like '%
{
dmodel
.
OrderNo
}
%'"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
GoodsName
))
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
GoodsName
)}
like '%
{
dmodel
.
GoodsName
}
%'"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
ProductCode
))
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
ProductCode
)}
like '%
{
dmodel
.
ProductCode
}
%'"
;
}
string
sql
=
$@"SELECT od.*,o.OrderNo FROM rb_goods_orderdetail od
INNER JOIN rb_goods_order o on o.OrderId=od.OrderId
where
{
where
}
order by o.CreateDate desc"
;
return
GetPage
<
RB_Goods_OrderDetail_Extend
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
}
}
}
Mall.WebApi/Controllers/User/SupplierController.cs
View file @
21de4655
...
...
@@ -5,7 +5,9 @@ using System.Threading.Tasks;
using
Mall.Common
;
using
Mall.Common.API
;
using
Mall.Common.Plugin
;
using
Mall.Model.Extend.Product
;
using
Mall.Model.Extend.User
;
using
Mall.Module.Product
;
using
Mall.Module.User
;
using
Mall.WebApi.Filter
;
using
Microsoft.AspNetCore.Cors
;
...
...
@@ -22,8 +24,12 @@ namespace Mall.WebApi.Controllers.User
public
class
SupplierController
:
BaseController
{
private
readonly
SupplierModule
supplierModule
=
new
SupplierModule
();
/// <summary>
/// 订单
/// </summary>
private
readonly
OrderModule
orderModule
=
new
OrderModule
();
#
region
供应商管理
[
HttpPost
]
public
ApiResult
GetSupplierList
()
{
...
...
@@ -163,5 +169,59 @@ namespace Mall.WebApi.Controllers.User
return
ApiResult
.
Failed
();
}
}
/// <summary>
/// 获取详情
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetSupplierAllList
()
{
var
parms
=
RequestParm
;
var
query
=
JsonConvert
.
DeserializeObject
<
RB_Supplier_Extend
>(
RequestParm
.
msg
.
ToString
());
query
.
TenantId
=
UserInfo
.
TenantId
;
query
.
MallBaseId
=
parms
.
MallBaseId
;
var
oldLogisticsList
=
supplierModule
.
GetList
(
query
);
return
ApiResult
.
Success
(
""
,
oldLogisticsList
);
}
#
endregion
#
region
供应商采购商品信息
/// <summary>
/// 供应商商品信息
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetSupplierGoodsList
()
{
var
parms
=
RequestParm
;
ResultPageModel
pagelist
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
RB_Goods_OrderDetail_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Goods_OrderDetail_Extend
>(
RequestParm
.
msg
.
ToString
());
demodel
.
TenantId
=
UserInfo
.
TenantId
;
demodel
.
MallBaseId
=
parms
.
MallBaseId
;
var
list
=
orderModule
.
GetSupplierOrderPageList
(
pagelist
.
pageIndex
,
pagelist
.
pageSize
,
out
long
count
,
demodel
);
pagelist
.
count
=
Convert
.
ToInt32
(
count
);
pagelist
.
pageData
=
list
.
Select
(
x
=>
new
{
x
.
SupplierId
,
x
.
OrderNo
,
x
.
GoodsName
,
x
.
Original_Price
,
x
.
CostMoney
,
x
.
FreightCostMoney
,
x
.
CostFinanceId
,
x
.
Id
,
x
.
OrderId
});
return
ApiResult
.
Success
(
""
,
pagelist
);
}
#
endregion
}
}
\ No newline at end of file
Mall.WebApi/appsettings.json
View file @
21de4655
...
...
@@ -32,6 +32,7 @@
"RB_Branch_Id"
:
49
,
//所属公司id
"RebornDMC"
:
"reborn_dmc"
,
"IncomeFinanceApi"
:
"http://192.168.2.16:8083/api/Mall/InsertFinanceBatchForMallIn"
,
"PaymentFinanceApi"
:
"http://192.168.2.16:8083/api/Mall/InsertFinanceBatchForMallOut"
,
"FinanceKey"
:
"FinanceMallInsertToERPViitto2020"
,
"RedisSetting"
:
{
"RedisServer"
:
"192.168.2.214"
,
...
...
Mall.WindowsService/appsettings.json
View file @
21de4655
...
...
@@ -32,6 +32,7 @@
"RB_Branch_Id"
:
49
,
//所属公司id
"RebornDMC"
:
"reborn_dmc"
,
"IncomeFinanceApi"
:
"http://192.168.2.16:8083/api/Mall/InsertFinanceBatchForMallIn"
,
"PaymentFinanceApi"
:
"http://192.168.2.16:8083/api/Mall/InsertFinanceBatchForMallOut"
,
//
"FinanceKey"
:
"FinanceMallInsertToERPViitto2020"
,
"FinanceKey"
:
"FinanceMallInsertToERPViitto2020"
,
"RedisSetting"
:
{
...
...
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