From 4a2b38a735d4c0bdf7fbb550ffd1b17a0ec9e709 Mon Sep 17 00:00:00 2001 From: "bo.yang" Date: Wed, 2 Jun 2021 11:23:04 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E4=BF=AE=E5=A4=8D=E8=AE=A2=E9=98=85?= =?UTF-8?q?=E6=8E=A8=E9=80=81=E7=9B=AE=E7=9A=84=E5=9B=BD=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E7=BC=BA=E5=A4=B1=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98=202?= =?UTF-8?q?=E3=80=81=E8=B0=83=E6=95=B4=E6=8E=A8=E9=80=81=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ExpSubsPushApiServiceImpl.java | 28 +++++---- .../bps/expsubspushresp/expsubspushresp.html | 60 ++++++++++++++----- 2 files changed, 64 insertions(+), 24 deletions(-) diff --git a/box-bps/src/main/java/com/ruoyi/bps/service/impl/ExpSubsPushApiServiceImpl.java b/box-bps/src/main/java/com/ruoyi/bps/service/impl/ExpSubsPushApiServiceImpl.java index be30d63ab..01bddbce9 100644 --- a/box-bps/src/main/java/com/ruoyi/bps/service/impl/ExpSubsPushApiServiceImpl.java +++ b/box-bps/src/main/java/com/ruoyi/bps/service/impl/ExpSubsPushApiServiceImpl.java @@ -213,14 +213,17 @@ public class ExpSubsPushApiServiceImpl implements IExpSubsPushApiService { expSubsPushResp.setLastResultNu(subscribePushLastResult.getNu()); expSubsPushResp.setLastResultData(SubscribePushDataToString(subscribePushLastResult.getData())); - expSubsPushResp.setDestResultMessage(subscribePushDestResult.getMessage()); - expSubsPushResp.setDestResultState(subscribePushDestResult.getState()); - expSubsPushResp.setDestResultStatus(subscribePushDestResult.getStatus()); - expSubsPushResp.setDestResultCondition(subscribePushDestResult.getCondition()); - expSubsPushResp.setDestResultIsCheck(subscribePushDestResult.getIscheck()); - expSubsPushResp.setDestResultCom(subscribePushDestResult.getCom()); - expSubsPushResp.setDestResultNu(subscribePushDestResult.getNu()); - expSubsPushResp.setDestResultData(SubscribePushDataToString(subscribePushDestResult.getData())); + if(subscribePushDestResult != null) { + //只有邮政国外的快递推送才会有DestResult信息 + expSubsPushResp.setDestResultMessage(subscribePushDestResult.getMessage()); + expSubsPushResp.setDestResultState(subscribePushDestResult.getState()); + expSubsPushResp.setDestResultStatus(subscribePushDestResult.getStatus()); + expSubsPushResp.setDestResultCondition(subscribePushDestResult.getCondition()); + expSubsPushResp.setDestResultIsCheck(subscribePushDestResult.getIscheck()); + expSubsPushResp.setDestResultCom(subscribePushDestResult.getCom()); + expSubsPushResp.setDestResultNu(subscribePushDestResult.getNu()); + expSubsPushResp.setDestResultData(SubscribePushDataToString(subscribePushDestResult.getData())); + } return expSubsPushResp; } @@ -234,9 +237,14 @@ public class ExpSubsPushApiServiceImpl implements IExpSubsPushApiService { String str=""; for(SubscribePushData subscribePushData:list){ str+="【"+subscribePushData.getTime()+"】 "; - str+=subscribePushData.getAreaName()+"/"+subscribePushData.getContext(); + if(StringUtils.isNotEmpty(subscribePushData.getAreaName())) + { + str+=subscribePushData.getAreaName()+"/"; //某些快递没有AreaName信息 + } + str+=subscribePushData.getContext(); if(list.size()-1>list.indexOf(subscribePushData)){ - str+="\r"; + //str+="\r\n"; + str+="
"; } } System.out.println(str); diff --git a/box-bps/src/main/resources/templates/bps/expsubspushresp/expsubspushresp.html b/box-bps/src/main/resources/templates/bps/expsubspushresp/expsubspushresp.html index da0668e32..5e89e3450 100644 --- a/box-bps/src/main/resources/templates/bps/expsubspushresp/expsubspushresp.html +++ b/box-bps/src/main/resources/templates/bps/expsubspushresp/expsubspushresp.html @@ -10,15 +10,15 @@
    -
  • + + + +
  • + + +
  • +
  • + + +
  • +
  • + +
  • -
  • +
  •  搜索  重置 @@ -81,6 +105,8 @@