diff --git a/.~th_to_output.docx b/.~th_to_output.docx deleted file mode 100644 index eb4a81d4d227b2b1868ee40a1d91ad49b8e009db..0000000000000000000000000000000000000000 Binary files a/.~th_to_output.docx and /dev/null differ diff --git a/abc.txt b/abc.txt index 7dd46f9644f61ae6cfcfa1e734ddb950d6f2f56c..db79461479ebed8460543edc35065d00ccb4bd09 100644 --- a/abc.txt +++ b/abc.txt @@ -1 +1 @@ -
问问还好吧我我我我我我我我我我我我我我我红红火火恍恍惚惚或或或或或或或或红红火火恍恍惚惚或或或或或或或红红火火恍恍惚惚或或或或或或或或或或或或红红火火恍恍惚惚或或或或或或或或咕咕咕咕咕咕过过过过过过过过过666666,66666 ??????????????? 红红火火恍恍惚惚或或或或或或红红火火恍恍惚惚或或或或或或或或或或或或或或或或或或或或或或或或或
6666666666我看电视从数据费大V还大方v红红火火恍恍惚惚或或或或或或或或或
红红火火恍恍惚惚或或或或或或或或或或或或或或或或或或或或红红火火恍恍惚惚或或或或或或或或或或或或或或或或或或66666666666666666666666卡卡卡卡卡卡卡卡扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩红红火火恍恍惚惚或或我我我我我我我我我我我我我我我无无无无无无品牌品牌铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺铺品牌品牌铺铺铺铺铺铺铺铺铺卡卡卡卡卡卡卡卡扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩扩加急急急急急急军军军军军军军军军军军军军军军军军军军军红红火火恍恍惚惚或或或或或或或或或或或或或或金合欢花或
| 一月 | 二月 | 三月 | 四月 | 五月 | 六月 | 七月 | 八月 | 九月 | 十月 |
|---|---|---|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| a | b | c | d | e | f | g | h | i | j |
| k | l | m | n | o | p | q | r | s | t |
121121212123meyuiyuiyuihdscsfvfhverhi红红火火恍恍惚惚或或或或或或或hijack啦啦啦啦啦绿绿绿绿绿绿绿绿绿绿绿绿绿绿😀😃😄😆😂🙃😝😟😗😂🤣🙃😕🙁🤝👏
66666发发发发发发付付付付付付付发发发发发发付付付付付付付付付付付付付付66666666666666666666666666666666666666666红红火火恍恍惚惚或或或或或或或或或或或或或或或或或或红红火火恍恍惚惚或或或或或
| 11 | 12 | 13 | 14 | 15 | 16 |
|---|---|---|---|---|---|
| a | b | c | d | e | f |
1. 主要内容
Runx2、Smurfl基因小鼠繁育服务,项目信息如下:
| 基因名称 | 项目周期 | 小计(元) |
| Runx2 | 2023/7/28-2023/8/18 | ¥656.00 |
| Smurfl | 2023/7/28-2023/8/18 | ¥792.00 |
2. 考核指标
2.1 Runx2点突变杂合小鼠1♂3♀。
2.2 Smurf1 阳性鼠(杂合)8♂6♀。
3. 验收方式
活体小鼠
\ No newline at end of file diff --git a/ccmuJsfw.docx b/ccmuJsfw.docx index ea63ee5d38e058af14b9f82a118aa857d6990e0c..c21fe82b7a681be0b81d520da672e5655e1e4968 100644 Binary files a/ccmuJsfw.docx and b/ccmuJsfw.docx differ diff --git a/path_to_output.docx b/path_to_output.docx index 48f54e6ecb4f3deda1281296b39116c924df2286..3825089aa3d755a40306e29d23348429e9ff980a 100644 Binary files a/path_to_output.docx and b/path_to_output.docx differ diff --git a/src/main/java/com/example/demo/InsertAtPositionExample.java b/src/main/java/com/example/demo/InsertAtPositionExample.java index cff88699fac1fcacaa65c78d238f902265c88c0f..0127a5cceefee2762f3a9d17f15f970ddf74bda1 100644 --- a/src/main/java/com/example/demo/InsertAtPositionExample.java +++ b/src/main/java/com/example/demo/InsertAtPositionExample.java @@ -18,24 +18,26 @@ import java.nio.file.Files; import java.nio.file.Paths; import java.util.List; + public class InsertAtPositionExample { - public static void main(String[] args) throws IOException, InvalidFormatException { + public static void main(String[] args) throws Exception { + String fileName = "样例1"; // 模拟获取前端传输过来的base64 - String text = new String(Files.readAllBytes(Paths.get(GetWebProjectRealPathTool.getRootPath() + "/abc.txt")), StandardCharsets.UTF_8); + String text = new String(Files.readAllBytes(Paths.get(GetWebProjectRealPathTool.getRootPath() + "/"+fileName+".txt")), StandardCharsets.UTF_8); Document orignDocument = Jsoup.parseBodyFragment(text); Documents.DocumentBuilder of = Documents.of(); - Elements links = orignDocument.getElementsByTag("p"); Elements allElements = orignDocument.body().children(); // 遍历插入到临时的段落里 - for (Element element : allElements) { if (element.tagName().equals("p")) { for (Node child : element.childNodes()) { + System.out.println(child.nodeName()); + if (child.nodeName().equals("img")) { // 这是一个xxxxhdhsafahh
fadfadf
"; - Document doc = Jsoup.parseBodyFragment(html); - - // 选择所有的
标签 - Elements pTags = doc.select("p"); - - for (Element p : pTags) { - Elements imgTags = p.select("img"); - if (imgTags.size() > 0) { - for (Element img : imgTags) { - // 创建新的
标签并包裹
- Element newPTag = new Element("p");
- img.replaceWith(newPTag);
- newPTag.appendChild(img);
- }
+ public static void main(String[] args) throws Exception {
+ String fileName = "样例1";
+ // 模拟获取前端传输过来的base64
+
+ // 打开现有的Word文档
+ Document doc = new Document(GetWebProjectRealPathTool.getRootPath() + "/"+"ccmuJsfw.docx");
+
+
+ // 创建FindReplaceOptions对象
+ FindReplaceOptions options = new FindReplaceOptions();
+ options.setReplacingCallback(new IReplacingCallback() {
+ @Override
+ public int replacing(ReplacingArgs e) throws Exception {
+ // 创建一个DocumentBuilder并将其光标移至匹配节点的位置
+ DocumentBuilder builder = new DocumentBuilder((Document) e.getMatchNode().getDocument());
+ builder.moveTo(e.getMatchNode());
+
+ String html = new String(Files.readAllBytes(Paths.get(GetWebProjectRealPathTool.getRootPath() + "/"+fileName+".txt")), StandardCharsets.UTF_8);
+
+ builder.insertHtml(html);
+
+ // 告诉引擎我们已经替换了文本,跳过默认的替换动作
+ return ReplaceAction.SKIP;
}
+ });
+
+ // 执行查找和替换
+ doc.getRange().replace("{{协议信息}}", "", options);
+
+ insertWatermarkText(doc, "CCMU");
+
+ doc.save(GetWebProjectRealPathTool.getRootPath() + "/"+"output"+fileName+".docx");
+
+//
+// Document doc = new Document("path/to/your/document.docx");
+
+ }
+
+
+
+
+ private static void insertWatermarkText(Document doc, String watermarkText) throws Exception {
+ // Create a watermark shape.
+ Shape watermark = new Shape(doc, ShapeType.TEXT_PLAIN_TEXT);
+
+ // Set various properties for the shape.
+ watermark.getTextPath().setText(watermarkText);
+ watermark.getTextPath().setFontFamily("Arial");
+ watermark.setWidth(300);
+ watermark.setHeight(80);
+ watermark.setRotation(-40); // Rotate the text
+ watermark.getFill().setColor(Color.GRAY); // Try other color combinations if you want
+ watermark.setStrokeColor(Color.GRAY);
+
+ // Place the watermark in the page center.
+ watermark.setRelativeHorizontalPosition(RelativeHorizontalPosition.PAGE);
+ watermark.setRelativeVerticalPosition(RelativeVerticalPosition.PAGE);
+ watermark.setWrapType(WrapType.NONE);
+ watermark.setVerticalAlignment(VerticalAlignment.CENTER);
+ watermark.setHorizontalAlignment(HorizontalAlignment.CENTER);
+
+ // Create a new paragraph and append the watermark to this paragraph.
+ Paragraph watermarkPara = new Paragraph(doc);
+ watermarkPara.appendChild(watermark);
+
+ // Insert the watermark into all headers of each section.
+ for (Section sect : doc.getSections()) {
+ // There could be up to three different headers in each section, so we insert the watermark into all of them.
+ insertWatermarkIntoHeader(watermarkPara, sect, HeaderFooterType.HEADER_PRIMARY);
+ insertWatermarkIntoHeader(watermarkPara, sect, HeaderFooterType.HEADER_FIRST);
+ insertWatermarkIntoHeader(watermarkPara, sect, HeaderFooterType.HEADER_EVEN);
+ }
+ }
+
+ private static void insertWatermarkIntoHeader(Paragraph watermarkPara, Section sect, int headerType) throws Exception {
+ HeaderFooter header = sect.getHeadersFooters().getByHeaderFooterType(headerType);
+
+ if (header == null) {
+ // There is no header of the specified type in the current section, create it.
+ header = new HeaderFooter(sect.getDocument(), headerType);
+ sect.getHeadersFooters().add(header);
}
- System.out.println(doc.body().html());
+ // Insert a clone of the watermark into the header.
+ header.appendChild(watermarkPara.deepClone(true));
}
}
diff --git "a/\346\240\267\344\276\2131.txt" "b/\346\240\267\344\276\2131.txt"
new file mode 100644
index 0000000000000000000000000000000000000000..10b461a3d2399fb38fd477f3949a3336f0474e7b
--- /dev/null
+++ "b/\346\240\267\344\276\2131.txt"
@@ -0,0 +1 @@
+
业财融合对接方案
发呆发呆发呆发呆舒服
样例一,
1. 主要内容
Runx2、Smurfl基因小鼠繁育服务,项目信息如下:
| 基因名称 | 项目周期 | 小计(元) |
| Runx2 | 2023/7/28-2023/8/18 | ¥656.00 |
| Smurfl | 2023/7/28-2023/8/18 | ¥792.00 |
2. 考核指标
2.1 Runx2点突变杂合小鼠1♂3♀。
2.2 Smurf1 阳性鼠(杂合)8♂6♀。
3. 验收方式
活体小鼠
样例二,
| 具体分析内容 | 备注 | |
| 分析内容 | 标准分析内容 序列优化及质控 测序数据介绍 数据过滤及质量评估 划分 OTU OTU 生成 OTU 聚类结果统计 OTU 丰度统计 分类学分析 物种分类与相对丰度统计 群落结构分析 物种热图分析(N≥3) 物种系统进化分析 单样品分类学树状图 分析内容 多样品分类学树状图 单样品(alpha)多样性分析 a-多样性指数统计 高级分析内容 组间差异分析(分组≥2,每组≥2样品) LEfSe 分析 组间显著性差异分析 样品间相关分析(N≥3) 三元相图(N≥3) Anova方差分析(分组≥2,每组≥2样品) Wilcox秩和检验(分组≥2,每组≥2样品) RDA/CCA分析(属水平)(注:需要提供环境因子数据, 且环境因子数小于分析样品数) 基于16S的COG和KEGG数据库功能富集(限细菌) | |
| 售后服务 | 甲方可以在分析完成日后的三个月内针对原有数据、结果、分析方法等方面的疑问咨询乙方,乙方在一个月内给甲方提供整理分析类服务,三个月内提供问题解答服务,咨询范围只限于合同中的服务内容。 | |
| 注:1、待项目启动后20天未提供分析方案,将按不分组进行分析出具报告。待老师出具方案后再进行免费个性化分析。乙方提供给甲方的分析内容以合同为准,任何口头承诺均无效。2、每批样本分析次数不超过3次。 | ||
4. 考核指标及验收方式:
试验全部完成后,受委托方按合同规定的内容向委托方提供全部试验原始资料,图片和电子数据表(含计算方法及相关软件信息)等。并出具相应的试验报告(电子版与盖章纸质版),并保证报告的真实性、准确性、科学性,同时对全部资料有保密责任。项目完成后,受委托方应当将项目相关的原始记录、原始数据归档保存。
5. 技术服务地点:北京百迈客生物科技有限公司
6. 标分析技术务期:30自然(n≤24)(不包含定制化分析周期)。自乙方收到首付款且样本质检合格次日起到乙方向甲方提供《结题报告》或《标准分析报告》之日止。若在项目生产过程中遇到技术障碍,乙方应与甲方及时沟通, 双方沟通时间。
样例三,
一、委托工作主要内容
1.受委托方的要求对水蛭单体成分(以下称为化合物A或Bdelline A)进行分离,目标化合物A的分子量为495.12,纯度需要大于98%,并进行质谱分析,分离质量大于1.0g的成分,需要进行核磁实验,提供相关数据报告并保证分离条件的可重复性,受委托方不负责核磁解谱以及提供结构信息。目标化合物结构式如下:
Bdelline A
2.委托方将水蛭药材分两批送货,受委托方需对待分离成分进行评估。
3.受委托方根据委托方的要求对水蛭药材中其他单体化合物,分别是化合物c,分子量为411.27;化合物D,分子量为425.95;化合物 E,分子量为 439.30:化合物F,分子量为451.13;化合物G,分子量为479.16;化合物H,分子量为734.90,纯度需要
样例四,
二、验收方式
经核磁、质谱等谱图鉴定,目标化合物核磁谱图、液相质谱谱图与所委托分离的化合物结构一致,并且重量、纯度达到相关要求。(质谱图如下)
第三条 测试化验加工细目:
| 序号 | 测试化验加工的内容 | 测试结果的呈现方式 | 计量单位 | 单价(万元/单位) | 数量 | 金额(万元) |
| 1 | ||||||
| 2 | ||||||
| 3 | ||||||
| 4 | ||||||
| 5 | ||||||
| 6 | ||||||
| 7 | ||||||
| 8 | ||||||
| 合计 | ||||||
| 具体分析内容 | 备注 | |
| 分析内容 | 标准分析内容 序列优化及质控 测序数据介绍 数据过滤及质量评估 划分 OTU OTU 生成 OTU 聚类结果统计 OTU 丰度统计 分类学分析 物种分类与相对丰度统计 群落结构分析 物种热图分析(N≥3) 物种系统进化分析 单样品分类学树状图 分析内容 多样品分类学树状图 单样品(alpha)多样性分析 a-多样性指数统计 高级分析内容 组间差异分析(分组≥2,每组≥2样品) LEfSe 分析 组间显著性差异分析 样品间相关分析(N≥3) 三元相图(N≥3) Anova方差分析(分组≥2,每组≥2样品) Wilcox秩和检验(分组≥2,每组≥2样品) RDA/CCA分析(属水平)(注:需要提供环境因子数据, 且环境因子数小于分析样品数) 基于16S的COG和KEGG数据库功能富集(限细菌) | |
| 售后服务 | 甲方可以在分析完成日后的三个月内针对原有数据、结果、分析方法等方面的疑问咨询乙方,乙方在一个月内给甲方提供整理分析类服务,三个月内提供问题解答服务,咨询范围只限于合同中的服务内容。 | |
| 注:1、待项目启动后20天未提供分析方案,将按不分组进行分析出具报告。待 老师出具方案后再进行免费个性化分析。乙方提供给甲方的分析内容以合同为 准,任何口头承诺均无效。 2、每批样本分析次数不超过3次。 | ||
1. 考核指标及验收方式:
试验全部完成后,受委托方按合同规定的内容向委托方提供全部试验原始资料,图片和电子数据表(含计算方法及相关软件信息)等。并出具相应的试验报告(电子版与盖章纸质版),并保证报告的真实性、准确性、科学性,同时对全部资料有保密责任。项目完成后,受委托方应当将项目相关的原始记录、原始数据归档保存。
2. 技术服务地点:北京百迈客生物科技有限公司
3. 标分析技术务期:30自然(n≤24)(不包含定制化分析周期)。自乙方收到首付款且样本质检合格次日起到乙方向甲方提供《结题报告》或《标准分析报告》之日止。若在项目生产过程中遇到技术障碍,乙方应与甲方及时沟通, 双方沟通时间。
\ No newline at end of file diff --git "a/\346\240\267\344\276\2133.txt" "b/\346\240\267\344\276\2133.txt" new file mode 100644 index 0000000000000000000000000000000000000000..b7c0c53dfab02aa6d63c320961b1f1ecbff532c5 --- /dev/null +++ "b/\346\240\267\344\276\2133.txt" @@ -0,0 +1 @@ +1. 主要内容
\ No newline at end of file