@ibiz-template/runtime 0.4.16 → 0.4.17-dev.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/dist/index.esm.js +477 -355
- package/dist/index.system.min.js +2 -2
- package/out/app-hub.d.ts +8 -0
- package/out/app-hub.d.ts.map +1 -1
- package/out/app-hub.js +13 -0
- package/out/controller/common/base.controller.d.ts +1 -0
- package/out/controller/common/base.controller.d.ts.map +1 -1
- package/out/controller/common/base.controller.js +2 -0
- package/out/controller/common/view/view.controller.d.ts.map +1 -1
- package/out/controller/common/view/view.controller.js +9 -3
- package/out/controller/common/view/wf-step-trace-view.controller.d.ts.map +1 -1
- package/out/controller/common/view/wf-step-trace-view.controller.js +3 -2
- package/out/controller/control/calendar/calendar.service.d.ts +3 -3
- package/out/controller/control/calendar/calendar.service.d.ts.map +1 -1
- package/out/controller/control/calendar/calendar.service.js +2 -2
- package/out/controller/control/form/edit-form/edit-form.service.d.ts +18 -18
- package/out/controller/control/form/edit-form/edit-form.service.d.ts.map +1 -1
- package/out/controller/control/form/edit-form/edit-form.service.js +11 -11
- package/out/controller/control/form/form/form.service.d.ts +2 -2
- package/out/controller/control/form/form/form.service.d.ts.map +1 -1
- package/out/controller/control/form/form/form.service.js +1 -1
- package/out/controller/control/form/search-form/search-form.service.d.ts +2 -2
- package/out/controller/control/form/search-form/search-form.service.d.ts.map +1 -1
- package/out/controller/control/form/search-form/search-form.service.js +1 -1
- package/out/controller/control/gantt/gantt.controller.d.ts.map +1 -1
- package/out/controller/control/gantt/gantt.controller.js +1 -0
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +1 -1
- package/out/controller/control/grid/grid/grid.service.d.ts +2 -2
- package/out/controller/control/grid/grid/grid.service.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.service.js +2 -2
- package/out/controller/control/kanban/kanban.service.d.ts +2 -2
- package/out/controller/control/kanban/kanban.service.d.ts.map +1 -1
- package/out/controller/control/kanban/kanban.service.js +1 -1
- package/out/controller/control/map/map.service.d.ts +1 -1
- package/out/controller/control/map/map.service.js +1 -1
- package/out/controller/control/report-panel/report-panel.service.d.ts +2 -2
- package/out/controller/control/report-panel/report-panel.service.d.ts.map +1 -1
- package/out/controller/control/report-panel/report-panel.service.js +1 -1
- package/out/controller/control/tree/tree.service.d.ts +2 -2
- package/out/controller/control/tree/tree.service.d.ts.map +1 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex.controller.d.ts.map +1 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex.controller.js +1 -0
- package/out/controller/control/wizard-panel/wizard-panel.service.d.ts +4 -4
- package/out/controller/control/wizard-panel/wizard-panel.service.d.ts.map +1 -1
- package/out/controller/control/wizard-panel/wizard-panel.service.js +2 -2
- package/out/controller/utils/value-default/value-default.d.ts +1 -1
- package/out/controller/utils/value-default/value-default.d.ts.map +1 -1
- package/out/de-logic/de-logic-context.d.ts +5 -5
- package/out/de-logic/de-logic-context.d.ts.map +1 -1
- package/out/de-logic/de-logic-context.js +1 -1
- package/out/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.d.ts +2 -2
- package/out/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.d.ts.map +1 -1
- package/out/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.js +1 -1
- package/out/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.d.ts +2 -2
- package/out/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.d.ts.map +1 -1
- package/out/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.js +1 -1
- package/out/de-logic/de-logic-link/de-logic-link.d.ts +1 -1
- package/out/de-logic/de-logic-link/de-logic-link.js +1 -1
- package/out/de-logic/de-logic-node/de-logic-node.d.ts +1 -1
- package/out/de-logic/de-logic-param/de-logic-param.d.ts +1 -1
- package/out/de-logic/de-logic-param/de-logic-param.js +1 -1
- package/out/de-logic/de-logic.d.ts +3 -3
- package/out/de-logic/de-logic.d.ts.map +1 -1
- package/out/de-logic/de-logic.js +2 -2
- package/out/de-logic/index.d.ts +8 -8
- package/out/de-logic/index.d.ts.map +1 -1
- package/out/de-logic/index.js +5 -5
- package/out/install.d.ts.map +1 -1
- package/out/install.js +3 -0
- package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts +8 -0
- package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts.map +1 -1
- package/out/interface/common/i-data-ability-params/i-data-ability-params.d.ts +1 -1
- package/out/interface/common/i-data-ability-params/i-data-ability-params.d.ts.map +1 -1
- package/out/interface/controller/controller/i.controller.d.ts +8 -0
- package/out/interface/controller/controller/i.controller.d.ts.map +1 -1
- package/out/interface/provider/i-de-method.provider.d.ts +10 -1
- package/out/interface/provider/i-de-method.provider.d.ts.map +1 -1
- package/out/interface/provider/i-grid-column.provider.d.ts +2 -2
- package/out/interface/provider/i-grid-column.provider.d.ts.map +1 -1
- package/out/interface/service/service/i-app-de.service.d.ts +49 -43
- package/out/interface/service/service/i-app-de.service.d.ts.map +1 -1
- package/out/interface/service/service/i-file.service.d.ts +2 -2
- package/out/interface/service/service/i-file.service.d.ts.map +1 -1
- package/out/interface/service/service/i-wf.service.d.ts +12 -12
- package/out/interface/service/service/i-wf.service.d.ts.map +1 -1
- package/out/register/helper/grid-column-register.d.ts +2 -2
- package/out/register/helper/grid-column-register.d.ts.map +1 -1
- package/out/register/helper/grid-column-register.js +0 -14
- package/out/service/de-service-util.d.ts +26 -13
- package/out/service/de-service-util.d.ts.map +1 -1
- package/out/service/de-service-util.js +45 -16
- package/out/service/dto/method.dto.d.ts +20 -8
- package/out/service/dto/method.dto.d.ts.map +1 -1
- package/out/service/dto/method.dto.js +33 -15
- package/out/service/service/authority/authority.service.d.ts +1 -1
- package/out/service/service/authority/authority.service.js +1 -1
- package/out/service/service/code-list/code-list.service.d.ts +3 -3
- package/out/service/service/code-list/code-list.service.d.ts.map +1 -1
- package/out/service/service/code-list/code-list.service.js +2 -2
- package/out/service/service/control/control.service.d.ts +2 -2
- package/out/service/service/control/control.service.d.ts.map +1 -1
- package/out/service/service/control/control.service.js +1 -1
- package/out/service/service/control/md-control.service.d.ts +13 -13
- package/out/service/service/control/md-control.service.d.ts.map +1 -1
- package/out/service/service/control/md-control.service.js +7 -7
- package/out/service/service/counter/counter.service.d.ts +3 -3
- package/out/service/service/counter/counter.service.d.ts.map +1 -1
- package/out/service/service/counter/counter.service.js +1 -1
- package/out/service/service/entity/de.service.d.ts +46 -28
- package/out/service/service/entity/de.service.d.ts.map +1 -1
- package/out/service/service/entity/de.service.js +35 -71
- package/out/service/service/entity/method/de-action.d.ts +23 -33
- package/out/service/service/entity/method/de-action.d.ts.map +1 -1
- package/out/service/service/entity/method/de-action.js +18 -35
- package/out/service/service/entity/method/fetch.d.ts +3 -4
- package/out/service/service/entity/method/fetch.d.ts.map +1 -1
- package/out/service/service/entity/method/fetch.js +3 -8
- package/out/service/service/entity/method/method-input.d.ts +10 -5
- package/out/service/service/entity/method/method-input.d.ts.map +1 -1
- package/out/service/service/entity/method/method-input.js +9 -8
- package/out/service/service/entity/method/method-renturn.d.ts +10 -7
- package/out/service/service/entity/method/method-renturn.d.ts.map +1 -1
- package/out/service/service/entity/method/method-renturn.js +9 -9
- package/out/service/service/entity/method/method.d.ts +11 -27
- package/out/service/service/entity/method/method.d.ts.map +1 -1
- package/out/service/service/entity/method/method.js +9 -21
- package/out/service/service/entity/method/provider/de-action-de-method.provider.d.ts +2 -2
- package/out/service/service/entity/method/provider/de-action-de-method.provider.d.ts.map +1 -1
- package/out/service/service/entity/method/provider/de-action-de-method.provider.js +2 -2
- package/out/service/service/entity/method/provider/fetch-de-method.provider.d.ts +2 -2
- package/out/service/service/entity/method/provider/fetch-de-method.provider.d.ts.map +1 -1
- package/out/service/service/entity/method/provider/fetch-de-method.provider.js +3 -3
- package/out/service/service/file/file.service.d.ts +2 -2
- package/out/service/service/file/file.service.d.ts.map +1 -1
- package/out/service/service/file/file.service.js +1 -1
- package/out/service/service/work-flow/work-flow.service.d.ts +28 -28
- package/out/service/service/work-flow/work-flow.service.d.ts.map +1 -1
- package/out/service/service/work-flow/work-flow.service.js +15 -15
- package/out/service/utils/app-counter/app-counter.d.ts +7 -7
- package/out/service/utils/app-counter/app-counter.d.ts.map +1 -1
- package/out/service/utils/app-counter/app-counter.js +3 -3
- package/out/service/utils/app-counter/app-de-counter.d.ts +2 -2
- package/out/service/utils/app-counter/app-de-counter.d.ts.map +1 -1
- package/out/service/utils/app-counter/app-de-counter.js +1 -1
- package/out/service/utils/de-cache/de-cache.d.ts +44 -39
- package/out/service/utils/de-cache/de-cache.d.ts.map +1 -1
- package/out/service/utils/de-cache/de-cache.js +115 -75
- package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts +2 -2
- package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts.map +1 -1
- package/out/service/utils/dynamic-code-list/dynamic-code-list.js +2 -2
- package/out/service/utils/res-path/res-path.d.ts +4 -4
- package/out/service/utils/res-path/res-path.d.ts.map +1 -1
- package/out/service/utils/res-path/res-path.js +2 -2
- package/out/service/utils/search-filter/search-filter.d.ts +2 -2
- package/out/service/utils/search-filter/search-filter.d.ts.map +1 -1
- package/out/service/utils/service-exist-util/service-exist-util.d.ts +2 -2
- package/out/service/utils/service-exist-util/service-exist-util.d.ts.map +1 -1
- package/out/service/utils/service-exist-util/service-exist-util.js +1 -1
- package/out/types.d.ts +9 -0
- package/out/types.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-param/ui-logic-param.js +1 -1
- package/out/utils/index.d.ts +2 -0
- package/out/utils/index.d.ts.map +1 -1
- package/out/utils/index.js +2 -0
- package/out/utils/nav-params/calc-nav-params.d.ts +2 -2
- package/out/utils/nav-params/calc-nav-params.d.ts.map +1 -1
- package/out/utils/nav-params/calc-nav-params.js +1 -1
- package/out/utils/open-redirect-view/open-redirect-view.js +1 -1
- package/out/utils/ui-domain/ui-domain.d.ts +35 -0
- package/out/utils/ui-domain/ui-domain.d.ts.map +1 -0
- package/out/utils/ui-domain/ui-domain.js +42 -0
- package/out/utils/ui-domain-manager/ui-domain-manager.d.ts +47 -0
- package/out/utils/ui-domain-manager/ui-domain-manager.d.ts.map +1 -0
- package/out/utils/ui-domain-manager/ui-domain-manager.js +62 -0
- package/package.json +3 -3
- package/src/app-hub.ts +14 -0
- package/src/controller/common/base.controller.ts +3 -0
- package/src/controller/common/view/view.controller.ts +9 -3
- package/src/controller/common/view/wf-step-trace-view.controller.ts +4 -2
- package/src/controller/control/calendar/calendar.service.ts +4 -4
- package/src/controller/control/form/edit-form/edit-form.service.ts +23 -18
- package/src/controller/control/form/form/form.service.ts +2 -2
- package/src/controller/control/form/search-form/search-form.service.ts +2 -2
- package/src/controller/control/gantt/gantt.controller.ts +2 -1
- package/src/controller/control/grid/grid/grid.controller.ts +1 -0
- package/src/controller/control/grid/grid/grid.service.ts +3 -2
- package/src/controller/control/kanban/kanban.service.ts +2 -2
- package/src/controller/control/map/map.service.ts +1 -1
- package/src/controller/control/report-panel/report-panel.service.ts +2 -2
- package/src/controller/control/tree/tree.service.ts +2 -2
- package/src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts +2 -1
- package/src/controller/control/wizard-panel/wizard-panel.service.ts +4 -4
- package/src/controller/utils/value-default/value-default.ts +1 -1
- package/src/de-logic/de-logic-context.ts +5 -5
- package/src/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.ts +2 -2
- package/src/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.ts +2 -2
- package/src/de-logic/de-logic-link/de-logic-link.ts +1 -1
- package/src/de-logic/de-logic-node/de-logic-node.ts +1 -1
- package/src/de-logic/de-logic-param/de-logic-param.ts +1 -1
- package/src/de-logic/de-logic.ts +3 -3
- package/src/de-logic/index.ts +10 -10
- package/src/install.ts +3 -0
- package/src/interface/common/i-app-hub-service/i-app-hub-service.ts +9 -0
- package/src/interface/common/i-data-ability-params/i-data-ability-params.ts +1 -1
- package/src/interface/controller/controller/i.controller.ts +9 -0
- package/src/interface/provider/i-de-method.provider.ts +10 -0
- package/src/interface/provider/i-grid-column.provider.ts +2 -7
- package/src/interface/service/service/i-app-de.service.ts +51 -44
- package/src/interface/service/service/i-file.service.ts +2 -2
- package/src/interface/service/service/i-wf.service.ts +12 -12
- package/src/register/helper/grid-column-register.ts +2 -17
- package/src/service/de-service-util.ts +59 -27
- package/src/service/dto/method.dto.ts +39 -19
- package/src/service/service/authority/authority.service.ts +1 -1
- package/src/service/service/code-list/code-list.service.ts +3 -3
- package/src/service/service/control/control.service.ts +2 -2
- package/src/service/service/control/md-control.service.ts +16 -13
- package/src/service/service/counter/counter.service.ts +3 -3
- package/src/service/service/entity/de.service.ts +57 -89
- package/src/service/service/entity/method/de-action.ts +29 -47
- package/src/service/service/entity/method/fetch.ts +5 -11
- package/src/service/service/entity/method/method-input.ts +10 -9
- package/src/service/service/entity/method/method-renturn.ts +10 -11
- package/src/service/service/entity/method/method.ts +12 -35
- package/src/service/service/entity/method/provider/de-action-de-method.provider.ts +4 -2
- package/src/service/service/entity/method/provider/fetch-de-method.provider.ts +4 -2
- package/src/service/service/file/file.service.ts +2 -2
- package/src/service/service/work-flow/work-flow.service.ts +30 -30
- package/src/service/utils/app-counter/app-counter.ts +7 -7
- package/src/service/utils/app-counter/app-de-counter.ts +2 -2
- package/src/service/utils/de-cache/de-cache.ts +124 -85
- package/src/service/utils/dynamic-code-list/dynamic-code-list.ts +2 -5
- package/src/service/utils/res-path/res-path.ts +4 -4
- package/src/service/utils/search-filter/search-filter.ts +2 -2
- package/src/service/utils/service-exist-util/service-exist-util.ts +2 -2
- package/src/types.ts +10 -0
- package/src/ui-logic/ui-logic-param/ui-logic-param.ts +1 -1
- package/src/utils/index.ts +2 -0
- package/src/utils/nav-params/calc-nav-params.ts +2 -2
- package/src/utils/open-redirect-view/open-redirect-view.ts +1 -1
- package/src/utils/ui-domain/ui-domain.ts +52 -0
- package/src/utils/ui-domain-manager/ui-domain-manager.ts +64 -0
- package/out/service/service/entity/util/util.d.ts +0 -13
- package/out/service/service/entity/util/util.d.ts.map +0 -1
- package/out/service/service/entity/util/util.js +0 -14
- package/src/service/service/entity/util/util.ts +0 -18
|
@@ -19,42 +19,49 @@ export declare class DECache {
|
|
|
19
19
|
* @type {boolean}
|
|
20
20
|
*/
|
|
21
21
|
protected get isUnionKey(): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Creates an instance of DECache.
|
|
24
|
+
*
|
|
25
|
+
* @author chitanda
|
|
26
|
+
* @date 2023-12-22 13:12:40
|
|
27
|
+
* @param {IAppDataEntity} entity 应用实体模型
|
|
28
|
+
*/
|
|
22
29
|
constructor(entity: IAppDataEntity);
|
|
23
30
|
/**
|
|
24
31
|
* 数据缓存
|
|
25
32
|
*
|
|
26
33
|
* @author chitanda
|
|
27
34
|
* @date 2022-08-17 23:08:08
|
|
28
|
-
* @type {Map<string,
|
|
35
|
+
* @type {Map<string, IDataEntity>}
|
|
29
36
|
*/
|
|
30
|
-
readonly cacheMap: Map<string,
|
|
37
|
+
readonly cacheMap: Map<string, IDataEntity>;
|
|
31
38
|
/**
|
|
32
39
|
* 强制设置数据,忽略其他逻辑
|
|
33
40
|
*
|
|
34
41
|
* @author chitanda
|
|
35
42
|
* @date 2022-05-10 17:05:45
|
|
36
|
-
* @param {
|
|
43
|
+
* @param {IContext} context
|
|
37
44
|
* @param {IDataEntity} entity
|
|
38
45
|
*/
|
|
39
|
-
forceAdd(
|
|
46
|
+
forceAdd(_context: IContext, entity: IDataEntity): void;
|
|
40
47
|
/**
|
|
41
48
|
* 强制更新数据,非合并,忽略其他逻辑
|
|
42
49
|
*
|
|
43
50
|
* @author chitanda
|
|
44
51
|
* @date 2022-05-10 17:05:27
|
|
45
|
-
* @param {
|
|
52
|
+
* @param {IContext} context
|
|
46
53
|
* @param {IDataEntity} entity
|
|
47
54
|
*/
|
|
48
|
-
forceUpdate(
|
|
55
|
+
forceUpdate(_context: IContext, entity: IDataEntity): void;
|
|
49
56
|
/**
|
|
50
57
|
* 强制删除数据,忽略其他逻辑
|
|
51
58
|
*
|
|
52
59
|
* @author chitanda
|
|
53
60
|
* @date 2022-05-10 17:05:08
|
|
54
|
-
* @param {
|
|
61
|
+
* @param {IContext} context
|
|
55
62
|
* @param {string} srfKey
|
|
56
63
|
*/
|
|
57
|
-
forceDelete(
|
|
64
|
+
forceDelete(_context: IContext, srfKey: string): void;
|
|
58
65
|
/**
|
|
59
66
|
* 新增数据
|
|
60
67
|
*
|
|
@@ -63,7 +70,7 @@ export declare class DECache {
|
|
|
63
70
|
* @return {*} {boolean}
|
|
64
71
|
* @memberof EntityCache
|
|
65
72
|
*/
|
|
66
|
-
add(context:
|
|
73
|
+
add(context: IContext, entity: IDataEntity): IDataEntity | null;
|
|
67
74
|
/**
|
|
68
75
|
* 查找数据
|
|
69
76
|
*
|
|
@@ -72,74 +79,83 @@ export declare class DECache {
|
|
|
72
79
|
* @return {*} {IDataEntity}
|
|
73
80
|
* @memberof EntityCache
|
|
74
81
|
*/
|
|
75
|
-
get(context:
|
|
82
|
+
get(context: IContext, srfKey: string): IDataEntity | null;
|
|
76
83
|
/**
|
|
77
84
|
* 更新数据
|
|
78
85
|
*
|
|
79
|
-
* @param {
|
|
86
|
+
* @param {IContext} context
|
|
80
87
|
* @param {IDataEntity} entity
|
|
81
88
|
* @return {*} {IDataEntity}
|
|
82
89
|
* @memberof EntityCache
|
|
83
90
|
*/
|
|
84
|
-
update(context:
|
|
91
|
+
update(context: IContext, entity: IDataEntity): IDataEntity | null;
|
|
85
92
|
/**
|
|
86
93
|
* 删除数据
|
|
87
94
|
*
|
|
88
|
-
* @param {
|
|
95
|
+
* @param {IContext} context
|
|
89
96
|
* @param {string} srfKey
|
|
90
97
|
* @return {*} {(IDataEntity | null)}
|
|
91
98
|
* @memberof EntityCache
|
|
92
99
|
*/
|
|
93
|
-
delete(context:
|
|
100
|
+
delete(context: IContext, srfKey: string): IDataEntity | null;
|
|
94
101
|
/**
|
|
95
102
|
* 批量创建临时数据
|
|
96
103
|
*
|
|
97
104
|
* @author chitanda
|
|
98
105
|
* @date 2022-03-23 11:03:52
|
|
99
|
-
* @param {
|
|
106
|
+
* @param {IContext} context
|
|
100
107
|
* @param {IDataEntity[]} entities
|
|
101
108
|
* @return {*} {IDataEntity[]}
|
|
102
109
|
*/
|
|
103
|
-
createBatch(context:
|
|
110
|
+
createBatch(context: IContext, entities: IDataEntity[]): IDataEntity[];
|
|
104
111
|
/**
|
|
105
112
|
* 批量更新数据
|
|
106
113
|
*
|
|
107
114
|
* @author chitanda
|
|
108
115
|
* @date 2022-03-23 10:03:17
|
|
109
|
-
* @param {
|
|
116
|
+
* @param {IContext} context
|
|
110
117
|
* @param {IDataEntity[]} entities
|
|
111
118
|
* @return {*} {IDataEntity[]}
|
|
112
119
|
*/
|
|
113
|
-
updateBatch(context:
|
|
120
|
+
updateBatch(context: IContext, entities: IDataEntity[]): IDataEntity[];
|
|
114
121
|
/**
|
|
115
122
|
* 批量删除数据
|
|
116
123
|
*
|
|
117
124
|
* @author chitanda
|
|
118
125
|
* @date 2022-03-23 10:03:40
|
|
119
|
-
* @param {
|
|
126
|
+
* @param {IContext} context 上下文
|
|
120
127
|
* @param {string[]} srfKeys 需要删除的数据主键
|
|
121
128
|
* @return {*} {string[]} 未能删除的数据主键
|
|
122
129
|
*/
|
|
123
|
-
deleteBatch(context:
|
|
130
|
+
deleteBatch(context: IContext, srfKeys: string[]): string[];
|
|
124
131
|
/**
|
|
125
132
|
* 检查数据是否已经存在
|
|
126
133
|
*
|
|
127
134
|
* @author chitanda
|
|
128
135
|
* @date 2022-08-17 23:08:06
|
|
129
|
-
* @param {
|
|
136
|
+
* @param {IContext} context
|
|
130
137
|
* @param {string} srfkey
|
|
131
138
|
* @return {*} {boolean}
|
|
132
139
|
*/
|
|
133
|
-
checkData(
|
|
140
|
+
checkData(_context: IContext, srfkey: string): boolean;
|
|
141
|
+
/**
|
|
142
|
+
* 获取当前已经缓存的数据
|
|
143
|
+
*
|
|
144
|
+
* @author chitanda
|
|
145
|
+
* @date 2023-12-22 14:12:57
|
|
146
|
+
* @return {*} {IDataEntity[]}
|
|
147
|
+
*/
|
|
148
|
+
getList(): IDataEntity[];
|
|
134
149
|
/**
|
|
135
150
|
* 根据条件查找数据,未设置条件默认返回全部
|
|
136
151
|
*
|
|
137
152
|
* @author chitanda
|
|
138
|
-
* @date
|
|
139
|
-
* @param {
|
|
153
|
+
* @date 2023-12-22 13:12:28
|
|
154
|
+
* @param {IContext} context
|
|
155
|
+
* @param {IParams} [params={}]
|
|
140
156
|
* @return {*} {IDataEntity[]}
|
|
141
157
|
*/
|
|
142
|
-
|
|
158
|
+
select(context: IContext, params?: IParams): IDataEntity[];
|
|
143
159
|
/**
|
|
144
160
|
* 根据条件生成查询
|
|
145
161
|
*
|
|
@@ -150,23 +166,12 @@ export declare class DECache {
|
|
|
150
166
|
*/
|
|
151
167
|
generatePred(params?: IParams): <U>(testObj: U) => boolean;
|
|
152
168
|
/**
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
* @author chitanda
|
|
156
|
-
* @date 2022-08-17 23:08:54
|
|
157
|
-
* @param {IParams} context
|
|
158
|
-
*/
|
|
159
|
-
clear(context: IParams): void;
|
|
160
|
-
/**
|
|
161
|
-
* 根据标识获取map组
|
|
169
|
+
* 清空缓存
|
|
162
170
|
*
|
|
163
171
|
* @author chitanda
|
|
164
|
-
* @date
|
|
165
|
-
* @private
|
|
166
|
-
* @param {IParams} context
|
|
167
|
-
* @return {*} {Map<string, IDataEntity>}
|
|
172
|
+
* @date 2023-12-22 13:12:17
|
|
168
173
|
*/
|
|
169
|
-
|
|
174
|
+
clear(): void;
|
|
170
175
|
/**
|
|
171
176
|
* 根据联合键值计算主键并赋值
|
|
172
177
|
* @author lxm
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"de-cache.d.ts","sourceRoot":"","sources":["../../../../src/service/utils/de-cache/de-cache.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAMlD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD;;;;;;;GAOG;AACH,qBAAa,OAAO;
|
|
1
|
+
{"version":3,"file":"de-cache.d.ts","sourceRoot":"","sources":["../../../../src/service/utils/de-cache/de-cache.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAMlD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD;;;;;;;GAOG;AACH,qBAAa,OAAO;IAoBN,SAAS,CAAC,MAAM,EAAE,cAAc;IAnB5C;;;;;;;OAOG;IACH,SAAS,KAAK,UAAU,IAAI,OAAO,CAElC;IAED;;;;;;OAMG;gBACmB,MAAM,EAAE,cAAc;IAE5C;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAa;IAExD;;;;;;;OAOG;IACH,QAAQ,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,GAAG,IAAI;IAQvD;;;;;;;OAOG;IACH,WAAW,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,GAAG,IAAI;IAK1D;;;;;;;OAOG;IACH,WAAW,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAKrD;;;;;;;OAOG;IACH,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,GAAG,WAAW,GAAG,IAAI;IAyB/D;;;;;;;OAOG;IACH,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI;IAY1D;;;;;;;OAOG;IACH,MAAM,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,GAAG,WAAW,GAAG,IAAI;IA+BlE;;;;;;;OAOG;IACH,MAAM,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI;IAkB7D;;;;;;;;OAQG;IACH,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,WAAW,EAAE;IAqBtE;;;;;;;;OAQG;IACH,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,WAAW,EAAE;IA0BtE;;;;;;;;OAQG;IACH,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;IA2B3D;;;;;;;;OAQG;IACH,SAAS,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO;IAItD;;;;;;OAMG;IACH,OAAO,IAAI,WAAW,EAAE;IAKxB;;;;;;;;OAQG;IACH,MAAM,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAE,OAAY,GAAG,WAAW,EAAE;IAoE9D;;;;;;;OAOG;IACH,YAAY,CAAC,MAAM,GAAE,OAAY,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,KAAK,OAAO;IAgB9D;;;;;OAKG;IACH,KAAK,IAAI,IAAI;IAIb;;;;;OAKG;IACH,SAAS,CAAC,YAAY,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI;CAehD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { where, equals, clone, isNil, isEmpty } from 'ramda';
|
|
2
|
-
import { createUUID } from 'qx-util';
|
|
2
|
+
import { ascSort, createUUID } from 'qx-util';
|
|
3
3
|
import { RuntimeError } from '@ibiz-template/core';
|
|
4
4
|
import { isExistSessionId, isExistSrfKey, } from '../service-exist-util/service-exist-util';
|
|
5
5
|
import { findModelChild } from '../../../model';
|
|
@@ -24,6 +24,13 @@ export class DECache {
|
|
|
24
24
|
var _a;
|
|
25
25
|
return !!((_a = this.entity.unionKeyValueAppDEFieldIds) === null || _a === void 0 ? void 0 : _a.length);
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Creates an instance of DECache.
|
|
29
|
+
*
|
|
30
|
+
* @author chitanda
|
|
31
|
+
* @date 2023-12-22 13:12:40
|
|
32
|
+
* @param {IAppDataEntity} entity 应用实体模型
|
|
33
|
+
*/
|
|
27
34
|
constructor(entity) {
|
|
28
35
|
this.entity = entity;
|
|
29
36
|
/**
|
|
@@ -31,7 +38,7 @@ export class DECache {
|
|
|
31
38
|
*
|
|
32
39
|
* @author chitanda
|
|
33
40
|
* @date 2022-08-17 23:08:08
|
|
34
|
-
* @type {Map<string,
|
|
41
|
+
* @type {Map<string, IDataEntity>}
|
|
35
42
|
*/
|
|
36
43
|
this.cacheMap = new Map();
|
|
37
44
|
}
|
|
@@ -40,12 +47,11 @@ export class DECache {
|
|
|
40
47
|
*
|
|
41
48
|
* @author chitanda
|
|
42
49
|
* @date 2022-05-10 17:05:45
|
|
43
|
-
* @param {
|
|
50
|
+
* @param {IContext} context
|
|
44
51
|
* @param {IDataEntity} entity
|
|
45
52
|
*/
|
|
46
|
-
forceAdd(
|
|
47
|
-
const
|
|
48
|
-
const data = map.get(entity.srfkey);
|
|
53
|
+
forceAdd(_context, entity) {
|
|
54
|
+
const data = this.cacheMap.get(entity.srfkey);
|
|
49
55
|
if (data) {
|
|
50
56
|
data.assign(entity);
|
|
51
57
|
ibiz.log.warn('forceAdd', entity.srfkey, entity);
|
|
@@ -56,12 +62,11 @@ export class DECache {
|
|
|
56
62
|
*
|
|
57
63
|
* @author chitanda
|
|
58
64
|
* @date 2022-05-10 17:05:27
|
|
59
|
-
* @param {
|
|
65
|
+
* @param {IContext} context
|
|
60
66
|
* @param {IDataEntity} entity
|
|
61
67
|
*/
|
|
62
|
-
forceUpdate(
|
|
63
|
-
|
|
64
|
-
map.set(entity.srfkey, clone(entity));
|
|
68
|
+
forceUpdate(_context, entity) {
|
|
69
|
+
this.cacheMap.set(entity.srfkey, clone(entity));
|
|
65
70
|
ibiz.log.warn('forceUpdate', entity.srfkey, entity);
|
|
66
71
|
}
|
|
67
72
|
/**
|
|
@@ -69,12 +74,11 @@ export class DECache {
|
|
|
69
74
|
*
|
|
70
75
|
* @author chitanda
|
|
71
76
|
* @date 2022-05-10 17:05:08
|
|
72
|
-
* @param {
|
|
77
|
+
* @param {IContext} context
|
|
73
78
|
* @param {string} srfKey
|
|
74
79
|
*/
|
|
75
|
-
forceDelete(
|
|
76
|
-
|
|
77
|
-
map.delete(srfKey);
|
|
80
|
+
forceDelete(_context, srfKey) {
|
|
81
|
+
this.cacheMap.delete(srfKey);
|
|
78
82
|
ibiz.log.warn('forceDelete', srfKey);
|
|
79
83
|
}
|
|
80
84
|
/**
|
|
@@ -99,8 +103,7 @@ export class DECache {
|
|
|
99
103
|
entity.srfkey = createUUID();
|
|
100
104
|
}
|
|
101
105
|
entity.srftempdate = new Date().getTime();
|
|
102
|
-
|
|
103
|
-
map.set(entity.srfkey, clone(entity));
|
|
106
|
+
this.cacheMap.set(entity.srfkey, clone(entity));
|
|
104
107
|
ibiz.log.warn('add', entity.srfkey, entity);
|
|
105
108
|
return entity;
|
|
106
109
|
}
|
|
@@ -120,8 +123,7 @@ export class DECache {
|
|
|
120
123
|
get(context, srfKey) {
|
|
121
124
|
try {
|
|
122
125
|
isExistSessionId('get', context);
|
|
123
|
-
const
|
|
124
|
-
const data = map.get(srfKey);
|
|
126
|
+
const data = this.cacheMap.get(srfKey);
|
|
125
127
|
ibiz.log.warn('get', srfKey, data);
|
|
126
128
|
return clone(data);
|
|
127
129
|
}
|
|
@@ -133,7 +135,7 @@ export class DECache {
|
|
|
133
135
|
/**
|
|
134
136
|
* 更新数据
|
|
135
137
|
*
|
|
136
|
-
* @param {
|
|
138
|
+
* @param {IContext} context
|
|
137
139
|
* @param {IDataEntity} entity
|
|
138
140
|
* @return {*} {IDataEntity}
|
|
139
141
|
* @memberof EntityCache
|
|
@@ -152,11 +154,10 @@ export class DECache {
|
|
|
152
154
|
isExistSessionId('update', context);
|
|
153
155
|
isExistSrfKey('update', entity);
|
|
154
156
|
entity.srftempdate = new Date().getTime();
|
|
155
|
-
const
|
|
156
|
-
const data = map.get(oldKey);
|
|
157
|
+
const data = this.cacheMap.get(oldKey);
|
|
157
158
|
if (data) {
|
|
158
159
|
data.assign(entity);
|
|
159
|
-
|
|
160
|
+
this.cacheMap.set(oldKey, data);
|
|
160
161
|
ibiz.log.warn('update', oldKey, entity);
|
|
161
162
|
return clone(data);
|
|
162
163
|
}
|
|
@@ -170,7 +171,7 @@ export class DECache {
|
|
|
170
171
|
/**
|
|
171
172
|
* 删除数据
|
|
172
173
|
*
|
|
173
|
-
* @param {
|
|
174
|
+
* @param {IContext} context
|
|
174
175
|
* @param {string} srfKey
|
|
175
176
|
* @return {*} {(IDataEntity | null)}
|
|
176
177
|
* @memberof EntityCache
|
|
@@ -178,12 +179,11 @@ export class DECache {
|
|
|
178
179
|
delete(context, srfKey) {
|
|
179
180
|
try {
|
|
180
181
|
isExistSessionId('delete', context);
|
|
181
|
-
const map = this.getCacheByTag(context);
|
|
182
182
|
const key = srfKey;
|
|
183
|
-
if (
|
|
184
|
-
const data =
|
|
183
|
+
if (this.cacheMap.has(key)) {
|
|
184
|
+
const data = this.cacheMap.get(key);
|
|
185
185
|
data.srftempdate = new Date().getTime();
|
|
186
|
-
|
|
186
|
+
this.cacheMap.delete(key);
|
|
187
187
|
ibiz.log.warn('delete', key);
|
|
188
188
|
return data;
|
|
189
189
|
}
|
|
@@ -199,14 +199,13 @@ export class DECache {
|
|
|
199
199
|
*
|
|
200
200
|
* @author chitanda
|
|
201
201
|
* @date 2022-03-23 11:03:52
|
|
202
|
-
* @param {
|
|
202
|
+
* @param {IContext} context
|
|
203
203
|
* @param {IDataEntity[]} entities
|
|
204
204
|
* @return {*} {IDataEntity[]}
|
|
205
205
|
*/
|
|
206
206
|
createBatch(context, entities) {
|
|
207
207
|
try {
|
|
208
208
|
isExistSessionId('add', context);
|
|
209
|
-
const map = this.getCacheByTag(context);
|
|
210
209
|
for (let i = 0; i < entities.length; i++) {
|
|
211
210
|
const entity = entities[i];
|
|
212
211
|
if (isNil(entity.srfkey) || isEmpty(entity.srfkey)) {
|
|
@@ -214,7 +213,7 @@ export class DECache {
|
|
|
214
213
|
}
|
|
215
214
|
entity.srftempdate = new Date().getTime();
|
|
216
215
|
const data = clone(entity);
|
|
217
|
-
|
|
216
|
+
this.cacheMap.set(entity.srfkey, data);
|
|
218
217
|
entities[i] = data;
|
|
219
218
|
ibiz.log.warn('add', entity.srfkey, entity);
|
|
220
219
|
}
|
|
@@ -230,22 +229,21 @@ export class DECache {
|
|
|
230
229
|
*
|
|
231
230
|
* @author chitanda
|
|
232
231
|
* @date 2022-03-23 10:03:17
|
|
233
|
-
* @param {
|
|
232
|
+
* @param {IContext} context
|
|
234
233
|
* @param {IDataEntity[]} entities
|
|
235
234
|
* @return {*} {IDataEntity[]}
|
|
236
235
|
*/
|
|
237
236
|
updateBatch(context, entities) {
|
|
238
237
|
try {
|
|
239
238
|
isExistSessionId('update', context);
|
|
240
|
-
const map = this.getCacheByTag(context);
|
|
241
239
|
for (let i = 0; i < entities.length; i++) {
|
|
242
240
|
const entity = entities[i];
|
|
243
241
|
isExistSrfKey('update', entity);
|
|
244
242
|
entity.srftempdate = new Date().getTime();
|
|
245
|
-
const data =
|
|
243
|
+
const data = this.cacheMap.get(entity.srfkey);
|
|
246
244
|
if (data) {
|
|
247
245
|
data.assign(entity);
|
|
248
|
-
|
|
246
|
+
this.cacheMap.set(entity.srfkey, data);
|
|
249
247
|
ibiz.log.warn('update', entity.srfkey, entity);
|
|
250
248
|
entities[i] = clone(data);
|
|
251
249
|
}
|
|
@@ -265,7 +263,7 @@ export class DECache {
|
|
|
265
263
|
*
|
|
266
264
|
* @author chitanda
|
|
267
265
|
* @date 2022-03-23 10:03:40
|
|
268
|
-
* @param {
|
|
266
|
+
* @param {IContext} context 上下文
|
|
269
267
|
* @param {string[]} srfKeys 需要删除的数据主键
|
|
270
268
|
* @return {*} {string[]} 未能删除的数据主键
|
|
271
269
|
*/
|
|
@@ -277,11 +275,10 @@ export class DECache {
|
|
|
277
275
|
ibiz.log.error(err);
|
|
278
276
|
return srfKeys;
|
|
279
277
|
}
|
|
280
|
-
const map = this.getCacheByTag(context);
|
|
281
278
|
const notRemoveKeys = [];
|
|
282
279
|
for (let i = 0; i < srfKeys.length; i++) {
|
|
283
280
|
const key = srfKeys[i];
|
|
284
|
-
if (!
|
|
281
|
+
if (!this.cacheMap.has(key)) {
|
|
285
282
|
notRemoveKeys.push(key);
|
|
286
283
|
}
|
|
287
284
|
}
|
|
@@ -290,7 +287,7 @@ export class DECache {
|
|
|
290
287
|
}
|
|
291
288
|
for (let i = 0; i < srfKeys.length; i++) {
|
|
292
289
|
const key = srfKeys[i];
|
|
293
|
-
|
|
290
|
+
this.cacheMap.delete(key);
|
|
294
291
|
ibiz.log.warn('delete', key);
|
|
295
292
|
}
|
|
296
293
|
return [];
|
|
@@ -300,32 +297,95 @@ export class DECache {
|
|
|
300
297
|
*
|
|
301
298
|
* @author chitanda
|
|
302
299
|
* @date 2022-08-17 23:08:06
|
|
303
|
-
* @param {
|
|
300
|
+
* @param {IContext} context
|
|
304
301
|
* @param {string} srfkey
|
|
305
302
|
* @return {*} {boolean}
|
|
306
303
|
*/
|
|
307
|
-
checkData(
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
304
|
+
checkData(_context, srfkey) {
|
|
305
|
+
return !!this.cacheMap.get(srfkey);
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* 获取当前已经缓存的数据
|
|
309
|
+
*
|
|
310
|
+
* @author chitanda
|
|
311
|
+
* @date 2023-12-22 14:12:57
|
|
312
|
+
* @return {*} {IDataEntity[]}
|
|
313
|
+
*/
|
|
314
|
+
getList() {
|
|
315
|
+
const values = this.cacheMap.values();
|
|
316
|
+
return Array.from(values);
|
|
311
317
|
}
|
|
312
318
|
/**
|
|
313
319
|
* 根据条件查找数据,未设置条件默认返回全部
|
|
314
320
|
*
|
|
315
321
|
* @author chitanda
|
|
316
|
-
* @date
|
|
317
|
-
* @param {
|
|
322
|
+
* @date 2023-12-22 13:12:28
|
|
323
|
+
* @param {IContext} context
|
|
324
|
+
* @param {IParams} [params={}]
|
|
318
325
|
* @return {*} {IDataEntity[]}
|
|
319
326
|
*/
|
|
320
|
-
|
|
327
|
+
select(context, params = {}) {
|
|
321
328
|
try {
|
|
322
329
|
isExistSessionId('getList', context);
|
|
323
|
-
const
|
|
324
|
-
|
|
325
|
-
|
|
330
|
+
const values = this.cacheMap.values();
|
|
331
|
+
let items = Array.from(values);
|
|
332
|
+
items = ascSort(items, 'srfordervalue');
|
|
333
|
+
// 查询数据条件集
|
|
334
|
+
const data = {};
|
|
335
|
+
// if (notNilEmpty(context)) {
|
|
336
|
+
// const map = this.entity.majorKeyMap;
|
|
337
|
+
// if (map) {
|
|
338
|
+
// for (const key in map) {
|
|
339
|
+
// if (Object.prototype.hasOwnProperty.call(map, key)) {
|
|
340
|
+
// const val = map[key];
|
|
341
|
+
// if (notNilEmpty(context[key])) {
|
|
342
|
+
// data[val] = equals(context[key]);
|
|
343
|
+
// }
|
|
344
|
+
// }
|
|
345
|
+
// }
|
|
346
|
+
// }
|
|
347
|
+
// }
|
|
348
|
+
const nullData = {};
|
|
349
|
+
const undefinedData = {};
|
|
350
|
+
const emptyData = {};
|
|
351
|
+
if (params.srfkey) {
|
|
352
|
+
data.srfkey = equals(params.srfkey);
|
|
353
|
+
delete params.srfkey;
|
|
326
354
|
}
|
|
327
|
-
const
|
|
328
|
-
|
|
355
|
+
for (const key in params) {
|
|
356
|
+
if (Object.prototype.hasOwnProperty.call(params, key)) {
|
|
357
|
+
const val = params[key];
|
|
358
|
+
if (val == null) {
|
|
359
|
+
nullData[key] = equals(null);
|
|
360
|
+
undefinedData[key] = equals(undefined);
|
|
361
|
+
emptyData[key] = equals('');
|
|
362
|
+
}
|
|
363
|
+
else {
|
|
364
|
+
data[key] = equals(val);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
if (!isEmpty(data)) {
|
|
369
|
+
// 返回柯里化函数,用于判断数据是否满足要求
|
|
370
|
+
const pred = where(data);
|
|
371
|
+
const nullPred = where(nullData);
|
|
372
|
+
const undefinedPred = where(undefinedData);
|
|
373
|
+
const emptyPred = where(emptyData);
|
|
374
|
+
items = items.filter(obj => {
|
|
375
|
+
if (isEmpty(nullData)) {
|
|
376
|
+
if (pred(obj)) {
|
|
377
|
+
return true;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
else if (pred(obj) &&
|
|
381
|
+
(nullPred(obj) || undefinedPred(obj) || emptyPred(obj))) {
|
|
382
|
+
return true;
|
|
383
|
+
}
|
|
384
|
+
return false;
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
const list = items.map(obj => obj.clone());
|
|
388
|
+
return list;
|
|
329
389
|
}
|
|
330
390
|
catch (err) {
|
|
331
391
|
ibiz.log.error(err);
|
|
@@ -356,33 +416,13 @@ export class DECache {
|
|
|
356
416
|
return where(data);
|
|
357
417
|
}
|
|
358
418
|
/**
|
|
359
|
-
*
|
|
360
|
-
*
|
|
361
|
-
* @author chitanda
|
|
362
|
-
* @date 2022-08-17 23:08:54
|
|
363
|
-
* @param {IParams} context
|
|
364
|
-
*/
|
|
365
|
-
clear(context) {
|
|
366
|
-
const tag = context.srfsessionid;
|
|
367
|
-
if (this.cacheMap.size > 0) {
|
|
368
|
-
this.cacheMap.delete(tag);
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
/**
|
|
372
|
-
* 根据标识获取map组
|
|
419
|
+
* 清空缓存
|
|
373
420
|
*
|
|
374
421
|
* @author chitanda
|
|
375
|
-
* @date
|
|
376
|
-
* @private
|
|
377
|
-
* @param {IParams} context
|
|
378
|
-
* @return {*} {Map<string, IDataEntity>}
|
|
422
|
+
* @date 2023-12-22 13:12:17
|
|
379
423
|
*/
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
if (!this.cacheMap.has(tag)) {
|
|
383
|
-
this.cacheMap.set(tag, new Map());
|
|
384
|
-
}
|
|
385
|
-
return this.cacheMap.get(tag);
|
|
424
|
+
clear() {
|
|
425
|
+
this.cacheMap.clear();
|
|
386
426
|
}
|
|
387
427
|
/**
|
|
388
428
|
* 根据联合键值计算主键并赋值
|
|
@@ -106,7 +106,7 @@ export declare class DynamicCodeListCache {
|
|
|
106
106
|
* @param {IParams} [params={}]
|
|
107
107
|
* @returns {*} {Promise<CodeListItem[]>}
|
|
108
108
|
*/
|
|
109
|
-
protected load(context
|
|
109
|
+
protected load(context: IContext, params?: IParams): Promise<CodeListItem[]>;
|
|
110
110
|
/**
|
|
111
111
|
* 组装树形代码表数据
|
|
112
112
|
*
|
|
@@ -122,7 +122,7 @@ export declare class DynamicCodeListCache {
|
|
|
122
122
|
* @param {IParams} [params={}]
|
|
123
123
|
* @returns {*} {Promise<IData[]>}
|
|
124
124
|
*/
|
|
125
|
-
get(context
|
|
125
|
+
get(context: IContext, params?: IParams): Promise<CodeListItem[]>;
|
|
126
126
|
}
|
|
127
127
|
export {};
|
|
128
128
|
//# sourceMappingURL=dynamic-code-list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic-code-list.d.ts","sourceRoot":"","sources":["../../../../src/service/utils/dynamic-code-list/dynamic-code-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGhD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIlD;;;;;;GAMG;AACH,KAAK,SAAS,GAAG;IACf;;;;;;OAMG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;IAEvB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;CACnC,CAAC;AAEF;;;;;;;GAOG;AACH,qBAAa,oBAAoB;IAC/B,SAAS,CAAC,GAAG,EAAG,WAAW,CAAC;IAE5B;;;;;;;OAOG;IACH,SAAS,CAAC,QAAQ,EAAE,YAAY,CAAC;IAEjC;;;;;;OAMG;IACH,SAAS,CAAC,KAAK,yBAAgC;IAE/C;;;;;;;OAOG;IACH,SAAS,CAAC,YAAY,EAAE,OAAO,CAAS;IAExC;;;;;;OAMG;IACH,SAAS,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;gBAE1B,QAAQ,EAAE,YAAY;IAIlC;;;;;;OAMG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAqB3B;;;;;;;OAOG;IACH,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,GAAG,YAAY;IA6DhD;;;;;;;;;OASG;cACa,IAAI,CAClB,OAAO,
|
|
1
|
+
{"version":3,"file":"dynamic-code-list.d.ts","sourceRoot":"","sources":["../../../../src/service/utils/dynamic-code-list/dynamic-code-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGhD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIlD;;;;;;GAMG;AACH,KAAK,SAAS,GAAG;IACf;;;;;;OAMG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;IAEvB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;CACnC,CAAC;AAEF;;;;;;;GAOG;AACH,qBAAa,oBAAoB;IAC/B,SAAS,CAAC,GAAG,EAAG,WAAW,CAAC;IAE5B;;;;;;;OAOG;IACH,SAAS,CAAC,QAAQ,EAAE,YAAY,CAAC;IAEjC;;;;;;OAMG;IACH,SAAS,CAAC,KAAK,yBAAgC;IAE/C;;;;;;;OAOG;IACH,SAAS,CAAC,YAAY,EAAE,OAAO,CAAS;IAExC;;;;;;OAMG;IACH,SAAS,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;gBAE1B,QAAQ,EAAE,YAAY;IAIlC;;;;;;OAMG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAqB3B;;;;;;;OAOG;IACH,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,GAAG,YAAY;IA6DhD;;;;;;;;;OASG;cACa,IAAI,CAClB,OAAO,EAAE,QAAQ,EACjB,MAAM,GAAE,OAAY,GACnB,OAAO,CAAC,YAAY,EAAE,CAAC;IAuE1B;;;;OAIG;IACH,SAAS,CAAC,eAAe,CACvB,KAAK,EAAE,KAAK,EAAE,EACd,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GACvB,YAAY,EAAE,GAAG,SAAS;IAwB7B;;;;;;;;OAQG;IACG,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAE,OAAY,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;CAyC5E"}
|
|
@@ -118,7 +118,7 @@ export class DynamicCodeListCache {
|
|
|
118
118
|
* @param {IParams} [params={}]
|
|
119
119
|
* @returns {*} {Promise<CodeListItem[]>}
|
|
120
120
|
*/
|
|
121
|
-
async load(context
|
|
121
|
+
async load(context, params = {}) {
|
|
122
122
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
123
123
|
const { appDataEntityId, appDEDataSetId, minorSortAppDEFieldId, minorSortDir, pvalueAppDEFieldId, customCond, } = this.codeList;
|
|
124
124
|
// *处理查询参数
|
|
@@ -202,7 +202,7 @@ export class DynamicCodeListCache {
|
|
|
202
202
|
* @param {IParams} [params={}]
|
|
203
203
|
* @returns {*} {Promise<IData[]>}
|
|
204
204
|
*/
|
|
205
|
-
async get(context
|
|
205
|
+
async get(context, params = {}) {
|
|
206
206
|
// 初始化还未完成时被调用
|
|
207
207
|
if (this.initPromise) {
|
|
208
208
|
await this.initPromise;
|
|
@@ -8,11 +8,11 @@ import { IAppDataEntity } from '@ibiz/model-core';
|
|
|
8
8
|
* @author lxm
|
|
9
9
|
* @date 2023-07-12 07:02:52
|
|
10
10
|
* @export
|
|
11
|
-
* @param {
|
|
11
|
+
* @param {IContext} context
|
|
12
12
|
* @param {IAppDataEntity} entity
|
|
13
13
|
* @return {*} {({ path: string; keys: string[] } | undefined)}
|
|
14
14
|
*/
|
|
15
|
-
export declare function getMatchResPath(context:
|
|
15
|
+
export declare function getMatchResPath(context: IContext, entity: IAppDataEntity): {
|
|
16
16
|
path: string;
|
|
17
17
|
keys: string[];
|
|
18
18
|
} | undefined;
|
|
@@ -22,9 +22,9 @@ export declare function getMatchResPath(context: IParams, entity: IAppDataEntity
|
|
|
22
22
|
* @author lxm
|
|
23
23
|
* @date 2022-11-25 13:11:53
|
|
24
24
|
* @export
|
|
25
|
-
* @param {
|
|
25
|
+
* @param {IContext} context 上下文对象
|
|
26
26
|
* @param {ServicePathItem[][]} pathItems 计算出的资源关系路径
|
|
27
27
|
* @return {*} {string}
|
|
28
28
|
*/
|
|
29
|
-
export declare function calcResPath(context:
|
|
29
|
+
export declare function calcResPath(context: IContext, entity: IAppDataEntity): string;
|
|
30
30
|
//# sourceMappingURL=res-path.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"res-path.d.ts","sourceRoot":"","sources":["../../../../src/service/utils/res-path/res-path.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAKlD;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"res-path.d.ts","sourceRoot":"","sources":["../../../../src/service/utils/res-path/res-path.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAKlD;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,QAAQ,EACjB,MAAM,EAAE,cAAc,GACrB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,SAAS,CAkC9C;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,GAAG,MAAM,CAkB7E"}
|
|
@@ -9,7 +9,7 @@ const reg = /\$\{(.*?)\}/g;
|
|
|
9
9
|
* @author lxm
|
|
10
10
|
* @date 2023-07-12 07:02:52
|
|
11
11
|
* @export
|
|
12
|
-
* @param {
|
|
12
|
+
* @param {IContext} context
|
|
13
13
|
* @param {IAppDataEntity} entity
|
|
14
14
|
* @return {*} {({ path: string; keys: string[] } | undefined)}
|
|
15
15
|
*/
|
|
@@ -54,7 +54,7 @@ export function getMatchResPath(context, entity) {
|
|
|
54
54
|
* @author lxm
|
|
55
55
|
* @date 2022-11-25 13:11:53
|
|
56
56
|
* @export
|
|
57
|
-
* @param {
|
|
57
|
+
* @param {IContext} context 上下文对象
|
|
58
58
|
* @param {ServicePathItem[][]} pathItems 计算出的资源关系路径
|
|
59
59
|
* @return {*} {string}
|
|
60
60
|
*/
|