| | |
| | | import com.ld.igds.file.CoreFileService; |
| | | import com.ld.igds.util.ContextUtil; |
| | | import com.ld.igds.util.FilesUtil; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.core.io.ClassPathResource; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import java.io.File; |
| | | import java.io.FileNotFoundException; |
| | | import java.io.FileOutputStream; |
| | |
| | | String path = filesUtil.getTempPath(companyId) + "/" + fileName; |
| | | return new File(path); |
| | | } |
| | | |
| | | public String getSnapFilePath(String fileName, String dateStr) { |
| | | return fileService.getSnapFilePath(dateStr) + "/" + fileName; |
| | | } |
| | | |
| | | public String getFailImg() throws IOException { |
| | | |
| | | String failImg = "static/images/img-fail.jpg"; |
| | | |
| | | ClassPathResource readFile = new ClassPathResource(failImg); |
| | | |
| | | return readFile.getFile().getAbsolutePath(); |
| | | } |
| | | } |