@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
|
@@ -54,11 +54,11 @@ export class WorkFlowService implements IWorkFlowService {
|
|
|
54
54
|
*
|
|
55
55
|
* @private
|
|
56
56
|
* @param {IData} data
|
|
57
|
-
* @param {
|
|
57
|
+
* @param {IContext} context
|
|
58
58
|
* @returns {*}
|
|
59
59
|
* @memberof WorkFlowService
|
|
60
60
|
*/
|
|
61
|
-
private getActiveData(data: IData, context:
|
|
61
|
+
private getActiveData(data: IData, context: IContext): IData {
|
|
62
62
|
if (context.srfprocessinstanceid) {
|
|
63
63
|
data.srfprocessinstanceid = context.srfprocessinstanceid;
|
|
64
64
|
}
|
|
@@ -71,11 +71,11 @@ export class WorkFlowService implements IWorkFlowService {
|
|
|
71
71
|
* @author zk
|
|
72
72
|
* @date 2023-11-06 06:11:07
|
|
73
73
|
* @private
|
|
74
|
-
* @param {
|
|
74
|
+
* @param {IContext} context
|
|
75
75
|
* @return {*} {string}
|
|
76
76
|
* @memberof WorkFlowService
|
|
77
77
|
*/
|
|
78
|
-
private getWFInstanceTag(context:
|
|
78
|
+
private getWFInstanceTag(context: IContext): string {
|
|
79
79
|
return context.srfprocessinstanceid || 'alls';
|
|
80
80
|
}
|
|
81
81
|
|
|
@@ -84,10 +84,10 @@ export class WorkFlowService implements IWorkFlowService {
|
|
|
84
84
|
*
|
|
85
85
|
* @author lxm
|
|
86
86
|
* @date 2022-09-29 14:09:45
|
|
87
|
-
* @param {
|
|
87
|
+
* @param {IContext} context
|
|
88
88
|
* @returns {*} {Promise<IHttpResponse<IData>>}
|
|
89
89
|
*/
|
|
90
|
-
async getWFStep(context:
|
|
90
|
+
async getWFStep(context: IContext): Promise<IHttpResponse<IData>> {
|
|
91
91
|
const { processDefinitionKey, taskDefinitionKey } = context;
|
|
92
92
|
return this.app.net.get(
|
|
93
93
|
`${this.getBaseUrl()}/process-definitions/${processDefinitionKey}/usertasks/${taskDefinitionKey}`,
|
|
@@ -99,12 +99,12 @@ export class WorkFlowService implements IWorkFlowService {
|
|
|
99
99
|
*
|
|
100
100
|
* @author lxm
|
|
101
101
|
* @date 2022-09-29 14:09:52
|
|
102
|
-
* @param {
|
|
102
|
+
* @param {IContext} context 路径参数
|
|
103
103
|
* @param {IData} data 数据
|
|
104
104
|
* @returns {*} {Promise<IHttpResponse<IData>>}
|
|
105
105
|
*/
|
|
106
106
|
async getWFLink(
|
|
107
|
-
context:
|
|
107
|
+
context: IContext,
|
|
108
108
|
data: IData,
|
|
109
109
|
): Promise<IHttpResponse<IData[]>> {
|
|
110
110
|
const deKeyValue = context[this.model.codeName!.toLowerCase()];
|
|
@@ -120,10 +120,10 @@ export class WorkFlowService implements IWorkFlowService {
|
|
|
120
120
|
*
|
|
121
121
|
* @author lxm
|
|
122
122
|
* @date 2022-09-29 14:09:45
|
|
123
|
-
* @param {
|
|
123
|
+
* @param {IContext} context
|
|
124
124
|
* @returns {*} {Promise<IHttpResponse<IData>>}
|
|
125
125
|
*/
|
|
126
|
-
async getWFHistory(context:
|
|
126
|
+
async getWFHistory(context: IContext): Promise<IHttpResponse<IData>> {
|
|
127
127
|
const deKeyValue = context[this.model.codeName!.toLowerCase()];
|
|
128
128
|
return this.app.net.get(
|
|
129
129
|
`${this.getBaseUrl()}/${deKeyValue}/process-instances/${this.getWFInstanceTag(
|
|
@@ -137,10 +137,10 @@ export class WorkFlowService implements IWorkFlowService {
|
|
|
137
137
|
*
|
|
138
138
|
* @author lxm
|
|
139
139
|
* @date 2022-10-27 16:10:13
|
|
140
|
-
* @param {
|
|
140
|
+
* @param {IContext} context
|
|
141
141
|
* @returns {*} {Promise<IHttpResponse<IData>>}
|
|
142
142
|
*/
|
|
143
|
-
async getWFProcessDiagram(context:
|
|
143
|
+
async getWFProcessDiagram(context: IContext): Promise<IHttpResponse<IData>> {
|
|
144
144
|
const deKeyValue = context[this.model.codeName!.toLowerCase()];
|
|
145
145
|
return this.app.net.request(
|
|
146
146
|
`${this.getBaseUrl()}/${deKeyValue}/process-instances/${this.getWFInstanceTag(
|
|
@@ -170,13 +170,13 @@ export class WorkFlowService implements IWorkFlowService {
|
|
|
170
170
|
*
|
|
171
171
|
* @author lxm
|
|
172
172
|
* @date 2022-09-30 17:09:51
|
|
173
|
-
* @param {
|
|
173
|
+
* @param {IContext} context 路径参数
|
|
174
174
|
* @param {IParams} params 请求参数
|
|
175
175
|
* @param {IData} data 数据
|
|
176
176
|
* @returns {*} {Promise<IHttpResponse<IData>>}
|
|
177
177
|
*/
|
|
178
178
|
async wfStart(
|
|
179
|
-
context:
|
|
179
|
+
context: IContext,
|
|
180
180
|
params: IParams,
|
|
181
181
|
data: IData,
|
|
182
182
|
): Promise<IHttpResponse<IData>> {
|
|
@@ -196,13 +196,13 @@ export class WorkFlowService implements IWorkFlowService {
|
|
|
196
196
|
*
|
|
197
197
|
* @author lxm
|
|
198
198
|
* @date 2022-09-30 17:09:51
|
|
199
|
-
* @param {
|
|
199
|
+
* @param {IContext} context 路径参数
|
|
200
200
|
* @param {IParams} params 请求参数
|
|
201
201
|
* @param {IData} data 数据
|
|
202
202
|
* @returns {*} {Promise<IHttpResponse<IData>>}
|
|
203
203
|
*/
|
|
204
204
|
async wfSubmit(
|
|
205
|
-
context:
|
|
205
|
+
context: IContext,
|
|
206
206
|
params: IParams,
|
|
207
207
|
data: IData,
|
|
208
208
|
): Promise<IHttpResponse<IData>> {
|
|
@@ -222,13 +222,13 @@ export class WorkFlowService implements IWorkFlowService {
|
|
|
222
222
|
*
|
|
223
223
|
* @author lxm
|
|
224
224
|
* @date 2022-09-30 17:09:51
|
|
225
|
-
* @param {
|
|
225
|
+
* @param {IContext} context 路径参数
|
|
226
226
|
* @param {IParams} params 请求参数
|
|
227
227
|
* @param {IData} data 数据
|
|
228
228
|
* @returns {*} {Promise<IHttpResponse<IData>>}
|
|
229
229
|
*/
|
|
230
230
|
async wfWithdraw(
|
|
231
|
-
context:
|
|
231
|
+
context: IContext,
|
|
232
232
|
params: IParams,
|
|
233
233
|
data: IData,
|
|
234
234
|
): Promise<IHttpResponse<IData>> {
|
|
@@ -248,13 +248,13 @@ export class WorkFlowService implements IWorkFlowService {
|
|
|
248
248
|
*
|
|
249
249
|
* @author lxm
|
|
250
250
|
* @date 2022-09-30 17:09:51
|
|
251
|
-
* @param {
|
|
251
|
+
* @param {IContext} context 路径参数
|
|
252
252
|
* @param {IParams} params 请求参数
|
|
253
253
|
* @param {IData} data 数据
|
|
254
254
|
* @returns {*} {Promise<IHttpResponse<IData>>}
|
|
255
255
|
*/
|
|
256
256
|
async wfReassign(
|
|
257
|
-
context:
|
|
257
|
+
context: IContext,
|
|
258
258
|
params: IParams,
|
|
259
259
|
data: IData,
|
|
260
260
|
): Promise<IHttpResponse<IData>> {
|
|
@@ -274,13 +274,13 @@ export class WorkFlowService implements IWorkFlowService {
|
|
|
274
274
|
*
|
|
275
275
|
* @author lxm
|
|
276
276
|
* @date 2022-09-30 17:09:51
|
|
277
|
-
* @param {
|
|
277
|
+
* @param {IContext} context 路径参数
|
|
278
278
|
* @param {IParams} params 请求参数
|
|
279
279
|
* @param {IData} data 数据
|
|
280
280
|
* @returns {*} {Promise<IHttpResponse<IData>>}
|
|
281
281
|
*/
|
|
282
282
|
async wfAddStepBefore(
|
|
283
|
-
context:
|
|
283
|
+
context: IContext,
|
|
284
284
|
params: IParams,
|
|
285
285
|
data: IData,
|
|
286
286
|
): Promise<IHttpResponse<IData>> {
|
|
@@ -300,13 +300,13 @@ export class WorkFlowService implements IWorkFlowService {
|
|
|
300
300
|
*
|
|
301
301
|
* @author lxm
|
|
302
302
|
* @date 2022-09-30 17:09:51
|
|
303
|
-
* @param {
|
|
303
|
+
* @param {IContext} context 路径参数
|
|
304
304
|
* @param {IParams} params 请求参数
|
|
305
305
|
* @param {IData} data 数据
|
|
306
306
|
* @returns {*} {Promise<IHttpResponse<IData>>}
|
|
307
307
|
*/
|
|
308
308
|
async wfAddStepAfter(
|
|
309
|
-
context:
|
|
309
|
+
context: IContext,
|
|
310
310
|
params: IParams,
|
|
311
311
|
data: IData,
|
|
312
312
|
): Promise<IHttpResponse<IData>> {
|
|
@@ -326,13 +326,13 @@ export class WorkFlowService implements IWorkFlowService {
|
|
|
326
326
|
*
|
|
327
327
|
* @author lxm
|
|
328
328
|
* @date 2022-09-30 17:09:51
|
|
329
|
-
* @param {
|
|
329
|
+
* @param {IContext} context 路径参数
|
|
330
330
|
* @param {IParams} params 请求参数
|
|
331
331
|
* @param {IData} data 数据
|
|
332
332
|
* @returns {*} {Promise<IHttpResponse<IData>>}
|
|
333
333
|
*/
|
|
334
334
|
async wfSendBack(
|
|
335
|
-
context:
|
|
335
|
+
context: IContext,
|
|
336
336
|
params: IParams,
|
|
337
337
|
data: IData,
|
|
338
338
|
): Promise<IHttpResponse<IData>> {
|
|
@@ -352,13 +352,13 @@ export class WorkFlowService implements IWorkFlowService {
|
|
|
352
352
|
*
|
|
353
353
|
* @author lxm
|
|
354
354
|
* @date 2022-09-30 17:09:51
|
|
355
|
-
* @param {
|
|
355
|
+
* @param {IContext} context 路径参数
|
|
356
356
|
* @param {IParams} params 请求参数
|
|
357
357
|
* @param {IData} data 数据
|
|
358
358
|
* @returns {*} {Promise<IHttpResponse<IData>>}
|
|
359
359
|
*/
|
|
360
360
|
async wfSendCopy(
|
|
361
|
-
context:
|
|
361
|
+
context: IContext,
|
|
362
362
|
params: IParams,
|
|
363
363
|
data: IData,
|
|
364
364
|
): Promise<IHttpResponse<IData>> {
|
|
@@ -379,14 +379,14 @@ export class WorkFlowService implements IWorkFlowService {
|
|
|
379
379
|
* @author lxm
|
|
380
380
|
* @date 2022-09-30 17:09:38
|
|
381
381
|
* @param {string} methodName 接口名称
|
|
382
|
-
* @param {
|
|
382
|
+
* @param {IContext} context 路径参数
|
|
383
383
|
* @param {IParams} [params={}] 查询参数
|
|
384
384
|
* @param {IData} [data={}] 主数据数据
|
|
385
385
|
* @returns {*} {Promise<IHttpResponse<IData>>}
|
|
386
386
|
*/
|
|
387
387
|
async exec(
|
|
388
388
|
methodName: string,
|
|
389
|
-
context:
|
|
389
|
+
context: IContext,
|
|
390
390
|
params: IParams = {},
|
|
391
391
|
data: IData = {},
|
|
392
392
|
): Promise<IHttpResponse<IData>> {
|
|
@@ -31,7 +31,7 @@ export class AppCounter {
|
|
|
31
31
|
return this.destroyed;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
protected context:
|
|
34
|
+
protected context: IContext = IBizContext.create();
|
|
35
35
|
|
|
36
36
|
protected params: IParams = {};
|
|
37
37
|
|
|
@@ -61,10 +61,10 @@ export class AppCounter {
|
|
|
61
61
|
*
|
|
62
62
|
* @author chitanda
|
|
63
63
|
* @date 2022-10-26 19:10:24
|
|
64
|
-
* @param {
|
|
64
|
+
* @param {IContext} [context]
|
|
65
65
|
* @param {IParams} [params]
|
|
66
66
|
*/
|
|
67
|
-
async init(context?:
|
|
67
|
+
async init(context?: IContext, params?: IParams): Promise<void> {
|
|
68
68
|
this.setParams(context, params);
|
|
69
69
|
this.interval();
|
|
70
70
|
await this.load();
|
|
@@ -76,10 +76,10 @@ export class AppCounter {
|
|
|
76
76
|
* @author chitanda
|
|
77
77
|
* @date 2022-10-26 19:10:58
|
|
78
78
|
* @protected
|
|
79
|
-
* @param {
|
|
79
|
+
* @param {IContext} [context]
|
|
80
80
|
* @param {IParams} [params]
|
|
81
81
|
*/
|
|
82
|
-
protected setParams(context?:
|
|
82
|
+
protected setParams(context?: IContext, params?: IParams): void {
|
|
83
83
|
if (context) {
|
|
84
84
|
this.context = clone(context);
|
|
85
85
|
}
|
|
@@ -136,11 +136,11 @@ export class AppCounter {
|
|
|
136
136
|
*
|
|
137
137
|
* @author chitanda
|
|
138
138
|
* @date 2022-10-26 19:10:46
|
|
139
|
-
* @param {
|
|
139
|
+
* @param {IContext} [context]
|
|
140
140
|
* @param {IParams} [params]
|
|
141
141
|
* @return {*} {Promise<IData>}
|
|
142
142
|
*/
|
|
143
|
-
refresh(context?:
|
|
143
|
+
refresh(context?: IContext, params?: IParams): Promise<IData> {
|
|
144
144
|
this.setParams(context, params);
|
|
145
145
|
return this.load();
|
|
146
146
|
}
|
|
@@ -22,10 +22,10 @@ export class AppDECounter extends AppCounter {
|
|
|
22
22
|
*
|
|
23
23
|
* @author chitanda
|
|
24
24
|
* @date 2022-10-26 19:10:24
|
|
25
|
-
* @param {
|
|
25
|
+
* @param {IContext} [context]
|
|
26
26
|
* @param {IParams} [params]
|
|
27
27
|
*/
|
|
28
|
-
async init(context?:
|
|
28
|
+
async init(context?: IContext, params?: IParams): Promise<void> {
|
|
29
29
|
this.appDataEntityId = this.model.appDataEntityId!;
|
|
30
30
|
const action = this.model.getAppDEActionId;
|
|
31
31
|
if (!action) {
|
|
@@ -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 { IAppDataEntity } from '@ibiz/model-core';
|
|
4
4
|
import { RuntimeError } from '@ibiz-template/core';
|
|
5
5
|
import {
|
|
@@ -30,6 +30,13 @@ export class DECache {
|
|
|
30
30
|
return !!this.entity.unionKeyValueAppDEFieldIds?.length;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Creates an instance of DECache.
|
|
35
|
+
*
|
|
36
|
+
* @author chitanda
|
|
37
|
+
* @date 2023-12-22 13:12:40
|
|
38
|
+
* @param {IAppDataEntity} entity 应用实体模型
|
|
39
|
+
*/
|
|
33
40
|
constructor(protected entity: IAppDataEntity) {}
|
|
34
41
|
|
|
35
42
|
/**
|
|
@@ -37,21 +44,20 @@ export class DECache {
|
|
|
37
44
|
*
|
|
38
45
|
* @author chitanda
|
|
39
46
|
* @date 2022-08-17 23:08:08
|
|
40
|
-
* @type {Map<string,
|
|
47
|
+
* @type {Map<string, IDataEntity>}
|
|
41
48
|
*/
|
|
42
|
-
readonly cacheMap: Map<string,
|
|
49
|
+
readonly cacheMap: Map<string, IDataEntity> = new Map();
|
|
43
50
|
|
|
44
51
|
/**
|
|
45
52
|
* 强制设置数据,忽略其他逻辑
|
|
46
53
|
*
|
|
47
54
|
* @author chitanda
|
|
48
55
|
* @date 2022-05-10 17:05:45
|
|
49
|
-
* @param {
|
|
56
|
+
* @param {IContext} context
|
|
50
57
|
* @param {IDataEntity} entity
|
|
51
58
|
*/
|
|
52
|
-
forceAdd(
|
|
53
|
-
const
|
|
54
|
-
const data = map.get(entity.srfkey!);
|
|
59
|
+
forceAdd(_context: IContext, entity: IDataEntity): void {
|
|
60
|
+
const data = this.cacheMap.get(entity.srfkey!);
|
|
55
61
|
if (data) {
|
|
56
62
|
data.assign!(entity);
|
|
57
63
|
ibiz.log.warn('forceAdd', entity.srfkey, entity);
|
|
@@ -63,12 +69,11 @@ export class DECache {
|
|
|
63
69
|
*
|
|
64
70
|
* @author chitanda
|
|
65
71
|
* @date 2022-05-10 17:05:27
|
|
66
|
-
* @param {
|
|
72
|
+
* @param {IContext} context
|
|
67
73
|
* @param {IDataEntity} entity
|
|
68
74
|
*/
|
|
69
|
-
forceUpdate(
|
|
70
|
-
|
|
71
|
-
map.set(entity.srfkey!, clone(entity));
|
|
75
|
+
forceUpdate(_context: IContext, entity: IDataEntity): void {
|
|
76
|
+
this.cacheMap.set(entity.srfkey!, clone(entity));
|
|
72
77
|
ibiz.log.warn('forceUpdate', entity.srfkey, entity);
|
|
73
78
|
}
|
|
74
79
|
|
|
@@ -77,12 +82,11 @@ export class DECache {
|
|
|
77
82
|
*
|
|
78
83
|
* @author chitanda
|
|
79
84
|
* @date 2022-05-10 17:05:08
|
|
80
|
-
* @param {
|
|
85
|
+
* @param {IContext} context
|
|
81
86
|
* @param {string} srfKey
|
|
82
87
|
*/
|
|
83
|
-
forceDelete(
|
|
84
|
-
|
|
85
|
-
map.delete(srfKey);
|
|
88
|
+
forceDelete(_context: IContext, srfKey: string): void {
|
|
89
|
+
this.cacheMap.delete(srfKey);
|
|
86
90
|
ibiz.log.warn('forceDelete', srfKey);
|
|
87
91
|
}
|
|
88
92
|
|
|
@@ -94,7 +98,7 @@ export class DECache {
|
|
|
94
98
|
* @return {*} {boolean}
|
|
95
99
|
* @memberof EntityCache
|
|
96
100
|
*/
|
|
97
|
-
add(context:
|
|
101
|
+
add(context: IContext, entity: IDataEntity): IDataEntity | null {
|
|
98
102
|
// 联合主键相关数据处理
|
|
99
103
|
if (this.isUnionKey) {
|
|
100
104
|
this.calcUnionKey(entity);
|
|
@@ -104,15 +108,13 @@ export class DECache {
|
|
|
104
108
|
);
|
|
105
109
|
}
|
|
106
110
|
}
|
|
107
|
-
|
|
108
111
|
try {
|
|
109
112
|
isExistSessionId('add', context);
|
|
110
113
|
if (isNil(entity.srfkey) || isEmpty(entity.srfkey)) {
|
|
111
114
|
entity.srfkey = createUUID();
|
|
112
115
|
}
|
|
113
116
|
entity.srftempdate = new Date().getTime();
|
|
114
|
-
|
|
115
|
-
map.set(entity.srfkey, clone(entity));
|
|
117
|
+
this.cacheMap.set(entity.srfkey, clone(entity));
|
|
116
118
|
ibiz.log.warn('add', entity.srfkey, entity);
|
|
117
119
|
return entity;
|
|
118
120
|
} catch (err) {
|
|
@@ -129,11 +131,10 @@ export class DECache {
|
|
|
129
131
|
* @return {*} {IDataEntity}
|
|
130
132
|
* @memberof EntityCache
|
|
131
133
|
*/
|
|
132
|
-
get(context:
|
|
134
|
+
get(context: IContext, srfKey: string): IDataEntity | null {
|
|
133
135
|
try {
|
|
134
136
|
isExistSessionId('get', context);
|
|
135
|
-
const
|
|
136
|
-
const data = map.get(srfKey);
|
|
137
|
+
const data = this.cacheMap.get(srfKey);
|
|
137
138
|
ibiz.log.warn('get', srfKey, data);
|
|
138
139
|
return clone(data)!;
|
|
139
140
|
} catch (err) {
|
|
@@ -145,12 +146,12 @@ export class DECache {
|
|
|
145
146
|
/**
|
|
146
147
|
* 更新数据
|
|
147
148
|
*
|
|
148
|
-
* @param {
|
|
149
|
+
* @param {IContext} context
|
|
149
150
|
* @param {IDataEntity} entity
|
|
150
151
|
* @return {*} {IDataEntity}
|
|
151
152
|
* @memberof EntityCache
|
|
152
153
|
*/
|
|
153
|
-
update(context:
|
|
154
|
+
update(context: IContext, entity: IDataEntity): IDataEntity | null {
|
|
154
155
|
const oldKey = entity.srfkey!;
|
|
155
156
|
// 联合主键相关数据处理
|
|
156
157
|
if (this.isUnionKey) {
|
|
@@ -167,11 +168,10 @@ export class DECache {
|
|
|
167
168
|
isExistSessionId('update', context);
|
|
168
169
|
isExistSrfKey('update', entity);
|
|
169
170
|
entity.srftempdate = new Date().getTime();
|
|
170
|
-
const
|
|
171
|
-
const data = map.get(oldKey);
|
|
171
|
+
const data = this.cacheMap.get(oldKey);
|
|
172
172
|
if (data) {
|
|
173
173
|
data.assign!(entity);
|
|
174
|
-
|
|
174
|
+
this.cacheMap.set(oldKey, data);
|
|
175
175
|
ibiz.log.warn('update', oldKey, entity);
|
|
176
176
|
return clone(data);
|
|
177
177
|
}
|
|
@@ -185,20 +185,19 @@ export class DECache {
|
|
|
185
185
|
/**
|
|
186
186
|
* 删除数据
|
|
187
187
|
*
|
|
188
|
-
* @param {
|
|
188
|
+
* @param {IContext} context
|
|
189
189
|
* @param {string} srfKey
|
|
190
190
|
* @return {*} {(IDataEntity | null)}
|
|
191
191
|
* @memberof EntityCache
|
|
192
192
|
*/
|
|
193
|
-
delete(context:
|
|
193
|
+
delete(context: IContext, srfKey: string): IDataEntity | null {
|
|
194
194
|
try {
|
|
195
195
|
isExistSessionId('delete', context);
|
|
196
|
-
const map = this.getCacheByTag(context);
|
|
197
196
|
const key = srfKey;
|
|
198
|
-
if (
|
|
199
|
-
const data =
|
|
197
|
+
if (this.cacheMap.has(key)) {
|
|
198
|
+
const data = this.cacheMap.get(key)!;
|
|
200
199
|
data.srftempdate = new Date().getTime();
|
|
201
|
-
|
|
200
|
+
this.cacheMap.delete(key);
|
|
202
201
|
ibiz.log.warn('delete', key);
|
|
203
202
|
return data;
|
|
204
203
|
}
|
|
@@ -214,14 +213,13 @@ export class DECache {
|
|
|
214
213
|
*
|
|
215
214
|
* @author chitanda
|
|
216
215
|
* @date 2022-03-23 11:03:52
|
|
217
|
-
* @param {
|
|
216
|
+
* @param {IContext} context
|
|
218
217
|
* @param {IDataEntity[]} entities
|
|
219
218
|
* @return {*} {IDataEntity[]}
|
|
220
219
|
*/
|
|
221
|
-
createBatch(context:
|
|
220
|
+
createBatch(context: IContext, entities: IDataEntity[]): IDataEntity[] {
|
|
222
221
|
try {
|
|
223
222
|
isExistSessionId('add', context);
|
|
224
|
-
const map = this.getCacheByTag(context);
|
|
225
223
|
for (let i = 0; i < entities.length; i++) {
|
|
226
224
|
const entity = entities[i];
|
|
227
225
|
if (isNil(entity.srfkey) || isEmpty(entity.srfkey)) {
|
|
@@ -229,7 +227,7 @@ export class DECache {
|
|
|
229
227
|
}
|
|
230
228
|
entity.srftempdate = new Date().getTime();
|
|
231
229
|
const data = clone(entity);
|
|
232
|
-
|
|
230
|
+
this.cacheMap.set(entity.srfkey, data);
|
|
233
231
|
entities[i] = data;
|
|
234
232
|
ibiz.log.warn('add', entity.srfkey, entity);
|
|
235
233
|
}
|
|
@@ -245,22 +243,21 @@ export class DECache {
|
|
|
245
243
|
*
|
|
246
244
|
* @author chitanda
|
|
247
245
|
* @date 2022-03-23 10:03:17
|
|
248
|
-
* @param {
|
|
246
|
+
* @param {IContext} context
|
|
249
247
|
* @param {IDataEntity[]} entities
|
|
250
248
|
* @return {*} {IDataEntity[]}
|
|
251
249
|
*/
|
|
252
|
-
updateBatch(context:
|
|
250
|
+
updateBatch(context: IContext, entities: IDataEntity[]): IDataEntity[] {
|
|
253
251
|
try {
|
|
254
252
|
isExistSessionId('update', context);
|
|
255
|
-
const map = this.getCacheByTag(context);
|
|
256
253
|
for (let i = 0; i < entities.length; i++) {
|
|
257
254
|
const entity = entities[i];
|
|
258
255
|
isExistSrfKey('update', entity);
|
|
259
256
|
entity.srftempdate = new Date().getTime();
|
|
260
|
-
const data =
|
|
257
|
+
const data = this.cacheMap.get(entity.srfkey!);
|
|
261
258
|
if (data) {
|
|
262
259
|
data.assign!(entity);
|
|
263
|
-
|
|
260
|
+
this.cacheMap.set(entity.srfkey!, data);
|
|
264
261
|
ibiz.log.warn('update', entity.srfkey, entity);
|
|
265
262
|
entities[i] = clone(data);
|
|
266
263
|
} else {
|
|
@@ -281,22 +278,21 @@ export class DECache {
|
|
|
281
278
|
*
|
|
282
279
|
* @author chitanda
|
|
283
280
|
* @date 2022-03-23 10:03:40
|
|
284
|
-
* @param {
|
|
281
|
+
* @param {IContext} context 上下文
|
|
285
282
|
* @param {string[]} srfKeys 需要删除的数据主键
|
|
286
283
|
* @return {*} {string[]} 未能删除的数据主键
|
|
287
284
|
*/
|
|
288
|
-
deleteBatch(context:
|
|
285
|
+
deleteBatch(context: IContext, srfKeys: string[]): string[] {
|
|
289
286
|
try {
|
|
290
287
|
isExistSessionId('delete', context);
|
|
291
288
|
} catch (err) {
|
|
292
289
|
ibiz.log.error(err);
|
|
293
290
|
return srfKeys;
|
|
294
291
|
}
|
|
295
|
-
const map = this.getCacheByTag(context);
|
|
296
292
|
const notRemoveKeys: string[] = [];
|
|
297
293
|
for (let i = 0; i < srfKeys.length; i++) {
|
|
298
294
|
const key = srfKeys[i];
|
|
299
|
-
if (!
|
|
295
|
+
if (!this.cacheMap.has(key)) {
|
|
300
296
|
notRemoveKeys.push(key);
|
|
301
297
|
}
|
|
302
298
|
}
|
|
@@ -307,7 +303,7 @@ export class DECache {
|
|
|
307
303
|
}
|
|
308
304
|
for (let i = 0; i < srfKeys.length; i++) {
|
|
309
305
|
const key = srfKeys[i];
|
|
310
|
-
|
|
306
|
+
this.cacheMap.delete(key);
|
|
311
307
|
ibiz.log.warn('delete', key);
|
|
312
308
|
}
|
|
313
309
|
return [];
|
|
@@ -318,33 +314,97 @@ export class DECache {
|
|
|
318
314
|
*
|
|
319
315
|
* @author chitanda
|
|
320
316
|
* @date 2022-08-17 23:08:06
|
|
321
|
-
* @param {
|
|
317
|
+
* @param {IContext} context
|
|
322
318
|
* @param {string} srfkey
|
|
323
319
|
* @return {*} {boolean}
|
|
324
320
|
*/
|
|
325
|
-
checkData(
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
321
|
+
checkData(_context: IContext, srfkey: string): boolean {
|
|
322
|
+
return !!this.cacheMap.get(srfkey);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* 获取当前已经缓存的数据
|
|
327
|
+
*
|
|
328
|
+
* @author chitanda
|
|
329
|
+
* @date 2023-12-22 14:12:57
|
|
330
|
+
* @return {*} {IDataEntity[]}
|
|
331
|
+
*/
|
|
332
|
+
getList(): IDataEntity[] {
|
|
333
|
+
const values = this.cacheMap.values();
|
|
334
|
+
return Array.from(values);
|
|
329
335
|
}
|
|
330
336
|
|
|
331
337
|
/**
|
|
332
338
|
* 根据条件查找数据,未设置条件默认返回全部
|
|
333
339
|
*
|
|
334
340
|
* @author chitanda
|
|
335
|
-
* @date
|
|
336
|
-
* @param {
|
|
341
|
+
* @date 2023-12-22 13:12:28
|
|
342
|
+
* @param {IContext} context
|
|
343
|
+
* @param {IParams} [params={}]
|
|
337
344
|
* @return {*} {IDataEntity[]}
|
|
338
345
|
*/
|
|
339
|
-
|
|
346
|
+
select(context: IContext, params: IParams = {}): IDataEntity[] {
|
|
340
347
|
try {
|
|
341
348
|
isExistSessionId('getList', context);
|
|
342
|
-
const
|
|
343
|
-
|
|
344
|
-
|
|
349
|
+
const values = this.cacheMap.values();
|
|
350
|
+
let items: IDataEntity[] = Array.from(values);
|
|
351
|
+
items = ascSort(items, 'srfordervalue');
|
|
352
|
+
// 查询数据条件集
|
|
353
|
+
const data: IData = {};
|
|
354
|
+
// if (notNilEmpty(context)) {
|
|
355
|
+
// const map = this.entity.majorKeyMap;
|
|
356
|
+
// if (map) {
|
|
357
|
+
// for (const key in map) {
|
|
358
|
+
// if (Object.prototype.hasOwnProperty.call(map, key)) {
|
|
359
|
+
// const val = map[key];
|
|
360
|
+
// if (notNilEmpty(context[key])) {
|
|
361
|
+
// data[val] = equals(context[key]);
|
|
362
|
+
// }
|
|
363
|
+
// }
|
|
364
|
+
// }
|
|
365
|
+
// }
|
|
366
|
+
// }
|
|
367
|
+
const nullData: Record<string, unknown> = {};
|
|
368
|
+
const undefinedData: Record<string, unknown> = {};
|
|
369
|
+
const emptyData: Record<string, unknown> = {};
|
|
370
|
+
if (params.srfkey) {
|
|
371
|
+
data.srfkey = equals(params.srfkey);
|
|
372
|
+
delete params.srfkey;
|
|
373
|
+
}
|
|
374
|
+
for (const key in params) {
|
|
375
|
+
if (Object.prototype.hasOwnProperty.call(params, key)) {
|
|
376
|
+
const val = params[key];
|
|
377
|
+
if (val == null) {
|
|
378
|
+
nullData[key] = equals(null);
|
|
379
|
+
undefinedData[key] = equals(undefined);
|
|
380
|
+
emptyData[key] = equals('');
|
|
381
|
+
} else {
|
|
382
|
+
data[key] = equals(val);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
345
385
|
}
|
|
346
|
-
|
|
347
|
-
|
|
386
|
+
if (!isEmpty(data)) {
|
|
387
|
+
// 返回柯里化函数,用于判断数据是否满足要求
|
|
388
|
+
const pred = where(data);
|
|
389
|
+
const nullPred = where(nullData);
|
|
390
|
+
const undefinedPred = where(undefinedData);
|
|
391
|
+
const emptyPred = where(emptyData);
|
|
392
|
+
items = items.filter(obj => {
|
|
393
|
+
if (isEmpty(nullData)) {
|
|
394
|
+
if (pred(obj)) {
|
|
395
|
+
return true;
|
|
396
|
+
}
|
|
397
|
+
} else if (
|
|
398
|
+
pred(obj) &&
|
|
399
|
+
(nullPred(obj) || undefinedPred(obj) || emptyPred(obj))
|
|
400
|
+
) {
|
|
401
|
+
return true;
|
|
402
|
+
}
|
|
403
|
+
return false;
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
const list = items.map(obj => obj.clone());
|
|
407
|
+
return list;
|
|
348
408
|
} catch (err) {
|
|
349
409
|
ibiz.log.error(err);
|
|
350
410
|
return [];
|
|
@@ -376,34 +436,13 @@ export class DECache {
|
|
|
376
436
|
}
|
|
377
437
|
|
|
378
438
|
/**
|
|
379
|
-
*
|
|
380
|
-
*
|
|
381
|
-
* @author chitanda
|
|
382
|
-
* @date 2022-08-17 23:08:54
|
|
383
|
-
* @param {IParams} context
|
|
384
|
-
*/
|
|
385
|
-
clear(context: IParams): void {
|
|
386
|
-
const tag: string = context.srfsessionid;
|
|
387
|
-
if (this.cacheMap.size > 0) {
|
|
388
|
-
this.cacheMap.delete(tag);
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
/**
|
|
393
|
-
* 根据标识获取map组
|
|
439
|
+
* 清空缓存
|
|
394
440
|
*
|
|
395
441
|
* @author chitanda
|
|
396
|
-
* @date
|
|
397
|
-
* @private
|
|
398
|
-
* @param {IParams} context
|
|
399
|
-
* @return {*} {Map<string, IDataEntity>}
|
|
442
|
+
* @date 2023-12-22 13:12:17
|
|
400
443
|
*/
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
if (!this.cacheMap.has(tag)) {
|
|
404
|
-
this.cacheMap.set(tag, new Map());
|
|
405
|
-
}
|
|
406
|
-
return this.cacheMap.get(tag)!;
|
|
444
|
+
clear(): void {
|
|
445
|
+
this.cacheMap.clear();
|
|
407
446
|
}
|
|
408
447
|
|
|
409
448
|
/**
|