diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppPackageDetailVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppPackageDetailVO.java new file mode 100644 index 000000000..02b2c78f8 --- /dev/null +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppPackageDetailVO.java @@ -0,0 +1,49 @@ +package com.logpm.distribution.vo.app; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +@Data +public class DistributionAppPackageDetailVO implements Serializable { + + /** + * 订单自编号 + */ + @ApiModelProperty(value = "订单自编号") + private String orderCode; + + /** + * 订单自编号 + */ + @ApiModelProperty(value = "包条码") + private String orderPackageCode; + + /** + * 订单自编号 + */ + @ApiModelProperty(value = "订单自编号") + private Integer isLoading; + + /** + * 订单自编号 + */ + @ApiModelProperty(value = "订单自编号") + private Integer type; + + /** + * 订单自编号 + */ + @ApiModelProperty(value = "订单自编号") + private Integer isSignfor; + + /** + * 订单自编号 + */ + @ApiModelProperty(value = "订单自编号") + private Integer isAbnormal; + + + +} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionSignforAppController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionSignforAppController.java index 4ec7c3be0..e074d993d 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionSignforAppController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionSignforAppController.java @@ -295,4 +295,16 @@ public class DistributionSignforAppController { } } + /** + * 查询签收包件列表 + * @param reservationId + * @return + */ + @GetMapping("/signingPackageDetail") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "查询签收包件列表" ) + public R signingPackageDetail(@RequestParam Long reservationId) { + return distributionSignforService.signingPackageDetail(reservationId); + } + } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java index 814b17f1c..23c2ea57d 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java @@ -25,10 +25,7 @@ import com.logpm.distribution.entity.DistributionParcelListEntity; import com.logpm.distribution.entity.DistributionSignforEntity; import com.logpm.distribution.excel.DistributionSignforExcel; import com.logpm.distribution.vo.*; -import com.logpm.distribution.vo.app.DistributionAppDeliveryListVO; -import com.logpm.distribution.vo.app.DistributionAppParcelListVO; -import com.logpm.distribution.vo.app.DistributionAppSignforVO; -import com.logpm.distribution.vo.app.DistributionAppStockArticleVO; +import com.logpm.distribution.vo.app.*; import com.logpm.oldproject.dto.SignPushDataUnitDTO; import org.apache.ibatis.annotations.Param; import org.springblade.core.secure.BladeUser; @@ -309,4 +306,11 @@ public interface DistributionSignforMapper extends BaseMapper signingPackageDetail(@Param("reservationId") Long reservationId); } 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 0d0d744c8..2a9f52810 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 @@ -1230,4 +1230,53 @@ resultType="com.logpm.distribution.entity.DistributionSignforEntity"> SELECT * FROM logpm_distribution_signfor AS lds LEFT JOIN logpm_distribution_reservation AS ldr ON lds.reservation_id = ldr.id WHERE lds.delivery_id = #{deliveryId} AND ldr.mall_mame = #{mallName} + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java index dcfd9f2cc..cd1d25e66 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java @@ -272,4 +272,7 @@ public interface IDistributionSignforService extends BaseService distributionParcelListEntities = distributionParcelListService.list(Wrappers.query().lambda().eq(DistributionParcelListEntity::getStockArticleId, s.getId()).ne(DistributionParcelListEntity::getOrderPackageLoadingStatus, OrderPackageLoadingStatusConstant.yizhuangche.getValue()).ne(DistributionParcelListEntity::getOrderPackageReservationStatus, OrderPackageReservationStatusConstant.yiyueyue.getValue()).notIn(DistributionParcelListEntity::getOrderPackageStatus, new String[]{OrderPackageStatusConstant.yichuku.getValue(), OrderPackageStatusConstant.yiqianshou.getValue()})); + if (Func.isEmpty(distributionParcelListEntities)) { + log.error("##############添加空订单"); + throw new RuntimeException(s.getOrderCode()+"无可用包件!!!"); + } distributionParcelListEntities.forEach(dp -> { if (!dp.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue())) { if (!Func.equals(dp.getOrderPackageFreezeStatus(), OrderPackageFreezeStatusConstant.yidongjie.getValue()) && !Func.equals(dp.getOrderPackageReservationStatus(), OrderPackageReservationStatusConstant.yiyueyue.getValue())) { @@ -3141,13 +3145,17 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl packageListInfo = s.getPackageListInfo(); log.info("reservationEntity.getId()>>>>>>>>{}", reservationEntity.getId()); log.info("s.getId()>>>>>>>>{}", s.getId()); - List list = distributionReservationPackageMapper.selectList(Wrappers.query().lambda().eq(DistributionReservationPackageEntity::getReservationId, reservationEntity.getId()).eq(DistributionReservationPackageEntity::getStockArticleId, s.getId()).ne(DistributionReservationPackageEntity::getPacketBarStatus, "2")); + List list = distributionReservationPackageMapper.selectList(Wrappers.query().lambda() + .eq(DistributionReservationPackageEntity::getReservationId, reservationEntity.getId()) + .eq(DistributionReservationPackageEntity::getStockArticleId, s.getId()) + .ne(DistributionReservationPackageEntity::getPacketBarStatus, "2")); // List distributionReservationPackageEntities = distributionReservationPackageMapper.selectList(new QueryWrapper().lambda() // .eq(DistributionReservationPackageEntity::getReservationId, reservationEntity.getId()) // .eq(DistributionReservationPackageEntity::getStockArticleId, s.getId()) // ); if (Func.isEmpty(list)) { log.error("###########################预约包件查询错误:{}", list); + log.error("###########################查询错误预约Id:{}", reservationEntity.getId()); throw new RuntimeException("服务器正忙..."); } Map> oldPackageList = list.stream().collect(Collectors.groupingBy(DistributionReservationPackageEntity::getParceListId)); 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 b7b267aa9..43f09fb90 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 @@ -752,6 +752,12 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl details = baseMapper.signingPackageDetail(reservationId); + return R.data(details); + } + private boolean judgmentSignIsHavePackage(Long reservationId) { boolean flag = false; List distributionParcelListEntities = distributionReservationMapper.selectPackageListByReservationId(reservationId);