whycxzp
2022-08-15 6eda8b2ff2b6748376670e84a14a8656cc1094c6
src/main/java/com/whyc/service/ProductBomService.java
@@ -257,6 +257,10 @@
                String dwgUrl=bom.getDwgUrl();
                if(i==0){
                    excelName=bom.getParentCode()+"_"+bom.getParentModel();
                    String timeStr= ActionUtil.sdfwithFTP.format(new Date());
                    if(type.equals("pic")){
                        excelName=timeStr;
                    }
                    rootFace=fileDirName+File.separator+excelName;
                    File destfile = new File(rootFace);
                    if(!destfile.exists()) {
@@ -333,10 +337,7 @@
            File file=new File(rootFace+".zip");
            FileOutputStream forootFace = new FileOutputStream(file);
            ZipUtils.toZip(rootFace, forootFace,true);
            String timeStr= ActionUtil.sdfwithFTP.format(new Date());
            if(type.equals("pic")){
                excelName=timeStr;
            }
            // 转码防止乱码
            resp.addHeader("Content-Disposition", "attachment;filename="
                    + new String(excelName.getBytes("UTF-8"), "ISO8859-1")