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());