@stalfh233/omc-cli 0.6.43 → 0.6.44
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stalfh233/omc-cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.44",
|
|
4
4
|
"description": "CloudPivot 8.6 configuration capability CLI — governed, fail-closed, coverage-manifest bounded.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"commander": "14.0.3",
|
|
58
|
-
"omc-core": "0.6.
|
|
58
|
+
"omc-core": "0.6.44",
|
|
59
59
|
"proper-lockfile": "4.1.2",
|
|
60
60
|
"write-file-atomic": "6.0.0",
|
|
61
61
|
"zod": "^3.23.8",
|
|
@@ -73,6 +73,6 @@
|
|
|
73
73
|
"directory": "packages/omc-cli"
|
|
74
74
|
},
|
|
75
75
|
"optionalDependencies": {
|
|
76
|
-
"@stalfh233/omc-fake-platform": "0.6.
|
|
76
|
+
"@stalfh233/omc-fake-platform": "0.6.44"
|
|
77
77
|
}
|
|
78
78
|
}
|
|
@@ -94,10 +94,9 @@ only the section for the capability you need —
|
|
|
94
94
|
- **计算类需求默认走「普通字段 + 计算规则」,不要建「计算公式」字段类型(FORMULA)**:建一个**数值/单行文本**业务字段,再配一条**字段级计算规则**(`datarule.create` `dataRuleType:2`,`options.shortTextStitch={"formula","editorText","editorMark"}`)。理由:平台约定用正常业务字段承载、顺带配计算规则(真机 2026-10-08 production 表单核验 + 设计器弹窗显示)。「计算公式」字段类型不是默认,仅当确需一列专用公式时才用。
|
|
95
95
|
- **计算规则公式引用**:同类字段裸 `{字段code}`(`{a}+{b}`);**子表列用 `{子表字段code.子列code}`**(`{Sub_item_information_table.taxInclusiveAmount}`);子表求和 `SUM({子表.子列})`;支持 `IF(cond,a,b)`、`CASE(v,c1,r1,c2,r2)`、`VALUE()`、`AND`、比较 `=`、字符串字面量与运算符空格。recipe:`omc describe datarule.create --example field-compute-rule|field-compute-subtable-sum|field-compute-child-column`。
|
|
96
96
|
- 计算规则(`dataRuleType:2`)**在 REST 路径上不会执行也不会回填**(r17 2026-10-25 复核:`data.submit`/`data.update` 后目标字段仍为传入值)。
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
-
-
|
|
100
|
-
- **落地分工**:要**填单即时可见**配表单在线 JS(`onlinejs.compose`);要**服务端权威值**走在线编码,且 update 时显式传 `invokeCalculateRule=true`(默认不传就静默不算)。别默认「建了计算规则就会算」——先 `data.load` 读目标字段确认。
|
|
97
|
+
- **公式函数面 64 个,日期运算完备**(运行版 1.1.25 反编译实证):含 `NOW/TODAY/ADDDAY/ADDHOUR/ADDMINUTE/ADDMONTH/ADDYEAR/DATEDIF` 等,"当前时刻 + N 小时"这类**公式本身就能表达**,不必上二开。完整清单与写法查 `omc capability datarule --executable`(逐族列表)与 `omc describe datarule.create --example field-compute-rule`(含方向/单位陷阱)。别凭"文档没写"推断"平台没有"(`ops/GRIND.md` §四之三)。
|
|
98
|
+
- **但「公式能写」≠「保存时会算」**(r17 真机 + 2026-11-12 反编译复核):普通 `data.submit`/`data.update` 不触发——`CalculateHandler.onHandler` 只在 `CalcSwitchConf.isForceExecuteCalculateRule()` 为真时跑,该开关默认 false。**服务端要算必须显式要**:`OpenEngine.updateBizObject(bizObject, invokeCalculateRule=true)`(在线编码可用);8.5.x+ EngineService 侧对应 `BizObjectOptions.builder().executeCalRule(true)`。
|
|
99
|
+
- **落地分工**:填单即时可见 → 表单在线 JS(`onlinejs.compose`);服务端权威值 → 在线编码 + 显式 `invokeCalculateRule=true`(不传就静默不算);正确性人工确认 → 门户点一次。别默认「建了规则就会算」,用 `data.load` 读目标字段确认。
|
|
101
100
|
- recipe:`omc describe datarule.create --example field-compute-rule|field-compute-subtable-sum|field-compute-child-column`。
|
|
102
101
|
- **跨模型汇总可以用 FORMULA(100) + AGGREGATION,REST 能回算**(r17 真机 100→105):`omc describe field.create --example formula-aggregation-cross-model`;`queryConditions` 必须给 DYNAMIC 条件(propertyCode=来源字段、currentPropertyCode=目标字段),空条件静默得 0。
|
|
103
102
|
- **同模型(含自己的子表)聚合不可用**:`field.publish` 必抛 305003(`aggregation-self-schema-cycle`,平台 `checkCycleOfAggregation:1032` 逻辑成环)。
|