From 6c6f9a87948db32d67b8d147ceced0605837e770 Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" Date: Wed, 14 Aug 2024 15:00:18 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BB=93=E5=BA=93?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E7=9A=84=E5=BC=82=E6=AD=A5=E7=BA=BF=E7=A8=8B?= =?UTF-8?q?=E7=BB=91=E5=AE=9A=E5=BD=93=E5=89=8D=E4=BC=9A=E8=AF=9D=20?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E8=8E=B7=E5=8F=96token=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E7=A7=9F=E6=88=B7ID=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/logpm/warehouse/config/ExecutorConfig.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/config/ExecutorConfig.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/config/ExecutorConfig.java index cb8d0f169..beffac986 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/config/ExecutorConfig.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/config/ExecutorConfig.java @@ -1,6 +1,7 @@ package com.logpm.warehouse.config; import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder; +import com.baomidou.mybatisplus.core.toolkit.StringUtils; import lombok.extern.slf4j.Slf4j; import org.slf4j.MDC; import org.springblade.core.secure.utils.AuthUtil; @@ -66,7 +67,17 @@ public class ExecutorConfig { RequestContextHolder.setRequestAttributes(context); // 未当前的异步线程绑定租户ID 和切换数据源 log.info(">>>> 异步线程创建,绑定租户数据源 {}",tenantId); - DynamicDataSourceContextHolder.push(tenantId); + log.info(">>>> 异步线程创建,绑定租户数据源 {}",tenantId); + if(StringUtils.isBlank(tenantId)){ + //这里为null 存在问题 + log.info(">>>> 异步线程创建,没有用户信息 {}",AuthUtil.getUserId()); + log.info(">>>> 异步线程创建,没有用户信息 {}",AuthUtil.getUser()); + log.info(">>>> 异步线程创建,没有用户信息 {}",context); + DynamicDataSourceContextHolder.push("627683"); + }else{ + // 未当前的异步线程绑定租户ID 和切换数据源 + DynamicDataSourceContextHolder.push(tenantId); + } runnable.run(); } finally { RequestContextHolder.resetRequestAttributes(); From 61f9d53dbb5fe4783e319e53945e5dbd21e25c45 Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Wed, 14 Aug 2024 16:53:15 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=89=B9=E9=87=8F?= =?UTF-8?q?=E7=AD=BE=E6=94=B6=E6=8B=A6=E6=88=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DistributionSignforServiceImpl.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java index a40ca8acb..c72a9f0bf 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java @@ -59,6 +59,7 @@ import com.logpm.warehouse.feign.IWarehouseUpdownStockUpAreaClient; import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang.StringUtils; +import org.apache.logging.log4j.util.Strings; import org.jetbrains.annotations.NotNull; import org.springblade.common.constant.DistributionTypeConstant; import org.springblade.common.constant.Inventory.InventoryLoadingStatusConstant; @@ -4938,10 +4939,13 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl packageLockIds = new ArrayList<>(); //查询数据 DistributionSignforEntity distributionSignforEntity = baseMapper.selectOne(new QueryWrapper().lambda() @@ -5449,6 +5457,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl Date: Wed, 14 Aug 2024 17:10:35 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=8F=B8=E6=9C=BA=E7=AD=BE=E6=94=B6?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../distribution/api/DistributionSignforAppController.java | 2 +- .../service/impl/DistributionSignforServiceImpl.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/api/DistributionSignforAppController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/api/DistributionSignforAppController.java index 8616b38e4..1fdcfddeb 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/api/DistributionSignforAppController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/api/DistributionSignforAppController.java @@ -224,7 +224,7 @@ public class DistributionSignforAppController { } /** - * 司机签收管理 确认签收 + * 上传签收图片 */ @PostMapping("/signforack") @ApiOperationSupport(order = 2) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java index c72a9f0bf..e5d5697cf 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java @@ -951,7 +951,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl distributionSignPrintList = new ArrayList<>(); @@ -3222,7 +3222,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl distributionSignPrintList = new ArrayList<>(); From aa42c434be224b6457eefd09cc94e6f2ff9fb111 Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Wed, 14 Aug 2024 18:20:22 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=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 --- .../distribution/mapper/DistributionReservationMapper.xml | 1 + .../service/impl/DistributionParcelListServiceImpl.java | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) 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 68e7b444a..95738205c 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 @@ -367,6 +367,7 @@ association_value ) AS t2 ON t.cargo_number = t2.association_value where ldslNew.is_deleted = 0 AND ldslNew.warehouse_id=#{warehouseId} + AND ldslNew.market_name=#{mallName} GROUP BY ldslNew.cargo_number diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java index 1aafa7acc..ef8b8d95d 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java @@ -904,8 +904,9 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl materialUnit = distributionParcelListEntities.stream().map(DistributionParcelListEntity::getMaterialUnit).distinct().collect(Collectors.toList()); List mallId = distributionParcelListEntities.stream().map(DistributionParcelListEntity::getMarketId).distinct().collect(Collectors.toList()); List materialName = distributionParcelListEntities.stream().map(DistributionParcelListEntity::getMaterialName).distinct().collect(Collectors.toList()); + List brandName = distributionParcelListEntities.stream().map(DistributionParcelListEntity::getBrandName).distinct().collect(Collectors.toList()); List brandId = distributionParcelListEntities.stream().map(DistributionParcelListEntity::getBrandId).distinct().collect(Collectors.toList()); - if (materialId.size() != 1 || materialCode.size() != 1 || materialUnit.size() != 1 || mallId.size() != 1 || materialName.size() != 1 || brandId.size() != 1) { + if (materialId.size() != 1 || materialCode.size() != 1 || materialUnit.size() != 1 || mallId.size() != 1 || materialName.size() != 1 || brandName.size() != 1) { //该批次包件出现多种物料包件 return null; } @@ -941,6 +942,7 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl Date: Wed, 14 Aug 2024 22:47:12 +0800 Subject: [PATCH 5/5] =?UTF-8?q?fix:=E5=A2=9E=E5=8A=A0=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E7=9A=84=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/logpm/patch/jobhandle/DistributionDatarepair.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/DistributionDatarepair.java b/blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/DistributionDatarepair.java index 7ec122996..ce78e7278 100644 --- a/blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/DistributionDatarepair.java +++ b/blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/DistributionDatarepair.java @@ -208,6 +208,9 @@ public class DistributionDatarepair { } else { String remarks = (String) map.get("msg"); //进行错误记录 + if(StringUtil.isBlank(remarks)){ + remarks="超时"; + } warehouseMappingDataMapper.updateClearSignforRemarks(id, remarks); log.error(">>> 推送失败 id=" + id); }