| | |
| | | import org.flowable.task.api.history.HistoricTaskInstanceQuery; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.support.Kv; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.core.tool.utils.StringPool; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springblade.core.tool.utils.*; |
| | | import org.springblade.flow.core.constant.ProcessConstant; |
| | | import org.springblade.flow.core.pojo.entity.BladeFlow; |
| | | import org.springblade.flow.core.utils.TaskUtil; |
| | |
| | | import org.springblade.mdm.flow.util.MdmFlowCache; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.util.Date; |
| | | import java.util.LinkedList; |
| | | import java.util.List; |
| | |
| | | private final HistoryService historyService; |
| | | |
| | | |
| | | public IPage<BladeFlow> selectTodoPage(IPage<BladeFlow> page, String keyword) { |
| | | public IPage<BladeFlow> selectTodoPage(IPage<BladeFlow> page, LocalDate createTimeBegin,LocalDate createTimeEnd, String keyword) { |
| | | //String taskUser = TaskUtil.getTaskUser(); |
| | | String userId = ""+AuthUtil.getUserId(); |
| | | List<BladeFlow> flowList = new LinkedList<>(); |
| | | |
| | | TaskQuery todoQuery = taskService.createTaskQuery().taskAssignee(userId).active().includeProcessVariables(); |
| | | if(Func.isNotEmpty(createTimeBegin)){ |
| | | todoQuery.taskCreatedAfter(DateUtil.toDate(createTimeBegin)); |
| | | //如果查询实例的开始时间:todoQuery.taskInProgressStartDueAfter() |
| | | } |
| | | if(Func.isNotEmpty(createTimeEnd)){ |
| | | todoQuery.taskCreatedBefore(DateUtil.toDate(createTimeEnd)); |
| | | |
| | | } |
| | | if(Func.isNotEmpty(keyword)){ |
| | | todoQuery.or(); |
| | | |