From afa02e3d8dea1b6536b067f732496051ab725eed Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Tue, 25 Mar 2025 14:40:10 +0800 Subject: [PATCH 1/7] =?UTF-8?q?1.=E7=9B=98=E7=82=B9bug=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/TaskQuestServiceImpl.java | 227 +++++++++--------- 1 file changed, 116 insertions(+), 111 deletions(-) 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 5aac3c7e9..2c8501401 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 @@ -843,116 +843,117 @@ public class TaskQuestServiceImpl extends BaseServiceImpl>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> tag {}", 45); - Long taskID; - if (ObjectUtils.isNotNull(i.getId())) { - taskID = i.getId(); - } else { - taskID = getTaskID(); - } - if (i.getIsNew().equals(1)) { - //新增数据 - Integer questTarget = i.getQuestTarget(); - QuestDetailEntity questDetail = new QuestDetailEntity(); - BeanUtil.copyProperties(i, questDetail); - questDetail.setTenantId(user.getTenantId()); - questDetail.setCreateDept(getDeptByMaxDept(user.getDeptId())); - questDetail.setCreateTime(new Date()); - questDetail.setIsDeleted(0); - questDetail.setStatus(1); - questDetail.setIsChange(1); - if (questTarget.equals(2)) { - questDetail.setHasData(0); + try{ + Long taskID; + if (ObjectUtils.isNotNull(i.getId())) { + taskID = i.getId(); } else { - String orderPackageCode = i.getOrderPackageCode(); - if (StringUtil.isBlank(orderPackageCode)) { + taskID = getTaskID(); + } + if (i.getIsNew().equals(1)) { + //新增数据 + Integer questTarget = i.getQuestTarget(); + QuestDetailEntity questDetail = new QuestDetailEntity(); + BeanUtil.copyProperties(i, questDetail); + questDetail.setTenantId(user.getTenantId()); + questDetail.setCreateDept(getDeptByMaxDept(user.getDeptId())); + questDetail.setCreateTime(new Date()); + questDetail.setIsDeleted(0); + questDetail.setStatus(1); + questDetail.setIsChange(1); + if (questTarget.equals(2)) { questDetail.setHasData(0); } else { - questDetail.setHasData(1); + String orderPackageCode = i.getOrderPackageCode(); + if (StringUtil.isBlank(orderPackageCode)) { + questDetail.setHasData(0); + } else { + questDetail.setHasData(1); + } } + questDetail.setCreateUser(user.getUserId()); + questDetail.setUpdateUser(user.getUserId()); + questDetail.setUpdateTime(new Date()); + questDetail.setInventoryTime(new Date()); + questDetail.setInventoryUser(user.getUserId()); + + questDetail.setId(taskID); + questDetail.setWarehouseId(warehouseId); + questDetail.setQuestStatus(1); + List entityList = new ArrayList<>(); + entityList.add(questDetail); + baseMapper.insertQuestDetail(questNum, entityList); } - questDetail.setCreateUser(user.getUserId()); - questDetail.setUpdateUser(user.getUserId()); - questDetail.setUpdateTime(new Date()); - questDetail.setInventoryTime(new Date()); - questDetail.setInventoryUser(user.getUserId()); - - questDetail.setId(taskID); - questDetail.setWarehouseId(warehouseId); - questDetail.setQuestStatus(1); - List entityList = new ArrayList<>(); - entityList.add(questDetail); - baseMapper.insertQuestDetail(questNum, entityList); - } - Integer stockNum = i.getStockNum(); - Integer lossNum = i.getLossNum(); - Integer deliveNum = i.getDeliveNum(); - Integer wornNum = i.getWornNum(); - Integer noReceivedNum = i.getNoReceivedNum(); - Integer noRepairNum = i.getNoRepairNum(); - if (stockNum > 0 || lossNum > 0 || deliveNum > 0 || wornNum > 0 || noReceivedNum > 0 || noRepairNum > 0) { - - //查询盘点包件信息 - if (ObjectUtils.isNotNull(i.getOrderPackageCode())) { - QuestDetailEntity questDetail = new QuestDetailEntity(); - questDetail.setOrderPackageCode(i.getOrderPackageCode()); - QuestDetailEntity questDetail1 = baseMapper.selectOneTaskInfo(taskSearchDTO.getQuestNum(), questDetail); - if (ObjectUtils.isNotNull(questDetail1)) { - i.setId(questDetail1.getId()); - taskID = questDetail1.getId(); + Integer stockNum = i.getStockNum(); + Integer lossNum = i.getLossNum(); + Integer deliveNum = i.getDeliveNum(); + Integer wornNum = i.getWornNum(); + Integer noReceivedNum = i.getNoReceivedNum(); + Integer noRepairNum = i.getNoRepairNum(); + if (stockNum > 0 || lossNum > 0 || deliveNum > 0 || wornNum > 0 || noReceivedNum > 0 || noRepairNum > 0) { + + //查询盘点包件信息 + if (ObjectUtils.isNotNull(i.getOrderPackageCode())) { + QuestDetailEntity questDetail = new QuestDetailEntity(); + questDetail.setOrderPackageCode(i.getOrderPackageCode()); + QuestDetailEntity questDetail1 = baseMapper.selectOneTaskInfo(taskSearchDTO.getQuestNum(), questDetail); + if (ObjectUtils.isNotNull(questDetail1)) { + i.setId(questDetail1.getId()); + taskID = questDetail1.getId(); + } } - } - //添加 - List childList = new ArrayList<>(); - childList.add(addQuestDetailChild(stockNum, "10", taskID, warehouseId, questNum)); - childList.add(addQuestDetailChild(wornNum, "20", taskID, warehouseId, questNum)); - childList.add(addQuestDetailChild(lossNum, "30", taskID, warehouseId, questNum)); - childList.add(addQuestDetailChild(noRepairNum, "40", taskID, warehouseId, questNum)); - childList.add(addQuestDetailChild(deliveNum, "50", taskID, warehouseId, questNum)); - childList.add(addQuestDetailChild(noReceivedNum, "60", taskID, warehouseId, questNum)); - boolean b = childList.stream().anyMatch(ii -> ObjectUtils.isNull(ii.getId())); - if (b) { //添加 - baseMapper.insertQuestDetailChildList(taskSearchDTO.getQuestNum() + "_child", childList); - //修改盘点数据 - List list = new ArrayList<>(); - QuestDetailEntity questDetail = new QuestDetailEntity(); - questDetail.setId(i.getId()); - questDetail.setQuestStatus(1); //已盘 - questDetail.setUpdateUser(user.getUserId()); - QuestDetailEntity detailEntity = baseMapper.findEntityById(questNum, taskID); - if (!Objects.isNull(detailEntity)) { - Integer isNew = detailEntity.getIsNew(); - Integer questTarget = detailEntity.getQuestTarget(); - Integer stockNum1 = detailEntity.getStockNum(); - - if (isNew.equals(1)) { - questDetail.setIsChange(1); - } else { - if (!stockNum1.equals(stockNum)) { + List childList = new ArrayList<>(); + childList.add(addQuestDetailChild(stockNum, "10", taskID, warehouseId, questNum)); + childList.add(addQuestDetailChild(wornNum, "20", taskID, warehouseId, questNum)); + childList.add(addQuestDetailChild(lossNum, "30", taskID, warehouseId, questNum)); + childList.add(addQuestDetailChild(noRepairNum, "40", taskID, warehouseId, questNum)); + childList.add(addQuestDetailChild(deliveNum, "50", taskID, warehouseId, questNum)); + childList.add(addQuestDetailChild(noReceivedNum, "60", taskID, warehouseId, questNum)); + boolean b = childList.stream().anyMatch(ii -> ObjectUtils.isNull(ii.getId())); + if (b) { + //添加 + baseMapper.insertQuestDetailChildList(taskSearchDTO.getQuestNum() + "_child", childList); + //修改盘点数据 + List list = new ArrayList<>(); + QuestDetailEntity questDetail = new QuestDetailEntity(); + questDetail.setId(i.getId()); + questDetail.setQuestStatus(1); //已盘 + questDetail.setUpdateUser(user.getUserId()); + QuestDetailEntity detailEntity = baseMapper.findEntityById(questNum, taskID); + if (!Objects.isNull(detailEntity)) { + Integer isNew = detailEntity.getIsNew(); + Integer questTarget = detailEntity.getQuestTarget(); + Integer stockNum1 = detailEntity.getStockNum(); + + if (isNew.equals(1)) { questDetail.setIsChange(1); + } else { + if (!stockNum1.equals(stockNum)) { + questDetail.setIsChange(1); + } } } - } - questDetail.setUpdateTime(new Date()); - if (ObjectUtils.isNotNull(i.getTrayId())) { - questDetail.setTrayId(i.getTrayId()); - questDetail.setTrayCode(i.getTrayCode()); - } - list.add(questDetail); - baseMapper.updatePositionCodeList(taskSearchDTO.getQuestNum(), list); - } else { - //修改 + questDetail.setUpdateTime(new Date()); + if (ObjectUtils.isNotNull(i.getTrayId())) { + questDetail.setTrayId(i.getTrayId()); + questDetail.setTrayCode(i.getTrayCode()); + } + list.add(questDetail); + baseMapper.updatePositionCodeList(taskSearchDTO.getQuestNum(), list); + } else { + //修改 // List collect = childList.stream().filter(ii -> ObjectUtils.isNotNull(ii.getQuestNum()) && ii.getQuestNum() > 0).collect(Collectors.toList()); - baseMapper.updetaQuestDetailChildList(questNum + "_child", childList); + baseMapper.updetaQuestDetailChildList(questNum + "_child", childList); + } } - } - //是否修改库位 - QuestDetailEntity questDetail = new QuestDetailEntity(); - if (ObjectUtils.isNotNull(i.getGroundingAllocationId()) || ObjectUtils.isNotNull(i.getNewTrayId())) { - //查询当前待更新货位是否包含已更新货位数据 - QuestDetailEntity questDetail1 = new QuestDetailEntity(); - questDetail1.setGroundingAllocationId(i.getGroundingAllocationId()); + //是否修改库位 + QuestDetailEntity questDetail = new QuestDetailEntity(); + if (ObjectUtils.isNotNull(i.getGroundingAllocationId()) || ObjectUtils.isNotNull(i.getNewTrayId())) { + //查询当前待更新货位是否包含已更新货位数据 + QuestDetailEntity questDetail1 = new QuestDetailEntity(); + questDetail1.setGroundingAllocationId(i.getGroundingAllocationId()); // List questDetailEntities = baseMapper.selectTaskInfo(taskSearchDTO.getQuestNum(), questDetail1); // if (!questDetailEntities.isEmpty()) { // boolean b = questDetailEntities.stream().anyMatch(q -> ObjectUtils.isNotNull(q.getTrayId())); @@ -960,23 +961,27 @@ public class TaskQuestServiceImpl extends BaseServiceImpl Date: Tue, 25 Mar 2025 15:44:11 +0800 Subject: [PATCH 2/7] =?UTF-8?q?1.=E7=9B=98=E7=82=B9bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../warehouse/service/impl/TaskQuestServiceImpl.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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 2c8501401..ff7964a83 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 @@ -16,6 +16,7 @@ */ package com.logpm.warehouse.service.impl; +import cn.hutool.core.collection.CollUtil; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -305,6 +306,8 @@ public class TaskQuestServiceImpl extends BaseServiceImpl questDetailEntityList = baseMapper.selectQuestDetailList(taskSearchDTO.getQuestNum(), questDetail); - if (questDetailEntityList.isEmpty() || ObjectUtils.isNull(questDetailEntityList) || ObjectUtils.isNull(questDetailEntityList.get(0).getQuestId())) { + if (CollUtil.isEmpty(questDetailEntityList)) { // 需要判读这个盘点任务 是否存在绑定的商场 R extracted = extracted(questId, questDetail); @@ -2955,8 +2958,8 @@ public class TaskQuestServiceImpl extends BaseServiceImpl byPacketBarCode = distributionParcelListClient.findByPacketBarCode(questDetail.getOrderPackageCode()); - - if (ObjectUtils.isEmpty(byPacketBarCode)) { +// DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(questDetail.getOrderPackageCode(), warehouseId); + if (CollUtil.isEmpty(byPacketBarCode)) { return R.fail(5000, "包件信息不存在!!"); } else { for (DistributionParcelListEntity distributionParcelListEntity : byPacketBarCode) { From 6c5ffd11e7eab1fbc144f478d39f496a9976f6e9 Mon Sep 17 00:00:00 2001 From: zhaoqiaobo <583671871@qq.com> Date: Tue, 25 Mar 2025 16:38:57 +0800 Subject: [PATCH 3/7] =?UTF-8?q?feat(all):=20=E9=87=91=E7=89=8C=E5=B7=A5?= =?UTF-8?q?=E5=8E=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1 修改金牌工厂订单重复,无包条的情况导致包条丢失问题 --- .../jinpai/service/impl/DeliveryNoteServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/service/impl/DeliveryNoteServiceImpl.java b/blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/service/impl/DeliveryNoteServiceImpl.java index 24c6de4a2..9c44946bf 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/service/impl/DeliveryNoteServiceImpl.java +++ b/blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/service/impl/DeliveryNoteServiceImpl.java @@ -260,7 +260,7 @@ public class DeliveryNoteServiceImpl extends BaseServiceImpl Date: Tue, 25 Mar 2025 17:08:03 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E8=87=AA=E6=8F=90=E5=A4=87=E8=B4=A7BUG?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/DistributionStockupServiceImpl.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java index d96de1ad7..dd2c7b160 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java @@ -6334,7 +6334,11 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl !Objects.equals(f.getQuantity(), f.getRealityQuantity())).collect(Collectors.toList()).get(0); - deliveryDetails.setQuantity(deliveryDetails.getQuantity() - 1); + int updateNum = deliveryDetails.getQuantity() - 1; + if (Objects.equals(updateNum,deliveryDetails.getRealityQuantity())) { + deliveryDetails.setStockStatus("3"); + } + deliveryDetails.setQuantity(updateNum); distributionDeliveryDetailsService.updateById(deliveryDetails); distributionStockListMapper.decreaseStockListQuantityOccupied(stockListId, 1); distributionStockListMapper.updateInventoryQuantityOccupied(distributionStockListEntity.getId(), 1); @@ -6353,6 +6357,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl !Objects.equals(r.getQuantity(), r.getRealityQuantity())).collect(Collectors.toList()).get(0); - deliveryDetails.setQuantity(deliveryDetails.getQuantity() - 1); + int updateNum = deliveryDetails.getQuantity() - 1; + if (Objects.equals(updateNum,deliveryDetails.getRealityQuantity())) { + deliveryDetails.setStockStatus("3"); + } + deliveryDetails.setQuantity(updateNum); distributionDeliveryDetailsService.updateById(deliveryDetails); } } From f63533c3a1d4fc924e5c1e74730a835e59bdc4e2 Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Tue, 25 Mar 2025 17:44:26 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E8=87=AA=E6=8F=90=E5=BA=93=E5=AD=98?= =?UTF-8?q?=E5=93=81=E7=AD=BE=E6=94=B6BUG=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DistrilbutionBillLadingServiceImpl.java | 1 - 1 file changed, 1 deletion(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java index 19a27028e..e1d834fc4 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java @@ -3355,7 +3355,6 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl listed = disStockListDetailService.list(Wrappers.query().lambda() .eq(DisStockListDetailEntity::getReservationId, i.getId()) .eq(DisStockListDetailEntity::getSku, i.getSku()) - .eq(DisStockListDetailEntity::getStockListId, i.getStockListId()) .ne(DisStockListDetailEntity::getStockPackageStatus, ReservationPackageStatusConstant.quxiao.getValue()) ); if (Func.isNotEmpty(listed)) { From 0e5771ee98ff481fccc1ab76fc3c8a719f980fbc Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Tue, 25 Mar 2025 18:07:54 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E8=87=AA=E6=8F=90=E5=BA=93=E5=AD=98?= =?UTF-8?q?=E5=93=81=E5=A4=87=E8=B4=A7BUG=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DistributionStockupServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java index dd2c7b160..a21a8f351 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java @@ -5841,9 +5841,11 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl 0) { packageFlag = packageEntityList.stream().allMatch(a->OrderPackageStockupStatusConstant.yibeihu.getValue().equals(a.getOrderPackageStockupStatus())); - }else { + } else { packageFlag = true; } + }else { + packageFlag = true; } //库存品 if (!inventoryList.isEmpty() && inventoryList.size() > 0) { From 5c925406f3330148b8d651583d3f483f16b3848d Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Tue, 25 Mar 2025 18:17:53 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E8=87=AA=E6=8F=90=E5=BA=93=E5=AD=98?= =?UTF-8?q?=E5=93=81=E5=A4=87=E8=B4=A7BUG=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DistributionStockupServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java index a21a8f351..75cf80e34 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java @@ -5864,7 +5864,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl