更新
This commit is contained in:
parent
567c49114e
commit
c107e97c3e
@ -244,6 +244,9 @@ class CompanyController extends BaseAdminController
|
|||||||
if ($parmas['key'] == 'city') {
|
if ($parmas['key'] == 'city') {
|
||||||
$where[] = ['area', '=', 0];
|
$where[] = ['area', '=', 0];
|
||||||
}
|
}
|
||||||
|
if( $parmas['value']==''){
|
||||||
|
return $this->fail('参数不能为空');
|
||||||
|
}
|
||||||
$where[] = [$parmas['key'], '=', $parmas['value']];
|
$where[] = [$parmas['key'], '=', $parmas['value']];
|
||||||
switch ($parmas['key']) {
|
switch ($parmas['key']) {
|
||||||
case 'city':
|
case 'city':
|
||||||
@ -259,8 +262,6 @@ class CompanyController extends BaseAdminController
|
|||||||
$where[] = ['brigade', '=', 0];
|
$where[] = ['brigade', '=', 0];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$res = Company::where($where)->column('responsible_area');
|
$res = Company::where($where)->column('responsible_area');
|
||||||
foreach($res as $k=>$v){
|
foreach($res as $k=>$v){
|
||||||
$res[$k] = explode(',',$v);
|
$res[$k] = explode(',',$v);
|
||||||
|
@ -16,7 +16,6 @@ class CeshiController extends BaseApiController
|
|||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$all=TaskSchedulingPlan::whereDay('start_time')->where('is_pay',0)->with(['template_info','scheduling'])->select()->toArray();
|
$all=TaskSchedulingPlan::whereDay('start_time')->where('is_pay',0)->with(['template_info','scheduling'])->select()->toArray();
|
||||||
halt($all);
|
|
||||||
foreach($all as $k=>$v){
|
foreach($all as $k=>$v){
|
||||||
queue(TaskInformationJob::class,$v);
|
queue(TaskInformationJob::class,$v);
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,8 @@ class InformationController extends BaseApiController
|
|||||||
TaskTemplate::where('id',$task['template_id'])->inc('information_count',1)->update();
|
TaskTemplate::where('id',$task['template_id'])->inc('information_count',1)->update();
|
||||||
}
|
}
|
||||||
|
|
||||||
UserInformationg::where('id',$param['id'])->update(['update_time'=>time()]);
|
UserInformationg::where('id',$param['id'])->update(['update_time'=>time(),'is_update'=>1]);
|
||||||
|
|
||||||
return $this->success('成功');
|
return $this->success('成功');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@ class ShareProfit
|
|||||||
$userAll=User::where('company_id',$data['company_id'])->where('admin_id',0)->field('id,user_money')->select();
|
$userAll=User::where('company_id',$data['company_id'])->where('admin_id',0)->field('id,user_money')->select();
|
||||||
$yser_all_count=count($userAll);
|
$yser_all_count=count($userAll);
|
||||||
$member_maoney_user=bcdiv($master_maoney_user,$yser_all_count,2);
|
$member_maoney_user=bcdiv($master_maoney_user,$yser_all_count,2);
|
||||||
|
|
||||||
//负责人
|
//负责人
|
||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
@ -40,15 +41,17 @@ class ShareProfit
|
|||||||
|
|
||||||
//成员
|
//成员
|
||||||
foreach ($userAll as $key => $value) {
|
foreach ($userAll as $key => $value) {
|
||||||
$company_money+=$member_maoney_user;
|
|
||||||
$arr=[$value['id'], AccountLogEnum::UM_INC_TASK, AccountLogEnum::INC,$member_maoney_user,$data['sn'],$data['msg'].'获得收益'.$member_maoney_user.'元',['company_id'=>$data['company_id'],'proportion'=>$proportion],$data['status']];
|
$arr=[$value['id'], AccountLogEnum::UM_INC_TASK, AccountLogEnum::INC,$member_maoney_user,$data['sn'],$data['msg'].'获得收益'.$member_maoney_user.'元',['company_id'=>$data['company_id'],'proportion'=>$proportion],$data['status']];
|
||||||
$this->member($arr);
|
$this->member($arr);
|
||||||
$arr=[$value['id'], AccountLogEnum::UM_INC_TASKUSER, AccountLogEnum::INC,$member_maoney_user,$data['sn'],$data['msg'].'获得账户余额'.$member_maoney_user.'元',['company_id'=>$data['company_id'],'proportion'=>$proportion],$data['status']];
|
$arr=[$value['id'], AccountLogEnum::UM_INC_TASKUSER, AccountLogEnum::INC,$member_maoney_user,$data['sn'],$data['msg'].'获得账户余额'.$member_maoney_user.'元',['company_id'=>$data['company_id'],'proportion'=>$proportion],$data['status']];
|
||||||
$this->member($arr);
|
$this->member($arr);
|
||||||
}
|
}
|
||||||
//公司
|
//公司
|
||||||
Company::where('id',$data['company_id'])->inc('deposit',$company_money)->inc('company_money',$data['money'])->update();
|
if($data['status']==1){
|
||||||
TaskSchedulingPlan::where('id',$data['id'])->update(['is_pay'=>1]);
|
Company::where('id',$data['company_id'])->inc('deposit',$master_maoney)->inc('company_money',$master_maoney)->update();
|
||||||
|
TaskSchedulingPlan::where('id',$data['id'])->update(['is_pay'=>1]);
|
||||||
|
}
|
||||||
|
|
||||||
Db::commit();
|
Db::commit();
|
||||||
return true;
|
return true;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
@ -32,6 +32,7 @@ class TaskInformationJob
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$name = '小组队长';
|
$name = '小组队长';
|
||||||
|
$arr['status'] = 1;
|
||||||
} elseif
|
} elseif
|
||||||
//交易金额
|
//交易金额
|
||||||
($data['template_info']['type'] == 33) {
|
($data['template_info']['type'] == 33) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user