提交 ae6deb42 编写于 作者: ibizdev's avatar ibizdev

chitanda 部署微服务应用 [TrainSys,网页端]

上级 46816b45
import { IPSDEAppendParamLogic, IPSDELogicParam } from '@ibiz/dynamic-model-api'; import { IPSDEAppendParamLogic, IPSDELogicParam } from '@ibiz/dynamic-model-api';
import { LogUtil } from '../../../../utils';
import { ActionContext } from '../action-context'; import { ActionContext } from '../action-context';
import { AppDeLogicNodeBase } from './logic-node-base'; import { AppDeLogicNodeBase } from './logic-node-base';
...@@ -28,7 +27,7 @@ export class AppDeLogicAppendParamNode extends AppDeLogicNodeBase { ...@@ -28,7 +27,7 @@ export class AppDeLogicAppendParamNode extends AppDeLogicNodeBase {
this.onAppendParam(logicNode, actionContext); this.onAppendParam(logicNode, actionContext);
return this.computeNextNodes(logicNode, actionContext); return this.computeNextNodes(logicNode, actionContext);
} catch (error: any) { } catch (error: any) {
LogUtil.error(`逻辑节点${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`); throw new Error(`逻辑节点 ${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`);
} }
} }
......
import { IPSDEBindParamLogic, IPSDELogicParam } from '@ibiz/dynamic-model-api'; import { IPSDEBindParamLogic, IPSDELogicParam } from '@ibiz/dynamic-model-api';
import { LogUtil } from '../../../../utils';
import { ActionContext } from '../action-context'; import { ActionContext } from '../action-context';
import { AppDeLogicNodeBase } from './logic-node-base'; import { AppDeLogicNodeBase } from './logic-node-base';
...@@ -28,7 +27,7 @@ export class AppDeLogicBindParamNode extends AppDeLogicNodeBase { ...@@ -28,7 +27,7 @@ export class AppDeLogicBindParamNode extends AppDeLogicNodeBase {
this.onBindParam(logicNode, actionContext); this.onBindParam(logicNode, actionContext);
return this.computeNextNodes(logicNode, actionContext); return this.computeNextNodes(logicNode, actionContext);
} catch (error: any) { } catch (error: any) {
LogUtil.error(`逻辑节点${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`); throw new Error(`逻辑节点 ${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`);
} }
} }
......
import { IPSDECopyParamLogic, IPSDELogicParam } from '@ibiz/dynamic-model-api'; import { IPSDECopyParamLogic, IPSDELogicParam } from '@ibiz/dynamic-model-api';
import { LogUtil } from '../../../../utils';
import { ActionContext } from '../action-context'; import { ActionContext } from '../action-context';
import { AppDeLogicNodeBase } from './logic-node-base'; import { AppDeLogicNodeBase } from './logic-node-base';
...@@ -28,7 +27,7 @@ export class AppDeLogicCopyParamNode extends AppDeLogicNodeBase { ...@@ -28,7 +27,7 @@ export class AppDeLogicCopyParamNode extends AppDeLogicNodeBase {
this.onCopyParam(logicNode, actionContext); this.onCopyParam(logicNode, actionContext);
return this.computeNextNodes(logicNode, actionContext); return this.computeNextNodes(logicNode, actionContext);
} catch (error: any) { } catch (error: any) {
LogUtil.error(`逻辑节点${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`); throw new Error(`逻辑节点 ${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`);
} }
} }
......
import { getDstPSAppDEAction, IPSDEDEActionLogic, IPSDELogicParam } from '@ibiz/dynamic-model-api'; import { getDstPSAppDEAction, IPSDEDEActionLogic, IPSDELogicParam } from '@ibiz/dynamic-model-api';
import { AppDeLogicNodeBase } from './logic-node-base'; import { AppDeLogicNodeBase } from './logic-node-base';
import { ActionContext } from '../action-context'; import { ActionContext } from '../action-context';
import { LogUtil, Util } from '../../../../utils'; import { Util } from '../../../../utils';
import { LogicParamType } from '../const/logic-param-type'; import { LogicParamType } from '../const/logic-param-type';
import { DataServiceHelp } from '../../data-service-help'; import { DataServiceHelp } from '../../data-service-help';
...@@ -30,7 +30,7 @@ export class AppDeLogicDeActionNode extends AppDeLogicNodeBase { ...@@ -30,7 +30,7 @@ export class AppDeLogicDeActionNode extends AppDeLogicNodeBase {
await this.handleDEAction(logicNode, actionContext); await this.handleDEAction(logicNode, actionContext);
return this.computeNextNodes(logicNode, actionContext); return this.computeNextNodes(logicNode, actionContext);
} catch (error: any) { } catch (error: any) {
LogUtil.error(`逻辑节点${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`); throw new Error(`逻辑节点 ${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`);
} }
} }
...@@ -106,7 +106,7 @@ export class AppDeLogicDeActionNode extends AppDeLogicNodeBase { ...@@ -106,7 +106,7 @@ export class AppDeLogicDeActionNode extends AppDeLogicNodeBase {
} }
} }
} catch (error: any) { } catch (error: any) {
throw new Error(`${error.message ? error.message : '执行实体行为失败'}`); throw new Error(`${error.message ? error.message : error.data?.message ? error.data.message : '执行实体行为失败'}`);
} }
} else { } else {
throw new Error(`执行实体行为所需参数不足`); throw new Error(`执行实体行为所需参数不足`);
......
import { IPSDEDEDataSetLogic } from "@ibiz/dynamic-model-api"; import { IPSDEDEDataSetLogic } from "@ibiz/dynamic-model-api";
import { LogUtil } from "../../../../utils";
import { DataServiceHelp } from "../../data-service-help"; import { DataServiceHelp } from "../../data-service-help";
import { ActionContext } from "../action-context"; import { ActionContext } from "../action-context";
import { LogicParamType } from "../const/logic-param-type"; import { LogicParamType } from "../const/logic-param-type";
...@@ -31,7 +30,7 @@ export class AppDeDataSetNode extends AppDeLogicNodeBase { ...@@ -31,7 +30,7 @@ export class AppDeDataSetNode extends AppDeLogicNodeBase {
await this.handleDataSet(logicNode, actionContext); await this.handleDataSet(logicNode, actionContext);
return this.computeNextNodes(logicNode, actionContext); return this.computeNextNodes(logicNode, actionContext);
} catch (error: any) { } catch (error: any) {
LogUtil.error(`逻辑节点${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`); throw new Error(`逻辑节点 ${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`);
} }
} }
...@@ -67,7 +66,7 @@ export class AppDeDataSetNode extends AppDeLogicNodeBase { ...@@ -67,7 +66,7 @@ export class AppDeDataSetNode extends AppDeLogicNodeBase {
throw new Error(`查询实体数据集失败`); throw new Error(`查询实体数据集失败`);
} }
} catch (error: any) { } catch (error: any) {
throw new Error(`查询实体数据集失败`); throw new Error(`${error.message ? error.message : error.data?.message ? error.data.message : '查询实体数据集失败'}`);
} }
} else { } else {
throw new Error(`查询实体数据集参数不足`); throw new Error(`查询实体数据集参数不足`);
......
...@@ -35,7 +35,7 @@ export class AppDeEndNode extends AppDeLogicNodeBase { ...@@ -35,7 +35,7 @@ export class AppDeEndNode extends AppDeLogicNodeBase {
} }
return { nextNodes: [], actionContext }; return { nextNodes: [], actionContext };
} catch (error: any) { } catch (error: any) {
LogUtil.error(`逻辑节点${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`); throw new Error(`逻辑节点 ${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`);
} }
} }
......
...@@ -30,7 +30,7 @@ export class AppDeLogicPrepareParamNode extends AppDeLogicNodeBase { ...@@ -30,7 +30,7 @@ export class AppDeLogicPrepareParamNode extends AppDeLogicNodeBase {
this.handleParam(logicNode, actionContext); this.handleParam(logicNode, actionContext);
return this.computeNextNodes(logicNode, actionContext); return this.computeNextNodes(logicNode, actionContext);
} catch (error: any) { } catch (error: any) {
LogUtil.error(`逻辑节点${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`); throw new Error(`逻辑节点 ${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`);
} }
} }
...@@ -45,6 +45,7 @@ export class AppDeLogicPrepareParamNode extends AppDeLogicNodeBase { ...@@ -45,6 +45,7 @@ export class AppDeLogicPrepareParamNode extends AppDeLogicNodeBase {
if (!logicNode || !logicNode.getPSDELogicNodeParams()) { if (!logicNode || !logicNode.getPSDELogicNodeParams()) {
return; return;
} }
try {
for (let logicNodeParam of (logicNode.getPSDELogicNodeParams() as IPSDELogicNodeParam[])) { for (let logicNodeParam of (logicNode.getPSDELogicNodeParams() as IPSDELogicNodeParam[])) {
// 设置变量 // 设置变量
if (Object.is(logicNodeParam.paramAction, LogicParamValueType.SETPARAMVALUE)) { if (Object.is(logicNodeParam.paramAction, LogicParamValueType.SETPARAMVALUE)) {
...@@ -75,6 +76,9 @@ export class AppDeLogicPrepareParamNode extends AppDeLogicNodeBase { ...@@ -75,6 +76,9 @@ export class AppDeLogicPrepareParamNode extends AppDeLogicNodeBase {
this.onSortParam(logicNodeParam, actionContext); this.onSortParam(logicNodeParam, actionContext);
} }
} }
} catch (error: any) {
throw new Error(`${error?.message ? error?.message : '发生未知错误!'}`);
}
} }
/** /**
...@@ -85,6 +89,7 @@ export class AppDeLogicPrepareParamNode extends AppDeLogicNodeBase { ...@@ -85,6 +89,7 @@ export class AppDeLogicPrepareParamNode extends AppDeLogicNodeBase {
* @memberof AppDeLogicPrepareParamNode * @memberof AppDeLogicPrepareParamNode
*/ */
public onSetParamValue(logicNodeParam: IPSDELogicNodeParam, actionContext: ActionContext) { public onSetParamValue(logicNodeParam: IPSDELogicNodeParam, actionContext: ActionContext) {
try {
// 源类型参数/目标逻辑参数/目标属性缺一跳过不做处理 // 源类型参数/目标逻辑参数/目标属性缺一跳过不做处理
if (!logicNodeParam.getDstPSDELogicParam() || !logicNodeParam.dstFieldName || !logicNodeParam.srcValueType) { if (!logicNodeParam.getDstPSDELogicParam() || !logicNodeParam.dstFieldName || !logicNodeParam.srcValueType) {
throw new Error(`逻辑参数${logicNodeParam.name}源类型参数、目标属性或者目标逻辑参数缺失`); throw new Error(`逻辑参数${logicNodeParam.name}源类型参数、目标属性或者目标逻辑参数缺失`);
...@@ -98,6 +103,9 @@ export class AppDeLogicPrepareParamNode extends AppDeLogicNodeBase { ...@@ -98,6 +103,9 @@ export class AppDeLogicPrepareParamNode extends AppDeLogicNodeBase {
const result = this.computeTargetParam(logicNodeParam, actionContext); const result = this.computeTargetParam(logicNodeParam, actionContext);
dstParam.set(logicNodeParam.dstFieldName.toLowerCase(), result); dstParam.set(logicNodeParam.dstFieldName.toLowerCase(), result);
} }
} catch (error: any) {
throw new Error(`${error?.message ? error?.message : '发生未知错误!'}`);
}
} }
/** /**
...@@ -108,9 +116,13 @@ export class AppDeLogicPrepareParamNode extends AppDeLogicNodeBase { ...@@ -108,9 +116,13 @@ export class AppDeLogicPrepareParamNode extends AppDeLogicNodeBase {
* @memberof AppDeLogicPrepareParamNode * @memberof AppDeLogicPrepareParamNode
*/ */
public onResetParam(logicNodeParam: IPSDELogicNodeParam, actionContext: ActionContext) { public onResetParam(logicNodeParam: IPSDELogicNodeParam, actionContext: ActionContext) {
try {
// 目标数据 // 目标数据
const dstParam: any = actionContext.getParam((logicNodeParam.getDstPSDELogicParam() as IPSDELogicParam)?.codeName); const dstParam: any = actionContext.getParam((logicNodeParam.getDstPSDELogicParam() as IPSDELogicParam)?.codeName);
dstParam.resetAll(); dstParam.resetAll();
} catch (error: any) {
throw new Error(`逻辑参数${logicNodeParam.name}${error?.message ? error?.message : '发生未知错误!'}`);
}
} }
/** /**
...@@ -121,6 +133,7 @@ export class AppDeLogicPrepareParamNode extends AppDeLogicNodeBase { ...@@ -121,6 +133,7 @@ export class AppDeLogicPrepareParamNode extends AppDeLogicNodeBase {
* @memberof AppDeLogicPrepareParamNode * @memberof AppDeLogicPrepareParamNode
*/ */
public onBindParam(logicNodeParam: IPSDELogicNodeParam, actionContext: ActionContext) { public onBindParam(logicNodeParam: IPSDELogicNodeParam, actionContext: ActionContext) {
try {
// 源数据 // 源数据
const srcParam: any = actionContext.getParam((logicNodeParam.getSrcPSDELogicParam() as IPSDELogicParam)?.codeName); const srcParam: any = actionContext.getParam((logicNodeParam.getSrcPSDELogicParam() as IPSDELogicParam)?.codeName);
// 目标数据 // 目标数据
...@@ -132,6 +145,9 @@ export class AppDeLogicPrepareParamNode extends AppDeLogicNodeBase { ...@@ -132,6 +145,9 @@ export class AppDeLogicPrepareParamNode extends AppDeLogicNodeBase {
} else { } else {
dstParam.bind(srcParam.getReal()); dstParam.bind(srcParam.getReal());
} }
} catch (error: any) {
throw new Error(`逻辑参数${logicNodeParam.name}${error?.message ? error?.message : '发生未知错误!'}`);
}
} }
/** /**
...@@ -142,11 +158,15 @@ export class AppDeLogicPrepareParamNode extends AppDeLogicNodeBase { ...@@ -142,11 +158,15 @@ export class AppDeLogicPrepareParamNode extends AppDeLogicNodeBase {
* @memberof AppDeLogicPrepareParamNode * @memberof AppDeLogicPrepareParamNode
*/ */
public onCopyParam(logicNodeParam: IPSDELogicNodeParam, actionContext: ActionContext) { public onCopyParam(logicNodeParam: IPSDELogicNodeParam, actionContext: ActionContext) {
try {
// 源数据 // 源数据
const srcParam: any = actionContext.getParam((logicNodeParam.getSrcPSDELogicParam() as IPSDELogicParam)?.codeName); const srcParam: any = actionContext.getParam((logicNodeParam.getSrcPSDELogicParam() as IPSDELogicParam)?.codeName);
// 目标数据 // 目标数据
const dstParam: any = actionContext.getParam((logicNodeParam.getDstPSDELogicParam() as IPSDELogicParam)?.codeName); const dstParam: any = actionContext.getParam((logicNodeParam.getDstPSDELogicParam() as IPSDELogicParam)?.codeName);
srcParam.copyTo(dstParam); srcParam.copyTo(dstParam);
} catch (error: any) {
throw new Error(`逻辑参数${logicNodeParam.name}${error?.message ? error?.message : '发生未知错误!'}`);
}
} }
/** /**
...@@ -157,9 +177,13 @@ export class AppDeLogicPrepareParamNode extends AppDeLogicNodeBase { ...@@ -157,9 +177,13 @@ export class AppDeLogicPrepareParamNode extends AppDeLogicNodeBase {
* @memberof AppDeLogicPrepareParamNode * @memberof AppDeLogicPrepareParamNode
*/ */
public onRenewParam(logicNodeParam: IPSDELogicNodeParam, actionContext: ActionContext) { public onRenewParam(logicNodeParam: IPSDELogicNodeParam, actionContext: ActionContext) {
try {
// 目标参数 // 目标参数
const dstParam: any = actionContext.getParam((logicNodeParam.getDstPSDELogicParam() as IPSDELogicParam)?.codeName); const dstParam: any = actionContext.getParam((logicNodeParam.getDstPSDELogicParam() as IPSDELogicParam)?.codeName);
dstParam.renew(); dstParam.renew();
} catch (error: any) {
throw new Error(`逻辑参数${logicNodeParam.name}${error?.message ? error?.message : '发生未知错误!'}`);
}
} }
/** /**
...@@ -170,6 +194,7 @@ export class AppDeLogicPrepareParamNode extends AppDeLogicNodeBase { ...@@ -170,6 +194,7 @@ export class AppDeLogicPrepareParamNode extends AppDeLogicNodeBase {
* @memberof AppDeLogicPrepareParamNode * @memberof AppDeLogicPrepareParamNode
*/ */
public onAppendParam(logicNodeParam: IPSDELogicNodeParam, actionContext: ActionContext) { public onAppendParam(logicNodeParam: IPSDELogicNodeParam, actionContext: ActionContext) {
try {
// 源数据 // 源数据
const srcParam: any = actionContext.getParam((logicNodeParam.getSrcPSDELogicParam() as IPSDELogicParam)?.codeName); const srcParam: any = actionContext.getParam((logicNodeParam.getSrcPSDELogicParam() as IPSDELogicParam)?.codeName);
// 目标数据 // 目标数据
...@@ -184,6 +209,9 @@ export class AppDeLogicPrepareParamNode extends AppDeLogicNodeBase { ...@@ -184,6 +209,9 @@ export class AppDeLogicPrepareParamNode extends AppDeLogicNodeBase {
objParam = srcParam.getReal(); objParam = srcParam.getReal();
} }
dstParam.append(logicNodeParam.dstIndex, objParam, logicNodeParam.srcIndex, logicNodeParam.srcSize); dstParam.append(logicNodeParam.dstIndex, objParam, logicNodeParam.srcIndex, logicNodeParam.srcSize);
} catch (error: any) {
throw new Error(`逻辑参数${logicNodeParam.name}${error?.message ? error?.message : '发生未知错误!'}`);
}
} }
/** /**
...@@ -194,6 +222,7 @@ export class AppDeLogicPrepareParamNode extends AppDeLogicNodeBase { ...@@ -194,6 +222,7 @@ export class AppDeLogicPrepareParamNode extends AppDeLogicNodeBase {
* @memberof AppDeLogicPrepareParamNode * @memberof AppDeLogicPrepareParamNode
*/ */
public onSortParam(logicNodeParam: IPSDELogicNodeParam, actionContext: ActionContext) { public onSortParam(logicNodeParam: IPSDELogicNodeParam, actionContext: ActionContext) {
try {
// 目标数据 // 目标数据
const dstParam: any = actionContext.getParam((logicNodeParam.getDstPSDELogicParam() as IPSDELogicParam)?.codeName); const dstParam: any = actionContext.getParam((logicNodeParam.getDstPSDELogicParam() as IPSDELogicParam)?.codeName);
// 目标属性 // 目标属性
...@@ -202,6 +231,9 @@ export class AppDeLogicPrepareParamNode extends AppDeLogicNodeBase { ...@@ -202,6 +231,9 @@ export class AppDeLogicPrepareParamNode extends AppDeLogicNodeBase {
throw new Error(`逻辑参数${logicNodeParam.name}未指定设置排序属性`); throw new Error(`逻辑参数${logicNodeParam.name}未指定设置排序属性`);
} }
dstParam.sort(dstFieldName, logicNodeParam.dstSortDir); dstParam.sort(dstFieldName, logicNodeParam.dstSortDir);
} catch (error: any) {
throw new Error(`逻辑参数${logicNodeParam.name}${error?.message ? error?.message : '发生未知错误!'}`);
}
} }
/** /**
...@@ -217,6 +249,7 @@ export class AppDeLogicPrepareParamNode extends AppDeLogicNodeBase { ...@@ -217,6 +249,7 @@ export class AppDeLogicPrepareParamNode extends AppDeLogicNodeBase {
const srcParam: any = actionContext.getParam((logicNodeParam.getSrcPSDELogicParam() as IPSDELogicParam)?.codeName); const srcParam: any = actionContext.getParam((logicNodeParam.getSrcPSDELogicParam() as IPSDELogicParam)?.codeName);
// 源属性 // 源属性
const srcFieldName: string = logicNodeParam?.srcFieldName?.toLowerCase(); const srcFieldName: string = logicNodeParam?.srcFieldName?.toLowerCase();
try {
switch (logicNodeParam.srcValueType) { switch (logicNodeParam.srcValueType) {
case "SRCDLPARAM": // 源逻辑参数 case "SRCDLPARAM": // 源逻辑参数
targetValue = srcParam.get(srcFieldName) ? srcParam.get(srcFieldName) : srcParam; targetValue = srcParam.get(srcFieldName) ? srcParam.get(srcFieldName) : srcParam;
...@@ -249,6 +282,9 @@ export class AppDeLogicPrepareParamNode extends AppDeLogicNodeBase { ...@@ -249,6 +282,9 @@ export class AppDeLogicPrepareParamNode extends AppDeLogicNodeBase {
throw new Error(`逻辑参数${logicNodeParam.name}源值类型${logicNodeParam.srcValueType}暂未支持`); throw new Error(`逻辑参数${logicNodeParam.name}源值类型${logicNodeParam.srcValueType}暂未支持`);
} }
return targetValue; return targetValue;
} catch (error: any) {
throw new Error(`${error?.message ? error?.message : '发生未知错误!'}`);
}
} }
/** /**
......
import { IPSDERawCodeLogic } from '@ibiz/dynamic-model-api'; import { IPSDERawCodeLogic } from '@ibiz/dynamic-model-api';
import { LogUtil } from '../../../../utils';
import { ActionContext } from '../action-context'; import { ActionContext } from '../action-context';
import { AppDeLogicNodeBase } from './logic-node-base'; import { AppDeLogicNodeBase } from './logic-node-base';
...@@ -28,7 +27,7 @@ export class AppRawsfcodeNode extends AppDeLogicNodeBase { ...@@ -28,7 +27,7 @@ export class AppRawsfcodeNode extends AppDeLogicNodeBase {
this.handleRawCode(logicNode, actionContext); this.handleRawCode(logicNode, actionContext);
return this.computeNextNodes(logicNode, actionContext); return this.computeNextNodes(logicNode, actionContext);
} catch (error: any) { } catch (error: any) {
LogUtil.error(`逻辑节点${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`); throw new Error(`逻辑节点 ${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`);
} }
} }
......
import { IPSDERenewParamLogic, IPSDELogicParam } from '@ibiz/dynamic-model-api'; import { IPSDERenewParamLogic, IPSDELogicParam } from '@ibiz/dynamic-model-api';
import { LogUtil } from '../../../../utils';
import { ActionContext } from '../action-context'; import { ActionContext } from '../action-context';
import { AppDeLogicNodeBase } from './logic-node-base'; import { AppDeLogicNodeBase } from './logic-node-base';
...@@ -28,7 +27,7 @@ export class AppDeLogicReNewParamNode extends AppDeLogicNodeBase { ...@@ -28,7 +27,7 @@ export class AppDeLogicReNewParamNode extends AppDeLogicNodeBase {
this.onRenewParam(logicNode, actionContext); this.onRenewParam(logicNode, actionContext);
return this.computeNextNodes(logicNode, actionContext); return this.computeNextNodes(logicNode, actionContext);
} catch (error: any) { } catch (error: any) {
LogUtil.error(`逻辑节点${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`); throw new Error(`逻辑节点 ${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`);
} }
} }
......
import { IPSDEResetParamLogic, IPSDELogicParam } from '@ibiz/dynamic-model-api'; import { IPSDEResetParamLogic, IPSDELogicParam } from '@ibiz/dynamic-model-api';
import { LogUtil } from '../../../../utils';
import { ActionContext } from '../action-context'; import { ActionContext } from '../action-context';
import { AppDeLogicNodeBase } from './logic-node-base'; import { AppDeLogicNodeBase } from './logic-node-base';
...@@ -28,7 +27,7 @@ export class AppDeLogicResetParamNode extends AppDeLogicNodeBase { ...@@ -28,7 +27,7 @@ export class AppDeLogicResetParamNode extends AppDeLogicNodeBase {
this.onResetParam(logicNode, actionContext); this.onResetParam(logicNode, actionContext);
return this.computeNextNodes(logicNode, actionContext); return this.computeNextNodes(logicNode, actionContext);
} catch (error: any) { } catch (error: any) {
LogUtil.error(`逻辑节点${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`); throw new Error(`逻辑节点 ${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`);
} }
} }
......
import { IPSDESortParamLogic, IPSDELogicParam } from '@ibiz/dynamic-model-api'; import { IPSDESortParamLogic, IPSDELogicParam } from '@ibiz/dynamic-model-api';
import { LogUtil } from '../../../../utils';
import { ActionContext } from '../action-context'; import { ActionContext } from '../action-context';
import { AppDeLogicNodeBase } from './logic-node-base'; import { AppDeLogicNodeBase } from './logic-node-base';
...@@ -28,7 +27,7 @@ export class AppDeLogicSortParamNode extends AppDeLogicNodeBase { ...@@ -28,7 +27,7 @@ export class AppDeLogicSortParamNode extends AppDeLogicNodeBase {
this.onSortParam(logicNode, actionContext); this.onSortParam(logicNode, actionContext);
return this.computeNextNodes(logicNode, actionContext); return this.computeNextNodes(logicNode, actionContext);
} catch (error: any) { } catch (error: any) {
LogUtil.error(`逻辑节点${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`); throw new Error(`逻辑节点 ${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`);
} }
} }
......
...@@ -54,6 +54,7 @@ export class AppDeLogicService { ...@@ -54,6 +54,7 @@ export class AppDeLogicService {
* @memberof AppDeLogicService * @memberof AppDeLogicService
*/ */
public async onExecute(logic: IPSAppDELogic, context: IContext, data: IParams) { public async onExecute(logic: IPSAppDELogic, context: IContext, data: IParams) {
try {
let actionContext = await this.beforeExecute(logic, context, data); let actionContext = await this.beforeExecute(logic, context, data);
// 自定义脚本代码 // 自定义脚本代码
if (logic && logic.customCode) { if (logic && logic.customCode) {
...@@ -75,17 +76,19 @@ export class AppDeLogicService { ...@@ -75,17 +76,19 @@ export class AppDeLogicService {
} }
return data; return data;
} else { } else {
LogUtil.warn('自定义代码不能为空'); throw new Error('自定义代码不能为空');
} }
} else { } else {
let startNode: IPSDELogicNode | null = logic.getStartPSDELogicNode(); let startNode: IPSDELogicNode | null = logic.getStartPSDELogicNode();
if (!startNode) { if (!startNode) {
LogUtil.warn('没有开始节点'); throw new Error('没有开始节点');
return data;
} }
await this.executeNode(startNode, actionContext); await this.executeNode(startNode, actionContext);
return actionContext.getResult(); return actionContext.getResult();
} }
} catch (error: any) {
throw new Error(`${error?.message ? error?.message : '发生未知错误!'}`);
}
} }
/** /**
...@@ -97,6 +100,7 @@ export class AppDeLogicService { ...@@ -97,6 +100,7 @@ export class AppDeLogicService {
*/ */
public async executeNode(logicNode: any, actionContext: ActionContext) { public async executeNode(logicNode: any, actionContext: ActionContext) {
let result: any = { actionContext }; let result: any = { actionContext };
try {
switch (logicNode.logicNodeType) { switch (logicNode.logicNodeType) {
// 开始节点 // 开始节点
case 'BEGIN': case 'BEGIN':
...@@ -153,6 +157,9 @@ export class AppDeLogicService { ...@@ -153,6 +157,9 @@ export class AppDeLogicService {
if (result && (result.nextNodes?.length > 0)) { if (result && (result.nextNodes?.length > 0)) {
await this.executeNextNodes(result.nextNodes, actionContext); await this.executeNextNodes(result.nextNodes, actionContext);
} }
} catch (error: any) {
throw new Error(`${error?.message ? error?.message : '发生未知错误!'}`);
}
} }
/** /**
......
...@@ -35,6 +35,7 @@ export class AppDEUIAction { ...@@ -35,6 +35,7 @@ export class AppDEUIAction {
public async executeDEUILogic(args: any[], context: any = {}, params: any = {}, public async executeDEUILogic(args: any[], context: any = {}, params: any = {},
$event?: any, xData?: any, actionContext?: any, srfParentDeName?: string) { $event?: any, xData?: any, actionContext?: any, srfParentDeName?: string) {
// 识别面板项按钮执行界面逻辑 // 识别面板项按钮执行界面逻辑
try {
if (Object.is(this.actionModel.uILogicType, 'DEUILOGIC') || Object.is(this.actionModel.uILogicType, 'DELOGIC')) { if (Object.is(this.actionModel.uILogicType, 'DEUILOGIC') || Object.is(this.actionModel.uILogicType, 'DELOGIC')) {
const appDEUILogic = await getPSAppDEUILogicByModelObject(this.actionModel); const appDEUILogic = await getPSAppDEUILogicByModelObject(this.actionModel);
if (appDEUILogic) { if (appDEUILogic) {
...@@ -51,6 +52,9 @@ export class AppDEUIAction { ...@@ -51,6 +52,9 @@ export class AppDEUIAction {
} else { } else {
LogUtil.warn('未实现应用界面处理逻辑'); LogUtil.warn('未实现应用界面处理逻辑');
} }
} catch (error: any) {
actionContext.$throw(`${error?.message ? error.message : '发生未知错误!'}`)
}
} }
} }
\ No newline at end of file
import { IPSDEUILogicParam, IPSDEUIAppendParamLogic } from '@ibiz/dynamic-model-api'; import { IPSDEUILogicParam, IPSDEUIAppendParamLogic } from '@ibiz/dynamic-model-api';
import { LogUtil } from 'ibiz-core';
import { UIActionContext } from '../uiaction-context'; import { UIActionContext } from '../uiaction-context';
import { AppUILogicNodeBase } from './logic-node-base'; import { AppUILogicNodeBase } from './logic-node-base';
/** /**
...@@ -26,7 +25,7 @@ export class AppUILogicAppendParamNode extends AppUILogicNodeBase { ...@@ -26,7 +25,7 @@ export class AppUILogicAppendParamNode extends AppUILogicNodeBase {
this.onAppendParam(logicNode, actionContext); this.onAppendParam(logicNode, actionContext);
return this.computeNextNodes(logicNode, actionContext); return this.computeNextNodes(logicNode, actionContext);
} catch (error: any) { } catch (error: any) {
LogUtil.error(`逻辑节点${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`); throw new Error(`逻辑节点 ${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`);
} }
} }
......
import { IPSDEUILogicParam, IPSDEUIBindParamLogic } from '@ibiz/dynamic-model-api'; import { IPSDEUILogicParam, IPSDEUIBindParamLogic } from '@ibiz/dynamic-model-api';
import { LogUtil } from 'ibiz-core';
import { UIActionContext } from '../uiaction-context'; import { UIActionContext } from '../uiaction-context';
import { AppUILogicNodeBase } from './logic-node-base'; import { AppUILogicNodeBase } from './logic-node-base';
/** /**
...@@ -26,7 +25,7 @@ export class AppUILogicBindParamNode extends AppUILogicNodeBase { ...@@ -26,7 +25,7 @@ export class AppUILogicBindParamNode extends AppUILogicNodeBase {
this.onBindParam(logicNode, actionContext); this.onBindParam(logicNode, actionContext);
return this.computeNextNodes(logicNode, actionContext); return this.computeNextNodes(logicNode, actionContext);
} catch (error: any) { } catch (error: any) {
LogUtil.error(`逻辑节点${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`); throw new Error(`逻辑节点 ${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`);
} }
} }
......
import { IPSDEUILogicParam, IPSDEUICopyParamLogic } from '@ibiz/dynamic-model-api'; import { IPSDEUILogicParam, IPSDEUICopyParamLogic } from '@ibiz/dynamic-model-api';
import { LogUtil } from 'ibiz-core';
import { UIActionContext } from '../uiaction-context'; import { UIActionContext } from '../uiaction-context';
import { AppUILogicNodeBase } from './logic-node-base'; import { AppUILogicNodeBase } from './logic-node-base';
/** /**
...@@ -26,7 +25,7 @@ export class AppUILogicCopyParamNode extends AppUILogicNodeBase { ...@@ -26,7 +25,7 @@ export class AppUILogicCopyParamNode extends AppUILogicNodeBase {
this.onCopyParam(logicNode, actionContext); this.onCopyParam(logicNode, actionContext);
return this.computeNextNodes(logicNode, actionContext); return this.computeNextNodes(logicNode, actionContext);
} catch (error: any) { } catch (error: any) {
LogUtil.error(`逻辑节点${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`); throw new Error(`逻辑节点 ${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`);
} }
} }
......
import { getDstPSAppDEAction, IPSDEUIDEActionLogic, IPSDEUILogicParam } from '@ibiz/dynamic-model-api'; import { getDstPSAppDEAction, IPSDEUIDEActionLogic, IPSDEUILogicParam } from '@ibiz/dynamic-model-api';
import { DataServiceHelp, LogUtil, Util } from 'ibiz-core'; import { DataServiceHelp, Util } from 'ibiz-core';
import { UILogicParamType } from '../const/ui-logic-param-type'; import { UILogicParamType } from '../const/ui-logic-param-type';
import { UIActionContext } from '../uiaction-context'; import { UIActionContext } from '../uiaction-context';
import { AppUILogicNodeBase } from './logic-node-base'; import { AppUILogicNodeBase } from './logic-node-base';
...@@ -27,7 +27,7 @@ export class AppUILogicDeactionNode extends AppUILogicNodeBase { ...@@ -27,7 +27,7 @@ export class AppUILogicDeactionNode extends AppUILogicNodeBase {
await this.handleDEAction(logicNode, actionContext); await this.handleDEAction(logicNode, actionContext);
return this.computeNextNodes(logicNode, actionContext); return this.computeNextNodes(logicNode, actionContext);
} catch (error: any) { } catch (error: any) {
LogUtil.error(`逻辑节点${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`); throw new Error(`逻辑节点 ${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`);
} }
} }
...@@ -103,7 +103,7 @@ export class AppUILogicDeactionNode extends AppUILogicNodeBase { ...@@ -103,7 +103,7 @@ export class AppUILogicDeactionNode extends AppUILogicNodeBase {
} }
} }
} catch (error: any) { } catch (error: any) {
throw new Error(`${error.message ? error.message : '执行实体行为失败'}`); throw new Error(`${error.message ? error.message : error.data?.message ? error.data.message : '执行实体行为失败'}`);
} }
} else { } else {
throw new Error(`执行实体行为所需参数不足`); throw new Error(`执行实体行为所需参数不足`);
......
...@@ -26,7 +26,7 @@ export class AppUILogicDebugParamNode extends AppUILogicNodeBase { ...@@ -26,7 +26,7 @@ export class AppUILogicDebugParamNode extends AppUILogicNodeBase {
this.handleDebugParam(logicNode, actionContext); this.handleDebugParam(logicNode, actionContext);
return this.computeNextNodes(logicNode, actionContext); return this.computeNextNodes(logicNode, actionContext);
} catch (error: any) { } catch (error: any) {
LogUtil.error(`逻辑节点${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`); throw new Error(`逻辑节点 ${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`);
} }
} }
...@@ -40,7 +40,6 @@ export class AppUILogicDebugParamNode extends AppUILogicNodeBase { ...@@ -40,7 +40,6 @@ export class AppUILogicDebugParamNode extends AppUILogicNodeBase {
*/ */
private handleDebugParam(logicNode: IPSDEUIDebugParamLogic, actionContext: UIActionContext) { private handleDebugParam(logicNode: IPSDEUIDebugParamLogic, actionContext: UIActionContext) {
if (logicNode.getDstPSDEUILogicParam()) { if (logicNode.getDstPSDEUILogicParam()) {
debugger;
const dstParamValue = actionContext.getParam(logicNode.getDstPSDEUILogicParam()?.codeName as string).getReal(); const dstParamValue = actionContext.getParam(logicNode.getDstPSDEUILogicParam()?.codeName as string).getReal();
actionContext.bindLastReturnParam(null); actionContext.bindLastReturnParam(null);
LogUtil.log(`逻辑节点${logicNode.name}操作参数值:`, dstParamValue); LogUtil.log(`逻辑节点${logicNode.name}操作参数值:`, dstParamValue);
......
import { IPSDEUIDEDataSetLogic } from "@ibiz/dynamic-model-api"; import { IPSDEUIDEDataSetLogic } from "@ibiz/dynamic-model-api";
import { DataServiceHelp, LogUtil } from "ibiz-core"; import { DataServiceHelp } from "ibiz-core";
import { UILogicParamType } from "../const/ui-logic-param-type"; import { UILogicParamType } from "../const/ui-logic-param-type";
import { UIActionContext } from "../uiaction-context"; import { UIActionContext } from "../uiaction-context";
import { AppUILogicNodeBase } from "./logic-node-base"; import { AppUILogicNodeBase } from "./logic-node-base";
...@@ -31,7 +31,7 @@ export class AppDeUIDataSetNode extends AppUILogicNodeBase { ...@@ -31,7 +31,7 @@ export class AppDeUIDataSetNode extends AppUILogicNodeBase {
await this.handleDataSet(logicNode, actionContext); await this.handleDataSet(logicNode, actionContext);
return this.computeNextNodes(logicNode, actionContext); return this.computeNextNodes(logicNode, actionContext);
} catch (error: any) { } catch (error: any) {
LogUtil.error(`逻辑节点${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`); throw new Error(`逻辑节点 ${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`);
} }
} }
...@@ -67,7 +67,7 @@ export class AppDeUIDataSetNode extends AppUILogicNodeBase { ...@@ -67,7 +67,7 @@ export class AppDeUIDataSetNode extends AppUILogicNodeBase {
throw new Error(`查询实体数据集失败`); throw new Error(`查询实体数据集失败`);
} }
} catch (error: any) { } catch (error: any) {
throw new Error(`查询实体数据集失败`); throw new Error(`${error.message ? error.message : error.data?.message ? error.data.message : '查询实体数据集失败'}`);
} }
} else { } else {
throw new Error(`查询实体数据集参数不足`); throw new Error(`查询实体数据集参数不足`);
......
import { getDstPSAppDEAction, IPSDEUIDELogicLogic, IPSDEUILogicParam } from '@ibiz/dynamic-model-api'; import { IPSDEUIDELogicLogic, IPSDEUILogicParam } from '@ibiz/dynamic-model-api';
import { DataServiceHelp, LogUtil } from 'ibiz-core'; import { DataServiceHelp } from 'ibiz-core';
import { UIActionContext } from '../uiaction-context'; import { UIActionContext } from '../uiaction-context';
import { AppUILogicNodeBase } from './logic-node-base'; import { AppUILogicNodeBase } from './logic-node-base';
/** /**
...@@ -26,7 +26,7 @@ export class AppUILogicDeLogicNode extends AppUILogicNodeBase { ...@@ -26,7 +26,7 @@ export class AppUILogicDeLogicNode extends AppUILogicNodeBase {
await this.handleDELogic(logicNode, actionContext); await this.handleDELogic(logicNode, actionContext);
return this.computeNextNodes(logicNode, actionContext); return this.computeNextNodes(logicNode, actionContext);
} catch (error: any) { } catch (error: any) {
LogUtil.error(`逻辑节点${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`); throw new Error(`逻辑节点 ${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`);
} }
} }
......
import { IPSDEUIActionLogic, getDstPSAppDEUIAction, IPSDEUILogicParam } from '@ibiz/dynamic-model-api'; import { IPSDEUIActionLogic, getDstPSAppDEUIAction, IPSDEUILogicParam } from '@ibiz/dynamic-model-api';
import { LogUtil, UIServiceHelp } from 'ibiz-core'; import { UIServiceHelp } from 'ibiz-core';
import { UIActionContext } from '../uiaction-context'; import { UIActionContext } from '../uiaction-context';
import { AppUILogicNodeBase } from './logic-node-base'; import { AppUILogicNodeBase } from './logic-node-base';
/** /**
...@@ -26,7 +26,7 @@ export class AppUILogicDeUIActionNode extends AppUILogicNodeBase { ...@@ -26,7 +26,7 @@ export class AppUILogicDeUIActionNode extends AppUILogicNodeBase {
await this.handleDEUIAction(logicNode, actionContext); await this.handleDEUIAction(logicNode, actionContext);
return this.computeNextNodes(logicNode, actionContext) return this.computeNextNodes(logicNode, actionContext)
} catch (error: any) { } catch (error: any) {
LogUtil.error(`逻辑节点${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`); throw new Error(`逻辑节点 ${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`);
} }
} }
......
...@@ -33,7 +33,7 @@ export class AppUILogicEndNode extends AppUILogicNodeBase { ...@@ -33,7 +33,7 @@ export class AppUILogicEndNode extends AppUILogicNodeBase {
} }
return { nextNodes: [], actionContext }; return { nextNodes: [], actionContext };
} catch (error: any) { } catch (error: any) {
LogUtil.error(`逻辑节点${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`); throw new Error(`逻辑节点 ${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`);
} }
} }
......
import { IPSDEUILogicParam, IPSDEUIMsgBoxLogic } from '@ibiz/dynamic-model-api'; import { IPSDEUILogicParam, IPSDEUIMsgBoxLogic } from '@ibiz/dynamic-model-api';
import { Subject } from 'rxjs'; import { Subject } from 'rxjs';
import { LogUtil } from 'ibiz-core';
import { AppMessageBoxService } from '../../../app-service'; import { AppMessageBoxService } from '../../../app-service';
import { UIActionContext } from '../uiaction-context'; import { UIActionContext } from '../uiaction-context';
import { AppUILogicNodeBase } from './logic-node-base'; import { AppUILogicNodeBase } from './logic-node-base';
...@@ -46,7 +45,7 @@ export class AppUILogicMsgboxNode extends AppUILogicNodeBase { ...@@ -46,7 +45,7 @@ export class AppUILogicMsgboxNode extends AppUILogicNodeBase {
}) })
}); });
} catch (error: any) { } catch (error: any) {
LogUtil.error(`逻辑节点${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`); throw new Error(`逻辑节点 ${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`);
} }
} }
......
...@@ -22,6 +22,6 @@ export class AppUILogicPluginNode extends AppUILogicNodeBase { ...@@ -22,6 +22,6 @@ export class AppUILogicPluginNode extends AppUILogicNodeBase {
* @memberof AppUILogicPluginNode * @memberof AppUILogicPluginNode
*/ */
public async executeNode(logicNode: IPSDEUIPFPluginLogic, actionContext: UIActionContext) { public async executeNode(logicNode: IPSDEUIPFPluginLogic, actionContext: UIActionContext) {
LogUtil.error(`逻辑节点${logicNode.name}前端扩展插件类型暂未实现!`); throw new Error(`逻辑节点${logicNode.name}前端扩展插件类型暂未实现!`);
} }
} }
\ No newline at end of file
import { IPSDEUILogicNode, IPSDEUILogicNodeParam, IPSDEUILogicParam } from '@ibiz/dynamic-model-api'; import { IPSDEUILogicNode, IPSDEUILogicNodeParam, IPSDEUILogicParam } from '@ibiz/dynamic-model-api';
import { AppServiceBase, LogUtil } from 'ibiz-core'; import { AppServiceBase } from 'ibiz-core';
import { UILogicParamValueType } from '../const/logic-param-value-type'; import { UILogicParamValueType } from '../const/logic-param-value-type';
import { UIActionContext } from '../uiaction-context'; import { UIActionContext } from '../uiaction-context';
import { AppUILogicNodeBase } from './logic-node-base'; import { AppUILogicNodeBase } from './logic-node-base';
...@@ -27,7 +27,7 @@ export class AppUILogicPrepareParamNode extends AppUILogicNodeBase { ...@@ -27,7 +27,7 @@ export class AppUILogicPrepareParamNode extends AppUILogicNodeBase {
this.handleParam(logicNode, actionContext); this.handleParam(logicNode, actionContext);
return this.computeNextNodes(logicNode, actionContext); return this.computeNextNodes(logicNode, actionContext);
} catch (error: any) { } catch (error: any) {
LogUtil.error(`逻辑节点${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`); throw new Error(`逻辑节点 ${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`);
} }
} }
...@@ -42,6 +42,7 @@ export class AppUILogicPrepareParamNode extends AppUILogicNodeBase { ...@@ -42,6 +42,7 @@ export class AppUILogicPrepareParamNode extends AppUILogicNodeBase {
if (!logicNode || !logicNode.getPSDEUILogicNodeParams()) { if (!logicNode || !logicNode.getPSDEUILogicNodeParams()) {
return; return;
} }
try {
for (let logicNodeParam of (logicNode.getPSDEUILogicNodeParams() as IPSDEUILogicNodeParam[])) { for (let logicNodeParam of (logicNode.getPSDEUILogicNodeParams() as IPSDEUILogicNodeParam[])) {
// 设置变量 // 设置变量
if (Object.is(logicNodeParam.paramAction, UILogicParamValueType.SETPARAMVALUE)) { if (Object.is(logicNodeParam.paramAction, UILogicParamValueType.SETPARAMVALUE)) {
...@@ -71,8 +72,9 @@ export class AppUILogicPrepareParamNode extends AppUILogicNodeBase { ...@@ -71,8 +72,9 @@ export class AppUILogicPrepareParamNode extends AppUILogicNodeBase {
if (Object.is(logicNodeParam.paramAction, UILogicParamValueType.SORTPARAM)) { if (Object.is(logicNodeParam.paramAction, UILogicParamValueType.SORTPARAM)) {
this.onSortParam(logicNodeParam, actionContext); this.onSortParam(logicNodeParam, actionContext);
} }
}
} catch (error: any) {
throw new Error(`${error?.message ? error?.message : '发生未知错误!'}`);
} }
} }
...@@ -181,9 +183,13 @@ export class AppUILogicPrepareParamNode extends AppUILogicNodeBase { ...@@ -181,9 +183,13 @@ export class AppUILogicPrepareParamNode extends AppUILogicNodeBase {
* @memberof AppUILogicPrepareParamNode * @memberof AppUILogicPrepareParamNode
*/ */
public onRenewParam(logicNodeParam: IPSDEUILogicNodeParam, actionContext: UIActionContext) { public onRenewParam(logicNodeParam: IPSDEUILogicNodeParam, actionContext: UIActionContext) {
try {
// 目标参数 // 目标参数
const dstParam: any = actionContext.getParam((logicNodeParam.getDstPSDEUILogicParam() as IPSDEUILogicParam)?.codeName); const dstParam: any = actionContext.getParam((logicNodeParam.getDstPSDEUILogicParam() as IPSDEUILogicParam)?.codeName);
dstParam.renew(); dstParam.renew();
} catch (error: any) {
throw new Error(`逻辑参数${logicNodeParam.name}${error?.message ? error?.message : '发生未知错误!'}`);
}
} }
/** /**
...@@ -194,6 +200,7 @@ export class AppUILogicPrepareParamNode extends AppUILogicNodeBase { ...@@ -194,6 +200,7 @@ export class AppUILogicPrepareParamNode extends AppUILogicNodeBase {
* @memberof AppUILogicPrepareParamNode * @memberof AppUILogicPrepareParamNode
*/ */
public onAppendParam(logicNodeParam: IPSDEUILogicNodeParam, actionContext: UIActionContext) { public onAppendParam(logicNodeParam: IPSDEUILogicNodeParam, actionContext: UIActionContext) {
try {
// 源数据 // 源数据
const srcParam: any = actionContext.getParam((logicNodeParam.getSrcPSDEUILogicParam() as IPSDEUILogicParam)?.codeName); const srcParam: any = actionContext.getParam((logicNodeParam.getSrcPSDEUILogicParam() as IPSDEUILogicParam)?.codeName);
// 目标数据 // 目标数据
...@@ -207,6 +214,9 @@ export class AppUILogicPrepareParamNode extends AppUILogicNodeBase { ...@@ -207,6 +214,9 @@ export class AppUILogicPrepareParamNode extends AppUILogicNodeBase {
objParam = srcParam.getReal(); objParam = srcParam.getReal();
} }
dstParam.append(logicNodeParam.dstIndex, objParam, logicNodeParam.srcIndex, logicNodeParam.srcSize); dstParam.append(logicNodeParam.dstIndex, objParam, logicNodeParam.srcIndex, logicNodeParam.srcSize);
} catch (error: any) {
throw new Error(`逻辑参数${logicNodeParam.name}${error?.message ? error?.message : '发生未知错误!'}`);
}
} }
/** /**
...@@ -217,6 +227,7 @@ export class AppUILogicPrepareParamNode extends AppUILogicNodeBase { ...@@ -217,6 +227,7 @@ export class AppUILogicPrepareParamNode extends AppUILogicNodeBase {
* @memberof AppUILogicPrepareParamNode * @memberof AppUILogicPrepareParamNode
*/ */
public onSortParam(logicNodeParam: IPSDEUILogicNodeParam, actionContext: UIActionContext) { public onSortParam(logicNodeParam: IPSDEUILogicNodeParam, actionContext: UIActionContext) {
try {
// 目标数据 // 目标数据
const dstParam: any = actionContext.getParam((logicNodeParam.getDstPSDEUILogicParam() as IPSDEUILogicParam)?.codeName); const dstParam: any = actionContext.getParam((logicNodeParam.getDstPSDEUILogicParam() as IPSDEUILogicParam)?.codeName);
// 目标属性 // 目标属性
...@@ -225,6 +236,9 @@ export class AppUILogicPrepareParamNode extends AppUILogicNodeBase { ...@@ -225,6 +236,9 @@ export class AppUILogicPrepareParamNode extends AppUILogicNodeBase {
throw new Error(`逻辑参数${logicNodeParam.name}未指定设置排序属性`); throw new Error(`逻辑参数${logicNodeParam.name}未指定设置排序属性`);
} }
dstParam.sort(dstFieldName, logicNodeParam.dstSortDir); dstParam.sort(dstFieldName, logicNodeParam.dstSortDir);
} catch (error: any) {
throw new Error(`逻辑参数${logicNodeParam.name}${error?.message ? error?.message : '发生未知错误!'}`);
}
} }
/** /**
...@@ -239,6 +253,7 @@ export class AppUILogicPrepareParamNode extends AppUILogicNodeBase { ...@@ -239,6 +253,7 @@ export class AppUILogicPrepareParamNode extends AppUILogicNodeBase {
// 源数据 // 源数据
const srcParam: any = actionContext.getParam((logicNodeParam.getSrcPSDEUILogicParam() as IPSDEUILogicParam)?.codeName); const srcParam: any = actionContext.getParam((logicNodeParam.getSrcPSDEUILogicParam() as IPSDEUILogicParam)?.codeName);
// 源属性 // 源属性
try {
const srcFieldName: string = logicNodeParam?.srcFieldName?.toLowerCase(); const srcFieldName: string = logicNodeParam?.srcFieldName?.toLowerCase();
switch (logicNodeParam.srcValueType) { switch (logicNodeParam.srcValueType) {
case "SRCDLPARAM": // 源逻辑参数 case "SRCDLPARAM": // 源逻辑参数
...@@ -270,6 +285,9 @@ export class AppUILogicPrepareParamNode extends AppUILogicNodeBase { ...@@ -270,6 +285,9 @@ export class AppUILogicPrepareParamNode extends AppUILogicNodeBase {
throw new Error(`源值类型${logicNodeParam.srcValueType}暂未支持`); throw new Error(`源值类型${logicNodeParam.srcValueType}暂未支持`);
} }
return targetValue; return targetValue;
} catch (error: any) {
throw new Error(`${error?.message ? error?.message : '发生未知错误!'}`);
}
} }
/** /**
* 计算表达式值 * 计算表达式值
......
import { IPSDEUIRawCodeLogic } from '@ibiz/dynamic-model-api'; import { IPSDEUIRawCodeLogic } from '@ibiz/dynamic-model-api';
import { LogUtil } from 'ibiz-core';
import { UIActionContext } from '../uiaction-context'; import { UIActionContext } from '../uiaction-context';
import { AppUILogicNodeBase } from './logic-node-base'; import { AppUILogicNodeBase } from './logic-node-base';
/** /**
...@@ -26,7 +25,7 @@ export class AppUILogicRawCodeNode extends AppUILogicNodeBase { ...@@ -26,7 +25,7 @@ export class AppUILogicRawCodeNode extends AppUILogicNodeBase {
this.handleRawCode(logicNode, actionContext); this.handleRawCode(logicNode, actionContext);
return this.computeNextNodes(logicNode, actionContext); return this.computeNextNodes(logicNode, actionContext);
} catch (error: any) { } catch (error: any) {
LogUtil.error(`逻辑节点${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`); throw new Error(`逻辑节点 ${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`);
} }
} }
......
import { IPSDEUILogicParam, IPSDEUIRenewParamLogic } from '@ibiz/dynamic-model-api'; import { IPSDEUILogicParam, IPSDEUIRenewParamLogic } from '@ibiz/dynamic-model-api';
import { LogUtil } from 'ibiz-core';
import { UIActionContext } from '../uiaction-context'; import { UIActionContext } from '../uiaction-context';
import { AppUILogicNodeBase } from './logic-node-base'; import { AppUILogicNodeBase } from './logic-node-base';
/** /**
...@@ -26,7 +25,7 @@ export class AppUILogicReNewParamNode extends AppUILogicNodeBase { ...@@ -26,7 +25,7 @@ export class AppUILogicReNewParamNode extends AppUILogicNodeBase {
this.onRenewParam(logicNode, actionContext); this.onRenewParam(logicNode, actionContext);
return this.computeNextNodes(logicNode, actionContext); return this.computeNextNodes(logicNode, actionContext);
} catch (error: any) { } catch (error: any) {
LogUtil.error(`逻辑节点${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`); throw new Error(`逻辑节点 ${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`);
} }
} }
......
import { IPSDEUILogicParam, IPSDEUIResetParamLogic } from '@ibiz/dynamic-model-api'; import { IPSDEUILogicParam, IPSDEUIResetParamLogic } from '@ibiz/dynamic-model-api';
import { LogUtil } from 'ibiz-core';
import { UIActionContext } from '../uiaction-context'; import { UIActionContext } from '../uiaction-context';
import { AppUILogicNodeBase } from './logic-node-base'; import { AppUILogicNodeBase } from './logic-node-base';
/** /**
...@@ -26,7 +25,7 @@ export class AppUILogicResetParamNode extends AppUILogicNodeBase { ...@@ -26,7 +25,7 @@ export class AppUILogicResetParamNode extends AppUILogicNodeBase {
this.onResetParam(logicNode, actionContext); this.onResetParam(logicNode, actionContext);
return this.computeNextNodes(logicNode, actionContext); return this.computeNextNodes(logicNode, actionContext);
} catch (error: any) { } catch (error: any) {
LogUtil.error(`逻辑节点${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`); throw new Error(`逻辑节点 ${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`);
} }
} }
......
import { IPSDEUILogicParam, IPSDEUISortParamLogic } from '@ibiz/dynamic-model-api'; import { IPSDEUILogicParam, IPSDEUISortParamLogic } from '@ibiz/dynamic-model-api';
import { LogUtil } from 'ibiz-core';
import { UIActionContext } from '../uiaction-context'; import { UIActionContext } from '../uiaction-context';
import { AppUILogicNodeBase } from './logic-node-base'; import { AppUILogicNodeBase } from './logic-node-base';
/** /**
...@@ -26,7 +25,7 @@ export class AppUILogicSortParamNode extends AppUILogicNodeBase { ...@@ -26,7 +25,7 @@ export class AppUILogicSortParamNode extends AppUILogicNodeBase {
this.onSortParam(logicNode, actionContext); this.onSortParam(logicNode, actionContext);
return this.computeNextNodes(logicNode, actionContext); return this.computeNextNodes(logicNode, actionContext);
} catch (error: any) { } catch (error: any) {
LogUtil.error(`逻辑节点${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`); throw new Error(`逻辑节点 ${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`);
} }
} }
......
import { IPSDEUICtrlFireEventLogic } from '@ibiz/dynamic-model-api'; import { IPSDEUICtrlFireEventLogic } from '@ibiz/dynamic-model-api';
import { LogUtil } from 'ibiz-core';
import { UIActionContext } from '../uiaction-context'; import { UIActionContext } from '../uiaction-context';
import { AppUILogicNodeBase } from './logic-node-base'; import { AppUILogicNodeBase } from './logic-node-base';
/** /**
...@@ -26,7 +25,7 @@ export class AppUILogicViewctrlFireEventNode extends AppUILogicNodeBase { ...@@ -26,7 +25,7 @@ export class AppUILogicViewctrlFireEventNode extends AppUILogicNodeBase {
await this.handleViewCtrFireEvent(logicNode, actionContext); await this.handleViewCtrFireEvent(logicNode, actionContext);
return this.computeNextNodes(logicNode, actionContext); return this.computeNextNodes(logicNode, actionContext);
} catch (error: any) { } catch (error: any) {
LogUtil.error(`逻辑节点${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`); throw new Error(`逻辑节点 ${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`);
} }
} }
......
import { IPSDEUICtrlInvokeLogic } from '@ibiz/dynamic-model-api'; import { IPSDEUICtrlInvokeLogic } from '@ibiz/dynamic-model-api';
import { LogUtil } from 'ibiz-core';
import { UIActionContext } from '../uiaction-context'; import { UIActionContext } from '../uiaction-context';
import { AppUILogicNodeBase } from './logic-node-base'; import { AppUILogicNodeBase } from './logic-node-base';
/** /**
...@@ -26,7 +25,7 @@ export class AppUILogicViewctrlInvokeNode extends AppUILogicNodeBase { ...@@ -26,7 +25,7 @@ export class AppUILogicViewctrlInvokeNode extends AppUILogicNodeBase {
await this.handleViewCtrlInvoke(logicNode, actionContext); await this.handleViewCtrlInvoke(logicNode, actionContext);
return this.computeNextNodes(logicNode, actionContext); return this.computeNextNodes(logicNode, actionContext);
} catch (error: any) { } catch (error: any) {
LogUtil.error(`逻辑节点${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`); throw new Error(`逻辑节点 ${logicNode.name}${error?.message ? error?.message : '发生未知错误!'}`);
} }
} }
......
...@@ -83,15 +83,18 @@ export class AppUILogicService { ...@@ -83,15 +83,18 @@ export class AppUILogicService {
*/ */
public async onExecute(logic: any, args: any, context: any = {}, params: any = {}, public async onExecute(logic: any, args: any, context: any = {}, params: any = {},
$event?: any, xData?: any, actioncontext?: any, srfParentDeName?: string) { $event?: any, xData?: any, actioncontext?: any, srfParentDeName?: string) {
try {
let actionContext = await this.beforeExecute(logic, args, context, params, $event, xData, actioncontext, srfParentDeName); let actionContext = await this.beforeExecute(logic, args, context, params, $event, xData, actioncontext, srfParentDeName);
let startNode: any | null = logic.getStartPSDEUILogicNode(); let startNode: any | null = logic.getStartPSDEUILogicNode();
if (!startNode) { if (!startNode) {
LogUtil.warn('没有开始节点'); throw new Error('没有开始节点');
return;
} }
LogUtil.log(`${logic.name}逻辑开始执行`); LogUtil.log(`${logic.name}逻辑开始执行`);
await this.executeNode(startNode, actionContext); await this.executeNode(startNode, actionContext);
return actionContext.getResult(); return actionContext.getResult();
} catch (error: any) {
throw new Error(`${error?.message ? error?.message : '发生未知错误!'}`);
}
} }
/** /**
...@@ -103,6 +106,7 @@ export class AppUILogicService { ...@@ -103,6 +106,7 @@ export class AppUILogicService {
*/ */
public async executeNode(logicNode: any, actionContext: UIActionContext) { public async executeNode(logicNode: any, actionContext: UIActionContext) {
let result: any = { actionContext }; let result: any = { actionContext };
try {
switch (logicNode.logicNodeType) { switch (logicNode.logicNodeType) {
// 开始节点 // 开始节点
case 'BEGIN': case 'BEGIN':
...@@ -187,6 +191,9 @@ export class AppUILogicService { ...@@ -187,6 +191,9 @@ export class AppUILogicService {
if (result && result.nextNodes && (result.nextNodes?.length > 0)) { if (result && result.nextNodes && (result.nextNodes?.length > 0)) {
await this.executeNextNodes(result.nextNodes, actionContext); await this.executeNextNodes(result.nextNodes, actionContext);
} }
} catch (error: any) {
throw new Error(`${error?.message ? error?.message : '发生未知错误!'}`);
}
} }
/** /**
......
...@@ -55,12 +55,15 @@ ...@@ -55,12 +55,15 @@
git clone -b master $para2 trainsys/ git clone -b master $para2 trainsys/
export NODE_OPTIONS=--max-old-space-size=4096 export NODE_OPTIONS=--max-old-space-size=4096
cd trainsys/ cd trainsys/
mvn clean package -Ptrainsys mkdir -p /var/lib/jenkins/appcache/A3064A91-F42D-4D7F-BC1C-4173A4F5772C
mvn install -Ptrainsys if [ -e app_Web/.dynamic ]
cd trainsys-provider then
mvn -Ptrainsys docker:build cd app_Web
mvn -Ptrainsys docker:push else
docker -H $para1 stack deploy --compose-file=src/main/docker/trainsys-provider-trainsys.yaml ebsx --with-registry-auth cd app_Web/app
fi
sed -i "s#dstimage#registry.cn-shanghai.aliyuncs.com/ibizsys/ibizcloud-standardsys-app-webapp:2022.07.29.003#g" swarm.yaml
docker -H $para1 stack deploy --compose-file=swarm.yaml ebsx --with-registry-auth
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
</builders> </builders>
......
...@@ -74,6 +74,25 @@ ...@@ -74,6 +74,25 @@
</createTable> </createTable>
</changeSet> </changeSet>
<!--输出实体[RAWMATERIAL]数据结构 -->
<changeSet author="root" id="tab-rawmaterial-9-4">
<createTable tableName="T_RAWMATERIAL">
<column name="RAWMATERIALID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_RAWMATERIAL"/>
</column>
<column name="CREATEDATE" remarks="" type="DATETIME">
</column>
<column name="RAWMATERIALNAME" remarks="" type="VARCHAR(200)">
</column>
<column name="CREATEMAN" remarks="" type="VARCHAR(60)">
</column>
<column name="UPDATEDATE" remarks="" type="DATETIME">
</column>
<column name="UPDATEMAN" remarks="" type="VARCHAR(60)">
</column>
</createTable>
</changeSet>
<!--输出实体[REGINFO]数据结构 --> <!--输出实体[REGINFO]数据结构 -->
<changeSet author="root" id="tab-reginfo-34-5"> <changeSet author="root" id="tab-reginfo-34-5">
<createTable tableName="T_REGINFO"> <createTable tableName="T_REGINFO">
......
...@@ -174,6 +174,14 @@ ...@@ -174,6 +174,14 @@
}, },
"builtinAction" : true "builtinAction" : true
} ], } ],
"getAllPSDEDBConfigs" : [ {
"dBType" : "MYSQL5",
"name" : "MYSQL5",
"objNameCase" : "DEFAULT",
"standardTableName" : "`T_RAWMATERIAL`",
"tableName" : "T_RAWMATERIAL",
"valid" : true
} ],
"getAllPSDEDBTables" : [ { "getAllPSDEDBTables" : [ {
"getAllPSDEFields" : [ { "getAllPSDEFields" : [ {
"name" : "RAWMATERIALID", "name" : "RAWMATERIALID",
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<profiles> <profiles>
<profile> <profile>
<id>trainsys</id> <id>runtime</id>
<build> <build>
<resources> <resources>
<resource> <resource>
......
...@@ -10,6 +10,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \ ...@@ -10,6 +10,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \ sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Duser.timezone=$TZ -Djava.security.egd=file:/dev/./urandom -jar /trainsys-provider.jar java ${JAVA_OPTS} -Duser.timezone=$TZ -Djava.security.egd=file:/dev/./urandom -jar /trainsys-provider.jar
EXPOSE 50000 EXPOSE 8081
ADD trainsys-provider.jar /trainsys-provider.jar ADD trainsys-provider.jar /trainsys-provider.jar
...@@ -22,32 +22,7 @@ spec: ...@@ -22,32 +22,7 @@ spec:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/trainsys-provider:latest image: registry.cn-shanghai.aliyuncs.com/ibizsys/trainsys-provider:latest
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:
- containerPort: 50000 - containerPort: 8081
env:
- name: SPRING_CLOUD_NACOS_DISCOVERY_IP
value: "172.16.240.140"
- name: SERVER_PORT
value: "50000"
- name: SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR
value: "172.16.240.140:8848"
- name: SPRING_REDIS_HOST
value: "127.0.0.1"
- name: SPRING_REDIS_PORT
value: "6379"
- name: SPRING_REDIS_DATABASE
value: "0"
- name: SPRING_DATASOURCE_USERNAME
value: "a_LAB01_d23cc850e"
- name: SPRING_DATASOURCE_PASSWORD
value: "f9Df4556"
- name: SPRING_DATASOURCE_URL
value: "jdbc:mysql://172.16.186.185:3306/a_LAB01_d23cc850e?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&serverTimezone=Asia/Shanghai&allowMultiQueries=true&serverTimezone=GMT%2B8"
- name: SPRING_DATASOURCE_DRIVER-CLASS-NAME
value: "com.mysql.jdbc.Driver"
- name: SPRING_DATASOURCE_DEFAULTSCHEMA
value: "a_LAB01_d23cc850e"
- name: NACOS
value: "172.16.240.140:8848"
--- ---
apiVersion: v1 apiVersion: v1
...@@ -60,9 +35,9 @@ spec: ...@@ -60,9 +35,9 @@ spec:
type: NodePort type: NodePort
ports: ports:
- name: http - name: http
port: 50000 port: 8081
targetPort: 50000 targetPort: 8081
nodePort: 50000 nodePort: 8081
protocol: TCP protocol: TCP
selector: selector:
app: trainsys-provider app: trainsys-provider
......
...@@ -3,23 +3,9 @@ services: ...@@ -3,23 +3,9 @@ services:
trainsys-provider: trainsys-provider:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/trainsys-provider:latest image: registry.cn-shanghai.aliyuncs.com/ibizsys/trainsys-provider:latest
ports: ports:
- "50000:50000" - "8081:8081"
networks: networks:
- agent_network - agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.140
- SERVER_PORT=50000
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.240.140:8848
- SPRING_CLOUD_NACOS_CONFIG_SERVER-ADDR=172.16.240.140:8848
- SPRING_REDIS_HOST=127.0.0.1
- SPRING_REDIS_PORT=6379
- SPRING_REDIS_DATABASE=0
- SPRING_DATASOURCE_USERNAME=a_LAB01_d23cc850e
- SPRING_DATASOURCE_PASSWORD=f9Df4556
- SPRING_DATASOURCE_URL=jdbc:mysql://172.16.186.185:3306/a_LAB01_d23cc850e?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&serverTimezone=Asia/Shanghai&allowMultiQueries=true&serverTimezone=GMT%2B8
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_LAB01_d23cc850e
- NACOS=172.16.240.140:8848
deploy: deploy:
resources: resources:
limits: limits:
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册