|
|
|
@ -1363,6 +1363,11 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
log.error(method + "参数异常,ReservationId为空"); |
|
|
|
|
return R.fail("请联系管理员"); |
|
|
|
|
} |
|
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); |
|
|
|
|
if (Objects.isNull(myCurrentWarehouse)){ |
|
|
|
|
return R.fail("请选择操作仓库"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String zeroPackageIds = distrilbutionloadingscanDTO.getZeroPackageIds(); |
|
|
|
|
Long reservationId = distrilbutionloadingscanDTO.getReservationId(); |
|
|
|
|
List<Long> list = Func.toLongList(zeroPackageIds); |
|
|
|
@ -1421,18 +1426,25 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
); |
|
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.sss"); |
|
|
|
|
if (Func.isEmpty(loadscanEntity)) { |
|
|
|
|
|
|
|
|
|
String driverId = null; |
|
|
|
|
String vehicId = null; |
|
|
|
|
if ("1".equals(deliveryListEntity.getKind())) { |
|
|
|
|
//自主配送
|
|
|
|
|
List<DistributionDeliverySelfVO> deliverySelfInfo = distributionDeliverySelfMapper.getDeliverySelfInfo(deliveryListEntity.getId()); |
|
|
|
|
if (!deliverySelfInfo.isEmpty()) { |
|
|
|
|
driverPhone = deliverySelfInfo.stream().filter(f -> 2 == f.getIsMaster()).map(DistributionDeliverySelfVO::getDriverPhone).collect(Collectors.joining(",")); |
|
|
|
|
driverName = deliverySelfInfo.stream().filter(f -> 2 == f.getIsMaster()).map(DistributionDeliverySelfVO::getDriverName).collect(Collectors.joining(",")); |
|
|
|
|
vehicleNub = deliverySelfInfo.stream().filter(f -> 2 == f.getIsMaster()).map(DistributionDeliverySelfVO::getVehicleNub).collect(Collectors.joining(",")); |
|
|
|
|
List<Long> collect = deliverySelfInfo.stream().filter(f -> 2 == f.getIsMaster()).map(DistributionDeliverySelfVO::getId).collect(Collectors.toList()); |
|
|
|
|
loadingId = collect.get(0); |
|
|
|
|
List<DistributionDeliverySelfVO> driverInfo = deliverySelfInfo.stream().filter(f -> 2 == f.getIsMaster()).collect(Collectors.toList()); |
|
|
|
|
if (driverInfo.size() == 1) { |
|
|
|
|
DistributionDeliverySelfVO distributionDeliverySelfVO = driverInfo.get(0); |
|
|
|
|
driverPhone = distributionDeliverySelfVO.getDriverPhone(); |
|
|
|
|
driverName = distributionDeliverySelfVO.getDriverName(); |
|
|
|
|
vehicleNub = distributionDeliverySelfVO.getVehicleNub(); |
|
|
|
|
loadingId = distributionDeliverySelfVO.getId(); |
|
|
|
|
driverId = distributionDeliverySelfVO.getDriverId(); |
|
|
|
|
vehicId = distributionDeliverySelfVO.getVehicleId(); |
|
|
|
|
}else { |
|
|
|
|
return R.fail("查询司机配置错误"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} else if ("2".equals(deliveryListEntity.getKind())) { |
|
|
|
|
//外协
|
|
|
|
|
DistributionDeliverySelfEntity deliverySelfEntity = this.getDriver(deliveryListEntity, user, false); |
|
|
|
@ -1460,6 +1472,10 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
unLoadscanEntity.setPackageId(reservationZeroPackageEntity.getParcelListId()); |
|
|
|
|
unLoadscanEntity.setReservationId(reservationId); |
|
|
|
|
unLoadscanEntity.setIsSignfor(1); |
|
|
|
|
unLoadscanEntity.setDriverId(String.valueOf(driverId)); |
|
|
|
|
unLoadscanEntity.setVehicleId(String.valueOf(vehicId)); |
|
|
|
|
unLoadscanEntity.setWarehouseId(myCurrentWarehouse.getId()); |
|
|
|
|
unLoadscanEntity.setWarehouseName(myCurrentWarehouse.getName()); |
|
|
|
|
unLoadscanEntity.setDeliveryId(distrilbutionloadingscanDTO.getDeliveryId()); |
|
|
|
|
unLoadscanEntity.setScanUser(user.getNickName()); |
|
|
|
|
unLoadscanEntity.setIsAbnormalSigning(1); |
|
|
|
@ -1667,6 +1683,10 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
if (Func.isNotEmpty(distributionDeliverySelfEntity.getDriverPhone())) { |
|
|
|
|
unLoadscanEntity.setDriverPhone(distributionDeliverySelfEntity.getDriverPhone()); |
|
|
|
|
} |
|
|
|
|
if ("".equals(deliveryListEntity.getKind())){ |
|
|
|
|
unLoadscanEntity.setDriverId(distributionDeliverySelfEntity.getDriverId()); |
|
|
|
|
unLoadscanEntity.setVehicleId(distributionDeliverySelfEntity.getVehicleId()); |
|
|
|
|
} |
|
|
|
|
unLoadscanEntity.setScanStatus(LoadingStatusConstant.buluzhuangche.getValue()); |
|
|
|
|
unLoadscanEntity.setIsInsert(2); |
|
|
|
|
unLoadscanEntity.setLoadingId(distributionDeliverySelfEntity.getId() + ""); |
|
|
|
@ -2987,7 +3007,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
warehouseUpdownTypeClient.downPackageOrDelTray(loadscanEntity.getOrderPackageCode(), myCurrentWarehouse.getId(), "签收下架解托"); |
|
|
|
|
} |
|
|
|
|
//维护订单状态
|
|
|
|
|
String content = "包件在" + myCurrentWarehouse.getName() + "由" + loadscanEntity.getSigningUser() + "扫描签收,装车方式:扫描装车,配送车次号:" + deliveryListEntity.getTrainNumber() + "预约任务号:" + distributionReservationEntity.getReservationCode(); |
|
|
|
|
String content = "包件在" + myCurrentWarehouse.getName() + "由" + AuthUtil.getNickName() + "扫描签收,装车方式:扫描装车,配送车次号:" + deliveryListEntity.getTrainNumber() + "预约任务号:" + distributionReservationEntity.getReservationCode(); |
|
|
|
|
JSONObject trunklinePackageTrackLog = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), parcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode(), deliveryListEntity.getId().toString(), parcelListEntity.getWarehouseEntryTimeEnd()); |
|
|
|
|
aaa.add(trunklinePackageTrackLog); |
|
|
|
|
} else { |
|
|
|
|