| | |
| | | import com.ruoyi.inspect.pojo.*; |
| | | import com.ruoyi.inspect.service.*; |
| | | import com.ruoyi.inspect.util.HackLoopTableRenderPolicy; |
| | | import com.ruoyi.inspect.util.ReportResultTableRenderPolicy; |
| | | import com.ruoyi.inspect.util.PreserveReportPicturePlaceholderHandler; |
| | | import com.ruoyi.inspect.util.ReportSignaturePictureUtils; |
| | | import com.ruoyi.inspect.vo.InsOrderPlanTaskSwitchVo; |
| | |
| | | } |
| | | |
| | | // 检验人员提交复核时不生成报告;全部试验室复核通过后生成报告。 |
| | | if (report == null || StringUtils.isBlank(report.getUrl())) { |
| | | boolean returnedFromReport = report != null && Objects.equals(report.getIsPass(), 0); |
| | | if (report == null || StringUtils.isBlank(report.getUrl()) || returnedFromReport) { |
| | | this.generateReport(orderId, DETECTION_REPORT, writeUserId); |
| | | } |
| | | // 直绑模板订单同时生成检验报告,两份文件共用同一条审批记录。 |
| | | if (directTemplateOrder && (report == null || StringUtils.isBlank(report.getInspectionUrl()))) { |
| | | if (directTemplateOrder && (report == null || StringUtils.isBlank(report.getInspectionUrl()) |
| | | || returnedFromReport)) { |
| | | this.generateReport(orderId, INSPECTION_REPORT, writeUserId); |
| | | } |
| | | report = insReportMapper.selectOne(Wrappers.<InsReport>lambdaQuery() |
| | |
| | | } |
| | | Configure configure = Configure.builder() |
| | | .bind("deviceList", new HackLoopTableRenderPolicy()) |
| | | .bind("r", new HackLoopTableRenderPolicy(true)) |
| | | .bind("r", new ReportResultTableRenderPolicy()) |
| | | .setValidErrorHandler(new PreserveReportPicturePlaceholderHandler()) |
| | | .useSpringEL(true) |
| | | .build(); |