|
|
@ -460,6 +460,14 @@ class PromoteCompanyController extends ThinkController
|
|
|
|
|
|
|
|
|
|
|
|
$save['promotes'] = json_decode($save['promotes'], true);
|
|
|
|
$save['promotes'] = json_decode($save['promotes'], true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$save['relation']['collaborate_way'] = $save['part_a_type'];
|
|
|
|
|
|
|
|
if ($save['part_a_type'] == 1) {
|
|
|
|
|
|
|
|
$save['relation']['self_company_id'] = $save['part_b'];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($save['part_a_type'] == 2) {
|
|
|
|
|
|
|
|
$save['relation']['self_company_id'] = $save['part_a'];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$this->checkData($save);
|
|
|
|
$this->checkData($save);
|
|
|
|
|
|
|
|
|
|
|
|
$presidentDepositService = new PresidentDepositService();
|
|
|
|
$presidentDepositService = new PresidentDepositService();
|
|
|
@ -480,14 +488,6 @@ class PromoteCompanyController extends ThinkController
|
|
|
|
$save['create_time'] = $time;
|
|
|
|
$save['create_time'] = $time;
|
|
|
|
$save['turnover_ratio'] = $this->setTurnoverRatio($save);
|
|
|
|
$save['turnover_ratio'] = $this->setTurnoverRatio($save);
|
|
|
|
|
|
|
|
|
|
|
|
$save['relation']['collaborate_way'] = $save['part_a_type'];
|
|
|
|
|
|
|
|
if ($save['part_a_type'] == 1) {
|
|
|
|
|
|
|
|
$save['relation']['self_company_id'] = $save['part_b'];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($save['part_a_type'] == 2) {
|
|
|
|
|
|
|
|
$save['relation']['self_company_id'] = $save['part_a'];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$result = D("PromoteCompanyVerify")->add_db($save);
|
|
|
|
$result = D("PromoteCompanyVerify")->add_db($save);
|
|
|
|
if ($result) {
|
|
|
|
if ($result) {
|
|
|
|
addOperationLog(['op_type'=>0,'key'=>$save['company_name'],'op_name'=>'新增推广公司','url'=>U('PromoteCompany/lists')]);
|
|
|
|
addOperationLog(['op_type'=>0,'key'=>$save['company_name'],'op_name'=>'新增推广公司','url'=>U('PromoteCompany/lists')]);
|
|
|
@ -675,6 +675,15 @@ class PromoteCompanyController extends ThinkController
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if ($_POST) {
|
|
|
|
if ($_POST) {
|
|
|
|
$save = I('post.');//前端已经验证
|
|
|
|
$save = I('post.');//前端已经验证
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$save['relation']['collaborate_way'] = $save['part_a_type'];
|
|
|
|
|
|
|
|
if ($save['part_a_type'] == 1) {
|
|
|
|
|
|
|
|
$save['relation']['self_company_id'] = $save['part_b'];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($save['part_a_type'] == 2) {
|
|
|
|
|
|
|
|
$save['relation']['self_company_id'] = $save['part_a'];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$this->checkData($save);
|
|
|
|
$this->checkData($save);
|
|
|
|
|
|
|
|
|
|
|
|
$promoteCompanyService = new PromoteCompanyService();
|
|
|
|
$promoteCompanyService = new PromoteCompanyService();
|
|
|
@ -699,14 +708,6 @@ class PromoteCompanyController extends ThinkController
|
|
|
|
));
|
|
|
|
));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$save['relation']['collaborate_way'] = $save['part_a_type'];
|
|
|
|
|
|
|
|
if ($save['part_a_type'] == 1) {
|
|
|
|
|
|
|
|
$save['relation']['self_company_id'] = $save['part_b'];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($save['part_a_type'] == 2) {
|
|
|
|
|
|
|
|
$save['relation']['self_company_id'] = $save['part_a'];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$save['turnover_ratio'] = $this->setTurnoverRatio($save);
|
|
|
|
$save['turnover_ratio'] = $this->setTurnoverRatio($save);
|
|
|
|
$res = D("PromoteCompanyVerify")->edit_db($save);
|
|
|
|
$res = D("PromoteCompanyVerify")->edit_db($save);
|
|
|
|
if ($res) {
|
|
|
|
if ($res) {
|
|
|
|