Commit b65d828c by HTML5-侯张振

更改到访状态不改变bug

parent 6161cb52
......@@ -488,6 +488,7 @@ class Report extends CI_Controller
if($customerId){
foreach ($customerId as $value) {
$results = $api->newgetCustomerVisit(array('customer_id'=>$value['rongchuang_id']));
$value['id'] = $this->customer->get_customer_id($value['rongchuang_id']);
if(!empty($results)){
$entity_id = $this->customer_building->get_building_id($value['id']);
......@@ -557,7 +558,7 @@ class Report extends CI_Controller
if($customerId){
foreach ($customerId as $value) {
$results = $api->newgetCustomerPurchase(array('customer_id'=>$value['rongchuang_id']));
$value['id'] = $this->customer->get_customer_id($value['rongchuang_id']);
if(!empty($results)){
$entity_id = $this->customer_building->get_building_id($value['id']);
//记录客户跟进信息
......@@ -625,6 +626,7 @@ class Report extends CI_Controller
if($customerId){
foreach ($customerId as $value) {
$results = $api->newgetCustomerSign(array('customer_id'=>$value['rongchuang_id']));
$value['id'] = $this->customer->get_customer_id($value['rongchuang_id']);
if(!empty($results)){
$entity_id = $this->customer_building->get_building_id($value['id']);
//记录客户跟进信息
......
......@@ -943,4 +943,17 @@ class Customer_model extends MY_Model{
}
return 0;
}
public function get_customer_id($rcId){
$this->db->select('C.id');
$this->db->from('tb_customer C');
$this->db->where('C.rongchuang_id',$rcId);
$query = $this->db->get();
if($query->num_rows() > 0)
{
$return = $query->result_array();
return $return;
}
return 0;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment