From 957c05090cd5cf5484634dd41d315d8ea835c332 Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Mon, 29 Apr 2024 17:36:20 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=8C=85=E4=BB=B6=E6=98=8E=E7=BB=86?= =?UTF-8?q?=E6=90=9C=E7=B4=A2BUG=E7=BB=B4=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/DistributionParcelListMapper.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 2babcf5ce..d95619cb5 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 @@ -299,12 +299,12 @@ and ldpl.warehouse_entry_time_end BETWEEN #{param.startWarehouseEntryTimeEnd} AND #{param.lastWarehouseEntryTimeEnd} - - AND ldl.scan_time BETWEEN #{param.startLoadingTime} AND #{param.lastLoadingTime} - - - AND ldl.signing_time BETWEEN #{param.startSigningTime} AND #{param.lastSigningTime} - + + + + + + From 7883550e42663233efec5fb01449811cbfedc6dc Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Mon, 29 Apr 2024 17:59:09 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E9=85=8D=E9=80=81=E3=80=81=E8=87=AA?= =?UTF-8?q?=E6=8F=90=E5=AE=8C=E6=88=90=E5=A4=87=E8=B4=A7=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E6=A0=87=E6=B3=A8=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DistributionStockupInfoServiceImpl.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupInfoServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupInfoServiceImpl.java index b8895e6db..ce0e8fffb 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupInfoServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupInfoServiceImpl.java @@ -114,7 +114,6 @@ public class DistributionStockupInfoServiceImpl extends BaseServiceImpl entityList = this.list(Wrappers.query().lambda() .eq(DistributionStockupInfoEntity::getReservationId, reservationId) - .ne(DistributionStockupInfoEntity::getStockUpType, 3) .ne(DistributionStockupInfoEntity::getStockStatus, "4") ); if (entityList.size()==1){ @@ -131,7 +130,6 @@ public class DistributionStockupInfoServiceImpl extends BaseServiceImpl billLadingentityList = this.list(Wrappers.query().lambda() .eq(DistributionStockupInfoEntity::getReservationId, reservationId) - .eq(DistributionStockupInfoEntity::getStockUpType, 3) .ne(DistributionStockupInfoEntity::getStockStatus, "4") ); if (billLadingentityList.size() == 1){ From 7dcdc721706dc9a737394e3682f8663fe6ff3937 Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" Date: Mon, 29 Apr 2024 22:36:41 +0800 Subject: [PATCH 3/4] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E7=9B=98=E7=82=B9?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=89=98=E7=9B=98=E6=88=96=E8=80=85=E5=95=86?= =?UTF-8?q?=E5=9C=BA=E6=95=B0=E6=8D=AE=E5=85=A8=E9=83=A8=E7=9B=98=E7=82=B9?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AftersalesAbnormalRecordController.java | 14 +-- .../AftersalesAbnormalRecordMapper.java | 4 +- .../mapper/AftersalesAbnormalRecordMapper.xml | 6 + .../AftersalesAbnormalRecordServiceImpl.java | 30 ++++- .../feign/DistributionParcelListClient.java | 2 +- .../mapper/DistributionParcelListMapper.xml | 2 +- .../impl/OuPaiFactoryDataServiceImpl.java | 2 +- .../service/impl/TaskQuestServiceImpl.java | 117 ++++++++++++------ 8 files changed, 122 insertions(+), 55 deletions(-) diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesAbnormalRecordController.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesAbnormalRecordController.java index dd105a242..4f1a4d99d 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesAbnormalRecordController.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesAbnormalRecordController.java @@ -45,7 +45,7 @@ import java.util.Objects; @Api(value = "异常列表", tags = "异常列表接口") public class AftersalesAbnormalRecordController extends BladeController { - private final IBasicdataWarehouseClient basicdataWarehouseClient; + private final IAftersalesAbnormalRecordService aftersalesAbnormalRecordService; @ResponseBody @@ -58,11 +58,7 @@ public class AftersalesAbnormalRecordController extends BladeController { try{ - //当前登录人选择的仓库 - BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); - if(!Objects.isNull(myCurrentWarehouse)){ - abnormalRecordDTO.setWarehouseId(myCurrentWarehouse.getId()); - } + return aftersalesAbnormalRecordService.findPageList(abnormalRecordDTO); }catch (CustomerException e){ log.error(e.message,e); @@ -89,11 +85,7 @@ public class AftersalesAbnormalRecordController extends BladeController { return R.fail(405,"异常id为空"); } - //当前登录人选择的仓库 - BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); - if(!Objects.isNull(myCurrentWarehouse)){ - abnormalRecordDTO.setWarehouseId(myCurrentWarehouse.getId()); - } + return aftersalesAbnormalRecordService.dealAbnormal(abnormalRecordDTO); }catch (CustomerException e){ diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalRecordMapper.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalRecordMapper.java index 2b404a69e..32ab6cc69 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalRecordMapper.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalRecordMapper.java @@ -8,11 +8,13 @@ import com.logpm.aftersales.entity.AftersalesAbnormalRecordEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.List; + @Mapper public interface AftersalesAbnormalRecordMapper extends BaseMapper { - IPage findPageList(IPage page, @Param("param") AbnormalRecordDTO abnormalRecordDTO); + IPage findPageList(IPage page, @Param("param") AbnormalRecordDTO abnormalRecordDTO, @Param("warehouseIds") List warehouseIds); JSONObject findListByCarsNoAndUpWarehouseId(@Param("carsNo") String carsNo, @Param("warehouseId") Long warehouseId); } diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalRecordMapper.xml b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalRecordMapper.xml index 0d1c74e9f..ec3e8282d 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalRecordMapper.xml +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAbnormalRecordMapper.xml @@ -6,6 +6,12 @@ select * from logpm_aftersales_abnormal_record where 1=1 + + and warehouse_id in + + #{id} + + and `type` = #{param.type} diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalRecordServiceImpl.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalRecordServiceImpl.java index 72626db3f..ed2acaee9 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalRecordServiceImpl.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalRecordServiceImpl.java @@ -7,6 +7,8 @@ import com.logpm.aftersales.dto.AbnormalRecordDTO; import com.logpm.aftersales.entity.AftersalesAbnormalRecordEntity; import com.logpm.aftersales.mapper.AftersalesAbnormalRecordMapper; import com.logpm.aftersales.service.IAftersalesAbnormalRecordService; +import com.logpm.basicdata.entity.BasicdataWarehouseEntity; +import com.logpm.basicdata.feign.IBasicdataWarehouseClient; import com.logpm.trunkline.feign.ITrunklineCarsLoadScanClient; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -15,8 +17,11 @@ import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.api.R; import org.springframework.stereotype.Service; +import java.util.ArrayList; import java.util.Date; +import java.util.List; import java.util.Objects; +import java.util.stream.Collectors; @Slf4j @Service @@ -25,19 +30,42 @@ public class AftersalesAbnormalRecordServiceImpl extends BaseServiceImpl page = new Page<>(); page.setCurrent(abnormalRecordDTO.getPageNum()); page.setSize(abnormalRecordDTO.getPageSize()); - IPage pageList = baseMapper.findPageList(page,abnormalRecordDTO); + List warehouseIdList = null; + //当前登录人选择的仓库 + BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); + if(!Objects.isNull(myCurrentWarehouse)){ + abnormalRecordDTO.setWarehouseId(myCurrentWarehouse.getId()); + warehouseIdList = new ArrayList<>(); + warehouseIdList.add(myCurrentWarehouse.getId()); + }else { + List myWarehouseList = basicdataWarehouseClient.getMyWarehouseList(); + warehouseIdList = myWarehouseList.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList()); + } + + + + + IPage pageList = baseMapper.findPageList(page,abnormalRecordDTO,warehouseIdList); return R.data(pageList); } @Override public R dealAbnormal(AbnormalRecordDTO abnormalRecordDTO) { + + //当前登录人选择的仓库 + BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); + if(!Objects.isNull(myCurrentWarehouse)){ + abnormalRecordDTO.setWarehouseId(myCurrentWarehouse.getId()); + } Long abnormalRecordId = abnormalRecordDTO.getAbnormalRecordId(); AftersalesAbnormalRecordEntity abnormalRecordEntity = baseMapper.selectById(abnormalRecordId); if(!Objects.isNull(abnormalRecordEntity)){ diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java index 84f5d3b55..5ad639ca6 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java @@ -73,7 +73,7 @@ public class DistributionParcelListClient implements IDistributionParcelListClie .eq(ObjectUtils.isNotNull(parcelListEntity.getId()),DistributionParcelListEntity::getId,parcelListEntity.getId()) .eq(ObjectUtils.isNotNull(parcelListEntity.getWarehouseId()),DistributionParcelListEntity::getWarehouseId,parcelListEntity.getWarehouseId()) .eq(ObjectUtils.isNotNull(parcelListEntity.getStockArticleId()),DistributionParcelListEntity::getStockArticleId,parcelListEntity.getStockArticleId()) - .notIn(ObjectUtils.isNotNull(parcelListEntity.getOrderPackageStatus()),DistributionParcelListEntity::getOrderPackageStatus,parcelListEntity.getOrderPackageStatus().split(",")) + .notIn(ObjectUtils.isNotNull(parcelListEntity.getOrderPackageStatus()),DistributionParcelListEntity::getOrderPackageStatus,parcelListEntity.getOrderPackageStatus()) ); } 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 d95619cb5..cb71fa228 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 @@ -217,7 +217,7 @@ LEFT JOIN logpm_distribution_bill_lading_scan ldbls ON ldbls.parcel_list_id = ldrzp.parcel_list_id ) AS c ON c.parcel_list_id = ldpl.id - ldpl.is_deleted = 0 AND m.is_deleted = 0 AND n.is_deleted = 0 + ldpl.is_deleted = 0 and lww.name like concat('%',#{param.warehouse},'%') diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryDataServiceImpl.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryDataServiceImpl.java index dbd0abf53..9060e059d 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryDataServiceImpl.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryDataServiceImpl.java @@ -38,7 +38,7 @@ public class OuPaiFactoryDataServiceImpl implements IOuPaiFactoryDataService { } else if (event == 2) { //包件收货 // todo 暂时关闭数据推送到新系统 - //code = ouPaiFactoryService.saveOuPaiPackageStatusByCode(key,event); +// code = ouPaiFactoryService.saveOuPaiPackageStatusByCode(key,event); // 老系统的 // 包件收货需要验证 收货单是否在系统中存在 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 c6d01523e..72c629b81 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 @@ -19,6 +19,7 @@ package com.logpm.warehouse.service.impl; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -333,10 +334,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl list = taskQuest.getList(); -//// for (TaskQuestChildEntity taskQuestChildEntity : list) { -//// taskQuestChildEntity.setWarehouseId(id); -//// taskQuestChildEntity.setQuestId(taskQuest.getId()); -//// -//// } -//// taskQuestChildService.saveBatch(list); -//// //添加包件信息 -//// List collect = list.stream().map(TaskQuestChildEntity::getRefId).collect(Collectors.toList()); -//// addQuestDetail(myCurrentWarehouse.getId(), collect, questNum, taskQuest.getId()); -// } else { -// addQuestDetail(myCurrentWarehouse.getId(), null, questNum, taskQuest.getId()); -// } + if (!taskQuest.getList().isEmpty()) { + List list = taskQuest.getList(); + for (TaskQuestChildEntity taskQuestChildEntity : list) { + taskQuestChildEntity.setWarehouseId(id); + taskQuestChildEntity.setQuestId(taskQuest.getId()); - addQuestDetail(myCurrentWarehouse.getId(), null, questNum, taskQuest.getId()); + } + taskQuestChildService.saveBatch(list); + //添加包件信息 + List collect = list.stream().map(TaskQuestChildEntity::getRefId).collect(Collectors.toList()); + addQuestDetail(myCurrentWarehouse.getId(), collect, questNum, taskQuest.getId()); + } else { + addQuestDetail(myCurrentWarehouse.getId(), null, questNum, taskQuest.getId()); + } + +// addQuestDetail(myCurrentWarehouse.getId(), null, questNum, taskQuest.getId()); return save ? R.success("添加成功") : R.fail("添加失败"); } @@ -1274,13 +1272,16 @@ public class TaskQuestServiceImpl extends BaseServiceImpl collect = trayEntityList.stream().filter(w -> w.getId().equals(Long.valueOf(s))).collect(Collectors.toList()); - //托盘 - if (ObjectUtils.isNull(collect)) { - i.setTrayName(collect.get(0).getPalletName()); - } else if (ObjectUtils.isNotNull(i.getTrayName()) && !i.getTrayName().contains(i.getTrayName())) { - i.setTrayName(i.getTrayCode() + "," + collect.get(0).getPalletName()); + if(StringUtil.isNoneBlank(s)){ + List collect = trayEntityList.stream().filter(w -> w.getId().equals(Long.valueOf(s))).collect(Collectors.toList()); + //托盘 + if (ObjectUtils.isNull(collect)) { + i.setTrayName(collect.get(0).getPalletName()); + } else if (ObjectUtils.isNotNull(i.getTrayName()) && !i.getTrayName().contains(i.getTrayName())) { + i.setTrayName(i.getTrayCode() + "," + collect.get(0).getPalletName()); + } } + } } @@ -1628,12 +1629,9 @@ public class TaskQuestServiceImpl extends BaseServiceImpl selectcontractList(IPage page, TaskSearchDTO taskSearchDTO) { - List collect = this.getmyWarehouseList(); baseMapper.setSqlMode(); - String goodsType = taskSearchDTO.getGoodsType(); -// LambdaQueryWrapper queryWrapper = Wrappers.query().lambda() -// .eq(QuestDetailEntity::getQuestType, 3) -// .eq(QuestDetailEntity::getQuestId, taskSearchDTO.getTaskId()); + + BladeUser user = AuthUtil.getUser(); List list = new ArrayList<>(); QuestDetailEntity questDetail = new QuestDetailEntity(); questDetail.setQuestId(taskSearchDTO.getQuestId()); @@ -1646,7 +1644,36 @@ public class TaskQuestServiceImpl extends BaseServiceImpl taskPageList = new Page<>(); List questDetailEntityList = baseMapper.selectTaskInfo(taskSearchDTO.getQuestNum(), questDetail); if (Func.isEmpty(questDetailEntityList)) { - return null; + // 从业务系统获取数据 + DistributionParcelListEntity byPacketBarCodeAndWarehouseId = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(questDetail.getCode(), taskSearchDTO.getWarehouseId()); + if (ObjectUtils.isNotNull(byPacketBarCodeAndWarehouseId)){ + // 得到下面的订单信息 + + List byPacketBarCode = distributionParcelListClient.findEntityListByOrderCode(byPacketBarCodeAndWarehouseId.getOrderCode(), taskSearchDTO.getWarehouseId()); + + if(ObjectUtils.isEmpty(byPacketBarCode)){ + throw new ServiceException("包件信息不存在"); + }else{ + List list1 = new ArrayList<>(); + for (DistributionParcelListEntity distributionParcelListEntity : byPacketBarCode) { + if(distributionParcelListEntity.getWarehouseId().equals(taskSearchDTO.getWarehouseId())){ + QuestDetailEntity questDetailEntity1 = buildQuestDetailEntity(taskSearchDTO.getQuestId(), distributionParcelListEntity, user, null); + // 这里新增2 + questDetailEntity1.setIsNew(1); + list1.add(questDetailEntity1); + } + } + baseMapper.insertQuestDetail(taskSearchDTO.getQuestNum(),list1); +// return taskPageList.setRecords(list); + questDetailEntityList = list1; + + + + } + + + } + } Map> questDetailMap = questDetailEntityList.stream().collect(Collectors.groupingBy(QuestDetailEntity::getQuestTarget)); //订制品 @@ -1827,8 +1854,10 @@ public class TaskQuestServiceImpl extends BaseServiceImpl list1) { // return baseMapper.selecttrayList(page,taskSearchDTO,collect);// 查询有没有当次盘点任务的托盘数据 - List list = new ArrayList<>(); TaskTrayVO taskTrayVO = new TaskTrayVO(); + if(list1.isEmpty()){ + return taskTrayVO; + } QuestDetailEntity questDetailEntity = list1.get(0); String trayId = questDetailEntity.getTrayId(); @@ -2010,6 +2039,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl list = taskQuestChildService.list(Wrappers.query().lambda() .eq(TaskQuestChildEntity::getQuestId, taskSearchDTO.getQuestId()) @@ -2067,9 +2097,9 @@ public class TaskQuestServiceImpl extends BaseServiceImpl d.getRefName().equals(distributionStockArticleEntity.getMallName()))) { - continue; - } +// if (!list.stream().anyMatch(d -> d.getRefName().equals(distributionStockArticleEntity.getMallName()))) { +// continue; +// } questDetail.setOrderCode(distributionStockArticleEntity.getOrderCode());// WarehouseUpdownGoodsEntity warehouseUpdownGoodsEntity = getUpdownGoodsPack(i.getAssociationId(), "3", i.getAssociationValue(), warehouseId); @@ -2077,7 +2107,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl d.getRefName().equals(stockListInfo.getMarketName()))) { - continue; - } +// if (!list.stream().anyMatch(d -> d.getRefName().equals(stockListInfo.getMarketName()))) { +// continue; +// } stockListEntity.setOrderCode(stockListInfo.getOrderCode()); DistributionStockListVO queryData = distributionStockListClient.getQueryData(stockListEntity); WarehouseUpdownGoodsEntity warehouseUpdownGoods = getUpdownGoodsStockList(i.getMarketId(), "4", i.getIncomingBatch(), warehouseId, i.getAssociationId(), i.getAssociationValue()); @@ -2107,6 +2137,15 @@ public class TaskQuestServiceImpl extends BaseServiceImpl Date: Mon, 29 Apr 2024 22:57:19 +0800 Subject: [PATCH 4/4] =?UTF-8?q?fix:=E4=BC=98=E5=8C=96=E4=B8=8B=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E8=8E=B7=E5=8F=96=E6=B2=A1=E6=9C=89=E5=9C=A8=E7=9B=98?= =?UTF-8?q?=E7=82=B9=E4=BB=BB=E5=8A=A1=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/TaskQuestServiceImpl.java | 68 ++++++++++--------- 1 file changed, 37 insertions(+), 31 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 72c629b81..8c40c3db9 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 @@ -2084,33 +2084,41 @@ public class TaskQuestServiceImpl extends BaseServiceImpl parcelList1 = distributionParcelListClient.getParcelList(parcelList); - if (!parcelList1.isEmpty()) { - questDetail.setOrderId(parcelList1.get(0).getStockArticleId()); - } else { - continue; - } - DistributionStockArticleEntity distributionStockArticleEntity = getStockArticleInfo(parcelList1.get(0).getStockArticleId()); -// if (!list.stream().anyMatch(d -> d.getRefName().equals(distributionStockArticleEntity.getMallName()))) { +// questDetail.setQuestTarget(1);// +// questDetail.setOrderPackageCode(i.getAssociationValue());//包条码 +// questDetail.setOrderPackageId(i.getAssociationId());//包件ID +// DistributionParcelListEntity parcelList = new DistributionParcelListEntity(); +// parcelList.setId(i.getAssociationId()); +// parcelList.setOrderPackageCode(i.getAssociationValue()); +// List parcelList1 = distributionParcelListClient.getParcelList(parcelList); +// if (!parcelList1.isEmpty()) { +// questDetail.setOrderId(parcelList1.get(0).getStockArticleId()); +// } else { // continue; // } - questDetail.setOrderCode(distributionStockArticleEntity.getOrderCode());// - WarehouseUpdownGoodsEntity warehouseUpdownGoodsEntity = getUpdownGoodsPack(i.getAssociationId(), "3", i.getAssociationValue(), warehouseId); - - if (Optional.ofNullable(warehouseUpdownGoodsEntity).isPresent()) { - questDetail.setPositionCode(warehouseUpdownGoodsEntity.getPositionCode());//完整货位 - questDetail.setAllocationId(String.valueOf(warehouseUpdownGoodsEntity.getAllocationId())); - } - questDetail.setIsNew(0);//是否新增 +// DistributionStockArticleEntity distributionStockArticleEntity = getStockArticleInfo(parcelList1.get(0).getStockArticleId()); +//// if (!list.stream().anyMatch(d -> d.getRefName().equals(distributionStockArticleEntity.getMallName()))) { +//// continue; +//// } +// questDetail.setOrderCode(distributionStockArticleEntity.getOrderCode());// +// WarehouseUpdownGoodsEntity warehouseUpdownGoodsEntity = getUpdownGoodsPack(i.getAssociationId(), "3", i.getAssociationValue(), warehouseId); +// +// if (Optional.ofNullable(warehouseUpdownGoodsEntity).isPresent()) { +// questDetail.setPositionCode(warehouseUpdownGoodsEntity.getPositionCode());//完整货位 +// questDetail.setAllocationId(String.valueOf(warehouseUpdownGoodsEntity.getAllocationId())); +// } +// questDetail.setIsNew(0);//是否新增 + DistributionParcelListEntity byPacketBarCodeAndWarehouseId = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(i.getAssociationValue(), warehouseId); + questDetail =buildQuestDetailEntity(taskSearchDTO.getQuestId(),byPacketBarCodeAndWarehouseId,user,null); break; case "4": //4库存品 - + questDetail.setCreateUser(user.getUserId()); + questDetail.setCreateDept(Long.parseLong(user.getDeptId().split(",")[0])); + questDetail.setStatus(1); + questDetail.setIsDeleted(0); + Date date = new Date(); + questDetail.setCreateTime(date); + questDetail.setUpdateTime(date); questDetail.setQuestTarget(3);// DistributionStockListEntity stockListEntity = new DistributionStockListEntity(); stockListEntity.setIncomingBatch(i.getIncomingBatch()); @@ -2138,14 +2146,8 @@ public class TaskQuestServiceImpl extends BaseServiceImpl