diff --git a/blade-biz-common/src/main/java/org/springblade/common/constant/IncomingTypeEnum.java b/blade-biz-common/src/main/java/org/springblade/common/constant/IncomingTypeEnum.java index 16fac4dd3..1958fdd47 100644 --- a/blade-biz-common/src/main/java/org/springblade/common/constant/IncomingTypeEnum.java +++ b/blade-biz-common/src/main/java/org/springblade/common/constant/IncomingTypeEnum.java @@ -10,7 +10,7 @@ public enum IncomingTypeEnum { LINE_INCOMING(3, "直接入库"), CARS_NO_INCOMING(4, "按车次号入库"), ORDER_CODE_INCOMING(5, "按订单号入库"), - PACKAGE_INCOMING(6, "按件入库"), + PACKAGE_INCOMING(6, "卸车入库"), BATCH_INCOMING(7, "批量卸车入库"), UNLOAD_TRAY_INCOMING(8, "托盘卸车入库"), UNLOAD_TRAY_ONE(9, "卸分一体"), diff --git a/blade-biz-common/src/main/java/org/springblade/common/constant/WorkNodeEnums.java b/blade-biz-common/src/main/java/org/springblade/common/constant/WorkNodeEnums.java index 270d49312..bbf747c33 100644 --- a/blade-biz-common/src/main/java/org/springblade/common/constant/WorkNodeEnums.java +++ b/blade-biz-common/src/main/java/org/springblade/common/constant/WorkNodeEnums.java @@ -16,6 +16,7 @@ public enum WorkNodeEnums implements Serializable { DELETE_DATA_ENTRY(100000, "删除数据"), INITIAL_DATA_ENTRY(101010, "数据入库"), INITIAL_WAREHOUSE_ENTRY(101020, "始发仓入库"), + UNLOAD_WAREHOUSE_ENTRY(101021, "卸车并入库"), OPEN_ORDER(102010, "开单"), CHANGE_ORDER(102020, "改单"), diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineLoadSignOrderVO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineLoadSignOrderVO.java index e3e827012..7b5af9180 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineLoadSignOrderVO.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineLoadSignOrderVO.java @@ -15,6 +15,10 @@ public class TrunklineLoadSignOrderVO extends TrunklineLoadSignOrderEntity { private String carsLineName; private String carNumber; private String driverMobile; + private String mallName; + private String mallPerson; + private String mallMobile; + private String mallAddress; private List signPhotoList; diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineLoadSignOrderMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineLoadSignOrderMapper.xml index 7c3c47558..133440dcd 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineLoadSignOrderMapper.xml +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineLoadSignOrderMapper.xml @@ -66,6 +66,10 @@ ltlso.plan_num planNum, ltlso.load_sign_code loadSignCode, ltlso.sign_num signNum, + ltlso.mall_name mallName, + ltlso.mall_person mallPerson, + ltlso.mall_mobile mallMobile, + ltlso.mall_address mallAddress, ltcl.driver_name driverName, ltcl.driver_mobile driverMobile, ltcl.car_number carNumber, diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java index 56275a692..55e2b65d3 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java @@ -333,8 +333,15 @@ public class InComingServiceImpl implements IInComingService { // // List orderPackageCodes = new ArrayList<>(); // orderPackageCodes.add(orderPackageCode); + + Integer c = WorkNodeEnums.INITIAL_WAREHOUSE_ENTRY.getCode(); + + if(incomingType.equals(IncomingTypeEnum.PACKAGE_INCOMING.getCode())){ + c = WorkNodeEnums.UNLOAD_WAREHOUSE_ENTRY.getCode(); + } + //存入日志 - packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(), AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()), AuthUtil.getNickName(), orderPackageCodes, warehouseId, finalWarehouseName, WorkNodeEnums.INITIAL_WAREHOUSE_ENTRY.getCode(), "包件" + IncomingTypeEnum.getValue(incomingType)); + packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(), AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()), AuthUtil.getNickName(), orderPackageCodes, warehouseId, finalWarehouseName, c, "包件" + IncomingTypeEnum.getValue(incomingType)); //2.判断包件和订单是否已经存入在库订单 diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java index 1fff09e8c..e92265440 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java @@ -691,9 +691,9 @@ public class OpenOrderServiceImpl implements IOpenOrderService { waybillEntity.setStockCount(advanceDetailStockNumVO.getStockNum()); waybillEntity.setStockWeight(advanceDetailStockNumVO.getStockWeight()); waybillEntity.setStockVolume(advanceDetailStockNumVO.getStockVolume()); - List billladingPackageList = advanceDetailService.findBillladingPackageByAdvanceIdsAnd(advanceIds); +// List billladingPackageList = advanceDetailService.findBillladingPackageByAdvanceIdsAnd(advanceIds); //把billladingPackageList中的所有num累加 - waybillEntity.setBillladingNum(billladingPackageList.stream().mapToInt(BillladingPackageVO::getNum).sum()); + waybillEntity.setBillladingNum(0); waybillEntity.setTotalFreight(openOrderDTO.getTotalFreight()); waybillEntity.setDeliveryFee(openOrderDTO.getDeliveryFee()); diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java index c22259724..07a33090d 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java @@ -68,6 +68,9 @@ import org.springblade.system.cache.DictBizCache; import org.springblade.system.entity.DictBiz; import org.springframework.amqp.rabbit.connection.CorrelationData; import org.springframework.amqp.rabbit.core.RabbitTemplate; +import org.springframework.core.io.ClassPathResource; +import org.springframework.data.redis.core.script.DefaultRedisScript; +import org.springframework.scripting.support.ResourceScriptSource; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -11544,6 +11547,28 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl redisScript = new DefaultRedisScript<>(); + redisScript.setScriptSource(new ResourceScriptSource(new ClassPathResource("luascript/resubmit.lua"))); + redisScript.setResultType(Long.class); + + List keys = Collections.singletonList(key); + List args = Arrays.asList(value, expireTime); + + log.info("Keys: {}", keys); + log.info("Args: {}", args); + + Long result = bladeRedis.getRedisTemplate().execute(redisScript, keys, args.toArray()); + + if (result == 1) { + log.warn("#########orderScanOrderPackageCode: 包件正在卸车 orderPackageCode={} warehouseId={}", orderPackageCode, warehouseId); + return R.fail(405, "包件正在卸车,请重试"); + } + + BasicdataWarehouseEntity basicdataWarehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId); if (Objects.isNull(basicdataWarehouseEntity)) { log.warn("##############unloadPackage: 仓库信息不存在"); @@ -12357,6 +12382,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl redisScript = new DefaultRedisScript<>(); + redisScript.setScriptSource(new ResourceScriptSource(new ClassPathResource("luascript/resubmit.lua"))); + redisScript.setResultType(Long.class); + + List keys = Collections.singletonList(key); + List args = Arrays.asList(value, expireTime); + + log.info("Keys: {}", keys); + log.info("Args: {}", args); + + Long result = bladeRedis.getRedisTemplate().execute(redisScript, keys, args.toArray()); + + if (result == 1) { + log.warn("#########orderScanOrderPackageCode: 包件正在卸车 orderPackageCode={} warehouseId={}", orderPackageCode, warehouseId); + return R.fail(405, "包件正在卸车,请重试"); + } + + BasicdataWarehouseEntity basicdataWarehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId); if (Objects.isNull(basicdataWarehouseEntity)) { log.warn("##############unloadPackageNoXz: 仓库信息不存在"); @@ -13136,6 +13186,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl warehouseIds = warehouseClient.getWarehouseIds(); + waybillDTO.setWarehouseIds(warehouseIds); + + IPage pages = warehouseWaybillAbolishService.pageAbolishWaybillList(waybillDTO); + + return R.data(pages); + }catch (CustomerException e){ + log.error(e.message,e); + return R.fail(e.code,e.message); + }catch (Exception e){ + log.error("############sendOrders: 系统异常",e); + return R.fail(500,"############sendOrders: 系统异常"); + } + } + } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWayBillDetailAbolishMapper.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWayBillDetailAbolishMapper.java index b9a46f90d..84684882e 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWayBillDetailAbolishMapper.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWayBillDetailAbolishMapper.java @@ -1,9 +1,16 @@ package com.logpm.warehouse.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.logpm.warehouse.entity.WarehouseWayBillDetail; import com.logpm.warehouse.entity.WarehouseWayBillDetailAbolish; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; @Mapper public interface WarehouseWayBillDetailAbolishMapper extends BaseMapper { + + List findByWaybillIds(@Param("ids") List ids); + } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillAbolishMapper.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillAbolishMapper.java index 31689ae75..1d2adedcc 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillAbolishMapper.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillAbolishMapper.java @@ -1,9 +1,15 @@ package com.logpm.warehouse.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.logpm.warehouse.dto.WarehouseWaybillDTO; import com.logpm.warehouse.entity.WarehouseWaybillAbolishEntity; +import com.logpm.warehouse.vo.WarehouseWaybillVO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; @Mapper public interface WarehouseWaybillAbolishMapper extends BaseMapper { + + IPage pageAbolishWaybillList(IPage page, @Param("param") WarehouseWaybillDTO waybillDTO); } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillAbolishMapper.xml b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillAbolishMapper.xml new file mode 100644 index 000000000..7b1cfd0c8 --- /dev/null +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillAbolishMapper.xml @@ -0,0 +1,226 @@ + + + + + + + diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillDetailAbolishMapper.xml b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillDetailAbolishMapper.xml new file mode 100644 index 000000000..68783a831 --- /dev/null +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillDetailAbolishMapper.xml @@ -0,0 +1,15 @@ + + + + + + + diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml index a7cd85678..0e6a0972d 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml @@ -1290,4 +1290,246 @@ update logpm_warehouse_waybill set service_type = #{serviceType} where id = #{waybillId} + + + + + diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWayBillDetailAbolishService.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWayBillDetailAbolishService.java index 5e358351e..7522188ad 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWayBillDetailAbolishService.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWayBillDetailAbolishService.java @@ -1,8 +1,12 @@ package com.logpm.warehouse.service; +import com.logpm.warehouse.entity.WarehouseWayBillDetail; import com.logpm.warehouse.entity.WarehouseWayBillDetailAbolish; import org.springblade.core.mp.base.BaseService; +import java.util.List; + public interface IWarehouseWayBillDetailAbolishService extends BaseService { + List findByWaybillIds(List ids); } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWaybillAbolishService.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWaybillAbolishService.java index 350de82a6..edcf44d41 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWaybillAbolishService.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWaybillAbolishService.java @@ -1,7 +1,13 @@ package com.logpm.warehouse.service; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.logpm.warehouse.dto.WarehouseWaybillDTO; import com.logpm.warehouse.entity.WarehouseWaybillAbolishEntity; +import com.logpm.warehouse.vo.WarehouseWaybillVO; import org.springblade.core.mp.base.BaseService; public interface IWarehouseWaybillAbolishService extends BaseService { + + IPage pageAbolishWaybillList(WarehouseWaybillDTO waybillDTO); + } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWaybillService.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWaybillService.java index d741deee4..4423e9ce0 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWaybillService.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWaybillService.java @@ -97,4 +97,5 @@ public interface IWarehouseWaybillService extends BaseService findWaybillVOByOrderCode(String orderCode); R updateWaybillTypeService(WarehouseWaybillDTO waybillDTO); + } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWayBillDetailAbolishServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWayBillDetailAbolishServiceImpl.java index c393a6bda..dec14375b 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWayBillDetailAbolishServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWayBillDetailAbolishServiceImpl.java @@ -1,5 +1,6 @@ package com.logpm.warehouse.service.impl; +import com.logpm.warehouse.entity.WarehouseWayBillDetail; import com.logpm.warehouse.entity.WarehouseWayBillDetailAbolish; import com.logpm.warehouse.mapper.WarehouseWayBillDetailAbolishMapper; import com.logpm.warehouse.service.IWarehouseWayBillDetailAbolishService; @@ -8,11 +9,16 @@ import lombok.extern.slf4j.Slf4j; import org.springblade.core.mp.base.BaseServiceImpl; import org.springframework.stereotype.Service; +import java.util.Collections; +import java.util.List; + @Slf4j @AllArgsConstructor @Service public class WarehouseWayBillDetailAbolishServiceImpl extends BaseServiceImpl implements IWarehouseWayBillDetailAbolishService { - - + @Override + public List findByWaybillIds(List ids) { + return baseMapper.findByWaybillIds(ids); + } } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillAbolishServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillAbolishServiceImpl.java index 40f8fe035..fa3076eb7 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillAbolishServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillAbolishServiceImpl.java @@ -1,15 +1,85 @@ package com.logpm.warehouse.service.impl; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.logpm.warehouse.dto.WarehouseWaybillDTO; +import com.logpm.warehouse.entity.WarehouseWayBillDetail; import com.logpm.warehouse.entity.WarehouseWaybillAbolishEntity; import com.logpm.warehouse.mapper.WarehouseWaybillAbolishMapper; +import com.logpm.warehouse.service.IWarehouseWayBillDetailAbolishService; import com.logpm.warehouse.service.IWarehouseWaybillAbolishService; +import com.logpm.warehouse.vo.WarehouseWaybillVO; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.springblade.common.utils.CommonUtil; import org.springblade.core.mp.base.BaseServiceImpl; +import org.springblade.core.tool.utils.StringUtil; import org.springframework.stereotype.Service; +import java.math.BigDecimal; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.stream.Collectors; + @Service @AllArgsConstructor @Slf4j public class WarehouseWaybillAbolishServiceImpl extends BaseServiceImpl implements IWarehouseWaybillAbolishService { + + private final IWarehouseWayBillDetailAbolishService warehouseWayBillDetailAbolishService; + + @Override + public IPage pageAbolishWaybillList(WarehouseWaybillDTO waybillDTO) { + + IPage page = new Page<>(); + page.setCurrent(waybillDTO.getPageNum()); + page.setSize(waybillDTO.getPageSize()); + + waybillDTO.setDocumentMakingTimeStartDate(CommonUtil.getStartByDateStr(waybillDTO.getDocumentMakingTimeStartStr())); + waybillDTO.setDocumentMakingTimeEndDate(CommonUtil.getEndByDateStr(waybillDTO.getDocumentMakingTimeEndStr())); + waybillDTO.setCreateTimeStartDate(CommonUtil.getStartByDateStr(waybillDTO.getCreateTimeStartStr())); + waybillDTO.setCreateTimeEndDate(CommonUtil.getEndByDateStr(waybillDTO.getCreateTimeEndStr())); + waybillDTO.setAbolishTimeStartDate(CommonUtil.getStartByDateStr(waybillDTO.getAbolishTimeStartStr())); + waybillDTO.setAbolishTimeEndDate(CommonUtil.getEndByDateStr(waybillDTO.getAbolishTimeEndStr())); + waybillDTO.setFreezeTimeStartDate(CommonUtil.getStartByDateStr(waybillDTO.getFreezeTimeStartStr())); + waybillDTO.setFreezeTimeEndDate(CommonUtil.getEndByDateStr(waybillDTO.getFreezeTimeEndStr())); + + IPage pageList = baseMapper.pageAbolishWaybillList(page, waybillDTO); + + + List records = pageList.getRecords(); + + if (!records.isEmpty()) { + //把records中的id取出作为一个集合 + List ids = records.stream().map(WarehouseWaybillVO::getId).collect(Collectors.toList()); + List wayBillDetailList = warehouseWayBillDetailAbolishService.findByWaybillIds(ids); + //把wayBillDetailList通过waibillId分组 + Map> map = wayBillDetailList.stream().collect(Collectors.groupingBy(WarehouseWayBillDetail::getWaybillId)); + for (WarehouseWaybillVO record : records) { + Long waybillId = record.getId(); + if (!Objects.isNull(map.get(waybillId))){ + List warehouseWayBillDetails = map.get(waybillId); + // 将集合 warehouseWayBillDetails 中的productName 按照, 进行拼接 + String productNames = warehouseWayBillDetails.stream().filter(s -> StringUtil.isNotBlank(s.getProductName())).map(WarehouseWayBillDetail::getProductName).collect(Collectors.joining(",")); + record.setGoodsName(productNames); + String productNum = warehouseWayBillDetails.stream().filter(s -> !Objects.isNull(s.getNum())).map(s -> s.getNum().toString()).collect(Collectors.joining(",")); + record.setProductNum(productNum); + String productPrice = warehouseWayBillDetails.stream().filter(s -> !Objects.isNull(s.getPrice())).map(s -> s.getPrice().toString()).collect(Collectors.joining(",")); + record.setProductPrice(productPrice); + // 对集合中的weight 进行求和 + BigDecimal sumWeight = warehouseWayBillDetails.stream().filter(s -> !Objects.isNull(s.getWeight())).map(WarehouseWayBillDetail::getWeight).reduce(BigDecimal.ZERO, BigDecimal::add); + record.setTotalWeight(sumWeight); + BigDecimal productVolume = warehouseWayBillDetails.stream().filter(s -> !Objects.isNull(s.getVolume())).map(WarehouseWayBillDetail::getVolume).reduce(BigDecimal.ZERO, BigDecimal::add); + record.setTotalVolume(productVolume); + record.setDetailList(warehouseWayBillDetails); + } + + } + pageList.setRecords(records); + } + + return pageList; + + } } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java index ba9010796..b788aab1b 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java @@ -37,6 +37,7 @@ import com.logpm.warehouse.entity.WarehouseWaybillEntity; import com.logpm.warehouse.excel.WarehouseWaybillExcel; import com.logpm.warehouse.mapper.WarehouseWaybillMapper; import com.logpm.warehouse.service.IWarehouseWayBillDetailService; +import com.logpm.warehouse.service.IWarehouseWaybillAbolishService; import com.logpm.warehouse.service.IWarehouseWaybillService; import com.logpm.warehouse.vo.ExportWarehouseWaybillVO; import com.logpm.warehouse.vo.FinanceWaybillExportVO; @@ -93,6 +94,9 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl selectWarehouseWaybillPage(IPage page, WarehouseWaybillVO warehouseWaybill) { return page.setRecords(baseMapper.selectWarehouseWaybillPage(page, warehouseWaybill)); @@ -1256,4 +1260,5 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl