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
3a96e170
Commit
3a96e170
authored
Aug 07, 2024
by
huyf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
海运应收汇总bug
parent
88200fdd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
4 deletions
+25
-4
ShipmentReceivableExcelExportListener2.java
...ment/listener/ShipmentReceivableExcelExportListener2.java
+25
-4
nrlyReceivable2.xlsx
...-server/src/main/resources/templates/nrlyReceivable2.xlsx
+0
-0
nrlyReceivable3.xlsx
...-server/src/main/resources/templates/nrlyReceivable3.xlsx
+0
-0
nrlyReceivable4.xlsx
...-server/src/main/resources/templates/nrlyReceivable4.xlsx
+0
-0
No files found.
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/listener/ShipmentReceivableExcelExportListener2.java
View file @
3a96e170
...
...
@@ -20,6 +20,7 @@ import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
import
cn.iocoder.yudao.module.infra.service.file.FileService
;
import
cn.iocoder.yudao.module.order.dto.OrderBackInfoDto
;
import
cn.iocoder.yudao.module.order.service.order.*
;
import
cn.iocoder.yudao.module.order.vo.orderItem.OrderItemBackVO
;
import
cn.iocoder.yudao.module.shipment.dal.dataobject.BoxDO
;
import
cn.iocoder.yudao.module.shipment.dal.dataobject.BoxMergePkgDO
;
import
cn.iocoder.yudao.module.shipment.dal.dataobject.BoxPkgOrderDO
;
...
...
@@ -42,8 +43,7 @@ import com.alibaba.fastjson.JSONObject;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.ss.usermodel.Sheet
;
import
org.apache.poi.ss.usermodel.Workbook
;
import
org.apache.poi.ss.usermodel.*
;
import
org.apache.poi.ss.util.CellRangeAddress
;
import
org.apache.poi.xssf.usermodel.XSSFWorkbook
;
import
org.springframework.context.event.EventListener
;
...
...
@@ -470,7 +470,8 @@ public class ShipmentReceivableExcelExportListener2 {
map
.
put
(
"sumNum"
,
orderInfo
.
getSumNum
());
sum14
=
sum14
+
orderInfo
.
getSumNum
();
}
map
.
put
(
"sumVolume"
,
orderInfo
.
getSumVolume
());
map
.
put
(
"sumVolume"
,
orderInfo
.
getOrderItemVOList
().
stream
().
map
(
OrderItemBackVO:
:
getChargeVolume
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
));
// map.put("sumVolume", orderInfo.getSumVolume());
sum15
=
sum15
.
add
(
orderInfo
.
getSumVolume
());
map
.
put
(
"sumWeight"
,
orderInfo
.
getSumWeight
());
sum16
=
sum16
.
add
(
orderInfo
.
getSumWeight
());
...
...
@@ -514,7 +515,7 @@ public class ShipmentReceivableExcelExportListener2 {
sum6
.
multiply
(
new
BigDecimal
(
0.2
)).
setScale
(
2
,
RoundingMode
.
HALF_UP
));
headMap
.
put
(
"BillinTTl"
,
currencyFuhaoMap
.
get
(
qg
Currency
)
currencyFuhaoMap
.
get
(
yf
Currency
)
+
sum6
.
subtract
(
sum4
).
subtract
(
sum6
.
multiply
(
new
BigDecimal
(
0.2
)).
setScale
(
2
,
RoundingMode
.
HALF_UP
)));
...
...
@@ -535,6 +536,8 @@ public class ShipmentReceivableExcelExportListener2 {
stringBuffer
.
append
(
currencyMap
.
get
(
otherMainCurrency
)).
append
(
":"
).
append
(
sum4
).
append
(
" "
).
append
(
currencyMap
.
get
(
otherAssisCurrency
)).
append
(
":"
).
append
(
sum5
);
}
headMap
.
put
(
"otherFee"
,
stringBuffer
.
toString
());
headMap
.
put
(
"otherFeeMain"
,
currencyMap
.
get
(
otherMainCurrency
)+
":"
+
sum4
);
headMap
.
put
(
"otherFeeAssis"
,
currencyMap
.
get
(
otherAssisCurrency
)+
":"
+
sum5
);
File
fileDir
=
new
File
(
dir
);
if
(!
fileDir
.
exists
())
{
// 不存在则创建一个目录
...
...
@@ -576,6 +579,24 @@ public class ShipmentReceivableExcelExportListener2 {
start
=
start
+
count
;
}
}
//业务数据从12行开始,22列为是否控货
Font
font
=
workbook
.
createFont
();
font
.
setColor
(
Font
.
COLOR_RED
);
//红色
CellStyle
cellStyle
=
workbook
.
createCellStyle
();
cellStyle
.
setFont
(
font
);
cellStyle
.
setAlignment
(
HorizontalAlignment
.
CENTER
);
cellStyle
.
setVerticalAlignment
(
VerticalAlignment
.
CENTER
);
cellStyle
.
setBorderLeft
(
BorderStyle
.
THIN
);
cellStyle
.
setBorderBottom
(
BorderStyle
.
THIN
);
cellStyle
.
setBorderRight
(
BorderStyle
.
THIN
);
cellStyle
.
setBorderTop
(
BorderStyle
.
THIN
);
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
if
(
poiSheet
.
getRow
(
i
+
12
).
getCell
(
22
).
getStringCellValue
().
equals
(
"YES"
))
{
for
(
int
i1
=
0
;
i1
<
29
;
i1
++)
{
poiSheet
.
getRow
(
i
+
12
).
getCell
(
i1
).
setCellStyle
(
cellStyle
);
}
}
}
FileOutputStream
fileOutputStream
=
new
FileOutputStream
(
new
File
(
dir
+
fileNameMerge
));
...
...
yudao-server/src/main/resources/templates/nrlyReceivable2.xlsx
View file @
3a96e170
No preview for this file type
yudao-server/src/main/resources/templates/nrlyReceivable3.xlsx
View file @
3a96e170
No preview for this file type
yudao-server/src/main/resources/templates/nrlyReceivable4.xlsx
View file @
3a96e170
No preview for this file type
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