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
4de60f5d
Commit
4de60f5d
authored
May 15, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
redis
parent
2239c143
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
21 deletions
+24
-21
ReportService.php
application/api_broker/service/ReportService.php
+24
-21
No files found.
application/api_broker/service/ReportService.php
View file @
4de60f5d
...
@@ -73,10 +73,10 @@ class ReportService
...
@@ -73,10 +73,10 @@ class ReportService
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* @throws \think\exception\DbException
*/
*/
public
function
verifyReport
(
$agent_id
,
$agent_phone
,
$agent_name
,
$store_id
,
$user_id
,
$user_phone
,
$user_name
,
$house_ids
,
$vehicle
,
$intro
,
$predict_see_time
)
public
function
verifyReport
(
$agent_id
,
$agent_phone
,
$agent_name
,
$store_id
,
$user_id
,
$user_phone
,
$user_name
,
$house_ids
,
$vehicle
,
$intro
,
$predict_see_time
)
{
{
$id
=
$this
->
reportBin
(
$agent_id
,
$agent_phone
,
$agent_name
,
$store_id
,
$user_id
,
$user_phone
,
$user_name
,
$vehicle
,
$intro
,
$id
=
$this
->
reportBin
(
$agent_id
,
$agent_phone
,
$agent_name
,
$store_id
,
$user_id
,
$user_phone
,
$user_name
,
$vehicle
,
$intro
,
$predict_see_time
);
$predict_see_time
);
if
(
$id
>
0
)
{
if
(
$id
>
0
)
{
...
@@ -91,7 +91,7 @@ class ReportService
...
@@ -91,7 +91,7 @@ class ReportService
$push
->
pushReportMessage
(
$v
,
$agent_id
);
//推送报备信息
$push
->
pushReportMessage
(
$v
,
$agent_id
);
//推送报备信息
}
}
//todo 保存order表 订单返回成功返回报备id
//todo 保存order表 订单返回成功返回报备id
return
(
$this
->
orderModel
->
insertOrderByAll
(
$order_arr
)
>
0
)
?
$id
:
0
;
return
(
$this
->
orderModel
->
insertOrderByAll
(
$order_arr
)
>
0
)
?
$id
:
0
;
}
}
}
}
...
@@ -112,15 +112,18 @@ class ReportService
...
@@ -112,15 +112,18 @@ class ReportService
$vModel
=
new
VerifyService
();
$vModel
=
new
VerifyService
();
$agentArr
=
$vModel
->
getAgentsByAgentId
(
$params
[
"report_agent_id"
]);
$agentArr
=
$vModel
->
getAgentsByAgentId
(
$params
[
"report_agent_id"
]);
if
(
$agentArr
)
{
if
(
$agentArr
)
{
$params
[
"agent_id_s"
]
=
array
(
"in"
,
$agentArr
);
$params
[
"agent_id_s"
]
=
array
(
"in"
,
$agentArr
);
$params
[
"report_agent_id"
]
=
$agentArr
;
$params
[
"report_agent_id"
]
=
$agentArr
;
}
}
$caseHouseId
=
$vModel
->
getCaseHouseIdByAgentId
(
$params
[
"agent_id_s"
]);
$caseHouseId
=
$vModel
->
getCaseHouseIdByAgentId
(
$params
[
"agent_id_s"
]);
$ids
=
""
;
$ids
=
""
;
foreach
(
$caseHouseId
as
$item
)
{
if
(
count
(
$caseHouseId
)
>
0
)
{
$ids
.=
$item
[
"houses_id"
]
.
","
;
foreach
(
$caseHouseId
as
$item
)
{
$ids
.=
$item
[
"houses_id"
]
.
","
;
}
}
}
$ids
=
rtrim
(
$ids
,
","
);
$ids
=
rtrim
(
$ids
,
","
);
$ids
=
$ids
?
$ids
:
0
;
$ids
=
$ids
?
$ids
:
0
;
$params
[
"house_ids"
]
=
$ids
;
$params
[
"house_ids"
]
=
$ids
;
...
@@ -199,22 +202,22 @@ class ReportService
...
@@ -199,22 +202,22 @@ class ReportService
* @param $predict_see_time int 时间戳
* @param $predict_see_time int 时间戳
* @return int|string
* @return int|string
*/
*/
public
function
reportBin
(
$report_agent_id
,
$agent_phone
,
$report_agent_name
,
$report_store_id
,
$user_id
,
$user_phone
,
$user_name
,
public
function
reportBin
(
$report_agent_id
,
$agent_phone
,
$report_agent_name
,
$report_store_id
,
$user_id
,
$user_phone
,
$user_name
,
$vehicle
,
$intro
,
$predict_see_time
)
$vehicle
,
$intro
,
$predict_see_time
)
{
{
$param
[
"report_agent_id"
]
=
$report_agent_id
;
$param
[
"report_agent_id"
]
=
$report_agent_id
;
$param
[
"report_agent_phone"
]
=
$agent_phone
;
$param
[
"report_agent_phone"
]
=
$agent_phone
;
$param
[
"report_agent_name"
]
=
$report_agent_name
;
$param
[
"report_agent_name"
]
=
$report_agent_name
;
$param
[
"report_store_id"
]
=
$report_store_id
;
$param
[
"report_store_id"
]
=
$report_store_id
;
$param
[
"user_id"
]
=
$user_id
;
$param
[
"user_id"
]
=
$user_id
;
$param
[
"user_phone"
]
=
$user_phone
;
$param
[
"user_phone"
]
=
$user_phone
;
$param
[
"user_name"
]
=
$user_name
;
$param
[
"user_name"
]
=
$user_name
;
$param
[
"vehicle"
]
=
$vehicle
;
$param
[
"vehicle"
]
=
$vehicle
;
$param
[
"status"
]
=
0
;
$param
[
"status"
]
=
0
;
$param
[
"intro"
]
=
$intro
;
$param
[
"intro"
]
=
$intro
;
$param
[
"predict_see_time"
]
=
date
(
"Y-m-d H:i:s"
,
$predict_see_time
);
$param
[
"predict_see_time"
]
=
date
(
"Y-m-d H:i:s"
,
$predict_see_time
);
$param
[
"create_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$param
[
"create_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$param
[
"update_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$param
[
"update_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
return
$this
->
reportModel
->
addReport
(
$param
);
return
$this
->
reportModel
->
addReport
(
$param
);
}
}
...
...
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