sinake
2026-08-27 b3a813c7538b2b5b181ad82e64bed30044386a36
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceEthicalreviewopinionsController.java
@@ -206,29 +206,22 @@
        EthicalreviewopinionsStateTotalVO  stateTotalVO=serviceEthicalreviewopinionsService.stateTotalAll(nitiateId);
        String filePath = getClass().getResource("/template/").getPath();
        File directory = new File("");// 参数为空
        String filePath1 = null;
        try {
            filePath1 = directory.getCanonicalPath()+"\\template\\";
            filePath = directory.getCanonicalPath()+"/template/";
        } catch (IOException e) {
        }
        if(filePath.substring(0,1).equals("/"))
            filePath=filePath.substring(1);
        filePath = RuoYiConfig.getProfile()+"\\template\\";
        String content ="";
        Template t = null;
        try {
            //content = Files.readString(Paths.get(filePath+"遗体器官获取伦理审查表首页.xml"), StandardCharsets.UTF_8);
            Path path = Paths.get(filePath + "遗体器官获取伦理审查表首页.xml");
            logger.info(filePath + "遗体器官获取伦理审查表首页.xml ;"+Files.exists(path));
            if(Files.exists(path)) {
                byte[] bytes = Files.readAllBytes(path);
                content = new String(bytes, StandardCharsets.UTF_8);
            }else{
                logger.info(filePath1 + "遗体器官获取伦理审查表首页.xml ;"+Files.exists(path));
                path = Paths.get(filePath1 + "遗体器官获取伦理审查表首页.xml");
                byte[] bytes = Files.readAllBytes(path);
                content = new String(bytes, StandardCharsets.UTF_8);
            }
            byte[] bytes = Files.readAllBytes(path);
            content = new String(bytes, StandardCharsets.UTF_8);
            String name=list.get(0).getName()+"(住院号:"+list.get(0).getInpatientno()+")";
            content=content.replace("$name",name);//项目名称
@@ -307,7 +300,7 @@
                        "            <w:tc><w:tcPr></w:tcPr>\n" +
                        "                <w:p wsp:rsidR=\"00425E28\" wsp:rsidRPr=\"00CB3FB5\" wsp:rsidRDefault=\"00AC7CCA\" wsp:rsidP=\"00CB3FB5\">\n" +
                        "                    <w:r wsp:rsidRPr=\"00737357\">\n" +
                        "                        <w:spacing w:line=\"480\" w:line-rule=\"auto\"/><w:t>【委员审批】"+expName+"  "+State+" </w:t></w:r>\n" +
                        "                        <w:spacing w:line=\"480\" w:line-rule=\"auto\"/><w:t>【委员审批】"+expName+"   </w:t></w:r>\n" +
                        "                   </w:p>\n" +
                        "            </w:tc>\n" +
                        "            <w:tc><w:tcPr></w:tcPr>\n" +
@@ -316,9 +309,11 @@
                        "                        <w:t>签名:</w:t></w:r>\n" +
                        "                    <w:r wsp:rsidR=\"00421BE1\">\n" ;
                        if(sgin.length()>10) {
                            sgin=sgin.replace("https://opo.qduh.cn:8091","http://192.168.76.25:8090");
                            committeeOpinion +="<w:pict><w:binData w:name=\"wordml://03000001.png\" xml:space=\"preserve\">\n" + sgin + "\n" +
                                    "</w:binData><v:shape  style=\"width:50pt;height:20pt\"><v:imagedata src=\"wordml://03000001.png\" o:title=\"\"/></v:shape></w:pict>\n" ;
                        }
                        logger.info("签名"+sgin);
                committeeOpinion += "                    </w:r>\n" +
                        "                </w:p>\n" +
                        "            </w:tc>\n" +