更新
This commit is contained in:
parent
8fe5490b74
commit
b75544dbf0
@ -105,6 +105,7 @@ class UserController extends BaseAdminController
|
|||||||
{
|
{
|
||||||
$params = Request::param();
|
$params = Request::param();
|
||||||
$result = UserLogic::detail($params['id']);
|
$result = UserLogic::detail($params['id']);
|
||||||
|
halt($result);
|
||||||
if ($result && $result['contract'] && $result['contract']['file'] != '') {
|
if ($result && $result['contract'] && $result['contract']['file'] != '') {
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $result['nickname'] . '的合同',
|
'name' => $result['nickname'] . '的合同',
|
||||||
|
@ -52,7 +52,7 @@ class UserLogic extends BaseLogic
|
|||||||
// $user->sex = $user->getData('sex');
|
// $user->sex = $user->getData('sex');
|
||||||
$user['qualification']=json_decode($user->qualification,true);
|
$user['qualification']=json_decode($user->qualification,true);
|
||||||
if($user->is_contract==1){
|
if($user->is_contract==1){
|
||||||
$user['contract']=Contract::where(['type'=>2,'party_b'=>$userId])->with('party_a,contractType')->find();
|
$user['contract']=Contract::where(['type'=>2,'party_b'=>$userId])->with(['partyA','contractType'])->find();
|
||||||
}
|
}
|
||||||
return $user->toArray();
|
return $user->toArray();
|
||||||
}
|
}
|
||||||
|
@ -74,16 +74,17 @@ class UserInformationg extends BaseModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static function details($id){
|
public static function details($id){
|
||||||
$item=self::where('id',$id)->find();
|
$item=self::where('id',$id)->field('*,area_id area_name,street_id street_name,village_id village_name,brigade_id brigade_name')->find();
|
||||||
$item['family'] = json_decode($item['family'],true);
|
$item['family'] = json_decode($item['family'],true);
|
||||||
$item['child_arr'] = json_decode($item['child_arr'],true);
|
$item['child_arr'] = json_decode($item['child_arr'],true);
|
||||||
$data=UserInformationgDemand::where('create_user_id',$item['create_user_id'])->select();
|
$data=UserInformationgDemand::where('information_id',$id)->select();
|
||||||
$item['datas']=[];
|
$item['datas']=[];
|
||||||
|
$datas=[];
|
||||||
if($data){
|
if($data){
|
||||||
foreach($data as $k=>$v){
|
foreach($data as $k=>$v){
|
||||||
$datas=[];
|
|
||||||
$a=json_decode($v['data'],true);
|
$a=json_decode($v['data'],true);
|
||||||
$arr=[
|
$arr=[
|
||||||
|
'id'=>$v['id'],
|
||||||
'category_id'=>$v['category_id'],
|
'category_id'=>$v['category_id'],
|
||||||
'category_child'=>$v['category_child'],
|
'category_child'=>$v['category_child'],
|
||||||
'datas'=>$a
|
'datas'=>$a
|
||||||
@ -91,8 +92,8 @@ class UserInformationg extends BaseModel
|
|||||||
if($a){
|
if($a){
|
||||||
array_push($datas,$arr);
|
array_push($datas,$arr);
|
||||||
}
|
}
|
||||||
$item['datas']=$datas;
|
|
||||||
}
|
}
|
||||||
|
$item['datas']=$datas;
|
||||||
}
|
}
|
||||||
return $item;
|
return $item;
|
||||||
|
|
||||||
@ -110,11 +111,19 @@ class UserInformationg extends BaseModel
|
|||||||
|
|
||||||
public function getAreaNameAttr($value)
|
public function getAreaNameAttr($value)
|
||||||
{
|
{
|
||||||
return Db::name('geo_area')->where(['area_code' => $this->area])->value('area_name');
|
return Db::name('geo_area')->where(['area_code' => $this->area_id])->value('area_name');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getStreetNameAttr($value)
|
public function getStreetNameAttr($value)
|
||||||
{
|
{
|
||||||
return Db::name('geo_street')->where(['street_code' => $this->street])->value('street_name');
|
return Db::name('geo_street')->where(['street_code' => $this->street_id])->value('street_name');
|
||||||
|
}
|
||||||
|
public function getVillageNameAttr($value)
|
||||||
|
{
|
||||||
|
return Db::name('geo_village')->where(['street_code' => $this->village_id])->value('village_name');
|
||||||
|
}
|
||||||
|
public function getBrigadeNameAttr($value)
|
||||||
|
{
|
||||||
|
return Db::name('geo_brigade')->where(['id' => $this->brigade_id])->value('brigade_name');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user