diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java
index b6741ba4f..b7ac5adba 100644
--- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java
+++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java
@@ -106,6 +106,38 @@ public class DistributionSignforVO extends DistributionSignforEntity {
 	@ApiModelProperty(value = "仓库ids")
 	private List<Long> warehouseIdList;
 
+
+	/**
+	 * 配送车次
+	 */
+	@ApiModelProperty(value = "配送车次")
+	private String trainNumber;
+
+
+	/**
+	 * 配送车牌号
+	 */
+	@ApiModelProperty(value = "配送车牌号")
+	private String vehicleName;
+
+	/**
+	 * 配送司机
+	 */
+	@ApiModelProperty(value = "配送司机")
+	private String driverName;
+
+	/**
+	 * 装车班组
+	 */
+	@ApiModelProperty(value = "装车班组")
+	private String loadingTeamName;
+
+	/**
+	 * 卸车班组
+	 */
+	@ApiModelProperty(value = "卸车班组")
+	private String unLoadingTeamName;
+
 	/**
 	 * 客户订单列表
 	 */
diff --git a/blade-service/logpm-distribution/pom.xml b/blade-service/logpm-distribution/pom.xml
index 4ac90fb83..fddde99cb 100644
--- a/blade-service/logpm-distribution/pom.xml
+++ b/blade-service/logpm-distribution/pom.xml
@@ -98,6 +98,13 @@
             <version>${bladex.project.version}</version>
         </dependency>
 
+<!--        2023/09/21-->
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>logpm-old-project-api</artifactId>
+            <version>${bladex.project.version}</version>
+        </dependency>
+
 
 
 
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionAddvalueAppController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionAddvalueAppController.java
index 524dd03bc..4cd2ed4d2 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionAddvalueAppController.java
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionAddvalueAppController.java
@@ -80,7 +80,6 @@ public class DistributionAddvalueAppController {
 	@ApiOperation(value = "查询该客户下的所有配送包件信息", notes = "DistributionAppDeliveryListDTO")
 	public R getAllPackageList(@Valid @RequestBody DistributionAppAddvalueDTO distributionAppAddvalueDTO) {
 		List<DistributionAddvaluePackageEntity> allPackageList = distributionAddvalueService.getAllPackageList(distributionAppAddvalueDTO);
-
 		return R.data(200,allPackageList,"成功");
 	}
 
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
index 3751c6496..cb3ac2ee1 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
@@ -485,15 +485,13 @@
     <select id="selectOneCustom" resultType="com.logpm.distribution.vo.DistributionSignforVO">
         SELECT
             CASE
-
                 WHEN
                     lds.driver_signing = '2' THEN
                     '司机签收'
                 WHEN lds.signing_status = '2' THEN
-                    '文员签收' ELSE '待签收'
+                    '文员审核' ELSE '待签收'
                 END signingStatusAll,
            CASE
-
                 WHEN
                     ldr.is_urgent = '1' THEN '否'
                 WHEN ldr.is_urgent = '2' THEN '是'
@@ -511,6 +509,12 @@
             lds.delivery_sign_pictures deliverySignPictures,
             ldr.reservation_date reservationDate,
             lds.positioning_adr positioningAdr,
+            lddl.train_number trainNumber,
+            lddl.vehicle_name vehicleName,
+            lddl.driver_name driverName,
+            lddl.driver_name driverName,
+            lddl.loading_team_name loadingTeamName,
+            lddl.unloading_team_name unLoadingTeamName,
             CASE
                 WHEN ldr.delivery_type = '1' THEN
                     '商配'
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java
index fc89c988d..6d79177b1 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java
@@ -740,8 +740,8 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
 	@Override
 	@Transactional(isolation = Isolation.READ_UNCOMMITTED, rollbackFor = Exception.class)
 	public void checkStockArticleSignStatus(DistributionParcelListEntity parcelListEntity) {
-		parcelListEntity.setOrderPackageStatus(OrderPackageStatusConstant.yiqianshou.getValue());
-		distributionParcelListService.updateById(parcelListEntity);
+//		parcelListEntity.setOrderPackageStatus(OrderPackageStatusConstant.yiqianshou.getValue());
+//		distributionParcelListService.updateById(parcelListEntity);
 		List<DistributionParcelListEntity> parcelListEntityList = distributionParcelListService.getBaseMapper().selectList(Wrappers.<DistributionParcelListEntity>query().lambda().eq(DistributionParcelListEntity::getStockArticleId, parcelListEntity.getStockArticleId()));
 		boolean flag = parcelListEntityList.stream().allMatch(p -> p.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue()));
 		DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(parcelListEntity.getStockArticleId());
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
index 0db34bb5a..c956a2916 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
@@ -35,6 +35,8 @@ import com.logpm.distribution.wrapper.DistributionParcelListWrapper;
 import com.logpm.distribution.wrapper.DistributionReservationWrapper;
 import com.logpm.distribution.wrapper.DistributionStockArticleWrapper;
 import com.logpm.distribution.wrapper.DistributionStockListWrapper;
+import com.logpm.oldproject.entity.WayBillEntity;
+import com.logpm.oldproject.feign.IWayBillClient;
 import com.logpm.warehouse.entity.WarehouseWaybillEntity;
 import com.logpm.warehouse.feign.IWarehouseWaybillClient;
 import lombok.extern.slf4j.Slf4j;
@@ -175,6 +177,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
 	@Autowired
 	private DistributionStockupInfoMapper distributionStockupInfoMapper;
 
+	@Autowired
+	private IWayBillClient wayBillClient;
+
 
 
 
@@ -281,6 +286,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
 		HashSet<String> storeName = new HashSet<>();
 		HashSet<String> mallName = new HashSet<>();
 		HashSet<String> receivingUnit = new HashSet<>();
+		HashSet<String> waybillNo = new HashSet<>();
+		HashSet<String> waybillId = new HashSet<>();
+		HashSet<String> marketPhone = new HashSet<>();
 		AtomicReference<BigDecimal> initTotal = new AtomicReference<>(BigDecimal.ZERO);
 		//存在订单构建预约订单关联信息
 		if (!Func.isEmpty(stockArticleList)) {
@@ -293,6 +301,17 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
 			//存在订单的情况下才会对预约和包件的关系进行维护
 			//选择了订单但是未进行包件的选择,默认选择了订单下的所有在库包件
 			stockArticleList.forEach(s -> {
+//				WarehouseWaybillEntity byWaybillNo = warehouseWaybillClient.findByWaybillNo(s.getWaybillNumber());
+				WayBillEntity wayBillEntity = wayBillClient.getByWaybillNo(s.getWaybillNumber());
+				if (Func.isNotEmpty(wayBillEntity)){
+					waybillId.add(wayBillEntity.getId().toString());
+				}
+				if (Func.isNotEmpty(wayBillEntity.getTakePhone())){
+					marketPhone.add(wayBillEntity.getTakePhone());
+				}
+				if (Func.isNotEmpty(s.getWaybillNumber())){
+					waybillNo.add(s.getWaybillNumber());
+				}
 				if (Func.isNotBlank(s.getServiceNumber())) {
 					serviceNumber.add(s.getServiceNumber());
 				}
@@ -458,6 +477,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
 		reservationEntity.setWarehouseName(myCurrentWarehouse.getName());
 		reservationEntity.setMallName(String.join(",", mallName));
 		reservationEntity.setStoreName(String.join(",", storeName));
+		reservationEntity.setWaybillNo(String.join(",", waybillNo));
+		reservationEntity.setWaybillId(String.join(",", waybillId));
+		reservationEntity.setMailPhone(String.join(",", marketPhone));
 		reservationEntity.setReceivingUnit(String.join(",",receivingUnit));
 		//统计数量
 		BigDecimal fee = initTotal.get().add(reservationEntity.getOtherFee());
@@ -1426,7 +1448,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
 			clientTotal.getAndIncrement();
 //			AtomicInteger receivingUnit = new AtomicInteger();
 			//这里查询有问题
-			WarehouseWaybillEntity warehouseWaybillEntity = warehouseWaybillClient.findByWaybillNo(k);
+
 			DistributionReservationDTO reservation = allocationDTO.getReservation();
 			DistributionReservationEntity reservationEntity = Func.copy(reservation, DistributionReservationEntity.class);
 			reservationEntity.setWaybillNo(k);
@@ -1441,6 +1463,8 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
 //			HashSet<String> waybillNo = new HashSet<>();
 			//运单ID  -------这里运单Id后续可能变更为运单号
 			HashSet<String> waybillId = new HashSet<>();
+
+			HashSet<String> waybillNo = new HashSet<>();
 			//订单服务号
 			HashSet<String> serviceNumber = new HashSet<>();
 			//仓库名称
@@ -1449,6 +1473,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
 			HashSet<String> mallName = new HashSet<>();
 			//门店名称
 			HashSet<String> storeName = new HashSet<>();
+
+			//门店名称
+			HashSet<String> marketPhone = new HashSet<>();
 			//包件总数量
 			AtomicInteger packageTotal = new AtomicInteger();
 //			------------------收货信息构建-------------------
@@ -1461,6 +1488,25 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
 			//运单客户收货单位
 			HashSet<String> consignee = new HashSet<>();
 			v.forEach(s->{
+//				WarehouseWaybillEntity warehouseWaybillEntity = warehouseWaybillClient.findByWaybillNo(s.getWaybillNumber());
+//				if (Func.isNotEmpty(warehouseWaybillEntity.getConsigneeMobile())){
+//					marketPhone.add(warehouseWaybillEntity.getConsigneeMobile());
+//				}
+//				if (Func.isNotEmpty(warehouseWaybillEntity.getConsigneeAddress())){
+//					consigneeAddress.add(warehouseWaybillEntity.getConsigneeMobile());
+//				}
+
+				WayBillEntity wayBillEntity = wayBillClient.getByWaybillNo(s.getWaybillNumber());
+				if (Func.isNotEmpty(wayBillEntity)){
+					waybillId.add(wayBillEntity.getId().toString());
+					if (Func.isNotEmpty(wayBillEntity.getTakePhone())){
+						marketPhone.add(wayBillEntity.getTakePhone());
+					}
+					if (Func.isNotEmpty(wayBillEntity.getTakeAddress())){
+						consigneeAddress.add(wayBillEntity.getTakeAddress());
+					}
+				}
+
 				//预约单数据填充
 				if (Func.isNotEmpty(s.getMallName())){
 					mallName.add(s.getMallName());
@@ -1477,8 +1523,11 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
 				if (Func.isNotEmpty(s.getWarehouse())){
 					warehouseName.add(s.getWarehouse());
 				}
-				if (Func.isNotEmpty(s.getWaybillId())){
-					waybillId.add(s.getWaybillId().toString());
+//				if (Func.isNotEmpty(s.getWaybillId())){
+//					waybillId.add(s.getWaybillId().toString());
+//				}
+				if (Func.isNotEmpty(s.getWaybillNumber())){
+					waybillNo.add(s.getWaybillNumber());
 				}
 				if (Func.isNotEmpty(s.getConsigneeUnit())){
 					consignee.add(s.getConsigneeUnit());
@@ -1489,9 +1538,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
 				if (Func.isNotEmpty(s.getConsigneeMobile())){
 					consigneeMobile.add(s.getConsigneeMobile());
 				}
-				if (Func.isNotEmpty(s.getConsigneeAddress())){
-					consigneeAddress.add(s.getConsigneeAddress());
-				}
+//				if (Func.isNotEmpty(s.getConsigneeAddress())){
+//					consigneeAddress.add(s.getConsigneeAddress());
+//				}
 				if (Func.isNotEmpty(s.getServiceNumber())){
 					serviceNumber.add(s.getServiceNumber());
 				}
@@ -1540,11 +1589,16 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
 			reservationEntity.setConsignee(String.join(",", consigneeName));
 			reservationEntity.setDeliveryPhone(String.join(",", consigneeMobile));
 			reservationEntity.setDeliveryAddress(String.join(",", consigneeAddress));
-			reservationEntity.setReceivingUnit(String.join(",", consignee));
+
+			reservationEntity.setReceivingUnit(k);
 //			reservationEntity.setWaybillId(String.join(",", waybillId));
 			reservationEntity.setReservationDate(date);
 //			-----------------------预约信息完善----------------------------
 			reservationEntity.setReservationCode(reservationMa());
+			reservationEntity.setReplaceFee(BigDecimal.ZERO);
+			reservationEntity.setFee(BigDecimal.ZERO);
+			reservationEntity.setCollectFee(BigDecimal.ZERO);
+			reservationEntity.setOrderSource(ReservationOrderSourceConstant.zijian.getValue());
 //			reservationEntity.setDeliveryWay();
 			reservationEntity.setDeliveryType(DistributionTypeConstant.shangpei.getValue());
 			reservationEntity.setStockupStatus(ReservationStockupStatusConstant.daibeihuo.getValue());
@@ -1552,6 +1606,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
 			reservationEntity.setStockArticleId(String.join(",", orderNumber));
 			reservationEntity.setServiceNumber(String.join(",", serviceNumber));
 			reservationEntity.setWarehouseName(String.join(",", warehouseName));
+			reservationEntity.setWaybillNo(String.join(",", waybillNo));
+			reservationEntity.setWaybillId(String.join(",", waybillId));
+			reservationEntity.setMailPhone(String.join(",", marketPhone));
 			reservationEntity.setMallName(String.join(",", mallName));
 			reservationEntity.setStoreName(String.join(",", storeName));
 			reservationEntity.setLoadingStatus(ReservationLoadingStatusConstant.daizhuangche.getValue());
@@ -2098,6 +2155,12 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
 
 		HashSet<String> receivingUnit = new HashSet<>();
 
+		HashSet<String> waybillNo = new HashSet<>();
+
+		HashSet<String> waybillId = new HashSet<>();
+
+		HashSet<String> marketPhone = new HashSet<>();
+
 		AtomicReference<BigDecimal> initTotal = new AtomicReference<>(BigDecimal.ZERO);
 
 		//存在订单构建预约订单关联信息
@@ -2111,6 +2174,17 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
 				return R.fail("订单已预约!!!");
 			}
 			stockArticleList.forEach(s -> {
+//				WarehouseWaybillEntity byWaybillNo = warehouseWaybillClient.findByWaybillNo();
+//				String consigneeMobile = byWaybillNo.getConsigneeMobile();
+
+
+				WayBillEntity wayBillEntity = wayBillClient.getByWaybillNo(s.getWaybillNumber());
+				if (Func.isNotEmpty(wayBillEntity)) {
+					waybillId.add(wayBillEntity.getId().toString());
+				}
+				if (Func.isNotEmpty(wayBillEntity.getTakePhone())){
+					marketPhone.add(wayBillEntity.getTakePhone());
+				}
 //				storeName.add(s.getStoreName());
 //				mallName.add(s.getMallName());
 //				warehouseNames.add(s.getWarehouse());
@@ -2133,6 +2207,10 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
 				if (Func.isNotBlank(s.getConsigneeUnit())) {
 					receivingUnit.add(s.getConsigneeUnit());
 				}
+				if (Func.isNotBlank(s.getWaybillNumber())) {
+					waybillNo.add(s.getWaybillNumber());
+				}
+
 //				DistributionStockArticleEntity stockArticleEntity = Func.copy(s, DistributionStockArticleEntity.class);
 				DistributionReservationStockarticleEntity distributionReservationStockarticleEntity = new DistributionReservationStockarticleEntity();
 				//预约订单数量
@@ -2276,6 +2354,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
 		reservationEntity.setWarehouseName(String.join(",", warehouseNames));
 		reservationEntity.setMallName(String.join(",", mallName));
 		reservationEntity.setStoreName(String.join(",", storeName));
+		reservationEntity.setWaybillNo(String.join(",",waybillNo));
+		reservationEntity.setWaybillId(String.join(",",waybillId));
+		reservationEntity.setMailPhone(String.join(",",marketPhone));
 		reservationEntity.setReceivingUnit(String.join(",",receivingUnit));
 		//统计数量
 		BigDecimal fee = initTotal.get().add(reservationEntity.getOtherFee());
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 2e1999daf..76e6e9eef 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
@@ -18,6 +18,7 @@ package com.logpm.distribution.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
@@ -262,7 +263,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
 				//进行签收数量的修改
 				Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId());
 				//修改签收数量
-				Integer j = distributionSignforMapper.updateSignforNum(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
+//				Integer j = distributionSignforMapper.updateSignforNum(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
+				//更新装车包件数和签收包件数
+				Integer j = distributionSignforMapper.updateSignforByReservationId(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
 			}
 			//TODO 这里就需要一个异步的包件状态维护方法
 		}else if (Func.isEmpty(collect)){
@@ -400,6 +403,58 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
 
 	@Override
 	public R signforcontinue(DistrilbutionAppsignforDTO distrilbutionloadingscanDTO) {
+//		——————————————————————————————————————2023-09-21   异常签收调整————————————————————————————————————————————————————————————————————————
+//		思路:查看该该包件是否处于可被签收的状态
+//			 确定该包件不存在配送计划中
+//			 查看是否进行了装车操作   -----这一步会筛选该包件是否属于该客户。  只有属于该客户才能被签收
+//		    	  如果不是这里则需要对该包件信息进行录入然后标识该包件需要进行回库操作
+
+
+		List<DistributionParcelListEntity> parcelListEntityList = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda().eq(DistributionParcelListEntity::getOrderPackageCode, distrilbutionloadingscanDTO.getBarcode()));
+		if (Func.isNotEmpty(parcelListEntityList) && parcelListEntityList.size() == 1 ){
+			DistributionParcelListEntity parcelListEntity = parcelListEntityList.get(0);
+			if (parcelListEntity.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue())){
+				return Resp.scanFail("操作失败","包件信息有误");
+			}
+			//确认该包件确实不属于该配送任务
+			List<DistributionParcelListEntity> parcelListEntities = distributionDeliveryListMapper.selectPackageListByDeliveryListId(distrilbutionloadingscanDTO.getDeliveryId());
+			boolean flag = parcelListEntities.stream().anyMatch(p -> p.getOrderPackageStatus().equals(distrilbutionloadingscanDTO.getBarcode()));
+			if (flag){
+				log.error("##############包件存在该配送计划中:{}",distrilbutionloadingscanDTO.getBarcode());
+				return Resp.scanFail("操作失败","包件信息有误");
+			}
+			//查询这个包件是否满足该客户的要求
+			DistributionReservationEntity reservationEntity = distributionReservationMapper.selectById(distrilbutionloadingscanDTO.getReservationId());
+			DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(parcelListEntity.getStockArticleId());
+			switch (reservationEntity.getDeliveryType()){
+				case "1":
+					//商配
+					if (reservationEntity.getConsignee().equals(stockArticleEntity.getConsigneePerson()) && reservationEntity.getReceivingUnit().equals(stockArticleEntity.getConsigneeAddress())){
+						//这里的订单才满足被异常签收
+					}else {
+						return Resp.scanFail("操作失败","不属于该客户");
+					}
+					break;
+				case "2":
+					//市配
+					if (reservationEntity.getConsignee().equals(stockArticleEntity.getCustomerName())
+						&& reservationEntity.getDeliveryPhone().equals(stockArticleEntity.getCustomerTelephone())
+						&& reservationEntity.getDeliveryAddress().equals(stockArticleEntity.getCustomerAddress())){
+						//这里的订单才满足被异常签收
+
+					}else {
+						return Resp.scanFail("操作失败","不属于该客户");
+					}
+					break;
+			}
+
+
+		}else {
+			log.error("############出现相同的包件码:{}",distrilbutionloadingscanDTO.getBarcode());
+			return Resp.scanFail("操作失败","包件信息有误");
+		}
+
+
 		//获取当前用户司机
 		DistributionDeliveryListEntity distributionDeliveryListEntity = distributionDeliveryListMapper.selectById(distrilbutionloadingscanDTO.getDeliveryId());
 		DistributionDeliverySelfEntity distributionDeliverySelfEntity = new DistributionDeliverySelfEntity();
@@ -868,8 +923,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
 			log.error("#############reservationEntity参数错误:{}",reservationEntity);
 			return R.fail("服务器正忙~~");
 		}
-
-
 		//查询数据
 		DistributionSignforEntity distributionSignforEntity = baseMapper.selectOne(new QueryWrapper<DistributionSignforEntity>().lambda()
 			.eq(DistributionSignforEntity::getDeliveryId, distributionSignfor.getDeliveryId())
@@ -954,7 +1007,12 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
 						loadscaninvnEntity.setSigningUser(user.getUserName());
 						loadscaninvnEntity.setSigningUserId(user.getUserId());
 						loadscaninvnEntity.setSigningTime(simpleDateFormat.format(new Date()));
-						loadscaninvnEntity.setMsg("一键签收数据补录");
+
+						if (distributionSignfor.getIsClerk()){
+							loadscaninvnEntity.setMsg("文员一键签收数据补录");
+						}else {
+							loadscaninvnEntity.setMsg("司机一键签收数据补录");
+						}
 						distributionLoadscaninvnService.save(loadscaninvnEntity);
 						Integer i = distributionDeliveryListMapper.updateloadingTimeById(distributionDeliveryListEntity.getId());
 						//更新签收表的签收数量和装车数量
@@ -984,7 +1042,11 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
 						if (list.size()==1){
 							//正常进行扫描记录签收修改
 							DistributionLoadscaninvnEntity loadscaninvnEntity = list.get(0);
-							loadscaninvnEntity.setMsg("一键签收数据补录");
+							if (distributionSignfor.getIsClerk()){
+								loadscaninvnEntity.setMsg("文员一键签收数据补录");
+							}else {
+								loadscaninvnEntity.setMsg("司机一键签收数据补录");
+							}
 							loadscaninvnEntity.setSignforState(LoadScanSigningStatusConstant.yiqianshou.getValue());
 							loadscaninvnEntity.setReceivedQuantity(detailEntity.getNum());
 							loadscaninvnEntity.setOneClick(1);
@@ -1013,10 +1075,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
 		List<DistributionParcelListEntity> parcelListEntityList = distributionReservationMapper.selectPackageListByReservationId(distributionSignforEntity.getReservationId());
 		//包件不需要考虑备货、装车直接可进行签收  过滤已装车的包件
 		List<DistributionParcelListEntity> noLoadingPackage = parcelListEntityList.stream().filter(p -> p.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.weizhuancghe.getValue())).collect(Collectors.toList());
-
-
 		for (DistributionParcelListEntity parcelListEntity : parcelListEntityList) {
-			if (Func.equals(parcelListEntity.getOrderPackageStockupStatus(), OrderPackageStatusConstant.yiqianshou.getValue())) {
+			if (Func.equals(parcelListEntity.getOrderPackageStatus(), OrderPackageStatusConstant.yiqianshou.getValue())) {
 				continue;
 			} else if (Func.equals(parcelListEntity.getOrderPackageLoadingStatus(), OrderPackageLoadingStatusConstant.yizhuangche.getValue())) {
 				//修改包件的状态为出库状态
@@ -1030,7 +1090,11 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
 					.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()));
 				if (list.size() == 1) {
 					DistributionLoadscanEntity loadscanEntity = list.get(0);
-					loadscanEntity.setMsg("一键签收数据补录");
+					if (distributionSignfor.getIsClerk()){
+						loadscanEntity.setMsg("文员一键签收数据补录");
+					}else {
+						loadscanEntity.setMsg("司机一键签收数据补录");
+					}
 					loadscanEntity.setSignforState(LoadScanSigningStatusConstant.yiqianshou.getValue());
 					loadscanEntity.setReceivedQuantity(parcelListEntity.getQuantity());
 					loadscanEntity.setOneClick(1);
@@ -1097,7 +1161,11 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
 				loadscanEntity.setOneClick(2);
 				loadscanEntity.setOneQclick(2);
 				loadscanEntity.setSigningTime(simpleDateFormat.format(new Date()));
-				loadscanEntity.setMsg("一键签收数据补录");
+				if (distributionSignfor.getIsClerk()){
+					loadscanEntity.setMsg("文员一键签收数据补录");
+				}else {
+					loadscanEntity.setMsg("司机一键签收数据补录");
+				}
 				distributionLoadscanService.save(loadscanEntity);
 				Integer i = distributionDeliveryListMapper.updateloadingTimeById(distributionDeliveryListEntity.getId());
 				//更新签收表的签收数量和装车数量
@@ -1116,21 +1184,21 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
 		distributionReservationMapper.updateById(reservationEntity);
 		//维护配送任务
 		distributionAsyncService.checkDeliverySignStatusByReservation(distributionSignforEntity.getDeliveryId());
-
-
-
-		boolean update = this.update(new UpdateWrapper<DistributionSignforEntity>().lambda()
+		LambdaUpdateWrapper<DistributionSignforEntity> set = new UpdateWrapper<DistributionSignforEntity>().lambda()
 			.eq(DistributionSignforEntity::getId, distributionSignforEntity.getId())
 			.set(StringUtils.isNotBlank(distributionSignfor.getDeliverySignPictures()), DistributionSignforEntity::getDeliverySignPictures, distributionSignfor.getDeliverySignPictures())
 			.set(StringUtils.isNotBlank(distributionSignfor.getSigningType()), DistributionSignforEntity::getSigningType, distributionSignfor.getSigningType())
-			.set(distributionSignfor.getIsClerk(), DistributionSignforEntity::getSigningStatus, 1)
-			.set(distributionSignfor.getIsClerk(), DistributionSignforEntity::getDriverSigning, 2)
+			.set(distributionSignfor.getIsClerk(), DistributionSignforEntity::getSigningStatus, 2)
+			.set(!distributionSignfor.getIsClerk(), DistributionSignforEntity::getDriverSigning, 2)
 			.set(distributionSignfor.getIsClerk(), DistributionSignforEntity::getSigningTime, simpleDateFormat.format(new Date()))
+			.set(!distributionSignfor.getIsClerk(), DistributionSignforEntity::getSigningTime, simpleDateFormat.format(new Date()))
 			.set(distributionSignfor.getIsClerk() && StringUtils.isNotBlank(distributionSignfor.getClerkSignRemarks()), DistributionSignforEntity::getClerkSignRemarks, distributionSignfor.getClerkSignRemarks())
 			.set(!distributionSignfor.getIsClerk() && StringUtils.isNotBlank(distributionSignfor.getDriverRemarks()), DistributionSignforEntity::getDriverRemarks, distributionSignfor.getDriverRemarks())
 			.set(!distributionSignfor.getIsClerk(), DistributionSignforEntity::getDriverSigning, 2)
-			.set(!distributionSignfor.getIsClerk(), DistributionSignforEntity::getSjsigningTime, simpleDateFormat.format(new Date()))
-		);
+			.set(!distributionSignfor.getIsClerk(), DistributionSignforEntity::getSjsigningTime, simpleDateFormat.format(new Date()));
+
+
+		boolean update = this.update(set);
 		return R.status(true);
 	}