| | |
| | | sn = mes.getMesDBHelper().createSession(false); |
| | | String strSQL = ""; |
| | | if ("æ¥è¯¢".equals(caozuo)) { |
| | | if ("磨边å¼åæ¥è¯¢".equals(leixing)) { |
| | | String stime = request.getParameter("stime"); |
| | | String etime = request.getParameter("etime"); |
| | | String trigger = request.getParameter("trigger"); |
| | | String Edg = request.getParameter("Edg"); |
| | | String banzu = request.getParameter("banzu"); |
| | | String gby=""; |
| | | //String isdb = request.getParameter("isdb"); |
| | | System.out.println(etime); |
| | | /* if("".equals(etime)||etime==null){ |
| | | etime="Now()"; |
| | | }else{ |
| | | etime="'"+etime+"'"; |
| | | } */ |
| | | if("".equals(Edg)||Edg==null||"0".equals(Edg)){ |
| | | Edg="width,height,SendTime,Line,count(*) as piece,ifnull(banzu,'')"; |
| | | gby="Recordsid"; |
| | | }else if("1".equals(Edg)){ |
| | | Edg="width,SendTime,Line,ifnull(banzu,''),count(*) as piece"; |
| | | gby="RecordsidW"; |
| | | }else if("2".equals(Edg)){ |
| | | Edg="height,SendTime,Line,ifnull(banzu,''),count(*) as piece"; |
| | | gby="RecordsidH"; |
| | | } |
| | | |
| | | if("".equals(banzu)||banzu==null||"0".equals(banzu)){ |
| | | banzu=""; |
| | | }else{ |
| | | banzu=" banzu='"+banzu+"' and"; |
| | | } |
| | | if("1".equals(trigger)){//æ¥è¯¢ |
| | | strSQL = "select "+Edg+" from Y_Edg_Statistics"+ |
| | | " where Line="+line+" and "+banzu+" SendTime>='"+stime+"' and SendTime<='"+etime+"'"+ |
| | | " GROUP BY "+gby; |
| | | }else{//é»è®¤ |
| | | strSQL ="select width,height,SendTime,Line,count(*) as piece,ifnull(banzu,'') from Y_Edg_Statistics"+ |
| | | " where Line="+line+" and SendTime>=CONCAT(DATE_FORMAT(Now(),'%Y-%m-%d'),' 00:00:00') and SendTime<=CONCAT(DATE_FORMAT(Now(),'%Y-%m-%d'),' 23:59:59')"+ |
| | | " GROUP BY Recordsid"; |
| | | } |
| | | System.out.println(strSQL); |
| | | |
| | | } |
| | | if ("æ¬¡ç ´ç±»å".equals(leixing)) { |
| | | strSQL = "select id,cipoleixing from cipoleixing"; |
| | | } |