📄 cjlrserviceimple.java
字号:
package com.xm.jsgl.cjlr.service;
import java.util.Iterator;
import java.util.List;
import com.opensymphony.xwork.ActionContext;
import com.wygl.service.AbstractService;
import com.wygl.xtgl.domain.User;
public class CjlrServiceImple extends AbstractService implements CjlrService {
/**获得授课班级列表*/
public List queryBj() throws Exception {
ActionContext ctx = ActionContext.getContext();
User user = (User)ctx.getSession().get("currentUser");
// System.out.println("-------------->userName:"+user.getEmployee().getName());
String hql = "from SkbEntity st where st.SKR = '"+user.getEmployee().getName()+"'";
return super.dbDao.queryObjects(hql);
}
public List queryXs(String bj) throws Exception {
String hql = "from StudentEntity st where st.SZBJ='"+bj+"'";
return super.dbDao.queryObjects(hql);
}
public List queryKcxx(String kcmc) throws Exception {
String hql = "from SkbEntity st where st.KCMC='"+kcmc+"'";
return super.dbDao.queryObjects(hql);
}
public void add(List addObjList) throws Exception {
Iterator it = addObjList.iterator();
while(it.hasNext())
{
super.dbDao.addObject(it.next());
}
}
public List queryXscj(String bj,String kcmc) throws Exception {
String hql = "from Xscjb st where st.bj='"+bj+"' and st.kc='"+kcmc+"'";
return super.dbDao.queryObjects(hql);
}
public List getKcmc() throws Exception {
ActionContext ctx = ActionContext.getContext();
User user = (User)ctx.getSession().get("currentUser");
String hql = "from SkbEntity st where st.SKR = '"+user.getEmployee().getName()+"'";
return super.dbDao.queryObjects(hql);
}
public void update(List updateObjList) throws Exception {
if(updateObjList!=null||updateObjList.size()!=0)
{
for(int i=0;i<updateObjList.size();i++)
{
super.dbDao.updateObject(updateObjList.get(i));
}
}
}
public List queryByXq(String xq) throws Exception {
ActionContext ctx = ActionContext.getContext();
User user = (User)ctx.getSession().get("currentUser");
String hql = "from Xscjb st where st.KKXQ = '"+xq+"' and st.xm = '"+user.getEmployee().getName()+"'";
return super.dbDao.queryObjects(hql);
}
public List queryBycj() throws Exception {
ActionContext ctx = ActionContext.getContext();
User user = (User)ctx.getSession().get("currentUser");
String hql = "from Xscjb st where st.xm = '"+user.getEmployee().getName()+"'";
return super.dbDao.queryObjects(hql);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -