kcode-pi 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +358 -0
- package/dist/cli/kcode.d.ts +15 -0
- package/dist/cli/kcode.js +153 -0
- package/dist/cli/main.d.ts +2 -0
- package/dist/cli/main.js +7 -0
- package/docs/KCODE_DISTRIBUTION.md +91 -0
- package/extensions/kingdee-harness.ts +180 -0
- package/extensions/kingdee-header.ts +122 -0
- package/extensions/kingdee-tools.ts +379 -0
- package/knowledge/.backup/v1.0.0/version.json +10 -0
- package/knowledge/cangqiong/product-notes.md +15 -0
- package/knowledge/common/business-flows.md +115 -0
- package/knowledge/common/config-guides.md +110 -0
- package/knowledge/common/error-patterns.md +170 -0
- package/knowledge/common/implementation.md +144 -0
- package/knowledge/cosmic/hard-constraints.md +38 -0
- package/knowledge/cosmic/ksql-datafix.md +34 -0
- package/knowledge/cosmic/platform-baseline.md +32 -0
- package/knowledge/cosmic/plugin-decision-matrix.md +40 -0
- package/knowledge/cosmic/review-checklist.md +40 -0
- package/knowledge/cosmic/unittest.md +35 -0
- package/knowledge/enterprise/api-reference.md +186 -0
- package/knowledge/enterprise/code-patterns.md +217 -0
- package/knowledge/enterprise/plugin-lifecycle.md +188 -0
- package/knowledge/enterprise/tables.json +159 -0
- package/knowledge/flagship/api-reference.md +237 -0
- package/knowledge/flagship/code-patterns.md +246 -0
- package/knowledge/flagship/cosmic-platform-note.md +15 -0
- package/knowledge/flagship/plugin-lifecycle.md +248 -0
- package/knowledge/flagship/tables.json +159 -0
- package/knowledge/version.json +10 -0
- package/knowledge/xinghan/product-notes.md +15 -0
- package/package.json +71 -0
- package/prompts/kd-discuss.md +11 -0
- package/prompts/kd-execute.md +12 -0
- package/prompts/kd-plan.md +12 -0
- package/prompts/kd-ship.md +12 -0
- package/prompts/kd-spec.md +12 -0
- package/prompts/kd-verify.md +12 -0
- package/skills/kd-check/SKILL.md +26 -0
- package/skills/kd-cosmic-dev/SKILL.md +82 -0
- package/skills/kd-cosmic-review/SKILL.md +90 -0
- package/skills/kd-cosmic-unittest/SKILL.md +92 -0
- package/skills/kd-debug/SKILL.md +30 -0
- package/skills/kd-discuss/SKILL.md +24 -0
- package/skills/kd-execute/SKILL.md +22 -0
- package/skills/kd-gen/SKILL.md +34 -0
- package/skills/kd-ksql/SKILL.md +86 -0
- package/skills/kd-plan/SKILL.md +24 -0
- package/skills/kd-ship/SKILL.md +22 -0
- package/skills/kd-spec/SKILL.md +24 -0
- package/skills/kd-verify/SKILL.md +22 -0
- package/themes/kcode-dark.json +81 -0
- package/vendor/kingdee-skills/cosmic-unittest/SKILL.md +788 -0
- package/vendor/kingdee-skills/cosmic-unittest/author-cache.json +5 -0
- package/vendor/kingdee-skills/cosmic-unittest/cosmic-unittest-skill-overview.html +746 -0
- package/vendor/kingdee-skills/cosmic-unittest/examples/business-test.md +205 -0
- package/vendor/kingdee-skills/cosmic-unittest/examples/common-test.md +257 -0
- package/vendor/kingdee-skills/cosmic-unittest/examples/formplugin-test.md +560 -0
- package/vendor/kingdee-skills/cosmic-unittest/examples/op-plugin-test.md +231 -0
- package/vendor/kingdee-skills/cosmic-unittest/examples/validator-test.md +232 -0
- package/vendor/kingdee-skills/cosmic-unittest/patterns/business-helper.md +184 -0
- package/vendor/kingdee-skills/cosmic-unittest/patterns/common-module.md +355 -0
- package/vendor/kingdee-skills/cosmic-unittest/patterns/convert-plugin.md +130 -0
- package/vendor/kingdee-skills/cosmic-unittest/patterns/formplugin.md +235 -0
- package/vendor/kingdee-skills/cosmic-unittest/patterns/op-plugin.md +226 -0
- package/vendor/kingdee-skills/cosmic-unittest/patterns/validator.md +206 -0
- package/vendor/kingdee-skills/kingdee-cosmic-reviewer/SKILL.md +674 -0
- package/vendor/kingdee-skills/kingdee-cosmic-reviewer/references/advanced-scenario-checklist.md +307 -0
- package/vendor/kingdee-skills/kingdee-cosmic-reviewer/references/algox-performance-checklist.md +129 -0
- package/vendor/kingdee-skills/kingdee-cosmic-reviewer/references/coding-standard-checklist.md +491 -0
- package/vendor/kingdee-skills/kingdee-cosmic-reviewer/references/cosmic-api-checklist.md +285 -0
- package/vendor/kingdee-skills/kingdee-cosmic-reviewer/references/data-access-checklist.md +261 -0
- package/vendor/kingdee-skills/kingdee-cosmic-reviewer/references/data-transaction-checklist.md +390 -0
- package/vendor/kingdee-skills/kingdee-cosmic-reviewer/references/domain-logic-checklist.md +295 -0
- package/vendor/kingdee-skills/kingdee-cosmic-reviewer/references/form-plugin-checklist.md +508 -0
- package/vendor/kingdee-skills/kingdee-cosmic-reviewer/references/infra-checklist.md +254 -0
- package/vendor/kingdee-skills/kingdee-cosmic-reviewer/references/ksql-checklist.md +305 -0
- package/vendor/kingdee-skills/kingdee-cosmic-reviewer/references/lifecycle-checklist.md +298 -0
- package/vendor/kingdee-skills/kingdee-cosmic-reviewer/references/operation-plugin-checklist.md +442 -0
- package/vendor/kingdee-skills/kingdee-cosmic-reviewer/references/test-mock-checklist.md +120 -0
- package/vendor/kingdee-skills/kingdee-cosmic-reviewer/references/ui-performance-checklist.md +320 -0
- package/vendor/kingdee-skills/kingdee-cosmic-reviewer/scripts/pattern-matcher.py +336 -0
- package/vendor/kingdee-skills/kingdee-cosmic-reviewer/scripts/review-score-calculator.py +121 -0
- package/vendor/kingdee-skills/ok-cosmic/CHANGELOG.md +295 -0
- package/vendor/kingdee-skills/ok-cosmic/README.md +460 -0
- package/vendor/kingdee-skills/ok-cosmic/SKILL.md +287 -0
- package/vendor/kingdee-skills/ok-cosmic/agents/openai.yaml +17 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/BatchImportPluginTemplate.java +93 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/BillPlugInTemplate.java +156 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/ConvertPlugInTemplate.java +255 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/FormPluginTemplate.java +597 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/IWorkflowPluginTemplate.java +91 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/ListPluginTemplate.java +194 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/OpPluginTemplate.java +201 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/OpenApiControllerTemplate.java +103 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/PrintPluginTemplate.java +95 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/ReportFormPluginTemplate.java +257 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/ReportListDataPluginTemplate.java +70 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/StandardTreeListPluginTemplate.java +130 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/TaskTemplate.java +80 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/TreeListPluginTemplate.java +152 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/WriteBackPlugInTemplate.java +286 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/snippets/attachment/AttachmentUploadBindSample.java +93 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/snippets/botp/BotpTracePushSample.java +168 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/snippets/botp/SampleConvertPlugin.java +223 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/snippets/cache/SampleCacheUsage.java +218 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/snippets/concurrent/SampleThreadPoolBatch.java +156 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/snippets/data/DynamicObjectCrudSample.java +205 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/snippets/data/DynamicObjectOpsSample.java +100 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/snippets/form/BeforeOperationConfirmSample.java +217 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/snippets/form/ConfirmDialogSample.java +131 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/snippets/form/EntryRowCalculateSample.java +116 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/snippets/form/F7FilterSample.java +134 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/snippets/form/GetAndSetValueSample.java +176 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/snippets/form/HyperlinkJumpSample.java +124 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/snippets/form/OpenBillModalSample.java +253 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/snippets/form/ReturnParentDataSample.java +295 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/snippets/form/TreeControlSample.java +140 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/snippets/form/ViewControlOpsSample.java +132 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/snippets/list/ListPluginBasicSample.java +170 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/snippets/list/ListPreOpenFilterSample.java +68 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/snippets/message/MessageNotifySample.java +95 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/snippets/mq/SampleMQConsumer.java +198 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/snippets/mq/sample_mq.xml +15 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/snippets/operation/OpAddValidatorsSample.java +137 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/snippets/operation/OperationOptionBridgeSample.java +228 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/snippets/package-info.java +19 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/snippets/query/BaseDataQuerySample.java +194 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/snippets/query/BatchQuerySample.java +368 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/snippets/query/DataSetQueryStatSample.java +131 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/snippets/report/SampleReportFormPlugin.java +179 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/snippets/report/SampleReportListDataPlugin.java +616 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/snippets/snippets-guide.md +64 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/snippets/task/ScheduleTaskSample.java +160 -0
- package/vendor/kingdee-skills/ok-cosmic/assets/snippets/workflow/SampleWorkflowPlugin.java +302 -0
- package/vendor/kingdee-skills/ok-cosmic/manifest.json +78 -0
- package/vendor/kingdee-skills/ok-cosmic/ok-cosmic-intro.html +903 -0
- package/vendor/kingdee-skills/ok-cosmic/references/adv/attachment-api.md +114 -0
- package/vendor/kingdee-skills/ok-cosmic/references/adv/botp-convert.md +98 -0
- package/vendor/kingdee-skills/ok-cosmic/references/adv/dynamic-object.md +113 -0
- package/vendor/kingdee-skills/ok-cosmic/references/adv/entity-metadata.md +123 -0
- package/vendor/kingdee-skills/ok-cosmic/references/adv/event-lifecycle.md +184 -0
- package/vendor/kingdee-skills/ok-cosmic/references/adv/flex-prop.md +114 -0
- package/vendor/kingdee-skills/ok-cosmic/references/adv/form-utils.md +133 -0
- package/vendor/kingdee-skills/ok-cosmic/references/adv/operate-chain.md +159 -0
- package/vendor/kingdee-skills/ok-cosmic/references/adv/plugin-base.md +218 -0
- package/vendor/kingdee-skills/ok-cosmic/references/adv/query-dataset.md +149 -0
- package/vendor/kingdee-skills/ok-cosmic/references/adv/request-context.md +88 -0
- package/vendor/kingdee-skills/ok-cosmic/references/adv/view-handler.md +157 -0
- package/vendor/kingdee-skills/ok-cosmic/references/base/plugin/plugin-bill.md +76 -0
- package/vendor/kingdee-skills/ok-cosmic/references/base/plugin/plugin-botp.md +70 -0
- package/vendor/kingdee-skills/ok-cosmic/references/base/plugin/plugin-form.md +165 -0
- package/vendor/kingdee-skills/ok-cosmic/references/base/plugin/plugin-import.md +69 -0
- package/vendor/kingdee-skills/ok-cosmic/references/base/plugin/plugin-list.md +227 -0
- package/vendor/kingdee-skills/ok-cosmic/references/base/plugin/plugin-openapi.md +112 -0
- package/vendor/kingdee-skills/ok-cosmic/references/base/plugin/plugin-operation.md +135 -0
- package/vendor/kingdee-skills/ok-cosmic/references/base/plugin/plugin-print.md +65 -0
- package/vendor/kingdee-skills/ok-cosmic/references/base/plugin/plugin-report-data.md +64 -0
- package/vendor/kingdee-skills/ok-cosmic/references/base/plugin/plugin-report-form.md +90 -0
- package/vendor/kingdee-skills/ok-cosmic/references/base/plugin/plugin-task.md +62 -0
- package/vendor/kingdee-skills/ok-cosmic/references/base/plugin/plugin-tree-list.md +71 -0
- package/vendor/kingdee-skills/ok-cosmic/references/base/plugin/plugin-workflow.md +82 -0
- package/vendor/kingdee-skills/ok-cosmic/references/base/plugin/plugin-writeback.md +71 -0
- package/vendor/kingdee-skills/ok-cosmic/references/base/sdk/sdk-algo.md +67 -0
- package/vendor/kingdee-skills/ok-cosmic/references/base/sdk/sdk-cache.md +63 -0
- package/vendor/kingdee-skills/ok-cosmic/references/base/sdk/sdk-dynamic-model-svc.md +82 -0
- package/vendor/kingdee-skills/ok-cosmic/references/base/sdk/sdk-dynamic-object.md +70 -0
- package/vendor/kingdee-skills/ok-cosmic/references/base/sdk/sdk-entity-model.md +61 -0
- package/vendor/kingdee-skills/ok-cosmic/references/base/sdk/sdk-exception.md +64 -0
- package/vendor/kingdee-skills/ok-cosmic/references/base/sdk/sdk-file.md +63 -0
- package/vendor/kingdee-skills/ok-cosmic/references/base/sdk/sdk-id.md +47 -0
- package/vendor/kingdee-skills/ok-cosmic/references/base/sdk/sdk-lock.md +61 -0
- package/vendor/kingdee-skills/ok-cosmic/references/base/sdk/sdk-log.md +63 -0
- package/vendor/kingdee-skills/ok-cosmic/references/base/sdk/sdk-network-control.md +70 -0
- package/vendor/kingdee-skills/ok-cosmic/references/base/sdk/sdk-orm-access.md +78 -0
- package/vendor/kingdee-skills/ok-cosmic/references/base/sdk/sdk-request-context.md +62 -0
- package/vendor/kingdee-skills/ok-cosmic/references/base/sdk/sdk-threadpool.md +63 -0
- package/vendor/kingdee-skills/ok-cosmic/references/base/sdk/sdk-tx.md +64 -0
- package/vendor/kingdee-skills/ok-cosmic/references/base/sdk/sdk-utils.md +67 -0
- package/vendor/kingdee-skills/ok-cosmic/requirements.txt +2 -0
- package/vendor/kingdee-skills/ok-cosmic/rules/a-layer-rules.json +24 -0
- package/vendor/kingdee-skills/ok-cosmic/rules/anti-patterns.md +48 -0
- package/vendor/kingdee-skills/ok-cosmic/rules/cheat-sheet.md +256 -0
- package/vendor/kingdee-skills/ok-cosmic/rules/coding-preferences.md +140 -0
- package/vendor/kingdee-skills/ok-cosmic/rules/constraints.md +61 -0
- package/vendor/kingdee-skills/ok-cosmic/rules/decision-matrix.md +222 -0
- package/vendor/kingdee-skills/ok-cosmic/rules/intent-routing.md +94 -0
- package/vendor/kingdee-skills/ok-cosmic/rules/platform-baseline.md +69 -0
- package/vendor/kingdee-skills/ok-cosmic/rules/post-check.md +109 -0
- package/vendor/kingdee-skills/ok-cosmic/scripts/config_loader.py +204 -0
- package/vendor/kingdee-skills/ok-cosmic/scripts/cosmic-api-knowledge.py +910 -0
- package/vendor/kingdee-skills/ok-cosmic/scripts/cosmic-basedata-query.py +359 -0
- package/vendor/kingdee-skills/ok-cosmic/scripts/cosmic-config-check.py +181 -0
- package/vendor/kingdee-skills/ok-cosmic/scripts/cosmic-extpoints-query.py +389 -0
- package/vendor/kingdee-skills/ok-cosmic/scripts/cosmic-form-metadata.py +856 -0
- package/vendor/kingdee-skills/ok-cosmic/scripts/cosmic-post-check.py +262 -0
- package/vendor/kingdee-skills/ok-cosmic/scripts/cosmic-post-lint.py +293 -0
- package/vendor/kingdee-skills/ok-cosmic/scripts/lint/__init__.py +2 -0
- package/vendor/kingdee-skills/ok-cosmic/scripts/lint/base.py +393 -0
- package/vendor/kingdee-skills/ok-cosmic/scripts/lint/resource_check.py +176 -0
- package/vendor/kingdee-skills/ok-cosmic/scripts/lint/scene_check.py +375 -0
- package/vendor/kingdee-skills/ok-cosmic/scripts/lint/style_check.py +434 -0
- package/vendor/kingdee-skills/ok-cosmic/scripts/lint/verify_check.py +36 -0
- package/vendor/kingdee-skills/ok-cosmic/scripts/route_client.py +186 -0
- package/vendor/kingdee-skills/ok-cosmic/scripts/script_utils.py +40 -0
- package/vendor/kingdee-skills/ok-cosmic/scripts/sqlite_cache.py +142 -0
- package/vendor/kingdee-skills/ok-cosmic/setup/cuslib/kd-cd-cosmic-commons.jar +0 -0
- package/vendor/kingdee-skills/ok-cosmic/setup/cuslib/kd-cd-cosmic-features.jar +0 -0
- package/vendor/kingdee-skills/ok-cosmic/setup/ok-cosmic-docs.db +0 -0
- package/vendor/kingdee-skills/ok-cosmic/setup/ok-cosmic.json +13 -0
- package/vendor/kingdee-skills/ok-cosmic/setup/setup-mac.sh +18 -0
- package/vendor/kingdee-skills/ok-cosmic/setup/setup-windows.bat +53 -0
- package/vendor/kingdee-skills/ok-cosmic/setup/setup.jar +0 -0
- package/vendor/kingdee-skills/ok-ksql/SKILL.md +81 -0
- package/vendor/kingdee-skills/ok-ksql/agents/openai.yaml +7 -0
- package/vendor/kingdee-skills/ok-ksql/manifest.json +14 -0
- package/vendor/kingdee-skills/ok-ksql/references/ksql-datafix.md +452 -0
- package/vendor/kingdee-skills/ok-ksql/scripts/ksql_lint.py +363 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Cangqiong Product Notes
|
|
2
|
+
|
|
3
|
+
Cangqiong is a Cosmic-family product. Load Cosmic platform knowledge first, then apply Cangqiong-specific project or version details.
|
|
4
|
+
|
|
5
|
+
## Default Stack
|
|
6
|
+
|
|
7
|
+
- Platform: Cosmic.
|
|
8
|
+
- Language: Java.
|
|
9
|
+
- Main concerns: plugin lifecycle, metadata verification, SDK signature verification, KSQL safety, post-check loop.
|
|
10
|
+
|
|
11
|
+
## Harness Rules
|
|
12
|
+
|
|
13
|
+
- Do not use enterprise C# namespaces or lifecycle assumptions.
|
|
14
|
+
- Treat form, bill, list, operation, conversion, report, workflow, task, and OpenAPI scenes through the Cosmic plugin decision matrix.
|
|
15
|
+
- Verify fields and enum values through metadata before generating code.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# 金蝶业务流程指南
|
|
2
|
+
|
|
3
|
+
## 采购管理流程
|
|
4
|
+
|
|
5
|
+
### 采购订单流程
|
|
6
|
+
|
|
7
|
+
采购订单是采购管理的核心单据,贯穿从请购到付款的全流程。
|
|
8
|
+
|
|
9
|
+
**标准流程:**
|
|
10
|
+
1. 采购申请 → 2. 采购订单 → 3. 收料通知 → 4. 采购入库 → 5. 采购发票 → 6. 付款单
|
|
11
|
+
|
|
12
|
+
**关键字段:**
|
|
13
|
+
- FBILLNO:单据编号(自动生成)
|
|
14
|
+
- FDATE:单据日期
|
|
15
|
+
- FDOCUMENTSTATUS:单据状态(A=暂存, B=已提交, C=已审核)
|
|
16
|
+
- FCANCELSTATUS:作废状态(A=正常, B=作废)
|
|
17
|
+
- FSUPPLIERID:供应商ID
|
|
18
|
+
- FCURRENCYID:币种
|
|
19
|
+
- FEXCHANGERATE:汇率
|
|
20
|
+
|
|
21
|
+
**常用表:**
|
|
22
|
+
- T_PUR_POORDER:采购订单主表
|
|
23
|
+
- T_PUR_POORDERENTRY:采购订单明细表
|
|
24
|
+
- T_PUR_MRB:收料通知主表
|
|
25
|
+
- T_PUR_MRBBILL:收料通知明细
|
|
26
|
+
- T_PUR_ICSTOCKIN:采购入库主表
|
|
27
|
+
|
|
28
|
+
### 采购退货流程
|
|
29
|
+
|
|
30
|
+
**标准流程:**
|
|
31
|
+
1. 采购退货申请 → 2. 采购退料通知 → 3. 采购退料出库
|
|
32
|
+
|
|
33
|
+
**关键业务规则:**
|
|
34
|
+
- 退货必须关联原入库单
|
|
35
|
+
- 退货数量不能超过入库数量
|
|
36
|
+
- 退货需要审核流程
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## 销售管理流程
|
|
41
|
+
|
|
42
|
+
### 销售订单流程
|
|
43
|
+
|
|
44
|
+
**标准流程:**
|
|
45
|
+
1. 销售报价 → 2. 销售订单 → 3. 发货通知 → 4. 销售出库 → 5. 销售发票 → 6. 收款单
|
|
46
|
+
|
|
47
|
+
**关键字段:**
|
|
48
|
+
- FBILLNO:单据编号
|
|
49
|
+
- FDATE:单据日期
|
|
50
|
+
- FCUSTID:客户ID
|
|
51
|
+
- FSALEORGID:销售组织
|
|
52
|
+
- FSETTLECURRID:结算币种
|
|
53
|
+
|
|
54
|
+
**常用表:**
|
|
55
|
+
- T_SAL_ORDER:销售订单主表
|
|
56
|
+
- T_SAL_ORDERENTRY:销售订单明细表
|
|
57
|
+
- T_SAL_DELIVERYNOTICE:发货通知主表
|
|
58
|
+
- T_SAL_OUTBOUND:销售出库主表
|
|
59
|
+
|
|
60
|
+
### 销售退货流程
|
|
61
|
+
|
|
62
|
+
**标准流程:**
|
|
63
|
+
1. 销售退货申请 → 2. 销售退料通知 → 3. 销售退料入库
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## 库存管理流程
|
|
68
|
+
|
|
69
|
+
### 库存盘点流程
|
|
70
|
+
|
|
71
|
+
**标准流程:**
|
|
72
|
+
1. 新建盘点方案 → 2. 生成盘点表 → 3. 录入盘点结果 → 4. 盘点差异处理 → 5. 盘点报告
|
|
73
|
+
|
|
74
|
+
**关键表:**
|
|
75
|
+
- T_STK_INVENTORY:库存余额表
|
|
76
|
+
- T_STK_STOCK:仓库表
|
|
77
|
+
- T_STK_CHECKBILL:盘点表主表
|
|
78
|
+
- T_STK_CHECKBILLENTRY:盘点表明细
|
|
79
|
+
|
|
80
|
+
### 库存调拨流程
|
|
81
|
+
|
|
82
|
+
**标准流程:**
|
|
83
|
+
1. 调拨申请 → 2. 调拨单 → 3. 调拨出库 → 4. 调拨入库
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## 生产管理流程
|
|
88
|
+
|
|
89
|
+
### 生产订单流程
|
|
90
|
+
|
|
91
|
+
**标准流程:**
|
|
92
|
+
1. 生产计划 → 2. 生产订单 → 3. 领料单 → 4. 完工报告 → 5. 产品入库
|
|
93
|
+
|
|
94
|
+
**关键表:**
|
|
95
|
+
- T_PRD_MO:生产订单主表
|
|
96
|
+
- T_PRD_MOENTRY:生产订单明细表
|
|
97
|
+
- T_PRD_PPBOM:生产领料主表
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## 财务管理流程
|
|
102
|
+
|
|
103
|
+
### 应收应付流程
|
|
104
|
+
|
|
105
|
+
**应收流程:**
|
|
106
|
+
销售发票 → 应收单 → 收款单 → 核销
|
|
107
|
+
|
|
108
|
+
**应付流程:**
|
|
109
|
+
采购发票 → 应付单 → 付款单 → 核销
|
|
110
|
+
|
|
111
|
+
**关键表:**
|
|
112
|
+
- T_AR_RECEIVABLE:应收单
|
|
113
|
+
- T_AP_PAYABLE:应付单
|
|
114
|
+
- T_AR_RECEIPT:收款单
|
|
115
|
+
- T_AP_PAYMENT:付款单
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# 金蝶通用配置指南
|
|
2
|
+
|
|
3
|
+
## 组织架构配置
|
|
4
|
+
|
|
5
|
+
### 组织类型
|
|
6
|
+
|
|
7
|
+
金蝶云星空支持多种组织类型:
|
|
8
|
+
- **法人公司**:独立法人实体
|
|
9
|
+
- **核算组织**:财务核算主体
|
|
10
|
+
- **库存组织**:仓库管理单位
|
|
11
|
+
- **销售组织**:销售业务单位
|
|
12
|
+
- **采购组织**:采购业务单位
|
|
13
|
+
|
|
14
|
+
### 组织配置要点
|
|
15
|
+
|
|
16
|
+
1. **组织层级**:支持多层级组织架构
|
|
17
|
+
2. **组织权限**:每个用户可访问多个组织
|
|
18
|
+
3. **数据隔离**:不同组织数据默认隔离
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 编码规则配置
|
|
23
|
+
|
|
24
|
+
### 编码规则类型
|
|
25
|
+
|
|
26
|
+
- **自动编号**:系统自动生成(推荐)
|
|
27
|
+
- **手动编号**:用户手动输入
|
|
28
|
+
- **外部编号**:从外部系统导入
|
|
29
|
+
|
|
30
|
+
### 配置步骤
|
|
31
|
+
|
|
32
|
+
1. 进入【系统管理】→【编码规则】
|
|
33
|
+
2. 选择单据类型
|
|
34
|
+
3. 设置编码前缀、位数、流水号
|
|
35
|
+
4. 设置是否允许修改
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## 工作流配置
|
|
40
|
+
|
|
41
|
+
### 审批流程配置
|
|
42
|
+
|
|
43
|
+
**基本流程:**
|
|
44
|
+
1. 创建审批流 → 2. 设置审批节点 → 3. 配置审批人 → 4. 设置条件分支
|
|
45
|
+
|
|
46
|
+
**审批类型:**
|
|
47
|
+
- **会签**:所有审批人都需审批
|
|
48
|
+
- **或签**:任一审批人审批即可
|
|
49
|
+
- **依次审批**:按顺序逐级审批
|
|
50
|
+
|
|
51
|
+
### 消息通知配置
|
|
52
|
+
|
|
53
|
+
- 站内消息
|
|
54
|
+
- 邮件通知
|
|
55
|
+
- 短信通知(需配置短信网关)
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## 打印配置
|
|
60
|
+
|
|
61
|
+
### 打印模板
|
|
62
|
+
|
|
63
|
+
- **表头**:公司名称、单据标题
|
|
64
|
+
- **表体**:明细数据表格
|
|
65
|
+
- **表脚**:签名栏、备注
|
|
66
|
+
|
|
67
|
+
### 配置步骤
|
|
68
|
+
|
|
69
|
+
1. 进入【系统管理】→【打印管理】
|
|
70
|
+
2. 选择单据类型
|
|
71
|
+
3. 设计打印模板
|
|
72
|
+
4. 设置默认打印机
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## 权限配置
|
|
77
|
+
|
|
78
|
+
### 权限体系
|
|
79
|
+
|
|
80
|
+
- **功能权限**:控制菜单访问
|
|
81
|
+
- **数据权限**:控制数据范围
|
|
82
|
+
- **字段权限**:控制字段可见性
|
|
83
|
+
- **操作权限**:控制按钮可用性
|
|
84
|
+
|
|
85
|
+
### 角色配置
|
|
86
|
+
|
|
87
|
+
1. 创建角色
|
|
88
|
+
2. 分配功能权限
|
|
89
|
+
3. 设置数据权限
|
|
90
|
+
4. 分配用户到角色
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## 基础资料配置
|
|
95
|
+
|
|
96
|
+
### 必配基础资料
|
|
97
|
+
|
|
98
|
+
- **币种**:人民币、美元等
|
|
99
|
+
- **计量单位**:个、箱、吨等
|
|
100
|
+
- **仓库**:实体仓库、虚拟仓库
|
|
101
|
+
- **客户/供应商**:业务伙伴信息
|
|
102
|
+
- **物料**:产品/原材料信息
|
|
103
|
+
|
|
104
|
+
### 物料配置要点
|
|
105
|
+
|
|
106
|
+
- **物料编码**:唯一标识
|
|
107
|
+
- **物料名称**:显示名称
|
|
108
|
+
- **计量单位**:基本单位、辅助单位
|
|
109
|
+
- **物料分组**:分类管理
|
|
110
|
+
- **计价方法**:先进先出、加权平均等
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# 金蝶常见错误与解决方案
|
|
2
|
+
|
|
3
|
+
## 数据库相关错误
|
|
4
|
+
|
|
5
|
+
### SQL 执行超时
|
|
6
|
+
|
|
7
|
+
**错误信息:**
|
|
8
|
+
```
|
|
9
|
+
Timeout expired. The timeout period elapsed prior to completion of the operation
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
**可能原因:**
|
|
13
|
+
1. SQL 查询数据量过大
|
|
14
|
+
2. 缺少索引
|
|
15
|
+
3. 数据库服务器负载过高
|
|
16
|
+
|
|
17
|
+
**解决方案:**
|
|
18
|
+
1. 添加 WHERE 条件限制数据量
|
|
19
|
+
2. 检查并优化索引
|
|
20
|
+
3. 使用 TOP 限制返回行数
|
|
21
|
+
4. 避免 SELECT *,只查询需要的字段
|
|
22
|
+
|
|
23
|
+
### 死锁错误
|
|
24
|
+
|
|
25
|
+
**错误信息:**
|
|
26
|
+
```
|
|
27
|
+
Transaction (Process ID XX) was deadlocked on lock resources with another process
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**解决方案:**
|
|
31
|
+
1. 减少事务持有时间
|
|
32
|
+
2. 按固定顺序访问表
|
|
33
|
+
3. 使用较低的事务隔离级别
|
|
34
|
+
4. 避免在事务中进行用户交互
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## 插件相关错误
|
|
39
|
+
|
|
40
|
+
### 插件加载失败
|
|
41
|
+
|
|
42
|
+
**错误信息:**
|
|
43
|
+
```
|
|
44
|
+
未能加载文件或程序集 'XXX.dll' 或它的某一个依赖项
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**可能原因:**
|
|
48
|
+
1. DLL 文件不存在
|
|
49
|
+
2. 版本不匹配
|
|
50
|
+
3. 依赖项缺失
|
|
51
|
+
|
|
52
|
+
**解决方案:**
|
|
53
|
+
1. 检查 DLL 文件是否在正确目录
|
|
54
|
+
2. 确认引用版本与运行时版本一致
|
|
55
|
+
3. 使用 Fusion Log Viewer 查看绑定失败详情
|
|
56
|
+
|
|
57
|
+
### 插件执行异常
|
|
58
|
+
|
|
59
|
+
**错误信息:**
|
|
60
|
+
```
|
|
61
|
+
Object reference not set to an instance of an object
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**常见原因:**
|
|
65
|
+
1. 未检查 null 值
|
|
66
|
+
2. 数据实体字段不存在
|
|
67
|
+
3. 上下文对象未初始化
|
|
68
|
+
|
|
69
|
+
**代码示例(正确做法):**
|
|
70
|
+
```csharp
|
|
71
|
+
// 企业版 C#
|
|
72
|
+
var value = dataEntity["FQty"];
|
|
73
|
+
if (value != null)
|
|
74
|
+
{
|
|
75
|
+
var qty = Convert.ToDecimal(value);
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
```java
|
|
80
|
+
// 旗舰版 Java
|
|
81
|
+
Object value = dataEntity.get("qty");
|
|
82
|
+
if (value != null) {
|
|
83
|
+
BigDecimal qty = new BigDecimal(value.toString());
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## 配置相关错误
|
|
90
|
+
|
|
91
|
+
### 登录失败
|
|
92
|
+
|
|
93
|
+
**错误信息:**
|
|
94
|
+
```
|
|
95
|
+
登录失败,用户名或密码错误
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**解决方案:**
|
|
99
|
+
1. 检查用户名密码是否正确
|
|
100
|
+
2. 确认用户未被禁用
|
|
101
|
+
3. 检查数据库连接配置
|
|
102
|
+
|
|
103
|
+
### 许可证过期
|
|
104
|
+
|
|
105
|
+
**错误信息:**
|
|
106
|
+
```
|
|
107
|
+
系统许可证已过期,请联系管理员
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**解决方案:**
|
|
111
|
+
1. 联系金蝶客服续期
|
|
112
|
+
2. 导入新的许可证文件
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## 业务逻辑错误
|
|
117
|
+
|
|
118
|
+
### 单据状态不允许操作
|
|
119
|
+
|
|
120
|
+
**错误信息:**
|
|
121
|
+
```
|
|
122
|
+
当前单据状态不允许此操作
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**常见场景:**
|
|
126
|
+
- 已审核单据不能修改
|
|
127
|
+
- 已关闭单据不能删除
|
|
128
|
+
- 暂存单据不能提交
|
|
129
|
+
|
|
130
|
+
**解决方案:**
|
|
131
|
+
1. 检查单据当前状态
|
|
132
|
+
2. 确认操作是否符合业务流程
|
|
133
|
+
3. 必要时先反审核再操作
|
|
134
|
+
|
|
135
|
+
### 库存不足
|
|
136
|
+
|
|
137
|
+
**错误信息:**
|
|
138
|
+
```
|
|
139
|
+
库存不足,当前可用库存为 X
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**解决方案:**
|
|
143
|
+
1. 检查库存数据是否准确
|
|
144
|
+
2. 确认是否允许负库存
|
|
145
|
+
3. 调整出库数量
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## 性能相关问题
|
|
150
|
+
|
|
151
|
+
### 页面加载缓慢
|
|
152
|
+
|
|
153
|
+
**可能原因:**
|
|
154
|
+
1. 基础数据量过大
|
|
155
|
+
2. 网络延迟
|
|
156
|
+
3. 服务器资源不足
|
|
157
|
+
|
|
158
|
+
**优化建议:**
|
|
159
|
+
1. 使用分页加载
|
|
160
|
+
2. 启用缓存
|
|
161
|
+
3. 优化数据库查询
|
|
162
|
+
4. 增加服务器资源
|
|
163
|
+
|
|
164
|
+
### 报表生成超时
|
|
165
|
+
|
|
166
|
+
**优化建议:**
|
|
167
|
+
1. 减少数据范围
|
|
168
|
+
2. 使用预计算
|
|
169
|
+
3. 异步生成报表
|
|
170
|
+
4. 优化 SQL 查询
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# 金蝶实施方法论
|
|
2
|
+
|
|
3
|
+
## 实施阶段划分
|
|
4
|
+
|
|
5
|
+
### 第一阶段:项目准备
|
|
6
|
+
|
|
7
|
+
**关键活动:**
|
|
8
|
+
1. 项目启动会
|
|
9
|
+
2. 组建项目团队
|
|
10
|
+
3. 制定项目计划
|
|
11
|
+
4. 确认项目范围
|
|
12
|
+
|
|
13
|
+
**交付物:**
|
|
14
|
+
- 项目章程
|
|
15
|
+
- 项目计划
|
|
16
|
+
- 需求调研问卷
|
|
17
|
+
|
|
18
|
+
### 第二阶段:蓝图设计
|
|
19
|
+
|
|
20
|
+
**关键活动:**
|
|
21
|
+
1. 现状调研
|
|
22
|
+
2. 需求分析
|
|
23
|
+
3. 业务流程设计
|
|
24
|
+
4. 解决方案设计
|
|
25
|
+
|
|
26
|
+
**交付物:**
|
|
27
|
+
- 业务蓝图文档
|
|
28
|
+
- 解决方案文档
|
|
29
|
+
- 数据迁移方案
|
|
30
|
+
|
|
31
|
+
### 第三阶段:系统实现
|
|
32
|
+
|
|
33
|
+
**关键活动:**
|
|
34
|
+
1. 系统配置
|
|
35
|
+
2. 二次开发
|
|
36
|
+
3. 数据迁移
|
|
37
|
+
4. 用户培训
|
|
38
|
+
|
|
39
|
+
**交付物:**
|
|
40
|
+
- 配置文档
|
|
41
|
+
- 开发文档
|
|
42
|
+
- 培训材料
|
|
43
|
+
|
|
44
|
+
### 第四阶段:上线切换
|
|
45
|
+
|
|
46
|
+
**关键活动:**
|
|
47
|
+
1. 用户验收测试
|
|
48
|
+
2. 数据初始化
|
|
49
|
+
3. 系统切换
|
|
50
|
+
4. 上线支持
|
|
51
|
+
|
|
52
|
+
**交付物:**
|
|
53
|
+
- 测试报告
|
|
54
|
+
- 上线方案
|
|
55
|
+
- 运维手册
|
|
56
|
+
|
|
57
|
+
### 第五阶段:持续支持
|
|
58
|
+
|
|
59
|
+
**关键活动:**
|
|
60
|
+
1. 问题跟踪
|
|
61
|
+
2. 优化建议
|
|
62
|
+
3. 版本升级
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## 需求分析方法
|
|
67
|
+
|
|
68
|
+
### 需求收集技巧
|
|
69
|
+
|
|
70
|
+
1. **访谈法**:与关键用户一对一访谈
|
|
71
|
+
2. **问卷法**:大范围收集需求
|
|
72
|
+
3. **观察法**:现场观察业务操作
|
|
73
|
+
4. **研讨会**:集体讨论业务流程
|
|
74
|
+
|
|
75
|
+
### 需求分类
|
|
76
|
+
|
|
77
|
+
- **功能需求**:系统需要实现的功能
|
|
78
|
+
- **非功能需求**:性能、安全、可用性
|
|
79
|
+
- **约束条件**:技术限制、时间限制
|
|
80
|
+
|
|
81
|
+
### 需求优先级
|
|
82
|
+
|
|
83
|
+
- **P0(必须)**:核心业务流程
|
|
84
|
+
- **P1(重要)**:重要但非核心
|
|
85
|
+
- **P2(期望)**:锦上添花的功能
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## 数据迁移策略
|
|
90
|
+
|
|
91
|
+
### 迁移范围
|
|
92
|
+
|
|
93
|
+
1. **基础数据**:客户、供应商、物料
|
|
94
|
+
2. **期初数据**:库存余额、应收应付
|
|
95
|
+
3. **历史数据**:历史单据(可选)
|
|
96
|
+
|
|
97
|
+
### 迁移步骤
|
|
98
|
+
|
|
99
|
+
1. 数据清洗
|
|
100
|
+
2. 数据映射
|
|
101
|
+
3. 试迁移
|
|
102
|
+
4. 数据验证
|
|
103
|
+
5. 正式迁移
|
|
104
|
+
|
|
105
|
+
### 数据验证要点
|
|
106
|
+
|
|
107
|
+
- 数据完整性检查
|
|
108
|
+
- 数据一致性检查
|
|
109
|
+
- 业务规则验证
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## 用户培训计划
|
|
114
|
+
|
|
115
|
+
### 培训对象
|
|
116
|
+
|
|
117
|
+
- **关键用户**:深度培训,能处理日常问题
|
|
118
|
+
- **最终用户**:操作培训,能完成日常业务
|
|
119
|
+
- **系统管理员**:技术培训,能处理系统问题
|
|
120
|
+
|
|
121
|
+
### 培训方式
|
|
122
|
+
|
|
123
|
+
- 集中培训
|
|
124
|
+
- 一对一辅导
|
|
125
|
+
- 操作手册
|
|
126
|
+
- 视频教程
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## 风险管理
|
|
131
|
+
|
|
132
|
+
### 常见风险
|
|
133
|
+
|
|
134
|
+
1. **需求变更频繁**:建立变更控制流程
|
|
135
|
+
2. **数据质量差**:提前进行数据清洗
|
|
136
|
+
3. **用户抵触**:加强沟通和培训
|
|
137
|
+
4. **技术难题**:预留技术攻关时间
|
|
138
|
+
|
|
139
|
+
### 风险应对
|
|
140
|
+
|
|
141
|
+
- **规避**:调整计划避免风险
|
|
142
|
+
- **转移**:外包或购买保险
|
|
143
|
+
- **缓解**:降低风险影响
|
|
144
|
+
- **接受**:准备应急方案
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Cosmic Hard Constraints
|
|
2
|
+
|
|
3
|
+
These are blocking constraints for Cosmic-family Java products: Cangqiong, Xinghan, and Xingkong Flagship.
|
|
4
|
+
|
|
5
|
+
## No Hallucinated Facts
|
|
6
|
+
|
|
7
|
+
- Do not invent API signatures, event methods, field keys, enum values, or entity IDs.
|
|
8
|
+
- Do not use guessed methods such as `setReadOnly`, `afterCreateControl`, `IDataModel.setReadOnly`, `this.getView().refresh`, `model.getEntryCount`, `model.deleteRow`, `model.addRow`, or `QueryServiceHelper.queryAll`.
|
|
9
|
+
- Do not invent generic helper classes such as `BillHelper`, `FormHelper`, `ListHelper`, `PluginHelper`, or `Cosmic*Helper` unless verified in the project or official API knowledge.
|
|
10
|
+
|
|
11
|
+
## Lifecycle Boundaries
|
|
12
|
+
|
|
13
|
+
- Do not register listeners or perform UI work in `initialize`.
|
|
14
|
+
- Do not mutate data in `beforeBindData` or `afterBindData`.
|
|
15
|
+
- Use view APIs for UI state and model APIs for data.
|
|
16
|
+
- Operation plugins should operate on data packets and operation arguments, not UI view/model objects.
|
|
17
|
+
|
|
18
|
+
## Metadata and Fields
|
|
19
|
+
|
|
20
|
+
- Verify fields before code generation whenever a target form or bill is known.
|
|
21
|
+
- Verify combo/drop-down option values from metadata; never guess status values.
|
|
22
|
+
- Clone cached metadata before modification.
|
|
23
|
+
- Do not access platform metadata tables directly from business code.
|
|
24
|
+
|
|
25
|
+
## Data, Transaction, and Performance
|
|
26
|
+
|
|
27
|
+
- Parameterize SQL/KSQL; do not concatenate untrusted conditions.
|
|
28
|
+
- Close `DataSet` resources with try-with-resources.
|
|
29
|
+
- Do not use a `DataSet` outside the transaction or resource scope that created it.
|
|
30
|
+
- Mark rollback when catching exceptions inside explicit transaction blocks.
|
|
31
|
+
- Avoid cross-database writes in one transaction.
|
|
32
|
+
- Do not call DB, Redis, `ORM.create`, dispatch service, save, or `updateView` inside loops.
|
|
33
|
+
|
|
34
|
+
## Logging and Exceptions
|
|
35
|
+
|
|
36
|
+
- Use platform logging instead of `System.out` or `printStackTrace`.
|
|
37
|
+
- Do not leave empty catch blocks.
|
|
38
|
+
- Preserve original causes when wrapping exceptions.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Cosmic KSQL Data Fix
|
|
2
|
+
|
|
3
|
+
Use for KSQL/SQL data repair in Cosmic-family products. This is not Java plugin generation.
|
|
4
|
+
|
|
5
|
+
## Preconditions
|
|
6
|
+
|
|
7
|
+
- Confirm product, environment, target bill/form/entity, operation type, target fields, conditions, and risk boundary.
|
|
8
|
+
- Use Cosmic metadata capability to confirm table names, database names, DB keys, field names, field types, enum values, and base-data storage fields.
|
|
9
|
+
- If metadata is unavailable and the user has not supplied verified metadata, stop and list pending confirmations.
|
|
10
|
+
|
|
11
|
+
## Cross-Database Rules
|
|
12
|
+
|
|
13
|
+
- Check whether all participating tables are in the same database.
|
|
14
|
+
- Do not generate ordinary update SQL for cross-database scenarios.
|
|
15
|
+
- For cross-database fixes, require explicit handling strategy such as temporary table, export/import, dblink, or postgres_fdw.
|
|
16
|
+
|
|
17
|
+
## SQL Script Structure
|
|
18
|
+
|
|
19
|
+
- Impact query.
|
|
20
|
+
- Full table backup using a `bak_` table with timestamp.
|
|
21
|
+
- Pre-update confirmation query.
|
|
22
|
+
- Formal update statement.
|
|
23
|
+
- Post-update verification query.
|
|
24
|
+
- Rollback statement.
|
|
25
|
+
- Field mapping section from verified metadata.
|
|
26
|
+
|
|
27
|
+
## Safety Rules
|
|
28
|
+
|
|
29
|
+
- Every update and delete must have a `WHERE` clause.
|
|
30
|
+
- Write the matching query before the update.
|
|
31
|
+
- Query and verification statements should not use `SELECT *`; full backup is the exception.
|
|
32
|
+
- Default dialect is PostgreSQL unless the user specifies otherwise.
|
|
33
|
+
- Prefer readable `IN` membership conditions unless `EXISTS` is required for semantics.
|
|
34
|
+
- Run the official KSQL lint script when available and fix errors before delivery.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Cosmic Platform Baseline
|
|
2
|
+
|
|
3
|
+
Cosmic is the shared platform base for Cangqiong, Xinghan, and Xingkong Flagship. Treat these as Cosmic-family Java products unless a product-specific rule overrides the platform baseline.
|
|
4
|
+
|
|
5
|
+
## Product Routing
|
|
6
|
+
|
|
7
|
+
- Cangqiong, Xinghan, and Xingkong Flagship use the Cosmic Java plugin and SDK model.
|
|
8
|
+
- Enterprise is not Cosmic-family; it uses a separate C# stack and must not receive Java plugin assumptions.
|
|
9
|
+
- `cosmic` by itself means the platform/base layer, not a final business product selection.
|
|
10
|
+
- Before coding, identify the concrete product, version, form/bill/entity, plugin type, lifecycle event, and target fields.
|
|
11
|
+
|
|
12
|
+
## Development Flow
|
|
13
|
+
|
|
14
|
+
- Run Cosmic configuration precheck before relying on official query scripts.
|
|
15
|
+
- Use "wrapper first, native fallback": prefer project or official encapsulations when available; use native SDK only after checking references or query scripts.
|
|
16
|
+
- Translate natural language into timing, carrier, and capability before choosing implementation type.
|
|
17
|
+
- Generate code only after plugin type, event method, field metadata, enum values, and API signatures are verified.
|
|
18
|
+
- After changing Cosmic Java code, run the official post-check flow when the official skill/scripts are available.
|
|
19
|
+
|
|
20
|
+
## Required Verification
|
|
21
|
+
|
|
22
|
+
- Field keys, Chinese field names, enum values, `refType`, and entity IDs must be verified through metadata before code generation.
|
|
23
|
+
- API class names and method signatures must be verified unless covered by an approved cheat sheet.
|
|
24
|
+
- Base data queries require a verified `entityId`; do not infer it from display names.
|
|
25
|
+
- Query scripts can fail or run in cache-only mode; do not continue if the missing result is a prerequisite for the code.
|
|
26
|
+
|
|
27
|
+
## Useful Official Skill Sources
|
|
28
|
+
|
|
29
|
+
- `E:\projects\kingdee\skills\ok-cosmic-v4.0.0.zip`
|
|
30
|
+
- `E:\projects\kingdee\skills\kingdee-cosmic-reviewer-v2.0.0.zip`
|
|
31
|
+
- `E:\projects\kingdee\skills\cosmic-unittest-v2.0.0.zip`
|
|
32
|
+
- `E:\projects\kingdee\skills\ok-ksql-v1.0.0.zip`
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Cosmic Plugin Decision Matrix
|
|
2
|
+
|
|
3
|
+
Use this matrix for Cangqiong, Xinghan, and Xingkong Flagship.
|
|
4
|
+
|
|
5
|
+
## UI and Form Plugins
|
|
6
|
+
|
|
7
|
+
- Form UI, field linkage, control interaction: form plugin.
|
|
8
|
+
- Bill UI, submit/audit button behavior, bill page logic: bill plugin.
|
|
9
|
+
- List selection, batch operation entry points, list filters: list plugin.
|
|
10
|
+
- Left-tree-right-table scenes: tree list plugin.
|
|
11
|
+
- UI control state belongs to the view layer. Data read/write belongs to the model layer.
|
|
12
|
+
- Register listeners in listener registration lifecycle, not in initialization.
|
|
13
|
+
|
|
14
|
+
## Operation and Data Plugins
|
|
15
|
+
|
|
16
|
+
- Save, audit, submit, status transition, validation, rollback: operation plugin or validator.
|
|
17
|
+
- Operation plugins do not have UI context; do not call `getView()` from operation service plugins.
|
|
18
|
+
- Declare required fields in operation preparation hooks before reading them in validators or operation plugins.
|
|
19
|
+
- Modify the transaction data packet directly inside operation transaction hooks; do not call independent save APIs inside the same hook unless explicitly required and reviewed.
|
|
20
|
+
|
|
21
|
+
## Conversion and Writeback
|
|
22
|
+
|
|
23
|
+
- Push/downstream conversion/source tracing: convert plugin.
|
|
24
|
+
- BOTP writeback stage: writeback plugin.
|
|
25
|
+
- Verify source and target entity metadata before field mapping.
|
|
26
|
+
|
|
27
|
+
## Backend and Integration
|
|
28
|
+
|
|
29
|
+
- Scheduled jobs and background tasks: task plugin.
|
|
30
|
+
- Workflow/approval flow hooks: workflow plugin.
|
|
31
|
+
- External integration: OpenAPI controller or service layer, depending on entry point.
|
|
32
|
+
- Reports and data analysis: report form plugin or report data plugin.
|
|
33
|
+
|
|
34
|
+
## Data Access
|
|
35
|
+
|
|
36
|
+
- Existence check: query an ID rather than loading a full data package.
|
|
37
|
+
- Small field reads: use query APIs.
|
|
38
|
+
- Full hierarchical package: load business data package.
|
|
39
|
+
- Large data streams: use DataSet and close resources.
|
|
40
|
+
- Batch load outside loops; avoid per-row service calls.
|