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

📄 queryczyz.java

📁 jdo开发实例,一个功能全面的oa系统
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi
// Source File Name:   QueryCZYZ.java

package com.gzrealmap.oa.upload;
import com.gzrealmap.oa.*;
import com.gzrealmap.lib.jdbc.JDBCUtil;

import java.sql.*;
import java.util.ArrayList;
import java.util.Collection;

public class QueryCZYZ
{
JDBCUtil commonclass;
    public QueryCZYZ()
    {
      commonclass=JDBCUtil.getInstance();
    }

    public Collection QueryCZYZs(String tname)
    {
        Collection al = new ArrayList();

        String sql = "select * from  member where mname like '%" + tname + "%' order by mid";
        try
        {
            Connection conn = commonclass.getConnection();
            Statement sta = conn.createStatement();
            MemberDto lawdto;
            ResultSet rs;
            for(rs = sta.executeQuery(sql); rs.next(); al.add(lawdto))
            {
                lawdto = new MemberDto();
                lawdto.setMid(rs.getInt(1));
                lawdto.setMemid(rs.getString(2));
                lawdto.setMname(rs.getString(3));
                lawdto.setSex(rs.getString(4));
                lawdto.setBirth(rs.getDate(5));
                lawdto.setNativion(rs.getString(6));
                lawdto.setDepartment(rs.getString(7));
                lawdto.setJob(rs.getString(8));
                lawdto.setAddr(rs.getString(9));
                lawdto.setOfficetel(rs.getString(10));
                lawdto.setHometel(rs.getString(11));
                lawdto.setMobile(rs.getString(12));
                lawdto.setEmail(rs.getString(13));
                lawdto.setPostcode(rs.getString(14));
                lawdto.setPartyjob(rs.getString(15));
                lawdto.setPjob(rs.getString(16));
                lawdto.setDegree(rs.getString(17));
                lawdto.setAchievement(rs.getString(18));
                lawdto.setDerc(rs.getString(19));
            }

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

    public Collection QueryTwork(String twork)
    {
        Collection al = new ArrayList();

        String sql = "select * from  member where job like '%" + twork + "%' order by mid";
        try
        {
            Connection conn = commonclass.getConnection();
            Statement sta = conn.createStatement();
            MemberDto lawdto;
            ResultSet rs;
            for(rs = sta.executeQuery(sql); rs.next(); al.add(lawdto))
            {
                lawdto = new MemberDto();
                lawdto.setMid(rs.getInt(1));
                lawdto.setMemid(rs.getString(2));
                lawdto.setMname(rs.getString(3));
                lawdto.setSex(rs.getString(4));
                lawdto.setBirth(rs.getDate(5));
                lawdto.setNativion(rs.getString(6));
                lawdto.setDepartment(rs.getString(7));
                lawdto.setJob(rs.getString(8));
                lawdto.setAddr(rs.getString(9));
                lawdto.setOfficetel(rs.getString(10));
                lawdto.setHometel(rs.getString(11));
                lawdto.setMobile(rs.getString(12));
                lawdto.setEmail(rs.getString(13));
                lawdto.setPostcode(rs.getString(14));
                lawdto.setPartyjob(rs.getString(15));
                lawdto.setPjob(rs.getString(16));
                lawdto.setDegree(rs.getString(17));
                lawdto.setAchievement(rs.getString(18));
                lawdto.setDerc(rs.getString(19));
            }

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

    public Collection Query(String tname, String twork)
    {
        Collection al = new ArrayList();

        String name = tname.trim();
        String work = twork.trim();
        String sql = "select * from  member where job like '%" + twork + "%' and  mname like '%" + tname + "%' order by mid";
        try
        {
            Connection conn = commonclass.getConnection();
            Statement sta = conn.createStatement();
            MemberDto lawdto;
            ResultSet rs;
            for(rs = sta.executeQuery(sql); rs.next(); al.add(lawdto))
            {
                lawdto = new MemberDto();
                lawdto.setMid(rs.getInt(1));
                lawdto.setMemid(rs.getString(2));
                lawdto.setMname(rs.getString(3));
                lawdto.setSex(rs.getString(4));
                lawdto.setBirth(rs.getDate(5));
                lawdto.setNativion(rs.getString(6));
                lawdto.setDepartment(rs.getString(7));
                lawdto.setJob(rs.getString(8));
                lawdto.setAddr(rs.getString(9));
                lawdto.setOfficetel(rs.getString(10));
                lawdto.setHometel(rs.getString(11));
                lawdto.setMobile(rs.getString(12));
                lawdto.setEmail(rs.getString(13));
                lawdto.setPostcode(rs.getString(14));
                lawdto.setPartyjob(rs.getString(15));
                lawdto.setPjob(rs.getString(16));
                lawdto.setDegree(rs.getString(17));
                lawdto.setAchievement(rs.getString(18));
                lawdto.setDerc(rs.getString(19));
            }

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

    public Collection QueryZCFG(String date1, String date2, String name)
    {
        Collection al = new ArrayList();

        String sql = "select * from lawsInfo where Lname like '%" + name + "%' and Ptime between '" + date1 + "' and '" + date2 + "' order by Lid";
        try
        {
            Connection conn = commonclass.getConnection();
            Statement sta = conn.createStatement();
            LawinfoDto lawdto;
            ResultSet rs;
            for(rs = sta.executeQuery(sql); rs.next(); al.add(lawdto))
            {
                lawdto = new LawinfoDto();
                lawdto.setLid(rs.getInt(1));
                lawdto.setLname(rs.getString(2));
                lawdto.setPname(rs.getString(3));
                lawdto.setPtime(rs.getDate(4));
                lawdto.setContext(rs.getBytes("Lcontext"));
                lawdto.setDecr(rs.getString(6));
                lawdto.setLcontext(rs.getString(7));
                lawdto.setSource(rs.getString("source"));
            }

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

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

        String sql = "select * from szyzfile where title like '%" + title + "%' and  author like '%" + author + "%' and Ptime between '" + date1 + "' and '" + date2 + "' order by sid";
        try
        {
            Connection conn = commonclass.getConnection();
            Statement sta = conn.createStatement();
            SzyzfileDto szyzdto;
            ResultSet rs;
            for(rs = sta.executeQuery(sql); rs.next(); al.add(szyzdto))
            {
                szyzdto = new SzyzfileDto();
                szyzdto.setSid(rs.getInt(1));
                szyzdto.setType(rs.getString(2));
                szyzdto.setTitle(rs.getString(3));
                szyzdto.setSource(rs.getString(4));
                szyzdto.setPtime(rs.getDate(5));
                szyzdto.setSummary(rs.getString(6));
                szyzdto.setContext(rs.getBytes(7));
                szyzdto.setAuthor(rs.getString(8));
                szyzdto.setDecr(rs.getString(9));
            }

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

    public Collection QueryHistory(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=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 QueryHistorys(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=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"));

⌨️ 快捷键说明

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