From 36c5da2cf55a5e0ce3d03c875f224057709f5320 Mon Sep 17 00:00:00 2001 From: liuy <37787198+LiuyCodes@users.noreply.github.com> Date: Tue, 5 Nov 2024 14:35:05 +0800 Subject: [PATCH] =?UTF-8?q?fix(service):=20=E4=BF=AE=E5=A4=8D=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=20Excel=20=E6=97=B6=E6=9C=AA=E6=8D=95=E8=8E=B7?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E7=9A=84=E9=97=AE=E9=A2=98-=20=E5=9C=A8?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=95=B0=E6=8D=AE=E6=97=B6=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=BA=86=E5=BC=82=E5=B8=B8=E6=8D=95=E8=8E=B7=E5=A4=84=E7=90=86?= =?UTF-8?q?=EF=BC=8C=E9=81=BF=E5=85=8D=E5=9B=A0=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=BC=82=E5=B8=B8=E5=AF=BC=E8=87=B4=E7=9A=84?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E9=94=99=E8=AF=AF=20-=20=E5=AF=B9=20TOC=20?= =?UTF-8?q?=E9=94=80=E5=94=AE=E3=80=81TOB=20=E9=94=80=E5=94=AE=E3=80=81TOC?= =?UTF-8?q?=20=E9=80=80=E8=B4=A7=E5=92=8C=20TOB=20=E9=80=80=E8=B4=A7?= =?UTF-8?q?=E5=9B=9B=E7=A7=8D=E4=B8=9A=E5=8A=A1=E7=B1=BB=E5=9E=8B=E5=88=86?= =?UTF-8?q?=E5=88=AB=E8=BF=9B=E8=A1=8C=E4=BA=86=E5=BC=82=E5=B8=B8=E5=A4=84?= =?UTF-8?q?=E7=90=86=20-=20=E5=9C=A8=E5=BC=82=E5=B8=B8=E5=8F=91=E7=94=9F?= =?UTF-8?q?=E6=97=B6=E8=AE=B0=E5=BD=95=E6=97=A5=E5=BF=97=EF=BC=8C=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E7=A9=BA=E5=88=97=E8=A1=A8=EF=BC=8C=E7=A1=AE=E4=BF=9D?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E7=A8=B3=E5=AE=9A=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/TocofsSaleoutServiceImpl.java | 29 ++++++++++++++++--- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/service/src/main/java/com/hzya/frame/report/lets/service/impl/TocofsSaleoutServiceImpl.java b/service/src/main/java/com/hzya/frame/report/lets/service/impl/TocofsSaleoutServiceImpl.java index 4b4fa769..38584239 100644 --- a/service/src/main/java/com/hzya/frame/report/lets/service/impl/TocofsSaleoutServiceImpl.java +++ b/service/src/main/java/com/hzya/frame/report/lets/service/impl/TocofsSaleoutServiceImpl.java @@ -28,6 +28,7 @@ import org.springframework.stereotype.Service; import java.io.File; import java.io.InputStream; +import java.util.ArrayList; import java.util.List; /** @@ -149,11 +150,21 @@ public class TocofsSaleoutServiceImpl extends BaseService tocofsSaleoutDetailedDtos = iTocofsSaleoutDetailedDao.queryEntityListBaseToc(tocofsSaleoutDetailedEntity); + List tocofsSaleoutDetailedDtos = new ArrayList<>(); + try { + tocofsSaleoutDetailedDtos = iTocofsSaleoutDetailedDao.queryEntityListBaseToc(tocofsSaleoutDetailedEntity); + } catch (Exception e) { + logger.error("queryEntityListBaseToc方法抛出异常", e); + } return BaseResult.getSuccessMessageEntity("查询成功", tocofsSaleoutDetailedDtos); } else if (businessType.equals("TOB_ORDER")) { //TOB销售 - List tobofsSaleoutDetailedDtos = iTocofsSaleoutDetailedDao.queryEntityListBaseTob(tocofsSaleoutDetailedEntity); + List tobofsSaleoutDetailedDtos = null; + try { + tobofsSaleoutDetailedDtos = iTocofsSaleoutDetailedDao.queryEntityListBaseTob(tocofsSaleoutDetailedEntity); + } catch (Exception e) { + logger.error("queryEntityListBaseTob方法抛出异常", e); + } return BaseResult.getSuccessMessageEntity("查询成功", tobofsSaleoutDetailedDtos); } else { return BaseResult.getFailureMessageEntity("查询失败,无法确定TOB、TOC!请选择:TOC_ORDER、或者TOB_ORDER!"); @@ -334,11 +345,21 @@ public class TocofsSaleoutServiceImpl extends BaseService tocofsReturnGoodsDetailedDtos = iTocofsReturngoodsDetailedDao.queryEntityListBaseToc(tocofsSaleoutDetailedEntity); + List tocofsReturnGoodsDetailedDtos = new ArrayList<>(); + try { + tocofsReturnGoodsDetailedDtos = iTocofsReturngoodsDetailedDao.queryEntityListBaseToc(tocofsSaleoutDetailedEntity); + } catch (Exception e) { + logger.error("queryEntityListBaseToc方法抛出异常", e); + } return BaseResult.getSuccessMessageEntity("查询成功", tocofsReturnGoodsDetailedDtos); } else if (businessType.equals("TOB_RETURN")) { //TOB退货 - List tobofsReturnGoodsDetailedDtos = iTocofsReturngoodsDetailedDao.queryEntityListBaseTob(tocofsSaleoutDetailedEntity); + List tobofsReturnGoodsDetailedDtos = new ArrayList<>(); + try { + tobofsReturnGoodsDetailedDtos = iTocofsReturngoodsDetailedDao.queryEntityListBaseTob(tocofsSaleoutDetailedEntity); + } catch (Exception e) { + logger.error("queryEntityListBaseTob方法抛出异常", e); + } return BaseResult.getSuccessMessageEntity("查询成功", tobofsReturnGoodsDetailedDtos); } else { return BaseResult.getFailureMessageEntity("查询失败,无法确定TOB、TOC!请选择:TOC_ORDER、或者TOB_ORDER!");