增加导出订单数据判断,升级poi版本

传递删除则使用字段内容
This commit is contained in:
pikachu1995@126.com 2024-07-07 15:55:11 +08:00
parent 80773e2d58
commit 80a0e0e8c7
3 changed files with 12 additions and 10 deletions

View File

@ -1235,7 +1235,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
if (StrUtil.isNotBlank(orderExportDTO.getConsigneeAddressPath())) { if (StrUtil.isNotBlank(orderExportDTO.getConsigneeAddressPath())) {
String[] receiveAddress = orderExportDTO.getConsigneeAddressPath().split(","); String[] receiveAddress = orderExportDTO.getConsigneeAddressPath().split(",");
orderExportDetailDTO.setProvince(receiveAddress[0]); orderExportDetailDTO.setProvince(receiveAddress[0]);
orderExportDetailDTO.setCity(receiveAddress[1]); orderExportDetailDTO.setCity(receiveAddress.length > 1 ?receiveAddress[1]:"");
orderExportDetailDTO.setDistrict(receiveAddress.length > 2 ? receiveAddress[2] : ""); orderExportDetailDTO.setDistrict(receiveAddress.length > 2 ? receiveAddress[2] : "");
orderExportDetailDTO.setStreet(receiveAddress.length > 3 ? receiveAddress[3] : ""); orderExportDetailDTO.setStreet(receiveAddress.length > 3 ? receiveAddress[3] : "");
} }
@ -1278,13 +1278,13 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
row.createCell(2).setCellValue(dto.getGoodsName()); row.createCell(2).setCellValue(dto.getGoodsName());
row.createCell(3).setCellValue(dto.getNum()); row.createCell(3).setCellValue(dto.getNum());
row.createCell(4).setCellValue(dto.getGoodsId()); row.createCell(4).setCellValue(dto.getGoodsId());
row.createCell(5).setCellValue(dto.getUnitPrice()); row.createCell(5).setCellValue(dto.getUnitPrice()!=null?dto.getUnitPrice():0);
row.createCell(6).setCellValue(dto.getFlowPrice()); row.createCell(6).setCellValue(dto.getFlowPrice()!=null?dto.getFlowPrice():0);
row.createCell(7).setCellValue(dto.getFreightPrice()); row.createCell(7).setCellValue(dto.getFreightPrice()!=null?dto.getFreightPrice():0);
row.createCell(8).setCellValue(dto.getDiscountPrice()); row.createCell(8).setCellValue(dto.getDiscountPrice()!=null?dto.getDiscountPrice():0);
row.createCell(9).setCellValue(dto.getSiteMarketingCost()); row.createCell(9).setCellValue(dto.getSiteMarketingCost()!=null?dto.getSiteMarketingCost():0);
row.createCell(10).setCellValue(dto.getStoreMarketingCost()); row.createCell(10).setCellValue(dto.getStoreMarketingCost()!=null?dto.getStoreMarketingCost():0);
row.createCell(11).setCellValue(dto.getUpdatePrice()); row.createCell(11).setCellValue(dto.getUpdatePrice()!=null?dto.getUpdatePrice():0);
row.createCell(12).setCellValue(dto.getPaymentMethod()); row.createCell(12).setCellValue(dto.getPaymentMethod());
row.createCell(13).setCellValue(dto.getConsigneeName()); row.createCell(13).setCellValue(dto.getConsigneeName());
row.createCell(14).setCellValue(dto.getConsigneeMobile()); row.createCell(14).setCellValue(dto.getConsigneeMobile());

View File

@ -32,7 +32,9 @@ public class MyMetaObjectHandler implements MetaObjectHandler {
} }
//有值则写入 //有值则写入
if (metaObject.hasGetter("deleteFlag")) { if (metaObject.hasGetter("deleteFlag")) {
this.setFieldValByName("deleteFlag", false, metaObject); if (metaObject.getValue("deleteFlag") == null) {
this.setFieldValByName("deleteFlag", false, metaObject);
}
} }
if (metaObject.hasGetter("id")) { if (metaObject.hasGetter("id")) {
//如果已经配置id则不再写入 //如果已经配置id则不再写入

View File

@ -48,7 +48,7 @@
<knife4j.version>2.0.9</knife4j.version> <knife4j.version>2.0.9</knife4j.version>
<de.codecentric>2.6.6</de.codecentric> <de.codecentric>2.6.6</de.codecentric>
<userAgentUtils>1.21</userAgentUtils> <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> <poi-ooxml-version>5.2.3</poi-ooxml-version>
<logstash-logback-encoder>7.1.1</logstash-logback-encoder> <logstash-logback-encoder>7.1.1</logstash-logback-encoder>
<zxing>3.5.0</zxing> <zxing>3.5.0</zxing>