Skip to content

Commit

Permalink
增加导出订单数据判断,升级poi版本
Browse files Browse the repository at this point in the history
传递删除则使用字段内容
  • Loading branch information
[email protected] committed Jul 7, 2024
1 parent 80773e2 commit 80a0e0e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1235,7 +1235,7 @@ private XSSFWorkbook initOrderExportData(List<OrderExportDTO> orderExportDTOList
if (StrUtil.isNotBlank(orderExportDTO.getConsigneeAddressPath())) {
String[] receiveAddress = orderExportDTO.getConsigneeAddressPath().split(",");
orderExportDetailDTO.setProvince(receiveAddress[0]);
orderExportDetailDTO.setCity(receiveAddress[1]);
orderExportDetailDTO.setCity(receiveAddress.length > 1 ?receiveAddress[1]:"");
orderExportDetailDTO.setDistrict(receiveAddress.length > 2 ? receiveAddress[2] : "");
orderExportDetailDTO.setStreet(receiveAddress.length > 3 ? receiveAddress[3] : "");
}
Expand Down Expand Up @@ -1278,13 +1278,13 @@ private XSSFWorkbook initOrderExportData(List<OrderExportDTO> orderExportDTOList
row.createCell(2).setCellValue(dto.getGoodsName());
row.createCell(3).setCellValue(dto.getNum());
row.createCell(4).setCellValue(dto.getGoodsId());
row.createCell(5).setCellValue(dto.getUnitPrice());
row.createCell(6).setCellValue(dto.getFlowPrice());
row.createCell(7).setCellValue(dto.getFreightPrice());
row.createCell(8).setCellValue(dto.getDiscountPrice());
row.createCell(9).setCellValue(dto.getSiteMarketingCost());
row.createCell(10).setCellValue(dto.getStoreMarketingCost());
row.createCell(11).setCellValue(dto.getUpdatePrice());
row.createCell(5).setCellValue(dto.getUnitPrice()!=null?dto.getUnitPrice():0);
row.createCell(6).setCellValue(dto.getFlowPrice()!=null?dto.getFlowPrice():0);
row.createCell(7).setCellValue(dto.getFreightPrice()!=null?dto.getFreightPrice():0);
row.createCell(8).setCellValue(dto.getDiscountPrice()!=null?dto.getDiscountPrice():0);
row.createCell(9).setCellValue(dto.getSiteMarketingCost()!=null?dto.getSiteMarketingCost():0);
row.createCell(10).setCellValue(dto.getStoreMarketingCost()!=null?dto.getStoreMarketingCost():0);
row.createCell(11).setCellValue(dto.getUpdatePrice()!=null?dto.getUpdatePrice():0);
row.createCell(12).setCellValue(dto.getPaymentMethod());
row.createCell(13).setCellValue(dto.getConsigneeName());
row.createCell(14).setCellValue(dto.getConsigneeMobile());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ public void insertFill(MetaObject metaObject) {
}
//有值,则写入
if (metaObject.hasGetter("deleteFlag")) {
this.setFieldValByName("deleteFlag", false, metaObject);
if (metaObject.getValue("deleteFlag") == null) {
this.setFieldValByName("deleteFlag", false, metaObject);
}
}
if (metaObject.hasGetter("id")) {
//如果已经配置id,则不再写入
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<knife4j.version>2.0.9</knife4j.version>
<de.codecentric>2.6.6</de.codecentric>
<userAgentUtils>1.21</userAgentUtils>
<poi-version>5.1.0</poi-version>
<poi-version>5.2.3</poi-version>
<poi-ooxml-version>5.2.3</poi-ooxml-version>
<logstash-logback-encoder>7.1.1</logstash-logback-encoder>
<zxing>3.5.0</zxing>
Expand Down

0 comments on commit 80a0e0e

Please sign in to comment.