|
|
|
@ -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<Distrib
|
|
|
|
|
loadscanEntity.setLoadingId(distrilbutionloadingscanDTO.getLoadingId()); |
|
|
|
|
loadscanEntity.setIsAbnormalLoading(1); |
|
|
|
|
//出库
|
|
|
|
|
// warehouseUpdownTypeClient.downPackage(distrilbutionloadingscanDTO.getBarcode(), myCurrentWarehouse.getId());
|
|
|
|
|
warehouseUpdownTypeClient.downPackageOrDelTray(parcelListEntity.getOrderPackageCode(),myCurrentWarehouse.getId()); |
|
|
|
|
warehouseUpdownTypeClient.downPackage(distrilbutionloadingscanDTO.getBarcode(), myCurrentWarehouse.getId()); |
|
|
|
|
// warehouseUpdownTypeClient.downPackageOrDelTray(parcelListEntity.getOrderPackageCode(),myCurrentWarehouse.getId());
|
|
|
|
|
//订单扣减在库数量
|
|
|
|
|
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(parcelListEntity.getStockArticleId()); |
|
|
|
|
stockArticleEntity.setHandQuantity(stockArticleEntity.getHandQuantity() - parcelListEntity.getQuantity()); |
|
|
|
@ -647,7 +646,12 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
if (reservationFlag) { |
|
|
|
|
List<DistributionLoadscanEntity> 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<Distrib
|
|
|
|
|
List<Map<String, Object>> spaclOrderList = buildSpaclOrders(distributionReservationEntity, 1); |
|
|
|
|
|
|
|
|
|
map.put("定制品集合", spaclOrderList); |
|
|
|
|
map.put("定制品合计", spaclOrderList.stream().mapToInt(map1 -> Integer.parseInt(map1.get("数量").toString())).sum()); |
|
|
|
|
Integer spaclNum = 0; |
|
|
|
|
for (Map<String, Object> m:spaclOrderList){ |
|
|
|
|
Integer num = (Integer) m.get("数量"); |
|
|
|
|
spaclNum = spaclNum + num; |
|
|
|
|
} |
|
|
|
|
map.put("定制品合计", spaclNum); |
|
|
|
|
|
|
|
|
|
// 通过预约单查询预约下面的订单 --1 或者 库存品 --2
|
|
|
|
|
List<Map<String, Object>> 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<String, Object> m:spaclStockList){ |
|
|
|
|
Integer num = (Integer) m.get("数量"); |
|
|
|
|
spaclStockNum = spaclStockNum + num; |
|
|
|
|
} |
|
|
|
|
map.put("库存品合计", spaclStockNum); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -5789,11 +5803,12 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
if (ObjectUtils.isNull(distributionStockListEntity)) { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
Integer reservationNum = reservationStocklistEntity.getReservationNum(); |
|
|
|
|
temp.put("合同号", distributionStockListEntity.getOrderCode()); |
|
|
|
|
temp.put("产品名称", distributionStockListEntity.getDescriptionGoods()); |
|
|
|
|
temp.put("产品名称", distributionStockListEntity.getDescriptionGoods()+"("+reservationNum+")"); |
|
|
|
|
//todo 单位是否需要查询物料表
|
|
|
|
|
temp.put("单位", Optional.ofNullable(distributionStockListEntity.getCargoUnit()).orElse(null)); |
|
|
|
|
temp.put("数量", reservationStocklistEntity.getReservationNum()); |
|
|
|
|
temp.put("数量", reservationNum); |
|
|
|
|
temp.put("备货区", getStockupArea(distributionReservationEntity.getId())); |
|
|
|
|
//todo 这里还没完成
|
|
|
|
|
List<String> allocationList = distributionReservationMapper.getStockListAllocation(distributionStockListEntity.getId(), distributionReservationEntity.getId()); |
|
|
|
|