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
66c60ab7
Commit
66c60ab7
authored
Feb 26, 2019
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
401e435a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
4 deletions
+38
-4
PerformanceService.php
application/api_broker/service/PerformanceService.php
+32
-2
GHousesToAgents.php
application/model/GHousesToAgents.php
+1
-1
OPayLogModel.php
application/model/OPayLogModel.php
+2
-1
OReportModel.php
application/model/OReportModel.php
+3
-0
No files found.
application/api_broker/service/PerformanceService.php
View file @
66c60ab7
...
@@ -7,6 +7,7 @@ use app\model\ASuperviseModel;
...
@@ -7,6 +7,7 @@ use app\model\ASuperviseModel;
use
app\model\GHouses
;
use
app\model\GHouses
;
use
app\model\GHousesFollowUp
;
use
app\model\GHousesFollowUp
;
use
app\model\GHousesImgs
;
use
app\model\GHousesImgs
;
use
app\model\GHousesToAgents
;
use
app\model\OBargainModel
;
use
app\model\OBargainModel
;
use
app\model\OMarchInModel
;
use
app\model\OMarchInModel
;
use
app\model\OPayLogModel
;
use
app\model\OPayLogModel
;
...
@@ -897,12 +898,41 @@ class PerformanceService
...
@@ -897,12 +898,41 @@ class PerformanceService
/**
/**
* @param $bargain_id
* @param $bargain_id
* @return false|\PDOStatement|string|\think\Collection
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
*/
public
function
collectionList
(
$bargain_id
){
public
function
collectionList
(
$bargain_id
){
$paylogModel
=
new
OPayLogModel
();
$paylogModel
=
new
OPayLogModel
();
$orderParams
[
"bargain_id"
]
=
$bargain_id
;
$orderParams
[
"bargain_id"
]
=
$bargain_id
;
$field_pay_log
=
"a.id,a.create_time,a.bargain_id,a.money,a.type,a.income_time,a.source,c.id as agent_id,c.name,d.store_name"
;
$field_pay_log
=
"a.id,a.report_id,a.create_time,a.bargain_id,a.money,a.type,a.income_time,a.source,c.id as agent_id,c.name,d.store_name,b.house_id"
;
return
$paylogModel
->
getPayLogByOrderId
(
$field_pay_log
,
$orderParams
);
$list
=
$paylogModel
->
getPayLogByOrderId
(
$field_pay_log
,
$orderParams
);
$reportModel
=
new
OReportModel
();
$gModel
=
new
GHousesToAgents
();
$field_report
=
"c.name"
;
foreach
(
$list
as
$item
){
$item
[
"salesman"
]
=
""
;
if
(
$item
[
"type"
]
==
91
){
$params
[
"a.id"
]
=
$item
[
"report_id"
];
$result
=
$reportModel
->
getReport
(
$field_report
,
$params
);
$item
[
"salesman"
]
=
$result
[
0
][
"name"
];
}
if
(
$item
[
"type"
]
==
92
){
$params
[
"a.houses_id"
]
=
$item
[
"house_id"
];
$params
[
"a.type"
]
=
3
;
$params
[
"a.is_del"
]
=
0
;
$exclusive
=
$gModel
->
getAgentsHousesList
(
1
,
1
,
''
,
"a.houses_id,b.name"
,
$params
);
if
(
empty
(
$exclusive
)){
$params
[
"type"
]
=
1
;
$params
[
"is_del"
]
=
0
;
$data
=
$gModel
->
getAgentsHousesList
(
1
,
1
,
''
,
"a.houses_id,b.name"
,
$params
);
$item
[
"salesman"
]
=
$data
[
0
][
"name"
];
}
else
{
$item
[
"salesman"
]
=
$exclusive
[
0
][
"name"
];
}
}
}
return
$list
;
}
}
...
...
application/model/GHousesToAgents.php
View file @
66c60ab7
...
@@ -425,7 +425,7 @@ class GHousesToAgents extends BaseModel
...
@@ -425,7 +425,7 @@ class GHousesToAgents extends BaseModel
* @param array $where
* @param array $where
* @return array
* @return array
*/
*/
public
function
getHouseAgent
(
string
$field
=
''
,
array
$where
=
[])
:
array
public
function
getHouseAgent
(
string
$field
=
""
,
array
$where
=
[])
:
array
{
{
try
{
try
{
$where
[
'a.is_del'
]
=
0
;
$where
[
'a.is_del'
]
=
0
;
...
...
application/model/OPayLogModel.php
View file @
66c60ab7
...
@@ -139,7 +139,7 @@ class OPayLogModel extends Model
...
@@ -139,7 +139,7 @@ class OPayLogModel extends Model
$where_
[
"b.house_title"
]
=
$params
[
"house_title"
];
$where_
[
"b.house_title"
]
=
$params
[
"house_title"
];
}
}
if
(
isset
(
$params
[
"bargain_id"
]))
{
if
(
isset
(
$params
[
"bargain_id"
]))
{
$where_
[
"
a
.bargain_id"
]
=
$params
[
"bargain_id"
];
$where_
[
"
b
.bargain_id"
]
=
$params
[
"bargain_id"
];
}
}
$where_
[
"a.is_del"
]
=
0
;
$where_
[
"a.is_del"
]
=
0
;
return
Db
::
table
(
$this
->
table
)
return
Db
::
table
(
$this
->
table
)
...
@@ -152,6 +152,7 @@ class OPayLogModel extends Model
...
@@ -152,6 +152,7 @@ class OPayLogModel extends Model
->
select
();
->
select
();
}
}
/**
/**
* @param $params
* @param $params
* @return false|\PDOStatement|string|\think\Collection
* @return false|\PDOStatement|string|\think\Collection
...
...
application/model/OReportModel.php
View file @
66c60ab7
...
@@ -176,6 +176,9 @@ class OReportModel extends Model
...
@@ -176,6 +176,9 @@ class OReportModel extends Model
if
(
isset
(
$params
[
"user_id"
]))
{
if
(
isset
(
$params
[
"user_id"
]))
{
$where_
[
"a.user_id"
]
=
$params
[
"user_id"
];
$where_
[
"a.user_id"
]
=
$params
[
"user_id"
];
}
}
if
(
isset
(
$params
[
"id"
]))
{
$where_
[
"a.id"
]
=
$params
[
"id"
];
}
return
$this
->
db
->
field
(
$filed
)
return
$this
->
db
->
field
(
$filed
)
->
alias
(
"a"
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.id = b.f_id"
,
"left"
)
->
join
(
"o_order b"
,
"a.id = b.f_id"
,
"left"
)
...
...
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