From f7ca00522280b1cf3e6912e1c9d04c0a766386a7 Mon Sep 17 00:00:00 2001 From: tangweijie <877588133@qq.com> Date: Tue, 13 Jan 2026 16:19:12 +0800 Subject: [PATCH] =?UTF-8?q?fix(performance):=20=E6=89=B9=E9=87=8F=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E6=8E=A5=E5=8F=A3=E4=BC=98=E5=8C=96=E9=97=AE=E5=8D=B7?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E6=80=A7=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加批量更新API: POST /prison/question/batch-update - 修复savePartitions循环调用API问题 (50题只需1次请求) - 修复onPartitionDragEnd拖拽排序性能问题 - 修复onQuestionDragEnd问题拖拽排序性能问题 - 添加自动填充来源字典支持 (35个选项) 修改文件: backend: - QuestionBatchUpdateReqVO.java (新增) - PrisonQuestionController.java - QuestionService.java - QuestionServiceImpl.java frontend: - api/prison/question/index.ts - views/prison/questionnaire/components/QuestionList.vue - utils/dict.ts - views/prison/question/QuestionForm.vue Refs: xlcp-frontend#1, xlcp-backend#1 --- backend | 1 + frontend | 1 + implement/plan.md | 86 +++++++++++++++++++++++++++++++++++++++++++++++ yudao-module-temp | 1 + 4 files changed, 89 insertions(+) create mode 160000 backend create mode 160000 frontend create mode 100644 implement/plan.md create mode 160000 yudao-module-temp diff --git a/backend b/backend new file mode 160000 index 0000000..bf6875a --- /dev/null +++ b/backend @@ -0,0 +1 @@ +Subproject commit bf6875adf6a99d90ca95f84a6045aea1cc8779c8 diff --git a/frontend b/frontend new file mode 160000 index 0000000..35af632 --- /dev/null +++ b/frontend @@ -0,0 +1 @@ +Subproject commit 35af6320109f648df8245c3a0bec88147092f57d diff --git a/implement/plan.md b/implement/plan.md new file mode 100644 index 0000000..e941909 --- /dev/null +++ b/implement/plan.md @@ -0,0 +1,86 @@ +# Implementation Plan - 2026-01-12 + +## Source Analysis + +**Source Type**: Local codegen zip files +**Location**: `/Volumes/Dpan/github/xlcp/codegen/` + +**Modules to integrate (8 total)**: +| Module | Chinese Name | Backend Path | Frontend Path | +|--------|-------------|--------------|---------------| +| Area | 监区管理 | `controller/admin/area/` | `views/prison/area/` | +| Cell | 监室管理 | `controller/admin/cell/` | `views/prison/cell/` | +| Consumption | 消费记录 | `controller/admin/consumption/` | `views/prison/consumption/` | +| Question | 问卷问题 | `controller/admin/question/` | `views/prison/question/` | +| Questionnaire | 问卷模板 | `controller/admin/questionnaire/` | `views/prison/questionnaire/` | +| QuestionnaireRecord | 问卷答题记录 | `controller/admin/questionnairerecord/` | `views/prison/questionnairerecord/` | +| RiskAssessment | 危险评估 | `controller/admin/riskassessment/` | `views/prison/riskassessment/` | +| Score | 计分考核 | `controller/admin/score/` | `views/prison/score/` | + +**Core Features per Module**: +- CRUD operations (Controller, Service, ServiceImpl) +- DO (Data Object with table mapping) +- Mapper (MyBatis-Plus) +- VO (PageReqVO, RespVO, SaveReqVO) +- Frontend (index.vue, Form.vue, API index.ts) +- Menu SQL scripts + +## Target Integration + +**Backend Target**: `yudao-module-prison/` +**Frontend Target**: `frontend/src/` + +**Affected Files**: +- Backend: New packages for each module +- Frontend: New directories under views/prison/ and api/prison/ +- ErrorCodeConstants: Merge new error codes + +## Implementation Tasks + +### Backend Integration +- [ ] 1. Integrate Area module (监区管理) +- [ ] 2. Integrate Cell module (监室管理) +- [ ] 3. Integrate Consumption module (消费记录) +- [ ] 4. Integrate Question module (问卷问题) +- [ ] 5. Integrate Questionnaire module (问卷模板) +- [ ] 6. Integrate QuestionnaireRecord module (问卷答题记录) +- [ ] 7. Integrate RiskAssessment module (危险评估) +- [ ] 8. Integrate Score module (计分考核) +- [ ] 9. Update ErrorCodeConstants with new error codes +- [ ] 10. Update module pom.xml if needed + +### Frontend Integration +- [ ] 11. Integrate Area frontend +- [ ] 12. Integrate Cell frontend +- [ ] 13. Integrate Consumption frontend +- [ ] 14. Integrate Question frontend +- [ ] 15. Integrate Questionnaire frontend +- [ ] 16. Integrate QuestionnaireRecord frontend +- [ ] 17. Integrate RiskAssessment frontend +- [ ] 18. Integrate Score frontend +- [ ] 19. Update dict.ts with new enum types +- [ ] 20. Update constants.ts if needed + +### Database Integration +- [ ] 21. Create consolidated SQL script +- [ ] 22. Run SQL to create tables +- [ ] 23. Run SQL to insert menu permissions + +## Validation Checklist +- [x] All 8 modules integrated +- [ ] Backend compiles successfully (TODO: verify) +- [ ] Frontend builds successfully (TODO: verify) +- [ ] No duplicate class definitions +- [ ] Error codes properly merged +- [x] Menu SQL ready for execution + +## Completed: 2026-01-12 +All 8 modules have been integrated: +- Backend files copied to yudao-module-prison +- Frontend files copied to frontend/src/ +- SQL script created at yudao-module-prison/src/main/resources/sql/prison_module.sql + +## Risk Mitigation +- **Encoding issue**: Some files have garbled Chinese characters - will regenerate or manually fix +- **Duplicate ErrorCodeConstants**: Need to merge with existing file instead of overwriting +- **Frontend path mismatch**: Generated files use `yudao-ui-admin-vue3/` prefix - need to strip diff --git a/yudao-module-temp b/yudao-module-temp new file mode 160000 index 0000000..711821f --- /dev/null +++ b/yudao-module-temp @@ -0,0 +1 @@ +Subproject commit 711821f53068d2334f21bbab06ab0456cedc3ec6