101captain
2022-01-21 5201e27e7fde1eeb220bb051d6c816d667ac69a8
测试服pdf上传
11个文件已修改
6个文件已添加
489 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/common/pom.xml 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/reserve/PageReserveRegisterDetailedAdminDTO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/reserve/ReservePdfExportVO.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActReserveApi.java 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/util/HtmlToPdfUtil.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/util/PdfBase64ImgReplacedElementFactory.java 108 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/resources/templates/forestFire.html 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/resources/templates/gasSafety.html 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/resources/templates/simsun.ttc 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComActReserveApi.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActReserveAnswerContentMapper.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActReserveMapper.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActReserveAnswerContentService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActReserveAnswerContentServiceImpl.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActReserveAnswerContentMapper.xml 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActReserveMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/pom.xml
@@ -86,6 +86,23 @@
            <artifactId>commons-net</artifactId>
            <version>3.6</version>
        </dependency>
        <!-- thymeleaf -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>
        <!--FlyingSaucer-->
        <dependency>
            <groupId>org.xhtmlrenderer</groupId>
            <artifactId>flying-saucer-pdf</artifactId>
            <version>9.1.9</version>
        </dependency>
        <!-- batik -->
        <dependency>
            <groupId>org.apache.xmlgraphics</groupId>
            <artifactId>batik-codec</artifactId>
            <version>1.12</version>
        </dependency>
        <!--       阿里easyexcel-->
        <dependency>
            <groupId>com.alibaba</groupId>
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/reserve/PageReserveRegisterDetailedAdminDTO.java
@@ -34,4 +34,7 @@
    @ApiModelProperty(value = "来攀/离攀结束时间")
    private String stopTime;
    @ApiModelProperty(value = "类型 1燃气 2防火")
    private Integer pdfType;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/reserve/ReservePdfExportVO.java
New file
@@ -0,0 +1,13 @@
package com.panzhihua.common.model.vos.community.reserve;
import lombok.Data;
@Data
public class ReservePdfExportVO {
    private String name;
    private String time;
    private String phone;
    private String sign;
    private String communityPhone;
    private String address;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -5761,6 +5761,14 @@
    R registerDetailedListAdmin(@RequestBody PageReserveRegisterDetailedAdminDTO detailedAdminDTO);
    /**
     * 导出登记明细列表
     * @param detailedAdminDTO  请求参数
     * @return  登记明细列表
     */
    @PostMapping("/reserve/admin/register/detailed/list/export")
    R registerDetailedListAdminExport(@RequestBody PageReserveRegisterDetailedAdminDTO detailedAdminDTO);
    /**
     * 查询登记详情记录
     * @param reserveRecordId   登记记录id
     * @return  登记详情记录
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActReserveApi.java
@@ -1,16 +1,14 @@
package com.panzhihua.community_backstage.api;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.io.*;
import java.util.*;
import javax.annotation.Resource;
import com.lowagie.text.DocumentException;
import com.panzhihua.common.model.vos.community.ComActReserveCommitVO;
import com.panzhihua.common.model.vos.community.reserve.HomeQuarantineRegisterExportVO;
import com.panzhihua.community_backstage.util.MyAESUtil;
import com.panzhihua.common.model.vos.community.reserve.*;
import com.panzhihua.community_backstage.util.HtmlToPdfUtil;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.VerticalAlignment;
import org.springframework.beans.BeanUtils;
@@ -74,6 +72,8 @@
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.thymeleaf.TemplateEngine;
import org.thymeleaf.context.Context;
/**
 * @description: 预约登记接口
@@ -93,6 +93,8 @@
    private UserService userService;
    @Resource
    private SFTPConfig sftpConfig;
    @Resource
    private TemplateEngine templateEngine;
    @ApiOperation(value = "分页查询预约登记列表", response = ComActReserveListAdminVO.class)
    @PostMapping("/page")
@@ -737,6 +739,63 @@
        return communityService.registerDetailedListAdmin(detailedAdminDTO);
    }
    @ApiOperation(value = "导出登记明细列表", response = ComActReserveRegisterDetailedVO.class)
    @PostMapping("/register/detailed/list/export")
    public R registerDetailedListExport(@RequestBody PageReserveRegisterDetailedAdminDTO detailedAdminDTO) {
        R r=communityService.registerDetailedListAdminExport(detailedAdminDTO);
        if(r.getData()!=null){
            List<ReservePdfExportVO> reservePdfExportVOS = (List<ReservePdfExportVO>) r.getData();
            if(!reservePdfExportVOS.isEmpty()){
                String name="承诺书.pdf";
                String uuid = UUID.randomUUID().toString().replace("-", "");
                String ftpUrl = "/mnt/data/web/excel/"+uuid+"/";
                SFTPUtil sftp = new SFTPUtil(sftpConfig.getUserName(), sftpConfig.getPassword(), sftpConfig.getHost(), sftpConfig.getPort());
                sftp.login();
                boolean existDir = sftp.isExistDir(ftpUrl +name);
                if (!existDir) {
                    String property = System.getProperty("user.dir");
                    String fileName = property + File.separator + name;
                    Map<String, Object> model = new HashMap<>();
                    model.put("reservePdfExportVOS", reservePdfExportVOS);
                    Context ctx = new Context();
                    ctx.setVariables(model);
                    String htmlcontext =null;
                    if(detailedAdminDTO.getPdfType()==1){
                        htmlcontext=templateEngine.process("/gasSafety", ctx);
                    }
                    if(detailedAdminDTO.getPdfType()==2){
                        htmlcontext=templateEngine.process("/forestFire", ctx);
                     }
                    InputStream inputStream = null;
                    try {
                        HtmlToPdfUtil.topdf(htmlcontext, fileName);
                        File file = new File(fileName);
                        inputStream = new FileInputStream(file);
                        sftp.uploadMore(ftpUrl, name, inputStream);
                        sftp.logout();
                        inputStream.close();
                        String absolutePath = file.getAbsolutePath();
                        boolean delete = file.delete();
                        log.info("删除pdf【{}】结果【{}】", absolutePath, delete);
                    } catch (Exception e) {
                        e.printStackTrace();
                    } finally {
                        // 千万别忘记finish 会帮忙关闭流
                        if (inputStream != null) {
                            try {
                                inputStream.close();
                            } catch (IOException e) {
                                e.printStackTrace();
                            }
                        }
                    }
                }
                return R.ok(sftpConfig.getExcelUrl() +uuid+ "/" + name);
            }
        }
        return R.ok();
    }
    @ApiOperation(value = "查询登记明细详情", response = ComActReserveRegisterDetailedVO.class)
    @PostMapping("/register/detailed/detail")
    public R registerDetailedDetail(@RequestParam("reserveRecordId") Long reserveRecordId) {
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/util/HtmlToPdfUtil.java
New file
@@ -0,0 +1,32 @@
package com.panzhihua.community_backstage.util;
import com.lowagie.text.DocumentException;
import com.lowagie.text.pdf.BaseFont;
import org.springframework.util.ResourceUtils;
import org.xhtmlrenderer.pdf.ITextFontResolver;
import org.xhtmlrenderer.pdf.ITextRenderer;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.URLDecoder;
public class HtmlToPdfUtil {
    public static void topdf(String content,String path) throws DocumentException, FileNotFoundException {
        ITextRenderer renderer = new ITextRenderer();
        ITextFontResolver fontResolver = renderer.getFontResolver();
        try {
            //设置字体,否则不支持中文,在html中使用字体,html{ font-family: SimSun;}
            fontResolver.addFont(URLDecoder.decode(ResourceUtils.getURL("classpath:").getPath(),"utf-8")+"templates/simsun.ttc", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        renderer.getSharedContext().setReplacedElementFactory(new PdfBase64ImgReplacedElementFactory());
        renderer.getSharedContext().getTextRenderer().setSmoothingThreshold(0);
        renderer.setDocumentFromString(content);
        renderer.layout();
        renderer.createPDF(new FileOutputStream(new File(path)));
    }
}
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/util/PdfBase64ImgReplacedElementFactory.java
New file
@@ -0,0 +1,108 @@
package com.panzhihua.community_backstage.util;
import com.lowagie.text.BadElementException;
import com.lowagie.text.Image;
import com.sun.org.apache.xerces.internal.impl.dv.util.Base64;
import org.apache.batik.transcoder.TranscoderException;
import org.apache.batik.transcoder.TranscoderInput;
import org.apache.batik.transcoder.TranscoderOutput;
import org.apache.batik.transcoder.image.PNGTranscoder;
import org.w3c.dom.Element;
import org.xhtmlrenderer.extend.FSImage;
import org.xhtmlrenderer.extend.ReplacedElement;
import org.xhtmlrenderer.extend.ReplacedElementFactory;
import org.xhtmlrenderer.extend.UserAgentCallback;
import org.xhtmlrenderer.layout.LayoutContext;
import org.xhtmlrenderer.pdf.ITextFSImage;
import org.xhtmlrenderer.pdf.ITextImageElement;
import org.xhtmlrenderer.render.BlockBox;
import org.xhtmlrenderer.simple.extend.FormSubmissionListener;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
/**
 * @author zzj
 * 图片转换工具
 */
public class PdfBase64ImgReplacedElementFactory implements ReplacedElementFactory {
    /**
     * * 实现createReplacedElement 替换html中的Img标签
     * *
     * * @param c 上下文
     * * @param box 盒子
     * * @param uac 回调
     * * @param cssWidth css宽
     * * @param cssHeight css高
     * * @return ReplacedElement
     */
    @Override
    public ReplacedElement createReplacedElement(LayoutContext c, BlockBox box, UserAgentCallback uac, int cssWidth, int cssHeight) {
        // 遍历所有标签
        Element e = box.getElement();
        if (e == null) {
            return null;
        }
        String nodeName = e.getNodeName();
        // 找到所有img标签
        if (nodeName.equals("img")) {
            String attribute = e.getAttribute("src");
            FSImage fsImage;
            try {
                // 生成itext图像
                fsImage = buildImage(attribute, uac);
            } catch (BadElementException e1) {
                fsImage = null;
            } catch (IOException e1) {
                fsImage = null;
            }
            if (fsImage != null) {
                // 对图像进行缩放
                if (cssWidth != -1 || cssHeight != -1) {
                    fsImage.scale(cssWidth, cssHeight);
                }
                return new ITextImageElement(fsImage);
            }
        }
        return null;
    }
    /**
     * 编解码base64并生成itext图像
     */
    protected FSImage buildImage(String srcAttr, UserAgentCallback uac) throws IOException,
            BadElementException {
        FSImage fiImg = null;
        //图片的src要为src="data:image/jpg;base64,{图片的base64code}"这种base64格式
        if (srcAttr.toLowerCase().startsWith("data:image/")) {
            String base64Code = srcAttr.substring(srcAttr.indexOf("base64,") + "base64,".length(), srcAttr.length());
            PNGTranscoder t = new PNGTranscoder();
            TranscoderInput input = new TranscoderInput(BaseUtils.base64StrToInputStream(base64Code));
            ByteArrayOutputStream out = new ByteArrayOutputStream();
            TranscoderOutput output = new TranscoderOutput(out);
            try {
                t.transcode(input, output);
            } catch (TranscoderException e) {
                e.printStackTrace();
            }
            out.flush();
            fiImg = new ITextFSImage(Image.getInstance(out.toByteArray()));
        } else {
            fiImg = uac.getImageResource(srcAttr).getImage();
        }
        return fiImg;
    }
    @Override
    public void reset() {
    }
    @Override
    public void remove(Element arg0) {
    }
    @Override
    public void setFormSubmissionListener(FormSubmissionListener arg0) {
    }
}
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/resources/templates/forestFire.html
New file
@@ -0,0 +1,70 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>森林防火承诺书</title>
    <style>
        @page {
            size: 210mm 297mm;
            /*设置纸张大小:A4(210mm 297mm)、A3(297mm 420mm) 横向则反过来*/
            margin: 0.25in;
            padding: 1em;
            @top-center {
                content: element(header)
            }
        ;
        }
    </style>
    <style type="text/css">
        /* reset */
        * {
            padding: 0;
            margin: 0;
            font-family: 'SimSun';
            overflow: hidden;
        }
    </style>
</head>
<body>
<div style="height: 1040px;" th:each="reservePdfExportVO : ${reservePdfExportVOS}">
    <div style="text-align: center;font-size: 30px;">森林防火承诺书</div>
    <div style="display: flex;align-items: center;align-items: center;">
        <div style="font-size: 22px;padding: 30px;">
            <div style="text-indent:2em;line-height: 1.4;">保护森林资源、维护生态安全,是每个公民应尽的义务。为保证在我市林区范围内不发生森林火灾,我自愿做出如下承诺:
            </div>
            <div style="text-indent:2em;line-height: 1.4;">一、严格遵守森林防火法律法规及《禁火令》规定,文明祭祀,在祭祀过程不使用明火、不野外用火。</div>
            <div style="text-indent:2em;line-height: 1.4;">二、对家人和朋友进行防火知识宣传,提高大家防火意识。</div>
            <div style="text-indent:2em;line-height: 1.4;">
                三、保证做到“五负责”:即个人失火个人负责,学生失火家长负责,小孩失火大人负责,多人失火为首者负责,特殊人群(精神病人、痴呆等人群)失火监护人负责。</div>
            <div style="text-indent:2em;line-height: 1.4;">四、不携带任何火种进入林区,不在林区吸烟、烧烤、野炊。擅自在林区内野外用火的,接受200—3000元的罚款。
            </div>
            <div style="text-indent:2em;line-height: 1.4;">
                五、在森林防火区内个人拒绝森林防火检查或者接到森林火灾隐患整改通知书逾期不消除火灾隐患的,接受200元—2000元以下罚款。</div>
            <div style="text-indent:2em;line-height: 1.4;">六、造成森林火灾构成犯罪的,除接受赔偿损失、补种树木、罚款等行政处罚外,还要接受司法机关依法追究刑事责任。
            </div>
            <div style="text-indent:2em;line-height: 1.4;">七、一旦发现森林山火,及时报告防火办、社区或街办。</div>
            <div style="text-indent:2em;line-height: 1.4;margin-top: 30px;">森林防火电话:12119        5760171</div>
            <div style="text-indent:2em;line-height: 1.4;">社区电话:<span th:text="${reservePdfExportVO.communityPhone}"></span></div>
            <div style="padding-left: 350px;">
                <div style="width: 300px;margin-top: 10px;">
                    家庭住址:<span th:text="${reservePdfExportVO.address}"></span></div>
                <div style="width: 300px;margin-top: 10px;">承 诺 人:
                    <img style="width: 200px;" th:src="@{${reservePdfExportVO.sign}}" />
                </div>
                <div style="width: 300px;margin-top: 10px;" >联系电话:<span th:text="${reservePdfExportVO.phone}"></span></div>
                <div style="margin-top: 30px;text-align: right;">
                    <span style="margin-right: 100px;" th:text="${reservePdfExportVO.time}"></span>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/resources/templates/gasSafety.html
New file
@@ -0,0 +1,67 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>关于燃气安全使用的温馨提示</title>
    <style>
        @page {
            size: 210mm 297mm;
            /*设置纸张大小:A4(210mm 297mm)、A3(297mm 420mm) 横向则反过来*/
            margin: 0.25in;
            padding: 1em;
            @top-center {
                content: element(header)
            }
        ;
        }
    </style>
    <style type="text/css">
        /* reset */
        * {
            padding: 0;
            margin: 0;
            font-family: 'SimSun';
            overflow: hidden;
        }
    </style>
</head>
<body>
<div style="padding-top: 0px; height:1040px; " th:each="reservePdfExportVO : ${reservePdfExportVOS}">
    <div style="text-align: center;font-size: 30px;">关于燃气安全使用的温馨提示</div>
    <div style="display: flex;align-items: center;align-items: center;">
        <div style="font-size: 20px;padding: 30px;">
            <div>各位燃气用户:</div>
            <div style="text-indent:2em;line-height: 1.4;">为了您和社会公众的生命财产安全,在此温馨提示您要关注燃气安全:</div>
            <div style="text-indent:2em;line-height: 1.4;">
                1.应选购符合国家标准、带有安全熄火保护装置的燃气灶具,使用时人不能远离,使用后应关好灶具开关、灶前阀,防止泄漏。燃气具过期应及时更换。切勿使用节能罩。</div>
            <div style="text-indent:2em;line-height: 1.4;">
                2.燃气胶管应每18个月更换一次,要经常检查是否存在老化、开裂、鼠咬及连接处是否用卡子固定,建议选用使用寿命长的金属波纹管。</div>
            <div style="text-indent:2em;line-height: 1.4;">3.应根据气源类型选用并正确安装燃气报警器,报警器宜选择靠近燃气表或燃气管道接点的位置安放。</div>
            <div style="text-indent:2em;line-height: 1.4;">4.燃气用户不得擅自安装、改装、拆除燃气管道、阀门等户内燃气设施和燃气计量装置。</div>
            <div style="text-indent:2em;line-height: 1.4;">5.不可将设有燃气管道、燃气具的房间改成卧室、客厅和卫生间,长时间用气要注意通风换气。</div>
            <div style="text-indent:2em;line-height: 1.4;">6.发现异味要立即开窗,远离现场拨打服务电话报修。切勿触碰各类电器开关或携带火种进入室内。</div>
            <div style="text-indent:2em;line-height: 1.4;">
                7.燃气热水器应安装在厨房或阳台,严禁安装在卫生间、浴室、餐厅、客厅、卧室等其他空间,并规范安装烟道。严禁选用直排式热水器。</div>
            <div style="text-indent:2em;line-height: 1.4;">
                燃气安全关乎千家万户,居家安全,从燃气安全开始!为了您和家人的幸福,请您正确使用燃气,及时排查隐患,共同营造幸福家园。
            </div>
            <div style="margin-top: 110px;text-align: right;">
                地址:<span style="margin-right: 100px;" th:text="${reservePdfExportVO.address}"></span>
            </div>
            <div style="margin-top: 30px;margin-left: 450px;"><div>被提醒人:</div><img style="width: 200px;"
                                                                                    th:src="@{${reservePdfExportVO.sign}}" /></div>
            <div style="margin-top: 30px;text-align: right;">
                <span style="margin-right: 100px;" th:text="${reservePdfExportVO.time}"></span>
            </div>
        </div>
    </div>
</div>
</body>
</html>
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/resources/templates/simsun.ttc
Binary files differ
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComActReserveApi.java
@@ -315,6 +315,16 @@
        return comActReserveAnswerContentService.registerDetailedListAdmin(detailedAdminDTO);
    }
    /**
     * 导出登记明细列表
     * @param detailedAdminDTO  请求参数
     * @return  登记明细列表
     */
    @PostMapping("/admin/register/detailed/list/export")
    public R registerDetailedListAdminExport(@RequestBody PageReserveRegisterDetailedAdminDTO detailedAdminDTO){
        return comActReserveAnswerContentService.registerDetailedListAdminExport(detailedAdminDTO);
    }
    @GetMapping("/admin/register/detailed/detail")
    public R registerDetailedDetailAdmin(@RequestParam("reserveRecordId") Long reserveRecordId){
        return comActReserveRecordService.registerDetailedDetailAdmin(reserveRecordId);
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActReserveAnswerContentMapper.java
@@ -36,6 +36,13 @@
     * @return  某预约登记记录列表
     */
    IPage<ComActReserveRegisterDetailedVO> pageRegisterDetailedListAdmin(Page page, @Param("detailedAdminDTO") PageReserveRegisterDetailedAdminDTO detailedAdminDTO);
    /**
     * 查询用户填写某预约登记记录列表
     * @param detailedAdminDTO  请求参数
     * @return  某预约登记记录列表
     */
    List<ComActReserveRegisterDetailedVO> pageRegisterDetailedListAdminExport(@Param("detailedAdminDTO") PageReserveRegisterDetailedAdminDTO detailedAdminDTO);
    /**
     * 导出某预约登记记录列表
     * @param detailedAdminDTO  请求参数
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActReserveMapper.java
@@ -123,4 +123,11 @@
     * @return
     */
    List<IndexReserveSub> IndexHomeQuarantineSub(@Param("communityId") Long communityId);
    /**
     * reserveId查询社区电话
     * @param reserveId
     * @return
     */
    String selectCommunityPhoneByReserveId(@Param("reserveId")Long reserveId);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActReserveAnswerContentService.java
@@ -27,6 +27,13 @@
    R registerDetailedListAdmin(PageReserveRegisterDetailedAdminDTO detailedAdminDTO);
    /**
     * 导出登记明细列表
     * @param detailedAdminDTO  请求参数
     * @return  登记明细列表
     */
    R registerDetailedListAdminExport(PageReserveRegisterDetailedAdminDTO detailedAdminDTO);
    /**
     * 分页查询居家隔离统计
     * @param detailedAdminDTO
     * @return
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActReserveAnswerContentServiceImpl.java
@@ -13,7 +13,8 @@
import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStaticsReserve;
import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStaticsReserveMonth;
import com.panzhihua.common.model.vos.community.reserve.HomeQuarantineRegisterExportVO;
import com.panzhihua.common.model.vos.community.reserve.*;
import com.panzhihua.service_community.dao.ComActReserveMapper;
import com.panzhihua.service_community.dao.ComActReserveRecordMapper;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
@@ -53,6 +54,8 @@
    private ComActReserveSubMapper comActReserveSubMapper;
    @Resource
    private ComActReserveRecordMapper comActReserveRecordMapper;
    @Resource
    private ComActReserveMapper comActReserveMapper;
    /**
     * 导出登记明细数据
@@ -127,6 +130,34 @@
        return R.ok(resultPage);
    }
    @Override
    public R registerDetailedListAdminExport(PageReserveRegisterDetailedAdminDTO detailedAdminDTO) {
        String communityPhone=comActReserveMapper.selectCommunityPhoneByReserveId(detailedAdminDTO.getReserveId());
        List<ComActReserveRegisterDetailedVO> comActReserveRegisterDetailedVOS = this.baseMapper.pageRegisterDetailedListAdminExport(detailedAdminDTO);
        if(!comActReserveRegisterDetailedVOS.isEmpty()){
            List<ReservePdfExportVO> reservePdfExportVOS=new ArrayList<>();
            comActReserveRegisterDetailedVOS.forEach(comActReserveRegisterDetailedVO -> {
                List<ComActReserveRegisterDetailedAnswerVO> registerDetailedAnswerList = this.baseMapper.getRegisterDetailedAnswerList(comActReserveRegisterDetailedVO.getId());
                if(!registerDetailedAnswerList.isEmpty()){
                    ReservePdfExportVO reservePdfExportVO=new ReservePdfExportVO();
                    reservePdfExportVO.setAddress(registerDetailedAnswerList.get(0).getAnswerContent());
                    reservePdfExportVO.setSign(registerDetailedAnswerList.get(1).getAnswerContent());
                    if(detailedAdminDTO.getPdfType()==1){
                        reservePdfExportVO.setTime(registerDetailedAnswerList.get(2).getAnswerContent());
                    }
                    if(detailedAdminDTO.getPdfType()==2){
                        reservePdfExportVO.setPhone(registerDetailedAnswerList.get(2).getAnswerContent());
                        reservePdfExportVO.setTime(registerDetailedAnswerList.get(3).getAnswerContent());
                        reservePdfExportVO.setCommunityPhone(communityPhone);
                    }
                    reservePdfExportVOS.add(reservePdfExportVO);
                }
            });
            return R.ok(reservePdfExportVOS);
        }
        return R.ok();
    }
    /**
     * 分页查询居家隔离统计
     * @param detailedAdminDTO
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActReserveAnswerContentMapper.xml
@@ -67,6 +67,36 @@
        group by carr.id order by carr.id desc
    </select>
    <select id="pageRegisterDetailedListAdminExport" parameterType="com.panzhihua.common.model.dtos.community.reserve.PageReserveRegisterDetailedAdminDTO"
            resultType="com.panzhihua.common.model.vos.community.reserve.ComActReserveRegisterDetailedVO">
        SELECT
        carr.id,
        su.nick_name,
        carr.create_at
        FROM
        com_act_reserve_record AS carr
        LEFT JOIN sys_user AS su ON su.user_id = carr.user_id
        left join com_act_reserve_answer_content carac on carr.id=carac.reserve_record_id
        WHERE
        reserve_id = #{detailedAdminDTO.reserveId}
        <if test='detailedAdminDTO.startTime != null and detailedAdminDTO.startTime != &quot;&quot;'>
            AND carr.create_at <![CDATA[ >= ]]> #{detailedAdminDTO.startTime}
        </if>
        <if test='detailedAdminDTO.endTime != null and detailedAdminDTO.endTime != &quot;&quot;'>
            AND carr.create_at <![CDATA[ <= ]]> #{detailedAdminDTO.endTime}
        </if>
        <if test='detailedAdminDTO.beginTime != null and detailedAdminDTO.beginTime != &quot;&quot;'>
            AND STR_TO_DATE(carac.answer_content,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{detailedAdminDTO.beginTime}
        </if>
        <if test='detailedAdminDTO.stopTime != null and detailedAdminDTO.stopTime != &quot;&quot;'>
            AND STR_TO_DATE(carac.answer_content,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{detailedAdminDTO.stopTime}
        </if>
        <if test="detailedAdminDTO.keyword!=null and detailedAdminDTO.keyword != &quot;&quot;">
            AND carac.answer_content like concat ('%',#{detailedAdminDTO.keyword},'%')
        </if>
        group by carr.id order by carr.id desc
    </select>
    <select id="getRegisterDetailedAnswerList" resultType="com.panzhihua.common.model.vos.community.reserve.ComActReserveRegisterDetailedAnswerVO">
        SELECT
            car.content as reserveSubContent, carac.answer_content as answerContent,carac.reserve_sub_id as reserveSubId,car.`type`
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActReserveMapper.xml
@@ -225,4 +225,8 @@
                                                                                        LEFT JOIN com_act_reserve_answer_content t2 on t1.id = t2.reserve_sub_id
                                             where t.community_id = ${communityId} and t.title like '%居家隔离%' and t1.`key` in (12,14,16) and t2.answer_content = '是' group by t1.key) b on a.key = b.key
    </select>
    <select id="selectCommunityPhoneByReserveId" resultType="string">
        select contacts_phone from com_act_reserve t left join com_act t1 on t.community_id = t1.community_id where t.id = #{reserveId}
    </select>
</mapper>