|
|
@ -29,7 +29,7 @@ class PromoteCompanyWarningController extends ThinkController
|
|
|
|
$month = I('month', '');
|
|
|
|
$month = I('month', '');
|
|
|
|
$companyId = I('company_id', 0);
|
|
|
|
$companyId = I('company_id', 0);
|
|
|
|
$isExport = I('is_export', 0);
|
|
|
|
$isExport = I('is_export', 0);
|
|
|
|
$isSignContact = I('is_sign_contact', -1);
|
|
|
|
$isSignContact = I('is_sign_contact', 0);
|
|
|
|
$where = [
|
|
|
|
$where = [
|
|
|
|
'_string' => '1=1 and b.company_id is not null',
|
|
|
|
'_string' => '1=1 and b.company_id is not null',
|
|
|
|
'c.company_belong' => ['in', [1, 2]],
|
|
|
|
'c.company_belong' => ['in', [1, 2]],
|
|
|
@ -47,9 +47,10 @@ class PromoteCompanyWarningController extends ThinkController
|
|
|
|
$monthNumber = date('Ym', strtotime($month.'-01'));
|
|
|
|
$monthNumber = date('Ym', strtotime($month.'-01'));
|
|
|
|
$where['b.month'] = $monthNumber;
|
|
|
|
$where['b.month'] = $monthNumber;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$where['c.cooperation_status'] = 1;
|
|
|
|
|
|
|
|
|
|
|
|
$joinDataTable = 'tab_company_monthly_data';
|
|
|
|
$joinDataTable = 'tab_company_monthly_data';
|
|
|
|
$columns = ['b.company_id', 'c.company_name', 'c.is_sign_contact', 'b.pay_amount'];
|
|
|
|
$columns = ['b.company_id', 'c.company_name', 'c.is_sign_contact', 'b.pay_amount', 'c.cooperation_status'];
|
|
|
|
$orderBy = 'b.company_id asc';
|
|
|
|
$orderBy = 'b.company_id asc';
|
|
|
|
if ($type == 'total') {
|
|
|
|
if ($type == 'total') {
|
|
|
|
$subSql = M('company_monthly_data', 'tab_')->field('company_id')->where(['is_warning' => 1])->select(false);
|
|
|
|
$subSql = M('company_monthly_data', 'tab_')->field('company_id')->where(['is_warning' => 1])->select(false);
|
|
|
@ -101,6 +102,7 @@ class PromoteCompanyWarningController extends ThinkController
|
|
|
|
foreach ($items as $key => $item) {
|
|
|
|
foreach ($items as $key => $item) {
|
|
|
|
$item['month'] = date('Y-m', strtotime($item['month'].'01'));
|
|
|
|
$item['month'] = date('Y-m', strtotime($item['month'].'01'));
|
|
|
|
$item['is_sign_contact_text'] = $item['is_sign_contact'] == 1 ? '是' : '否';
|
|
|
|
$item['is_sign_contact_text'] = $item['is_sign_contact'] == 1 ? '是' : '否';
|
|
|
|
|
|
|
|
$item['cooperation_status_text'] = $item['cooperation_status'] == 1 ? '合作中' : '终止合作';
|
|
|
|
$itemPromotes = $companyPromotes[$item['company_id']];
|
|
|
|
$itemPromotes = $companyPromotes[$item['company_id']];
|
|
|
|
$promoteCount = count($itemPromotes);
|
|
|
|
$promoteCount = count($itemPromotes);
|
|
|
|
$index = 0;
|
|
|
|
$index = 0;
|
|
|
@ -125,6 +127,7 @@ class PromoteCompanyWarningController extends ThinkController
|
|
|
|
$item['month'] = date('Y-m', strtotime($item['month'].'01'));
|
|
|
|
$item['month'] = date('Y-m', strtotime($item['month'].'01'));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$item['is_sign_contact_text'] = $item['is_sign_contact'] == 1 ? '是' : '否';
|
|
|
|
$item['is_sign_contact_text'] = $item['is_sign_contact'] == 1 ? '是' : '否';
|
|
|
|
|
|
|
|
$item['cooperation_status_text'] = $item['cooperation_status'] == 1 ? '合作中' : '终止合作';
|
|
|
|
$itemPromotes = $companyPromotes[$item['company_id']];
|
|
|
|
$itemPromotes = $companyPromotes[$item['company_id']];
|
|
|
|
$promoteCount = count($itemPromotes);
|
|
|
|
$promoteCount = count($itemPromotes);
|
|
|
|
$index = 0;
|
|
|
|
$index = 0;
|
|
|
|