| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.deepoove.poi.data.PictureRenderData; |
| | | import com.deepoove.poi.data.Pictures; |
| | | import com.ruoyi.common.utils.DateImageUtil; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | |
| | | detailedDto.setIndex(index); |
| | | index++; |
| | | } |
| | | // 获取路径 |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/risk-factor-identification-risk.docx"); |
| | | |
| | | String finalExamineUrl = examineUrl; |
| | | String finalRatifyUrl = ratifyUrl; |
| | | File file = new File(imgUrl + File.separator + writeUrl); |
| | | File examine = new File(imgUrl + File.separator + finalExamineUrl); |
| | | File ratify = new File(imgUrl + File.separator + finalRatifyUrl); |
| | | if(!file.exists()){ |
| | | throw new ErrorException("找不到检验人的签名"); |
| | | } |
| | | if(!examine.exists()){ |
| | | throw new ErrorException("找不到复核人的签名"); |
| | | } |
| | | if(!ratify.exists()){ |
| | | throw new ErrorException("找不到批准人的签名"); |
| | | } |
| | | |
| | | // 获取路径 |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/risk-factor-identification-risk.docx"); |
| | | Configure configure = Configure.builder() |
| | | .bind("trainingDetailedList", new HackLoopTableRenderPolicy()) |
| | | .build(); |