deptbo.java

来自「实现统一的人员日志管理系统管理后台」· Java 代码 · 共 55 行

JAVA
55
字号
package com.tb.log.model.bo;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.sun.java_cup.internal.internal_error;
import com.tb.log.model.bo.vo.dept.AddDeptVo;
import com.tb.log.model.bo.vo.dept.DeptVo;
import com.tb.log.model.bo.vo.dept.ShowDeptVo;
import com.tb.log.model.proxy.DeptProxy;

public class DeptBo {
	
	public List getAdd(){
		
		return new DeptProxy().getAll();
	}
	
	public boolean add(AddDeptVo addDeptVo){
		return new DeptProxy().add(addDeptVo);
	}
	
	public boolean modify(DeptVo deptVo) {
		return new DeptProxy().modify(deptVo);
	}
	
	public boolean remove(DeptVo deptVo){
		return new DeptProxy().remove(deptVo);
	}
	
	public Map get(int id){
		Map map = new HashMap();
		map.put(1, new DeptProxy().get(id));
		map.put(2, new DeptProxy().getAll());
		return map;
	}
	public Map findAll(ShowDeptVo showDept){
		
		if(showDept.getDept_grade() == null){
			 showDept.setDept_grade("");
		 }
	    if(showDept.getDept_state() == null){
	    	showDept.setDept_state("");
	    }
	     if(showDept.getDept_name()==null){
	    	 showDept.setDept_name("");
	     }
	     if(showDept.getSupper_id()==null){
	    	 showDept.setSupper_id("");
	     }
		return new DeptProxy().findAllPages(showDept);
	}
}

⌨️ 快捷键说明

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