| | |
| | | for (InsProduct insPro : insProducts) { |
| | | InsProductWordDto insProductWordDto = new InsProductWordDto(); |
| | | insProductWordDto.setIndex(index1+"");//序号 |
| | | insProductWordDto.setTerm(insPro.getInspectionItem()+"-"+insPro.getInspectionItemSubclass());//检验项目 |
| | | if (insPro.getInspectionItem().contains("电路试验")){ |
| | | insProductWordDto.setTerm("电性能参数-"+insPro.getInspectionItemSubclass());//检验项目 |
| | | }else if (insPro.getInspectionItem().contains("辐射试验")){ |
| | | insProductWordDto.setTerm("辐射性能参数"+insPro.getInspectionItemSubclass());//检验项目 |
| | | }else { |
| | | insProductWordDto.setTerm(insPro.getInspectionItem()+"-"+insPro.getInspectionItemSubclass());//检验项目 |
| | | } |
| | | if (ObjectUtils.isNotNull(insPro.getInsResult()) && insPro.getInsResult()==0) { |
| | | insProductWordDto.setResult("不合格");//结论 |
| | | } else { |
| | |
| | | //辐射的标题 |
| | | String title3 = ""; |
| | | if (radiationReportNum > 0) { |
| | | title3 = "辐射方向图参数"; |
| | | title3 = "辐射性能参数"; |
| | | } |
| | | //环境表格 |
| | | List<Map<String, Object>> tables4 = new ArrayList<>(); |
| | |
| | | private void getWord1(String term, InsOrderState insOrderState, List<Map<String, Object>> tables2) { |
| | | AtomicInteger lable = new AtomicInteger(1); |
| | | AtomicInteger index = new AtomicInteger(); |
| | | String title = term + "电路参数"; |
| | | String title = term + "电性能参数"; |
| | | InsSample insSample = insSampleMapper.selectById(insOrderState.getInsSampleId()); |
| | | //查询项目 |
| | | List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | |
| | | if (i % 2 == 0) { |
| | | //最差值 |
| | | String value = result2s.get(0).getValue().replaceAll("[\\[\\]\"]", ""); |
| | | String text = value.split(",")[(j - 5) + (i - 1) / 2 * (Math.min(ports, 8))]; |
| | | try { |
| | | textRenderData.setText(value.split(",")[(j - 5) + (i - 1) / 2 * (Math.min(ports, 8))]); |
| | | textRenderData.setText(String.format("%.2f",Double.parseDouble(text))); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | |
| | | } else if (j % 2 == 0) { |
| | | String value = result2s.get(0).getValue().replaceAll("[\\[\\]\"]", ""); |
| | | try { |
| | | textRenderData.setText(value.split(",")[(j - 6) / 2 + (i - cc - 1) * 4] + "∑5" + i + (j - 6)); |
| | | String text = value.split(",")[(j - 6) / 2 + (i - cc - 1) * 4]; |
| | | textRenderData.setText(String.format("%.2f",Double.parseDouble(text)) + "∑5" + i + (j - 6)); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | |
| | | } else { |
| | | String value = result2s.get(0).getValue().replaceAll("[\\[\\]\"]", ""); |
| | | try { |
| | | textRenderData.setText(value.split(",")[(j - 5) / 2 + (i - cc - 1) * 4] + "∑5" + i + (j - 5)); |
| | | String text = value.split(",")[(j - 5) / 2 + (i - cc - 1) * 4]; |
| | | textRenderData.setText(String.format("%.2f",Double.parseDouble(text)) + "∑5" + i + (j - 5)); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | |
| | | } else if (j % 2 == 0) { |
| | | String value = result2s.get(0).getValue().replaceAll("[\\[\\]\"]", ""); |
| | | try { |
| | | textRenderData.setText(value.split(",")[(j - 6) / 2 + (i - (dd == 0 ? cc : dd) - 1) * 4] + "∑5" + i + (j - 6)); |
| | | String text = value.split(",")[(j - 6) / 2 + (i - (dd == 0 ? cc : dd) - 1) * 4]; |
| | | textRenderData.setText(String.format("%.2f",Double.parseDouble(text)) + "∑5" + i + (j - 6)); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | |
| | | } else { |
| | | String value = result2s.get(0).getValue().replaceAll("[\\[\\]\"]", ""); |
| | | try { |
| | | textRenderData.setText(value.split(",")[(j - 5) / 2 + (i - (dd == 0 ? cc : dd) - 1) * 4] + "∑5" + i + (j - 5)); |
| | | String text = value.split(",")[(j - 5) / 2 + (i - (dd == 0 ? cc : dd) - 1) * 4]; |
| | | textRenderData.setText(String.format("%.2f",Double.parseDouble(text)) + "∑5" + i + (j - 5)); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | |
| | | } else if (j % 2 == 0) { |
| | | String value = result2s.get(0).getValue().replaceAll("[\\[\\]\"]", ""); |
| | | try { |
| | | textRenderData.setText(value.split(",")[(j - 6) / 2 + (i - (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) - 1) * 4] + "∑5" + i + (j - 6)); |
| | | String text = value.split(",")[(j - 6) / 2 + (i - (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) - 1) * 4]; |
| | | textRenderData.setText(String.format("%.2f",Double.parseDouble(text)) + "∑5" + i + (j - 6)); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | |
| | | } else { |
| | | String value = result2s.get(0).getValue().replaceAll("[\\[\\]\"]", ""); |
| | | try { |
| | | textRenderData.setText(value.split(",")[(j - 5) / 2 + (i - (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) - 1) * 4] + "∑5" + i + (j - 5)); |
| | | String text = value.split(",")[(j - 5) / 2 + (i - (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) - 1) * 4]; |
| | | textRenderData.setText(String.format("%.2f",Double.parseDouble(text)) + "∑5" + i + (j - 5)); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | |
| | | } else if (j % 2 == 0) { |
| | | String value = result2s.get(0).getValue().replaceAll("[\\[\\]\"]", ""); |
| | | try { |
| | | textRenderData.setText(value.split(",")[(j - 6) / 2 + (i - (ff == 0 ? (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) : ff) - 1) * 4] + "∑5" + i + (j - 6)); |
| | | String text = value.split(",")[(j - 6) / 2 + (i - (ff == 0 ? (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) : ff) - 1) * 4]; |
| | | textRenderData.setText(String.format("%.2f",Double.parseDouble(text)) + "∑5" + i + (j - 6)); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | |
| | | } else { |
| | | String value = result2s.get(0).getValue().replaceAll("[\\[\\]\"]", ""); |
| | | try { |
| | | textRenderData.setText(value.split(",")[(j - 5) / 2 + (i - (ff == 0 ? (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) : ff) - 1) * 4] + "∑5" + i + (j - 5)); |
| | | String text = value.split(",")[(j - 5) / 2 + (i - (ff == 0 ? (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) : ff) - 1) * 4]; |
| | | textRenderData.setText(String.format("%.2f",Double.parseDouble(text)) + "∑5" + i + (j - 5)); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | |
| | | String[] value = result2s.get((i - (gg == 0 ? (ff == 0 ? (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) : ff) : gg)) / portRow / (angles + 2)).getValue().split("\\],\\["); |
| | | String[] split = value[(i - (gg == 0 ? (ff == 0 ? (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) : ff) : gg) - 2) % (angles + 1)].replaceAll("[\\[\\]\"]", "").split(","); |
| | | try { |
| | | textRenderData.setText(split[((j - 5) + ((i - (gg == 0 ? (ff == 0 ? (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) : ff) : gg) - 1) / (angles + 1) % portRow) * (Math.min(ports, 8)))]); |
| | | String text = split[((j - 5) + ((i - (gg == 0 ? (ff == 0 ? (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) : ff) : gg) - 1) / (angles + 1) % portRow) * (Math.min(ports, 8)))]; |
| | | textRenderData.setText(String.format("%.2f",Double.parseDouble(text))); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | |
| | | String[] value = result2s.get(0).getValue().split("\\],\\["); |
| | | String[] split = value[(i + (angles - 1)) % (angles + 1)].replaceAll("[\\[\\]\"]", "").split(","); |
| | | try { |
| | | textRenderData.setText(split[(j - 5) + ((i + (angles - 1)) / (angles + 1) - 1) * (Math.min(ports, 8))]); |
| | | String text = split[(j - 5) + ((i + (angles - 1)) / (angles + 1) - 1) * (Math.min(ports, 8))]; |
| | | textRenderData.setText(String.format("%.2f",Double.parseDouble(text))); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | |
| | | String[] split = value[(i + (angles - 1)) % (angles + 1)].replaceAll("[\\[\\]\"]", "").split(","); |
| | | if (j % 2 == 0) { |
| | | try { |
| | | textRenderData.setText(split[(j - 6) / 2 + ((i - cc) / (angles + 2)) * (ports > 8 ? 4 : (ports + 1) / 2)] + "∑5" + i + (j - 6)); |
| | | String text = split[(j - 6) / 2 + ((i - cc) / (angles + 2)) * (ports > 8 ? 4 : (ports + 1) / 2)]; |
| | | textRenderData.setText(String.format("%.2f",Double.parseDouble(text)) + "∑5" + i + (j - 6)); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | } else { |
| | | try { |
| | | textRenderData.setText(split[(j - 5) / 2 + ((i - cc) / (angles + 2)) * (ports > 8 ? 4 : (ports + 1) / 2)] + "∑5" + i + (j - 5)); |
| | | String text = split[(j - 5) / 2 + ((i - cc) / (angles + 2)) * (ports > 8 ? 4 : (ports + 1) / 2)]; |
| | | textRenderData.setText(String.format("%.2f",Double.parseDouble(text)) + "∑5" + i + (j - 5)); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | |
| | | String[] split = value[(i + (angles - 1)) % (angles + 1)].replaceAll("[\\[\\]\"]", "").split(","); |
| | | if (j % 2 == 0) { |
| | | try { |
| | | textRenderData.setText(split[(j - 6) / 2 + ((i - (dd == 0 ? cc : dd)) / (angles + 2)) * (ports > 8 ? 4 : (ports + 1) / 2)] + "∑5" + i + (j - 6)); |
| | | String text = split[(j - 6) / 2 + ((i - (dd == 0 ? cc : dd)) / (angles + 2)) * (ports > 8 ? 4 : (ports + 1) / 2)]; |
| | | textRenderData.setText(String.format("%.2f",Double.parseDouble(text)) + "∑5" + i + (j - 6)); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | } else { |
| | | try { |
| | | textRenderData.setText(split[(j - 5) / 2 + ((i - (dd == 0 ? cc : dd)) / (angles + 2)) * (ports > 8 ? 4 : (ports + 1) / 2)] + "∑5" + i + (j - 5)); |
| | | String text = split[(j - 5) / 2 + ((i - (dd == 0 ? cc : dd)) / (angles + 2)) * (ports > 8 ? 4 : (ports + 1) / 2)]; |
| | | textRenderData.setText(String.format("%.2f",Double.parseDouble(text)) + "∑5" + i + (j - 5)); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | |
| | | String[] split = value[(i + (angles - 1)) % (angles + 1)].replaceAll("[\\[\\]\"]", "").split(","); |
| | | if (j % 2 == 0) { |
| | | try { |
| | | textRenderData.setText(split[(j - 6) / 2 + ((i - (ee == 0 ? ((dd == 0 ? cc : dd)) : ee)) / (angles + 2)) * (ports > 8 ? 4 : (ports + 1) / 2)] + "∑5" + i + (j - 6)); |
| | | String text = split[(j - 6) / 2 + ((i - (ee == 0 ? ((dd == 0 ? cc : dd)) : ee)) / (angles + 2)) * (ports > 8 ? 4 : (ports + 1) / 2)]; |
| | | textRenderData.setText(String.format("%.2f",Double.parseDouble(text)) + "∑5" + i + (j - 6)); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | } else { |
| | | try { |
| | | textRenderData.setText(split[(j - 5) / 2 + ((i - (ee == 0 ? ((dd == 0 ? cc : dd)) : ee)) / (angles + 2)) * (ports > 8 ? 4 : (ports + 1) / 2)] + "∑5" + i + (j - 5)); |
| | | String text = split[(j - 5) / 2 + ((i - (ee == 0 ? ((dd == 0 ? cc : dd)) : ee)) / (angles + 2)) * (ports > 8 ? 4 : (ports + 1) / 2)]; |
| | | textRenderData.setText(String.format("%.2f",Double.parseDouble(text)) + "∑5" + i + (j - 5)); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | |
| | | String[] split = value[(i + (angles - 1)) % (angles + 1)].replaceAll("[\\[\\]\"]", "").split(","); |
| | | if (j % 2 == 0) { |
| | | try { |
| | | textRenderData.setText(split[(j - 6) / 2 + ((i - (ff == 0 ? (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) : ff)) / (angles + 2)) * (ports > 8 ? 4 : (ports + 1) / 2)] + "∑5" + i + (j - 6)); |
| | | String text = split[(j - 6) / 2 + ((i - (ff == 0 ? (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) : ff)) / (angles + 2)) * (ports > 8 ? 4 : (ports + 1) / 2)]; |
| | | textRenderData.setText(String.format("%.2f",Double.parseDouble(text)) + "∑5" + i + (j - 6)); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | } else { |
| | | try { |
| | | textRenderData.setText(split[(j - 5) / 2 + ((i - (ff == 0 ? (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) : ff)) / (angles + 2)) * (ports > 8 ? 4 : (ports + 1) / 2)] + "∑5" + i + (j - 5)); |
| | | String text = split[(j - 5) / 2 + ((i - (ff == 0 ? (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) : ff)) / (angles + 2)) * (ports > 8 ? 4 : (ports + 1) / 2)]; |
| | | textRenderData.setText(String.format("%.2f",Double.parseDouble(text)) + "∑5" + i + (j - 5)); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | |
| | | String[] value = result2s.get((i - (gg == 0 ? (ff == 0 ? (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) : ff) : gg)) / portRow / (angles + 2)).getValue().split("\\],\\["); |
| | | String[] split = value[(i + (angles - 1)) % (angles + 1)].replaceAll("[\\[\\]\"]", "").split(","); |
| | | try { |
| | | textRenderData.setText(split[((j - 5) + ((i - (gg == 0 ? (ff == 0 ? (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) : ff) : gg) - 1) / (angles + 1) % portRow) * (Math.min(ports, 8)))]); |
| | | String text = split[((j - 5) + ((i - (gg == 0 ? (ff == 0 ? (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) : ff) : gg) - 1) / (angles + 1) % portRow) * (Math.min(ports, 8)))]; |
| | | textRenderData.setText(String.format("%.2f",Double.parseDouble(text))); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | |
| | | //最差值 |
| | | String[] value = result2s.get(0).getValue().split("\\],\\["); |
| | | String[] split = value[(i + (angles - 1)) % (angles + 1)].replaceAll("[\\[\\]\"]", "").split(","); |
| | | textRenderData.setText(split[0] + "∑7" + i); |
| | | String text = split[0]; |
| | | textRenderData.setText(String.format("%.2f",Double.parseDouble(text)) + "∑7" + i); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | |
| | | //最差值 |
| | | String[] value = result2s.get(0).getValue().split("\\],\\["); |
| | | String[] split = value[(i + (angles - 1)) % (angles + 1)].replaceAll("[\\[\\]\"]", "").split(","); |
| | | textRenderData.setText(split[0] + "∑7" + i); |
| | | String text = split[0]; |
| | | textRenderData.setText(String.format("%.2f",Double.parseDouble(text)) + "∑7" + i); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | |
| | | String[] value = result2s.get(0).getValue().split("\\],\\["); |
| | | String[] split = value[(i + (angles - 1)) % (angles + 1)].replaceAll("[\\[\\]\"]", "").split(","); |
| | | try { |
| | | textRenderData.setText(split[(j - 5) + ((i - (nn == 0 ? (mm == 0 ? (hh == 0 ? (gg == 0 ? (ff == 0 ? (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) : ff) : gg) : hh) : mm) : nn)) / (angles + 2)) * Math.min(length, 8)]); |
| | | String text = split[(j - 5) + ((i - (nn == 0 ? (mm == 0 ? (hh == 0 ? (gg == 0 ? (ff == 0 ? (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) : ff) : gg) : hh) : mm) : nn)) / (angles + 2)) * Math.min(length, 8)]; |
| | | textRenderData.setText(String.format("%.2f",Double.parseDouble(text))); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | |
| | | String[] value = result2s.get(0).getValue().split("\\],\\["); |
| | | String[] split = value[(i + (angles - 1)) % (angles + 1)].replaceAll("[\\[\\]\"]", "").split(","); |
| | | try { |
| | | textRenderData.setText(split[(j - 5) + ((i - (pp == 0 ? (nn == 0 ? (mm == 0 ? (hh == 0 ? (gg == 0 ? (ff == 0 ? (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) : ff) : gg) : hh) : mm) : nn) : pp)) / (angles + 2)) * Math.min(length, 8)]); |
| | | String text = split[(j - 5) + ((i - (pp == 0 ? (nn == 0 ? (mm == 0 ? (hh == 0 ? (gg == 0 ? (ff == 0 ? (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) : ff) : gg) : hh) : mm) : nn) : pp)) / (angles + 2)) * Math.min(length, 8)]; |
| | | textRenderData.setText(String.format("%.2f",Double.parseDouble(text))); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | |
| | | String[] value = result2s.get(0).getValue().split("\\],\\["); |
| | | String[] split = value[(i + (angles - 1)) % (angles + 1)].replaceAll("[\\[\\]\"]", "").split(","); |
| | | try { |
| | | textRenderData.setText(split[(j - 5) + ((i - rr) / (angles + 2)) * Math.min(length, 8)]); |
| | | String text = split[(j - 5) + ((i - rr) / (angles + 2)) * Math.min(length, 8)]; |
| | | textRenderData.setText(String.format("%.2f",Double.parseDouble(text))); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | |
| | | String[] value = result2s.get(0).getValue().split("\\],\\["); |
| | | String[] split = value[(i + (angles - 1)) % (angles + 1)].replaceAll("[\\[\\]\"]", "").split(","); |
| | | try { |
| | | textRenderData.setText(split[(j - 5) + ((i - ss) / (angles + 2)) * Math.min(length, 8)]); |
| | | String text = split[(j - 5) + ((i - ss) / (angles + 2)) * Math.min(length, 8)]; |
| | | textRenderData.setText(String.format("%.2f",Double.parseDouble(text))); |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | |
| | | //电路报告用于总报告的方法(无源器件) |
| | | private void getWord2(String term, InsOrderState insOrderState, List<Map<String, Object>> tables2) { |
| | | AtomicInteger index = new AtomicInteger(); |
| | | String title = term + "电路参数"; |
| | | String title = term + "电性能参数"; |
| | | //查询样品 |
| | | InsSample insSample = insSampleMapper.selectById(insOrderState.getInsSampleId()); |
| | | //查询项目 |