| | |
| | | import com.ruoyi.basic.mapper.IfsInventoryQuantityMapper; |
| | | import com.ruoyi.basic.pojo.IfsInventoryQuantity; |
| | | import com.ruoyi.common.constant.InsOrderTypeConstants; |
| | | import com.ruoyi.common.constant.MenuJumpPathConstants; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.core.domain.entity.InformationNotification; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.properties.WechatProperty; |
| | | import com.ruoyi.common.config.WechatProperty; |
| | | import com.ruoyi.common.utils.*; |
| | | import com.ruoyi.common.utils.api.IfsApiUtils; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.inspect.dto.ReportPageDto; |
| | | import com.ruoyi.inspect.mapper.*; |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.poi.xwpf.usermodel.*; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.core.io.ClassPathResource; |
| | | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | private String wordUrl; |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | @Value("${file.licenseUrl}") |
| | | private String licenseUrl; |
| | | |
| | | @Resource |
| | | private InsOrderMapper insOrderMapper; |
| | | @Resource |
| | |
| | | info.setSenderId(submitUserId); //发送人 |
| | | info.setConsigneeId(userId); //收件人 |
| | | info.setViewStatus(false); |
| | | info.setJumpPath("b1-report-preparation"); |
| | | info.setJumpPath(MenuJumpPathConstants.REPORT_PREPARATION); |
| | | informationNotificationService.addInformationNotification(info); |
| | | //系统生成报告地址 |
| | | String url = insReport.getUrl(); |
| | |
| | | info.setSenderId(checkUserId); //发送人 |
| | | info.setConsigneeId(userId); //收件人 |
| | | info.setViewStatus(false); |
| | | info.setJumpPath("b1-report-preparation"); |
| | | info.setJumpPath(MenuJumpPathConstants.REPORT_PREPARATION); |
| | | informationNotificationService.addInformationNotification(info); |
| | | //系统生成报告地址 |
| | | String url = insReport.getUrl(); |
| | |
| | | } |
| | | // 压缩临时文件夹 |
| | | zipFilePath = wordUrl + "/zip/output.zip"; |
| | | // 判断zip路径是否存在 |
| | | File zipDir = new File(wordUrl + "/zip"); |
| | | if(!zipDir.isDirectory()){ |
| | | zipDir.mkdirs(); |
| | | } |
| | | zipDirectory(tempFolderPath, zipFilePath); |
| | | |
| | | // 清理临时文件夹 |
| | |
| | | FileOutputStream os = null; |
| | | try { |
| | | //凭证 不然切换后有水印 |
| | | InputStream is = Files.newInputStream(new File(licenseUrl).toPath()); |
| | | InputStream is = new ClassPathResource("/lib/license.xml").getInputStream(); |
| | | License license = new License(); |
| | | license.setLicense(is); |
| | | if (!license.getIsLicensed()) { |
| | |
| | | FileOutputStream os = null; |
| | | try { |
| | | //凭证 不然切换后有水印 |
| | | InputStream is = Files.newInputStream(new File(licenseUrl).toPath()); |
| | | InputStream is = new ClassPathResource("/lib/license.xml").getInputStream(); |
| | | License license = new License(); |
| | | license.setLicense(is); |
| | | if (!license.getIsLicensed()) { |