📄 u03c14bo.java
字号:
package cn.hope.mana.bo;
import java.util.List;
import org.apache.log4j.Logger;
import cn.hope.mana.pojo.U07CommonListVO;
import cn.hope.mana.pojo.TInfo;
import cn.hope.mana.pojo.dao.TInfoDAO;
import cn.hope.mana.util.U07Page;
public class U03C14BO {
Logger log = Logger.getLogger(U03C14BO.class.getName());
TInfoDAO tfd = new TInfoDAO();
//*************lizh&&&&start******************************
//全部查询
public List Tsearch() throws Exception{
List list=null;
try{
list =tfd.U03SearchTInfo();
}
catch(Exception e){
log.error(e);
e.printStackTrace();
throw new Exception(e);
}
return list;
}
//主键查询
public TInfo searchKey(String str) throws Exception{
TInfo tf = null;
try {
tf =tfd.U03SearchTInfo(str);
} catch (Exception e) {
log.error(e);
e.printStackTrace();
throw new Exception(e);
}
return tf;
}
//添加
public String insert(TInfo tinfo) throws Exception{
String key = null;
try {
key =tfd.U03InsertTInfo(tinfo);
} catch (Exception e) {
log.error(e);
e.printStackTrace();
throw new Exception(e);
}
return key;
}
//修改
public void update(TInfo tinfo) throws Exception{
try {
tfd.U03UpdateTInfo(tinfo);
} catch (Exception e) {
log.error(e);
e.printStackTrace();
throw new Exception(e);
}
}
//删除
public void delete(String id) throws Exception{
try{
tfd.U03DeleteTInfo(id);
}
catch(Exception e){
log.error(e);
e.printStackTrace();
throw new Exception(e);
}
}
//**************部门**************************
//查询部门的全部信息
public List DSearch() throws Exception{
List dlist=null;
try{
dlist=tfd.U03SearchCDept();
}
catch(Exception e){
log.error(e);
e.printStackTrace();
throw new Exception(e);
}
return dlist;
}
//**************用户组*************************
//查询用户组的全部信息
public List GSearch() throws Exception{
List glist=null;
try{
glist=tfd.U03SearchMGroup();
}
catch(Exception e){
log.error(e);
e.printStackTrace();
throw new Exception(e);
}
return glist;
}
//*****************分页处理**********************
public U07CommonListVO search(TInfo tinfo, int start, boolean isEq)
throws Exception {
U07CommonListVO cl_vo = new U07CommonListVO();
int range = 1;// 每页显示记录数
int count = 0;// 总记录数
List list = null;// 查询得到的结果集
U07Page page = new U07Page();// 分页
String fenyeStr = "";
try {
list =tfd.U03search(tinfo, start, range, isEq);
count =tfd.getCount();
cl_vo.setRs(list);
cl_vo.setCount(count);
cl_vo.setStart(start);
cl_vo.setRange(range);
fenyeStr = page.fenye(cl_vo);
cl_vo.setFenye(fenyeStr);
cl_vo.setCurrentPage(page.getCurrentPage());
cl_vo.setTotalPage(page.getTotalPage());
cl_vo.setStartSub(page.getStartSub());
cl_vo.setOverSub(page.getOverSub());
} catch (Exception e) {
log.error(e);
e.printStackTrace();
throw new Exception(e);
}
return cl_vo;
}
//********************lizh&&&&end***************
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -