Compare commits
62 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9f03dc27cc | |||
| d669d53a80 | |||
| df13a90107 | |||
| 8a36b49128 | |||
| c9549bed46 | |||
| 5caf3bbdc9 | |||
|
|
9e4f8becc8 | ||
| 58eed8234a | |||
|
|
b4e9685344 | ||
|
|
2ad9a4e206 | ||
| fd637ae604 | |||
| 1bee5eb05b | |||
|
|
19637d74a4 | ||
|
|
d069948d2a | ||
|
|
3199c876c3 | ||
|
|
b6d31ab156 | ||
| 1ef86fc1cb | |||
| 75886d7af5 | |||
| 50b84a57bb | |||
|
|
bd05f6d593 | ||
| 470096aa9a | |||
| 4ad2ddeabe | |||
|
|
9ee49b1863 | ||
| be7e0d6162 | |||
| 8f6b762bf3 | |||
| 3946c0a0aa | |||
| e1db030c37 | |||
| 544b56a5d9 | |||
| 7b4edd6b59 | |||
| 43d8be724e | |||
| 220dec9b6c | |||
| 4f6b209c3d | |||
| 604bf61981 | |||
| 7575784c01 | |||
| 7399f8c3da | |||
| 6f33ab9c05 | |||
| 36752d1d15 | |||
| 73360d70ce | |||
| 7913c210cd | |||
| 06d29210ba | |||
| b4e1aae062 | |||
| 9ad7e063c0 | |||
| 846348e1aa | |||
| ae90dcec24 | |||
| ee732b97bf | |||
| 0a6d70f7cf | |||
| 156728b1b9 | |||
| 2943a6255b | |||
| f8231c2d51 | |||
| a1f5936d20 | |||
| 38c69c748c | |||
| 5815f49a79 | |||
| 0c91f5deaa | |||
| 67040aaf5d | |||
| 8af6842809 | |||
| 9384b2f502 | |||
| 07d07c8f5f | |||
| c3dd0c9802 | |||
| 21ca027f3b | |||
| 017beb1d5f | |||
| 09cba49a7d | |||
| 7e22f79b5f |
115
.claude/settings.local.json
Normal file
115
.claude/settings.local.json
Normal file
@@ -0,0 +1,115 @@
|
||||
{
|
||||
"permissions": {
|
||||
"allow": [
|
||||
"Bash(git *)",
|
||||
"Bash(cmd *)",
|
||||
"PowerShell('--rdms-project--'; Get-ChildItem -Force -Name 'C:\\\\code\\\\gitea\\\\rdms\\\\cn-rdms\\\\rdms-project' | Sort-Object; '--rdms-system--'; Get-ChildItem -Force -Name 'C:\\\\code\\\\gitea\\\\rdms\\\\cn-rdms\\\\rdms-system' | Sort-Object; '--rdms-framework--'; Get-ChildItem -Force -Name 'C:\\\\code\\\\gitea\\\\rdms\\\\cn-rdms\\\\rdms-framework' | Sort-Object; '--rdms-gateway--'; Get-ChildItem -Force -Name 'C:\\\\code\\\\gitea\\\\rdms\\\\cn-rdms\\\\rdms-gateway' | Sort-Object)",
|
||||
"PowerShell('--docs--'; Get-ChildItem -Force -Name 'C:\\\\code\\\\gitea\\\\rdms\\\\cn-rdms\\\\docs' -Recurse -Depth 2 | Sort-Object)",
|
||||
"PowerShell('--project-boot src--'; Get-ChildItem -Force -Name 'C:\\\\code\\\\gitea\\\\rdms\\\\cn-rdms\\\\rdms-project\\\\rdms-project-boot\\\\src\\\\main\\\\java\\\\com\\\\njcn\\\\rdms\\\\module\\\\project' -Recurse -Depth 2 | Sort-Object)",
|
||||
"PowerShell('--project-api src--'; Get-ChildItem -Force -Name 'C:\\\\code\\\\gitea\\\\rdms\\\\cn-rdms\\\\rdms-project\\\\rdms-project-api\\\\src\\\\main\\\\java' -Recurse -Depth 5 | Sort-Object)",
|
||||
"PowerShell('--system-boot src--'; Get-ChildItem -Force -Name 'C:\\\\code\\\\gitea\\\\rdms\\\\cn-rdms\\\\rdms-system\\\\rdms-system-boot\\\\src\\\\main\\\\java\\\\com\\\\njcn\\\\rdms\\\\module\\\\system' -Recurse -Depth 2 | Sort-Object)",
|
||||
"PowerShell('--project-boot service/project--'; Get-ChildItem -Force -Name 'C:\\\\code\\\\gitea\\\\rdms\\\\cn-rdms\\\\rdms-project\\\\rdms-project-boot\\\\src\\\\main\\\\java\\\\com\\\\njcn\\\\rdms\\\\module\\\\project\\\\service\\\\project' -Recurse -Depth 3 | Sort-Object)",
|
||||
"PowerShell('--project-boot controller--'; Get-ChildItem -Force -Name 'C:\\\\code\\\\gitea\\\\rdms\\\\cn-rdms\\\\rdms-project\\\\rdms-project-boot\\\\src\\\\main\\\\java\\\\com\\\\njcn\\\\rdms\\\\module\\\\project\\\\controller' -Recurse -Depth 4 | Sort-Object)",
|
||||
"PowerShell('--project-api full--'; Get-ChildItem -Force -Name 'C:\\\\code\\\\gitea\\\\rdms\\\\cn-rdms\\\\rdms-project\\\\rdms-project-api\\\\src\\\\main\\\\java\\\\com\\\\njcn\\\\rdms\\\\module\\\\project' -Recurse | Sort-Object)",
|
||||
"PowerShell('--project-boot dal--'; Get-ChildItem -Force -Name 'C:\\\\code\\\\gitea\\\\rdms\\\\cn-rdms\\\\rdms-project\\\\rdms-project-boot\\\\src\\\\main\\\\java\\\\com\\\\njcn\\\\rdms\\\\module\\\\project\\\\dal' -Recurse | Sort-Object)",
|
||||
"PowerShell('--project-api enums--'; Get-ChildItem -Force -Name 'C:\\\\code\\\\gitea\\\\rdms\\\\cn-rdms\\\\rdms-project\\\\rdms-project-api\\\\src\\\\main\\\\java\\\\com\\\\njcn\\\\rdms\\\\module\\\\project\\\\enums' -Recurse | Sort-Object; '--system-api full--'; Get-ChildItem -Force -Name 'C:\\\\code\\\\gitea\\\\rdms\\\\cn-rdms\\\\rdms-system\\\\rdms-system-api\\\\src\\\\main\\\\java' -Recurse -Depth 6 | Sort-Object)",
|
||||
"PowerShell('--project-boot framework--'; Get-ChildItem -Force -Name 'C:\\\\code\\\\gitea\\\\rdms\\\\cn-rdms\\\\rdms-project\\\\rdms-project-boot\\\\src\\\\main\\\\java\\\\com\\\\njcn\\\\rdms\\\\module\\\\project\\\\framework' -Recurse | Sort-Object)",
|
||||
"PowerShell('--sql resources--'; Get-ChildItem -Force -Name 'C:\\\\code\\\\gitea\\\\rdms\\\\cn-rdms\\\\rdms-project\\\\rdms-project-boot\\\\src\\\\main\\\\resources' -Recurse | Sort-Object; '--system sql--'; Get-ChildItem -Force -Name 'C:\\\\code\\\\gitea\\\\rdms\\\\cn-rdms\\\\rdms-system\\\\rdms-system-boot\\\\src\\\\main\\\\resources\\\\sql' -Recurse | Sort-Object)",
|
||||
"PowerShell('--project-boot resources sql--'; Get-ChildItem -Force -Name 'C:\\\\code\\\\gitea\\\\rdms\\\\cn-rdms\\\\rdms-project\\\\rdms-project-boot\\\\src\\\\main\\\\resources\\\\sql' -Recurse | Sort-Object)",
|
||||
"WebSearch",
|
||||
"PowerShell($env:JAVA_HOME = \"C:\\\\Program Files\\\\Java\\\\jdk-17\"; & \"C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd\" -pl rdms-project/rdms-project-boot -Dtest=TaskAssigneeServiceImplTest test 2>&1 | Select-Object -Last 60)",
|
||||
"PowerShell($env:JAVA_HOME = \"C:\\\\Program Files\\\\Java\\\\jdk-17\"; & \"C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd\" -pl rdms-project/rdms-project-boot -am -Dtest=TaskAssigneeServiceImplTest test 2>&1 | Select-Object -Last 80)",
|
||||
"PowerShell($env:JAVA_HOME = \"C:\\\\Program Files\\\\Java\\\\jdk-17\"; & \"C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd\" -pl rdms-project/rdms-project-boot -am -Dtest=TaskAssigneeServiceImplTest -Dsurefire.failIfNoSpecifiedTests=false test 2>&1 | Select-Object -Last 80)",
|
||||
"PowerShell($env:JAVA_HOME = \"C:\\\\Program Files\\\\Java\\\\jdk-17\"; & \"C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd\" -pl rdms-project/rdms-project-boot -am \"-Dtest=TaskAssigneeServiceImplTest\" \"-Dsurefire.failIfNoSpecifiedTests=false\" test 2>&1 | Select-Object -Last 80)",
|
||||
"PowerShell($env:JAVA_HOME = \"C:\\\\Program Files\\\\Java\\\\jdk-17\"; & \"C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd\" -pl rdms-project/rdms-project-boot -am \"-Dtest=TaskAssigneeServiceImplTest\" \"-Dsurefire.failIfNoSpecifiedTests=false\" test 2>&1 | Select-Object -Last 50)",
|
||||
"PowerShell($env:JAVA_HOME = \"C:\\\\Program Files\\\\Java\\\\jdk-17\"; & \"C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd\" -pl rdms-project/rdms-project-boot -am test 2>&1 | Select-Object -Last 80)",
|
||||
"PowerShell($env:JAVA_HOME = \"C:\\\\Program Files\\\\Java\\\\jdk-17\"; & \"C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd\" -pl rdms-project/rdms-project-boot \"-Dtest=TaskAssigneeServiceImplTest,ProjectTaskServiceImplTest,ProjectTaskStatusViewServiceTest,ProjectExecutionServiceImplTest\" \"-Dsurefire.failIfNoSpecifiedTests=false\" test 2>&1 | Select-Object -Last 30)",
|
||||
"PowerShell($env:JAVA_HOME = \"C:\\\\Program Files\\\\Java\\\\jdk-17\"; & \"C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd\" -pl rdms-project/rdms-project-boot -am \"-Dtest=TaskAssigneeServiceImplTest,ProjectTaskServiceImplTest,ProjectTaskStatusViewServiceTest,ProjectExecutionServiceImplTest\" \"-Dsurefire.failIfNoSpecifiedTests=false\" test 2>&1 | Select-Object -Last 30)",
|
||||
"Bash(grep -rn \"INSERT INTO \\\\`system_menu\\\\`\\\\|INSERT INTO system_menu\" --include=\"*.sql\" rdms-project rdms-system)",
|
||||
"Bash(findstr /i \"plugin\")",
|
||||
"Bash(findstr *)",
|
||||
"Bash(awk END{print NR} *)",
|
||||
"PowerShell(Move-Item *)",
|
||||
"PowerShell($env:JAVA_HOME = 'C:\\\\Program Files\\\\Java\\\\jdk-17'; & 'C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd' -pl rdms-project/rdms-project-boot -am test '-Dtest=VisibilityScopeResolverImplTest' -q 2>&1 | Select-Object -Last 80)",
|
||||
"PowerShell($env:JAVA_HOME = 'C:\\\\Program Files\\\\Java\\\\jdk-17'; & 'C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd' -pl rdms-project/rdms-project-boot -am test '-Dtest=VisibilityScopeResolverImplTest' '-Dsurefire.failIfNoSpecifiedTests=false' -q 2>&1 | Select-Object -Last 60)",
|
||||
"PowerShell($env:JAVA_HOME = 'C:\\\\Program Files\\\\Java\\\\jdk-17'; & 'C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd' -pl rdms-project/rdms-project-boot -am test '-Dtest=VisibilityScopeResolverImplTest' '-Dsurefire.failIfNoSpecifiedTests=false' -q | Select-Object -Last 60)",
|
||||
"PowerShell($env:JAVA_HOME = 'C:\\\\Program Files\\\\Java\\\\jdk-17'; & 'C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd' -pl rdms-project/rdms-project-boot -am test '-Dtest=VisibilityScopeResolverImplTest' '-Dsurefire.failIfNoSpecifiedTests=false' | Select-String -Pattern 'Tests run|BUILD|ERROR|FAIL' | Select-Object -Last 40)",
|
||||
"PowerShell($env:JAVA_HOME = 'C:\\\\Program Files\\\\Java\\\\jdk-17'; & 'C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd' -pl rdms-project/rdms-project-boot -am test '-Dsurefire.failIfNoSpecifiedTests=false' | Select-String -Pattern 'Tests run|BUILD|ERROR|FAILED|FAIL' | Select-Object -Last 100)",
|
||||
"PowerShell($env:JAVA_HOME = 'C:\\\\Program Files\\\\Java\\\\jdk-17'; & 'C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd' -pl rdms-project/rdms-project-boot -am test-compile '-Dsurefire.failIfNoSpecifiedTests=false' | Select-String -Pattern 'ERROR|BUILD|FAIL' | Select-Object -Last 40)",
|
||||
"PowerShell($env:JAVA_HOME = 'C:\\\\Program Files\\\\Java\\\\jdk-17'; & 'C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd' -pl rdms-project/rdms-project-boot test '-Dsurefire.failIfNoSpecifiedTests=false' | Select-String -Pattern 'Tests run|BUILD|FAILED|ERROR' | Select-Object -Last 80)",
|
||||
"Skill(code-review:code-review)",
|
||||
"Bash(Test-Path *)",
|
||||
"Skill(superpowers:systematic-debugging)",
|
||||
"Bash(mv \"项目框架设计与后续改造约束说明.md\" architecture/)",
|
||||
"Bash(mv \"新增微服务模块必需项清单.md\" architecture/)",
|
||||
"Bash(mv \"后端提交规范与示例.md\" architecture/)",
|
||||
"Bash(mv \"单体启动模式可行性评估.md\" architecture/)",
|
||||
"Bash(mv \"对象状态能力落地规范.md\" architecture/)",
|
||||
"Bash(mv \"rdms-gateway.md\" \"modules/网关说明.md\")",
|
||||
"Bash(mv \"rdms-spring-boot-starter-biz-ip.md\" \"modules/业务IP启动器.md\")",
|
||||
"Bash(mv \"rdms-spring-boot-starter-env.md\" \"modules/环境配置启动器.md\")",
|
||||
"Bash(mv \"rdms-spring-boot-starter-excel.md\" \"modules/Excel启动器.md\")",
|
||||
"Bash(mv \"rdms-spring-boot-starter-mq.md\" \"modules/消息队列启动器.md\")",
|
||||
"Bash(mv \"文件存储_内网MinIO接入说明.md\" domains/system/)",
|
||||
"Bash(mv \"登录验证码前端接入说明.md\" domains/system/)",
|
||||
"Bash(mv \"product/02-产品管理_业务设计.md\" domains/product/)",
|
||||
"Bash(mv \"product/03-工单到任务全链路与工作流方案.md\" domains/product/)",
|
||||
"Bash(mv \"product/05-产品管理_前端联调最小闭环清单.md\" domains/product/)",
|
||||
"Bash(mv \"product/06-产品设置_补丁版说明.md\" domains/product/)",
|
||||
"Bash(mv \"product/07-产品设置_前端联调API文档.md\" domains/product/)",
|
||||
"Bash(mv \"项目/03-项目管理_业务设计.md\" domains/project/)",
|
||||
"Bash(mv \"项目/2026-05-08-execution-member-change-history-design.md\" \"domains/project/2026-05-08-执行成员变更历史设计.md\")",
|
||||
"Bash(mv \"项目/2026-05-09-task-fix-plan.md\" \"domains/project/2026-05-09-任务修复计划.md\")",
|
||||
"Bash(mv \"项目/2026-05-09-task-logic-review.md\" \"domains/project/2026-05-09-任务逻辑评审.md\")",
|
||||
"Bash(mv \"项目/2026-05-09-task-worklog-design.md\" \"domains/project/2026-05-09-任务工时设计.md\")",
|
||||
"Bash(mv \"任务工时与进度模型_业内标杆调研.md\" research/)",
|
||||
"Bash(mv \"任务负责人模型_业内标杆调研.md\" research/)",
|
||||
"Bash(mv \"技术负债台账.html\" debt/)",
|
||||
"Bash(mv \"product/product-overview-mockup.html\" \"temp/产品概览-mockup.html\")",
|
||||
"Bash(mv \"项目/2026-05-12-按钮可见度演示.html\" temp/)",
|
||||
"Bash(mv \"product/rdms_object_status_transition.sql\" sql/)",
|
||||
"Bash(mv \"product/system_menu.sql\" sql/)",
|
||||
"Bash(mv \"项目/object.sql\" sql/)",
|
||||
"Bash(mv \"项目/rdms_biz_audit_log.sql\" sql/)",
|
||||
"Bash(mv \"项目/sql/\"*.sql sql/)",
|
||||
"Bash(mv \"项目/项目管理待确认项清单_V1.0.md\" domains/project/)",
|
||||
"Bash(rmdir 项目)",
|
||||
"PowerShell($env:JAVA_HOME = \"C:\\\\Program Files\\\\Java\\\\jdk-17\"; & \"C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd\" -pl rdms-project/rdms-project-boot compile -am -DskipTests 2>&1 | Select-Object -Last 20)",
|
||||
"PowerShell($env:JAVA_HOME = \"C:\\\\Program Files\\\\Java\\\\jdk-17\"; & \"C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd\" -pl rdms-project/rdms-project-boot compile -am -DskipTests -f \"C:\\\\code\\\\gitea\\\\rdms\\\\cn-rdms\\\\pom.xml\" 2>&1 | Select-Object -Last 30)",
|
||||
"PowerShell($env:JAVA_HOME = \"C:\\\\Program Files\\\\Java\\\\jdk-17\"; & \"C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd\" -pl rdms-project/rdms-project-boot test-compile -am 2>&1 | Select-Object -Last 40)",
|
||||
"PowerShell($env:JAVA_HOME = \"C:\\\\Program Files\\\\Java\\\\jdk-17\"; & \"C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd\" -pl rdms-project/rdms-project-boot test -am \"-Dtest=ProjectTaskServiceImplTest,ProjectExecutionServiceImplTest\" 2>&1 | Select-Object -Last 80)",
|
||||
"PowerShell($env:JAVA_HOME = \"C:\\\\Program Files\\\\Java\\\\jdk-17\"; & \"C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd\" -pl rdms-project/rdms-project-boot test -am \"-Dtest=ProjectTaskServiceImplTest,ProjectExecutionServiceImplTest\" \"-Dsurefire.failIfNoSpecifiedTests=false\" 2>&1 | Select-Object -Last 80)",
|
||||
"PowerShell($env:JAVA_HOME = \"C:\\\\Program Files\\\\Java\\\\jdk-17\"; & \"C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd\" -pl rdms-project/rdms-project-boot test -am \"-Dtest=ProjectTaskServiceImplTest,ProjectExecutionServiceImplTest\" \"-Dsurefire.failIfNoSpecifiedTests=false\" 2>&1 | Select-Object -First 200)",
|
||||
"PowerShell(Get-ChildItem \"C:\\\\code\\\\gitea\\\\rdms\\\\cn-rdms\\\\.claude\\\\worktrees\\\\agent-a0979555dc2fe9384\\\\rdms-project\\\\rdms-project-boot\\\\target\\\\surefire-reports\" | Where-Object { $_.Name -match \"Test\" } | ForEach-Object { $_.Name })",
|
||||
"PowerShell($env:JAVA_HOME = \"C:\\\\Program Files\\\\Java\\\\jdk-17\"; & \"C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd\" -pl rdms-project/rdms-project-boot compile -am -DskipTests 2>&1 | Select-Object -Last 30)",
|
||||
"Bash(/c/software/apache-maven-3.8.9/bin/mvn.cmd -pl rdms-project/rdms-project-boot test -am -Dtest=ProjectTaskServiceImplTest#changeTaskStatus_shouldUseTransitionAndWriteLogs -q)",
|
||||
"Bash(/c/software/apache-maven-3.8.9/bin/mvn.cmd -pl rdms-project/rdms-project-boot test -Dtest=ProjectTaskServiceImplTest#changeTaskStatus_shouldUseTransitionAndWriteLogs -Dsurefire.failIfNoSpecifiedTests=false -q)",
|
||||
"PowerShell($env:JAVA_HOME = \"C:\\\\Program Files\\\\Java\\\\jdk-17\"; & \"C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd\" -pl rdms-project/rdms-project-boot test \"-Dtest=ProjectTaskServiceImplTest#changeTaskStatus_shouldUseTransitionAndWriteLogs\" \"-Dsurefire.failIfNoSpecifiedTests=false\" -q 2>&1 | Select-Object -Last 60)",
|
||||
"PowerShell($env:JAVA_HOME = \"C:\\\\Program Files\\\\Java\\\\jdk-17\"; & \"C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd\" -pl rdms-project/rdms-project-boot test-compile -am -q 2>&1 | Select-Object -Last 40)",
|
||||
"PowerShell($env:JAVA_HOME = \"C:\\\\Program Files\\\\Java\\\\jdk-17\"; & \"C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd\" -pl rdms-project/rdms-project-boot test-compile -am -q 2>&1 | Select-Object -Last 20)",
|
||||
"PowerShell($env:JAVA_HOME = \"C:\\\\Program Files\\\\Java\\\\jdk-17\"; & \"C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd\" -pl rdms-project/rdms-project-boot test-compile -am 2>&1 | Select-String \"BUILD SUCCESS|BUILD FAILURE|ERROR\" | Select-Object -Last 5)",
|
||||
"PowerShell($env:JAVA_HOME = \"C:\\\\Program Files\\\\Java\\\\jdk-17\"; & \"C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd\" -pl rdms-project/rdms-project-boot test -am \"-Dtest=ProjectTaskServiceImplTest,ProjectExecutionServiceImplTest\" \"-Dsurefire.failIfNoSpecifiedTests=false\" 2>&1 | Select-String \"Tests run|BUILD SUCCESS|BUILD FAILURE|FAILED|<<<\" | Select-Object -Last 30)",
|
||||
"PowerShell([System.IO.Directory]::GetCurrentDirectory\\(\\))",
|
||||
"Bash(Get-ChildItem -Directory -Name)",
|
||||
"Bash(grep \"\\\\.java$\")",
|
||||
"PowerShell($env:JAVA_HOME = \"C:\\\\Program Files\\\\Java\\\\jdk-17\"; & \"C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd\" -pl rdms-project/rdms-project-boot -am compile -DskipTests 2>&1 | Select-Object -Last 30)",
|
||||
"PowerShell($env:JAVA_HOME = \"C:\\\\Program Files\\\\Java\\\\jdk-17\"; & \"C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd\" -pl rdms-project/rdms-project-boot -am clean compile -DskipTests 2>&1 | Select-Object -Last 35)",
|
||||
"Bash(C:/Program Files/Java/jdk-17/bin/java.exe *)",
|
||||
"Bash(export JAVA_HOME=\"C:/Program Files/Java/jdk-17\")",
|
||||
"Bash(cd \"C:/code/gitea/rdms/cn-rdms\")",
|
||||
"Bash(\"C:/software/apache-maven-3.8.9/bin/mvn.cmd\" -pl rdms-project/rdms-project-boot -am compile -DskipTests)",
|
||||
"PowerShell($env:JAVA_HOME = 'C:\\\\Program Files\\\\Java\\\\jdk-17'; $env:PATH = \"$env:JAVA_HOME\\\\bin;$env:PATH\"; & 'C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd' -pl rdms-project/rdms-project-boot -am compile -DskipTests -q)",
|
||||
"PowerShell($env:JAVA_HOME = 'C:\\\\Program Files\\\\Java\\\\jdk-17'; $env:PATH = \"$env:JAVA_HOME\\\\bin;$env:PATH\"; & 'C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd' -pl rdms-project/rdms-project-boot -am compile -DskipTests | Select-Object -Last 15)",
|
||||
"PowerShell(java *)",
|
||||
"PowerShell($env:JAVA_HOME = 'C:\\\\Program Files\\\\Java\\\\jdk-17'; $env:PATH = \"$env:JAVA_HOME\\\\bin;$env:PATH\"; & 'C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd' -pl rdms-project/rdms-project-boot -am compile -DskipTests -q 2>&1 | Select-Object -Last 30)",
|
||||
"PowerShell($env:JAVA_HOME = 'C:\\\\Program Files\\\\Java\\\\jdk-17'; $env:PATH = \"$env:JAVA_HOME\\\\bin;$env:PATH\"; $out = & 'C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd' -pl rdms-project/rdms-project-boot -am compile -DskipTests 2>&1; $code = $LASTEXITCODE; $out | Select-Object -Last 15; Write-Output \"EXIT=$code\")",
|
||||
"Bash(set \"JAVA_HOME=C:\\\\Program Files\\\\Java\\\\jdk-17\")",
|
||||
"Bash(\"C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd\" -pl rdms-project/rdms-project-boot -am compile -DskipTests -q)",
|
||||
"Bash(\"C:\\\\software\\\\apache-maven-3.8.9\\\\bin\\\\mvn.cmd\" -pl rdms-project/rdms-project-boot -am compile -DskipTests)",
|
||||
"Bash(grep -E \"\\\\.\\(sql|java|md\\)$\")",
|
||||
"Bash(xargs grep -l \"INSERT INTO.*system_menu\")",
|
||||
"Bash(Get-ChildItem *)",
|
||||
"Bash(Select-Object FullName)"
|
||||
]
|
||||
}
|
||||
}
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -76,3 +76,6 @@ sessionStore
|
||||
|
||||
# local docs
|
||||
/docs/
|
||||
|
||||
# Claude Code 本地工作区
|
||||
.claude/
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
|
||||
#Tue Apr 21 08:50:58 CST 2026
|
||||
https\://maven.aliyun.com/repository/public/.lastUpdated=1776732658408
|
||||
https\://maven.aliyun.com/repository/public/.error=
|
||||
5
AGENTS.md
Normal file
5
AGENTS.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# AGENTS.md
|
||||
|
||||
本仓库的 Agent 工作指引以 [`CLAUDE.md`](./CLAUDE.md) 为准。
|
||||
|
||||
适用范围:以 `C:\code\gitea\rdms\cn-rdms` 为根目录的整个仓库。所有交互原则、本机环境、模块结构、分层职责、鉴权通道、HTTP 动词语义、数据与 SQL、注释编码、Git 纪律、验证默认动作等约束,请直接阅读 `CLAUDE.md`。
|
||||
175
CLAUDE.md
Normal file
175
CLAUDE.md
Normal file
@@ -0,0 +1,175 @@
|
||||
# CLAUDE.md
|
||||
|
||||
本文件为 `C:\code\gitea\rdms\cn-rdms` 仓库下所有 Agent(含 Claude Code)的常驻工作指引;`AGENTS.md` 引用本文件。
|
||||
|
||||
## 工作方式
|
||||
|
||||
- 默认先给执行方案:目标、涉及模块、改动点、验证方式;不擅自动手。
|
||||
- 用户只要分析或评审时,停在分析层;不要顺手开工。
|
||||
- 描述仓库现状以**当前**代码、配置、文档可验证的事实为准;不要拿历史实现、过渡方案或已废弃模型解释当前状态。
|
||||
- **输出极简**:先给结论、改动点、必要风险;用自然语言给判断和影响面,少贴代码片段;涉及代码用 `file_path:line_number` 引用;用户追问再展开。
|
||||
- **下定论需要充足证据**。疑似 bug 时先判断是否稳定复现:跑了很久没动过的功能**首次**报错,优先怀疑运行时状态污染(devtools / IDE 热替换、ApplicationContext 残留、缓存、Redis / DB 连接、JVM 静态字段被旧 context 设过等),**不要凭单次堆栈就断言代码 bug,更不要直接甩修改方案**。先给"可能原因 + 最便宜的取证步骤"(多数场景是**冷重启 JVM**),用户确认能稳定复现,再讨论代码层面的修复。同款写法在仓库其它位置存在并不能反推"也是 bug",长期能跑的代码突然失效 ≠ 代码本身错。
|
||||
- **技术风险判断(性能 / N+1 / 索引缺失 / 架构缺陷 / 并发安全 / 内存泄漏 等)与"bug 判断"同等严格**:未读到实现层不下结论。不要凭 subagent 摘要、字段名、注释或印象"顺嘴提一句风险/瓶颈/可能问题"——那也是下结论,**且杀伤力更大**:用户会基于"风险提示"决定要不要立项整改。如果当前上下文没核实到实现,就明说"这部分未核实,需要打开 X 文件确认",不要把猜测包装成"风险提示"塞出去。已识别教训:执行进度查询答完"已批量聚合无 N+1"后又凭印象抛"列表 N+1 风险",被追问才收回。
|
||||
|
||||
## 本机环境
|
||||
|
||||
- JDK:必须使用 `JDK 17`,路径 `C:\Program Files\Java\jdk-17`。不要使用 JDK 8 / 11 / 其他版本。
|
||||
- Maven:`C:\software\apache-maven-3.8.9`,命令优先用完整路径 `C:\software\apache-maven-3.8.9\bin\mvn.cmd`。不要假设 `mvn` 在 PATH。
|
||||
- 执行任何 Maven / java 命令前,先确认当前 shell 的 `JAVA_HOME` 指向 JDK 17,且 `java -version` 输出 17;否则在该命令上下文中显式切换。
|
||||
|
||||
## 仓库结构
|
||||
|
||||
多模块 Maven 单仓库,Java 17,Spring Boot 3.5.9,根模块打包 `pom`。
|
||||
|
||||
顶层模块:
|
||||
1. `rdms-system` — 系统域(用户/组织/岗位/菜单/角色/权限)
|
||||
2. `rdms-project` — RDMS 核心交付域(项目集/项目/产品/需求/任务/工单/执行)
|
||||
3. `rdms-framework` — 共享框架与内部 starter
|
||||
4. `rdms-gateway` — Spring Cloud Gateway 网关
|
||||
|
||||
每个业务模块按 `xxx-api` + `xxx-boot` 拆分:
|
||||
- `*-api`:对外 RPC/Feign 接口、DTO、错误码、枚举、常量
|
||||
- `*-boot`:启动类、controller、service、dal、convert、api 实现、模块级 framework 配置
|
||||
|
||||
主包/启动类:
|
||||
- `rdms-system-boot`:`com.njcn.rdms.module.system.SystemServerApplication`
|
||||
- `rdms-project-boot`:`com.njcn.rdms.module.project.ProjectServerApplication`
|
||||
- `rdms-gateway`:`com.njcn.rdms.gateway.GatewayServerApplication`
|
||||
|
||||
`rdms-framework` 子模块:`rdms-common` 及一组 `rdms-spring-boot-starter-*`(`env`、`web`、`rpc`、`security`、`mybatis`、`redis`、`mq`、`websocket`、`excel`、`protection`、`test`、`biz-ip`)。
|
||||
|
||||
## 模块演进判断
|
||||
|
||||
新增能力时**先判断落点**:
|
||||
- 落在现有 `rdms-system` 子域 → 沿用 `controller/admin|app`、`service`、`dal/dataobject`、`dal/mysql`、`convert` 的现有结构,跨模块暴露时在 `rdms-system-api` 补 API/DTO/错误码/枚举。
|
||||
- 落在现有 `rdms-project` 子域 → 同理,跨模块走 `rdms-project-api`。
|
||||
- 已具备独立服务边界(如未来的 `rdms-workflow`)→ 新建 `rdms-xxx` + `rdms-xxx-api` + `rdms-xxx-boot`,根 `pom.xml` 加聚合,包路径 / `spring.application.name` / `ApiConstants` / `RpcConstants` / `rdms.info.base-package` 保持一致。
|
||||
|
||||
不要:
|
||||
- 把后续业务长期堆进 `rdms-system`。
|
||||
- 为新增子域引入一套平行的 `application/domain/infrastructure/adapter` 分层。
|
||||
- 让外部模块直接依赖 `*-boot` 的 service 或 mapper(必须走 `*-api`)。
|
||||
|
||||
## 分层职责
|
||||
|
||||
| 层 | 职责 | 红线 |
|
||||
|---|---|---|
|
||||
| `rdms-framework` | 基础能力 | 不承载业务语义;除非框架级缺陷或全局基础设施,不要把业务判断塞进来 |
|
||||
| `rdms-gateway` | 入口、令牌校验、登录用户透传、路由、横切 | 不要在这里承载组织/成员/负责人/项目/产品/工作流状态/数据可见性 |
|
||||
| Controller | HTTP 暴露、参数校验、权限注解、结果封装 | 不要编排复杂业务流程,不要直接操作多个 mapper;用 `ReqVO`/`RespVO`,不要直接暴露 DO |
|
||||
| Service | 业务规则、事务、缓存、领域编排 | 已有领域优先扩展,不要为"整齐"平移;不要把规则散到 controller / mapper / util |
|
||||
| DAL | DO + Mapper | Mapper 继承 `BaseMapperX<T>`;查询优先 `LambdaQueryWrapperX` 与默认方法封装;非必要不回退 XML;不承担领域校验 |
|
||||
| Convert | 已有 `convert` 风格继续沿用,简单场景直接 `BeanUtils` | 不要强推全员 MapStruct,也不要反过来把已有 convert 全删 |
|
||||
|
||||
## 认证与跨模块调用
|
||||
|
||||
- 默认沿用 OAuth2 / Token / `LoginUser` / `login-user` 透传主链。**不要**另造 ThreadLocal / Session / 自定义 header。
|
||||
- 业务逻辑落 `*-boot`;可复用契约落 `*-api`;可复用框架能力落 `rdms-framework`。跨模块/跨服务必须通过 `*-api` 定义契约,**不要直接依赖别人的 `*-boot`**;改跨模块 API 时,`*-boot` 实现与对应 `*-api` 契约同步更新。
|
||||
|
||||
### 鉴权:必须按"全域 / 对象域"分通道挂
|
||||
|
||||
系统有**两条互不交叉**的权限通道,挂错通道 = 永远 403。新增/修改接口前必须先判断它属于哪一域:
|
||||
|
||||
| 通道 | 适用场景 | 注解 / 实现 | 角色与菜单 |
|
||||
|---|---|---|---|
|
||||
| **全域 global** | 传统 RBAC 顶层菜单与"项目管理界面"——选择对象**之前**的所有动作(建项目、列项目、菜单/角色/用户管理等) | Controller 上 `@PreAuthorize("@ss.hasPermission('xxx')")`,由 `PermissionServiceImpl.hasAnyPermissions` 处理 | `system_role.scope_type='global'` + `system_menu.scope_type='global'` |
|
||||
| **对象域 object** | 用户**已选择某个对象**(如某个项目/产品)后,对象内部的一切操作(任务、执行、工时、协办人、需求、成员维护等) | Service 上 `@CheckObjectPermission(objectType=..., objectId="#xxxId", permission="...")`,由 `ObjectPermissionAspect` → `ObjectPermissionService.checkPermission` 处理 | `system_role.scope_type='object'` + `system_menu.scope_type='object'` + `object_type` |
|
||||
|
||||
红线:
|
||||
|
||||
- **对象内接口绝不能挂 `@PreAuthorize("@ss.hasPermission(...)")`**。该注解走的链路在 `PermissionServiceImpl` 里强制按 GLOBAL 取角色(line 343-347)+ 强制按 GLOBAL 查菜单(line 92-94),对象域角色与对象域菜单都进不来,即使授权配置完全正确也必然 403。
|
||||
- **对象域权限校验必须落在 Service 层 `@CheckObjectPermission`**,原因:路径里 `objectId` 通常以 `#projectId`/`#productId` 等 SpEL 解析,Controller 的参数校验前置阶段不便复用;与同模块(`ProjectMemberServiceImpl` / `ProjectExecutionServiceImpl` / `ProjectExecutionAssigneeServiceImpl` / `ProjectTaskServiceImpl`)保持一致。
|
||||
- **同一接口不要两条通道叠加**。要么全域,要么对象域;叠加只会让对象域用户被全域那条卡死。
|
||||
- 列表/详情这类对象内**读路径**目前未挂 `@CheckObjectPermission`(属已识别负债,台账 TD-001),新增读接口暂沿用现状即可,不要顺手改造,等独立立项。
|
||||
|
||||
判定口诀:**URL 里有 `{projectId}` / `{productId}` 等对象 ID → 对象域;没有 → 全域**。
|
||||
|
||||
## 接口语义(HTTP 动词)
|
||||
|
||||
本仓库 update 类接口默认按 RESTful 标准用 HTTP 动词区分语义,前后端必须按下表对齐,避免"前端没传字段"和"前端想清空"在后端无法区分的歧义。
|
||||
|
||||
| 动词 | 语义 | 字段处理规则 |
|
||||
|---|---|---|
|
||||
| **PUT** | 全资源替换 | 前端必须把表单完整状态回传(读到的非必填字段也要原样回传)。后端按字段值落库:**有值=更新,`null`=清空**。DO 字段加 `@TableField(updateStrategy = FieldStrategy.ALWAYS)` 跳过全局 `NOT_NULL` 让 `null` 真的写库 |
|
||||
| **PATCH** | 部分字段更新 | **本仓库暂不引入 PATCH 接口**。如果有"只改一两个字段"的需求,用专门的子动作接口(参考 `assignees/{id}/inactive`、`status` 这种语义化路径),不要在 update 接口里靠旁路标记(如 `clearXxx: true`)模拟 PATCH |
|
||||
| **DELETE** | 资源删除 | 软删走全局 `deleted` 列,不需要参数 body |
|
||||
|
||||
红线:
|
||||
|
||||
- **不要在 update 类接口的 ReqVO 里加 `clearXxx: Boolean` 这种旁路标记**来模拟 PATCH —— 等于承认接口是"伪 PATCH",会让所有非必填字段都需要类似标记,长期污染 API 设计。需要部分更新就拆子动作接口。
|
||||
- 新增 update 接口时,必须在 API 文档对应章节明示"PUT 全字段回传"约定;DO 上对允许 null 的字段补 `FieldStrategy.ALWAYS` 注解,并加注释说明语义来源(指向本节)。
|
||||
- 历史接口若是稀疏 PATCH 风格(传 null = 不动),保留现状但不要拓展;遇到清空诉求时按 PUT 方向重构。
|
||||
|
||||
## 数据与 SQL
|
||||
|
||||
- 新表 DO 复用现有 `BaseDO` / 审计字段风格,不要再引一套审计基类(除非该表本身明确不需要逻辑删除)。
|
||||
- **不要假设运行时自动数据库迁移**:依赖新表/新字段/新索引时,必须同步补 SQL 脚本与文档。
|
||||
- SQL 放在目标模块 `src/main/resources/sql/...`,可审阅、可单独执行。
|
||||
- 缓存/日志/审计变更优先沿用既有机制,不要绕开登录上下文与审计字段填充。
|
||||
|
||||
### 种子 SQL(纯 SQL INSERT 雪花 ID 表)
|
||||
|
||||
`system_dict_type` / `system_dict_data` / `system_menu` 等历史表 id 由 MyBatis-Plus 雪花算法在 Java 层生成,DDL 无 `AUTO_INCREMENT`。纯 SQL 路径(字典种子、菜单种子等)写 INSERT 必须显式提供 id,否则 MySQL 报 `1364 - Field 'id' doesn't have a default value`。
|
||||
|
||||
- **id 取值**:`SET @new_id = (SELECT IFNULL(MAX(id), 0) + 1 FROM xxx_table);` 然后 INSERT `SELECT @new_id, ...`。雪花 ID 单调递增,`MAX+1` 落在已用区间之后,不会与未来 Java 生成的新雪花 ID 冲突。
|
||||
- **多条连续 INSERT**:每条 INSERT **前重新取** `MAX+1`——不要用 `base+1 / +2 / +3` 一次性算多个。配合 `NOT EXISTS` 守卫,部分已存在场景(半路重跑)才不会出现两条共用一个 id。
|
||||
- **collation 1267 陷阱**:仓库历史表 collation 不统一(如 `system_dict_data` 是 `utf8mb4_unicode_ci`,新表 `rdms_task_worklog` 是 `utf8mb4_0900_ai_ci`)。**不要**用 `SET @t = 'xxx'` 存字符串再 `WHERE col = @t`——用户变量自带连接级 collation,与列 collation 撞会报 `1267 Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_0900_ai_ci,IMPLICIT) for operation '='`。**对策**:直接展开成字面值,MySQL 字面值会按列 collation 隐式解析,不冲突。
|
||||
|
||||
样板参考:`docs/sql/rdms_task_worklog.sql:47-50`(菜单种子)+ `docs/sql/rdms_worklog_difficulty_seed.sql`(字典种子)。
|
||||
|
||||
## 注释与编码
|
||||
|
||||
- 关键字段/分支/约束/非直观实现补**简洁中文**注释;中文写入必须 UTF-8,不要用"改成英文"规避乱码。
|
||||
- superpowers 产出的功能文档(设计/实施/联调)默认中文落地;代码标识、文件路径、接口路径、SQL、命令保持原样不意译。
|
||||
|
||||
## 文档输出格式
|
||||
|
||||
- 新写文档默认输出 **HTML 格式**(便于浏览器直接打开、自带样式)。
|
||||
- 例外:`docs/superpowers/` 下保持 markdown(工作流约定)。
|
||||
- 历史已有的 markdown 文档不强制迁移;只有新写的按 HTML。
|
||||
|
||||
## 工作规则(执行前对照)
|
||||
|
||||
1. 优先做有边界的模块内改动,避免跨模块扩散。
|
||||
2. **不要修改** `application-local.yaml` / `application-dev.yaml`,除非任务本身就是环境配置调整;改前先查 git 状态。
|
||||
3. 新增共享能力优先扩展现有 `rdms-spring-boot-starter-*`,不要在业务服务里重复堆配置。
|
||||
4. **未经用户明确同意,不执行任何 `mvn`、启动命令、脚本等会实际运行项目的命令。**
|
||||
|
||||
## Git 操作纪律
|
||||
|
||||
### 默认不引导分支管理(**首要**)
|
||||
|
||||
用户在本仓库长期固定在 `main` 上工作。开发流程中:
|
||||
|
||||
- **不要主动建议建 feature 分支**(`git checkout -b feat/xxx`、`git switch -c ...`)。
|
||||
- **不要把"先切到 xxx 分支再操作"作为方案前置步骤**。
|
||||
- 一切围绕 `main` 展开:直接在 `main` 上改、`main` 上提交、`main` 上推。
|
||||
- 例外:用户明确要求建分支、或涉及多人协作 / PR 评审 / 大规模重构(此时仍只是"提一句作为可选",不强推)。
|
||||
|
||||
**理由**:这次差点丢用户 3 天工作的事故,根因就是分支管理本身——某次操作意外把文件名当成分支名(建出 `用户行动清单.md` 分支),后续"切回 main + `git branch -D` 删怪分支"流程里就把未推送 commit `8bad989` 干掉了。**少走分支 = 少埋雷**。
|
||||
|
||||
### 破坏性 git 命令必须先核实
|
||||
|
||||
任何**会丢工作**的 git 命令——`branch -D`、`reset --hard`、`clean -fd`、`push --force` / `--force-with-lease`、`checkout` / `switch` 带未提交改动、`rebase` 在已推送分支上、直接动 `.git/` 内部文件(`refs/`、`HEAD`、`packed-refs`)——**给出建议前必须先核实**,不得凭"看起来安全"就甩命令:
|
||||
|
||||
1. **目标 ref 上是否有未推送 / 未合并 commit**:让用户跑 `git log --oneline -5 <ref>` 或 `git log <主线>..<ref>` 把输出贴回来。
|
||||
2. **工作区是否干净**:`git status`。
|
||||
3. **先挂救生圈**:建议用 `git tag backup-xxx <sha>` 锁定当前 SHA,**再执行**破坏性命令。
|
||||
4. **明示翻车回滚路径**:例如"如果不对,`git reset --hard backup-xxx` 即可回到此处"。
|
||||
|
||||
## 验证默认动作
|
||||
|
||||
先定义验证方式,再做修改。默认静态验证:
|
||||
- 调用链是否闭环、是否符合模块边界
|
||||
- 配置项 / 接口契约 / 权限标识 / 路由 / 资源注册前后是否一致
|
||||
- 改动是否控制在最小集合
|
||||
- 文档 / SQL / 配置 / 接口说明是否需要同步更新
|
||||
|
||||
如果改动涉及 Spring 配置、序列化、安全、路由、RPC 契约、MyBatis 行为或跨模块 API,必须**显式区分**哪些是已静态检查、哪些尚未实际运行验证。
|
||||
|
||||
## 给后续我自己的提醒
|
||||
|
||||
- 仓库可能有未提交的本地改动,不要顺手覆盖与当前任务无关的编辑。
|
||||
- `docs/` 是当前工作上下文的一部分,不是归档;架构级修改前先查阅 [`docs/README.md`](./docs/README.md)。
|
||||
- 根 `pom.xml` 统一版本与依赖;版本调整改根 pom,不要散落到子模块。
|
||||
- 推荐使用 `Glob` / `Grep` / `Read` 等专用工具,避免用 Bash 做文件搜索/读取/编辑。
|
||||
355
docs/superpowers/specs/2026-05-22-ticket-design.md
Normal file
355
docs/superpowers/specs/2026-05-22-ticket-design.md
Normal file
@@ -0,0 +1,355 @@
|
||||
# 工单需求规格说明
|
||||
|
||||
日期:2026-05-22
|
||||
|
||||
## 1. 背景
|
||||
|
||||
`rdms-project` 当前承载项目、产品、需求、执行、任务等核心交付对象。现有代码中产品需求、项目需求已经具备 `sourceType` / `sourceBizId` 来源字段,可以承接来自工单的需求派生关系;执行和任务也已经形成“项目需求 -> 执行 -> 任务”的后续交付链路。
|
||||
|
||||
本需求新增内部工单能力。工单作为独立业务对象存在,不复用需求、执行或任务主表。工单用于记录内部用户提交的诉求,经工单负责人受理后,可按归属类型派生产品需求或项目需求,并通过现有需求链路继续流转到执行、任务。
|
||||
|
||||
## 2. 目标
|
||||
|
||||
1. 支持内部用户创建普通工单或父工单。
|
||||
2. 支持父工单逐步拆分子工单,父工单只汇总,不直接处理。
|
||||
3. 支持普通工单、子工单作为最小处理单位,由指定工单负责人受理、拒绝、处理和关闭。
|
||||
4. 支持工单单归属到一个产品或一个项目。
|
||||
5. 支持产品工单派生产品需求、项目工单派生项目需求。
|
||||
6. 支持有派生需求的工单在全部需求完成后自动关闭。
|
||||
7. 支持无派生需求的工单由工单负责人手动关闭。
|
||||
|
||||
## 3. 非目标
|
||||
|
||||
1. 本期不做外部客户工单,不保留 `sourceChannel`、`externalCustomerName`、`externalContact` 等外部来源字段。
|
||||
2. 本期不做工单编号 `ticketNo`。
|
||||
3. 工单不能直接派生执行或任务。
|
||||
4. 父工单不能受理、拒绝、派生需求或手动关闭。
|
||||
5. 本期不引入流程引擎,不做可配置审批流。
|
||||
6. 本期不自动判断工单是否涉及多个产品/项目,也不自动判断归属产品或项目;这些由录入人员人工选择。
|
||||
|
||||
## 4. 核心概念
|
||||
|
||||
### 4.1 工单形态
|
||||
|
||||
使用 `ticketMode` 表达工单形态:
|
||||
|
||||
| 值 | 含义 | 是否可处理 | 说明 |
|
||||
|---|---|---|---|
|
||||
| `single` | 普通工单 | 是 | 单归属工单,不挂父工单 |
|
||||
| `parent` | 父工单 | 否 | 原始诉求汇总单,可持续拆分子工单 |
|
||||
| `child` | 子工单 | 是 | 挂在父工单下的最小处理单位 |
|
||||
|
||||
不使用 `isParent`。`ticketMode` 比布尔字段更准确,可以区分普通工单、父工单和子工单,避免在父工单尚未创建子工单时无法识别其形态。
|
||||
|
||||
### 4.2 归属类型
|
||||
|
||||
普通工单和子工单必须单归属:
|
||||
|
||||
| `belongType` | 归属对象 | 可派生对象 | 后续链路 |
|
||||
|---|---|---|---|
|
||||
| `product` | 一个产品 | 产品需求 | 产品需求 -> 指派项目 -> 项目需求 -> 执行 -> 任务 |
|
||||
| `project` | 一个项目 | 项目需求 | 项目需求 -> 执行 -> 任务 |
|
||||
|
||||
父工单不填写 `belongType`、`productId`、`projectId`。
|
||||
|
||||
## 5. 业务流程
|
||||
|
||||
### 5.1 总流程图
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
A([开始]) --> B[录入人员创建工单]
|
||||
B --> C{ticketMode}
|
||||
|
||||
C -->|parent| P1[父工单: splitting]
|
||||
P1 --> P2[列表操作列拆分子工单]
|
||||
P2 --> C1[创建子工单: pending_accept]
|
||||
P1 --> P3{是否存在子工单且全部为终态}
|
||||
P3 -->|否| P1
|
||||
P3 -->|是| P4[父工单: closed]
|
||||
P4 --> Z([结束])
|
||||
|
||||
C -->|single| S1[普通工单: pending_accept]
|
||||
C1 --> S2[工单负责人待处理]
|
||||
S1 --> S2
|
||||
S2 --> D{是否受理}
|
||||
D -->|否| R[工单: rejected]
|
||||
R --> Z
|
||||
D -->|是| E[工单: processing]
|
||||
|
||||
E --> F{是否派生需求}
|
||||
F -->|否| G[负责人填写处理结论并手动关闭]
|
||||
G --> H[工单: closed]
|
||||
H --> I[触发父工单汇总检查]
|
||||
I --> Z
|
||||
|
||||
F -->|是| J{归属类型}
|
||||
J -->|product| K[派生一个或多个产品需求]
|
||||
J -->|project| L[派生一个或多个项目需求]
|
||||
K --> M[等待派生需求全部完成]
|
||||
L --> M
|
||||
M --> N{全部派生需求完成}
|
||||
N -->|否| E
|
||||
N -->|是| O[系统自动关闭工单: closed]
|
||||
O --> I
|
||||
```
|
||||
|
||||
### 5.2 父工单流程
|
||||
|
||||
1. 录入人员创建父工单,状态为 `splitting`。
|
||||
2. 父工单只记录原始诉求和附件,不进入处理队列。
|
||||
3. 工单列表查询的操作列为父工单提供“拆分子工单”入口。
|
||||
4. 录入人员可以持续新增子工单。
|
||||
5. 父工单至少存在一个子工单,且所有子工单均进入终态后,系统自动关闭父工单。
|
||||
6. 父工单关闭后不再作为处理对象,但可继续作为历史汇总查看。
|
||||
|
||||
### 5.3 普通工单 / 子工单流程
|
||||
|
||||
1. 创建后进入 `pending_accept`。
|
||||
2. 工单负责人判断是否受理。
|
||||
3. 不受理则进入 `rejected`,需要填写拒绝原因。
|
||||
4. 受理后进入 `processing`。
|
||||
5. 处理中可以派生需求,也可以在无派生需求时填写处理结论并手动关闭。
|
||||
6. 一旦存在派生需求,工单不能手动关闭,必须等待全部派生需求完成后自动关闭。
|
||||
|
||||
## 6. 状态模型
|
||||
|
||||
### 6.1 父工单状态
|
||||
|
||||
| 状态 | 含义 | 进入方式 | 退出方式 |
|
||||
|---|---|---|---|
|
||||
| `splitting` | 拆分中 / 汇总中 | 创建父工单 | 所有子工单终态后自动关闭 |
|
||||
| `closed` | 已关闭 | 系统自动关闭 | 终态 |
|
||||
|
||||
父工单不允许进入 `pending_accept`、`rejected`、`processing`。
|
||||
|
||||
### 6.2 普通工单 / 子工单状态
|
||||
|
||||
| 状态 | 含义 | 进入方式 | 退出方式 |
|
||||
|---|---|---|---|
|
||||
| `pending_accept` | 待受理 | 创建普通工单或子工单 | 受理或拒绝 |
|
||||
| `rejected` | 已拒绝 | 工单负责人拒绝 | 终态 |
|
||||
| `processing` | 处理中 | 工单负责人受理 | 手动关闭或自动关闭 |
|
||||
| `closed` | 已关闭 | 手动关闭或派生需求全部完成后自动关闭 | 终态 |
|
||||
|
||||
终态包括 `rejected`、`closed`。
|
||||
|
||||
### 6.3 自动关闭规则
|
||||
|
||||
1. 普通工单 / 子工单存在派生需求时,只有全部派生需求完成后才自动关闭。
|
||||
2. 普通工单 / 子工单不存在派生需求时,允许工单负责人手动关闭,必须填写 `closeResult`。
|
||||
3. 父工单至少存在一个子工单,且所有子工单均为 `rejected` 或 `closed` 后,自动关闭。
|
||||
4. 父工单不直接检查需求完成情况,只汇总子工单终态。
|
||||
|
||||
## 7. 数据模型
|
||||
|
||||
### 7.1 工单主表
|
||||
|
||||
建议表名:`rdms_ticket`
|
||||
|
||||
| 字段 | 类型建议 | 必填规则 | 说明 |
|
||||
|---|---|---|---|
|
||||
| `id` | `bigint` | 是 | 主键 |
|
||||
| `parent_id` | `bigint` | 否 | 父工单 ID;`child` 必填 |
|
||||
| `ticket_mode` | `varchar(32)` | 是 | `single` / `parent` / `child` |
|
||||
| `title` | `varchar(255)` | 是 | 工单标题 |
|
||||
| `description` | `text` | 否 | 工单描述,支持富文本 |
|
||||
| `ticket_type` | `varchar(32)` | 是 | 工单类型,字典 |
|
||||
| `priority` | `varchar(32)` | 否 | 优先级,建议复用需求优先级字典 |
|
||||
| `status_code` | `varchar(32)` | 是 | 工单状态 |
|
||||
| `submitter_id` | `bigint` | 是 | 提交人用户 ID |
|
||||
| `submitter_nickname` | `varchar(64)` | 否 | 提交人昵称快照 |
|
||||
| `owner_id` | `bigint` | `single` / `child` 必填 | 工单负责人用户 ID |
|
||||
| `owner_nickname` | `varchar(64)` | 否 | 工单负责人昵称快照 |
|
||||
| `belong_type` | `varchar(32)` | `single` / `child` 必填 | `product` / `project` |
|
||||
| `product_id` | `bigint` | 产品工单必填 | 归属产品 ID |
|
||||
| `project_id` | `bigint` | 项目工单必填 | 归属项目 ID |
|
||||
| `accept_time` | `datetime` | 否 | 受理时间 |
|
||||
| `reject_reason` | `varchar(500)` | 拒绝时必填 | 拒绝原因 |
|
||||
| `close_time` | `datetime` | 否 | 关闭时间 |
|
||||
| `close_result` | `varchar(1000)` | 手动关闭时必填 | 处理结论 |
|
||||
| `attachments` | `json` | 否 | 附件列表,沿用 `AttachmentItem` |
|
||||
|
||||
审计字段、逻辑删除字段复用现有 `BaseDO` 风格。
|
||||
|
||||
### 7.2 工单需求关联表
|
||||
|
||||
建议表名:`rdms_ticket_requirement_link`
|
||||
|
||||
| 字段 | 类型建议 | 必填规则 | 说明 |
|
||||
|---|---|---|---|
|
||||
| `id` | `bigint` | 是 | 主键 |
|
||||
| `ticket_id` | `bigint` | 是 | 工单 ID |
|
||||
| `target_type` | `varchar(32)` | 是 | `product_requirement` / `project_requirement` |
|
||||
| `target_id` | `bigint` | 是 | 需求 ID |
|
||||
|
||||
不设置 `relationType`。本期关联表只表达“该工单派生了哪些需求”。
|
||||
|
||||
建议唯一约束:`ticket_id + target_type + target_id`。
|
||||
|
||||
## 8. 需求派生规则
|
||||
|
||||
### 8.1 产品工单派生产品需求
|
||||
|
||||
适用条件:
|
||||
|
||||
1. `ticketMode` 为 `single` 或 `child`。
|
||||
2. `belongType = product`。
|
||||
3. 工单状态为 `processing`。
|
||||
|
||||
派生结果:
|
||||
|
||||
1. 创建 `ProductRequirementDO`。
|
||||
2. `productId` 使用工单 `productId`。
|
||||
3. `sourceType = "work_order"`。
|
||||
4. `sourceBizId = ticketId`。
|
||||
5. 标题、描述、优先级、附件、提出人等字段可从工单带入,并允许派生表单二次编辑。
|
||||
6. 写入 `rdms_ticket_requirement_link`,`targetType = product_requirement`。
|
||||
|
||||
后续链路沿用现有产品需求分发到项目的能力。
|
||||
|
||||
### 8.2 项目工单派生项目需求
|
||||
|
||||
适用条件:
|
||||
|
||||
1. `ticketMode` 为 `single` 或 `child`。
|
||||
2. `belongType = project`。
|
||||
3. 工单状态为 `processing`。
|
||||
|
||||
派生结果:
|
||||
|
||||
1. 创建 `ProjectRequirementDO`。
|
||||
2. `projectId` 使用工单 `projectId`。
|
||||
3. `sourceType = "work_order"`。
|
||||
4. `sourceBizId = ticketId`。
|
||||
5. 标题、描述、优先级、附件、提出人等字段可从工单带入,并允许派生表单二次编辑。
|
||||
6. 写入 `rdms_ticket_requirement_link`,`targetType = project_requirement`。
|
||||
|
||||
后续执行和任务沿用现有项目需求、执行、任务链路。
|
||||
|
||||
### 8.3 完成判定
|
||||
|
||||
1. 产品工单只检查由该工单派生的产品需求。
|
||||
2. 项目工单只检查由该工单派生的项目需求。
|
||||
3. 需求完成态应复用现有需求状态模型的终态配置,不在工单逻辑中写死具体状态码。
|
||||
4. 派生需求数量大于 0 且全部完成时,系统自动关闭对应工单。
|
||||
|
||||
## 9. 页面与待办
|
||||
|
||||
### 9.1 我的提交
|
||||
|
||||
展示当前用户提交的工单,包括:
|
||||
|
||||
1. 父工单。
|
||||
2. 普通工单。
|
||||
3. 子工单。
|
||||
|
||||
建议支持按状态、工单类型、归属类型、归属对象、创建时间筛选。
|
||||
|
||||
### 9.2 我的待处理
|
||||
|
||||
展示当前用户负责的普通工单和子工单,不展示父工单。
|
||||
|
||||
筛选条件:
|
||||
|
||||
1. `ownerId = 当前用户`。
|
||||
2. `ticketMode in (single, child)`。
|
||||
3. `statusCode in (pending_accept, processing)`。
|
||||
|
||||
### 9.3 父工单列表操作
|
||||
|
||||
工单列表查询中,父工单行需要在操作列展示“拆分子工单”入口。该入口只对父工单提交人或具备工单管理权限的用户可见。
|
||||
|
||||
点击后进入新增子工单表单,表单需要携带父工单上下文,并要求录入人员填写子工单的归属类型、归属产品/项目、工单负责人、工单类型等处理字段。
|
||||
|
||||
### 9.4 父工单汇总展示
|
||||
|
||||
父工单汇总展示需要包含:
|
||||
|
||||
1. 原始诉求信息。
|
||||
2. 子工单列表。
|
||||
3. 子工单归属产品/项目。
|
||||
4. 子工单负责人。
|
||||
5. 子工单状态。
|
||||
6. 子工单派生需求数量与完成数量。
|
||||
7. 父工单自动关闭结果。
|
||||
|
||||
## 10. 权限规则
|
||||
|
||||
1. 创建工单走全域权限。
|
||||
2. 父工单新增子工单:父工单提交人或具备工单管理权限的用户可操作。
|
||||
3. 普通工单 / 子工单受理、拒绝、手动关闭:工单负责人或具备工单管理权限的用户可操作。
|
||||
4. 派生产品需求时,需要满足产品对象权限。
|
||||
5. 派生项目需求时,需要满足项目对象权限。
|
||||
6. 父工单不能执行受理、拒绝、派生需求、手动关闭动作。
|
||||
|
||||
## 11. 接口建议
|
||||
|
||||
接口路径建议落在 `rdms-project` 模块:
|
||||
|
||||
| 方法 | 路径 | 说明 |
|
||||
|---|---|---|
|
||||
| `POST` | `/project/tickets` | 创建普通工单或父工单 |
|
||||
| `POST` | `/project/tickets/{parentId}/children` | 父工单新增子工单 |
|
||||
| `GET` | `/project/tickets/my-submitted/page` | 我的提交 |
|
||||
| `GET` | `/project/tickets/my-pending/page` | 我的待处理 |
|
||||
| `GET` | `/project/tickets/{id}` | 工单详情 |
|
||||
| `POST` | `/project/tickets/{id}/accept` | 受理 |
|
||||
| `POST` | `/project/tickets/{id}/reject` | 拒绝 |
|
||||
| `POST` | `/project/tickets/{id}/close` | 无派生需求时手动关闭 |
|
||||
| `POST` | `/project/tickets/{id}/derive-product-requirement` | 派生产品需求 |
|
||||
| `POST` | `/project/tickets/{id}/derive-project-requirement` | 派生项目需求 |
|
||||
|
||||
创建、更新类接口需要继续遵守仓库 HTTP 动词语义约定。部分动作使用语义化 `POST` 子动作接口,不引入 `PATCH`。
|
||||
|
||||
## 12. 校验规则
|
||||
|
||||
1. `ticketMode = parent` 时,`ownerId`、`belongType`、`productId`、`projectId` 必须为空。
|
||||
2. `ticketMode = single` 时,`ownerId`、`belongType` 必填,且 `productId` / `projectId` 按归属类型二选一。
|
||||
3. `ticketMode = child` 时,`parentId`、`ownerId`、`belongType` 必填,且父工单必须存在且 `ticketMode = parent`。
|
||||
4. 产品工单必须填写 `productId`,不能填写 `projectId`。
|
||||
5. 项目工单必须填写 `projectId`,不能填写 `productId`。
|
||||
6. 只有 `pending_accept` 状态的普通工单 / 子工单可以受理或拒绝。
|
||||
7. 只有 `processing` 状态的普通工单 / 子工单可以派生需求。
|
||||
8. 有派生需求的工单不能手动关闭。
|
||||
9. 无派生需求的 `processing` 工单可以手动关闭,必须填写 `closeResult`。
|
||||
10. 父工单不能手动关闭。
|
||||
11. 父工单至少有一个子工单,且全部子工单终态后才能自动关闭。
|
||||
|
||||
## 13. 错误处理
|
||||
|
||||
建议新增明确错误码覆盖以下场景:
|
||||
|
||||
1. 工单不存在。
|
||||
2. 工单形态非法。
|
||||
3. 父工单不能处理。
|
||||
4. 子工单父级非法。
|
||||
5. 工单归属类型非法。
|
||||
6. 产品工单不能派生项目需求。
|
||||
7. 项目工单不能派生产品需求。
|
||||
8. 工单状态不允许当前动作。
|
||||
9. 有派生需求的工单不能手动关闭。
|
||||
10. 派生需求未全部完成,工单不能自动关闭。
|
||||
|
||||
## 14. 测试重点
|
||||
|
||||
1. 创建父工单后状态为 `splitting`,且不能受理、拒绝、派生需求、手动关闭。
|
||||
2. 父工单可以持续新增多个子工单。
|
||||
3. 子工单必须单归属产品或项目。
|
||||
4. 普通工单 / 子工单创建后进入 `pending_accept`。
|
||||
5. 工单负责人拒绝后进入 `rejected`。
|
||||
6. 工单负责人受理后进入 `processing`。
|
||||
7. 无派生需求的 `processing` 工单可手动关闭。
|
||||
8. 有派生需求的工单不能手动关闭。
|
||||
9. 产品工单只能派生产品需求。
|
||||
10. 项目工单只能派生项目需求。
|
||||
11. 派生需求全部完成后自动关闭工单。
|
||||
12. 所有子工单终态后自动关闭父工单。
|
||||
|
||||
## 15. 风险与约束
|
||||
|
||||
1. 自动关闭依赖需求完成态判定,实施时必须和现有需求状态模型对齐。
|
||||
2. 产品需求分发到项目后的项目需求、执行、任务链路不属于工单直接职责,工单只追踪自己直接派生的需求。
|
||||
3. 父工单允许持续补子工单,会带来“父工单已关闭后是否允许继续补子单”的边界。本规格默认父工单关闭后不再补子单;如需重开父工单,需要单独设计重开动作。
|
||||
4. 现有前端已有 `/ticket/my-submitted`、`/ticket/my-pending` 资源入口,后端接口落地时需要与前端路由和菜单权限同步。
|
||||
|
||||
11
pom.xml
11
pom.xml
@@ -9,6 +9,7 @@
|
||||
<packaging>pom</packaging>
|
||||
<modules>
|
||||
<module>rdms-system</module>
|
||||
<module>rdms-project</module>
|
||||
<module>rdms-framework</module>
|
||||
<module>rdms-gateway</module>
|
||||
</modules>
|
||||
@@ -28,6 +29,7 @@
|
||||
<spring.boot.version>3.5.9</spring.boot.version>
|
||||
<mapstruct.version>1.6.3</mapstruct.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<swagger.version>2.2.38</swagger.version>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
@@ -118,6 +120,15 @@
|
||||
<artifactId>rdms-spring-boot-starter-websocket</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 热部署依赖-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-devtools</artifactId>
|
||||
<version>${spring.boot.version}</version>
|
||||
<scope>runtime</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
|
||||
@@ -72,7 +72,8 @@
|
||||
<!-- Swagger 注解,用于 API 文档生成(@Schema、@Operation 等) -->
|
||||
<dependency>
|
||||
<groupId>io.swagger.core.v3</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<artifactId>swagger-annotations-jakarta</artifactId>
|
||||
<version>${swagger.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- RPC 远程调用相关 -->
|
||||
@@ -180,4 +181,4 @@
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
</project>
|
||||
|
||||
@@ -26,5 +26,17 @@ public interface RpcConstants {
|
||||
*/
|
||||
String SYSTEM_PREFIX = RPC_API_PREFIX + "/system";
|
||||
|
||||
/**
|
||||
* project 服务名
|
||||
*
|
||||
* 注意,需要保证和 spring.application.name 保持一致
|
||||
*/
|
||||
String PROJECT_NAME = "rdms-project-server";
|
||||
|
||||
/**
|
||||
* project 服务的前缀
|
||||
*/
|
||||
String PROJECT_PREFIX = RPC_API_PREFIX + "/project";
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -27,9 +27,8 @@ public class PageParam implements Serializable {
|
||||
@Min(value = 1, message = "页码最小值为 1")
|
||||
private Integer pageNo = PAGE_NO;
|
||||
|
||||
@Schema(description = "每页条数,最大值为 200", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
||||
@Schema(description = "每页条数,最大值为 200;传 -1 表示不分页(查询全部)", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
||||
@NotNull(message = "每页条数不能为空")
|
||||
@Min(value = 1, message = "每页条数最小值为 1")
|
||||
@Max(value = 200, message = "每页条数最大值为 200")
|
||||
private Integer pageSize = PAGE_SIZE;
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
package com.njcn.rdms.framework.env.core;
|
||||
@@ -10,6 +10,8 @@ import java.util.List;
|
||||
|
||||
public class InDictCollectionValidator implements ConstraintValidator<InDict, Collection<?>> {
|
||||
|
||||
private static final String MISSING_DICT_DATA_MESSAGE = "字典数据缺失,请联系管理员维护";
|
||||
|
||||
private String dictType;
|
||||
|
||||
@Override
|
||||
@@ -25,6 +27,12 @@ public class InDictCollectionValidator implements ConstraintValidator<InDict, Co
|
||||
}
|
||||
// 校验全部通过
|
||||
List<String> dbValues = DictFrameworkUtils.getDictDataValueList(dictType);
|
||||
if (dbValues.isEmpty()) {
|
||||
context.disableDefaultConstraintViolation();
|
||||
context.buildConstraintViolationWithTemplate(MISSING_DICT_DATA_MESSAGE)
|
||||
.addConstraintViolation();
|
||||
return false;
|
||||
}
|
||||
boolean match = list.stream().allMatch(v -> dbValues.stream()
|
||||
.anyMatch(dbValue -> dbValue.equalsIgnoreCase(v.toString())));
|
||||
if (match) {
|
||||
@@ -40,4 +48,3 @@ public class InDictCollectionValidator implements ConstraintValidator<InDict, Co
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@ import java.util.List;
|
||||
|
||||
public class InDictValidator implements ConstraintValidator<InDict, Object> {
|
||||
|
||||
private static final String MISSING_DICT_DATA_MESSAGE = "字典数据缺失,请联系管理员维护";
|
||||
|
||||
private String dictType;
|
||||
|
||||
@Override
|
||||
@@ -24,6 +26,12 @@ public class InDictValidator implements ConstraintValidator<InDict, Object> {
|
||||
}
|
||||
// 校验通过
|
||||
final List<String> values = DictFrameworkUtils.getDictDataValueList(dictType);
|
||||
if (values.isEmpty()) {
|
||||
context.disableDefaultConstraintViolation();
|
||||
context.buildConstraintViolationWithTemplate(MISSING_DICT_DATA_MESSAGE)
|
||||
.addConstraintViolation();
|
||||
return false;
|
||||
}
|
||||
boolean match = values.stream().anyMatch(v -> StrUtil.equalsIgnoreCase(v, value.toString()));
|
||||
if (match) {
|
||||
return true;
|
||||
@@ -38,4 +46,3 @@ public class InDictValidator implements ConstraintValidator<InDict, Object> {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -99,7 +99,8 @@ public class GrayLoadBalancer implements ReactorServiceInstanceLoadBalancer {
|
||||
List<ServiceInstance> chooseInstances = CollectionUtils.filterList(instances, instance -> StrUtil.isEmpty(EnvUtils.getTag(instance)));
|
||||
// 【重要】补充说明:如果希望在 chooseInstances 为空时,不允许打到有 tag 的实例,可以取消注释下面的代码
|
||||
if (CollUtil.isEmpty(chooseInstances)) {
|
||||
log.warn("[filterTagServiceInstances][serviceId({}) 没有不带 tag 的服务实例列表,直接使用所有服务实例列表]", serviceId);
|
||||
// 本地开发场景下所有实例都带 tag(HOSTNAME),fallback 到全集属于设计内常态、请求并未失败,降级为 debug 避免噪音
|
||||
log.debug("[filterTagServiceInstances][serviceId({}) 没有不带 tag 的服务实例列表,直接使用所有服务实例列表]", serviceId);
|
||||
chooseInstances = instances;
|
||||
}
|
||||
return chooseInstances;
|
||||
@@ -108,7 +109,8 @@ public class GrayLoadBalancer implements ReactorServiceInstanceLoadBalancer {
|
||||
// 情况二,有 tag 时,使用 tag 匹配服务实例
|
||||
List<ServiceInstance> chooseInstances = CollectionUtils.filterList(instances, instance -> tag.equals(EnvUtils.getTag(instance)));
|
||||
if (CollUtil.isEmpty(chooseInstances)) {
|
||||
log.warn("[filterTagServiceInstances][serviceId({}) 没有满足 tag({}) 的服务实例列表,直接使用所有服务实例列表]", serviceId, tag);
|
||||
// 同上:未命中 tag 时 fallback 到全集是设计内正常路径,降级为 debug
|
||||
log.debug("[filterTagServiceInstances][serviceId({}) 没有满足 tag({}) 的服务实例列表,直接使用所有服务实例列表]", serviceId, tag);
|
||||
chooseInstances = instances;
|
||||
}
|
||||
return chooseInstances;
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.njcn.rdms.framework.common.util.json.JsonUtils;
|
||||
import com.njcn.rdms.gateway.util.SecurityFrameworkUtils;
|
||||
import com.njcn.rdms.gateway.util.WebFrameworkUtils;
|
||||
import com.njcn.rdms.module.system.enums.ErrorCodeConstants;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.cloud.client.loadbalancer.reactive.ReactorLoadBalancerExchangeFilterFunction;
|
||||
import org.springframework.cloud.gateway.filter.GatewayFilterChain;
|
||||
import org.springframework.cloud.gateway.filter.GlobalFilter;
|
||||
@@ -25,10 +26,12 @@ import reactor.core.publisher.Mono;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.function.Function;
|
||||
|
||||
import static com.njcn.rdms.framework.common.util.cache.CacheUtils.buildAsyncReloadingCache;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
public class TokenAuthenticationFilter implements GlobalFilter, Ordered {
|
||||
|
||||
@@ -37,6 +40,18 @@ public class TokenAuthenticationFilter implements GlobalFilter, Ordered {
|
||||
|
||||
private static final LoginUser LOGIN_USER_EMPTY = new LoginUser();
|
||||
|
||||
/**
|
||||
* 跳过 access token 校验的路径白名单。
|
||||
* 这些接口在 system 端标注 @PermitAll,本就不需要登录态;若前端调用时带过期 access,
|
||||
* 网关不应在此处拦截 1002023000,否则 /refresh-token 永远走不到 system 的 1002023001 / 业务逻辑。
|
||||
*/
|
||||
private static final Set<String> SKIP_AUTH_PATHS = Set.of(
|
||||
"/admin-api/system/auth/login",
|
||||
"/admin-api/system/auth/logout",
|
||||
"/admin-api/system/auth/refresh-token",
|
||||
"/admin-api/system/auth/register"
|
||||
);
|
||||
|
||||
private final WebClient webClient;
|
||||
|
||||
private final LoadingCache<String, LoginUser> loginUserCache = buildAsyncReloadingCache(Duration.ofMinutes(1),
|
||||
@@ -44,8 +59,16 @@ public class TokenAuthenticationFilter implements GlobalFilter, Ordered {
|
||||
|
||||
@Override
|
||||
public LoginUser load(String token) {
|
||||
String body = checkAccessToken(token).block();
|
||||
return buildUser(body, token);
|
||||
// 仅异步 refresh 走这里(同步链路用 getIfPresent + 直接 checkAccessToken,不触发 load)
|
||||
// 远端 token 已过期/校验失败时吞掉 ServiceException:
|
||||
// 若抛出,会被 Guava 包成 ExecutionException 并由刷新线程池作为 UncaughtException 打到日志,看起来像故障。
|
||||
try {
|
||||
String body = checkAccessToken(token).block();
|
||||
return buildUser(body, token);
|
||||
} catch (ServiceException ex) {
|
||||
log.info("[loginUserCache] 异步刷新忽略 token 校验失败:code={}, msg={}", ex.getCode(), ex.getMessage());
|
||||
return LOGIN_USER_EMPTY;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
@@ -58,6 +81,11 @@ public class TokenAuthenticationFilter implements GlobalFilter, Ordered {
|
||||
public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
|
||||
exchange = SecurityFrameworkUtils.removeLoginUser(exchange);
|
||||
|
||||
// 白名单路径直接放行,不做 token 校验
|
||||
if (SKIP_AUTH_PATHS.contains(exchange.getRequest().getPath().value())) {
|
||||
return chain.filter(exchange);
|
||||
}
|
||||
|
||||
String token = SecurityFrameworkUtils.obtainAuthorization(exchange);
|
||||
if (StrUtil.isEmpty(token)) {
|
||||
return chain.filter(exchange);
|
||||
|
||||
@@ -6,10 +6,10 @@ spring:
|
||||
username: # Nacos 账号
|
||||
password: # Nacos 密码
|
||||
discovery: # 【配置中心】配置项
|
||||
namespace: 1e0fcd92-49b4-4cda-b531-828c7d36fef5 # 命名空间。这里使用 dev 开发环境
|
||||
namespace: 1924bcfb-4eab-4c58-9003-4a37d5fc2949 # 命名空间。这里使用 dev 开发环境
|
||||
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
||||
config: # 【注册中心】配置项
|
||||
namespace: 1e0fcd92-49b4-4cda-b531-828c7d36fef5 # 命名空间。这里使用 dev 开发环境
|
||||
namespace: 1924bcfb-4eab-4c58-9003-4a37d5fc2949 # 命名空间。这里使用 dev 开发环境
|
||||
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
||||
|
||||
#################### 监控相关配置 ####################
|
||||
|
||||
@@ -6,10 +6,10 @@ spring:
|
||||
username: # Nacos 账号
|
||||
password: # Nacos 密码
|
||||
discovery: # 【配置中心】配置项
|
||||
namespace: 1e0fcd92-49b4-4cda-b531-828c7d36fef5 # 命名空间。这里使用 dev 开发环境
|
||||
namespace: 1924bcfb-4eab-4c58-9003-4a37d5fc2949 # 命名空间。这里使用 dev 开发环境
|
||||
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
||||
config: # 【注册中心】配置项
|
||||
namespace: 1e0fcd92-49b4-4cda-b531-828c7d36fef5 # 命名空间。这里使用 dev 开发环境
|
||||
namespace: 1924bcfb-4eab-4c58-9003-4a37d5fc2949 # 命名空间。这里使用 dev 开发环境
|
||||
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
|
||||
|
||||
#################### 监控相关配置 ####################
|
||||
|
||||
@@ -30,6 +30,15 @@ spring:
|
||||
gateway:
|
||||
server:
|
||||
webflux:
|
||||
# HttpClient 连接池配置:网关作为反向代理客户端,复用到下游服务的 keep-alive 连接。
|
||||
# 必须保证 max-idle-time < 下游 server.tomcat.keep-alive-timeout(当前下游为 60s),
|
||||
# 否则服务端先 FIN、网关池仍持有"已死连接",复用时会抛 reactor.netty.http.client.PrematureCloseException。
|
||||
httpclient:
|
||||
connect-timeout: 10000 # 建立连接超时,毫秒
|
||||
response-timeout: 30s # 接收响应超时
|
||||
pool:
|
||||
max-idle-time: 30s # 闲置连接最长保留 30s,严格小于下游 keep-alive-timeout(60s)
|
||||
evict-in-background: 60s # 周期后台驱逐过期连接,进一步降低 race 概率
|
||||
# 路由配置项,对应 RouteDefinition 数组
|
||||
routes:
|
||||
## system-server 服务
|
||||
@@ -49,6 +58,19 @@ spring:
|
||||
uri: grayLb://rdms-system-server
|
||||
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
||||
- Path=/system/ws/**
|
||||
## project-server 服务
|
||||
- id: project-admin-api # 路由的编号
|
||||
uri: grayLb://rdms-project-server
|
||||
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
||||
- Path=/admin-api/project/**
|
||||
filters:
|
||||
- RewritePath=/admin-api/project/v3/api-docs, /v3/api-docs
|
||||
- id: project-app-api # 路由的编号
|
||||
uri: grayLb://rdms-project-server
|
||||
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
||||
- Path=/app-api/project/**
|
||||
filters:
|
||||
- RewritePath=/app-api/project/v3/api-docs, /v3/api-docs
|
||||
## bpm-server 服务
|
||||
- id: bpm-admin-api # 路由的编号
|
||||
uri: grayLb://rdms-bpm-server
|
||||
@@ -76,6 +98,9 @@ knife4j:
|
||||
- name: system-server
|
||||
service-name: rdms-system-server
|
||||
url: /admin-api/system/v3/api-docs
|
||||
- name: project-server
|
||||
service-name: rdms-project-server
|
||||
url: /admin-api/project/v3/api-docs
|
||||
- name: bpm-server
|
||||
service-name: bpm-server
|
||||
url: /admin-api/bpm/v3/api-docs
|
||||
|
||||
30
rdms-project/pom.xml
Normal file
30
rdms-project/pom.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>cn-rdms</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>rdms-project</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>${project.artifactId}</name>
|
||||
<description>
|
||||
RDMS 项目交付域模块
|
||||
该模块承载项目集、项目、产品、需求、任务、工单、执行等 RDMS 核心交付业务能力。
|
||||
</description>
|
||||
<modules>
|
||||
<module>rdms-project-boot</module>
|
||||
<module>rdms-project-api</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
47
rdms-project/rdms-project-api/pom.xml
Normal file
47
rdms-project/rdms-project-api/pom.xml
Normal file
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>rdms-project</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>rdms-project-api</artifactId>
|
||||
<description>
|
||||
项目交付域接口,暴露给其它模块调用
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>rdms-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Web 相关 -->
|
||||
<dependency>
|
||||
<groupId>io.swagger.core.v3</groupId>
|
||||
<artifactId>swagger-annotations-jakarta</artifactId>
|
||||
<version>${swagger.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 参数校验 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-validation</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- RPC 远程调用相关 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* Project API 包,定义暴露给其它模块的 API
|
||||
*/
|
||||
package com.njcn.rdms.module.project.api;
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.njcn.rdms.module.project.enums;
|
||||
|
||||
import com.njcn.rdms.framework.common.enums.RpcConstants;
|
||||
|
||||
/**
|
||||
* API 相关的枚举
|
||||
*/
|
||||
public class ApiConstants {
|
||||
|
||||
/**
|
||||
* 服务名
|
||||
*
|
||||
* 注意,需要保证和 spring.application.name 保持一致
|
||||
*/
|
||||
public static final String NAME = RpcConstants.PROJECT_NAME;
|
||||
|
||||
public static final String PREFIX = RpcConstants.PROJECT_PREFIX;
|
||||
|
||||
public static final String VERSION = "1.0.0";
|
||||
|
||||
private ApiConstants() {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,230 @@
|
||||
package com.njcn.rdms.module.project.enums;
|
||||
|
||||
import com.njcn.rdms.framework.common.exception.ErrorCode;
|
||||
|
||||
/**
|
||||
* Project 错误码枚举类
|
||||
* <p>
|
||||
* 产品管理当前使用 1-008-001-000 段。
|
||||
*/
|
||||
public interface ErrorCodeConstants {
|
||||
|
||||
// ========== 产品管理 1-008-001-000 ==========
|
||||
ErrorCode PRODUCT_NOT_EXISTS = new ErrorCode(1_008_001_000, "产品不存在");
|
||||
ErrorCode PRODUCT_CODE_DUPLICATE = new ErrorCode(1_008_001_001, "已经存在编码为【{}】的产品");
|
||||
ErrorCode PRODUCT_NAME_DUPLICATE = new ErrorCode(1_008_001_002, "已经存在名称为【{}】的产品");
|
||||
ErrorCode PRODUCT_CODE_NOT_MODIFIABLE = new ErrorCode(1_008_001_003, "产品编码创建后不允许修改");
|
||||
ErrorCode PRODUCT_STATUS_ACTION_NOT_ALLOWED = new ErrorCode(1_008_001_004, "当前产品状态不支持动作【{}】");
|
||||
ErrorCode PRODUCT_STATUS_ACTION_REASON_REQUIRED = new ErrorCode(1_008_001_005, "动作【{}】必须填写原因");
|
||||
ErrorCode PRODUCT_DELETE_NAME_MISMATCH = new ErrorCode(1_008_001_006, "删除确认名称与当前产品名称不一致");
|
||||
ErrorCode PRODUCT_STATUS_NOT_ALLOW_EDIT = new ErrorCode(1_008_001_007, "当前产品状态不允许编辑");
|
||||
ErrorCode PRODUCT_PAUSED_ONLY_ALLOW_LIMITED_UPDATE = new ErrorCode(1_008_001_008, "产品暂停后仅允许修正描述,产品经理请通过产品团队维护");
|
||||
ErrorCode PRODUCT_MEMBER_NOT_EXISTS = new ErrorCode(1_008_001_009, "产品团队成员不存在");
|
||||
ErrorCode PRODUCT_MEMBER_ALREADY_EXISTS = new ErrorCode(1_008_001_010, "该用户已是当前产品的有效团队成员");
|
||||
ErrorCode PRODUCT_MEMBER_ROLE_INVALID = new ErrorCode(1_008_001_011, "角色不存在或不属于产品对象角色");
|
||||
ErrorCode PRODUCT_MANAGER_TRANSFER_INFO_REQUIRED = new ErrorCode(1_008_001_013, "切换产品经理时必须同时传入原产品经理用户和交接后角色");
|
||||
ErrorCode PRODUCT_MANAGER_MEMBER_NOT_ALLOW_REMOVE = new ErrorCode(1_008_001_014, "当前产品经理不能移出产品团队,请先完成经理转交");
|
||||
ErrorCode PRODUCT_MANAGER_MEMBER_NOT_ALLOW_DOWNGRADE = new ErrorCode(1_008_001_015, "当前产品经理不能直接调整为非经理角色,请先完成经理转交");
|
||||
ErrorCode PRODUCT_MEMBER_NOT_ACTIVE = new ErrorCode(1_008_001_016, "当前产品团队成员已失效");
|
||||
ErrorCode PRODUCT_MANAGER_TRANSFER_SOURCE_INVALID = new ErrorCode(1_008_001_017, "原产品经理信息与当前产品经理不一致");
|
||||
ErrorCode PRODUCT_MANAGER_TRANSFER_ROLE_INVALID = new ErrorCode(1_008_001_018, "原产品经理交接后的角色不能仍为产品经理");
|
||||
ErrorCode PRODUCT_MANAGER_NOT_MODIFIABLE = new ErrorCode(1_008_001_019, "产品主数据编辑不允许直接变更产品经理,请通过产品团队维护");
|
||||
ErrorCode PRODUCT_OBJECT_PERMISSION_DENIED = new ErrorCode(1_008_001_020, "当前用户不具备该产品的操作权限【{}】");
|
||||
ErrorCode PRODUCT_DELETE_CONFIRM_TEXT_INVALID = new ErrorCode(1_008_001_021, "删除确认口令不正确");
|
||||
ErrorCode PRODUCT_STATUS_CONCURRENT_MODIFIED = new ErrorCode(1_008_001_022, "产品状态已发生变化,请刷新后重试");
|
||||
ErrorCode PRODUCT_STATUS_MODEL_NOT_EXISTS_OR_DISABLED = new ErrorCode(1_008_001_023, "产品状态定义不存在或已停用");
|
||||
// 产品创建原子接口(/create-with-team)专用:初始团队相关校验
|
||||
ErrorCode PRODUCT_INITIAL_TEAM_MANAGER_REQUIRED = new ErrorCode(1_008_001_024, "初始团队必须包含产品经理");
|
||||
ErrorCode PRODUCT_INITIAL_TEAM_MEMBER_DUPLICATE = new ErrorCode(1_008_001_025, "初始团队成员存在重复");
|
||||
ErrorCode PRODUCT_INITIAL_TEAM_ROLE_INVALID = new ErrorCode(1_008_001_026, "初始团队中存在非法角色");
|
||||
ErrorCode PRODUCT_MANAGER_TRANSFER_TARGET_ROLE_DUPLICATE = new ErrorCode(1_008_001_027, "原产品经理在该产品已持有目标角色【{}】(含历史失效行),不能直接转交,请先清理后重试");
|
||||
ErrorCode PRODUCT_INTERNAL_ROLE_NOT_CONFIGURED = new ErrorCode(1_008_001_028, "内置产品角色【{}】未在 system_role 找到,请联系管理员");
|
||||
ErrorCode PRODUCT_MEMBER_USER_INVALID = new ErrorCode(1_008_001_029, "产品成员不是有效系统用户");
|
||||
// 批量新增(POST /project/product/{id}/members/batch)专用:同一请求内 userId 重复 / 经理拦截
|
||||
ErrorCode PRODUCT_MEMBER_BATCH_USER_DUPLICATE = new ErrorCode(1_008_001_030, "请勿在批量列表中重复添加同一成员");
|
||||
ErrorCode PRODUCT_MEMBER_BATCH_MANAGER_NOT_ALLOWED = new ErrorCode(1_008_001_031, "批量新增不允许指定为经理,请通过编辑成员调整");
|
||||
// 批量移出(POST /project/product/{id}/members/batch/inactive)专用:同一请求内 memberId 重复
|
||||
ErrorCode PRODUCT_MEMBER_BATCH_INACTIVE_MEMBER_DUPLICATE = new ErrorCode(1_008_001_032, "请勿在批量移出列表中重复指定同一成员");
|
||||
|
||||
// ========== 产品需求 1-008-002-000 ==========
|
||||
ErrorCode REQUIREMENT_NOT_EXISTS = new ErrorCode(1_008_002_000, "产品需求不存在");
|
||||
ErrorCode REQUIREMENT_STATUS_ACTION_NOT_ALLOWED = new ErrorCode(1_008_002_001, "当前需求状态不支持动作【{}】");
|
||||
ErrorCode REQUIREMENT_STATUS_ACTION_REASON_REQUIRED = new ErrorCode(1_008_002_002, "动作【{}】必须填写原因");
|
||||
ErrorCode REQUIREMENT_STATUS_CONCURRENT_MODIFIED = new ErrorCode(1_008_002_003, "需求状态已发生变化,请刷新后重试");
|
||||
ErrorCode REQUIREMENT_STATUS_NOT_ALLOW_EDIT = new ErrorCode(1_008_002_004, "当前需求状态不允许编辑");
|
||||
ErrorCode REQUIREMENT_STATUS_NOT_ALLOW_CLOSE = new ErrorCode(1_008_002_005, "只有已验收的需求才能关闭");
|
||||
ErrorCode REQUIREMENT_STATUS_MODEL_NOT_EXISTS_OR_DISABLED = new ErrorCode(1_008_002_006, "需求状态定义不存在或已停用");
|
||||
ErrorCode REQUIREMENT_STATUS_NOT_ALLOW_DELETE = new ErrorCode(1_008_002_014, "只有待认领、待评审、待指派状态的需求才能删除");
|
||||
ErrorCode REQUIREMENT_PARENT_NOT_ALLOW_SPLIT = new ErrorCode(1_008_002_007, "父需求状态不是已评审、待指派、实施中,不允许拆分");
|
||||
ErrorCode REQUIREMENT_CHILD_NOT_ALLOW_CLOSE = new ErrorCode(1_008_002_008, "存在未处理完的子需求,请先处理子需求");
|
||||
ErrorCode REQUIREMENT_CHILD_NOT_ALLOW_CANCEL = new ErrorCode(1_008_002_017, "只有不存在子需求,或子需求都处于已取消和已拒绝的状态才能取消");
|
||||
ErrorCode REQUIREMENT_HAS_CHILDREN = new ErrorCode(1_008_002_013, "存在子需求,请先删除子需求");
|
||||
ErrorCode REQUIREMENT_MODULE_NOT_EXISTS = new ErrorCode(1_008_002_009, "需求模块不存在");
|
||||
ErrorCode REQUIREMENT_MODULE_NAME_DUPLICATE = new ErrorCode(1_008_002_010, "已经存在名称为【{}】的模块");
|
||||
ErrorCode REQUIREMENT_MODULE_NOT_BELONG_TO_PRODUCT = new ErrorCode(1_008_002_011, "模块不属于当前产品");
|
||||
ErrorCode REQUIREMENT_MODULE_HAS_NON_TERMINAL_REQUIREMENTS = new ErrorCode(1_008_002_012, "模块下存在非终态需求,不可删除");
|
||||
ErrorCode REQUIREMENT_MODULE_HAS_CHILDREN = new ErrorCode(1_008_002_015, "存在子模块,请先删除子模块");
|
||||
ErrorCode REQUIREMENT_MODULE_HAS_REQUIREMENTS = new ErrorCode(1_008_002_016, "模块下存在需求,请先删除需求");
|
||||
ErrorCode REQUIREMENT_PROJECT_MODULE_ROOT_NOT_EXISTS = new ErrorCode(1_008_002_018, "关联项目下不存在根模块,请先创建项目根模块");
|
||||
ErrorCode REQUIREMENT_DISPATCHED_NOT_ALLOW_SPLIT = new ErrorCode(1_008_002_019, "产品需求已指派生成项目需求,不允许再在产品端拆分");
|
||||
ErrorCode REQUIREMENT_NOT_DISPATCHED = new ErrorCode(1_008_002_020, "该产品需求尚未指派到关联项目");
|
||||
ErrorCode REQUIREMENT_DISPATCHED_PROJECT_REQUIREMENT_NOT_FOUND = new ErrorCode(1_008_002_021, "未找到该产品需求对应的项目需求");
|
||||
ErrorCode REQUIREMENT_HANDLER_NOT_PRODUCT_MEMBER = new ErrorCode(1_008_002_023, "当前需求负责人不是此产品团队成员,请重新选择");
|
||||
ErrorCode REQUIREMENT_REVIEW_ALREADY_EXISTS = new ErrorCode(1_008_002_024, "该产品需求已提交评审记录");
|
||||
ErrorCode REQUIREMENT_REVIEW_NOT_EXISTS = new ErrorCode(1_008_002_025, "产品需求评审记录不存在");
|
||||
ErrorCode REQUIREMENT_REVIEW_CONCLUSION_INVALID = new ErrorCode(1_008_002_026, "产品需求评审结论不合法");
|
||||
ErrorCode REQUIREMENT_NOT_PROJECT_MEMBER = new ErrorCode(1_008_002_022, "您不是该项目的成员,无权访问");
|
||||
|
||||
// ========== 项目管理 1-008-002-000 ==========
|
||||
ErrorCode PROJECT_NOT_EXISTS = new ErrorCode(1_008_002_000, "项目不存在");
|
||||
ErrorCode PROJECT_CODE_DUPLICATE = new ErrorCode(1_008_002_001, "已经存在编码为【{}】的项目");
|
||||
ErrorCode PROJECT_NAME_DUPLICATE = new ErrorCode(1_008_002_002, "当前产品下已经存在名称为【{}】的项目");
|
||||
ErrorCode PROJECT_CODE_NOT_MODIFIABLE = new ErrorCode(1_008_002_003, "项目编码创建后不允许修改");
|
||||
ErrorCode PROJECT_PRODUCT_NOT_MODIFIABLE = new ErrorCode(1_008_002_004, "项目所属产品第一期不允许直接修改");
|
||||
ErrorCode PROJECT_PRODUCT_NOT_EXISTS = new ErrorCode(1_008_002_005, "所属产品不存在或不可用");
|
||||
ErrorCode PROJECT_TYPE_INVALID = new ErrorCode(1_008_002_006, "项目类型不是有效字典值");
|
||||
ErrorCode PROJECT_MANAGER_USER_INVALID = new ErrorCode(1_008_002_007, "项目负责人不是有效系统用户");
|
||||
ErrorCode PROJECT_MEMBER_USER_INVALID = new ErrorCode(1_008_002_008, "项目成员不是有效系统用户");
|
||||
ErrorCode PROJECT_STATUS_ACTION_NOT_ALLOWED = new ErrorCode(1_008_002_009, "当前项目状态不支持动作【{}】");
|
||||
ErrorCode PROJECT_STATUS_ACTION_REASON_REQUIRED = new ErrorCode(1_008_002_010, "动作【{}】必须填写原因");
|
||||
ErrorCode PROJECT_STATUS_CONCURRENT_MODIFIED = new ErrorCode(1_008_002_011, "项目状态已发生变化,请刷新后重试");
|
||||
ErrorCode PROJECT_STATUS_NOT_ALLOW_EDIT = new ErrorCode(1_008_002_012, "当前项目状态不允许编辑");
|
||||
ErrorCode PROJECT_MEMBER_NOT_EXISTS = new ErrorCode(1_008_002_013, "项目成员不存在");
|
||||
ErrorCode PROJECT_MEMBER_ALREADY_EXISTS = new ErrorCode(1_008_002_014, "该用户已是当前项目的有效成员");
|
||||
ErrorCode PROJECT_MEMBER_ROLE_INVALID = new ErrorCode(1_008_002_015, "角色不存在或不属于项目对象角色");
|
||||
ErrorCode PROJECT_MANAGER_MEMBER_NOT_ALLOW_REMOVE = new ErrorCode(1_008_002_016, "当前项目负责人不能移出项目团队,请先完成负责人变更");
|
||||
ErrorCode PROJECT_MEMBER_NOT_ACTIVE = new ErrorCode(1_008_002_017, "当前项目成员已失效");
|
||||
ErrorCode PROJECT_DELETE_CONFIRM_TEXT_INVALID = new ErrorCode(1_008_002_018, "删除确认口令不正确");
|
||||
ErrorCode PROJECT_DELETE_NAME_MISMATCH = new ErrorCode(1_008_002_019, "删除确认名称与当前项目名称不一致");
|
||||
ErrorCode PROJECT_NOT_ALLOW_DELETE = new ErrorCode(1_008_002_020, "当前项目不允许删除");
|
||||
ErrorCode PROJECT_OBJECT_PERMISSION_DENIED = new ErrorCode(1_008_002_021, "当前用户不具备该项目的操作权限【{}】");
|
||||
ErrorCode PROJECT_STATUS_MODEL_NOT_EXISTS_OR_DISABLED = new ErrorCode(1_008_002_022, "项目状态定义不存在或已停用");
|
||||
ErrorCode PROJECT_DIRECTION_INVALID = new ErrorCode(1_008_002_023, "项目方向不是有效字典值");
|
||||
ErrorCode PROJECT_MANAGER_TRANSFER_INFO_REQUIRED = new ErrorCode(1_008_002_024, "切换项目经理时必须同时传入原项目经理用户和交接后角色");
|
||||
ErrorCode PROJECT_MANAGER_TRANSFER_SOURCE_INVALID = new ErrorCode(1_008_002_025, "原项目经理信息与当前项目经理不一致");
|
||||
ErrorCode PROJECT_MANAGER_TRANSFER_ROLE_INVALID = new ErrorCode(1_008_002_026, "原项目经理交接后的角色不能仍为项目经理");
|
||||
ErrorCode PROJECT_MANAGER_MEMBER_NOT_ALLOW_DOWNGRADE = new ErrorCode(1_008_002_027, "当前项目经理不能直接调整为非经理角色,请先完成经理转交");
|
||||
ErrorCode PROJECT_MAINLINE_DUPLICATE = new ErrorCode(1_008_002_028, "当前产品下已存在未作废的主线项目");
|
||||
// 项目创建原子接口(/create-with-team)专用:初始团队 + 方向一致性校验
|
||||
ErrorCode PROJECT_INITIAL_TEAM_MANAGER_REQUIRED = new ErrorCode(1_008_002_029, "初始团队必须包含项目经理");
|
||||
ErrorCode PROJECT_INITIAL_TEAM_MEMBER_DUPLICATE = new ErrorCode(1_008_002_030, "初始团队成员存在重复");
|
||||
ErrorCode PROJECT_INITIAL_TEAM_ROLE_INVALID = new ErrorCode(1_008_002_031, "初始团队中存在非法角色");
|
||||
ErrorCode PROJECT_DIRECTION_NOT_MATCH_PRODUCT = new ErrorCode(1_008_002_032, "项目方向与所属产品方向不一致");
|
||||
ErrorCode PROJECT_MANAGER_TRANSFER_TARGET_ROLE_DUPLICATE = new ErrorCode(1_008_002_033, "原项目经理在该项目已持有目标角色【{}】(含历史失效行),不能直接转交,请先清理后重试");
|
||||
ErrorCode PROJECT_INTERNAL_ROLE_NOT_CONFIGURED = new ErrorCode(1_008_002_034, "内置项目角色【{}】未在 system_role 找到,请联系管理员");
|
||||
// 批量新增(POST /project/project/{id}/members/batch)专用:同一请求内 userId 重复 / 经理拦截
|
||||
ErrorCode PROJECT_MEMBER_BATCH_USER_DUPLICATE = new ErrorCode(1_008_002_035, "请勿在批量列表中重复添加同一成员");
|
||||
ErrorCode PROJECT_MEMBER_BATCH_MANAGER_NOT_ALLOWED = new ErrorCode(1_008_002_036, "批量新增不允许指定为经理,请通过编辑成员调整");
|
||||
// 批量移出(POST /project/project/{id}/members/batch/inactive)专用:同一请求内 memberId 重复
|
||||
ErrorCode PROJECT_MEMBER_BATCH_INACTIVE_MEMBER_DUPLICATE = new ErrorCode(1_008_002_037, "请勿在批量移出列表中重复指定同一成员");
|
||||
|
||||
// ========== 执行管理 1-008-003-000 ==========
|
||||
ErrorCode PROJECT_EXECUTION_NOT_EXISTS = new ErrorCode(1_008_003_000, "执行不存在");
|
||||
ErrorCode PROJECT_EXECUTION_NAME_DUPLICATE = new ErrorCode(1_008_003_001, "当前项目下已经存在名称为【{}】的执行");
|
||||
ErrorCode PROJECT_EXECUTION_OWNER_INVALID = new ErrorCode(1_008_003_002, "执行负责人必须是当前项目的有效成员");
|
||||
ErrorCode PROJECT_EXECUTION_ASSIGNEE_INVALID = new ErrorCode(1_008_003_003, "执行协办人必须是当前项目的有效成员");
|
||||
ErrorCode PROJECT_EXECUTION_ASSIGNEE_ALREADY_EXISTS = new ErrorCode(1_008_003_004, "该用户已是当前执行的有效协办人");
|
||||
ErrorCode PROJECT_EXECUTION_ASSIGNEE_NOT_EXISTS = new ErrorCode(1_008_003_005, "执行协办人不存在");
|
||||
ErrorCode PROJECT_EXECUTION_ASSIGNEE_NOT_ACTIVE = new ErrorCode(1_008_003_006, "当前执行协办人已失效");
|
||||
// 保留:TD-013 解锁后业务路径已不会再触发,预留用于灰度回滚关闭关联能力
|
||||
ErrorCode PROJECT_EXECUTION_REQUIREMENT_NOT_READY = new ErrorCode(1_008_003_007, "当前阶段不支持给执行绑定项目需求");
|
||||
ErrorCode PROJECT_EXECUTION_NOT_ALLOW_EDIT = new ErrorCode(1_008_003_008, "当前项目状态不允许维护执行");
|
||||
ErrorCode PROJECT_EXECUTION_OWNER_HANDOFF_REQUIRED = new ErrorCode(1_008_003_009, "该项目成员仍担任未终态执行负责人,请先完成执行负责人交接");
|
||||
ErrorCode PROJECT_EXECUTION_STATUS_MODEL_NOT_EXISTS_OR_DISABLED = new ErrorCode(1_008_003_010, "执行状态定义不存在或已停用");
|
||||
ErrorCode PROJECT_EXECUTION_STATUS_ACTION_NOT_ALLOWED = new ErrorCode(1_008_003_011, "当前执行状态不支持动作【{}】");
|
||||
ErrorCode PROJECT_EXECUTION_STATUS_ACTION_REASON_REQUIRED = new ErrorCode(1_008_003_012, "动作【{}】必须填写原因");
|
||||
ErrorCode PROJECT_EXECUTION_STATUS_CONCURRENT_MODIFIED = new ErrorCode(1_008_003_013, "执行状态已发生变化,请刷新后重试");
|
||||
ErrorCode PROJECT_EXECUTION_STATUS_NOT_ALLOW_EDIT = new ErrorCode(1_008_003_014, "当前执行状态不允许维护执行");
|
||||
ErrorCode PROJECT_EXECUTION_TYPE_INVALID = new ErrorCode(1_008_003_015, "执行类型不是有效字典值");
|
||||
ErrorCode PROJECT_EXECUTION_ASSIGNEE_REQUIRED = new ErrorCode(1_008_003_016, "创建执行时必须至少选择一名执行协办人");
|
||||
ErrorCode PROJECT_EXECUTION_STATUS_OWNER_ONLY = new ErrorCode(1_008_003_017, "只有执行负责人才能执行【{}】动作");
|
||||
ErrorCode PROJECT_EXECUTION_COMPLETE_TASKS_REQUIRED = new ErrorCode(1_008_003_018, "完成执行前,执行下所有任务必须全部完成或取消");
|
||||
ErrorCode PROJECT_EXECUTION_NOT_ALLOW_DELETE = new ErrorCode(1_008_003_019, "已完成的执行不允许删除");
|
||||
ErrorCode PROJECT_EXECUTION_DELETE_NAME_MISMATCH = new ErrorCode(1_008_003_020, "确认执行名称与实际不一致");
|
||||
ErrorCode PROJECT_EXECUTION_DELETE_CONFIRM_TEXT_INVALID = new ErrorCode(1_008_003_021, "删除确认口令必须为 DELETE 或 删除");
|
||||
ErrorCode PROJECT_EXECUTION_PRIORITY_INVALID = new ErrorCode(1_008_003_022, "执行优先级不是有效字典值");
|
||||
ErrorCode PROJECT_EXECUTION_REQUIREMENT_NOT_EXISTS = new ErrorCode(1_008_003_023, "关联的项目需求不存在或已删除");
|
||||
ErrorCode PROJECT_EXECUTION_REQUIREMENT_NOT_BELONG_TO_PROJECT = new ErrorCode(1_008_003_024, "关联的项目需求不属于当前项目");
|
||||
ErrorCode PROJECT_EXECUTION_REQUIREMENT_TERMINAL = new ErrorCode(1_008_003_025, "项目需求已处于终态,不允许关联新执行");
|
||||
|
||||
// ========== 任务管理 1-008-004-000 ==========
|
||||
ErrorCode PROJECT_TASK_NOT_EXISTS = new ErrorCode(1_008_004_000, "任务不存在");
|
||||
ErrorCode PROJECT_TASK_OWNER_INVALID = new ErrorCode(1_008_004_001, "任务负责人必须是当前执行的有效成员");
|
||||
ErrorCode PROJECT_TASK_PARENT_INVALID = new ErrorCode(1_008_004_002, "父任务必须属于当前项目和执行");
|
||||
ErrorCode PROJECT_TASK_NOT_ALLOW_EDIT = new ErrorCode(1_008_004_003, "当前项目或执行状态不允许维护任务");
|
||||
ErrorCode PROJECT_TASK_STATUS_MODEL_NOT_EXISTS_OR_DISABLED = new ErrorCode(1_008_004_004, "任务状态定义不存在或已停用");
|
||||
ErrorCode PROJECT_TASK_STATUS_ACTION_NOT_ALLOWED = new ErrorCode(1_008_004_005, "当前任务状态不支持动作【{}】");
|
||||
ErrorCode PROJECT_TASK_STATUS_ACTION_REASON_REQUIRED = new ErrorCode(1_008_004_006, "动作【{}】必须填写原因");
|
||||
ErrorCode PROJECT_TASK_STATUS_CONCURRENT_MODIFIED = new ErrorCode(1_008_004_007, "任务状态已发生变化,请刷新后重试");
|
||||
ErrorCode PROJECT_TASK_STATUS_NOT_ALLOW_EDIT = new ErrorCode(1_008_004_008, "当前任务状态不允许维护任务");
|
||||
ErrorCode PROJECT_TASK_COMPLETE_CHILDREN_REQUIRED = new ErrorCode(1_008_004_010, "父任务完成前,子任务必须全部完成或取消");
|
||||
ErrorCode PROJECT_TASK_STATUS_OWNER_ONLY = new ErrorCode(1_008_004_011, "只有任务负责人才能执行【{}】动作");
|
||||
ErrorCode PROJECT_TASK_NOT_ALLOW_DELETE = new ErrorCode(1_008_004_012, "已完成的任务不允许删除");
|
||||
ErrorCode PROJECT_TASK_DELETE_NAME_MISMATCH = new ErrorCode(1_008_004_013, "确认任务名称与实际不一致");
|
||||
ErrorCode PROJECT_TASK_DELETE_CONFIRM_TEXT_INVALID = new ErrorCode(1_008_004_014, "删除确认口令必须为 DELETE 或 删除");
|
||||
ErrorCode PROJECT_TASK_PRIORITY_INVALID = new ErrorCode(1_008_004_015, "任务优先级不是有效字典值");
|
||||
ErrorCode PROJECT_TASK_LEAF_TO_PARENT_FORBIDDEN_PROGRESS = new ErrorCode(1_008_004_012, "拆子任务前请先将父任务进度清零");
|
||||
ErrorCode PROJECT_TASK_LEAF_TO_PARENT_FORBIDDEN_WORKLOG = new ErrorCode(1_008_004_013, "拆子任务前请先删除父任务下已填的工时记录");
|
||||
|
||||
// ========== 任务协办人 1_008_005_xxx ==========
|
||||
ErrorCode PROJECT_TASK_ASSIGNEE_NOT_EXISTS = new ErrorCode(1_008_005_001, "任务协办人记录不存在");
|
||||
ErrorCode PROJECT_TASK_ASSIGNEE_INVALID_MEMBER = new ErrorCode(1_008_005_002, "任务协办人必须是当前有效的执行成员");
|
||||
ErrorCode PROJECT_TASK_ASSIGNEE_OWNER_CONFLICT = new ErrorCode(1_008_005_003, "任务协办人不能与任务负责人重复");
|
||||
ErrorCode PROJECT_TASK_ASSIGNEE_ALREADY_ACTIVE = new ErrorCode(1_008_005_004, "该用户已是当前任务的活跃协办人");
|
||||
ErrorCode PROJECT_TASK_ASSIGNEE_NOT_ACTIVE = new ErrorCode(1_008_005_005, "任务协办人记录已失效,无需重复操作");
|
||||
ErrorCode PROJECT_TASK_ASSIGNEE_REASON_REQUIRED = new ErrorCode(1_008_005_006, "退出协办必须填写原因");
|
||||
|
||||
// ========== 任务工时 1_008_006_xxx ==========
|
||||
ErrorCode PROJECT_TASK_WORKLOG_NOT_EXISTS = new ErrorCode(1_008_006_001, "任务工时记录不存在");
|
||||
ErrorCode PROJECT_TASK_WORKLOG_NOT_LEAF_TASK = new ErrorCode(1_008_006_002, "父任务不允许填报工时,请到具体子任务填报");
|
||||
ErrorCode PROJECT_TASK_WORKLOG_DURATION_INVALID = new ErrorCode(1_008_006_003, "工时小时数必须大于 0 且为 0.5 的整数倍");
|
||||
ErrorCode PROJECT_TASK_WORKLOG_NOT_OWNER_OR_ASSIGNEE = new ErrorCode(1_008_006_004, "仅任务负责人或在岗协办人可填报工时");
|
||||
ErrorCode PROJECT_TASK_WORKLOG_EDIT_NOT_OWN = new ErrorCode(1_008_006_005, "只能修改自己填报的工时记录");
|
||||
ErrorCode PROJECT_TASK_WORKLOG_DELETE_FORBIDDEN = new ErrorCode(1_008_006_006, "仅记录填报人或任务负责人可删除该工时记录");
|
||||
ErrorCode PROJECT_TASK_WORKLOG_DATE_RANGE_INVALID = new ErrorCode(1_008_006_007, "段起始日期不能晚于段结束日期");
|
||||
ErrorCode PROJECT_TASK_WORKLOG_DATE_OVERLAP = new ErrorCode(1_008_006_008, "日期范围与该任务下您已有的工时记录重叠");
|
||||
ErrorCode PROJECT_TASK_WORKLOG_PROGRESS_NOT_MONOTONIC = new ErrorCode(1_008_006_010, "工时进度与日期顺序不一致:早段进度不得高于晚段、晚段进度不得低于早段");
|
||||
ErrorCode PROJECT_TASK_WORKLOG_DIFFICULTY_INVALID = new ErrorCode(1_008_006_011, "完成难度不在字典范围内");
|
||||
|
||||
// ========== 任务 / 工时附件 1_008_007_xxx ==========
|
||||
ErrorCode PROJECT_TASK_ATTACHMENT_TOO_MANY = new ErrorCode(1_008_007_001, "附件数量不能超过 {} 个");
|
||||
ErrorCode PROJECT_TASK_ATTACHMENT_URL_INVALID = new ErrorCode(1_008_007_002, "附件地址非法,必须为 http/https URL 且长度不超过 1024");
|
||||
ErrorCode PROJECT_TASK_ATTACHMENT_NAME_INVALID = new ErrorCode(1_008_007_003, "附件文件名不合法(必填且长度不超过 255)");
|
||||
ErrorCode PROJECT_TASK_ATTACHMENT_TYPE_NOT_ALLOWED = new ErrorCode(1_008_007_004, "附件扩展名【{}】不在允许列表内");
|
||||
ErrorCode PROJECT_TASK_ATTACHMENT_TYPE_BLOCKED = new ErrorCode(1_008_007_005, "附件类型【{}】被禁止上传");
|
||||
|
||||
// ========== 项目需求 1_008_007_xxx ==========
|
||||
ErrorCode PROJECT_REQUIREMENT_NOT_EXISTS = new ErrorCode(1_008_007_000, "项目需求不存在");
|
||||
ErrorCode PROJECT_REQUIREMENT_STATUS_ACTION_NOT_ALLOWED = new ErrorCode(1_008_007_001, "当前项目需求状态不支持动作【{}】");
|
||||
ErrorCode PROJECT_REQUIREMENT_STATUS_ACTION_REASON_REQUIRED = new ErrorCode(1_008_007_002, "动作【{}】必须填写原因");
|
||||
ErrorCode PROJECT_REQUIREMENT_STATUS_CONCURRENT_MODIFIED = new ErrorCode(1_008_007_003, "项目需求状态已发生变化,请刷新后重试");
|
||||
ErrorCode PROJECT_REQUIREMENT_STATUS_NOT_ALLOW_EDIT = new ErrorCode(1_008_007_004, "当前项目需求状态不允许编辑");
|
||||
ErrorCode PROJECT_REQUIREMENT_STATUS_NOT_ALLOW_CLOSE = new ErrorCode(1_008_007_005, "只有已验收的项目需求才能关闭");
|
||||
ErrorCode PROJECT_REQUIREMENT_STATUS_MODEL_NOT_EXISTS_OR_DISABLED = new ErrorCode(1_008_007_006, "项目需求状态定义不存在或已停用");
|
||||
ErrorCode PROJECT_REQUIREMENT_PARENT_NOT_ALLOW_SPLIT = new ErrorCode(1_008_007_007, "父需求状态不是已评审、实施中,不允许拆分");
|
||||
ErrorCode PROJECT_REQUIREMENT_CHILD_NOT_ALLOW_CLOSE = new ErrorCode(1_008_007_008, "存在未处理完的子需求,请先处理子需求");
|
||||
ErrorCode PROJECT_REQUIREMENT_MODULE_NOT_EXISTS = new ErrorCode(1_008_007_009, "项目需求模块不存在");
|
||||
ErrorCode PROJECT_REQUIREMENT_MODULE_NAME_DUPLICATE = new ErrorCode(1_008_007_010, "已经存在名称为【{}】的项目需求模块");
|
||||
ErrorCode PROJECT_REQUIREMENT_MODULE_NOT_BELONG_TO_PROJECT = new ErrorCode(1_008_007_011, "模块不属于当前项目");
|
||||
ErrorCode PROJECT_REQUIREMENT_HAS_CHILDREN = new ErrorCode(1_008_007_013, "存在子需求,请先删除子需求");
|
||||
ErrorCode PROJECT_REQUIREMENT_STATUS_NOT_ALLOW_DELETE = new ErrorCode(1_008_007_014, "只有待认领、待评审状态的项目需求才能删除");
|
||||
ErrorCode PROJECT_REQUIREMENT_MODULE_HAS_CHILDREN = new ErrorCode(1_008_007_015, "存在子模块,请先删除子模块");
|
||||
ErrorCode PROJECT_REQUIREMENT_MODULE_HAS_REQUIREMENTS = new ErrorCode(1_008_007_016, "模块下存在项目需求,请先删除需求");
|
||||
ErrorCode PROJECT_REQUIREMENT_CHILD_NOT_ALLOW_CANCEL = new ErrorCode(1_008_007_017, "只有不存在子需求,或子需求都处于已取消和已拒绝状态时,父需求才允许取消");
|
||||
ErrorCode PROJECT_REQUIREMENT_HAS_EXECUTIONS_NOT_ALLOW_DELETE = new ErrorCode(1_008_007_018, "该项目需求下存在承接执行,请先解绑或转移");
|
||||
ErrorCode PROJECT_REQUIREMENT_SYNCED_FROM_PRODUCT_NOT_ALLOW_CANCEL = new ErrorCode(1_008_007_019, "从产品侧流转来的需求不可取消");
|
||||
ErrorCode PROJECT_REQUIREMENT_REVIEW_ALREADY_EXISTS = new ErrorCode(1_008_007_020, "该项目需求已提交评审记录");
|
||||
ErrorCode PROJECT_REQUIREMENT_REVIEW_NOT_EXISTS = new ErrorCode(1_008_007_021, "项目需求评审记录不存在");
|
||||
ErrorCode PROJECT_REQUIREMENT_REVIEW_CONCLUSION_INVALID = new ErrorCode(1_008_007_022, "项目需求评审结论不合法");
|
||||
|
||||
// ========== 个人事项 1_008_008_xxx ==========
|
||||
ErrorCode PERSONAL_ITEM_NOT_EXISTS = new ErrorCode(1_008_008_001, "个人事项不存在");
|
||||
ErrorCode PERSONAL_ITEM_OWNER_NOT_IN_EXECUTION = new ErrorCode(1_008_008_002, "个人事项负责人必须属于当前有效执行团队成员");
|
||||
ErrorCode PERSONAL_ITEM_STATUS_MODEL_NOT_EXISTS_OR_DISABLED = new ErrorCode(1_008_008_003, "个人事项状态定义不存在或已停用");
|
||||
ErrorCode PERSONAL_ITEM_STATUS_ACTION_NOT_ALLOWED = new ErrorCode(1_008_008_004, "当前个人事项状态不支持动作【{}】");
|
||||
ErrorCode PERSONAL_ITEM_STATUS_ACTION_REASON_REQUIRED = new ErrorCode(1_008_008_005, "动作【{}】必须填写原因");
|
||||
ErrorCode PERSONAL_ITEM_STATUS_CONCURRENT_MODIFIED = new ErrorCode(1_008_008_006, "个人事项状态已发生变化,请刷新后重试");
|
||||
ErrorCode PERSONAL_ITEM_STATUS_NOT_ALLOW_EDIT = new ErrorCode(1_008_008_007, "当前个人事项状态不允许编辑");
|
||||
ErrorCode PERSONAL_ITEM_NOT_ALLOW_DELETE = new ErrorCode(1_008_008_008, "仅初始态(待开始)的个人事项允许删除");
|
||||
ErrorCode PERSONAL_ITEM_WRITE_FORBIDDEN = new ErrorCode(1_008_008_009, "无权修改个人事项");
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.njcn.rdms.module.project.enums;
|
||||
|
||||
/**
|
||||
* 项目域字典类型常量。
|
||||
*/
|
||||
public interface ProjectDictTypeConstants {
|
||||
|
||||
/**
|
||||
* 项目类型。
|
||||
*/
|
||||
String PROJECT_TYPE = "rdms_project_type";
|
||||
|
||||
/**
|
||||
* 执行类型。
|
||||
*/
|
||||
String EXECUTION_TYPE = "rdms_project_execution_type";
|
||||
|
||||
/**
|
||||
* 优先级(任务 / 执行 共用;P0=最高 ~ P3=最低)。
|
||||
*/
|
||||
String REQ_PRIORITY = "rdms_req_priority";
|
||||
|
||||
/**
|
||||
* 工时完成难度。
|
||||
*/
|
||||
String WORKLOG_DIFFICULTY = "rdms_worklog_difficulty";
|
||||
|
||||
}
|
||||
116
rdms-project/rdms-project-boot/pom.xml
Normal file
116
rdms-project/rdms-project-boot/pom.xml
Normal file
@@ -0,0 +1,116 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>rdms-project</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>rdms-project-boot</artifactId>
|
||||
<description>项目交付域功能服务模块</description>
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!-- Spring Cloud 基础 -->
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>rdms-spring-boot-starter-env</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 依赖服务 -->
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>rdms-project-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>rdms-system-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Web 相关 -->
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>rdms-spring-boot-starter-security</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- DB 相关 -->
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>rdms-spring-boot-starter-mybatis</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>rdms-spring-boot-starter-redis</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- RPC 远程调用相关 -->
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>rdms-spring-boot-starter-rpc</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 工具类相关 -->
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>rdms-spring-boot-starter-excel</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Registry 注册中心相关 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Config 配置中心相关 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Test 测试相关 -->
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>rdms-spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- 热部署-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-devtools</artifactId>
|
||||
<scope>runtime</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${spring.boot.version}</version>
|
||||
<configuration>
|
||||
<addResources>true</addResources>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.rdms.module.project;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* 项目交付域服务启动类
|
||||
*/
|
||||
@SpringBootApplication
|
||||
public class ProjectServerApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(ProjectServerApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* Project API 实现包,放置对外暴露 RPC 接口的实现类
|
||||
*/
|
||||
package com.njcn.rdms.module.project.api;
|
||||
@@ -0,0 +1,168 @@
|
||||
package com.njcn.rdms.module.project.constant;
|
||||
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 对象动态常量
|
||||
*
|
||||
* 说明:
|
||||
* 1. 当前先承载产品对象首页时间线使用的 activityType / actionType 常量
|
||||
* 2. 后续项目等对象复用同类动态能力时,继续按前缀分组扩展,不单独拆分枚举
|
||||
*/
|
||||
public final class ObjectActivityConstants {
|
||||
|
||||
private ObjectActivityConstants() {
|
||||
}
|
||||
|
||||
// ========== 动态来源类型 ==========
|
||||
public static final String ACTIVITY_TYPE_STATUS = "status";
|
||||
public static final String ACTIVITY_TYPE_PRODUCT = "product";
|
||||
public static final String ACTIVITY_TYPE_MEMBER = "member";
|
||||
|
||||
// ========== 审计业务类型 ==========
|
||||
public static final String PRODUCT_BIZ_TYPE = "product";
|
||||
public static final String PROJECT_BIZ_TYPE = "project";
|
||||
public static final String MEMBER_BIZ_TYPE = "rdms_user_object_role";
|
||||
|
||||
// ========== 产品对象动作 ==========
|
||||
public static final String PRODUCT_ACTION_CREATE = "create";
|
||||
public static final String PRODUCT_ACTION_UPDATE = "update";
|
||||
public static final String PRODUCT_ACTION_DELETE = "delete";
|
||||
public static final String PRODUCT_ACTION_CHANGE_MANAGER = "change_manager";
|
||||
|
||||
// ========== 项目对象动作 ==========
|
||||
public static final String PROJECT_ACTION_CREATE = "create";
|
||||
public static final String PROJECT_ACTION_UPDATE = "update";
|
||||
public static final String PROJECT_ACTION_DELETE = "delete";
|
||||
public static final String PROJECT_ACTION_CHANGE_MANAGER = "change_manager";
|
||||
public static final String PROJECT_ACTION_AUTO_START = "auto_start";
|
||||
|
||||
// ========== 项目自动推进触发动作 ==========
|
||||
public static final String PROJECT_TRIGGER_CREATE_EXECUTION = "create_execution";
|
||||
public static final String PROJECT_TRIGGER_CREATE_TASK = "create_task";
|
||||
public static final String PROJECT_TRIGGER_SCHEDULE_REQUIREMENT = "schedule_requirement";
|
||||
/**
|
||||
* 项目自动开始触发动作 —— 由执行 auto_start 反向触发。
|
||||
* 与 {@link #EXECUTION_TRIGGER_AUTO_START} 同语义;项目侧用此名走 AUTO_START_TRIGGERS 白名单。
|
||||
*/
|
||||
public static final String PROJECT_TRIGGER_EXECUTION_AUTO_START = "execution_auto_start";
|
||||
|
||||
// ========== 任务自动推进触发动作 ==========
|
||||
/**
|
||||
* 任务自动开始动作编码 —— owner 或协办人填报工时时由后端自动触发的状态流转动作。
|
||||
* 对应 rdms_object_status_transition (object_type=task, action_code=auto_start,
|
||||
* from=pending → to=active)。
|
||||
* 修改 DB 该条记录的 action_code 时必须同步修改本常量;本常量被
|
||||
* ProjectTaskServiceImpl#internalAutoStartByWorklog 引用。
|
||||
* 后续若再增加"任务自动完成 / 执行自动开始"等同类语义,按 *_ACTION_AUTO_* 命名加在本分组。
|
||||
*/
|
||||
public static final String TASK_ACTION_AUTO_START = "auto_start";
|
||||
|
||||
// ========== 状态动作 ==========
|
||||
public static final String STATUS_ACTION_PAUSE = "pause";
|
||||
public static final String STATUS_ACTION_RESUME = "resume";
|
||||
public static final String STATUS_ACTION_ARCHIVE = "archive";
|
||||
public static final String STATUS_ACTION_ABANDON = "abandon";
|
||||
|
||||
// ========== 成员动作 ==========
|
||||
public static final String MEMBER_ACTION_ADD = "add_member";
|
||||
public static final String MEMBER_ACTION_UPDATE = "update_member";
|
||||
public static final String MEMBER_ACTION_REMOVE = "remove_member";
|
||||
/**
|
||||
* 复活动作:原 INACTIVE 成员行被重新激活(status: 1 → 0),用于把"再次新增 / update 改 role 命中老 INACTIVE 行"路径
|
||||
* 跟物理"新增 / 更新"的 audit 语义区分开。createXxxMember 命中 INACTIVE 三元组复活老行时使用本动作,避免 ADD 语义误用。
|
||||
*/
|
||||
public static final String MEMBER_ACTION_REACTIVATE = "reactivate_member";
|
||||
public static final String EXECUTION_ACTION_CREATE = "create_execution_entity";
|
||||
public static final String EXECUTION_ACTION_UPDATE = "update_execution_entity";
|
||||
public static final String EXECUTION_ACTION_DELETE = "delete_execution_entity";
|
||||
public static final String EXECUTION_ACTION_CHANGE_OWNER = "change_execution_owner";
|
||||
public static final String EXECUTION_ASSIGNEE_ACTION_ADD = "add_execution_assignee";
|
||||
public static final String EXECUTION_ASSIGNEE_ACTION_REMOVE = "remove_execution_assignee";
|
||||
public static final String TASK_ACTION_CREATE = "create_task_entity";
|
||||
public static final String TASK_ACTION_UPDATE = "update_task_entity";
|
||||
public static final String TASK_ACTION_DELETE = "delete_task_entity";
|
||||
public static final String PERSONAL_ITEM_ACTION_CREATE = "create_personal_item";
|
||||
public static final String PERSONAL_ITEM_ACTION_UPDATE = "update_personal_item";
|
||||
public static final String PERSONAL_ITEM_ACTION_DELETE = "delete_personal_item";
|
||||
|
||||
// ========== 任务协办人事件类型(B 模型 - 多行周期记录) ==========
|
||||
public static final String TASK_ASSIGNEE_ACTION_JOIN = "join";
|
||||
public static final String TASK_ASSIGNEE_ACTION_INACTIVE = "inactive";
|
||||
|
||||
// ========== 执行协办人事件类型(B 模型 - 多行周期记录) ==========
|
||||
public static final String EXECUTION_ASSIGNEE_LOG_ACTION_JOIN = "join";
|
||||
public static final String EXECUTION_ASSIGNEE_LOG_ACTION_INACTIVE = "inactive";
|
||||
public static final String EXECUTION_ASSIGNEE_LOG_ACTION_OWNER_TRANSFER_IN = "owner_transfer_in";
|
||||
public static final String EXECUTION_ASSIGNEE_LOG_ACTION_OWNER_TRANSFER_OUT = "owner_transfer_out";
|
||||
|
||||
public static final List<String> STATUS_ACTION_TYPES = List.of(
|
||||
STATUS_ACTION_PAUSE, STATUS_ACTION_RESUME, STATUS_ACTION_ARCHIVE, STATUS_ACTION_ABANDON);
|
||||
|
||||
public static final List<String> PRODUCT_TIMELINE_ACTION_TYPES = List.of(
|
||||
PRODUCT_ACTION_CREATE, PRODUCT_ACTION_CHANGE_MANAGER);
|
||||
|
||||
public static final List<String> MEMBER_TIMELINE_ACTION_TYPES = List.of(
|
||||
MEMBER_ACTION_ADD, MEMBER_ACTION_UPDATE, MEMBER_ACTION_REMOVE, MEMBER_ACTION_REACTIVATE);
|
||||
|
||||
private static final Set<String> STATUS_ACTION_TYPE_SET = Set.copyOf(STATUS_ACTION_TYPES);
|
||||
|
||||
public static boolean isStatusAction(String actionType) {
|
||||
return STATUS_ACTION_TYPE_SET.contains(normalize(actionType));
|
||||
}
|
||||
|
||||
public static String resolveActionName(String actionType) {
|
||||
String normalizedActionType = normalize(actionType);
|
||||
if (!StringUtils.hasText(normalizedActionType)) {
|
||||
return actionType;
|
||||
}
|
||||
return switch (normalizedActionType) {
|
||||
case PRODUCT_ACTION_CREATE -> "创建";
|
||||
case PRODUCT_ACTION_UPDATE -> "更新";
|
||||
case PRODUCT_ACTION_DELETE -> "删除";
|
||||
case PROJECT_ACTION_AUTO_START -> "开始推进";
|
||||
case PROJECT_TRIGGER_CREATE_EXECUTION -> "创建执行";
|
||||
case PROJECT_TRIGGER_CREATE_TASK -> "创建任务";
|
||||
case PROJECT_TRIGGER_SCHEDULE_REQUIREMENT -> "项目需求排期";
|
||||
case PROJECT_TRIGGER_EXECUTION_AUTO_START -> "执行自动开始";
|
||||
case EXECUTION_ACTION_CREATE -> "创建执行";
|
||||
case EXECUTION_ACTION_UPDATE -> "更新执行";
|
||||
case EXECUTION_ACTION_DELETE -> "删除执行";
|
||||
case EXECUTION_ACTION_CHANGE_OWNER -> "变更执行负责人";
|
||||
case EXECUTION_ASSIGNEE_ACTION_ADD -> "新增执行协办人";
|
||||
case EXECUTION_ASSIGNEE_ACTION_REMOVE -> "移出执行协办人";
|
||||
case TASK_ACTION_CREATE -> "创建任务";
|
||||
case TASK_ACTION_UPDATE -> "更新任务";
|
||||
case TASK_ACTION_DELETE -> "删除任务";
|
||||
case PERSONAL_ITEM_ACTION_CREATE -> "创建个人事项";
|
||||
case PERSONAL_ITEM_ACTION_UPDATE -> "更新个人事项";
|
||||
case PERSONAL_ITEM_ACTION_DELETE -> "删除个人事项";
|
||||
case TASK_ASSIGNEE_ACTION_JOIN -> "加入";
|
||||
case TASK_ASSIGNEE_ACTION_INACTIVE -> "退出";
|
||||
case EXECUTION_ASSIGNEE_LOG_ACTION_OWNER_TRANSFER_IN -> "转入负责人";
|
||||
case EXECUTION_ASSIGNEE_LOG_ACTION_OWNER_TRANSFER_OUT -> "转出负责人";
|
||||
case "start" -> "开始";
|
||||
case "block" -> "阻塞";
|
||||
case "complete" -> "完成";
|
||||
case "cancel" -> "取消";
|
||||
case STATUS_ACTION_PAUSE -> "暂停";
|
||||
case STATUS_ACTION_RESUME -> "恢复";
|
||||
case STATUS_ACTION_ARCHIVE -> "归档";
|
||||
case STATUS_ACTION_ABANDON -> "废弃";
|
||||
case PRODUCT_ACTION_CHANGE_MANAGER -> "切换负责人";
|
||||
case MEMBER_ACTION_ADD -> "新增成员";
|
||||
case MEMBER_ACTION_UPDATE -> "调整成员";
|
||||
case MEMBER_ACTION_REMOVE -> "移出成员";
|
||||
case MEMBER_ACTION_REACTIVATE -> "重新激活成员";
|
||||
default -> normalizedActionType;
|
||||
};
|
||||
}
|
||||
|
||||
private static String normalize(String value) {
|
||||
return StringUtils.hasText(value) ? value.trim() : null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.njcn.rdms.module.project.constant;
|
||||
|
||||
import com.njcn.rdms.module.system.enums.permission.PermissionScopeTypeEnum;
|
||||
|
||||
/**
|
||||
* RDMS 对象角色与成员关系常量。
|
||||
*/
|
||||
public final class ObjectRoleConstants {
|
||||
|
||||
private ObjectRoleConstants() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 对象级权限作用域,对应 sys_menu.scope_type = object。
|
||||
*/
|
||||
public static final String ROLE_SCOPE_OBJECT = PermissionScopeTypeEnum.OBJECT.getScopeType();
|
||||
|
||||
/**
|
||||
* 对象成员有效状态,对应 rdms_user_object_role.status = 0。
|
||||
*/
|
||||
public static final Integer MEMBER_STATUS_ACTIVE = 0;
|
||||
|
||||
/**
|
||||
* 对象成员失效状态,对应 rdms_user_object_role.status = 1。
|
||||
*/
|
||||
public static final Integer MEMBER_STATUS_INACTIVE = 1;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.njcn.rdms.module.project.constant;
|
||||
|
||||
/**
|
||||
* 个人事项常量。
|
||||
*/
|
||||
public final class PersonalItemConstants {
|
||||
|
||||
private PersonalItemConstants() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 个人事项状态模型复用任务对象类型。
|
||||
*/
|
||||
public static final String STATUS_OBJECT_TYPE = ProjectTaskConstants.OBJECT_TYPE;
|
||||
|
||||
/**
|
||||
* 个人事项业务类型。
|
||||
*/
|
||||
public static final String BIZ_TYPE = "personal_item";
|
||||
|
||||
public static final String PERMISSION_QUERY = "project:personal-item:query";
|
||||
public static final String PERMISSION_CREATE = "project:personal-item:create";
|
||||
public static final String PERMISSION_UPDATE = "project:personal-item:update";
|
||||
public static final String PERMISSION_DELETE = "project:personal-item:delete";
|
||||
public static final String PERMISSION_STATUS = "project:personal-item:status";
|
||||
|
||||
public static final String STATUS_COMPLETED = "completed";
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.njcn.rdms.module.project.constant;
|
||||
|
||||
/**
|
||||
* 产品对象常量。
|
||||
*/
|
||||
public final class ProductObjectConstants {
|
||||
|
||||
private ProductObjectConstants() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 产品对象类型,对应 rdms_user_object_role.object_type、rdms_object_status_model.object_type。
|
||||
*/
|
||||
public static final String OBJECT_TYPE = "product";
|
||||
|
||||
/**
|
||||
* 产品经理对象角色编码。该角色用于初始化与识别产品负责人。
|
||||
*/
|
||||
public static final String MANAGER_ROLE_CODE = "product_manager";
|
||||
|
||||
/**
|
||||
* 产品暂停状态。
|
||||
*/
|
||||
public static final String STATUS_PAUSED = "paused";
|
||||
|
||||
/**
|
||||
* 产品自动编码前缀。
|
||||
*/
|
||||
public static final String CODE_PREFIX = "CNPD";
|
||||
|
||||
/**
|
||||
* 产品编辑权限码。
|
||||
*/
|
||||
public static final String PERMISSION_UPDATE = "project:product:update";
|
||||
|
||||
/**
|
||||
* 产品状态动作权限码。
|
||||
*/
|
||||
public static final String PERMISSION_STATUS = "project:product:status";
|
||||
|
||||
/**
|
||||
* 产品需求评审权限码。
|
||||
*/
|
||||
public static final String PERMISSION_REVIEW = "project:product:review";
|
||||
|
||||
/**
|
||||
* 产品删除权限码。
|
||||
*/
|
||||
public static final String PERMISSION_DELETE = "project:product:delete";
|
||||
|
||||
/**
|
||||
* 产品删除确认口令。
|
||||
*/
|
||||
public static final String DELETE_CONFIRM_TEXT = "DELETE";
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.njcn.rdms.module.project.constant;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 执行对象常量。
|
||||
*/
|
||||
public final class ProjectExecutionConstants {
|
||||
|
||||
private ProjectExecutionConstants() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行对象类型,对应 rdms_object_status_model.object_type。
|
||||
*/
|
||||
public static final String OBJECT_TYPE = "execution";
|
||||
|
||||
/**
|
||||
* 执行业务类型。
|
||||
*/
|
||||
public static final String BIZ_TYPE = "project_execution";
|
||||
|
||||
/**
|
||||
* 创建执行权限码。
|
||||
*/
|
||||
public static final String PERMISSION_CREATE = "project:execution:create";
|
||||
|
||||
/**
|
||||
* 编辑执行权限码。
|
||||
*/
|
||||
public static final String PERMISSION_UPDATE = "project:execution:update";
|
||||
|
||||
/**
|
||||
* 执行负责人治理权限码。
|
||||
*/
|
||||
public static final String PERMISSION_OWNER = "project:execution:owner";
|
||||
|
||||
/**
|
||||
* 执行协办人治理权限码。
|
||||
*/
|
||||
public static final String PERMISSION_ASSIGNEE = "project:execution:assignee";
|
||||
|
||||
/**
|
||||
* 执行状态动作权限码。
|
||||
*/
|
||||
public static final String PERMISSION_STATUS = "project:execution:status";
|
||||
|
||||
/**
|
||||
* 删除执行权限码。
|
||||
* 推荐挂"项目负责人"角色(参见 docs/项目/2026-05-11-执行按钮可见度对齐设计.md §6.4)。
|
||||
*/
|
||||
public static final String PERMISSION_DELETE = "project:execution:delete";
|
||||
|
||||
/**
|
||||
* 执行"已完成"状态码,对应 rdms_object_status_model 中 object_type='execution' 且 status_code='completed' 的状态。
|
||||
* 删除时拒绝主动删除(已完成的执行不允许删除)。
|
||||
*/
|
||||
public static final String STATUS_COMPLETED = "completed";
|
||||
|
||||
/**
|
||||
* 删除确认口令合法值集合;兼容大写英文 "DELETE" 与中文 "删除",前端可纯中文文案。
|
||||
* 校验时精确匹配(trim 后比对)。
|
||||
*/
|
||||
public static final Set<String> DELETE_CONFIRM_TEXTS = Set.of("DELETE", "删除");
|
||||
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package com.njcn.rdms.module.project.constant;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 项目对象常量。
|
||||
*/
|
||||
public final class ProjectObjectConstants {
|
||||
|
||||
private ProjectObjectConstants() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目对象类型,对应 rdms_user_object_role.object_type、rdms_object_status_model.object_type。
|
||||
*/
|
||||
public static final String OBJECT_TYPE = "project";
|
||||
|
||||
/**
|
||||
* 项目经理对象角色编码。该角色用于初始化与识别项目负责人。
|
||||
*/
|
||||
public static final String MANAGER_ROLE_CODE = "project_manager";
|
||||
|
||||
/**
|
||||
* 项目游客对象角色编码。创建人未成为项目成员时,用于返回只读上下文菜单。
|
||||
*/
|
||||
public static final String VISITOR_ROLE_CODE = "visitor";
|
||||
|
||||
/**
|
||||
* 产品主线项目类型字典值。后续字典值收敛后,只需调整这里。
|
||||
*/
|
||||
public static final Set<String> MAINLINE_PROJECT_TYPE_CODES = Set.of("mainline", "main", "product_mainline", "主线");
|
||||
|
||||
/**
|
||||
* 已作废项目状态编码。当前作废项目不占用产品主线项目名额。
|
||||
*/
|
||||
public static final String STATUS_CANCELLED = "cancelled";
|
||||
|
||||
/**
|
||||
* 项目自动编码前缀。
|
||||
*/
|
||||
public static final String CODE_PREFIX = "CNPJ";
|
||||
|
||||
/**
|
||||
* 项目编辑权限码。
|
||||
*/
|
||||
public static final String PERMISSION_UPDATE = "project:project:update";
|
||||
|
||||
/**
|
||||
* 项目成员维护权限码。
|
||||
*/
|
||||
public static final String PERMISSION_MEMBER = "project:project:member";
|
||||
|
||||
/**
|
||||
* 项目状态动作权限码。
|
||||
*/
|
||||
public static final String PERMISSION_STATUS = "project:project:status";
|
||||
|
||||
/**
|
||||
* 项目需求评审权限码。
|
||||
*/
|
||||
public static final String PERMISSION_REVIEW = "project:project:review";
|
||||
|
||||
/**
|
||||
* 项目拆分权限码。
|
||||
*/
|
||||
public static final String PERMISSION_SPLIT = "project:project:split";
|
||||
|
||||
/**
|
||||
* 项目删除权限码。
|
||||
*/
|
||||
public static final String PERMISSION_DELETE = "project:project:delete";
|
||||
|
||||
/**
|
||||
* 项目删除确认口令。
|
||||
*/
|
||||
public static final String DELETE_CONFIRM_TEXT = "DELETE";
|
||||
|
||||
/**
|
||||
* 可触发项目从待开始自动进入进行中的后端业务动作。
|
||||
*/
|
||||
public static final Set<String> AUTO_START_TRIGGERS = Set.of(
|
||||
ObjectActivityConstants.PROJECT_TRIGGER_CREATE_EXECUTION,
|
||||
ObjectActivityConstants.PROJECT_TRIGGER_CREATE_TASK,
|
||||
ObjectActivityConstants.PROJECT_TRIGGER_SCHEDULE_REQUIREMENT,
|
||||
ObjectActivityConstants.PROJECT_TRIGGER_EXECUTION_AUTO_START);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package com.njcn.rdms.module.project.constant;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 任务对象常量。
|
||||
*/
|
||||
public final class ProjectTaskConstants {
|
||||
|
||||
private ProjectTaskConstants() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务对象类型,对应 rdms_object_status_model.object_type。
|
||||
*/
|
||||
public static final String OBJECT_TYPE = "task";
|
||||
|
||||
/**
|
||||
* 任务"已完成"状态码,对应 rdms_object_status_model 中 object_type='task' 且 status_code='completed' 的状态。
|
||||
* 用于 execution 的 complete 按钮可见性判定:要求根任务在排除排除集后全部为该状态。
|
||||
*/
|
||||
public static final String STATUS_COMPLETED = "completed";
|
||||
|
||||
/**
|
||||
* 任务业务类型。
|
||||
*/
|
||||
public static final String BIZ_TYPE = "project_task";
|
||||
|
||||
/**
|
||||
* 创建任务权限码。
|
||||
*/
|
||||
public static final String PERMISSION_CREATE = "project:task:create";
|
||||
|
||||
/**
|
||||
* 编辑任务权限码。
|
||||
*/
|
||||
public static final String PERMISSION_UPDATE = "project:task:update";
|
||||
|
||||
/**
|
||||
* 任务状态动作权限码。
|
||||
*/
|
||||
public static final String PERMISSION_STATUS = "project:task:status";
|
||||
|
||||
/**
|
||||
* 任务协办人维护权限码。
|
||||
*/
|
||||
public static final String PERMISSION_ASSIGNEE = "project:task:assignee";
|
||||
|
||||
/**
|
||||
* 任务工时维护权限码。
|
||||
*/
|
||||
public static final String PERMISSION_WORKLOG = "project:task:worklog";
|
||||
|
||||
/**
|
||||
* 删除任务权限码。
|
||||
* 推荐挂"项目负责人"角色(参见 docs/项目/2026-05-11-执行按钮可见度对齐设计.md §6.4)。
|
||||
* 实际拦截:service 内按 task.parentTaskId 分流走 checkOwnerOrProjectPermission
|
||||
* (一级任务 → execution.ownerId 字段身份;子任务 → parentTask.ownerId 字段身份;不命中字段时回落本权限码)。
|
||||
*/
|
||||
public static final String PERMISSION_DELETE = "project:task:delete";
|
||||
|
||||
/**
|
||||
* 项目任务"查看全部"权限码(对象域,object_type='project')。
|
||||
*
|
||||
* 用于跨执行视角下"项目全部任务"语义的接口/视图(page / status-board /
|
||||
* board-page / summary 的 scope=all 分支)。无此权限码时,只能看到自己作为
|
||||
* owner 或活跃协办的任务(走 VisibilityScopeResolver.resolveForProject 过滤)。
|
||||
*
|
||||
* 种子绑定:默认绑给项目负责人 + 项目创建人;普通成员、执行负责人默认不绑。
|
||||
* 实际项目中由运维在角色管理界面调整。
|
||||
*/
|
||||
public static final String PERMISSION_LIST_ALL = "project:task:list-all";
|
||||
|
||||
/**
|
||||
* 删除确认口令合法值集合;兼容大写英文 "DELETE" 与中文 "删除",前端可纯中文文案。
|
||||
* 校验时精确匹配(trim 后比对)。
|
||||
*/
|
||||
public static final Set<String> DELETE_CONFIRM_TEXTS = Set.of("DELETE", "删除");
|
||||
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* 管理端控制器包
|
||||
*/
|
||||
package com.njcn.rdms.module.project.controller.admin;
|
||||
@@ -0,0 +1,160 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.personal;
|
||||
|
||||
import com.njcn.rdms.framework.common.pojo.CommonResult;
|
||||
import com.njcn.rdms.framework.common.pojo.PageResult;
|
||||
import com.njcn.rdms.module.project.constant.PersonalItemConstants;
|
||||
import com.njcn.rdms.module.project.controller.admin.personal.vo.item.PersonalItemPageReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.personal.vo.item.PersonalItemRespVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.personal.vo.item.PersonalItemSaveReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.personal.vo.item.PersonalItemStatusActionReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.execution.vo.execution.ProjectExecutionRespVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.task.vo.worklog.TaskWorklogPageReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.task.vo.worklog.TaskWorklogRespVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.task.vo.worklog.TaskWorklogSaveReqVO;
|
||||
import com.njcn.rdms.module.project.service.personal.PersonalItemService;
|
||||
import com.njcn.rdms.module.project.service.project.execution.ProjectExecutionService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.njcn.rdms.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 个人事项")
|
||||
@RestController
|
||||
@RequestMapping("/project/personal-items")
|
||||
@Validated
|
||||
public class PersonalItemController {
|
||||
|
||||
@Resource
|
||||
private PersonalItemService personalItemService;
|
||||
@Resource
|
||||
private ProjectExecutionService projectExecutionService;
|
||||
|
||||
@PostMapping
|
||||
@Operation(summary = "创建个人事项")
|
||||
@PreAuthorize("@ss.hasPermission('" + PersonalItemConstants.PERMISSION_CREATE + "')")
|
||||
public CommonResult<Long> create(@Valid @RequestBody PersonalItemSaveReqVO reqVO) {
|
||||
return success(personalItemService.createItem(reqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/{id}")
|
||||
@Operation(summary = "更新个人事项")
|
||||
@PreAuthorize("@ss.hasPermission('" + PersonalItemConstants.PERMISSION_UPDATE + "')")
|
||||
public CommonResult<Boolean> update(@PathVariable("id") Long id,
|
||||
@Valid @RequestBody PersonalItemSaveReqVO reqVO) {
|
||||
personalItemService.updateItem(id, reqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/{id}")
|
||||
@Operation(summary = "获取个人事项详情")
|
||||
@PreAuthorize("@ss.hasPermission('" + PersonalItemConstants.PERMISSION_QUERY + "')")
|
||||
public CommonResult<PersonalItemRespVO> get(@PathVariable("id") Long id) {
|
||||
return success(personalItemService.getItemRespVO(id));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获取个人事项分页")
|
||||
@PreAuthorize("@ss.hasPermission('" + PersonalItemConstants.PERMISSION_QUERY + "')")
|
||||
public CommonResult<PageResult<PersonalItemRespVO>> page(@Valid PersonalItemPageReqVO reqVO) {
|
||||
return success(personalItemService.getItemRespVOPage(reqVO));
|
||||
}
|
||||
|
||||
@PostMapping("/{id}/change-status")
|
||||
@Operation(summary = "变更个人事项状态")
|
||||
@PreAuthorize("@ss.hasPermission('" + PersonalItemConstants.PERMISSION_STATUS + "')")
|
||||
public CommonResult<Boolean> changeStatus(@PathVariable("id") Long id,
|
||||
@Valid @RequestBody PersonalItemStatusActionReqVO reqVO) {
|
||||
personalItemService.changeStatus(id, reqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/{id}/worklogs")
|
||||
@Operation(summary = "新增个人事项工作日志")
|
||||
@PreAuthorize("@ss.hasPermission('" + PersonalItemConstants.PERMISSION_UPDATE + "')")
|
||||
public CommonResult<Long> createWorklog(@PathVariable("id") Long id,
|
||||
@Valid @RequestBody TaskWorklogSaveReqVO reqVO) {
|
||||
return success(personalItemService.createWorklog(id, reqVO));
|
||||
}
|
||||
|
||||
@GetMapping("/{id}/worklogs")
|
||||
@Operation(summary = "获取个人事项工作日志分页")
|
||||
@PreAuthorize("@ss.hasPermission('" + PersonalItemConstants.PERMISSION_QUERY + "')")
|
||||
public CommonResult<PageResult<TaskWorklogRespVO>> getWorklogPage(@PathVariable("id") Long id,
|
||||
@Valid TaskWorklogPageReqVO reqVO) {
|
||||
return success(personalItemService.getWorklogPage(id, reqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/{id}/worklogs/{worklogId}")
|
||||
@Operation(summary = "修改个人事项工作日志")
|
||||
@PreAuthorize("@ss.hasPermission('" + PersonalItemConstants.PERMISSION_UPDATE + "')")
|
||||
public CommonResult<Boolean> updateWorklog(@PathVariable("id") Long id,
|
||||
@PathVariable("worklogId") Long worklogId,
|
||||
@Valid @RequestBody TaskWorklogSaveReqVO reqVO) {
|
||||
personalItemService.updateWorklog(id, worklogId, reqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/{id}/worklogs/{worklogId}")
|
||||
@Operation(summary = "删除个人事项工作日志")
|
||||
@PreAuthorize("@ss.hasPermission('" + PersonalItemConstants.PERMISSION_UPDATE + "')")
|
||||
public CommonResult<Boolean> deleteWorklog(@PathVariable("id") Long id,
|
||||
@PathVariable("worklogId") Long worklogId) {
|
||||
personalItemService.deleteWorklog(id, worklogId);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/{id}/worklogs/delete-list")
|
||||
@Operation(summary = "批量删除个人事项工作日志")
|
||||
@PreAuthorize("@ss.hasPermission('" + PersonalItemConstants.PERMISSION_UPDATE + "')")
|
||||
public CommonResult<Boolean> deleteWorklogs(@PathVariable("id") Long id,
|
||||
@RequestParam("ids") List<Long> ids) {
|
||||
personalItemService.deleteWorklogs(id, ids);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除个人事项")
|
||||
@PreAuthorize("@ss.hasPermission('" + PersonalItemConstants.PERMISSION_DELETE + "')")
|
||||
public CommonResult<Boolean> delete(@RequestParam("id") Long id) {
|
||||
personalItemService.deleteItem(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Operation(summary = "批量删除个人事项")
|
||||
@PreAuthorize("@ss.hasPermission('" + PersonalItemConstants.PERMISSION_DELETE + "')")
|
||||
public CommonResult<Boolean> deleteList(@RequestParam("ids") List<Long> ids) {
|
||||
personalItemService.deleteItems(ids);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/relate-execution")
|
||||
@Operation(summary = "批量个人事项关联执行")
|
||||
@PreAuthorize("@ss.hasPermission('" + PersonalItemConstants.PERMISSION_UPDATE + "')")
|
||||
public CommonResult<Boolean> relateExecution(@RequestParam("itemIds") List<Long> itemIds,
|
||||
@RequestParam("executionId") Long executionId) {
|
||||
personalItemService.relateExecution(itemIds, executionId);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/owner/all-execution")
|
||||
@Operation(summary = "获取当前登录用户负责的所有执行")
|
||||
public CommonResult<List<ProjectExecutionRespVO>> getCurrentUserExecutionList() {
|
||||
return success(projectExecutionService.getCurrentUserExecutionList());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.personal.vo.item;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Schema(description = "管理后台 - 个人事项生命周期动作 Response VO")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public class PersonalItemLifecycleActionRespVO {
|
||||
|
||||
@Schema(description = "动作编码", example = "complete")
|
||||
private String actionCode;
|
||||
|
||||
@Schema(description = "动作名称", example = "完成")
|
||||
private String actionName;
|
||||
|
||||
@Schema(description = "是否必须填写原因", example = "true")
|
||||
private Boolean needReason;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.personal.vo.item;
|
||||
|
||||
import com.njcn.rdms.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.njcn.rdms.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 个人事项分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PersonalItemPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "关键词,匹配个人事项标题", example = "沟通纪要")
|
||||
private String keyword;
|
||||
|
||||
@Schema(description = "负责人用户编号;当前阶段仅支持查询本人事项", example = "3001")
|
||||
private Long ownerId;
|
||||
|
||||
@Schema(description = "个人事项状态编码", example = "pending")
|
||||
@Size(max = 32, message = "个人事项状态编码长度不能超过32个字符")
|
||||
private String statusCode;
|
||||
|
||||
@Schema(description = "更新时间", example = "[2026-05-01 00:00:00, 2026-05-31 23:59:59]")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] updateTime;
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.personal.vo.item;
|
||||
|
||||
import com.njcn.rdms.module.project.dal.dataobject.attachment.AttachmentItem;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 个人事项 Response VO")
|
||||
@Data
|
||||
public class PersonalItemRespVO {
|
||||
|
||||
@Schema(description = "个人事项编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "9001")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "个人事项标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "整理供应商沟通纪要")
|
||||
private String taskTitle;
|
||||
|
||||
@Schema(description = "个人事项类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "todo")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "负责人用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "3001")
|
||||
private Long ownerId;
|
||||
|
||||
@Schema(description = "负责人用户昵称", example = "小王")
|
||||
private String ownerNickname;
|
||||
|
||||
@Schema(description = "个人事项状态编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "pending")
|
||||
private String statusCode;
|
||||
|
||||
@Schema(description = "个人事项状态名称", example = "待开始")
|
||||
private String statusName;
|
||||
|
||||
@Schema(description = "是否终态", example = "false")
|
||||
private Boolean terminal;
|
||||
|
||||
@Schema(description = "当前状态是否允许编辑", example = "true")
|
||||
private Boolean allowEdit;
|
||||
|
||||
@Schema(description = "当前状态可执行动作")
|
||||
private List<PersonalItemLifecycleActionRespVO> availableActions;
|
||||
|
||||
@Schema(description = "个人事项进度", example = "60.00")
|
||||
private BigDecimal progressRate;
|
||||
|
||||
@Schema(description = "已填报工时合计(小时,0.5 颗粒);逻辑删除的工时记录不计入。无记录默认为 0",
|
||||
example = "8.0")
|
||||
private BigDecimal totalSpentHours;
|
||||
|
||||
@Schema(description = "计划开始日期")
|
||||
private LocalDate plannedStartDate;
|
||||
|
||||
@Schema(description = "计划结束日期")
|
||||
private LocalDate plannedEndDate;
|
||||
|
||||
@Schema(description = "实际开始日期")
|
||||
private LocalDate actualStartDate;
|
||||
|
||||
@Schema(description = "实际结束日期")
|
||||
private LocalDate actualEndDate;
|
||||
|
||||
@Schema(description = "个人事项说明")
|
||||
private String taskDesc;
|
||||
|
||||
@Schema(description = "最近一次状态动作原因")
|
||||
private String lastStatusReason;
|
||||
|
||||
@Schema(description = "附件列表")
|
||||
private List<AttachmentItem> attachments;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.personal.vo.item;
|
||||
|
||||
import com.njcn.rdms.module.project.dal.dataobject.attachment.AttachmentItem;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.DecimalMax;
|
||||
import jakarta.validation.constraints.DecimalMin;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 个人事项保存 Request VO")
|
||||
@Data
|
||||
public class PersonalItemSaveReqVO {
|
||||
|
||||
@Schema(description = "执行编号,仅用于创建/编辑时补充执行成员合法性校验", example = "5001")
|
||||
private Long executionId;
|
||||
|
||||
@Schema(description = "个人事项标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "整理供应商沟通纪要")
|
||||
@NotBlank(message = "个人事项标题不能为空")
|
||||
@Size(max = 300, message = "个人事项标题长度不能超过300个字符")
|
||||
private String taskTitle;
|
||||
|
||||
@Schema(description = "个人事项类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "todo")
|
||||
@NotBlank(message = "个人事项类型不能为空")
|
||||
@Size(max = 32, message = "个人事项类型长度不能超过32个字符")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "个人事项进度(0~100)", example = "60.00")
|
||||
@DecimalMin(value = "0.00", message = "个人事项进度不能小于 0")
|
||||
@DecimalMax(value = "100.00", message = "个人事项进度不能大于 100")
|
||||
private BigDecimal progressRate;
|
||||
|
||||
@Schema(description = "计划开始日期", example = "2026-05-20")
|
||||
private LocalDate plannedStartDate;
|
||||
|
||||
@Schema(description = "计划结束日期", example = "2026-05-25")
|
||||
private LocalDate plannedEndDate;
|
||||
|
||||
@Schema(description = "个人事项说明(富文本 HTML)")
|
||||
private String taskDesc;
|
||||
|
||||
@Schema(description = "附件列表")
|
||||
@Valid
|
||||
private List<AttachmentItem> attachments;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.personal.vo.item;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 个人事项状态动作 Request VO")
|
||||
@Data
|
||||
public class PersonalItemStatusActionReqVO {
|
||||
|
||||
@Schema(description = "动作编码,如 start、complete、reopen", requiredMode = Schema.RequiredMode.REQUIRED,
|
||||
example = "complete")
|
||||
@NotBlank(message = "动作编码不能为空")
|
||||
@Size(max = 32, message = "动作编码长度不能超过32个字符")
|
||||
private String actionCode;
|
||||
|
||||
@Schema(description = "动作原因;是否必填由状态流转配置决定", example = "事项完成")
|
||||
@Size(max = 500, message = "动作原因长度不能超过500个字符")
|
||||
private String reason;
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product;
|
||||
|
||||
import com.njcn.rdms.framework.common.pojo.CommonResult;
|
||||
import com.njcn.rdms.framework.common.pojo.PageResult;
|
||||
import com.njcn.rdms.framework.common.util.object.BeanUtils;
|
||||
import com.njcn.rdms.module.project.controller.admin.product.vo.product.ProductContextRespVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.product.vo.product.ProductCreateWithTeamReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.product.vo.product.ProductDeleteReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.product.vo.product.ProductOverviewSummaryRespVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.product.vo.product.ProductPageReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.product.vo.product.ProductRespVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.product.vo.product.ProductSaveReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.product.vo.product.ProductStatusActionReqVO;
|
||||
import com.njcn.rdms.module.project.dal.dataobject.product.ProductDO;
|
||||
import com.njcn.rdms.module.project.service.product.ProductService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import static com.njcn.rdms.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 产品管理")
|
||||
@RestController
|
||||
@RequestMapping("/project/product")
|
||||
@Validated
|
||||
public class ProductController {
|
||||
|
||||
@Resource
|
||||
private ProductService productService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建产品")
|
||||
@PreAuthorize("@ss.hasPermission('project:product:create')")
|
||||
public CommonResult<Long> createProduct(@Valid @RequestBody ProductSaveReqVO createReqVO) {
|
||||
return success(productService.createProduct(createReqVO));
|
||||
}
|
||||
|
||||
@PostMapping("/create-with-team")
|
||||
@Operation(summary = "创建产品并初始化团队(原子接口)")
|
||||
@PreAuthorize("@ss.hasPermission('project:product:create')")
|
||||
public CommonResult<Long> createProductWithTeam(@Valid @RequestBody ProductCreateWithTeamReqVO reqVO) {
|
||||
return success(productService.createProductWithTeam(reqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新产品")
|
||||
public CommonResult<Boolean> updateProduct(@Valid @RequestBody ProductSaveReqVO updateReqVO) {
|
||||
productService.updateProduct(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获取产品详情")
|
||||
@Parameter(name = "id", description = "产品编号", required = true, example = "1024")
|
||||
public CommonResult<ProductRespVO> getProduct(@RequestParam("id") Long id) {
|
||||
ProductDO product = productService.getProduct(id);
|
||||
return success(BeanUtils.toBean(product, ProductRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/{id}/context")
|
||||
@Operation(summary = "获取产品上下文")
|
||||
@Parameter(name = "id", description = "产品编号", required = true, example = "1024")
|
||||
public CommonResult<ProductContextRespVO> getProductContext(@PathVariable("id") Long id) {
|
||||
return success(productService.getProductContext(id));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获取产品分页")
|
||||
public CommonResult<PageResult<ProductRespVO>> getProductPage(@Valid ProductPageReqVO pageReqVO) {
|
||||
PageResult<ProductDO> pageResult = productService.getProductPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ProductRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/overview-summary")
|
||||
@Operation(summary = "获取产品入口页概览统计")
|
||||
public CommonResult<ProductOverviewSummaryRespVO> getProductOverviewSummary() {
|
||||
return success(productService.getProductOverviewSummary());
|
||||
}
|
||||
|
||||
@PostMapping("/change-status")
|
||||
@Operation(summary = "变更产品状态")
|
||||
public CommonResult<Boolean> changeProductStatus(@Valid @RequestBody ProductStatusActionReqVO reqVO) {
|
||||
productService.changeProductStatus(reqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@Operation(summary = "删除产品")
|
||||
public CommonResult<Boolean> deleteProduct(@Valid @RequestBody ProductDeleteReqVO reqVO) {
|
||||
productService.deleteProduct(reqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product;
|
||||
|
||||
import com.njcn.rdms.framework.common.pojo.CommonResult;
|
||||
import com.njcn.rdms.module.project.controller.admin.product.vo.member.ProductMemberBatchCreateReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.product.vo.member.ProductMemberBatchInactiveReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.product.vo.member.ProductMemberInactiveReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.product.vo.member.ProductMemberRespVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.product.vo.member.ProductMemberSaveReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.product.vo.member.ProductMemberUpdateReqVO;
|
||||
import com.njcn.rdms.module.project.service.product.ProductMemberService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.njcn.rdms.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 产品团队")
|
||||
@RestController
|
||||
@RequestMapping("/project/product")
|
||||
@Validated
|
||||
public class ProductMemberController {
|
||||
|
||||
@Resource
|
||||
private ProductMemberService productMemberService;
|
||||
|
||||
@GetMapping("/{id}/members")
|
||||
@Operation(summary = "获取产品团队成员列表")
|
||||
@Parameter(name = "id", description = "产品编号", required = true, example = "1024")
|
||||
public CommonResult<List<ProductMemberRespVO>> getProductMemberList(@PathVariable("id") Long productId) {
|
||||
return success(productMemberService.getProductMemberList(productId));
|
||||
}
|
||||
|
||||
@PostMapping("/{id}/members")
|
||||
@Operation(summary = "新增产品团队成员")
|
||||
@Parameter(name = "id", description = "产品编号", required = true, example = "1024")
|
||||
public CommonResult<Long> createProductMember(@PathVariable("id") Long productId,
|
||||
@Valid @RequestBody ProductMemberSaveReqVO reqVO) {
|
||||
return success(productMemberService.createProductMember(productId, reqVO));
|
||||
}
|
||||
|
||||
@PostMapping("/{id}/members/batch")
|
||||
@Operation(summary = "批量新增产品团队成员")
|
||||
@Parameter(name = "id", description = "产品编号", required = true, example = "1024")
|
||||
public CommonResult<List<Long>> batchCreateProductMembers(@PathVariable("id") Long productId,
|
||||
@Valid @RequestBody ProductMemberBatchCreateReqVO reqVO) {
|
||||
return success(productMemberService.batchCreateProductMembers(productId, reqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/{id}/members/{memberId}")
|
||||
@Operation(summary = "调整产品团队成员角色")
|
||||
public CommonResult<Boolean> updateProductMember(@PathVariable("id") Long productId,
|
||||
@PathVariable("memberId") Long memberId,
|
||||
@Valid @RequestBody ProductMemberUpdateReqVO reqVO) {
|
||||
productMemberService.updateProductMember(productId, memberId, reqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/{id}/members/{memberId}/inactive")
|
||||
@Operation(summary = "移出产品团队成员")
|
||||
public CommonResult<Boolean> inactiveProductMember(@PathVariable("id") Long productId,
|
||||
@PathVariable("memberId") Long memberId,
|
||||
@Valid @RequestBody ProductMemberInactiveReqVO reqVO) {
|
||||
productMemberService.inactiveProductMember(productId, memberId, reqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/{id}/members/batch/inactive")
|
||||
@Operation(summary = "批量移出产品团队成员")
|
||||
@Parameter(name = "id", description = "产品编号", required = true, example = "1024")
|
||||
public CommonResult<Boolean> batchInactiveProductMembers(@PathVariable("id") Long productId,
|
||||
@Valid @RequestBody ProductMemberBatchInactiveReqVO reqVO) {
|
||||
productMemberService.batchInactiveProductMembers(productId, reqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,180 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product;
|
||||
|
||||
import com.njcn.rdms.framework.common.pojo.CommonResult;
|
||||
import com.njcn.rdms.framework.common.pojo.PageResult;
|
||||
import com.njcn.rdms.module.project.controller.admin.product.vo.requirement.*;
|
||||
import com.njcn.rdms.module.project.service.product.ProductRequirementService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.njcn.rdms.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
* 管理后台 - 产品需求控制器
|
||||
*/
|
||||
@Tag(name = "管理后台 - 产品需求")
|
||||
@RestController
|
||||
@RequestMapping("/project/product/requirement")
|
||||
@Validated
|
||||
public class ProductRequirementController {
|
||||
|
||||
@Resource
|
||||
private ProductRequirementService requirementService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建产品需求")
|
||||
public CommonResult<Long> createRequirement(@Valid @RequestBody ProductRequirementSaveReqVO createReqVO) {
|
||||
return success(requirementService.createRequirement(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新产品需求")
|
||||
public CommonResult<Boolean> updateRequirement(@Valid @RequestBody ProductRequirementUpdateReqVO updateReqVO) {
|
||||
requirementService.updateRequirement(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获取需求详情")
|
||||
@Parameter(name = "id", description = "需求编号", required = true, example = "1024")
|
||||
@Parameter(name = "productId", description = "产品编号", required = true, example = "1024")
|
||||
public CommonResult<ProductRequirementRespVO> getRequirement(@RequestParam("id") Long id,
|
||||
@RequestParam("productId") Long productId) {
|
||||
return success(requirementService.getRequirement(id, productId));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获取需求分页列表")
|
||||
public CommonResult<PageResult<ProductRequirementRespVO>> getRequirementPage(@Valid ProductRequirementPageReqVO pageReqVO) {
|
||||
return success(requirementService.getRequirementPage(pageReqVO));
|
||||
}
|
||||
|
||||
@GetMapping("/tree")
|
||||
@Operation(summary = "获取需求树分页列表")
|
||||
public CommonResult<PageResult<ProductRequirementRespVO>> getRequirementTree(@Valid ProductRequirementPageReqVO pageReqVO) {
|
||||
return success(requirementService.getRequirementTree(pageReqVO));
|
||||
}
|
||||
|
||||
@GetMapping("/dashboard")
|
||||
@Operation(summary = "获取产品需求概览数据")
|
||||
@Parameter(name = "productId", description = "产品编号", required = true, example = "1024")
|
||||
public CommonResult<ProductRequirementDashboardRespVO> getRequirementDashboard(@RequestParam("productId") Long productId) {
|
||||
return success(requirementService.getRequirementDashboard(productId));
|
||||
}
|
||||
|
||||
@PostMapping("/change-status")
|
||||
@Operation(summary = "变更需求状态")
|
||||
public CommonResult<Boolean> changeRequirementStatus(@Valid @RequestBody ProductRequirementStatusActionReqVO reqVO) {
|
||||
requirementService.changeRequirementStatus(reqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@Operation(summary = "删除产品需求")
|
||||
public CommonResult<Boolean> deleteRequirement(@Valid @RequestBody ProductRequirementDeleteReqVO reqVO) {
|
||||
requirementService.deleteRequirement(reqVO.getId(), reqVO.getProductId());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/split")
|
||||
@Operation(summary = "拆分产品需求")
|
||||
public CommonResult<Long> splitRequirement(@Valid @RequestBody ProductRequirementSplitReqVO reqVO) {
|
||||
return success(requirementService.splitRequirement(reqVO));
|
||||
}
|
||||
|
||||
@PostMapping("/close")
|
||||
@Operation(summary = "关闭产品需求")
|
||||
public CommonResult<Boolean> closeRequirement(@Valid @RequestBody ProductRequirementCloseReqVO reqVO) {
|
||||
requirementService.closeRequirement(reqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/allowed-transitions")
|
||||
@Operation(summary = "获取需求可执行的状态动作列表")
|
||||
@Parameter(name = "requirementId", description = "需求编号", required = true, example = "1024")
|
||||
@Parameter(name = "productId", description = "产品编号", required = true, example = "1024")
|
||||
public CommonResult<List<ProductRequirementStatusTransitionRespVO>> getAllowedTransitions(
|
||||
@RequestParam("requirementId") Long requirementId,
|
||||
@RequestParam("productId") Long productId) {
|
||||
return success(requirementService.getAllowedTransitions(requirementId, productId));
|
||||
}
|
||||
|
||||
@PostMapping("/allowed-transitions/batch")
|
||||
@Operation(summary = "批量获取需求可执行的状态动作列表")
|
||||
public CommonResult<List<ProductRequirementAllowedTransitionBatchRespVO>> getAllowedTransitionsBatch(
|
||||
@Valid @RequestBody ProductRequirementBatchReqVO reqVO) {
|
||||
return success(requirementService.getAllowedTransitionsBatch(reqVO));
|
||||
}
|
||||
|
||||
@GetMapping("/has-dispatched")
|
||||
@Operation(summary = "判断产品需求是否已分流生成项目需求")
|
||||
@Parameter(name = "requirementId", description = "需求编号", required = true, example = "1024")
|
||||
@Parameter(name = "productId", description = "产品编号", required = true, example = "1024")
|
||||
public CommonResult<Boolean> hasDispatchedProjectRequirement(
|
||||
@RequestParam("requirementId") Long requirementId,
|
||||
@RequestParam("productId") Long productId) {
|
||||
return success(requirementService.hasDispatchedProjectRequirement(requirementId, productId));
|
||||
}
|
||||
|
||||
@PostMapping("/has-dispatched/batch")
|
||||
@Operation(summary = "批量判断产品需求是否已分流生成项目需求")
|
||||
public CommonResult<List<ProductRequirementHasDispatchedBatchRespVO>> hasDispatchedProjectRequirementBatch(
|
||||
@Valid @RequestBody ProductRequirementBatchReqVO reqVO) {
|
||||
return success(requirementService.hasDispatchedProjectRequirementBatch(reqVO));
|
||||
}
|
||||
|
||||
@GetMapping("/dispatched-project-link")
|
||||
@Operation(summary = "获取产品需求分流后对应的项目需求跳转链接")
|
||||
@Parameter(name = "productRequirementId", description = "产品需求编号", required = true, example = "1024")
|
||||
public CommonResult<ProductRequirementDispatchedProjectLinkRespVO> getDispatchedProjectLink(
|
||||
@RequestParam("productRequirementId") Long productRequirementId) {
|
||||
return success(requirementService.getDispatchedProjectLink(productRequirementId));
|
||||
}
|
||||
|
||||
@PostMapping("/module/create")
|
||||
@Operation(summary = "创建需求模块")
|
||||
public CommonResult<Long> createRequirementModule(@Valid @RequestBody ProductRequirementModuleReqVO reqVO) {
|
||||
return success(requirementService.createRequirementModule(reqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/module/update")
|
||||
@Operation(summary = "更新需求模块")
|
||||
public CommonResult<Boolean> updateRequirementModule(@Valid @RequestBody ProductRequirementModuleReqVO reqVO) {
|
||||
requirementService.updateRequirementModule(reqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/module/delete")
|
||||
@Operation(summary = "删除需求模块")
|
||||
public CommonResult<Boolean> deleteRequirementModule(@Valid @RequestBody ProductRequirementModuleDeleteReqVO reqVO) {
|
||||
requirementService.deleteRequirementModule(reqVO.getId(), reqVO.getProductId());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/module/tree")
|
||||
@Operation(summary = "获取需求模块树")
|
||||
@Parameter(name = "productId", description = "产品编号", required = true, example = "1024")
|
||||
public CommonResult<List<ProductRequirementModuleRespVO>> getRequirementModuleTree(@RequestParam("productId") Long productId) {
|
||||
return success(requirementService.getRequirementModuleTree(productId));
|
||||
}
|
||||
|
||||
@GetMapping("/status/dict")
|
||||
@Operation(summary = "获取需求所有状态字典")
|
||||
public CommonResult<List<ProductRequirementStatusDictRespVO>> getRequirementStatusDict() {
|
||||
return success(requirementService.getRequirementStatusDict());
|
||||
}
|
||||
|
||||
@GetMapping("/status/dict/terminal")
|
||||
@Operation(summary = "获取需求终止态状态字典")
|
||||
public CommonResult<List<ProductRequirementStatusDictRespVO>> getRequirementTerminalStatusDict() {
|
||||
return success(requirementService.getRequirementTerminalStatusDict());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product;
|
||||
|
||||
import com.njcn.rdms.framework.common.pojo.CommonResult;
|
||||
import com.njcn.rdms.framework.common.pojo.PageResult;
|
||||
import com.njcn.rdms.module.project.controller.admin.product.vo.activity.ProductActivityPageReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.product.vo.activity.ProductActivityRespVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.product.vo.activity.ProductActivityTimelinePageReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.product.vo.activity.ProductActivityTimelineRespVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.product.vo.setting.ProductSettingBaseInfoUpdateReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.product.vo.setting.ProductSettingRespVO;
|
||||
import com.njcn.rdms.module.project.service.product.ProductService;
|
||||
import com.njcn.rdms.module.project.service.product.ProductSettingService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import static com.njcn.rdms.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 产品设置")
|
||||
@RestController
|
||||
@RequestMapping("/project/product")
|
||||
@Validated
|
||||
public class ProductSettingController {
|
||||
|
||||
@Resource
|
||||
private ProductSettingService productSettingService;
|
||||
@Resource
|
||||
private ProductService productService;
|
||||
|
||||
@GetMapping("/{id}/settings")
|
||||
@Operation(summary = "获取产品设置")
|
||||
@Parameter(name = "id", description = "产品编号", required = true, example = "1024")
|
||||
public CommonResult<ProductSettingRespVO> getProductSettings(@PathVariable("id") Long id) {
|
||||
return success(productSettingService.getProductSettings(id));
|
||||
}
|
||||
|
||||
@GetMapping("/{id}/activities")
|
||||
@Operation(summary = "获取产品动态")
|
||||
@Parameter(name = "id", description = "产品编号", required = true, example = "1024")
|
||||
public CommonResult<PageResult<ProductActivityRespVO>> getProductActivities(@PathVariable("id") Long id,
|
||||
@Valid ProductActivityPageReqVO reqVO) {
|
||||
return success(productSettingService.getProductActivities(id, reqVO));
|
||||
}
|
||||
|
||||
@GetMapping("/{id}/activities/page")
|
||||
@Operation(summary = "获取产品动态时间线分页")
|
||||
@Parameter(name = "id", description = "产品编号", required = true, example = "1024")
|
||||
public CommonResult<PageResult<ProductActivityTimelineRespVO>> getProductActivityTimelinePage(
|
||||
@PathVariable("id") Long id, @Valid ProductActivityTimelinePageReqVO reqVO) {
|
||||
return success(productSettingService.getProductActivityTimelinePage(id, reqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/{id}/settings/base-info")
|
||||
@Operation(summary = "更新产品设置基础信息")
|
||||
@Parameter(name = "id", description = "产品编号", required = true, example = "1024")
|
||||
public CommonResult<Boolean> updateProductBaseInfo(@PathVariable("id") Long id,
|
||||
@Valid @RequestBody ProductSettingBaseInfoUpdateReqVO reqVO) {
|
||||
productService.updateProductBaseInfo(id, reqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.activity;
|
||||
|
||||
import com.njcn.rdms.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.njcn.rdms.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 产品动态分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ProductActivityPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "动态类型", example = "status")
|
||||
@Size(max = 16, message = "动态类型长度不能超过16个字符")
|
||||
private String activityType;
|
||||
|
||||
@Schema(description = "动作编码", example = "pause")
|
||||
@Size(max = 32, message = "动作编码长度不能超过32个字符")
|
||||
private String actionType;
|
||||
|
||||
@Schema(description = "操作时间区间", example = "[2026-04-01 00:00:00, 2026-04-30 23:59:59]")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] operateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.activity;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 产品动态 Response VO")
|
||||
@Data
|
||||
public class ProductActivityRespVO {
|
||||
|
||||
@Schema(description = "动态类型", example = "status")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "动作编码", example = "pause")
|
||||
private String actionType;
|
||||
|
||||
@Schema(description = "动作名称", example = "暂停")
|
||||
private String actionName;
|
||||
|
||||
@Schema(description = "原状态", example = "active")
|
||||
private String fromStatus;
|
||||
|
||||
@Schema(description = "目标状态", example = "paused")
|
||||
private String toStatus;
|
||||
|
||||
@Schema(description = "动作原因", example = "资源不足")
|
||||
private String reason;
|
||||
|
||||
@Schema(description = "操作人用户编号", example = "1024")
|
||||
private Long operatorUserId;
|
||||
|
||||
@Schema(description = "操作人名称", example = "张三")
|
||||
private String operatorName;
|
||||
|
||||
@Schema(description = "操作时间", example = "2026-04-21 12:00:00")
|
||||
private LocalDateTime operateTime;
|
||||
|
||||
@Schema(description = "展示摘要", example = "张三执行了【暂停】:资源不足")
|
||||
private String summary;
|
||||
|
||||
@Schema(description = "补充详情")
|
||||
private String details;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.activity;
|
||||
|
||||
import com.njcn.rdms.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import static com.njcn.rdms.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 产品动态时间线分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ProductActivityTimelinePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "动态类型", example = "status")
|
||||
@Size(max = 16, message = "动态类型长度不能超过16个字符")
|
||||
private String activityType;
|
||||
|
||||
@Schema(description = "动作编码数组")
|
||||
private List<@Size(max = 32, message = "动作编码长度不能超过32个字符") String> actionTypes;
|
||||
|
||||
@Schema(description = "开始时间", example = "2026-03-24 00:00:00")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@Schema(description = "结束时间", example = "2026-04-23 23:59:59")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime endTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.activity;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 产品动态时间线 Response VO")
|
||||
@Data
|
||||
public class ProductActivityTimelineRespVO {
|
||||
|
||||
@Schema(description = "动态唯一标识", example = "status:11")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "动态类型", example = "status")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "动作编码", example = "pause")
|
||||
private String actionType;
|
||||
|
||||
@Schema(description = "动作名称", example = "暂停")
|
||||
private String actionName;
|
||||
|
||||
@Schema(description = "操作人用户编号", example = "1024")
|
||||
private Long operatorUserId;
|
||||
|
||||
@Schema(description = "操作人名称", example = "张三")
|
||||
private String operatorName;
|
||||
|
||||
@Schema(description = "目标成员用户编号,仅 member 类型返回", example = "2043945809271713793")
|
||||
private Long targetUserId;
|
||||
|
||||
@Schema(description = "目标成员名称,仅 member 类型返回,读取缓存实时转换", example = "张三")
|
||||
private String targetUserName;
|
||||
|
||||
@Schema(description = "发生时间", example = "2026-04-21 12:00:00")
|
||||
private LocalDateTime occurredAt;
|
||||
|
||||
@Schema(description = "展示摘要", example = "张三执行了【暂停】:资源不足")
|
||||
private String summary;
|
||||
|
||||
@Schema(description = "动作原因", example = "资源不足")
|
||||
private String reason;
|
||||
|
||||
@Schema(description = "原状态", example = "active")
|
||||
private String fromStatus;
|
||||
|
||||
@Schema(description = "目标状态", example = "paused")
|
||||
private String toStatus;
|
||||
|
||||
@Schema(description = "补充详情")
|
||||
private String details;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.member;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 产品团队成员批量新增 Request VO")
|
||||
@Data
|
||||
public class ProductMemberBatchCreateReqVO {
|
||||
|
||||
/**
|
||||
* 批量上限沿用需求约定的 200,超过走 Bean Validation 直接 400 拦截。
|
||||
* 经理角色(product_manager)由 Service 兜底拦截,不在此体现。
|
||||
*/
|
||||
@Schema(description = "待新增的成员列表,长度 [1, 200]", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "请至少选择一名成员")
|
||||
@Size(max = 200, message = "单次批量加入成员不能超过 200 人")
|
||||
@Valid
|
||||
private List<Item> members;
|
||||
|
||||
@Schema(description = "批量新增成员项")
|
||||
@Data
|
||||
public static class Item {
|
||||
|
||||
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@NotNull(message = "用户编号不能为空")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "角色编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "3100000002001")
|
||||
@NotNull(message = "角色编号不能为空")
|
||||
private Long roleId;
|
||||
|
||||
@Schema(description = "备注", example = "本次批量加入")
|
||||
@Size(max = 500, message = "备注长度不能超过500个字符")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.member;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 产品团队成员批量移出 Request VO")
|
||||
@Data
|
||||
public class ProductMemberBatchInactiveReqVO {
|
||||
|
||||
/**
|
||||
* 批量上限沿用需求约定的 200,超过走 Bean Validation 直接 400 拦截。
|
||||
* 经理、已失效、重复 memberId 等业务规则由 Service 兜底,不在此体现。
|
||||
*/
|
||||
@Schema(description = "待移出的成员关系 ID 列表,长度 [1, 200]", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "请至少选择一名成员")
|
||||
@Size(max = 200, message = "单次批量移出成员不能超过 200 人")
|
||||
private List<Long> memberIds;
|
||||
|
||||
@Schema(description = "移出原因,单一字符串应用于本批所有成员", example = "组织架构调整,本批成员退出当前产品团队")
|
||||
@Size(max = 500, message = "移出原因长度不能超过500个字符")
|
||||
private String reason;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.member;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 产品团队成员移出 Request VO")
|
||||
@Data
|
||||
public class ProductMemberInactiveReqVO {
|
||||
|
||||
@Schema(description = "移出原因", example = "已退出当前产品协作")
|
||||
@Size(max = 500, message = "移出原因长度不能超过500个字符")
|
||||
private String reason;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.member;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.ArraySchema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 产品团队成员 Response VO")
|
||||
@Data
|
||||
public class ProductMemberRespVO {
|
||||
|
||||
@Schema(description = "团队关系编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "用户昵称", example = "小王")
|
||||
private String userNickname;
|
||||
|
||||
@Schema(description = "角色编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "3100000002001")
|
||||
private Long roleId;
|
||||
|
||||
@Schema(description = "角色名称", example = "产品经理")
|
||||
private String roleName;
|
||||
|
||||
@Schema(description = "角色编码", example = "product_manager")
|
||||
private String roleCode;
|
||||
|
||||
@Schema(description = "是否当前产品经理", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
|
||||
private Boolean managerFlag;
|
||||
|
||||
@Schema(description = "状态(0有效 1失效)", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "加入时间")
|
||||
private LocalDateTime joinedTime;
|
||||
|
||||
@Schema(description = "退出时间")
|
||||
private LocalDateTime leftTime;
|
||||
|
||||
@Schema(description = "备注", example = "当前负责需求收敛")
|
||||
private String remark;
|
||||
|
||||
@ArraySchema(schema = @Schema(description = "非主角色的中文名列表,多角色场景使用(如同人 manager + creator);单角色时为空数组", example = "产品创建者"))
|
||||
private List<String> additionalRoleNames = Collections.emptyList();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.member;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 产品团队成员新增 Request VO")
|
||||
@Data
|
||||
public class ProductMemberSaveReqVO {
|
||||
|
||||
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@NotNull(message = "用户编号不能为空")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "角色编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "3100000002001")
|
||||
@NotNull(message = "角色编号不能为空")
|
||||
private Long roleId;
|
||||
|
||||
@Schema(description = "备注", example = "来自产品团队维护")
|
||||
@Size(max = 500, message = "备注长度不能超过500个字符")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "原产品经理用户编号,仅切换产品经理时传递", example = "2048")
|
||||
private Long previousManagerUserId;
|
||||
|
||||
@Schema(description = "原产品经理交接后的角色编号,仅切换产品经理时传递", example = "3100000002002")
|
||||
private Long previousManagerRoleId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.member;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 产品团队成员更新 Request VO")
|
||||
@Data
|
||||
public class ProductMemberUpdateReqVO {
|
||||
|
||||
@Schema(description = "角色编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "3100000002002")
|
||||
@NotNull(message = "角色编号不能为空")
|
||||
private Long roleId;
|
||||
|
||||
@Schema(description = "备注", example = "调整为产品观察者")
|
||||
@Size(max = 500, message = "备注长度不能超过500个字符")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "变更原因", example = "职责调整")
|
||||
@Size(max = 500, message = "变更原因长度不能超过500个字符")
|
||||
private String reason;
|
||||
|
||||
@Schema(description = "原产品经理用户编号,仅切换产品经理时传递", example = "2048")
|
||||
private Long previousManagerUserId;
|
||||
|
||||
@Schema(description = "原产品经理交接后的角色编号,仅切换产品经理时传递", example = "3100000002002")
|
||||
private Long previousManagerRoleId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.product;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 产品上下文导航 Response VO")
|
||||
@Data
|
||||
public class ProductContextNavRespVO {
|
||||
|
||||
@Schema(description = "菜单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "3201")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "菜单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "概览")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "菜单路径", example = "/project/product/overview")
|
||||
private String path;
|
||||
|
||||
@Schema(description = "菜单图标", example = "mdi:view-dashboard-outline")
|
||||
private String icon;
|
||||
|
||||
@Schema(description = "显示顺序", example = "10")
|
||||
private Integer sort;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.product;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 产品上下文中的当前产品摘要 Response VO")
|
||||
@Data
|
||||
public class ProductContextProductRespVO {
|
||||
|
||||
@Schema(description = "产品编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "产品编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "CNPD2026001")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "产品方向字典值", requiredMode = Schema.RequiredMode.REQUIRED, example = "direction_value")
|
||||
private String directionCode;
|
||||
|
||||
@Schema(description = "产品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "RDMS产品平台")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "产品经理用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long managerUserId;
|
||||
|
||||
@Schema(description = "产品状态编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "active")
|
||||
private String statusCode;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.product;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 产品上下文 Response VO")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public class ProductContextRespVO {
|
||||
|
||||
@Schema(description = "当前产品摘要")
|
||||
private ProductContextProductRespVO currentProduct;
|
||||
|
||||
@Schema(description = "当前用户在该产品下的角色信息")
|
||||
private ProductContextRoleRespVO currentRole;
|
||||
|
||||
@Schema(description = "当前产品下可见导航集合")
|
||||
private List<ProductContextNavRespVO> navs;
|
||||
|
||||
@Schema(description = "当前产品下按钮权限码集合")
|
||||
private List<String> buttons;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.product;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.ArraySchema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 产品上下文中的当前角色 Response VO")
|
||||
@Data
|
||||
public class ProductContextRoleRespVO {
|
||||
|
||||
@Schema(description = "对象角色编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "3201")
|
||||
private Long roleId;
|
||||
|
||||
@Schema(description = "对象角色编码(主角色 code,权限判断兼容字段)", example = "product_manager")
|
||||
private String roleCode;
|
||||
|
||||
@Schema(description = "对象角色名称(主角色 name)", example = "产品经理")
|
||||
private String roleName;
|
||||
|
||||
@Schema(description = "是否游客上下文(隐式 observer 兜底时为 true)", requiredMode = Schema.RequiredMode.REQUIRED, example = "false")
|
||||
private Boolean guestFlag;
|
||||
|
||||
@ArraySchema(schema = @Schema(description = "非主角色的中文名列表,多角色场景使用;单角色时为空数组", example = "创建者"))
|
||||
private List<String> additionalRoleNames = Collections.emptyList();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.product;
|
||||
|
||||
import com.njcn.rdms.module.project.controller.admin.product.vo.member.ProductMemberSaveReqVO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 产品创建原子接口请求 VO(POST /project/product/create-with-team)。
|
||||
*
|
||||
* <p>由前端"产品两步向导"一次性提交:产品基础资料 + 初始团队成员。
|
||||
* 后端必须在同一事务内完成全部写入,任一步失败整体回滚。
|
||||
*/
|
||||
@Schema(description = "管理后台 - 产品创建(含初始团队)Request VO")
|
||||
@Data
|
||||
public class ProductCreateWithTeamReqVO {
|
||||
|
||||
/**
|
||||
* 产品基础资料。沿用 {@link ProductSaveReqVO} 字段约束(同 POST /create)。
|
||||
*/
|
||||
@Schema(description = "产品基础资料", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "产品基础资料不能为空")
|
||||
@Valid
|
||||
private ProductSaveReqVO product;
|
||||
|
||||
/**
|
||||
* 初始团队成员列表。
|
||||
*
|
||||
* <p>必须包含一条 {@code userId == product.managerUserId} 的产品经理成员,
|
||||
* 由前端在打开第 2 步时按 role code = {@code product_manager} 反查 roleId 后聚合提交。
|
||||
* 后端不再根据 {@code product.managerUserId} 自动追加经理成员。
|
||||
*/
|
||||
@Schema(description = "初始团队成员(含产品经理本人)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "初始团队成员不能为空")
|
||||
@Valid
|
||||
private List<ProductMemberSaveReqVO> members;
|
||||
|
||||
/**
|
||||
* 关心人 user ID 列表(创建时手动添加,可选)。
|
||||
*
|
||||
* <p>跟 members 是平行字段:watcher 不参与团队管理,只是被授予"产品关心人"角色(product_watcher)拿
|
||||
* 数据可见性。允许跟 members 的 user 重叠(多角色合法);后端按 (user, object, role) 三元组写入,
|
||||
* 重复跳过 / INACTIVE 复活,业务侧不强校验。
|
||||
*/
|
||||
@Schema(description = "关心人用户ID列表(可选,可与团队成员重叠)", example = "101,102")
|
||||
private List<Long> watcherUserIds;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.product;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 产品删除 Request VO")
|
||||
@Data
|
||||
public class ProductDeleteReqVO {
|
||||
|
||||
@Schema(description = "产品编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@NotNull(message = "产品编号不能为空")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "确认输入的产品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "RDMS产品平台")
|
||||
@NotBlank(message = "确认产品名称不能为空")
|
||||
@Size(max = 128, message = "确认产品名称长度不能超过128个字符")
|
||||
private String productName;
|
||||
|
||||
@Schema(description = "删除原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "产品录入错误")
|
||||
@NotBlank(message = "删除原因不能为空")
|
||||
@Size(max = 500, message = "删除原因长度不能超过500个字符")
|
||||
private String reason;
|
||||
|
||||
@Schema(description = "删除确认口令,当前固定输入 DELETE", requiredMode = Schema.RequiredMode.REQUIRED, example = "DELETE")
|
||||
@NotBlank(message = "删除确认口令不能为空")
|
||||
@Size(max = 32, message = "删除确认口令长度不能超过32个字符")
|
||||
private String confirmText;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.product;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Schema(description = "管理后台 - 产品入口页概览统计 Response VO")
|
||||
@Data
|
||||
public class ProductOverviewSummaryRespVO {
|
||||
|
||||
@Schema(description = "产品状态数量,按当前启用的产品状态模型返回")
|
||||
private Map<String, Long> statusCounts;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.product;
|
||||
|
||||
import com.njcn.rdms.framework.common.pojo.PageParam;
|
||||
import com.njcn.rdms.framework.dict.validation.InDict;
|
||||
import com.njcn.rdms.module.system.enums.DictTypeConstants;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.njcn.rdms.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 产品分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ProductPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "关键词,匹配产品编码或产品名称", example = "CNPD2026001")
|
||||
private String keyword;
|
||||
|
||||
@Schema(description = "产品方向字典值", example = "direction_value")
|
||||
@InDict(type = DictTypeConstants.OBJECT_DIRECTION)
|
||||
private String directionCode;
|
||||
|
||||
@Schema(description = "产品经理用户编号", example = "1024")
|
||||
private Long managerUserId;
|
||||
|
||||
@Schema(description = "产品状态编码", example = "active")
|
||||
@Size(max = 32, message = "产品状态编码长度不能超过32个字符")
|
||||
private String statusCode;
|
||||
|
||||
@Schema(description = "更新时间", example = "[2026-04-01 00:00:00, 2026-04-30 23:59:59]")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.product;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 产品 Response VO")
|
||||
@Data
|
||||
public class ProductRespVO {
|
||||
|
||||
@Schema(description = "产品编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "产品编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "CNPD2026001")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "产品方向字典值", requiredMode = Schema.RequiredMode.REQUIRED, example = "direction_value")
|
||||
private String directionCode;
|
||||
|
||||
@Schema(description = "产品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "RDMS产品平台")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "产品经理用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long managerUserId;
|
||||
|
||||
@Schema(description = "产品描述", example = "面向研发管理的一体化产品")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "产品状态编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "active")
|
||||
private String statusCode;
|
||||
|
||||
@Schema(description = "最近一次状态动作原因", example = "阶段性暂停")
|
||||
private String lastStatusReason;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.product;
|
||||
|
||||
import com.njcn.rdms.framework.dict.validation.InDict;
|
||||
import com.njcn.rdms.module.system.enums.DictTypeConstants;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 产品保存 Request VO")
|
||||
@Data
|
||||
public class ProductSaveReqVO {
|
||||
|
||||
@Schema(description = "产品编号", example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "产品编码,为空时由系统自动生成", example = "CNPD2026001")
|
||||
@Size(max = 64, message = "产品编码长度不能超过64个字符")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "产品方向字典值", requiredMode = Schema.RequiredMode.REQUIRED, example = "direction_value")
|
||||
@NotBlank(message = "产品方向不能为空")
|
||||
@Size(max = 32, message = "产品方向长度不能超过32个字符")
|
||||
@InDict(type = DictTypeConstants.OBJECT_DIRECTION)
|
||||
private String directionCode;
|
||||
|
||||
@Schema(description = "产品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "RDMS产品平台")
|
||||
@NotBlank(message = "产品名称不能为空")
|
||||
@Size(max = 128, message = "产品名称长度不能超过128个字符")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "产品经理用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@NotNull(message = "产品经理不能为空")
|
||||
private Long managerUserId;
|
||||
|
||||
@Schema(description = "产品描述", example = "面向研发管理的一体化产品")
|
||||
private String description;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.product;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 产品状态动作 Request VO")
|
||||
@Data
|
||||
public class ProductStatusActionReqVO {
|
||||
|
||||
@Schema(description = "产品编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@NotNull(message = "产品编号不能为空")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "动作编码,如 pause、resume、archive、abandon", requiredMode = Schema.RequiredMode.REQUIRED, example = "pause")
|
||||
@NotBlank(message = "动作编码不能为空")
|
||||
@Size(max = 32, message = "动作编码长度不能超过32个字符")
|
||||
private String actionCode;
|
||||
|
||||
@Schema(description = "动作原因;是否必填由状态流转配置决定", example = "当前阶段受环境限制暂停推进")
|
||||
@Size(max = 500, message = "动作原因长度不能超过500个字符")
|
||||
private String reason;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.requirement;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 产品需求批量可执行动作 Response VO")
|
||||
@Data
|
||||
public class ProductRequirementAllowedTransitionBatchRespVO {
|
||||
|
||||
@Schema(description = "需求编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long requirementId;
|
||||
|
||||
@Schema(description = "可执行动作列表", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private List<ProductRequirementStatusTransitionRespVO> transitions;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.requirement;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 产品需求批量查询 Request VO")
|
||||
@Data
|
||||
public class ProductRequirementBatchReqVO {
|
||||
|
||||
@Schema(description = "产品编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@NotNull(message = "产品编号不能为空")
|
||||
private Long productId;
|
||||
|
||||
@Schema(description = "需求编号列表", requiredMode = Schema.RequiredMode.REQUIRED, example = "[1, 2, 3]")
|
||||
@NotEmpty(message = "需求编号列表不能为空")
|
||||
private List<Long> requirementIds;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.requirement;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 管理后台 - 产品需求关闭 Request VO
|
||||
*/
|
||||
@Schema(description = "管理后台 - 产品需求关闭 Request VO")
|
||||
@Data
|
||||
public class ProductRequirementCloseReqVO {
|
||||
|
||||
@Schema(description = "需求编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@NotNull(message = "需求编号不能为空")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "所属产品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@NotNull(message = "产品ID不能为空")
|
||||
private Long productId;
|
||||
|
||||
@Schema(description = "关闭原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "需求已完成验收")
|
||||
@NotBlank(message = "关闭原因不能为空")
|
||||
@Size(max = 255, message = "关闭原因长度不能超过255个字符")
|
||||
private String reason;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.requirement;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 管理后台 - 产品需求概览最近变化 Response VO
|
||||
*/
|
||||
@Schema(description = "管理后台 - 产品需求概览最近变化 Response VO")
|
||||
@Data
|
||||
public class ProductRequirementDashboardRecentChangeRespVO {
|
||||
|
||||
@Schema(description = "前端列表唯一键", requiredMode = Schema.RequiredMode.REQUIRED, example = "requirement:create:2048")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "产品需求ID", example = "1003")
|
||||
private Long requirementId;
|
||||
|
||||
@Schema(description = "需求标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "补充对象首页需求池统计接口")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "动作类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "create")
|
||||
private String actionType;
|
||||
|
||||
@Schema(description = "动作名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "需求新增")
|
||||
private String actionLabel;
|
||||
|
||||
@Schema(description = "展示内容", requiredMode = Schema.RequiredMode.REQUIRED, example = "当前状态:待评审")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "发生时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime occurredAt;
|
||||
|
||||
@Schema(description = "操作人用户ID", example = "1024")
|
||||
private Long operatorUserId;
|
||||
|
||||
@Schema(description = "操作人名称快照", example = "张三")
|
||||
private String operatorName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.requirement;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 管理后台 - 产品需求概览 Response VO
|
||||
*/
|
||||
@Schema(description = "管理后台 - 产品需求概览 Response VO")
|
||||
@Data
|
||||
public class ProductRequirementDashboardRespVO {
|
||||
|
||||
@Schema(description = "需求池统计")
|
||||
private ProductRequirementDashboardSummaryRespVO summary;
|
||||
|
||||
@Schema(description = "需求池最近重要变化")
|
||||
private List<ProductRequirementDashboardRecentChangeRespVO> recentChanges;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.requirement;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 管理后台 - 产品需求概览统计 Response VO
|
||||
*/
|
||||
@Schema(description = "管理后台 - 产品需求概览统计 Response VO")
|
||||
@Data
|
||||
public class ProductRequirementDashboardSummaryRespVO {
|
||||
|
||||
@Schema(description = "需求总量,包括根需求和子需求", requiredMode = Schema.RequiredMode.REQUIRED, example = "18")
|
||||
private Long total;
|
||||
|
||||
@Schema(description = "待处理需求数", requiredMode = Schema.RequiredMode.REQUIRED, example = "3")
|
||||
private Long todo;
|
||||
|
||||
@Schema(description = "待认领需求数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Long pendingClaim;
|
||||
|
||||
@Schema(description = "待评审需求数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Long pendingReview;
|
||||
|
||||
@Schema(description = "待指派需求数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Long pendingDispatch;
|
||||
|
||||
@Schema(description = "完成需求数,已验收和已关闭计入完成", requiredMode = Schema.RequiredMode.REQUIRED, example = "6")
|
||||
private Long completed;
|
||||
|
||||
@Schema(description = "完成率,四舍五入后的百分比整数", requiredMode = Schema.RequiredMode.REQUIRED, example = "33")
|
||||
private Integer completionRate;
|
||||
|
||||
@Schema(description = "高优先待处理需求数,P0/P1 且处于待处理状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
private Long highPriorityTodo;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.requirement;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 管理后台 - 产品需求删除 Request VO
|
||||
*/
|
||||
@Schema(description = "管理后台 - 产品需求删除 Request VO")
|
||||
@Data
|
||||
public class ProductRequirementDeleteReqVO {
|
||||
@Schema(description = "需求ID(编辑时传入)", example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "所属产品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@NotNull(message = "产品ID不能为空")
|
||||
private Long productId;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.requirement;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 管理后台 - 产品需求指派后项目需求跳转链接 Response VO
|
||||
*/
|
||||
@Schema(description = "管理后台 - 产品需求指派后项目需求跳转链接 Response VO")
|
||||
@Data
|
||||
public class ProductRequirementDispatchedProjectLinkRespVO {
|
||||
|
||||
@Schema(description = "项目需求ID", example = "10086")
|
||||
private Long projectRequirementId;
|
||||
|
||||
@Schema(description = "关联项目ID", example = "8888")
|
||||
private Long projectId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.requirement;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 产品需求批量指派状态 Response VO")
|
||||
@Data
|
||||
public class ProductRequirementHasDispatchedBatchRespVO {
|
||||
|
||||
@Schema(description = "需求编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long requirementId;
|
||||
|
||||
@Schema(description = "是否已指派生成项目需求", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
|
||||
private Boolean hasDispatched;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.requirement;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 管理后台 - 产品需求模块删除 Request VO
|
||||
*/
|
||||
@Schema(description = "管理后台 - 产品需求模块删除 Request VO")
|
||||
@Data
|
||||
public class ProductRequirementModuleDeleteReqVO {
|
||||
@Schema(description = "模块ID(编辑时传入)", example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "所属产品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@NotNull(message = "产品ID不能为空")
|
||||
private Long productId;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.requirement;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 管理后台 - 产品需求模块保存 Request VO
|
||||
*/
|
||||
@Schema(description = "管理后台 - 产品需求模块保存 Request VO")
|
||||
@Data
|
||||
public class ProductRequirementModuleReqVO {
|
||||
|
||||
@Schema(description = "模块ID(编辑时传入)", example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "所属产品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@NotNull(message = "产品ID不能为空")
|
||||
private Long productId;
|
||||
|
||||
@Schema(description = "父模块ID(0表示顶级)", example = "0")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "模块名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "核心功能")
|
||||
@NotBlank(message = "模块名称不能为空")
|
||||
@Size(max = 100, message = "模块名称长度不能超过100个字符")
|
||||
private String moduleName;
|
||||
|
||||
@Schema(description = "模块说明", example = "产品核心功能模块")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "图标", example = "icon-function")
|
||||
private String icon;
|
||||
|
||||
@Schema(description = "排序值", example = "0")
|
||||
private Integer sort;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.requirement;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 管理后台 - 产品需求模块 Response VO
|
||||
*/
|
||||
@Schema(description = "管理后台 - 产品需求模块 Response VO")
|
||||
@Data
|
||||
public class ProductRequirementModuleRespVO {
|
||||
|
||||
@Schema(description = "模块ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "父模块ID(0表示顶级)", example = "0")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "所属产品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long productId;
|
||||
|
||||
@Schema(description = "模块名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "核心功能")
|
||||
private String moduleName;
|
||||
|
||||
@Schema(description = "模块说明", example = "产品核心功能模块")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "图标", example = "icon-function")
|
||||
private String icon;
|
||||
|
||||
@Schema(description = "排序值", example = "0")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "子模块列表")
|
||||
private List<ProductRequirementModuleRespVO> children;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.requirement;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.njcn.rdms.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 管理后台 - 产品需求分页 Request VO
|
||||
*/
|
||||
@Schema(description = "管理后台 - 产品需求分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ProductRequirementPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "所属产品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long productId;
|
||||
|
||||
@Schema(description = "所属模块ID", example = "1024")
|
||||
private Long moduleId;
|
||||
|
||||
@Schema(description = "所属模块ID列表(包含子模块,用于IN查询)", example = "[1024, 1025]")
|
||||
private List<Long> moduleIds;
|
||||
|
||||
@Schema(description = "父需求ID(查询子需求时使用)", example = "1024")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "标题关键词", example = "模块")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "需求分类字典值", example = "function")
|
||||
private String category;
|
||||
|
||||
@Schema(description = "优先级(0低 1中 2高 3紧急)", example = "1")
|
||||
private Integer priority;
|
||||
|
||||
@Schema(description = "状态编码", example = "pending_dispatch")
|
||||
private String statusCode;
|
||||
|
||||
@Schema(description = "当前处理人用户编号", example = "1024")
|
||||
private Long currentHandlerUserId;
|
||||
|
||||
@Schema(description = "来源类型(manual:手工新增, work_order:工单流转)", example = "manual")
|
||||
private String sourceType;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.requirement;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.njcn.rdms.module.project.dal.dataobject.attachment.AttachmentItem;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 管理后台 - 产品需求 Response VO
|
||||
*/
|
||||
@Schema(description = "管理后台 - 产品需求 Response VO")
|
||||
@Data
|
||||
public class ProductRequirementRespVO {
|
||||
|
||||
@Schema(description = "需求ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "父需求ID,0 表示顶级需求", example = "0")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "所属模块ID", example = "1024")
|
||||
private Long moduleId;
|
||||
|
||||
@Schema(description = "是否需要评审,0不需要,1需要", example = "0")
|
||||
private Integer reviewRequired;
|
||||
|
||||
@Schema(description = "需求标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "支持需求模块化管理")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "需求描述,支持富文本", example = "<p>详细描述需求内容</p>")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "需求分类字典值", requiredMode = Schema.RequiredMode.REQUIRED, example = "function")
|
||||
private String category;
|
||||
|
||||
@Schema(description = "需求分类名称", example = "功能需求")
|
||||
private String categoryName;
|
||||
|
||||
@Schema(description = "需求来源类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "manual")
|
||||
private String sourceType;
|
||||
|
||||
@Schema(description = "来源业务ID", example = "1024")
|
||||
private Long sourceBizId;
|
||||
|
||||
@Schema(description = "优先级", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Integer priority;
|
||||
|
||||
@Schema(description = "优先级名称", example = "中")
|
||||
private String priorityName;
|
||||
|
||||
@Schema(description = "当前状态编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "pending_dispatch")
|
||||
private String statusCode;
|
||||
|
||||
@Schema(description = "当前状态名称", example = "待指派")
|
||||
private String statusName;
|
||||
|
||||
@Schema(description = "最近一次状态动作原因", example = "需求全部结束")
|
||||
private String lastStatusReason;
|
||||
|
||||
@Schema(description = "提出人用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long proposerId;
|
||||
|
||||
@Schema(description = "提出人用户姓名", example = "张三")
|
||||
private String proposerNickname;
|
||||
|
||||
@Schema(description = "预期完成时间", example = "2026-05-31")
|
||||
private LocalDate expectedTime;
|
||||
|
||||
@Schema(description = "当前处理人用户ID", example = "1024")
|
||||
private Long currentHandlerUserId;
|
||||
|
||||
@Schema(description = "当前处理人姓名", example = "李四")
|
||||
private String currentHandlerUserNickname;
|
||||
|
||||
@Schema(description = "默认实现项目编号", example = "1024")
|
||||
private Long implementProjectId;
|
||||
|
||||
@Schema(description = "实现项目名称", example = "NPQS-10086")
|
||||
private String implementProjectName;
|
||||
|
||||
@Schema(description = "排序值", example = "0")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@Schema(description = "附件列表")
|
||||
private List<AttachmentItem> attachments;
|
||||
|
||||
@Schema(description = "子需求列表,树形结构")
|
||||
private List<ProductRequirementRespVO> children;
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.requirement;
|
||||
|
||||
import com.njcn.rdms.module.project.dal.dataobject.attachment.AttachmentItem;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 管理后台 - 产品需求保存 Request VO
|
||||
*/
|
||||
@Schema(description = "管理后台 - 产品需求保存 Request VO")
|
||||
@Data
|
||||
public class ProductRequirementSaveReqVO {
|
||||
|
||||
@Schema(description = "需求ID", example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "所属产品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@NotNull(message = "产品编号不能为空")
|
||||
private Long productId;
|
||||
|
||||
@Schema(description = "所属模块ID,为空时归入全部需求模块", example = "1024")
|
||||
private Long moduleId;
|
||||
|
||||
@Schema(description = "是否需要评审,0不需要,1需要", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
|
||||
@NotNull(message = "是否需要评审不能为空")
|
||||
private Integer reviewRequired;
|
||||
|
||||
@Schema(description = "需求标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "支持需求模块化管理")
|
||||
@NotBlank(message = "需求标题不能为空")
|
||||
@Size(max = 200, message = "需求标题长度不能超过200个字符")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "需求描述,支持富文本", example = "<p>详细描述需求内容</p>")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "需求分类字典值", requiredMode = Schema.RequiredMode.REQUIRED, example = "function")
|
||||
@NotBlank(message = "需求分类不能为空")
|
||||
@Size(max = 64, message = "需求分类长度不能超过64个字符")
|
||||
private String category;
|
||||
|
||||
@Schema(description = "优先级,0低、1中、2高、3紧急", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "优先级不能为空")
|
||||
private Integer priority;
|
||||
|
||||
@Schema(description = "提出人用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@NotNull(message = "提出人不能为空")
|
||||
private Long proposerId;
|
||||
|
||||
@Schema(description = "提出人姓名", example = "张三")
|
||||
private String proposerNickname;
|
||||
|
||||
@Schema(description = "预期完成时间", example = "2026-05-31")
|
||||
private LocalDate expectedTime;
|
||||
|
||||
@Schema(description = "当前处理人用户ID", example = "1024")
|
||||
private Long currentHandlerUserId;
|
||||
|
||||
@Schema(description = "当前处理人姓名", example = "李四")
|
||||
private String currentHandlerUserNickname;
|
||||
|
||||
@Schema(description = "默认实现项目编号", example = "1024")
|
||||
private Long implementProjectId;
|
||||
|
||||
@Schema(description = "排序值,越小越靠前", example = "0")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "附件列表")
|
||||
@Valid
|
||||
private List<AttachmentItem> attachments;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.requirement;
|
||||
|
||||
import com.njcn.rdms.module.project.dal.dataobject.attachment.AttachmentItem;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 管理后台 - 产品需求拆分 Request VO
|
||||
*/
|
||||
@Schema(description = "管理后台 - 产品需求拆分 Request VO")
|
||||
@Data
|
||||
public class ProductRequirementSplitReqVO {
|
||||
|
||||
@Schema(description = "父需求ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@NotNull(message = "父需求编号不能为空")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "所属产品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@NotNull(message = "产品编号不能为空")
|
||||
private Long productId;
|
||||
|
||||
@Schema(description = "所属模块ID,为空时归入全部需求模块", example = "1024")
|
||||
private Long moduleId;
|
||||
|
||||
@Schema(description = "是否需要评审,0不需要,1需要", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
|
||||
@NotNull(message = "是否需要评审不能为空")
|
||||
private Integer reviewRequired;
|
||||
|
||||
@Schema(description = "需求标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "支持需求模块化管理")
|
||||
@NotBlank(message = "需求标题不能为空")
|
||||
@Size(max = 200, message = "需求标题长度不能超过200个字符")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "需求描述,支持富文本", example = "<p>详细描述需求内容</p>")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "需求分类字典值", requiredMode = Schema.RequiredMode.REQUIRED, example = "function")
|
||||
@NotBlank(message = "需求分类不能为空")
|
||||
@Size(max = 64, message = "需求分类长度不能超过64个字符")
|
||||
private String category;
|
||||
|
||||
@Schema(description = "优先级,0低、1中、2高、3紧急", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "优先级不能为空")
|
||||
private Integer priority;
|
||||
|
||||
@Schema(description = "提出人用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@NotNull(message = "提出人不能为空")
|
||||
private Long proposerId;
|
||||
|
||||
@Schema(description = "提出人姓名", example = "张三")
|
||||
private String proposerNickname;
|
||||
|
||||
@Schema(description = "预期完成时间", example = "2026-05-31")
|
||||
private LocalDate expectedTime;
|
||||
|
||||
@Schema(description = "当前处理人用户ID", example = "1024")
|
||||
private Long currentHandlerUserId;
|
||||
|
||||
@Schema(description = "当前处理人姓名", example = "李四")
|
||||
private String currentHandlerUserNickname;
|
||||
|
||||
@Schema(description = "默认实现项目编号", example = "1024")
|
||||
private Long implementProjectId;
|
||||
|
||||
@Schema(description = "排序值,越小越靠前", example = "0")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "附件列表")
|
||||
@Valid
|
||||
private List<AttachmentItem> attachments;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.requirement;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 管理后台 - 产品需求状态变更 Request VO
|
||||
* 注意:需求不直接关联产品,通过模块间接关联
|
||||
*/
|
||||
@Schema(description = "管理后台 - 产品需求状态变更 Request VO")
|
||||
@Data
|
||||
public class ProductRequirementStatusActionReqVO {
|
||||
|
||||
@Schema(description = "需求ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@NotNull(message = "需求ID不能为空")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "所属产品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@NotNull(message = "产品编号不能为空")
|
||||
private Long productId;
|
||||
|
||||
@Schema(description = "动作编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "dispatch")
|
||||
@NotBlank(message = "动作编码不能为空")
|
||||
@Size(max = 32, message = "动作编码长度不能超过32个字符")
|
||||
private String actionCode;
|
||||
|
||||
@Schema(description = "状态变更原因", example = "需求全部完成")
|
||||
private String reason;
|
||||
|
||||
@Schema(description = "关联项目编号(dispatch动作时可选)", example = "1024")
|
||||
private Long implementProjectId;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.requirement;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 管理后台 - 产品需求状态字典 Response VO
|
||||
*/
|
||||
@Schema(description = "管理后台 - 产品需求状态字典 Response VO")
|
||||
@Data
|
||||
public class ProductRequirementStatusDictRespVO {
|
||||
|
||||
@Schema(description = "状态编码", example = "pending_claim")
|
||||
private String statusCode;
|
||||
|
||||
@Schema(description = "状态名称", example = "待认领")
|
||||
private String statusName;
|
||||
|
||||
@Schema(description = "排序值", example = "1")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "是否初始状态", example = "true")
|
||||
private Boolean initialFlag;
|
||||
|
||||
@Schema(description = "是否终态", example = "false")
|
||||
private Boolean terminalFlag;
|
||||
|
||||
@Schema(description = "是否允许编辑", example = "true")
|
||||
private Boolean allowEdit;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.requirement;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 管理后台 - 产品需求状态可执行动作 Response VO
|
||||
*/
|
||||
@Schema(description = "管理后台 - 产品需求状态可执行动作 Response VO")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public class ProductRequirementStatusTransitionRespVO {
|
||||
|
||||
@Schema(description = "动作编码", example = "dispatch")
|
||||
private String actionCode;
|
||||
|
||||
@Schema(description = "动作名称", example = "明确指派/拆分")
|
||||
private String actionName;
|
||||
|
||||
@Schema(description = "目标状态编码", example = "implementing")
|
||||
private String toStatusCode;
|
||||
|
||||
@Schema(description = "目标状态名称", example = "实施中")
|
||||
private String toStatusName;
|
||||
|
||||
@Schema(description = "是否必须填写原因", example = "false")
|
||||
private Boolean needReason;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.requirement;
|
||||
|
||||
import com.njcn.rdms.module.project.dal.dataobject.attachment.AttachmentItem;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 管理后台 - 产品需求编辑 Request VO
|
||||
*/
|
||||
@Schema(description = "管理后台 - 产品需求编辑 Request VO")
|
||||
@Data
|
||||
public class ProductRequirementUpdateReqVO {
|
||||
|
||||
@Schema(description = "需求ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@NotNull(message = "需求ID不能为空")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "所属产品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@NotNull(message = "产品ID不能为空")
|
||||
private Long productId;
|
||||
|
||||
@Schema(description = "所属模块ID,为空时归入全部需求模块", example = "1024")
|
||||
private Long moduleId;
|
||||
|
||||
@Schema(description = "是否需要评审,0不需要,1需要", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
|
||||
@NotNull(message = "是否需要评审不能为空")
|
||||
private Integer reviewRequired;
|
||||
|
||||
@Schema(description = "需求标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "支持需求模块化管理")
|
||||
@NotBlank(message = "需求标题不能为空")
|
||||
@Size(max = 200, message = "需求标题长度不能超过200个字符")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "需求描述,支持富文本", example = "<p>详细描述需求内容</p>")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "需求分类字典值", requiredMode = Schema.RequiredMode.REQUIRED, example = "function")
|
||||
@NotBlank(message = "需求分类不能为空")
|
||||
@Size(max = 64, message = "需求分类长度不能超过64个字符")
|
||||
private String category;
|
||||
|
||||
@Schema(description = "优先级,0低、1中、2高、3紧急", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "优先级不能为空")
|
||||
private Integer priority;
|
||||
|
||||
@Schema(description = "提出人用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@NotNull(message = "提出人不能为空")
|
||||
private Long proposerId;
|
||||
|
||||
@Schema(description = "提出人姓名", example = "张三")
|
||||
private String proposerNickname;
|
||||
|
||||
@Schema(description = "预期完成时间", example = "2026-05-31")
|
||||
private LocalDate expectedTime;
|
||||
|
||||
@Schema(description = "当前处理人用户ID", example = "1024")
|
||||
private Long currentHandlerUserId;
|
||||
|
||||
@Schema(description = "当前处理人姓名", example = "李四")
|
||||
private String currentHandlerUserNickname;
|
||||
|
||||
@Schema(description = "默认实现项目编号", example = "1024")
|
||||
private Long implementProjectId;
|
||||
|
||||
@Schema(description = "排序值,越小越靠前", example = "0")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "附件列表")
|
||||
@Valid
|
||||
private List<AttachmentItem> attachments;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.setting;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Schema(description = "管理后台 - 产品设置生命周期动作 Response VO")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public class ProductSettingActionRespVO {
|
||||
|
||||
@Schema(description = "动作编码", example = "archive")
|
||||
private String actionCode;
|
||||
|
||||
@Schema(description = "动作名称", example = "归档")
|
||||
private String actionName;
|
||||
|
||||
@Schema(description = "是否必须填写原因", example = "true")
|
||||
private Boolean needReason;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.setting;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Schema(description = "管理后台 - 产品设置基础信息 Response VO")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public class ProductSettingBaseInfoRespVO {
|
||||
|
||||
@Schema(description = "产品编号", example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "产品编码", example = "CNPD2026001")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "产品方向字典值", example = "direction_value")
|
||||
private String directionCode;
|
||||
|
||||
@Schema(description = "产品名称", example = "统一交付平台")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "产品经理用户编号", example = "10001")
|
||||
private Long managerUserId;
|
||||
|
||||
@Schema(description = "产品经理昵称", example = "张三")
|
||||
private String managerUserNickname;
|
||||
|
||||
@Schema(description = "产品描述", example = "产品描述")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "产品状态编码", example = "active")
|
||||
private String statusCode;
|
||||
|
||||
@Schema(description = "最近一次状态动作原因", example = "恢复正常推进")
|
||||
private String lastStatusReason;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.setting;
|
||||
|
||||
import com.njcn.rdms.framework.dict.validation.InDict;
|
||||
import com.njcn.rdms.module.system.enums.DictTypeConstants;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 产品设置基础信息更新 Request VO")
|
||||
@Data
|
||||
public class ProductSettingBaseInfoUpdateReqVO {
|
||||
|
||||
@Schema(description = "产品方向字典值", requiredMode = Schema.RequiredMode.REQUIRED, example = "direction_value")
|
||||
@NotBlank(message = "产品方向不能为空")
|
||||
@Size(max = 32, message = "产品方向长度不能超过32个字符")
|
||||
@InDict(type = DictTypeConstants.OBJECT_DIRECTION)
|
||||
private String directionCode;
|
||||
|
||||
@Schema(description = "产品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "RDMS产品平台")
|
||||
@NotBlank(message = "产品名称不能为空")
|
||||
@Size(max = 128, message = "产品名称长度不能超过128个字符")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "产品描述", example = "面向研发管理的一体化产品")
|
||||
private String description;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.setting;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 产品设置生命周期 Response VO")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public class ProductSettingLifecycleRespVO {
|
||||
|
||||
@Schema(description = "当前状态编码", example = "active")
|
||||
private String statusCode;
|
||||
|
||||
@Schema(description = "当前状态名称", example = "启用")
|
||||
private String statusName;
|
||||
|
||||
@Schema(description = "最近一次状态动作原因", example = "恢复正常推进")
|
||||
private String lastStatusReason;
|
||||
|
||||
@Schema(description = "是否终态", example = "false")
|
||||
private Boolean terminal;
|
||||
|
||||
@Schema(description = "是否允许编辑", example = "true")
|
||||
private Boolean allowEdit;
|
||||
|
||||
@Schema(description = "当前状态可执行动作")
|
||||
private List<ProductSettingActionRespVO> availableActions;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.product.vo.setting;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Schema(description = "管理后台 - 产品设置 Response VO")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public class ProductSettingRespVO {
|
||||
|
||||
@Schema(description = "产品基础信息")
|
||||
private ProductSettingBaseInfoRespVO baseInfo;
|
||||
|
||||
@Schema(description = "产品生命周期信息")
|
||||
private ProductSettingLifecycleRespVO lifecycle;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.project;
|
||||
|
||||
import com.njcn.rdms.framework.common.pojo.CommonResult;
|
||||
import com.njcn.rdms.framework.common.pojo.PageResult;
|
||||
import com.njcn.rdms.framework.common.util.object.BeanUtils;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.vo.project.ProjectContextRespVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.vo.project.ProjectCreateWithTeamReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.vo.project.ProjectDeleteReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.vo.project.ProjectOverviewSummaryRespVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.vo.project.ProjectPageReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.vo.project.ProjectRespVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.vo.project.ProjectSaveReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.vo.project.ProjectStatusActionReqVO;
|
||||
import com.njcn.rdms.module.project.dal.dataobject.project.ProjectDO;
|
||||
import com.njcn.rdms.module.project.service.project.ProjectService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.njcn.rdms.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 项目管理")
|
||||
@RestController
|
||||
@RequestMapping("/project/project")
|
||||
@Validated
|
||||
public class ProjectController {
|
||||
|
||||
@Resource
|
||||
private ProjectService projectService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建项目")
|
||||
@PreAuthorize("@ss.hasPermission('project:project:create')")
|
||||
public CommonResult<Long> createProject(@Valid @RequestBody ProjectSaveReqVO createReqVO) {
|
||||
return success(projectService.createProject(createReqVO));
|
||||
}
|
||||
|
||||
@PostMapping("/create-with-team")
|
||||
@Operation(summary = "创建项目并初始化团队(原子接口)")
|
||||
@PreAuthorize("@ss.hasPermission('project:project:create')")
|
||||
public CommonResult<Long> createProjectWithTeam(@Valid @RequestBody ProjectCreateWithTeamReqVO reqVO) {
|
||||
return success(projectService.createProjectWithTeam(reqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新项目")
|
||||
public CommonResult<Boolean> updateProject(@Valid @RequestBody ProjectSaveReqVO updateReqVO) {
|
||||
projectService.updateProject(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获取项目详情")
|
||||
@Parameter(name = "id", description = "项目编号", required = true, example = "1024")
|
||||
public CommonResult<ProjectRespVO> getProject(@RequestParam("id") Long id) {
|
||||
return success(projectService.getProjectDetail(id));
|
||||
}
|
||||
|
||||
@GetMapping("/{id}/context")
|
||||
@Operation(summary = "获取项目上下文")
|
||||
@Parameter(name = "id", description = "项目编号", required = true, example = "1024")
|
||||
public CommonResult<ProjectContextRespVO> getProjectContext(@PathVariable("id") Long id) {
|
||||
return success(projectService.getProjectContext(id));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获取项目分页")
|
||||
public CommonResult<PageResult<ProjectRespVO>> getProjectPage(@Valid ProjectPageReqVO pageReqVO) {
|
||||
PageResult<ProjectDO> pageResult = projectService.getProjectPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ProjectRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/list-by-product")
|
||||
@Operation(summary = "根据产品编号获取该产品下的全部项目")
|
||||
@Parameter(name = "productId", description = "产品编号", required = true, example = "1024")
|
||||
public CommonResult<List<ProjectRespVO>> getProjectListByProductId(@RequestParam("productId") Long productId) {
|
||||
return success(projectService.getProjectListByProductId(productId));
|
||||
}
|
||||
|
||||
@GetMapping("/overview-summary")
|
||||
@Operation(summary = "获取项目入口页概览统计")
|
||||
public CommonResult<ProjectOverviewSummaryRespVO> getProjectOverviewSummary() {
|
||||
return success(projectService.getProjectOverviewSummary());
|
||||
}
|
||||
|
||||
@PostMapping("/change-status")
|
||||
@Operation(summary = "变更项目状态")
|
||||
public CommonResult<Boolean> changeProjectStatus(@Valid @RequestBody ProjectStatusActionReqVO reqVO) {
|
||||
projectService.changeProjectStatus(reqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@Operation(summary = "删除项目")
|
||||
public CommonResult<Boolean> deleteProject(@Valid @RequestBody ProjectDeleteReqVO reqVO) {
|
||||
projectService.deleteProject(reqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.project;
|
||||
|
||||
import com.njcn.rdms.framework.common.pojo.CommonResult;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.vo.member.ProjectMemberBatchCreateReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.vo.member.ProjectMemberBatchInactiveReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.vo.member.ProjectMemberInactiveReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.vo.member.ProjectMemberRespVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.vo.member.ProjectMemberSaveReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.vo.member.ProjectMemberUpdateReqVO;
|
||||
import com.njcn.rdms.module.project.service.project.ProjectMemberService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.njcn.rdms.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 项目成员")
|
||||
@RestController
|
||||
@RequestMapping("/project/project")
|
||||
@Validated
|
||||
public class ProjectMemberController {
|
||||
|
||||
@Resource
|
||||
private ProjectMemberService projectMemberService;
|
||||
|
||||
@GetMapping("/{id}/members")
|
||||
@Operation(summary = "获取项目成员列表")
|
||||
@Parameter(name = "id", description = "项目编号", required = true, example = "1024")
|
||||
public CommonResult<List<ProjectMemberRespVO>> getProjectMemberList(@PathVariable("id") Long projectId) {
|
||||
return success(projectMemberService.getProjectMemberList(projectId));
|
||||
}
|
||||
|
||||
@PostMapping("/{id}/members")
|
||||
@Operation(summary = "新增项目成员")
|
||||
@Parameter(name = "id", description = "项目编号", required = true, example = "1024")
|
||||
public CommonResult<Long> createProjectMember(@PathVariable("id") Long projectId,
|
||||
@Valid @RequestBody ProjectMemberSaveReqVO reqVO) {
|
||||
return success(projectMemberService.createProjectMember(projectId, reqVO));
|
||||
}
|
||||
|
||||
@PostMapping("/{id}/members/batch")
|
||||
@Operation(summary = "批量新增项目成员")
|
||||
@Parameter(name = "id", description = "项目编号", required = true, example = "1024")
|
||||
public CommonResult<List<Long>> batchCreateProjectMembers(@PathVariable("id") Long projectId,
|
||||
@Valid @RequestBody ProjectMemberBatchCreateReqVO reqVO) {
|
||||
return success(projectMemberService.batchCreateProjectMembers(projectId, reqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/{id}/members/{memberId}")
|
||||
@Operation(summary = "调整项目成员角色")
|
||||
public CommonResult<Boolean> updateProjectMember(@PathVariable("id") Long projectId,
|
||||
@PathVariable("memberId") Long memberId,
|
||||
@Valid @RequestBody ProjectMemberUpdateReqVO reqVO) {
|
||||
projectMemberService.updateProjectMember(projectId, memberId, reqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/{id}/members/{memberId}/inactive")
|
||||
@Operation(summary = "移出项目成员")
|
||||
public CommonResult<Boolean> inactiveProjectMember(@PathVariable("id") Long projectId,
|
||||
@PathVariable("memberId") Long memberId,
|
||||
@Valid @RequestBody ProjectMemberInactiveReqVO reqVO) {
|
||||
projectMemberService.inactiveProjectMember(projectId, memberId, reqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/{id}/members/batch/inactive")
|
||||
@Operation(summary = "批量移出项目成员")
|
||||
@Parameter(name = "id", description = "项目编号", required = true, example = "1024")
|
||||
public CommonResult<Boolean> batchInactiveProjectMembers(@PathVariable("id") Long projectId,
|
||||
@Valid @RequestBody ProjectMemberBatchInactiveReqVO reqVO) {
|
||||
projectMemberService.batchInactiveProjectMembers(projectId, reqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,162 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.project;
|
||||
|
||||
import com.njcn.rdms.framework.common.pojo.CommonResult;
|
||||
import com.njcn.rdms.framework.common.pojo.PageResult;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.vo.requirement.ProjectRequirementAllowedTransitionBatchRespVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.vo.requirement.ProjectRequirementBatchReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.vo.requirement.ProjectRequirementCloseReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.vo.requirement.ProjectRequirementDeleteReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.vo.requirement.ProjectRequirementModuleDeleteReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.vo.requirement.ProjectRequirementModuleReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.vo.requirement.ProjectRequirementModuleRespVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.vo.requirement.ProjectRequirementPageReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.vo.requirement.ProjectRequirementRespVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.vo.requirement.ProjectRequirementSaveReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.vo.requirement.ProjectRequirementSplitReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.vo.requirement.ProjectRequirementStatusActionReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.vo.requirement.ProjectRequirementStatusDictRespVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.vo.requirement.ProjectRequirementStatusTransitionRespVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.vo.requirement.ProjectRequirementUpdateReqVO;
|
||||
import com.njcn.rdms.module.project.service.project.ProjectRequirementService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.njcn.rdms.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
* 管理后台 - 项目需求控制器
|
||||
*/
|
||||
@Tag(name = "管理后台 - 项目需求")
|
||||
@RestController
|
||||
@RequestMapping("/project/project/requirement")
|
||||
@Validated
|
||||
public class ProjectRequirementController {
|
||||
|
||||
@Resource
|
||||
private ProjectRequirementService requirementService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建项目需求")
|
||||
public CommonResult<Long> createRequirement(@Valid @RequestBody ProjectRequirementSaveReqVO createReqVO) {
|
||||
return success(requirementService.createRequirement(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新项目需求")
|
||||
public CommonResult<Boolean> updateRequirement(@Valid @RequestBody ProjectRequirementUpdateReqVO updateReqVO) {
|
||||
requirementService.updateRequirement(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获取需求详情")
|
||||
@Parameter(name = "id", description = "需求编号", required = true, example = "1024")
|
||||
@Parameter(name = "projectId", description = "项目编号", required = true, example = "1024")
|
||||
public CommonResult<ProjectRequirementRespVO> getRequirement(@RequestParam("id") Long id,
|
||||
@RequestParam("projectId") Long projectId) {
|
||||
return success(requirementService.getRequirement(id, projectId));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获取需求分页列表")
|
||||
public CommonResult<PageResult<ProjectRequirementRespVO>> getRequirementPage(@Valid ProjectRequirementPageReqVO pageReqVO) {
|
||||
return success(requirementService.getRequirementPage(pageReqVO));
|
||||
}
|
||||
|
||||
@GetMapping("/tree")
|
||||
@Operation(summary = "获取需求树分页列表")
|
||||
public CommonResult<PageResult<ProjectRequirementRespVO>> getRequirementTree(@Valid ProjectRequirementPageReqVO pageReqVO) {
|
||||
return success(requirementService.getRequirementTree(pageReqVO));
|
||||
}
|
||||
|
||||
@PostMapping("/change-status")
|
||||
@Operation(summary = "变更需求状态")
|
||||
public CommonResult<Boolean> changeRequirementStatus(@Valid @RequestBody ProjectRequirementStatusActionReqVO reqVO) {
|
||||
requirementService.changeRequirementStatus(reqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@Operation(summary = "删除项目需求")
|
||||
public CommonResult<Boolean> deleteRequirement(@Valid @RequestBody ProjectRequirementDeleteReqVO reqVO) {
|
||||
requirementService.deleteRequirement(reqVO.getId(), reqVO.getProjectId());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/split")
|
||||
@Operation(summary = "拆分项目需求")
|
||||
public CommonResult<Long> splitRequirement(@Valid @RequestBody ProjectRequirementSplitReqVO reqVO) {
|
||||
return success(requirementService.splitRequirement(reqVO));
|
||||
}
|
||||
|
||||
@PostMapping("/close")
|
||||
@Operation(summary = "关闭项目需求")
|
||||
public CommonResult<Boolean> closeRequirement(@Valid @RequestBody ProjectRequirementCloseReqVO reqVO) {
|
||||
requirementService.closeRequirement(reqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/allowed-transitions")
|
||||
@Operation(summary = "获取需求可执行的状态动作列表")
|
||||
@Parameter(name = "requirementId", description = "需求编号", required = true, example = "1024")
|
||||
@Parameter(name = "projectId", description = "项目编号", required = true, example = "1024")
|
||||
public CommonResult<List<ProjectRequirementStatusTransitionRespVO>> getAllowedTransitions(
|
||||
@RequestParam("requirementId") Long requirementId,
|
||||
@RequestParam("projectId") Long projectId) {
|
||||
return success(requirementService.getAllowedTransitions(requirementId, projectId));
|
||||
}
|
||||
|
||||
@PostMapping("/allowed-transitions/batch")
|
||||
@Operation(summary = "批量获取需求可执行的状态动作列表")
|
||||
public CommonResult<List<ProjectRequirementAllowedTransitionBatchRespVO>> getAllowedTransitionsBatch(
|
||||
@Valid @RequestBody ProjectRequirementBatchReqVO reqVO) {
|
||||
return success(requirementService.getAllowedTransitionsBatch(reqVO));
|
||||
}
|
||||
|
||||
@PostMapping("/module/create")
|
||||
@Operation(summary = "创建需求模块")
|
||||
public CommonResult<Long> createRequirementModule(@Valid @RequestBody ProjectRequirementModuleReqVO reqVO) {
|
||||
return success(requirementService.createRequirementModule(reqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/module/update")
|
||||
@Operation(summary = "更新需求模块")
|
||||
public CommonResult<Boolean> updateRequirementModule(@Valid @RequestBody ProjectRequirementModuleReqVO reqVO) {
|
||||
requirementService.updateRequirementModule(reqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/module/delete")
|
||||
@Operation(summary = "删除需求模块")
|
||||
public CommonResult<Boolean> deleteRequirementModule(@Valid @RequestBody ProjectRequirementModuleDeleteReqVO reqVO) {
|
||||
requirementService.deleteRequirementModule(reqVO.getId(), reqVO.getProjectId());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/module/tree")
|
||||
@Operation(summary = "获取需求模块树")
|
||||
@Parameter(name = "projectId", description = "项目编号", required = true, example = "1024")
|
||||
public CommonResult<List<ProjectRequirementModuleRespVO>> getRequirementModuleTree(@RequestParam("projectId") Long projectId) {
|
||||
return success(requirementService.getRequirementModuleTree(projectId));
|
||||
}
|
||||
|
||||
@GetMapping("/status/dict")
|
||||
@Operation(summary = "获取需求所有状态字典")
|
||||
public CommonResult<List<ProjectRequirementStatusDictRespVO>> getRequirementStatusDict() {
|
||||
return success(requirementService.getRequirementStatusDict());
|
||||
}
|
||||
|
||||
@GetMapping("/status/dict/terminal")
|
||||
@Operation(summary = "获取需求终止态状态字典")
|
||||
public CommonResult<List<ProjectRequirementStatusDictRespVO>> getRequirementTerminalStatusDict() {
|
||||
return success(requirementService.getRequirementTerminalStatusDict());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.project.execution;
|
||||
|
||||
import com.njcn.rdms.framework.common.pojo.CommonResult;
|
||||
import com.njcn.rdms.framework.common.pojo.PageResult;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.execution.vo.assignee.ExecutionAssigneeInactiveReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.execution.vo.assignee.ExecutionAssigneeLogPageReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.execution.vo.assignee.ExecutionAssigneeLogRespVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.execution.vo.assignee.ExecutionAssigneeRespVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.execution.vo.assignee.ExecutionAssigneeSaveReqVO;
|
||||
import com.njcn.rdms.module.project.service.project.execution.ProjectExecutionAssigneeService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.njcn.rdms.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 执行协办人")
|
||||
@RestController
|
||||
@RequestMapping("/project/project/{projectId}/executions/{executionId}")
|
||||
@Validated
|
||||
public class ProjectExecutionAssigneeController {
|
||||
|
||||
@Resource
|
||||
private ProjectExecutionAssigneeService projectExecutionAssigneeService;
|
||||
|
||||
@GetMapping("/assignees")
|
||||
@Operation(summary = "获取执行协办人列表(仅当前活跃)")
|
||||
public CommonResult<List<ExecutionAssigneeRespVO>> getExecutionAssigneeList(@PathVariable("projectId") Long projectId,
|
||||
@PathVariable("executionId") Long executionId) {
|
||||
return success(projectExecutionAssigneeService.getExecutionAssigneeList(projectId, executionId));
|
||||
}
|
||||
|
||||
@PostMapping("/assignees")
|
||||
@Operation(summary = "新增执行协办人(B 模型 - 每次新增一段)")
|
||||
public CommonResult<Long> createExecutionAssignee(@PathVariable("projectId") Long projectId,
|
||||
@PathVariable("executionId") Long executionId,
|
||||
@Valid @RequestBody ExecutionAssigneeSaveReqVO reqVO) {
|
||||
return success(projectExecutionAssigneeService.createExecutionAssignee(projectId, executionId, reqVO));
|
||||
}
|
||||
|
||||
@PostMapping("/assignees/{assigneeId}/inactive")
|
||||
@Operation(summary = "失效执行协办人(永久保留 removedReason)")
|
||||
public CommonResult<Boolean> inactiveExecutionAssignee(@PathVariable("projectId") Long projectId,
|
||||
@PathVariable("executionId") Long executionId,
|
||||
@PathVariable("assigneeId") Long assigneeId,
|
||||
@Valid @RequestBody ExecutionAssigneeInactiveReqVO reqVO) {
|
||||
projectExecutionAssigneeService.inactiveExecutionAssignee(projectId, executionId, assigneeId, reqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/assignee-logs")
|
||||
@Operation(summary = "获取执行协办人变更历史(分页)")
|
||||
public CommonResult<PageResult<ExecutionAssigneeLogRespVO>> getExecutionAssigneeLogPage(
|
||||
@PathVariable("projectId") Long projectId,
|
||||
@PathVariable("executionId") Long executionId,
|
||||
@Valid ExecutionAssigneeLogPageReqVO reqVO) {
|
||||
return success(projectExecutionAssigneeService.getExecutionAssigneeLogPage(projectId, executionId, reqVO));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.project.execution;
|
||||
|
||||
import com.njcn.rdms.framework.common.pojo.CommonResult;
|
||||
import com.njcn.rdms.framework.common.pojo.PageParam;
|
||||
import com.njcn.rdms.framework.common.pojo.PageResult;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.execution.vo.execution.ProjectExecutionOwnerChangeReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.execution.vo.execution.ProjectExecutionPageReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.execution.vo.execution.ProjectExecutionStatusBoardReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.execution.vo.execution.ProjectExecutionStatusBoardRespVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.execution.vo.execution.ProjectExecutionRespVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.execution.vo.execution.ProjectExecutionCreateReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.execution.vo.execution.ProjectExecutionDeletePrecheckRespVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.execution.vo.execution.ProjectExecutionDeleteReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.execution.vo.execution.ProjectExecutionUpdateReqVO;
|
||||
import com.njcn.rdms.module.project.controller.admin.project.execution.vo.execution.ProjectExecutionStatusActionReqVO;
|
||||
import com.njcn.rdms.module.project.service.project.ProjectStatusBoardService;
|
||||
import com.njcn.rdms.module.project.service.project.execution.ProjectExecutionService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.njcn.rdms.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 项目执行")
|
||||
@RestController
|
||||
@RequestMapping("/project/project/{projectId}/executions")
|
||||
@Validated
|
||||
public class ProjectExecutionController {
|
||||
|
||||
@Resource
|
||||
private ProjectExecutionService projectExecutionService;
|
||||
@Resource
|
||||
private ProjectStatusBoardService projectStatusBoardService;
|
||||
|
||||
|
||||
@PostMapping
|
||||
@Operation(summary = "创建执行")
|
||||
public CommonResult<Long> createExecution(@PathVariable("projectId") Long projectId,
|
||||
@Valid @RequestBody ProjectExecutionCreateReqVO reqVO) {
|
||||
return success(projectExecutionService.createExecution(projectId, reqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/{executionId}")
|
||||
@Operation(summary = "编辑执行")
|
||||
public CommonResult<Boolean> updateExecution(@PathVariable("projectId") Long projectId,
|
||||
@PathVariable("executionId") Long executionId,
|
||||
@Valid @RequestBody ProjectExecutionUpdateReqVO reqVO) {
|
||||
reqVO.setId(executionId);
|
||||
projectExecutionService.updateExecution(projectId, reqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/{executionId}")
|
||||
@Operation(summary = "获取执行详情")
|
||||
public CommonResult<ProjectExecutionRespVO> getExecution(@PathVariable("projectId") Long projectId,
|
||||
@PathVariable("executionId") Long executionId) {
|
||||
return success(projectExecutionService.getExecutionRespVO(projectId, executionId));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获取执行分页")
|
||||
public CommonResult<PageResult<ProjectExecutionRespVO>> getExecutionPage(@PathVariable("projectId") Long projectId,
|
||||
@Valid ProjectExecutionPageReqVO reqVO) {
|
||||
// 前端用负数 pageSize 表示"查询全部",统一归一为框架约定的 PAGE_SIZE_NONE(-1),
|
||||
// 走 BaseMapperX.selectPage 的不分页短路;@Max(200) 仅拦上界,负数不会被 validator 卡。
|
||||
if (reqVO.getPageSize() != null && reqVO.getPageSize() < 0) {
|
||||
reqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
}
|
||||
return success(projectExecutionService.getExecutionRespVOPage(projectId, reqVO));
|
||||
}
|
||||
|
||||
@GetMapping("/status-board")
|
||||
@Operation(summary = "获取执行状态看板")
|
||||
public CommonResult<ProjectExecutionStatusBoardRespVO> getExecutionStatusBoard(@PathVariable("projectId") Long projectId,
|
||||
@Valid ProjectExecutionStatusBoardReqVO reqVO) {
|
||||
return success(projectStatusBoardService.getExecutionStatusBoard(projectId, reqVO));
|
||||
}
|
||||
|
||||
@PostMapping("/{executionId}/change-owner")
|
||||
@Operation(summary = "变更执行负责人")
|
||||
public CommonResult<Boolean> changeOwner(@PathVariable("projectId") Long projectId,
|
||||
@PathVariable("executionId") Long executionId,
|
||||
@Valid @RequestBody ProjectExecutionOwnerChangeReqVO reqVO) {
|
||||
projectExecutionService.changeOwner(projectId, executionId, reqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/{executionId}/change-status")
|
||||
@Operation(summary = "变更执行状态")
|
||||
public CommonResult<Boolean> changeStatus(@PathVariable("projectId") Long projectId,
|
||||
@PathVariable("executionId") Long executionId,
|
||||
@Valid @RequestBody ProjectExecutionStatusActionReqVO reqVO) {
|
||||
projectExecutionService.changeExecutionStatus(projectId, executionId, reqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/{executionId}/delete-precheck")
|
||||
@Operation(summary = "执行删除预检:返回下挂任务数 + 是否需要重型确认")
|
||||
public CommonResult<ProjectExecutionDeletePrecheckRespVO> precheckDeleteExecution(
|
||||
@PathVariable("projectId") Long projectId,
|
||||
@PathVariable("executionId") Long executionId) {
|
||||
return success(projectExecutionService.precheckDeleteExecution(projectId, executionId));
|
||||
}
|
||||
|
||||
@DeleteMapping("/{executionId}")
|
||||
@Operation(summary = "删除执行(已完成态禁止,三重确认)")
|
||||
public CommonResult<Boolean> deleteExecution(@PathVariable("projectId") Long projectId,
|
||||
@PathVariable("executionId") Long executionId,
|
||||
@Valid @RequestBody ProjectExecutionDeleteReqVO reqVO) {
|
||||
projectExecutionService.deleteExecution(projectId, executionId, reqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.project.execution.vo.assignee;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 执行协办人失效 Request VO")
|
||||
@Data
|
||||
public class ExecutionAssigneeInactiveReqVO {
|
||||
|
||||
@Schema(description = "失效原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "阶段性退出")
|
||||
@NotBlank(message = "失效原因不能为空")
|
||||
@Size(max = 500, message = "失效原因长度不能超过500个字符")
|
||||
private String reason;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.project.execution.vo.assignee;
|
||||
|
||||
import com.njcn.rdms.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 执行协办人变更历史分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ExecutionAssigneeLogPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "事件类型多选;不传表示全部",
|
||||
example = "[\"join\",\"inactive\",\"owner_transfer_in\",\"owner_transfer_out\"]")
|
||||
private List<String> actionTypes;
|
||||
|
||||
@Schema(description = "协办人用户编号;不传表示全部")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "起始时间(含),按 actionTime 比较")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@Schema(description = "截止时间(含),按 actionTime 比较")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.project.execution.vo.assignee;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 执行协办人变更历史 Response VO")
|
||||
@Data
|
||||
public class ExecutionAssigneeLogRespVO {
|
||||
|
||||
@Schema(description = "日志编号", example = "12001")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "所属执行编号", example = "5001")
|
||||
private Long executionId;
|
||||
|
||||
@Schema(description = "事件类型:join / inactive / owner_transfer_in / owner_transfer_out", example = "join")
|
||||
private String actionType;
|
||||
|
||||
@Schema(description = "被操作人用户编号", example = "3002")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "被操作人昵称,返回时按当前用户信息回填")
|
||||
private String userNicknameSnapshot;
|
||||
|
||||
@Schema(description = "操作人用户编号", example = "3001")
|
||||
private Long operatorUserId;
|
||||
|
||||
@Schema(description = "操作人昵称,返回时按当前用户信息回填")
|
||||
private String operatorNicknameSnapshot;
|
||||
|
||||
@Schema(description = "事件时间")
|
||||
private LocalDateTime actionTime;
|
||||
|
||||
@Schema(description = "原因;inactive 必填,其余可空")
|
||||
private String reason;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.njcn.rdms.module.project.controller.admin.project.execution.vo.assignee;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 执行协办人 Response VO")
|
||||
@Data
|
||||
public class ExecutionAssigneeRespVO {
|
||||
|
||||
@Schema(description = "协办人关系编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "7001")
|
||||
private Long id;
|
||||
@Schema(description = "所属执行编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "5001")
|
||||
private Long executionId;
|
||||
@Schema(description = "协办人用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "3002")
|
||||
private Long userId;
|
||||
@Schema(description = "协办人用户昵称")
|
||||
private String userNickname;
|
||||
@Schema(description = "加入时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime joinedAt;
|
||||
@Schema(description = "失效时间")
|
||||
private LocalDateTime removedAt;
|
||||
@Schema(description = "失效原因")
|
||||
private String removedReason;
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user