Commit 8a67508f by wenyi.chen

0507 处理指标名称问题

parent 3000b2cf
......@@ -283,6 +283,7 @@ class Norm
}
}
/**
* 返回指标完整详情信息
* @return \josn
......@@ -354,6 +355,83 @@ class Norm
}
/**
* 返回指标完整详情信息
* @return \josn
*/
public function normWholeDetail()
{
$id = input("param.id");
$page = input("param.page")?input("param.page"):-1;
$limit = input("param.limit")?input("param.limit"):10;
$status = input("param.status",'',"trim");
if(empty($id)){
return returnResult(config("config.code.error"),'填写信息错误,请检查!');
}
$normBus = new CommonBus('NormBus'); // 通过公共业务初始化指标类
$data = [];
// 指标详情
$res = $normBus->getConditionalQuery(['id'=>$id]);
// 指标扩展详情
$data['addItem']=$res;
$normExtendBus = new CommonBus('NormExtendBus');
$res = $normExtendBus->getConditionalQueryAll(['norm_id'=>$id]);
$data['custom']=$res;
// 领取信息
$NormReceivesBus = new CommonBus('NormReceivesBus'); // 通过公共业务初始化指标类
if($page == -1){
$query = ['norm_id'=>$id,'page'=>-1,'limit'=>-1,'status'=>$status,'order'=>'desc'];
$result = $NormReceivesBus->listData($query);//获取所有账号信息
$data['receivesList'] = $result;
}else{
$query = ['norm_id'=>$id,'page'=>$page,'limit'=>$limit,'status'=>$status,'order'=>'desc'];
$NormReceivesBus = new \app\api\business\NormReceivesBus;
$result = $NormReceivesBus->pagingListData($query);//获取所有账号信息
// $list= $NormReceivesBus->getConditionalQueryAllPaging(['norm_id'=>$id,'show'=>$show],$page,$limit);
$data['receivesList'] = $result['data'];
$data['total'] = $result['total'];
}
if (!empty($data['receivesList'])){
foreach ($data['receivesList'] as $index => $vlues){
$UserInfoBus = new CommonBus('UserInfoBus'); // 通过公共业务初始化指标类
$data['receivesList'][$index]['userInfo'] = $UserInfoBus->getConditionalQuery(['id'=>$vlues['user_id']]);
$TaskPackageBus = new CommonBus('TaskPackageBus'); // 通过公共业务初始化指标类
$data['receivesList'][$index]['task_info'] = $TaskPackageBus->getConditionalQuery(['id'=>$vlues['task_id']]);
$NormListBus = new CommonBus('NormListBus'); // 通过公共业务初始化指标类
$data['receivesList'][$index]['norm_list_info'] = $NormListBus->getConditionalQuery(['id'=>$vlues['norm_list_id']]);
$NormListExtendBus = new CommonBus('NormListExtendBus'); // 通过公共业务初始化指标类
$data['receivesList'][$index]['norm_list_extend'] = $NormListExtendBus->getConditionalQueryAll(['norm_list_id'=>$vlues['norm_list_id']]);
$NormCollectsBus = new CommonBus('NormCollectsBus'); // 通过公共业务初始化指标类
$collectsInfo = $NormCollectsBus->getConditionalQuery(['norm_receive_id'=>$vlues['id']]);
// 用户没有填写信息
if ($collectsInfo){
$NormCollectsExtendBus = new CommonBus('NormCollectsExtendBus'); // 通过公共业务初始化指标类
$normCollectsExtend = $NormCollectsExtendBus->getConditionalQueryAll(['norm_collects_id'=>$collectsInfo['id']]);
$data['receivesList'][$index]['refer_type'] = $collectsInfo['refer_type'];
$data['receivesList'][$index]['remark'] = $collectsInfo['remark'];
$data['receivesList'][$index]['imgPath'] = $collectsInfo['imgPath'];
$data['receivesList'][$index]['fileListPdf'] = $collectsInfo['fileListPdf'];
$data['receivesList'][$index]['file_name'] = $collectsInfo['file_name'];
$data['receivesList'][$index]['normCollectsExtend'] = $normCollectsExtend;
}else{
$normExtendBus = new CommonBus('NormExtendBus');
$res = $normExtendBus->getConditionalQueryAll(['norm_id'=>$id,'user_filled'=>1]);
$data['receivesList'][$index]['refer_type'] = '';
$data['receivesList'][$index]['remark'] = '';
$data['receivesList'][$index]['imgPath'] = '';
$data['receivesList'][$index]['fileListPdf'] = '';
$data['receivesList'][$index]['file_name'] = '';
$data['receivesList'][$index]['normCollectsExtend'] =$res;
}
}
}
if($data){
return returnResult(config("config.code.success"),config("config.describe.success"),$data);
}else{
return returnResult(config("config.code.success"),config("config.describe.null_data"),[]);
}
}
/**
* 返回指标部分信息
* @return \josn
*/
......
......@@ -61,7 +61,9 @@ Route::rule("taskPackage/delete","TaskPackage/delete"); // 删除任务列表
Route::rule("norm/add","Norm/add"); // 新增指标
Route::rule("norm/list","Norm/list"); // 指标列表
Route::rule("norm/detail","Norm/detail"); // 指标详情
Route::rule("norm/whole","Norm/wholeDetail"); // 指标完整详情信息
Route::rule("norm/whole","Norm/wholeDetail"); // 数据员指标完整详情信息
Route::rule("norm/normWholeDetail","Norm/normWholeDetail"); // 指标完整详情信息
Route::rule("norm/partDetail","Norm/partDetail"); // 部分详情信息
Route::rule("norm/edit","Norm/edit"); // 指标详情
Route::rule("norm/finalData","Norm/finalData"); // 返回最后的ID
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment