许鹏程
2024-08-01 46a2436778fbde103150a7bd9ca4c18868831efe
src/main/java/com/product/print/util/DynamicTableRenderPolicy.java
@@ -169,8 +169,13 @@
               if (value == null) {
                  value = "";
               }
//               if ("lx_flow_opinion".equals(this.replaceKey) && "opinion".equals(fieldNames[j])) {
//                  //将流程节点处理人加到意见栏中
//                  value = "[" + map.get("actual_person") + "] " + value;
//               }
               xwpfRun.setText(value.toString(), 0);
               if ("lx_flow_opinion".equals(this.replaceKey) && "opinion".equals(fieldNames[j]) && !StringUtils.isEmpty(map.get("sign_attachment_uuid"))) {
               if ("lx_flow_opinion".equals(this.replaceKey) && "opinion".equals(fieldNames[j])) {
                  if (!StringUtils.isEmpty(map.get("sign_attachment_uuid"))) {
                  //意见框 插入签名图片到单元格右下角位置
                  xwpfParagraph = cell.addParagraph();
                  xwpfParagraph.setAlignment(ParagraphAlignment.RIGHT);
@@ -183,12 +188,23 @@
                  try {
                     //换行插入图片
                     run.addPicture(inputStream, XWPFDocument.PICTURE_TYPE_PNG, "sign.png", Units.toEMU(50), Units.toEMU(20));
                        run.addBreak();
                        run.setText("" + map.get("deal_time").toString().substring(0, 16));
                     inputStream.close();
                  } catch (InvalidFormatException e) {
                     e.printStackTrace();
                  } catch (IOException e) {
                     e.printStackTrace();
                  }
                  } else {
                     xwpfParagraph = cell.addParagraph();
                     xwpfParagraph.setAlignment(ParagraphAlignment.RIGHT);
                     XWPFRun run = xwpfParagraph.createRun();
                     run.setText((String) map.get("actual_person"));
                     run.addBreak();
                     run.setText(map.get("deal_time").toString().substring(0, 16));
                  }
               }
            }