diff --git a/com.connor.chint.wuhan/src/com/chint/plm/createEcn/CreateEcnController.java b/com.connor.chint.wuhan/src/com/chint/plm/createEcn/CreateEcnController.java index a87b0db..b770c1c 100644 --- a/com.connor.chint.wuhan/src/com/chint/plm/createEcn/CreateEcnController.java +++ b/com.connor.chint.wuhan/src/com/chint/plm/createEcn/CreateEcnController.java @@ -597,8 +597,10 @@ public class CreateEcnController extends KFXPanelController { cell.setCellValue(refTableBean.getMark().getText());//备注 } File file2 = null; - String timeNow = Util.GetNowDate(); - String filePath = System.getProperty("java.io.tmpdir") + timeNow + ".xlsx"; + //lidy20241114修改excel文件名称避免重复 +// String timeNow = Util.GetNowDate(); + String timeNow = new SimpleDateFormat("-yyyyMMddHHmmss").format(new Date()); + String filePath = System.getProperty("java.io.tmpdir") + ecnId.getText() + timeNow + ".xlsx"; file2 = new File(filePath); fos = new FileOutputStream(file2); workbook.write(fos);