Ver Fonte

物流数据规格改物品名称

yzc há 1 ano atrás
pai
commit
28398949d5

+ 2 - 2
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/logistics/LogisticsInfosExcelBo.java

@@ -51,8 +51,8 @@ public class LogisticsInfosExcelBo {
     private String sku;
 
     @ColumnWidth(20)
-    @ExcelProperty("货物型号")
-    private String productSpec;
+    @ExcelProperty("货物名称")
+    private String productName;
 
     @ColumnWidth(20)
     @ExcelProperty("采购实发数量")

+ 1 - 0
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/logistics/LogisticsProductInfo.java

@@ -11,6 +11,7 @@ import java.math.BigDecimal;
 public class LogisticsProductInfo extends BaseIdPo {
     private Long productId;
     private String productCode;
+    private String productName;
     private String productSpec;
     private BigDecimal quantity;
 }

+ 5 - 5
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/service/logistics/impl/LogisticsInfosServiceImpl.java

@@ -179,7 +179,7 @@ public class LogisticsInfosServiceImpl extends ServiceImpl<LogisticsInfosMapper,
         {
             List<LogisticsInfosVo> collect0 = records.stream().filter(item -> item.getBusinessType().equals(1)).collect(Collectors.toList());
             List<Long> ids0 = collect0.stream().map(LogisticsInfos::getId).distinct().collect(Collectors.toList());
-            if(ObjectUtil.isNotEmpty(ids0)) {
+            if (ObjectUtil.isNotEmpty(ids0)) {
                 List<LogisticsProductInfo> byDeliverGoods = baseMapper.getLogisticsProductInfoByDeliverGoods(IWrapper.getWrapper()
                         .in("lis.id", ids0)
                 );
@@ -194,7 +194,7 @@ public class LogisticsInfosServiceImpl extends ServiceImpl<LogisticsInfosMapper,
         {
             List<LogisticsInfosVo> collect1 = records.stream().filter(item -> item.getBusinessType().equals(2)).collect(Collectors.toList());
             List<Long> ids1 = collect1.stream().map(LogisticsInfos::getId).distinct().collect(Collectors.toList());
-            if(ObjectUtil.isNotEmpty(ids1)) {
+            if (ObjectUtil.isNotEmpty(ids1)) {
                 List<LogisticsProductInfo> byStockWait = baseMapper.getLogisticsProductInfoByStockWait(IWrapper.getWrapper()
                         .in("lis.id", ids1)
                 );
@@ -209,7 +209,7 @@ public class LogisticsInfosServiceImpl extends ServiceImpl<LogisticsInfosMapper,
         {
             List<LogisticsInfosVo> collect2 = records.stream().filter(item -> item.getBusinessType().equals(5)).collect(Collectors.toList());
             List<Long> ids2 = collect2.stream().map(LogisticsInfos::getId).distinct().collect(Collectors.toList());
-            if(ObjectUtil.isNotEmpty(ids2)) {
+            if (ObjectUtil.isNotEmpty(ids2)) {
                 List<LogisticsProductInfo> byStockWait1 = baseMapper.getLogisticsProductInfoByStockWait(IWrapper.getWrapper()
                         .in("lis.id", ids2)
                 );
@@ -473,11 +473,11 @@ public class LogisticsInfosServiceImpl extends ServiceImpl<LogisticsInfosMapper,
 
             for (LogisticsProductInfo logisticsProductInfo : logisticsProductInfoList) {
                 sj1.add(logisticsProductInfo.getProductCode());
-                sj2.add(logisticsProductInfo.getProductSpec());
+                sj2.add(logisticsProductInfo.getProductName());
                 sj3.add(ObjectUtil.defaultIfNull(logisticsProductInfo.getQuantity(), BigDecimal.ZERO).toString());
             }
             logisticsInfosExcelBo.setSku(sj1.toString());
-            logisticsInfosExcelBo.setProductSpec(sj2.toString());
+            logisticsInfosExcelBo.setProductName(sj2.toString());
             logisticsInfosExcelBo.setQuantity(sj3.toString());
         }