Browse Source

权限控制应用

S0025136190 5 months ago
parent
commit
6fc735651f
66 changed files with 4483 additions and 57 deletions
  1. 11 6
      takai-admin/src/main/java/com/takai/web/controller/common/CaptchaController.java
  2. 107 0
      takai-admin/src/main/java/com/takai/web/controller/system/DocumentAuditConfigController.java
  3. 108 0
      takai-admin/src/main/java/com/takai/web/controller/system/DocumentAuditInfoController.java
  4. 98 0
      takai-admin/src/main/java/com/takai/web/controller/system/SysAppTypeController.java
  5. 38 0
      takai-admin/src/main/java/com/takai/web/controller/system/SysLoginController.java
  6. 104 0
      takai-admin/src/main/java/com/takai/web/controller/system/SysProjectController.java
  7. 98 0
      takai-admin/src/main/java/com/takai/web/controller/system/SysProjectStaffController.java
  8. 155 11
      takai-admin/src/main/java/com/takai/web/controller/takaiai/TakaiAiController.java
  9. 9 0
      takai-ai/pom.xml
  10. 18 0
      takai-ai/src/main/java/com/takai/ai/domain/entity/AppCollect.java
  11. 60 0
      takai-ai/src/main/java/com/takai/ai/domain/entity/TakaiApplication.java
  12. 50 0
      takai-ai/src/main/java/com/takai/ai/domain/entity/TakaiApplicationParams.java
  13. 47 0
      takai-ai/src/main/java/com/takai/ai/domain/entity/TakaiApplicationResult.java
  14. 11 0
      takai-ai/src/main/java/com/takai/ai/domain/entity/TakaiDocumentParams.java
  15. 1 0
      takai-ai/src/main/java/com/takai/ai/domain/entity/TakaiKnowledge.java
  16. 1 0
      takai-ai/src/main/java/com/takai/ai/domain/entity/TakaiKnowledgeParams.java
  17. 30 0
      takai-ai/src/main/java/com/takai/ai/domain/entity/TakaiPageParams.java
  18. 28 0
      takai-ai/src/main/java/com/takai/ai/mapper/TakaiAppCollectMapper.java
  19. 9 1
      takai-ai/src/main/java/com/takai/ai/mapper/TakaiApplicationMapper.java
  20. 2 0
      takai-ai/src/main/java/com/takai/ai/mapper/TakaiDocumentMapper.java
  21. 16 2
      takai-ai/src/main/java/com/takai/ai/service/ITakaiAiService.java
  22. 221 18
      takai-ai/src/main/java/com/takai/ai/service/impl/TakaiAiServiceImpl.java
  23. 143 0
      takai-ai/src/main/java/com/takai/ai/utils/ApprovalFlowManager.java
  24. 38 0
      takai-ai/src/main/java/com/takai/ai/utils/ApprovalNode.java
  25. 68 0
      takai-ai/src/main/resources/mapper/takaiai/TakaiAppCollectMapper.xml
  26. 225 11
      takai-ai/src/main/resources/mapper/takaiai/TakaiApplicationMapper.xml
  27. 16 1
      takai-ai/src/main/resources/mapper/takaiai/TakaiDocumentMapper.xml
  28. 30 0
      takai-bigmodel/src/main/java/com/takai/bigmodel/domain/entity/PageParams.java
  29. 11 0
      takai-common/src/main/java/com/takai/common/core/domain/entity/SysUser.java
  30. 72 0
      takai-common/src/main/java/com/takai/common/utils/SnowflakeDigitGenerator.java
  31. 3 1
      takai-framework/src/main/java/com/takai/framework/config/SecurityConfig.java
  32. 120 0
      takai-system/src/main/java/com/takai/system/domain/DocumentAuditConfig.java
  33. 117 0
      takai-system/src/main/java/com/takai/system/domain/DocumentAuditInfo.java
  34. 24 0
      takai-system/src/main/java/com/takai/system/domain/ProjectApplication.java
  35. 55 0
      takai-system/src/main/java/com/takai/system/domain/SysAppType.java
  36. 101 0
      takai-system/src/main/java/com/takai/system/domain/SysProject.java
  37. 44 0
      takai-system/src/main/java/com/takai/system/domain/SysProjectApp.java
  38. 160 0
      takai-system/src/main/java/com/takai/system/domain/SysProjectStaff.java
  39. 24 0
      takai-system/src/main/java/com/takai/system/domain/TypeApp.java
  40. 34 0
      takai-system/src/main/java/com/takai/system/domain/bo/DocumentAuditConfigBo.java
  41. 65 0
      takai-system/src/main/java/com/takai/system/mapper/DocumentAuditConfigMapper.java
  42. 62 0
      takai-system/src/main/java/com/takai/system/mapper/DocumentAuditInfoMapper.java
  43. 62 0
      takai-system/src/main/java/com/takai/system/mapper/SysAppTypeMapper.java
  44. 62 0
      takai-system/src/main/java/com/takai/system/mapper/SysProjectAppMapper.java
  45. 62 0
      takai-system/src/main/java/com/takai/system/mapper/SysProjectMapper.java
  46. 62 0
      takai-system/src/main/java/com/takai/system/mapper/SysProjectStaffMapper.java
  47. 56 0
      takai-system/src/main/java/com/takai/system/mapper/TypeAppMapper.java
  48. 65 0
      takai-system/src/main/java/com/takai/system/service/IDocumentAuditConfigService.java
  49. 62 0
      takai-system/src/main/java/com/takai/system/service/IDocumentAuditInfoService.java
  50. 62 0
      takai-system/src/main/java/com/takai/system/service/ISysAppTypeService.java
  51. 62 0
      takai-system/src/main/java/com/takai/system/service/ISysProjectService.java
  52. 62 0
      takai-system/src/main/java/com/takai/system/service/ISysProjectStaffService.java
  53. 128 0
      takai-system/src/main/java/com/takai/system/service/impl/DocumentAuditConfigServiceImpl.java
  54. 97 0
      takai-system/src/main/java/com/takai/system/service/impl/DocumentAuditInfoServiceImpl.java
  55. 100 0
      takai-system/src/main/java/com/takai/system/service/impl/SysAppTypeServiceImpl.java
  56. 155 0
      takai-system/src/main/java/com/takai/system/service/impl/SysProjectServiceImpl.java
  57. 100 0
      takai-system/src/main/java/com/takai/system/service/impl/SysProjectStaffServiceImpl.java
  58. 50 0
      takai-system/src/main/resources/mapper/system/AppTypeMapper.xml
  59. 116 0
      takai-system/src/main/resources/mapper/system/DocumentAuditConfigMapper.xml
  60. 96 0
      takai-system/src/main/resources/mapper/system/DocumentAuditInfoMapper.xml
  61. 74 0
      takai-system/src/main/resources/mapper/system/SysAppTypeMapper.xml
  62. 73 0
      takai-system/src/main/resources/mapper/system/SysProjectAppMapper.xml
  63. 106 0
      takai-system/src/main/resources/mapper/system/SysProjectMapper.xml
  64. 127 0
      takai-system/src/main/resources/mapper/system/SysProjectStaffMapper.xml
  65. 1 1
      takai-system/src/main/resources/mapper/system/SysRoleMapper.xml
  66. 9 5
      takai-system/src/main/resources/mapper/system/SysUserMapper.xml

+ 11 - 6
takai-admin/src/main/java/com/takai/web/controller/common/CaptchaController.java

@@ -2,6 +2,8 @@ package com.takai.web.controller.common;
 
 import java.awt.image.BufferedImage;
 import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
 import java.util.concurrent.TimeUnit;
 import javax.annotation.Resource;
 import javax.imageio.ImageIO;
@@ -20,6 +22,8 @@ import com.takai.common.utils.sign.Base64;
 import com.takai.common.utils.uuid.IdUtils;
 import com.takai.system.service.ISysConfigService;
 
+import static com.takai.common.core.domain.AjaxResult.success;
+
 /**
  * 验证码操作处理
  * 
@@ -45,12 +49,13 @@ public class CaptchaController
     @GetMapping("/captchaImage")
     public AjaxResult getCode(HttpServletResponse response) throws IOException
     {
-        AjaxResult ajax = AjaxResult.success();
+//        AjaxResult ajax = AjaxResult.success();
+        Map<String, Object> map = new HashMap<>();
         boolean captchaEnabled = configService.selectCaptchaEnabled();
-        ajax.put("captchaEnabled", captchaEnabled);
+        map.put("captchaEnabled", captchaEnabled);
         if (!captchaEnabled)
         {
-            return ajax;
+            return success(map);
         }
 
         // 保存验证码信息
@@ -87,8 +92,8 @@ public class CaptchaController
             return AjaxResult.error(e.getMessage());
         }
 
-        ajax.put("uuid", uuid);
-        ajax.put("img", Base64.encode(os.toByteArray()));
-        return ajax;
+        map.put("uuid", uuid);
+        map.put("img", Base64.encode(os.toByteArray()));
+        return success(map);
     }
 }

+ 107 - 0
takai-admin/src/main/java/com/takai/web/controller/system/DocumentAuditConfigController.java

@@ -0,0 +1,107 @@
+package com.takai.web.controller.system;
+
+import com.takai.common.annotation.Log;
+import com.takai.common.core.controller.BaseController;
+import com.takai.common.core.domain.AjaxResult;
+import com.takai.common.core.page.TableDataInfo;
+import com.takai.common.enums.BusinessType;
+import com.takai.common.utils.poi.ExcelUtil;
+import com.takai.system.domain.DocumentAuditConfig;
+import com.takai.system.domain.bo.DocumentAuditConfigBo;
+import com.takai.system.service.IDocumentAuditConfigService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 审核配置Controller
+ * 
+ * @author takai
+ * @date 2025-06-03
+ */
+@RestController
+@RequestMapping("/system/audit/config")
+public class DocumentAuditConfigController extends BaseController
+{
+    @Autowired
+    private IDocumentAuditConfigService documentAuditConfigService;
+
+    /**
+     * 查询审核配置列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:auditconfig:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(DocumentAuditConfig documentAuditConfig)
+    {
+        startPage();
+        List<DocumentAuditConfig> list = documentAuditConfigService.selectDocumentAuditConfigList(documentAuditConfig);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出审核配置列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:auditconfig:export')")
+    @Log(title = "审核配置", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, DocumentAuditConfig documentAuditConfig)
+    {
+        List<DocumentAuditConfig> list = documentAuditConfigService.selectDocumentAuditConfigList(documentAuditConfig);
+        ExcelUtil<DocumentAuditConfig> util = new ExcelUtil<DocumentAuditConfig>(DocumentAuditConfig.class);
+        util.exportExcel(response, list, "审核配置数据");
+    }
+
+    /**
+     * 获取审核配置详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:auditconfig:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(documentAuditConfigService.selectDocumentAuditConfigById(id));
+    }
+
+    /**
+     * 新增审核配置
+     */
+    @PreAuthorize("@ss.hasPermi('system:auditconfig:add')")
+    @Log(title = "审核配置", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody DocumentAuditConfig documentAuditConfig)
+    {
+        return toAjax(documentAuditConfigService.insertDocumentAuditConfig(documentAuditConfig));
+    }
+
+    /**
+     * 修改审核配置
+     */
+    @PreAuthorize("@ss.hasPermi('system:auditconfig:edit')")
+    @Log(title = "审核配置", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody DocumentAuditConfig documentAuditConfig)
+    {
+        return toAjax(documentAuditConfigService.updateDocumentAuditConfig(documentAuditConfig));
+    }
+
+    /**
+     * 删除审核配置
+     */
+    @PreAuthorize("@ss.hasPermi('system:auditconfig:remove')")
+    @Log(title = "审核配置", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(documentAuditConfigService.deleteDocumentAuditConfigByIds(ids));
+    }
+
+    @PostMapping("/allList")
+    public TableDataInfo allList(@RequestBody DocumentAuditConfigBo documentAuditConfigBo)
+    {
+        startPage();
+        List<DocumentAuditConfig> list = documentAuditConfigService.selectDocumentAuditConfigListByBo(documentAuditConfigBo);
+        return getDataTable(list);
+    }
+}

+ 108 - 0
takai-admin/src/main/java/com/takai/web/controller/system/DocumentAuditInfoController.java

@@ -0,0 +1,108 @@
+package com.takai.web.controller.system;
+
+import com.takai.common.annotation.Log;
+import com.takai.common.core.controller.BaseController;
+import com.takai.common.core.domain.AjaxResult;
+import com.takai.common.core.page.TableDataInfo;
+import com.takai.common.enums.BusinessType;
+import com.takai.common.utils.poi.ExcelUtil;
+import com.takai.system.domain.DocumentAuditInfo;
+import com.takai.system.service.IDocumentAuditInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 【请填写功能名称】Controller
+ * 
+ * @author takai
+ * @date 2025-05-29
+ */
+@RestController
+@RequestMapping("/system/info")
+public class DocumentAuditInfoController extends BaseController
+{
+    @Autowired
+    private IDocumentAuditInfoService documentAuditInfoService;
+
+    /**
+     * 查询【请填写功能名称】列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:info:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(DocumentAuditInfo documentAuditInfo)
+    {
+        startPage();
+        List<DocumentAuditInfo> list = documentAuditInfoService.selectDocumentAuditInfoList(documentAuditInfo);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出【请填写功能名称】列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:info:export')")
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, DocumentAuditInfo documentAuditInfo)
+    {
+        List<DocumentAuditInfo> list = documentAuditInfoService.selectDocumentAuditInfoList(documentAuditInfo);
+        ExcelUtil<DocumentAuditInfo> util = new ExcelUtil<DocumentAuditInfo>(DocumentAuditInfo.class);
+        util.exportExcel(response, list, "【请填写功能名称】数据");
+    }
+
+    /**
+     * 获取【请填写功能名称】详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:info:query')")
+    @GetMapping(value = "/{documentId}")
+    public AjaxResult getInfo(@PathVariable("documentId") String documentId)
+    {
+        return success(documentAuditInfoService.selectDocumentAuditInfoByDocumentId(documentId));
+    }
+
+    /**
+     * 新增【请填写功能名称】
+     */
+    @PreAuthorize("@ss.hasPermi('system:info:add')")
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody DocumentAuditInfo documentAuditInfo)
+    {
+        return toAjax(documentAuditInfoService.insertDocumentAuditInfo(documentAuditInfo));
+    }
+
+    /**
+     * 修改【请填写功能名称】
+     */
+    @PreAuthorize("@ss.hasPermi('system:info:edit')")
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody DocumentAuditInfo documentAuditInfo)
+    {
+        return toAjax(documentAuditInfoService.updateDocumentAuditInfo(documentAuditInfo));
+    }
+
+    /**
+     * 删除【请填写功能名称】
+     */
+    @PreAuthorize("@ss.hasPermi('system:info:remove')")
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{documentIds}")
+    public AjaxResult remove(@PathVariable String[] documentIds)
+    {
+        return toAjax(documentAuditInfoService.deleteDocumentAuditInfoByDocumentIds(documentIds));
+    }
+
+    @GetMapping(value = "/all/{appId}")
+    public AjaxResult getList(@PathVariable("appId") String appId)
+    {
+        DocumentAuditInfo documentAuditInfo = new DocumentAuditInfo();
+        documentAuditInfo.setAppId(appId);
+        List<DocumentAuditInfo> list = documentAuditInfoService.selectDocumentAuditInfoList(documentAuditInfo);
+        return success(list);
+    }
+
+}

+ 98 - 0
takai-admin/src/main/java/com/takai/web/controller/system/SysAppTypeController.java

@@ -0,0 +1,98 @@
+package com.takai.web.controller.system;
+
+import com.takai.common.annotation.Log;
+import com.takai.common.core.controller.BaseController;
+import com.takai.common.core.domain.AjaxResult;
+import com.takai.common.core.page.TableDataInfo;
+import com.takai.common.enums.BusinessType;
+import com.takai.common.utils.poi.ExcelUtil;
+import com.takai.system.domain.SysAppType;
+import com.takai.system.service.ISysAppTypeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 【请填写功能名称】Controller
+ * 
+ * @author takai
+ * @date 2025-05-28
+ */
+@RestController
+@RequestMapping("/system/type")
+public class SysAppTypeController extends BaseController
+{
+    @Autowired
+    private ISysAppTypeService sysAppTypeService;
+
+    /**
+     * 查询【请填写功能名称】列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:type:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(SysAppType sysAppType)
+    {
+        startPage();
+        List<SysAppType> list = sysAppTypeService.selectSysAppTypeList(sysAppType);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出【请填写功能名称】列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:type:export')")
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, SysAppType sysAppType)
+    {
+        List<SysAppType> list = sysAppTypeService.selectSysAppTypeList(sysAppType);
+        ExcelUtil<SysAppType> util = new ExcelUtil<SysAppType>(SysAppType.class);
+        util.exportExcel(response, list, "【请填写功能名称】数据");
+    }
+
+    /**
+     * 获取【请填写功能名称】详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:type:query')")
+    @GetMapping(value = "/{typeId}")
+    public AjaxResult getInfo(@PathVariable("typeId") String typeId)
+    {
+        return success(sysAppTypeService.selectSysAppTypeByTypeId(typeId));
+    }
+
+    /**
+     * 新增【请填写功能名称】
+     */
+    @PreAuthorize("@ss.hasPermi('system:type:add')")
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody SysAppType sysAppType)
+    {
+        return toAjax(sysAppTypeService.insertSysAppType(sysAppType));
+    }
+
+    /**
+     * 修改【请填写功能名称】
+     */
+    @PreAuthorize("@ss.hasPermi('system:type:edit')")
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody SysAppType sysAppType)
+    {
+        return toAjax(sysAppTypeService.updateSysAppType(sysAppType));
+    }
+
+    /**
+     * 删除【请填写功能名称】
+     */
+    @PreAuthorize("@ss.hasPermi('system:type:remove')")
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{typeIds}")
+    public AjaxResult remove(@PathVariable String[] typeIds)
+    {
+        return toAjax(sysAppTypeService.deleteSysAppTypeByTypeIds(typeIds));
+    }
+}

+ 38 - 0
takai-admin/src/main/java/com/takai/web/controller/system/SysLoginController.java

@@ -134,4 +134,42 @@ public class SysLoginController
         loginService.logout();
         return AjaxResult.success();
     }
+
+    /**
+     * 权限管理后台登录方法
+     * @param loginBody
+     * @return
+     */
+    @PostMapping("/admin/login")
+    public AjaxResult adminLogin(@RequestBody LoginBody loginBody)
+    {
+        AjaxResult ajax = AjaxResult.success();
+        // 生成令牌
+        String token = loginService.login(loginBody.getUserName(), loginBody.getPassword(), loginBody.getCode(),
+                loginBody.getUuid());
+        ajax.put(Constants.TOKEN, token);
+        return ajax;
+    }
+
+    /**
+     * rag管理后台获取用户信息
+     * @param userId
+     * @return
+     */
+    @GetMapping("/deepseek/getInfo/{userId}")
+    public AjaxResult getInfoByDeepSeek(@PathVariable("userId") String userId)
+    {
+        SysUser user = new SysUser();
+        user.setUserId(Long.valueOf(userId));
+        // 角色集合
+        Set<String> roles = permissionService.getRolePermission(user);
+        // 权限集合
+        Set<String> permissions = permissionService.getMenuPermission(user);
+        AjaxResult ajax = AjaxResult.success();
+        ajax.put("user", user);
+        ajax.put("roles", roles);
+        ajax.put("permissions", permissions);
+        return ajax;
+    }
+
 }

+ 104 - 0
takai-admin/src/main/java/com/takai/web/controller/system/SysProjectController.java

@@ -0,0 +1,104 @@
+package com.takai.web.controller.system;
+
+import com.takai.common.annotation.Log;
+import com.takai.common.core.controller.BaseController;
+import com.takai.common.core.domain.AjaxResult;
+import com.takai.common.core.page.TableDataInfo;
+import com.takai.common.enums.BusinessType;
+import com.takai.common.utils.poi.ExcelUtil;
+import com.takai.system.domain.SysProject;
+import com.takai.system.service.ISysProjectService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 【请填写功能名称】Controller
+ * 
+ * @author takai
+ * @date 2025-05-28
+ */
+@RestController
+@RequestMapping("/system/project")
+public class SysProjectController extends BaseController
+{
+    @Autowired
+    private ISysProjectService sysProjectService;
+
+    /**
+     * 查询【请填写功能名称】列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:project:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(SysProject sysProject)
+    {
+        startPage();
+        List<SysProject> list = sysProjectService.selectSysProjectList(sysProject);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出【请填写功能名称】列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:project:export')")
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, SysProject sysProject)
+    {
+        List<SysProject> list = sysProjectService.selectSysProjectList(sysProject);
+        ExcelUtil<SysProject> util = new ExcelUtil<SysProject>(SysProject.class);
+        util.exportExcel(response, list, "【请填写功能名称】数据");
+    }
+
+    /**
+     * 获取【请填写功能名称】详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:project:query')")
+    @GetMapping(value = "/{projectId}")
+    public AjaxResult getInfo(@PathVariable("projectId") String projectId)
+    {
+        return success(sysProjectService.selectSysProjectByProjectId(projectId));
+    }
+
+    /**
+     * 新增【请填写功能名称】
+     */
+    @PreAuthorize("@ss.hasPermi('system:project:add')")
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody SysProject sysProject)
+    {
+        return toAjax(sysProjectService.insertSysProject(sysProject));
+    }
+
+    /**
+     * 修改【请填写功能名称】
+     */
+    @PreAuthorize("@ss.hasPermi('system:project:edit')")
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody SysProject sysProject)
+    {
+        return toAjax(sysProjectService.updateSysProject(sysProject));
+    }
+
+    /**
+     * 删除【请填写功能名称】
+     */
+    @PreAuthorize("@ss.hasPermi('system:project:remove')")
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{projectIds}")
+    public AjaxResult remove(@PathVariable String[] projectIds)
+    {
+        return toAjax(sysProjectService.deleteSysProjectByProjectIds(projectIds));
+    }
+
+    @GetMapping("/alllist")
+    public AjaxResult alllist(SysProject sysProject)
+    {
+        return success(sysProjectService.selectSysProjectList(sysProject));
+    }
+}

+ 98 - 0
takai-admin/src/main/java/com/takai/web/controller/system/SysProjectStaffController.java

@@ -0,0 +1,98 @@
+package com.takai.web.controller.system;
+
+import com.takai.common.annotation.Log;
+import com.takai.common.core.controller.BaseController;
+import com.takai.common.core.domain.AjaxResult;
+import com.takai.common.core.page.TableDataInfo;
+import com.takai.common.enums.BusinessType;
+import com.takai.common.utils.poi.ExcelUtil;
+import com.takai.system.domain.SysProjectStaff;
+import com.takai.system.service.ISysProjectStaffService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 【请填写功能名称】Controller
+ * 
+ * @author takai
+ * @date 2025-05-28
+ */
+@RestController
+@RequestMapping("/system/staff")
+public class SysProjectStaffController extends BaseController
+{
+    @Autowired
+    private ISysProjectStaffService sysProjectStaffService;
+
+    /**
+     * 查询【请填写功能名称】列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:staff:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(SysProjectStaff sysProjectStaff)
+    {
+        startPage();
+        List<SysProjectStaff> list = sysProjectStaffService.selectSysProjectStaffList(sysProjectStaff);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出【请填写功能名称】列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:staff:export')")
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, SysProjectStaff sysProjectStaff)
+    {
+        List<SysProjectStaff> list = sysProjectStaffService.selectSysProjectStaffList(sysProjectStaff);
+        ExcelUtil<SysProjectStaff> util = new ExcelUtil<SysProjectStaff>(SysProjectStaff.class);
+        util.exportExcel(response, list, "【请填写功能名称】数据");
+    }
+
+    /**
+     * 获取【请填写功能名称】详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:staff:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(sysProjectStaffService.selectSysProjectStaffById(id));
+    }
+
+    /**
+     * 新增【请填写功能名称】
+     */
+    @PreAuthorize("@ss.hasPermi('system:staff:add')")
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody SysProjectStaff sysProjectStaff)
+    {
+        return toAjax(sysProjectStaffService.insertSysProjectStaff(sysProjectStaff));
+    }
+
+    /**
+     * 修改【请填写功能名称】
+     */
+    @PreAuthorize("@ss.hasPermi('system:staff:edit')")
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody SysProjectStaff sysProjectStaff)
+    {
+        return toAjax(sysProjectStaffService.updateSysProjectStaff(sysProjectStaff));
+    }
+
+    /**
+     * 删除【请填写功能名称】
+     */
+    @PreAuthorize("@ss.hasPermi('system:staff:remove')")
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(sysProjectStaffService.deleteSysProjectStaffByIds(ids));
+    }
+}

+ 155 - 11
takai-admin/src/main/java/com/takai/web/controller/takaiai/TakaiAiController.java

@@ -11,10 +11,12 @@ import com.takai.common.annotation.Log;
 import com.takai.common.core.controller.BaseController;
 import com.takai.common.core.domain.AjaxResult;
 import com.takai.common.core.domain.entity.SysDictData;
+import com.takai.common.core.domain.entity.SysUser;
 import com.takai.common.core.page.TableDataInfo;
 import com.takai.ai.domain.dto.TakaiDialogRespDTO;
 import com.takai.common.enums.BusinessType;
 import com.takai.common.utils.poi.ExcelUtil;
+import com.takai.framework.web.service.SysPermissionService;
 import com.takai.system.service.ISysDictDataService;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
@@ -40,6 +42,9 @@ public class TakaiAiController extends BaseController {
     @Autowired
     private ISysDictDataService dictDataService;
 
+    @Autowired
+    private SysPermissionService permissionService;
+
     /**
      * 对话聊天
      *
@@ -67,9 +72,10 @@ public class TakaiAiController extends BaseController {
      */
     @PostMapping("/getApplicationList")
     public TableDataInfo getApplicationList(@RequestBody TakaiPageParams params) {
-        List<TakaiApplication> s = takaiAisService.getApplicationList();
+        TakaiApplication vo = setFlagParams(params.getUserId(), params.getTypeId(), params.getProjectId(), 1);
+        List<TakaiApplicationResult> s = takaiAisService.getApplicationList(vo);
         PageHelper.startPage(params.getPageNumber(), params.getPageSize(), "").setReasonable(true);
-        List<TakaiApplication> list = takaiAisService.getApplicationList();
+        List<TakaiApplicationResult> list = takaiAisService.getApplicationList(vo);
         return getDataTableResultTotal(list, Long.valueOf(s.size()));
     }
 
@@ -130,8 +136,9 @@ public class TakaiAiController extends BaseController {
      */
     @PostMapping("/index")
     public AjaxResult index(@RequestBody PageParams params) {
+        TakaiApplication vo = setFlagParams(params.getUserId(), params.getTypeId(), params.getProjectId(), 2);
         // 问答应用总数
-        List<TakaiApplication> appList = takaiAisService.getApplicationList();
+        List<TakaiApplicationResult> appList = takaiAisService.getApplicationList(vo);
         // 知识库总数
         List<TakaiKnowledge> knowledgeList = takaiAisService.queryKnowledgeList();
         Map<String, Object> map = new HashMap();
@@ -226,6 +233,32 @@ public class TakaiAiController extends BaseController {
         PageHelper.startPage(params.getPage(), params.getSize(), "").setReasonable(true);
         List<TakaiDocument> list = takaiAisService.documentList(params);
         return getDataTableResultTotal(list, Long.valueOf(sTotal.size()));
+//        SysUser user = new SysUser();
+//        user.setUserId(Long.valueOf(params.getUserId()));
+//        // 角色集合
+//        Set<String> permissions = permissionService.getMenuPermission(user);
+//        // admin 所有文件
+//        if (permissions.contains("document:public") && permissions.contains("document:internal") && permissions.contains("document:confidential") && permissions.contains("document:topsecret")) {
+//            params.setFileLevel("4");
+//        }
+//        // 项目经理 机密文件 + 所有项目下的内部文件 + 公开文件
+//        else if (permissions.contains("public") && permissions.contains("internal") && permissions.contains("confidential")) {
+//            params.setFileLevel("3");
+//        }
+//        // 普通用户 所属项目下的内部文件 + 公开文件
+//        else if (permissions.contains("public") && permissions.contains("internal")) {
+//            params.setFileLevel("2");
+//        }
+//        // 游客 只能浏览公开文件
+//        else if (permissions.contains("public")){
+//            params.setFileLevel("1");
+//        }else{
+//            params.setFileLevel("0"); // 没有权限
+//        }
+//        List<TakaiDocument> sTotal = takaiAisService.documentList(params);
+//        PageHelper.startPage(params.getPage(), params.getSize(), "").setReasonable(true);
+//        List<TakaiDocument> list = takaiAisService.documentList(params);
+//        return getDataTableResultTotal(list, Long.valueOf(sTotal.size()));
     }
 
     /**
@@ -405,9 +438,10 @@ public class TakaiAiController extends BaseController {
      *
      * @return
      */
-    @GetMapping("/application/list")
-    public AjaxResult index() {
-        List<TakaiApplication> appList = takaiAisService.getApplicationList();
+    @GetMapping("/application/list/{userId}")
+    public AjaxResult index(@PathVariable String userId) {
+        TakaiApplication vo = setFlagParams(userId, null, null, 3);
+        List<TakaiApplicationResult> appList = takaiAisService.getApplicationList(vo);
         return success(appList);
     }
 
@@ -546,24 +580,134 @@ public class TakaiAiController extends BaseController {
         return success(takaiAisService.searchSlice(id));
     }
 
+    /**
+     *
+     * 类型列表
+     * @param dictType
+     * @return
+     */
     @GetMapping(value = "/{dictType}")
-    public AjaxResult geDictInfo(@PathVariable String dictType)
-    {
+    public AjaxResult geDictInfo(@PathVariable String dictType) {
         SysDictData dictData = new SysDictData();
         dictData.setDictType(dictType);
         List<SysDictData> dictDataList = dictDataService.selectDictDataList(dictData);
         return success(dictDataList);
     }
 
-    @GetMapping("/appType")
-    public AjaxResult appType() {
+    /**
+     * 应用类型列表
+     * @return
+     */
+    @GetMapping("/appType/{userId}")
+    public AjaxResult appType(@PathVariable String userId) {
         SysDictData dictData = new SysDictData();
         dictData.setDictType("app_type");
         List<SysDictData> dictDataList = dictDataService.selectDictDataList(dictData);
-        List<Object> list = takaiAisService.searchAppTypeGroupList(dictDataList);
+        List<Object> list = takaiAisService.searchAppTypeGroupList(dictDataList, userId);
         return success(list);
     }
 
+    /**
+     * 审核列表
+     * @param params
+     * @return
+     */
+    @PostMapping("/app/audit/list")
+    public TableDataInfo documentAuditList(@RequestBody TakaiApplicationParams params) {
+        startPage();
+        List<TakaiApplication> list = takaiAisService.applicationListByApprover(params);
+        return getDataTable(list);
+    }
+
+    /**
+     * 开始审核
+     * @return
+     */
+    @PutMapping(value = "/audit/{appId}/{userId}")
+    public AjaxResult startAudit(@PathVariable String appId, @PathVariable String userId){
+        return success(takaiAisService.startAudit(appId, userId));
+    }
+
+    /**
+     * 审核
+     * @param params
+     * @param appId
+     * @return
+     */
+    @PutMapping("/updateDocumentAudit/{appId}")
+    public AjaxResult updateAuditApplication(@RequestBody TakaiApplicationParams params, @PathVariable String appId) {
+        int i = takaiAisService.updateAuditApplication(params, appId);
+        return success(i);
+    }
+
+    /**
+     * 根据登录用户获取项目下的应用列表
+     * @param userId
+     * @return
+     */
+    @GetMapping("/project/app/{userId}")//@RequestBody TakaiPageParams params
+    public AjaxResult appFlag(@PathVariable String userId) {
+//        TakaiApplication vo = setFlagParams(params.getUserId());
+//        vo.setApprover(params.getUserId());
+        return success(takaiAisService.selectAppByUserId(userId));
+    }
+
+    /**
+     * 收藏列表
+     * @param userId
+     * @return
+     */
+    @GetMapping("/app/collect/list/{userId}")
+    public AjaxResult appCollectList(@PathVariable String userId) {
+        List<String> list = takaiAisService.selectAppCollectList(userId);
+        return success(list);
+    }
+
+    /**
+     * 收藏
+     * @param appCollect
+     * @return
+     */
+    @PostMapping("/app/collect")
+    public AjaxResult appCollect(@RequestBody AppCollect appCollect) {
+        return success(takaiAisService.insertAppCollect(appCollect));
+    }
+
+    /**
+     * 取消收藏
+     * @param appId
+     * @return
+     */
+    @DeleteMapping("/app/collect/{userId}/{appId}")
+    public AjaxResult appCollectDel(@PathVariable String userId, @PathVariable String appId) {
+        return success(takaiAisService.deleteAppCollect(userId, appId));
+    }
+
+
+
+    private TakaiApplication setFlagParams(String userId, String typeId, String projectId, int i) {
+        if(i == 3){
+            return returnParams(userId, typeId, projectId, "0");
+        }else{
+            // 角色集合
+            SysUser user = new SysUser();
+            user.setUserId(Long.valueOf(userId));
+            Set<String> permissions = permissionService.getMenuPermission(user);
+            if (permissions.contains("deepseek:application:create") || permissions.contains("deepseek:application:update")) {
+                return returnParams(userId, typeId, projectId, "1");
+            }else{
+                return returnParams(userId, typeId, projectId, "0");
+            }
+        }
+    }
+
+    private TakaiApplication returnParams(String userId, String typeId, String projectId, String flag) {
+        return TakaiApplication.builder().approver(userId)
+                .typeId(typeId == null ? null : Long.valueOf(typeId))
+                .projectId(projectId == null ? null : projectId)
+                .flag(flag).build();
+    }
+
     @GetMapping("/test")
     public AjaxResult test() {
         TakaiMediaReplacement vo = takaiAisService.getTakaiMediaReplacement();

+ 9 - 0
takai-ai/pom.xml

@@ -61,6 +61,15 @@
             <version>4.9.3</version>
         </dependency>
 
+        <dependency>
+            <groupId>com.takai</groupId>
+            <artifactId>takai-system</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.takai</groupId>
+            <artifactId>takai-framework</artifactId>
+        </dependency>
+
     </dependencies>
 
 </project>

+ 18 - 0
takai-ai/src/main/java/com/takai/ai/domain/entity/AppCollect.java

@@ -0,0 +1,18 @@
+package com.takai.ai.domain.entity;
+
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class AppCollect {
+
+    private long id;
+
+    private String appId;
+
+    private String UserId;
+
+    private Date collectTime;
+
+}

+ 60 - 0
takai-ai/src/main/java/com/takai/ai/domain/entity/TakaiApplication.java

@@ -58,6 +58,18 @@ public class TakaiApplication extends BaseEntity
 
     private Long typeId;
 
+    private String status;
+
+    private String approver;
+
+    private String nodeOrder;
+
+    private String comment;
+
+    private String flag;
+
+    private String projectId;
+
     public String getAppId() {
         return appId;
     }
@@ -178,6 +190,54 @@ public class TakaiApplication extends BaseEntity
         this.typeId = typeId;
     }
 
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public String getApprover() {
+        return approver;
+    }
+
+    public void setApprover(String approver) {
+        this.approver = approver;
+    }
+
+    public String getNodeOrder() {
+        return nodeOrder;
+    }
+
+    public void setNodeOrder(String nodeOrder) {
+        this.nodeOrder = nodeOrder;
+    }
+
+    public String getComment() {
+        return comment;
+    }
+
+    public void setComment(String comment) {
+        this.comment = comment;
+    }
+
+    public String getFlag() {
+        return flag;
+    }
+
+    public void setFlag(String flag) {
+        this.flag = flag;
+    }
+
+    public String getProjectId() {
+        return projectId;
+    }
+
+    public void setProjectId(String projectId) {
+        this.projectId = projectId;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 50 - 0
takai-ai/src/main/java/com/takai/ai/domain/entity/TakaiApplicationParams.java

@@ -34,6 +34,16 @@ public class TakaiApplicationParams {
 
     private Long typeId;
 
+    private String status;
+
+    private String approver;
+
+    private String nodeOrder;
+
+    private String comment;
+
+    private String userId;
+
     public String getName() {
         return name;
     }
@@ -153,4 +163,44 @@ public class TakaiApplicationParams {
     public void setTypeId(Long typeId) {
         this.typeId = typeId;
     }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public String getApprover() {
+        return approver;
+    }
+
+    public void setApprover(String approver) {
+        this.approver = approver;
+    }
+
+    public String getNodeOrder() {
+        return nodeOrder;
+    }
+
+    public void setNodeOrder(String nodeOrder) {
+        this.nodeOrder = nodeOrder;
+    }
+
+    public String getComment() {
+        return comment;
+    }
+
+    public void setComment(String comment) {
+        this.comment = comment;
+    }
+
+    public String getUserId() {
+        return userId;
+    }
+
+    public void setUserId(String userId) {
+        this.userId = userId;
+    }
 }

+ 47 - 0
takai-ai/src/main/java/com/takai/ai/domain/entity/TakaiApplicationResult.java

@@ -0,0 +1,47 @@
+package com.takai.ai.domain.entity;
+
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class TakaiApplicationResult {
+
+    /** 应用ID */
+    private String appId;
+
+    /** 应用名称 */
+    private String name;
+
+    /** 应用描述 */
+    private String desc;
+
+    /** 模版 */
+    private String prompt;
+
+    private String typeId;
+
+    private String status;
+
+    private String approver;
+
+    private String comment;
+
+    private String userName;
+
+    /** 创建时间 */
+    private Date createTime;
+
+    private String typeName;
+
+    private Date collectTime;
+
+    private String chatMode;
+
+    private boolean isIsCollect;
+
+    private String auditStatus;
+
+    private String projectName;
+
+}

+ 11 - 0
takai-ai/src/main/java/com/takai/ai/domain/entity/TakaiDocumentParams.java

@@ -32,6 +32,8 @@ public class TakaiDocumentParams {
 
     private int size;
 
+    private String url;
+
     public MultipartFile[] getFiles() {
         return files;
     }
@@ -135,4 +137,13 @@ public class TakaiDocumentParams {
     public void setSize(int size) {
         this.size = size;
     }
+
+    public String getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
 }

+ 1 - 0
takai-ai/src/main/java/com/takai/ai/domain/entity/TakaiKnowledge.java

@@ -115,6 +115,7 @@ public class TakaiKnowledge extends BaseEntity
         this.documentSize = documentSize;
     }
 
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 1 - 0
takai-ai/src/main/java/com/takai/ai/domain/entity/TakaiKnowledgeParams.java

@@ -68,4 +68,5 @@ public class TakaiKnowledgeParams {
     public void setIcon(String icon) {
         this.icon = icon;
     }
+
 }

+ 30 - 0
takai-ai/src/main/java/com/takai/ai/domain/entity/TakaiPageParams.java

@@ -10,6 +10,12 @@ public class TakaiPageParams {
 
     private String userId;
 
+    private String flag;
+
+    private String typeId;
+
+    private String projectId;
+
     public Integer getPageNumber() {
         return pageNumber;
     }
@@ -41,4 +47,28 @@ public class TakaiPageParams {
     public void setUserId(String userId) {
         this.userId = userId;
     }
+
+    public String getFlag() {
+        return flag;
+    }
+
+    public void setFlag(String flag) {
+        this.flag = flag;
+    }
+
+    public String getTypeId() {
+        return typeId;
+    }
+
+    public void setTypeId(String typeId) {
+        this.typeId = typeId;
+    }
+
+    public String getProjectId() {
+        return projectId;
+    }
+
+    public void setProjectId(String projectId) {
+        this.projectId = projectId;
+    }
 }

+ 28 - 0
takai-ai/src/main/java/com/takai/ai/mapper/TakaiAppCollectMapper.java

@@ -0,0 +1,28 @@
+package com.takai.ai.mapper;
+
+
+import com.takai.ai.domain.entity.AppCollect;
+import com.takai.ai.domain.entity.TakaiApplication;
+import com.takai.ai.domain.entity.TakaiApplicationResult;
+import com.takai.ai.domain.entity.TakaiPageParams;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 高井 应用列表
+ * 
+ * @author takai
+ */
+public interface TakaiAppCollectMapper
+{
+	List<String> selectAppCollectList(String userId);
+
+    AppCollect selectAppCollectDetail(@Param("appId") String appId, @Param("userId") String userId);
+
+    int insertAppCollect(AppCollect appCollect);
+
+    int delAppCollect(@Param("userId") String userId, @Param("appId") String appId);
+
+
+}

+ 9 - 1
takai-ai/src/main/java/com/takai/ai/mapper/TakaiApplicationMapper.java

@@ -2,6 +2,8 @@ package com.takai.ai.mapper;
 
 
 import com.takai.ai.domain.entity.TakaiApplication;
+import com.takai.ai.domain.entity.TakaiApplicationResult;
+import com.takai.ai.domain.entity.TakaiPageParams;
 
 import java.util.List;
 
@@ -18,7 +20,7 @@ public interface TakaiApplicationMapper
      * @param mData 应用信息
      * @return 应用信息
      */
-    public List<TakaiApplication> selectApplicationList(TakaiApplication mData);
+    public List<TakaiApplicationResult> selectApplicationList(TakaiApplication mData);
 
 
     /**
@@ -47,6 +49,12 @@ public interface TakaiApplicationMapper
 
     int delApplication(String appId);
 
+    public List<TakaiApplicationResult> selectApplicationLists(TakaiApplication mData);
 
+    public List<TakaiApplication> selectAppListByApprover(TakaiApplication mData);
+
+    List<TakaiApplicationResult> selectAppByUserId(String userId);
+
+    public List<TakaiApplicationResult> selectApplicationListByProjectType(String appId);
 
 }

+ 2 - 0
takai-ai/src/main/java/com/takai/ai/mapper/TakaiDocumentMapper.java

@@ -49,4 +49,6 @@ public interface TakaiDocumentMapper
 
     int delDocumentByKnowledgeId(String knowledgeId);
 
+    List<TakaiDocument> selectDocumentListByApprover(TakaiDocument mData);
+
 }

+ 16 - 2
takai-ai/src/main/java/com/takai/ai/service/ITakaiAiService.java

@@ -62,7 +62,7 @@ public interface ITakaiAiService
 
     int updateApplication(TakaiApplicationParams params, String appId);
 
-    List<TakaiApplication> getApplicationList();
+    List<TakaiApplicationResult> getApplicationList(TakaiApplication params);
 
     JSONObject selectApplication(String appId);
 
@@ -98,6 +98,20 @@ public interface ITakaiAiService
 
     JSONObject searchSlice(String id);
 
-    List<Object>  searchAppTypeGroupList(List<SysDictData> dictDataList);
+    List<Object>  searchAppTypeGroupList(List<SysDictData> dictDataList, String userId);
+
+    List<TakaiApplication> applicationListByApprover(TakaiApplicationParams documentParams);
+
+    public int startAudit(String appId, String userId);
+
+    int updateAuditApplication(TakaiApplicationParams appParams, String appId);
+
+    List<TakaiApplicationResult> selectAppByUserId(String userId);
+
+    List<String> selectAppCollectList(String userId);
+
+    int insertAppCollect(AppCollect appCollect);
+
+    int deleteAppCollect(String userId, String appId);
 
 }

+ 221 - 18
takai-ai/src/main/java/com/takai/ai/service/impl/TakaiAiServiceImpl.java

@@ -8,6 +8,8 @@ import com.takai.ai.domain.dto.*;
 import com.takai.ai.domain.entity.*;
 import com.takai.ai.mapper.*;
 import com.takai.ai.service.ITakaiAiService;
+import com.takai.ai.utils.ApprovalFlowManager;
+import com.takai.ai.utils.ApprovalNode;
 import com.takai.ai.utils.MinioUtil;
 import com.takai.ai.utils.SnowflakeDigitGenerator;
 import com.takai.common.annotation.DataSource;
@@ -17,6 +19,14 @@ import com.takai.common.core.redis.RedisCache;
 import com.takai.common.enums.DataSourceType;
 import com.takai.common.utils.StringUtils;
 import com.takai.common.utils.uuid.IdUtils;
+import com.takai.framework.web.service.SysPermissionService;
+import com.takai.system.domain.DocumentAuditConfig;
+import com.takai.system.domain.DocumentAuditInfo;
+import com.takai.system.domain.TypeApp;
+import com.takai.system.mapper.SysDictDataMapper;
+import com.takai.system.mapper.TypeAppMapper;
+import com.takai.system.mapper.DocumentAuditConfigMapper;
+import com.takai.system.mapper.DocumentAuditInfoMapper;
 import lombok.extern.slf4j.Slf4j;
 import okhttp3.*;
 import okhttp3.sse.EventSource;
@@ -24,13 +34,11 @@ import okhttp3.sse.EventSourceListener;
 import okhttp3.sse.EventSources;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.stereotype.Service;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
-
 import javax.validation.constraints.NotNull;
 import java.io.IOException;
 import java.time.LocalDate;
@@ -38,6 +46,7 @@ import java.time.LocalDateTime;
 import java.time.temporal.ChronoUnit;
 import java.util.*;
 import java.util.concurrent.TimeUnit;
+import java.util.function.Function;
 import java.util.stream.Collectors;
 
 /**
@@ -95,6 +104,24 @@ public class TakaiAiServiceImpl implements ITakaiAiService {
     @Autowired
     private TakaiSliceInfoMapper takaiSliceInfoMapper;
 
+    @Autowired
+    private DocumentAuditConfigMapper documentAuditConfigMapper;
+
+    @Autowired
+    private DocumentAuditInfoMapper documentAuditInfoMapper;
+
+    @Autowired
+    private SysPermissionService permissionService;
+
+    @Autowired
+    private TypeAppMapper appTypeMapper;
+
+    @Autowired
+    private TakaiAppCollectMapper appCollectMapper;
+
+    @Autowired
+    private SysDictDataMapper sysDictDataMapper;
+
     public static final String START_SIGN = "【";
     public static final String END_SIGN = "】";
     public static final String SYMBOL = "【示意图序号";
@@ -621,7 +648,6 @@ public class TakaiAiServiceImpl implements ITakaiAiService {
         return 0;
     }
 
-
     @Override
     public int updateDocument(TakaiDocumentParams documentParams, String documentId) {
         int i = takaiDocumentMapper.updateDocument(TakaiDocument.builder()
@@ -710,7 +736,6 @@ public class TakaiAiServiceImpl implements ITakaiAiService {
     public int createApplication(TakaiApplicationParams params) {
         SnowflakeDigitGenerator snowflakeDigitGenerator = new SnowflakeDigitGenerator(1, 1);
         long appId = snowflakeDigitGenerator.nextId();
-
         TakaiApplication info = TakaiApplication.builder().appId(String.valueOf(appId))
                 .name(params.getName())
                 .desc(params.getDesc())
@@ -723,9 +748,17 @@ public class TakaiAiServiceImpl implements ITakaiAiService {
                 .knowledgeInfo(params.getKnowledge_info())
                 .sliceCount(params.getSlice_count())
                 .typeId(params.getTypeId())
+                .status("5") // 未开始审核状态
+                .approver(params.getApprover())
                 .build();
+        info.setCreateBy(params.getUserId());
         int i = takaiApplicationMapper.insertApplication(info);
         if (i > 0) {
+            TypeApp appType = new TypeApp();
+            appType.setTypeId(params.getTypeId());
+            appType.setAppId(String.valueOf(appId));
+            appTypeMapper.insertAppType(appType);
+
             logger.info("create application success, id:{}, name:{}", appId, params.getName());
             TakaiAppInfo appInfo = new TakaiAppInfo();
             appInfo.setAppId(String.valueOf(appId));
@@ -760,6 +793,10 @@ public class TakaiAiServiceImpl implements ITakaiAiService {
                 .knowledgeInfo(params.getKnowledge_info())
                 .sliceCount(params.getSlice_count())
                 .typeId(params.getTypeId())
+                .status("5") // 未开始审核状态
+                .approver(params.getApprover())
+                .comment(null)
+                .nodeOrder(null)
                 .build();
         int i = takaiApplicationMapper.updateApplication(info);
         if (1 > 0) {
@@ -785,8 +822,8 @@ public class TakaiAiServiceImpl implements ITakaiAiService {
     }
 
     @Override
-    public List<TakaiApplication> getApplicationList() {
-        return takaiApplicationMapper.selectApplicationList(null);
+    public List<TakaiApplicationResult> getApplicationList(TakaiApplication params) {
+        return takaiApplicationMapper.selectApplicationList(params);
     }
 
     @Override
@@ -1046,24 +1083,50 @@ public class TakaiAiServiceImpl implements ITakaiAiService {
     }
 
     @Override
-    public List<Object> searchAppTypeGroupList(List<SysDictData> dictDataList) {
+    public List<Object> searchAppTypeGroupList(List<SysDictData> dictDataList, String userId) {
         List<Object> result =  new ArrayList();
         if (dictDataList!= null && dictDataList.size() > 0) {
             for (SysDictData dictData : dictDataList){
                 Map<String, Object> map = new HashMap();
-                List<TakaiApplication> list = takaiApplicationMapper.selectApplicationList(TakaiApplication.builder().typeId(dictData.getDictCode()).build());
+                List<TakaiApplicationResult> list = takaiApplicationMapper.selectApplicationList(TakaiApplication.builder().approver(userId).flag("0").typeId(dictData.getDictCode()).build());
                 if(list!= null && list.size() > 0){
-                    map.put("title", dictData.getDictLabel());
-                    List<Object> appInfoList = new ArrayList();
-                    for (TakaiApplication application : list){
-                        Map<String, Object> infoMap = new HashMap();
-                        infoMap.put("title", application.getName());
-                        infoMap.put("appId", application.getAppId());
-                        infoMap.put("showMenu", "false");
-                        infoMap.put("chatMode", "LOCAL");
-                        appInfoList.add(infoMap);
+                    if(dictData.getDictCode() == 41){ // 项目级应用
+                        List<Object> l = new ArrayList<>();
+                        map.put("title", dictData.getDictLabel());
+                        for (TakaiApplicationResult application : list){
+                            Map<String, Object> infoProjectMap = new HashMap();
+                            List<TakaiApplicationResult> projectList = takaiApplicationMapper.selectApplicationListByProjectType(application.getAppId());
+                            if(projectList != null && projectList.size() > 0){
+                                List<TakaiApplicationResult> uniqueAppList = projectList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(TakaiApplicationResult :: getAppId))), ArrayList::new)); // 去重
+                                List<Object> projectInfoList = new ArrayList();
+                                for (TakaiApplicationResult project : uniqueAppList){
+                                    SysDictData vo = sysDictDataMapper.selectDictDataById(Long.valueOf(project.getTypeId()));
+                                    infoProjectMap.put("title", vo.getDictLabel());
+                                    Map<String, Object> projectMap = new HashMap();
+                                    projectMap.put("appId", project.getAppId());
+                                    projectMap.put("showMenu", "false");
+                                    projectMap.put("chatMode", "LOCAL");
+                                    projectMap.put("title", vo.getDictLabel());
+                                    projectInfoList.add(projectMap);
+                                }
+                                infoProjectMap.put("children", projectInfoList);
+                                l.add(infoProjectMap);
+                            }
+                            map.put("children", l);
+                        }
+                    }else{
+                        List<Object> appInfoList = new ArrayList();
+                        map.put("title", dictData.getDictLabel());
+                        for (TakaiApplicationResult application : list){
+                            Map<String, Object> infoMap = new HashMap();
+                            infoMap.put("title", application.getName());
+                            infoMap.put("appId", application.getAppId());
+                            infoMap.put("showMenu", "false");
+                            infoMap.put("chatMode", "LOCAL");
+                            appInfoList.add(infoMap);
+                        }
+                        map.put("children", appInfoList);
                     }
-                    map.put("children", appInfoList);
                     result.add(map);
                 }
             }
@@ -1071,6 +1134,146 @@ public class TakaiAiServiceImpl implements ITakaiAiService {
         return result;
     }
 
+    @Override
+    public List<TakaiApplication> applicationListByApprover(TakaiApplicationParams takaiApplicationParams) {
+        TakaiApplication vo = TakaiApplication.builder().approver(takaiApplicationParams.getApprover())
+                .build();
+        return takaiApplicationMapper.selectAppListByApprover(vo);
+    }
+
+    @Override
+    public int startAudit(String appId, String userId) {
+        List<DocumentAuditConfig> list = documentAuditConfigMapper.selectDocumentAuditConfigListByBo(null);
+        if(list != null && list.size() > 0) {
+            ApprovalFlowManager flowManager = new ApprovalFlowManager();
+            logger.info("开启审核");
+            for (DocumentAuditConfig config : list) {
+                // 添加审核节点
+                flowManager.addNode(new ApprovalNode(config.getId(), config.getNodeOrder(), Long.valueOf(config.getApprover()), config.getChain()));
+            }
+
+            ApprovalNode vo = flowManager.getFirstApprover();
+            int i = takaiApplicationMapper.updateApplication(TakaiApplication.builder()
+                    .appId(appId)
+                    .approver(String.valueOf(vo.getApprover()))
+                    .nodeOrder(String.valueOf(vo.getNodeOrder()))
+                    .status("1") // 待审核
+                    .build());
+            if(i > 0){
+                DocumentAuditInfo info = new DocumentAuditInfo();
+                info.setAppId(appId);
+                info.setApprover(userId);
+                info.setStatus("5");
+                info.setNodeOrder(Integer.valueOf("0"));
+                info.setCreateBy(userId);
+                info.setCreateTime(new Date());
+                documentAuditInfoMapper.insertDocumentAuditInfo(info); // 审核记录
+            }
+            return i;
+        }else{
+            return 9;
+        }
+    }
+
+    @Override
+    public int updateAuditApplication(TakaiApplicationParams appParams, String appId) {
+//          获取审核配置信息 (人员,节点)
+        List<DocumentAuditConfig> list = documentAuditConfigMapper.selectDocumentAuditConfigListByBo(null);
+        if(list != null && list.size() > 0){
+            if(("Y").equals(appParams.getStatus())){
+                ApprovalFlowManager flowManager = new ApprovalFlowManager();
+                logger.info("审核通过,开始审批流程");
+                for (DocumentAuditConfig config: list){
+                    // 添加审核节点
+                    flowManager.addNode(new ApprovalNode(config.getId(), config.getNodeOrder(), Long.valueOf(config.getApprover()), config.getChain()));
+                }
+                // 根据审核节点获取下一个审核节点
+                ApprovalNode nextNode = flowManager.getNextApproverByOrder(Integer.valueOf(appParams.getNodeOrder()));
+                if (nextNode == null) {
+                    //  审核通过,更新文档状态
+                    logger.info("审核通过,到最后节点");
+                    return saveAuditInfo(appParams, "3", appId);
+                }else{
+                    // 审核通过,下一个节点
+                    int successI = takaiApplicationMapper.updateApplication(TakaiApplication.builder()
+                            .appId(appId)
+                            .status("2")
+                            .approver(String.valueOf(nextNode.getApprover()))
+                            .nodeOrder(String.valueOf(nextNode.getNodeOrder()))
+                            .comment(appParams.getComment())
+                            .build());
+                    if(successI > 0){
+                        DocumentAuditInfo info = new DocumentAuditInfo();
+                        info.setAppId(appId);
+                        info.setApprover(appParams.getApprover());
+                        info.setComment(appParams.getComment());
+                        info.setStatus("2");
+                        info.setNodeOrder(Integer.valueOf(appParams.getNodeOrder()));
+                        info.setCreateBy(appParams.getApprover());
+                        info.setCreateTime(new Date());
+                        documentAuditInfoMapper.insertDocumentAuditInfo(info); // 审核记录
+                    }
+                    return successI;
+                }
+            }else{
+                //  审核拒绝,更新文档状态
+                logger.info("审核拒绝,更新状态");
+                return saveAuditInfo(appParams, "5", appId);
+            }
+        }
+        return 0;
+    }
+
+    private int saveAuditInfo(TakaiApplicationParams appParams, String status, String appId){
+        int successI = takaiApplicationMapper.updateApplication(TakaiApplication.builder()
+                .appId(appId)
+                .status(status)
+                .approver(appParams.getApprover())
+                .nodeOrder(appParams.getNodeOrder())
+                .comment(appParams.getComment())
+                .build());
+        if(successI > 0){
+            DocumentAuditInfo info = new DocumentAuditInfo();
+            info.setAppId(appId);
+            info.setApprover(appParams.getApprover());
+            info.setComment(appParams.getComment());
+            if("5".equals(status)){
+                info.setStatus("4");
+            }else{
+                info.setStatus(status);
+            }
+            info.setNodeOrder(Integer.valueOf(appParams.getNodeOrder()));
+            info.setCreateBy(appParams.getApprover());
+            info.setCreateTime(new Date());
+            documentAuditInfoMapper.insertDocumentAuditInfo(info); // 审核记录
+        }
+        return successI;
+    }
+
+    @Override
+    public List<TakaiApplicationResult> selectAppByUserId(String userId) {
+        return takaiApplicationMapper.selectAppByUserId(userId);
+    }
+
+    @Override
+    public List<String> selectAppCollectList(String userId) {
+        return appCollectMapper.selectAppCollectList(userId);
+    }
+
+    @Override
+    public int insertAppCollect(AppCollect appCollect) {
+        AppCollect collect = appCollectMapper.selectAppCollectDetail(appCollect.getAppId(), appCollect.getUserId());
+        if (collect == null) {
+            return appCollectMapper.insertAppCollect(appCollect);
+        }
+        return 0;
+    }
+
+    @Override
+    public int deleteAppCollect(String userId, String appId) {
+        return appCollectMapper.delAppCollect(userId, appId);
+    }
+
     private JSONObject analysisFile(List<UploadDocumentParams> result, TakaiDocumentSettings settings, String flag) {
         String url = deepseekConfig.getBaseurl() + deepseekConfig.getUploadKnowledge();
         JSONObject json = new JSONObject();

+ 143 - 0
takai-ai/src/main/java/com/takai/ai/utils/ApprovalFlowManager.java

@@ -0,0 +1,143 @@
+package com.takai.ai.utils;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+/**
+ * 审核流程管理类
+ */
+
+public class ApprovalFlowManager {
+
+    private List<ApprovalNode> nodes;
+
+    public ApprovalFlowManager() {
+        this.nodes = new ArrayList<>();
+    }
+
+    /**
+     * 添加审核节点
+     */
+    public void addNode(ApprovalNode node) {
+        nodes.add(node);
+        // 按节点顺序排序
+        Collections.sort(nodes, Comparator.comparingInt(ApprovalNode::getNodeOrder));
+    }
+
+    /**
+     * 根据当前节点ID查找上一个审核人
+     * @param currentNodeId 当前节点ID
+     * @return 上一个节点的审核人,如果没有上一个节点返回null
+     */
+    public Long getPreviousApprover(Long currentNodeId) {
+        int currentIndex = findNodeIndexById(currentNodeId);
+        if (currentIndex <= 0) {
+            return null;
+        }
+        return nodes.get(currentIndex - 1).getApprover();
+    }
+
+    /**
+     * 根据当前节点ID查找下一个审核人
+     * @param currentNodeId 当前节点ID
+     * @return 下一个节点的审核人,如果没有下一个节点返回null
+     */
+    public Long getNextApprover(Long currentNodeId) {
+        int currentIndex = findNodeIndexById(currentNodeId);
+        if (currentIndex == -1 || currentIndex >= nodes.size() - 1) {
+            return null;
+        }
+        return nodes.get(currentIndex + 1).getApprover();
+    }
+
+    /**
+     * 获取整个审核链(所有审核人)
+     */
+    public List<Long> getFullApprovalChain() {
+        if (nodes.isEmpty()) {
+            return new ArrayList<>();
+        }
+        // 返回第一个节点的chain(根据表格数据,所有节点的chain相同)
+        return new ArrayList<>(nodes.get(0).getChain());
+    }
+
+    /**
+     * 根据节点ID查找节点索引
+     */
+    private int findNodeIndexById(Long nodeId) {
+        for (int i = 0; i < nodes.size(); i++) {
+            if (nodes.get(i).getId().equals(nodeId)) {
+                return i;
+            }
+        }
+        return -1;
+    }
+
+    /**
+     * 根据当前节点ID查找下一个节点
+     * @param currentNodeId 当前节点ID
+     * @return 下一个节点对象,如果没有下一个节点返回null
+     */
+    public ApprovalNode getNextNode(Long currentNodeId) {
+        int currentIndex = findNodeIndexById(currentNodeId);
+        if (currentIndex == -1 || currentIndex >= nodes.size() - 1) {
+            return null;
+        }
+        return nodes.get(currentIndex + 1);
+    }
+
+    /**
+     * 根据当前节点的 order 值查找下一个节点
+     * @param currentOrder 当前节点的 order 值
+     * @return 下一个节点对象,如果没有下一个节点返回null
+     */
+    public ApprovalNode getNextNodeByOrder(int currentOrder) {
+        // 首先确保节点已按order排序
+        Collections.sort(nodes, Comparator.comparingInt(ApprovalNode::getNodeOrder));
+
+        for (int i = 0; i < nodes.size(); i++) {
+            if (nodes.get(i).getNodeOrder() == currentOrder) {
+                // 找到当前节点,检查是否有下一个节点
+                if (i < nodes.size() - 1) {
+                    return nodes.get(i + 1);
+                }
+                break;
+            }
+        }
+        return null;
+    }
+
+    /**
+     * 根据当前节点的 order 值查找下一个审核人
+     * @param currentOrder 当前节点的 order 值
+     * @return 下一个节点的审核人ID,如果没有下一个节点返回null
+     */
+    public ApprovalNode getNextApproverByOrder(int currentOrder) {
+        ApprovalNode nextNode = getNextNodeByOrder(currentOrder);
+        return nextNode != null ? nextNode : null;
+    }
+
+    /**
+     * 获取审核流程中的第一个节点(order值最小的节点)
+     * @return 第一个节点,如果没有节点则返回null
+     */
+    public ApprovalNode getFirstNode() {
+        if (nodes.isEmpty()) {
+            return null;
+        }
+        // 因为节点已经按order排序,第一个元素就是order最小的
+        return nodes.get(0);
+    }
+
+    /**
+     * 获取审核流程中的第一个节点的审核人
+     * @return 第一个节点的审核人,如果没有节点则返回null
+     */
+    public ApprovalNode getFirstApprover() {
+        ApprovalNode firstNode = getFirstNode();
+        return firstNode != null ? firstNode : null;
+    }
+
+}

+ 38 - 0
takai-ai/src/main/java/com/takai/ai/utils/ApprovalNode.java

@@ -0,0 +1,38 @@
+package com.takai.ai.utils;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 审核节点类
+ */
+public class ApprovalNode {
+
+    private Long id;
+    private int nodeOrder;          // 节点顺序
+    private Long approver;      // 当前节点审核人
+    private List<Long> chain;  // 审核人链
+
+    public ApprovalNode(Long id, int nodeOrder, Long approver, String chain) {
+        this.id = id;
+        this.nodeOrder = nodeOrder;
+        this.approver = approver;
+        this.chain = parseChain(chain);
+    }
+
+    // 解析审核人链字符串,如"5/6/7"
+    private List<Long> parseChain(String chainStr) {
+        String[] approverArray = chainStr.split("/");
+        List<Long> chain = new ArrayList<>();
+        for (String approver : approverArray) {
+            chain.add(Long.parseLong(approver));
+        }
+        return chain;
+    }
+
+    // Getters
+    public Long getId() { return id; }
+    public int getNodeOrder() { return nodeOrder; }
+    public Long getApprover() { return approver; }
+    public List<Long> getChain() { return chain; }
+}

+ 68 - 0
takai-ai/src/main/resources/mapper/takaiai/TakaiAppCollectMapper.xml

@@ -0,0 +1,68 @@
+<?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="com.takai.ai.mapper.TakaiAppCollectMapper">
+
+	<resultMap type="com.takai.ai.domain.entity.AppCollect" id="BmAppCollectResult">
+		<id property="id"   column="id"   />
+		<result property="appId"   column="app_id"   />
+		<result property="userId"  column="user_id"  />
+		<result property="collectTime" column="collect_time" />
+	</resultMap>
+
+	<resultMap type="com.takai.ai.domain.entity.TakaiApplicationResult" id="BmApplicationListResult">
+		<id property="appId"   column="appId"   />
+		<result property="name"  column="name"  />
+		<result property="desc"  column="description"  />
+		<result property="prompt"   column="prompt"   />
+		<result property="typeId" column="type_id" />
+		<result property="status"  column="status"  />
+		<result property="approver"  column="approver"  />
+		<result property="comment"   column="comment"   />
+		<result property="userName"   column="user_name"   />
+		<result property="createTime" column="create_time" />
+		<result property="typeName" column="typeName" />
+		<result property="collectTime" column="collect_time" />
+		<result property="id" column="id" />
+	</resultMap>
+
+	<sql id="selectSql">
+		select id, app_id, user_id, collect_time
+		from app_collect
+    </sql>
+
+	<select id="selectAppCollectList" parameterType="TakaiPageParams" resultType="java.lang.String">
+		select bm.appId
+		from app_collect ac
+		left join bm_application bm on ac.app_id = bm.appId
+		<where>
+		    <if test="userId != null and userId != ''">
+				AND ac.user_id = #{userId}
+			</if>
+		</where>
+		order by ac.collect_time desc
+	</select>
+
+	<select id="selectAppCollectDetail" resultMap="BmAppCollectResult">
+		<include refid="selectSql"/>
+		where app_id = #{appId} and user_id = #{userId}
+	</select>
+
+ 	<insert id="insertAppCollect" parameterType="AppCollect">
+ 		insert into app_collect(
+ 			<if test="appId != null and appId != ''">app_id,</if>
+		    <if test="userId != null and userId != ''">user_id,</if>
+			collect_Time
+ 		)values(
+			<if test="appId != null and appId != ''">#{appId},</if>
+		    <if test="userId != null and userId != ''">#{userId},</if>
+ 			sysdate()
+ 		)
+	</insert>
+
+	<delete id="delAppCollect" parameterType="String">
+		delete from app_collect where user_id = #{userId} and app_id = #{appId}
+	</delete>
+
+</mapper>

+ 225 - 11
takai-ai/src/main/resources/mapper/takaiai/TakaiApplicationMapper.xml

@@ -20,29 +20,164 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<result property="paramDesc"   column="param_desc"/>
 		<result property="knowledgeInfo" column="knowledge_info" />
 		<result property="typeId" column="type_id" />
+		<result property="status" column="status" />
+		<result property="approver" column="approver" />
+		<result property="nodeOrder" column="node_order" />
+		<result property="comment" column="comment" />
 		<result property="remark"   column="remark"   />
 		<result property="createBy"   column="create_by"   />
 		<result property="createTime" column="create_time" />
 		<result property="updateBy"   column="update_by"   />
 		<result property="updateTime" column="update_time" />
 	</resultMap>
+
+	<resultMap type="com.takai.ai.domain.entity.TakaiApplicationResult" id="BmApplicationListResult">
+		<id property="appId"   column="appId"   />
+		<result property="name"  column="name"  />
+		<result property="desc"  column="description"  />
+		<result property="prompt"   column="prompt"   />
+		<result property="typeId" column="type_id" />
+		<result property="status"  column="status"  />
+		<result property="approver"  column="approver"  />
+		<result property="comment"   column="comment"   />
+		<result property="userName"   column="user_name"   />
+		<result property="createTime" column="create_time" />
+		<result property="typeName" column="typeName" />
+		<result property="chatMode" column="chatMode" />
+		<result property="isIsCollect" column="isIsCollect" />
+		<result property="auditStatus" column="auditStatus" />
+		<result property="projectName" column="projectName" />
+	</resultMap>
 	
 	<sql id="selectSql">
-		select appId, name, description, prompt, top_p, temperature, knowledge_ids, slice_count,model,icon_color,icon_type,max_token, param_desc, knowledge_info, type_id, remark, create_by, create_time, update_by, update_time
+		select appId, name, description, prompt, top_p, temperature, knowledge_ids, slice_count,model,icon_color,icon_type,max_token, param_desc, knowledge_info, type_id,
+			   status, approver, node_order, comment,remark, create_by, create_time, update_by, update_time
 		from bm_application
     </sql>
 
-	<select id="selectApplicationList" parameterType="BmApplication" resultMap="BmApplicationResult">
-	    <include refid="selectSql"/>
-		<where>
-		    <if test="appId != null and appId != ''">
-				AND appId = #{appId}
+	<select id="selectApplicationList" parameterType="BmApplication" resultMap="BmApplicationListResult">
+		<!-- 用户所属项目下的应用 -->
+		SELECT DISTINCT
+			bm.appId,
+			bm.name,
+			bm.description,
+			bm.type_id,
+			bm.create_time,
+			bm.status,
+			bm.comment,
+			(SELECT dai.STATUS
+			FROM document_audit_info dai
+			WHERE dai.app_id = bm.appId
+			ORDER BY dai.create_time DESC
+			LIMIT 1) AS auditStatus,
+			sp.project_name as projectName
+		FROM
+		bm_application bm
+		LEFT JOIN sys_project_app pa ON pa.app_id = bm.appId
+		LEFT JOIN sys_project sp ON pa.project_id = sp.project_id
+		LEFT JOIN sys_project_staff spa ON spa.project_pid = sp.project_pid
+		LEFT JOIN sys_dict_data sdd ON sdd.dict_code = bm.type_id
+		where
+		1=1
+		<if test="flag != null and flag != ''">
+			AND (
+			<choose>
+				<when test="flag == 1">
+					bm.status = '1' OR bm.status  = '2' or bm.status = '3' OR bm.status = '4' OR bm.status  = '5' OR bm.status = '' OR bm.status IS NULL
+				</when>
+				<otherwise>
+					bm.status = '3' OR bm.status = '' OR bm.status IS NULL
+				</otherwise>
+			</choose>
+			)
+		</if>
+	    <if test="approver != null and approver != ''">
+			AND spa.user_id = #{approver}
+	    </if>
+		<if test="typeId != null and typeId != ''">
+			AND bm.type_id = #{typeId}
+		</if>
+		<if test="projectId != null and projectId != ''">
+			AND sp.project_id = #{projectId}
+		</if>
+		<if test="projectId == null or projectId == ''">
+			<!-- 用户所属项目下以外的应用 -->
+			UNION
+			SELECT
+				ba.appId,
+				ba.name,
+				ba.description,
+				ba.type_id,
+				ba.create_time,
+				ba.status,
+				ba.comment,
+				(SELECT dai.STATUS
+				FROM document_audit_info dai
+				WHERE dai.app_id = ba.appId
+				ORDER BY dai.create_time DESC
+				LIMIT 1) AS auditStatus,
+			    '' AS projectName
+			FROM
+				bm_application ba
+			LEFT JOIN sys_dict_data sdd on sdd.dict_code = ba.type_id
+			WHERE
+			ba.appId NOT IN (
+				SELECT
+					app_id
+				FROM
+					sys_project_app
+				)
+			AND (
+				ba.STATUS = '3'
+				OR ba.STATUS = ''
+				OR ba.STATUS IS NULL
+				)
+			<if test="typeId != null and typeId != ''">
+				AND ba.type_id = #{typeId}
+			</if>
+			<!-- 待审核的应用 -->
+			UNION
+			SELECT DISTINCT
+				bl.appId,
+				bl.name,
+				bl.description,
+				bl.type_id,
+				bl.create_time,
+				bl.status,
+				bl.comment,
+				(SELECT dai.STATUS
+				FROM document_audit_info dai
+				WHERE dai.app_id = bl.appId
+				ORDER BY dai.create_time DESC
+				LIMIT 1) AS auditStatus,
+				'' AS projectName
+			FROM
+				bm_application bl
+			WHERE
+			1=1
+			<if test="flag != null and flag != ''">
+				AND (
+				<choose>
+					<when test="flag == 1">
+						(bl.status  = '1' OR bl.status  = '2' OR bl.status  = '3' OR bl.status  = '4' OR bl.status  = '5') AND bl.create_by = #{approver}
+					</when>
+					<otherwise>
+						bl.status = '3' OR bl.status = '' OR bl.status IS NULL
+					</otherwise>
+				</choose>
+				)
 			</if>
+			AND bl.appId NOT IN (
+			SELECT
+				app_id
+			FROM
+				sys_project_app
+			)
 			<if test="typeId != null and typeId != ''">
-				AND type_id = #{typeId}
+				AND bl.type_id = #{typeId}
 			</if>
-		</where>
-		order by create_time desc
+		</if>
+		ORDER BY create_time DESC
 	</select>
 
 	<select id="selectTargetApplication" parameterType="BmApplication" resultMap="BmApplicationResult">
@@ -68,6 +203,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		    <if test="knowledgeInfo != null and knowledgeInfo != ''">knowledge_info,</if>
 		    <if test="maxToken != null and maxToken != ''">max_token,</if>
 		    <if test="typeId != null and typeId != ''">type_id,</if>
+			<if test="status != null and status != ''">status,</if>
+			<if test="nodeOrder != null and nodeOrder != ''">node_order,</if>
+			<if test="approver != null and approver != ''">approver,</if>
+			<if test="comment != null and comment != ''">comment,</if>
  			create_time
  		)values(
 			<if test="appId != null">#{appId},</if>
@@ -86,6 +225,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		    <if test="knowledgeInfo != null and knowledgeInfo != ''">#{knowledgeInfo},</if>
 		    <if test="maxToken != null and maxToken != ''">#{maxToken},</if>
 		    <if test="typeId != null and typeId != ''">#{typeId},</if>
+			<if test="status != null and status != ''">#{status},</if>
+			<if test="nodeOrder != null and nodeOrder != ''">#{nodeOrder},</if>
+			<if test="approver != null and approver != ''">#{approver},</if>
+			<if test="comment != null and comment != ''">#{comment},</if>
  			sysdate()
  		)
 	</insert>
@@ -108,6 +251,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<if test="knowledgeInfo != null and knowledgeInfo != ''">knowledge_info = #{knowledgeInfo},</if>
 			<if test="maxToken != null and maxToken != ''">max_token = #{maxToken},</if>
 			<if test="typeId != null and typeId != ''">type_id = #{typeId},</if>
+			<if test="status != null and status != ''">status = #{status},</if>
+			node_order = #{nodeOrder},
+			comment = #{comment},
+			<if test="approver != null and approver != ''">approver = #{approver},</if>
 			update_time = sysdate()
 		</set>
 		where appId = #{appId}
@@ -116,5 +263,72 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	<delete id="delApplication" parameterType="String">
 		delete from bm_application where appId = #{appId}
 	</delete>
-	
-</mapper> 
+
+	<select id="selectAppListByApprover" parameterType="BmApplication" resultMap="BmApplicationListResult">
+		select bm.appId, bm.name, bm.description, bm.prompt, bm.type_id,
+		bm.status, bm.approver, bm.comment, bm.create_time, su.user_name
+		from bm_application bm
+		left join sys_user su on bm.approver = su.user_id
+		<where>
+			1=1
+			and (bm.status = '4'  OR bm.status = '1' OR bm.status = '2')
+			<if test="appId != null and appId != ''">
+				AND bm.appId = #{appId}
+			</if>
+			<if test="approver != null and approver != ''">
+				AND bm.approver = #{approver}
+			</if>
+		</where>
+		order by bm.create_time desc
+	</select>
+
+	<select id="selectAppByUserId"  resultMap="BmApplicationListResult">
+		SELECT DISTINCT
+			bm.appId,
+			bm. NAME,
+			bm.description,
+			bm.type_id,
+			bm.create_time,
+			sdd.dict_label AS typeName,
+			'LOCAL' AS chatMode,
+			CASE
+				WHEN ac.app_id IS NOT NULL THEN
+					true
+				ELSE
+					false
+				END AS isIsCollect
+		FROM
+			sys_project sp
+				LEFT JOIN sys_project_staff spa ON sp.project_pid = spa.project_pid
+				LEFT JOIN sys_project_app pa ON pa.project_id = sp.project_id
+				LEFT JOIN bm_application bm ON pa.app_id = bm.appId
+				LEFT JOIN sys_dict_data sdd ON sdd.dict_code = bm.type_id
+				LEFT JOIN app_collect ac ON ac.app_id = bm.appId
+				AND ac.user_id = #{userId}
+		where
+		  spa.user_id = #{userId}
+		  AND (
+			bm. STATUS = '3'
+				OR bm. STATUS = ''
+				OR bm. STATUS IS NULL
+			)
+	</select>
+
+	<select id="selectApplicationListByProjectType" parameterType="String" resultMap="BmApplicationListResult">
+		select
+		    distinct bm.appId,
+			bm.name,
+			bm.description,
+			bm.create_time,
+			bm.status,
+			bm.comment,
+			sp.project_type as type_id
+		from
+			bm_application bm
+				LEFT JOIN sys_project_app pa ON bm.appId = pa.app_id
+				LEFT JOIN sys_project sp on pa.project_id = sp.project_id
+		where bm.appId = #{appId}
+		  and (sp.project_type = '42' or sp.project_type = '43')
+	</select>
+
+</mapper>

+ 16 - 1
takai-ai/src/main/resources/mapper/takaiai/TakaiDocumentMapper.xml

@@ -24,7 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	</resultMap>
 	
 	<sql id="selectSql">
-        select document_id, knowledge_id,custom_separator, knowledge_type, sentence_size, length, word_num, name,url,
+		select document_id, knowledge_id,custom_separator, knowledge_type, sentence_size, length, word_num, name,url,
 			   parse_image, remark, create_by, create_time, update_by, update_time, slice_total
 		from bm_document
     </sql>
@@ -107,5 +107,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	<delete id="delDocumentByKnowledgeId" parameterType="String">
 		delete from bm_document where knowledge_id = #{knowledgeId}
 	</delete>
+
+	<select id="selectDocumentListByApprover" parameterType="BmDocument" resultMap="BmDocumentResult">
+		<include refid="selectSql"/>
+		<where>
+			1=1
+			and (STATUS IS NULL OR STATUS = '' OR STATUS = '4'  OR status = '1' OR status = '2')
+			<if test="documentId != null and documentId != ''">
+				AND document_id = #{documentId}
+			</if>
+			<if test="knowledgeId != null and knowledgeId != ''">
+				AND knowledge_id = #{knowledgeId}
+			</if>
+		</where>
+		order by create_time asc
+	</select>
 	
 </mapper> 

+ 30 - 0
takai-bigmodel/src/main/java/com/takai/bigmodel/domain/entity/PageParams.java

@@ -8,6 +8,12 @@ public class PageParams {
 
     private String appId;
 
+    private String userId;
+
+    private String typeId;
+
+    private String projectId;
+
     public Integer getPageNumber() {
         return pageNumber;
     }
@@ -31,4 +37,28 @@ public class PageParams {
     public void setAppId(String appId) {
         this.appId = appId;
     }
+
+    public String getUserId() {
+        return userId;
+    }
+
+    public void setUserId(String userId) {
+        this.userId = userId;
+    }
+
+    public String getTypeId() {
+        return typeId;
+    }
+
+    public void setTypeId(String typeId) {
+        this.typeId = typeId;
+    }
+
+    public String getProjectId() {
+        return projectId;
+    }
+
+    public void setProjectId(String projectId) {
+        this.projectId = projectId;
+    }
 }

+ 11 - 0
takai-common/src/main/java/com/takai/common/core/domain/entity/SysUser.java

@@ -89,6 +89,9 @@ public class SysUser extends BaseEntity
     /** 角色ID */
     private Long roleId;
 
+    /** 工号 */
+    private String workNo;
+
     public SysUser()
     {
 
@@ -297,6 +300,14 @@ public class SysUser extends BaseEntity
         this.roleId = roleId;
     }
 
+    public String getWorkNo() {
+        return workNo;
+    }
+
+    public void setWorkNo(String workNo) {
+        this.workNo = workNo;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 72 - 0
takai-common/src/main/java/com/takai/common/utils/SnowflakeDigitGenerator.java

@@ -0,0 +1,72 @@
+package com.takai.common.utils;
+
+public class SnowflakeDigitGenerator {
+
+    private final long twepoch = 1288834974657L; // 起始时间戳
+    private final long workerIdBits = 5L;
+    private final long datacenterIdBits = 5L;
+    private final long sequenceBits = 12L;
+
+    private final long maxWorkerId = -1L ^ (-1L << workerIdBits);
+    private final long maxDatacenterId = -1L ^ (-1L << datacenterIdBits);
+
+    private final long workerIdShift = sequenceBits;
+    private final long datacenterIdShift = sequenceBits + workerIdBits;
+    private final long timestampShift = sequenceBits + workerIdBits + datacenterIdBits;
+
+    private long workerId;
+    private long datacenterId;
+    private long sequence = 0L;
+    private long lastTimestamp = -1L;
+
+    public SnowflakeDigitGenerator(long workerId, long datacenterId) {
+        if (workerId > maxWorkerId || workerId < 0) {
+            throw new IllegalArgumentException("worker Id can't be greater than " + maxWorkerId + " or less than 0");
+        }
+        if (datacenterId > maxDatacenterId || datacenterId < 0) {
+            throw new IllegalArgumentException("datacenter Id can't be greater than " + maxDatacenterId + " or less than 0");
+        }
+        this.workerId = workerId;
+        this.datacenterId = datacenterId;
+    }
+
+    public synchronized long nextId() {
+        long timestamp = timeGen();
+
+        if (timestamp < lastTimestamp) {
+            throw new RuntimeException("Clock moved backwards. Refusing to generate id for " + (lastTimestamp - timestamp) + " milliseconds");
+        }
+
+        if (lastTimestamp == timestamp) {
+            sequence = (sequence + 1) & ((1 << sequenceBits) - 1);
+            if (sequence == 0) {
+                timestamp = tilNextMillis(lastTimestamp);
+            }
+        } else {
+            sequence = 0L;
+        }
+
+        lastTimestamp = timestamp;
+
+        long id = ((timestamp - twepoch) << timestampShift)
+                | (datacenterId << datacenterIdShift)
+                | (workerId << workerIdShift)
+                | sequence;
+
+        // 转换为19位数字
+        return 1000000000000000000L + (id % 9000000000000000000L);
+    }
+
+    private long tilNextMillis(long lastTimestamp) {
+        long timestamp = timeGen();
+        while (timestamp <= lastTimestamp) {
+            timestamp = timeGen();
+        }
+        return timestamp;
+    }
+
+    private long timeGen() {
+        return System.currentTimeMillis();
+    }
+
+}

+ 3 - 1
takai-framework/src/main/java/com/takai/framework/config/SecurityConfig.java

@@ -115,7 +115,9 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
                         "/**/completions", "/**/slice_info/**", "/**/async_result/**", "/**/assistant/**", "/getInfo",
                         "/checkToken", "/**/presets/**", "/**/index/**", "/**/createApplaction/**", "/**/createKnowledge/**",
                         "/**/updateKnowledge/**", "/**/detailKnowledge/**", "/**/delKnowledge/**", "/**/knowledgeList/**",
-                        "/**//bigmodel/api/**", "/**/tool/gen/**", "/**/deepseek/api/**").permitAll()
+                        "/**//bigmodel/api/**", "/**/tool/gen/**", "/**/deepseek/api/**",
+                        "/admin/login", "/**/deepseek/getInfo/**", "/**/system/info/**", "/**/system/audit/config/**",
+                        "/**/system/project/**").permitAll()
                 // 静态资源,可匿名访问
                 .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
                 .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()

+ 120 - 0
takai-system/src/main/java/com/takai/system/domain/DocumentAuditConfig.java

@@ -0,0 +1,120 @@
+package com.takai.system.domain;
+
+import com.takai.common.annotation.Excel;
+import com.takai.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 审核配置对象 document_audit_config
+ * 
+ * @author takai
+ * @date 2025-05-29
+ */
+public class DocumentAuditConfig extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 部门ID */
+    @Excel(name = "部门ID")
+    private Long deptId;
+
+    /** 项目编号 */
+    private String projectId;
+
+    /** 审核节点 */
+    @Excel(name = "审核节点")
+    private Integer nodeOrder;
+
+    /** 审核人 */
+    @Excel(name = "审核人")
+    private String approver;
+
+    /** 审核链 1/2 */
+    @Excel(name = "审核链")
+    private String chain;
+
+    private String userName;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setDeptId(Long deptId) 
+    {
+        this.deptId = deptId;
+    }
+
+    public Long getDeptId() 
+    {
+        return deptId;
+    }
+    public void setProjectId(String projectId) 
+    {
+        this.projectId = projectId;
+    }
+
+    public String getProjectId() 
+    {
+        return projectId;
+    }
+    public void setNodeOrder(Integer nodeOrder) 
+    {
+        this.nodeOrder = nodeOrder;
+    }
+
+    public Integer getNodeOrder() 
+    {
+        return nodeOrder;
+    }
+    public void setApprover(String approver)
+    {
+        this.approver = approver;
+    }
+
+    public String getApprover()
+    {
+        return approver;
+    }
+    public void setChain(String chain) 
+    {
+        this.chain = chain;
+    }
+
+    public String getChain() 
+    {
+        return chain;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("deptId", getDeptId())
+            .append("projectId", getProjectId())
+            .append("nodeOrder", getNodeOrder())
+            .append("approver", getApprover())
+            .append("chain", getChain())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 117 - 0
takai-system/src/main/java/com/takai/system/domain/DocumentAuditInfo.java

@@ -0,0 +1,117 @@
+package com.takai.system.domain;
+
+import com.takai.common.annotation.Excel;
+import com.takai.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 【请填写功能名称】对象 document_audit_info
+ * 
+ * @author takai
+ * @date 2025-05-29
+ */
+public class DocumentAuditInfo extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String appId;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private Integer nodeOrder;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String approver;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String status;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String comment;
+
+    private String userName;
+
+    private String name;
+
+    public String getAppId() {
+        return appId;
+    }
+
+    public void setAppId(String appId) {
+        this.appId = appId;
+    }
+
+    public void setNodeOrder(Integer nodeOrder)
+    {
+        this.nodeOrder = nodeOrder;
+    }
+
+    public Integer getNodeOrder() 
+    {
+        return nodeOrder;
+    }
+    public void setApprover(String approver) 
+    {
+        this.approver = approver;
+    }
+
+    public String getApprover() 
+    {
+        return approver;
+    }
+    public void setStatus(String status) 
+    {
+        this.status = status;
+    }
+
+    public String getStatus() 
+    {
+        return status;
+    }
+    public void setComment(String comment) 
+    {
+        this.comment = comment;
+    }
+
+    public String getComment() 
+    {
+        return comment;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("appId", getAppId())
+            .append("nodeOrder", getNodeOrder())
+            .append("approver", getApprover())
+            .append("status", getStatus())
+            .append("comment", getComment())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 24 - 0
takai-system/src/main/java/com/takai/system/domain/ProjectApplication.java

@@ -0,0 +1,24 @@
+package com.takai.system.domain;
+
+public class ProjectApplication {
+
+    private String projectId;
+
+    private String name;
+
+    public String getProjectId() {
+        return projectId;
+    }
+
+    public void setProjectId(String projectId) {
+        this.projectId = projectId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+}

+ 55 - 0
takai-system/src/main/java/com/takai/system/domain/SysAppType.java

@@ -0,0 +1,55 @@
+package com.takai.system.domain;
+
+import com.takai.common.annotation.Excel;
+import com.takai.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 【请填写功能名称】对象 sys_app_type
+ * 
+ * @author takai
+ * @date 2025-05-28
+ */
+public class SysAppType extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private String typeId;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String typeName;
+
+    public void setTypeId(String typeId)
+    {
+        this.typeId = typeId;
+    }
+
+    public String getTypeId()
+    {
+        return typeId;
+    }
+    public void setTypeName(String typeName)
+    {
+        this.typeName = typeName;
+    }
+
+    public String getTypeName()
+    {
+        return typeName;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("typeId", getTypeId())
+            .append("typeName", getTypeName())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 101 - 0
takai-system/src/main/java/com/takai/system/domain/SysProject.java

@@ -0,0 +1,101 @@
+package com.takai.system.domain;
+
+import com.takai.common.annotation.Excel;
+import com.takai.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 【请填写功能名称】对象 sys_project
+ * 
+ * @author takai
+ * @date 2025-05-28
+ */
+public class SysProject extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private long projectId;
+
+    /** 项目编号 */
+    @Excel(name = "项目编号")
+    private String projectPid;
+
+    /** 项目名称 */
+    @Excel(name = "项目名称")
+    private String projectName;
+
+    private String[] appId;
+
+    private String[] name;
+
+    private Long projectType;
+
+    public void setProjectId(long projectId)
+    {
+        this.projectId = projectId;
+    }
+
+    public long getProjectId()
+    {
+        return projectId;
+    }
+    public void setProjectPid(String projectPid) 
+    {
+        this.projectPid = projectPid;
+    }
+
+    public String getProjectPid() 
+    {
+        return projectPid;
+    }
+    public void setProjectName(String projectName) 
+    {
+        this.projectName = projectName;
+    }
+
+    public String getProjectName() 
+    {
+        return projectName;
+    }
+
+    public String[] getAppId() {
+        return appId;
+    }
+
+    public void setAppId(String[] appId) {
+        this.appId = appId;
+    }
+
+    public String[] getName() {
+        return name;
+    }
+
+    public void setName(String[] name) {
+        this.name = name;
+    }
+
+    public Long getProjectType() {
+        return projectType;
+    }
+
+    public void setProjectType(Long projectType) {
+        this.projectType = projectType;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("projectId", getProjectId())
+            .append("projectPid", getProjectPid())
+            .append("projectName", getProjectName())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("appId", getAppId())
+            .append("name", getName())
+            .toString();
+    }
+}

+ 44 - 0
takai-system/src/main/java/com/takai/system/domain/SysProjectApp.java

@@ -0,0 +1,44 @@
+package com.takai.system.domain;
+
+import com.takai.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+public class SysProjectApp extends BaseEntity {
+
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private String projectId;
+
+    /** $column.columnComment */
+    private String appId;
+
+    public void setProjectId(String projectId)
+    {
+        this.projectId = projectId;
+    }
+
+    public String getProjectId()
+    {
+        return projectId;
+    }
+    public void setAppId(String appId)
+    {
+        this.appId = appId;
+    }
+
+    public String getAppId()
+    {
+        return appId;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("projectId", getProjectId())
+                .append("appId", getAppId())
+                .toString();
+    }
+
+}

+ 160 - 0
takai-system/src/main/java/com/takai/system/domain/SysProjectStaff.java

@@ -0,0 +1,160 @@
+package com.takai.system.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.takai.common.annotation.Excel;
+import com.takai.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.util.Date;
+
+/**
+ * 【请填写功能名称】对象 sys_project_staff
+ * 
+ * @author takai
+ * @date 2025-05-28
+ */
+public class SysProjectStaff extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private String id;
+
+    /** 项目编号 */
+    @Excel(name = "项目编号")
+    private String projectPid;
+
+    /** 成员编号 */
+    @Excel(name = "成员编号")
+    private String mNo;
+
+    /** 角色 */
+    @Excel(name = "角色")
+    private long roleId;
+
+    /** 进入项目日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "进入项目日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date mBdate;
+
+    /** 撤出项目日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "撤出项目日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date mEdate;
+
+    private String projectName;
+
+    private long userId;
+
+    private String userName;
+
+
+    private String roleName;
+
+    public void setId(String id)
+    {
+        this.id = id;
+    }
+
+    public String getId()
+    {
+        return id;
+    }
+
+    public String getProjectPid() {
+        return projectPid;
+    }
+
+    public void setProjectPid(String projectPid) {
+        this.projectPid = projectPid;
+    }
+
+    public void setmNo(String mNo)
+    {
+        this.mNo = mNo;
+    }
+
+    public String getmNo() 
+    {
+        return mNo;
+    }
+
+    public long getRoleId() {
+        return roleId;
+    }
+
+    public void setRoleId(long roleId) {
+        this.roleId = roleId;
+    }
+
+    public void setmBdate(Date mBdate)
+    {
+        this.mBdate = mBdate;
+    }
+
+    public Date getmBdate() 
+    {
+        return mBdate;
+    }
+    public void setmEdate(Date mEdate) 
+    {
+        this.mEdate = mEdate;
+    }
+
+    public Date getmEdate() 
+    {
+        return mEdate;
+    }
+
+    public String getProjectName() {
+        return projectName;
+    }
+
+    public void setProjectName(String projectName) {
+        this.projectName = projectName;
+    }
+
+    public long getUserId() {
+        return userId;
+    }
+
+    public void setUserId(long userId) {
+        this.userId = userId;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getRoleName() {
+        return roleName;
+    }
+
+    public void setRoleName(String roleName) {
+        this.roleName = roleName;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("projectPid", getProjectPid())
+            .append("mNo", getmNo())
+            .append("role", getRoleId())
+            .append("mBdate", getmBdate())
+            .append("mEdate", getmEdate())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("projectName", getProjectName())
+            .append("userId", getUserId())
+            .append("userName", getUserName())
+            .toString();
+    }
+}

+ 24 - 0
takai-system/src/main/java/com/takai/system/domain/TypeApp.java

@@ -0,0 +1,24 @@
+package com.takai.system.domain;
+
+public class TypeApp
+{
+    private long typeId;
+
+    private String appId;
+
+    public long getTypeId() {
+        return typeId;
+    }
+
+    public void setTypeId(long typeId) {
+        this.typeId = typeId;
+    }
+
+    public String getAppId() {
+        return appId;
+    }
+
+    public void setAppId(String appId) {
+        this.appId = appId;
+    }
+}

+ 34 - 0
takai-system/src/main/java/com/takai/system/domain/bo/DocumentAuditConfigBo.java

@@ -0,0 +1,34 @@
+package com.takai.system.domain.bo;
+
+public class DocumentAuditConfigBo {
+
+    private Integer pageNumber;
+
+    private Integer pageSize;
+
+    private String approver;
+
+    public Integer getPageNumber() {
+        return pageNumber;
+    }
+
+    public void setPageNumber(Integer pageNumber) {
+        this.pageNumber = pageNumber;
+    }
+
+    public Integer getPageSize() {
+        return pageSize;
+    }
+
+    public void setPageSize(Integer pageSize) {
+        this.pageSize = pageSize;
+    }
+
+    public String getApprover() {
+        return approver;
+    }
+
+    public void setApprover(String approver) {
+        this.approver = approver;
+    }
+}

+ 65 - 0
takai-system/src/main/java/com/takai/system/mapper/DocumentAuditConfigMapper.java

@@ -0,0 +1,65 @@
+package com.takai.system.mapper;
+
+import com.takai.system.domain.DocumentAuditConfig;
+import com.takai.system.domain.bo.DocumentAuditConfigBo;
+
+import java.util.List;
+
+/**
+ * 审核配置Mapper接口
+ * 
+ * @author takai
+ * @date 2025-05-29
+ */
+public interface DocumentAuditConfigMapper 
+{
+    /**
+     * 查询审核配置
+     * 
+     * @param id 审核配置主键
+     * @return 审核配置
+     */
+    public DocumentAuditConfig selectDocumentAuditConfigById(Long id);
+
+    /**
+     * 查询审核配置列表
+     * 
+     * @param documentAuditConfig 审核配置
+     * @return 审核配置集合
+     */
+    public List<DocumentAuditConfig> selectDocumentAuditConfigList(DocumentAuditConfig documentAuditConfig);
+
+    /**
+     * 新增审核配置
+     * 
+     * @param documentAuditConfig 审核配置
+     * @return 结果
+     */
+    public int insertDocumentAuditConfig(DocumentAuditConfig documentAuditConfig);
+
+    /**
+     * 修改审核配置
+     * 
+     * @param documentAuditConfig 审核配置
+     * @return 结果
+     */
+    public int updateDocumentAuditConfig(DocumentAuditConfig documentAuditConfig);
+
+    /**
+     * 删除审核配置
+     * 
+     * @param id 审核配置主键
+     * @return 结果
+     */
+    public int deleteDocumentAuditConfigById(Long id);
+
+    /**
+     * 批量删除审核配置
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteDocumentAuditConfigByIds(Long[] ids);
+
+    public List<DocumentAuditConfig> selectDocumentAuditConfigListByBo(DocumentAuditConfigBo documentAuditConfigBo);
+}

+ 62 - 0
takai-system/src/main/java/com/takai/system/mapper/DocumentAuditInfoMapper.java

@@ -0,0 +1,62 @@
+package com.takai.system.mapper;
+
+import com.takai.system.domain.DocumentAuditInfo;
+
+import java.util.List;
+
+/**
+ * 【请填写功能名称】Mapper接口
+ * 
+ * @author takai
+ * @date 2025-05-29
+ */
+public interface DocumentAuditInfoMapper 
+{
+    /**
+     * 查询【请填写功能名称】
+     * 
+     * @param documentId 【请填写功能名称】主键
+     * @return 【请填写功能名称】
+     */
+    public DocumentAuditInfo selectDocumentAuditInfoByDocumentId(String documentId);
+
+    /**
+     * 查询【请填写功能名称】列表
+     * 
+     * @param documentAuditInfo 【请填写功能名称】
+     * @return 【请填写功能名称】集合
+     */
+    public List<DocumentAuditInfo> selectDocumentAuditInfoList(DocumentAuditInfo documentAuditInfo);
+
+    /**
+     * 新增【请填写功能名称】
+     * 
+     * @param documentAuditInfo 【请填写功能名称】
+     * @return 结果
+     */
+    public int insertDocumentAuditInfo(DocumentAuditInfo documentAuditInfo);
+
+    /**
+     * 修改【请填写功能名称】
+     * 
+     * @param documentAuditInfo 【请填写功能名称】
+     * @return 结果
+     */
+    public int updateDocumentAuditInfo(DocumentAuditInfo documentAuditInfo);
+
+    /**
+     * 删除【请填写功能名称】
+     * 
+     * @param documentId 【请填写功能名称】主键
+     * @return 结果
+     */
+    public int deleteDocumentAuditInfoByDocumentId(String documentId);
+
+    /**
+     * 批量删除【请填写功能名称】
+     * 
+     * @param documentIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteDocumentAuditInfoByDocumentIds(String[] documentIds);
+}

+ 62 - 0
takai-system/src/main/java/com/takai/system/mapper/SysAppTypeMapper.java

@@ -0,0 +1,62 @@
+package com.takai.system.mapper;
+
+import com.takai.system.domain.SysAppType;
+
+import java.util.List;
+
+/**
+ * 【请填写功能名称】Mapper接口
+ * 
+ * @author takai
+ * @date 2025-05-28
+ */
+public interface SysAppTypeMapper 
+{
+    /**
+     * 查询【请填写功能名称】
+     * 
+     * @param typeId 【请填写功能名称】主键
+     * @return 【请填写功能名称】
+     */
+    public SysAppType selectSysAppTypeByTypeId(String typeId);
+
+    /**
+     * 查询【请填写功能名称】列表
+     * 
+     * @param sysAppType 【请填写功能名称】
+     * @return 【请填写功能名称】集合
+     */
+    public List<SysAppType> selectSysAppTypeList(SysAppType sysAppType);
+
+    /**
+     * 新增【请填写功能名称】
+     * 
+     * @param sysAppType 【请填写功能名称】
+     * @return 结果
+     */
+    public int insertSysAppType(SysAppType sysAppType);
+
+    /**
+     * 修改【请填写功能名称】
+     * 
+     * @param sysAppType 【请填写功能名称】
+     * @return 结果
+     */
+    public int updateSysAppType(SysAppType sysAppType);
+
+    /**
+     * 删除【请填写功能名称】
+     * 
+     * @param typeId 【请填写功能名称】主键
+     * @return 结果
+     */
+    public int deleteSysAppTypeByTypeId(String typeId);
+
+    /**
+     * 批量删除【请填写功能名称】
+     * 
+     * @param typeIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteSysAppTypeByTypeIds(String[] typeIds);
+}

+ 62 - 0
takai-system/src/main/java/com/takai/system/mapper/SysProjectAppMapper.java

@@ -0,0 +1,62 @@
+package com.takai.system.mapper;
+
+import com.takai.system.domain.ProjectApplication;
+import com.takai.system.domain.SysProject;
+import com.takai.system.domain.SysProjectApp;
+
+import java.util.List;
+
+public interface SysProjectAppMapper {
+
+    /**
+     * 查询【请填写功能名称】
+     *
+     * @param projectId 【请填写功能名称】主键
+     * @return 【请填写功能名称】
+     */
+    public SysProjectApp selectSysProjectAppByProjectId(String projectId);
+
+    /**
+     * 查询【请填写功能名称】列表
+     *
+     * @param sysProjectApp 【请填写功能名称】
+     * @return 【请填写功能名称】集合
+     */
+    public List<SysProjectApp> selectSysProjectAppList(SysProjectApp sysProjectApp);
+
+    /**
+     * 新增【请填写功能名称】
+     *
+     * @param sysProjectApp 【请填写功能名称】
+     * @return 结果
+     */
+    public int insertSysProjectApp(SysProjectApp sysProjectApp);
+
+    /**
+     * 修改【请填写功能名称】
+     *
+     * @param sysProjectApp 【请填写功能名称】
+     * @return 结果
+     */
+    public int updateSysProjectApp(SysProjectApp sysProjectApp);
+
+    /**
+     * 删除【请填写功能名称】
+     *
+     * @param projectId 【请填写功能名称】主键
+     * @return 结果
+     */
+    public int deleteSysProjectAppByProjectId(String projectId);
+
+    /**
+     * 批量删除【请填写功能名称】
+     *
+     * @param projectIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteSysProjectAppByProjectIds(String[] projectIds);
+
+    public List<ProjectApplication> selectSysProjectApplicationList(SysProjectApp sysProjectApp);
+
+
+}

+ 62 - 0
takai-system/src/main/java/com/takai/system/mapper/SysProjectMapper.java

@@ -0,0 +1,62 @@
+package com.takai.system.mapper;
+
+import com.takai.system.domain.SysProject;
+
+import java.util.List;
+
+/**
+ * 【请填写功能名称】Mapper接口
+ * 
+ * @author takai
+ * @date 2025-05-28
+ */
+public interface SysProjectMapper 
+{
+    /**
+     * 查询【请填写功能名称】
+     * 
+     * @param projectId 【请填写功能名称】主键
+     * @return 【请填写功能名称】
+     */
+    public SysProject selectSysProjectByProjectId(String projectId);
+
+    /**
+     * 查询【请填写功能名称】列表
+     * 
+     * @param sysProject 【请填写功能名称】
+     * @return 【请填写功能名称】集合
+     */
+    public List<SysProject> selectSysProjectList(SysProject sysProject);
+
+    /**
+     * 新增【请填写功能名称】
+     * 
+     * @param sysProject 【请填写功能名称】
+     * @return 结果
+     */
+    public int insertSysProject(SysProject sysProject);
+
+    /**
+     * 修改【请填写功能名称】
+     * 
+     * @param sysProject 【请填写功能名称】
+     * @return 结果
+     */
+    public int updateSysProject(SysProject sysProject);
+
+    /**
+     * 删除【请填写功能名称】
+     * 
+     * @param projectId 【请填写功能名称】主键
+     * @return 结果
+     */
+    public int deleteSysProjectByProjectId(String projectId);
+
+    /**
+     * 批量删除【请填写功能名称】
+     * 
+     * @param projectIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteSysProjectByProjectIds(String[] projectIds);
+}

+ 62 - 0
takai-system/src/main/java/com/takai/system/mapper/SysProjectStaffMapper.java

@@ -0,0 +1,62 @@
+package com.takai.system.mapper;
+
+import com.takai.system.domain.SysProjectStaff;
+
+import java.util.List;
+
+/**
+ * 【请填写功能名称】Mapper接口
+ * 
+ * @author takai
+ * @date 2025-05-28
+ */
+public interface SysProjectStaffMapper 
+{
+    /**
+     * 查询【请填写功能名称】
+     * 
+     * @param id 【请填写功能名称】主键
+     * @return 【请填写功能名称】
+     */
+    public SysProjectStaff selectSysProjectStaffById(Long id);
+
+    /**
+     * 查询【请填写功能名称】列表
+     * 
+     * @param sysProjectStaff 【请填写功能名称】
+     * @return 【请填写功能名称】集合
+     */
+    public List<SysProjectStaff> selectSysProjectStaffList(SysProjectStaff sysProjectStaff);
+
+    /**
+     * 新增【请填写功能名称】
+     * 
+     * @param sysProjectStaff 【请填写功能名称】
+     * @return 结果
+     */
+    public int insertSysProjectStaff(SysProjectStaff sysProjectStaff);
+
+    /**
+     * 修改【请填写功能名称】
+     * 
+     * @param sysProjectStaff 【请填写功能名称】
+     * @return 结果
+     */
+    public int updateSysProjectStaff(SysProjectStaff sysProjectStaff);
+
+    /**
+     * 删除【请填写功能名称】
+     * 
+     * @param id 【请填写功能名称】主键
+     * @return 结果
+     */
+    public int deleteSysProjectStaffById(Long id);
+
+    /**
+     * 批量删除【请填写功能名称】
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteSysProjectStaffByIds(Long[] ids);
+}

+ 56 - 0
takai-system/src/main/java/com/takai/system/mapper/TypeAppMapper.java

@@ -0,0 +1,56 @@
+package com.takai.system.mapper;
+
+
+import com.takai.system.domain.TypeApp;
+
+import java.util.List;
+
+/**
+ * 【请填写功能名称】Mapper接口
+ * 
+ * @author takai
+ * @date 2025-05-28
+ */
+public interface TypeAppMapper
+{
+    /**
+     * 查询【请填写功能名称】
+     * 
+     * @param typeId 【请填写功能名称】主键
+     * @return 【请填写功能名称】
+     */
+    public TypeApp selectAppTypeByTypeId(long typeId, String appId);
+
+    /**
+     * 查询【请填写功能名称】列表
+     * 
+     * @param AppType 【请填写功能名称】
+     * @return 【请填写功能名称】集合
+     */
+    public List<TypeApp> selectAppTypeList(TypeApp appType);
+
+    /**
+     * 新增【请填写功能名称】
+     * 
+     * @param AppType 【请填写功能名称】
+     * @return 结果
+     */
+    public int insertAppType(TypeApp appType);
+
+    /**
+     * 修改【请填写功能名称】
+     * 
+     * @param AppType 【请填写功能名称】
+     * @return 结果
+     */
+    public int updateAppType(TypeApp appType);
+
+    /**
+     * 删除【请填写功能名称】
+     * 
+     * @param typeId 【请填写功能名称】主键
+     * @return 结果
+     */
+    public int deleteAppTypeByTypeId(long typeId, String appId);
+
+}

+ 65 - 0
takai-system/src/main/java/com/takai/system/service/IDocumentAuditConfigService.java

@@ -0,0 +1,65 @@
+package com.takai.system.service;
+
+import com.takai.system.domain.DocumentAuditConfig;
+import com.takai.system.domain.bo.DocumentAuditConfigBo;
+
+import java.util.List;
+
+/**
+ * 审核配置Service接口
+ * 
+ * @author takai
+ * @date 2025-05-29
+ */
+public interface IDocumentAuditConfigService 
+{
+    /**
+     * 查询审核配置
+     * 
+     * @param id 审核配置主键
+     * @return 审核配置
+     */
+    public DocumentAuditConfig selectDocumentAuditConfigById(Long id);
+
+    /**
+     * 查询审核配置列表
+     * 
+     * @param documentAuditConfig 审核配置
+     * @return 审核配置集合
+     */
+    public List<DocumentAuditConfig> selectDocumentAuditConfigList(DocumentAuditConfig documentAuditConfig);
+
+    /**
+     * 新增审核配置
+     * 
+     * @param documentAuditConfig 审核配置
+     * @return 结果
+     */
+    public int insertDocumentAuditConfig(DocumentAuditConfig documentAuditConfig);
+
+    /**
+     * 修改审核配置
+     * 
+     * @param documentAuditConfig 审核配置
+     * @return 结果
+     */
+    public int updateDocumentAuditConfig(DocumentAuditConfig documentAuditConfig);
+
+    /**
+     * 批量删除审核配置
+     * 
+     * @param ids 需要删除的审核配置主键集合
+     * @return 结果
+     */
+    public int deleteDocumentAuditConfigByIds(Long[] ids);
+
+    /**
+     * 删除审核配置信息
+     * 
+     * @param id 审核配置主键
+     * @return 结果
+     */
+    public int deleteDocumentAuditConfigById(Long id);
+
+    public List<DocumentAuditConfig> selectDocumentAuditConfigListByBo(DocumentAuditConfigBo documentAuditConfigBo);
+}

+ 62 - 0
takai-system/src/main/java/com/takai/system/service/IDocumentAuditInfoService.java

@@ -0,0 +1,62 @@
+package com.takai.system.service;
+
+import com.takai.system.domain.DocumentAuditInfo;
+
+import java.util.List;
+
+/**
+ * 【请填写功能名称】Service接口
+ * 
+ * @author takai
+ * @date 2025-05-29
+ */
+public interface IDocumentAuditInfoService 
+{
+    /**
+     * 查询【请填写功能名称】
+     * 
+     * @param documentId 【请填写功能名称】主键
+     * @return 【请填写功能名称】
+     */
+    public DocumentAuditInfo selectDocumentAuditInfoByDocumentId(String documentId);
+
+    /**
+     * 查询【请填写功能名称】列表
+     * 
+     * @param documentAuditInfo 【请填写功能名称】
+     * @return 【请填写功能名称】集合
+     */
+    public List<DocumentAuditInfo> selectDocumentAuditInfoList(DocumentAuditInfo documentAuditInfo);
+
+    /**
+     * 新增【请填写功能名称】
+     * 
+     * @param documentAuditInfo 【请填写功能名称】
+     * @return 结果
+     */
+    public int insertDocumentAuditInfo(DocumentAuditInfo documentAuditInfo);
+
+    /**
+     * 修改【请填写功能名称】
+     * 
+     * @param documentAuditInfo 【请填写功能名称】
+     * @return 结果
+     */
+    public int updateDocumentAuditInfo(DocumentAuditInfo documentAuditInfo);
+
+    /**
+     * 批量删除【请填写功能名称】
+     * 
+     * @param documentIds 需要删除的【请填写功能名称】主键集合
+     * @return 结果
+     */
+    public int deleteDocumentAuditInfoByDocumentIds(String[] documentIds);
+
+    /**
+     * 删除【请填写功能名称】信息
+     * 
+     * @param documentId 【请填写功能名称】主键
+     * @return 结果
+     */
+    public int deleteDocumentAuditInfoByDocumentId(String documentId);
+}

+ 62 - 0
takai-system/src/main/java/com/takai/system/service/ISysAppTypeService.java

@@ -0,0 +1,62 @@
+package com.takai.system.service;
+
+import com.takai.system.domain.SysAppType;
+
+import java.util.List;
+
+/**
+ * 【请填写功能名称】Service接口
+ * 
+ * @author takai
+ * @date 2025-05-28
+ */
+public interface ISysAppTypeService 
+{
+    /**
+     * 查询【请填写功能名称】
+     * 
+     * @param typeId 【请填写功能名称】主键
+     * @return 【请填写功能名称】
+     */
+    public SysAppType selectSysAppTypeByTypeId(String typeId);
+
+    /**
+     * 查询【请填写功能名称】列表
+     * 
+     * @param sysAppType 【请填写功能名称】
+     * @return 【请填写功能名称】集合
+     */
+    public List<SysAppType> selectSysAppTypeList(SysAppType sysAppType);
+
+    /**
+     * 新增【请填写功能名称】
+     * 
+     * @param sysAppType 【请填写功能名称】
+     * @return 结果
+     */
+    public int insertSysAppType(SysAppType sysAppType);
+
+    /**
+     * 修改【请填写功能名称】
+     * 
+     * @param sysAppType 【请填写功能名称】
+     * @return 结果
+     */
+    public int updateSysAppType(SysAppType sysAppType);
+
+    /**
+     * 批量删除【请填写功能名称】
+     * 
+     * @param typeIds 需要删除的【请填写功能名称】主键集合
+     * @return 结果
+     */
+    public int deleteSysAppTypeByTypeIds(String[] typeIds);
+
+    /**
+     * 删除【请填写功能名称】信息
+     * 
+     * @param typeId 【请填写功能名称】主键
+     * @return 结果
+     */
+    public int deleteSysAppTypeByTypeId(String typeId);
+}

+ 62 - 0
takai-system/src/main/java/com/takai/system/service/ISysProjectService.java

@@ -0,0 +1,62 @@
+package com.takai.system.service;
+
+import com.takai.system.domain.SysProject;
+
+import java.util.List;
+
+/**
+ * 【请填写功能名称】Service接口
+ * 
+ * @author takai
+ * @date 2025-05-28
+ */
+public interface ISysProjectService 
+{
+    /**
+     * 查询【请填写功能名称】
+     * 
+     * @param projectId 【请填写功能名称】主键
+     * @return 【请填写功能名称】
+     */
+    public SysProject selectSysProjectByProjectId(String projectId);
+
+    /**
+     * 查询【请填写功能名称】列表
+     * 
+     * @param sysProject 【请填写功能名称】
+     * @return 【请填写功能名称】集合
+     */
+    public List<SysProject> selectSysProjectList(SysProject sysProject);
+
+    /**
+     * 新增【请填写功能名称】
+     * 
+     * @param sysProject 【请填写功能名称】
+     * @return 结果
+     */
+    public int insertSysProject(SysProject sysProject);
+
+    /**
+     * 修改【请填写功能名称】
+     * 
+     * @param sysProject 【请填写功能名称】
+     * @return 结果
+     */
+    public int updateSysProject(SysProject sysProject);
+
+    /**
+     * 批量删除【请填写功能名称】
+     * 
+     * @param projectIds 需要删除的【请填写功能名称】主键集合
+     * @return 结果
+     */
+    public int deleteSysProjectByProjectIds(String[] projectIds);
+
+    /**
+     * 删除【请填写功能名称】信息
+     * 
+     * @param projectId 【请填写功能名称】主键
+     * @return 结果
+     */
+    public int deleteSysProjectByProjectId(String projectId, String appId);
+}

+ 62 - 0
takai-system/src/main/java/com/takai/system/service/ISysProjectStaffService.java

@@ -0,0 +1,62 @@
+package com.takai.system.service;
+
+import com.takai.system.domain.SysProjectStaff;
+
+import java.util.List;
+
+/**
+ * 【请填写功能名称】Service接口
+ * 
+ * @author takai
+ * @date 2025-05-28
+ */
+public interface ISysProjectStaffService 
+{
+    /**
+     * 查询【请填写功能名称】
+     * 
+     * @param id 【请填写功能名称】主键
+     * @return 【请填写功能名称】
+     */
+    public SysProjectStaff selectSysProjectStaffById(Long id);
+
+    /**
+     * 查询【请填写功能名称】列表
+     * 
+     * @param sysProjectStaff 【请填写功能名称】
+     * @return 【请填写功能名称】集合
+     */
+    public List<SysProjectStaff> selectSysProjectStaffList(SysProjectStaff sysProjectStaff);
+
+    /**
+     * 新增【请填写功能名称】
+     * 
+     * @param sysProjectStaff 【请填写功能名称】
+     * @return 结果
+     */
+    public int insertSysProjectStaff(SysProjectStaff sysProjectStaff);
+
+    /**
+     * 修改【请填写功能名称】
+     * 
+     * @param sysProjectStaff 【请填写功能名称】
+     * @return 结果
+     */
+    public int updateSysProjectStaff(SysProjectStaff sysProjectStaff);
+
+    /**
+     * 批量删除【请填写功能名称】
+     * 
+     * @param ids 需要删除的【请填写功能名称】主键集合
+     * @return 结果
+     */
+    public int deleteSysProjectStaffByIds(Long[] ids);
+
+    /**
+     * 删除【请填写功能名称】信息
+     * 
+     * @param id 【请填写功能名称】主键
+     * @return 结果
+     */
+    public int deleteSysProjectStaffById(Long id);
+}

+ 128 - 0
takai-system/src/main/java/com/takai/system/service/impl/DocumentAuditConfigServiceImpl.java

@@ -0,0 +1,128 @@
+package com.takai.system.service.impl;
+
+import com.takai.common.utils.DateUtils;
+import com.takai.system.domain.DocumentAuditConfig;
+import com.takai.system.domain.bo.DocumentAuditConfigBo;
+import com.takai.system.mapper.DocumentAuditConfigMapper;
+import com.takai.system.service.IDocumentAuditConfigService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 审核配置Service业务层处理
+ * 
+ * @author takai
+ * @date 2025-05-29
+ */
+@Service
+public class DocumentAuditConfigServiceImpl implements IDocumentAuditConfigService 
+{
+    @Autowired
+    private DocumentAuditConfigMapper documentAuditConfigMapper;
+
+    /**
+     * 查询审核配置
+     * 
+     * @param id 审核配置主键
+     * @return 审核配置
+     */
+    @Override
+    public DocumentAuditConfig selectDocumentAuditConfigById(Long id)
+    {
+        return documentAuditConfigMapper.selectDocumentAuditConfigById(id);
+    }
+
+    /**
+     * 查询审核配置列表
+     * 
+     * @param documentAuditConfig 审核配置
+     * @return 审核配置
+     */
+    @Override
+    public List<DocumentAuditConfig> selectDocumentAuditConfigList(DocumentAuditConfig documentAuditConfig)
+    {
+        return documentAuditConfigMapper.selectDocumentAuditConfigList(documentAuditConfig);
+    }
+
+    /**
+     * 新增审核配置
+     * 
+     * @param documentAuditConfig 审核配置
+     * @return 结果
+     */
+    @Override
+    public int insertDocumentAuditConfig(DocumentAuditConfig documentAuditConfig)
+    {
+        documentAuditConfig.setCreateTime(DateUtils.getNowDate());
+        int i = documentAuditConfigMapper.insertDocumentAuditConfig(documentAuditConfig);
+        if(i > 0){
+            updateChain();
+        }
+        return i;
+    }
+
+    /**
+     * 修改审核配置
+     * 
+     * @param documentAuditConfig 审核配置
+     * @return 结果
+     */
+    @Override
+    public int updateDocumentAuditConfig(DocumentAuditConfig documentAuditConfig)
+    {
+        documentAuditConfig.setUpdateTime(DateUtils.getNowDate());
+        return documentAuditConfigMapper.updateDocumentAuditConfig(documentAuditConfig);
+    }
+
+    /**
+     * 批量删除审核配置
+     * 
+     * @param ids 需要删除的审核配置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteDocumentAuditConfigByIds(Long[] ids)
+    {
+        int i = documentAuditConfigMapper.deleteDocumentAuditConfigByIds(ids);
+        if(i > 0){
+            updateChain();
+        }
+        return i;
+    }
+
+    private void updateChain(){
+        // 获取所有审核配置信息
+        List<DocumentAuditConfig> list = documentAuditConfigMapper.selectDocumentAuditConfigListByBo(null);
+        String chain =list.stream()
+                .map(DocumentAuditConfig::getId)
+                .map(String::valueOf)
+                .collect(Collectors.joining("/"));
+        for (int i=0; i< list.size(); i++){
+            // 审核节点顺序
+            list.get(i).setNodeOrder(i+1);
+            // 更新审核链
+            list.get(i).setChain(chain);
+            documentAuditConfigMapper.updateDocumentAuditConfig(list.get(i));
+        }
+    }
+
+    /**
+     * 删除审核配置信息
+     * 
+     * @param id 审核配置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteDocumentAuditConfigById(Long id)
+    {
+        return documentAuditConfigMapper.deleteDocumentAuditConfigById(id);
+    }
+
+    @Override
+    public List<DocumentAuditConfig> selectDocumentAuditConfigListByBo(DocumentAuditConfigBo documentAuditConfigBo) {
+        return documentAuditConfigMapper.selectDocumentAuditConfigListByBo(documentAuditConfigBo);
+    }
+}

+ 97 - 0
takai-system/src/main/java/com/takai/system/service/impl/DocumentAuditInfoServiceImpl.java

@@ -0,0 +1,97 @@
+package com.takai.system.service.impl;
+
+import com.takai.common.utils.DateUtils;
+import com.takai.system.domain.DocumentAuditInfo;
+import com.takai.system.mapper.DocumentAuditInfoMapper;
+import com.takai.system.service.IDocumentAuditInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 【请填写功能名称】Service业务层处理
+ * 
+ * @author takai
+ * @date 2025-05-29
+ */
+@Service
+public class DocumentAuditInfoServiceImpl implements IDocumentAuditInfoService 
+{
+    @Autowired
+    private DocumentAuditInfoMapper documentAuditInfoMapper;
+
+    /**
+     * 查询【请填写功能名称】
+     * 
+     * @param documentId 【请填写功能名称】主键
+     * @return 【请填写功能名称】
+     */
+    @Override
+    public DocumentAuditInfo selectDocumentAuditInfoByDocumentId(String documentId)
+    {
+        return documentAuditInfoMapper.selectDocumentAuditInfoByDocumentId(documentId);
+    }
+
+    /**
+     * 查询【请填写功能名称】列表
+     * 
+     * @param documentAuditInfo 【请填写功能名称】
+     * @return 【请填写功能名称】
+     */
+    @Override
+    public List<DocumentAuditInfo> selectDocumentAuditInfoList(DocumentAuditInfo documentAuditInfo)
+    {
+        return documentAuditInfoMapper.selectDocumentAuditInfoList(documentAuditInfo);
+    }
+
+    /**
+     * 新增【请填写功能名称】
+     * 
+     * @param documentAuditInfo 【请填写功能名称】
+     * @return 结果
+     */
+    @Override
+    public int insertDocumentAuditInfo(DocumentAuditInfo documentAuditInfo)
+    {
+        documentAuditInfo.setCreateTime(DateUtils.getNowDate());
+        return documentAuditInfoMapper.insertDocumentAuditInfo(documentAuditInfo);
+    }
+
+    /**
+     * 修改【请填写功能名称】
+     * 
+     * @param documentAuditInfo 【请填写功能名称】
+     * @return 结果
+     */
+    @Override
+    public int updateDocumentAuditInfo(DocumentAuditInfo documentAuditInfo)
+    {
+        documentAuditInfo.setUpdateTime(DateUtils.getNowDate());
+        return documentAuditInfoMapper.updateDocumentAuditInfo(documentAuditInfo);
+    }
+
+    /**
+     * 批量删除【请填写功能名称】
+     * 
+     * @param documentIds 需要删除的【请填写功能名称】主键
+     * @return 结果
+     */
+    @Override
+    public int deleteDocumentAuditInfoByDocumentIds(String[] documentIds)
+    {
+        return documentAuditInfoMapper.deleteDocumentAuditInfoByDocumentIds(documentIds);
+    }
+
+    /**
+     * 删除【请填写功能名称】信息
+     * 
+     * @param documentId 【请填写功能名称】主键
+     * @return 结果
+     */
+    @Override
+    public int deleteDocumentAuditInfoByDocumentId(String documentId)
+    {
+        return documentAuditInfoMapper.deleteDocumentAuditInfoByDocumentId(documentId);
+    }
+}

+ 100 - 0
takai-system/src/main/java/com/takai/system/service/impl/SysAppTypeServiceImpl.java

@@ -0,0 +1,100 @@
+package com.takai.system.service.impl;
+
+import com.takai.common.utils.DateUtils;
+import com.takai.common.utils.SnowflakeDigitGenerator;
+import com.takai.system.domain.SysAppType;
+import com.takai.system.mapper.SysAppTypeMapper;
+import com.takai.system.service.ISysAppTypeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 【请填写功能名称】Service业务层处理
+ * 
+ * @author takai
+ * @date 2025-05-28
+ */
+@Service
+public class SysAppTypeServiceImpl implements ISysAppTypeService 
+{
+    @Autowired
+    private SysAppTypeMapper sysAppTypeMapper;
+
+    /**
+     * 查询【请填写功能名称】
+     * 
+     * @param typeId 【请填写功能名称】主键
+     * @return 【请填写功能名称】
+     */
+    @Override
+    public SysAppType selectSysAppTypeByTypeId(String typeId)
+    {
+        return sysAppTypeMapper.selectSysAppTypeByTypeId(typeId);
+    }
+
+    /**
+     * 查询【请填写功能名称】列表
+     * 
+     * @param sysAppType 【请填写功能名称】
+     * @return 【请填写功能名称】
+     */
+    @Override
+    public List<SysAppType> selectSysAppTypeList(SysAppType sysAppType)
+    {
+        return sysAppTypeMapper.selectSysAppTypeList(sysAppType);
+    }
+
+    /**
+     * 新增【请填写功能名称】
+     * 
+     * @param sysAppType 【请填写功能名称】
+     * @return 结果
+     */
+    @Override
+    public int insertSysAppType(SysAppType sysAppType)
+    {
+        SnowflakeDigitGenerator snowflakeDigitGenerator = new SnowflakeDigitGenerator(1, 1);
+        sysAppType.setCreateTime(DateUtils.getNowDate());
+        sysAppType.setTypeId(String.valueOf(snowflakeDigitGenerator.nextId()));
+        return sysAppTypeMapper.insertSysAppType(sysAppType);
+    }
+
+    /**
+     * 修改【请填写功能名称】
+     * 
+     * @param sysAppType 【请填写功能名称】
+     * @return 结果
+     */
+    @Override
+    public int updateSysAppType(SysAppType sysAppType)
+    {
+        sysAppType.setUpdateTime(DateUtils.getNowDate());
+        return sysAppTypeMapper.updateSysAppType(sysAppType);
+    }
+
+    /**
+     * 批量删除【请填写功能名称】
+     * 
+     * @param typeIds 需要删除的【请填写功能名称】主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysAppTypeByTypeIds(String[] typeIds)
+    {
+        return sysAppTypeMapper.deleteSysAppTypeByTypeIds(typeIds);
+    }
+
+    /**
+     * 删除【请填写功能名称】信息
+     * 
+     * @param typeId 【请填写功能名称】主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysAppTypeByTypeId(String typeId)
+    {
+        return sysAppTypeMapper.deleteSysAppTypeByTypeId(typeId);
+    }
+}

+ 155 - 0
takai-system/src/main/java/com/takai/system/service/impl/SysProjectServiceImpl.java

@@ -0,0 +1,155 @@
+package com.takai.system.service.impl;
+
+import com.takai.common.utils.DateUtils;
+import com.takai.common.utils.SnowflakeDigitGenerator;
+import com.takai.system.domain.ProjectApplication;
+import com.takai.system.domain.SysProject;
+import com.takai.system.domain.SysProjectApp;
+import com.takai.system.mapper.SysProjectAppMapper;
+import com.takai.system.mapper.SysProjectMapper;
+import com.takai.system.service.ISysProjectService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 【请填写功能名称】Service业务层处理
+ * 
+ * @author takai
+ * @date 2025-05-28
+ */
+@Service
+public class SysProjectServiceImpl implements ISysProjectService 
+{
+    @Autowired
+    private SysProjectMapper sysProjectMapper;
+
+    @Autowired
+    private SysProjectAppMapper  sysProjectAppMapper;
+
+    /**
+     * 查询【请填写功能名称】
+     * 
+     * @param projectId 【请填写功能名称】主键
+     * @return 【请填写功能名称】
+     */
+    @Override
+    public SysProject selectSysProjectByProjectId(String projectId)
+    {
+        SysProject vo = sysProjectMapper.selectSysProjectByProjectId(projectId);
+        if(vo!= null){
+            SysProjectApp params = new SysProjectApp();
+            params.setProjectId(projectId);
+            List<SysProjectApp> sysProjectApps = sysProjectAppMapper.selectSysProjectAppList(params);
+            List<String> appIds = new ArrayList<>();
+            for (SysProjectApp sysProjectApp : sysProjectApps){
+                appIds.add(sysProjectApp.getAppId());
+            }
+            vo.setAppId(appIds.toArray(new String[appIds.size()]));
+        }
+        return vo;
+    }
+
+    /**
+     * 查询【请填写功能名称】列表
+     * 
+     * @param sysProject 【请填写功能名称】
+     * @return 【请填写功能名称】
+     */
+    @Override
+    public List<SysProject> selectSysProjectList(SysProject sysProject)
+    {
+        List<SysProject> list = sysProjectMapper.selectSysProjectList(sysProject);
+        for (SysProject sysProjects : list){
+            SysProjectApp params = new SysProjectApp();
+            params.setProjectId(String.valueOf(sysProjects.getProjectId()));
+            List<ProjectApplication> sysProjectApps = sysProjectAppMapper.selectSysProjectApplicationList(params);
+            List<String> names = new ArrayList<>();
+            for (ProjectApplication sysProjectApp : sysProjectApps){
+                names.add(sysProjectApp.getName());
+            }
+            sysProjects.setName(names.toArray(new String[names.size()]));
+        }
+        return list;
+    }
+
+    /**
+     * 新增【请填写功能名称】
+     * 
+     * @param sysProject 【请填写功能名称】
+     * @return 结果
+     */
+    @Override
+    public int insertSysProject(SysProject sysProject)
+    {
+        SnowflakeDigitGenerator snowflakeDigitGenerator = new SnowflakeDigitGenerator(1, 1);
+        long projectPId = snowflakeDigitGenerator.nextId();
+        sysProject.setCreateTime(DateUtils.getNowDate());
+        sysProject.setProjectPid(String.valueOf(projectPId));
+        int i = sysProjectMapper.insertSysProject(sysProject);
+        if(i > 0){
+            for (String appId : sysProject.getAppId()){
+                SysProjectApp sysProjectApp = new SysProjectApp();
+                sysProjectApp.setProjectId(String.valueOf(sysProject.getProjectId()));
+                sysProjectApp.setAppId(appId);
+                sysProjectAppMapper.insertSysProjectApp(sysProjectApp);
+            }
+        }
+        return i;
+    }
+
+    /**
+     * 修改【请填写功能名称】
+     * 
+     * @param sysProject 【请填写功能名称】
+     * @return 结果
+     */
+    @Override
+    public int updateSysProject(SysProject sysProject)
+    {
+        sysProject.setUpdateTime(DateUtils.getNowDate());
+        int i = sysProjectMapper.updateSysProject(sysProject);
+        if(i > 0){
+            int successI = sysProjectAppMapper.deleteSysProjectAppByProjectId(String.valueOf(sysProject.getProjectId()));
+            if(successI > 0){
+                for (String appId : sysProject.getAppId()){
+                    SysProjectApp sysProjectApp = new SysProjectApp();
+                    sysProjectApp.setProjectId(String.valueOf(sysProject.getProjectId()));
+                    sysProjectApp.setAppId(appId);
+                    sysProjectAppMapper.insertSysProjectApp(sysProjectApp);
+                }
+            }
+        }
+        return i;
+    }
+
+    /**
+     * 批量删除【请填写功能名称】
+     * 
+     * @param projectIds 需要删除的【请填写功能名称】主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysProjectByProjectIds(String[] projectIds)
+    {
+        int i = sysProjectMapper.deleteSysProjectByProjectIds(projectIds);
+        if(i > 0){
+            sysProjectAppMapper.deleteSysProjectAppByProjectIds(projectIds);
+        }
+        return i;
+    }
+
+    /**
+     * 删除【请填写功能名称】信息
+     * 
+     * @param projectId 【请填写功能名称】主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysProjectByProjectId(String projectId, String appId)
+    {
+        return sysProjectMapper.deleteSysProjectByProjectId(projectId);
+    }
+}

+ 100 - 0
takai-system/src/main/java/com/takai/system/service/impl/SysProjectStaffServiceImpl.java

@@ -0,0 +1,100 @@
+package com.takai.system.service.impl;
+
+import com.takai.common.utils.DateUtils;
+import com.takai.common.utils.SnowflakeDigitGenerator;
+import com.takai.system.domain.SysProjectStaff;
+import com.takai.system.mapper.SysProjectStaffMapper;
+import com.takai.system.service.ISysProjectStaffService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 【请填写功能名称】Service业务层处理
+ * 
+ * @author takai
+ * @date 2025-05-28
+ */
+@Service
+public class SysProjectStaffServiceImpl implements ISysProjectStaffService 
+{
+    @Autowired
+    private SysProjectStaffMapper sysProjectStaffMapper;
+
+    /**
+     * 查询【请填写功能名称】
+     * 
+     * @param id 【请填写功能名称】主键
+     * @return 【请填写功能名称】
+     */
+    @Override
+    public SysProjectStaff selectSysProjectStaffById(Long id)
+    {
+        return sysProjectStaffMapper.selectSysProjectStaffById(id);
+    }
+
+    /**
+     * 查询【请填写功能名称】列表
+     * 
+     * @param sysProjectStaff 【请填写功能名称】
+     * @return 【请填写功能名称】
+     */
+    @Override
+    public List<SysProjectStaff> selectSysProjectStaffList(SysProjectStaff sysProjectStaff)
+    {
+        return sysProjectStaffMapper.selectSysProjectStaffList(sysProjectStaff);
+    }
+
+    /**
+     * 新增【请填写功能名称】
+     * 
+     * @param sysProjectStaff 【请填写功能名称】
+     * @return 结果
+     */
+    @Override
+    public int insertSysProjectStaff(SysProjectStaff sysProjectStaff)
+    {
+        SnowflakeDigitGenerator snowflakeDigitGenerator = new SnowflakeDigitGenerator(1, 1);
+        sysProjectStaff.setCreateTime(DateUtils.getNowDate());
+        sysProjectStaff.setId(String.valueOf(snowflakeDigitGenerator.nextId()));
+        return sysProjectStaffMapper.insertSysProjectStaff(sysProjectStaff);
+    }
+
+    /**
+     * 修改【请填写功能名称】
+     * 
+     * @param sysProjectStaff 【请填写功能名称】
+     * @return 结果
+     */
+    @Override
+    public int updateSysProjectStaff(SysProjectStaff sysProjectStaff)
+    {
+        sysProjectStaff.setUpdateTime(DateUtils.getNowDate());
+        return sysProjectStaffMapper.updateSysProjectStaff(sysProjectStaff);
+    }
+
+    /**
+     * 批量删除【请填写功能名称】
+     * 
+     * @param ids 需要删除的【请填写功能名称】主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysProjectStaffByIds(Long[] ids)
+    {
+        return sysProjectStaffMapper.deleteSysProjectStaffByIds(ids);
+    }
+
+    /**
+     * 删除【请填写功能名称】信息
+     * 
+     * @param id 【请填写功能名称】主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysProjectStaffById(Long id)
+    {
+        return sysProjectStaffMapper.deleteSysProjectStaffById(id);
+    }
+}

+ 50 - 0
takai-system/src/main/resources/mapper/system/AppTypeMapper.xml

@@ -0,0 +1,50 @@
+<?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="com.takai.system.mapper.TypeAppMapper">
+    
+    <resultMap type="TypeApp" id="AppTypeResult">
+        <result property="typeId"    column="type_id"    />
+        <result property="typeName"    column="type_name"    />
+    </resultMap>
+
+    <sql id="selectAppTypeVo">
+        select type_id, app_id from type_app
+    </sql>
+
+    <select id="selectAppTypeList" parameterType="TypeApp" resultMap="AppTypeResult">
+        <include refid="selectAppTypeVo"/>
+    </select>
+    
+    <select id="selectAppTypeByTypeId" parameterType="String" resultMap="AppTypeResult">
+        <include refid="selectAppTypeVo"/>
+        where type_id = #{typeId} and app_id = #{appId}
+    </select>
+        
+    <insert id="insertAppType" parameterType="TypeApp">
+        insert into type_app
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="typeId != null">type_id,</if>
+            <if test="appId != null">app_id</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="typeId != null">#{typeId},</if>
+            <if test="appId != null">#{appId}</if>
+         </trim>
+    </insert>
+
+    <update id="updateAppType" parameterType="TypeApp">
+        update type_app
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="typeId != null">type_id = #{typeId},</if>
+            <if test="appId != null">app_id = #{appId},</if>
+        </trim>
+        where type_id = #{typeId} and app_id = #{appId}
+    </update>
+
+    <delete id="deleteAppTypeByTypeId" parameterType="String">
+        delete from type_app where type_id = #{typeId} and app_id = #{appId}
+    </delete>
+
+</mapper>

+ 116 - 0
takai-system/src/main/resources/mapper/system/DocumentAuditConfigMapper.xml

@@ -0,0 +1,116 @@
+<?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="com.takai.system.mapper.DocumentAuditConfigMapper">
+    
+    <resultMap type="DocumentAuditConfig" id="DocumentAuditConfigResult">
+        <result property="id"    column="id"    />
+        <result property="deptId"    column="dept_id"    />
+        <result property="projectId"    column="project_id"    />
+        <result property="nodeOrder"    column="node_order"    />
+        <result property="approver"    column="approver"    />
+        <result property="chain"    column="chain"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="userName"    column="user_name"    />
+    </resultMap>
+
+    <sql id="selectDocumentAuditConfigVo">
+        select id, dept_id, project_id, node_order, approver, chain, create_by, create_time, update_by, update_time from document_audit_config
+    </sql>
+
+    <select id="selectDocumentAuditConfigList" parameterType="DocumentAuditConfig" resultMap="DocumentAuditConfigResult">
+        select
+            dac.id,
+            dac.dept_id,
+            dac.project_id,
+            dac.node_order,
+            dac.approver,
+            dac.chain,
+            dac.create_by,
+            dac.create_time,
+            dac.update_by,
+            dac.update_time,
+            su.user_name
+        from document_audit_config dac
+        left join sys_user su on dac.approver = su.user_id
+        <where>
+            <if test="approver != null  and approver != ''"> and approver = #{approver}</if>
+<!--            <if test="deptId != null "> and dept_id = #{deptId}</if>-->
+<!--            <if test="nodeOrder != null "> and node_order = #{nodeOrder}</if>-->
+<!--            <if test="approver != null  and approver != ''"> and FIND_IN_SET(#{approver}, approver) > 0</if>-->
+<!--            <if test="chain != null  and chain != ''"> and chain = #{chain}</if>-->
+        </where>
+    </select>
+    
+    <select id="selectDocumentAuditConfigById" parameterType="Long" resultMap="DocumentAuditConfigResult">
+        <include refid="selectDocumentAuditConfigVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertDocumentAuditConfig" parameterType="DocumentAuditConfig" useGeneratedKeys="true" keyProperty="id">
+        insert into document_audit_config
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="deptId != null">dept_id,</if>
+            <if test="projectId != null">project_id,</if>
+            <if test="nodeOrder != null">node_order,</if>
+            <if test="approver != null">approver,</if>
+            <if test="chain != null">chain,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="deptId != null">#{deptId},</if>
+            <if test="projectId != null">#{projectId},</if>
+            <if test="nodeOrder != null">#{nodeOrder},</if>
+            <if test="approver != null">#{approver},</if>
+            <if test="chain != null">#{chain},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateDocumentAuditConfig" parameterType="DocumentAuditConfig">
+        update document_audit_config
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="projectId != null">project_id = #{projectId},</if>
+            <if test="nodeOrder != null">node_order = #{nodeOrder},</if>
+            <if test="approver != null">approver = #{approver},</if>
+            <if test="chain != null">chain = #{chain},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteDocumentAuditConfigById" parameterType="Long">
+        delete from document_audit_config where id = #{id}
+    </delete>
+
+    <delete id="deleteDocumentAuditConfigByIds" parameterType="String">
+        delete from document_audit_config where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+    <select id="selectDocumentAuditConfigListByBo" parameterType="DocumentAuditConfigBo" resultMap="DocumentAuditConfigResult">
+        <include refid="selectDocumentAuditConfigVo"/>
+        <where>
+            <if test="approver != null  and approver != ''"> approver = #{approver}</if>
+<!--            <if test="approver != null  and approver != ''"> and FIND_IN_SET(#{approver}, approver) > 0</if>-->
+        </where>
+        order by node_order asc
+    </select>
+
+</mapper>

+ 96 - 0
takai-system/src/main/resources/mapper/system/DocumentAuditInfoMapper.xml

@@ -0,0 +1,96 @@
+<?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="com.takai.system.mapper.DocumentAuditInfoMapper">
+    
+    <resultMap type="DocumentAuditInfo" id="DocumentAuditInfoResult">
+        <result property="appId"    column="app_id"    />
+        <result property="nodeOrder"    column="node_order"    />
+        <result property="approver"    column="approver"    />
+        <result property="status"    column="status"    />
+        <result property="comment"    column="comment"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="userName"    column="user_name"    />
+        <result property="name"    column="name"    />
+    </resultMap>
+
+    <sql id="selectDocumentAuditInfoVo">
+        select app_id, node_order, approver, status, comment, create_by, create_time, update_by, update_time from document_audit_info
+    </sql>
+
+    <select id="selectDocumentAuditInfoList" parameterType="DocumentAuditInfo" resultMap="DocumentAuditInfoResult">
+        select dai.app_id, dai.node_order, dai.approver, dai.status, dai.comment, dai.create_by, dai.create_time, dai.update_by, dai.update_time, su.user_name,
+        bm.name
+        from document_audit_info dai
+        left join sys_user su on dai.approver = su.user_id
+        left join bm_application bm on dai.app_id = bm.appId
+        <where>  
+            <if test="appId != null  and appId != ''"> and dai.app_id = #{appId}</if>
+            <if test="nodeOrder != null "> and dai.node_order = #{nodeOrder}</if>
+            <if test="approver != null  and approver != ''"> and dai.approver = #{approver}</if>
+            <if test="status != null  and status != ''"> and dai.status = #{status}</if>
+            <if test="comment != null  and comment != ''"> and dai.comment = #{comment}</if>
+        </where>
+    </select>
+    
+    <select id="selectDocumentAuditInfoByDocumentId" parameterType="String" resultMap="DocumentAuditInfoResult">
+        <include refid="selectDocumentAuditInfoVo"/>
+        where app_id = #{appId}
+    </select>
+        
+    <insert id="insertDocumentAuditInfo" parameterType="DocumentAuditInfo">
+        insert into document_audit_info
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="appId != null">app_id,</if>
+            <if test="nodeOrder != null">node_order,</if>
+            <if test="approver != null">approver,</if>
+            <if test="status != null">status,</if>
+            <if test="comment != null">comment,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="appId != null">#{appId},</if>
+            <if test="nodeOrder != null">#{nodeOrder},</if>
+            <if test="approver != null">#{approver},</if>
+            <if test="status != null">#{status},</if>
+            <if test="comment != null">#{comment},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateDocumentAuditInfo" parameterType="DocumentAuditInfo">
+        update document_audit_info
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="nodeOrder != null">node_order = #{nodeOrder},</if>
+            <if test="approver != null">approver = #{approver},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="comment != null">comment = #{comment},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where app_id = #{appId}
+    </update>
+
+    <delete id="deleteDocumentAuditInfoByDocumentId" parameterType="String">
+        delete from document_audit_info where app_id = #{appId}
+    </delete>
+
+    <delete id="deleteDocumentAuditInfoByDocumentIds" parameterType="String">
+        delete from document_audit_info where app_id in
+        <foreach item="appId" collection="array" open="(" separator="," close=")">
+            #{appId}
+        </foreach>
+    </delete>
+</mapper>

+ 74 - 0
takai-system/src/main/resources/mapper/system/SysAppTypeMapper.xml

@@ -0,0 +1,74 @@
+<?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="com.takai.system.mapper.SysAppTypeMapper">
+    
+    <resultMap type="SysAppType" id="SysAppTypeResult">
+        <result property="typeId"    column="type_id"    />
+        <result property="typeName"    column="type_name"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectSysAppTypeVo">
+        select type_id, type_name, create_by, create_time, update_by, update_time from sys_app_type
+    </sql>
+
+    <select id="selectSysAppTypeList" parameterType="SysAppType" resultMap="SysAppTypeResult">
+        <include refid="selectSysAppTypeVo"/>
+        <where>  
+            <if test="typeName != null  and typeName != ''"> and type_name like concat('%', #{typeName}, '%')</if>
+        </where>
+    </select>
+    
+    <select id="selectSysAppTypeByTypeId" parameterType="String" resultMap="SysAppTypeResult">
+        <include refid="selectSysAppTypeVo"/>
+        where type_id = #{typeId}
+    </select>
+        
+    <insert id="insertSysAppType" parameterType="SysAppType">
+        insert into sys_app_type
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="typeId != null">type_id,</if>
+            <if test="typeName != null">type_name,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="typeId != null">#{typeId},</if>
+            <if test="typeName != null">#{typeName},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateSysAppType" parameterType="SysAppType">
+        update sys_app_type
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="typeName != null">type_name = #{typeName},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where type_id = #{typeId}
+    </update>
+
+    <delete id="deleteSysAppTypeByTypeId" parameterType="String">
+        delete from sys_app_type where type_id = #{typeId}
+    </delete>
+
+    <delete id="deleteSysAppTypeByTypeIds" parameterType="String">
+        delete from sys_app_type where type_id in 
+        <foreach item="typeId" collection="array" open="(" separator="," close=")">
+            #{typeId}
+        </foreach>
+    </delete>
+</mapper>

+ 73 - 0
takai-system/src/main/resources/mapper/system/SysProjectAppMapper.xml

@@ -0,0 +1,73 @@
+<?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="com.takai.system.mapper.SysProjectAppMapper">
+
+    <resultMap type="SysProjectApp" id="SysProjectAppResult">
+        <result property="projectId"    column="project_id"    />
+        <result property="appId"    column="app_id"    />
+    </resultMap>
+
+    <resultMap type="com.takai.system.domain.ProjectApplication" id="SysProjectResult">
+        <result property="projectId"    column="project_id"    />
+        <result property="name"    column="name"    />
+    </resultMap>
+
+    <sql id="selectSysProjectAppVo">
+        select project_id, app_id from sys_project_app
+    </sql>
+
+    <select id="selectSysProjectAppList" parameterType="SysProjectApp" resultMap="SysProjectAppResult">
+        <include refid="selectSysProjectAppVo"/>
+        <where>
+            <if test="projectId != null  and projectId != ''"> and project_id = #{projectId}</if>
+            <if test="appId != null  and appId != ''"> and app_id = #{appId}</if>
+        </where>
+    </select>
+
+    <select id="selectSysProjectAppByProjectId" parameterType="String" resultMap="SysProjectAppResult">
+        <include refid="selectSysProjectAppVo"/>
+        where project_id = #{projectId}
+    </select>
+
+    <insert id="insertSysProjectApp" parameterType="SysProjectApp">
+        insert into sys_project_app
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="projectId != null">project_id,</if>
+            <if test="appId != null">app_id,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="projectId != null">#{projectId},</if>
+            <if test="appId != null">#{appId},</if>
+        </trim>
+    </insert>
+
+    <update id="updateSysProjectApp" parameterType="SysProjectApp">
+        update sys_project_app
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="appId != null">app_id = #{appId},</if>
+        </trim>
+        where project_id = #{projectId}
+    </update>
+
+    <delete id="deleteSysProjectAppByProjectId" parameterType="String">
+        delete from sys_project_app where project_id = #{projectId}
+    </delete>
+
+    <delete id="deleteSysProjectAppByProjectIds" parameterType="String">
+        delete from sys_project_app where project_id in
+        <foreach item="projectId" collection="array" open="(" separator="," close=")">
+            #{projectId}
+        </foreach>
+    </delete>
+
+    <select id="selectSysProjectApplicationList" parameterType="SysProject" resultMap="SysProjectResult">
+        select bm.name from sys_project_app spa
+        left join bm_application bm on spa.app_id = bm.appId
+        <where>
+            <if test="projectId != null  and projectId != ''"> and project_id = #{projectId}</if>
+            <if test="appId != null  and appId != ''"> and app_id = #{appId}</if>
+        </where>
+    </select>
+</mapper>

+ 106 - 0
takai-system/src/main/resources/mapper/system/SysProjectMapper.xml

@@ -0,0 +1,106 @@
+<?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="com.takai.system.mapper.SysProjectMapper">
+    
+    <resultMap type="SysProject" id="SysProjectResult">
+        <result property="projectId"    column="project_id"    />
+        <result property="projectPid"    column="project_pid"    />
+        <result property="projectName"    column="project_name"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+<!--        <result property="appId"    column="appId"    />-->
+<!--        <result property="name"    column="name"    />-->
+        <result property="projectType"    column="project_type"    />
+    </resultMap>
+
+    <sql id="selectSysProjectVo">
+        select project_id, project_pid, project_name, create_by, create_time, update_by, update_time from sys_project
+    </sql>
+
+    <select id="selectSysProjectList" parameterType="SysProject" resultMap="SysProjectResult">
+        select sp.project_id,
+               sp.project_pid,
+               sp.project_name,
+               sp.create_by,
+               sp.create_time,
+               sp.update_by,
+               sp.update_time,
+               /*ba.appId,
+               ba.name*/
+               sp.project_type
+        from sys_project as sp
+         /*left join sys_project_app as spa on sp.project_id = spa.project_id*/
+        /*left join bm_application as ba on ba.appId = spa.app_id*/
+        <where>  
+            <if test="projectPid != null  and projectPid != ''"> and sp.project_pid = #{projectPid}</if>
+            <if test="projectName != null  and projectName != ''"> and sp.project_name like concat('%', #{projectName}, '%')</if>
+            <!--<if test="appId != null  and appId != ''"> and ba.appId = #{appId}</if>-->
+        </where>
+    </select>
+    
+    <select id="selectSysProjectByProjectId" parameterType="String" resultMap="SysProjectResult">
+        select sp.project_id,
+               sp.project_pid,
+               sp.project_name,
+               sp.create_by,
+               sp.create_time,
+               sp.update_by,
+               sp.update_time,
+            /*   ba.appId,
+               ba.name*/
+               sp.project_type
+        from sys_project as sp
+--                  left join sys_project_app as spa on sp.project_id = spa.project_id
+                 /*left join bm_application as ba on ba.appId = spa.app_id*/
+        where sp.project_id = #{projectId}
+    </select>
+        
+    <insert id="insertSysProject" parameterType="SysProject" useGeneratedKeys="true" keyProperty="projectId">
+        insert into sys_project(
+            <if test="projectPid != null">project_pid,</if>
+            <if test="projectName != null">project_name,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="projectType != null">project_type</if>
+        )values(
+            <if test="projectPid != null">#{projectPid},</if>
+            <if test="projectName != null">#{projectName},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="projectType != null">#{projectType}</if>
+        )
+    </insert>
+
+    <update id="updateSysProject" parameterType="SysProject">
+        update sys_project
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="projectPid != null">project_pid = #{projectPid},</if>
+            <if test="projectName != null">project_name = #{projectName},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="projectType != null">project_type = #{projectType},</if>
+        </trim>
+        where project_id = #{projectId}
+    </update>
+
+    <delete id="deleteSysProjectByProjectId" parameterType="String">
+        delete from sys_project where project_id = #{projectId}
+    </delete>
+
+    <delete id="deleteSysProjectByProjectIds" parameterType="String">
+        delete from sys_project where project_id in 
+        <foreach item="projectId" collection="array" open="(" separator="," close=")">
+            #{projectId}
+        </foreach>
+    </delete>
+</mapper>

+ 127 - 0
takai-system/src/main/resources/mapper/system/SysProjectStaffMapper.xml

@@ -0,0 +1,127 @@
+<?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="com.takai.system.mapper.SysProjectStaffMapper">
+    
+    <resultMap type="SysProjectStaff" id="SysProjectStaffResult">
+        <result property="id"    column="id"    />
+        <result property="projectPid"    column="project_pid"    />
+        <result property="userId"    column="user_id"    />
+        <result property="roleId"    column="role_id"    />
+        <result property="mBdate"    column="m_bdate"    />
+        <result property="mEdate"    column="m_edate"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="userName"    column="user_name"    />
+        <result property="projectName"    column="project_name"    />
+        <result property="roleName"    column="role_name"    />
+    </resultMap>
+
+    <sql id="selectSysProjectStaffVo">
+        select id, project_pid, user_id, roleId, m_bdate, m_edate, create_by, create_time, update_by, update_time from sys_project_staff
+    </sql>
+
+    <select id="selectSysProjectStaffList" parameterType="SysProjectStaff" resultMap="SysProjectStaffResult">
+        select sps.id,
+        sps.project_pid,
+        sps.user_id,
+        sps.role_id,
+        sps.m_bdate,
+        sps.m_edate,
+        sps.create_by,
+        sps.create_time,
+        sps.update_by,
+        sps.update_time,
+        su.user_name,
+        sp.project_name,
+        sr.role_name
+        from sys_project_staff as sps
+        left join sys_user as su on sps.user_id = su.user_id
+        left join sys_project as sp on sps.project_pid = sp.project_pid
+        left join sys_role as sr on sps.role_id = sr.role_id
+        <where>  
+            <if test="projectPid != null  and projectPid != ''"> and sps.project_pid = #{projectPid}</if>
+            <if test="userId != null  and userId != ''"> and sps.user_id = #{userId}</if>
+            <if test="roleId != null  and roleId != ''"> and sps.role_id = #{roleId}</if>
+            <if test="mBdate != null "> and sps.m_bdate <![CDATA[ >= ]]> #{mBdate}</if>
+            <if test="mEdate != null "> and sps.m_edate <![CDATA[ <= ]]> #{mEdate}</if>
+        </where>
+    </select>
+    
+    <select id="selectSysProjectStaffById" parameterType="Long" resultMap="SysProjectStaffResult">
+        select sps.id,
+               sps.project_pid,
+               sps.user_id,
+               sps.role_id,
+               sps.m_bdate,
+               sps.m_edate,
+               sps.create_by,
+               sps.create_time,
+               sps.update_by,
+               sps.update_time,
+               su.user_name,
+               sp.project_name
+        from sys_project_staff as sps
+        left join sys_user as su on sps.user_id = su.user_id
+        left join sys_project as sp on sps.project_pid = sp.project_pid
+        where id = #{id}
+    </select>
+        
+    <insert id="insertSysProjectStaff" parameterType="SysProjectStaff">
+        insert into sys_project_staff
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="projectPid != null">project_pid,</if>
+            <if test="userId != null">user_id,</if>
+            <if test="roleId != null">role_id,</if>
+            <if test="mBdate != null">m_bdate,</if>
+            <if test="mEdate != null">m_edate,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="projectPid != null">#{projectPid},</if>
+            <if test="userId != null">#{userId},</if>
+            <if test="roleId != null">#{roleId},</if>
+            <if test="mBdate != null">#{mBdate},</if>
+            <if test="mEdate != null">#{mEdate},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateSysProjectStaff" parameterType="SysProjectStaff">
+        update sys_project_staff
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="projectPid != null">project_pid = #{projectPid},</if>
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="roleId != null">role_id = #{roleId},</if>
+            <if test="mBdate != null">m_bdate = #{mBdate},</if>
+            <if test="mEdate != null">m_edate = #{mEdate},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteSysProjectStaffById" parameterType="Long">
+        delete from sys_project_staff where id = #{id}
+    </delete>
+
+    <delete id="deleteSysProjectStaffByIds" parameterType="String">
+        delete from sys_project_staff where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 1 - 1
takai-system/src/main/resources/mapper/system/SysRoleMapper.xml

@@ -52,7 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			and date_format(r.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
 		</if>
 		<!-- 数据范围过滤 -->
-		${params.dataScope}
+		<!--${params.dataScope}-->
 		order by r.role_sort
 	</select>
     

+ 9 - 5
takai-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -22,6 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="createTime"   column="create_time"  />
         <result property="updateBy"     column="update_by"    />
         <result property="updateTime"   column="update_time"  />
+		<result property="workNo"       column="work_no"       />
         <result property="remark"       column="remark"       />
         <association property="dept"    column="dept_id" javaType="SysDept" resultMap="deptResult" />
         <collection  property="roles"   javaType="java.util.List"           resultMap="RoleResult" />
@@ -49,7 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	<sql id="selectUserVo">
         select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, 
         d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
-        r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
+        r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status, u.work_no
         from sys_user u
 		    left join sys_dept d on u.dept_id = d.dept_id
 		    left join sys_user_role ur on u.user_id = ur.user_id
@@ -57,7 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </sql>
     
     <select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
-		select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
+		select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader, u.work_no from sys_user u
 		left join sys_dept d on u.dept_id = d.dept_id
 		where u.del_flag = '0'
 		<if test="userId != null and userId != 0">
@@ -82,11 +83,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))
 		</if>
 		<!-- 数据范围过滤 -->
-		${params.dataScope}
+		<!-- ${params.dataScope} -->
 	</select>
 	
 	<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
-	    select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
+	    select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time, u.work_no
 	    from sys_user u
 			 left join sys_dept d on u.dept_id = d.dept_id
 			 left join sys_user_role ur on u.user_id = ur.user_id
@@ -103,7 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	</select>
 	
 	<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
-	    select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
+	    select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time, u.work_no
 	    from sys_user u
 			 left join sys_dept d on u.dept_id = d.dept_id
 			 left join sys_user_role ur on u.user_id = ur.user_id
@@ -156,6 +157,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="status != null and status != ''">status,</if>
  			<if test="createBy != null and createBy != ''">create_by,</if>
  			<if test="remark != null and remark != ''">remark,</if>
+		    <if test="workNo != null and workNo != ''">work_no,</if>
  			create_time
  		)values(
  			<if test="userId != null and userId != ''">#{userId},</if>
@@ -170,6 +172,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="status != null and status != ''">#{status},</if>
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
  			<if test="remark != null and remark != ''">#{remark},</if>
+		    <if test="workNo != null and workNo != ''">#{workNo},</if>
  			sysdate()
  		)
 	</insert>
@@ -190,6 +193,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="loginDate != null">login_date = #{loginDate},</if>
  			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
  			<if test="remark != null">remark = #{remark},</if>
+			<if test="workNo != null and workNo != ''">work_no = #{workNo},</if>
  			update_time = sysdate()
  		</set>
  		where user_id = #{userId}