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
4bacfde5
Commit
4bacfde5
authored
Apr 09, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
ec39334b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
13 deletions
+17
-13
OrderLog.php
application/api_broker/controller/OrderLog.php
+2
-1
Report.php
application/api_broker/controller/Report.php
+3
-3
OReportModel.php
application/model/OReportModel.php
+12
-9
No files found.
application/api_broker/controller/OrderLog.php
View file @
4bacfde5
...
@@ -43,13 +43,14 @@ class OrderLog extends Basic
...
@@ -43,13 +43,14 @@ class OrderLog extends Basic
{
{
$params
=
$this
->
params
;
$params
=
$this
->
params
;
if
(
!
isset
(
$params
[
"march_in_area"
])
||
!
isset
(
$params
[
"report_id"
])
||
!
isset
(
$params
[
"reception_id"
])
if
(
!
isset
(
$params
[
"march_in_area"
])
||
!
isset
(
$params
[
"report_id"
])
||
!
isset
(
$params
[
"reception_id"
])
||
!
isset
(
$params
[
"reception_name"
])
||
!
isset
(
$params
[
"order_id"
])
||
!
isset
(
$params
[
"order_no"
]))
{
||
!
isset
(
$params
[
"order_id"
])
||
!
isset
(
$params
[
"order_no"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
}
/* $params = array(
/* $params = array(
"reception_id" => 1,//带看经纪人id
"reception_id" => 1,//带看经纪人id
"reception_name" => 1,//带看经纪人id
"report_id" => 1,//报备id
"report_id" => 1,//报备id
"order_id" =>1, //关联order表id
"order_id" =>1, //关联order表id
"order_no" =>"123123123123123", //订单no
"order_no" =>"123123123123123", //订单no
...
...
application/api_broker/controller/Report.php
View file @
4bacfde5
...
@@ -85,13 +85,13 @@ class Report extends Basic
...
@@ -85,13 +85,13 @@ class Report extends Basic
*/
*/
public
function
reportList
()
public
function
reportList
()
{
{
/*
$params = array(
/*
$params = array(
"agent_id" =>1,
"agent_id" =>1,
"type" => 1,//1表示全部 2表示进场 3 表示收款 4成交报告
"type" => 1,//1表示全部 2表示进场 3 表示收款 4成交报告
"page_no"=>1,
"page_no"=>1,
"page_size"=>15
"page_size"=>15
);*/
);*/
$params
=
$this
->
params
;
$params
=
$this
->
params
;
if
(
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"type"
]))
{
if
(
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"type"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
return
$this
->
response
(
"101"
,
"请求参数错误"
);
...
@@ -100,7 +100,7 @@ class Report extends Basic
...
@@ -100,7 +100,7 @@ class Report extends Basic
$pageNo
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$pageNo
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$pageSize
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
$pageSize
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
$field
=
"a.id,a.user_id,a.user_phone,a.user_name,a.predict_see_time,b.id as order_id,b.order_no,b.house_id,b.house_title"
;
$field
=
"a.id,a.user_id,a.user_phone,a.user_name,a.predict_see_time,
a.create_time,
b.id as order_id,b.order_no,b.house_id,b.house_title"
;
$params
[
"report_agent_id"
]
=
$params
[
"agent_id"
];
$params
[
"report_agent_id"
]
=
$params
[
"agent_id"
];
$result
=
$this
->
service_
->
orderList
(
$field
,
$params
,
$pageNo
,
$pageSize
);
$result
=
$this
->
service_
->
orderList
(
$field
,
$params
,
$pageNo
,
$pageSize
);
...
...
application/model/OReportModel.php
View file @
4bacfde5
...
@@ -128,7 +128,8 @@ class OReportModel extends Model
...
@@ -128,7 +128,8 @@ class OReportModel extends Model
AND `b`.`is_del` = 0
AND `b`.`is_del` = 0
GROUP BY
GROUP BY
`c`.`order_id`
`c`.`order_id`
) ) AS aaa LIMIT
$start_index
,
$pageSize
"
;
) ) AS aaa ORDER BY `create_time` DESC LIMIT
$start_index
,
$pageSize
"
;
$result
=
$this
->
db
->
query
(
$sql
);
$result
=
$this
->
db
->
query
(
$sql
);
return
$result
;
return
$result
;
...
@@ -164,7 +165,7 @@ class OReportModel extends Model
...
@@ -164,7 +165,7 @@ class OReportModel extends Model
GROUP BY
GROUP BY
`c`.`order_id`
`c`.`order_id`
)
)
) AS aaa LIMIT
$start_index
,
$pageSize
"
;
) AS aaa
ORDER BY `create_time` DESC
LIMIT
$start_index
,
$pageSize
"
;
$result
=
$this
->
db
->
query
(
$sql
);
$result
=
$this
->
db
->
query
(
$sql
);
return
$result
;
return
$result
;
...
@@ -199,7 +200,7 @@ class OReportModel extends Model
...
@@ -199,7 +200,7 @@ class OReportModel extends Model
GROUP BY
GROUP BY
`c`.`order_id`
`c`.`order_id`
)
)
) AS aaa
limit
$start_index
,
$pageSize
"
;
) AS aaa
ORDER BY `create_time` DESC limit
$start_index
,
$pageSize
"
;
$result
=
$this
->
db
->
query
(
$sql
);
$result
=
$this
->
db
->
query
(
$sql
);
return
$result
;
return
$result
;
default
:
default
:
...
@@ -223,7 +224,7 @@ class OReportModel extends Model
...
@@ -223,7 +224,7 @@ class OReportModel extends Model
`b`.`house_id` IN (
$house_ids
)
`b`.`house_id` IN (
$house_ids
)
AND `a`.`status` = 0
AND `a`.`status` = 0
AND `b`.`is_del` = 0
AND `b`.`is_del` = 0
) ) as aaa
limit
$start_index
,
$pageSize
"
;
) ) as aaa
ORDER BY `create_time` DESC limit
$start_index
,
$pageSize
"
;
$result
=
$this
->
db
->
query
(
$sql
);
$result
=
$this
->
db
->
query
(
$sql
);
return
$result
;
return
$result
;
...
@@ -347,14 +348,15 @@ class OReportModel extends Model
...
@@ -347,14 +348,15 @@ class OReportModel extends Model
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* @throws \think\exception\DbException
*/
*/
public
function
getAgentByReportId
(
$report_id
)
{
public
function
getAgentByReportId
(
$report_id
)
{
$user_id
=
$this
->
db
->
field
(
'user_id'
)
$user_id
=
$this
->
db
->
field
(
'user_id'
)
->
where
(
'id'
,
$report_id
)
->
where
(
'id'
,
$report_id
)
->
value
(
'user_id'
);
->
value
(
'user_id'
);
$user
=
new
Users
();
$user
=
new
Users
();
$agent_id
=
$user
->
where
(
'id'
,
$user_id
)
->
value
(
'agent_id'
);
$agent_id
=
$user
->
where
(
'id'
,
$user_id
)
->
value
(
'agent_id'
);
$agent_data
=
$this
->
db
->
table
(
'a_agents'
)
->
field
(
'id,device_id'
)
->
where
(
'id'
,
$agent_id
)
->
find
();
$agent_data
=
$this
->
db
->
table
(
'a_agents'
)
->
field
(
'id,device_id'
)
->
where
(
'id'
,
$agent_id
)
->
find
();
return
$agent_data
;
return
$agent_data
;
}
}
}
}
\ No newline at end of file
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