diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/purchaseorder/controller/PurchaseorderController.java b/SC-boot/linkage-scm/src/main/java/jnpf/purchaseorder/controller/PurchaseorderController.java index ea61288d..3eaec0f1 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/purchaseorder/controller/PurchaseorderController.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/purchaseorder/controller/PurchaseorderController.java @@ -359,7 +359,11 @@ public class PurchaseorderController { // cn.hutool.core.io.FileUtil.del(temporaryFile); // FileUtil.upFile(file, filePath, fileName); DownloadVO vo = DownloadVO.builder().build(); - vo.setName(String.valueOf(resultList.get(0))); + + Optional> userOptional = Optional.ofNullable(resultList); + userOptional.ifPresent(o -> vo.setName(String.valueOf(o.get(0)))); + + //vo.setName(String.valueOf(resultList.get(0))); return ActionResult.success(vo); } else { return ActionResult.fail("选择文件不符合导入"); @@ -981,4 +985,4 @@ public class PurchaseorderController { } return ActionResult.success("删除成功"); } -} +} \ No newline at end of file