廖井涛
2025-05-26 3a975df5b368bc68ee7a81d34920b209f2ff607b
ºÓ±±ÍûÃÀÏîÄ¿/MES_11/target/gmms2-1.0-SNAPSHOT/WEB-INF/views/mes/data/public_manage.jsp
@@ -19,6 +19,48 @@
      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";
         }