/*
* 查询提取位置表所有数据
*
*/

public String ListEtlExtractPositionOfAll(){

// 接受数据库中传送的code
int code = Integer.parseInt(get("code").toString().trim());

this.getmenu(code, this.getRequest());

StringBuffer where = new StringBuffer("1=1");
StringBuffer path = new StringBuffer("ListEtlExtractPositionOfAll.action?code=").append(code);

String wzxx = get("wzxx")==null?"":get("wzxx").toString().trim();
String bbh = get("bbh")==null?"":get("bbh").toString().trim();

if(get("wzxx")!=null && !"".equals(get("wzxx"))){
where.append(" and positionNum like '%").append(wzxx).append("%' ");
path.append(" &wzxx=").append(wzxx);
}
if(get("bbh")!=null && !"".equals(get("bbh"))){
if(get("wzxx")!=null && !"".equals(get("wzxx"))){
where.append(" and versionNum=").append(bbh);
path.append(" &bbh=").append(bbh);
}else{
where.append(" and versionNum=").append(bbh);
path.append(" &bbh=").append(bbh);
}

}
// h获取页面输入的查询条件字段
//String str ="";
//if(get("wzxx")!=null && !"".equals(get("wzxx"))){
//str = " positionNum like '%"+get("wzxx")+"%'";
//}
//if(get("bbh")!=null && !"".equals(get("bbh"))){
//if (get("wzxx")!=null && !"".equals(get("wzxx"))) {
//str += " and versionNum= '"+get("bbh")+"'";
//}else {
//str = " versionNum= '"+get("bbh")+"'";
//}
//}
// 从字典表里把 状态 (60) 取出来
List<SysDictionary> ztDicList = this.orgConfigService.QueryDicByType(60);
if (ztDicList != null) {
this.getRequest().setAttribute("ztDicList", ztDicList);
}

// 查询分页调用ACTION
pageService.getPage(path.toString(), 0, this.getRequest());
// PageEntity entity = pageService.doList("Etlextractposition", "1=1");
PageEntity entity = pageService.doList("Etlextractposition", where.toString().trim());
// PageEntity entity = pageService.doList("Etlextractposition", where.toString().trim()==""?"1=1":where.toString().trim());
// 查询元素表 显示元素信息

List<Baseelement> list = new ArrayList<Baseelement>();
list = bscs.QueryAllBaseelement();
// 设置setAttribute 属性
this.getRequest().setAttribute("list", list);
this.getRequest().setAttribute("page", entity);
this.getRequest().setAttribute("code", code);
this.getRequest().setAttribute("wzxx", get("wzxx"));
this.getRequest().setAttribute("bbh", get("bbh"));

return "success";
}  

05-26 00:52