|
|
|
@ -30,7 +30,7 @@ public class ToolDaoImpl implements ToolDao { |
|
|
|
private NamedParameterJdbcTemplate parameterJdbcTemplate; |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<ToolInfo> getToolInfoList(String site, String toolId, String toolType, int pageIndex, int pageSize) { |
|
|
|
public List<ToolInfo> getToolInfoList(String site, String toolId, String toolType, String calendarId, int pageIndex, int pageSize) { |
|
|
|
StringBuilder sql = new StringBuilder(); |
|
|
|
Map<String, Object> paramMap = new HashMap<String, Object>(); |
|
|
|
sql.append("SELECT site, tool_id, tool_description toolDesc, c_tool_type toolType, c_calendar_id calendarId, c_sched_capacity schedCapacity,"); |
|
|
|
@ -52,6 +52,10 @@ public class ToolDaoImpl implements ToolDao { |
|
|
|
sql.append(" AND th.c_tool_type = :toolType"); |
|
|
|
paramMap.put("toolType", toolType); |
|
|
|
} |
|
|
|
if(!(null == calendarId || "".equals(calendarId))){ |
|
|
|
sql.append(" AND th.c_calendar_id = :calendarId"); |
|
|
|
paramMap.put("calendarId", calendarId); |
|
|
|
} |
|
|
|
//排序 |
|
|
|
sql.append(" ORDER BY th.tool_id ASC"); |
|
|
|
//添加分页 |
|
|
|
|