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
60863148
Commit
60863148
authored
Dec 31, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交出库审核问题
parent
620e93b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
WarehouseOutController.cs
Mall.WebApi/Controllers/Property/WarehouseOutController.cs
+8
-5
No files found.
Mall.WebApi/Controllers/Property/WarehouseOutController.cs
View file @
60863148
...
...
@@ -111,8 +111,8 @@ namespace Mall.WebApi.Controllers.Property
//根据订单商品id查询商品信息
var
orderGoodsIds
=
string
.
Join
(
","
,
demodel
.
WarehouseOutGoodsList
.
Select
(
x
=>
x
.
OrderGoodsId
));
var
orderGoodsList
=
orderModule
.
GetOrderGoodsList
(
new
Model
.
Extend
.
Product
.
RB_Goods_OrderDetail_Extend
{
IsOut
=
demodel
.
IsOut
,
TenantId
=
requestParm
.
TenantId
,
MallBaseId
=
requestParm
.
MallBaseId
,
IdList
=
demodel
.
WarehouseOutGoodsList
.
Select
(
x
=>
x
.
OrderGoodsId
).
ToList
()
});
var
orderGoodsList
=
orderModule
.
GetOrderGoodsList
(
new
Model
.
Extend
.
Product
.
RB_Goods_OrderDetail_Extend
{
IsOut
=
demodel
.
IsOut
,
TenantId
=
requestParm
.
TenantId
,
MallBaseId
=
requestParm
.
MallBaseId
,
IdList
=
demodel
.
WarehouseOutGoodsList
.
Select
(
x
=>
x
.
OrderGoodsId
).
ToList
()
});
if
(
demodel
.
WarehouseOutGoodsList
.
GroupBy
(
x
=>
x
.
OrderGoodsId
).
Count
()
!=
orderGoodsList
.
Count
)
{
List
<
int
>
chajiList
=
demodel
.
WarehouseOutGoodsList
.
Select
(
x
=>
x
.
OrderGoodsId
).
Except
(
orderGoodsList
.
Select
(
x
=>
x
.
Id
)).
ToList
();
...
...
@@ -161,14 +161,17 @@ namespace Mall.WebApi.Controllers.Property
var
orderGoodsDetailModel
=
orderGoodsList
.
Where
(
x
=>
x
.
Id
==
item
.
OrderGoodsId
).
FirstOrDefault
();
if
(
item
.
NewSpecificationSort
!=
item
.
SpecificationSort
)
//修改了规格的判断新规格是否在物料中存在
{
var
materialModel
=
materialList
.
Where
(
x
=>
x
.
GoodsId
==
item
.
NewGoodsId
&&
x
.
SpecificationKey
==
item
.
NewSpecificationSort
).
FirstOrDefault
();
var
oldmaterialList
=
materialList
.
Where
(
x
=>
x
.
GoodsId
==
item
.
NewGoodsId
&&
x
.
SpecificationKey
==
item
.
NewSpecificationSort
);
var
materialModel
=
oldmaterialList
.
FirstOrDefault
();
var
orderGoodsDetail
=
orderGoodsList
.
Where
(
x
=>
x
.
Id
==
item
.
OrderGoodsId
).
FirstOrDefault
();
if
(
materialModel
==
null
)
if
(
oldmaterialList
==
null
||
!
oldmaterialList
.
Any
()
||
materialModel
==
null
)
{
return
ApiResult
.
Failed
(
"订单号:"
+
orderGoodsDetail
?.
OrderNo
+
"的商品:"
+
orderGoodsDetail
?.
GoodsName
+
"不存在物料请先同步"
);
}
if
(!
materialModel
.
InventoryNum
.
HasValue
||
(
materialModel
.
InventoryNum
??
0
)
<=
0
)
if
(
oldmaterialList
!=
null
&&
(
oldmaterialList
.
Sum
(
x
=>
x
.
InventoryNum
??
0
))
<=
0
)
{
return
ApiResult
.
Failed
(
"订单号:"
+
orderGoodsDetail
?.
OrderNo
+
"的商品:"
+
orderGoodsDetail
?.
GoodsName
+
"库存不足"
);
}
...
...
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