Browse Source

- 除AI部分,其余基本完成

Huanyi 2 months ago
parent
commit
8a5ee84e20
19 changed files with 214 additions and 23 deletions
  1. 1 1
      pom.xml
  2. 4 4
      ruoyi-admin/src/main/resources/application-prod.yml
  3. 2 2
      ruoyi-admin/src/main/resources/application.yml
  4. 5 2
      ruoyi-common/ruoyi-common-mybatis/src/main/java/com/yingpaipay/common/mabatis/utils/WrapperUtils.java
  5. 4 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysUserServiceImpl.java
  6. 34 0
      ruoyi-modules/yingpaipay-business/src/main/java/com/yingpaipay/business/controller/DashboardController.java
  7. 13 0
      ruoyi-modules/yingpaipay-business/src/main/java/com/yingpaipay/business/controller/DocumentQcTaskLogController.java
  8. 3 0
      ruoyi-modules/yingpaipay-business/src/main/java/com/yingpaipay/business/domain/DocumentQcTaskLog.java
  9. 17 0
      ruoyi-modules/yingpaipay-business/src/main/java/com/yingpaipay/business/domain/bo/DocumentQcTaskLogListOnDetailBo.java
  10. 6 0
      ruoyi-modules/yingpaipay-business/src/main/java/com/yingpaipay/business/domain/vo/DocumentQcTaskLogVo.java
  11. 3 0
      ruoyi-modules/yingpaipay-business/src/main/java/com/yingpaipay/business/domain/vo/DocumentVo.java
  12. 24 0
      ruoyi-modules/yingpaipay-business/src/main/java/com/yingpaipay/business/domain/vo/OverviewVo.java
  13. 2 0
      ruoyi-modules/yingpaipay-business/src/main/java/com/yingpaipay/business/service/IDocumentQcTaskLogService.java
  14. 2 0
      ruoyi-modules/yingpaipay-business/src/main/java/com/yingpaipay/business/service/IDocumentService.java
  15. 14 0
      ruoyi-modules/yingpaipay-business/src/main/java/com/yingpaipay/business/service/impl/CommonProjectService.java
  16. 2 0
      ruoyi-modules/yingpaipay-business/src/main/java/com/yingpaipay/business/service/impl/DocumentQcTaskDetailServiceImpl.java
  17. 32 5
      ruoyi-modules/yingpaipay-business/src/main/java/com/yingpaipay/business/service/impl/DocumentQcTaskLogServiceImpl.java
  18. 40 7
      ruoyi-modules/yingpaipay-business/src/main/java/com/yingpaipay/business/service/impl/DocumentServiceImpl.java
  19. 6 2
      ruoyi-modules/yingpaipay-business/src/main/java/com/yingpaipay/business/service/impl/ProjectServiceImpl.java

+ 1 - 1
pom.xml

@@ -13,7 +13,7 @@
         <spring-boot.version>3.5.7</spring-boot.version>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
-        <java.version>21</java.version>
+        <java.version>17</java.version>
         <mybatis.version>3.5.16</mybatis.version>
         <springdoc.version>2.8.13</springdoc.version>
         <therapi-javadoc.version>0.15.0</therapi-javadoc.version>

+ 4 - 4
ruoyi-admin/src/main/resources/application-prod.yml

@@ -5,7 +5,7 @@ spring.servlet.multipart.location: /ruoyi/server/temp
 spring.boot.admin.client:
     # 增加客户端开关
     enabled: false
-    url: http://localhost:9090/admin
+    url: http://{客户服务器}:9090/admin
     instance:
         service-host-type: IP
         metadata:
@@ -18,11 +18,11 @@ spring.boot.admin.client:
 snail-job:
     enabled: false
     # 需要在 SnailJob 后台组管理创建对应名称的组,然后创建任务的时候选择对应的组,才能正确分派任务
-    group: "ruoyi_group"
+    group: "yingpaipay_group"
     # SnailJob 接入验证令牌 详见 script/sql/ry_job.sql `sj_group_config`表
     token: "SJ_cKqBTPzCsWA3VyuCfFoccmuIEGXjr5KT"
     server:
-        host: 127.0.0.1
+        host: {客户服务器}
         port: 17888
     # 命名空间UUID 详见 script/sql/ry_job.sql `sj_namespace`表`unique_id`字段
     namespace: ${spring.profiles.active}
@@ -52,7 +52,7 @@ spring:
                     # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
                     url: jdbc:mysql://127.0.0.1:3306/intelligent_etmf_system?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
                     username: root
-                    password: {客户密码}
+                    password: IntelligentEtmfSystem
             #        # 从库数据源
             #        slave:
             #          lazy: true

+ 2 - 2
ruoyi-admin/src/main/resources/application.yml

@@ -44,7 +44,7 @@ spring:
     threads:
         # 开启虚拟线程 仅jdk21可用
         virtual:
-            enabled: true
+            enabled: false
     task:
         execution:
             # 从 springboot 3.5 开始 spring自带线程池
@@ -90,7 +90,7 @@ sa-token:
     # token名称 (同时也是cookie名称)
     token-name: Authorization
     # 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
-    is-concurrent: true
+    is-concurrent: false
     # 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
     is-share: false
     # jwt秘钥

+ 5 - 2
ruoyi-common/ruoyi-common-mybatis/src/main/java/com/yingpaipay/common/mabatis/utils/WrapperUtils.java

@@ -4,11 +4,14 @@ import java.util.List;
 
 public class WrapperUtils {
 
+    public static final List<Long> EMPTY = List.of(-1L);
+
     /**
-     * {@code IN} 和 {@code NOT IN} 不能使用空集合
+     * {@code IN} 和 {@code NOT IN} 不能使用空集合<br>
+     * 当输入不存在的文本时,查处的{@code ids}为空,此时需要使用一个不存在的{@code id}来限制其不要查询到任何数据
      */
     public static List<Long> convertIds(List<Long> ids) {
-        return ids.isEmpty() ? List.of(-1L) : ids;
+        return ids.isEmpty() ? EMPTY : ids;
     }
 
 }

+ 4 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysUserServiceImpl.java

@@ -615,6 +615,10 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
         userRoleMapper.delete(new LambdaQueryWrapper<SysUserRole>().in(SysUserRole::getUserId, ids));
         // 删除用户与岗位表
         userPostMapper.delete(new LambdaQueryWrapper<SysUserPost>().in(SysUserPost::getUserId, ids));
+        // 删除用户与项目关联
+        userProjectsMapper.delete(new LambdaQueryWrapper<>(SysUserProjects.class).in(SysUserProjects::getUserId, ids));
+        // 删除用户与文件夹关联
+        userFoldersMapper.delete(new LambdaQueryWrapper<>(SysUserFolders.class).in(SysUserFolders::getUserId, ids));
         // 防止更新失败导致的数据删除
         int flag = baseMapper.deleteByIds(ids);
         if (flag < 1) {

+ 34 - 0
ruoyi-modules/yingpaipay-business/src/main/java/com/yingpaipay/business/controller/DashboardController.java

@@ -3,6 +3,7 @@ package com.yingpaipay.business.controller;
 import cn.dev33.satoken.annotation.SaCheckPermission;
 import com.yingpaipay.business.domain.Document;
 import com.yingpaipay.business.domain.bo.ProjectListOnDashboardWorkbenchBo;
+import com.yingpaipay.business.domain.vo.OverviewVo;
 import com.yingpaipay.business.domain.vo.ProjectInDashboardWorkbenchVo;
 import com.yingpaipay.business.domain.vo.TaskTodoCountVo;
 import com.yingpaipay.business.enumeration.DocumentStatusEnum;
@@ -19,6 +20,7 @@ import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.Date;
 import java.util.List;
 
 @RestController
@@ -61,4 +63,36 @@ public class DashboardController extends BaseController {
         return R.ok(vo);
     }
 
+    @SaCheckPermission("home:dashboard:index")
+    @GetMapping("/overview")
+    public R<OverviewVo> overview() {
+        List<Document> documents = documentService.selectAll();
+        OverviewVo vo = new OverviewVo();
+        vo.setTotal((long) documents.size());
+        vo.setSubmitted(
+            documents.stream()
+                .filter(e -> e.getActualDocument() != null)
+                .count()
+        );
+        vo.setToSubmit(
+            documents.stream()
+                .filter(e -> e.getActualDocument() == null)
+                .count()
+        );
+        vo.setLateToSubmit(
+            documents.stream()
+                .filter(e -> e.getActualDocument() == null)
+                .filter(e -> e.getSubmitDeadline().before(new Date()))
+                .count()
+        );
+        vo.setLateSubmitted(
+            documents.stream()
+                .filter(e -> e.getActualDocument() != null)
+                .filter(e -> e.getSubmitDeadline() != null)
+                .filter(e -> e.getSubmitTime().after(e.getSubmitDeadline()))
+                .count()
+        );
+        return R.ok(vo);
+    }
+
 }

+ 13 - 0
ruoyi-modules/yingpaipay-business/src/main/java/com/yingpaipay/business/controller/DocumentQcTaskLogController.java

@@ -1,5 +1,7 @@
 package com.yingpaipay.business.controller;
 
+import cn.dev33.satoken.annotation.SaMode;
+import com.yingpaipay.business.domain.bo.DocumentQcTaskLogListOnDetailBo;
 import lombok.RequiredArgsConstructor;
 import cn.dev33.satoken.annotation.SaCheckPermission;
 import org.springframework.web.bind.annotation.*;
@@ -28,10 +30,21 @@ public class DocumentQcTaskLogController extends BaseController {
     /**
      * 查询文档质控日志列表
      */
+    @Deprecated
     @SaCheckPermission("qcTask:log:list")
     @GetMapping("/list")
     public TableDataInfo<DocumentQcTaskLogVo> list(DocumentQcTaskLogBo bo, PageQuery pageQuery) {
         return documentQcTaskLogService.queryPageList(bo, pageQuery);
     }
 
+    @SaCheckPermission(value = {
+        "qc:task:logAudit",
+        "taskCenter:qc:logAudit"
+    }, mode = SaMode.OR)
+    @GetMapping("/listOnDetail")
+    public TableDataInfo<DocumentQcTaskLogVo> listOnDetail(DocumentQcTaskLogListOnDetailBo bo, PageQuery pageQuery) {
+        return documentQcTaskLogService.listOnDetail(bo, pageQuery);
+    }
+
+
 }

+ 3 - 0
ruoyi-modules/yingpaipay-business/src/main/java/com/yingpaipay/business/domain/DocumentQcTaskLog.java

@@ -90,5 +90,8 @@ public class DocumentQcTaskLog extends TenantEntity {
     @TableLogic
     private String delFlag;
 
+    private Long qcVersion;
+
+    private Long dealVersion;
 
 }

+ 17 - 0
ruoyi-modules/yingpaipay-business/src/main/java/com/yingpaipay/business/domain/bo/DocumentQcTaskLogListOnDetailBo.java

@@ -0,0 +1,17 @@
+package com.yingpaipay.business.domain.bo;
+
+import lombok.Data;
+
+import java.util.HashMap;
+import java.util.Map;
+
+@Data
+public class DocumentQcTaskLogListOnDetailBo {
+
+    private Long detailId;
+
+    private Integer result;
+
+    private Map<String, Object> params = new HashMap<>();
+
+}

+ 6 - 0
ruoyi-modules/yingpaipay-business/src/main/java/com/yingpaipay/business/domain/vo/DocumentQcTaskLogVo.java

@@ -113,4 +113,10 @@ public class DocumentQcTaskLogVo implements Serializable {
      */
     private Date updateTime;
 
+    @Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "qcVersion")
+    private Long qcVersion;
+
+    @Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "dealVersion")
+    private Long dealVersion;
+
 }

+ 3 - 0
ruoyi-modules/yingpaipay-business/src/main/java/com/yingpaipay/business/domain/vo/DocumentVo.java

@@ -102,4 +102,7 @@ public class DocumentVo implements Serializable {
     private Long planSubmitter;
 
     private Long createBy;
+
+    private String projectName;
+    private Long projectId;
 }

+ 24 - 0
ruoyi-modules/yingpaipay-business/src/main/java/com/yingpaipay/business/domain/vo/OverviewVo.java

@@ -0,0 +1,24 @@
+package com.yingpaipay.business.domain.vo;
+
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+@Data
+public class OverviewVo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    private Long total;
+
+    private Long submitted;
+
+    private Long toSubmit;
+
+    private Long lateToSubmit;
+
+    private Long lateSubmitted;
+
+}

+ 2 - 0
ruoyi-modules/yingpaipay-business/src/main/java/com/yingpaipay/business/service/IDocumentQcTaskLogService.java

@@ -1,5 +1,6 @@
 package com.yingpaipay.business.service;
 
+import com.yingpaipay.business.domain.bo.DocumentQcTaskLogListOnDetailBo;
 import com.yingpaipay.business.domain.vo.DocumentQcTaskLogVo;
 import com.yingpaipay.business.domain.bo.DocumentQcTaskLogBo;
 import org.dromara.common.mybatis.core.page.TableDataInfo;
@@ -25,4 +26,5 @@ public interface IDocumentQcTaskLogService {
      */
     TableDataInfo<DocumentQcTaskLogVo> queryPageList(DocumentQcTaskLogBo bo, PageQuery pageQuery);
 
+    TableDataInfo<DocumentQcTaskLogVo> listOnDetail(DocumentQcTaskLogListOnDetailBo bo, PageQuery pageQuery);
 }

+ 2 - 0
ruoyi-modules/yingpaipay-business/src/main/java/com/yingpaipay/business/service/IDocumentService.java

@@ -125,4 +125,6 @@ public interface IDocumentService {
     List<Document> listOnWorkbench();
 
     TableDataInfo<ProjectMemberVo> getMembersByNameAndFolder(String name, Long folder, Long project, PageQuery pageQuery);
+
+    List<Document> selectAll();
 }

+ 14 - 0
ruoyi-modules/yingpaipay-business/src/main/java/com/yingpaipay/business/service/impl/CommonProjectService.java

@@ -115,4 +115,18 @@ public class CommonProjectService {
                 .notIn(Project::getStatus, List.of(ProjectStatusEnum.UNPLAYED.getValue(), ProjectStatusEnum.PAUSED.getValue(), ProjectStatusEnum.FINISHED.getValue()))
         );
     }
+
+    public List<Project> queryAll() {
+        String projects = userProjectsMapper.selectOne(
+            Wrappers.lambdaQuery(SysUserProjects.class)
+                .eq(SysUserProjects::getUserId, LoginHelper.getUserId())
+        ).getProjects();
+        if (projects.isEmpty()) {
+            return Collections.emptyList();
+        } else if (projects.equals("*")) {
+            return baseMapper.selectList();
+        } else {
+            return baseMapper.selectByIds(Arrays.stream(projects.split(",")).map(Long::valueOf).toList());
+        }
+    }
 }

+ 2 - 0
ruoyi-modules/yingpaipay-business/src/main/java/com/yingpaipay/business/service/impl/DocumentQcTaskDetailServiceImpl.java

@@ -184,6 +184,7 @@ public class DocumentQcTaskDetailServiceImpl implements IDocumentQcTaskDetailSer
         log.setDesignatedDealer(bo.getDesignatedDealer());
         log.setDeadline(bo.getDeadline());
         log.setTenantId(TenantHelper.getTenantId());
+        log.setQcVersion(document.getActualDocument());
 
         detail.setStatus(bo.getResult());
         detail.setNote(bo.getOpinion());
@@ -286,6 +287,7 @@ public class DocumentQcTaskDetailServiceImpl implements IDocumentQcTaskDetailSer
         detail.setStatus(DocumentQcStatusEnum.TO_AUDIT.getCode());
         log.setActualDealer(LoginHelper.getUserId());
         log.setDealTime(new Date());
+        log.setDealVersion(bo.getDocument());
         document.setStatus(DocumentStatusEnum.UN_QC.getValue());
         document.setActualDocument(bo.getDocument());
 

+ 32 - 5
ruoyi-modules/yingpaipay-business/src/main/java/com/yingpaipay/business/service/impl/DocumentQcTaskLogServiceImpl.java

@@ -1,5 +1,7 @@
 package com.yingpaipay.business.service.impl;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.yingpaipay.business.domain.bo.DocumentQcTaskLogListOnDetailBo;
 import org.dromara.common.core.utils.StringUtils;
 import org.dromara.common.mybatis.core.page.TableDataInfo;
 import org.dromara.common.mybatis.core.page.PageQuery;
@@ -44,6 +46,31 @@ public class DocumentQcTaskLogServiceImpl implements IDocumentQcTaskLogService {
         return TableDataInfo.build(result);
     }
 
+    @Override
+    public TableDataInfo<DocumentQcTaskLogVo> listOnDetail(DocumentQcTaskLogListOnDetailBo bo, PageQuery pageQuery) {
+        IPage<DocumentQcTaskLogVo> page = baseMapper.selectVoPage(pageQuery.build(), buildListOnDetailQueryWrapper(bo));
+        return TableDataInfo.build(page);
+    }
+
+    private LambdaQueryWrapper<DocumentQcTaskLog> buildListOnDetailQueryWrapper(DocumentQcTaskLogListOnDetailBo bo) {
+        Map<String, Object> params = bo.getParams();
+        return Wrappers.lambdaQuery(DocumentQcTaskLog.class)
+            .orderByDesc(DocumentQcTaskLog::getId)
+            .eq(bo.getDetailId() != null, DocumentQcTaskLog::getDetailId, bo.getDetailId())
+            .eq(bo.getResult() != null, DocumentQcTaskLog::getResult, bo.getResult())
+            .between(params.get("beginExecuteTime") != null && params.get("endExecuteTime") != null,
+                DocumentQcTaskLog::getExecuteTime, params.get("beginExecuteTime"), params.get("endExecuteTime"))
+            .between(params.get("beginDeadline") != null && params.get("endDeadline") != null,
+                DocumentQcTaskLog::getDeadline, params.get("beginDeadline"), params.get("endDeadline"))
+            .between(params.get("beginDealTime") != null && params.get("endDealTime") != null,
+                DocumentQcTaskLog::getDealTime, params.get("beginDealTime"), params.get("endDealTime"))
+            .between(params.get("beginCreateTime") != null && params.get("endCreateTime") != null,
+                DocumentQcTaskLog::getCreateTime, params.get("beginCreateTime"), params.get("endCreateTime"))
+            .between(params.get("beginUpdateTime") != null && params.get("endUpdateTime") != null,
+                DocumentQcTaskLog::getUpdateTime, params.get("beginUpdateTime"), params.get("endUpdateTime"))
+            ;
+    }
+
 
     private LambdaQueryWrapper<DocumentQcTaskLog> buildQueryWrapper(DocumentQcTaskLogBo bo) {
         Map<String, Object> params = bo.getParams();
@@ -53,21 +80,21 @@ public class DocumentQcTaskLogServiceImpl implements IDocumentQcTaskLogService {
         lqw.eq(bo.getDetailId() != null, DocumentQcTaskLog::getDetailId, bo.getDetailId());
         lqw.eq(bo.getExecutor() != null, DocumentQcTaskLog::getExecutor, bo.getExecutor());
         lqw.between(params.get("beginExecuteTime") != null && params.get("endExecuteTime") != null,
-            DocumentQcTaskLog::getExecuteTime ,params.get("beginExecuteTime"), params.get("endExecuteTime"));
+            DocumentQcTaskLog::getExecuteTime, params.get("beginExecuteTime"), params.get("endExecuteTime"));
         lqw.eq(bo.getResult() != null, DocumentQcTaskLog::getResult, bo.getResult());
         lqw.eq(StringUtils.isNotBlank(bo.getQuestionType()), DocumentQcTaskLog::getQuestionType, bo.getQuestionType());
         lqw.eq(bo.getDesignatedDealer() != null, DocumentQcTaskLog::getDesignatedDealer, bo.getDesignatedDealer());
         lqw.between(params.get("beginDeadline") != null && params.get("endDeadline") != null,
-            DocumentQcTaskLog::getDeadline ,params.get("beginDeadline"), params.get("endDeadline"));
+            DocumentQcTaskLog::getDeadline, params.get("beginDeadline"), params.get("endDeadline"));
         lqw.eq(bo.getActualDealer() != null, DocumentQcTaskLog::getActualDealer, bo.getActualDealer());
         lqw.between(params.get("beginDealTime") != null && params.get("endDealTime") != null,
-            DocumentQcTaskLog::getDealTime ,params.get("beginDealTime"), params.get("endDealTime"));
+            DocumentQcTaskLog::getDealTime, params.get("beginDealTime"), params.get("endDealTime"));
         lqw.eq(bo.getCreateBy() != null, DocumentQcTaskLog::getCreateBy, bo.getCreateBy());
         lqw.between(params.get("beginCreateTime") != null && params.get("endCreateTime") != null,
-            DocumentQcTaskLog::getCreateTime ,params.get("beginCreateTime"), params.get("endCreateTime"));
+            DocumentQcTaskLog::getCreateTime, params.get("beginCreateTime"), params.get("endCreateTime"));
         lqw.eq(bo.getUpdateBy() != null, DocumentQcTaskLog::getUpdateBy, bo.getUpdateBy());
         lqw.between(params.get("beginUpdateTime") != null && params.get("endUpdateTime") != null,
-            DocumentQcTaskLog::getUpdateTime ,params.get("beginUpdateTime"), params.get("endUpdateTime"));
+            DocumentQcTaskLog::getUpdateTime, params.get("beginUpdateTime"), params.get("endUpdateTime"));
         return lqw;
     }
 

+ 40 - 7
ruoyi-modules/yingpaipay-business/src/main/java/com/yingpaipay/business/service/impl/DocumentServiceImpl.java

@@ -130,17 +130,19 @@ public class DocumentServiceImpl implements IDocumentService {
     private void dealVo(List<DocumentVo> documents) {
         List<Long> ossIds = new ArrayList<>();
         Map<Long, SysOssVo> ossMap = new HashMap<>();
-        List<Long> folderIds = new ArrayList<>();
-        Map<Long, String> folderMap = new HashMap<>();
+        List<Long> projectIds = new ArrayList<>();
+        Map<Long, Project> projectMap = new HashMap<>();
+        Map<Long, Folder> folderMap = new HashMap<>();
         List<Long> userIds = new ArrayList<>();
         Map<Long, String> userMap = new HashMap<>();
         documents.forEach(e -> {
             ossIds.add(e.getActualDocument());
-            folderIds.add(e.getFolderId());
+            projectIds.add(e.getProjectId());
             userIds.add(e.getSubmitter());
             userIds.add(e.getPlanSubmitter());
         });
-        folderService.queryListByIds(folderIds).forEach(e -> folderMap.put(e.getId(), e.getName()));
+        projectService.queryByIds(projectIds).forEach(e -> projectMap.put(e.getId(), e));
+        folderService.queryByProjectIds(projectIds).forEach(e -> folderMap.put(e.getId(), e));
         ossService.queryListByIds(ossIds).forEach(e -> ossMap.put(e.getOssId(), e));
         userService.selectUserByIds(userIds).forEach(e -> userMap.put(e.getUserId(), e.getNickName()));
         documents.forEach(e -> {
@@ -150,8 +152,22 @@ public class DocumentServiceImpl implements IDocumentService {
             }
             e.setSubmitterName(userMap.get(e.getSubmitter()));
             e.setPlanSubmitterName(userMap.get(e.getPlanSubmitter()));
-            String folderName = folderMap.get(e.getFolderId());
-            e.setFolderName(StringUtils.isNotBlank(folderName) ? folderName : MessageUtils.message("search.temp"));
+            StringBuilder sb = new StringBuilder();
+            if (e.getFolderId() != 0L) {
+                Folder current = folderMap.get(e.getFolderId());
+                while (current != null) {
+                    sb.insert(0, current.getName()).insert(0, "/");
+                    if (current.getParentId() == null) {
+                        current = null;
+                    } else {
+                        current = folderMap.get(current.getParentId());
+                    }
+                }
+            } else {
+                sb.append(MessageUtils.message("search.temp"));
+            }
+            e.setFolderName(sb.toString());
+            e.setProjectName(projectMap.get(e.getProjectId()).getName());
         });
     }
 
@@ -298,6 +314,7 @@ public class DocumentServiceImpl implements IDocumentService {
                 )
         );
 
+        document.setSubmitter(LoginHelper.getUserId());
         document.setActualDocument(bo.getOssId());
         document.setSubmitTime(new Date());
         document.setEffectiveDate(bo.getEffectiveDate());
@@ -1179,6 +1196,22 @@ public class DocumentServiceImpl implements IDocumentService {
         }));
     }
 
+    @Override
+    public List<Document> selectAll() {
+        List<Long> projects = projectService.queryAll().stream().map(Project::getId).toList();
+        if (projects.isEmpty()) {
+            return Collections.emptyList();
+        }
+        List<Long> folders = folderService.queryByProjectIds(projects).stream().map(Folder::getId).toList();
+        if (folders.isEmpty()) {
+            return Collections.emptyList();
+        }
+        return baseMapper.selectList(
+            Wrappers.lambdaQuery(Document.class)
+                .in(Document::getFolderId, folders)
+        );
+    }
+
     private LambdaQueryWrapper<Document> buildListWrapperOnWorkbench() {
         LambdaQueryWrapper<Document> wrapper = Wrappers.lambdaQuery(Document.class);
 
@@ -1199,7 +1232,7 @@ public class DocumentServiceImpl implements IDocumentService {
     private LambdaQueryWrapper<Document> buildSpecifyListWrapper(DocumentListOnSpecifyBo bo, List<Long> folderIds) {
         return Wrappers.lambdaQuery(Document.class)
             .eq(Document::getCreateBy, LoginHelper.getUserId())
-            .in(Document::getFolderId, folderIds.isEmpty() ? List.of(-1L) : folderIds)
+            .in(Document::getFolderId, WrapperUtils.convertIds(folderIds))
             .like(StringUtils.isNotBlank(bo.getName()), Document::getName, bo.getName())
             .in(Document::getStatus, List.of(DocumentStatusEnum.UN_UPLOAD.getValue(), DocumentStatusEnum.AUDIT_REJECT.getValue()))
             .orderByDesc(Document::getId);

+ 6 - 2
ruoyi-modules/yingpaipay-business/src/main/java/com/yingpaipay/business/service/impl/ProjectServiceImpl.java

@@ -3,6 +3,7 @@ package com.yingpaipay.business.service.impl;
 import cn.hutool.crypto.digest.BCrypt;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.yingpaipay.business.constant.DocumentTypeConst;
+import com.yingpaipay.common.mabatis.utils.WrapperUtils;
 import com.yingpaipay.system.constant.UserAppletStatusConst;
 import com.yingpaipay.business.domain.Document;
 import com.yingpaipay.business.domain.bo.*;
@@ -130,7 +131,7 @@ public class ProjectServiceImpl implements IProjectService {
                 .eq(SysUserProjects::getUserId, LoginHelper.getUserId())
         ).getProjects();
         if (projects.isEmpty()) {
-            lqw.in(Project::getId, List.of(-1L));
+            lqw.in(Project::getId, WrapperUtils.EMPTY);
         } else if (!projects.equals("*")) {
             lqw.in(Project::getId, Arrays.stream(projects.split(",")).map(Long::valueOf).toList());
         }
@@ -342,7 +343,10 @@ public class ProjectServiceImpl implements IProjectService {
         );
         List<Long> projectIds = new ArrayList<>();
         page.getRecords().forEach(e -> projectIds.add(e.getId()));
+
+        // FIXME 只需要看自己负责的还是看整个项目的?
         List<Document> documents = documentService.queryListByProjectIds(projectIds);
+
         Map<Long, List<Document>> documentMap = documents.stream().collect(Collectors.groupingBy(Document::getProjectId));
         return TableDataInfo.build(page.convert(e -> {
             List<Document> documentList = documentMap.get(e.getId());
@@ -514,7 +518,7 @@ public class ProjectServiceImpl implements IProjectService {
                 .eq(SysUserProjects::getUserId, LoginHelper.getUserId())
         ).getProjects();
         if (projects.isEmpty()) {
-            lqw.in(Project::getId, List.of(-1L));
+            lqw.in(Project::getId, WrapperUtils.EMPTY);
         } else if (!projects.equals("*")) {
             lqw.in(Project::getId, Arrays.stream(projects.split(",")).map(Long::valueOf).toList());
         }