feat:データマッピングアクション変更
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
} from "../types/ActionTypes";
|
||||
import { actionAddins } from ".";
|
||||
|
||||
|
||||
type DataProcessingProps = {
|
||||
app: {
|
||||
id: string;
|
||||
@@ -39,9 +40,7 @@ export class DataProcessingAction implements IAction {
|
||||
}
|
||||
|
||||
async process(
|
||||
nodes: IActionNode,
|
||||
event: any,
|
||||
context: IContext
|
||||
nodes: IActionNode,event: any,context: IContext
|
||||
): Promise<IActionResult> {
|
||||
this.initActionProps(nodes);
|
||||
this.initTypedActionProps();
|
||||
@@ -53,7 +52,7 @@ export class DataProcessingAction implements IAction {
|
||||
if (!this.dataProcessingProps) {
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
const data = await selectData(this.dataProcessingProps.conditionsQuery);
|
||||
console.log("data ", data);
|
||||
|
||||
@@ -68,8 +67,9 @@ export class DataProcessingAction implements IAction {
|
||||
|
||||
console.log("context ", context);
|
||||
return result;
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
event.error=error;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -208,6 +208,7 @@ enum Operator {
|
||||
MAX = "MAX",
|
||||
MIN = "MIN",
|
||||
COUNT = "COUNT",
|
||||
FIRST = "FIRST"
|
||||
}
|
||||
|
||||
enum CalcType {
|
||||
@@ -273,4 +274,7 @@ const calcFunc: Record<string, (value: string[]) => string | null> = {
|
||||
? minDateTime
|
||||
: currentDateTime
|
||||
),
|
||||
[`${CalcType.STRING}_${Operator.FIRST}`]:(value: string[])=>{
|
||||
return value[0];
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user