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
dccaaa06
Commit
dccaaa06
authored
Jun 05, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
办公楼
parent
8238b910
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
192 additions
and
9 deletions
+192
-9
OfficeRoom.php
application/api_broker/controller/OfficeRoom.php
+19
-0
OfficeOrderLogService.php
application/api_broker/service/OfficeOrderLogService.php
+2
-2
OfficePayLog.php
application/index/controller/OfficePayLog.php
+0
-0
OfficeRoomService.php
application/index/service/OfficeRoomService.php
+137
-0
OfficeGRoom.php
application/model/OfficeGRoom.php
+24
-0
OfficeOPayLogAdjustment.php
application/model/OfficeOPayLogAdjustment.php
+6
-6
route.php
application/route.php
+4
-1
No files found.
application/api_broker/controller/OfficeRoom.php
View file @
dccaaa06
...
@@ -263,4 +263,22 @@ class OfficeRoom extends Basic
...
@@ -263,4 +263,22 @@ class OfficeRoom extends Basic
return
$this
->
response
(
$this
->
code
,
$this
->
msg
,
$this
->
data
);
return
$this
->
response
(
$this
->
code
,
$this
->
msg
,
$this
->
data
);
}
}
/**
* 楼盘列表
*
* @return \think\Response
*/
public
function
getBuildingRoom
()
{
$result
=
$this
->
service
->
getRoomBuildingList
(
$this
->
params
);
if
(
$result
[
'status'
]
==
'successful'
)
{
$this
->
data
=
$result
[
'data'
];
}
else
{
$this
->
code
=
101
;
$this
->
msg
=
$result
[
'msg'
];
}
return
$this
->
response
(
$this
->
code
,
$this
->
msg
,
$this
->
data
);
}
}
}
\ No newline at end of file
application/api_broker/service/OfficeOrderLogService.php
View file @
dccaaa06
...
@@ -450,7 +450,7 @@ class OfficeOrderLogService
...
@@ -450,7 +450,7 @@ class OfficeOrderLogService
$oBargainModel
=
new
OfficeOBargainModel
();
$oBargainModel
=
new
OfficeOBargainModel
();
$orderData
=
$orderModel
->
selectOrderByOrderId
(
"a.f_id,a.house_title,
b.
internal_address"
,
[
"order_id"
=>
$order_id
]);
$orderData
=
$orderModel
->
selectOrderByOrderId
(
"a.f_id,a.house_title,
c.address as
internal_address"
,
[
"order_id"
=>
$order_id
]);
//dump($orderData);
//dump($orderData);
if
(
count
(
$orderData
)
<=
0
)
{
if
(
count
(
$orderData
)
<=
0
)
{
return
[
"101"
,
"找不到此订单编号"
];
return
[
"101"
,
"找不到此订单编号"
];
...
@@ -566,7 +566,7 @@ class OfficeOrderLogService
...
@@ -566,7 +566,7 @@ class OfficeOrderLogService
$oRefundLogModel
=
new
OfficeORefundLoORefundLogModel
();
$oRefundLogModel
=
new
OfficeORefundLoORefundLogModel
();
$orderData
=
$orderModel
->
selectOrderByOrderId
(
"a.f_id,a.house_title,
b.
internal_address"
,
[
"order_id"
=>
$order_id
]);
$orderData
=
$orderModel
->
selectOrderByOrderId
(
"a.f_id,a.house_title,
c.address as
internal_address"
,
[
"order_id"
=>
$order_id
]);
//dump($orderData);
//dump($orderData);
if
(
count
(
$orderData
)
<=
0
)
{
if
(
count
(
$orderData
)
<=
0
)
{
return
[
"101"
,
"找不到此订单编号"
];
return
[
"101"
,
"找不到此订单编号"
];
...
...
application/index/controller/OfficePayLog.php
View file @
dccaaa06
This diff is collapsed.
Click to expand it.
application/index/service/OfficeRoomService.php
View file @
dccaaa06
...
@@ -1126,4 +1126,140 @@ class OfficeRoomService
...
@@ -1126,4 +1126,140 @@ class OfficeRoomService
}
}
return
$res
;
return
$res
;
}
}
/**
* 办公楼列表
*
* @param $params
* @return array
*/
public
function
getRoomBuildingList
(
$params
)
{
$page_no
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$page_size
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$where
=
[];
$order
=
'b.id desc'
;
if
(
isset
(
$params
[
'city'
]))
{
$where
[
'a.city'
]
=
$params
[
'city'
];
//市
}
if
(
isset
(
$params
[
'disc'
]))
{
$where
[
'a.disc'
]
=
$params
[
'disc'
];
//区
}
if
(
isset
(
$params
[
'title'
]))
{
$where
[
'a.title'
]
=
[
'LIKE'
,
'%'
.
$params
[
'title'
]
.
'%'
];
//楼盘名
}
if
(
isset
(
$params
[
'id'
]))
{
$where
[
'a.id'
]
=
$params
[
'id'
];
}
if
(
isset
(
$params
[
'`business_district_id`'
]))
{
$where
[
'a.business_district_id'
]
=
$params
[
'business_district_id'
];
//商圈id
}
if
(
isset
(
$params
[
'area_start'
]))
{
$where
[
'b.area'
]
=
[
'>'
,
$params
[
'area_start'
]];
//面积
}
if
(
isset
(
$params
[
'area_end'
]))
{
$where
[
'b.area'
]
=
[
'<'
,
$params
[
'area_end'
]];
//面积
}
if
(
isset
(
$params
[
'area_start'
])
&&
$params
[
'area_end'
])
{
$where
[
'b.area'
]
=
[
'between'
,
[
$params
[
'area_start'
],
$params
[
'area_end'
]]];
//面积
}
if
(
isset
(
$params
[
'type'
]))
{
$where
[
'a.type'
]
=
$params
[
'type'
];
//1.写字楼 2商住两用 3园区 4.洋房 5联合办公 6厂房
}
if
(
isset
(
$params
[
'price_start'
]))
{
$where
[
'b.price'
]
=
$params
[
'price_start'
]
*
100
;
//租金单价
}
if
(
isset
(
$params
[
'price_end'
]))
{
$where
[
'b.price'
]
=
$params
[
'price_end'
]
*
100
;
//租金单价
}
if
(
isset
(
$params
[
'price_start'
])
&&
isset
(
$params
[
'price_end'
]))
{
$where
[
'b.price'
]
=
[
'between'
,
[
$params
[
'price_start'
]
*
100
,
$params
[
'price_end'
]
*
100
]];
//租金单价
}
if
(
isset
(
$params
[
'is_exclusive_type'
]))
{
$where
[
'b.is_exclusive_type'
]
=
$params
[
'is_exclusive_type'
];
//是否独家0否1是
}
if
(
isset
(
$params
[
'agent_start_time'
])
&&
$params
[
'agent_end_time'
])
{
$where
[
'b.agent_start_time'
]
=
[
'>'
,
$params
[
'agent_start_time'
]];
//独家合同开始时间
$where
[
'b.agent_end_time'
]
=
[
'<'
,
$params
[
'agent_end_time'
]];
//独家合同结束时间
}
if
(
isset
(
$params
[
'is_rent'
]))
{
$where
[
'b.is_rent'
]
=
$params
[
'is_rent'
];
//是否已租 0未租 1已租
}
if
(
isset
(
$params
[
'status'
]))
{
$where
[
'a.status'
]
=
$params
[
'status'
];
//状态 1上架 2下架
}
if
(
isset
(
$params
[
'shop_sign'
]))
{
$where
[
'b.shop_sign'
]
=
[
'like'
,
'%'
.
$params
[
'shop_sign'
]
.
'%'
];
//商铺标签
}
if
(
isset
(
$params
[
'is_carefully_chosen'
]))
{
$where
[
'b.is_carefully_chosen'
]
=
$params
[
'shop_sign'
];
//精选商铺--0否1是
$order
=
'b.home_page_sort desc'
;
}
$field
=
'a.id,b.disc,title,address,c.name as business_name'
;
try
{
$data
=
$this
->
m_office_room
->
getRoomBuilding
(
$page_no
,
$page_size
,
$order
,
$field
,
$where
);
}
catch
(
\Exception
$e
)
{
$result
[
'status'
]
=
'fail'
;
$result
[
'msg'
]
=
$e
->
getMessage
();
return
$result
;
}
$result_data
=
[];
foreach
(
$data
as
$k
=>
$v
)
{
$tmp
[
'id'
]
=
$v
[
'id'
];
$tmp
[
'price'
]
=
$this
->
MinField
(
$v
[
'id'
],
'price'
);
$tmp
[
'price'
]
=
empty
(
$tmp
[
'price'
])
?
0
:
$tmp
[
'price'
];
$tmp
[
'price_total'
]
=
$this
->
MinField
(
$v
[
'id'
],
'price_total'
);
$tmp
[
'price_total'
]
=
empty
(
$tmp
[
'price_total'
])
?
0
:
$tmp
[
'price_total'
];
$tmp
[
'shop_sign'
]
=
$this
->
getBuildingSign
(
$v
[
'id'
]);
$area
=
$this
->
MinField
(
$v
[
'id'
],
'area'
);
$tmp
[
'title'
]
=
$v
[
'disc'
]
.
' '
.
$v
[
'business_name'
]
.
' '
.
$v
[
'title'
]
.
' '
.
$area
.
'㎡'
;
$result_data
[]
=
$tmp
;
}
$result
[
'status'
]
=
'successful'
;
$result
[
'data'
]
=
$result_data
;
return
$result
;
}
/**
* 标签处理
*
* @param $id
* @return string
*/
private
function
getBuildingSign
(
$id
){
$field
=
'shop_sign'
;
$where
[
'building_id'
]
=
$id
;
$where
[
'status'
]
=
1
;
$res
=
$this
->
m_office_room
->
getRoom
(
$field
,
$where
);
if
(
!
$res
)
return
''
;
$shop_sign_old
=
''
;
foreach
(
$res
as
$k
=>
$v
)
{
$shop_sign_old
.=
','
.
$v
[
'shop_sign'
];
}
$ex_shop_sign_old
=
explode
(
','
,
trim
(
$shop_sign_old
,
","
));
$ex_shop_sign_old
=
array_unique
(
$ex_shop_sign_old
);
//数组去重
$shop_sign
=
implode
(
","
,
$ex_shop_sign_old
);
return
$shop_sign
;
}
}
}
\ No newline at end of file
application/model/OfficeGRoom.php
View file @
dccaaa06
...
@@ -393,4 +393,28 @@ class OfficeGRoom extends BaseModel
...
@@ -393,4 +393,28 @@ class OfficeGRoom extends BaseModel
//echo Db::table($this->table)->getLastSql();
//echo Db::table($this->table)->getLastSql();
return
$result
;
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
getRoomBuilding
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'a.id desc'
,
$field
=
''
,
$params
=
''
)
{
$params
[
'b.is_del'
]
=
0
;
return
$this
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'office_g_building b'
,
'a.building_id = b.id'
,
'left'
)
->
join
(
'g_business_district c'
,
'b.business_district_id = c.id'
,
'left'
)
->
where
(
$params
)
->
order
(
$order_
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
}
}
}
application/model/OfficeOPayLogAdjustment.php
View file @
dccaaa06
...
@@ -118,9 +118,9 @@ class OfficeOPayLogAdjustment extends BaseModel{
...
@@ -118,9 +118,9 @@ class OfficeOPayLogAdjustment extends BaseModel{
public
function
getAdjustmentListLimit
(
$pageNo
,
$pageSize
,
$order_
=
'a.id desc'
,
$field
,
$params
){
public
function
getAdjustmentListLimit
(
$pageNo
,
$pageSize
,
$order_
=
'a.id desc'
,
$field
,
$params
){
return
$this
->
db_
->
field
(
$field
)
return
$this
->
db_
->
field
(
$field
)
->
alias
(
"a"
)
->
alias
(
"a"
)
->
join
(
"o_paylog b"
,
"a.paylog_id = b.id"
,
"left"
)
->
join
(
"o
ffice_o
_paylog b"
,
"a.paylog_id = b.id"
,
"left"
)
->
join
(
"a_agents d"
,
"a.operation_id = d.id"
,
"left"
)
->
join
(
"a_agents d"
,
"a.operation_id = d.id"
,
"left"
)
->
join
(
"o_order e"
,
"b.order_id = e.id"
)
->
join
(
"o
ffice_o
_order e"
,
"b.order_id = e.id"
)
->
limit
(
$pageSize
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
page
(
$pageNo
)
->
order
(
$order_
)
->
order
(
$order_
)
...
@@ -134,9 +134,9 @@ class OfficeOPayLogAdjustment extends BaseModel{
...
@@ -134,9 +134,9 @@ class OfficeOPayLogAdjustment extends BaseModel{
*/
*/
public
function
getAdjustmentListTotal
(
$params
)
{
public
function
getAdjustmentListTotal
(
$params
)
{
return
$this
->
db_
->
alias
(
'a'
)
return
$this
->
db_
->
alias
(
'a'
)
->
join
(
"o_paylog b"
,
"a.paylog_id = b.id"
,
"left"
)
->
join
(
"o
ffice_o
_paylog b"
,
"a.paylog_id = b.id"
,
"left"
)
->
join
(
"a_agents d"
,
"a.operation_id = d.id"
,
"left"
)
->
join
(
"a_agents d"
,
"a.operation_id = d.id"
,
"left"
)
->
join
(
"o_order e"
,
"b.order_id = e.id"
)
->
join
(
"o
ffice_o
_order e"
,
"b.order_id = e.id"
)
->
where
(
$params
)
->
where
(
$params
)
->
count
(
'a.id'
);
->
count
(
'a.id'
);
}
}
...
@@ -149,9 +149,9 @@ class OfficeOPayLogAdjustment extends BaseModel{
...
@@ -149,9 +149,9 @@ class OfficeOPayLogAdjustment extends BaseModel{
*/
*/
public
function
getMoneyTotal
(
$params
)
{
public
function
getMoneyTotal
(
$params
)
{
return
$this
->
db_
->
alias
(
'a'
)
return
$this
->
db_
->
alias
(
'a'
)
->
join
(
"o_paylog b"
,
"a.paylog_id = b.id"
,
"left"
)
->
join
(
"o
ffice_o
_paylog b"
,
"a.paylog_id = b.id"
,
"left"
)
->
join
(
"a_agents d"
,
"a.operation_id = d.id"
,
"left"
)
->
join
(
"a_agents d"
,
"a.operation_id = d.id"
,
"left"
)
->
join
(
"o_order e"
,
"b.order_id = e.id"
)
->
join
(
"o
ffice_o
_order e"
,
"b.order_id = e.id"
)
->
where
(
$params
)
->
where
(
$params
)
->
sum
(
'a.money'
);
->
sum
(
'a.money'
);
}
}
...
...
application/route.php
View file @
dccaaa06
...
@@ -975,7 +975,7 @@ Route::group('office', [
...
@@ -975,7 +975,7 @@ Route::group('office', [
'filtrateConditionRoom'
=>
[
'api/shop/filtrateConditionRoom'
,
[
'method'
=>
'get | post'
]],
'filtrateConditionRoom'
=>
[
'api/shop/filtrateConditionRoom'
,
[
'method'
=>
'get | post'
]],
'addCollectHouse'
=>
[
'api_broker/OfficeCollectHouse/addCollectHouse'
,
[
'method'
=>
'POST|GET'
]],
//收藏或取消收藏商铺
'addCollectHouse'
=>
[
'api_broker/OfficeCollectHouse/addCollectHouse'
,
[
'method'
=>
'POST|GET'
]],
//收藏或取消收藏商铺
'getCollectHouseList'
=>
[
'api_broker/OfficeCollectHouse/getCollectHouseList'
,
[
'method'
=>
'POST|GET'
]],
//查询收藏数据
'getCollectHouseList'
=>
[
'api_broker/OfficeCollectHouse/getCollectHouseList'
,
[
'method'
=>
'POST|GET'
]],
//查询收藏数据
'getBuildingRoom'
=>
[
'api_broker/Office
Building
/getBuildingRoom'
,
[
'method'
=>
'POST|GET'
]],
//楼盘列表
'getBuildingRoom'
=>
[
'api_broker/Office
Room
/getBuildingRoom'
,
[
'method'
=>
'POST|GET'
]],
//楼盘列表
'report'
=>
[
'api_broker/OfficeReport/report'
,
[
'method'
=>
'get|post'
]],
//报备
'report'
=>
[
'api_broker/OfficeReport/report'
,
[
'method'
=>
'get|post'
]],
//报备
'addFollowUp'
=>
[
'api_broker/OfficeReport/addFollowUp'
,
[
'method'
=>
'get|post'
]],
//新增跟进
'addFollowUp'
=>
[
'api_broker/OfficeReport/addFollowUp'
,
[
'method'
=>
'get|post'
]],
//新增跟进
'getFollowUpList'
=>
[
'api_broker/OfficeReport/getFollowUpList'
,
[
'method'
=>
'get|post'
]],
'getFollowUpList'
=>
[
'api_broker/OfficeReport/getFollowUpList'
,
[
'method'
=>
'get|post'
]],
...
@@ -1005,6 +1005,9 @@ Route::group('office_index', [
...
@@ -1005,6 +1005,9 @@ Route::group('office_index', [
'batchChangDish'
=>
[
'index/OfficeRoom/batchChangDish'
,
[
'method'
=>
'post'
]],
//批量修改盘方
'batchChangDish'
=>
[
'index/OfficeRoom/batchChangDish'
,
[
'method'
=>
'post'
]],
//批量修改盘方
'getCollection'
=>
[
'index/OfficePayLog/getCollection'
,
[
'method'
=>
'GET'
]],
//收款记录
'getCollection'
=>
[
'index/OfficePayLog/getCollection'
,
[
'method'
=>
'GET'
]],
//收款记录
'getCollectionExcel'
=>
[
'index/OfficePayLog/getCollectionExcel'
,
[
'method'
=>
'get'
]],
//导出收款记录
'getCollectionExcel'
=>
[
'index/OfficePayLog/getCollectionExcel'
,
[
'method'
=>
'get'
]],
//导出收款记录
'adjustment'
=>
[
'index/OfficePayLog/adjustment'
,
[
'method'
=>
'get'
]],
//导出收款记录
'getCollectionDetail'
=>
[
'index/OfficePayLog/getCollectionDetail'
,
[
'method'
=>
'get'
]],
//收款详情
'getAdjustmentDetail'
=>
[
'index/OfficePayLog/getAdjustmentDetail'
,
[
'method'
=>
'get'
]],
//调整收款详情
]);
]);
...
...
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