From 692140c13141d5a0e62ce59883ad73262e2575d6 Mon Sep 17 00:00:00 2001 From: water_xu Date: Mon, 2 Sep 2024 10:03:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E7=89=87=E5=8D=95=E7=8B=AC=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3=20-=20=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=90=8D=E5=88=86=E9=9A=94=E5=90=8E=E7=BC=80=E5=88=A4?= =?UTF-8?q?=E7=A9=BA,=E9=BB=98=E8=AE=A4PNG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zcloud/controller/gf/AppGFBlindBoardController.java | 7 ++++++- .../zcloud/controller/gf/AppGFBreakGroundController.java | 7 ++++++- .../zcloud/controller/gf/AppGFConfinedSpaceController.java | 7 ++++++- .../com/zcloud/controller/gf/AppGFCutRoadController.java | 7 ++++++- .../zcloud/controller/gf/AppGFElectricityController.java | 7 ++++++- .../com/zcloud/controller/gf/AppGFHighWorkController.java | 7 ++++++- .../com/zcloud/controller/gf/AppGFHoistingController.java | 7 ++++++- 7 files changed, 42 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/zcloud/controller/gf/AppGFBlindBoardController.java b/src/main/java/com/zcloud/controller/gf/AppGFBlindBoardController.java index bd6d0c3a..3c006006 100644 --- a/src/main/java/com/zcloud/controller/gf/AppGFBlindBoardController.java +++ b/src/main/java/com/zcloud/controller/gf/AppGFBlindBoardController.java @@ -1282,7 +1282,12 @@ public class AppGFBlindBoardController extends BaseController { pd = this.getPageData(); MultipartFile file = files[i]; String ffile = DateUtil.getDays(); - String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + String fileName; + if (file.getOriginalFilename() == null) { + fileName = ".PNG"; + }else { + fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + } smb.sshSftp(file, fileName,Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile); pd.put("ACCEPT_CONFESS_USER_SIGNER_TIME", signertime); pd.put("ACCEPT_CONFESS_ID", this.get32UUID()); diff --git a/src/main/java/com/zcloud/controller/gf/AppGFBreakGroundController.java b/src/main/java/com/zcloud/controller/gf/AppGFBreakGroundController.java index 158c5e4a..fdd60a18 100644 --- a/src/main/java/com/zcloud/controller/gf/AppGFBreakGroundController.java +++ b/src/main/java/com/zcloud/controller/gf/AppGFBreakGroundController.java @@ -293,7 +293,12 @@ public class AppGFBreakGroundController extends BaseController { pd = this.getPageData(); MultipartFile file = files[i]; String ffile = DateUtil.getDays(); - String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + String fileName; + if (file.getOriginalFilename() == null) { + fileName = ".PNG"; + }else { + fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + } smb.sshSftp(file, fileName,Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile); pd.put("ACCEPT_CONFESS_USER_SIGNER_TIME", signertime); pd.put("ACCEPT_CONFESS_ID", this.get32UUID()); diff --git a/src/main/java/com/zcloud/controller/gf/AppGFConfinedSpaceController.java b/src/main/java/com/zcloud/controller/gf/AppGFConfinedSpaceController.java index 56806d14..57bd3cd7 100644 --- a/src/main/java/com/zcloud/controller/gf/AppGFConfinedSpaceController.java +++ b/src/main/java/com/zcloud/controller/gf/AppGFConfinedSpaceController.java @@ -773,7 +773,12 @@ public class AppGFConfinedSpaceController extends BaseController { pd = this.getPageData(); MultipartFile file = files[i]; String ffile = DateUtil.getDays(); - String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + String fileName; + if (file.getOriginalFilename() == null) { + fileName = ".PNG"; + } else { + fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + } smb.sshSftp(file, fileName,Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile); pd.put("ACCEPT_CONFESS_USER_SIGNER_TIME", signertime); pd.put("ACCEPT_CONFESS_ID", this.get32UUID()); diff --git a/src/main/java/com/zcloud/controller/gf/AppGFCutRoadController.java b/src/main/java/com/zcloud/controller/gf/AppGFCutRoadController.java index 681e11be..0e21a104 100644 --- a/src/main/java/com/zcloud/controller/gf/AppGFCutRoadController.java +++ b/src/main/java/com/zcloud/controller/gf/AppGFCutRoadController.java @@ -649,7 +649,12 @@ public class AppGFCutRoadController extends BaseController { pd = this.getPageData(); MultipartFile file = files[i]; String ffile = DateUtil.getDays(); - String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + String fileName; + if (file.getOriginalFilename() == null) { + fileName = ".PNG"; + }else { + fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + } Smb.sshSftp(file, fileName,Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile); pd.put("ACCEPT_CONFESS_USER_SIGNER_TIME", signertime); pd.put("ACCEPT_CONFESS_ID", this.get32UUID()); diff --git a/src/main/java/com/zcloud/controller/gf/AppGFElectricityController.java b/src/main/java/com/zcloud/controller/gf/AppGFElectricityController.java index a766ad86..076255ba 100644 --- a/src/main/java/com/zcloud/controller/gf/AppGFElectricityController.java +++ b/src/main/java/com/zcloud/controller/gf/AppGFElectricityController.java @@ -590,7 +590,12 @@ public class AppGFElectricityController extends BaseController { pd = this.getPageData(); MultipartFile file = files[i]; String ffile = DateUtil.getDays(); - String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + String fileName; + if (file.getOriginalFilename() == null) { + fileName = ".PNG"; + }else { + fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + } smb.sshSftp(file, fileName,Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile); pd.put("ACCEPT_CONFESS_USER_SIGNER_TIME", signertime); pd.put("ACCEPT_CONFESS_ID", this.get32UUID()); diff --git a/src/main/java/com/zcloud/controller/gf/AppGFHighWorkController.java b/src/main/java/com/zcloud/controller/gf/AppGFHighWorkController.java index 8023186d..ca04b4b9 100644 --- a/src/main/java/com/zcloud/controller/gf/AppGFHighWorkController.java +++ b/src/main/java/com/zcloud/controller/gf/AppGFHighWorkController.java @@ -574,7 +574,12 @@ public class AppGFHighWorkController extends BaseController { pd = this.getPageData(); MultipartFile file = files[i]; String ffile = DateUtil.getDays(); - String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + String fileName; + if (file.getOriginalFilename() == null) { + fileName = ".PNG"; + }else { + fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + } smb.sshSftp(file, fileName,Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile); pd.put("ACCEPT_CONFESS_USER_SIGNER_TIME", signertime); pd.put("ACCEPT_CONFESS_ID", this.get32UUID()); diff --git a/src/main/java/com/zcloud/controller/gf/AppGFHoistingController.java b/src/main/java/com/zcloud/controller/gf/AppGFHoistingController.java index 66620418..0cd4d373 100644 --- a/src/main/java/com/zcloud/controller/gf/AppGFHoistingController.java +++ b/src/main/java/com/zcloud/controller/gf/AppGFHoistingController.java @@ -555,7 +555,12 @@ public class AppGFHoistingController extends BaseController { pd = this.getPageData(); MultipartFile file = files[i]; String ffile = DateUtil.getDays(); - String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + String fileName; + if (file.getOriginalFilename() == null) { + fileName = ".PNG"; + }else { + fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + } Smb.sshSftp(file, fileName,Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile); pd.put("ACCEPT_CONFESS_USER_SIGNER_TIME", signertime); pd.put("ACCEPT_CONFESS_ID", this.get32UUID());