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
ad4ecda4
Commit
ad4ecda4
authored
Aug 21, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
约带看
parent
1fd91a2d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
3 deletions
+53
-3
Finance.php
application/index/controller/Finance.php
+1
-1
OfficeBargain.php
application/index/controller/OfficeBargain.php
+2
-2
OReportModel.php
application/model/OReportModel.php
+25
-0
OfficeOReportModel.php
application/model/OfficeOReportModel.php
+25
-0
No files found.
application/index/controller/Finance.php
View file @
ad4ecda4
...
...
@@ -244,7 +244,7 @@ class Finance extends Basic
}
if
(
!
empty
(
$agent_where
))
{
$m_agent
=
new
O
MarchIn
Model
();
$m_agent
=
new
O
Report
Model
();
$agent_where
[
'c.id'
]
=
[
'>'
,
0
];
$march_bargain_id
=
$m_agent
->
getAgentMarchIn
(
'c.id,c.father_id'
,
$agent_where
);
...
...
application/index/controller/OfficeBargain.php
View file @
ad4ecda4
...
...
@@ -222,9 +222,9 @@ class OfficeBargain extends Basic
}
if
(
!
empty
(
$agent_where
))
{
$m_agent
_march
=
new
OfficeOMarchIn
Model
();
$m_agent
=
new
OfficeOReport
Model
();
$agent_where
[
'c.id'
]
=
[
'>'
,
0
];
$march_bargain_id
=
$m_agent
_march
->
getAgentMarchIn
(
'c.id,c.father_id'
,
$agent_where
);
$march_bargain_id
=
$m_agent
->
getAgentMarchIn
(
'c.id,c.father_id'
,
$agent_where
);
if
(
$march_bargain_id
[
'status'
]
==
'fail'
)
{
return
$this
->
response
(
101
,
'约带查询错误:'
.
$march_bargain_id
[
'msg'
]);
...
...
application/model/OReportModel.php
View file @
ad4ecda4
...
...
@@ -1137,6 +1137,31 @@ class OReportModel extends Model
->
where
(
$params
)
->
select
();
}
/**
* 带看经纪人
*
* @param $field
* @param $where
* @return mixed
*/
public
function
getAgentMarchIn
(
$field
,
$where
)
{
try
{
$data
[
'data'
]
=
$this
->
db
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'a_agents b'
,
'a.report_agent_id = b.id'
,
'left'
)
->
join
(
'o_order d'
,
'a.id = d.f_id'
,
'left'
)
->
join
(
'o_bargain c'
,
'd.id = c.order_id'
,
'left'
)
->
where
(
$where
)
->
select
();
$data
[
'status'
]
=
'successful'
;
}
catch
(
\Exception
$e
)
{
$data
[
'status'
]
=
'fail'
;
$data
[
'msg'
]
=
$e
->
getMessage
();
}
return
$data
;
}
}
...
...
application/model/OfficeOReportModel.php
View file @
ad4ecda4
...
...
@@ -851,6 +851,31 @@ class OfficeOReportModel extends Model
//echo Db::table($this->table)->getLastSql();
return
$result
;
}
/**
* 带看经纪人
*
* @param $field
* @param $where
* @return mixed
*/
public
function
getAgentMarchIn
(
$field
,
$where
)
{
try
{
$data
[
'data'
]
=
$this
->
db
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'a_agents b'
,
'a.report_agent_id = b.id'
,
'left'
)
->
join
(
'office_o_order d'
,
'a.id = d.f_id'
,
'left'
)
->
join
(
'office_o_bargain c'
,
'd.id = c.order_id'
,
'left'
)
->
where
(
$where
)
->
select
();
$data
[
'status'
]
=
'successful'
;
}
catch
(
\Exception
$e
)
{
$data
[
'status'
]
=
'fail'
;
$data
[
'msg'
]
=
$e
->
getMessage
();
}
return
$data
;
}
}
...
...
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