Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sunac-quanmin
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
HTML5-李恒逸
sunac-quanmin
Commits
cd56aa5a
Commit
cd56aa5a
authored
Jul 05, 2017
by
HTML5-侯张振
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
屏蔽接口
parent
63fc0d24
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
258 additions
and
258 deletions
+258
-258
report.php
html/application/controllers/admin/report.php
+258
-258
No files found.
html/application/controllers/admin/report.php
View file @
cd56aa5a
...
@@ -473,15 +473,15 @@ class Report extends CI_Controller
...
@@ -473,15 +473,15 @@ class Report extends CI_Controller
$time
=
date
(
"Y-m-d"
,
$t
);
$time
=
date
(
"Y-m-d"
,
$t
);
//分配给销售
//分配给销售
if
(
$post
[
'userType'
]
==
'sale'
)
{
//
if ($post['userType'] == 'sale') {
$newcustomerId
=
$api
->
newimportCustomer
(
$newcustomerInfo
[
'customer_user'
],
$newcustomerInfo
[
'customer_mobile'
],
$newcustomerInfo
[
'buildingId'
],
$newcustomerInfo
[
'building_title'
],
$newcustomerInfo
[
'rongchuang_id'
],
$newcustomerInfo
[
'user_mobile'
],
$time
);
//
$newcustomerId = $api->newimportCustomer($newcustomerInfo['customer_user'], $newcustomerInfo['customer_mobile'], $newcustomerInfo['buildingId'], $newcustomerInfo['building_title'],$newcustomerInfo['rongchuang_id'],$newcustomerInfo['user_mobile'],$time);
//分配给销售经理
//
//分配给销售经理
}
else
if
(
$post
[
'userType'
]
==
'manager'
){
//
} else if ($post['userType'] == 'manager'){
$newcustomerId
=
$api
->
importCustomer
(
$newcustomerInfo
[
'customer_user'
],
$newcustomerInfo
[
'customer_mobile'
],
$newcustomerInfo
[
'buildingId'
],
$newcustomerInfo
[
'building_title'
]);
//
$newcustomerId = $api->importCustomer($newcustomerInfo['customer_user'], $newcustomerInfo['customer_mobile'], $newcustomerInfo['buildingId'], $newcustomerInfo['building_title']);
}
//
}
$newcustomer
=
array
(
//
$newcustomer = array(
'rongchuang_id'
=>
$newcustomerId
//
'rongchuang_id' => $newcustomerId
);
//
);
if
(
$newcustomerId
){
if
(
$newcustomerId
){
$this
->
customer
->
add_rongchuang_id
(
$newcustomerInfo
[
'customerId'
],
$newcustomer
);
$this
->
customer
->
add_rongchuang_id
(
$newcustomerInfo
[
'customerId'
],
$newcustomer
);
...
@@ -504,255 +504,255 @@ class Report extends CI_Controller
...
@@ -504,255 +504,255 @@ class Report extends CI_Controller
echo
json_encode
(
$result
);
exit
;
echo
json_encode
(
$result
);
exit
;
}
}
//正式
//正式
//记录客户到访在后台自执行
//
//记录客户到访在后台自执行
public
function
dnCustomerVisit
(){
//
public function dnCustomerVisit(){
$this
->
load
->
model
(
'customer_model'
,
'customer'
);
//
$this->load->model('customer_model','customer');
$this
->
load
->
model
(
'customer_building_model'
,
'customer_building'
);
//
$this->load->model('customer_building_model', 'customer_building');
$this
->
load
->
model
(
'recommend_trace_model'
,
'recommend'
);
//
$this->load->model('recommend_trace_model', 'recommend');
$this
->
load
->
model
(
'customer_building_log_model'
,
'customer_building_log'
);
//
$this->load->model('customer_building_log_model','customer_building_log');
$this
->
load
->
model
(
'sales_model'
,
'sales'
);
//
$this->load->model('sales_model','sales');
$this
->
load
->
model
(
'customer_sales_model'
,
'customer_sales'
);
//
$this->load->model('customer_sales_model','customer_sales');
$this
->
load
->
helper
(
'eas'
);
//
$this->load->helper('eas');
$api
=
new
easApi
;
//
$api=new easApi;
$customerId
=
$this
->
customer
->
search_rongchuang_id
();
//
$customerId = $this->customer->search_rongchuang_id();
if
(
$customerId
){
//
if($customerId){
foreach
(
$customerId
as
$value
)
{
//
foreach ($customerId as $value) {
//获取接口返回值
//
//获取接口返回值
$results
=
$api
->
newgetCustomerVisit
(
array
(
'customer_id'
=>
$value
[
'rongchuang_id'
]));
//
$results = $api->newgetCustomerVisit(array('customer_id'=>$value['rongchuang_id']));
if
(
!
empty
(
$results
)){
//
if(!empty($results)){
$entity_id
=
$this
->
customer_building
->
get_building_id
(
$value
[
'id'
]);
//
$entity_id = $this->customer_building->get_building_id($value['id']);
//
$customerBuilding
=
$this
->
customer_building
->
get
(
array
(
'id'
=>
$entity_id
[
'id'
]));
//
$customerBuilding = $this->customer_building->get(array('id' => $entity_id['id']));
//获取返回的sale_id
//
//获取返回的sale_id
$checksalesnum
=
array
();
//
$checksalesnum=array();
$checksales
=
$results
[
0
][
"saleManColl"
];
//
$checksales=$results[0]["saleManColl"];
foreach
(
$checksales
as
$checksale
){
//
foreach($checksales as $checksale){
$checksalesID
=
$this
->
sales
->
get
(
array
(
'rongchuang_user_id'
=>
$checksale
[
"id"
]));
//
$checksalesID=$this->sales->get(array('rongchuang_user_id'=> $checksale["id"]));
$checksalesnum
[]
=
array
(
'sale_id'
=>
$checksalesID
[
'user_id'
]);
//
$checksalesnum[]=array('sale_id'=>$checksalesID['user_id']);
};
//
};
$customer_sales_id
=
$this
->
customer_building
->
get_sale_id
(
array
(
'customer_building_id'
=>
$customerBuilding
[
'id'
]));
//
$customer_sales_id = $this->customer_building->get_sale_id(array('customer_building_id'=>$customerBuilding['id']));
if
(
!
(
$customer_sales_id
==
$checksalesnum
)){
//
if(!($customer_sales_id==$checksalesnum)){
$this
->
customer_sales
->
delete_sale_id
(
array
(
'customer_building_id'
=>
$customerBuilding
[
'id'
]));
//
$this->customer_sales->delete_sale_id(array('customer_building_id'=>$customerBuilding['id']));
foreach
(
$checksalesnum
as
$checksales
){
//
foreach($checksalesnum as $checksales){
//
$customersales
[
'customer_building_id'
]
=
$customerBuilding
[
'id'
];
//
$customersales['customer_building_id'] = $customerBuilding['id'];
$customersales
[
'sale_id'
]
=
$checksales
[
'sale_id'
];
//
$customersales['sale_id'] = $checksales['sale_id'];
$customersales
[
'create_time'
]
=
time
();
//
$customersales['create_time'] = time();
$this
->
customer_sales
->
add_sale_id
(
$customersales
);
//
$this->customer_sales->add_sale_id($customersales);
}
//
}
$datasales
[
'user_id'
]
=
$customerBuilding
[
'user_id'
];
//
$datasales['user_id'] = $customerBuilding['user_id'];
$datasales
[
'customer_id'
]
=
$customerBuilding
[
'customer_id'
];
//
$datasales['customer_id'] = $customerBuilding['customer_id'];
$datasales
[
'building_id'
]
=
$customerBuilding
[
'building_id'
];
//
$datasales['building_id'] = $customerBuilding['building_id'];
$datasales
[
'distributor_id'
]
=
$customerBuilding
[
'distributor_id'
];
//
$datasales['distributor_id'] = $customerBuilding['distributor_id'];
$datasales
[
'building_title'
]
=
$customerBuilding
[
'building_title'
];
//
$datasales['building_title'] = $customerBuilding['building_title'];
$datasales
[
'sale_id'
]
=
$customerBuilding
[
'sale_id'
];
//
$datasales['sale_id'] = $customerBuilding['sale_id'];
$datasales
[
'manager_id'
]
=
$customerBuilding
[
'manager_id'
];
//
$datasales['manager_id'] = $customerBuilding['manager_id'];
$datasales
[
'distribution_status'
]
=
$customerBuilding
[
'distribution_status'
];
//
$datasales['distribution_status'] = $customerBuilding['distribution_status'];
$datasales
[
'recommend_status'
]
=
$customerBuilding
[
'recommend_status'
];
//
$datasales['recommend_status'] = $customerBuilding['recommend_status'];
$datasales
[
'is_deleted'
]
=
$customerBuilding
[
'is_deleted'
];
//
$datasales['is_deleted'] = $customerBuilding['is_deleted'];
$datasales
[
'create_time'
]
=
$customerBuilding
[
'create_time'
];
//
$datasales['create_time'] = $customerBuilding['create_time'];
$datasales
[
'action_time'
]
=
time
();
//
$datasales['action_time'] = time();
if
(
$customerBuilding
[
'sale_id'
]
==
0
){
//
if($customerBuilding['sale_id']==0){
$datasales
[
'remark'
]
=
'分配'
;
//
$datasales['remark'] = '分配';
}
else
{
//
}else{
$datasales
[
'remark'
]
=
'重新分配'
;
//
$datasales['remark'] = '重新分配';
}
//
}
$this
->
customer_building_log
->
add
(
$datasales
);
//
$this->customer_building_log->add($datasales);
}
//
}
if
(
$customerBuilding
[
'recommend_status'
]
<
2
){
//
if($customerBuilding['recommend_status'] < 2){
$this
->
customer_building
->
update_customer_building
(
$value
[
'id'
],
array
(
'recommend_status'
=>
2
));
//
$this->customer_building->update_customer_building($value['id'],array('recommend_status' => 2));
$customerBuilding
[
'recommend_status'
]
=
2
;
//
$customerBuilding['recommend_status']=2;
}
//
}
//记录客户跟进信息
//
//记录客户跟进信息
if
(
$customerBuilding
)
{
//
if ($customerBuilding) {
$dataLog
[
'user_id'
]
=
$customerBuilding
[
'user_id'
];
//
$dataLog['user_id'] = $customerBuilding['user_id'];
$dataLog
[
'customer_id'
]
=
$customerBuilding
[
'customer_id'
];
//
$dataLog['customer_id'] = $customerBuilding['customer_id'];
$dataLog
[
'building_id'
]
=
$customerBuilding
[
'building_id'
];
//
$dataLog['building_id'] = $customerBuilding['building_id'];
$dataLog
[
'distributor_id'
]
=
$customerBuilding
[
'distributor_id'
];
//
$dataLog['distributor_id'] = $customerBuilding['distributor_id'];
$dataLog
[
'building_title'
]
=
$customerBuilding
[
'building_title'
];
//
$dataLog['building_title'] = $customerBuilding['building_title'];
$dataLog
[
'sale_id'
]
=
$customerBuilding
[
'sale_id'
];
//
$dataLog['sale_id'] = $customerBuilding['sale_id'];
$dataLog
[
'manager_id'
]
=
$customerBuilding
[
'manager_id'
];
//
$dataLog['manager_id'] = $customerBuilding['manager_id'];
$dataLog
[
'distribution_status'
]
=
$customerBuilding
[
'distribution_status'
];
//
$dataLog['distribution_status'] = $customerBuilding['distribution_status'];
$dataLog
[
'recommend_status'
]
=
$customerBuilding
[
'recommend_status'
];
//
$dataLog['recommend_status'] = $customerBuilding['recommend_status'];
$dataLog
[
'is_deleted'
]
=
$customerBuilding
[
'is_deleted'
];
//
$dataLog['is_deleted'] = $customerBuilding['is_deleted'];
$dataLog
[
'create_time'
]
=
$customerBuilding
[
'create_time'
];
//
$dataLog['create_time'] = $customerBuilding['create_time'];
$dataLog
[
'action_time'
]
=
time
();
//
$dataLog['action_time'] = time();
$dataLog
[
'remark'
]
=
'客户到访'
;
//
$dataLog['remark'] = '客户到访';
//
}
//
}
$parme
=
array
(
//
$parme = array(
'entity_type'
=>
'1'
,
//
'entity_type' => '1',
'entity_id'
=>
$entity_id
[
'id'
],
//
'entity_id' => $entity_id['id'],
'trace_status'
=>
'2'
,
//
'trace_status' => '2',
'create_time'
=>
time
()
//
'create_time' => time()
);
//
);
//防止重复记录log
//
//防止重复记录log
$log_screening
=
array
(
//
$log_screening = array(
'customer_id'
=>
$customerBuilding
[
'customer_id'
],
//
'customer_id' => $customerBuilding['customer_id'],
'recommend_status'
=>
'2'
//
'recommend_status' => '2'
);
//
);
//
$logfahui
=
$this
->
customer_building_log
->
screening_recommend_status
(
$log_screening
);
//
$logfahui = $this->customer_building_log->screening_recommend_status($log_screening);
//
if
(
empty
(
$logfahui
)){
//
if(empty($logfahui)){
$this
->
customer_building_log
->
add
(
$dataLog
);
//
$this->customer_building_log->add($dataLog);
}
//
}
////防止重复报备recommend_trace
//
////防止重复报备recommend_trace
$screening
=
array
(
//
$screening = array(
'entity_id'
=>
$entity_id
[
'id'
],
//
'entity_id' => $entity_id['id'],
'trace_status'
=>
'2'
//
'trace_status' => '2'
);
//
);
//
$screeningfahui
=
$this
->
recommend
->
screening_recommend_status
(
$screening
);
//
$screeningfahui = $this->recommend->screening_recommend_status($screening);
//
if
(
empty
(
$screeningfahui
)){
//
if(empty($screeningfahui)){
$this
->
recommend
->
add_recommend_trace
(
$parme
);
//
$this->recommend->add_recommend_trace($parme);
}
//
}
}
//
}
};
//
};
//
}
//
}
}
//
}
//记录客户认购在后台自执行
//
//记录客户认购在后台自执行
public
function
dnPurchase
(){
//
public function dnPurchase(){
$this
->
load
->
model
(
'customer_model'
,
'customer'
);
//
$this->load->model('customer_model','customer');
$this
->
load
->
model
(
'customer_building_model'
,
'customer_building'
);
//
$this->load->model('customer_building_model', 'customer_building');
$this
->
load
->
model
(
'recommend_trace_model'
,
'recommend'
);
//
$this->load->model('recommend_trace_model', 'recommend');
$this
->
load
->
model
(
'customer_building_log_model'
,
'customer_building_log'
);
//
$this->load->model('customer_building_log_model','customer_building_log');
$this
->
load
->
helper
(
'eas'
);
//
$this->load->helper('eas');
$api
=
new
easApi
;
//
$api=new easApi;
$customerId
=
$this
->
customer
->
search_rongchuang_id
();
//
$customerId = $this->customer->search_rongchuang_id();
if
(
$customerId
){
//
if($customerId){
foreach
(
$customerId
as
$value
)
{
//
foreach ($customerId as $value) {
//获取返回值
//
//获取返回值
$results
=
$api
->
newgetCustomerPurchase
(
array
(
'customer_id'
=>
$value
[
'rongchuang_id'
]));
//
$results = $api->newgetCustomerPurchase(array('customer_id'=>$value['rongchuang_id']));
//
if
(
!
empty
(
$results
)){
//
if(!empty($results)){
$entity_id
=
$this
->
customer_building
->
get_building_id
(
$value
[
'id'
]);
//
$entity_id = $this->customer_building->get_building_id($value['id']);
//记录客户跟进信息
//
//记录客户跟进信息
$customerBuilding
=
$this
->
customer_building
->
get
(
array
(
'id'
=>
$entity_id
[
'id'
]));
//
$customerBuilding = $this->customer_building->get(array('id' => $entity_id['id']));
if
(
$customerBuilding
[
'recommend_status'
]
<
3
){
//
if($customerBuilding['recommend_status'] < 3){
$this
->
customer_building
->
update_customer_building
(
$value
[
'id'
],
array
(
'recommend_status'
=>
3
));
//
$this->customer_building->update_customer_building($value['id'],array('recommend_status' => 3));
$customerBuilding
[
'recommend_status'
]
=
3
;
//
$customerBuilding['recommend_status']=3;
}
//
}
if
(
$customerBuilding
)
{
//
if ($customerBuilding) {
$dataLog
[
'user_id'
]
=
$customerBuilding
[
'user_id'
];
//
$dataLog['user_id'] = $customerBuilding['user_id'];
$dataLog
[
'customer_id'
]
=
$customerBuilding
[
'customer_id'
];
//
$dataLog['customer_id'] = $customerBuilding['customer_id'];
$dataLog
[
'building_id'
]
=
$customerBuilding
[
'building_id'
];
//
$dataLog['building_id'] = $customerBuilding['building_id'];
$dataLog
[
'distributor_id'
]
=
$customerBuilding
[
'distributor_id'
];
//
$dataLog['distributor_id'] = $customerBuilding['distributor_id'];
$dataLog
[
'building_title'
]
=
$customerBuilding
[
'building_title'
];
//
$dataLog['building_title'] = $customerBuilding['building_title'];
$dataLog
[
'sale_id'
]
=
$customerBuilding
[
'sale_id'
];
//
$dataLog['sale_id'] = $customerBuilding['sale_id'];
$dataLog
[
'manager_id'
]
=
$customerBuilding
[
'manager_id'
];
//
$dataLog['manager_id'] = $customerBuilding['manager_id'];
$dataLog
[
'distribution_status'
]
=
$customerBuilding
[
'distribution_status'
];
//
$dataLog['distribution_status'] = $customerBuilding['distribution_status'];
$dataLog
[
'recommend_status'
]
=
$customerBuilding
[
'recommend_status'
];
//
$dataLog['recommend_status'] = $customerBuilding['recommend_status'];
$dataLog
[
'is_deleted'
]
=
$customerBuilding
[
'is_deleted'
];
//
$dataLog['is_deleted'] = $customerBuilding['is_deleted'];
$dataLog
[
'create_time'
]
=
$customerBuilding
[
'create_time'
];
//
$dataLog['create_time'] = $customerBuilding['create_time'];
$dataLog
[
'action_time'
]
=
time
();
//
$dataLog['action_time'] = time();
$dataLog
[
'remark'
]
=
'客户认购'
;
//
$dataLog['remark'] = '客户认购';
//
}
//
}
$parme
=
array
(
//
$parme = array(
'entity_type'
=>
'1'
,
//
'entity_type' => '1',
'entity_id'
=>
$entity_id
[
'id'
],
//
'entity_id' => $entity_id['id'],
'trace_status'
=>
'3'
,
//
'trace_status' => '3',
'create_time'
=>
time
()
//
'create_time' => time()
);
//
);
//防止重复报备log
//
//防止重复报备log
$log_screening
=
array
(
//
$log_screening = array(
'customer_id'
=>
$customerBuilding
[
'customer_id'
],
//
'customer_id' => $customerBuilding['customer_id'],
'recommend_status'
=>
'3'
//
'recommend_status' => '3'
);
//
);
//
$logfahui
=
$this
->
customer_building_log
->
screening_recommend_status
(
$log_screening
);
//
$logfahui = $this->customer_building_log->screening_recommend_status($log_screening);
//
if
(
empty
(
$logfahui
)){
//
if(empty($logfahui)){
$this
->
customer_building_log
->
add
(
$dataLog
);
//
$this->customer_building_log->add($dataLog);
}
//
}
//防止重复报备recommend_trace
//
//防止重复报备recommend_trace
$screening
=
array
(
//
$screening = array(
'entity_id'
=>
$entity_id
[
'id'
],
//
'entity_id' => $entity_id['id'],
'trace_status'
=>
'3'
//
'trace_status' => '3'
);
//
);
//
$screeningfahui
=
$this
->
recommend
->
screening_recommend_status
(
$screening
);
//
$screeningfahui = $this->recommend->screening_recommend_status($screening);
//
if
(
empty
(
$screeningfahui
)){
//
if(empty($screeningfahui)){
$this
->
recommend
->
add_recommend_trace
(
$parme
);
//
$this->recommend->add_recommend_trace($parme);
}
//
}
}
//
}
};
//
};
}
//
}
}
//
}
//记录客户签约在后台自执行
//
//记录客户签约在后台自执行
public
function
dnSign
(){
//
public function dnSign(){
$this
->
load
->
model
(
'customer_model'
,
'customer'
);
//
$this->load->model('customer_model','customer');
$this
->
load
->
model
(
'customer_building_model'
,
'customer_building'
);
//
$this->load->model('customer_building_model', 'customer_building');
$this
->
load
->
model
(
'recommend_trace_model'
,
'recommend'
);
//
$this->load->model('recommend_trace_model', 'recommend');
$this
->
load
->
model
(
'customer_building_log_model'
,
'customer_building_log'
);
//
$this->load->model('customer_building_log_model','customer_building_log');
$this
->
load
->
helper
(
'eas'
);
//
$this->load->helper('eas');
$api
=
new
easApi
;
//
$api=new easApi;
$customerId
=
$this
->
customer
->
search_rongchuang_id
();
//
$customerId = $this->customer->search_rongchuang_id();
if
(
$customerId
){
//
if($customerId){
foreach
(
$customerId
as
$value
)
{
//
foreach ($customerId as $value) {
$results
=
$api
->
newgetCustomerSign
(
array
(
'customer_id'
=>
$value
[
'rongchuang_id'
]));
//
$results = $api->newgetCustomerSign(array('customer_id'=>$value['rongchuang_id']));
//
if
(
!
empty
(
$results
)){
//
if(!empty($results)){
$entity_id
=
$this
->
customer_building
->
get_building_id
(
$value
[
'id'
]);
//
$entity_id = $this->customer_building->get_building_id($value['id']);
//记录客户跟进信息
//
//记录客户跟进信息
$customerBuilding
=
$this
->
customer_building
->
get
(
array
(
'id'
=>
$entity_id
[
'id'
]));
//
$customerBuilding = $this->customer_building->get(array('id' => $entity_id['id']));
if
(
$customerBuilding
[
'recommend_status'
]
<
4
){
//
if($customerBuilding['recommend_status'] < 4){
$this
->
customer_building
->
update_customer_building
(
$value
[
'id'
],
array
(
'recommend_status'
=>
4
));
//
$this->customer_building->update_customer_building($value['id'],array('recommend_status' => 4));
$customerBuilding
[
'recommend_status'
]
=
4
;
//
$customerBuilding['recommend_status']=4;
}
//
}
if
(
$customerBuilding
)
{
//
if ($customerBuilding) {
$dataLog
[
'user_id'
]
=
$customerBuilding
[
'user_id'
];
//
$dataLog['user_id'] = $customerBuilding['user_id'];
$dataLog
[
'customer_id'
]
=
$customerBuilding
[
'customer_id'
];
//
$dataLog['customer_id'] = $customerBuilding['customer_id'];
$dataLog
[
'building_id'
]
=
$customerBuilding
[
'building_id'
];
//
$dataLog['building_id'] = $customerBuilding['building_id'];
$dataLog
[
'distributor_id'
]
=
$customerBuilding
[
'distributor_id'
];
//
$dataLog['distributor_id'] = $customerBuilding['distributor_id'];
$dataLog
[
'building_title'
]
=
$customerBuilding
[
'building_title'
];
//
$dataLog['building_title'] = $customerBuilding['building_title'];
$dataLog
[
'sale_id'
]
=
$customerBuilding
[
'sale_id'
];
//
$dataLog['sale_id'] = $customerBuilding['sale_id'];
$dataLog
[
'manager_id'
]
=
$customerBuilding
[
'manager_id'
];
//
$dataLog['manager_id'] = $customerBuilding['manager_id'];
$dataLog
[
'distribution_status'
]
=
$customerBuilding
[
'distribution_status'
];
//
$dataLog['distribution_status'] = $customerBuilding['distribution_status'];
$dataLog
[
'recommend_status'
]
=
$customerBuilding
[
'recommend_status'
];
//
$dataLog['recommend_status'] = $customerBuilding['recommend_status'];
$dataLog
[
'is_deleted'
]
=
$customerBuilding
[
'is_deleted'
];
//
$dataLog['is_deleted'] = $customerBuilding['is_deleted'];
$dataLog
[
'create_time'
]
=
$customerBuilding
[
'create_time'
];
//
$dataLog['create_time'] = $customerBuilding['create_time'];
$dataLog
[
'action_time'
]
=
time
();
//
$dataLog['action_time'] = time();
$dataLog
[
'remark'
]
=
'客户签约'
;
//
$dataLog['remark'] = '客户签约';
//
}
//
}
$parme
=
array
(
//
$parme = array(
'entity_type'
=>
'1'
,
//
'entity_type' => '1',
'entity_id'
=>
$entity_id
[
'id'
],
//
'entity_id' => $entity_id['id'],
'trace_status'
=>
'4'
,
//
'trace_status' => '4',
'create_time'
=>
time
()
//
'create_time' => time()
);
//
);
//
//防止重复报备log
//
//防止重复报备log
$log_screening
=
array
(
//
$log_screening = array(
'customer_id'
=>
$customerBuilding
[
'customer_id'
],
//
'customer_id' => $customerBuilding['customer_id'],
'recommend_status'
=>
'4'
//
'recommend_status' => '4'
);
//
);
//
$logfahui
=
$this
->
customer_building_log
->
screening_recommend_status
(
$log_screening
);
//
$logfahui = $this->customer_building_log->screening_recommend_status($log_screening);
//
if
(
empty
(
$logfahui
)){
//
if(empty($logfahui)){
$this
->
customer_building_log
->
add
(
$dataLog
);
//
$this->customer_building_log->add($dataLog);
}
//
}
////防止重复报备recommend_trace
//
////防止重复报备recommend_trace
$screening
=
array
(
//
$screening = array(
'entity_id'
=>
$entity_id
[
'id'
],
//
'entity_id' => $entity_id['id'],
'trace_status'
=>
'4'
//
'trace_status' => '4'
);
//
);
//
$screeningfahui
=
$this
->
recommend
->
screening_recommend_status
(
$screening
);
//
$screeningfahui = $this->recommend->screening_recommend_status($screening);
//
if
(
empty
(
$screeningfahui
)){
//
if(empty($screeningfahui)){
$this
->
recommend
->
add_recommend_trace
(
$parme
);
//
$this->recommend->add_recommend_trace($parme);
}
//
}
}
//
}
};
//
};
}
//
}
}
//
}
/**
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment