Browse Source

表单数据

hongchuangyanfa 2 years ago
parent
commit
106342d9e4

+ 34 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/dto/TableFileDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.manager.dto;
+
+import org.springblade.manager.entity.TableFile;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 表单附件信息数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2022-08-02
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class TableFileDTO extends TableFile {
+	private static final long serialVersionUID = 1L;
+
+}

+ 87 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/TableFile.java

@@ -0,0 +1,87 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.manager.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.springblade.core.mp.base.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 表单附件信息实体类
+ *
+ * @author BladeX
+ * @since 2022-08-02
+ */
+@Data
+@TableName("m_table_file")
+@ApiModel(value = "表单附件信息表", description = "表单附件信息表")
+public class TableFile implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	@JsonSerialize(using = ToStringSerializer.class)
+	@ApiModelProperty(value = "主键")
+	@TableId(value = "id", type = IdType.ASSIGN_ID)
+	private Long id;
+	/**
+	* 表单Id
+	*/
+		private String tabId;
+	/**
+	* 附件路径
+	*/
+		private String domainUrl;
+	/**
+	* 附件名称
+	*/
+		private String name;
+	/**
+	* 附件拓展名
+	*/
+		private String extension;
+	/**
+	* 1 表示表单 2表示附件
+	*/
+		private Integer type;
+	/**
+	* 附件pdf路径
+	*/
+		private String domainPdfUrl;
+
+	/**
+	 * 状态
+	 */
+		private String status;
+
+	/**
+	 * 是否已删除
+	 */
+	@TableLogic
+	@ApiModelProperty(value = "是否已删除")
+	private Integer isDeleted;
+
+}

+ 35 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/TableFileVO.java

@@ -0,0 +1,35 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.manager.vo;
+
+import org.springblade.manager.entity.TableFile;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 表单附件信息视图实体类
+ *
+ * @author BladeX
+ * @since 2022-08-02
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class TableFileVO extends TableFile {
+	private static final long serialVersionUID = 1L;
+
+
+}

+ 72 - 15
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ExcelTabController.java

@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import com.itextpdf.html2pdf.ConverterProperties;
+import com.itextpdf.html2pdf.HtmlConverter;
 import com.itextpdf.html2pdf.resolver.font.DefaultFontProvider;
 import com.itextpdf.io.font.FontProgram;
 import com.itextpdf.io.font.FontProgramFactory;
@@ -40,7 +41,10 @@ import org.springblade.manager.mapper.WbsTreePrivateMapper;
 import org.springblade.manager.service.*;
 import org.springblade.manager.vo.*;
 import org.springblade.manager.wrapper.ExcelTabWrapper;
+import org.springblade.resource.feign.CommonFileClient;
 import org.springblade.resource.feign.IOSSClient;
+import org.springblade.resource.feign.NewIOSSClient;
+import org.springblade.resource.vo.NewBladeFile;
 import org.springframework.jdbc.core.JdbcTemplate;
 import org.springframework.web.bind.annotation.*;
 import org.springblade.core.mp.support.Query;
@@ -52,10 +56,7 @@ import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
@@ -80,6 +81,8 @@ public class ExcelTabController extends BladeController {
 
     private final IOSSClient iossClient;
 
+    private final NewIOSSClient newIOSSClient;
+
     // 私有项目wbs
     private final IWbsTreePrivateService wbsTreePrivateService;
 
@@ -99,6 +102,12 @@ public class ExcelTabController extends BladeController {
     //客户端资料查询接口
     private final InformationQueryClient informationQueryClient;
 
+    // 表单附件信息
+    private final ITableFileService tableFileService;
+
+    // pdf转换
+    private final CommonFileClient commonFileClient;
+
     /**
      * 详情
      */
@@ -286,14 +295,17 @@ public class ExcelTabController extends BladeController {
             @ApiImplicitParam(name = "wbsType", value = "type", required = true)
     })
     public R<List<WbsTreeVO>> getLazyTreeById(String wbsId, Long parentId, BladeUser bladeUser, Integer wbsType) {
-        if(wbsType==1){
+        if(wbsType==1){ // 共有
             List<WbsTreeVO> tree = excelTabService.lazyTree(wbsId, Func.toStrWithEmpty(null, bladeUser.getTenantId()), parentId);
             if (tree != null && tree.size() > 0) {
                 return R.data(tree);
             }
         }
-        if(wbsType==2){
-
+        if(wbsType==2){ // 私有项目wbs 树
+            List<WbsTreeVO> tree = excelTabService.lazyTree(wbsId, Func.toStrWithEmpty(null, bladeUser.getTenantId()), parentId);
+            if (tree != null && tree.size() > 0) {
+                return R.data(tree);
+            }
         }
 
         return R.fail(200, "未查询到信息");
@@ -1033,7 +1045,7 @@ public class ExcelTabController extends BladeController {
         String querySql = "select * from "+wbsTreeContract.getInitTableName()+" where p_key_id="+pkeyId ;
         List<Map<String, Object>> dataIn = jdbcTemplate.queryForList(querySql);
 
-        if(dataIn==null){
+        if(dataIn==null||dataIn.size()<=0){
             return R.fail("请填写数据!");
         }
         Map<String, Object> mysqlData = dataIn.get(0);
@@ -1084,7 +1096,7 @@ public class ExcelTabController extends BladeController {
     @ApiImplicitParams(value = {
             @ApiImplicitParam(name = "pkeyId", value = "pkeyId", required = true)
     })
-    public R getBussPdfInfo(Long pkeyId) throws FileNotFoundException {
+    public R getBussPdfInfo(Long pkeyId) throws IOException {
         String fontPath ="/Users/hongchuangyanfa/tool/simhei.ttf";
         ConverterProperties properties = creatBaseFont(fontPath);
         WbsTreeContract wbsTreeContract = wbsTreeContractService.getBaseMapper().selectOne(Wrappers.<WbsTreeContract>query().lambda()
@@ -1099,6 +1111,9 @@ public class ExcelTabController extends BladeController {
 
         String querySql = "select * from "+wbsTreeContract.getInitTableName()+" where p_key_id="+pkeyId ;
         List<Map<String, Object>> dataIn = jdbcTemplate.queryForList(querySql);
+        if(dataIn==null){
+            return R.fail("请填写数据!");
+        }
         Map<String, Object> mysqlData = dataIn.get(0);
 
         File file1 = ResourceUtil.getFile(wbsTreeContract.getHtmlUrl());
@@ -1141,12 +1156,15 @@ public class ExcelTabController extends BladeController {
         PageSize pageSize = new PageSize(795,842);
         pdf.setDefaultPageSize(pageSize);
 
+        HtmlConverter.convertToPdf(doc.html(),writer,properties);
+
+        BladeFile bladeFile = newIOSSClient.uploadFile(pkeyId + ".pdf", pdfPath);
         UpdateWrapper<WbsTreeContract> updateWrapper = new UpdateWrapper<>();
         updateWrapper.in("p_key_id",pkeyId);
-        updateWrapper.set("pdf_url",pdfPath);
+        updateWrapper.set("pdf_url",bladeFile.getLink());
 
         wbsTreeContractService.update(updateWrapper);
-        return R.data(pdfPath);
+        return R.data(bladeFile.getLink());
     }
 
 
@@ -1159,8 +1177,18 @@ public class ExcelTabController extends BladeController {
     public R copeBussTab(Long pkeyId) throws FileNotFoundException {
         WbsTreeContract wbsTreeContract = wbsTreeContractService.getBaseMapper().selectOne(Wrappers.<WbsTreeContract>query().lambda()
                 .eq(WbsTreeContract::getPKeyId, pkeyId));
-        long valStr = SnowFlakeUtil.getId();
-        wbsTreeContract.setPKeyId(pkeyId);
+        List<WbsTreeContract> wbsTreeContractList = wbsTreeContractService.getBaseMapper().selectList(Wrappers.<WbsTreeContract>query().lambda().eq(WbsTreeContract::getId,wbsTreeContract.getId()).eq(WbsTreeContract::getContractId,wbsTreeContract.getContractId()));
+        long newPkId = SnowFlakeUtil.getId();
+        Long  id = wbsTreeContract.getId();
+        wbsTreeContract.setPKeyId(newPkId);
+        wbsTreeContract.setCreateTime(new Date());
+        String deptName  = wbsTreeContract.getDeptName();
+        if(deptName.indexOf("__")>=0){
+            deptName = deptName.split("__")[0]+"__"+wbsTreeContractList.size();
+        }else{
+            deptName = deptName +"__"+wbsTreeContractList.size();
+        }
+        wbsTreeContract.setDeptName(deptName);
         wbsTreeContractService.save(wbsTreeContract);
         return R.data("成功");
     }
@@ -1181,11 +1209,40 @@ public class ExcelTabController extends BladeController {
             @ApiImplicitParam(name = "pkeyId", value = "pkeyId", required = true)
     })
     public R addBussFile(@RequestParam("file") MultipartFile file, Long pkeyId) {
-        // 删除excel文件
+
         R<BladeFile> bladeFile = iossClient.addFileInfo(file);
+        BladeFile bladeFile1 = bladeFile.getData();
+        TableFile tableFile = new TableFile();
+        String fileExtension = FileUtil.getFileExtension(bladeFile1.getName());
+        tableFile.setTabId(pkeyId+"");
+        tableFile.setName(file.getOriginalFilename());
+        tableFile.setType(2);
+        tableFile.setDomainUrl(bladeFile1.getLink());
+        tableFile.setIsDeleted(0);
+        tableFile.setExtension(fileExtension);
 
 
-        return R.data("成功!");
+        NewBladeFile newBladeFile = new NewBladeFile();
+        if(fileExtension.contains("xlsx")){
+            newBladeFile = this.commonFileClient.excelToPdf(file);
+
+        } else if(fileExtension.contains("xls")){
+            newBladeFile = this.commonFileClient.excelToPdf(file);
+
+        } else if(fileExtension.contains("docx")){
+            newBladeFile = this.commonFileClient.wordToPdf(file);
+
+        } else if(fileExtension.contains("png") || file.getOriginalFilename().contains("jpg")){
+            newBladeFile = this.commonFileClient.pngOrJpgToPdf(file);
+
+        } else if(fileExtension.contains("pdf")){
+            tableFile.setDomainPdfUrl(bladeFile1.getLink());
+        }
+        tableFile.setDomainPdfUrl(newBladeFile.getPdfUrl());
+        tableFile.setStatus("finished");
+        tableFileService.save(tableFile);
+
+        return R.data(tableFile.getId());
     }
 
     @GetMapping("/show-buss-tab")

+ 134 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/TableFileController.java

@@ -0,0 +1,134 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.manager.controller;
+
+import io.swagger.annotations.*;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springblade.manager.vo.TableFileVO;
+import org.springblade.manager.service.ITableFileService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+import java.util.List;
+
+/**
+ * 表单附件信息 控制器
+ *
+ * @author BladeX
+ * @since 2022-08-02
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/tablefile")
+@Api(value = "表单附件信息", tags = "表单附件信息接口")
+public class TableFileController extends BladeController {
+
+	private final ITableFileService tableFileService;
+/*
+	*//**
+	 * 详情
+	 *//*
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入tableFile")
+	public R<TableFile> detail(TableFile tableFile) {
+		TableFile detail = tableFileService.getOne(Condition.getQueryWrapper(tableFile));
+		return R.data(detail);
+	}
+
+	*//**
+	 * 分页 表单附件信息
+	 *//*
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入tableFile")
+	public R<IPage<TableFile>> list(TableFile tableFile, Query query) {
+		IPage<TableFile> pages = tableFileService.page(Condition.getPage(query), Condition.getQueryWrapper(tableFile));
+		return R.data(pages);
+	}
+
+	*//**
+	 * 自定义分页 表单附件信息
+	 *//*
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入tableFile")
+	public R<IPage<TableFileVO>> page(TableFileVO tableFile, Query query) {
+		IPage<TableFileVO> pages = tableFileService.selectTableFilePage(Condition.getPage(query), tableFile);
+		return R.data(pages);
+	}
+
+	*//**
+	 * 新增 表单附件信息
+	 *//*
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入tableFile")
+	public R save(@Valid @RequestBody TableFile tableFile) {
+		return R.status(tableFileService.save(tableFile));
+	}
+
+	*//**
+	 * 修改 表单附件信息
+	 *//*
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入tableFile")
+	public R update(@Valid @RequestBody TableFile tableFile) {
+		return R.status(tableFileService.updateById(tableFile));
+	}
+
+	*//**
+	 * 新增或修改 表单附件信息
+	 *//*
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入tableFile")
+	public R submit(@Valid @RequestBody TableFile tableFile) {
+		return R.status(tableFileService.saveOrUpdate(tableFile));
+	}
+
+	*/
+	/**
+	 * 删除 表单附件信息
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(tableFileService.removeByIds(Func.toLongList(ids)));
+	}
+
+	/**
+	 * 获取附件列表
+	 */
+	@GetMapping("/get-buss-fileList")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "获取附件列表", notes = "获取附件列表")
+	@ApiImplicitParams(value = {
+			@ApiImplicitParam(name = "pkeyid", value = "表单pkid", required = true)
+	})
+	public R getBussFileList(Long pkeyid) {
+		List<TableFileVO> fileVOList = tableFileService.selectTableFileList(pkeyid);
+		return R.data(fileVOList);
+	}
+}

+ 4 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ExcelTabMapper.java

@@ -59,4 +59,8 @@ public interface ExcelTabMapper extends BaseMapper<ExcelTab> {
 	List<WbsTreeVO> lazyTree(@Param("wbsId") String wbsId,
 							 @Param("tenantId") String tenantId,
 							 @Param("parentId") Long parentId);
+
+	List<WbsTreeVO> lazyTreeByPri(@Param("wbsId") String wbsId,
+							 @Param("tenantId") String tenantId,
+							 @Param("parentId") Long parentId);
 }

+ 29 - 5
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ExcelTabMapper.xml

@@ -93,11 +93,7 @@
                    and a.project_id = b.id
                    and b.is_deleted = 0
                  union ALL
-                 SELECT id, c.wbs_name, 1 as wbsType
-                 FROM m_wbs_info c
-                 where c.is_deleted = 0
-            UNION ALL
-                SELECT id,wbs_name, 1 as wbsType from m_wbs_info where is_deleted=0
+                 SELECT id, c.wbs_name, 1 as wbsType FROM m_wbs_info c  where c.is_deleted = 0
         )d where 1=1
         <if test="wbstype!=null and wbstype!=''">
             and d.wbsType = #{wbstype}
@@ -133,6 +129,34 @@
         ORDER BY dept.sort
     </select>
 
+    <select id="lazyTreeByPri" resultMap="treeNodeResultMap2">
+        SELECT
+        dept.type,
+        dept.table_type,
+        dept.id,
+        dept.is_link_table,
+        dept.parent_id,
+        dept.dept_name as deptName,
+        (
+        SELECT
+        CASE WHEN count(1) > 0 THEN 1 ELSE 0 END
+        FROM
+        m_wbs_tree
+        WHERE
+        parent_id = dept.id and is_deleted = 0 AND type = 1
+        ) AS "has_children"
+        FROM
+        m_wbs_tree_private dept
+        WHERE
+        dept.parent_id = #{parentId} AND dept.is_deleted = 0
+        <if test="tenantId!=null and tenantId!=''">
+            and dept.tenant_id = #{tenantId}
+        </if>
+        AND dept.project_id = #{wbsId}
+        /*        AND dept.type = 1
+        AND status = 1*/
+        ORDER BY dept.sort
+    </select>
 
     <select id="tabLazyTreeAll" resultMap="treeNodeResultMap" >
         SELECT

+ 44 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/TableFileMapper.java

@@ -0,0 +1,44 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.manager.mapper;
+
+import org.springblade.manager.entity.TableFile;
+import org.springblade.manager.vo.TableFileVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 表单附件信息 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2022-08-02
+ */
+public interface TableFileMapper extends BaseMapper<TableFile> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param tableFile
+	 * @return
+	 */
+	List<TableFileVO> selectTableFilePage(IPage page, TableFileVO tableFile);
+
+	List<TableFileVO> selectTableFileList(String pkid);
+
+}

+ 26 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/TableFileMapper.xml

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.manager.mapper.TableFileMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="tableFileResultMap" type="org.springblade.manager.entity.TableFile">
+        <result column="id" property="id"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="tab_id" property="tabId"/>
+        <result column="domain_url" property="domainUrl"/>
+        <result column="name" property="name"/>
+        <result column="extension" property="extension"/>
+        <result column="type" property="type"/>
+        <result column="domain_pdf_url" property="domainPdfUrl"/>
+    </resultMap>
+
+
+    <select id="selectTableFilePage" resultMap="tableFileResultMap">
+        select * from m_table_file where is_deleted = 0
+    </select>
+
+    <select id="selectTableFileList" resultMap="tableFileResultMap">
+        select * from m_table_file where is_deleted = 0 and tab_id =#{pkid}
+    </select>
+
+</mapper>

+ 5 - 5
blade-service/blade-manager/src/main/java/org/springblade/manager/service/IExcelTabService.java

@@ -64,14 +64,14 @@ public interface IExcelTabService extends BaseService<ExcelTab> {
 	List<ExcelTabWbsTypeVO> getWbsTypeList(Integer wbstype);
 
 	/**
-	 * 懒加载树形结构
-	 *
-	 * @param tenantId
-	 * @param parentId
-	 * @return
+	 * 懒加载 -- 公有web树
 	 */
 	List<WbsTreeVO> lazyTree(String wbsId, String tenantId, Long parentId);
 
 
+	/**
+	 * 懒加载 -- 私有项目 wbs 树
+	 */
+	List<WbsTreeVO> lazyTreeByPri(String wbsId, String tenantId, Long parentId);
 
 }

+ 46 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/service/ITableFileService.java

@@ -0,0 +1,46 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.manager.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.springblade.manager.entity.TableFile;
+import org.springblade.manager.vo.TableFileVO;
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.List;
+
+/**
+ * 表单附件信息 服务类
+ *
+ * @author BladeX
+ * @since 2022-08-02
+ */
+public interface ITableFileService extends IService<TableFile> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param tableFile
+	 * @return
+	 */
+	IPage<TableFileVO> selectTableFilePage(IPage<TableFileVO> page, TableFileVO tableFile);
+
+	List<TableFileVO> selectTableFileList(long pkid);
+
+}

+ 12 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java

@@ -75,4 +75,16 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
 		}
 		return ForestNodeMerger.merge(baseMapper.lazyTree(wbsId, tenantId, parentId));
 	}
+
+
+	/**
+	 * 私有项目 wbs 树
+	 */
+	@Override
+	public List<WbsTreeVO> lazyTreeByPri(String wbsId, String tenantId, Long parentId) {
+		if (AuthUtil.isAdministrator()) {
+			tenantId = StringPool.EMPTY;
+		}
+		return ForestNodeMerger.merge(baseMapper.lazyTreeByPri(wbsId, tenantId, parentId));
+	}
 }

+ 50 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/TableFileServiceImpl.java

@@ -0,0 +1,50 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.manager.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.manager.entity.TableFile;
+import org.springblade.manager.vo.TableFileVO;
+import org.springblade.manager.mapper.TableFileMapper;
+import org.springblade.manager.service.ITableFileService;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.List;
+
+/**
+ * 表单附件信息 服务实现类
+ *
+ * @author BladeX
+ * @since 2022-08-02
+ */
+@Service
+public class TableFileServiceImpl extends ServiceImpl<TableFileMapper, TableFile> implements ITableFileService {
+
+	@Override
+	public IPage<TableFileVO> selectTableFilePage(IPage<TableFileVO> page, TableFileVO tableFile) {
+		return page.setRecords(baseMapper.selectTableFilePage(page, tableFile));
+	}
+
+	@Override
+	public List<TableFileVO> selectTableFileList(long pkid) {
+
+		return baseMapper.selectTableFileList(pkid+"");
+	}
+
+}