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
c35f1042
Commit
c35f1042
authored
Jun 12, 2024
by
liuzeheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
579c56d3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
27 deletions
+17
-27
ShipmentLoadExcelExportListener.java
...le/shipment/listener/ShipmentLoadExcelExportListener.java
+17
-27
No files found.
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/listener/ShipmentLoadExcelExportListener.java
View file @
c35f1042
...
@@ -273,7 +273,7 @@ public class ShipmentLoadExcelExportListener {
...
@@ -273,7 +273,7 @@ public class ShipmentLoadExcelExportListener {
List
<
Integer
>
mergeCountList
=
new
ArrayList
();
List
<
Integer
>
mergeCountList
=
new
ArrayList
();
List
<
Integer
>
colorRowList
=
new
ArrayList
<>();
List
<
Integer
>
colorRowList
=
new
ArrayList
<>();
AtomicInteger
colorRowNum
=
new
AtomicInteger
(
8
);
AtomicInteger
colorRowNum
=
new
AtomicInteger
(
5
);
Map
<
String
,
Integer
>
colorMap
=
new
HashMap
<>();
Map
<
String
,
Integer
>
colorMap
=
new
HashMap
<>();
Map
<
String
,
Integer
>
mergePkgCountMap
=
new
LinkedHashMap
<>();
Map
<
String
,
Integer
>
mergePkgCountMap
=
new
LinkedHashMap
<>();
int
colorIndex
=
0
;
int
colorIndex
=
0
;
...
@@ -301,37 +301,27 @@ public class ShipmentLoadExcelExportListener {
...
@@ -301,37 +301,27 @@ public class ShipmentLoadExcelExportListener {
colorRowList
.
add
(
andIncrement
);
//这里加1是为了设置颜色时过滤掉入仓记录那条
colorRowList
.
add
(
andIncrement
);
//这里加1是为了设置颜色时过滤掉入仓记录那条
}
}
}
}
//
int mergeCount = 1;
int
mergeCount
=
1
;
//
if (StringUtils.isNotBlank(item.getOrderWarehouseInDetails())) {
if
(
StringUtils
.
isNotBlank
(
item
.
getOrderWarehouseInDetails
()))
{
//
item.setOrderWarehouseInDetailsVOList(JsonUtils.parseArray(item.getOrderWarehouseInDetails(), OrderWarehouseInDetailsVO.class));
item
.
setOrderWarehouseInDetailsVOList
(
JsonUtils
.
parseArray
(
item
.
getOrderWarehouseInDetails
(),
OrderWarehouseInDetailsVO
.
class
));
//
}
}
//
if (CollectionUtil.isNotEmpty(item.getOrderWarehouseInDetailsVOList())) {
if
(
CollectionUtil
.
isNotEmpty
(
item
.
getOrderWarehouseInDetailsVOList
()))
{
//
mergeCount = mergeCount + item.getOrderWarehouseInDetailsVOList().size();
mergeCount
=
mergeCount
+
item
.
getOrderWarehouseInDetailsVOList
().
size
();
//
List<OrderWarehouseInDetailsVO> orderWarehouseInDetailsVOList =
List
<
OrderWarehouseInDetailsVO
>
orderWarehouseInDetailsVOList
=
//
item.getOrderWarehouseInDetailsVOList();
item
.
getOrderWarehouseInDetailsVOList
();
//
for (int j = 0; j < orderWarehouseInDetailsVOList.size(); j++) {
for
(
int
j
=
0
;
j
<
orderWarehouseInDetailsVOList
.
size
();
j
++)
{
//
int andIncrement1 = colorRowNum.getAndIncrement();
int
andIncrement1
=
colorRowNum
.
getAndIncrement
();
//
colorMap.put(String.valueOf(andIncrement1),colorList.get(colorIndex));
colorMap
.
put
(
String
.
valueOf
(
andIncrement1
),
colorList
.
get
(
colorIndex
));
//
colorRowList.add(andIncrement1);
colorRowList
.
add
(
andIncrement1
);
//
}
}
//
}
}
//
mergeCountList.add(mergeCount);
mergeCountList
.
add
(
mergeCount
);
if
(
colorIndex
==
7
)
{
if
(
colorIndex
==
7
)
{
colorIndex
=
0
;
colorIndex
=
0
;
}
else
{
}
else
{
colorIndex
++;
colorIndex
++;
}
}
//合包那几个列合并单元格计算
// if (pkgId.longValue() != 0L) {
// if (mergePkgCountMap.get(String.valueOf(pkgId)) == null) {
// mergePkgCountMap.put(String.valueOf(pkgId),mergeCount);
// } else {
// Integer sumMergePkgCount = mergePkgCountMap.get(String.valueOf(pkgId)) + mergeCount;
// mergePkgCountMap.put(String.valueOf(pkgId),sumMergePkgCount);
// }
// } else {
// mergePkgCountMap.put(String.valueOf(item.getId()),mergeCount);
// }
}
}
}
}
...
...
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