Browse Source

修改包件状态

dev-warehouse
caoyizhong 1 year ago
parent
commit
2d0a6e0dba
  1. 10
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java
  2. 14
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml
  3. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java

10
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java

@ -173,11 +173,11 @@ public class DistributionParcelListEntity extends TenantEntity {
*/
@ApiModelProperty(value = "品牌名称")
private String brandName;
/**
* 配送状态
*/
@ApiModelProperty(value = "配送状态")
private String deliveryState;
// /**
// * 配送状态
// */
// @ApiModelProperty(value = "配送状态")
// private String deliveryState;
/**
* 包件状态
*/

14
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml

@ -55,18 +55,6 @@
where l.market_id = ldsi.market_id and l.material_id = ldsi.material_id and l.pid = ldsi.pid and l.pid is not null )
END 'quantityStock',
CASE WHEN ldsi.pid is null THEN
(select count(ldrs.reservation_num)
FROM logpm_distribution_reservation_stocklist ldrs
where ldrs.stocklist_id in (select l.id
from logpm_distribution_stock_list l
where l.market_id =ldsi.market_id and l.material_id = ldsi.material_id and l.pid is null))
ELSE (select count(ldrs.reservation_num)
FROM logpm_distribution_reservation_stocklist ldrs
where ldrs.stocklist_id in (select l.id
from logpm_distribution_stock_list l
where l.market_id =ldsi.market_id and l.material_id = ldsi.material_id and l.pid = ldsi.pid and l.pid is not null))
END 'quantityOccupied',
CASE WHEN ldsi.pid is null THEN
(select sum(l.outbound_quantity)
from logpm_distribution_stock_list l
where l.market_id = ldsi.market_id and l.material_id = ldsi.material_id AND l.pid is null)
@ -87,7 +75,7 @@
from logpm_distribution_stock_list l
where l.market_id =ldsi.market_id and l.material_id = ldsi.material_id and l.pid = ldsi.pid and l.pid is not null ))
END 'unpack',
ldsi.market_id marketId,ldsi.store_id storeId,ldsi.material_id materialId,ldsi.id,ldsi.unpacking_quantity unpackingQuantity
ldsi.market_id marketId,ldsi.store_id storeId,ldsi.material_id materialId,ldsi.id,ldsi.unpacking_quantity unpackingQuantity,ldsi.quantity_occupied quantityOccupied
from logpm_distribution_stock_list ldsi
<where>
ldsi.is_deleted = 0

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

@ -56,7 +56,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
//修改状态包条状态
distributionParcelListService.update(new UpdateWrapper<DistributionParcelListEntity>().lambda()
.in(DistributionParcelListEntity::getId,PackageIdList)
.set(DistributionParcelListEntity::getDeliveryState,"5")
.set(DistributionParcelListEntity::getOrderPackageStatus,ServiceConstant.PACKAGE_STATUS_LOADING)
);
//提取订单Id(去重)
List<Long> OrderList = distributionLoadscanEntities.stream().map(DistributionLoadscanEntity::getOrderId).distinct().collect(Collectors.toList());
@ -78,7 +78,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
public Boolean getSelfPickup(Long id) {
DistributionParcelListEntity entity = new DistributionParcelListEntity();
entity.setId(id);
entity.setDeliveryState("40");
entity.setOrderPackageStatus(ServiceConstant.PACKAGE_STATUS_SING_FOR);
return distributionParcelListService.updateById(entity);
}
/**
@ -92,7 +92,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
public Boolean getOrderSelfPickup(Long id) {
DistributionStockArticleEntity entity = new DistributionStockArticleEntity();
entity.setId(id);
entity.setOrderStatus(ServiceConstant.ORDER_STATE_SIX);
entity.setOrderStatus(ServiceConstant.ORDER_STATE_SEVEN);
return distributionStockArticleService.updateById(entity);
}

Loading…
Cancel
Save