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
65c58a2c
Commit
65c58a2c
authored
Jul 27, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
87f6ad82
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
197 additions
and
51 deletions
+197
-51
RB_WarehouseOut_Goods.cs
Mall.Model/Entity/Property/RB_WarehouseOut_Goods.cs
+26
-1
RB_Goods_OrderDetail_Extend.cs
Mall.Model/Extend/Product/RB_Goods_OrderDetail_Extend.cs
+25
-0
PropertyModule.cs
Mall.Module.Property/PropertyModule.cs
+94
-49
RB_Supplies_MaterialRepository.cs
Mall.Repository/Property/RB_Supplies_MaterialRepository.cs
+4
-0
WarehouseOutController.cs
Mall.WebApi/Controllers/Property/WarehouseOutController.cs
+48
-1
No files found.
Mall.Model/Entity/Property/RB_WarehouseOut_Goods.cs
View file @
65c58a2c
...
...
@@ -99,6 +99,31 @@ namespace Mall.Model.Entity.Property
/// </summary>
public
string
SpecificationSort
{
get
;
set
;
}
/// <summary>
/// 规格key(出库的规格),没有修改为
/// </summary>
public
string
NewSpecificationSort
{
get
;
set
;
}
/// <summary>
/// 规格(出库的规格名称)
/// </summary>
public
string
NewSpecification
{
get
;
set
;
}
/// <summary>
/// 规格(出库的数量)
/// </summary>
public
int
NewNumber
{
get
;
set
;
}
/// <summary>
/// 货号
/// </summary>
...
...
Mall.Model/Extend/Product/RB_Goods_OrderDetail_Extend.cs
View file @
65c58a2c
...
...
@@ -155,5 +155,30 @@ namespace Mall.Model.Extend.Product
/// </summary>
public
int
IsSelectAll
{
get
;
set
;
}
/// <summary>
/// 规格key(出库的规格),没有修改为
/// </summary>
public
string
NewSpecificationSort
{
get
;
set
;
}
/// <summary>
/// 规格(出库的规格名称)
/// </summary>
public
string
NewSpecification
{
get
;
set
;
}
/// <summary>
/// 规格(出库的数量)
/// </summary>
public
int
NewNumber
{
get
;
set
;
}
}
}
Mall.Module.Property/PropertyModule.cs
View file @
65c58a2c
This diff is collapsed.
Click to expand it.
Mall.Repository/Property/RB_Supplies_MaterialRepository.cs
View file @
65c58a2c
...
...
@@ -93,6 +93,10 @@ left join rb_property_category pc on sm.CategoryId=pc.Id
{
where
+=
" and sm."
+
nameof
(
RB_Supplies_Material_Extend
.
CategoryId
)
+
"="
+
dmodel
.
CategoryId
;
}
if
(
dmodel
.
GoodsId
>
0
)
{
where
+=
" and sm."
+
nameof
(
RB_Supplies_Material_Extend
.
GoodsId
)
+
"="
+
dmodel
.
GoodsId
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
SuppliesIdStr
))
{
where
+=
" and sm."
+
nameof
(
RB_Supplies_Material_Extend
.
Id
)
+
" in("
+
dmodel
.
SuppliesIdStr
+
")"
;
}
...
...
Mall.WebApi/Controllers/Property/WarehouseOutController.cs
View file @
65c58a2c
...
...
@@ -24,6 +24,7 @@ namespace Mall.WebApi.Controllers.Property
private
readonly
WarehouseOutModule
warehouseOutModule
=
new
WarehouseOutModule
();
private
readonly
OrderModule
orderModule
=
new
OrderModule
();
private
readonly
PropertyModule
propertyModule
=
new
PropertyModule
();
/// <summary>
/// 获取出库申请列表
...
...
@@ -59,6 +60,24 @@ namespace Mall.WebApi.Controllers.Property
/// <summary>
/// 根据商品id获取物料规格信息
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetSuppliesMaterialList
()
{
var
parms
=
RequestParm
;
// var materialList = propertyModule.GetSuppliesMaterialList(new RB_Supplies_Material_Extend { GoodsIds = goodsIds, RB_Group_Id = requestParm.ERPGroupId, TenantId = requestParm.TenantId, MallBaseId = requestParm.MallBaseId });
RB_Supplies_Material_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Supplies_Material_Extend
>(
parms
.
msg
.
ToString
());
demodel
.
TenantId
=
parms
.
TenantId
;
demodel
.
MallBaseId
=
parms
.
MallBaseId
;
demodel
.
RB_Group_Id
=
parms
.
ERPGroupId
;
var
list
=
propertyModule
.
GetSuppliesMaterialList
(
demodel
);
return
ApiResult
.
Success
(
""
,
list
);
}
/// <summary>
/// 提交出库申请
/// </summary>
...
...
@@ -89,6 +108,7 @@ namespace Mall.WebApi.Controllers.Property
return
ApiResult
.
ParamIsNull
(
"订单商品id未传递"
);
}
}
//根据订单商品id查询商品信息
var
orderGoodsIds
=
string
.
Join
(
","
,
demodel
.
WarehouseOutGoodsList
.
Select
(
x
=>
x
.
OrderGoodsId
));
var
orderGoodsList
=
orderModule
.
GetOrderGoodsList
(
new
Model
.
Extend
.
Product
.
RB_Goods_OrderDetail_Extend
{
TenantId
=
requestParm
.
TenantId
,
MallBaseId
=
requestParm
.
MallBaseId
,
IdList
=
demodel
.
WarehouseOutGoodsList
.
Select
(
x
=>
x
.
OrderGoodsId
).
ToList
()
});
...
...
@@ -124,9 +144,33 @@ namespace Mall.WebApi.Controllers.Property
return
ApiResult
.
Failed
(
"订单号:"
+
msg
+
"的商品已申请出库,请勿重复申请"
);
}
//获取商品的出库规格物料信息
var
goodsIds
=
string
.
Join
(
","
,
orderGoodsList
.
Select
(
x
=>
x
.
GoodsId
));
var
materialList
=
propertyModule
.
GetSuppliesMaterialList
(
new
RB_Supplies_Material_Extend
{
GoodsIds
=
goodsIds
,
RB_Group_Id
=
requestParm
.
ERPGroupId
,
TenantId
=
requestParm
.
TenantId
,
MallBaseId
=
requestParm
.
MallBaseId
});
foreach
(
var
item
in
demodel
.
WarehouseOutGoodsList
)
{
if
(
item
.
NewNumber
<=
0
)
{
return
ApiResult
.
Failed
(
"出库商品数量不能小于0"
);
}
var
orderGoodsDetailModel
=
orderGoodsList
.
Where
(
x
=>
x
.
Id
==
item
.
OrderGoodsId
).
FirstOrDefault
();
if
(
item
.
NewSpecificationSort
!=
item
.
SpecificationSort
)
//修改了规格的判断新规格是否在物料中存在
{
var
materialModel
=
materialList
.
Where
(
x
=>
x
.
GoodsId
==
orderGoodsDetailModel
.
GoodsId
&&
x
.
SpecificationKey
==
item
.
NewSpecificationSort
).
FirstOrDefault
();
if
(
materialModel
==
null
)
{
return
ApiResult
.
Failed
(
"订单号:"
+
item
.
OrderNo
+
"的商品:"
+
item
.
GoodsName
+
"不存在物料请先同步"
);
}
item
.
NewSpecificationSort
=
materialModel
.
SpecificationKey
;
item
.
NewSpecification
=
materialModel
.
SpecificationName
;
}
else
//没有就直接等于订单的规格和数量
{
item
.
NewSpecificationSort
=
orderGoodsDetailModel
.
SpecificationSort
;
item
.
NewNumber
=
orderGoodsDetailModel
.
Number
.
Value
;
item
.
NewSpecification
=
orderGoodsDetailModel
.
Specification
;
}
if
(
orderGoodsDetailModel
!=
null
)
{
item
.
TenantId
=
orderGoodsDetailModel
.
TenantId
;
...
...
@@ -188,6 +232,9 @@ namespace Mall.WebApi.Controllers.Property
demodel
.
TenantId
=
parms
.
TenantId
;
demodel
.
MallBaseId
=
parms
.
MallBaseId
;
var
list
=
orderModule
.
GetNoOutOrderGoodsList
(
pagelist
.
pageIndex
,
pagelist
.
pageSize
,
out
long
count
,
demodel
);
list
.
ForEach
(
x
=>
x
.
NewSpecificationSort
=
x
.
SpecificationSort
);
list
.
ForEach
(
x
=>
x
.
NewSpecification
=
x
.
Specification
);
list
.
ForEach
(
x
=>
x
.
NewNumber
=
(
x
.
Number
??
0
));
pagelist
.
count
=
Convert
.
ToInt32
(
count
);
pagelist
.
pageData
=
list
;
return
ApiResult
.
Success
(
""
,
pagelist
);
...
...
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