Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-api-boot-master
Commits
156f8582
Commit
156f8582
authored
Nov 06, 2024
by
zhengyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
理货订单列表返回订单的全部入仓特性名称集合
parent
70fa3239
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
3 deletions
+30
-3
BoxServiceImpl.java
...der/yudao/module/shipment/service/box/BoxServiceImpl.java
+26
-3
BoxTallyBackVO.java
...der/yudao/module/shipment/vo/boxTally/BoxTallyBackVO.java
+4
-0
No files found.
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/box/BoxServiceImpl.java
View file @
156f8582
...
...
@@ -2147,10 +2147,19 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
//以secId排序
goodsItemList
.
sort
(
Comparator
.
comparing
(
BoxPreloadGoodsBackVO:
:
getSecId
));
List
<
ProductAttrDO
>
productAttrDOList
=
productAttrService
.
getProductAttrList
();
Map
<
String
,
String
>
idNameMap
=
productAttrDOList
.
stream
()
.
collect
(
Collectors
.
toMap
(
attr
->
String
.
valueOf
(
attr
.
getId
()),
ProductAttrDO:
:
getAttrName
));
//以订单ID分组
Map
<
Long
,
List
<
BoxPreloadGoodsBackVO
>>
orderMap
=
goodsItemList
.
stream
()
Map
<
Long
,
List
<
BoxPreloadGoodsBackVO
>>
orderMap
=
goodsItemList
.
stream
().
peek
(
item
->{
item
.
setAttrNameList
(
getAttrNameByIds
(
item
.
getProdAttrIds
(),
idNameMap
)
);
item
.
setWarehouseInAttrNameList
(
getAttrNameByIds
(
item
.
getWarehouseInProdAttrIds
(),
idNameMap
)
);
})
.
collect
(
Collectors
.
groupingBy
(
BoxPreloadGoodsBackVO:
:
getOrderId
));
List
<
BoxTallyDO
>
tallyDOList
=
boxTallyService
.
list
(
new
LambdaQueryWrapper
<
BoxTallyDO
>()
.
eq
(
BoxTallyDO:
:
getShipmentId
,
shipmentId
)
);
...
...
@@ -2174,7 +2183,8 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
if
(
boxTallyDO
!=
null
)
{
BeanUtils
.
copyProperties
(
boxTallyDO
,
boxTallyBackVO
);
}
Set
<
String
>
allWarehouseInAttrNameList
=
orderGoodsItemList
.
stream
().
map
(
BoxPreloadGoodsBackVO:
:
getWarehouseInAttrNameList
).
collect
(
Collectors
.
toSet
());
boxTallyBackVO
.
setAllWarehouseInAttrNameList
(
allWarehouseInAttrNameList
);
BoxPreloadGoodsBackVO
boxPreloadGoodsDO
=
orderGoodsItemList
.
get
(
0
);
boxTallyBackVO
.
setAdvanceType
(
boxPreloadGoodsDO
.
getAdvanceType
());
boxTallyBackVO
.
setOrderNo
(
boxPreloadGoodsDO
.
getOrderNo
());
...
...
@@ -2222,6 +2232,19 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
return
boxTallyBackVOS
;
}
private
List
<
String
>
getAttrNameByIds
(
String
attrIds
,
Map
<
String
,
String
>
idNameMap
)
{
if
(
StringUtils
.
isNotBlank
(
attrIds
))
{
String
[]
attrIdArray
=
attrIds
.
split
(
","
);
List
<
String
>
nameList
=
new
ArrayList
<>();
for
(
String
attrId
:
attrIdArray
)
{
//map一定包含数据,否则是数据错误
nameList
.
add
(
idNameMap
.
get
(
attrId
));
}
return
nameList
;
}
return
null
;
}
@Override
public
List
<
BoxGuanlianOrderBackVO
>
getGuanLianOrderList
(
Long
orderId
)
{
List
<
BoxGuanlianOrderBackVO
>
boxGuanlianBackVOS
=
new
ArrayList
<>();
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/vo/boxTally/BoxTallyBackVO.java
View file @
156f8582
...
...
@@ -9,6 +9,7 @@ import org.springframework.format.annotation.DateTimeFormat;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Set
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
;
...
...
@@ -80,5 +81,8 @@ public class BoxTallyBackVO {
@ApiModelProperty
(
value
=
"是否有关联单"
)
private
Boolean
hasRelationOrder
=
false
;
@ApiModelProperty
(
value
=
"订单全部入仓特性"
)
private
Set
<
String
>
allWarehouseInAttrNameList
;
}
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