⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lostbizimpl.java

📁 通过这个系统完成对客户基本信息、联系人信息、交往信息、客户服务信息的充分共享和规范化管理;希望通过对销售机会、客户开发过程的追踪和记录
💻 JAVA
字号:
package com.t53.crm4.customer.biz.impl;

import java.util.Iterator;
import java.util.List;
import java.util.Set;

import com.t53.crm4.common.PaginationBean;
import com.t53.crm4.common.entity.CstCustomer;
import com.t53.crm4.common.entity.CstLost;
import com.t53.crm4.common.entity.Orders;
import com.t53.crm4.common.entity.OrdersLine;
import com.t53.crm4.customer.biz.ILostBiz;
import com.t53.crm4.customer.biz.IOrdersBiz;
import com.t53.crm4.customer.dao.ICustomerDao;
import com.t53.crm4.customer.dao.IOrdersDao;
import com.t53.crm4.customer.dao.IlostDao;

public class LostBizImpl implements ILostBiz {

	private IlostDao lostDao;

	private ICustomerDao custDao;

	public void setCustDao(ICustomerDao custDao) {
		this.custDao = custDao;
	}

	@SuppressWarnings("unchecked")
	public List find(String value) {

		if (null != value && !"".equals(value)) {
			return lostDao.find("from CstLost c where c.lstId=?", Long
					.valueOf(value));

		}
		return null;
	}

	public void checkLost() {
		System.out.println("Check lost ... ");
		lostDao.checkLost();

	}

	public void modify(CstLost lost) {
		CstCustomer cust = custDao.get(lost.getCstCustomer().getCustNo());

		lost.setCstCustomer(cust);
		lost.setLstCustManagerId(cust.getCustManagerId());
		lost.setLstCustManagerName(cust.getCustManagerName());
		lost.setLstCustName(cust.getCustName());

		lostDao.saveOrUpdate(lost);

	}

	public void setLostDao(IlostDao lostDao) {
		this.lostDao = lostDao;
	}

	public List findByPagination(CstLost t, PaginationBean bean) {
		int maxNumber = lostDao.countByPagination(t);

		List<CstLost> lost = null;
		// 调用分页类的计算方法
		bean.countPageCount(maxNumber);
		if (maxNumber > 0) {
			lost = lostDao.findByPagination(t, (bean.getPageCount() - 1)
					* bean.getPerCount(), bean.getPerCount());
		}
		return lost;

	}

	public List findCustomer(String custNo) {
		String hql = "from CstLost c where c.lstId=?";

		return lostDao.find(hql, custNo);
	}

	public List<CstLost> findStatus() {

		return lostDao.find("select c.lstStatus from CstLost c");
	}

}

⌨️ 快捷键说明

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