Merge remote-tracking branch 'origin/dev_2nd_LCYH' into dev_2nd_LCYH
This commit is contained in:
+2
@@ -9,6 +9,7 @@ import com.jero.modules.ota.entity.OtaBaCxLsjl;
|
||||
import com.jero.modules.ota.mapper.OtaBaCxListMapper;
|
||||
import com.jero.modules.ota.service.*;
|
||||
import com.jero.modules.ota.utils.ImportFileUtil;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.ibatis.logging.Log;
|
||||
@@ -214,6 +215,7 @@ public class OtaBaCxListServiceImpl extends ServiceImpl<OtaBaCxListMapper, OtaBa
|
||||
|
||||
|
||||
String outPath = uploadPath + "/车型及功能备案" + System.currentTimeMillis() + ".zip";
|
||||
//FileUtils.forceDelete(template);
|
||||
FileOutputStream fos1 = new FileOutputStream(outPath);
|
||||
ImportFileUtil.toZip(exportFile.getCanonicalPath(), fos1, true);
|
||||
ImportFileUtil.exportTemplate(response, outPath);
|
||||
|
||||
+2
-1
@@ -77,12 +77,13 @@ public class ImportFileUtil {
|
||||
saveDirectory.mkdir();
|
||||
}
|
||||
FileUtils.copyInputStreamToFile(file.getInputStream(), new File(path + File.separator + file.getOriginalFilename()));
|
||||
|
||||
//解压缩
|
||||
String zipEntryName = "";
|
||||
if (str.equals("zip")) {
|
||||
zipEntryName = FileUnZip.unZipFiles(path + File.separator + file.getOriginalFilename(), path);
|
||||
}
|
||||
|
||||
FileUtils.forceDelete(new File(path + File.separator + file.getOriginalFilename()));
|
||||
return new File(path);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user