更新更新
This commit is contained in:
parent
77ae2a3902
commit
2860bbcfd3
@ -24,6 +24,7 @@ class ContractController extends BaseApiController
|
|||||||
} else {
|
} else {
|
||||||
$query = Contract::where("type",1)->where('party_b',$this->userInfo['company_id']);
|
$query = Contract::where("type",1)->where('party_b',$this->userInfo['company_id']);
|
||||||
}
|
}
|
||||||
|
$query->where('status',1);
|
||||||
$count = $query->count();
|
$count = $query->count();
|
||||||
$contract = $query->with(['party_a_info','party_b_info','contract_type'])->page($page)->limit($limit)->select();
|
$contract = $query->with(['party_a_info','party_b_info','contract_type'])->page($page)->limit($limit)->select();
|
||||||
// ->each(function ($item, $key) {
|
// ->each(function ($item, $key) {
|
||||||
|
@ -97,7 +97,11 @@ class IndexController extends BaseApiController
|
|||||||
if($a){
|
if($a){
|
||||||
$find=Db::name('contract')->where('id',$a['id'])->find();
|
$find=Db::name('contract')->where('id',$a['id'])->find();
|
||||||
if($find){
|
if($find){
|
||||||
Db::name('contract')->where('id',$a['id'])->update(['status'=>1]);
|
if($find['signing_timer']==0){
|
||||||
|
Db::name('contract')->where('id',$a['id'])->update(['signing_timer'=>1]);
|
||||||
|
return true;
|
||||||
|
}else if($find['signing_timer']==1){
|
||||||
|
Db::name('contract')->where('id',$a['id'])->update(['status'=>1,'signing_timer'=>2]);
|
||||||
if($find['type']==1){
|
if($find['type']==1){
|
||||||
Db::name('company')->where('id',$find['party_a'])->update(['status'=>1,'is_contract'=>1]);
|
Db::name('company')->where('id',$find['party_a'])->update(['status'=>1,'is_contract'=>1]);
|
||||||
Db::name('company')->where('id',$find['party_b'])->update(['status'=>1,'is_contract'=>1]);
|
Db::name('company')->where('id',$find['party_b'])->update(['status'=>1,'is_contract'=>1]);
|
||||||
@ -106,6 +110,8 @@ class IndexController extends BaseApiController
|
|||||||
Db::name('user')->where('id',$find['party_b'])->update(['is_contract'=>1]);
|
Db::name('user')->where('id',$find['party_b'])->update(['is_contract'=>1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return json(['success'=>true,'msg'=>'成功']);
|
return json(['success'=>true,'msg'=>'成功']);
|
||||||
|
2
vendor/ebaoquan/junziqian_sdk
vendored
2
vendor/ebaoquan/junziqian_sdk
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 1294ea49ff9ecc4532821f8798304816cbf8dd74
|
Subproject commit 9acc82cd23d807280ddd29df2117e7890094d049
|
Loading…
x
Reference in New Issue
Block a user