Browse Source

预约编辑库存品Bug修复

training
kilo 1 year ago
parent
commit
bfd042c235
  1. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DisStockListDetailMapper.java
  2. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DisStockListDetailMapper.xml
  3. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

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

@ -56,7 +56,7 @@ public interface DisStockListDetailMapper extends BaseMapper<DisStockListDetailE
* 删除该客户下指定库存品类的库存品包件信息
* @param id
*/
void deleteInventoryByStockListId(@Param("reservationStockListId") Long id);
void deleteInventoryByStockListId(@Param("stockListId") Long id ,@Param("reservationId")Long reservationId);
/**
* 删除客户下的库存品包件信息

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

@ -30,7 +30,7 @@
<result column="reserve5" property="reserve5"/>
</resultMap>
<delete id="deleteInventoryByStockListId">
DELETE FROM logpm_dis_stock_list_detail WHERE reservation_stock_list_id = #{reservationStockListId}
DELETE FROM logpm_dis_stock_list_detail WHERE stock_list_id = #{stockListId} and reservation_id = #{reservationId}
</delete>

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

@ -1700,12 +1700,11 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
Integer newQuantityOccupied = distributionStockListEntity.getQuantityOccupied() - reservationNum;
distributionStockListEntity.setQuantityOccupied(newQuantityOccupied);
distributionStockListService.updateById(distributionStockListEntity);
disStockListDetailMapper.deleteInventoryByStockListId(distributionReservationStocklistEntity.getId());
disStockListDetailMapper.deleteInventoryByStockListId(distributionReservationStocklistEntity.getStocklistId(),distributionReservationStocklistEntity.getReservationId());
List<DisStockListDetailEntity> list = disStockListDetailService.list(Wrappers.<DisStockListDetailEntity>query().lambda()
.eq(DisStockListDetailEntity::getReservationId, distributionReservationStocklistEntity.getReservationId()).eq(DisStockListDetailEntity::getStockListId, distributionReservationStocklistEntity.getStocklistId()));
list.forEach(l -> l.setStockPackageStatus(InventoryPackageStatusConstant.quxiao.getValue()));
disStockListDetailService.updateBatchById(list);
//TODO 删除库存品包件信息
});
DistributionReservationEntity reservationEntity = this.getById(id);
Integer reservationNum = reservationEntity.getReservationNum();

Loading…
Cancel
Save