Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
data-collect-api
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyi.chen
data-collect-api
Commits
8a67508f
Commit
8a67508f
authored
May 07, 2024
by
wenyi.chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
0507 处理指标名称问题
parent
3000b2cf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
81 additions
and
1 deletions
+81
-1
app/api/controller/Norm.php
+78
-0
app/api/route/api.php
+3
-1
No files found.
app/api/controller/Norm.php
View file @
8a67508f
...
@@ -283,6 +283,7 @@ class Norm
...
@@ -283,6 +283,7 @@ class Norm
}
}
}
}
/**
/**
* 返回指标完整详情信息
* 返回指标完整详情信息
* @return \josn
* @return \josn
...
@@ -354,6 +355,83 @@ class Norm
...
@@ -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
* @return \josn
*/
*/
...
...
app/api/route/api.php
View file @
8a67508f
...
@@ -61,7 +61,9 @@ Route::rule("taskPackage/delete","TaskPackage/delete"); // 删除任务列表
...
@@ -61,7 +61,9 @@ Route::rule("taskPackage/delete","TaskPackage/delete"); // 删除任务列表
Route
::
rule
(
"norm/add"
,
"Norm/add"
);
// 新增指标
Route
::
rule
(
"norm/add"
,
"Norm/add"
);
// 新增指标
Route
::
rule
(
"norm/list"
,
"Norm/list"
);
// 指标列表
Route
::
rule
(
"norm/list"
,
"Norm/list"
);
// 指标列表
Route
::
rule
(
"norm/detail"
,
"Norm/detail"
);
// 指标详情
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/partDetail"
,
"Norm/partDetail"
);
// 部分详情信息
Route
::
rule
(
"norm/edit"
,
"Norm/edit"
);
// 指标详情
Route
::
rule
(
"norm/edit"
,
"Norm/edit"
);
// 指标详情
Route
::
rule
(
"norm/finalData"
,
"Norm/finalData"
);
// 返回最后的ID
Route
::
rule
(
"norm/finalData"
,
"Norm/finalData"
);
// 返回最后的ID
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment