| | |
| | | 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; |
| | | |
| | |
| | | |
| | | @Resource |
| | | private MaterialApprovingMapper mapper; |
| | | |
| | | @Autowired |
| | | private MailService mailService; |
| | | |
| | | @Autowired |
| | | private MailUserService mailUserService; |
| | | |
| | | /** |
| | | * |
| | |
| | | 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); |
| | | //解压文件夹 |