Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety
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
耿迪迪
gassafety
Commits
7ae1c311
Commit
7ae1c311
authored
Sep 18, 2021
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gis 视频 gengdidi
parent
08ad1d84
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
557 additions
and
0 deletions
+557
-0
TVideoManagerController.java
...zehong/web/controller/device/TVideoManagerController.java
+103
-0
TVideoManager.java
...src/main/java/com/zehong/system/domain/TVideoManager.java
+108
-0
TVideoManagerMapper.java
...in/java/com/zehong/system/mapper/TVideoManagerMapper.java
+61
-0
ITVideoManagerService.java
...java/com/zehong/system/service/ITVideoManagerService.java
+61
-0
TVideoManagerServiceImpl.java
.../zehong/system/service/impl/TVideoManagerServiceImpl.java
+93
-0
TVideoManagerMapper.xml
.../src/main/resources/mapper/system/TVideoManagerMapper.xml
+78
-0
videoManager.js
gassafety-web/src/api/device/videoManager.js
+53
-0
No files found.
gassafety-admin/src/main/java/com/zehong/web/controller/device/TVideoManagerController.java
0 → 100644
View file @
7ae1c311
package
com
.
zehong
.
web
.
controller
.
device
;
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.TVideoManager
;
import
com.zehong.system.service.ITVideoManagerService
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.zehong.common.core.page.TableDataInfo
;
/**
* 视频管理Controller
*
* @author zehong
* @date 2021-09-18
*/
@RestController
@RequestMapping
(
"/device/manager"
)
public
class
TVideoManagerController
extends
BaseController
{
@Autowired
private
ITVideoManagerService
tVideoManagerService
;
/**
* 查询视频管理列表
*/
@PreAuthorize
(
"@ss.hasPermi('device:manager:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
TVideoManager
tVideoManager
)
{
startPage
();
List
<
TVideoManager
>
list
=
tVideoManagerService
.
selectTVideoManagerList
(
tVideoManager
);
return
getDataTable
(
list
);
}
/**
* 导出视频管理列表
*/
@PreAuthorize
(
"@ss.hasPermi('device:manager:export')"
)
@Log
(
title
=
"视频管理"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
TVideoManager
tVideoManager
)
{
List
<
TVideoManager
>
list
=
tVideoManagerService
.
selectTVideoManagerList
(
tVideoManager
);
ExcelUtil
<
TVideoManager
>
util
=
new
ExcelUtil
<
TVideoManager
>(
TVideoManager
.
class
);
return
util
.
exportExcel
(
list
,
"视频管理数据"
);
}
/**
* 获取视频管理详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('device:manager:query')"
)
@GetMapping
(
value
=
"/{videoManagerId}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"videoManagerId"
)
String
videoManagerId
)
{
return
AjaxResult
.
success
(
tVideoManagerService
.
selectTVideoManagerById
(
videoManagerId
));
}
/**
* 新增视频管理
*/
@PreAuthorize
(
"@ss.hasPermi('device:manager:add')"
)
@Log
(
title
=
"视频管理"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
TVideoManager
tVideoManager
)
{
return
toAjax
(
tVideoManagerService
.
insertTVideoManager
(
tVideoManager
));
}
/**
* 修改视频管理
*/
@PreAuthorize
(
"@ss.hasPermi('device:manager:edit')"
)
@Log
(
title
=
"视频管理"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
TVideoManager
tVideoManager
)
{
return
toAjax
(
tVideoManagerService
.
updateTVideoManager
(
tVideoManager
));
}
/**
* 删除视频管理
*/
@PreAuthorize
(
"@ss.hasPermi('device:manager:remove')"
)
@Log
(
title
=
"视频管理"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{videoManagerIds}"
)
public
AjaxResult
remove
(
@PathVariable
String
[]
videoManagerIds
)
{
return
toAjax
(
tVideoManagerService
.
deleteTVideoManagerByIds
(
videoManagerIds
));
}
}
gassafety-system/src/main/java/com/zehong/system/domain/TVideoManager.java
0 → 100644
View file @
7ae1c311
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_video_manager
*
* @author zehong
* @date 2021-09-18
*/
public
class
TVideoManager
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 视频管理id */
private
String
videoManagerId
;
/** 视频名称 */
@Excel
(
name
=
"视频名称"
)
private
String
videoName
;
/** 视频资源id */
@Excel
(
name
=
"视频资源id"
)
private
Long
resourceId
;
/** 经度 */
@Excel
(
name
=
"经度"
)
private
BigDecimal
longitude
;
/** 纬度 */
@Excel
(
name
=
"纬度"
)
private
BigDecimal
latitude
;
/** 视频地址 */
@Excel
(
name
=
"视频地址"
)
private
String
videoAddress
;
public
void
setVideoManagerId
(
String
videoManagerId
)
{
this
.
videoManagerId
=
videoManagerId
;
}
public
String
getVideoManagerId
()
{
return
videoManagerId
;
}
public
void
setVideoName
(
String
videoName
)
{
this
.
videoName
=
videoName
;
}
public
String
getVideoName
()
{
return
videoName
;
}
public
void
setResourceId
(
Long
resourceId
)
{
this
.
resourceId
=
resourceId
;
}
public
Long
getResourceId
()
{
return
resourceId
;
}
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
setVideoAddress
(
String
videoAddress
)
{
this
.
videoAddress
=
videoAddress
;
}
public
String
getVideoAddress
()
{
return
videoAddress
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"videoManagerId"
,
getVideoManagerId
())
.
append
(
"videoName"
,
getVideoName
())
.
append
(
"resourceId"
,
getResourceId
())
.
append
(
"longitude"
,
getLongitude
())
.
append
(
"latitude"
,
getLatitude
())
.
append
(
"videoAddress"
,
getVideoAddress
())
.
toString
();
}
}
gassafety-system/src/main/java/com/zehong/system/mapper/TVideoManagerMapper.java
0 → 100644
View file @
7ae1c311
package
com
.
zehong
.
system
.
mapper
;
import
java.util.List
;
import
com.zehong.system.domain.TVideoManager
;
/**
* 视频管理Mapper接口
*
* @author zehong
* @date 2021-09-18
*/
public
interface
TVideoManagerMapper
{
/**
* 查询视频管理
*
* @param videoManagerId 视频管理ID
* @return 视频管理
*/
public
TVideoManager
selectTVideoManagerById
(
String
videoManagerId
);
/**
* 查询视频管理列表
*
* @param tVideoManager 视频管理
* @return 视频管理集合
*/
public
List
<
TVideoManager
>
selectTVideoManagerList
(
TVideoManager
tVideoManager
);
/**
* 新增视频管理
*
* @param tVideoManager 视频管理
* @return 结果
*/
public
int
insertTVideoManager
(
TVideoManager
tVideoManager
);
/**
* 修改视频管理
*
* @param tVideoManager 视频管理
* @return 结果
*/
public
int
updateTVideoManager
(
TVideoManager
tVideoManager
);
/**
* 删除视频管理
*
* @param videoManagerId 视频管理ID
* @return 结果
*/
public
int
deleteTVideoManagerById
(
String
videoManagerId
);
/**
* 批量删除视频管理
*
* @param videoManagerIds 需要删除的数据ID
* @return 结果
*/
public
int
deleteTVideoManagerByIds
(
String
[]
videoManagerIds
);
}
gassafety-system/src/main/java/com/zehong/system/service/ITVideoManagerService.java
0 → 100644
View file @
7ae1c311
package
com
.
zehong
.
system
.
service
;
import
java.util.List
;
import
com.zehong.system.domain.TVideoManager
;
/**
* 视频管理Service接口
*
* @author zehong
* @date 2021-09-18
*/
public
interface
ITVideoManagerService
{
/**
* 查询视频管理
*
* @param videoManagerId 视频管理ID
* @return 视频管理
*/
public
TVideoManager
selectTVideoManagerById
(
String
videoManagerId
);
/**
* 查询视频管理列表
*
* @param tVideoManager 视频管理
* @return 视频管理集合
*/
public
List
<
TVideoManager
>
selectTVideoManagerList
(
TVideoManager
tVideoManager
);
/**
* 新增视频管理
*
* @param tVideoManager 视频管理
* @return 结果
*/
public
int
insertTVideoManager
(
TVideoManager
tVideoManager
);
/**
* 修改视频管理
*
* @param tVideoManager 视频管理
* @return 结果
*/
public
int
updateTVideoManager
(
TVideoManager
tVideoManager
);
/**
* 批量删除视频管理
*
* @param videoManagerIds 需要删除的视频管理ID
* @return 结果
*/
public
int
deleteTVideoManagerByIds
(
String
[]
videoManagerIds
);
/**
* 删除视频管理信息
*
* @param videoManagerId 视频管理ID
* @return 结果
*/
public
int
deleteTVideoManagerById
(
String
videoManagerId
);
}
gassafety-system/src/main/java/com/zehong/system/service/impl/TVideoManagerServiceImpl.java
0 → 100644
View file @
7ae1c311
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.TVideoManagerMapper
;
import
com.zehong.system.domain.TVideoManager
;
import
com.zehong.system.service.ITVideoManagerService
;
/**
* 视频管理Service业务层处理
*
* @author zehong
* @date 2021-09-18
*/
@Service
public
class
TVideoManagerServiceImpl
implements
ITVideoManagerService
{
@Autowired
private
TVideoManagerMapper
tVideoManagerMapper
;
/**
* 查询视频管理
*
* @param videoManagerId 视频管理ID
* @return 视频管理
*/
@Override
public
TVideoManager
selectTVideoManagerById
(
String
videoManagerId
)
{
return
tVideoManagerMapper
.
selectTVideoManagerById
(
videoManagerId
);
}
/**
* 查询视频管理列表
*
* @param tVideoManager 视频管理
* @return 视频管理
*/
@Override
public
List
<
TVideoManager
>
selectTVideoManagerList
(
TVideoManager
tVideoManager
)
{
return
tVideoManagerMapper
.
selectTVideoManagerList
(
tVideoManager
);
}
/**
* 新增视频管理
*
* @param tVideoManager 视频管理
* @return 结果
*/
@Override
public
int
insertTVideoManager
(
TVideoManager
tVideoManager
)
{
return
tVideoManagerMapper
.
insertTVideoManager
(
tVideoManager
);
}
/**
* 修改视频管理
*
* @param tVideoManager 视频管理
* @return 结果
*/
@Override
public
int
updateTVideoManager
(
TVideoManager
tVideoManager
)
{
return
tVideoManagerMapper
.
updateTVideoManager
(
tVideoManager
);
}
/**
* 批量删除视频管理
*
* @param videoManagerIds 需要删除的视频管理ID
* @return 结果
*/
@Override
public
int
deleteTVideoManagerByIds
(
String
[]
videoManagerIds
)
{
return
tVideoManagerMapper
.
deleteTVideoManagerByIds
(
videoManagerIds
);
}
/**
* 删除视频管理信息
*
* @param videoManagerId 视频管理ID
* @return 结果
*/
@Override
public
int
deleteTVideoManagerById
(
String
videoManagerId
)
{
return
tVideoManagerMapper
.
deleteTVideoManagerById
(
videoManagerId
);
}
}
gassafety-system/src/main/resources/mapper/system/TVideoManagerMapper.xml
0 → 100644
View file @
7ae1c311
<?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.system.mapper.TVideoManagerMapper"
>
<resultMap
type=
"TVideoManager"
id=
"TVideoManagerResult"
>
<result
property=
"videoManagerId"
column=
"video_manager_id"
/>
<result
property=
"videoName"
column=
"video_name"
/>
<result
property=
"resourceId"
column=
"resource_id"
/>
<result
property=
"longitude"
column=
"longitude"
/>
<result
property=
"latitude"
column=
"latitude"
/>
<result
property=
"videoAddress"
column=
"video_address"
/>
</resultMap>
<sql
id=
"selectTVideoManagerVo"
>
select video_manager_id, video_name, resource_id, longitude, latitude, video_address from t_video_manager
</sql>
<select
id=
"selectTVideoManagerList"
parameterType=
"TVideoManager"
resultMap=
"TVideoManagerResult"
>
<include
refid=
"selectTVideoManagerVo"
/>
<where>
<if
test=
"videoName != null and videoName != ''"
>
and video_name like concat('%', #{videoName}, '%')
</if>
<if
test=
"resourceId != null "
>
and resource_id = #{resourceId}
</if>
<if
test=
"longitude != null "
>
and longitude = #{longitude}
</if>
<if
test=
"latitude != null "
>
and latitude = #{latitude}
</if>
<if
test=
"videoAddress != null and videoAddress != ''"
>
and video_address = #{videoAddress}
</if>
</where>
</select>
<select
id=
"selectTVideoManagerById"
parameterType=
"String"
resultMap=
"TVideoManagerResult"
>
<include
refid=
"selectTVideoManagerVo"
/>
where video_manager_id = #{videoManagerId}
</select>
<insert
id=
"insertTVideoManager"
parameterType=
"TVideoManager"
>
insert into t_video_manager
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"videoManagerId != null"
>
video_manager_id,
</if>
<if
test=
"videoName != null"
>
video_name,
</if>
<if
test=
"resourceId != null"
>
resource_id,
</if>
<if
test=
"longitude != null"
>
longitude,
</if>
<if
test=
"latitude != null"
>
latitude,
</if>
<if
test=
"videoAddress != null"
>
video_address,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"videoManagerId != null"
>
#{videoManagerId},
</if>
<if
test=
"videoName != null"
>
#{videoName},
</if>
<if
test=
"resourceId != null"
>
#{resourceId},
</if>
<if
test=
"longitude != null"
>
#{longitude},
</if>
<if
test=
"latitude != null"
>
#{latitude},
</if>
<if
test=
"videoAddress != null"
>
#{videoAddress},
</if>
</trim>
</insert>
<update
id=
"updateTVideoManager"
parameterType=
"TVideoManager"
>
update t_video_manager
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"videoName != null"
>
video_name = #{videoName},
</if>
<if
test=
"resourceId != null"
>
resource_id = #{resourceId},
</if>
<if
test=
"longitude != null"
>
longitude = #{longitude},
</if>
<if
test=
"latitude != null"
>
latitude = #{latitude},
</if>
<if
test=
"videoAddress != null"
>
video_address = #{videoAddress},
</if>
</trim>
where video_manager_id = #{videoManagerId}
</update>
<delete
id=
"deleteTVideoManagerById"
parameterType=
"String"
>
delete from t_video_manager where video_manager_id = #{videoManagerId}
</delete>
<delete
id=
"deleteTVideoManagerByIds"
parameterType=
"String"
>
delete from t_video_manager where video_manager_id in
<foreach
item=
"videoManagerId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{videoManagerId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
gassafety-web/src/api/device/videoManager.js
0 → 100644
View file @
7ae1c311
import
request
from
'@/utils/request'
// 查询视频管理列表
export
function
listManager
(
query
)
{
return
request
({
url
:
'/device/manager/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询视频管理详细
export
function
getManager
(
videoManagerId
)
{
return
request
({
url
:
'/device/manager/'
+
videoManagerId
,
method
:
'get'
})
}
// 新增视频管理
export
function
addManager
(
data
)
{
return
request
({
url
:
'/device/manager'
,
method
:
'post'
,
data
:
data
})
}
// 修改视频管理
export
function
updateManager
(
data
)
{
return
request
({
url
:
'/device/manager'
,
method
:
'put'
,
data
:
data
})
}
// 删除视频管理
export
function
delManager
(
videoManagerId
)
{
return
request
({
url
:
'/device/manager/'
+
videoManagerId
,
method
:
'delete'
})
}
// 导出视频管理
export
function
exportManager
(
query
)
{
return
request
({
url
:
'/device/manager/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