📄 pkjustaction.java
字号:
package com.comingnet.action;
import java.util.*;
import com.opensymphony.xwork2.ActionSupport;
import com.db.DBOperator;
import com.db.DBUtils;
import java.sql.*;
import com.db.page;
import com.comingnet.bean.UserInfor;
import com.comingnet.intercepter.UserSessionAware;
public class pkjustAction extends ActionSupport {
/**
*
*/
private static final long serialVersionUID = 6143904634195826961L;
private int jc;
private int bjbh;
public int getBjbh() {
return bjbh;
}
public void setBjbh(int bjbh) {
this.bjbh = bjbh;
}
public int getJc() {
return jc;
}
public void setJc(int jc) {
this.jc = jc;
}
List currmlist=null;
public List getCurrmlist() {
return currmlist;
}
public void setCurrmlist(List currmlist) {
this.currmlist = currmlist;
}
public String execute()
{
ArrayList list=null;
ArrayList list0=null;
DBOperator dbop=new DBOperator();
try {//select distinct c.kcmc ,a.jsxm from m_teacher a,m_class_cur c where c.jsbh=a.jsid and c.bjbh=2 and a.jsid not in(select distinct c.jsbh from m_sortcurrm b,m_class_cur c where c.kcmc=b.kcmc and c.bjbh=b.bjbh and b.jcid=1)
System.out.println("select distinct c.kcmc ,a.jsxm from m_teacher a,m_class_cur c where c.jsbh=a.jsid and c.bjbh="+bjbh+" and a.jsid not in(select distinct c.jsbh from m_sortcurrm b,m_class_cur c where c.kcmc=b.kcmc and c.bjbh=b.bjbh and b.jcid="+jc);
list=dbop.ExecuteSelect(false,"select distinct c.kcmc ,a.jsxm from m_teacher a,m_class_cur c where c.jsbh=a.jsid and c.bjbh="+bjbh+" and a.jsid not in(select distinct c.jsbh from m_sortcurrm b,m_class_cur c where c.kcmc=b.kcmc and c.bjbh=b.bjbh and b.jcid="+jc+")");
} catch (NullPointerException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
String nameStr="user_xh";
List<HashMap> newlist = new ArrayList<HashMap>();
for(int i=0;i<list.size();i++){
list0=(ArrayList)list.get(i);
HashMap<String, Comparable> bj = new HashMap<String, Comparable>();
bj.put(nameStr,""+i);
bj.put("kcmc",list0.get(0).toString());
bj.put("jsxm",list0.get(1).toString());
newlist.add(bj) ;
}
setCurrmlist(newlist);
return SUCCESS;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -