diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml
index 6b24dd88a..114b7f212 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml
@@ -319,7 +319,7 @@
LEFT JOIN logpm_distribution_stock lds on ldpl.id = lds.parcel_list_id and lds.stockup_id = ldsi.stockup_id
LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldpl.id and lwtg.association_type = '3'
- ldsi.stockup_id =#{id}
+ ldsi.stockup_id =#{id} and ldpl.order_package_code is not null
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationZeroPackageService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationZeroPackageService.java
index 61ca9013a..4e8d0e1db 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationZeroPackageService.java
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationZeroPackageService.java
@@ -51,10 +51,12 @@ public interface IDistributionReservationZeroPackageService extends BaseService<
/**
* 根据包件ID查询预约数量
+ *
* @param parcelListId
+ * @param reservationId
* @return
*/
- DistributionReservationZeroPackageEntity getOneZeroPackageNum(Long parcelListId);
+ DistributionReservationZeroPackageEntity getOneZeroPackageNum(Long parcelListId,Long reservationId);
/**
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java
index 8b8112622..946e02481 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java
@@ -68,6 +68,11 @@ public interface IDistributionStockupService extends BaseService selectHomeStockupPage(StockupDTO stockupDTO);
+ /**
+ * 查询货位信息
+ * @param stockupDTO
+ * @return
+ */
List selectStockupOrderList(StockupDTO stockupDTO);
List selectStockupStockList(StockupDTO stockupDTO);
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java
index 87b84be44..2e030db8c 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java
@@ -903,6 +903,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
}
}else{
//商,市
+ //查询包件数据
List packageEntities = distributionReservationPackageMapper.selectList(Wrappers.query().lambda()
.eq(DistributionReservationPackageEntity::getReservationId, stockupDTO.getReservationId())
.eq(DistributionReservationPackageEntity::getPacketBarStatus, '1')
@@ -932,6 +933,9 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
stockupEntity.setFixTime(new Date());
}
}
+
+
+
if(s.get()){
stockupEntity.setStockupStatus(StockupStatusConstant.beihuozhong.getValue());
}else{
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationZeroPackageServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationZeroPackageServiceImpl.java
index 4d0f6cd6d..669b28800 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationZeroPackageServiceImpl.java
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationZeroPackageServiceImpl.java
@@ -16,6 +16,7 @@
*/
package com.logpm.distribution.service.impl;
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.distribution.entity.DistributionReservationZeroPackageEntity;
import com.logpm.distribution.vo.DistributionReservationZeroPackageVO;
@@ -54,14 +55,17 @@ public class DistributionReservationZeroPackageServiceImpl extends BaseServiceIm
/**
* 查询预约数量
+ *
* @param parcelListId
+ * @param reservationId
* @return
*/
@Override
- public DistributionReservationZeroPackageEntity getOneZeroPackageNum(Long parcelListId) {
+ public DistributionReservationZeroPackageEntity getOneZeroPackageNum(Long parcelListId, Long reservationId) {
return baseMapper.selectOne(Wrappers.query().lambda()
.eq(DistributionReservationZeroPackageEntity::getParcelListId, parcelListId)
.eq(DistributionReservationZeroPackageEntity::getIsDeleted, '0')
+ .eq(ObjectUtils.isNotNull(reservationId),DistributionReservationZeroPackageEntity::getReservationId, reservationId)
.in(DistributionReservationZeroPackageEntity::getZeroPackageStatus, "1", "3"));
}
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java
index aaf950b1c..4b1b71867 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java
@@ -460,7 +460,7 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl map.putIfAbsent(keyExtractor.apply(t),Boolean.TRUE)==null;
}
+ /**
+ * 查询货位包件信息
+ * @param stockupDTO
+ * @return
+ */
@Override
public List selectStockupOrderList(StockupDTO stockupDTO) {
Long reservationId = stockupDTO.getReservationId();//预约单id
@@ -604,9 +609,10 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl 0){
boolean b = listYou.stream().anyMatch(o -> o.getAllocationId().equals(i.getAllocationId()));
if(b){
@@ -615,7 +621,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImplii.getAllocationId().equals(i.getAllocationId()));
if(b){
listYou.forEach( wu -> {
@@ -685,7 +692,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl ObjectUtils.isNull(ko.getAllocationId()));
if(b){
@@ -734,7 +742,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl 0){
//
@@ -801,7 +810,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl 0){
@@ -875,7 +885,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl ObjectUtils.isNull(ko.getAllocationId()));
@@ -936,7 +947,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl zeroStockUpData = new ArrayList<>();;
+ List zeroStockUpData;;
if(stockupDTO.getTypeService().equals("3")){
//自提
if(ObjectUtils.isNull(stockupDTO.getAllocationId())){
@@ -2146,9 +2157,9 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl finalZeroStockUpData = zeroStockUpData;
- List collect = stockupDTO.getList().stream().filter( //可以
- a -> finalZeroStockUpData.stream().anyMatch(q -> a.getStockArticleId().equals(q.getStockArticleId()) && a.getQuantity() <= q.getQuantity() && a.getQuantity() > 0)
+ int xiugai= 0;
+ List collect = zeroStockUpData.stream().filter( //可以
+ a -> stockupDTO.getList().stream().anyMatch(q -> a.getStockArticleId().equals(q.getStockArticleId()) && q.getQuantity() <= a.getQuantity() && q.getQuantity() > 0)
).collect(Collectors.toList());
//添加备货信息
List stockEntityList = new ArrayList<>();
@@ -2157,11 +2168,12 @@ public class DistributionStockupServiceImpl extends BaseServiceImplquery().lambda()
.eq(DistributionStockEntity::getStockArticle, i.getStockArticleId())
.eq(DistributionStockEntity::getStockupId, stockupDTO.getStockupId())
+ .eq(DistributionStockEntity::getReservationId, stockupDTO.getReservationId())
.eq(DistributionStockEntity::getParcelListId, i.getParcelListId())
);
//查询备货数量
DistributionReservationZeroPackageEntity byId = reservationZeroPackageService.getById(i.getId());
- if(byId.getRealityQuantity()+i.getQuantity() > byId.getQuantity()){
+ if(i.getQuantity() > byId.getQuantity()){
return Resp.scanFail(i.getCategoryName()+"备货数量大于待备货数量!",i.getCategoryName()+"备货数量大于待备货数量!");
}
@@ -2169,7 +2181,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl