Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
ruer_cms
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蔡闯
ruer_cms
Commits
0b940e82
Commit
0b940e82
authored
Mar 02, 2021
by
蔡闯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改物业服务时间
parent
437491c4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
21 deletions
+14
-21
app/api/controller/Base.php
app/api/controller/Base.php
+1
-0
app/common.php
app/common.php
+0
-1
app/common/controller/Common.php
app/common/controller/Common.php
+1
-6
app/shequ/controller/News.php
app/shequ/controller/News.php
+0
-2
app/shequ/controller/Vacancy.php
app/shequ/controller/Vacancy.php
+12
-12
No files found.
app/api/controller/Base.php
View file @
0b940e82
...
@@ -8,6 +8,7 @@ class Base extends \app\BaseController
...
@@ -8,6 +8,7 @@ class Base extends \app\BaseController
public
function
__construct
(
\think\App
$app
)
public
function
__construct
(
\think\App
$app
)
{
{
;
parent
::
__construct
(
$app
);
parent
::
__construct
(
$app
);
if
(
Request
::
header
(
"token"
)){
if
(
Request
::
header
(
"token"
)){
...
...
app/common.php
View file @
0b940e82
<?php
<?php
// 应用公共文件
// 应用公共文件
/**
/**
* @param $url
* @param $url
* @return array
* @return array
...
...
app/common/controller/Common.php
View file @
0b940e82
...
@@ -898,12 +898,7 @@ class Common extends BaseController
...
@@ -898,12 +898,7 @@ class Common extends BaseController
}
}
$savename
=
\think\facade\Filesystem
::
putFile
(
$path
,
$file
);
$savename
=
\think\facade\Filesystem
::
putFile
(
$path
,
$file
);
// if(isHTTPS()){
// $http = "https://";
// } else {
// $http = "http://";
// }
// $data['path'] = $http.$_SERVER['SERVER_NAME']."/upload/".$savename;
$data
[
'data'
]
=
"/upload/"
.
$savename
;
$data
[
'data'
]
=
"/upload/"
.
$savename
;
return
$data
;
return
$data
;
...
...
app/shequ/controller/News.php
View file @
0b940e82
...
@@ -79,7 +79,6 @@ class News extends Base
...
@@ -79,7 +79,6 @@ class News extends Base
$add
=
Db
::
name
(
'news'
)
->
where
(
$where
)
->
save
(
$data
);
$add
=
Db
::
name
(
'news'
)
->
where
(
$where
)
->
save
(
$data
);
}
else
{
}
else
{
$add
=
Db
::
name
(
'news'
)
->
save
(
$data
);
$add
=
Db
::
name
(
'news'
)
->
save
(
$data
);
}
}
if
(
$add
)
{
if
(
$add
)
{
return
$this
->
returnJson
([],
'success'
);
return
$this
->
returnJson
([],
'success'
);
...
@@ -169,7 +168,6 @@ class News extends Base
...
@@ -169,7 +168,6 @@ class News extends Base
$add
=
Db
::
name
(
'notice'
)
->
where
(
$where
)
->
save
(
$data
);
$add
=
Db
::
name
(
'notice'
)
->
where
(
$where
)
->
save
(
$data
);
}
else
{
}
else
{
$add
=
Db
::
name
(
'notice'
)
->
save
(
$data
);
$add
=
Db
::
name
(
'notice'
)
->
save
(
$data
);
}
}
if
(
$add
)
{
if
(
$add
)
{
return
$this
->
returnJson
([],
'success'
);
return
$this
->
returnJson
([],
'success'
);
...
...
app/shequ/controller/Vacancy.php
View file @
0b940e82
...
@@ -77,16 +77,15 @@ class Vacancy extends Base
...
@@ -77,16 +77,15 @@ class Vacancy extends Base
}
else
{
}
else
{
$res
=
$this
->
checkVacancyCode
(
$vacancy_code
,
0
,
$data
[
'layout_id'
]
);
$res
=
$this
->
checkVacancyCode
(
$vacancy_code
,
0
,
$data
[
'layout_id'
]
);
}
}
if
(
$res
[
'code'
]
!=
200
)
{
if
(
$res
[
'code'
]
!=
200
)
{
return
$this
->
returnJson
([],
$res
[
'msg'
],
400
);
return
$this
->
returnJson
([],
$res
[
'msg'
],
400
);
}
}
$data
[
'vacancy_code'
]
=
$vacancy_code
;
$data
[
'vacancy_code'
]
=
$vacancy_code
;
$data
[
'name'
]
=
$add
[
'name'
]
=
Request
::
param
(
'name'
);
//业主姓名
$data
[
'name'
]
=
$add
[
'name'
]
=
Request
::
param
(
'name'
);
//业主姓名
$data
[
'id_card'
]
=
$add
[
'id_card'
]
=
Request
::
param
(
'id_card'
);
//身份证id /
$data
[
'id_card'
]
=
$add
[
'id_card'
]
=
Request
::
param
(
'id_card'
);
//身份证id /
$phone
=
Request
::
param
(
'phone'
);
//业主手机号
$phone
=
Request
::
param
(
'phone'
);
//业主手机号
if
(
!
isPhoneNo
(
$phone
))
{
return
$this
->
returnJson
([],
'手机号不合法!'
,
400
);
}
$data
[
'phone'
]
=
$add
[
'phone'
]
=
$phone
;
$data
[
'phone'
]
=
$add
[
'phone'
]
=
$phone
;
if
(
Request
::
param
(
'property_start_time'
)
&&
Request
::
param
(
'property_end_time'
))
{
if
(
Request
::
param
(
'property_start_time'
)
&&
Request
::
param
(
'property_end_time'
))
{
$data
[
'property_start_time'
]
=
date
(
'Y-m'
,
strtotime
(
Request
::
param
(
'property_start_time'
)));
$data
[
'property_start_time'
]
=
date
(
'Y-m'
,
strtotime
(
Request
::
param
(
'property_start_time'
)));
...
@@ -129,7 +128,7 @@ class Vacancy extends Base
...
@@ -129,7 +128,7 @@ class Vacancy extends Base
$data
[
'park_car_id'
]
=
$is_exit
[
'park_car_id'
];
$data
[
'park_car_id'
]
=
$is_exit
[
'park_car_id'
];
}
}
if
(
$vacancy_id
)
{
//修改
if
(
$vacancy_id
)
{
//修改
$operation
=
Db
::
name
(
'house_vacancy'
)
->
where
([
'vacancy_id'
=>
$vacancy_id
])
->
updat
e
(
$data
);
$operation
=
Db
::
name
(
'house_vacancy'
)
->
where
([
'vacancy_id'
=>
$vacancy_id
])
->
sav
e
(
$data
);
$change
=
Db
::
name
(
'house_user_bind'
)
->
where
([
'vacancy_id'
=>
$vacancy_id
])
->
save
(
$add
);
$change
=
Db
::
name
(
'house_user_bind'
)
->
where
([
'vacancy_id'
=>
$vacancy_id
])
->
save
(
$add
);
if
(
$operation
||
$change
)
{
if
(
$operation
||
$change
)
{
return
$this
->
returnJson
([],
'success'
);
return
$this
->
returnJson
([],
'success'
);
...
@@ -196,14 +195,15 @@ class Vacancy extends Base
...
@@ -196,14 +195,15 @@ class Vacancy extends Base
//查看布局是否黑
//查看布局是否黑
$layoutCode
=
Db
::
name
(
'layout_list'
)
->
where
([
'layout_id'
=>
$layout_id
])
->
value
(
'code'
);
$layoutCode
=
Db
::
name
(
'layout_list'
)
->
where
([
'layout_id'
=>
$layout_id
])
->
value
(
'code'
);
if
(
count
(
$array
)
!=
count
(
explode
(
'-'
,
$layoutCode
))){
if
(
count
(
$array
)
!=
count
(
explode
(
'-'
,
$layoutCode
))){
return
[
'code'
=>
400
,
'msg'
=>
'
房间位置
不合法!'
];
return
[
'code'
=>
400
,
'msg'
=>
'
物业编号
不合法!'
];
}
}
//去掉最后一个房间编号的
//去掉最后一个房间编号的
array_pop
(
$array
);
array_pop
(
$array
);
$count
=
Db
::
name
(
'layout_build'
)
->
where
(
'layout_build_id'
,
'in'
,
$array
)
->
count
();
$count
=
Db
::
name
(
'layout_build'
)
->
where
(
'layout_build_id'
,
'in'
,
$array
)
->
count
();
if
(
$count
!=
count
(
$array
))
{
if
(
$count
!=
count
(
$array
))
{
return
[
'code'
=>
400
,
'msg'
=>
'
房间位置
不合法!'
];
return
[
'code'
=>
400
,
'msg'
=>
'
物业编号
不合法!'
];
}
else
{
}
else
{
return
[
'code'
=>
200
,
'msg'
=>
'success!'
];
return
[
'code'
=>
200
,
'msg'
=>
'success!'
];
}
}
...
@@ -211,16 +211,16 @@ class Vacancy extends Base
...
@@ -211,16 +211,16 @@ class Vacancy extends Base
}
}
//判断输入的物业开始时间和结束时间是否合理
//判断输入的物业开始时间和结束时间是否合理
public
function
checkVacancyPropertyTime
(
$stat_time
,
$end_time
){
public
function
checkVacancyPropertyTime
(
$sta
r
t_time
,
$end_time
){
if
(
$stat_time
==
$end_time
)
{
if
(
$sta
r
t_time
==
$end_time
)
{
return
[
'code'
=>
400
,
'msg'
=>
"开始时间和结束时间不能相同!"
];
return
[
'code'
=>
400
,
'msg'
=>
"开始时间和结束时间不能相同!"
];
}
}
$new_time
=
date
(
'Y-m'
,
time
());
$new_time
=
date
(
'Y-m'
,
time
());
if
(
$stat_time
==
$new_time
)
{
if
(
$sta
r
t_time
==
$new_time
)
{
return
[
'code'
=>
400
,
'msg'
=>
"开始时间不能早于当前月份!"
];
return
[
'code'
=>
400
,
'msg'
=>
"开始时间不能早于当前月份!"
];
}
}
if
(
$sta
t_time
>
$end_time
||
$stat_time
=
$end_time
)
{
if
(
$sta
rt_time
>
$end_time
)
{
return
[
'code'
=>
400
,
'msg'
=>
"开始时间不能大于结束时间!"
];
return
[
'code'
=>
400
,
'msg'
=>
"开始时间不能大于结束时间!"
];
}
}
...
@@ -231,7 +231,7 @@ class Vacancy extends Base
...
@@ -231,7 +231,7 @@ class Vacancy extends Base
return
[
'code'
=>
400
,
'msg'
=>
"结束时间不能设置不能超过2年!"
];
return
[
'code'
=>
400
,
'msg'
=>
"结束时间不能设置不能超过2年!"
];
}
}
return
[
'code'
=>
200
,
'msg'
=>
"success!"
];
}
}
//通过房间编号获取房间地址
//通过房间编号获取房间地址
...
...
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