首页>代码>java SSH框架开发CRM客户关系管理系统>/CRMSystem/src/com/action/DepartmentAction.java
package com.action;

import java.util.List;

import com.biz.DepartmentBiz;
import com.opensymphony.xwork2.ActionSupport;
import com.util.Page;
import com.vo.Department;

public class DepartmentAction extends ActionSupport{

	private Department department;
	private List<Department> dempartments;
	private DepartmentBiz departmentBiz;
	
	private Page page ;
	private Page page2;
	
	
	public DepartmentAction() {
		super();
		// TODO Auto-generated constructor stub
	}
	
	public Department getDepartment() {
		return department;
	}
	public void setDepartment(Department demDepartment) {
		this.department = demDepartment;
	}
	public List<Department> getDempartments() {
		return dempartments;
	}
	public void setDempartments(List<Department> dempartments) {
		this.dempartments = dempartments;
	}
	public DepartmentBiz getDepartmentBiz() {
		return departmentBiz;
	}
	public void setDepartmentBiz(DepartmentBiz departmentBiz) {
		this.departmentBiz = departmentBiz;
	}
	public Page getPage() {
		return page;
	}
	public void setPage(Page page) {
		this.page = page;
	}
	public Page getPage2() {
		return page2;
	}
	public void setPage2(Page page2) {
		this.page2 = page2;
	}
	
	public String departmentList(){
		
		dempartments = departmentBiz.findByPage(page);
		
		if(page.getCurrentPage() >  page.getTotalPage()){
			page.setCurrentPage(1);
		}
		dempartments = departmentBiz.findByPage(page);
		return SUCCESS;
	}
	
	public String add_depart(){
		departmentBiz.add(department);
		return SUCCESS;
	}
	
	//未完成
	public String deldepart(){
		departmentBiz.deleteById(department.getDepartmentId());
		return SUCCESS;
	}
	
	public String Updepart(){
		department=departmentBiz.findById(department.getDepartmentId());
		return SUCCESS;
	}
	
	public String doUpdadepart(){
		departmentBiz.upda(department);
		return SUCCESS;
	}
	
	public String fuzzyQuerydepart(){
		String a = department.getDepartmentName();
		Department b = new Department();
		b.setDepartmentName(a);
		dempartments = departmentBiz.findByPageToC(page, b);
		return SUCCESS;
	}
	
	public String toAddDepartment(){
		return SUCCESS ;
	}
	
}
最近下载更多
1302989672  LV3 2023年5月4日
qfch120  LV8 2023年4月18日
wangmeijing  LV5 2022年12月28日
zhaoyangwfd  LV17 2022年10月13日
akbar2020  LV9 2022年8月27日
wangyang520  LV6 2022年4月17日
shibinf  LV3 2022年4月11日
7z7z7z  LV5 2022年3月21日
dukie123  LV1 2022年2月14日
and123456  LV11 2022年2月8日
最近浏览更多
hhxq0902 4月20日
暂无贡献等级
阿凡达  LV9 1月29日
wuge123  LV8 2023年12月18日
wushengjun 2023年12月18日
暂无贡献等级
WBelong  LV7 2023年12月11日
uni-code_0123  LV1 2023年12月7日
飞飞飞2111111 2023年11月3日
暂无贡献等级
2036495585  LV9 2023年9月20日
deluser  LV3 2023年7月25日
komice1992  LV3 2023年7月1日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友