| | |
| | | // if (insProduct.getInspectionItem().contains("老化")) { |
| | | // List<InsProductAnalysisDto> insProductAnalysisDtoList = insProductMapper.selectAnalysis(insProduct, ifsInventoryQuantity.getSupplierName()); |
| | | // |
| | | // if (insProductAnalysisDtoList.size() < 10) { |
| | | // continue; |
| | | // } |
| | | // |
| | | // // 判断当前检测项是否偏差超过10% |
| | | // List<String> laseValueList = insProductAnalysisDtoList.stream().map(InsProductAnalysisDto::getLastValue) |
| | | // .collect(Collectors.toList()); |
| | | // |
| | | // double deviation = isDeviationOverTenPercent(laseValueList, insProduct.getLastValue()); |
| | | // // 判断偏差是否大于10 |
| | | // if (deviation > 10) { |
| | | // // 发送通知, 并且添加数据 |
| | | // |
| | | // |
| | | // |
| | | // |
| | | // } |
| | | // } |
| | | // } |
| | | // }); |
| | |
| | | |
| | | ConfigureBuilder builder = Configure.builder(); |
| | | builder.useSpringEL(true); |
| | | // 获取当前时间 |
| | | LocalDate currentDate = LocalDate.now(); |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | String formattedDate = currentDate.format(formatter); |
| | | |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/small-report-template.docx"); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, builder.build()).render( |