com.quhaodian.workflow.data.conver.TaskVoConver Maven / Gradle / Ivy
package com.quhaodian.workflow.data.conver;
import com.quhaodian.data.rest.core.Conver;
import com.quhaodian.workflow.data.util.DateFormat;
import com.quhaodian.workflow.data.vo.TaskVo;
import org.activiti.engine.TaskService;
import org.activiti.engine.task.Task;
/**
* @author 陈联高
* @version 1.01 2017年03月108日
*/
public class TaskVoConver implements Conver {
protected TaskService taskService;
public TaskVoConver(TaskService taskService) {
this.taskService = taskService;
}
@Override
public TaskVo conver(Task task) {
TaskVo result = new TaskVo();
result.setCatalog(task.getCategory());
result.setId(task.getId());
result.setProcessDefinitionId(task.getProcessDefinitionId());
result.setName(task.getName());
result.setFlowName("" + taskService.getVariable(task.getId(), "name"));
result.setUpdateUrl("" + taskService.getVariable(task.getId(), "updateurl"));
result.setOid("" + taskService.getVariable(task.getId(), "oid"));
result.setAddDate(DateFormat.format(task.getCreateTime()));
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy