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
06dcbfaa
Commit
06dcbfaa
authored
Jun 06, 2019
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
83e45dfb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
73 deletions
+13
-73
OfficeBargainService.php
application/api_broker/service/OfficeBargainService.php
+2
-1
OfficeOrderLogService.php
application/api_broker/service/OfficeOrderLogService.php
+2
-2
OfficeOBargainModel.php
application/model/OfficeOBargainModel.php
+9
-70
No files found.
application/api_broker/service/OfficeBargainService.php
View file @
06dcbfaa
...
...
@@ -65,7 +65,8 @@ class OfficeBargainService
$bargainModel
=
new
OfficeOBargainModel
();
$filed
=
"a.id,a.father_id,a.house_number,a.price,a.commission,a.agent_id,a.create_time,b.user_phone,
b.user_name,b.user_id,c.id as order_id,c.order_no,d.id as house_id,d.internal_title,d.internal_address,b.id as report_id"
;
b.user_name,b.user_id,c.id as order_id,c.order_no,d.id as house_id,e.title internal_title,
CONCAT(e.address,d.room_number) internal_address,b.id as report_id"
;
$result
=
$bargainModel
->
selectBargainList
(
$filed
,
$condition
,
$pageNo
,
$pageSize
);
...
...
application/api_broker/service/OfficeOrderLogService.php
View file @
06dcbfaa
...
...
@@ -1451,8 +1451,8 @@ class OfficeOrderLogService
$bargainModel
=
new
OfficeOBargainModel
();
$bargain_info_filed
=
"a.id,a.house_number,a.account_time,a.account_statement,a.father_id,a.is_open,a.trade_type,
a.price,a.industry_type,a.estimated_receipt_date,a.commission,c.id as house_id,
c.internal_title,c.internal_address
,
d.user_id,d.user_phone,d.user_name"
;
a.price,a.industry_type,a.estimated_receipt_date,a.commission,c.id as house_id,
e.title internal_title
,
CONCAT(e.address,c.room_number) internal_address,
d.user_id,d.user_phone,d.user_name"
;
$result
=
[];
$bargainInfo
=
$bargainModel
->
selectBargainDetail
(
$bargain_info_filed
,
$params
);
...
...
application/model/OfficeOBargainModel.php
View file @
06dcbfaa
...
...
@@ -258,14 +258,14 @@ class OfficeOBargainModel extends Model
}
if
(
!
isset
(
$params
[
"type"
])
&&
isset
(
$params
[
"keyword"
]))
{
$where_
[
"b.user_phone|b.user_name|
d.internal_
address"
]
=
array
(
"like"
,
"%"
.
$params
[
"keyword"
]
.
"%"
);
$where_
[
"b.user_phone|b.user_name|
e.
address"
]
=
array
(
"like"
,
"%"
.
$params
[
"keyword"
]
.
"%"
);
}
switch
((
int
)
$params
[
"type"
]){
//1商铺id 2商铺地址 3成交报告id 4带看id 5客户id
case
1
:
$where_
[
"d.id"
]
=
$params
[
"keyword"
];
break
;
case
2
:
$where_
[
"
d.internal_
address"
]
=
array
(
"like"
,
"%"
.
trim
(
$params
[
'keyword'
])
.
"%"
);
$where_
[
"
e.
address"
]
=
array
(
"like"
,
"%"
.
trim
(
$params
[
'keyword'
])
.
"%"
);
break
;
case
3
:
$where_
[
"a.id"
]
=
$params
[
"keyword"
];
...
...
@@ -287,9 +287,10 @@ class OfficeOBargainModel extends Model
$result
=
$this
->
db_
->
field
(
$filed
)
->
alias
(
"a"
)
->
join
(
"o_report b"
,
"a.report_id = b.id"
,
"left"
)
->
join
(
"o_order c"
,
"a.order_id = c.id"
,
"left"
)
->
join
(
"g_houses d"
,
"c.house_id = d.id"
,
"left"
)
->
join
(
"office_o_report b"
,
"a.report_id = b.id"
,
"left"
)
->
join
(
"office_o_order c"
,
"a.order_id = c.id"
,
"left"
)
->
join
(
"office_g_room d"
,
"c.house_id = d.id"
,
"left"
)
->
join
(
"office_g_building e"
,
"e.id = d.building_id"
,
"left"
)
->
where
(
$where_
)
->
order
(
"a.create_time desc"
)
->
limit
(
$pageSize
)
...
...
@@ -319,8 +320,9 @@ class OfficeOBargainModel extends Model
$result
=
$this
->
db_
->
field
(
$filed
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.order_id = b.id"
,
"left"
)
->
join
(
"g_houses c"
,
"b.house_id = c.id"
,
"left"
)
->
join
(
"office_o_order b"
,
"a.order_id = b.id"
,
"left"
)
->
join
(
"office_g_room c"
,
"b.house_id = c.id"
,
"left"
)
->
join
(
"office_g_building e"
,
"e.id = c.building_id"
,
"left"
)
->
join
(
"o_report d"
,
"a.report_id = d.id"
,
"left"
)
->
where
(
$where_
)
->
whereOr
(
$whereOr_
)
...
...
@@ -366,70 +368,7 @@ class OfficeOBargainModel extends Model
return
$result
;
}
/**
* 成交报告列表
*
* @param int $pageNo
* @param int $pageSize
* @param string $order_
* @param string $field
* @param string $params
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getBargainList
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
=
''
,
$params
=
''
)
{
return
$this
->
db_
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'o_report b'
,
'a.report_id = b.id'
,
'left'
)
->
join
(
'o_order c'
,
'a.order_id = c.id'
,
'left'
)
->
join
(
'g_houses d'
,
'c.house_id = d.id'
,
'left'
)
->
join
(
'o_partial_commission e'
,
'a.id = e.bargain_id'
,
'left'
)
//->join('o_paylog f', 'a.id = f.bargain_id', 'left')
->
where
(
$params
)
->
order
(
$order_
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
group
(
'a.id'
)
->
select
();
}
/**
* @param string $field
* @param string $params
* @return float|int
*/
public
function
getBargainListSum
(
$field
=
''
,
$params
=
''
)
{
return
$this
->
db_
->
alias
(
'a'
)
->
join
(
'o_report b'
,
'a.report_id = b.id'
,
'left'
)
->
join
(
'o_order c'
,
'a.order_id = c.id'
,
'left'
)
->
join
(
'g_houses d'
,
'c.house_id = d.id'
,
'left'
)
->
join
(
'o_partial_commission e'
,
'e.bargain_id = a.id'
,
'left'
)
//->join('o_paylog f', 'a.id = f.bargain_id', 'left')
->
where
(
$params
)
->
sum
(
$field
);
}
/**
* 成交报告总数
*
* @param array $params
* @return int
*/
public
function
getBargainTotal
(
array
$params
=
[])
{
return
$this
->
db_
->
alias
(
'a'
)
->
join
(
'o_report b'
,
'a.report_id = b.id'
,
'left'
)
->
join
(
'o_order c'
,
'a.order_id = c.id'
,
'left'
)
->
join
(
'g_houses d'
,
'c.house_id = d.id'
,
'left'
)
->
join
(
'o_partial_commission e'
,
'e.bargain_id = a.id'
,
'left'
)
//->join('o_paylog f', 'a.id = f.bargain_id', 'left')
->
where
(
$params
)
->
group
(
'a.id'
)
->
count
();
}
/**
* 成交报告审核
...
...
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