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
e6785dcb
Commit
e6785dcb
authored
Feb 28, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
约带看
parent
ddee833e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
7 deletions
+26
-7
Report.php
application/index/controller/Report.php
+20
-5
OReportModel.php
application/model/OReportModel.php
+2
-0
route.php
application/route.php
+4
-2
No files found.
application/index/controller/Report.php
View file @
e6785dcb
...
@@ -10,6 +10,7 @@ namespace app\index\controller;
...
@@ -10,6 +10,7 @@ namespace app\index\controller;
use
app\index\extend\Basic
;
use
app\index\extend\Basic
;
use
app\model\AAgents
;
use
app\model\OReportModel
;
use
app\model\OReportModel
;
class
Report
extends
Basic
class
Report
extends
Basic
...
@@ -28,6 +29,20 @@ class Report extends Basic
...
@@ -28,6 +29,20 @@ class Report extends Basic
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
15
:
$this
->
params
[
'pageSize'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
15
:
$this
->
params
[
'pageSize'
];
$m_report
=
new
OReportModel
();
$m_report
=
new
OReportModel
();
$m_agent
=
new
AAgents
();
switch
(
$this
->
params
[
'type'
])
{
case
1
:
$store_id
=
$m_agent
->
getAgentFieldById
(
$this
->
userId
,
'store_id'
);
$where
[
'd.store_id'
]
=
$store_id
;
break
;
case
2
:
$district_id
=
$m_agent
->
getAgentFieldById
(
$this
->
userId
,
'district_id'
);
$where
[
'd.district_id'
]
=
$district_id
;
break
;
case
3
:
break
;
}
$data
[
'code'
]
=
200
;
$data
[
'code'
]
=
200
;
$data
[
'msg'
]
=
""
;
$data
[
'msg'
]
=
""
;
$where
[
"a.status"
]
=
0
;
$where
[
"a.status"
]
=
0
;
...
@@ -66,14 +81,14 @@ class Report extends Basic
...
@@ -66,14 +81,14 @@ class Report extends Basic
$field
=
'b.id as order_id,a.user_name,a.user_phone,a.create_time,a.report_agent_name,c.internal_title,a.predict_see_time'
;
$field
=
'b.id as order_id,a.user_name,a.user_phone,a.create_time,a.report_agent_name,c.internal_title,a.predict_see_time'
;
$field
.=
',a.id,b.order_no'
;
$field
.=
',a.id,b.order_no'
;
try
{
//
try {
$list
=
$m_report
->
getReportList
(
$pageNo
,
$pageSize
,
'a.id desc'
,
$field
,
$where
);
$list
=
$m_report
->
getReportList
(
$pageNo
,
$pageSize
,
'a.id desc'
,
$field
,
$where
);
$data
[
'data'
][
'total'
]
=
$m_report
->
getAddReportListTotal
(
$where
);
$data
[
'data'
][
'total'
]
=
$m_report
->
getAddReportListTotal
(
$where
);
$data
[
'data'
][
'list'
]
=
$list
;
$data
[
'data'
][
'list'
]
=
$list
;
}
catch
(
\Exception
$e
)
{
//
} catch (\Exception $e) {
$data
[
'code'
]
=
101
;
//
$data['code'] = 101;
$data
[
'code'
]
=
'内部错误:'
.
$e
->
getMessage
();
//
$data['code'] = '内部错误:' . $e->getMessage();
}
//
}
return
$this
->
response
(
$data
[
'code'
],
$data
[
'msg'
],
$data
[
'data'
]);
return
$this
->
response
(
$data
[
'code'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
}
...
...
application/model/OReportModel.php
View file @
e6785dcb
...
@@ -745,6 +745,7 @@ class OReportModel extends Model
...
@@ -745,6 +745,7 @@ class OReportModel extends Model
{
{
$result
=
$this
->
db
->
field
(
$field
)
$result
=
$this
->
db
->
field
(
$field
)
->
alias
(
"a"
)
->
alias
(
"a"
)
->
join
(
"a_agents d"
,
"a.report_agent_id = d.id"
,
"left"
)
->
join
(
"o_order b"
,
"a.id = b.f_id"
,
"left"
)
->
join
(
"o_order b"
,
"a.id = b.f_id"
,
"left"
)
->
join
(
"g_houses c"
,
"b.house_id = c.id"
,
"left"
)
->
join
(
"g_houses c"
,
"b.house_id = c.id"
,
"left"
)
->
where
(
$params
)
->
where
(
$params
)
...
@@ -764,6 +765,7 @@ class OReportModel extends Model
...
@@ -764,6 +765,7 @@ class OReportModel extends Model
public
function
getAddReportListTotal
(
$params
)
public
function
getAddReportListTotal
(
$params
)
{
{
return
$this
->
db
->
alias
(
"a"
)
return
$this
->
db
->
alias
(
"a"
)
->
join
(
"a_agents d"
,
"a.report_agent_id = d.id"
,
"left"
)
->
join
(
"o_order b"
,
"a.id = b.f_id"
,
"left"
)
->
join
(
"o_order b"
,
"a.id = b.f_id"
,
"left"
)
->
join
(
"g_houses c"
,
"b.house_id = c.id"
,
"left"
)
->
join
(
"g_houses c"
,
"b.house_id = c.id"
,
"left"
)
->
where
(
$params
)
->
where
(
$params
)
...
...
application/route.php
View file @
e6785dcb
...
@@ -380,8 +380,10 @@ Route::group('index', [
...
@@ -380,8 +380,10 @@ Route::group('index', [
//站点相关
//站点相关
'addSite'
=>
[
'index/Site/addSite'
,
[
'method'
=>
'POST|GET'
]],
//获取站点列表 朱伟 2018-10-18
'addSite'
=>
[
'index/Site/addSite'
,
[
'method'
=>
'POST|GET'
]],
//获取站点列表 朱伟 2018-10-18
'getSiteList'
=>
[
'index/Site/getSiteList'
,
[
'method'
=>
'POST|GET'
]],
//获取站点列表 朱伟 2018-10-18
'getSiteList'
=>
[
'index/Site/getSiteList'
,
[
'method'
=>
'POST|GET'
]],
//获取站点列表 朱伟 2018-10-18
'delImageDepot_Site'
=>
[
'index/Site/delImageDepot'
,
[
'method'
=>
'POST|GET'
]],
//关闭或开启站点 朱伟 2018-10-18
'delImageDepot_Site'
=>
[
'index/Site/delImageDepot'
,
[
'method'
=>
'POST|GET'
]],
//关闭或开启站点 朱伟 2018-10-18
'inspectionRecordAll'
=>
[
'index/Report/inspectionRecordAll'
,
[
'method'
=>
'GET'
]],
//全部约带看
'inspectionRecordStore/:type'
=>
[
'index/Report/inspectionRecordAll'
,
[
'method'
=>
'GET'
],
[
'type'
=>
1
]],
//全部约带看
'inspectionRecordDistrict/:type'
=>
[
'index/Report/inspectionRecordAll'
,
[
'method'
=>
'GET'
],[
'type'
=>
2
]],
//全部约带看
'inspectionRecordAll/:type'
=>
[
'index/Report/inspectionRecordAll'
,
[
'method'
=>
'GET'
],[
'type'
=>
3
]],
//全部约带看
'setSite'
=>
[
'index/auth/setSite'
,
[
'method'
=>
'GET|POST'
]],
//设置角色站点
'setSite'
=>
[
'index/auth/setSite'
,
[
'method'
=>
'GET|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