本帖最后由 bobo 于 2013-9-29 18:09 编辑
首页的脚本如下:
.......
style="clear:both">
<div id="menu_07_D1_1" style="padding:10px">
<li style="border-bottom:1px #ccc dashed;margin-bottom:10px">
<img src="images/01.gif" alt="" width="16" height="16" />
<strong>超期未执行的计划</strong>:<br />
维修计划:<span style="font-size:16px; font-weight:bold; color:#FF0000"><%
String applicationid="11e3-06d7-d027a08d-8238-ed5be03a8cb7";
DocumentProcess process = null;
process = (DocumentProcess) DocumentProcessBean.createMonitoProcess(applicationid);
String sql = "select * from tlk_kf_maintenance_plan where Item_plan_type like '%维修%' and Item_plan_state like '%有效%' and convert(char(10),Item_next_maintenance,120)< convert(char(10),GETDATE(),120);";
WebUser user = (WebUser) session.getAttribute("FRONT_USER"); //获取前台登陆用户的session,返回的是一个用户对象, FRONT_USER前台登录用户键名
String domainid = user.getDomainid(); //获取前台用户session中存储的domainid.
System.out.println("domainid=="+domainid);
//long count = process.countBySQL(sql,domainid);
// int rowCount = (int)count;
System.out.println("rowCount=="+rowCount);
%>
<%=rowCount%></span> 项 保养计划:
<span style="font-size:16px; font-weight:bold; color:#FF0000">3</span> 项
</li>
.....
如果不将下列两句注释的话,首页报错,请问是什么原因?
//long count = process.countBySQL(sql,domainid);
// int rowCount = (int)count; |