| | |
| | | Object staticFieldValue = ReflectUtil.getFieldValue(dataObj, field.getName()); // 属性对应的数据 |
| | | if (typeName.contains("com.zt.life.modules")) { |
| | | formatWordData(staticFieldValue, wordData, builder); |
| | | }else { |
| | | } else { |
| | | if (field.getType().getName().equals("java.util.List")) { |
| | | builder.bind(fieldName, new HackLoopTableRenderPolicy()); |
| | | } else if (staticFieldValue != null) { |
| | | if (typeName.contains("java.util.Date") && fieldName.contains("Date")) { |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | staticFieldValue=sdf.format(staticFieldValue); |
| | | staticFieldValue = sdf.format(staticFieldValue); |
| | | } |
| | | String valStr = staticFieldValue.toString(); |
| | | if (valStr.contains("文件图片:")) { |
| | | valStr = localPath + valStr.replace("文件图片:", ""); |
| | | File file = new File(valStr); |
| | | if (file.exists()) { |
| | | if (file.exists() && !localPath.equals(valStr)) { |
| | | try (InputStream in = ossEncryptService.decrypt(file)) { |
| | | InputStream in2 = ossEncryptService.decrypt(file); |
| | | BufferedImage bufferedImage = ImageIO.read(in2); |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | } else { |
| | | staticFieldValue = new PictureRenderData(100, 30, "template/noSign.png"); |
| | | staticFieldValue = new PictureRenderData(100, 30, localPath+"template/noSign.png"); |
| | | } |
| | | } |
| | | } |