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
a0665f37
Commit
a0665f37
authored
Oct 11, 2022
by
litengwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_dl_plan6' into develop_dl_plan6
parents
dcfed3a0
30a496a4
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
228 additions
and
9 deletions
+228
-9
EquipmentDetail.java
...om/yeejoin/equipmanage/common/entity/EquipmentDetail.java
+6
-0
EquipmentSpecific.java
.../yeejoin/equipmanage/common/entity/EquipmentSpecific.java
+10
-0
SupervisionVideo.java
...m/yeejoin/equipmanage/common/entity/SupervisionVideo.java
+14
-0
FileTypeEnum.java
...va/com/yeejoin/equipmanage/common/enums/FileTypeEnum.java
+2
-1
SupervisionConfigureController.java
...quipmanage/controller/SupervisionConfigureController.java
+65
-8
SupervisionVideoMapper.java
...om/yeejoin/equipmanage/mapper/SupervisionVideoMapper.java
+18
-0
ISupervisionVideoService.java
...yeejoin/equipmanage/service/ISupervisionVideoService.java
+23
-0
EquipmentDetailServiceImpl.java
.../equipmanage/service/impl/EquipmentDetailServiceImpl.java
+4
-0
EquipmentSpecificSerivceImpl.java
...quipmanage/service/impl/EquipmentSpecificSerivceImpl.java
+2
-0
SupervisionVideoServiceImpl.java
...equipmanage/service/impl/SupervisionVideoServiceImpl.java
+68
-0
SupervisionVideoMapper.xml
...quip/src/main/resources/mapper/SupervisionVideoMapper.xml
+16
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/EquipmentDetail.java
View file @
a0665f37
...
@@ -179,4 +179,10 @@ public class EquipmentDetail extends BaseEntity {
...
@@ -179,4 +179,10 @@ public class EquipmentDetail extends BaseEntity {
@TableField
(
value
=
"latitude"
)
@TableField
(
value
=
"latitude"
)
private
Double
latitude
;
private
Double
latitude
;
@TableField
(
exist
=
false
)
private
List
<
UploadFile
>
quality
;
@TableField
(
exist
=
false
)
private
List
<
UploadFile
>
operation
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/EquipmentSpecific.java
View file @
a0665f37
...
@@ -4,6 +4,7 @@ import java.util.Date;
...
@@ -4,6 +4,7 @@ import java.util.Date;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yeejoin.equipmanage.common.entity.publics.BaseEntity
;
import
com.yeejoin.equipmanage.common.entity.publics.BaseEntity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
...
@@ -159,4 +160,13 @@ public class EquipmentSpecific extends BaseEntity {
...
@@ -159,4 +160,13 @@ public class EquipmentSpecific extends BaseEntity {
@ApiModelProperty
(
value
=
"设备值说明"
)
@ApiModelProperty
(
value
=
"设备值说明"
)
@TableField
(
"value_label"
)
@TableField
(
"value_label"
)
private
String
valueLabel
;
private
String
valueLabel
;
@ApiModelProperty
(
value
=
"质保信息"
)
@TableField
(
"warranty_info"
)
private
String
warrantyInfo
;
@ApiModelProperty
(
value
=
"质保周期"
)
@TableField
(
"warranty_period"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
warrantyPeriod
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/SupervisionVideo.java
0 → 100644
View file @
a0665f37
package
com
.
yeejoin
.
equipmanage
.
common
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.equipmanage.common.entity.publics.BaseEntity
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
@Data
@TableName
(
"wl_supervision_video"
)
@ApiModel
(
value
=
"Video对象"
,
description
=
""
)
public
class
SupervisionVideo
extends
BaseEntity
{
private
String
bizOrgCode
;
private
String
cameraId
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/enums/FileTypeEnum.java
View file @
a0665f37
...
@@ -2,7 +2,8 @@ package com.yeejoin.equipmanage.common.enums;
...
@@ -2,7 +2,8 @@ package com.yeejoin.equipmanage.common.enums;
public
enum
FileTypeEnum
{
public
enum
FileTypeEnum
{
image
(
"图片"
),
video
(
"视频"
),
instruction
(
"说明"
),
certificate
(
"资质"
),
face
(
"平面图"
);
image
(
"图片"
),
video
(
"视频"
),
instruction
(
"说明"
),
certificate
(
"资质"
),
face
(
"平面图"
),
quality
(
"合格证"
),
operation
(
"操作说明"
);
String
describe
;
String
describe
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/SupervisionConfigureController.java
View file @
a0665f37
...
@@ -11,6 +11,7 @@ import com.yeejoin.equipmanage.fegin.IotFeign;
...
@@ -11,6 +11,7 @@ import com.yeejoin.equipmanage.fegin.IotFeign;
import
com.yeejoin.equipmanage.mapper.FireFightingSystemMapper
;
import
com.yeejoin.equipmanage.mapper.FireFightingSystemMapper
;
import
com.yeejoin.equipmanage.service.IEquipmentSpecificAlarmService
;
import
com.yeejoin.equipmanage.service.IEquipmentSpecificAlarmService
;
import
com.yeejoin.equipmanage.service.IFireFightingSystemService
;
import
com.yeejoin.equipmanage.service.IFireFightingSystemService
;
import
com.yeejoin.equipmanage.service.ISupervisionVideoService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -46,6 +47,9 @@ public class SupervisionConfigureController extends AbstractBaseController {
...
@@ -46,6 +47,9 @@ public class SupervisionConfigureController extends AbstractBaseController {
@Autowired
@Autowired
private
IotFeign
iotFeign
;
private
IotFeign
iotFeign
;
@Autowired
private
ISupervisionVideoService
supervisionVideoService
;
@PersonIdentify
@PersonIdentify
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"监盘概览水源信息"
)
@ApiOperation
(
value
=
"监盘概览水源信息"
)
...
@@ -123,7 +127,7 @@ public class SupervisionConfigureController extends AbstractBaseController {
...
@@ -123,7 +127,7 @@ public class SupervisionConfigureController extends AbstractBaseController {
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
}
}
}
}
if
(
ObjectUtils
.
isEmpty
(
bizOrgCode
)){
if
(
ObjectUtils
.
isEmpty
(
bizOrgCode
))
{
return
CommonResponseUtil
.
success
(
null
);
return
CommonResponseUtil
.
success
(
null
);
}
}
return
CommonResponseUtil
.
success
(
fireFightingSystemMapper
.
statisticsByStation
(
bizOrgCode
));
return
CommonResponseUtil
.
success
(
fireFightingSystemMapper
.
statisticsByStation
(
bizOrgCode
));
...
@@ -184,11 +188,10 @@ public class SupervisionConfigureController extends AbstractBaseController {
...
@@ -184,11 +188,10 @@ public class SupervisionConfigureController extends AbstractBaseController {
}
}
@PersonIdentify
@PersonIdentify
@RequestMapping
(
value
=
"/fireAlarmLogPage"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/fireAlarmLogPage"
,
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
pageQuery
(
@RequestParam
(
required
=
false
)
String
system
,
@RequestParam
(
required
=
false
)
String
specificIndexKey
,
CommonPageable
commonPageable
)
{
public
ResponseModel
pageQuery
(
@RequestParam
(
required
=
false
)
String
system
,
@RequestParam
(
required
=
false
)
String
specificIndexKey
,
CommonPageable
commonPageable
)
{
if
(
commonPageable
.
getPageNumber
()
==
0
)
{
if
(
commonPageable
.
getPageNumber
()
==
0
)
{
commonPageable
.
setPageNumber
(
1
);
commonPageable
.
setPageNumber
(
1
);
...
@@ -295,7 +298,7 @@ public class SupervisionConfigureController extends AbstractBaseController {
...
@@ -295,7 +298,7 @@ public class SupervisionConfigureController extends AbstractBaseController {
List
<
Map
<
String
,
String
>>
collect
=
listObject1
.
stream
().
filter
(
t
->
(
t
.
containsKey
(
"FHS_PressurePump_Start"
)
&&
t
.
get
(
"FHS_PressurePump_Start"
).
equals
(
"true"
))).
collect
(
Collectors
.
toList
());
List
<
Map
<
String
,
String
>>
collect
=
listObject1
.
stream
().
filter
(
t
->
(
t
.
containsKey
(
"FHS_PressurePump_Start"
)
&&
t
.
get
(
"FHS_PressurePump_Start"
).
equals
(
"true"
))).
collect
(
Collectors
.
toList
());
int
num
=
collect
.
size
();
int
num
=
collect
.
size
();
item
.
put
(
"halfHourStartNum"
,
num
);
item
.
put
(
"halfHourStartNum"
,
num
);
}
else
if
(
200
==
twoHourEntity
.
getStatus
())
{
}
else
if
(
200
==
twoHourEntity
.
getStatus
())
{
String
json1
=
JSON
.
toJSONString
(
twoHourEntity
.
getResult
());
String
json1
=
JSON
.
toJSONString
(
twoHourEntity
.
getResult
());
List
<
Map
<
String
,
String
>>
listObject1
=
(
List
<
Map
<
String
,
String
>>)
JSONArray
.
parse
(
json1
);
List
<
Map
<
String
,
String
>>
listObject1
=
(
List
<
Map
<
String
,
String
>>)
JSONArray
.
parse
(
json1
);
List
<
Map
<
String
,
String
>>
collect
=
listObject1
.
stream
().
filter
(
t
->
(
t
.
containsKey
(
"FHS_PressurePump_Start"
)
&&
t
.
get
(
"FHS_PressurePump_Start"
).
equals
(
"true"
))).
collect
(
Collectors
.
toList
());
List
<
Map
<
String
,
String
>>
collect
=
listObject1
.
stream
().
filter
(
t
->
(
t
.
containsKey
(
"FHS_PressurePump_Start"
)
&&
t
.
get
(
"FHS_PressurePump_Start"
).
equals
(
"true"
))).
collect
(
Collectors
.
toList
());
...
@@ -337,13 +340,13 @@ public class SupervisionConfigureController extends AbstractBaseController {
...
@@ -337,13 +340,13 @@ public class SupervisionConfigureController extends AbstractBaseController {
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
List
<
Map
<
String
,
Object
>>
stateMap
=
fireFightingSystemMapper
.
queryStartAndStopBySpecificId
(
ids
);
List
<
Map
<
String
,
Object
>>
stateMap
=
fireFightingSystemMapper
.
queryStartAndStopBySpecificId
(
ids
);
long
diffMinute
=
0L
;
long
diffMinute
=
0L
;
if
(!
ObjectUtils
.
isEmpty
(
stateMap
))
{
if
(!
ObjectUtils
.
isEmpty
(
stateMap
))
{
List
<
Map
<
String
,
Object
>>
map
=
fireFightingSystemMapper
.
queryStateBySpecificId
((
long
)
stateMap
.
get
(
0
).
get
(
"equipment_specific_id"
));
List
<
Map
<
String
,
Object
>>
map
=
fireFightingSystemMapper
.
queryStateBySpecificId
((
long
)
stateMap
.
get
(
0
).
get
(
"equipment_specific_id"
));
String
startTime
=
map
.
get
(
0
).
get
(
"update_date"
).
toString
();
String
startTime
=
map
.
get
(
0
).
get
(
"update_date"
).
toString
();
String
endTime
=
map
.
get
(
1
).
get
(
"update_date"
).
toString
();
String
endTime
=
map
.
get
(
1
).
get
(
"update_date"
).
toString
();
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
long
start
=
0L
;
long
start
=
0L
;
long
end
=
0L
;
long
end
=
0L
;
try
{
try
{
start
=
sdf
.
parse
(
startTime
.
replaceAll
(
"T"
,
" "
)).
getTime
();
start
=
sdf
.
parse
(
startTime
.
replaceAll
(
"T"
,
" "
)).
getTime
();
end
=
sdf
.
parse
(
endTime
.
replaceAll
(
"T"
,
" "
)).
getTime
();
end
=
sdf
.
parse
(
endTime
.
replaceAll
(
"T"
,
" "
)).
getTime
();
...
@@ -351,7 +354,7 @@ public class SupervisionConfigureController extends AbstractBaseController {
...
@@ -351,7 +354,7 @@ public class SupervisionConfigureController extends AbstractBaseController {
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
}
}
long
res
=
start
-
end
;
long
res
=
start
-
end
;
diffMinute
=
res
/
1000
/
60
;
diffMinute
=
res
/
1000
/
60
;
}
}
long
finalDiffMinute
=
diffMinute
;
long
finalDiffMinute
=
diffMinute
;
pressurePumpInfo
.
getRecords
().
stream
(
pressurePumpInfo
.
getRecords
().
stream
(
...
@@ -361,4 +364,58 @@ public class SupervisionConfigureController extends AbstractBaseController {
...
@@ -361,4 +364,58 @@ public class SupervisionConfigureController extends AbstractBaseController {
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
return
CommonResponseUtil
.
success
(
pressurePumpInfo
);
return
CommonResponseUtil
.
success
(
pressurePumpInfo
);
}
}
@PersonIdentify
@RequestMapping
(
value
=
"/addVideo"
,
method
=
RequestMethod
.
GET
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"添加视频"
,
produces
=
"application/json;charset=UTF-8"
,
notes
=
"添加视频"
)
public
ResponseModel
addVideo
(
@RequestParam
String
ids
,
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
if
(!
ValidationUtil
.
isEmpty
(
personIdentity
))
{
if
(
StringUtils
.
isBlank
(
bizOrgCode
))
{
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
}
}
return
CommonResponseUtil
.
success
(
supervisionVideoService
.
addVide
(
ids
,
bizOrgCode
));
}
@PersonIdentify
@RequestMapping
(
value
=
"/queryVideoList"
,
method
=
RequestMethod
.
GET
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询视频列表"
,
produces
=
"application/json;charset=UTF-8"
,
notes
=
"查询视频列表"
)
public
ResponseModel
queryVideoList
(
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
if
(!
ValidationUtil
.
isEmpty
(
personIdentity
))
{
if
(
StringUtils
.
isBlank
(
bizOrgCode
))
{
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
}
}
return
CommonResponseUtil
.
success
(
supervisionVideoService
.
queryVideoList
(
bizOrgCode
));
}
@PersonIdentify
@RequestMapping
(
value
=
"/delVideo"
,
method
=
RequestMethod
.
GET
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"删除视频"
,
produces
=
"application/json;charset=UTF-8"
,
notes
=
"删除视频"
)
public
ResponseModel
delVideo
(
String
id
)
{
return
CommonResponseUtil
.
success
(
supervisionVideoService
.
deleteVideo
(
id
));
}
@PersonIdentify
@RequestMapping
(
value
=
"/queryVideoAllId"
,
method
=
RequestMethod
.
GET
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询对应站下所有视频id"
,
produces
=
"application/json;charset=UTF-8"
,
notes
=
"根据id查询视频"
)
public
ResponseModel
queryVideoAllId
(
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
if
(!
ValidationUtil
.
isEmpty
(
personIdentity
))
{
if
(
StringUtils
.
isBlank
(
bizOrgCode
))
{
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
}
}
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
0 → 100644
View file @
a0665f37
package
com
.
yeejoin
.
equipmanage
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.equipmanage.common.entity.SupervisionVideo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
@Mapper
public
interface
SupervisionVideoMapper
extends
BaseMapper
<
SupervisionVideo
>
{
List
<
Map
<
String
,
Object
>>
getVideoByCompany
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
List
<
Map
<
String
,
Object
>>
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
0 → 100644
View file @
a0665f37
package
com
.
yeejoin
.
equipmanage
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.equipmanage.common.entity.SupervisionVideo
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author ZeHua Li
* @date 2020/11/23 15:28
* @since v2.0
*/
public
interface
ISupervisionVideoService
extends
IService
<
SupervisionVideo
>
{
List
queryVideoList
(
String
bizOrgCode
);
int
deleteVideo
(
String
id
);
boolean
addVide
(
String
ids
,
String
bizOrgCode
);
List
<
Map
<
String
,
Object
>>
queryVideoAllId
(
String
bizOrgCode
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentDetailServiceImpl.java
View file @
a0665f37
...
@@ -143,6 +143,8 @@ public class EquipmentDetailServiceImpl extends ServiceImpl<EquipmentDetailMappe
...
@@ -143,6 +143,8 @@ public class EquipmentDetailServiceImpl extends ServiceImpl<EquipmentDetailMappe
equipmentDetail
.
setVideo
(
getEquipFileList
(
id
,
FileTypeEnum
.
video
.
toString
()));
equipmentDetail
.
setVideo
(
getEquipFileList
(
id
,
FileTypeEnum
.
video
.
toString
()));
equipmentDetail
.
setCertification
(
getEquipFileList
(
id
,
FileTypeEnum
.
certificate
.
toString
()));
equipmentDetail
.
setCertification
(
getEquipFileList
(
id
,
FileTypeEnum
.
certificate
.
toString
()));
equipmentDetail
.
setInstruction
(
getEquipFileList
(
id
,
FileTypeEnum
.
instruction
.
toString
()));
equipmentDetail
.
setInstruction
(
getEquipFileList
(
id
,
FileTypeEnum
.
instruction
.
toString
()));
equipmentDetail
.
setQuality
(
getEquipFileList
(
id
,
FileTypeEnum
.
quality
.
toString
()));
equipmentDetail
.
setOperation
(
getEquipFileList
(
id
,
FileTypeEnum
.
operation
.
toString
()));
if
(
equipmentDetail
.
getCountry
()
!=
null
)
{
if
(
equipmentDetail
.
getCountry
()
!=
null
)
{
equipmentDetail
.
setCountryName
(
equipmentDetail
.
setCountryName
(
iSystemDicService
.
getOne
(
new
QueryWrapper
<
SystemDic
>().
eq
(
"id"
,
equipmentDetail
.
getCountry
())).
getName
());
iSystemDicService
.
getOne
(
new
QueryWrapper
<
SystemDic
>().
eq
(
"id"
,
equipmentDetail
.
getCountry
())).
getName
());
...
@@ -225,6 +227,8 @@ public class EquipmentDetailServiceImpl extends ServiceImpl<EquipmentDetailMappe
...
@@ -225,6 +227,8 @@ public class EquipmentDetailServiceImpl extends ServiceImpl<EquipmentDetailMappe
fileList
.
addAll
(
fillFileList
(
equipmentDetail
.
getVideo
(),
equipmentDetail
.
getId
(),
FileTypeEnum
.
video
.
toString
()));
fileList
.
addAll
(
fillFileList
(
equipmentDetail
.
getVideo
(),
equipmentDetail
.
getId
(),
FileTypeEnum
.
video
.
toString
()));
fileList
.
addAll
(
fillFileList
(
equipmentDetail
.
getCertification
(),
equipmentDetail
.
getId
(),
FileTypeEnum
.
certificate
.
toString
()));
fileList
.
addAll
(
fillFileList
(
equipmentDetail
.
getCertification
(),
equipmentDetail
.
getId
(),
FileTypeEnum
.
certificate
.
toString
()));
fileList
.
addAll
(
fillFileList
(
equipmentDetail
.
getInstruction
(),
equipmentDetail
.
getId
(),
FileTypeEnum
.
instruction
.
toString
()));
fileList
.
addAll
(
fillFileList
(
equipmentDetail
.
getInstruction
(),
equipmentDetail
.
getId
(),
FileTypeEnum
.
instruction
.
toString
()));
fileList
.
addAll
(
fillFileList
(
equipmentDetail
.
getQuality
(),
equipmentDetail
.
getId
(),
FileTypeEnum
.
quality
.
toString
()));
fileList
.
addAll
(
fillFileList
(
equipmentDetail
.
getOperation
(),
equipmentDetail
.
getId
(),
FileTypeEnum
.
operation
.
toString
()));
iUploadFileService
.
saveBatch
(
fileList
);
iUploadFileService
.
saveBatch
(
fileList
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificSerivceImpl.java
View file @
a0665f37
...
@@ -433,6 +433,8 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
...
@@ -433,6 +433,8 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
fileList
.
addAll
(
fillFileList
(
equipmentDetail
.
getVideo
(),
equipmentDetail
.
getId
(),
FileTypeEnum
.
video
.
toString
()));
fileList
.
addAll
(
fillFileList
(
equipmentDetail
.
getVideo
(),
equipmentDetail
.
getId
(),
FileTypeEnum
.
video
.
toString
()));
fileList
.
addAll
(
fillFileList
(
equipmentDetail
.
getCertification
(),
equipmentDetail
.
getId
(),
FileTypeEnum
.
certificate
.
toString
()));
fileList
.
addAll
(
fillFileList
(
equipmentDetail
.
getCertification
(),
equipmentDetail
.
getId
(),
FileTypeEnum
.
certificate
.
toString
()));
fileList
.
addAll
(
fillFileList
(
equipmentDetail
.
getInstruction
(),
equipmentDetail
.
getId
(),
FileTypeEnum
.
instruction
.
toString
()));
fileList
.
addAll
(
fillFileList
(
equipmentDetail
.
getInstruction
(),
equipmentDetail
.
getId
(),
FileTypeEnum
.
instruction
.
toString
()));
fileList
.
addAll
(
fillFileList
(
equipmentDetail
.
getQuality
(),
equipmentDetail
.
getId
(),
FileTypeEnum
.
quality
.
toString
()));
fileList
.
addAll
(
fillFileList
(
equipmentDetail
.
getOperation
(),
equipmentDetail
.
getId
(),
FileTypeEnum
.
operation
.
toString
()));
iUploadFileService
.
saveBatch
(
fileList
);
iUploadFileService
.
saveBatch
(
fileList
);
}
}
equipmentDetailService
.
saveOrUpdateBatch
(
equipmentDetails
);
equipmentDetailService
.
saveOrUpdateBatch
(
equipmentDetails
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/SupervisionVideoServiceImpl.java
0 → 100644
View file @
a0665f37
package
com
.
yeejoin
.
equipmanage
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yeejoin.equipmanage.common.entity.SupervisionVideo
;
import
com.yeejoin.equipmanage.mapper.SupervisionVideoMapper
;
import
com.yeejoin.equipmanage.service.ISupervisionVideoService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.UUID
;
@Slf4j
@Service
//@EnableAsync
public
class
SupervisionVideoServiceImpl
extends
ServiceImpl
<
SupervisionVideoMapper
,
SupervisionVideo
>
implements
ISupervisionVideoService
{
@Autowired
SupervisionVideoMapper
supervisionVideoMapper
;
@Override
public
List
<
List
<
Map
<
String
,
Object
>>>
queryVideoList
(
String
bizOrgCode
)
{
List
<
List
<
Map
<
String
,
Object
>>>
resList
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
list
=
supervisionVideoMapper
.
getVideoByCompany
(
bizOrgCode
);
List
<
Map
<
String
,
Object
>>
mapList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
if
(
list
.
size
()
>
1
&&
(
i
/
2
)
-
1
!=
0
&&
i
!=
0
)
{
mapList
.
add
(
list
.
get
(
i
));
resList
.
add
(
mapList
);
mapList
=
new
ArrayList
<>();
}
else
{
mapList
.
add
(
list
.
get
(
i
));
if
(
i
==
list
.
size
()
-
1
)
{
resList
.
add
(
mapList
);
}
}
}
return
resList
;
}
@Override
public
int
deleteVideo
(
String
id
)
{
return
supervisionVideoMapper
.
delete
(
new
QueryWrapper
<
SupervisionVideo
>().
eq
(
"camera_id"
,
id
));
}
@Override
public
boolean
addVide
(
String
ids
,
String
bizOrgCode
)
{
List
<
SupervisionVideo
>
list
=
new
ArrayList
<>();
for
(
String
s
:
ids
.
split
(
","
))
{
SupervisionVideo
supervisionVideo
=
new
SupervisionVideo
();
supervisionVideo
.
setCameraId
(
s
);
supervisionVideo
.
setBizOrgCode
(
bizOrgCode
);
supervisionVideo
.
setId
(
Long
.
valueOf
(
String
.
valueOf
(
UUID
.
randomUUID
().
getLeastSignificantBits
()).
replace
(
"-"
,
""
)));
list
.
add
(
supervisionVideo
);
}
return
saveBatch
(
list
);
}
@Override
public
List
<
Map
<
String
,
Object
>>
queryVideoAllId
(
String
bizOrgCode
)
{
return
supervisionVideoMapper
.
queryVideoAllId
(
bizOrgCode
);
}
}
amos-boot-system-equip/src/main/resources/mapper/SupervisionVideoMapper.xml
0 → 100644
View file @
a0665f37
<?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.yeejoin.equipmanage.mapper.SupervisionVideoMapper"
>
<select
id=
"getVideoByCompany"
resultType=
"java.util.Map"
>
select wv.*
from wl_supervision_video wsv left join wl_video wv on wsv.camera_id = wv.id
where wsv.biz_org_code = #{bizOrgCode}
</select>
<select
id=
"queryVideoAllId"
resultType=
"java.util.Map"
>
select wsv.camera_id
from wl_supervision_video wsv
where wsv.biz_org_code = #{bizOrgCode}
</select>
</mapper>
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