| | |
| | | |
| | | |
| | | public static void main(String[] args) throws Exception { |
| | | /*String dataPath = "D:\\测评系统\\需求\\LAQ\\report\\LAQ表头数据文件.xlsx"; |
| | | String dataPath = "D:\\测评系统\\需求\\LAQ\\report\\LAQ表头数据文件.xlsx"; |
| | | // 获取导入数据 |
| | | File file = new File(dataPath); |
| | | InputStream in = new FileInputStream(file); |
| | |
| | | textMap.put("extra","48"); |
| | | textMap.put("agree","90"); |
| | | textMap.put("emosta","23"); |
| | | textMap.put("perfomance","80"); |
| | | // textMap.put("perfomance","0"); |
| | | |
| | | |
| | | LAQReport report = new LAQReport(); |
| | |
| | | |
| | | log.info("删除的文件名:{}", JSON.toJSONString(deleteStrList)); |
| | | WordUtil.deleteFileByStr(deleteStrList); |
| | | }*/ |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | Double extra = Double.valueOf((String)textMap.get("extra")); |
| | | Double agree = Double.valueOf((String)textMap.get("agree")); |
| | | Double emosta = Double.valueOf((String)textMap.get("emosta")); |
| | | Double perfomance = Double.valueOf((String)textMap.get("perfomance")); |
| | | Double perfomance; |
| | | if(textMap.get("perfomance") != null){ |
| | | perfomance = Double.valueOf((String)textMap.get("perfomance")); |
| | | }else{ |
| | | perfomance = -1D; |
| | | } |
| | | |
| | | |
| | | // 图表1 |
| | | List<SeriesData> seriesDatas = Arrays.asList( |
| | |
| | | // 图表11 |
| | | seriesDatas = Arrays.asList( |
| | | new SeriesData("X 值", Arrays.asList( |
| | | new RowData("X 值", olas.doubleValue()) |
| | | new RowData("X 值", perfomance.doubleValue() == -1 ? perfomance.doubleValue() : olas.doubleValue()) |
| | | )), |
| | | new SeriesData("Y 值", Arrays.asList( |
| | | new RowData("Y 值", perfomance.doubleValue()) |
| | |
| | | if(StringUtils.isNotEmpty(cellValu.valueStr)){ |
| | | cell.setCellValue(cellValu.valueStr); |
| | | }else{ |
| | | cell.setCellValue(cellValu.value); |
| | | if(cellValu.value != -1){ |
| | | cell.setCellValue(cellValu.value); |
| | | }else{ |
| | | cell.setCellValue((String) null); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | CTNumVal val = xNumCnt > i ? xDataSource.getNumRef().getNumCache().getPtArray(i) |
| | | : xDataSource.getNumRef().getNumCache().addNewPt(); |
| | | val.setIdx(i); |
| | | val.setV(String.format("%.0f", cellValu.value)); |
| | | if(cellValu.value == -1){ |
| | | val.setV(null); |
| | | }else { |
| | | val.setV(String.format("%.0f", cellValu.value)); |
| | | } |
| | | } |
| | | |
| | | //更新Y坐标缓存 |
| | |
| | | CTNumVal val = yNumCnt > i ? yDataSource.getNumRef().getNumCache().getPtArray(i) |
| | | : yDataSource.getNumRef().getNumCache().addNewPt(); |
| | | val.setIdx(i); |
| | | val.setV(String.format("%.0f", cellValu.value)); |
| | | if(cellValu.value == -1){ |
| | | val.setV(null); |
| | | }else { |
| | | val.setV(String.format("%.0f", cellValu.value)); |
| | | } |
| | | } |
| | | |
| | | // 更新对应excel的范围 |