Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pingshan-ranqi
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
yaqizhang
pingshan-ranqi
Commits
17b20b75
Commit
17b20b75
authored
Nov 06, 2021
by
王晓倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
管道和设备按企业id查询,探测器和探测器用户模块
parent
e0d5ec7f
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
1585 additions
and
16 deletions
+1585
-16
TDetectorInfoController.java
...hong/web/controller/detector/TDetectorInfoController.java
+108
-0
TDetectorUserController.java
...hong/web/controller/detector/TDetectorUserController.java
+115
-0
TDeviceInfoController.java
...m/zehong/web/controller/device/TDeviceInfoController.java
+26
-3
TPipeController.java
...ava/com/zehong/web/controller/device/TPipeController.java
+26
-3
application-dev.yml
gassafety-admin/src/main/resources/application-dev.yml
+2
-2
application-prd.yml
gassafety-admin/src/main/resources/application-prd.yml
+2
-2
application-test.yml
gassafety-admin/src/main/resources/application-test.yml
+1
-1
application.yml
gassafety-admin/src/main/resources/application.yml
+2
-2
TDetectorInfo.java
...src/main/java/com/zehong/system/domain/TDetectorInfo.java
+278
-0
TDetectorUser.java
...src/main/java/com/zehong/system/domain/TDetectorUser.java
+191
-0
TDetectorInfoMapper.java
...in/java/com/zehong/system/mapper/TDetectorInfoMapper.java
+61
-0
TDetectorUserMapper.java
...in/java/com/zehong/system/mapper/TDetectorUserMapper.java
+61
-0
ITDetectorInfoService.java
...java/com/zehong/system/service/ITDetectorInfoService.java
+70
-0
ITDetectorUserService.java
...java/com/zehong/system/service/ITDetectorUserService.java
+70
-0
TDetectorInfoServiceImpl.java
.../zehong/system/service/impl/TDetectorInfoServiceImpl.java
+106
-0
TDetectorUserServiceImpl.java
.../zehong/system/service/impl/TDetectorUserServiceImpl.java
+106
-0
TDetectorInfoMapper.xml
.../src/main/resources/mapper/system/TDetectorInfoMapper.xml
+135
-0
TDetectorUserMapper.xml
.../src/main/resources/mapper/system/TDetectorUserMapper.xml
+106
-0
.env.production
gassafety-web/.env.production
+3
-3
detectorInfo.js
gassafety-web/src/api/detector/detectorInfo.js
+54
-0
detectorUser.js
gassafety-web/src/api/detector/detectorUser.js
+62
-0
No files found.
gassafety-admin/src/main/java/com/zehong/web/controller/detector/TDetectorInfoController.java
0 → 100644
View file @
17b20b75
package
com
.
zehong
.
web
.
controller
.
detector
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.zehong.common.annotation.Log
;
import
com.zehong.common.core.controller.BaseController
;
import
com.zehong.common.core.domain.AjaxResult
;
import
com.zehong.common.enums.BusinessType
;
import
com.zehong.system.domain.TDetectorInfo
;
import
com.zehong.system.service.ITDetectorInfoService
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.github.pagehelper.PageInfo
;
import
com.zehong.common.core.page.TableDataInfo
;
/**
* 探测器Controller
*
* @author zehong
* @date 2021-11-02
*/
@RestController
@RequestMapping
(
"/detector/detectorInfo"
)
public
class
TDetectorInfoController
extends
BaseController
{
@Autowired
private
ITDetectorInfoService
tDetectorInfoService
;
/**
* 查询探测器列表
*/
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
TDetectorInfo
tDetectorInfo
)
{
startPage
();
PageInfo
<
TDetectorInfo
>
list
=
tDetectorInfoService
.
selectTDetectorInfoPage
(
tDetectorInfo
);
return
getDataTable
(
list
);
}
/**
* 获取探测器列表
* @param tDetectorInfo
* @return
*/
@GetMapping
(
"/detectorInfoList"
)
public
AjaxResult
detectorInfoList
(
TDetectorInfo
tDetectorInfo
){
return
AjaxResult
.
success
(
tDetectorInfoService
.
selectTDetectorInfoList
(
tDetectorInfo
));
}
/**
* 导出探测器列表
*/
@Log
(
title
=
"探测器"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
TDetectorInfo
tDetectorInfo
)
{
List
<
TDetectorInfo
>
list
=
tDetectorInfoService
.
selectTDetectorInfoList
(
tDetectorInfo
);
ExcelUtil
<
TDetectorInfo
>
util
=
new
ExcelUtil
<
TDetectorInfo
>(
TDetectorInfo
.
class
);
return
util
.
exportExcel
(
list
,
"探测器数据"
);
}
/**
* 获取探测器详细信息
*/
@GetMapping
(
value
=
"/{detectorId}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"detectorId"
)
Long
detectorId
)
{
return
AjaxResult
.
success
(
tDetectorInfoService
.
selectTDetectorInfoById
(
detectorId
));
}
/**
* 新增探测器
*/
@Log
(
title
=
"探测器"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
TDetectorInfo
tDetectorInfo
)
{
return
toAjax
(
tDetectorInfoService
.
insertTDetectorInfo
(
tDetectorInfo
));
}
/**
* 修改探测器
*/
@Log
(
title
=
"探测器"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
TDetectorInfo
tDetectorInfo
)
{
return
toAjax
(
tDetectorInfoService
.
updateTDetectorInfo
(
tDetectorInfo
));
}
/**
* 删除探测器
*/
@Log
(
title
=
"探测器"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{detectorIds}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
detectorIds
)
{
return
toAjax
(
tDetectorInfoService
.
deleteTDetectorInfoByIds
(
detectorIds
));
}
}
gassafety-admin/src/main/java/com/zehong/web/controller/detector/TDetectorUserController.java
0 → 100644
View file @
17b20b75
package
com
.
zehong
.
web
.
controller
.
detector
;
import
java.util.List
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.zehong.common.annotation.Log
;
import
com.zehong.common.core.controller.BaseController
;
import
com.zehong.common.core.domain.AjaxResult
;
import
com.zehong.common.enums.BusinessType
;
import
com.zehong.system.domain.TDetectorUser
;
import
com.zehong.system.service.ITDetectorUserService
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.github.pagehelper.PageInfo
;
import
com.zehong.common.core.page.TableDataInfo
;
/**
* 探测器用户Controller
*
* @author zehong
* @date 2021-11-02
*/
@RestController
@RequestMapping
(
"/detector/detectorUser"
)
public
class
TDetectorUserController
extends
BaseController
{
@Autowired
private
ITDetectorUserService
tDetectorUserService
;
/**
* 查询探测器用户列表
*/
@PreAuthorize
(
"@ss.hasPermi('detector:detectorUser:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
TDetectorUser
tDetectorUser
)
{
startPage
();
PageInfo
<
TDetectorUser
>
list
=
tDetectorUserService
.
selectTDetectorUserPage
(
tDetectorUser
);
return
getDataTable
(
list
);
}
/**
* 获取探测器用户列表
* @param tDetectorUser
* @return
*/
@GetMapping
(
"/detectorUserList"
)
public
AjaxResult
detectorUserList
(
TDetectorUser
tDetectorUser
){
return
AjaxResult
.
success
(
tDetectorUserService
.
selectTDetectorUserList
(
tDetectorUser
));
}
/**
* 导出探测器用户列表
*/
@PreAuthorize
(
"@ss.hasPermi('detector:detectorUser:export')"
)
@Log
(
title
=
"探测器用户"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
TDetectorUser
tDetectorUser
)
{
List
<
TDetectorUser
>
list
=
tDetectorUserService
.
selectTDetectorUserList
(
tDetectorUser
);
ExcelUtil
<
TDetectorUser
>
util
=
new
ExcelUtil
<
TDetectorUser
>(
TDetectorUser
.
class
);
return
util
.
exportExcel
(
list
,
"探测器用户数据"
);
}
/**
* 获取探测器用户详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('detector:detectorUser:query')"
)
@GetMapping
(
value
=
"/{userId}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"userId"
)
Long
userId
)
{
return
AjaxResult
.
success
(
tDetectorUserService
.
selectTDetectorUserById
(
userId
));
}
/**
* 新增探测器用户
*/
@PreAuthorize
(
"@ss.hasPermi('detector:detectorUser:add')"
)
@Log
(
title
=
"探测器用户"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
TDetectorUser
tDetectorUser
)
{
return
toAjax
(
tDetectorUserService
.
insertTDetectorUser
(
tDetectorUser
));
}
/**
* 修改探测器用户
*/
@PreAuthorize
(
"@ss.hasPermi('detector:detectorUser:edit')"
)
@Log
(
title
=
"探测器用户"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
TDetectorUser
tDetectorUser
)
{
return
toAjax
(
tDetectorUserService
.
updateTDetectorUser
(
tDetectorUser
));
}
/**
* 删除探测器用户
*/
@PreAuthorize
(
"@ss.hasPermi('detector:detectorUser:remove')"
)
@Log
(
title
=
"探测器用户"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{userIds}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
userIds
)
{
return
toAjax
(
tDetectorUserService
.
deleteTDetectorUserByIds
(
userIds
));
}
}
gassafety-admin/src/main/java/com/zehong/web/controller/device/TDeviceInfoController.java
View file @
17b20b75
...
@@ -14,6 +14,8 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -14,6 +14,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -44,12 +46,33 @@ public class TDeviceInfoController extends BaseController
...
@@ -44,12 +46,33 @@ public class TDeviceInfoController extends BaseController
/**
/**
* 获取所有设备信息
* 获取所有设备信息
* @param
tDeviceInfo
* @param
ids
* @return
* @return
*/
*/
@GetMapping
(
"/deviceListInfo"
)
@GetMapping
(
"/deviceListInfo"
)
public
AjaxResult
deviceListInfo
(
TDeviceInfo
tDeviceInfo
){
public
AjaxResult
deviceListInfo
(
String
ids
){
return
AjaxResult
.
success
(
tDeviceInfoService
.
selectTDeviceInfoList
(
tDeviceInfo
));
if
(
""
.
equals
(
ids
)
||
ids
==
null
){
return
AjaxResult
.
success
(
tDeviceInfoService
.
selectTDeviceInfoList
(
new
TDeviceInfo
()));
}
else
{
List
<
Map
>
result
=
new
ArrayList
<>();
String
[]
arr
=
ids
.
split
(
","
);
for
(
String
str
:
arr
){
Integer
id
=
Integer
.
valueOf
(
str
);
TDeviceInfo
tDeviceInfo
=
new
TDeviceInfo
();
tDeviceInfo
.
setEnterpriseId
(
id
);
List
<
DeviceInfoVo
>
list
=
tDeviceInfoService
.
selectTDeviceInfoList
(
tDeviceInfo
);
Map
<
Object
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"enterpriseId"
,
str
);
map
.
put
(
"deviceList"
,
list
);
result
.
add
(
map
);
}
return
AjaxResult
.
success
(
result
);
}
}
}
/**
/**
...
...
gassafety-admin/src/main/java/com/zehong/web/controller/device/TPipeController.java
View file @
17b20b75
...
@@ -14,7 +14,10 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -14,7 +14,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 管道信息Controller
* 管道信息Controller
...
@@ -43,10 +46,30 @@ public class TPipeController extends BaseController
...
@@ -43,10 +46,30 @@ public class TPipeController extends BaseController
@GetMapping
(
"/pipeAllInfoList"
)
@GetMapping
(
"/pipeAllInfoList"
)
public
AjaxResult
pipeAllInfoList
(
TPipe
tPipe
)
public
AjaxResult
pipeAllInfoList
(
String
ids
)
{
{
List
<
PipeVo
>
list
=
tPipeService
.
selectTPipeList
(
tPipe
);
if
(
""
.
equals
(
ids
)
||
ids
==
null
){
return
AjaxResult
.
success
(
list
);
return
AjaxResult
.
success
(
tPipeService
.
selectTPipeList
(
new
TPipe
()));
}
else
{
List
<
Map
>
result
=
new
ArrayList
<>();
String
[]
arr
=
ids
.
split
(
","
);
for
(
String
str
:
arr
){
Integer
id
=
Integer
.
valueOf
(
str
);
TPipe
tPipe
=
new
TPipe
();
tPipe
.
setEnterpriseId
(
id
);
List
<
PipeVo
>
list
=
tPipeService
.
selectTPipeList
(
tPipe
);
Map
<
Object
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"enterpriseId"
,
str
);
map
.
put
(
"pipeList"
,
list
);
result
.
add
(
map
);
}
return
AjaxResult
.
success
(
result
);
}
}
}
/**
/**
...
...
gassafety-admin/src/main/resources/application-dev.yml
View file @
17b20b75
...
@@ -6,7 +6,7 @@ spring:
...
@@ -6,7 +6,7 @@ spring:
druid
:
druid
:
# 主库数据源
# 主库数据源
master
:
master
:
url
:
jdbc:mysql://36.148.23.59:3306/gas_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
url
:
jdbc:mysql://36.148.23.59:3306/gas_db
_pingshan
?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username
:
root
username
:
root
password
:
root@123
password
:
root@123
# 从库数据源
# 从库数据源
...
@@ -58,7 +58,7 @@ spring:
...
@@ -58,7 +58,7 @@ spring:
# redis 配置
# redis 配置
redis
:
redis
:
# 地址
# 地址
host
:
localhost
host
:
36.148.23.59
# 端口,默认为6379
# 端口,默认为6379
port
:
6379
port
:
6379
# 数据库索引
# 数据库索引
...
...
gassafety-admin/src/main/resources/application-prd.yml
View file @
17b20b75
...
@@ -6,7 +6,7 @@ spring:
...
@@ -6,7 +6,7 @@ spring:
druid
:
druid
:
# 主库数据源
# 主库数据源
master
:
master
:
url
:
jdbc:mysql://36.148.23.59:3306/gas_db_p
rod
?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
url
:
jdbc:mysql://36.148.23.59:3306/gas_db_p
ingshan
?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username
:
root
username
:
root
password
:
root@123
password
:
root@123
# 从库数据源
# 从库数据源
...
@@ -58,7 +58,7 @@ spring:
...
@@ -58,7 +58,7 @@ spring:
# redis 配置
# redis 配置
redis
:
redis
:
# 地址
# 地址
host
:
localhost
host
:
36.148.23.59
# 端口,默认为6379
# 端口,默认为6379
port
:
6379
port
:
6379
# 数据库索引
# 数据库索引
...
...
gassafety-admin/src/main/resources/application-test.yml
View file @
17b20b75
...
@@ -6,7 +6,7 @@ spring:
...
@@ -6,7 +6,7 @@ spring:
druid
:
druid
:
# 主库数据源
# 主库数据源
master
:
master
:
url
:
jdbc:mysql://36.148.23.59:3306/gas_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
url
:
jdbc:mysql://36.148.23.59:3306/gas_db
_pingshan
?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username
:
root
username
:
root
password
:
root@123
password
:
root@123
# 从库数据源
# 从库数据源
...
...
gassafety-admin/src/main/resources/application.yml
View file @
17b20b75
# 开发环境配置
# 开发环境配置
server
:
server
:
# 服务器的HTTP端口,默认为8080
# 服务器的HTTP端口,默认为8080
port
:
890
3
port
:
890
4
servlet
:
servlet
:
# 应用的访问路径
# 应用的访问路径
context-path
:
/gassafety
context-path
:
/gassafety
...
@@ -26,7 +26,7 @@ spring:
...
@@ -26,7 +26,7 @@ spring:
# 国际化资源文件路径
# 国际化资源文件路径
basename
:
i18n/messages
basename
:
i18n/messages
profiles
:
profiles
:
active
:
test
active
:
prd
# 文件上传
# 文件上传
servlet
:
servlet
:
multipart
:
multipart
:
...
...
gassafety-system/src/main/java/com/zehong/system/domain/TDetectorInfo.java
0 → 100644
View file @
17b20b75
package
com
.
zehong
.
system
.
domain
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.zehong.common.annotation.Excel
;
import
com.zehong.common.core.domain.BaseEntity
;
/**
* 探测器对象 t_detector_info
*
* @author zehong
* @date 2021-11-02
*/
public
class
TDetectorInfo
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 设备id */
private
Long
detectorId
;
/** 企业id */
private
Integer
enterpriseId
;
/** 用户id */
@Excel
(
name
=
"用户id"
)
private
Long
userId
;
/** 设备名称 */
@Excel
(
name
=
"设备名称"
)
private
String
detectorName
;
/** 设备编号 */
@Excel
(
name
=
"设备编号"
)
private
String
detectorCode
;
/** 设备地址 */
@Excel
(
name
=
"设备地址"
)
private
String
detectorAddr
;
/** 设备型号 */
@Excel
(
name
=
"设备型号"
)
private
String
detectorModel
;
/** 设备类型(1家用报警器,2商业报警器,3工业报警器) */
@Excel
(
name
=
"设备类型"
,
readConverterExp
=
"1=家用报警器,2商业报警器,3工业报警器"
)
private
String
detectorType
;
/** 检测介质(1甲烷,2氨气,3一氧化碳,4可燃气体,5有毒气体) */
@Excel
(
name
=
"检测介质"
,
readConverterExp
=
"1甲烷,2氨气,3一氧化碳,4可燃气体,5有毒气体"
)
private
String
medium
;
/** 经度 */
@Excel
(
name
=
"经度"
)
private
BigDecimal
longitude
;
/** 纬度 */
@Excel
(
name
=
"纬度"
)
private
BigDecimal
latitude
;
/** 物联网编号 */
@Excel
(
name
=
"物联网编号"
)
private
String
iotNo
;
/** 联系人 */
@Excel
(
name
=
"联系人"
)
private
String
linkman
;
/** 电话 */
@Excel
(
name
=
"电话"
)
private
String
phone
;
/** 安装时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"安装时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
installationTime
;
/** 最后巡检时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"最后巡检时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
inspectionTime
;
/** 是否删除(0正常,1删除) */
@Excel
(
name
=
"是否删除(0正常,1删除)"
)
private
String
isDel
;
/** 备注 */
@Excel
(
name
=
"备注"
)
private
String
remarks
;
public
void
setDetectorId
(
Long
detectorId
)
{
this
.
detectorId
=
detectorId
;
}
public
Long
getDetectorId
()
{
return
detectorId
;
}
public
Integer
getEnterpriseId
()
{
return
enterpriseId
;
}
public
void
setEnterpriseId
(
Integer
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
public
void
setUserId
(
Long
userId
)
{
this
.
userId
=
userId
;
}
public
Long
getUserId
()
{
return
userId
;
}
public
void
setDetectorName
(
String
detectorName
)
{
this
.
detectorName
=
detectorName
;
}
public
String
getDetectorName
()
{
return
detectorName
;
}
public
void
setDetectorCode
(
String
detectorCode
)
{
this
.
detectorCode
=
detectorCode
;
}
public
String
getDetectorCode
()
{
return
detectorCode
;
}
public
void
setDetectorAddr
(
String
detectorAddr
)
{
this
.
detectorAddr
=
detectorAddr
;
}
public
String
getDetectorAddr
()
{
return
detectorAddr
;
}
public
void
setDetectorModel
(
String
detectorModel
)
{
this
.
detectorModel
=
detectorModel
;
}
public
String
getDetectorModel
()
{
return
detectorModel
;
}
public
void
setDetectorType
(
String
detectorType
)
{
this
.
detectorType
=
detectorType
;
}
public
String
getDetectorType
()
{
return
detectorType
;
}
public
void
setMedium
(
String
medium
)
{
this
.
medium
=
medium
;
}
public
String
getMedium
()
{
return
medium
;
}
public
void
setLongitude
(
BigDecimal
longitude
)
{
this
.
longitude
=
longitude
;
}
public
BigDecimal
getLongitude
()
{
return
longitude
;
}
public
void
setLatitude
(
BigDecimal
latitude
)
{
this
.
latitude
=
latitude
;
}
public
BigDecimal
getLatitude
()
{
return
latitude
;
}
public
void
setIotNo
(
String
iotNo
)
{
this
.
iotNo
=
iotNo
;
}
public
String
getIotNo
()
{
return
iotNo
;
}
public
void
setLinkman
(
String
linkman
)
{
this
.
linkman
=
linkman
;
}
public
String
getLinkman
()
{
return
linkman
;
}
public
void
setPhone
(
String
phone
)
{
this
.
phone
=
phone
;
}
public
String
getPhone
()
{
return
phone
;
}
public
void
setInstallationTime
(
Date
installationTime
)
{
this
.
installationTime
=
installationTime
;
}
public
Date
getInstallationTime
()
{
return
installationTime
;
}
public
void
setInspectionTime
(
Date
inspectionTime
)
{
this
.
inspectionTime
=
inspectionTime
;
}
public
Date
getInspectionTime
()
{
return
inspectionTime
;
}
public
void
setIsDel
(
String
isDel
)
{
this
.
isDel
=
isDel
;
}
public
String
getIsDel
()
{
return
isDel
;
}
public
void
setRemarks
(
String
remarks
)
{
this
.
remarks
=
remarks
;
}
public
String
getRemarks
()
{
return
remarks
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"detectorId"
,
getDetectorId
())
.
append
(
"userId"
,
getUserId
())
.
append
(
"detectorName"
,
getDetectorName
())
.
append
(
"detectorCode"
,
getDetectorCode
())
.
append
(
"detectorAddr"
,
getDetectorAddr
())
.
append
(
"detectorModel"
,
getDetectorModel
())
.
append
(
"detectorType"
,
getDetectorType
())
.
append
(
"medium"
,
getMedium
())
.
append
(
"longitude"
,
getLongitude
())
.
append
(
"latitude"
,
getLatitude
())
.
append
(
"iotNo"
,
getIotNo
())
.
append
(
"linkman"
,
getLinkman
())
.
append
(
"phone"
,
getPhone
())
.
append
(
"installationTime"
,
getInstallationTime
())
.
append
(
"inspectionTime"
,
getInspectionTime
())
.
append
(
"isDel"
,
getIsDel
())
.
append
(
"remarks"
,
getRemarks
())
.
toString
();
}
}
gassafety-system/src/main/java/com/zehong/system/domain/TDetectorUser.java
0 → 100644
View file @
17b20b75
package
com
.
zehong
.
system
.
domain
;
import
java.math.BigDecimal
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.zehong.common.annotation.Excel
;
import
com.zehong.common.core.domain.BaseEntity
;
/**
* 探测器用户对象 t_detector_user
*
* @author zehong
* @date 2021-11-02
*/
public
class
TDetectorUser
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 用户id */
private
Long
userId
;
/** 用户账号 */
@Excel
(
name
=
"用户账号"
)
private
String
username
;
/** 用户名称 */
@Excel
(
name
=
"用户名称"
)
private
String
nickName
;
/** 用户类型(1居民用户,2商业用户,3工业用户) */
@Excel
(
name
=
"用户类型"
,
readConverterExp
=
"1居民用户,2商业用户,3工业用户"
)
private
String
userType
;
/** 地址 */
@Excel
(
name
=
"地址"
)
private
String
address
;
/** 经度 */
@Excel
(
name
=
"经度"
)
private
BigDecimal
longitude
;
/** 纬度 */
@Excel
(
name
=
"纬度"
)
private
BigDecimal
latitude
;
/** 联系人 */
@Excel
(
name
=
"联系人"
)
private
String
linkman
;
/** 电话 */
@Excel
(
name
=
"电话"
)
private
String
phone
;
/** 邮箱 */
@Excel
(
name
=
"邮箱"
)
private
String
email
;
/** 是否删除(0正常,1删除) */
@Excel
(
name
=
"是否删除(0正常,1删除)"
)
private
String
isDel
;
/** 备注 */
@Excel
(
name
=
"备注"
)
private
String
remarks
;
public
void
setUserId
(
Long
userId
)
{
this
.
userId
=
userId
;
}
public
Long
getUserId
()
{
return
userId
;
}
public
void
setUsername
(
String
username
)
{
this
.
username
=
username
;
}
public
String
getUsername
()
{
return
username
;
}
public
void
setNickName
(
String
nickName
)
{
this
.
nickName
=
nickName
;
}
public
String
getNickName
()
{
return
nickName
;
}
public
String
getUserType
()
{
return
userType
;
}
public
void
setUserType
(
String
userType
)
{
this
.
userType
=
userType
;
}
public
void
setAddress
(
String
address
)
{
this
.
address
=
address
;
}
public
String
getAddress
()
{
return
address
;
}
public
void
setLongitude
(
BigDecimal
longitude
)
{
this
.
longitude
=
longitude
;
}
public
BigDecimal
getLongitude
()
{
return
longitude
;
}
public
void
setLatitude
(
BigDecimal
latitude
)
{
this
.
latitude
=
latitude
;
}
public
BigDecimal
getLatitude
()
{
return
latitude
;
}
public
void
setLinkman
(
String
linkman
)
{
this
.
linkman
=
linkman
;
}
public
String
getLinkman
()
{
return
linkman
;
}
public
void
setPhone
(
String
phone
)
{
this
.
phone
=
phone
;
}
public
String
getPhone
()
{
return
phone
;
}
public
void
setEmail
(
String
email
)
{
this
.
email
=
email
;
}
public
String
getEmail
()
{
return
email
;
}
public
void
setIsDel
(
String
isDel
)
{
this
.
isDel
=
isDel
;
}
public
String
getIsDel
()
{
return
isDel
;
}
public
void
setRemarks
(
String
remarks
)
{
this
.
remarks
=
remarks
;
}
public
String
getRemarks
()
{
return
remarks
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"userId"
,
getUserId
())
.
append
(
"username"
,
getUsername
())
.
append
(
"nickName"
,
getNickName
())
.
append
(
"address"
,
getAddress
())
.
append
(
"longitude"
,
getLongitude
())
.
append
(
"latitude"
,
getLatitude
())
.
append
(
"linkman"
,
getLinkman
())
.
append
(
"phone"
,
getPhone
())
.
append
(
"email"
,
getEmail
())
.
append
(
"isDel"
,
getIsDel
())
.
append
(
"remarks"
,
getRemarks
())
.
toString
();
}
}
gassafety-system/src/main/java/com/zehong/system/mapper/TDetectorInfoMapper.java
0 → 100644
View file @
17b20b75
package
com
.
zehong
.
system
.
mapper
;
import
java.util.List
;
import
com.zehong.system.domain.TDetectorInfo
;
/**
* 探测器Mapper接口
*
* @author zehong
* @date 2021-11-02
*/
public
interface
TDetectorInfoMapper
{
/**
* 查询探测器
*
* @param detectorId 探测器ID
* @return 探测器
*/
public
TDetectorInfo
selectTDetectorInfoById
(
Long
detectorId
);
/**
* 查询探测器列表
*
* @param tDetectorInfo 探测器
* @return 探测器集合
*/
public
List
<
TDetectorInfo
>
selectTDetectorInfoList
(
TDetectorInfo
tDetectorInfo
);
/**
* 新增探测器
*
* @param tDetectorInfo 探测器
* @return 结果
*/
public
int
insertTDetectorInfo
(
TDetectorInfo
tDetectorInfo
);
/**
* 修改探测器
*
* @param tDetectorInfo 探测器
* @return 结果
*/
public
int
updateTDetectorInfo
(
TDetectorInfo
tDetectorInfo
);
/**
* 删除探测器
*
* @param detectorId 探测器ID
* @return 结果
*/
public
int
deleteTDetectorInfoById
(
Long
detectorId
);
/**
* 批量删除探测器
*
* @param detectorIds 需要删除的数据ID
* @return 结果
*/
public
int
deleteTDetectorInfoByIds
(
Long
[]
detectorIds
);
}
gassafety-system/src/main/java/com/zehong/system/mapper/TDetectorUserMapper.java
0 → 100644
View file @
17b20b75
package
com
.
zehong
.
system
.
mapper
;
import
java.util.List
;
import
com.zehong.system.domain.TDetectorUser
;
/**
* 探测器用户Mapper接口
*
* @author zehong
* @date 2021-11-02
*/
public
interface
TDetectorUserMapper
{
/**
* 查询探测器用户
*
* @param userId 探测器用户ID
* @return 探测器用户
*/
public
TDetectorUser
selectTDetectorUserById
(
Long
userId
);
/**
* 查询探测器用户列表
*
* @param tDetectorUser 探测器用户
* @return 探测器用户集合
*/
public
List
<
TDetectorUser
>
selectTDetectorUserList
(
TDetectorUser
tDetectorUser
);
/**
* 新增探测器用户
*
* @param tDetectorUser 探测器用户
* @return 结果
*/
public
int
insertTDetectorUser
(
TDetectorUser
tDetectorUser
);
/**
* 修改探测器用户
*
* @param tDetectorUser 探测器用户
* @return 结果
*/
public
int
updateTDetectorUser
(
TDetectorUser
tDetectorUser
);
/**
* 删除探测器用户
*
* @param userId 探测器用户ID
* @return 结果
*/
public
int
deleteTDetectorUserById
(
Long
userId
);
/**
* 批量删除探测器用户
*
* @param userIds 需要删除的数据ID
* @return 结果
*/
public
int
deleteTDetectorUserByIds
(
Long
[]
userIds
);
}
gassafety-system/src/main/java/com/zehong/system/service/ITDetectorInfoService.java
0 → 100644
View file @
17b20b75
package
com
.
zehong
.
system
.
service
;
import
java.util.List
;
import
com.zehong.system.domain.TDetectorInfo
;
import
com.github.pagehelper.PageInfo
;
/**
* 探测器Service接口
*
* @author zehong
* @date 2021-11-02
*/
public
interface
ITDetectorInfoService
{
/**
* 查询探测器
*
* @param detectorId 探测器ID
* @return 探测器
*/
public
TDetectorInfo
selectTDetectorInfoById
(
Long
detectorId
);
/**
* 查询探测器列表
*
* @param tDetectorInfo 探测器
* @return 探测器集合
*/
public
List
<
TDetectorInfo
>
selectTDetectorInfoList
(
TDetectorInfo
tDetectorInfo
);
/**
* 查询探测器分页列表
*
* @param tDetectorInfo 探测器
* @return 探测器分页集合
*/
public
PageInfo
<
TDetectorInfo
>
selectTDetectorInfoPage
(
TDetectorInfo
tDetectorInfo
);
/**
* 新增探测器
*
* @param tDetectorInfo 探测器
* @return 结果
*/
public
int
insertTDetectorInfo
(
TDetectorInfo
tDetectorInfo
);
/**
* 修改探测器
*
* @param tDetectorInfo 探测器
* @return 结果
*/
public
int
updateTDetectorInfo
(
TDetectorInfo
tDetectorInfo
);
/**
* 批量删除探测器
*
* @param detectorIds 需要删除的探测器ID
* @return 结果
*/
public
int
deleteTDetectorInfoByIds
(
Long
[]
detectorIds
);
/**
* 删除探测器信息
*
* @param detectorId 探测器ID
* @return 结果
*/
public
int
deleteTDetectorInfoById
(
Long
detectorId
);
}
gassafety-system/src/main/java/com/zehong/system/service/ITDetectorUserService.java
0 → 100644
View file @
17b20b75
package
com
.
zehong
.
system
.
service
;
import
java.util.List
;
import
com.zehong.system.domain.TDetectorUser
;
import
com.github.pagehelper.PageInfo
;
/**
* 探测器用户Service接口
*
* @author zehong
* @date 2021-11-02
*/
public
interface
ITDetectorUserService
{
/**
* 查询探测器用户
*
* @param userId 探测器用户ID
* @return 探测器用户
*/
public
TDetectorUser
selectTDetectorUserById
(
Long
userId
);
/**
* 查询探测器用户列表
*
* @param tDetectorUser 探测器用户
* @return 探测器用户集合
*/
public
List
<
TDetectorUser
>
selectTDetectorUserList
(
TDetectorUser
tDetectorUser
);
/**
* 查询探测器用户分页列表
*
* @param tDetectorUser 探测器用户
* @return 探测器用户分页集合
*/
public
PageInfo
<
TDetectorUser
>
selectTDetectorUserPage
(
TDetectorUser
tDetectorUser
);
/**
* 新增探测器用户
*
* @param tDetectorUser 探测器用户
* @return 结果
*/
public
int
insertTDetectorUser
(
TDetectorUser
tDetectorUser
);
/**
* 修改探测器用户
*
* @param tDetectorUser 探测器用户
* @return 结果
*/
public
int
updateTDetectorUser
(
TDetectorUser
tDetectorUser
);
/**
* 批量删除探测器用户
*
* @param userIds 需要删除的探测器用户ID
* @return 结果
*/
public
int
deleteTDetectorUserByIds
(
Long
[]
userIds
);
/**
* 删除探测器用户信息
*
* @param userId 探测器用户ID
* @return 结果
*/
public
int
deleteTDetectorUserById
(
Long
userId
);
}
gassafety-system/src/main/java/com/zehong/system/service/impl/TDetectorInfoServiceImpl.java
0 → 100644
View file @
17b20b75
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TDetectorInfoMapper
;
import
com.zehong.system.domain.TDetectorInfo
;
import
com.zehong.system.service.ITDetectorInfoService
;
import
com.github.pagehelper.PageInfo
;
/**
* 探测器Service业务层处理
*
* @author zehong
* @date 2021-11-02
*/
@Service
public
class
TDetectorInfoServiceImpl
implements
ITDetectorInfoService
{
@Autowired
private
TDetectorInfoMapper
tDetectorInfoMapper
;
/**
* 查询探测器
*
* @param detectorId 探测器ID
* @return 探测器
*/
@Override
public
TDetectorInfo
selectTDetectorInfoById
(
Long
detectorId
)
{
return
tDetectorInfoMapper
.
selectTDetectorInfoById
(
detectorId
);
}
/**
* 查询探测器列表
*
* @param tDetectorInfo 探测器
* @return 探测器
*/
@Override
public
List
<
TDetectorInfo
>
selectTDetectorInfoList
(
TDetectorInfo
tDetectorInfo
)
{
return
tDetectorInfoMapper
.
selectTDetectorInfoList
(
tDetectorInfo
);
}
/**
* 查询探测器分页列表
*
* @param tDetectorInfo 探测器
* @return 探测器
*/
@Override
public
PageInfo
<
TDetectorInfo
>
selectTDetectorInfoPage
(
TDetectorInfo
tDetectorInfo
)
{
return
new
PageInfo
(
tDetectorInfoMapper
.
selectTDetectorInfoList
(
tDetectorInfo
));
}
/**
* 新增探测器
*
* @param tDetectorInfo 探测器
* @return 结果
*/
@Override
public
int
insertTDetectorInfo
(
TDetectorInfo
tDetectorInfo
)
{
return
tDetectorInfoMapper
.
insertTDetectorInfo
(
tDetectorInfo
);
}
/**
* 修改探测器
*
* @param tDetectorInfo 探测器
* @return 结果
*/
@Override
public
int
updateTDetectorInfo
(
TDetectorInfo
tDetectorInfo
)
{
return
tDetectorInfoMapper
.
updateTDetectorInfo
(
tDetectorInfo
);
}
/**
* 批量删除探测器
*
* @param detectorIds 需要删除的探测器ID
* @return 结果
*/
@Override
public
int
deleteTDetectorInfoByIds
(
Long
[]
detectorIds
)
{
return
tDetectorInfoMapper
.
deleteTDetectorInfoByIds
(
detectorIds
);
}
/**
* 删除探测器信息
*
* @param detectorId 探测器ID
* @return 结果
*/
@Override
public
int
deleteTDetectorInfoById
(
Long
detectorId
)
{
return
tDetectorInfoMapper
.
deleteTDetectorInfoById
(
detectorId
);
}
}
gassafety-system/src/main/java/com/zehong/system/service/impl/TDetectorUserServiceImpl.java
0 → 100644
View file @
17b20b75
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TDetectorUserMapper
;
import
com.zehong.system.domain.TDetectorUser
;
import
com.zehong.system.service.ITDetectorUserService
;
import
com.github.pagehelper.PageInfo
;
/**
* 探测器用户Service业务层处理
*
* @author zehong
* @date 2021-11-02
*/
@Service
public
class
TDetectorUserServiceImpl
implements
ITDetectorUserService
{
@Autowired
private
TDetectorUserMapper
tDetectorUserMapper
;
/**
* 查询探测器用户
*
* @param userId 探测器用户ID
* @return 探测器用户
*/
@Override
public
TDetectorUser
selectTDetectorUserById
(
Long
userId
)
{
return
tDetectorUserMapper
.
selectTDetectorUserById
(
userId
);
}
/**
* 查询探测器用户列表
*
* @param tDetectorUser 探测器用户
* @return 探测器用户
*/
@Override
public
List
<
TDetectorUser
>
selectTDetectorUserList
(
TDetectorUser
tDetectorUser
)
{
return
tDetectorUserMapper
.
selectTDetectorUserList
(
tDetectorUser
);
}
/**
* 查询探测器用户分页列表
*
* @param tDetectorUser 探测器用户
* @return 探测器用户
*/
@Override
public
PageInfo
<
TDetectorUser
>
selectTDetectorUserPage
(
TDetectorUser
tDetectorUser
)
{
return
new
PageInfo
(
tDetectorUserMapper
.
selectTDetectorUserList
(
tDetectorUser
));
}
/**
* 新增探测器用户
*
* @param tDetectorUser 探测器用户
* @return 结果
*/
@Override
public
int
insertTDetectorUser
(
TDetectorUser
tDetectorUser
)
{
return
tDetectorUserMapper
.
insertTDetectorUser
(
tDetectorUser
);
}
/**
* 修改探测器用户
*
* @param tDetectorUser 探测器用户
* @return 结果
*/
@Override
public
int
updateTDetectorUser
(
TDetectorUser
tDetectorUser
)
{
return
tDetectorUserMapper
.
updateTDetectorUser
(
tDetectorUser
);
}
/**
* 批量删除探测器用户
*
* @param userIds 需要删除的探测器用户ID
* @return 结果
*/
@Override
public
int
deleteTDetectorUserByIds
(
Long
[]
userIds
)
{
return
tDetectorUserMapper
.
deleteTDetectorUserByIds
(
userIds
);
}
/**
* 删除探测器用户信息
*
* @param userId 探测器用户ID
* @return 结果
*/
@Override
public
int
deleteTDetectorUserById
(
Long
userId
)
{
return
tDetectorUserMapper
.
deleteTDetectorUserById
(
userId
);
}
}
gassafety-system/src/main/resources/mapper/system/TDetectorInfoMapper.xml
0 → 100644
View file @
17b20b75
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.zehong.detector.mapper.TDetectorInfoMapper"
>
<resultMap
type=
"TDetectorInfo"
id=
"TDetectorInfoResult"
>
<result
property=
"detectorId"
column=
"detector_id"
/>
<result
property=
"enterpriseId"
column=
"enterprise_id"
/>
<result
property=
"userId"
column=
"user_id"
/>
<result
property=
"detectorName"
column=
"detector_name"
/>
<result
property=
"detectorCode"
column=
"detector_code"
/>
<result
property=
"detectorAddr"
column=
"detector_addr"
/>
<result
property=
"detectorModel"
column=
"detector_model"
/>
<result
property=
"detectorType"
column=
"detector_type"
/>
<result
property=
"medium"
column=
"medium"
/>
<result
property=
"longitude"
column=
"longitude"
/>
<result
property=
"latitude"
column=
"latitude"
/>
<result
property=
"iotNo"
column=
"iot_no"
/>
<result
property=
"linkman"
column=
"linkman"
/>
<result
property=
"phone"
column=
"phone"
/>
<result
property=
"installationTime"
column=
"installation_time"
/>
<result
property=
"inspectionTime"
column=
"inspection_time"
/>
<result
property=
"isDel"
column=
"is_del"
/>
<result
property=
"remarks"
column=
"remarks"
/>
</resultMap>
<sql
id=
"selectTDetectorInfoVo"
>
select detector_id, enterprise_id, user_id, detector_name, detector_code, detector_addr, detector_model, detector_type, medium, longitude, latitude, iot_no, linkman, phone, installation_time, inspection_time, is_del, remarks from t_detector_info
</sql>
<select
id=
"selectTDetectorInfoList"
parameterType=
"TDetectorInfo"
resultMap=
"TDetectorInfoResult"
>
<include
refid=
"selectTDetectorInfoVo"
/>
<where>
<if
test=
"userId != null "
>
and user_id = #{userId}
</if>
<if
test=
"enterpriseId != null and enterpriseId != 0 "
>
and enterprise_id = #{enterpriseId}
</if>
<if
test=
"detectorName != null and detectorName != ''"
>
and detector_name like concat('%', #{detectorName}, '%')
</if>
<if
test=
"detectorCode != null and detectorCode != ''"
>
and detector_code = #{detectorCode}
</if>
<if
test=
"detectorAddr != null and detectorAddr != ''"
>
and detector_addr = #{detectorAddr}
</if>
<if
test=
"detectorModel != null and detectorModel != ''"
>
and detector_model = #{detectorModel}
</if>
<if
test=
"detectorType != null and detectorType != ''"
>
and detector_type = #{detectorType}
</if>
<if
test=
"medium != null and medium != ''"
>
and medium = #{medium}
</if>
<if
test=
"longitude != null "
>
and longitude = #{longitude}
</if>
<if
test=
"latitude != null "
>
and latitude = #{latitude}
</if>
<if
test=
"iotNo != null and iotNo != ''"
>
and iot_no = #{iotNo}
</if>
<if
test=
"linkman != null and linkman != ''"
>
and linkman = #{linkman}
</if>
<if
test=
"phone != null and phone != ''"
>
and phone = #{phone}
</if>
<if
test=
"installationTime != null "
>
and installation_time = #{installationTime}
</if>
<if
test=
"inspectionTime != null "
>
and inspection_time = #{inspectionTime}
</if>
<if
test=
"isDel != null and isDel != ''"
>
and is_del = #{isDel}
</if>
<if
test=
"remarks != null and remarks != ''"
>
and remarks = #{remarks}
</if>
</where>
</select>
<select
id=
"selectTDetectorInfoById"
parameterType=
"Long"
resultMap=
"TDetectorInfoResult"
>
<include
refid=
"selectTDetectorInfoVo"
/>
where detector_id = #{detectorId}
</select>
<insert
id=
"insertTDetectorInfo"
parameterType=
"TDetectorInfo"
useGeneratedKeys=
"true"
keyProperty=
"detectorId"
>
insert into t_detector_info
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"enterpriseId != null and enterpriseId != 0"
>
enterprise_id,
</if>
<if
test=
"detectorName != null"
>
detector_name,
</if>
<if
test=
"detectorCode != null"
>
detector_code,
</if>
<if
test=
"detectorAddr != null"
>
detector_addr,
</if>
<if
test=
"detectorModel != null"
>
detector_model,
</if>
<if
test=
"detectorType != null"
>
detector_type,
</if>
<if
test=
"medium != null"
>
medium,
</if>
<if
test=
"longitude != null"
>
longitude,
</if>
<if
test=
"latitude != null"
>
latitude,
</if>
<if
test=
"iotNo != null"
>
iot_no,
</if>
<if
test=
"linkman != null"
>
linkman,
</if>
<if
test=
"phone != null"
>
phone,
</if>
<if
test=
"installationTime != null"
>
installation_time,
</if>
<if
test=
"inspectionTime != null"
>
inspection_time,
</if>
<if
test=
"isDel != null"
>
is_del,
</if>
<if
test=
"remarks != null"
>
remarks,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"userId != null"
>
#{userId},
</if>
<if
test=
"enterpriseId != null and enterpriseId != 0"
>
#{enterpriseId},
</if>
<if
test=
"detectorName != null"
>
#{detectorName},
</if>
<if
test=
"detectorCode != null"
>
#{detectorCode},
</if>
<if
test=
"detectorAddr != null"
>
#{detectorAddr},
</if>
<if
test=
"detectorModel != null"
>
#{detectorModel},
</if>
<if
test=
"detectorType != null"
>
#{detectorType},
</if>
<if
test=
"medium != null"
>
#{medium},
</if>
<if
test=
"longitude != null"
>
#{longitude},
</if>
<if
test=
"latitude != null"
>
#{latitude},
</if>
<if
test=
"iotNo != null"
>
#{iotNo},
</if>
<if
test=
"linkman != null"
>
#{linkman},
</if>
<if
test=
"phone != null"
>
#{phone},
</if>
<if
test=
"installationTime != null"
>
#{installationTime},
</if>
<if
test=
"inspectionTime != null"
>
#{inspectionTime},
</if>
<if
test=
"isDel != null"
>
#{isDel},
</if>
<if
test=
"remarks != null"
>
#{remarks},
</if>
</trim>
</insert>
<update
id=
"updateTDetectorInfo"
parameterType=
"TDetectorInfo"
>
update t_detector_info
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"userId != null"
>
user_id = #{userId},
</if>
<if
test=
"detectorName != null"
>
detector_name = #{detectorName},
</if>
<if
test=
"detectorCode != null"
>
detector_code = #{detectorCode},
</if>
<if
test=
"detectorAddr != null"
>
detector_addr = #{detectorAddr},
</if>
<if
test=
"detectorModel != null"
>
detector_model = #{detectorModel},
</if>
<if
test=
"detectorType != null"
>
detector_type = #{detectorType},
</if>
<if
test=
"medium != null"
>
medium = #{medium},
</if>
<if
test=
"longitude != null"
>
longitude = #{longitude},
</if>
<if
test=
"latitude != null"
>
latitude = #{latitude},
</if>
<if
test=
"iotNo != null"
>
iot_no = #{iotNo},
</if>
<if
test=
"linkman != null"
>
linkman = #{linkman},
</if>
<if
test=
"phone != null"
>
phone = #{phone},
</if>
<if
test=
"installationTime != null"
>
installation_time = #{installationTime},
</if>
<if
test=
"inspectionTime != null"
>
inspection_time = #{inspectionTime},
</if>
<if
test=
"isDel != null"
>
is_del = #{isDel},
</if>
<if
test=
"remarks != null"
>
remarks = #{remarks},
</if>
</trim>
where detector_id = #{detectorId}
</update>
<delete
id=
"deleteTDetectorInfoById"
parameterType=
"Long"
>
delete from t_detector_info where detector_id = #{detectorId}
</delete>
<delete
id=
"deleteTDetectorInfoByIds"
parameterType=
"String"
>
delete from t_detector_info where detector_id in
<foreach
item=
"detectorId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{detectorId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
gassafety-system/src/main/resources/mapper/system/TDetectorUserMapper.xml
0 → 100644
View file @
17b20b75
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.zehong.detector.mapper.TDetectorUserMapper"
>
<resultMap
type=
"TDetectorUser"
id=
"TDetectorUserResult"
>
<result
property=
"userId"
column=
"user_id"
/>
<result
property=
"username"
column=
"username"
/>
<result
property=
"nickName"
column=
"nick_name"
/>
<result
property=
"userType"
column=
"user_type"
/>
<result
property=
"address"
column=
"address"
/>
<result
property=
"longitude"
column=
"longitude"
/>
<result
property=
"latitude"
column=
"latitude"
/>
<result
property=
"linkman"
column=
"linkman"
/>
<result
property=
"phone"
column=
"phone"
/>
<result
property=
"email"
column=
"email"
/>
<result
property=
"isDel"
column=
"is_del"
/>
<result
property=
"remarks"
column=
"remarks"
/>
</resultMap>
<sql
id=
"selectTDetectorUserVo"
>
select user_id, username, nick_name, user_type, address, longitude, latitude, linkman, phone, email, is_del, remarks from t_detector_user
</sql>
<select
id=
"selectTDetectorUserList"
parameterType=
"TDetectorUser"
resultMap=
"TDetectorUserResult"
>
<include
refid=
"selectTDetectorUserVo"
/>
<where>
<if
test=
"username != null and username != ''"
>
and username like concat('%', #{username}, '%')
</if>
<if
test=
"nickName != null and nickName != ''"
>
and nick_name like concat('%', #{nickName}, '%')
</if>
<if
test=
"userType != null and userType != ''"
>
and user_type = #{userType}
</if>
<if
test=
"address != null and address != ''"
>
and address = #{address}
</if>
<if
test=
"longitude != null "
>
and longitude = #{longitude}
</if>
<if
test=
"latitude != null "
>
and latitude = #{latitude}
</if>
<if
test=
"linkman != null and linkman != ''"
>
and linkman = #{linkman}
</if>
<if
test=
"phone != null and phone != ''"
>
and phone = #{phone}
</if>
<if
test=
"email != null and email != ''"
>
and email = #{email}
</if>
<if
test=
"isDel != null and isDel != ''"
>
and is_del = #{isDel}
</if>
<if
test=
"remarks != null and remarks != ''"
>
and remarks = #{remarks}
</if>
</where>
</select>
<select
id=
"selectTDetectorUserById"
parameterType=
"Long"
resultMap=
"TDetectorUserResult"
>
<include
refid=
"selectTDetectorUserVo"
/>
where user_id = #{userId}
</select>
<insert
id=
"insertTDetectorUser"
parameterType=
"TDetectorUser"
useGeneratedKeys=
"true"
keyProperty=
"userId"
>
insert into t_detector_user
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"username != null"
>
username,
</if>
<if
test=
"nickName != null"
>
nick_name,
</if>
<if
test=
"userType != null"
>
user_type,
</if>
<if
test=
"address != null"
>
address,
</if>
<if
test=
"longitude != null"
>
longitude,
</if>
<if
test=
"latitude != null"
>
latitude,
</if>
<if
test=
"linkman != null"
>
linkman,
</if>
<if
test=
"phone != null"
>
phone,
</if>
<if
test=
"email != null"
>
email,
</if>
<if
test=
"isDel != null"
>
is_del,
</if>
<if
test=
"remarks != null"
>
remarks,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"username != null"
>
#{username},
</if>
<if
test=
"nickName != null"
>
#{nickName},
</if>
<if
test=
"userType != null"
>
#{userType},
</if>
<if
test=
"address != null"
>
#{address},
</if>
<if
test=
"longitude != null"
>
#{longitude},
</if>
<if
test=
"latitude != null"
>
#{latitude},
</if>
<if
test=
"linkman != null"
>
#{linkman},
</if>
<if
test=
"phone != null"
>
#{phone},
</if>
<if
test=
"email != null"
>
#{email},
</if>
<if
test=
"isDel != null"
>
#{isDel},
</if>
<if
test=
"remarks != null"
>
#{remarks},
</if>
</trim>
</insert>
<update
id=
"updateTDetectorUser"
parameterType=
"TDetectorUser"
>
update t_detector_user
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"username != null"
>
username = #{username},
</if>
<if
test=
"nickName != null"
>
nick_name = #{nickName},
</if>
<if
test=
"userType != null"
>
user_type = #{userType},
</if>
<if
test=
"address != null"
>
address = #{address},
</if>
<if
test=
"longitude != null"
>
longitude = #{longitude},
</if>
<if
test=
"latitude != null"
>
latitude = #{latitude},
</if>
<if
test=
"linkman != null"
>
linkman = #{linkman},
</if>
<if
test=
"phone != null"
>
phone = #{phone},
</if>
<if
test=
"email != null"
>
email = #{email},
</if>
<if
test=
"isDel != null"
>
is_del = #{isDel},
</if>
<if
test=
"remarks != null"
>
remarks = #{remarks},
</if>
</trim>
where user_id = #{userId}
</update>
<delete
id=
"deleteTDetectorUserById"
parameterType=
"Long"
>
delete from t_detector_user where user_id = #{userId}
</delete>
<delete
id=
"deleteTDetectorUserByIds"
parameterType=
"String"
>
delete from t_detector_user where user_id in
<foreach
item=
"userId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{userId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
gassafety-web/.env.production
View file @
17b20b75
...
@@ -5,9 +5,9 @@ ENV = 'production'
...
@@ -5,9 +5,9 @@ ENV = 'production'
VUE_APP_BASE_API = '/prod-api'
VUE_APP_BASE_API = '/prod-api'
#地图中心
#地图中心
VUE_APP_MAP_CENTER = '
石家庄
'
VUE_APP_MAP_CENTER = '
平山
'
#代理地址
#代理地址
VUE_APP_TARGET = 'http://36.148.23.59:890
1
/gassafety'
VUE_APP_TARGET = 'http://36.148.23.59:890
4
/gassafety'
port = 809
1
port = 809
2
gassafety-web/src/api/detector/detectorInfo.js
0 → 100644
View file @
17b20b75
import
request
from
'@/utils/request'
// 查询探测器列表
export
function
listDetectorInfo
(
query
)
{
return
request
({
url
:
'/detector/detectorInfo/list'
,
method
:
'get'
,
params
:
query
})
}
// 探测器列表
export
function
detectorInfoList
(
query
)
{
return
request
({
url
:
'/detector/detectorInfo/detectorInfoList'
,
method
:
'get'
,
params
:
query
})
}
// 新增探测器
export
function
addDetectorInfo
(
data
)
{
return
request
({
url
:
'/detector/detectorInfo'
,
method
:
'post'
,
data
:
data
})
}
// 修改探测器
export
function
updateDetectorInfo
(
data
)
{
return
request
({
url
:
'/detector/detectorInfo'
,
method
:
'put'
,
data
:
data
})
}
// 删除探测器
export
function
delDetectorInfo
(
detectorId
)
{
return
request
({
url
:
'/detector/detectorInfo/'
+
detectorId
,
method
:
'delete'
})
}
// 导出探测器
export
function
exportDetectorInfo
(
query
)
{
return
request
({
url
:
'/detector/detectorInfo/export'
,
method
:
'get'
,
params
:
query
})
}
gassafety-web/src/api/detector/detectorUser.js
0 → 100644
View file @
17b20b75
import
request
from
'@/utils/request'
// 查询探测器用户列表
export
function
listDetectorUser
(
query
)
{
return
request
({
url
:
'/detector/detectorUser/list'
,
method
:
'get'
,
params
:
query
})
}
// 探测器用户列表
export
function
detectorUserList
(
query
)
{
return
request
({
url
:
'/detector/detectorUser/detectorUserList'
,
method
:
'get'
,
params
:
query
})
}
// 查询探测器用户详细
export
function
getDetectorUser
(
userId
)
{
return
request
({
url
:
'/detector/detectorUser/'
+
userId
,
method
:
'get'
})
}
// 新增探测器用户
export
function
addDetectorUser
(
data
)
{
return
request
({
url
:
'/detector/detectorUser'
,
method
:
'post'
,
data
:
data
})
}
// 修改探测器用户
export
function
updateDetectorUser
(
data
)
{
return
request
({
url
:
'/detector/detectorUser'
,
method
:
'put'
,
data
:
data
})
}
// 删除探测器用户
export
function
delDetectorUser
(
userId
)
{
return
request
({
url
:
'/detector/detectorUser/'
+
userId
,
method
:
'delete'
})
}
// 导出探测器用户
export
function
exportDetectorUser
(
query
)
{
return
request
({
url
:
'/detector/detectorUser/export'
,
method
:
'get'
,
params
:
query
})
}
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