|
楼主 |
发表于 2019-5-22 15:31:17
|
显示全部楼层
public static String allTOCsv(String t1,String t2) throws Exception{
Connection conn = null;
Statement stat = null;
ResultSet rs = null;
String count="";
try {
conn = ModelUtils.getConnection("/XHWL/WLGL/data");
stat = conn.createStatement();
try {
String sqlQuery = "SELECT fdcmc,fdcxh ,fzl1 ,fxs,fsl,fxj,xh_ywdc.fbz as ywdcfbz,fywdh,fxtdh,fcj,fcw,fywy,xh_ywd.fdh as ywdfdh,fs,fdqs,fdqx,fxxshdz,fywjc,ftcbz,flxbz,ftcjg,fdhr,fdhsj,fpcr,fpcsj,ffhr,ffhsj,fhdr,fhdsj,ftbs,ffcdh,xh_ywd.fcjdept as ywdfcjdept,xh_ywd.fcjrname as ywdfcjrname,xh_ywd.fcjsj as ywdfcjsj,fhwzl,fhwlf,fldje,fydh,ffcsj,ffcr,fpczl,fch,fjsy,xh_yd.fdh as ydfdh,xh_yd.fbz as ydfbz,fgys FROM xh_ywdc left join XH_YWD on XH_YWD.fid = XH_YWDC.fZYWDH left join XH_YD on XH_YWD.fFCDH = XH_YD.fid where xh_ywd.fcjsj>'"+t1+"' and xh_ywd.fcjsj<'"+t2+"'";
rs = stat.executeQuery(sqlQuery);
//rs.next();
while(rs.next()){
// ;
count=count+rs.getString("fdcmc")+","+rs.getString("fdcxh")+","+rs.getString("fzl1").toString()+","+rs.getString("fxs").toString()+","+rs.getString("fsl").toString()+","+rs.getString("fxj").toString()+","+rs.getString("ywdcfbz")+",'"+rs.getString("fywdh")+","+rs.getString("fxtdh")+","+rs.getString("fcj")+","+rs.getString("fcw")+","+rs.getString("fywy")+","+rs.getString("ywdfdh")+","+rs.getString("fs")+","+rs.getString("fdqs")+","+rs.getString("fdqx")+","+rs.getString("fxxshdz")+","+rs.getString("fywjc")+","+rs.getString("ftcbz")+","+rs.getString("flxbz")+","+rs.getString("ftcjg")+","+rs.getString("fdhr")+","+rs.getString("fdhsj")+","+rs.getString("fpcr")+","+rs.getString("fpcsj")+","+rs.getString("ffhr")+","+rs.getString("ffhsj")+","+rs.getString("fhdr")+","+rs.getString("fhdsj")+","+rs.getString("ftbs")+","+rs.getString("ffcdh")+","+rs.getString("ywdfcjdept")+","+rs.getString("ywdfcjrname")+","+rs.getString("ywdfcjsj")+","+rs.getString("fhwzl")+","+rs.getString("fhwlf")+","+rs.getString("fldje")+","+rs.getString("fydh")+","+rs.getString("ffcsj")+","+rs.getString("ffcr")+","+rs.getString("fpczl")+","+rs.getString("fch")+","+rs.getString("fjsy")+","+rs.getString("ydfdh")+","+rs.getString("ydfbz")+","+rs.getString("fgys")+"\n" ;
//System.out.println(count);
}
//count = rs.getNString("countname");
} finally {
rs.close();
rs = null;
}
}
finally {
stat.close();
stat = null;
conn.close();
conn = null;
}
//System.out.println(count);
return count;
} |
评分
-
查看全部评分
|