whyclxw
4 天以前 51726e56a2d4b55f0e37b2b22adc4413113d43d0
src/main/java/com/whyc/service/MaterialApprovingService.java
@@ -13,6 +13,7 @@
import com.whyc.util.Zip4jUtil;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.ss.usermodel.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
@@ -30,6 +31,12 @@
    @Resource
    private MaterialApprovingMapper mapper;
    @Autowired
    private MailService mailService;
    @Autowired
    private MailUserService mailUserService;
    /**
     *
@@ -55,8 +62,11 @@
        File parentFile = new File(filePath);
        String originalFilename = file.getOriginalFilename();
        File zipFile = new File(filePath+File.separator+ originalFilename);
        if(!zipFile.exists()){
        /*if(!zipFile.exists()){
            zipFile.mkdirs();
        }*/
        if (!parentFile.exists()) {
            parentFile.mkdirs();
        }
        file.transferTo(zipFile);
        //解压文件夹