package com.vincent.rsf.server.api.entity.params; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.vincent.rsf.server.system.entity.FlowStepInstance; import com.vincent.rsf.server.system.entity.FlowStepTemplate; import com.vincent.rsf.server.system.entity.SubsystemFlowTemplate; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; import java.util.List; @Data public class MissionTaskIssueParam { /** * WMS任务号 */ private String taskNo; /* * 类型:出库、入库、移库、站到站 * */ private String type; /** * 起点编码 */ private String sourceCode; /** * 终点编码 */ private String targetCode; /** * 子系统编码 */ private String systemCode; /** * 子系统名称 */ private String systemName; /** * 步骤类型:REQUEST-请求, RESPONSE-响应, VALIDATE-校验, TRANSFORM-转换 */ private String stepType; /** * 动作类型:HTTP_CALL, RPC_CALL, MQ_SEND, DB_OPERATION */ private String actionType; /** * 关联flow_instance.id */ private Long flowInstanceId; /** * 流程实例编号 */ private String flowInstanceNo; /** * 步骤顺序 */ private Integer stepOrder; /** * 步骤编码 */ private String stepCode; /** * 步骤名称 */ private String stepName; /** * 步骤模板ID */ private Long stepTemplateId; /** * 状态:0-排队中 1-待执行 2-执行中 3-执行成功 4-执行失败 5-已跳过 6-已取消 */ private Short status; /** * 执行结果 */ private String executeResult; /** * 错误码 */ private String errorCode; /** * 错误信息 */ private String errorMessage; /** * 开始时间 */ private Date startTime; /** * 执行耗时(秒) */ private Integer durationSeconds; /** * 步骤重试次数 */ private Integer retryTimes; public MissionTaskIssueParam() {} public MissionTaskIssueParam(FlowStepInstance flowStepInstance, SubsystemFlowTemplate subsystemFlowTemplate, FlowStepTemplate flowStepTemplate ) { this.taskNo = flowStepInstance.getTaskNo(); this.systemCode = subsystemFlowTemplate.getSystemCode(); this.systemName = subsystemFlowTemplate.getSystemName(); this.stepType = flowStepTemplate.getStepType(); this.actionType = flowStepTemplate.getActionType(); this.flowInstanceId = flowStepInstance.getFlowInstanceId(); this.flowInstanceNo = flowStepInstance.getFlowInstanceNo(); this.stepOrder = flowStepInstance.getStepOrder(); this.stepCode = flowStepInstance.getStepCode(); this.stepName = flowStepInstance.getStepName(); this.stepType = flowStepInstance.getStepType(); this.stepTemplateId = flowStepInstance.getStepTemplateId(); this.status = flowStepInstance.getStatus(); this.executeResult = flowStepInstance.getExecuteResult(); this.errorCode = flowStepInstance.getErrorCode(); this.errorMessage = flowStepInstance.getErrorMessage(); this.startTime = flowStepInstance.getStartTime(); this.durationSeconds = flowStepInstance.getDurationSeconds(); this.retryTimes = flowStepInstance.getRetryTimes(); } }