| | |
| | | import org.springblade.mdm.flow.util.MdmFlowCache; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | import java.util.LinkedList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | page.setRecords(flowList); |
| | | return page; |
| | | } |
| | | |
| | | /** |
| | | * 超时任务查询 |
| | | * @param page |
| | | * @param keyword |
| | | * @return |
| | | */ |
| | | public IPage<BladeFlow> selectOvertimePage(IPage<BladeFlow> page, String assigneeName,String keyword) { |
| | | |
| | | List<BladeFlow> flowList = new LinkedList<>(); |
| | | Date now = new Date(); |
| | | TaskQuery todoQuery = taskService.createTaskQuery().taskDueBefore(now).active().includeProcessVariables(); |
| | | |
| | | if(Func.isNotEmpty(keyword)) { |
| | | todoQuery.taskVariableValueLike("assigneeName", "%"+assigneeName+"%"); |
| | | } |
| | | if(Func.isNotEmpty(keyword)){ |
| | | todoQuery.or(); |
| | | keyword = "%"+keyword+"%"; |
| | | todoQuery.processVariableValueLike("processNo",keyword); |
| | | todoQuery.processVariableValueLike("machineCode",keyword); |
| | | todoQuery.processVariableValueLike("machineMode",keyword); |
| | | |
| | | todoQuery.processVariableValueLike("processName",keyword); |
| | | todoQuery.processVariableValueLike("processEdition",keyword); |
| | | |
| | | todoQuery.processVariableValueLike("craftEdition",keyword); |
| | | //TODO 多个字段都要匹配 |
| | | |
| | | todoQuery.endOr(); |
| | | } |
| | | |
| | | todoQuery.orderByTaskCreateTime().desc(); |
| | | |
| | | // 构建列表数据 |
| | | BladeFlow bladeFlow = new BladeFlow(); |
| | | buildFlowTaskList(bladeFlow, flowList, todoQuery, "todo");//FlowEngineConstant.STATUS_TODO |
| | | |
| | | // 计算总数 |
| | | long count = todoQuery.count(); |
| | | // 设置页数 |
| | | page.setSize(count); |
| | | // 设置总数 |
| | | page.setTotal(count); |
| | | // 设置数据 |
| | | page.setRecords(flowList); |
| | | return page; |
| | | } |
| | | } |