package com.amssy.crm.chance.service.impl;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.amssy.common.dao.PagingObject;
import com.amssy.common.service.impl.BaseManager;
import com.amssy.crm.chance.dao.ChanceBelongDAO;
import com.amssy.crm.chance.dao.ChanceDAO;
import com.amssy.crm.chance.dao.ChanceRecordDAO;
import com.amssy.crm.chance.dao.ChanceStatusDAO;
import com.amssy.crm.chance.model.ChanceBelongDTO;
import com.amssy.crm.chance.model.ChanceDTO;
import com.amssy.crm.chance.model.ChanceRecordDTO;
import com.amssy.crm.chance.model.ChanceStatusDTO;
import com.amssy.crm.chance.model.PrepChanceDTO;
import com.amssy.crm.chance.service.ChanceCalculateService;
import com.amssy.crm.chance.service.ChanceService;
import com.amssy.crm.chance.service.PrepChanceService;
import com.amssy.crm.customer.model.CustomerBelongDTO;
import com.amssy.crm.customer.model.CustomerRecordDTO;
import com.amssy.crm.customer.model.CustomerStatusDTO;
import com.amssy.crm.customer.service.CustomerService;
import com.amssy.crm.org.service.OrganizationService;
import com.amssy.crm.plan.model.PlanDTO;
import com.amssy.crm.plan.model.PlanRecordDTO;
import com.amssy.crm.plan.model.PlanStatusDTO;
import com.amssy.crm.plan.service.PlanService;
import com.amssy.crm.record.model.RecordDTO;
import com.amssy.crm.system.model.BaseInfoDTO;
import com.amssy.crm.system.service.BaseInfoService;
import com.amssy.crm.system.util.BaseInfoUtil;
import com.amssy.crm.tryout.model.TryoutAndProductDTO;
import com.amssy.crm.tryout.model.TryoutDTO;
import com.amssy.crm.tryout.service.TryoutService;
import com.amssy.extra.hr.model.EmployeeDTO;
/**
* Chance Service business interface
*
* @spring.bean id="chanceService"
* @spring.property name="chanceDAO" ref="chanceDAO"
* @spring.property name="chanceRecordDAO" ref="chanceRecordDAO"
* @spring.property name="chanceStatusDAO" ref="chanceStatusDAO"
* @spring.property name="chanceBelongDAO" ref="chanceBelongDAO"
* @spring.property name="prepChanceService" ref="prepChanceService"
* @spring.property name="chanceCalculateService" ref="chanceCalculateService"
* @spring.property name="customerService" ref="customerService"
* @spring.property name="tryoutService" ref="tryoutService"
* @spring.property name="planService" ref="planService"
* @spring.property name="organizationService" ref="organizationService"
* @spring.property name="baseInfoService" ref="baseInfoService"
* @author Conan
* @date 2008-8-26
*/
public class ChanceServiceImpl extends BaseManager implements ChanceService {
private ChanceDAO chanceDAO;
private ChanceRecordDAO chanceRecordDAO;
private ChanceStatusDAO chanceStatusDAO;
private ChanceBelongDAO chanceBelongDAO;
private PrepChanceService prepChanceService;
private ChanceCalculateService chanceCalculateService;
private CustomerService customerService;
private TryoutService tryoutService;
private PlanService planService;
private OrganizationService organizationService;
private BaseInfoService baseInfoService;
public ChanceDTO getChanceById(Long chanceId) throws Exception {
return chanceDAO.getChanceById(chanceId);
}
public ChanceStatusDTO getChanceStatusById(Long chanceId) throws Exception {
return chanceStatusDAO.getChanceStatusById(chanceId);
}
/**
* map:cmrId
*/
public List getChanceIdByCmrId(Map map) throws Exception{
return chanceDAO.getAllChanceList(map);
}
public int createChanceZero(Long cmrId,String ani,Integer stordId) throws Exception{
ChanceDTO chance = new ChanceDTO();
chance.setAni(ani);
chance.setCmrId(cmrId);
chance.setChaOri(BaseInfoUtil.CHAORI_CHAZERO);
chance.setChaOriType(BaseInfoUtil.CHAORITYPE_DATAMINING.getId());
chance.setChaPha(BaseInfoUtil.CHAPHA_CHACLT);
chance.setChaType(BaseInfoUtil.CHATYPE_CHAZERO);
chance.setChaReqType(new BaseInfoDTO(new Integer(101)));
chance.setChaPurp(new BaseInfoDTO(new Integer(111)));
chance.setPdtNum("0000");
chance.setChaPriPdtName("No product");
ChanceRecordDTO chaRecord = new ChanceRecordDTO();
chaRecord.setChance(chance);
chaRecord.setChaPha(BaseInfoUtil.CHAPHA_CHACLT);
chaRecord.setChaRecDesc("Zero Chance");
chaRecord.setChaUpdOnrId(new Long(-5000));//system self
chaRecord.setChaStat(BaseInfoUtil.CHASTAT_CHACREATE);
chaRecord.setRecOpType(BaseInfoUtil.CHAOPTYPE_CHACREATE);
ChanceStatusDTO chaStatus = new ChanceStatusDTO();
chaStatus.setChance(chance);
chaStatus.setChaStat(BaseInfoUtil.CHASTAT_CHACREATE);
chaStatus.setStoreId(stordId);
return createChance(chance,chaRecord,chaStatus);
}
/**
* Createa a chance
*/
public int createChance(ChanceDTO chance, ChanceRecordDTO chaRecord, ChanceStatusDTO chaStatus) throws Exception {
int tmp = 0;
try {
/*
* insert chance, chanceStatus, chanceRecord
*/
chance.setChaStat(BaseInfoUtil.CHASTAT_CHACREATE.getId());
chaStatus.setChaStat(BaseInfoUtil.CHASTAT_CHACREATE);
chaRecord.setRecOpType(BaseInfoUtil.CHAOPTYPE_CHACREATE);
chance.setChaSucPbt(new Float(chanceCalculateService.calculateSuccessProbability(chance, ChanceCalculateService.CHASUCPBT_CREATE)));
chance.setChaPotlVal(new Double(chanceCalculateService.calculatePotentialValue(chance)));
chance.setChaPrt(new Float(chanceCalculateService.calculatePriority(chance)));
ChanceDTO cha = chanceDAO.insertChance(chance);
chaRecord.setChance(cha);
chaRecord.setChaStat(BaseInfoUtil.CHASTAT_CHACREATE);
chanceRecordDAO.insertChanceRecord(chaRecord);
chaStatus.setChance(cha);
int chaStat = chanceStatusDAO.insertChanceStatus(chaStatus);
if (chaStat != 0) {
tmp = 1;
}
} catch (Exception ex) {
log.error(ex.getMessage());
throw ex;
}
return tmp;
}
public int createChanceWithTryoutAndPlan(ChanceDTO chance, ChanceRecordDTO chaRecord, ChanceStatusDTO chaStatus, Map tytMap, List planList) throws Exception {
int tmp = 0;
try {
/*
* insert chance, chanceStatus, chanceRecord
*/
chance.setChaStat(BaseInfoUtil.CHASTAT_CHACREATE.getId());
chaStatus.setChaStat(BaseInfoUtil.CHASTAT_CHACREATE);
chaRecord.setRecOpType(BaseInfoUtil.CHAOPTYPE_CHACREATE);
chance.setChaSucPbt(new Float(chanceCalculateService.calculateSuccessProbability(chance, ChanceCalculateService.CHASUCPBT_CREATE)));
chance.setChaPotlVal(new Double(chanceCalculateService.calculatePotentialValue(chance)));
chance.setChaPrt(new Float(chanceCalculateService.calculatePriority(chance)));
ChanceDTO cha = chanceDAO.insertChance(chance);
chaRecord.setChance(cha);
chaRecord.setChaStat(BaseInfoUtil.CHASTAT_CHACREATE);
chanceRecordDAO.insertChanceRecord(chaRecord);
chaStatus.setChance(cha);
int chaStat = chanceStatusDAO.insertChanceStatus(chaStatus);
if (chaStat != 0) {
if(tytMap!=null){
TryoutDTO tytDto = (TryoutDTO) tytMap.get("TryoutDTO");
tytDto.setRefId(cha.getId());
tytDto.setStoreId(chaStatus.getStoreId());
TryoutAndProductDTO[] tytPro = (TryoutAndProductDTO[]) tytMap.get("TryoutAndProductDTOs");
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
主要内容: 1,完完整整的CRM系统代码,含页面和数据库脚本; 2,功能模块包括:广告,机会,客户,订单,投诉,会员卡,计划,组织,试用装,呼叫及通话记录,使用记录,问卷调查,系统,缓存等等。 3,含调用API,代码模板,代码检测等等。 4,提供系统集成和人事对接等扩展接口模块。 5,技术栈:ExtJS+Servlet+Spring+Ibatis以及oscache、log4j等。 6,可供修改后商用,也可作为学习参考,也可作为毕业设计。
资源推荐
资源详情
资源评论
收起资源包目录
一份CRM客户关系管理系统的Java源代码 (1677个子文件)
sqlList.bat 2KB
run.bat 252B
getfile.bat 110B
ChanceServiceImpl.class 22KB
CustomerServiceImpl.class 21KB
TryoutServiceImpl.class 13KB
CustomerServiceImplTest.class 12KB
OrganizationServiceImpl.class 12KB
CustomerDetailInfoDTO.class 11KB
PlanServiceImpl.class 10KB
AddressServiceImpl.class 10KB
ProductDAOIbatis.class 9KB
MemberCardDAOIbatisTest.class 9KB
MemberCardServiceImplTest.class 9KB
ProductServiceImpl.class 9KB
ChanceServiceImplTest.class 9KB
AdvChanceServiceImpl.class 8KB
TalkHistServiceImpl.class 8KB
OrdersDTO.class 8KB
OrganizationServiceImplTest.class 8KB
MemberCardDAOIbatis.class 7KB
BuildHRTreeServiceImplTest.class 7KB
MemberCardServiceImpl.class 7KB
TraverseHRTreeServiceImplTest.class 6KB
PrepChanceServiceImpl.class 6KB
TryoutAndProductDAOIbatis.class 6KB
ComplainServiceImpl.class 6KB
ChanceDAOIbatisTest.class 6KB
ComplainServiceImplTest.class 6KB
AddressDAOIbatis.class 5KB
CustomerAdvanceSearchDAOIbatis.class 5KB
PlanStatusDAOIbatisTest.class 5KB
ChanceStatusDAOIbatisTest.class 5KB
AdvChanceServiceTest.class 5KB
ChanceDTO.class 5KB
TestBonusInvoke.class 5KB
BaseInfoDAOIbatis.class 5KB
BaseTypeDAOIbatis.class 5KB
PlanRecordDAOIbatis.class 5KB
XsurveyServiceImpl.class 5KB
ChanceBelongDAOIbatisTest.class 5KB
ChanceDAOIbatis.class 5KB
AdProductServiceImpl.class 5KB
TraverseHRTreeServiceImpl.class 5KB
ChanceOriginServiceImplTest.class 5KB
AddressDTO.class 5KB
ComplainDAOIbatisTest.class 4KB
TryoutDAOIbatis.class 4KB
ChanceOriginDAOIbatisTest.class 4KB
PlanStatusDAOIbatis.class 4KB
ChanceCalculateServiceImpl.class 4KB
PrepChanceServiceImplTest.class 4KB
PlanRecordDAOIbatisTest.class 4KB
CustomerAssignmentDTO.class 4KB
ComplainRecordDAOIbatisTest.class 4KB
MemberCardDTO.class 4KB
TryoutAndProductServiceServiceImpl.class 4KB
ChanceRecordDAOIbatis.class 4KB
ComplainDAOIbatis.class 4KB
ChanceRecordDAOTest.class 4KB
ChanceOriginDAOIbatis.class 4KB
TryoutDTO.class 4KB
AdProductDAOIbatis.class 4KB
AddrBookServiceImpl.class 4KB
ProductServiceImplTest.class 4KB
CacheAccessor.class 4KB
CustomerAdvanceSearchDAOIbatisTest.class 4KB
ProductDAOIbatisTest.class 4KB
CacheHRTreeServiceImpl.class 4KB
PrepChanceDAOIbatis.class 4KB
ChanceBelongDAOIbatis.class 4KB
ComplainRecordDAOIbatis.class 4KB
ComplainBelongDAOIbatis.class 4KB
BizCacheServiceImpl.class 4KB
XsurveyDAOIbatis.class 4KB
ComplainBelongDAOIbatisTest.class 4KB
BaseInfoServiceImpl.class 4KB
XsurveyDAOIbatisTest.class 4KB
CallHistDTO.class 4KB
PlanDTO.class 4KB
EmployeeDTO.class 4KB
PlanDAOIbatis.class 4KB
HRMainRun.class 4KB
TryoutDAOIbatisTest.class 4KB
RecordDAOIbatis.class 4KB
TalkHistDAOIbatisTest.class 4KB
AddressDAOIbatisTest.class 4KB
TryoutServiceImplTest.class 3KB
UserRegDTO.class 3KB
ChanceStatusDAOIbatis.class 3KB
PlanServiceImplTest.class 3KB
ChanceOriginServiceImpl.class 3KB
PlanDAOIbatisTest.class 3KB
CustomerSimpleSearchDAOIbatisTest.class 3KB
AddressServiceImplTest.class 3KB
TranferDTOServiceImpl.class 3KB
ChanceCalculateServiceImplTest.class 3KB
ComplainDTO.class 3KB
CustomerAssignmentSearchDAOIbatisTest.class 3KB
CustomerRetrieveSearchDAOIbatisTest.class 3KB
共 1677 条
- 1
- 2
- 3
- 4
- 5
- 6
- 17
资源评论
小小哭包
- 粉丝: 2089
- 资源: 4286
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 信息安全与加密技术基础教程
- 五相电机svpwm控制Matlab仿真
- 模块化多电平流器MMC-HVDC,PSCAD仿真 21电平,内附说明文档 需要PSCAD安装包的可以提供4.6.2版本,含安装教程
- 项目源码管理与协作基础教程
- 光伏+电池协调控制,平滑输出的相关simulink MATLAB仿真模型 光伏+电池并网控制等仿真模型 光伏给电池优化的充电控制器建模 三种工作模式: 1.光伏给电池充电给负载供电 2.负载增大
- comso多层膜石墨烯传感
- 微信小程序开发入门基础教程
- comsol岩石压裂损失模型,附带视频和原模型
- 三相电压源逆变器模型预测电流控制 滑膜扰动观测器 电流环无模型滑模控制smo
- 光伏储能并网VSG同步机一次调频matlab simulink,可分析不同惯量J,不同阻尼D对系统频率的影响 光伏直流侧并入电池储能,通过逆变器连接交流电网,逆变器采用VSG同步机控制〔也可替成风光
- MATLAB仿真 基于IEEE33潮流计算的加入风光储能主动配电网优化 采用IEEE33节点配电网进行仿真,搭建了含风光,储能,柴油发电机和燃气轮机的配电网经济调度模型,程序内带有风电、光伏和储能的潮
- 基于yolov5的钢板表面缺陷检测(包含源码和数据集以及训练好的权重文件) 夹杂、划痕、压入氧化皮、裂纹、麻点、斑块6种缺陷
- 五电平无刷直流电机BLDC矢量控制仿真模型,给定转速1000r min,运行良好; 三电平,两电平均可做,可调参数; matlab simulink模型
- 电力系统励磁涌流有关的问题分析 可以通过MATLAB中m文件便编写产生励磁涌流,也可以通过simulink仿真出励磁涌流 可以仿真分析影响励磁涌流的因素,以及抑制励磁涌流的措施 可以研究识别励磁
- MCGS仿真画圆程序,通过输入圆的半径即可仿真模拟画出圆的轨迹 可画多个圆 并显示当前X轴和Y轴实时位置和圆的角度,可随时清除重新画
- 高仿正浩创新图腾柱PFC抖频技术,逃逸检测窗,实际应用确实大幅度提高EMC通过率
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功