diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionMarketExcel.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionMarketExcel.java index 103c30973..d633b0446 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionMarketExcel.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionMarketExcel.java @@ -21,7 +21,9 @@ import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.write.style.ColumnWidth; import com.alibaba.excel.annotation.write.style.ContentRowHeight; import com.alibaba.excel.annotation.write.style.HeadRowHeight; +import lombok.AllArgsConstructor; import lombok.Data; +import lombok.NoArgsConstructor; import java.io.Serializable; import java.util.Date; @@ -37,6 +39,8 @@ import java.util.Date; @ColumnWidth(25) @HeadRowHeight(20) @ContentRowHeight(18) +@NoArgsConstructor +@AllArgsConstructor public class DistributionMarketExcel implements Serializable { private static final long serialVersionUID = 1L; @@ -71,7 +75,7 @@ public class DistributionMarketExcel implements Serializable { @ColumnWidth(20) @ExcelProperty("备货人员") - private Long forklift; + private String forkliftName; @ColumnWidth(20) @ExcelProperty("所在托盘") diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java index 3ed9fac91..7c473b4ab 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java @@ -23,7 +23,6 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.google.gson.JsonObject; import com.logpm.basic.entity.BasicPrintTemplateEntity; import com.logpm.basic.feign.IBasicPrintTemplateClient; import com.logpm.basicdata.entity.BasicdataDriverArteryEntity; @@ -556,8 +555,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl reservationLoadscanEntities = new ArrayList<>(); for (DistributionParcelListEntity parcelListEntity : parcelListEntities) { - warehouseUpdownTypeClient.downPackageOrDelTray(parcelListEntity.getOrderPackageCode(),myCurrentWarehouse.getId()); + try { + warehouseUpdownTypeClient.downPackage(parcelListEntity.getOrderPackageCode(),myCurrentWarehouse.getId()); + }catch (Exception e){ + log.error("#################货物下架错误:{}",parcelListEntity.getOrderPackageCode()); + return Resp.scanFail("装车失败", "装车失败"); + } if (parcelListEntity.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.weizhuancghe.getValue())) { parcelListEntity.setOrderPackageLoadingStatus(OrderPackageLoadingStatusConstant.yizhuangche.getValue()); parcelListEntity.setOrderPackageStatus(OrderPackageStatusConstant.yichuku.getValue()); @@ -5626,13 +5630,23 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl> spaclOrderList = buildSpaclOrders(distributionReservationEntity, 1); map.put("定制品集合", spaclOrderList); - map.put("定制品合计", spaclOrderList.stream().mapToInt(map1 -> Integer.parseInt(map1.get("数量").toString())).sum()); + Integer spaclNum = 0; + for (Map m:spaclOrderList){ + Integer num = (Integer) m.get("数量"); + spaclNum = spaclNum + num; + } + map.put("定制品合计", spaclNum); // 通过预约单查询预约下面的订单 --1 或者 库存品 --2 List> spaclStockList = buildSpaclOrders(distributionReservationEntity, 2); if (spaclStockList.size() > 0 && !spaclStockList.isEmpty()) { map.put("库存品集合", spaclStockList); - map.put("库存品合计", spaclStockList.stream().mapToInt(map1 -> Integer.parseInt(map1.get("数量").toString())).sum()); + Integer spaclStockNum = 0; + for (Map m:spaclStockList){ + Integer num = (Integer) m.get("数量"); + spaclStockNum = spaclStockNum + num; + } + map.put("库存品合计", spaclStockNum); } @@ -5789,11 +5803,12 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl allocationList = distributionReservationMapper.getStockListAllocation(distributionStockListEntity.getId(), distributionReservationEntity.getId()); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java index 6c5bdcbaf..90e790a10 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java @@ -1881,7 +1881,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl list = baseMapper.exportMarket(paramMap, idArr); list.forEach(li -> { - li.setStockupStatus(DictCache.getValue(DictBizConstant.STOCKUP_STATUS, li.getStockupStatus())); + switch (li.getStockupStatus()) { + case "10": + li.setStockupStatus("待分配"); + break; + case "20": + li.setStockupStatus("待备货"); + break; + case "30": + li.setStockupStatus("备货中"); + break; + case "40": + li.setStockupStatus("已备货"); + break; + } li.setAssignStatus("1".equals(li.getAssignStatus()) ? "未指派" : "已指派"); }); return list; @@ -2581,7 +2594,20 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl list = baseMapper.exportCity(paramMap, idArr); list.forEach(li -> { - li.setStockupStatus(DictCache.getValue(DictBizConstant.STOCKUP_STATUS, li.getStockupStatus())); + switch (li.getStockupStatus()) { + case "10": + li.setStockupStatus("待分配"); + break; + case "20": + li.setStockupStatus("待备货"); + break; + case "30": + li.setStockupStatus("备货中"); + break; + case "40": + li.setStockupStatus("已备货"); + break; + } li.setAssignStatus("1".equals(li.getAssignStatus()) ? "未指派" : "已指派"); }); return list; @@ -2608,7 +2634,20 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl list = baseMapper.exportSelf(paramMap, idArr); list.forEach(li -> { - li.setStockupStatus(DictCache.getValue(DictBizConstant.STOCKUP_STATUS, li.getStockupStatus())); + switch (li.getStockupStatus()) { + case "10": + li.setStockupStatus("待分配"); + break; + case "20": + li.setStockupStatus("待备货"); + break; + case "30": + li.setStockupStatus("备货中"); + break; + case "40": + li.setStockupStatus("已备货"); + break; + } li.setAssignStatus("1".equals(li.getAssignStatus()) ? "未指派" : "已指派"); }); return list;