Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
bba9b320
Commit
bba9b320
authored
Mar 23, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取周报或者日报
parent
ede7de93
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
1 deletion
+38
-1
Statement.php
application/api_broker/controller/Statement.php
+37
-0
route.php
application/route.php
+1
-1
No files found.
application/api_broker/controller/Statement.php
View file @
bba9b320
...
...
@@ -141,4 +141,40 @@ class Statement extends Basic
return
$this
->
response
(
$code
,
$msg
,
$data
);
}
/**
* 获取周报或者日报
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getWeekOrDay
()
{
$code
=
200
;
$msg
=
''
;
if
(
empty
(
$this
->
params
[
'agent_id'
]))
{
return
$this
->
response
(
101
,
'Agent_id is null!'
);
}
$agent_report
=
new
RAgentReport
();
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$fields
=
'id,create_time,start_time,end_time,img_url'
;
$where
[
'is_del'
]
=
0
;
$where
[
'agent_id'
]
=
$this
->
agentId
;
if
(
$this
->
params
[
'type'
]
==
1
)
{
$where
[
'type'
]
=
1
;
}
else
{
$where
[
'type'
]
=
2
;
}
$data
[
'list'
]
=
$agent_report
->
getList
(
$pageNo
,
$pageSize
,
'id desc'
,
$fields
,
$where
);
$data
[
'total'
]
=
$agent_report
->
getTotal
(
$where
);
foreach
(
$data
as
$k
=>
$v
)
{
$data
[
$k
][
'img_url'
]
=
CURRENT_URL
.
'static/week_work_img/'
.
$data
[
$k
][
'img_url'
];
}
return
$this
->
response
(
$code
,
$msg
,
$data
);
}
}
\ No newline at end of file
application/route.php
View file @
bba9b320
...
...
@@ -358,7 +358,7 @@ Route::group('broker', [
'selectPerformanceByTime'
=>
[
'api_broker/Performance/selectPerformanceByTime'
,
[
'method'
=>
'get'
]],
'weekWorkImg'
=>
[
'api_broker/Statement/weekWorkImg'
,
[
'method'
=>
'post'
]],
//生成周报和日报图片
'setReportContent'
=>
[
'api_broker/Statement/setReportContent'
,
[
'method'
=>
'get|post'
]],
//保存日报周报四个字段
'getWeekOrDay'
=>
[
'api_broker/Statement/getWeekOrDay'
,
[
'method'
=>
'get'
]],
//获取日报或者周报
]);
...
...
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