|
|
@@ -144,7 +144,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<CustomerMapper> implemen
|
|
|
if(s.equals("3")) _companyIntention += "软件著作权 ";
|
|
|
if(s.equals("4")) _companyIntention += "知识产权贯标 ";
|
|
|
if(s.equals("5")) _companyIntention += "高企认定 ";
|
|
|
- if(s.equals("0")) _companyIntention += "技术成果 ";
|
|
|
+ if(s.equals("6")) _companyIntention += "技术成果 ";
|
|
|
}
|
|
|
_companyIntention = _companyIntention.substring(0, _companyIntention.length()-6);
|
|
|
}
|
|
|
@@ -176,15 +176,21 @@ public class CustomerServiceImpl extends BaseMybatisDao<CustomerMapper> implemen
|
|
|
log.setOperatorTime(new Date());
|
|
|
log.setOperatorName(TokenManager.getAdminToken().getName());
|
|
|
if(operatorType.equals(AFTConstants.CUSTOMER_CREATE)){//创建用户
|
|
|
- //暂时注释为了测试
|
|
|
- /*log.setAfterAdminName(adminMapper.selectByPrimaryKey(cus.getAid()).getName());*/ //接单人
|
|
|
log.setAfterFollowSituation(CustomerFollowFiled.getField(Integer.parseInt(cus.getFollowSituation())).getDesc()); //跟进状态
|
|
|
log.setAfterCustomerIntention(getCompanyIntention(cus.getCompanyIntention())); //跟进意向
|
|
|
log.setAfterCustomerStatus(CustomerStatusFiled.getField(Integer.parseInt(cus.getCustomerStatus())).getDesc()); //客户状态
|
|
|
log.setAfterAdminName(adminMapper.selectByPrimaryKey(TokenManager.getUserId()).getName());
|
|
|
log.setOperatorType(AFTConstants.CUSTOMER_CREATE);
|
|
|
}else if(operatorType.equals(AFTConstants.CUSTOMER_MODIFY)){ //修改用户
|
|
|
-
|
|
|
+ log.setBeforeAdminName(cus.getAdminName());//修改前操作人
|
|
|
+ log.setBeforeCustomerIntention(getCompanyIntention(cus.getBeforeCompanyIntention())); //修改前跟进意向
|
|
|
+ log.setBeforeCustomerStatus(CustomerStatusFiled.getField(Integer.parseInt(cus.getBeforeCustomerStatus())).getDesc()); //修改前跟进状态
|
|
|
+ log.setBeforeFollowSituation(CustomerFollowFiled.getField(Integer.parseInt(cus.getBeforeFollowSituation())).getDesc());//修改前跟进进度
|
|
|
+ log.setAfterFollowSituation(CustomerFollowFiled.getField(Integer.parseInt(cus.getFollowSituation())).getDesc()); //修改后跟进状态
|
|
|
+ log.setAfterCustomerIntention(getCompanyIntention(cus.getCompanyIntention())); //修改后跟进意向
|
|
|
+ log.setAfterCustomerStatus(CustomerStatusFiled.getField(Integer.parseInt(cus.getCustomerStatus())).getDesc()); //修改后客户状态
|
|
|
+ log.setAfterAdminName(adminMapper.selectByPrimaryKey(TokenManager.getUserId()).getName());
|
|
|
+ log.setOperatorType(AFTConstants.CUSTOMER_MODIFY);
|
|
|
}else if(operatorType.equals(AFTConstants.CUSTOMER_DELETE)){ //删除用户
|
|
|
log.setBeforeAdminName(cus.getAdminName());
|
|
|
log.setBeforeCustomerIntention(getCompanyIntention(cus.getBeforeCompanyIntention())); //跟进意向
|
|
|
@@ -192,22 +198,40 @@ public class CustomerServiceImpl extends BaseMybatisDao<CustomerMapper> implemen
|
|
|
log.setBeforeFollowSituation(CustomerFollowFiled.getField(Integer.parseInt(cus.getBeforeFollowSituation())).getDesc());//跟进进度
|
|
|
log.setOperatorType(AFTConstants.CUSTOMER_DELETE);
|
|
|
}else if(operatorType.equals(AFTConstants.CUSTOMER_TRANSFER)){ //转交客户
|
|
|
-
|
|
|
+ log.setBeforeAdminName(cus.getBeforeadminName());//转交前的人
|
|
|
+ log.setAfterAdminName(cus.getAdminName());//转交后的人
|
|
|
+ log.setBeforeCustomerIntention(getCompanyIntention(cus.getBeforeCompanyIntention())); //修改前跟进意向
|
|
|
+ log.setBeforeCustomerStatus(CustomerStatusFiled.getField(Integer.parseInt(cus.getBeforeCustomerStatus())).getDesc()); //修改前跟进状态
|
|
|
+ log.setBeforeFollowSituation(CustomerFollowFiled.getField(Integer.parseInt(cus.getBeforeFollowSituation())).getDesc());//修改前跟进进度
|
|
|
+ log.setAfterCustomerIntention(getCompanyIntention(cus.getBeforeCompanyIntention())); //修改前跟进意向
|
|
|
+ log.setAfterCustomerStatus(CustomerStatusFiled.getField(Integer.parseInt(cus.getBeforeCustomerStatus())).getDesc()); //修改前跟进状态
|
|
|
+ log.setAfterFollowSituation(CustomerFollowFiled.getField(Integer.parseInt(cus.getBeforeFollowSituation())).getDesc());//修改前跟进进度
|
|
|
+ log.setOperatorType(AFTConstants.CUSTOMER_TRANSFER);
|
|
|
}
|
|
|
CustomerLogMapper.insert(log);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 查询客户详情
|
|
|
+ * @param intentions
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@Override
|
|
|
public CustomerOut findCustomerDetails(String id) {
|
|
|
CustomerOut co = customerMapper.selectCustomerById(id);
|
|
|
if(null !=co) setFiled(co);
|
|
|
return co;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改客户信息
|
|
|
+ * @param intentions
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@Override
|
|
|
- public int updCustomer(Customer c) {
|
|
|
- return customerMapper.updateByPrimaryKey(c);
|
|
|
+ public int setCustomer(Customer c) {
|
|
|
+ return customerMapper.updCustomerByPrimaryKey(c);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
|
|
|
}
|