package com.fendou.marketing.service.impl;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import com.fendou.common.exception.CRMException;
import com.fendou.customer.po.Customer;
import com.fendou.marketing.dao.MarketingDao;
import com.fendou.marketing.po.Cooperate;
import com.fendou.marketing.po.Dispatch;
import com.fendou.marketing.po.Opporunity;
import com.fendou.marketing.po.Order;
import com.fendou.marketing.po.OrderDetail;
import com.fendou.marketing.po.Plan;
import com.fendou.marketing.po.PlanDetail;
import com.fendou.marketing.po.Quotation;
import com.fendou.marketing.po.QuotationDetail;
import com.fendou.marketing.po.Rival;
import com.fendou.marketing.po.SaleThread;
import com.fendou.marketing.service.MarketingService;
import com.fendou.system.po.DateDictionary;
import com.fendou.util.PageUtil;
@Service
@Transactional
public class MarketingServiceImpl implements MarketingService {
@Resource MarketingDao marketingDaoImpl;
@Transactional(propagation = Propagation.NOT_SUPPORTED)
public List<SaleThread> getSaleThreadByPage(String[] values,PageUtil pageUtil) throws CRMException{
List<SaleThread> list = null;
try {
list = marketingDaoImpl.getSaleThreadByPage(values, pageUtil);
} catch (CRMException e) {
e.printStackTrace();
throw new CRMException("查询此对象", e.getCause());
}
return list;
}
@Transactional(propagation = Propagation.NOT_SUPPORTED)
public List<Opporunity> getOpporunityByPage(String[] values,PageUtil pageUtil) throws CRMException{
List<Opporunity> list = null;
try {
list = marketingDaoImpl.getOpporunityByPage(values, pageUtil);
} catch (CRMException e) {
e.printStackTrace();
throw new CRMException("查询此对象", e.getCause());
}
return list;
}
@Transactional(propagation = Propagation.NOT_SUPPORTED)
public List<Order> getOrderByPage(String[] values, PageUtil pageUtil)
throws CRMException {
List<Order> list = null;
try {
list = marketingDaoImpl.getOrderByPage(values, pageUtil);
} catch (CRMException e) {
e.printStackTrace();
throw new CRMException("查询此对象", e.getCause());
}
return list;
}
@Transactional(propagation = Propagation.NOT_SUPPORTED)
public List<Plan> getPlanByPage(String[] values, PageUtil pageUtil)
throws CRMException {
List<Plan> list = null;
try {
list = marketingDaoImpl.getPlanByPage(values, pageUtil);
} catch (CRMException e) {
e.printStackTrace();
throw new CRMException("查询此对象", e.getCause());
}
return list;
}
@Transactional(propagation = Propagation.NOT_SUPPORTED)
public List<Quotation> getQuotationByPage(String[] values, PageUtil pageUtil)
throws CRMException {
List<Quotation> list = null;
try {
list = marketingDaoImpl.getQuotationByPage(values, pageUtil);
} catch (CRMException e) {
e.printStackTrace();
throw new CRMException("查询此对象", e.getCause());
}
return list;
}
@Transactional(propagation = Propagation.NOT_SUPPORTED)
public List<Rival> getRivalByPage(String[] values,
PageUtil pageUtil) throws CRMException {
List<Rival> list = null;
try {
list = marketingDaoImpl.getRivalByPage(values, pageUtil);
} catch (CRMException e) {
e.printStackTrace();
throw new CRMException("查询此对象", e.getCause());
}
return list;
}
public void addSaleThread(SaleThread saleThread) throws CRMException {
marketingDaoImpl.addSaleThread(saleThread);
}
public void addOpporunity(Opporunity opporunity) throws CRMException {
marketingDaoImpl.addOpporunity(opporunity);
}
public void delSaleThread(Integer threadId) throws CRMException {
marketingDaoImpl.delSaleThread(threadId);
}
public SaleThread getSaleThreadById(Integer threadId) throws CRMException {
return marketingDaoImpl.getSaleThreadById(threadId);
}
public void updateSaleThread(SaleThread saleThread) throws CRMException {
marketingDaoImpl.updateSaleThread(saleThread);
}
public void delOpporunity(Integer opporunityId) throws CRMException {
marketingDaoImpl.delOpporunity(opporunityId);
}
public Opporunity getOpporunityById(Integer opporunityId)
throws CRMException {
return marketingDaoImpl.getOpporunityById(opporunityId);
}
public void updateOpporunity(Opporunity opporunity) throws CRMException {
marketingDaoImpl.updateOpporunity(opporunity);
}
public Customer getCustomerById(Integer customerId) throws CRMException {
return marketingDaoImpl.getCustomerById(customerId);
}
public DateDictionary getDateDictionaryById(Integer dicId) throws CRMException {
return marketingDaoImpl.getDateDictionaryById(dicId);
}
public void addCooperate(Cooperate cooperate) throws CRMException {
marketingDaoImpl.addCooperate(cooperate);
}
public void addDispatch(Dispatch dispatch) throws CRMException {
marketingDaoImpl.addDispatch(dispatch);
}
public void addPlan(Plan plan) throws CRMException {
marketingDaoImpl.addPlan(plan);
}
public Plan getPlanById(Integer planId) throws CRMException{
return marketingDaoImpl.getPlanById(planId);
}
public List<PlanDetail> getPlanDetailByPlanId(Integer planId)
throws CRMException {
return marketingDaoImpl.getPlanDetailByPlanId(planId);
}
public void updatePlan(Plan plan) throws CRMException{
marketingDaoImpl.updatePlan(plan);
}
public void addPlanDetail(PlanDetail planDetail) throws CRMException {
marketingDaoImpl.addPlanDetail(planDetail);
}
public void delPlanDetail(Integer planDetailId) throws CRMException {
marketingDaoImpl.delPlanDetail(planDetailId);
}
public void updatePlanDetail(PlanDetail planDetail) throws CRMException {
marketingDaoImpl.updatePlanDetail(planDetail);
}
public PlanDetail getPlanDetailById(Integer planDetailId)
throws CRMException {
return marketingDaoImpl.getPlanDetailById(planDetailId);
}
public int[] getPlanResult(Integer planId) throws CRMException {
return marketingDaoImpl.getPlanResult(planId);
}
public void addQuotation(Quotation quotation) throws CRMException {
marketingDaoImpl.addQuotation(quotation);
}
public Quotation getQuotationById(Integer quotationId) throws CRMException {
return marketingDaoImpl.getQuotationById(quotationId);
}
public List<QuotationDetail> getQuotationDetailByQuotationId(
Integer quotationId) throws CRMException {
return marketingDaoImpl.getQuotationDetailByQuotationId(quotationId);
}
public Order getOrderById(Integer orderId) throws CRMException {
return marketingDaoImpl.getOrderById(orderId);
}
public List<OrderDetail> getOrderDetailByOrderId(Integer orderId)
throws CRMException {
return marketingDaoImpl.getOrderDetailByOrderId(orderId);
}
public void addQuotationDetail(QuotationDetail quotationDetail)
throws CRMException {
marketingDaoImpl.addQuotationDetail(quotationDetail);
}
public void updateQuotation(Quotation quotation) throws CRMException {
marketingDaoImpl.updateQuotation(quotation);
}
public void updateQuotationDetail(QuotationDetail quotationDetail)
throws CRMException {
marketingDaoImpl.updateQuotationDetail(quotationDetail);
}
public void delQuotationDetail(Integer quotationDetailId)
throws CRMException {
marketingDaoImpl.delQuotationDetail(quotationDetailId);
}
public void addOrder(Order order) throws CRMException {
marketingDaoImpl.addOrder(order);
}
public void addOrderDetail(OrderDetail orderDetail) throws CRMException {
marketingDaoImpl.addOrderDetail(orderDetail);
}
public void updateOrder(Order order) throws CRMException {
marketingDaoImpl.updateOrder(order);
}
public void delOrder(Integ