Browse Source

自提包件明细签收接口查询

pull/8/head
汤建军 10 months ago
parent
commit
9b57e30c7e
  1. 20
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java
  2. 83
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml
  3. 26
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java
  4. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

20
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java

@ -229,4 +229,24 @@ public interface DistributionParcelListMapper extends BaseMapper<DistributionPar
DistributionParcelListNodeVO selectPackageExamineAbnormal(@Param("orderPackageCode") String orderPackageCode,@Param("warehouseId") Long warehouseId);
String findOrderWaybillNo(@Param("orderId") Long orderId);
/**
* 查询自提包件计划记录
* @param orderPackageCode
* @param id
* @return
*/
List<DistributionParcelListNodeVO> selectPackagePlanBillLading(@Param("orderPackageCode")String orderPackageCode,@Param("warehouseId") Long warehouseId);
/**
* 查询自提签收扫描记录
* @param orderPackageCode
* @param id
* @return
*/
List<DistributionParcelListNodeVO> selectPackageSignForlBillLading(@Param("orderPackageCode")String orderPackageCode,@Param("warehouseId") Long warehouseId);
List<DistributionParcelListNodeVO> selectPackageCancelBillLading(@Param("orderPackageCode")String orderPackageCode,@Param("warehouseId") Long warehouseId);
}

83
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml

@ -1300,6 +1300,85 @@
and ldpl.waybill_number is not null
and ldpl.waybill_number != ''
</select>
<select id="selectPackagePlanBillLading"
resultType="com.logpm.distribution.vo.DistributionParcelListNodeVO">
SELECT
ldpl.order_code AS orderCode,
ldpl.order_package_code AS orderPackageCode,
ldpl.warehouse AS warehouseName,
ldpl.warehouse_id AS warehouseId,
ldpl.quantity AS quantity,
ldpl.train_number AS tranNumber,
ldpl.waybill_number AS waybillNumber,
ldbl.create_time AS nodeTime,
ldbl.create_user AS nodeControlsUserId,
'自提配送' AS nodeName,
lwt.pallet_name,
lwga.qr_code,
CASE ldbp.packet_bar_status
WHEN '3' THEN CONCAT('提货新增计划配送成功,自提单:',ldbl.pickup_batch)
ELSE CONCAT('计划提货,自提单:',ldbl.pickup_batch)
END description
FROM
logpm_distrilbution_bill_package AS ldbp
LEFT JOIN logpm_distribution_parcel_list AS ldpl ON ldbp.parce_list_id = ldpl.id
LEFT JOIN logpm_distrilbution_bill_lading AS ldbl ON ldbp.bill_lading_id = ldbl.id
LEFT JOIN logpm_warehouse_updown_goods AS lwug ON ldpl.order_package_code = lwug.association_value
LEFT JOIN logpm_warehouse_goods_allocation AS lwga ON lwug.allocation_id = lwga.id
LEFT JOIN logpm_warehouse_tray_goods AS lwtg ON ldpl.order_package_code = lwtg.association_value
LEFT JOIN logpm_warehouse_tray AS lwt ON lwtg.tray_id = lwt.id
WHERE
ldpl.order_package_code = #{orderPackageCode} AND ldpl.warehouse_id = #{warehouseId}
AND ldbp.is_deleted = 0
</select>
<select id="selectPackageSignForlBillLading"
resultType="com.logpm.distribution.vo.DistributionParcelListNodeVO">
SELECT
ldpl.order_code AS orderCode,
ldpl.order_package_code AS orderPackageCode,
ldpl.warehouse AS warehouseName,
ldpl.warehouse_id AS warehouseId,
ldpl.quantity AS quantity,
ldbl.pickup_batch AS tranNumber,
ldpl.waybill_number AS waybillNumber,
ldbls.create_time AS nodeTime,
ldbls.create_user AS nodeControlsUserId,
'扫描签收' AS nodeName,
CONCAT( '签收操作成功' ) AS description
FROM
logpm_distribution_bill_lading_scan AS ldbls
LEFT JOIN logpm_distribution_parcel_list AS ldpl ON ldbls.parcel_list_id = ldpl.id
LEFT JOIN logpm_distrilbution_bill_lading AS ldbl ON ldbls.bill_lading_id = ldbl.id
WHERE
ldpl.order_package_code = #{orderPackageCode} AND ldpl.warehouse_id = #{warehouseId}
AND ldbls.is_deleted = 0
</select>
<select id="selectPackageCancelBillLading"
resultType="com.logpm.distribution.vo.DistributionParcelListNodeVO">
SELECT
ldpl.order_code AS orderCode,
ldpl.order_package_code AS orderPackageCode,
ldpl.warehouse AS warehouseName,
ldpl.warehouse_id AS warehouseId,
ldpl.quantity AS quantity,
ldpl.train_number AS tranNumber,
ldpl.waybill_number AS waybillNumber,
ldbl.update_time AS nodeTime,
ldbl.update_user AS nodeControlsUserId,
'自提取消' AS nodeName,
lwt.pallet_name,
lwga.qr_code,
CONCAT('取消提货,自提单:',ldbl.pickup_batch) AS description
FROM
logpm_distrilbution_bill_package AS ldbp
LEFT JOIN logpm_distribution_parcel_list AS ldpl ON ldbp.parce_list_id = ldpl.id
LEFT JOIN logpm_distrilbution_bill_lading AS ldbl ON ldbp.bill_lading_id = ldbl.id
LEFT JOIN logpm_warehouse_updown_goods AS lwug ON ldpl.order_package_code = lwug.association_value
LEFT JOIN logpm_warehouse_goods_allocation AS lwga ON lwug.allocation_id = lwga.id
LEFT JOIN logpm_warehouse_tray_goods AS lwtg ON ldpl.order_package_code = lwtg.association_value
LEFT JOIN logpm_warehouse_tray AS lwt ON lwtg.tray_id = lwt.id
WHERE
ldpl.order_package_code = #{orderPackageCode} AND ldpl.warehouse_id = #{warehouseId} AND ldbp.packet_bar_status = '2'
AND ldbp.is_deleted = 0
</select>
</mapper>

26
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java

@ -76,6 +76,7 @@ import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.system.cache.DictBizCache;
import org.springblade.system.entity.User;
import org.springblade.system.feign.IUserClient;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.BeanUtils;
@ -1024,7 +1025,7 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
distributionParcelListNodeVO.setNodeControlsUserId(parcelListEntity.getCreateUser());
distributionParcelListNodeVO.setQuantity(parcelListEntity.getQuantity());
distributionParcelListNodeVO.setOrderCode(parcelListEntity.getOrderCode());
distributionParcelListNodeVO.setOrderCode(parcelListEntity.getWaybillNumber());
distributionParcelListNodeVO.setWaybillNumber(parcelListEntity.getWaybillNumber());
distributionParcelListNodeVO.setOrderPackageCode(parcelListEntity.getOrderPackageCode());
distributionParcelListNodeVO.setDescription("入库");
distributionParcelListNodeVO.setWarehouseName(parcelListEntity.getWarehouse());
@ -1042,6 +1043,29 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
if (Func.isNotEmpty(planDeliveryPackage)) {
parcelListNodeVOS.addAll(planDeliveryPackage);
}
//查询自提计划
List<DistributionParcelListNodeVO> planBillLadingPackage =baseMapper.selectPackagePlanBillLading(parcelListEntity.getOrderPackageCode(), myCurrentWarehouse.getId());
if (Func.isNotEmpty(planBillLadingPackage)){
parcelListNodeVOS.addAll(planBillLadingPackage);
}
//查询自提取消
List<DistributionParcelListNodeVO> cancelBillLadingPackage =baseMapper.selectPackageCancelBillLading(parcelListEntity.getOrderPackageCode(), myCurrentWarehouse.getId());
if (Func.isNotEmpty(cancelBillLadingPackage)){
cancelBillLadingPackage.forEach(s->{
R<User> userR = userClient.userInfoById(s.getNodeControlsUserId());
s.setNodeControlsUserName(userR.getData().getName());
});
parcelListNodeVOS.addAll(cancelBillLadingPackage);
}
//查询自提签收扫描
List<DistributionParcelListNodeVO> signForBillLadingPackage =baseMapper.selectPackageSignForlBillLading(parcelListEntity.getOrderPackageCode(), myCurrentWarehouse.getId());
if (Func.isNotEmpty(signForBillLadingPackage)){
signForBillLadingPackage.forEach(s->{
R<User> userR = userClient.userInfoById(s.getNodeControlsUserId());
s.setNodeControlsUserName(userR.getData().getName());
});
parcelListNodeVOS.addAll(signForBillLadingPackage);
}
//查询计划取消的包件
List<DistributionParcelListNodeVO> cancelPlanDeliveryPackage = baseMapper.selectPackageCancelPlanDelivery(parcelListEntity.getOrderPackageCode(), myCurrentWarehouse.getId());
if (Func.isNotEmpty(cancelPlanDeliveryPackage)) {

6
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

@ -1019,7 +1019,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
UpdateWrapper<DistrilbutionBillPackageEntity> updateWrapper = new UpdateWrapper<>();
updateWrapper.lambda()
.in(DistrilbutionBillPackageEntity::getBillLadingId, ids)
.set(DistrilbutionBillPackageEntity::getPacketBarStatus, "3")
.set(DistrilbutionBillPackageEntity::getPacketBarStatus, "2")
;
distrilbutionBillPackageService.update(updateWrapper);
@ -1027,7 +1027,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
UpdateWrapper<DistrilbutionBillStockEntity> orderUpdateWrapper = new UpdateWrapper<>();
orderUpdateWrapper.lambda()
.in(DistrilbutionBillStockEntity::getBillLadingId, ids)
.set(DistrilbutionBillStockEntity::getOrderStatus, "3")
.set(DistrilbutionBillStockEntity::getOrderStatus, "2")
;
distrilbutionBillStockService.update(orderUpdateWrapper);
@ -1047,7 +1047,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
//恢复库存品数量
distributionStockListService.updateInventoryQuantityOccupied(ddd.getStockListId(), ddd.getQuantity());
//进行库存品包件取消
if (ddd.getStockStatus().equals("3")) {
if (ddd.getStockStatus().equals("2")) {
disStockListDetailService.cancelInventoryPackageByReservationIdAnStockListId(ddd.getStockListId(), ddd.getBillLadingId());
}

Loading…
Cancel
Save