From b0334336c1780bee042516f94887a88e95e77106 Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" Date: Wed, 26 Jun 2024 14:59:26 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8DPC=E7=AD=BE=E6=94=B6?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=8E=A8=E9=80=81=20=E5=9C=A8=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E5=8F=91=E8=BD=A6=E5=90=8E=20=E5=8C=85=E4=BB=B6?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xxl/job/admin/JobAdminApplication.java | 1 - .../impl/BasicdataTrayServiceImpl.java | 35 ++----------------- .../impl/BusinessAsyncServiceImpl.java | 22 +++++++----- .../impl/BusinessPreOrderServiceImpl.java | 1 + 4 files changed, 18 insertions(+), 41 deletions(-) diff --git a/blade-ops/blade-xxljob-admin/src/main/java/com/xxl/job/admin/JobAdminApplication.java b/blade-ops/blade-xxljob-admin/src/main/java/com/xxl/job/admin/JobAdminApplication.java index cbd785609..f6a1e3e47 100644 --- a/blade-ops/blade-xxljob-admin/src/main/java/com/xxl/job/admin/JobAdminApplication.java +++ b/blade-ops/blade-xxljob-admin/src/main/java/com/xxl/job/admin/JobAdminApplication.java @@ -12,7 +12,6 @@ public class JobAdminApplication { public static void main(String[] args) { - BladeApplication.run(LauncherConstant.APPLICATION_XXLJOB_ADMIN_NAME, JobAdminApplication.class, args); } diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataTrayServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataTrayServiceImpl.java index fe249e30f..514cbcc82 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataTrayServiceImpl.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataTrayServiceImpl.java @@ -18,7 +18,6 @@ package com.logpm.basicdata.service.impl; import cn.hutool.core.util.ObjectUtil; import com.alibaba.fastjson.JSONObject; -import com.alibaba.nacos.common.utils.StringUtils; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -44,7 +43,6 @@ import com.logpm.warehouse.vo.WarehouseTraybarCode; import lombok.AllArgsConstructor; import lombok.extern.log4j.Log4j2; import org.springblade.common.constant.CodeNumConstant; -import org.springblade.common.constant.DictBizConstant; import org.springblade.common.utils.QRCodeUtil; import org.springblade.common.utils.TemplateUtil; import org.springblade.core.log.exception.ServiceException; @@ -53,15 +51,10 @@ import org.springblade.core.secure.BladeUser; import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.Func; -import org.springblade.system.cache.DictBizCache; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import sun.misc.BASE64Encoder; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -233,9 +226,9 @@ public class BasicdataTrayServiceImpl extends BaseServiceImpl map = JSONObject.parseObject(JSONObject.toJSONString(trayQRCode), Map.class); String filename = QRCodeUtil.createCodeToFile(trayQRCode.getTrayCode()); - map.put("qrCode", getEmpAutograph(filename)); + map.put("qrCode", QRCodeUtil.getEmpAutograph(filename)); String fileTypeName = QRCodeUtil.createCodeToFileType(trayQRCode.getTrayCode()); - map.put("imgType", getEmpAutograph(fileTypeName)); + map.put("imgType", QRCodeUtil.getEmpAutograph(fileTypeName)); map.put("tenant","汇通物流"); data.add(map); } @@ -243,29 +236,7 @@ public class BasicdataTrayServiceImpl extends BaseServiceImpl dataResult, String mallName) { - List orderIdList = dataResult.stream() - .map(BusinessPreOrderEntity::getStockArticleId) + List orderCodeList = dataResult.stream() + .map(BusinessPreOrderEntity::getOrderCode) .collect(Collectors.toList()); R tenantByName = sysClient.getTenantByName(mallName); if (tenantByName.isSuccess()) { @@ -47,7 +48,7 @@ public class BusinessAsyncServiceImpl implements IBusinessAsyncService { LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); lambdaQueryWrapper.eq(BusinessPreOrderEntity::getInWarehouse, 0); - lambdaQueryWrapper.in(BusinessPreOrderEntity::getStockArticleId, orderIdList); + lambdaQueryWrapper.in(BusinessPreOrderEntity::getOrderCode, orderCodeList); List list = businessPreOrderService.list(lambdaQueryWrapper); @@ -55,18 +56,23 @@ public class BusinessAsyncServiceImpl implements IBusinessAsyncService { List temsp = new ArrayList<>(); for (BusinessPreOrderEntity distributionBusinessPreOrderEntity : list) { - for (BusinessPreOrderEntity businessPreOrderEntity : dataResult) { - businessPreOrderEntity.setTenantId(tenant.getTenantId()); - + for (int i = 0; i < dataResult.size(); i++) { + BusinessPreOrderEntity businessPreOrderEntity = dataResult.get(i); + businessPreOrderEntity.setTenantId(tenant.getTenantId()); if (businessPreOrderEntity.getStockArticleId().equals(distributionBusinessPreOrderEntity.getStockArticleId())) { // 找到订单 - if (businessPreOrderEntity.getOrderPackageCode().equals(distributionBusinessPreOrderEntity.getOrderPackageCode())) { //找到包件 并标记为删除状态 - temsp.add(distributionBusinessPreOrderEntity.getId()); + if (distributionBusinessPreOrderEntity.getInWarehouse().equals(1)) { + // 需要删除集合中的数据 + dataResult.remove(i); + } else { + temsp.add(distributionBusinessPreOrderEntity.getId()); + } } } + } } if (!temsp.isEmpty()) { diff --git a/blade-service/logpm-business/src/main/java/com/logpm/business/service/impl/BusinessPreOrderServiceImpl.java b/blade-service/logpm-business/src/main/java/com/logpm/business/service/impl/BusinessPreOrderServiceImpl.java index 0139e5a6e..7180e6b59 100644 --- a/blade-service/logpm-business/src/main/java/com/logpm/business/service/impl/BusinessPreOrderServiceImpl.java +++ b/blade-service/logpm-business/src/main/java/com/logpm/business/service/impl/BusinessPreOrderServiceImpl.java @@ -590,6 +590,7 @@ public class BusinessPreOrderServiceImpl extends BaseServiceImpl