Browse Source

修复签收 状态超时更新的问题

single_db
pref_mail@163.com 1 year ago
parent
commit
27e090a320
  1. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.java
  2. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  3. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java
  4. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java
  5. 16
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  6. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.java

@ -137,7 +137,7 @@ public interface DistributionReservationMapper extends BaseMapper<DistributionRe
* @param id1
* @return
*/
List<DistributionParcelListEntity> selectPackageByReservationAndStockArticle(@Param("reservationId") Long reservationId,@Param("stockArticleId") Long stockArticleId);
List<DistributionParcelListEntity> selectPackageByReservationAndStockArticle(@Param("reservationId") Long reservationId,@Param("stockArticleId") Long stockArticleId,@Param("warehourseId") Long warehourseId);
/**
* 查询预约的订单中间表

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml

@ -805,7 +805,7 @@
ldpl.order_package_delivery_status
FROM
logpm_distribution_reservation_package AS ldrp
LEFT JOIN logpm_distribution_parcel_list AS ldpl ON ldpl.id = ldrp.parce_list_id
LEFT JOIN logpm_distribution_parcel_list AS ldpl ON ldpl.order_package_code = ldrp.packet_bar_code and ldpl.warehouse_id=#{warehourseId}
LEFT JOIN logpm_warehouse_tray_goods AS lwtg ON ldpl.id = lwtg.association_id and lwtg.association_type = 3
LEFT JOIN logpm_warehouse_updown_goods AS lwug ON ldpl.id = lwug.association_id and lwug.association_type = 3
<where>

5
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java

@ -1238,6 +1238,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
@Override
@Transactional
public void checkRetentionReservationAndDeliveryInfo(Long reservationId, Long deliveryId) {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
DistributionReservationEntity distributionReservationEntity = distributionReservationMapper.selectById(reservationId);
if (Func.isNotEmpty(distributionReservationEntity)) {
//重新统计预约单包件数量
@ -1245,7 +1246,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
if (Func.isNotEmpty(distributionReservationStockarticleEntities)) {
for (DistributionReservationStockarticleEntity distributionReservationStockarticleEntity : distributionReservationStockarticleEntities) {
if (distributionReservationStockarticleEntity.getIsZero().equals(IsOrNoConstant.no.getValue())) {
List<DistributionParcelListEntity> distributionParcelListEntities = distributionReservationMapper.selectPackageByReservationAndStockArticle(reservationId, distributionReservationStockarticleEntity.getStockArticleId());
List<DistributionParcelListEntity> distributionParcelListEntities = distributionReservationMapper.selectPackageByReservationAndStockArticle(reservationId, distributionReservationStockarticleEntity.getStockArticleId(),myCurrentWarehouse.getId());
if (Func.isNotEmpty(distributionParcelListEntities)) {
if (distributionParcelListEntities.size() != distributionReservationStockarticleEntity.getReservationNum()) {
distributionReservationStockarticleEntity.setReservationNum(distributionParcelListEntities.size());
@ -1486,7 +1487,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
if (k.equals(s)){
List<MtReceiveContentDTO> mtReceiveContentDTOS = new ArrayList<>();
for (DistributionStockArticleEntity distributionStockArticleEntity : v) {
List<DistributionParcelListEntity> distributionParcelListEntities = distributionReservationMapper.selectPackageByReservationAndStockArticle(reservationId, distributionStockArticleEntity.getId());
List<DistributionParcelListEntity> distributionParcelListEntities = distributionReservationMapper.selectPackageByReservationAndStockArticle(reservationId, distributionStockArticleEntity.getId(),warehouseId);
for (DistributionParcelListEntity distributionParcelListEntity : distributionParcelListEntities) {
if (distributionParcelListEntity.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue())){
String signingTime = distributionLoadscanMapper.selectPackageSigningTime(distributionParcelListEntity.getId());

7
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java

@ -19,6 +19,8 @@ package com.logpm.distribution.service.impl;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.distribution.dto.DistributionDeliveryInfoDTO;
import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO;
import com.logpm.distribution.entity.*;
@ -80,6 +82,7 @@ public class DistributionDeliveryInfoServiceImpl extends BaseServiceImpl<Distrib
private IDistributionLoadscaninvnService distributionLoadscaninvnService;
private final IBasicdataWarehouseClient basicdataWarehouseClient;
@Override
public IPage<DistributionDeliveryInfoVO> selectDistributionDeliveryInfoPage(IPage<DistributionDeliveryInfoVO> page, DistributionDeliveryInfoVO distributionDeliveryInfo) {
List<DistributionDeliveryInfoVO> distributionDeliveryInfoVOS = baseMapper.selectDistributionDeliveryInfoPage(page, distributionDeliveryInfo);
@ -226,6 +229,8 @@ public class DistributionDeliveryInfoServiceImpl extends BaseServiceImpl<Distrib
//-------------------------------------2023-10-07 客户查看订单详情-----------------------------------------------------------------
// 这里先查询出客户的订单信息,然后查询订单的预约包件信息
BasicdataWarehouseEntity myCurrentWarehouse =basicdataWarehouseClient.getMyCurrentWarehouse();
Long reservationId = Long.parseLong(distributionAppDeliveryListDTO.getReservationId());
List<DistributionStockArticleVO> stockArticleVOS = distributionReservationMapper.selectOrderInfoByReservationId(reservationId);
// List<DistributionParcelListEntity> packageListByReservationId = distributionReservationMapper.selectPackageListByReservationId(Long.parseLong(distributionAppDeliveryListDTO.getReservationId()));
@ -250,7 +255,7 @@ public class DistributionDeliveryInfoServiceImpl extends BaseServiceImpl<Distrib
loadingPackage = orderInfo.get(ord.getId()).stream().collect(Collectors.toMap(DistributionLoadscanEntity::getPackageId, Function.identity(), (k1, k2) -> k2));
}
if (ord.getIsZero().equals(IsOrNoConstant.no.getValue())) {
List<DistributionParcelListEntity> parcelListEntities = distributionReservationMapper.selectPackageByReservationAndStockArticle(reservationId, ord.getId());
List<DistributionParcelListEntity> parcelListEntities = distributionReservationMapper.selectPackageByReservationAndStockArticle(reservationId, ord.getId(),myCurrentWarehouse.getId());
List<DistributionAppParcelListVO> ks = new ArrayList<>();
AtomicInteger atomicInteger = new AtomicInteger();
// 装车数量

16
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

@ -1522,9 +1522,14 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
case "0":
//订制品
// v.forEach(ord -> {
List<DistributionParcelListEntity> parcelListEntities = distributionReservationMapper.selectPackageByReservationAndStockArticle(distrilbutionloadingscanDTO.getReservationId(), reservationStockarticleEntity.getStockArticleId());
List<DistributionParcelListEntity> parcelListEntities = distributionReservationMapper.selectPackageByReservationAndStockArticle(distrilbutionloadingscanDTO.getReservationId(), reservationStockarticleEntity.getStockArticleId(),myCurrentWarehouse.getId());
for (DistributionParcelListEntity parcelListEntity : parcelListEntities) {
DistributionLoadscanEntity packageLoadingScan = distributionLoadscanService.getOne(Wrappers.<DistributionLoadscanEntity>query().lambda().eq(DistributionLoadscanEntity::getReservationId, distrilbutionloadingscanDTO.getReservationId()).eq(DistributionLoadscanEntity::getOrderId, reservationStockarticleEntity.getStockArticleId()).eq(DistributionLoadscanEntity::getPackageId, parcelListEntity.getId()).ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()));
List<DistributionLoadscanEntity> packageLoadingScans = distributionLoadscanService.list(Wrappers.<DistributionLoadscanEntity>query().lambda().eq(DistributionLoadscanEntity::getReservationId, distrilbutionloadingscanDTO.getReservationId()).eq(DistributionLoadscanEntity::getOrderId, reservationStockarticleEntity.getStockArticleId()).eq(DistributionLoadscanEntity::getPackageId, parcelListEntity.getId()).ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()));
DistributionLoadscanEntity packageLoadingScan=null;
if(packageLoadingScans!=null&&!packageLoadingScans.isEmpty()){
log.info(">>>>>>>>> 包件查询 的装车件数:{}",packageLoadingScans.size());
packageLoadingScan = packageLoadingScans.get(0);
}
//无装车数据包件进行装车
if (Func.isEmpty(packageLoadingScan)) {
DistributionLoadscanEntity loadscanEntity = new DistributionLoadscanEntity();
@ -2439,6 +2444,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
@Override
public List<DistributionAppReservationVO> getAppDeliveryreservationListPage( DistributionAppDeliveryListDTO distributionDeliveryList) {
//查询客户
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
List<DistributionAppReservationVO> customList = distributionDeliveryInfoMapper.selectAppcustomListPage(distributionDeliveryList.getId());
for (DistributionAppReservationVO distributionAppReservationVO : customList) {
List<DistributionReservationStockarticleEntity> reservationStockarticleEntityList = distributionReservationMapper.selectStockArticleByReservationId(distributionAppReservationVO.getId());
@ -2454,7 +2460,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}
//统计托盘数
//查询所有包件
List<DistributionParcelListEntity> parcelListEntities = distributionReservationMapper.selectPackageByReservationAndStockArticle(reservationStockarticleEntity.getReservationId(), reservationStockarticleEntity.getStockArticleId());
List<DistributionParcelListEntity> parcelListEntities = distributionReservationMapper.selectPackageByReservationAndStockArticle(reservationStockarticleEntity.getReservationId(), reservationStockarticleEntity.getStockArticleId(),myCurrentWarehouse.getId());
parcelListEntities.forEach(p -> {
WarehouseTrayGoodsEntity warehouseTrayGoodsEntity = new WarehouseTrayGoodsEntity();
warehouseTrayGoodsEntity.setAssociationId(p.getId());
@ -3723,6 +3729,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
// if (distributionAppStockArticleVO.getLoadingNub() >=distributionAppStockArticleVO.getReservationNum()) {ordCount +=1;}
// }
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
DistributionDeliveryListEntity distributionDeliveryListEntity = baseMapper.selectById(distributionAppDeliveryListDTO.getId());
DistributionAppDeliveryListVO distributionAppDeliveryListVO = Func.copy(distributionDeliveryListEntity, DistributionAppDeliveryListVO.class);
//查询该配送所有包条
@ -3754,7 +3762,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
reservationStockarticleEntityList.forEach(rs -> {
if (rs.getIsZero().equals(IsOrNoConstant.no.getValue())) {
List<DistributionParcelListEntity> parcelListEntityList = distributionReservationMapper.selectPackageByReservationAndStockArticle(rs.getReservationId(), rs.getStockArticleId());
List<DistributionParcelListEntity> parcelListEntityList = distributionReservationMapper.selectPackageByReservationAndStockArticle(rs.getReservationId(), rs.getStockArticleId(),myCurrentWarehouse.getId());
List<DistributionLoadscanEntity> packageLoadingList = distributionLoadscanService.list(Wrappers.<DistributionLoadscanEntity>query().lambda().eq(DistributionLoadscanEntity::getDeliveryId, distributionAppDeliveryListDTO.getId()).ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()).eq(DistributionLoadscanEntity::getReservationId, rs.getReservationId()).in(DistributionLoadscanEntity::getPackageId, parcelListEntityList.stream().map(DistributionParcelListEntity::getId).collect(Collectors.toList())));
if (Func.isNotEmpty(packageLoadingList)) {
signNubSr.getAndAdd(packageLoadingList.stream().mapToInt(DistributionLoadscanEntity::getLoadedNub).sum());

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

@ -2660,6 +2660,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
@Override
public List<DistributionParcelListVO> signforPackageList(Long signforId) {
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
//查询出该签收的客户信息
DistributionSignforEntity signforEntity = this.getById(signforId);
List<DistributionParcelListEntity> parcelListEntities = baseMapper.getSignforPackageList(signforEntity.getReservationId());
@ -2670,7 +2671,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (Func.isNotEmpty(reservationStockarticleEntityList)) {
reservationStockarticleEntityList.forEach(rs -> {
if (rs.getIsZero().equals(IsOrNoConstant.no.getValue())) {
List<DistributionParcelListEntity> parcelListEntityList = distributionReservationMapper.selectPackageByReservationAndStockArticle(rs.getReservationId(), rs.getStockArticleId());
List<DistributionParcelListEntity> parcelListEntityList = distributionReservationMapper.selectPackageByReservationAndStockArticle(rs.getReservationId(), rs.getStockArticleId(),myCurrentWarehouse.getId());
List<DistributionParcelListVO> parcelListVOList = DistributionParcelListWrapper.build().listVO(parcelListEntityList);
parcelListVOList.forEach(p -> {
p.setReservationNum(p.getQuantity());

Loading…
Cancel
Save