⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 queryczyz.java

📁 jdo开发实例,一个功能全面的oa系统
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
                java.sql.Date senddate = rs.getDate("senddate");
                historydto.setSenddate(senddate);
                historydto.setApproval(rs.getString("approval"));
                historydto.setSendto(rs.getString("sendto"));
                historydto.setCopyto(rs.getString("copyto"));
                java.sql.Date returntime = rs.getDate("returntime");
                historydto.setReturntime(returntime);
                historydto.setReturnapproval(rs.getString("returnapproval"));
                historydto.setPersonapproval(rs.getString("personapproval"));
                historydto.setHistoryflag(rs.getInt("historyflag"));
                historydto.setDerc(rs.getString("derc"));
            }

            rs.close();
            sta.close();
            conn.close();
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }
        return al;
    }

    public Collection QueryHist(String author, String title)
    {
        Collection al = new ArrayList();

        String sql = "select * from historyfiles where title like '%" + title + "%' and person like '%" + author + "%' and historyflag=1 order by hid";
        try
        {
            Connection conn = commonclass.getConnection();
            Statement sta = conn.createStatement();
            HistoryDto historydto;
            ResultSet rs;
            for(rs = sta.executeQuery(sql); rs.next(); al.add(historydto))
            {
                historydto = new HistoryDto();
                historydto.setHid(rs.getInt("hid"));
                historydto.setType(rs.getString("type"));
                historydto.setTitle(rs.getString("title"));
                historydto.setTopic(rs.getString("topic"));
                historydto.setResearchid(rs.getInt("rid"));
                historydto.setSummary(rs.getString("summary"));
                historydto.setContext(rs.getBytes("context"));
                historydto.setMethod(rs.getString("method"));
                historydto.setPerson(rs.getString("person"));
                historydto.setPartyid(rs.getInt("partyid"));
                historydto.setOrgtype(rs.getString("orgtype"));
                historydto.setOrgname(rs.getString("orgname"));
                historydto.setSenddirection(rs.getString("senddirection"));
                historydto.setReceive(rs.getString("recieve"));
                historydto.setMeetingtype(rs.getString("meetingtype"));
                java.sql.Date senddate = rs.getDate("senddate");
                historydto.setSenddate(senddate);
                historydto.setApproval(rs.getString("approval"));
                historydto.setSendto(rs.getString("sendto"));
                historydto.setCopyto(rs.getString("copyto"));
                java.sql.Date returntime = rs.getDate("returntime");
                historydto.setReturntime(returntime);
                historydto.setReturnapproval(rs.getString("returnapproval"));
                historydto.setPersonapproval(rs.getString("personapproval"));
                historydto.setHistoryflag(rs.getInt("historyflag"));
                historydto.setDerc(rs.getString("derc"));
            }

            rs.close();
            sta.close();
            conn.close();
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }
        return al;
    }

    public Collection QueryQTYA(String date1, String date2, String author, String title)
    {
        Collection al = new ArrayList();

        String sql = "select * from historyfiles where title like '%" + title + "%' and  person like '%" + author + "%' and senddate between '" + date1 + "' and '" + date2 + "' and  historyflag=0 order by hid";
        try
        {
            Connection conn = commonclass.getConnection();
            Statement sta = conn.createStatement();
            HistoryDto historydto;
            ResultSet rs;
            for(rs = sta.executeQuery(sql); rs.next(); al.add(historydto))
            {
                historydto = new HistoryDto();
                historydto.setHid(rs.getInt("hid"));
                historydto.setType(rs.getString("type"));
                historydto.setTitle(rs.getString("title"));
                historydto.setTopic(rs.getString("topic"));
                historydto.setResearchid(rs.getInt("rid"));
                historydto.setSummary(rs.getString("summary"));
                historydto.setContext(rs.getBytes("context"));
                historydto.setMethod(rs.getString("method"));
                historydto.setPerson(rs.getString("person"));
                historydto.setPartyid(rs.getInt("partyid"));
                historydto.setOrgtype(rs.getString("orgtype"));
                historydto.setOrgname(rs.getString("orgname"));
                historydto.setSenddirection(rs.getString("senddirection"));
                historydto.setReceive(rs.getString("recieve"));
                historydto.setMeetingtype(rs.getString("meetingtype"));
                java.sql.Date senddate = rs.getDate("senddate");
                historydto.setSenddate(senddate);
                historydto.setApproval(rs.getString("approval"));
                historydto.setSendto(rs.getString("sendto"));
                historydto.setCopyto(rs.getString("copyto"));
                java.sql.Date returntime = rs.getDate("returntime");
                historydto.setReturntime(returntime);
                historydto.setReturnapproval(rs.getString("returnapproval"));
                historydto.setPersonapproval(rs.getString("personapproval"));
                historydto.setHistoryflag(rs.getInt("historyflag"));
                historydto.setDerc(rs.getString("derc"));
            }

            rs.close();
            sta.close();
            conn.close();
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }
        return al;
    }

    public Collection QueryQTYAs(String date1, String date2, String author, String title)
    {
        Collection al = new ArrayList();

        String sql = "select * from historyfiles where title like '%" + title + "%' and  person like '%" + author + "%' and returntime between '" + date1 + "' and '" + date2 + "' and  historyflag=0 order by hid";
        try
        {
            Connection conn = commonclass.getConnection();
            Statement sta = conn.createStatement();
            HistoryDto historydto;
            ResultSet rs;
            for(rs = sta.executeQuery(sql); rs.next(); al.add(historydto))
            {
                historydto = new HistoryDto();
                historydto.setHid(rs.getInt("hid"));
                historydto.setType(rs.getString("type"));
                historydto.setTitle(rs.getString("title"));
                historydto.setTopic(rs.getString("topic"));
                historydto.setResearchid(rs.getInt("rid"));
                historydto.setSummary(rs.getString("summary"));
                historydto.setContext(rs.getBytes("context"));
                historydto.setMethod(rs.getString("method"));
                historydto.setPerson(rs.getString("person"));
                historydto.setPartyid(rs.getInt("partyid"));
                historydto.setOrgtype(rs.getString("orgtype"));
                historydto.setOrgname(rs.getString("orgname"));
                historydto.setSenddirection(rs.getString("senddirection"));
                historydto.setReceive(rs.getString("recieve"));
                historydto.setMeetingtype(rs.getString("meetingtype"));
                java.sql.Date senddate = rs.getDate("senddate");
                historydto.setSenddate(senddate);
                historydto.setApproval(rs.getString("approval"));
                historydto.setSendto(rs.getString("sendto"));
                historydto.setCopyto(rs.getString("copyto"));
                java.sql.Date returntime = rs.getDate("returntime");
                historydto.setReturntime(returntime);
                historydto.setReturnapproval(rs.getString("returnapproval"));
                historydto.setPersonapproval(rs.getString("personapproval"));
                historydto.setHistoryflag(rs.getInt("historyflag"));
                historydto.setDerc(rs.getString("derc"));
            }

            rs.close();
            sta.close();
            conn.close();
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }
        return al;
    }

    public Collection QueryQT(String author, String title)
    {
        Collection al = new ArrayList();

        String sql = "select * from historyfiles where title like '%" + title + "%' and person like '%" + author + "%' and historyflag=0 order by hid";
        try
        {
            Connection conn = commonclass.getConnection();
            Statement sta = conn.createStatement();
            HistoryDto historydto;
            ResultSet rs;
            for(rs = sta.executeQuery(sql); rs.next(); al.add(historydto))
            {
                historydto = new HistoryDto();
                historydto.setHid(rs.getInt("hid"));
                historydto.setType(rs.getString("type"));
                historydto.setTitle(rs.getString("title"));
                historydto.setTopic(rs.getString("topic"));
                historydto.setResearchid(rs.getInt("rid"));
                historydto.setSummary(rs.getString("summary"));
                historydto.setContext(rs.getBytes("context"));
                historydto.setMethod(rs.getString("method"));
                historydto.setPerson(rs.getString("person"));
                historydto.setPartyid(rs.getInt("partyid"));
                historydto.setOrgtype(rs.getString("orgtype"));
                historydto.setOrgname(rs.getString("orgname"));
                historydto.setSenddirection(rs.getString("senddirection"));
                historydto.setReceive(rs.getString("recieve"));
                historydto.setMeetingtype(rs.getString("meetingtype"));
                java.sql.Date senddate = rs.getDate("senddate");
                historydto.setSenddate(senddate);
                historydto.setApproval(rs.getString("approval"));
                historydto.setSendto(rs.getString("sendto"));
                historydto.setCopyto(rs.getString("copyto"));
                java.sql.Date returntime = rs.getDate("returntime");
                historydto.setReturntime(returntime);
                historydto.setReturnapproval(rs.getString("returnapproval"));
                historydto.setPersonapproval(rs.getString("personapproval"));
                historydto.setHistoryflag(rs.getInt("historyflag"));
                historydto.setDerc(rs.getString("derc"));
            }

            rs.close();
            sta.close();
            conn.close();
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }
        return al;
    }

    public Collection QueryYAGZ(String date1, String date2, String title, String person)
    {
        Collection al = new ArrayList();

        Statement stm = null;
        ResultSet rs = null;
        String sql = "select * from trace where title like '$" + title + "' and resperson like '%" + person + "%' and TiAndate between '" + date1 + "' and '" + date2 + "' order by tid";
        try
        {
            Connection conn = commonclass.getConnection();
            stm = conn.createStatement();
            ExtendsTraceDto tracedto;
            for(rs = stm.executeQuery(sql); rs.next(); al.add(tracedto))
            {
                tracedto = new ExtendsTraceDto();
                tracedto.setTid(rs.getInt("tid"));
                tracedto.setHid(rs.getInt("hid"));
                tracedto.setPid(rs.getInt("pid"));

                tracedto.setTitle(rs.getString("title"));
                tracedto.setResperson(rs.getString("resperson"));
                tracedto.setTiandate(rs.getDate("TiAndate"));
                tracedto.setDepartment(rs.getString("department"));
                tracedto.setReturndepart(rs.getString("returndepart"));
                tracedto.setReperson(rs.getString("reperson"));
                tracedto.setReDate(rs.getDate("redate"));
                tracedto.setPersonapproval(rs.getString("personapproval"));
                tracedto.setSatisfaction(rs.getString("satisfaction"));
                tracedto.setDerc(rs.getString("derc"));
            }

        }
        catch(Exception e)
        {
            e.printStackTrace();
        }
        return al;
    }

    public Collection QueryYAGZs(String date1, String date2, String title, String person)
    {
        Collection al = new ArrayList();

        Statement stm = null;
        ResultSet rs = null;
        String sql = "select * from trace where title like '$" + title + "' and resperson like '%" + person + "%' and redate between '" + date1 + "' and '" + date2 + "' order by tid";
        try
        {
            Connection conn = commonclass.getConnection();
            stm = conn.createStatement();
            ExtendsTraceDto tracedto;
            for(rs = stm.executeQuery(sql); rs.next(); al.add(tracedto))
            {
                tracedto = new ExtendsTraceDto();
                tracedto.setTid(rs.getInt("tid"));
                tracedto.setHid(rs.getInt("hid"));
                tracedto.setPid(rs.getInt("pid"));
                tracedto.setTitle(rs.getString("title"));
                tracedto.setResperson(rs.getString("resperson"));
                tracedto.setTiandate(rs.getDate("TiAndate"));
                tracedto.setDepartment(rs.getString("department"));
                tracedto.setReturndepart(rs.getString("returndepart"));
                tracedto.setReperson(rs.getString("reperson"));
                tracedto.setReDate(rs.getDate("redate"));
                tracedto.setPersonapproval(rs.getString("personapproval"));
                tracedto.setSatisfaction(rs.getString("satisfaction"));
                tracedto.setDerc(rs.getString("derc"));
            }

        }
        catch(Exception e)
        {
            e.printStackTrace();
        }
        return al;
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -