diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/QuestDetailEntity.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/QuestDetailEntity.java
index d03ce0a27..241b62bc3 100644
--- a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/QuestDetailEntity.java
+++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/QuestDetailEntity.java
@@ -132,6 +132,12 @@ public class QuestDetailEntity extends TenantEntity {
*/
@ApiModelProperty(value = "托盘码")
private String trayCode;
+
+ /**
+ * 上架后的库位ID
+ */
+ @ApiModelProperty(value = "上架后的库位ID")
+ private String groundingAllocationId;
/**
* 托盘id
*/
diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataGoodsAllocationMapper.xml b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataGoodsAllocationMapper.xml
index 59148dcff..c6e236721 100644
--- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataGoodsAllocationMapper.xml
+++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataGoodsAllocationMapper.xml
@@ -136,8 +136,8 @@
+
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
index 2c1d5ae5d..07e2e74a1 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
@@ -576,6 +576,7 @@
logpm_distribution_reservation_package AS ldrp
INNER JOIN logpm_distribution_parcel_list AS ldpl ON ldrp.parce_list_id = ldpl.id
+ ldrp.packet_bar_status in ('1','3')
and ldrp.reservation_id = #{reservationId}
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
index b64b031cb..2540b991c 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
@@ -565,7 +565,7 @@
ldrs.reservation_num reservationNum,
ldrs.stock_article_id stockArticleId,
(SELECT COALESCE(COUNT(*), 0) from logpm_distribution_loadscan ldl WHERE ldl.order_id =ldsa.id and ldl.scan_status !=1 and ldl.signfor_state =2) signforNub,
- (SELECT COALESCE(COUNT(*), 0) from logpm_distribution_loadscan ldl WHERE ldl.order_id =ldsa.id and ldl.scan_status !=1 ) loadingNub
+ (SELECT COALESCE(COUNT(*), 0) from logpm_distribution_loadscan ldl WHERE ldl.order_id =ldsa.id and ldl.scan_status !=1 and ldl.reservation_id = ldr.id) loadingNub
FROM
logpm_distribution_reservation ldr
join logpm_distribution_reservation_stockarticle ldrs on ldr.id = ldrs.reservation_id
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
index 74c17e652..5cc28f842 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
@@ -3245,6 +3245,12 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl reservationStockarticleEntityList = baseMapper.getReservationStockArticleByDeliveryId(distributionDeliveryInfoDTO.getDeliveryId());
+ if (Func.isEmpty(reservationStockarticleEntityList)) {
+ log.error("配送任务订单查询异常:{}", reservationStockarticleEntityList);
+ return null;
+ }
+
List loadscanEntities = distributionLoadscanMapper.selectList(Wrappers.query().lambda()
.eq(DistributionLoadscanEntity::getDeliveryId, distributionDeliveryInfoDTO.getDeliveryId())
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()));
@@ -3253,9 +3259,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl k2));
}
ArrayList distributionParcelListVOS = new ArrayList<>();
- for (DistributionStockArticleVO distributionStockArticleVO : deliveryStockArticleInfo) {
- if (distributionStockArticleVO.getIsZero().equals(IsOrNoConstant.no.getValue())) {
- List parcelListEntityList = baseMapper.getPackageListByDeliveryId(distributionDeliveryInfoDTO.getDeliveryId(), distributionStockArticleVO.getId());
+ for (DistributionReservationStockarticleEntity reservationStockarticleEntity : reservationStockarticleEntityList) {
+ if (reservationStockarticleEntity.getIsZero().equals(IsOrNoConstant.no.getValue())) {
+ List parcelListEntityList = distributionReservationMapper.getReservationPackage(reservationStockarticleEntity.getReservationId(), reservationStockarticleEntity.getStockArticleId());
List parcelListVOList = DistributionParcelListWrapper.build().listVO(parcelListEntityList);
for (DistributionParcelListVO distributionParcelListVO : parcelListVOList) {
if (Func.isNotEmpty(loadingDataMap)) {
@@ -3277,9 +3283,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl parcelListEntityList = baseMapper.getPackageListByDeliveryId(distributionDeliveryInfoDTO.getDeliveryId(), distributionStockArticleVO.getId());
- List zeroParcelListEntityList = baseMapper.getZeroPackageListByDeliveryId(distributionDeliveryInfoDTO.getDeliveryId(), distributionStockArticleVO.getId());
+ } else if (reservationStockarticleEntity.getIsZero().equals(IsOrNoConstant.yes.getValue())) {
+ List parcelListEntityList = distributionReservationMapper.getReservationPackage(reservationStockarticleEntity.getReservationId(), reservationStockarticleEntity.getStockArticleId());
+ List zeroParcelListEntityList = baseMapper.getZeroPackageListByDeliveryId(distributionDeliveryInfoDTO.getDeliveryId(), reservationStockarticleEntity.getStockArticleId());
List zeroParcelListVOList = DistributionParcelListWrapper.build().listVO(zeroParcelListEntityList);
for (DistributionParcelListVO parcelListVO : zeroParcelListVOList) {
if (Func.isNotEmpty(loadingDataMap)) {
@@ -3302,7 +3308,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl {
- if (!Func.equals(p.getOrderPackageFreezeStatus(), OrderPackageFreezeStatusConstant.yidongjie.getValue()) && !Func.equals(p.getOrderPackageFreezeStatus(), OrderPackageReservationStatusConstant.yiyueyue.getValue())) {
- DistributionReservationPackageEntity distributionReservationPackageEntity = new DistributionReservationPackageEntity();
- distributionReservationPackageEntity.setReservationId(reservationId);
- distributionReservationPackageEntity.setParceListId(p.getId());
- distributionReservationPackageEntity.setStockArticleId(s.getId());
- distributionReservationPackageEntity.setPacketBarCode(p.getOrderPackageCode());
- //维护订单下包件信息
- distributionReservationPackageService.save(distributionReservationPackageEntity);
- //此时订单下的所有包件都处于预约状态,可用数为0
- packageNum.getAndAdd(p.getQuantity());
- //修改订单下的包件状态
+ if (p.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue())){
+ if (!Func.equals(p.getOrderPackageFreezeStatus(), OrderPackageFreezeStatusConstant.yidongjie.getValue()) && !Func.equals(p.getOrderPackageReservationStatus(), OrderPackageReservationStatusConstant.yiyueyue.getValue())) {
+ DistributionReservationPackageEntity distributionReservationPackageEntity = new DistributionReservationPackageEntity();
+ distributionReservationPackageEntity.setReservationId(reservationId);
+ distributionReservationPackageEntity.setParceListId(p.getId());
+ distributionReservationPackageEntity.setStockArticleId(s.getId());
+ distributionReservationPackageEntity.setPacketBarCode(p.getOrderPackageCode());
+ //维护订单下包件信息
+ distributionReservationPackageService.save(distributionReservationPackageEntity);
+ //此时订单下的所有包件都处于预约状态,可用数为0
+ packageNum.getAndAdd(p.getQuantity());
+ //修改订单下的包件状态
// p.setOrderPackageReservationStatus();
- p.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.yiyueyue.getValue());
- distributionParcelListService.updateById(p);
+ p.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.yiyueyue.getValue());
+ distributionParcelListService.updateById(p);
+ }
}
+
// stockArticleEntity.setReservationStatus(OrderReservationStatusConstant.yiyueyue.getValue());
});
s.setReservationStatus(OrderReservationStatusConstant.yiyueyue.getValue());
@@ -2688,16 +2691,20 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl {
- DistributionReservationPackageEntity distributionReservationPackageEntity = new DistributionReservationPackageEntity();
- distributionReservationPackageEntity.setReservationId(reservationId);
- distributionReservationPackageEntity.setParceListId(p.getId());
- distributionReservationPackageEntity.setStockArticleId(s.getId());
- distributionReservationPackageEntity.setPacketBarCode(p.getOrderPackageCode());
- distributionReservationPackageService.save(distributionReservationPackageEntity);
- packageNum.getAndAdd(p.getQuantity());
- p.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.yiyueyue.getValue());
+ if (!p.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue())){
+ if (!Func.equals(p.getOrderPackageFreezeStatus(), OrderPackageFreezeStatusConstant.yidongjie.getValue()) && !Func.equals(p.getOrderPackageReservationStatus(), OrderPackageReservationStatusConstant.yiyueyue.getValue())){
+ DistributionReservationPackageEntity distributionReservationPackageEntity = new DistributionReservationPackageEntity();
+ distributionReservationPackageEntity.setReservationId(reservationId);
+ distributionReservationPackageEntity.setParceListId(p.getId());
+ distributionReservationPackageEntity.setStockArticleId(s.getId());
+ distributionReservationPackageEntity.setPacketBarCode(p.getOrderPackageCode());
+ distributionReservationPackageService.save(distributionReservationPackageEntity);
+ packageNum.getAndAdd(p.getQuantity());
+ p.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.yiyueyue.getValue());
// p.setBrandId(p.getBrandId());
- distributionParcelListService.updateById(p);
+ distributionParcelListService.updateById(p);
+ }
+ }
});
// s.setReservationStatus(ServiceConstant.ORDER_RESERVATION_STATE_PART);
//设置订单可用数量为
diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java
index b0cc12581..d1c836062 100644
--- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java
+++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java
@@ -102,7 +102,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl0){
+ if (taskQuest.getList().size() > 0) {
List list = taskQuest.getList();
for (TaskQuestChildEntity taskQuestChildEntity : list) {
taskQuestChildEntity.setWarehouseId(id);
@@ -120,14 +120,14 @@ public class TaskQuestServiceImpl extends BaseServiceImpl list = taskQuestChildService.selectlistByMasterId(id);
taskQuestVO.setList(list);
@@ -138,8 +138,8 @@ public class TaskQuestServiceImpl extends BaseServiceImpl toLongList) {
//删除子表
boolean remove = taskQuestChildService.remove(new QueryWrapper().lambda()
- .eq(TaskQuestChildEntity::getIsDeleted,0)
- .in(TaskQuestChildEntity::getQuestId,toLongList)
+ .eq(TaskQuestChildEntity::getIsDeleted, 0)
+ .in(TaskQuestChildEntity::getQuestId, toLongList)
);
return this.deleteLogic(toLongList);
}
@@ -149,11 +149,11 @@ public class TaskQuestServiceImpl extends BaseServiceImpl().lambda()
- .eq(TaskQuestChildEntity::getIsDeleted,0)
- .eq(TaskQuestChildEntity::getQuestId,id)
+ .eq(TaskQuestChildEntity::getIsDeleted, 0)
+ .eq(TaskQuestChildEntity::getQuestId, id)
);
//存入子表
- if (taskQuest.getList().size()>0){
+ if (taskQuest.getList().size() > 0) {
List list = taskQuest.getList();
for (TaskQuestChildEntity taskQuestChildEntity : list) {
taskQuestChildEntity.setWarehouseId(id);
@@ -168,12 +168,12 @@ public class TaskQuestServiceImpl extends BaseServiceImpl selectTaskQuestApiPage(IPage page, TaskQuestApiVO taskQuest) {
- List collect =this.getmyWarehouseList();
+ List collect = this.getmyWarehouseList();
List taskQuestVOS = baseMapper.selectTaskQuestApiPage(page, taskQuest, collect);
for (TaskQuestApiVO taskQuestVO : taskQuestVOS) {
- //查询子表
- List list = taskQuestChildService.selectlistByMasterId(taskQuestVO.getId());
- taskQuestVO.setList(list);
+ //查询子表
+ List list = taskQuestChildService.selectlistByMasterId(taskQuestVO.getId());
+ taskQuestVO.setList(list);
}
return page.setRecords(taskQuestVOS);
}
@@ -188,13 +188,13 @@ public class TaskQuestServiceImpl extends BaseServiceImpl selectallocationList(IPage page, TaskSearchDTO taskSearchDTO) {
- List collect =this.getmyWarehouseList();
- List list =baseMapper.selectallocationList(page,taskSearchDTO,collect);
- if (!list.isEmpty()){
+ List collect = this.getmyWarehouseList();
+ List list = baseMapper.selectallocationList(page, taskSearchDTO, collect);
+ if (!list.isEmpty()) {
for (TaskallocationVO taskallocationVO : list) {
Long allocationId = taskallocationVO.getAllocationId();
- Integer i = warehouseUpdownGoodsMapper.selectCountSumByallocation(allocationId);
- taskallocationVO.setTotal(i);
+ Integer i = warehouseUpdownGoodsMapper.selectCountSumByallocation(allocationId);
+ taskallocationVO.setTotal(i);
}
}
return page.setRecords(list);
@@ -202,43 +202,43 @@ public class TaskQuestServiceImpl extends BaseServiceImpl selectcontractList(IPage page, TaskSearchDTO taskSearchDTO) {
- List collect =this.getmyWarehouseList();
+ List collect = this.getmyWarehouseList();
baseMapper.setSqlMode();
- List list = baseMapper.selectcontractList(page,taskSearchDTO,collect);
- if (!list.isEmpty()){
- for (TaskContractVO taskContractVO : list) {
- Long orderId = taskContractVO.getOrderId();
- String orderCode = taskContractVO.getOrderCode();
- //查询该订单,如果是零担直接用在库数量
- DistributionStockArticleEntity entityByStockArticle = distributionStockArticleClient.findEntityByStockArticleId(orderId);
- if (entityByStockArticle.getIsZero().equals("1")){
- if (entityByStockArticle.getGenre() == 1){
- taskContractVO.setTotal(entityByStockArticle.getTotalNumber());
- taskContractVO.setZktotal(entityByStockArticle.getTotalNumber());
- }
- }else if (entityByStockArticle.getIsZero().equals("0")){
- //包条
- if (entityByStockArticle.getGenre()==1){
- //查询该订单下包条的所有数量
- Integer integer = distributionParcelListClient.SumEntityByOrderId(orderId, null);
- Integer integer1 = distributionParcelListClient.SumEntityByOrderId(orderId, collect.get(0));
- taskContractVO.setTotal(integer);
- taskContractVO.setZktotal(integer1);
+ List list = baseMapper.selectcontractList(page, taskSearchDTO, collect);
+ if (!list.isEmpty()) {
+ for (TaskContractVO taskContractVO : list) {
+ Long orderId = taskContractVO.getOrderId();
+ String orderCode = taskContractVO.getOrderCode();
+ //查询该订单,如果是零担直接用在库数量
+ DistributionStockArticleEntity entityByStockArticle = distributionStockArticleClient.findEntityByStockArticleId(orderId);
+ if (entityByStockArticle.getIsZero().equals("1")) {
+ if (entityByStockArticle.getGenre() == 1) {
+ taskContractVO.setTotal(entityByStockArticle.getTotalNumber());
+ taskContractVO.setZktotal(entityByStockArticle.getTotalNumber());
+ }
+ } else if (entityByStockArticle.getIsZero().equals("0")) {
+ //包条
+ if (entityByStockArticle.getGenre() == 1) {
+ //查询该订单下包条的所有数量
+ Integer integer = distributionParcelListClient.SumEntityByOrderId(orderId, null);
+ Integer integer1 = distributionParcelListClient.SumEntityByOrderId(orderId, collect.get(0));
+ taskContractVO.setTotal(integer);
+ taskContractVO.setZktotal(integer1);
+ }
+
}
}
-
- }
}
return page.setRecords(list);
}
@Override
public IPage selecttrayList(IPage page, TaskSearchDTO taskSearchDTO) {
- List collect =this.getmyWarehouseList();
+ List collect = this.getmyWarehouseList();
baseMapper.setSqlMode();
- List list = baseMapper.selecttrayList(page,taskSearchDTO,collect);
- if (!list.isEmpty()){
+ List list = baseMapper.selecttrayList(page, taskSearchDTO, collect);
+ if (!list.isEmpty()) {
for (TaskTrayVO taskTrayVO : list) {
//查询托盘
Integer i = warehouseTrayGoodsMapper.SumByTrayId(taskTrayVO.getTrayId());
@@ -251,7 +251,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl selectallocationDetailByStrip(IPage page, TaskSearchDTO taskSearchDTO) {
//查询货位上的所有包条
- List list = warehouseUpdownGoodsMapper.selectListByTaskStrip(page,taskSearchDTO);
+ List list = warehouseUpdownGoodsMapper.selectListByTaskStrip(page, taskSearchDTO);
for (TaskStripApiVO taskStripApiVO : list) {
}
@@ -260,7 +260,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl