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
06da7e80
Commit
06da7e80
authored
May 21, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
getWeekOrDayV2
parent
72592d68
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
0 deletions
+60
-0
Statement.php
application/api_broker/controller/Statement.php
+33
-0
StatementValidate.php
application/api_broker/validate/StatementValidate.php
+26
-0
route.php
application/route.php
+1
-0
No files found.
application/api_broker/controller/Statement.php
View file @
06da7e80
...
@@ -190,6 +190,39 @@ class Statement extends Basic
...
@@ -190,6 +190,39 @@ class Statement extends Basic
return
$this
->
response
(
$code
,
$msg
,
$data
);
return
$this
->
response
(
$code
,
$msg
,
$data
);
}
}
public
function
getWeekOrDayV2
()
{
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
$code
=
200
;
$msg
=
''
;
$checkResult
=
$this
->
validate
(
$params
,
"StatementValidate.getWeekOrDayV2"
);
if
(
true
!==
$checkResult
)
{
return
$this
->
response
(
"300"
,
$checkResult
);
}
$agent_report
=
new
RAgentReport
();
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$fields
=
'id,create_time,start_date,end_date,img_url'
;
$where
[
'is_del'
]
=
0
;
$where
[
'agent_id'
]
=
$params
[
'agent_id'
];
if
(
$this
->
params
[
'type'
]
==
1
)
{
$where
[
'type'
]
=
1
;
}
else
{
$where
[
'type'
]
=
0
;
}
$data
[
'list'
]
=
$agent_report
->
getList
(
$pageNo
,
$pageSize
,
'id desc'
,
$fields
,
$where
);
$data
[
'total'
]
=
$agent_report
->
getTotal
(
$where
);
foreach
(
$data
[
'list'
]
as
$k
=>
$v
)
{
$data
[
'list'
][
$k
][
'img_url'
]
=
IMAGES_URL
.
'static/week_work_img/'
.
$data
[
'list'
][
$k
][
'img_url'
];
}
return
$this
->
response
(
$code
,
$msg
,
$data
);
}
/**
/**
* 店长或总监日报周报数据接口
* 店长或总监日报周报数据接口
* @return \think\Response
* @return \think\Response
...
...
application/api_broker/validate/StatementValidate.php
0 → 100644
View file @
06da7e80
<?php
namespace
app\api_broker\validate
;
use
think\Validate
;
/**
* Created by PhpStorm.
* User: zhuwei
* Date: 2018/8/7
* Time: 13:54:12
*/
class
StatementValidate
extends
Validate
{
protected
$rule
=
[
'agent_id'
=>
'require|number|gt:0'
];
protected
$message
=
[
'agent_id.require'
=>
'agent_id为必填字段'
,
'agent_id.number'
=>
'agent_id只能为数字'
,
'agent_id.gt'
=>
'agent_id必须大于0'
,
];
protected
$scene
=
[
'getWeekOrDayV2'
=>
[
'agent_id'
],
];
}
application/route.php
View file @
06da7e80
...
@@ -773,6 +773,7 @@ Route::group('broker', [
...
@@ -773,6 +773,7 @@ Route::group('broker', [
'weekWorkImg'
=>
[
'api_broker/Statement/weekWorkImg'
,
[
'method'
=>
'post'
]],
//生成周报和日报图片
'weekWorkImg'
=>
[
'api_broker/Statement/weekWorkImg'
,
[
'method'
=>
'post'
]],
//生成周报和日报图片
'setReportContent'
=>
[
'api_broker/Statement/setReportContent'
,
[
'method'
=>
'get|post'
]],
//保存日报周报四个字段
'setReportContent'
=>
[
'api_broker/Statement/setReportContent'
,
[
'method'
=>
'get|post'
]],
//保存日报周报四个字段
'getWeekOrDay'
=>
[
'api_broker/Statement/getWeekOrDay'
,
[
'method'
=>
'get'
]],
//获取日报或者周报
'getWeekOrDay'
=>
[
'api_broker/Statement/getWeekOrDay'
,
[
'method'
=>
'get'
]],
//获取日报或者周报
'getWeekOrDayV2'
=>
[
'api_broker/Statement/getWeekOrDayV2'
,
[
'method'
=>
'get|post'
]],
//获取日报或者周报
'uploadSuperviseFile'
=>
[
'api_broker/Supervise/uploadSuperviseFile'
,
[
'method'
=>
'post'
]],
//监督执行和门店拜访上传图片
'uploadSuperviseFile'
=>
[
'api_broker/Supervise/uploadSuperviseFile'
,
[
'method'
=>
'post'
]],
//监督执行和门店拜访上传图片
'searchAgentShop'
=>
[
'api_broker/Supervise/searchInfo'
,
[
'method'
=>
'get'
]],
//拜访门店查询
'searchAgentShop'
=>
[
'api_broker/Supervise/searchInfo'
,
[
'method'
=>
'get'
]],
//拜访门店查询
'add_supervise'
=>
[
'api_broker/Supervise/add'
,
[
'method'
=>
'post'
]],
//添加监督执行和门店拜访
'add_supervise'
=>
[
'api_broker/Supervise/add'
,
[
'method'
=>
'post'
]],
//添加监督执行和门店拜访
...
...
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