• 企业级-pdf分页数据推送接收解析保存


    1、ArchiveFilesFrom

    
    package com.gwssi.archiv.entity;
    
    import java.util.List;
    
    /**
     * @program: market_admin
     * @ClassName ArchiveFilesFrom
     * @description:
     * @author: liubiao
     * @create: 2021-11-10 14:41
     **/
    public class ArchiveFilesFrom {
        private List<ElecFileItem> elecFileItemList;
    
    
        public List<ElecFileItem> getElecFileItemList() {
            return elecFileItemList;
        }
    
        public void setElecFileItemList(List<ElecFileItem> elecFileItemList) {
            this.elecFileItemList = elecFileItemList;
        }
    }
    
    

    2、submitArchiveFiles 接口

    @RequestMapping(value = "/submitArchiveFiles", method = RequestMethod.POST, produces = "application/json")
        @ResponseBody
        public String submitArchiveFiles(@RequestBody ArchiveFilesFrom archiveFilesFrom){
            if (archiveFilesFrom.getElecFileItemList() == null){
                return ResultUtil.paramsIsNull("电子文件材料不能为空");
            }
    
            try {
                return  archivElecFileService.saveArchiveFiles(archiveFilesFrom);
            }catch (Exception e){
                LOG.error("===》》》申请材料保存异常,业务号:{},异常信息:\n",archiveFilesFrom.getGid(), e);
                return ResultUtil.sysException();
            }
        }
    

    3、保存方法saveArchiveFiles

    /**
         * 申请材料接收
         *
         * @param archiveFilesFrom
         * @return
         */
        public String saveArchiveFiles(ArchiveFilesFrom archiveFilesFrom) {
            IEntityDao entityDao = DaoManager.getEntityDao();
            IBaseDao baseDao = TorchDaoManager.getDao();
            String gid = archiveFilesFrom.getGid();
            //防止数据重复,每次先删除
            baseDao.exeSQL("delete from archiv_elec_file where gid=? ", gid);
            List<ElecFileItem> elecFileItemList = archiveFilesFrom.getElecFileItemList();
            for (ElecFileItem e : elecFileItemList) {
                List<InnerfileItem> innerfileItemList = e.getInnerfileItemList();
                ArchivElecFileBo bo = new ArchivElecFileBo();
                String uuid = UUIDUtil.getUUID();
                bo.setId(uuid);
                bo.setGid(gid);
                bo.setElecfileid(e.getElecFileID());
                bo.setElecfilename(e.getElecFileName());
                bo.setElecfilesavepath(e.getElecFileSavePath());
                bo.setElecfiletype(e.getElecFileType());
                bo.setTimestamp(new Date());
                entityDao.insert(bo);
                for (InnerfileItem in : innerfileItemList) {
                    ArchivElecFileBo bo2 = new ArchivElecFileBo();
                    bo2.setId(UUIDUtil.getUUID());
                    bo2.setGid(gid);
                    bo2.setParentid(uuid);
                    bo2.setElecfileid(e.getElecFileID());
                    bo2.setElecfilename(e.getElecFileName());
                    bo2.setElecfilesavepath(e.getElecFileSavePath());
                    bo2.setElecfiletype(e.getElecFileType());
                    bo2.setInnerfiletitle(in.getInnerfileTitle());
                    bo2.setBeginpagenum(in.getBeginPageNum());
                    bo2.setEndpagenum(in.getEndPageNum());
                    bo2.setTimestamp(new Date());
                    entityDao.insert(bo2);
                }
            }
            LOG.info("横琴准入接收网办申请材料成功!,业务号:{}", archiveFilesFrom.getGid());
            return ResultUtil.returnResult("200", "成功", null);
        }
    
    

    4、数据表archiv_elec_file

    create table archiv_elec_file
    (
        ID               varchar(40)   not null
            primary key,
        GID              varchar(40)   not null,
        ElecFileID       varchar(40)   null,
        ElecFileName     varchar(200)  not null,
        ElecFileSavePath varchar(1000) null,
        ElecFileType     varchar(20)   null,
        ParentId         varchar(40)   null,
        InnerfileTitle   varchar(200)  null,
        BeginPageNum     int           null,
        EndPageNum       int           null,
        Timestamp        timestamp     null
    );
    
    create index archiv_elec_file_GID_index
        on archiv_elec_file (GID);
    
    
  • 相关阅读:
    算法基础入门 - 2.栈、队列、链表
    项目进展跟踪的5个基本原则
    Python函数进阶:探索高级函数特性与技巧
    Sharding-JDBC
    避免使用违规词,企业新媒体营销应注重品牌形象维护
    MindSpore自定义算子中的张量维度问题
    unity设计模式——代理模式
    2183440-36-8,APN-C3-PEG4-alkyne 性能稳定功能连接体
    从Endnote导入Zotero(含PDF)
    【SpringBoot系列】Arthas配合docker轻松实现线上热更新
  • 原文地址:https://blog.csdn.net/F15217283411/article/details/139740263