exam-master/src/org/mmxbb/exam/dao/TestPaperDAO.java

(开头部分) 27KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

package org.mmxbb.exam.dao;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Vector;

import org.mmxbb.exam.bean.TestPaper;
import org.mmxbb.exam.util.DBConn;
import org.mmxbb.exam.util.Transformer;


public class TestPaperDAO {
  DBConn dbconn = null;
  private Connection conn = null;

  String GET_BY_EID =
      "select test.t_id as t_id,test.examinee_id as examinee_id,e.name as name,test.e_id as e_id,test.t_state as t_state,b1.b_value as t_stateName,DATE_FORMAT(test.t_begin,'%Y-%m-%d %H:%i:%s') as t_begin,DATE_FORMAT(test.t_end,'%Y-%m-%d %H:%i:%s') as t_end,test.t_total as t_total,test.t_passvalue as t_passvalue, exam.e_state as e_state,b2.b_value as e_stateName from ex_testpaper test,ex_examinee e,ex_baseinfo b1,ex_baseinfo b2,ex_examinationpaper exam where test.examinee_id=e.examinee_id and b1.b_id=test.t_state and b2.b_id=exam.e_state and exam.e_id=test.e_id and test.e_id=?";
  String SORTING =
      "select test.examinee_id as examinee_id,exam.e_name as e_name,examinee.name as name,test.t_total as t_total from ex_examinationpaper exam,ex_testpaper test,ex_examinee examinee where test.e_id=exam.e_id and test.e_id=? and test.t_total>=0.0 and test.examinee_id=examinee.examinee_id order by test.t_total desc";
  private final static String FIND_ABSENCE =
      "SELECT test.examinee_id as examinee_id,e.name as name FROM ex_testpaper test,ex_examinationpaper exam,ex_examinee e WHERE test.e_id=exam.e_id AND test.examinee_id=e.examinee_id AND test.t_begin is null AND exam.e_end<= (now())AND exam.e_id=?";
  private final static String FIND_TESTPAPER =
      "SELECT t_id FROM EX_TESTPAPER WHERE e_id=? and examinee_id=?";

  private int rowCount;
  private int pageCount;
  private int length;
  private String pagestr;
  private String conditionStr = "";

  /**
   * get a connection from a DB pool
   * @return Connection
   */

  public TestPaperDAO() {
    try {
      dbconn = new DBConn();
      conn = dbconn.getConnection();
    } catch (Exception ex) {
      ex.printStackTrace();
    }
  }

  public int getLength() {
    return (this.length);
  }

  public void setLength(int length) {
    this.length = length;
  }

  public String getConditionStr() {
    return (this.conditionStr);
  }
后面还有 863 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。