diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionLoadscaninvnEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionLoadscaninvnEntity.java
index f5ad01f54..72d9cfaa4 100644
--- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionLoadscaninvnEntity.java
+++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionLoadscaninvnEntity.java
@@ -212,9 +212,9 @@ public class DistributionLoadscaninvnEntity extends TenantEntity {
 	@ApiModelProperty(value = "客户表id(预约)")
 	private Long reservationId;
 	/**
-	 * 库存品数量
+	 * 库存品id
 	 */
-	@ApiModelProperty(value = "库存品数量")
+	@ApiModelProperty(value = "库存品id")
 	private Long inventoryId;
 	/**
 	 * 配送表id
@@ -227,11 +227,6 @@ public class DistributionLoadscaninvnEntity extends TenantEntity {
 	@ApiModelProperty(value = "装车数量")
 	private Integer loadedNub;
 
-	/**
-	 * 装车数量
-	 */
-	@ApiModelProperty(value = "装车数量")
-	private Long packageId;
 
 	/**
 	 * 订单编号
@@ -247,7 +242,12 @@ public class DistributionLoadscaninvnEntity extends TenantEntity {
 	 * (当前)装车表id
 	 */
 	@ApiModelProperty(value = "(当前)装车表id")
-	private Long loadingId;
+	private String loadingId;
+	/**
+	 * 司机电话
+	 */
+	@ApiModelProperty(value = "司机电话")
+	private String driverPhone;
 	/**
 	 * 签收状态(1-未签收,2签收)
 	 */
diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionDeliveryInfoVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionDeliveryInfoVO.java
index 841467849..c677898bb 100644
--- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionDeliveryInfoVO.java
+++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionDeliveryInfoVO.java
@@ -58,6 +58,11 @@ public class DistributionDeliveryInfoVO extends DistributionDeliveryInfoEntity {
 	 */
 	@ApiModelProperty(value = "包条码")
 	private String packetBarCode;
+	/**
+	 * 物品名称
+	 */
+	@ApiModelProperty(value = "物品名称")
+	private String materialName;
 	/**
 	 * 货位信息
 	 */
@@ -183,6 +188,16 @@ public class DistributionDeliveryInfoVO extends DistributionDeliveryInfoEntity {
 	 */
 	@ApiModelProperty(value = "备注")
 	private String remarks;
+	/**
+	 * 签收件数
+	 */
+	@ApiModelProperty(value = "签收件数")
+	private Integer receivedQuantity;
+	/**
+	 * 签收状态
+	 */
+	@ApiModelProperty(value = "签收状态")
+	private String signingStatus;
 
 	/**
 	 * 时段
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java
index 634baa7fe..141c51446 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java
@@ -91,6 +91,29 @@ public class DistributionDeliveryListController extends BladeController {
 		IPage<DistributionDeliveryInfoVO> pages = distributionDeliveryInfoService.selectDistributionDeliveryInfowrapPage(Condition.getPage(query), distributionDeliveryInfoDTO);
 		return R.data(pages);
 	}
+
+	/**
+	 * 查看包件详情
+	 */
+	@GetMapping("/packdetail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "查看包件详情", notes = "传入distributionDeliveryList")
+	public R<IPage<DistributionDeliveryInfoVO>> packdetail(DistributionDeliveryInfoDTO distributionDeliveryInfoDTO, Query query) {
+		IPage<DistributionDeliveryInfoVO> pages = distributionDeliveryInfoService.selectDistributionDeliveryInfopackdetail(Condition.getPage(query), distributionDeliveryInfoDTO);
+		return R.data(pages);
+	}
+
+
+	/**
+	 * 查看库存品
+	 */
+	@GetMapping("/inventory")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "查看包件详情", notes = "传入distributionDeliveryList")
+	public R<IPage<DistributionStockListVO>> inventory(DistributionDeliveryInfoDTO distributionDeliveryInfoDTO, Query query) {
+		IPage<DistributionStockListVO> pages = distributionDeliveryInfoService.selectDistributionDeliveryinventory(Condition.getPage(query), distributionDeliveryInfoDTO);
+		return R.data(pages);
+	}
 	/**
 	 * 配送管理 分页
 	 */
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistrilbutionloadingscanDTO.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistrilbutionloadingscanDTO.java
index b6dbf1de2..ecf0b674e 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistrilbutionloadingscanDTO.java
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistrilbutionloadingscanDTO.java
@@ -88,6 +88,16 @@ public class DistrilbutionloadingscanDTO {
 	@ApiModelProperty(value = "扫描物品(1-手动输入,2-托盘)")
 //	@NotEmpty(message = "扫描物品不能为空")
 	private Integer inventorytype;
+	/**
+	 * 库存品id
+	 */
+	@ApiModelProperty(value = "库存品id")
+	private Integer inventoryId;
+	/**
+	 * 库存品数量
+	 */
+	@ApiModelProperty(value = "库存品数量")
+	private Integer inventoryNub;
 
 
 }
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.java
index c45d81353..3dcca67d7 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.java
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.java
@@ -23,6 +23,7 @@ import com.logpm.distribution.excel.DistributionDeliveryInfoExcel;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.logpm.distribution.vo.DistributionStockListVO;
 import org.apache.ibatis.annotations.Param;
 import java.util.List;
 
@@ -88,4 +89,16 @@ public interface DistributionDeliveryInfoMapper extends BaseMapper<DistributionD
 	 * @return
 	 */
 	List<DistributionDeliveryInfoVO> selectcustomListByOrderId(String orderId);
+	/**
+	 * 通过配送包条
+	 *
+	 * @return
+	 */
+	List<DistributionDeliveryInfoVO> selectDistributionDeliverypackdetailPage(IPage<DistributionDeliveryInfoVO> page,@Param("param")  DistributionDeliveryInfoDTO distributionDeliveryInfoDTO);
+	/**
+	 * 通过配送查询库存
+	 *
+	 * @return
+	 */
+	List<DistributionStockListVO> selectDistributionDeliveryinventoryPage(IPage<DistributionStockListVO> page, DistributionDeliveryInfoDTO distributionDeliveryInfoDTO);
 }
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml
index 0b97125b8..1b214e6aa 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml
@@ -34,6 +34,7 @@
     <select id="selectorderIdList" resultType="java.lang.String">
         select GROUP_CONCAT(distinct order_id SEPARATOR ',') from logpm_distribution_loadscan where is_deleted = 0 and reservation_id = #{id} and (scan_status = 2 or scan_status = 3)
     </select>
+
     <select id="selectStripList" resultType="com.logpm.distribution.vo.DistributionDeliveryInfoVO">
         SELECT
             ldpl.warehouse warehouse,
@@ -45,16 +46,18 @@
             ldpl.second second,
             ldpl.third_product thirdProduct,
             ldpl.material material,
+            ldpl.material_name materialName,
             ldpl.quantity quantity,
             ldpl.train_number trainNumber,
-            ldpl.stock_article_id stockArticleId,
-            ldl.package_nub packageNub,
-            ldl.loaded_nub loadedNub
+            ldpl.stock_article_id stockArticleId
         FROM
-        logpm_distribution_loadscan ldl
-                JOIN logpm_distribution_parcel_list ldpl ON ldl.package_id = ldpl.id
+        logpm_distribution_reservation_package ldrp
+        JOIN logpm_distribution_signfor lds on lds.reservation_id = ldrp.reservation_id
+        join logpm_distribution_reservation_stockarticle ldrs on lds.reservation_id = ldrs.reservation_id
+        JOIN logpm_distribution_delivery_list lddl on  lddl.id = lds.delivery_id
+        join logpm_distribution_parcel_list ldpl on ldrp.parce_list_id = ldpl.id
         <where>
-            ldl.is_deleted = 0 and ldl.delivery_id = #{id}
+            ldrs.is_have_data = '2' and lds.is_deleted =0 and lds.id = #{id}
         </where>
     </select>
     <select id="selectcustomList" resultType="com.logpm.distribution.vo.DistributionDeliveryInfoVO">
@@ -64,38 +67,43 @@
         ldr.delivery_address deliveryAddress,
         ldr.delivery_phone deliveryPhone,
         ldr.stock_article_id orderIds,
-        COALESCE(COUNT(ldl.package_nub), 0) packageNub,
-        COALESCE(COUNT(ldl.loaded_nub), 0)  loadedNub
+        ldr.reservation_num packageNub,
+        lds.loaded_number  loadedNub,
+        lds.received_quantity  receivedQuantity,
+        CASE
+        WHEN lds.signing_status ='1' THEN '未签收'
+        else '已签收'
+        END signingStatus
         FROM
-        logpm_distribution_loadscan ldl
-        JOIN logpm_distribution_reservation ldr ON ldl.reservation_id = ldr.id
+        logpm_distribution_signfor lds
+        JOIN logpm_distribution_reservation ldr ON ldr.id = lds.reservation_id
         <where>
-            ldl.is_deleted = 0 and ldl.delivery_id = #{id}
+            lds.is_deleted = 0 and lds.delivery_id = #{id}
         </where>
-        GROUP BY ldl.reservation_id
     </select>
     <select id="selectDistributionDeliverywrapInfoPage" resultType="com.logpm.distribution.vo.DistributionDeliveryInfoVO">
         SELECT
-            ldpl.warehouse warehouse,
-            ldpl.conditions conditions,
-            ldpl.packet_bar_code packetBarCode,
-            ldpl.goods_allocation goodsAllocation,
-            ldpl.pallet pallet,
-            ldpl.firsts firsts,
-            ldpl.second second,
-            ldpl.third_product thirdProduct,
-            ldpl.material material,
-            ldpl.quantity quantity,
-            ldpl.train_number trainNumber,
-            ldpl.stock_article_id stockArticleId,
-            lddi.loaded_state loadedState,
-            lddi.package_nub packageNub,
-            lddi.loaded_nub loadedNub
+        ldpl.warehouse warehouse,
+        ldpl.conditions conditions,
+        ldpl.packet_bar_code packetBarCode,
+        ldpl.goods_allocation goodsAllocation,
+        ldpl.pallet pallet,
+        ldpl.firsts firsts,
+        ldpl.second second,
+        ldpl.third_product thirdProduct,
+        ldpl.material material,
+        ldpl.material_name materialName,
+        ldpl.quantity quantity,
+        ldpl.train_number trainNumber,
+        ldpl.stock_article_id stockArticleId
         FROM
-            logpm_distribution_delivery_info lddi
-                JOIN logpm_distribution_parcel_list ldpl ON lddi.package_id = ldpl.id
+        logpm_distribution_reservation_package ldrp
+        JOIN logpm_distribution_signfor lds on lds.reservation_id = ldrp.reservation_id
+        join logpm_distribution_reservation_stockarticle ldrs on lds.reservation_id = ldrs.reservation_id
+        JOIN logpm_distribution_delivery_list lddl on  lddl.id = lds.delivery_id
+        join logpm_distribution_parcel_list ldpl on ldrp.parce_list_id = ldpl.id
         <where>
-            lddi.is_deleted = 0 and lddi.reservation_id = #{param.reservationId}
+            ldrs.is_have_data = '2' and lds.is_deleted =0 and lds.reservation_id = #{param.reservationId}
         </where>
     </select>
     <select id="selectWrapCount" resultType="java.lang.Integer">
@@ -123,6 +131,34 @@
         </where>
         GROUP BY ldl.order_id
     </select>
+    <select id="selectDistributionDeliverypackdetailPage" resultType="com.logpm.distribution.vo.DistributionDeliveryInfoVO">
+        SELECT
+        ldpl.warehouse warehouse,
+        ldpl.conditions conditions,
+        ldpl.packet_bar_code packetBarCode,
+        ldpl.goods_allocation goodsAllocation,
+        ldpl.pallet pallet,
+        ldpl.firsts firsts,
+        ldpl.second second,
+        ldpl.third_product thirdProduct,
+        ldpl.material material,
+        ldpl.material_name materialName,
+        ldpl.quantity quantity,
+        ldpl.train_number trainNumber,
+        ldpl.stock_article_id stockArticleId
+        FROM
+        logpm_distribution_reservation_package ldrp
+        JOIN logpm_distribution_signfor lds on lds.reservation_id = ldrp.reservation_id
+        join logpm_distribution_reservation_stockarticle ldrs on lds.reservation_id = ldrs.reservation_id
+        JOIN logpm_distribution_delivery_list lddl on  lddl.id = lds.delivery_id
+        join logpm_distribution_parcel_list ldpl on ldrp.parce_list_id = ldpl.id
+        <where>
+            ldrs.is_have_data = '2' and lds.is_deleted =0 and lddl.id = #{param.deliveryId}
+        </where>
+    </select>
+    <select id="selectDistributionDeliveryinventoryPage" resultType="com.logpm.distribution.vo.DistributionStockListVO">
+
+    </select>
 
 
 </mapper>
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java
index 055085e9d..a07253358 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java
@@ -19,12 +19,9 @@ package com.logpm.distribution.mapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.logpm.distribution.dto.DistributionDeliveryListDTO;
 import com.logpm.distribution.dto.DistrilbutionloadingscanDTO;
-import com.logpm.distribution.entity.DistributionDeliveryListEntity;
-import com.logpm.distribution.entity.DistributionReservationEntity;
+import com.logpm.distribution.entity.*;
 import com.logpm.distribution.vo.DistributionDeliveryListPrintReponseVO;
 import com.logpm.distribution.vo.DistributionDeliveryListPrintRequestVO;
-import com.logpm.distribution.entity.DistributionLoadscanEntity;
-import com.logpm.distribution.entity.DistributionParcelListEntity;
 import com.logpm.distribution.vo.DistributionDeliveryListVO;
 import com.logpm.distribution.excel.DistributionDeliveryListExcel;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -144,4 +141,16 @@ public interface DistributionDeliveryListMapper extends BaseMapper<DistributionD
 	 * @return
 	 */
 	List<DistributionReservationEntity> selectRservationByDeliveryId(@Param("deliveryId") Long deliveryId);
+	/**
+	 * 库存品扫描
+	 *
+	 * @return
+	 */
+    List<DistributionLoadscaninvnEntity> selectdeliveryworkVn(@Param("barcode") String barcode, @Param("deliveryId") Long deliveryId);
+	/**
+	 * 通过预约查询库存
+	 *
+	 * @return
+	 */
+	List<DistributionLoadscaninvnEntity> selectdeliveryworkVnId(@Param("inventoryId") Integer inventoryId,@Param("deliveryId") Long deliveryId);
 }
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
index 4fddcb68c..63f3c89cd 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
@@ -297,7 +297,6 @@
             join logpm_distribution_parcel_list ldpl on ldrp.parce_list_id = ldpl.id
        where
             ldrs.is_have_data = '2' and lds.is_deleted =0 and lddl.id = #{deliveryId} and   ldpl.packet_bar_code =#{barcode}
-
     </select>
 
     <select id="selectdeliverypallet" resultType="com.logpm.distribution.entity.DistributionLoadscanEntity">
@@ -424,4 +423,34 @@
                 JOIN logpm_distribution_reservation ldr ON lds.reservation_id = ldr.id
         where lds.delivery_id = #{deliveryId}
     </select>
+    <select id="selectdeliveryworkVn" resultType="com.logpm.distribution.entity.DistributionLoadscaninvnEntity">
+        SELECT
+            ldsl.id inventoryId,
+            ldsl.packet_bar_code packetBarCode,
+            lds.reservation_id reservationId,
+            lddl.id deliveryId,
+            lddl.train_number trainNumber
+        FROM
+            logpm_distribution_reservation_stocklist ldrs
+                JOIN logpm_distribution_signfor lds ON lds.reservation_id = ldrs.reservation_id
+                JOIN logpm_distribution_delivery_list lddl ON lddl.id = lds.delivery_id
+                JOIN logpm_distribution_stock_list ldsl ON ldrs.stocklist_id = ldsl.id
+        WHERE
+            lds.is_deleted = 0 and lddl.id = #{deliveryId} and   ldsl.packet_bar_code =#{barcode}
+    </select>
+    <select id="selectdeliveryworkVnId" resultType="com.logpm.distribution.entity.DistributionLoadscaninvnEntity">
+        SELECT
+            ldsl.id inventoryId,
+            ldsl.packet_bar_code packetBarCode,
+            lds.reservation_id reservationId,
+            lddl.id deliveryId,
+            lddl.train_number trainNumber
+        FROM
+                logpm_distribution_reservation_stocklist ldrs
+                JOIN logpm_distribution_signfor lds ON lds.reservation_id = ldrs.reservation_id
+                JOIN logpm_distribution_delivery_list lddl ON lddl.id = lds.delivery_id
+                JOIN logpm_distribution_stock_list ldsl ON ldrs.stocklist_id = ldsl.id
+        WHERE
+            lds.is_deleted = 0 and lddl.id = #{deliveryId} and   ldsl.id =#{inventoryId}
+    </select>
 </mapper>
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryInfoService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryInfoService.java
index 31b3fa072..ef0ef86fc 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryInfoService.java
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryInfoService.java
@@ -22,6 +22,7 @@ import com.logpm.distribution.entity.DistributionDeliveryInfoEntity;
 import com.logpm.distribution.vo.DistributionDeliveryInfoVO;
 import com.logpm.distribution.excel.DistributionDeliveryInfoExcel;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.logpm.distribution.vo.DistributionStockListVO;
 import org.springblade.core.mp.base.BaseService;
 import java.util.List;
 
@@ -57,4 +58,20 @@ public interface IDistributionDeliveryInfoService extends BaseService<Distributi
 	 * @return
 	 */
 	IPage<DistributionDeliveryInfoVO> selectDistributionDeliveryInfowrapPage(IPage<DistributionDeliveryInfoVO> page, DistributionDeliveryInfoDTO distributionDeliveryInfoDTO);
+	/**
+	 * 从配送查询包条自定义分页
+	 *
+	 * @param page
+	 * @param distributionDeliveryInfoDTO
+	 * @return
+	 */
+	IPage<DistributionDeliveryInfoVO> selectDistributionDeliveryInfopackdetail(IPage<DistributionDeliveryInfoVO> page, DistributionDeliveryInfoDTO distributionDeliveryInfoDTO);
+	/**
+	 * 从配送查看库存品
+	 *
+	 * @param page
+	 * @param distributionDeliveryInfoDTO
+	 * @return
+	 */
+	IPage<DistributionStockListVO> selectDistributionDeliveryinventory(IPage<DistributionStockListVO> page, DistributionDeliveryInfoDTO distributionDeliveryInfoDTO);
 }
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java
index 95e73394a..b0f7a4f42 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java
@@ -22,6 +22,7 @@ import com.logpm.distribution.vo.DistributionDeliveryInfoVO;
 import com.logpm.distribution.excel.DistributionDeliveryInfoExcel;
 import com.logpm.distribution.mapper.DistributionDeliveryInfoMapper;
 import com.logpm.distribution.service.IDistributionDeliveryInfoService;
+import com.logpm.distribution.vo.DistributionStockListVO;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -59,4 +60,16 @@ public class DistributionDeliveryInfoServiceImpl extends BaseServiceImpl<Distrib
 		return page.setRecords(distributionDeliveryInfoVOS);
 	}
 
+	@Override
+	public IPage<DistributionDeliveryInfoVO> selectDistributionDeliveryInfopackdetail(IPage<DistributionDeliveryInfoVO> page, DistributionDeliveryInfoDTO distributionDeliveryInfoDTO) {
+		List<DistributionDeliveryInfoVO> distributionDeliveryInfoVOS = baseMapper.selectDistributionDeliverypackdetailPage(page, distributionDeliveryInfoDTO);
+		return page.setRecords(distributionDeliveryInfoVOS);
+	}
+
+	@Override
+	public IPage<DistributionStockListVO> selectDistributionDeliveryinventory(IPage<DistributionStockListVO> page, DistributionDeliveryInfoDTO distributionDeliveryInfoDTO) {
+		List<DistributionStockListVO> distributionDeliveryInfoVOS = baseMapper.selectDistributionDeliveryinventoryPage(page, distributionDeliveryInfoDTO);
+		return page.setRecords(distributionDeliveryInfoVOS);
+	}
+
 }
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 953b9a13f..2fd4f1425 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
@@ -70,6 +70,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
 	private final DistributionParcelListMapper distributionParcelListMapper;
 	private final DistributionLoadscanMapper distributionLoadscanMapper;
 	private final DistributionLoadscanServiceImpl distributionLoadscanService;
+	private final DistributionLoadscaninvnServiceImpl distributionLoadscaninvnService;
 	private final DistributionDeliveryListMapper distributionDeliveryListMapper;
 	private final DistributionSignforServiceImpl distributionSignforService;
 	private final DistributionSignforMapper distributionSignforMapper;
@@ -340,12 +341,13 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
 //				}
 //			}
 			} else if (distrilbutionloadingscanDTO.getStockType() == 2) {
+				//库存品
 				//查询该包条是否属于该配送任务
-				List<DistributionLoadscanEntity> distributionLoadscanEntities = baseMapper.selectdeliverywork(distrilbutionloadingscanDTO.getBarcode(), distrilbutionloadingscanDTO.getDeliveryId());
-				if (distributionLoadscanEntities.size() <= 0) {
+				List<DistributionLoadscaninvnEntity> distributionLoadscanvnEntities = baseMapper.selectdeliveryworkVn(distrilbutionloadingscanDTO.getBarcode(), distrilbutionloadingscanDTO.getDeliveryId());
+				if (distributionLoadscanvnEntities.size() <= 0) {
 					return R.fail(3001, "窜货");
 				}
-				for (DistributionLoadscanEntity distributionLoadscanEntity : distributionLoadscanEntities) {
+				for (DistributionLoadscaninvnEntity distributionLoadscanEntity : distributionLoadscanvnEntities) {
 					//查询是否重复扫码
 					List<DistributionLoadscanEntity> distributionLoadscanEntitiesflag = distributionLoadscanMapper.selectList(new QueryWrapper<DistributionLoadscanEntity>().lambda()
 						.eq(DistributionLoadscanEntity::getDeliveryId, distributionLoadscanEntity.getReservationId())
@@ -375,11 +377,10 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
 					//查询本车次是否第一次扫码,没有则更新上车时间
 					Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId());
 					//更新签收表的装车数量
-					Integer j = distributionSignforMapper.updateloadByReservationId(distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
+					Integer j = distributionSignforMapper.updateloadByReservationId(distributionLoadscanEntity.getReservationId(), 1);
 
 				}
-				distributionLoadscanService.saveBatch(distributionLoadscanEntities);
-
+				distributionLoadscaninvnService.saveBatch(distributionLoadscanvnEntities);
 
 			}
 		} else if (distrilbutionloadingscanDTO.getType() == 2) {
@@ -389,6 +390,12 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
 			if (distributionLoadscanEntities.size() <= 0) {
 				return R.fail(3001, "窜货");
 			}
+			//库存品
+			//查询该包条是否属于该配送任务
+			List<DistributionLoadscaninvnEntity> distributionLoadscanvnEntities = baseMapper.selectdeliveryworkVn(distrilbutionloadingscanDTO.getBarcode(), distrilbutionloadingscanDTO.getDeliveryId());
+			if (distributionLoadscanvnEntities.size() <= 0) {
+				return R.fail(3001, "窜货");
+			}
 			for (DistributionLoadscanEntity distributionLoadscanEntity : distributionLoadscanEntities) {
 				//查询是否重复扫码
 				List<DistributionLoadscanEntity> distributionLoadscanEntitiesflag = distributionLoadscanMapper.selectList(new QueryWrapper<DistributionLoadscanEntity>().lambda()
@@ -421,6 +428,35 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
 				Integer j = distributionSignforMapper.updateloadByReservationId(distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
 			}
 			distributionLoadscanService.saveBatch(distributionLoadscanEntities);
+
+			for (DistributionLoadscaninvnEntity distributionLoadscanEntity : distributionLoadscanvnEntities) {
+				//查询是否重复扫码
+				List<DistributionLoadscanEntity> distributionLoadscanEntitiesflag = distributionLoadscanMapper.selectList(new QueryWrapper<DistributionLoadscanEntity>().lambda()
+					.eq(DistributionLoadscanEntity::getDeliveryId, distributionLoadscanEntity.getReservationId())
+					.eq(DistributionLoadscanEntity::getPacketBarCode, distributionLoadscanEntity.getPacketBarCode())
+					.ne(DistributionLoadscanEntity::getScanStatus, 1)
+				);
+				if (distributionLoadscanEntitiesflag.size() > 0) {
+					return R.fail(3002, "重复扫码");
+				}
+				//依次插入该装车记录,设置车辆
+				distributionLoadscanEntity.setDriverId(distributionDeliverySelfEntity.getDriverId());
+				distributionLoadscanEntity.setDriverName(distributionDeliverySelfEntity.getDriverName());
+				distributionLoadscanEntity.setScanStatus(2);
+				distributionLoadscanEntity.setScanType("1");
+				distributionLoadscanEntity.setScanTime(new Date());
+				distributionLoadscanEntity.setLoadingId(distrilbutionloadingscanDTO.getLoadingId());
+				distributionLoadscanEntity.setVehicleName(distributionDeliverySelfEntity.getVehicleNub());
+				if (null != distributionDeliverySelfEntity.getDriverPhone()) {
+					distributionLoadscanEntity.setDriverPhone(distributionDeliverySelfEntity.getDriverPhone());
+				}
+				distributionLoadscanEntity.setVehicleId(distributionDeliverySelfEntity.getVehicleId());
+				//查询本车次是否第一次扫码,没有则更新上车时间
+				Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId());
+				//更新签收表的装车数量
+				Integer j = distributionSignforMapper.updateloadByReservationId(distributionLoadscanEntity.getReservationId(), 1);
+			}
+			distributionLoadscaninvnService.saveBatch(distributionLoadscanvnEntities);
 		} else if (distrilbutionloadingscanDTO.getType() == 3) {
 			//订单扫描,查询该订单是否有数据
 			DistributionReservationStockarticleEntity distributionReservationStockarticleEntity = distributionReservationStockarticleMapper.selectOne(
@@ -617,6 +653,11 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
 			.eq(DistributionLoadscanEntity::getDeliveryId,distrilbutionloadingscanDTO.getDeliveryId())
 			.set(DistributionLoadscanEntity::getScanStatus,3)
 		);
+		//库存品装车
+		distributionLoadscaninvnService.update(new UpdateWrapper<DistributionLoadscaninvnEntity>().lambda()
+			.eq(DistributionLoadscaninvnEntity::getDeliveryId,distrilbutionloadingscanDTO.getDeliveryId())
+			.set(DistributionLoadscaninvnEntity::getScanStatus,3)
+		);
 		return R.status(update);
 	}
 
@@ -641,8 +682,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
 				for (DistributionLoadscanEntity distributionLoadscanEntity : distributionLoadscanEntities) {
 					//取消装车,更新该装车记录
 					distributionLoadscanMapper.updatecutSumById(distributionLoadscanEntity.getId(), distrilbutionloadingscanDTO);
-//				distributionLoadscanordMapper.updatecutSumById(distributionLoadscanEntity.getOrderId(),distrilbutionloadingscanDTO);
-//				distributionLoadscanresMapper.updatecutSumById(distributionLoadscanEntity.getReservationId(),distrilbutionloadingscanDTO);
 					//更新签收表的装车数量
 					Integer j = distributionSignforMapper.updateloadreduceByReservationId(distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
 				}
@@ -711,7 +750,45 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
 
 	@Override
 	public R loadinginventory(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) {
-		return null;
+		//库存品
+		//查询预约
+		//获取当前用户司机
+		DistributionDeliverySelfEntity distributionDeliverySelfEntity = distributionDeliverySelfMapper.selectById(distrilbutionloadingscanDTO.getLoadingId());
+		List<DistributionLoadscaninvnEntity> distributionLoadscanvnEntities = baseMapper.selectdeliveryworkVnId(distrilbutionloadingscanDTO.getInventoryId(), distrilbutionloadingscanDTO.getDeliveryId());
+		if (distributionLoadscanvnEntities.size() <= 0) {
+			return R.fail(3001, "窜货");
+		}
+		for (DistributionLoadscaninvnEntity distributionLoadscanEntity : distributionLoadscanvnEntities) {
+			//查询是否重复扫码
+			List<DistributionLoadscanEntity> distributionLoadscanEntitiesflag = distributionLoadscanMapper.selectList(new QueryWrapper<DistributionLoadscanEntity>().lambda()
+				.eq(DistributionLoadscanEntity::getDeliveryId, distributionLoadscanEntity.getReservationId())
+				.eq(DistributionLoadscanEntity::getPacketBarCode, distributionLoadscanEntity.getPacketBarCode())
+				.ne(DistributionLoadscanEntity::getScanStatus, 1)
+			);
+//			if (distributionLoadscanEntitiesflag.size() > 0) {
+//				return R.fail(3002, "重复货物");
+//			}
+			//依次插入该装车记录,设置车辆
+			distributionLoadscanEntity.setDriverId(distributionDeliverySelfEntity.getDriverId());
+			distributionLoadscanEntity.setDriverName(distributionDeliverySelfEntity.getDriverName());
+			distributionLoadscanEntity.setScanStatus(2);
+			distributionLoadscanEntity.setScanType("1");
+			distributionLoadscanEntity.setScanTime(new Date());
+			distributionLoadscanEntity.setLoadingId(distrilbutionloadingscanDTO.getLoadingId());
+			distributionLoadscanEntity.setLoadedNub(distrilbutionloadingscanDTO.getInventoryNub());
+			distributionLoadscanEntity.setVehicleName(distributionDeliverySelfEntity.getVehicleNub());
+			if (null != distributionDeliverySelfEntity.getDriverPhone()) {
+				distributionLoadscanEntity.setDriverPhone(distributionDeliverySelfEntity.getDriverPhone());
+			}
+			distributionLoadscanEntity.setVehicleId(distributionDeliverySelfEntity.getVehicleId());
+			//查询本车次是否第一次扫码,没有则更新上车时间
+			Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId());
+			//更新签收表的装车数量
+			Integer j = distributionSignforMapper.updateloadByReservationId(distributionLoadscanEntity.getReservationId(), distrilbutionloadingscanDTO.getInventoryNub());
+
+		}
+		boolean b = distributionLoadscaninvnService.saveBatch(distributionLoadscanvnEntities);
+		return R.status(b);
 	}