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
1bf0685c
Commit
1bf0685c
authored
Jun 18, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
搜索楼号
parent
2ef192a7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
113 additions
and
2 deletions
+113
-2
OfficeRoom.php
application/api_broker/controller/OfficeRoom.php
+19
-0
Basic.php
application/api_broker/extend/Basic.php
+1
-0
OfficeRoom.php
application/index/controller/OfficeRoom.php
+19
-0
OfficeRoomService.php
application/index/service/OfficeRoomService.php
+42
-0
OfficeBuildingRoomValidate.php
application/index/validate/OfficeBuildingRoomValidate.php
+7
-2
OfficeGRoom.php
application/model/OfficeGRoom.php
+23
-0
route.php
application/route.php
+2
-0
No files found.
application/api_broker/controller/OfficeRoom.php
View file @
1bf0685c
...
@@ -325,4 +325,22 @@ class OfficeRoom extends Basic
...
@@ -325,4 +325,22 @@ class OfficeRoom extends Basic
return
$this
->
response
(
"200"
,
'request success'
,
$result
);
return
$this
->
response
(
"200"
,
'request success'
,
$result
);
}
}
/**
* 检查重盘
*
* @return \think\Response
*/
public
function
checkRepetition
()
{
$result
=
$this
->
service
->
checkRepetition
(
$this
->
params
);
if
(
$result
[
'status'
]
==
'fail'
)
{
$this
->
code
=
101
;
$this
->
msg
=
$result
[
'msg'
];
}
else
{
$this
->
data
=
$result
[
'data'
];
}
return
$this
->
response
(
$this
->
code
,
$this
->
msg
,
$this
->
data
);
}
}
}
\ No newline at end of file
application/api_broker/extend/Basic.php
View file @
1bf0685c
...
@@ -64,6 +64,7 @@ class Basic extends Controller
...
@@ -64,6 +64,7 @@ class Basic extends Controller
"broker/getShopListByMap"
,
"broker/getShopListByMap"
,
"broker/getUserLabels"
,
"broker/getUserLabels"
,
"office/filtrateConditionRoom"
,
"office/filtrateConditionRoom"
,
"office/getHouseAddress"
,
);
);
/**
/**
...
...
application/index/controller/OfficeRoom.php
View file @
1bf0685c
...
@@ -303,4 +303,22 @@ class OfficeRoom extends Basic
...
@@ -303,4 +303,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
checkRepetition
()
{
$result
=
$this
->
service
->
checkRepetition
(
$this
->
params
);
if
(
$result
[
'status'
]
==
'fail'
)
{
$this
->
code
=
101
;
$this
->
msg
=
$result
[
'msg'
];
}
else
{
$this
->
data
=
$result
[
'data'
];
}
return
$this
->
response
(
$this
->
code
,
$this
->
msg
,
$this
->
data
);
}
}
}
\ No newline at end of file
application/index/service/OfficeRoomService.php
View file @
1bf0685c
...
@@ -1491,4 +1491,45 @@ class OfficeRoomService
...
@@ -1491,4 +1491,45 @@ class OfficeRoomService
}
}
return
$result
;
return
$result
;
}
}
/**
* 是否重盘
*
* @param $params
* @return mixed
*/
public
function
checkRepetition
(
$params
)
{
$result
[
'status'
]
=
'fail'
;
$result
[
'msg'
]
=
''
;
$result
[
'data'
]
=
[];
$check
=
$this
->
validate
->
scene
(
'checkRepetition'
)
->
check
(
$params
);
if
(
false
===
$check
)
{
$result
[
'msg'
]
=
$this
->
validate
->
getError
();
return
$result
;
}
$page_no
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$page_size
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
try
{
$field
=
'a.id,a.floor,a.room_number,a.mansion'
;
$where
[
'b.city'
]
=
$params
[
'city'
];
$where
[
'a.floor'
]
=
$params
[
'floor'
];
$where
[
'a.mansion'
]
=
$params
[
'mansion'
];
$list
=
$this
->
m_office_room
->
getRoomBuildingListLimit
(
$page_no
,
$page_size
,
$field
,
$where
);
if
(
$list
)
{
$data
=
[];
foreach
(
$list
as
$k
=>
$v
)
{
$data
[
$k
][
'id'
]
=
$v
[
'id'
];
$data
[
$k
][
'address'
]
=
$v
[
'mansion'
]
.
'-'
.
$v
[
'floor'
]
.
'-'
.
$v
[
'room_number'
];
}
$result
[
'data'
]
=
$data
;
}
$result
[
'status'
]
=
'successful'
;
}
catch
(
\Exception
$e
)
{
$result
[
'msg'
]
=
"内部错误:"
.
$e
->
getMessage
();
}
return
$result
;
}
}
}
\ No newline at end of file
application/index/validate/OfficeBuildingRoomValidate.php
View file @
1bf0685c
...
@@ -46,7 +46,8 @@ class OfficeBuildingRoomValidate extends Validate
...
@@ -46,7 +46,8 @@ class OfficeBuildingRoomValidate extends Validate
'agent_start_time'
=>
'require'
,
'agent_start_time'
=>
'require'
,
'agent_end_time'
=>
'require'
,
'agent_end_time'
=>
'require'
,
'title'
=>
'require'
,
'title'
=>
'require'
,
'mansion'
=>
'require|length:2,255'
'mansion'
=>
'require|length:2,255'
,
'city'
=>
'require|length:2,10'
];
];
protected
$message
=
[
protected
$message
=
[
...
@@ -108,6 +109,8 @@ class OfficeBuildingRoomValidate extends Validate
...
@@ -108,6 +109,8 @@ class OfficeBuildingRoomValidate extends Validate
'title.require'
=>
'楼盘字段标题必传'
,
'title.require'
=>
'楼盘字段标题必传'
,
'mansion.require'
=>
'楼号/栋/座必传'
,
'mansion.require'
=>
'楼号/栋/座必传'
,
'mansion.length'
=>
'楼号/栋/座字数要在2至255之间'
,
'mansion.length'
=>
'楼号/栋/座字数要在2至255之间'
,
'city.require'
=>
'城市必填'
,
'city.length'
=>
'城市长度不正确'
];
];
protected
$scene
=
[
protected
$scene
=
[
...
@@ -121,6 +124,7 @@ class OfficeBuildingRoomValidate extends Validate
...
@@ -121,6 +124,7 @@ class OfficeBuildingRoomValidate extends Validate
'is_carefully_chosen'
=>
[
'id'
,
'is_carefully_chosen'
],
'is_carefully_chosen'
=>
[
'id'
,
'is_carefully_chosen'
],
'exclusive'
=>
[
'agent_start_time,agent_end_time,is_exclusive_type,id'
],
'exclusive'
=>
[
'agent_start_time,agent_end_time,is_exclusive_type,id'
],
'del'
=>
[
'id'
],
'del'
=>
[
'id'
],
'show'
=>
'id,is_show'
'show'
=>
'id,is_show'
,
'checkRepetition'
=>
'city,mansion,floor,room_number'
];
];
}
}
\ No newline at end of file
application/model/OfficeGRoom.php
View file @
1bf0685c
...
@@ -454,6 +454,29 @@ class OfficeGRoom extends BaseModel
...
@@ -454,6 +454,29 @@ class OfficeGRoom extends BaseModel
->
find
();
->
find
();
}
}
/**
* @param int $pageNo
* @param int $pageSize
* @param $field
* @param $params
* @param string $order
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
function
getRoomBuildingListLimit
(
$pageNo
=
1
,
$pageSize
=
15
,
$field
,
$params
,
$order
=
'a.id desc'
)
{
return
$data
=
$this
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"office_g_building b"
,
"a.building_id=b.id"
,
"left"
)
->
where
(
$params
)
->
order
(
$order
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
}
/**
/**
* @param $field
* @param $field
* @param $params
* @param $params
...
...
application/route.php
View file @
1bf0685c
...
@@ -1007,6 +1007,7 @@ Route::group('office', [
...
@@ -1007,6 +1007,7 @@ Route::group('office', [
'collectionListByBargainId'
=>
[
'api_broker/OfficePerformance/collectionListByBargainId'
,
[
'method'
=>
'POST|GET'
]
],
'collectionListByBargainId'
=>
[
'api_broker/OfficePerformance/collectionListByBargainId'
,
[
'method'
=>
'POST|GET'
]
],
'getOfficeRoomByReport'
=>
[
'api_broker/OfficeRoom/getOfficeRoomByReport'
,
[
'method'
=>
'get|post'
]
],
'getOfficeRoomByReport'
=>
[
'api_broker/OfficeRoom/getOfficeRoomByReport'
,
[
'method'
=>
'get|post'
]
],
'followUpLog'
=>
[
'api_broker/OfficeUser/followUpLog'
,
[
'method'
=>
'get|post'
]
],
'followUpLog'
=>
[
'api_broker/OfficeUser/followUpLog'
,
[
'method'
=>
'get|post'
]
],
'getHouseAddress'
=>
[
'api_broker/OfficeRoom/checkRepetition'
,
[
'method'
=>
'get'
]],
//搜索楼号/栋/座+楼层+房号
]);
]);
...
@@ -1054,6 +1055,7 @@ Route::group('office_index', [
...
@@ -1054,6 +1055,7 @@ Route::group('office_index', [
'inspectionRecordDistrict/:check_status'
=>
[
'index/OfficeReport/inspectionRecordAll'
,
[
'method'
=>
'GET'
],
[
'check_status'
=>
2
]],
//部门约带看
'inspectionRecordDistrict/:check_status'
=>
[
'index/OfficeReport/inspectionRecordAll'
,
[
'method'
=>
'GET'
],
[
'check_status'
=>
2
]],
//部门约带看
'inspectionRecordAll/:check_status'
=>
[
'index/OfficeReport/inspectionRecordAll'
,
[
'method'
=>
'GET'
],
[
'check_status'
=>
3
]],
//全部约带看
'inspectionRecordAll/:check_status'
=>
[
'index/OfficeReport/inspectionRecordAll'
,
[
'method'
=>
'GET'
],
[
'check_status'
=>
3
]],
//全部约带看
'getDistance'
=>
[
'index/OfficeManage/getDistance'
,
[
'method'
=>
'GET'
]],
//获取两个经纬度距离
'getDistance'
=>
[
'index/OfficeManage/getDistance'
,
[
'method'
=>
'GET'
]],
//获取两个经纬度距离
'getHouseAddress'
=>
[
'index/OfficeRoom/checkRepetition'
,
[
'method'
=>
'get'
]],
//搜索楼号/栋/座+楼层+房号
]);
]);
Route
::
group
(
'office_api'
,
[
Route
::
group
(
'office_api'
,
[
...
...
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