| | |
| | | InsOrderFileMapper insOrderFileMapper; |
| | | |
| | | @Resource |
| | | InsOrderMapper insOrderMapper; |
| | | |
| | | @Resource |
| | | InsSampleMapper insSampleMapper; |
| | | |
| | | public void getFuSheWord1(String sonLaboratory, InsOrderFile insOrderFile) { |
| | |
| | | Exceldata exceldata = new Exceldata(); |
| | | Map<Integer, Object> project = new HashMap<>(); |
| | | HashMap<String, Object> datas1 = new HashMap<>(); |
| | | Boolean exitLoop=false; |
| | | for (int i = 0; i < workbook.getNumberOfSheets(); i++) { |
| | | String s = ""; |
| | | Sheet sheet = workbook.getSheetAt(i); |
| | |
| | | } else { |
| | | switch (cell.getCellType()) { |
| | | case STRING: |
| | | if (cell.getColumnIndex()==1) { |
| | | exitLoop=true; |
| | | break; |
| | | } |
| | | if (StringUtils.isNotEmpty(s)) { |
| | | datas.put(s, list); |
| | | } |
| | |
| | | System.out.print("NULL\t"); |
| | | } |
| | | } |
| | | if (exitLoop){ |
| | | exitLoop=false; |
| | | break; |
| | | } |
| | | if (map.isEmpty()) { |
| | | list.add(map); |
| | | } |
| | |
| | | for (Map<String, Object> number : hashMaps) { |
| | | number.put("端口", s1); |
| | | Double o = (Double) number.get("频率"); |
| | | floatList.add(o); |
| | | if (o!=null) { |
| | | floatList.add(o); |
| | | } |
| | | } |
| | | Double maxValue = Collections.max(floatList); |
| | | Double minValue = Collections.min(floatList); |
| | | if (map.get(minValue + "-" + maxValue + "-" + s) == null) { |
| | | map.put(minValue + "-" + maxValue + "-" + s, s1); |
| | | if (map.get(minValue + "," + maxValue + "," + s) == null) { |
| | | map.put(minValue + "," + maxValue + "," + s, s1); |
| | | } else { |
| | | Object o = map.get(minValue + "-" + maxValue + "-" + s); |
| | | map.put(minValue + "-" + maxValue + "-" + s, s1 + "," + o); |
| | | Object o = map.get(minValue + "," + maxValue + "," + s); |
| | | map.put(minValue + "," + maxValue + "," + s, s1 + "," + o); |
| | | } |
| | | } |
| | | } |
| | |
| | | runs.setText("辐射方向图参数"); |
| | | for (String s : map.keySet()) { |
| | | Map<String, Object> dataRow = exceldata.getDataRow(); |
| | | String result = s.substring(s.lastIndexOf("-") + 1); |
| | | String result1 = s.substring(0, s.lastIndexOf("-")); |
| | | String result = s.substring(s.lastIndexOf(",") + 1); |
| | | String result1 = s.substring(0, s.lastIndexOf(",")); |
| | | String o = map.get(s).toString(); |
| | | String[] split = o.split(","); |
| | | Integer s1 = Integer.parseInt(split[split.length - 1]); |
| | |
| | | try { |
| | | InsSample insSample = insSampleMapper.selectById(insOrderFile.getInsSampleId()); |
| | | String[] split = insOrderFile.getFileName().split("\\."); |
| | | String name = insOrderFile.getFileName().substring(0, (insOrderFile.getFileName().length() - split[split.length - 1].length())); |
| | | String name = insOrderFile.getFileName().replace('#','&').substring(0, (insOrderFile.getFileName().length() - split[split.length - 1].length())); |
| | | FileOutputStream out = new FileOutputStream(wordUrl + "/" + UUID.randomUUID() + "_" + insSample.getSampleCode() + "&" + sonLaboratory + name + "解析的辐射站点报告.docx"); |
| | | document.write(out); |
| | | out.close(); |