Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
2b5eedb4
Commit
2b5eedb4
authored
Oct 13, 2022
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
56a0472d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
53 additions
and
25 deletions
+53
-25
SupervisionConfigureController.java
...quipmanage/controller/SupervisionConfigureController.java
+21
-13
SupervisionVideoMapper.java
...om/yeejoin/equipmanage/mapper/SupervisionVideoMapper.java
+2
-2
ISupervisionVideoService.java
...yeejoin/equipmanage/service/ISupervisionVideoService.java
+2
-1
SupervisionVideoServiceImpl.java
...equipmanage/service/impl/SupervisionVideoServiceImpl.java
+18
-6
SupervisionVideoMapper.xml
...quip/src/main/resources/mapper/SupervisionVideoMapper.xml
+10
-3
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/SupervisionConfigureController.java
View file @
2b5eedb4
...
@@ -221,12 +221,14 @@ public class SupervisionConfigureController extends AbstractBaseController {
...
@@ -221,12 +221,14 @@ public class SupervisionConfigureController extends AbstractBaseController {
@RequestMapping
(
value
=
"/alarmTrend"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/alarmTrend"
,
method
=
RequestMethod
.
GET
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"报警类型趋势"
,
produces
=
"application/json;charset=UTF-8"
,
notes
=
"报警类型趋势"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"报警类型趋势"
,
produces
=
"application/json;charset=UTF-8"
,
notes
=
"报警类型趋势"
)
public
ResponseModel
alarmTrend
(
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
public
ResponseModel
alarmTrend
()
{
String
bizOrgCode
=
null
;
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
if
(!
ValidationUtil
.
isEmpty
(
personIdentity
))
{
if
(!
ValidationUtil
.
isEmpty
(
personIdentity
))
{
if
(
StringUtils
.
isBlank
(
bizOrgCode
))
{
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
if
(
bizOrgCode
==
null
)
{
return
CommonResponseUtil
.
success
(
null
);
}
}
}
}
return
CommonResponseUtil
.
success
(
equipmentSpecificAlarmService
.
alarmTrend
(
bizOrgCode
));
return
CommonResponseUtil
.
success
(
equipmentSpecificAlarmService
.
alarmTrend
(
bizOrgCode
));
...
@@ -366,13 +368,15 @@ public class SupervisionConfigureController extends AbstractBaseController {
...
@@ -366,13 +368,15 @@ public class SupervisionConfigureController extends AbstractBaseController {
@PersonIdentify
@PersonIdentify
@RequestMapping
(
value
=
"/replaceVideo"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/replaceVideo"
,
method
=
RequestMethod
.
POST
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"添加视频"
,
produces
=
"application/json;charset=UTF-8"
,
notes
=
"添加视频"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"替换视频"
,
produces
=
"application/json;charset=UTF-8"
,
notes
=
"替换视频"
)
public
ResponseModel
replaceVideo
(
@RequestBody
String
ids
,
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
public
ResponseModel
replaceVideo
(
@RequestBody
Map
<
String
,
String
>
ids
)
{
String
bizOrgCode
=
null
;
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
if
(!
ValidationUtil
.
isEmpty
(
personIdentity
))
{
if
(!
ValidationUtil
.
isEmpty
(
personIdentity
))
{
if
(
StringUtils
.
isBlank
(
bizOrgCode
))
{
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
if
(
bizOrgCode
==
null
)
{
return
CommonResponseUtil
.
success
(
null
);
}
}
}
}
return
CommonResponseUtil
.
success
(
supervisionVideoService
.
replaceVideo
(
ids
,
bizOrgCode
));
return
CommonResponseUtil
.
success
(
supervisionVideoService
.
replaceVideo
(
ids
,
bizOrgCode
));
...
@@ -382,12 +386,14 @@ public class SupervisionConfigureController extends AbstractBaseController {
...
@@ -382,12 +386,14 @@ public class SupervisionConfigureController extends AbstractBaseController {
@RequestMapping
(
value
=
"/queryVideoList"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/queryVideoList"
,
method
=
RequestMethod
.
GET
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询视频列表"
,
produces
=
"application/json;charset=UTF-8"
,
notes
=
"查询视频列表"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询视频列表"
,
produces
=
"application/json;charset=UTF-8"
,
notes
=
"查询视频列表"
)
public
ResponseModel
queryVideoList
(
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
public
ResponseModel
queryVideoList
()
{
String
bizOrgCode
=
null
;
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
if
(!
ValidationUtil
.
isEmpty
(
personIdentity
))
{
if
(!
ValidationUtil
.
isEmpty
(
personIdentity
))
{
if
(
StringUtils
.
isBlank
(
bizOrgCode
))
{
bizOrgCode
=
personIdentity
.
getCompanyBizOrgCode
();
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
if
(
bizOrgCode
==
null
)
{
return
CommonResponseUtil
.
success
(
null
);
}
}
}
}
return
CommonResponseUtil
.
success
(
supervisionVideoService
.
queryVideoList
(
bizOrgCode
));
return
CommonResponseUtil
.
success
(
supervisionVideoService
.
queryVideoList
(
bizOrgCode
));
...
@@ -397,12 +403,14 @@ public class SupervisionConfigureController extends AbstractBaseController {
...
@@ -397,12 +403,14 @@ public class SupervisionConfigureController extends AbstractBaseController {
@RequestMapping
(
value
=
"/queryVideoAllId"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/queryVideoAllId"
,
method
=
RequestMethod
.
GET
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询对应站下所有视频id"
,
produces
=
"application/json;charset=UTF-8"
,
notes
=
"根据id查询视频"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询对应站下所有视频id"
,
produces
=
"application/json;charset=UTF-8"
,
notes
=
"根据id查询视频"
)
public
ResponseModel
queryVideoAllId
(
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
public
ResponseModel
queryVideoAllId
()
{
String
bizOrgCode
=
null
;
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
if
(!
ValidationUtil
.
isEmpty
(
personIdentity
))
{
if
(!
ValidationUtil
.
isEmpty
(
personIdentity
))
{
if
(
StringUtils
.
isBlank
(
bizOrgCode
))
{
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
if
(
bizOrgCode
==
null
)
{
return
CommonResponseUtil
.
success
(
null
);
}
}
}
}
return
CommonResponseUtil
.
success
(
supervisionVideoService
.
queryVideoAllId
(
bizOrgCode
));
return
CommonResponseUtil
.
success
(
supervisionVideoService
.
queryVideoAllId
(
bizOrgCode
));
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/SupervisionVideoMapper.java
View file @
2b5eedb4
...
@@ -2,17 +2,17 @@ package com.yeejoin.equipmanage.mapper;
...
@@ -2,17 +2,17 @@ package com.yeejoin.equipmanage.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.equipmanage.common.entity.SupervisionVideo
;
import
com.yeejoin.equipmanage.common.entity.SupervisionVideo
;
import
com.yeejoin.equipmanage.common.entity.vo.AlamVideoVO
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
@Mapper
@Mapper
public
interface
SupervisionVideoMapper
extends
BaseMapper
<
SupervisionVideo
>
{
public
interface
SupervisionVideoMapper
extends
BaseMapper
<
SupervisionVideo
>
{
List
<
Map
<
String
,
Object
>
>
getVideoByCompany
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
List
<
AlamVideoVO
>
getVideoByCompany
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
List
<
String
>
queryVideoAllId
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
List
<
String
>
queryVideoAllId
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/ISupervisionVideoService.java
View file @
2b5eedb4
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import
com.yeejoin.equipmanage.common.entity.SupervisionVideo
;
import
com.yeejoin.equipmanage.common.entity.SupervisionVideo
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* @author ZeHua Li
* @author ZeHua Li
...
@@ -14,7 +15,7 @@ public interface ISupervisionVideoService extends IService<SupervisionVideo> {
...
@@ -14,7 +15,7 @@ public interface ISupervisionVideoService extends IService<SupervisionVideo> {
List
queryVideoList
(
String
bizOrgCode
);
List
queryVideoList
(
String
bizOrgCode
);
boolean
replaceVideo
(
String
ids
,
String
bizOrgCode
);
boolean
replaceVideo
(
Map
<
String
,
String
>
ids
,
String
bizOrgCode
);
List
<
String
>
queryVideoAllId
(
String
bizOrgCode
);
List
<
String
>
queryVideoAllId
(
String
bizOrgCode
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/SupervisionVideoServiceImpl.java
View file @
2b5eedb4
...
@@ -3,10 +3,13 @@ package com.yeejoin.equipmanage.service.impl;
...
@@ -3,10 +3,13 @@ package com.yeejoin.equipmanage.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yeejoin.equipmanage.common.entity.SupervisionVideo
;
import
com.yeejoin.equipmanage.common.entity.SupervisionVideo
;
import
com.yeejoin.equipmanage.common.entity.vo.AlamVideoVO
;
import
com.yeejoin.equipmanage.mapper.SupervisionVideoMapper
;
import
com.yeejoin.equipmanage.mapper.SupervisionVideoMapper
;
import
com.yeejoin.equipmanage.service.ISupervisionVideoService
;
import
com.yeejoin.equipmanage.service.ISupervisionVideoService
;
import
com.yeejoin.equipmanage.service.IVideoService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -22,14 +25,22 @@ public class SupervisionVideoServiceImpl extends ServiceImpl<SupervisionVideoMap
...
@@ -22,14 +25,22 @@ public class SupervisionVideoServiceImpl extends ServiceImpl<SupervisionVideoMap
@Autowired
@Autowired
SupervisionVideoMapper
supervisionVideoMapper
;
SupervisionVideoMapper
supervisionVideoMapper
;
@Value
(
"${window.vedioFormat}"
)
String
vedioFormat
;
@Autowired
private
IVideoService
videoService
;
@Override
@Override
public
List
<
List
<
Map
<
String
,
Object
>>>
queryVideoList
(
String
bizOrgCode
)
{
public
List
<
List
<
AlamVideoVO
>>
queryVideoList
(
String
bizOrgCode
)
{
List
<
List
<
Map
<
String
,
Object
>>>
resList
=
new
ArrayList
<>();
List
<
List
<
AlamVideoVO
>>
resList
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
list
=
supervisionVideoMapper
.
getVideoByCompany
(
bizOrgCode
);
List
<
AlamVideoVO
>
list
=
supervisionVideoMapper
.
getVideoByCompany
(
bizOrgCode
);
List
<
Map
<
String
,
Object
>>
mapList
=
new
ArrayList
<>();
list
.
forEach
(
action
->
{
action
.
setVedioFormat
(
vedioFormat
);
action
.
setUrl
(
videoService
.
getVideoUrl
(
action
.
getName
(),
action
.
getPresetPosition
(),
action
.
getUrl
(),
action
.
getCode
()));
});
List
<
AlamVideoVO
>
mapList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
if
(
list
.
size
()
>
1
&&
(
i
/
2
)
-
1
!=
0
&&
i
!=
0
)
{
if
(
list
.
size
()
>
1
&&
(
(
i
+
1
)
%
2
)
-
1
!=
0
&&
i
!=
0
)
{
mapList
.
add
(
list
.
get
(
i
));
mapList
.
add
(
list
.
get
(
i
));
resList
.
add
(
mapList
);
resList
.
add
(
mapList
);
mapList
=
new
ArrayList
<>();
mapList
=
new
ArrayList
<>();
...
@@ -45,9 +56,10 @@ public class SupervisionVideoServiceImpl extends ServiceImpl<SupervisionVideoMap
...
@@ -45,9 +56,10 @@ public class SupervisionVideoServiceImpl extends ServiceImpl<SupervisionVideoMap
@Override
@Override
public
boolean
replaceVideo
(
String
ids
,
String
bizOrgCode
)
{
public
boolean
replaceVideo
(
Map
<
String
,
String
>
map
,
String
bizOrgCode
)
{
supervisionVideoMapper
.
delete
(
new
QueryWrapper
<
SupervisionVideo
>().
eq
(
"biz_org_code"
,
bizOrgCode
));
supervisionVideoMapper
.
delete
(
new
QueryWrapper
<
SupervisionVideo
>().
eq
(
"biz_org_code"
,
bizOrgCode
));
List
<
SupervisionVideo
>
list
=
new
ArrayList
<>();
List
<
SupervisionVideo
>
list
=
new
ArrayList
<>();
String
ids
=
map
.
get
(
"ids"
);
for
(
String
s
:
ids
.
split
(
","
))
{
for
(
String
s
:
ids
.
split
(
","
))
{
SupervisionVideo
supervisionVideo
=
new
SupervisionVideo
();
SupervisionVideo
supervisionVideo
=
new
SupervisionVideo
();
supervisionVideo
.
setCameraId
(
s
);
supervisionVideo
.
setCameraId
(
s
);
...
...
amos-boot-system-equip/src/main/resources/mapper/SupervisionVideoMapper.xml
View file @
2b5eedb4
...
@@ -2,10 +2,17 @@
...
@@ -2,10 +2,17 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.equipmanage.mapper.SupervisionVideoMapper"
>
<mapper
namespace=
"com.yeejoin.equipmanage.mapper.SupervisionVideoMapper"
>
<select
id=
"getVideoByCompany"
resultType=
"java.util.Map"
>
<select
id=
"getVideoByCompany"
resultType=
"com.yeejoin.equipmanage.common.entity.vo.AlamVideoVO"
>
select wv.*
select
wv.id,
wv.token,
wv.name as name,
wv.url,
wv.code,
wv.preset_position as presetPosition,
wv.name
from wl_supervision_video wsv left join wl_video wv on wsv.camera_id = wv.id
from wl_supervision_video wsv left join wl_video wv on wsv.camera_id = wv.id
where wsv.biz_org_code
= #{bizOrgCode}
where wsv.biz_org_code
like concat(#{bizOrgCode},'%');
</select>
</select>
<select
id=
"queryVideoAllId"
resultType=
"java.lang.String"
>
<select
id=
"queryVideoAllId"
resultType=
"java.lang.String"
>
...
...
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