// 定义 IEntity 接口,这里假设它是一个空接口,若有实际定义请按需修改 interface IEntity {} // 定义 ProcessInfo 类 export class ProcessInfo implements IEntity { ProcessInstanceId: string; // 流水号 SerialNo: string; // 流程创建时间 StartTime: string; // 流程结束时间 EndTime: string; // 当前节点信息 ActivitiInfo: string; // 状态 0: 未结束; 1: 结束 IsActive: string; // 办理柜员 Assignee: string; // 流程结束原因 EndReason: string; // 发起流程交易号 TradeNo: string; constructor() { this.ProcessInstanceId = ''; this.SerialNo = ''; this.StartTime = ''; this.EndTime = ''; this.ActivitiInfo = ''; this.IsActive = ''; this.Assignee = ''; this.EndReason = ''; this.TradeNo = ''; } /** * 将对象属性转换为字符串数组 * @returns 包含对象属性值的字符串数组 */ ChangeToTable(): string[] { return [ this.ProcessInstanceId, this.SerialNo, this.StartTime, this.EndTime, this.ActivitiInfo, this.IsActive, this.Assignee, this.EndReason, this.TradeNo ]; } /** * 从对象数组中获取值并赋值给当前对象的属性 * @param parms 包含属性值的对象数组 */ ChangeFromTable(parms: any[]): void { this.ProcessInstanceId = parms[0].toString(); this.SerialNo = parms[1].toString(); this.StartTime = parms[2].toString(); this.EndTime = parms[3].toString(); this.ActivitiInfo = parms[4].toString(); this.IsActive = parms[5].toString(); this.Assignee = parms[6].toString(); this.EndReason = parms[7].toString(); this.TradeNo = parms[8].toString(); } }