From 5dafffca9486f8aaaec63551dc8b1700e0898d93 Mon Sep 17 00:00:00 2001 From: yefei Date: Tue, 9 May 2023 21:55:20 +0800 Subject: [PATCH] =?UTF-8?q?ariesy=20=E4=BF=AE=E5=A4=8D=E6=8B=89=E5=8F=96?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extend/controller/ExtInvoicePoolController.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dxhy-extend/src/main/java/com/dxhy/extend/controller/ExtInvoicePoolController.java b/dxhy-extend/src/main/java/com/dxhy/extend/controller/ExtInvoicePoolController.java index 1b63f980..18177435 100644 --- a/dxhy-extend/src/main/java/com/dxhy/extend/controller/ExtInvoicePoolController.java +++ b/dxhy-extend/src/main/java/com/dxhy/extend/controller/ExtInvoicePoolController.java @@ -12,6 +12,7 @@ import com.dxhy.auth.client.annotation.IgnoreClientToken; import com.dxhy.auth.client.annotation.IgnoreUserToken; import com.dxhy.common.vo.TaxOrgCode; import com.dxhy.extend.entity.PullRecordReq; +import org.apache.commons.lang3.StringUtils; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; @@ -275,10 +276,12 @@ public class ExtInvoicePoolController extends AbstractController { } if(pullRecordReq.getAccountPeriod()!=null && pullRecordReq.getAccountPeriod()!=""){ String accountPeriod = pullRecordReq.getAccountPeriod(); - String[] split = accountPeriod.split("-"); - if(split[1].startsWith("0")){ - String replace = split[1].replace("0", ""); - pullRecordReq.setAccountPeriod(split[0]+"-"+replace); + if(accountPeriod != null && StringUtils.isNoneBlank(accountPeriod) && accountPeriod.contains("-")) { + String[] split = accountPeriod.split("-"); + if (split[1].startsWith("0")) { + String replace = split[1].replace("0", ""); + pullRecordReq.setAccountPeriod(split[0] + "-" + replace); + } } } return ResponseEntity.ok(R.ok().put("data",extInvoicePoolService.selectPullRecord(pullRecordReq)));