Browse Source

增加复核客户追加订单拦截、修复商配无库存品数量bug

single_db
汤建军 1 year ago
parent
commit
401c5bdb71
  1. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java
  2. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
  3. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java
  4. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  5. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java

@ -301,4 +301,12 @@ public interface DistributionSignforMapper extends BaseMapper<DistributionSignfo
* @return
*/
DistributionSignforEntity getByReservationId(@Param("reservationId") Long id);
/**
* 查询配送任务下任务
* @param id
* @param k
* @return
*/
DistributionSignforEntity selectByDeliveryIdAndMallName(@Param("reservationId")Long deliveryId,@Param("mallName") String mallName);
}

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml

@ -1226,4 +1226,8 @@
<select id="getByReservationId" resultType="com.logpm.distribution.entity.DistributionSignforEntity">
SELECT * FROM logpm_distribution_signfor WHERE reservation_id = #{reservationId}
</select>
<select id="selectByDeliveryIdAndMallName"
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}
</select>
</mapper>

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

@ -155,7 +155,7 @@ public interface IDistributionDeliveryListService extends BaseService<Distributi
List<DisStockListDetailVO> selectDistributionAppDeliverywrapIn( DistributionAppDeliveryListDTO distributionAppDeliveryListDTO);
/**
* 修改配送任务
* 修改商配配送任务
* @param deliveryListDTO
* @return
*/

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

@ -2964,6 +2964,17 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
stockupInfoEntity.setStockUpType("1");
distributionStockupInfoService.save(stockupInfoEntity);
} else {
//通过配送任务查询该客户的信息是否完成审核,如果审核了则视为一个新客户
DistributionSignforEntity signforEntity = distributionSignforMapper.selectByDeliveryIdAndMallName(deliveryListEntity.getId(),k);
if (Func.isNotEmpty(signforEntity)){
if (Func.isNotEmpty(oldClient.get(k)) && signforEntity.getSigningStatus().equals(SignforStatusConstant.yiqianshou.getValue())){
//拦截
log.error("###################商配配送对完成复核进行订单追加操作失败");
log.error("###################配送ID:{}",deliveryListEntity.getId());
log.error("###################客户名称:{}",k);
throw new RuntimeException(k+"此客户已完成签收");
}
}
//根据配送计划和运单号查询出该预约
// DistributionReservationEntity reservationEntity = baseMapper.selectReservationByDeliveryListIdAndCustomer(deliveryListEntityId, k);
DistributionReservationEntity reservationEntity = baseMapper.selectReservationByDeliveryListIdAndCustomerUnit(deliveryListEntityId, k);

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

@ -2317,7 +2317,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
reservationEntity.setReservationNum(packageTotal.get());
this.updateById(reservationEntity);
deliveryPackageTotal.getAndAdd(reservationEntity.getReservationNum());
inventoryNub.getAndAdd(reservationEntity.getReservationStockListNum());
if (Func.isNotEmpty(reservationEntity.getReservationStockListNum())){
inventoryNub.getAndAdd(reservationEntity.getReservationStockListNum());
}
DistributionSignforEntity distributionSignforEntity = new DistributionSignforEntity();
distributionSignforEntity.setReservationId(reservationEntity.getId());
distributionSignforEntity.setTrainNumber(trainNumberMa);

Loading…
Cancel
Save