@ibiz-template/runtime 0.4.15 → 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.
Files changed (258) hide show
  1. package/dist/index.esm.js +527 -362
  2. package/dist/index.system.min.js +2 -2
  3. package/out/app-hub.d.ts +8 -0
  4. package/out/app-hub.d.ts.map +1 -1
  5. package/out/app-hub.js +14 -1
  6. package/out/controller/common/base.controller.d.ts +1 -0
  7. package/out/controller/common/base.controller.d.ts.map +1 -1
  8. package/out/controller/common/base.controller.js +2 -0
  9. package/out/controller/common/view/view.controller.d.ts.map +1 -1
  10. package/out/controller/common/view/view.controller.js +9 -3
  11. package/out/controller/common/view/wf-step-trace-view.controller.d.ts.map +1 -1
  12. package/out/controller/common/view/wf-step-trace-view.controller.js +3 -2
  13. package/out/controller/control/calendar/calendar.service.d.ts +3 -3
  14. package/out/controller/control/calendar/calendar.service.d.ts.map +1 -1
  15. package/out/controller/control/calendar/calendar.service.js +2 -2
  16. package/out/controller/control/form/edit-form/edit-form.service.d.ts +18 -18
  17. package/out/controller/control/form/edit-form/edit-form.service.d.ts.map +1 -1
  18. package/out/controller/control/form/edit-form/edit-form.service.js +11 -11
  19. package/out/controller/control/form/form/form.service.d.ts +2 -2
  20. package/out/controller/control/form/form/form.service.d.ts.map +1 -1
  21. package/out/controller/control/form/form/form.service.js +1 -1
  22. package/out/controller/control/form/search-form/search-form.service.d.ts +2 -2
  23. package/out/controller/control/form/search-form/search-form.service.d.ts.map +1 -1
  24. package/out/controller/control/form/search-form/search-form.service.js +1 -1
  25. package/out/controller/control/gantt/gantt.controller.d.ts.map +1 -1
  26. package/out/controller/control/gantt/gantt.controller.js +1 -0
  27. package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
  28. package/out/controller/control/grid/grid/grid.controller.js +1 -1
  29. package/out/controller/control/grid/grid/grid.service.d.ts +2 -2
  30. package/out/controller/control/grid/grid/grid.service.d.ts.map +1 -1
  31. package/out/controller/control/grid/grid/grid.service.js +2 -2
  32. package/out/controller/control/kanban/kanban.service.d.ts +2 -2
  33. package/out/controller/control/kanban/kanban.service.d.ts.map +1 -1
  34. package/out/controller/control/kanban/kanban.service.js +1 -1
  35. package/out/controller/control/map/map.service.d.ts +1 -1
  36. package/out/controller/control/map/map.service.js +1 -1
  37. package/out/controller/control/report-panel/report-panel.service.d.ts +2 -2
  38. package/out/controller/control/report-panel/report-panel.service.d.ts.map +1 -1
  39. package/out/controller/control/report-panel/report-panel.service.js +1 -1
  40. package/out/controller/control/tree/tree.service.d.ts +2 -2
  41. package/out/controller/control/tree/tree.service.d.ts.map +1 -1
  42. package/out/controller/control/tree-grid-ex/tree-grid-ex.controller.d.ts.map +1 -1
  43. package/out/controller/control/tree-grid-ex/tree-grid-ex.controller.js +1 -0
  44. package/out/controller/control/wizard-panel/wizard-panel.service.d.ts +4 -4
  45. package/out/controller/control/wizard-panel/wizard-panel.service.d.ts.map +1 -1
  46. package/out/controller/control/wizard-panel/wizard-panel.service.js +2 -2
  47. package/out/controller/utils/value-default/value-default.d.ts +1 -1
  48. package/out/controller/utils/value-default/value-default.d.ts.map +1 -1
  49. package/out/de-logic/de-logic-context.d.ts +5 -5
  50. package/out/de-logic/de-logic-context.d.ts.map +1 -1
  51. package/out/de-logic/de-logic-context.js +1 -1
  52. package/out/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.d.ts +2 -2
  53. package/out/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.d.ts.map +1 -1
  54. package/out/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.js +1 -1
  55. package/out/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.d.ts +2 -2
  56. package/out/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.d.ts.map +1 -1
  57. package/out/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.js +1 -1
  58. package/out/de-logic/de-logic-link/de-logic-link.d.ts +1 -1
  59. package/out/de-logic/de-logic-link/de-logic-link.js +1 -1
  60. package/out/de-logic/de-logic-node/de-logic-node.d.ts +1 -1
  61. package/out/de-logic/de-logic-param/de-logic-param.d.ts +1 -1
  62. package/out/de-logic/de-logic-param/de-logic-param.js +1 -1
  63. package/out/de-logic/de-logic.d.ts +3 -3
  64. package/out/de-logic/de-logic.d.ts.map +1 -1
  65. package/out/de-logic/de-logic.js +2 -2
  66. package/out/de-logic/index.d.ts +8 -8
  67. package/out/de-logic/index.d.ts.map +1 -1
  68. package/out/de-logic/index.js +5 -5
  69. package/out/hub/config/app-config-service.d.ts +1 -0
  70. package/out/hub/config/app-config-service.d.ts.map +1 -1
  71. package/out/hub/config/app-config-service.js +1 -0
  72. package/out/hub/config/app-view-config-service.d.ts +20 -1
  73. package/out/hub/config/app-view-config-service.d.ts.map +1 -1
  74. package/out/hub/config/app-view-config-service.js +39 -6
  75. package/out/install.d.ts.map +1 -1
  76. package/out/install.js +3 -0
  77. package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts +8 -0
  78. package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts.map +1 -1
  79. package/out/interface/common/i-app-view-config-service/i-app-view-config-service.d.ts +8 -0
  80. package/out/interface/common/i-app-view-config-service/i-app-view-config-service.d.ts.map +1 -1
  81. package/out/interface/common/i-data-ability-params/i-data-ability-params.d.ts +1 -1
  82. package/out/interface/common/i-data-ability-params/i-data-ability-params.d.ts.map +1 -1
  83. package/out/interface/controller/controller/i.controller.d.ts +8 -0
  84. package/out/interface/controller/controller/i.controller.d.ts.map +1 -1
  85. package/out/interface/provider/i-de-method.provider.d.ts +10 -1
  86. package/out/interface/provider/i-de-method.provider.d.ts.map +1 -1
  87. package/out/interface/provider/i-grid-column.provider.d.ts +2 -2
  88. package/out/interface/provider/i-grid-column.provider.d.ts.map +1 -1
  89. package/out/interface/service/service/i-app-de.service.d.ts +49 -43
  90. package/out/interface/service/service/i-app-de.service.d.ts.map +1 -1
  91. package/out/interface/service/service/i-file.service.d.ts +2 -2
  92. package/out/interface/service/service/i-file.service.d.ts.map +1 -1
  93. package/out/interface/service/service/i-wf.service.d.ts +12 -12
  94. package/out/interface/service/service/i-wf.service.d.ts.map +1 -1
  95. package/out/register/helper/grid-column-register.d.ts +2 -2
  96. package/out/register/helper/grid-column-register.d.ts.map +1 -1
  97. package/out/register/helper/grid-column-register.js +0 -14
  98. package/out/service/de-service-util.d.ts +26 -13
  99. package/out/service/de-service-util.d.ts.map +1 -1
  100. package/out/service/de-service-util.js +45 -16
  101. package/out/service/dto/method.dto.d.ts +20 -8
  102. package/out/service/dto/method.dto.d.ts.map +1 -1
  103. package/out/service/dto/method.dto.js +33 -15
  104. package/out/service/service/authority/authority.service.d.ts +1 -1
  105. package/out/service/service/authority/authority.service.js +1 -1
  106. package/out/service/service/code-list/code-list.service.d.ts +3 -3
  107. package/out/service/service/code-list/code-list.service.d.ts.map +1 -1
  108. package/out/service/service/code-list/code-list.service.js +2 -2
  109. package/out/service/service/control/control.service.d.ts +2 -2
  110. package/out/service/service/control/control.service.d.ts.map +1 -1
  111. package/out/service/service/control/control.service.js +1 -1
  112. package/out/service/service/control/md-control.service.d.ts +23 -13
  113. package/out/service/service/control/md-control.service.d.ts.map +1 -1
  114. package/out/service/service/control/md-control.service.js +23 -7
  115. package/out/service/service/counter/counter.service.d.ts +3 -3
  116. package/out/service/service/counter/counter.service.d.ts.map +1 -1
  117. package/out/service/service/counter/counter.service.js +1 -1
  118. package/out/service/service/entity/de.service.d.ts +46 -28
  119. package/out/service/service/entity/de.service.d.ts.map +1 -1
  120. package/out/service/service/entity/de.service.js +35 -71
  121. package/out/service/service/entity/method/de-action.d.ts +23 -33
  122. package/out/service/service/entity/method/de-action.d.ts.map +1 -1
  123. package/out/service/service/entity/method/de-action.js +18 -35
  124. package/out/service/service/entity/method/fetch.d.ts +3 -4
  125. package/out/service/service/entity/method/fetch.d.ts.map +1 -1
  126. package/out/service/service/entity/method/fetch.js +3 -8
  127. package/out/service/service/entity/method/method-input.d.ts +10 -5
  128. package/out/service/service/entity/method/method-input.d.ts.map +1 -1
  129. package/out/service/service/entity/method/method-input.js +9 -8
  130. package/out/service/service/entity/method/method-renturn.d.ts +10 -7
  131. package/out/service/service/entity/method/method-renturn.d.ts.map +1 -1
  132. package/out/service/service/entity/method/method-renturn.js +9 -9
  133. package/out/service/service/entity/method/method.d.ts +11 -27
  134. package/out/service/service/entity/method/method.d.ts.map +1 -1
  135. package/out/service/service/entity/method/method.js +9 -21
  136. package/out/service/service/entity/method/provider/de-action-de-method.provider.d.ts +2 -2
  137. package/out/service/service/entity/method/provider/de-action-de-method.provider.d.ts.map +1 -1
  138. package/out/service/service/entity/method/provider/de-action-de-method.provider.js +2 -2
  139. package/out/service/service/entity/method/provider/fetch-de-method.provider.d.ts +2 -2
  140. package/out/service/service/entity/method/provider/fetch-de-method.provider.d.ts.map +1 -1
  141. package/out/service/service/entity/method/provider/fetch-de-method.provider.js +3 -3
  142. package/out/service/service/file/file.service.d.ts +2 -2
  143. package/out/service/service/file/file.service.d.ts.map +1 -1
  144. package/out/service/service/file/file.service.js +1 -1
  145. package/out/service/service/work-flow/work-flow.service.d.ts +28 -28
  146. package/out/service/service/work-flow/work-flow.service.d.ts.map +1 -1
  147. package/out/service/service/work-flow/work-flow.service.js +15 -15
  148. package/out/service/utils/app-counter/app-counter.d.ts +7 -7
  149. package/out/service/utils/app-counter/app-counter.d.ts.map +1 -1
  150. package/out/service/utils/app-counter/app-counter.js +3 -3
  151. package/out/service/utils/app-counter/app-de-counter.d.ts +2 -2
  152. package/out/service/utils/app-counter/app-de-counter.d.ts.map +1 -1
  153. package/out/service/utils/app-counter/app-de-counter.js +1 -1
  154. package/out/service/utils/de-cache/de-cache.d.ts +44 -39
  155. package/out/service/utils/de-cache/de-cache.d.ts.map +1 -1
  156. package/out/service/utils/de-cache/de-cache.js +115 -75
  157. package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts +2 -2
  158. package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts.map +1 -1
  159. package/out/service/utils/dynamic-code-list/dynamic-code-list.js +2 -2
  160. package/out/service/utils/res-path/res-path.d.ts +4 -4
  161. package/out/service/utils/res-path/res-path.d.ts.map +1 -1
  162. package/out/service/utils/res-path/res-path.js +2 -2
  163. package/out/service/utils/search-filter/search-filter.d.ts +2 -2
  164. package/out/service/utils/search-filter/search-filter.d.ts.map +1 -1
  165. package/out/service/utils/service-exist-util/service-exist-util.d.ts +2 -2
  166. package/out/service/utils/service-exist-util/service-exist-util.d.ts.map +1 -1
  167. package/out/service/utils/service-exist-util/service-exist-util.js +1 -1
  168. package/out/types.d.ts +9 -0
  169. package/out/types.d.ts.map +1 -1
  170. package/out/ui-logic/ui-logic-param/ui-logic-param.js +1 -1
  171. package/out/utils/index.d.ts +2 -0
  172. package/out/utils/index.d.ts.map +1 -1
  173. package/out/utils/index.js +2 -0
  174. package/out/utils/nav-params/calc-nav-params.d.ts +2 -2
  175. package/out/utils/nav-params/calc-nav-params.d.ts.map +1 -1
  176. package/out/utils/nav-params/calc-nav-params.js +1 -1
  177. package/out/utils/open-redirect-view/open-redirect-view.js +1 -1
  178. package/out/utils/ui-domain/ui-domain.d.ts +35 -0
  179. package/out/utils/ui-domain/ui-domain.d.ts.map +1 -0
  180. package/out/utils/ui-domain/ui-domain.js +42 -0
  181. package/out/utils/ui-domain-manager/ui-domain-manager.d.ts +47 -0
  182. package/out/utils/ui-domain-manager/ui-domain-manager.d.ts.map +1 -0
  183. package/out/utils/ui-domain-manager/ui-domain-manager.js +62 -0
  184. package/package.json +3 -3
  185. package/src/app-hub.ts +15 -1
  186. package/src/controller/common/base.controller.ts +3 -0
  187. package/src/controller/common/view/view.controller.ts +9 -3
  188. package/src/controller/common/view/wf-step-trace-view.controller.ts +4 -2
  189. package/src/controller/control/calendar/calendar.service.ts +4 -4
  190. package/src/controller/control/form/edit-form/edit-form.service.ts +23 -18
  191. package/src/controller/control/form/form/form.service.ts +2 -2
  192. package/src/controller/control/form/search-form/search-form.service.ts +2 -2
  193. package/src/controller/control/gantt/gantt.controller.ts +2 -1
  194. package/src/controller/control/grid/grid/grid.controller.ts +1 -0
  195. package/src/controller/control/grid/grid/grid.service.ts +3 -2
  196. package/src/controller/control/kanban/kanban.service.ts +2 -2
  197. package/src/controller/control/map/map.service.ts +1 -1
  198. package/src/controller/control/report-panel/report-panel.service.ts +2 -2
  199. package/src/controller/control/tree/tree.service.ts +2 -2
  200. package/src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts +2 -1
  201. package/src/controller/control/wizard-panel/wizard-panel.service.ts +4 -4
  202. package/src/controller/utils/value-default/value-default.ts +1 -1
  203. package/src/de-logic/de-logic-context.ts +5 -5
  204. package/src/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.ts +2 -2
  205. package/src/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.ts +2 -2
  206. package/src/de-logic/de-logic-link/de-logic-link.ts +1 -1
  207. package/src/de-logic/de-logic-node/de-logic-node.ts +1 -1
  208. package/src/de-logic/de-logic-param/de-logic-param.ts +1 -1
  209. package/src/de-logic/de-logic.ts +3 -3
  210. package/src/de-logic/index.ts +10 -10
  211. package/src/hub/config/app-config-service.ts +1 -0
  212. package/src/hub/config/app-view-config-service.ts +39 -6
  213. package/src/install.ts +3 -0
  214. package/src/interface/common/i-app-hub-service/i-app-hub-service.ts +9 -0
  215. package/src/interface/common/i-app-view-config-service/i-app-view-config-service.ts +8 -0
  216. package/src/interface/common/i-data-ability-params/i-data-ability-params.ts +1 -1
  217. package/src/interface/controller/controller/i.controller.ts +9 -0
  218. package/src/interface/provider/i-de-method.provider.ts +10 -0
  219. package/src/interface/provider/i-grid-column.provider.ts +2 -7
  220. package/src/interface/service/service/i-app-de.service.ts +51 -44
  221. package/src/interface/service/service/i-file.service.ts +2 -2
  222. package/src/interface/service/service/i-wf.service.ts +12 -12
  223. package/src/register/helper/grid-column-register.ts +2 -17
  224. package/src/service/de-service-util.ts +59 -27
  225. package/src/service/dto/method.dto.ts +39 -19
  226. package/src/service/service/authority/authority.service.ts +1 -1
  227. package/src/service/service/code-list/code-list.service.ts +3 -3
  228. package/src/service/service/control/control.service.ts +2 -2
  229. package/src/service/service/control/md-control.service.ts +40 -13
  230. package/src/service/service/counter/counter.service.ts +3 -3
  231. package/src/service/service/entity/de.service.ts +57 -89
  232. package/src/service/service/entity/method/de-action.ts +29 -47
  233. package/src/service/service/entity/method/fetch.ts +5 -11
  234. package/src/service/service/entity/method/method-input.ts +10 -9
  235. package/src/service/service/entity/method/method-renturn.ts +10 -11
  236. package/src/service/service/entity/method/method.ts +12 -35
  237. package/src/service/service/entity/method/provider/de-action-de-method.provider.ts +4 -2
  238. package/src/service/service/entity/method/provider/fetch-de-method.provider.ts +4 -2
  239. package/src/service/service/file/file.service.ts +2 -2
  240. package/src/service/service/work-flow/work-flow.service.ts +30 -30
  241. package/src/service/utils/app-counter/app-counter.ts +7 -7
  242. package/src/service/utils/app-counter/app-de-counter.ts +2 -2
  243. package/src/service/utils/de-cache/de-cache.ts +124 -85
  244. package/src/service/utils/dynamic-code-list/dynamic-code-list.ts +2 -5
  245. package/src/service/utils/res-path/res-path.ts +4 -4
  246. package/src/service/utils/search-filter/search-filter.ts +2 -2
  247. package/src/service/utils/service-exist-util/service-exist-util.ts +2 -2
  248. package/src/types.ts +10 -0
  249. package/src/ui-logic/ui-logic-param/ui-logic-param.ts +1 -1
  250. package/src/utils/index.ts +2 -0
  251. package/src/utils/nav-params/calc-nav-params.ts +2 -2
  252. package/src/utils/open-redirect-view/open-redirect-view.ts +1 -1
  253. package/src/utils/ui-domain/ui-domain.ts +52 -0
  254. package/src/utils/ui-domain-manager/ui-domain-manager.ts +64 -0
  255. package/out/service/service/entity/util/util.d.ts +0 -13
  256. package/out/service/service/entity/util/util.d.ts.map +0 -1
  257. package/out/service/service/entity/util/util.js +0 -14
  258. package/src/service/service/entity/util/util.ts +0 -18
@@ -26,7 +26,6 @@ function getProvider(key) {
26
26
  export async function getGridColumnProvider(model) {
27
27
  let provider;
28
28
  const { columnType, enableRowEdit, sysPFPluginId, appId } = model;
29
- const { renderSysPFPluginId } = model;
30
29
  // 找插件适配器
31
30
  if (sysPFPluginId) {
32
31
  const pluginKey = await getPluginRegisterKey(sysPFPluginId, appId);
@@ -40,19 +39,6 @@ export async function getGridColumnProvider(model) {
40
39
  return provider;
41
40
  }
42
41
  }
43
- // 树表格列插件
44
- if (renderSysPFPluginId) {
45
- const pluginKey = await getPluginRegisterKey(renderSysPFPluginId, appId);
46
- if (pluginKey) {
47
- provider = getProvider(pluginKey);
48
- }
49
- if (!provider) {
50
- ibiz.log.error(`找不到树表格列插件${pluginKey}对应的适配器`);
51
- }
52
- else {
53
- return provider;
54
- }
55
- }
56
42
  const key = enableRowEdit ? `${columnType}_EDIT` : columnType;
57
43
  // 找表格列类型
58
44
  provider = getProvider(key);
@@ -1,6 +1,10 @@
1
1
  import { IAppDataEntity, IApplication } from '@ibiz/model-core';
2
2
  import { IHttpResponse } from '@ibiz-template/core';
3
3
  import { IAppDEService } from '../interface';
4
+ /**
5
+ * 实体服务构造方法
6
+ */
7
+ export type DEServiceConstructor = (srfSessionId: string, entityModel: IAppDataEntity) => Promise<IAppDEService>;
4
8
  /**
5
9
  * 应用服务工具类
6
10
  *
@@ -17,16 +21,16 @@ export declare class DEServiceUtil {
17
21
  * @author chitanda
18
22
  * @date 2022-08-17 23:08:36
19
23
  * @protected
20
- * @type {Map<string, IAppDEService>}
24
+ * @type {Map<string, Map<string, IAppDEService>>} Map<域标识, Map<实体标识, 实体服务>>
21
25
  */
22
- protected cache: Map<string, IAppDEService>;
26
+ protected cache: Map<string, Map<string, IAppDEService>>;
23
27
  /**
24
28
  * 实体服务构造方法缓存
25
29
  * @author lxm
26
30
  * @date 2023-05-15 08:37:13
27
31
  * @protected
28
32
  */
29
- protected constructorCache: Map<string, (entityModel: IAppDataEntity) => Promise<IAppDEService>>;
33
+ protected constructorCache: Map<string, DEServiceConstructor>;
30
34
  /**
31
35
  * Creates an instance of DEServiceUtil.
32
36
  *
@@ -40,40 +44,49 @@ export declare class DEServiceUtil {
40
44
  *
41
45
  * @author chitanda
42
46
  * @date 2023-06-14 10:06:31
43
- * @param {string} id
44
- * @param {(entityModel: IAppDataEntity) => Promise<IAppDEService>} constructor
47
+ * @param {string} id 实体标识
48
+ * @param {DEServiceConstructor} constructor
45
49
  */
46
- register(id: string, constructor: (entityModel: IAppDataEntity) => Promise<IAppDEService>): void;
50
+ register(id: string, constructor: DEServiceConstructor): void;
47
51
  /**
48
52
  * 根据实体标识获取实体服务
49
53
  *
50
54
  * @author chitanda
51
- * @date 2022-12-23 10:12:24
55
+ * @date 2023-12-22 10:12:47
56
+ * @param {IContext} context 上下文,用于计算模型所属沙箱环境
52
57
  * @param {string} id 实体标识
53
- * @param {IParams} [context] 上下文,用于计算模型所属沙箱环境
54
58
  * @return {*} {Promise<IAppDEService>}
55
59
  */
56
- getService(id: string): Promise<IAppDEService>;
60
+ getService(context: IContext, id: string): Promise<IAppDEService>;
61
+ /**
62
+ * 重置服务, 删除指定域下的所有服务缓存
63
+ *
64
+ * @author chitanda
65
+ * @date 2023-12-22 13:12:47
66
+ * @param {IContext} context
67
+ * @return {*} {void}
68
+ */
69
+ reset(context: IContext): void;
57
70
  /**
58
71
  * 清理所有服务, 当前临时域下的所有临时数据缓存
59
72
  *
60
73
  * @description 根据 srfsessionid 作为临时数据域
61
74
  * @author chitanda
62
75
  * @date 2022-08-18 14:08:48
63
- * @param {IParams} context
76
+ * @param {IContext} context
64
77
  */
65
- clearTempCache(context: IParams): void;
78
+ clearTempCache(context: IContext): void;
66
79
  /**
67
80
  * 执行服务方法
68
81
  * @author lxm
69
82
  * @date 2023-04-26 02:02:43
70
83
  * @param {string} appDataEntityId 实体名称
71
84
  * @param {string} methodName 方法名
72
- * @param {IParams} context 上下文
85
+ * @param {IContext} context 上下文
73
86
  * @param {(IData | undefined)} [params] 数据
74
87
  * @param {(IParams | undefined)} [params2] 视图参数
75
88
  * @return {*} {Promise<IHttpResponse<IData>>}
76
89
  */
77
- exec(appDataEntityId: string, methodName: string, context: IParams, params?: IData | IData[] | undefined, params2?: IParams | undefined): Promise<IHttpResponse<IData>>;
90
+ exec(appDataEntityId: string, methodName: string, context: IContext, params?: IData | IData[] | undefined, params2?: IParams | undefined): Promise<IHttpResponse<IData>>;
78
91
  }
79
92
  //# sourceMappingURL=de-service-util.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"de-service-util.d.ts","sourceRoot":"","sources":["../../src/service/de-service-util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAgB,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG7C;;;;;;;GAOG;AACH,qBAAa,aAAa;IA6BZ,SAAS,CAAC,QAAQ,EAAE,YAAY;IA5B5C;;;;;;;OAOG;IACH,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAa;IAExD;;;;;OAKG;IACH,SAAS,CAAC,gBAAgB,EAAE,GAAG,CAC7B,MAAM,EACN,CAAC,WAAW,EAAE,cAAc,KAAK,OAAO,CAAC,aAAa,CAAC,CACxD,CAAa;IAEd;;;;;;OAMG;gBACmB,QAAQ,EAAE,YAAY;IAE5C;;;;;;;OAOG;IACH,QAAQ,CACN,EAAE,EAAE,MAAM,EACV,WAAW,EAAE,CAAC,WAAW,EAAE,cAAc,KAAK,OAAO,CAAC,aAAa,CAAC,GACnE,IAAI;IAIP;;;;;;;;OAQG;IACG,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAqBpD;;;;;;;OAOG;IACH,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAMtC;;;;;;;;;;OAUG;IACG,IAAI,CACR,e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;IACH,cAAc,CAAC,OAAO,EAAE,QAAQ,GAAG,IAAI;IAWvC;;;;;;;;;;OAUG;IACG,IAAI,CACR,eAAe,EAAE,MAAM,EACvB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,QAAQ,EACjB,MAAM,CAAC,EAAE,KAAK,GAAG,KAAK,EAAE,GAAG,SAAS,EACpC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,GAC5B,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;CAIjC"}
@@ -24,7 +24,7 @@ export class DEServiceUtil {
24
24
  * @author chitanda
25
25
  * @date 2022-08-17 23:08:36
26
26
  * @protected
27
- * @type {Map<string, IAppDEService>}
27
+ * @type {Map<string, Map<string, IAppDEService>>} Map<域标识, Map<实体标识, 实体服务>>
28
28
  */
29
29
  this.cache = new Map();
30
30
  /**
@@ -40,8 +40,8 @@ export class DEServiceUtil {
40
40
  *
41
41
  * @author chitanda
42
42
  * @date 2023-06-14 10:06:31
43
- * @param {string} id
44
- * @param {(entityModel: IAppDataEntity) => Promise<IAppDEService>} constructor
43
+ * @param {string} id 实体标识
44
+ * @param {DEServiceConstructor} constructor
45
45
  */
46
46
  register(id, constructor) {
47
47
  this.constructorCache.set(id, constructor);
@@ -50,13 +50,18 @@ export class DEServiceUtil {
50
50
  * 根据实体标识获取实体服务
51
51
  *
52
52
  * @author chitanda
53
- * @date 2022-12-23 10:12:24
53
+ * @date 2023-12-22 10:12:47
54
+ * @param {IContext} context 上下文,用于计算模型所属沙箱环境
54
55
  * @param {string} id 实体标识
55
- * @param {IParams} [context] 上下文,用于计算模型所属沙箱环境
56
56
  * @return {*} {Promise<IAppDEService>}
57
57
  */
58
- async getService(id) {
59
- if (!this.cache.has(id)) {
58
+ async getService(context, id) {
59
+ const sandboxId = context.srfsessionid;
60
+ if (!this.cache.has(sandboxId)) {
61
+ this.cache.set(sandboxId, new Map());
62
+ }
63
+ const map = this.cache.get(sandboxId);
64
+ if (!map.has(id)) {
60
65
  const entityModel = await ibiz.hub.getAppDataEntity(id, this.appModel.appId);
61
66
  if (!entityModel) {
62
67
  throw new RuntimeError(`未找到应用实体[${id}]`);
@@ -64,14 +69,33 @@ export class DEServiceUtil {
64
69
  const constructor = this.constructorCache.get(id);
65
70
  let service;
66
71
  if (constructor) {
67
- service = await constructor(entityModel);
72
+ service = await constructor(sandboxId, entityModel);
68
73
  }
69
74
  else {
70
- service = new DEService(entityModel);
75
+ service = new DEService(sandboxId, entityModel);
71
76
  }
72
- this.cache.set(id, service);
77
+ map.set(id, service);
78
+ }
79
+ return map.get(id);
80
+ }
81
+ /**
82
+ * 重置服务, 删除指定域下的所有服务缓存
83
+ *
84
+ * @author chitanda
85
+ * @date 2023-12-22 13:12:47
86
+ * @param {IContext} context
87
+ * @return {*} {void}
88
+ */
89
+ reset(context) {
90
+ const sandboxId = context.srfsessionid;
91
+ if (!this.cache.has(sandboxId)) {
92
+ return;
73
93
  }
74
- return this.cache.get(id);
94
+ const map = this.cache.get(sandboxId);
95
+ map.forEach(service => {
96
+ service.destroy();
97
+ });
98
+ this.cache.delete(sandboxId);
75
99
  }
76
100
  /**
77
101
  * 清理所有服务, 当前临时域下的所有临时数据缓存
@@ -79,11 +103,16 @@ export class DEServiceUtil {
79
103
  * @description 根据 srfsessionid 作为临时数据域
80
104
  * @author chitanda
81
105
  * @date 2022-08-18 14:08:48
82
- * @param {IParams} context
106
+ * @param {IContext} context
83
107
  */
84
108
  clearTempCache(context) {
85
- this.cache.forEach(service => {
86
- service.local.clear(context);
109
+ const sandboxId = context.srfsessionid;
110
+ if (!this.cache.has(sandboxId)) {
111
+ return;
112
+ }
113
+ const map = this.cache.get(sandboxId);
114
+ map.forEach(service => {
115
+ service.local.clear();
87
116
  });
88
117
  }
89
118
  /**
@@ -92,13 +121,13 @@ export class DEServiceUtil {
92
121
  * @date 2023-04-26 02:02:43
93
122
  * @param {string} appDataEntityId 实体名称
94
123
  * @param {string} methodName 方法名
95
- * @param {IParams} context 上下文
124
+ * @param {IContext} context 上下文
96
125
  * @param {(IData | undefined)} [params] 数据
97
126
  * @param {(IParams | undefined)} [params2] 视图参数
98
127
  * @return {*} {Promise<IHttpResponse<IData>>}
99
128
  */
100
129
  async exec(appDataEntityId, methodName, context, params, params2) {
101
- const service = await this.getService(appDataEntityId);
130
+ const service = await this.getService(context, appDataEntityId);
102
131
  return service.exec(methodName, context, params, params2);
103
132
  }
104
133
  }
@@ -1,6 +1,6 @@
1
1
  import { IAppDataEntity, IAppDEMethodDTO, IAppDEMethodDTOField } from '@ibiz/model-core';
2
2
  import { AppDataEntity } from '../app-data-entity/app-data-entity';
3
- import { IAppService } from '../../interface';
3
+ import { IAppDEService, IAppService, IDataEntity } from '../../interface';
4
4
  /**
5
5
  * 应用实体服务方法转换 DTO
6
6
  *
@@ -10,13 +10,24 @@ import { IAppService } from '../../interface';
10
10
  * @class MethodDto
11
11
  */
12
12
  export declare class MethodDto {
13
+ protected service: IAppDEService;
13
14
  protected entity: IAppDataEntity;
14
15
  protected isLocalMode?: boolean | undefined;
15
16
  protected dto?: IAppDEMethodDTO | undefined;
16
17
  protected app?: IAppService;
17
18
  protected fields: IAppDEMethodDTOField[];
18
19
  protected dtoMap: Map<string, MethodDto>;
19
- constructor(entity: IAppDataEntity, isLocalMode?: boolean | undefined, dto?: IAppDEMethodDTO | undefined);
20
+ constructor(service: IAppDEService, entity: IAppDataEntity, isLocalMode?: boolean | undefined, dto?: IAppDEMethodDTO | undefined);
21
+ /**
22
+ * 查找本地 DTO 存储数据
23
+ *
24
+ * @author chitanda
25
+ * @date 2023-12-22 14:12:19
26
+ * @param {IContext} context
27
+ * @param {IParams} [params]
28
+ * @return {*} {IDataEntity[]}
29
+ */
30
+ select(context: IContext, params?: IParams): IDataEntity[];
20
31
  /**
21
32
  * 转换数组成ListMap
22
33
  *
@@ -36,30 +47,31 @@ export declare class MethodDto {
36
47
  *
37
48
  * @author chitanda
38
49
  * @date 2022-10-10 23:10:33
39
- * @param {IParams} context
50
+ * @param {IContext} context
40
51
  * @param {IData} data
41
52
  * @return {*} {Promise<IData>}
42
53
  */
43
- get(context: IParams, data: IData): Promise<IData>;
54
+ get(context: IContext, data: IData): Promise<IData>;
44
55
  /**
45
56
  * 设置本地 DTO 存储
46
57
  *
47
58
  * @author chitanda
48
59
  * @date 2022-10-10 23:10:50
49
- * @param {IParams} context
60
+ * @param {IContext} context
50
61
  * @param {IData[]} data
51
62
  * @return {*} {Promise<AppDataEntity[]>}
52
63
  */
53
- sets(context: IParams, data: IData[]): Promise<AppDataEntity[]>;
64
+ sets(context: IContext, data: IData[]): Promise<AppDataEntity[]>;
54
65
  /**
55
66
  * 获取子属性 DTO
56
67
  *
57
68
  * @author chitanda
58
- * @date 2022-10-17 16:10:47
69
+ * @date 2023-12-22 13:12:06
59
70
  * @protected
71
+ * @param {IContext} context
60
72
  * @param {IAppDEMethodDTOField} field
61
73
  * @return {*} {Promise<MethodDto>}
62
74
  */
63
- protected getFieldDto(field: IAppDEMethodDTOField): Promise<MethodDto>;
75
+ protected getFieldDto(context: IContext, field: IAppDEMethodDTOField): Promise<MethodDto>;
64
76
  }
65
77
  //# sourceMappingURL=method.dto.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"method.dto.d.ts","sourceRoot":"","sources":["../../../src/service/dto/method.dto.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,eAAe,EACf,oBAAoB,EACrB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAEnE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAM9C;;;;;;;GAOG;AACH,qBAAa,SAAS;IAQlB,SAAS,CAAC,MAAM,EAAE,cAAc;IAChC,SAAS,CAAC,WAAW,CAAC;IACtB,SAAS,CAAC,GAAG,CAAC;IAThB,SAAS,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC;IAE5B,SAAS,CAAC,MAAM,EAAG,oBAAoB,EAAE,CAAC;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B,MAAM,EAAE,cAAc,EACtB,WAAW,CAAC,qBAAS,EACrB,GAAG,CAAC,6BAAiB;IAUjC;;;;;;;;OAQG;IACH,MAAM,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,WAAW,EAAE;IAI1D;;;;;OAKG;IACH,OAAO,CAAC,qBAAqB;IAQ7B;;;;;OAKG;IACH,OAAO,CAAC,qBAAqB;IAS7B;;;;;;;;OAQG;IACG,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;IAwDzD;;;;;;;;OAQG;IACG,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IA4CtE;;;;;;;;;OASG;cACa,WAAW,CACzB,OAAO,EAAE,QAAQ,EACjB,KAAK,EAAE,oBAAoB,GAC1B,OAAO,CAAC,SAAS,CAAC;CAkBtB"}
@@ -10,7 +10,8 @@ import { findModelChild } from '../../model';
10
10
  * @class MethodDto
11
11
  */
12
12
  export class MethodDto {
13
- constructor(entity, isLocalMode, dto) {
13
+ constructor(service, entity, isLocalMode, dto) {
14
+ this.service = service;
14
15
  this.entity = entity;
15
16
  this.isLocalMode = isLocalMode;
16
17
  this.dto = dto;
@@ -23,6 +24,18 @@ export class MethodDto {
23
24
  this.fields = [];
24
25
  }
25
26
  }
27
+ /**
28
+ * 查找本地 DTO 存储数据
29
+ *
30
+ * @author chitanda
31
+ * @date 2023-12-22 14:12:19
32
+ * @param {IContext} context
33
+ * @param {IParams} [params]
34
+ * @return {*} {IDataEntity[]}
35
+ */
36
+ select(context, params) {
37
+ return this.service.local.select(context, params);
38
+ }
26
39
  /**
27
40
  * 转换数组成ListMap
28
41
  *
@@ -55,7 +68,7 @@ export class MethodDto {
55
68
  *
56
69
  * @author chitanda
57
70
  * @date 2022-10-10 23:10:33
58
- * @param {IParams} context
71
+ * @param {IContext} context
59
72
  * @param {IData} data
60
73
  * @return {*} {Promise<IData>}
61
74
  */
@@ -88,11 +101,13 @@ export class MethodDto {
88
101
  if (!field.refAppDataEntityId) {
89
102
  break;
90
103
  }
91
- const dto = await this.getFieldDto(field);
92
- const service = await this.app.deService.getService(field.refAppDataEntityId);
93
- const items = await service.selectLocal(context, {
94
- // srfpkey: data[this.entity.keyAppDEFieldId!],
95
- });
104
+ const dto = await this.getFieldDto(context, field);
105
+ // 子数据过滤参数
106
+ const filterParams = {};
107
+ if (field.refPickupAppDEFieldId) {
108
+ filterParams[field.refPickupAppDEFieldId] = data.srfkey;
109
+ }
110
+ const items = await dto.select(context, filterParams);
96
111
  if (items) {
97
112
  const arr = [];
98
113
  for (let j = 0; j < items.length; j++) {
@@ -115,14 +130,13 @@ export class MethodDto {
115
130
  *
116
131
  * @author chitanda
117
132
  * @date 2022-10-10 23:10:50
118
- * @param {IParams} context
133
+ * @param {IContext} context
119
134
  * @param {IData[]} data
120
135
  * @return {*} {Promise<AppDataEntity[]>}
121
136
  */
122
137
  async sets(context, data) {
123
- const service = await this.app.deService.getService(this.entity.id);
124
138
  if (this.isLocalMode) {
125
- service.local.clear(context);
139
+ this.service.local.clear();
126
140
  }
127
141
  return Promise.all(data.map(async (datum) => {
128
142
  const all = this.fields
@@ -137,13 +151,14 @@ export class MethodDto {
137
151
  if (!field.refAppDataEntityId) {
138
152
  return;
139
153
  }
140
- const dto = await this.getFieldDto(field);
154
+ const dto = await this.getFieldDto(context, field);
141
155
  const items = datum[key];
142
156
  if (items) {
143
157
  const pKey = datum[this.entity.keyAppDEFieldId];
144
158
  // 特殊处理,在子包内设置父对象标识
145
159
  items.forEach(item => {
146
160
  item.srfpkey = pKey;
161
+ item[field.refPickupAppDEFieldId] = pKey;
147
162
  });
148
163
  await dto.sets(context, items);
149
164
  }
@@ -157,7 +172,7 @@ export class MethodDto {
157
172
  }
158
173
  const entityData = new AppDataEntity(this.entity, datum);
159
174
  if (this.isLocalMode) {
160
- await service.local.add(context, entityData);
175
+ await this.service.local.add(context, entityData);
161
176
  }
162
177
  return entityData;
163
178
  }));
@@ -166,18 +181,21 @@ export class MethodDto {
166
181
  * 获取子属性 DTO
167
182
  *
168
183
  * @author chitanda
169
- * @date 2022-10-17 16:10:47
184
+ * @date 2023-12-22 13:12:06
170
185
  * @protected
186
+ * @param {IContext} context
171
187
  * @param {IAppDEMethodDTOField} field
172
188
  * @return {*} {Promise<MethodDto>}
173
189
  */
174
- async getFieldDto(field) {
190
+ async getFieldDto(context, field) {
175
191
  if (this.dtoMap.has(field.codeName)) {
176
192
  return this.dtoMap.get(field.codeName);
177
193
  }
178
194
  const entity = await ibiz.hub.getAppDataEntity(field.refAppDataEntityId, this.entity.appId);
179
195
  const methodDto = findModelChild(entity.appDEMethodDTOs || [], field.refAppDEMethodDTOId);
180
- const dto = new MethodDto(entity, true, methodDto);
196
+ const service = await this.app.deService.getService(context, entity.id);
197
+ service.isLocalMode = true;
198
+ const dto = new MethodDto(service, entity, true, methodDto);
181
199
  this.dtoMap.set(field.codeName, dto);
182
200
  return dto;
183
201
  }
@@ -63,7 +63,7 @@ export declare class AuthorityService {
63
63
  * @author chitanda
64
64
  * @date 2022-12-23 10:12:24
65
65
  * @param {string} id 实体标识
66
- * @param {IParams} [context] 上下文,用于计算模型所属沙箱环境
66
+ * @param {IContext} [context] 上下文,用于计算模型所属沙箱环境
67
67
  * @return {*} {Promise<IAppDEService>}
68
68
  */
69
69
  getService(id: string): Promise<IAppDeAuthorityService>;
@@ -67,7 +67,7 @@ export class AuthorityService {
67
67
  * @author chitanda
68
68
  * @date 2022-12-23 10:12:24
69
69
  * @param {string} id 实体标识
70
- * @param {IParams} [context] 上下文,用于计算模型所属沙箱环境
70
+ * @param {IContext} [context] 上下文,用于计算模型所属沙箱环境
71
71
  * @return {*} {Promise<IAppDEService>}
72
72
  */
73
73
  async getService(id) {
@@ -77,17 +77,17 @@ export declare class CodeListService {
77
77
  * @param {IAppCodeList} codeList
78
78
  * @returns {*} {IData[]}
79
79
  */
80
- protected getDynamicCodeList(codeList: IAppCodeList, context?: IParams, params?: IParams): Promise<CodeListItem[]>;
80
+ protected getDynamicCodeList(codeList: IAppCodeList, context: IContext, params?: IParams): Promise<CodeListItem[]>;
81
81
  /**
82
82
  * 获取代码表
83
83
  *
84
84
  * @author chitanda
85
85
  * @date 2022-08-25 15:08:45
86
86
  * @param {string} tag
87
- * @param {IParams} [context]
87
+ * @param {IContext} [context]
88
88
  * @param {IParams} [params]
89
89
  * @return {*} {Promise<CodeListItem[]>}
90
90
  */
91
- get(tag: string, context?: IParams, params?: IParams): Promise<readonly CodeListItem[]>;
91
+ get(tag: string, context: IContext, params?: IParams): Promise<readonly CodeListItem[]>;
92
92
  }
93
93
  //# sourceMappingURL=code-list.service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"code-list.service.d.ts","sourceRoot":"","sources":["../../../../src/service/service/code-list/code-list.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD;;;;;;;GAOG;AACH,qBAAa,eAAe;IAoBd,SAAS,CAAC,QAAQ,EAAE,YAAY;IAnB5C;;;;;OAKG;IACH,SAAS,CAAC,YAAY,4BAAmC;IAEzD;;;;;;;OAOG;IACH,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,GAAG,oBAAoB,CAAC,CAChE;gBAEU,QAAQ,EAAE,YAAY;IAE5C;;;;;;;OAOG;IACH,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE,YAAY,GAAG,YAAY,EAAE;IAc3D;;;;;;;;OAQG;IACH,WAAW,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI;IAMzC;;;;;;;;OAQG;IACH,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS;IAIlD;;;;;;;;;OASG;IACH,SAAS,CAAC,iBAAiB,CACzB,SAAS,EAAE,SAAS,EAAE,EACtB,aAAa,EAAE,OAAO,GACrB,QAAQ,CAAC,YAAY,CAAC,EAAE;IAsC3B;;;;;;;;OAQG;cACa,kBAAkB,CAChC,QAAQ,EAAE,YAAY,EACtB,OAAO,GAAE,OAAY,EACrB,MAAM,GAAE,OAAY,GACnB,OAAO,CAAC,YAAY,EAAE,CAAC;IAa1B;;;;;;;;;OASG;IACG,GAAG,CACP,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,OAAO,EACjB,MAAM,CAAC,EAAE,OAAO,GACf,OAAO,CAAC,SAAS,YAAY,EAAE,CAAC;CAcpC"}
1
+ {"version":3,"file":"code-list.service.d.ts","sourceRoot":"","sources":["../../../../src/service/service/code-list/code-list.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD;;;;;;;GAOG;AACH,qBAAa,eAAe;IAoBd,SAAS,CAAC,QAAQ,EAAE,YAAY;IAnB5C;;;;;OAKG;IACH,SAAS,CAAC,YAAY,4BAAmC;IAEzD;;;;;;;OAOG;IACH,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,GAAG,oBAAoB,CAAC,CAChE;gBAEU,QAAQ,EAAE,YAAY;IAE5C;;;;;;;OAOG;IACH,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE,YAAY,GAAG,YAAY,EAAE;IAc3D;;;;;;;;OAQG;IACH,WAAW,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI;IAMzC;;;;;;;;OAQG;IACH,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS;IAIlD;;;;;;;;;OASG;IACH,SAAS,CAAC,iBAAiB,CACzB,SAAS,EAAE,SAAS,EAAE,EACtB,aAAa,EAAE,OAAO,GACrB,QAAQ,CAAC,YAAY,CAAC,EAAE;IAsC3B;;;;;;;;OAQG;cACa,kBAAkB,CAChC,QAAQ,EAAE,YAAY,EACtB,OAAO,EAAE,QAAQ,EACjB,MAAM,GAAE,OAAY,GACnB,OAAO,CAAC,YAAY,EAAE,CAAC;IAa1B;;;;;;;;;OASG;IACG,GAAG,CACP,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,QAAQ,EACjB,MAAM,CAAC,EAAE,OAAO,GACf,OAAO,CAAC,SAAS,YAAY,EAAE,CAAC;CAcpC"}
@@ -127,7 +127,7 @@ export class CodeListService {
127
127
  * @param {IAppCodeList} codeList
128
128
  * @returns {*} {IData[]}
129
129
  */
130
- async getDynamicCodeList(codeList, context = {}, params = {}) {
130
+ async getDynamicCodeList(codeList, context, params = {}) {
131
131
  let dynamicCache;
132
132
  const codeName = codeList.codeName;
133
133
  if (this.cache.has(codeName)) {
@@ -146,7 +146,7 @@ export class CodeListService {
146
146
  * @author chitanda
147
147
  * @date 2022-08-25 15:08:45
148
148
  * @param {string} tag
149
- * @param {IParams} [context]
149
+ * @param {IContext} [context]
150
150
  * @param {IParams} [params]
151
151
  * @return {*} {Promise<CodeListItem[]>}
152
152
  */
@@ -50,11 +50,11 @@ export declare class ControlService<T extends IControl = IControl> {
50
50
  * @author lxm
51
51
  * @date 2022-08-31 17:08:41
52
52
  * @param {string} methodName 方法名
53
- * @param {IParams} context 上下文
53
+ * @param {IContext} context 上下文
54
54
  * @param {IParams} [params={}] 视图参数或数据
55
55
  * @returns {*} {Promise<IHttpResponse>}
56
56
  */
57
- exec(methodName: string, context: IParams, data?: IData, params?: IParams): Promise<IHttpResponse>;
57
+ exec(methodName: string, context: IContext, data?: IData, params?: IParams): Promise<IHttpResponse>;
58
58
  /**
59
59
  * 处理响应
60
60
  *
@@ -1 +1 @@
1
- {"version":3,"file":"control.service.d.ts","sourceRoot":"","sources":["../../../../src/service/service/control/control.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAS,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,qBAAa,cAAc,CAAC,CAAC,SAAS,QAAQ,GAAG,QAAQ;IACvD,GAAG,EAAG,WAAW,CAAC;IAElB;;;;;;OAMG;IACH,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;IAElB;;;;;;;OAOG;IACH,SAAS,0BAAiC;IAE1C;;;;;OAKG;gBACS,KAAK,EAAE,CAAC;IAIpB;;;;;;OAMG;IACG,IAAI,CAAC,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAK9C;;;;;OAKG;IACH,SAAS,CAAC,aAAa,IAAI,IAAI;IAE/B;;;;;;;;;OASG;IACG,IAAI,CACR,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,OAAO,EAChB,IAAI,CAAC,EAAE,KAAK,EACZ,MAAM,CAAC,EAAE,OAAO,GACf,OAAO,CAAC,aAAa,CAAC;IAWzB;;;;;;;OAOG;IACH,cAAc,CAAC,GAAG,EAAE,aAAa,GAAG,aAAa;IAKjD;;;;;;;OAOG;IACH,QAAQ,CAAC,UAAU,EAAE,KAAK,GAAG,SAAS;CAGvC"}
1
+ {"version":3,"file":"control.service.d.ts","sourceRoot":"","sources":["../../../../src/service/service/control/control.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAS,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,qBAAa,cAAc,CAAC,CAAC,SAAS,QAAQ,GAAG,QAAQ;IACvD,GAAG,EAAG,WAAW,CAAC;IAElB;;;;;;OAMG;IACH,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;IAElB;;;;;;;OAOG;IACH,SAAS,0BAAiC;IAE1C;;;;;OAKG;gBACS,KAAK,EAAE,CAAC;IAIpB;;;;;;OAMG;IACG,IAAI,CAAC,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAK9C;;;;;OAKG;IACH,SAAS,CAAC,aAAa,IAAI,IAAI;IAE/B;;;;;;;;;OASG;IACG,IAAI,CACR,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,QAAQ,EACjB,IAAI,CAAC,EAAE,KAAK,EACZ,MAAM,CAAC,EAAE,OAAO,GACf,OAAO,CAAC,aAAa,CAAC;IAWzB;;;;;;;OAOG;IACH,cAAc,CAAC,GAAG,EAAE,aAAa,GAAG,aAAa;IAKjD;;;;;;;OAOG;IACH,QAAQ,CAAC,UAAU,EAAE,KAAK,GAAG,SAAS;CAGvC"}
@@ -43,7 +43,7 @@ export class ControlService {
43
43
  * @author lxm
44
44
  * @date 2022-08-31 17:08:41
45
45
  * @param {string} methodName 方法名
46
- * @param {IParams} context 上下文
46
+ * @param {IContext} context 上下文
47
47
  * @param {IParams} [params={}] 视图参数或数据
48
48
  * @returns {*} {Promise<IHttpResponse>}
49
49
  */
@@ -8,68 +8,78 @@ export declare class MDControlService<T extends IMDControl = IMDControl> extends
8
8
  *
9
9
  * @author lxm
10
10
  * @date 2022-08-31 17:08:41
11
- * @param {IParams} context 上下文
11
+ * @param {IContext} context 上下文
12
12
  * @param {IParams} [params={}] 视图参数
13
13
  * @returns {*} {Promise<IHttpResponse>}
14
14
  */
15
- fetch(context: IParams, params?: IParams): Promise<IHttpResponse<ControlVO[]>>;
15
+ fetch(context: IContext, params?: IParams): Promise<IHttpResponse<ControlVO[]>>;
16
16
  /**
17
17
  * 执行获取单条数据方法
18
18
  *
19
19
  * @author lxm
20
20
  * @date 2022-08-31 17:08:41
21
- * @param {IParams} context 上下文
21
+ * @param {IContext} context 上下文
22
22
  * @param {IParams} [params={}] 视图参数
23
23
  * @returns {*} {Promise<IHttpResponse>}
24
24
  */
25
- get(context: IParams, params?: IParams): Promise<IHttpResponse<ControlVO>>;
25
+ get(context: IContext, params?: IParams): Promise<IHttpResponse<ControlVO>>;
26
26
  /**
27
27
  * 执行获取草稿方法
28
28
  *
29
29
  * @author lxm
30
30
  * @date 2022-08-31 17:08:41
31
- * @param {IParams} context 上下文
31
+ * @param {IContext} context 上下文
32
32
  * @param {IParams} [params={}] 视图参数
33
33
  * @returns {*} {Promise<IHttpResponse>}
34
34
  */
35
- getDraft(context: IParams, params?: IParams): Promise<IHttpResponse<ControlVO>>;
35
+ getDraft(context: IContext, params?: IParams): Promise<IHttpResponse<ControlVO>>;
36
36
  /**
37
37
  * 删除单条数据
38
38
  *
39
39
  * @author lxm
40
40
  * @date 2022-09-07 19:09:48
41
- * @param {IParams} context 上下文
41
+ * @param {IContext} context 上下文
42
42
  * @param {IParams} [params={}] 视图参数
43
43
  * @returns {*}
44
44
  */
45
- remove(context: IParams, params?: IParams): Promise<IHttpResponse>;
45
+ remove(context: IContext, params?: IParams): Promise<IHttpResponse>;
46
46
  /**
47
47
  * 新建数据
48
48
  *
49
49
  * @author lxm
50
50
  * @date 2022-09-07 19:09:11
51
- * @param {IParams} context 上下文
51
+ * @param {IContext} context 上下文
52
52
  * @param {ControlVO} data 数据
53
53
  * @returns {*}
54
54
  */
55
- create(context: IParams, data: ControlVO): Promise<IHttpResponse<ControlVO>>;
55
+ create(context: IContext, data: ControlVO): Promise<IHttpResponse<ControlVO>>;
56
56
  /**
57
57
  * 更新数据
58
58
  *
59
59
  * @author lxm
60
60
  * @date 2022-09-07 19:09:11
61
- * @param {IParams} context 上下文
61
+ * @param {IContext} context 上下文
62
62
  * @param {ControlVO} data 数据
63
63
  * @returns {*}
64
64
  */
65
- update(context: IParams, data: ControlVO): Promise<IHttpResponse<ControlVO>>;
65
+ update(context: IContext, data: ControlVO): Promise<IHttpResponse<ControlVO>>;
66
+ /**
67
+ * 批量更新数据
68
+ *
69
+ * @author chitanda
70
+ * @date 2023-12-21 10:12:09
71
+ * @param {IContext} context
72
+ * @param {ControlVO[]} data
73
+ * @return {*} {Promise<void>}
74
+ */
75
+ updateBatch(context: IContext, data: ControlVO[]): Promise<IHttpResponse<ControlVO[]>>;
66
76
  /**
67
77
  * 导出数据
68
78
  *
69
79
  * @author lxm
70
80
  * @date 2022-11-25 14:11:09
71
81
  * @param {IPSDEDataExport} dataExport 导出模型
72
- * @param {IParams} context 上下文
82
+ * @param {IContext} context 上下文
73
83
  * @param {IParams} [params={}] 请求参数
74
84
  * @returns {*} {Promise<IHttpResponse>}
75
85
  */
@@ -1 +1 @@
1
- {"version":3,"file":"md-control.service.d.ts","sourceRoot":"","sources":["../../../../src/service/service/control/md-control.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAgB,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE7D,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,qBAAa,gBAAgB,CAC3B,CAAC,SAAS,UAAU,GAAG,UAAU,CACjC,SAAQ,cAAc,CAAC,CAAC,CAAC;IACzB;;;;;;;;OAQG;IACG,KAAK,CACT,OAAO,EAAE,OAAO,EAChB,MAAM,GAAE,OAAY,GACnB,OAAO,CAAC,aAAa,CAAC,SAAS,EAAE,CAAC,CAAC;IAQtC;;;;;;;;OAQG;IACG,GAAG,CACP,OAAO,EAAE,OAAO,EAChB,MAAM,GAAE,OAAY,GACnB,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IAOpC;;;;;;;;OAQG;IACG,QAAQ,CACZ,OAAO,EAAE,OAAO,EAChB,MAAM,GAAE,OAAY,GACnB,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IAQpC;;;;;;;;OAQG;IACG,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,GAAE,OAAY,GAAG,OAAO,CAAC,aAAa,CAAC;IAO5E;;;;;;;;OAQG;IACG,MAAM,CACV,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,SAAS,GACd,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IAQpC;;;;;;;;OAQG;IACG,MAAM,CACV,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,SAAS,GACd,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IAQpC;;;;;;;;;OASG;IACG,UAAU,CACd,WAAW,EAAE,aAAa,EAC1B,QAAQ,EAAE,OAAO,EACjB,OAAO,GAAE,OAAY,GACpB,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAU/B;;;;;;;OAOG;IACH,cAAc,CAAC,QAAQ,EAAE,aAAa,GAAG,aAAa;CAwBvD"}
1
+ {"version":3,"file":"md-control.service.d.ts","sourceRoot":"","sources":["../../../../src/service/service/control/md-control.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAgB,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE7D,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,qBAAa,gBAAgB,CAC3B,CAAC,SAAS,UAAU,GAAG,UAAU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