[Html]
Public List getProcessByTaskName (String taskName) throws Exception {
String hql = "select t, p. qType, p. ruleCount from QueueTaskProcess t, QueueProcess p" +
"Where t. processName = p. processName and t. taskName =? Order by t. processIndex ";
List list = this. getEntityManager (). find (hql, new Object [] {taskName });
Return list;
}
At the control layer:
[Html]
@ RequestMapping (value = "searchTProcess", method = RequestMethod. POST)
Public ModelAndView searchTaskProcess (HttpServletRequest request) throws Exception {
ModelAndView mav1 = new ModelAndView ("queue/task/queueTaskProcessList ");
String taskName = Escape. unescape (request. getParameter ("taskName"). trim ());
List taskProcessList = qTaskProcessService. getTaskProcess (taskName );
Mav1.addObject ("taskProcessList", taskProcessList );
Mav1.addObject ("taskName", taskName );
Return mav1;
}
Page:
[Html]
<C: forEach items = "$ {taskProcessList}" var = "queueTaskProcess" varStatus = "">
<Tr class = "tr_bg" id = "<c: out value =" $ {queueTaskProcess [0]. id} "/>">
<Td>
<Input type = "checkbox" name = "processItem" value = "<c: out value =" $ {queueTaskProcess [0]. id} "/>"/> </td>
<Td>
<Div class = "taskProcessTip" tip = "$ {queueTaskProcess [0]. taskName}">
<Span>
<C: out value = "$ {fn: substring (queueTaskProcess [0]. taskName, 0, 20)}"/>
<C: if test = "$ {fn: length (queueTaskProcess [0]. taskName)> 20}">
...
</C: if>
</Span>
</Div>
</Span> </td>
<Td> <span> <c: out value = "$ {queueTaskProcess [0]. processIndex}"/> </span> </td>
<Td>
<Div class = "processListTip" tip = "$ {queueTaskProcess [0]. processName}">
<Span>
<C: out value = "$ {fn: substring (queueTaskProcess [0]. processName, 0, 20)}"/>
<C: if test = "$ {fn: length (queueTaskProcess [0]. processName)> 20}">
...
</C: if>
</Span>
</Div>
</Td>
<Td> <span> <c: out value = "$ {queueTaskProcess [1]}"/> <span> </td>
<Td> <span> <c: out value = "$ {queueTaskProcess [0]. office}"/> </span> </td>
<Td> <span> <c: out value = "$ {queueTaskProcess [2]}"/> </span> </td>
<Td style = "cursor: pointer;" onclick = "showRule ('$ {queueTaskProcess [0]. processName} ',' $ {queueTaskProcess [1]} ') "> <span> <font style =" color: # 1C86EE; "> click to view </font> </span> </td>
<Td id = "taskStatus _ $ {queueTaskProcess [0]. id} "style =" cursor: pointer; "onclick =" modifyProcessStatus ('$ {queueTaskProcess [0]. id} ') ">
<C: if test = "$ {queueTaskProcess [0]. status = 0} "> <font style =" color: red; "> <c: out value =" disabled "/> </font> </c: if>
<C: if test = "$ {queueTaskProcess [0]. status = 1} "> <font style =" color: #228B22; "> <c: out value =" enable "/> </font> </c: if>
</Td>
<Td>
<Div class = "q_up" onclick = "modifyProcessIndex ($ {queueTaskProcess [0]. processIndex}, 'up')"> </div>
<Div class = "q_down" onclick = "modifyProcessIndex ($ {queueTaskProcess [0]. processIndex}, 'drop')"> </div>
</Td>
</Tr>
</C: forEach>