From d5302cd8ead8970961a54707dd35377bd2a2f4c2 Mon Sep 17 00:00:00 2001 From: wangzhikun Date: Mon, 8 May 2023 10:26:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8B=89=E5=8F=96=E8=AE=B0=E5=BD=95=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=9F=A5=E8=AF=A2=EF=BC=8C=E8=B4=A6=E6=9C=9F=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ExtInvoicePoolController.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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 84b58eb1..1b63f980 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 @@ -273,6 +273,14 @@ public class ExtInvoicePoolController extends AbstractController { pullRecordReq.setOrgCode(collect); pullRecordReq.setCompanyCode(""); } + 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); + } + } return ResponseEntity.ok(R.ok().put("data",extInvoicePoolService.selectPullRecord(pullRecordReq))); }catch (Exception e){ e.printStackTrace(); @@ -282,4 +290,14 @@ public class ExtInvoicePoolController extends AbstractController { } } + + + public static void main(String[] args) { + String str ="2022-04"; + String[] split = str.split("-"); + if(split[1].startsWith("0")){ + String replace = split[1].replace("0", ""); + System.out.println(replace); + } + } }