newValue

public List getAllList(String xm, String cjrzh, String area, String hszt,String isydk,
int startnum, int endnum) {
log.debug("finding JdhdTemp instance by example");
String conditionone_temp = "and u.jd_id='" + area + "'";
String conditiontwo_temp = "and u.yxzt='" + hszt + "'";
String conditionthree_temp = "and u.ydk='" + isydk + "'";
String conditionone = (area.equals("")) ? "" : conditionone_temp;
String conditiontwo = (hszt.equals("")) ? "" : conditiontwo_temp;
String conditionthree = (isydk.equals("")) ? "" : conditionthree_temp;
String hql = "SELECT * FROM ( SELECT A. * , ROWNUM RN FROM ( "
+ "select u.xm,u.cjrz_id,u.sfz,u.jd,u.sq,u.yxzt from jdhd_temp u Where u.xm like '%'||'"
+ xm + "'||'%' and u.cjrz_id like '%'||'" + cjrzh + "'||'%' "
+ conditionone + " " + conditiontwo+ " "+conditionthree
+ " order by u.cjrz_id desc" + " ) A WHERE ROWNUM <= "
+ endnum + " ) WHERE RN >= " + startnum;
JdbcTemplate jdbc = new JdbcTemplate(dataSource);
List catList = new ArrayList();
catList = jdbc.queryForList(hql);
log.debug("find by example successful, result size: " + catList.size());
return catList;

}


2.
1.ValueListHandlerHelper vlHandlerHelper = (ValueListHandlerHelper) getBean("vlUnsubmitJdhdHelper");
ValueListInfo info = vlHandlerHelper.getValueListInfo(request);
info.getFilters().putAll(
ValueListRequestUtil.getRequestParameterMap(request));

if (cjrzh != null && !cjrzh.trim().equals("")) {

info.getFilters().remove("cjrzh");

} else {
info.getFilters().remove("cjrzh");

}

conditionHelper(info, "xm", xm);
conditionHelper(info, "cjrzh", cjrzh);
conditionHelper(info, "area", area);
conditionHelper(info, "hszt", hszt);
conditionHelper(info, "isydk", isydk);
ValueList valueList = vlHandlerHelper.getValueList("data", info);
request.setAttribute("dataList", valueList);



private void conditionHelper(ValueListInfo valueListInfo, String key,
String value) {
if (notEmpty(nullToEmpty(value))) {
valueListInfo.getFilters().put(key, value);
} else {
valueListInfo.getFilters().remove(key);
}
}
3.
<%@ taglib uri="http://valuelist.sourceforge.net/tags-valuelist" prefix="vlh"%>
<%@ page import="net.mlw.vlh.ValueList" %>

<vlh:root value="dataList" url="?" includeParameters="*">

<TABLE width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
<TR>
<TD valign="bottom">  
共<c:out value="${dataList.valueListInfo.totalNumberOfEntries}" />条记录
(第<c:out value="${dataList.valueListInfo.pagingPage}" />页
共<c:out value="${dataList.valueListInfo.totalNumberOfPages}" />页)
</TD>
<TD align="right">
<vlh:paging pages="5"><c:out value="${page}" /></vlh:paging>
</TD>
<TD align="right" width="90" noWrap><c:if test="${dataList.valueListInfo.totalNumberOfPages>1}">
转到<input text='text' value='<c:out value="${dataList.valueListInfo.pagingPage}" />' size='3' onKeyup='gotoPage(<c:out value="${dataList.valueListInfo.totalNumberOfPages}" />,"<%=basePath%>")'>页</c:if>
</TD>
</TR>
</TABLE>

<TABLE border="0" width="100%" align="center" cellpadding="0" class="tablebg" cellspacing="1">
<tr bgcolor="#66CCFF" height="20">
<td align="center" width="5%"><B>序号</B></td>
<td align="center" width="5%"><B>姓名</B></td>
<td align="center" width="10%"><B>残疾人证号</B></td>
<td align="center" width="20%"><B>家庭住址</B></td>
<td align="center" width="16%"><B>身份证号</B></td>
<td align="center" width="18%"><B>街道</B></td>
<td align="center" width="12%"><B>社区</B></td>
<td align="center" width="8%"><B>核实状态</B></td>
<td align="center" width="5%"><B>操作</B></td>
</tr>
<FORM name="HandicappedInformationForm" METHOD="POST" ACTION="">
<INPUT TYPE="hidden" name="xm" value="">
<INPUT TYPE="hidden" name="area" value="">
<INPUT TYPE="hidden" name="cjrzh" value="">
<INPUT TYPE="hidden" name="hszt" value="">
<INPUT TYPE="hidden" name="JD_ID" value="">
<INPUT TYPE="hidden" name="areaname" value="">
<INPUT TYPE="hidden" name="isydk" value="">
<INPUT TYPE="hidden" name="pagingPage" value="">

<c:forEach items="${dataList}" var="rowData" varStatus="rowNumber">
<TR>
<c:if test="${(rowNumber.count%2)==1}"><TR class="even"></c:if>
<c:if test="${(rowNumber.count%2)==0}"><TR class="odd"></c:if>
<TD align="center"><c:out value="${rowNumber.count}" /></TD>
<TD align="left"><c:out value="${rowData.xm}" /></TD>
<TD align="left"><c:out value="${rowData.cjrz_id}" /></TD>
<TD align="left"><c:out value="${rowData.jtxxzz}" /> </TD>
<TD align="center"><c:out value="${rowData.sfz}" /> </TD>
<TD align="center">
<c:if test="${rowData.jd_id=='000000000'||rowData.jd_id=='000000001'||rowData.jd_id=='000000002'||rowData.jd_id=='000000003'}"><c:out value="${rowData.yjd}" /><c:out value="${rowData.jd}" /></c:if>
<c:if test="${rowData.jd_id!='000000000'&&rowData.jd_id!='000000001'&&rowData.jd_id!='000000002'&&rowData.jd_id!='000000003'}"><c:out value="${rowData.jd}" /></c:if>
</TD>
<TD align="center"><c:out value="${rowData.sq}" /></TD>
<TD align="center">
<c:if test="${(rowData.yxzt)==0}"><font color="green">齐全</font></c:if>
<c:if test="${(rowData.yxzt)==1}"><font color="#FF00FF">不齐全</font></c:if>
<c:if test="${(rowData.yxzt)==2}"><font color="blue">退卡</font></c:if>
<c:if test="${(rowData.yxzt)==3}"><font color="#8B008B">补卡</font></c:if>
<c:if test="${(rowData.yxzt)==4}">死亡确认</c:if>
<c:if test="${(rowData.yxzt)==5}">走失确认</c:if>
<c:if test="${(rowData.yxzt)==6}">迁出确认</c:if>
<c:if test="${(rowData.yxzt)==9}"><font color="red">未审核</font></c:if>
</TD>
<TD align="center">
<a href='#' onclick='modifyHI("<c:out value="${rowData.id}"/>");return false' title="修改" target='_parentblank'><img src="../../images/copy1.gif" border="0"></a>
</TD>
</TR>
</c:forEach>
<IFRAME NAME="VoteMessageFrame" id="VoteMessage" width="100%" height="100%" style="display:none;"
frameBorder="0" marginWidth="0" marginHeight="0" scrolling="auto"
src=""> </IFRAME>

</FORM>
</TABLE>
</vlh:root>


function gotoInputPageNo(inputPageNo, contextPath) {
var frm = document.HandicappedInformationForm;
frm.pagingPage.value=inputPageNo;
frm.target="_self";
var parentForm = window.parent.document.HandicappedInformationForm;
frm.xm.value= parentForm.xm.value;
frm.area.value= parentForm.area.value;
frm.cjrzh.value= parentForm.cjrzh.value;
frm.hszt.value= parentForm.hszt.value;
frm.isydk.value= parentForm.isydk.value;
frm.action= contextPath + '/jdhdTempAction.do?method=areaListInfo';

frm.submit();
}


function gotoPage(totalPage, contextPath) {

if(event.keyCode!=13) {// not press enter-key
return false;
}

if(totalPage==null) {
alert("提示:未提供参数(totalPage : 总页数),因此使用默认值 1。");
totalPage = 1;
}

if(contextPath==null) {
contextPath = "";
}

var inputPage = event.srcElement.value;
if(inputPage==""){
return false;
}

if(inputPage<1) {
inputPage = totalPage;
}

if(inputPage>totalPage) {
alert("您输入的页数不存在!");
event.srcElement.select();
return false;
}

gotoInputPageNo(inputPage, contextPath);
}
4.<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
<!-- Globle Search Configuration -->
<beans>

<!--½ֵ:˶¨ -->
<bean id="JdhdTempDAO"
class="com.itsv.information.dao.hibernate.JdhdTempDAOHibernate">
<property name="dataSource"><ref bean="dataSource"/></property>
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>

<bean id="jdhdTempManager" parent="txProxyTemplate">
<property name="target">
<bean
class="com.itsv.information.service.impl.JdhdTempManagerImpl">
<property name="jdhdTempDAO">
<ref bean="JdhdTempDAO" />
</property>
</bean>
</property>
</bean>
<bean id="vl_UnsubmitJdhdHandler" singleton="true"
class="net.mlw.vlh.DefaultValueListHandlerImpl">
<property name="config.adapters">
<map>
<entry key="data">
<bean
class="net.mlw.vlh.adapter.jdbc.dynclass.DefaultDynclassAdapter">

<!-- <bean class="net.mlw.vlh.adapter.jdbc.dynabean.DefaultDynaBeanAdapter"> -->
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="lowerCase">
<value>true</value>
</property>
<property name="useName">
<value>false</value>
</property>
<property name="defaultNumberPerPage">
<value>25</value>
</property>
<!-- <property name="defaultSortColumn"><value>apply_date</value></property> -->
<!-- <property name="defaultSortDirection"><value>desc</value></property> -->
<property name="sql">
<value>
select
h.ID,h.XM,h.CJRZ_ID,h.SFZ,h.JD,h.JD_ID,h.SQ,h.SQ_ID,h.YXZT,h.YJD,h.YJD_ID,i.jtxxzz
from JDHD_TEMP h ,handicapped_information i where i.info_id = h.id /~xm: and
h.XM like '%'||{xm}||'%' ~/ /~cjrzh: and
h.CJRZ_ID like '%'||{cjrzh}||'%' ~/
/~area: and (h.jd_id={area} or
((h.jd_id = '000000000' or h.jd_id = '000000001'
or h.jd_id = '000000002' or h.jd_id = '000000003') and h.yjd_id={area})) ~/ /~hszt:
and h.yxzt = {hszt}~/ /~isydk:
and h.ydk = {isydk}~/ /~yjdId:
and h.yjd_id = {yjdId}~/ order by h.YXZT desc , h.CJRZ_ID
desc /~sortColumn: ,[sortColumn]
[sortDirection]~/
</value>
</property>
</bean>
</entry>
<entry key="persondata">
<bean
class="net.mlw.vlh.adapter.jdbc.dynclass.DefaultDynclassAdapter">

<!-- <bean class="net.mlw.vlh.adapter.jdbc.dynabean.DefaultDynaBeanAdapter"> -->
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="lowerCase">
<value>true</value>
</property>
<property name="useName">
<value>false</value>
</property>
<property name="defaultNumberPerPage">
<value>25</value>
</property>
<!-- <property name="defaultSortColumn"><value>apply_date</value></property> -->
<!-- <property name="defaultSortDirection"><value>desc</value></property> -->
<property name="sql">
<value>
select
h.ID,h.XM,h.CJRZ_ID,h.SFZ,h.JD,h.JD_ID,h.SQ,h.SQ_ID,h.YXZT,h.YJD,h.YJD_ID,i.jtxxzz
from JDHD_TEMP h,handicapped_information i where i.info_id = h.id /~xm: and
h.XM like '%'||{xm}||'%' ~/ /~sfz: and
h.SFZ like '%'||{sfz}||'%' ~/ /~cjrzh: and
h.CJRZ_ID like '%'||{cjrzh}||'%' ~/ order by h.YXZT desc ,h.CJRZ_ID
desc /~sortColumn: ,[sortColumn]
[sortDirection]~/
</value>
</property>
</bean>
</entry>
<entry key="returnedData">
<bean
class="net.mlw.vlh.adapter.jdbc.dynclass.DefaultDynclassAdapter">

<!-- <bean class="net.mlw.vlh.adapter.jdbc.dynabean.DefaultDynaBeanAdapter"> -->
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="lowerCase">
<value>true</value>
</property>
<property name="useName">
<value>false</value>
</property>
<property name="defaultNumberPerPage">
<value>25</value>
</property>
<!-- <property name="defaultSortColumn"><value>apply_date</value></property> -->
<!-- <property name="defaultSortDirection"><value>desc</value></property> -->
<property name="sql">
<value>
select
h.ID,h.XM,h.CJRZ_ID,h.SFZ,h.JD,h.JD_ID,h.SQ,h.SQ_ID,h.YXZT,h.YJD,h.YJD_ID,i.jtxxzz
from JDHD_TEMP h ,handicapped_information i where i.info_id = h.id
/~area: and h.yjd_id={area} ~/
and h.jd_id = '000000000'
order by h.YXZT desc ,h.CJRZ_ID desc
/~sortColumn: ,[sortColumn] [sortDirection]~/
</value>
</property>
</bean>
</entry>

<entry key="rstj">
<bean
class="net.mlw.vlh.adapter.jdbc.dynclass.DefaultDynclassAdapter">

<!-- <bean class="net.mlw.vlh.adapter.jdbc.dynabean.DefaultDynaBeanAdapter"> -->
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="lowerCase">
<value>true</value>
</property>
<property name="useName">
<value>false</value>
</property>
<property name="defaultNumberPerPage">
<value>100</value>
</property>
<!-- <property name="defaultSortColumn"><value>apply_date</value></property> -->
<!-- <property name="defaultSortDirection"><value>desc</value></property> -->
<property name="sql">
<value>
select d.dict_name jdname,
(select count(*) from jdhd_temp t where (t.jd_id=d.dict_no or t.yjd_id=d.dict_no) and t.yxzt=0) qq,
(select count(*) from jdhd_temp t where (t.jd_id=d.dict_no or t.yjd_id=d.dict_no) and t.yxzt=1) bqq,
(select count(*) from jdhd_temp t where (t.jd_id=d.dict_no or t.yjd_id=d.dict_no) and t.yxzt=2) tk,
(select count(*) from jdhd_temp t where (t.jd_id=d.dict_no or t.yjd_id=d.dict_no) and t.yxzt=3) bk,
(select count(*) from jdhd_temp t where (t.jd_id=d.dict_no or t.yjd_id=d.dict_no) and t.yxzt=4) swqr,
(select count(*) from jdhd_temp t where (t.jd_id=d.dict_no or t.yjd_id=d.dict_no) and t.yxzt=5) zsqr,
(select count(*) from jdhd_temp t where (t.jd_id=d.dict_no or t.yjd_id=d.dict_no) and t.yxzt=6) qcqr,
(select count(*) from jdhd_temp t where (t.jd_id=d.dict_no or t.yjd_id=d.dict_no) and t.yxzt=9) wsh,
(select count(*) from jdhd_temp t where t.yjd_id=d.dict_no or t.jd_id=d.dict_no) zs
from dictionary d where d.parent_id='34721db084d14bc297cdd9fb69691506' order by d.description

</value>
</property>
</bean>
</entry>
</map>
</property>
</bean>
<bean id="vlUnsubmitJdhdHelper" singleton="true"
class="net.mlw.vlh.web.mvc.ValueListHandlerHelper">
<property name="valueListHandler">
<ref bean="vl_UnsubmitJdhdHandler" />
</property>
</bean>

</beans>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值