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
bdbd215c
Commit
bdbd215c
authored
Aug 15, 2022
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
0f0d4d3f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
39 changed files
with
376 additions
and
73 deletions
+376
-73
RequestData.java
.../yeejoin/amos/boot/module/common/api/dto/RequestData.java
+23
-0
EquipFeignClient.java
...n/amos/boot/module/common/api/feign/EquipFeignClient.java
+11
-5
KeySiteMapper.java
...oin/amos/boot/module/common/api/mapper/KeySiteMapper.java
+1
-1
WaterResourceMapper.java
...os/boot/module/common/api/mapper/WaterResourceMapper.java
+1
-1
KeySiteMapper.xml
...le-common-api/src/main/resources/mapper/KeySiteMapper.xml
+3
-0
OrgUsrMapper.xml
...ule-common-api/src/main/resources/mapper/OrgUsrMapper.xml
+1
-1
WaterResourceMapper.xml
...mon-api/src/main/resources/mapper/WaterResourceMapper.xml
+7
-1
AlertCalled.java
.../yeejoin/amos/boot/module/jcs/api/entity/AlertCalled.java
+2
-0
CommandController.java
...boot/module/command/biz/controller/CommandController.java
+69
-9
KeySiteController.java
.../boot/module/common/biz/controller/KeySiteController.java
+3
-3
WaterResourceController.java
...module/common/biz/controller/WaterResourceController.java
+41
-1
KeySiteServiceImpl.java
...ot/module/common/biz/service/impl/KeySiteServiceImpl.java
+2
-2
WaterResourceServiceImpl.java
...ule/common/biz/service/impl/WaterResourceServiceImpl.java
+2
-2
EquipmentManageController.java
...oin/equipmanage/controller/EquipmentManageController.java
+2
-1
FireFightingSystemController.java
.../equipmanage/controller/FireFightingSystemController.java
+18
-2
RiskSourceSceneController.java
...oin/equipmanage/controller/RiskSourceSceneController.java
+3
-2
VideoController.java
...a/com/yeejoin/equipmanage/controller/VideoController.java
+26
-0
WarehouseStructureController.java
.../equipmanage/controller/WarehouseStructureController.java
+2
-2
EquipmentSpecificMapper.java
...m/yeejoin/equipmanage/mapper/EquipmentSpecificMapper.java
+1
-1
VideoMapper.java
...main/java/com/yeejoin/equipmanage/mapper/VideoMapper.java
+27
-15
EquipmentManageService.java
...m/yeejoin/equipmanage/service/EquipmentManageService.java
+2
-1
IFireFightingSystemService.java
...ejoin/equipmanage/service/IFireFightingSystemService.java
+1
-1
IRiskSourceSceneService.java
.../yeejoin/equipmanage/service/IRiskSourceSceneService.java
+1
-1
IVideoService.java
...n/java/com/yeejoin/equipmanage/service/IVideoService.java
+10
-3
IWarehouseStructureService.java
...ejoin/equipmanage/service/IWarehouseStructureService.java
+3
-1
EquipmentManageServiceImpl.java
.../equipmanage/service/impl/EquipmentManageServiceImpl.java
+2
-1
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+2
-2
RiskSourceSceneServiceImpl.java
.../equipmanage/service/impl/RiskSourceSceneServiceImpl.java
+3
-3
VideoServiceImpl.java
...om/yeejoin/equipmanage/service/impl/VideoServiceImpl.java
+18
-0
WarehouseStructureServiceImpl.java
...uipmanage/service/impl/WarehouseStructureServiceImpl.java
+39
-5
InputItemController.java
.../amos/patrol/business/controller/InputItemController.java
+6
-0
PointController.java
...join/amos/patrol/business/controller/PointController.java
+12
-2
EquipFeign.java
...va/com/yeejoin/amos/patrol/business/feign/EquipFeign.java
+1
-1
PlanTaskServiceImpl.java
...mos/patrol/business/service/impl/PlanTaskServiceImpl.java
+7
-0
EquipmentManageMapper.xml
...equip/src/main/resources/mapper/EquipmentManageMapper.xml
+8
-2
EquipmentSpecificMapper.xml
...uip/src/main/resources/mapper/EquipmentSpecificMapper.xml
+4
-0
VideoMapper.xml
...ot-system-equip/src/main/resources/mapper/VideoMapper.xml
+0
-0
jcs-1.0.0.0.xml
...ystem-jcs/src/main/resources/db/changelog/jcs-1.0.0.0.xml
+11
-1
pointMapper.xml
...ystem-patrol/src/main/resources/db/mapper/pointMapper.xml
+1
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/RequestData.java
View file @
bdbd215c
...
...
@@ -19,6 +19,14 @@ public class RequestData {
@ApiModelProperty
(
value
=
"纬度"
)
private
Double
latitude
;
//视频匹配规则方便查询 增加第二个经纬度 用来传递 优先级2的坐标
@ApiModelProperty
(
value
=
"经度2"
)
private
Double
longitudeTwo
;
@ApiModelProperty
(
value
=
"纬度2"
)
private
Double
latitudeTwo
;
@ApiModelProperty
(
value
=
"距离"
)
private
Double
distance
;
...
...
@@ -48,4 +56,19 @@ public class RequestData {
@ApiModelProperty
(
value
=
"排序"
)
private
String
orderTime
;
@ApiModelProperty
(
value
=
"筛选条件-建筑Id"
)
private
String
buildingId
;
@ApiModelProperty
(
value
=
"筛选条件-视频类型"
)
private
String
type
;
@ApiModelProperty
(
value
=
"筛选条件-视频编码"
)
private
String
code
;
@ApiModelProperty
(
value
=
"筛选条件-视频名称"
)
private
String
remark
;
@ApiModelProperty
(
value
=
"筛选条件-所属单位"
)
private
String
bizOrgCode
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/feign/EquipFeignClient.java
View file @
bdbd215c
...
...
@@ -4,7 +4,7 @@ import java.util.LinkedHashMap;
import
java.util.List
;
import
java.util.Map
;
import
com.yeejoin.amos.boot.module.common.api.dto.
CarInfoDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.
*
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -20,9 +20,6 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.feign.MultipartSupportConfig
;
import
com.yeejoin.amos.boot.module.common.api.dto.EquipmentIndexDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.PerfQuotaIotDTO
;
import
com.yeejoin.amos.boot.module.common.api.dto.VideoDto
;
import
com.yeejoin.amos.component.feign.config.InnerInvokException
;
/**
...
...
@@ -212,7 +209,8 @@ public interface EquipFeignClient {
@RequestParam
(
"buildingId"
)
String
buildingId
,
@RequestParam
(
"code"
)
String
code
,
@RequestParam
(
"equipmentName"
)
String
equipmentName
,
@RequestParam
(
"bizOrgCode"
)
String
bizOrgCode
@RequestParam
(
"bizOrgCode"
)
String
bizOrgCode
,
@RequestParam
(
"type"
)
String
type
);
...
...
@@ -243,6 +241,11 @@ public interface EquipFeignClient {
@RequestParam
(
"latitude"
)
Double
latitude
,
@RequestParam
(
"distance"
)
Double
distance
);
@RequestMapping
(
value
=
"/video/pageVideoByAlertType"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
pageVideoByAlertType
(
@RequestParam
(
"pageNum"
)
Integer
pageNum
,
@RequestParam
(
"pageSize"
)
Integer
pageSize
,
@RequestParam
(
"par"
)
RequestData
par
);
@RequestMapping
(
value
=
"/video/pageList"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
Page
<
VideoDto
>>
pageList
(
@RequestParam
(
"current"
)
Integer
current
,
...
...
@@ -386,4 +389,7 @@ public interface EquipFeignClient {
@RequestMapping
(
value
=
"/building/companyBuildingTree"
,
method
=
RequestMethod
.
GET
)
public
ResponseModel
<
Object
>
getCompanyBuildingTree
();
@RequestMapping
(
value
=
"/building/tree"
,
method
=
RequestMethod
.
GET
)
LinkedHashMap
<
String
,
Object
>
getTreeBuilding
();
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/mapper/KeySiteMapper.java
View file @
bdbd215c
...
...
@@ -22,7 +22,7 @@ public interface KeySiteMapper extends BaseMapper<KeySite> {
*/
public
IPage
<
KeySiteDto
>
getPageList
(
Page
<
KeySiteDto
>
page
,
String
name
,
List
<
Long
>
buildingIds
,
String
fireEnduranceRate
,
String
useNature
,
String
fireFacilitiesInfo
,
String
bizOrgCode
);
String
useNature
,
String
fireFacilitiesInfo
,
String
bizOrgCode
,
String
belongId
);
/**
* 获取所有的重点部位数据
* @return
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/mapper/WaterResourceMapper.java
View file @
bdbd215c
...
...
@@ -47,7 +47,7 @@ public interface WaterResourceMapper extends BaseMapper<WaterResource> {
*/
Page
<
WaterResourceDto
>
getWaterResourcePageByParams
(
Page
<
WaterResourceDto
>
page
,
String
name
,
String
resourceType
,
ArrayList
<
Long
>
belongBuildingId
,
Long
belongFightingSystemId
,
Long
sequenceNbr
,
String
equipId
,
String
bizOrgCode
,
String
equipCateGoryCode
,
List
<
String
>
ids
);
Long
sequenceNbr
,
String
equipId
,
String
bizOrgCode
,
String
equipCateGoryCode
,
List
<
String
>
ids
,
String
companyId
);
List
<
Map
<
String
,
Object
>>
getWaterTypeByBizOrgCode
(
String
bizOrgCode
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/KeySiteMapper.xml
View file @
bdbd215c
...
...
@@ -53,6 +53,9 @@
<if
test=
"fireEnduranceRate != null and fireEnduranceRate != ''"
>
AND c.`fire_endurance_rate`= #{fireEnduranceRate}
</if>
<if
test=
"belongId != null and belongId != '' and belongId != -1 "
>
AND c.`belong_id`= #{belongId}
</if>
<if
test=
"useNature != null and useNature != ''"
>
AND c.`use_nature`= #{useNature}
</if>
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/OrgUsrMapper.xml
View file @
bdbd215c
...
...
@@ -968,7 +968,7 @@ LEFT JOIN (
FROM
cb_org_usr usr
where
(usr.biz_org_type = 'COMPANY' OR usr.biz_org_type = 'DEPARTMENT')
(usr.biz_org_type = 'COMPANY' OR usr.biz_org_type = 'DEPARTMENT')
and usr.biz_org_code like concat (#{bizOrgCode},'%')
and usr.is_delete = false
</select>
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/WaterResourceMapper.xml
View file @
bdbd215c
...
...
@@ -149,7 +149,10 @@
</if>
</if>
<if
test=
"belongBuildingId != null and belongBuildingId.size() > 0"
>
and find_in_set(belong_building_id, #{belongBuildingId}) > 0
and belong_building_id in
<foreach
collection=
"belongBuildingId"
open=
"("
close=
")"
separator=
","
item=
"sid"
>
#{sid}
</foreach>
</if>
<if
test=
"ids != null and ids.size()>0"
>
AND sequence_nbr NOT IN
...
...
@@ -158,6 +161,9 @@
</foreach>
</if>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
and biz_org_code like concat( #{bizOrgCode}, '%')
</if>
<if
test=
"companyId != null and companyId != ''"
>
and management_unit_id = #{companyId}
</if>
order by cb_water_resource.rec_date desc
</select>
<select
id=
"getWaterTypeByBizOrgCode"
resultType=
"map"
>
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/entity/AlertCalled.java
View file @
bdbd215c
...
...
@@ -152,4 +152,6 @@ public class AlertCalled extends BaseEntity {
private
String
systemSource
;
@ApiModelProperty
(
value
=
"系统来源code"
)
private
String
systemSourceCode
;
@ApiModelProperty
(
value
=
"物联报警关联Id"
)
private
String
relationId
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-command-biz/src/main/java/com/yeejoin/amos/boot/module/command/biz/controller/CommandController.java
View file @
bdbd215c
...
...
@@ -26,12 +26,10 @@ import com.yeejoin.amos.boot.module.common.api.feign.IotFeignClient;
import
com.yeejoin.amos.boot.module.common.api.feign.VideoFeignClient
;
import
com.yeejoin.amos.boot.module.common.api.service.*
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.*
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransferCompanyResources
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.UserCar
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.*
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.AlertStageEnums
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.FireCarStatusEnum
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.AirportStandMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.PowerTransferCompanyResourcesMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.PowerTransferMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.service.*
;
...
...
@@ -44,6 +42,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.client.RestTemplate
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
...
...
@@ -100,7 +99,6 @@ public class CommandController extends BaseController {
IDutyCarService
dutyCarService
;
@Autowired
IFireExpertsService
fireExpertsService
;
@Autowired
IFirefightersService
firefightersService
;
@Autowired
...
...
@@ -157,6 +155,11 @@ public class CommandController extends BaseController {
@Autowired
RestTemplate
restTemplate
;
@Autowired
AirportStandMapper
airportStandMapper
;
private
static
final
String
JW
=
"mechinePosition"
;
private
static
final
String
KEYSITE
=
"keySiteExcle"
;
/**
* 警情列表
*
...
...
@@ -307,12 +310,69 @@ public class CommandController extends BaseController {
@GetMapping
(
value
=
"video/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
" 视频分页查询88"
,
notes
=
"视频分页查询88"
)
public
ResponseModel
<
Object
>
getVideo
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
)
{
par
.
setDistance
(
500
D
);
ResponseModel
<
Map
<
String
,
Object
>>
result
=
null
;
if
(
par
.
getAlertId
()
!=
null
)
{
AlertCalled
alertCalled
=
iAlertCalledService
.
getAlertCalledById
(
par
.
getAlertId
());
par
.
setLatitude
(
alertCalled
.
getCoordinateX
());
par
.
setLongitude
(
alertCalled
.
getCoordinateY
());
List
<
AlertFormValue
>
list
=
alertFormValueService
.
getzqlist
(
alertCalled
.
getSequenceNbr
());
switch
(
alertCalled
.
getAlertTypeCode
()){
case
"230"
:
case
"237"
:
case
"238"
:
for
(
AlertFormValue
alertFormValue
:
list
)
{
if
(
alertFormValue
.
getFieldCode
().
equals
(
JW
)
&&
!
StringUtils
.
isEmpty
(
alertFormValue
.
getFieldValue
())){
QueryWrapper
<
AirportStand
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"stand_code"
,
alertFormValue
.
getFieldValue
());
AirportStand
airportStand
=
airportStandMapper
.
selectOne
(
queryWrapper
);
par
.
setLatitude
(
Double
.
valueOf
(
airportStand
.
getLatitude
()));
par
.
setLongitude
(
Double
.
valueOf
(
airportStand
.
getLongitude
()));
}
}
par
.
setLatitudeTwo
(
alertCalled
.
getCoordinateX
());
par
.
setLongitudeTwo
(
alertCalled
.
getCoordinateY
());
break
;
case
"229"
:
if
(
alertCalled
.
getAlertSourceCode
().
equals
(
"1326"
)){
result
=
this
.
getDetailsById
(
Long
.
valueOf
(
alertCalled
.
getRelationId
()),
null
,
null
,
null
);
par
.
setLatitudeTwo
(
alertCalled
.
getCoordinateX
());
par
.
setLongitudeTwo
(
alertCalled
.
getCoordinateY
());
}
else
{
for
(
AlertFormValue
alertFormValue
:
list
)
{
if
(
alertFormValue
.
getFieldCode
().
equals
(
KEYSITE
)
&&
!
StringUtils
.
isEmpty
(
alertFormValue
.
getFieldValueCode
()))
{
KeySiteDto
keySiteDto
=
keySiteService
.
getSequenceNbr
(
Long
.
parseLong
(
alertFormValue
.
getFieldValueCode
()));
par
.
setBuildingId
(
keySiteDto
.
getBuildingId
().
toString
())
;
}
}
}
break
;
case
"235"
:
par
.
setLatitude
(
alertCalled
.
getCoordinateX
());
par
.
setLongitude
(
alertCalled
.
getCoordinateY
());
break
;
}
}
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
data
=
null
;
if
(
ValidationUtil
.
isEmpty
(
par
.
getLatitudeTwo
())
){
data
=
equipFeignClient
.
getVideopag
(
pageNum
==
0
?
"1"
:
pageNum
.
toString
(),
pageSize
.
toString
(),
par
.
getBuildingId
(),
par
.
getCode
(),
null
,
par
.
getBizOrgCode
(),
par
.
getType
());
}
else
{
data
=
equipFeignClient
.
pageVideoByAlertType
(
pageNum
==
0
?
1
:
pageNum
,
pageSize
,
par
);
}
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
data
=
equipFeignClient
.
pageVideo
(
pageNum
==
0
?
1
:
pageNum
,
pageSize
,
par
.
getLongitude
(),
par
.
getLatitude
(),
par
.
getDistance
());
if
(!
ObjectUtils
.
isEmpty
(
result
)&&!
ObjectUtils
.
isEmpty
(
result
.
getResult
().
get
(
"video"
))){
List
<
Map
<
String
,
Object
>>
records
=
result
!=
null
?
(
List
<
Map
<
String
,
Object
>>)
result
.
getResult
().
get
(
"video"
)
:
null
;
Page
<
Map
<
String
,
Object
>>
page
=
data
.
getResult
();
records
.
addAll
(
data
.
getResult
().
getRecords
());
page
.
setRecords
(
records
);
data
.
setResult
(
page
);
}
// ResponseModel<Page<Map<String, Object>>> data = equipFeignClient.pageVideo(pageNum == 0 ? 1 : pageNum, pageSize, par.getLongitude(), par.getLatitude(), par.getDistance());
Page
<
Map
<
String
,
Object
>>
pag
=
data
!=
null
?
data
.
getResult
()
:
null
;
List
<
Map
<
String
,
Object
>>
records
=
pag
!=
null
?
pag
.
getRecords
()
:
null
;
if
(
records
!=
null
&&
records
.
size
()
>
0
)
{
...
...
@@ -338,7 +398,7 @@ public class CommandController extends BaseController {
String
bizOrgCode
)
{
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
data
=
equipFeignClient
.
getVideopag
(
current
,
size
,
buildingId
,
code
,
equipmentName
,
bizOrgCode
);
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
data
=
equipFeignClient
.
getVideopag
(
current
,
size
,
buildingId
,
code
,
equipmentName
,
bizOrgCode
,
null
);
Page
<
Map
<
String
,
Object
>>
pag
=
data
!=
null
?
data
.
getResult
()
:
null
;
List
<
Map
<
String
,
Object
>>
records
=
pag
!=
null
?
pag
.
getRecords
()
:
null
;
if
(
records
!=
null
&&
records
.
size
()
>
0
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/KeySiteController.java
View file @
bdbd215c
...
...
@@ -322,13 +322,13 @@ public class KeySiteController extends BaseController {
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
required
=
false
)
String
name
,
@RequestParam
(
required
=
false
)
Long
buildingId
,
@RequestParam
(
required
=
false
)
String
fireEnduranceRate
,
@RequestParam
(
required
=
false
)
String
useNature
,
@RequestParam
(
required
=
false
)
String
fireFacilitiesInfo
,
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
@RequestParam
(
required
=
false
)
String
bizOrgCode
,
@RequestParam
(
required
=
false
)
String
belongId
)
{
Page
<
KeySiteDto
>
page
=
new
Page
<
KeySiteDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
keySiteServiceImpl
.
getPageList
(
page
,
name
,
buildingId
,
fireEnduranceRate
,
useNature
,
fireFacilitiesInfo
,
bizOrgCode
));
useNature
,
fireFacilitiesInfo
,
bizOrgCode
,
belongId
));
}
/**
...
...
@@ -352,7 +352,7 @@ public class KeySiteController extends BaseController {
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
keySiteServiceImpl
.
getPageList
(
page
,
name
,
buildingId
,
fireEnduranceRate
,
useNature
,
fireFacilitiesInfo
,
bizOrgCode
));
useNature
,
fireFacilitiesInfo
,
bizOrgCode
,
null
));
}
@PersonIdentify
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/WaterResourceController.java
View file @
bdbd215c
...
...
@@ -26,6 +26,7 @@ import org.springframework.beans.factory.annotation.Value;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
...
@@ -436,14 +437,30 @@ public class WaterResourceController extends BaseController {
@RequestParam
(
value
=
"classifyId"
,
required
=
false
)
String
classifyId
,
@RequestParam
(
value
=
"bizOrgCode"
,
required
=
false
)
String
bizOrgCode
,
@RequestParam
(
value
=
"equipCateGoryCode"
,
required
=
false
)
String
equipCateGoryCode
,
@RequestParam
(
value
=
"companyId"
,
required
=
false
)
String
companyId
,
@RequestParam
(
value
=
"ids"
,
required
=
false
)
List
<
String
>
ids
)
{
Page
<
WaterResourceDto
>
page
=
new
Page
<>();
page
.
setCurrent
(
pageNum
);
page
.
setSize
(
pageSize
);
//消防巡查 巡查对象用
if
(
belongBuildingId
!=
null
&&
belongBuildingId
.
size
()
==
1
){
LinkedHashMap
<
String
,
Object
>
o
=
equipFeignClient
.
getTreeBuilding
();
if
(
o
==
null
||!
"200"
.
equals
(
o
.
get
(
"status"
).
toString
()))
{
throw
new
BadRequest
(
"获取建筑树出错"
);
}
List
<
Map
<
String
,
Object
>>
buildingTree
=
(
List
<
Map
<
String
,
Object
>>)
o
.
get
(
"result"
);
ArrayList
<
Long
>
finalBelongBuildingId
=
belongBuildingId
;
Map
<
String
,
Object
>
node
=
getAllNodes
(
buildingTree
).
stream
().
filter
(
map
->
finalBelongBuildingId
.
get
(
0
).
toString
().
equals
(
map
.
get
(
"id"
))).
findFirst
().
orElse
(
null
);
if
(
node
!=
null
)
{
belongBuildingId
=
findBuildChildrenIds
(
node
);
}
}
/*bug 2913 更换保存方式 存储到公共附件表 chenzhao 2021-10-18 start*/
Page
<
WaterResourceDto
>
waterResourceDtoPage
=
waterResourceServiceImpl
.
queryForWaterResourcePage
(
page
,
name
,
resourceType
,
belongBuildingId
,
belongFightingSystemId
,
sequenceNbr
,
classifyId
,
bizOrgCode
,
equipCateGoryCode
,
ids
);
belongBuildingId
,
belongFightingSystemId
,
sequenceNbr
,
classifyId
,
bizOrgCode
,
equipCateGoryCode
,
ids
,
companyId
);
List
<
WaterResourceDto
>
records
=
waterResourceDtoPage
.
getRecords
();
records
.
forEach
(
i
->
{
Map
<
String
,
List
<
AttachmentDto
>>
attachments
=
sourceFileService
.
getAttachments
(
i
.
getSequenceNbr
());
...
...
@@ -455,6 +472,29 @@ public class WaterResourceController extends BaseController {
return
ResponseHelper
.
buildResponse
(
waterResourceDtoPage
);
}
private
ArrayList
<
Long
>
findBuildChildrenIds
(
Map
<
String
,
Object
>
building
)
{
List
<
Map
<
String
,
Object
>>
buildingTree
=
getAllNodes
(
Collections
.
singletonList
(
building
));
ArrayList
<
Long
>
objects
=
new
ArrayList
<>();
List
<
Long
>
id
=
buildingTree
.
stream
().
map
(
building123
->
Long
.
valueOf
(
building123
.
get
(
"id"
).
toString
())).
collect
(
Collectors
.
toList
());
if
(
id
.
size
()>
0
){
objects
.
addAll
(
id
);
}
return
objects
;
}
private
List
<
Map
<
String
,
Object
>>
getAllNodes
(
List
<
Map
<
String
,
Object
>>
buildingTree
)
{
List
<
Map
<
String
,
Object
>>
res
=
new
LinkedList
<>();
if
(
buildingTree
!=
null
&&
!
buildingTree
.
isEmpty
())
{
res
.
addAll
(
buildingTree
);
buildingTree
.
forEach
(
building
->
{
List
<
Map
<
String
,
Object
>>
childrenTree
=
(
List
<
Map
<
String
,
Object
>>)
building
.
get
(
"children"
);
res
.
addAll
(
getAllNodes
(
childrenTree
));
});
}
return
res
;
}
/**
* 列表全部数据查询
*
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/KeySiteServiceImpl.java
View file @
bdbd215c
...
...
@@ -87,12 +87,12 @@ public class KeySiteServiceImpl extends BaseService<KeySiteDto, KeySite, KeySite
* 分页查询
*/
public
IPage
<
KeySiteDto
>
getPageList
(
Page
<
KeySiteDto
>
page
,
String
name
,
Long
buildingId
,
String
fireEnduranceRate
,
String
useNature
,
String
fireFacilitiesInfo
,
String
bizOrgCode
)
{
String
useNature
,
String
fireFacilitiesInfo
,
String
bizOrgCode
,
String
belongId
)
{
List
<
Long
>
ids
=
null
;
if
(
buildingId
!=
null
&&
buildingId
!=-
1
&&
buildingId
.
intValue
()
!=
0
)
{
ids
=
getNodeAllnodeIds
(
buildingId
);
}
return
keySiteMapper
.
getPageList
(
page
,
name
,
ids
,
fireEnduranceRate
,
useNature
,
fireFacilitiesInfo
,
bizOrgCode
);
return
keySiteMapper
.
getPageList
(
page
,
name
,
ids
,
fireEnduranceRate
,
useNature
,
fireFacilitiesInfo
,
bizOrgCode
,
belongId
);
}
@Override
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/WaterResourceServiceImpl.java
View file @
bdbd215c
...
...
@@ -87,9 +87,9 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
@Condition
(
Operator
.
eq
)
Long
sequenceNbr
,
String
equipId
,
String
bizOrgCode
,
String
equipCateGoryCode
,
List
<
String
>
ids
)
{
String
equipCateGoryCode
,
List
<
String
>
ids
,
String
companyId
)
{
return
this
.
waterResourceMapper
.
getWaterResourcePageByParams
(
page
,
name
,
resourceType
,
belongBuildingId
,
belongFightingSystemId
,
sequenceNbr
,
equipId
,
bizOrgCode
,
equipCateGoryCode
,
ids
);
belongFightingSystemId
,
sequenceNbr
,
equipId
,
bizOrgCode
,
equipCateGoryCode
,
ids
,
companyId
);
}
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/EquipmentManageController.java
View file @
bdbd215c
...
...
@@ -54,10 +54,11 @@ public class EquipmentManageController extends AbstractBaseController{
@RequestParam
(
value
=
"maintenance"
,
required
=
false
)
String
maintenance
,
@RequestParam
(
value
=
"maintenance"
,
required
=
false
)
String
bizOrgCode
,
@RequestParam
(
value
=
"maintenance"
,
required
=
false
)
String
formGroupId
,
@RequestParam
(
value
=
"controBoxBuildId"
,
required
=
false
)
String
controBoxBuildId
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
pageSize
)
{
return
equipmentManageService
.
queryEquipmenInfoAndCount
(
equipmentName
,
equipmentCode
,
construction
,
maintenance
,
bizOrgCode
,
formGroupId
,
current
,
pageSize
);
return
equipmentManageService
.
queryEquipmenInfoAndCount
(
equipmentName
,
equipmentCode
,
construction
,
maintenance
,
bizOrgCode
,
formGroupId
,
current
,
pageSize
,
controBoxBuildId
);
}
@GetMapping
(
value
=
"/getUtils"
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/FireFightingSystemController.java
View file @
bdbd215c
...
...
@@ -7,8 +7,10 @@ import java.util.List;
import
java.util.Map
;
import
java.util.concurrent.ConcurrentHashMap
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.equipmanage.common.entity.*
;
import
com.yeejoin.equipmanage.common.utils.SpringUtils
;
import
com.yeejoin.equipmanage.fegin.JcsFeign
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Lazy
;
...
...
@@ -102,6 +104,8 @@ public class FireFightingSystemController extends AbstractBaseController {
IEquipmentService
iEquipmentService
;
@Autowired
FireFightingSystemMapper
fireFightingSystemMapper
;
@Autowired
JcsFeign
jcsFeign
;
@Value
(
"${equipment.hierarchy}"
)
private
String
hierarchy
;
...
...
@@ -490,13 +494,25 @@ public class FireFightingSystemController extends AbstractBaseController {
@RequestParam
(
value
=
"maintenance"
,
required
=
false
)
String
maintenance
,
@RequestParam
(
value
=
"bizOrgCode"
,
required
=
false
)
String
bizOrgCode
,
@RequestParam
(
value
=
"formGroupId"
,
required
=
false
)
String
formGroupId
,
@RequestParam
(
value
=
"controBoxBuildId"
,
required
=
false
)
String
controBoxBuildId
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
pageSize
@RequestParam
(
value
=
"size"
)
int
pageSize
,
@RequestParam
(
value
=
"companyId"
,
required
=
false
)
String
companyId
)
{
if
(
current
>
0
){
current
=
(
current
-
1
)
*
pageSize
;
}
return
fireFightingSystemService
.
queryEquipmenInfoAndCount
(
equipmentName
,
equipmentCode
,
construction
,
maintenance
,
bizOrgCode
,
formGroupId
,
current
,
pageSize
);
if
(
StringUtil
.
isNotEmpty
(
companyId
)){
String
token
=
getToken
();
String
appKey
=
getAppKey
();
String
product
=
getProduct
();
ResponseModel
<
JSONObject
>
obj
=
jcsFeign
.
getUnitById
(
appKey
,
product
,
token
,
companyId
);
JSONObject
result
=
obj
.
getResult
();
if
(
result
.
containsKey
(
"bizOrgCode"
))
{
bizOrgCode
=
result
.
get
(
"bizOrgCode"
).
toString
();
}
}
return
fireFightingSystemService
.
queryEquipmenInfoAndCount
(
equipmentName
,
equipmentCode
,
construction
,
maintenance
,
bizOrgCode
,
formGroupId
,
current
,
pageSize
,
controBoxBuildId
);
}
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/RiskSourceSceneController.java
View file @
bdbd215c
...
...
@@ -263,10 +263,11 @@ public class RiskSourceSceneController extends AbstractBaseController {
@RequestParam
(
value
=
"sourceId"
)
String
sourceId
,
@RequestParam
(
value
=
"categoryId"
,
required
=
false
)
String
categoryId
,
@RequestParam
(
value
=
"equipCode"
,
required
=
false
)
String
equipCode
,
@RequestParam
(
value
=
"equipName"
,
required
=
false
)
String
equipName
@RequestParam
(
value
=
"equipName"
,
required
=
false
)
String
equipName
,
@RequestParam
(
value
=
"companyId"
,
required
=
false
)
String
companyId
)
{
Page
page
=
new
Page
(
pageNumber
,
pageSize
);
return
iRiskSourceSceneService
.
getEquipBySourceId
(
page
,
sourceId
,
categoryId
,
equipCode
,
equipName
);
return
iRiskSourceSceneService
.
getEquipBySourceId
(
page
,
sourceId
,
categoryId
,
equipCode
,
equipName
,
companyId
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/VideoController.java
View file @
bdbd215c
...
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.dto.OrgMenuDto
;
import
com.yeejoin.equipmanage.common.entity.RequestData
;
import
com.yeejoin.equipmanage.common.entity.Video
;
import
com.yeejoin.equipmanage.common.entity.dto.VideoDTO
;
import
com.yeejoin.equipmanage.common.entity.dto.VideoSaveDto
;
...
...
@@ -197,6 +198,31 @@ public class VideoController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
pageBean
);
}
/**
* 视频分页资源查询
*
* @return
*/
@RequestMapping
(
value
=
"/pageVideoByAlertType"
,
method
=
RequestMethod
.
GET
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"视频分页资源查询"
,
notes
=
"视频分页资源查询"
)
public
ResponseModel
<
Page
<
VideoListVo
>>
pageVideoByAlertType
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
)
{
if
(
null
==
pageNum
||
null
==
pageSize
)
{
pageNum
=
1
;
pageSize
=
Integer
.
MAX_VALUE
;
}
else
{
pageNum
=
(
pageNum
-
1
)
*
pageSize
;
}
List
<
VideoListVo
>
listVos
=
videoService
.
pageVideoListByAlert
(
pageNum
,
pageSize
,
par
);
int
num
=
videoService
.
VideoListByAlertCount
(
par
);
Page
<
VideoListVo
>
pageBean
=
new
Page
<>(
pageNum
,
pageSize
);
pageBean
.
setRecords
(
listVos
);
pageBean
.
setTotal
(
num
);
return
CommonResponseUtil
.
success
(
pageBean
);
}
/**
* 详情
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/WarehouseStructureController.java
View file @
bdbd215c
...
...
@@ -180,9 +180,9 @@ public class WarehouseStructureController extends AbstractBaseController {
@RequestMapping
(
value
=
"/gettree/{id}"
,
method
=
RequestMethod
.
GET
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"树查询"
,
notes
=
"树查询"
)
public
List
<
WarehouseStructure
>
gettree
(
@PathVariable
Long
id
,
String
bizOrgCode
)
{
public
List
<
WarehouseStructure
>
gettree
(
@PathVariable
Long
id
,
String
bizOrgCode
,
String
buildingId
)
{
return
iWarehouseStructureService
.
gettree
(
id
,
bizOrgCode
);
return
iWarehouseStructureService
.
gettree
(
id
,
bizOrgCode
,
buildingId
);
}
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/EquipmentSpecificMapper.java
View file @
bdbd215c
...
...
@@ -87,7 +87,7 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
List
<
String
>
getEquipmentIotCodeLists
();
List
<
HashMap
<
String
,
Object
>>
getEquipBySourceId
(
@Param
(
"sourceIds"
)
List
<
Long
>
sourceIds
,
@Param
(
"categoryId"
)
List
<
Long
>
categoryId
,
@Param
(
"equipCode"
)
String
equipCode
,
@Param
(
"equipName"
)
String
equipName
);
List
<
HashMap
<
String
,
Object
>>
getEquipBySourceId
(
@Param
(
"sourceIds"
)
List
<
Long
>
sourceIds
,
@Param
(
"categoryId"
)
List
<
Long
>
categoryId
,
@Param
(
"equipCode"
)
String
equipCode
,
@Param
(
"equipName"
)
String
equipName
,
@Param
(
"companyId"
)
String
companyId
);
List
getMenuChildren
(
@Param
(
"id"
)
Long
id
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/VideoMapper.java
View file @
bdbd215c
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.equipmanage.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.equipmanage.common.entity.RequestData
;
import
com.yeejoin.equipmanage.common.entity.Video
;
import
com.yeejoin.equipmanage.common.entity.vo.*
;
import
com.yeejoin.equipmanage.dto.CountDto
;
...
...
@@ -25,6 +26,7 @@ public interface VideoMapper extends BaseMapper<Video> {
/**
* 视屏监控绑定的消防设备查询
*
* @param videoId
* @return
*/
...
...
@@ -32,6 +34,7 @@ public interface VideoMapper extends BaseMapper<Video> {
/**
* 视屏监控绑定的电力设备查询
*
* @param videoId
* @return
*/
...
...
@@ -39,16 +42,18 @@ public interface VideoMapper extends BaseMapper<Video> {
/**
* 获取监控
*
* @param id
* @return
*/
List
<
AlamVideoVO
>
getVideoBySpeId
(
Long
id
);
AlamVideoVO
getVideoById
(
Long
id
);
AlamVideoVO
getVideoById
(
Long
id
);
/**
* 可乐视频列表展示
*
* @param page
* @param dto
* @return
...
...
@@ -65,28 +70,35 @@ public interface VideoMapper extends BaseMapper<Video> {
/**
* 视屏监控绑定的安防消防设备查询
*
* @param id
* @return
*/
BuildingListVO
getSecurityOrFireEquipment
(
@Param
(
"id"
)
Long
id
);
List
<
String
>
selectBuildList
(
Long
id
);
List
<
String
>
selectBuildList
(
Long
id
);
List
<
EquipmentSpecificVo
>
selectImportantEquipment
();
List
<
VideoListVo
>
pageVideoList
(
@Param
(
"pageNum"
)
Integer
pageNum
,
@Param
(
"pageSize"
)
Integer
pageSize
,
@Param
(
"longitude"
)
Double
longitude
,
@Param
(
"latitude"
)
Double
latitude
,
@Param
(
"distance"
)
Double
distance
);
List
<
VideoListVo
>
pageVideoListByAlert
(
@Param
(
"pageNum"
)
Integer
pageNum
,
@Param
(
"pageSize"
)
Integer
pageSize
,
@Param
(
"par"
)
RequestData
par
);
List
<
EquipmentSpecificVo
>
selectImportantEquipment
(
);
int
VideoListByAlertCount
(
@Param
(
"par"
)
RequestData
par
);
List
<
VideoListVo
>
pageVideoList
(
@Param
(
"pageNum"
)
Integer
pageNum
,
@Param
(
"pageSize"
)
Integer
pageSize
,
@Param
(
"longitude"
)
Double
longitude
,
@Param
(
"latitude"
)
Double
latitude
,
@Param
(
"distance"
)
Double
distance
)
;
int
pageVideoCount
(
@Param
(
"longitude"
)
Double
longitude
,
@Param
(
"latitude"
)
Double
latitude
,
@Param
(
"distance"
)
Double
distance
);
int
pageVideoCount
(
@Param
(
"longitude"
)
Double
longitude
,
@Param
(
"latitude"
)
Double
latitude
,
@Param
(
"distance"
)
Double
distance
)
;
List
<
VideoListVo
>
listByType
(
@Param
(
"type"
)
String
type
);
List
<
VideoListVo
>
listByType
(
@Param
(
"type"
)
String
type
);
List
<
Video
>
listByCode
(
@Param
(
"code"
)
String
code
);
List
<
Video
>
listByCode
(
@Param
(
"code"
)
String
code
);
List
<
Video
>
selectListBySourceId
(
Long
floorId
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/EquipmentManageService.java
View file @
bdbd215c
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import
com.yeejoin.equipmanage.common.entity.EquipmentManageEntity
;
import
com.yeejoin.equipmanage.common.vo.EquipmentManageVo
;
import
com.yeejoin.equipmanage.common.vo.FileUploadVo
;
import
liquibase.pro.packaged.S
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
...
...
@@ -26,7 +27,7 @@ public interface EquipmentManageService extends IService<EquipmentManageEntity>
* @param pageSize
* @return
*/
Map
<
String
,
Object
>
queryEquipmenInfoAndCount
(
String
equimentName
,
String
equimentCode
,
String
construction
,
String
maintenance
,
String
bizOrgCode
,
String
formGroupId
,
int
spage
,
int
pageSize
);
Map
<
String
,
Object
>
queryEquipmenInfoAndCount
(
String
equimentName
,
String
equimentCode
,
String
construction
,
String
maintenance
,
String
bizOrgCode
,
String
formGroupId
,
int
spage
,
int
pageSize
,
String
controBoxBuildId
);
/**
* 获取下拉菜单数据
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IFireFightingSystemService.java
View file @
bdbd215c
...
...
@@ -34,7 +34,7 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE
* @param pageSize
* @return
*/
Map
<
String
,
Object
>
queryEquipmenInfoAndCount
(
String
equimentName
,
String
equimentCode
,
String
construction
,
String
maintenance
,
String
bizOrgCode
,
String
formGroupId
,
int
current
,
int
pageSize
);
Map
<
String
,
Object
>
queryEquipmenInfoAndCount
(
String
equimentName
,
String
equimentCode
,
String
construction
,
String
maintenance
,
String
bizOrgCode
,
String
formGroupId
,
int
current
,
int
pageSize
,
String
controBoxBuildId
);
FireFightingSystemEntity
getOneById
(
Long
id
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IRiskSourceSceneService.java
View file @
bdbd215c
...
...
@@ -137,6 +137,6 @@ public interface IRiskSourceSceneService extends IService <RiskSourceScene> {
* @param riskSourceId 风险区域ID
* @return 分页对象
*/
IPage
getEquipBySourceId
(
Page
page
,
String
riskSourceId
,
String
categoryId
,
String
equipCode
,
String
equipName
);
IPage
getEquipBySourceId
(
Page
page
,
String
riskSourceId
,
String
categoryId
,
String
equipCode
,
String
equipName
,
String
companyId
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IVideoService.java
View file @
bdbd215c
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.equipmanage.service;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.amos.boot.biz.common.dto.OrgMenuDto
;
import
com.yeejoin.equipmanage.common.entity.RequestData
;
import
com.yeejoin.equipmanage.common.entity.Video
;
import
com.yeejoin.equipmanage.common.entity.dto.VideoDTO
;
import
com.yeejoin.equipmanage.common.entity.dto.VideoSaveDto
;
...
...
@@ -62,9 +63,15 @@ public interface IVideoService extends IService<Video> {
List
<
VideoListVo
>
pageVideoList
(
Integer
pageNum
,
Integer
pageSize
,
Double
longitude
,
Double
latitude
,
Double
distance
);
int
pageVideoCount
(
Double
longitude
,
Double
latitude
,
Double
distance
)
;
List
<
VideoListVo
>
pageVideoListByAlert
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
);
int
VideoListByAlertCount
(
RequestData
par
);
int
pageVideoCount
(
Double
longitude
,
Double
latitude
,
Double
distance
)
;
List
<
VideoListVo
>
listByType
(
String
type
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IWarehouseStructureService.java
View file @
bdbd215c
...
...
@@ -17,7 +17,9 @@ public interface IWarehouseStructureService extends IService<WarehouseStructure>
WarehouseStructure
saveOne
(
WarehouseStructure
warehouseStructure
);
List
<
WarehouseStructure
>
tree
(
Long
warehouseId
);
List
<
WarehouseStructure
>
gettree
(
Long
warehouseId
,
String
bizOrgCode
);
List
<
WarehouseStructure
>
gettree
(
Long
warehouseId
,
String
bizOrgCode
,
String
buildingId
);
WarehouseStructure
updateOneById
(
WarehouseStructure
warehouseStructure
);
boolean
removeOneById
(
Long
id
)
throws
Exception
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentManageServiceImpl.java
View file @
bdbd215c
...
...
@@ -56,7 +56,7 @@ public class EquipmentManageServiceImpl extends ServiceImpl<EquipmentManageMappe
@Override
public
Map
<
String
,
Object
>
queryEquipmenInfoAndCount
(
String
equimentName
,
String
equimentCode
,
String
construction
,
String
maintenance
,
String
bizOrgCode
,
String
formGroupId
,
int
current
,
int
pageSize
)
{
String
bizOrgCode
,
String
formGroupId
,
int
current
,
int
pageSize
,
String
controBoxBuildId
)
{
HttpServletRequest
request
=
null
;
Map
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"equimentName"
,
equimentName
);
...
...
@@ -67,6 +67,7 @@ public class EquipmentManageServiceImpl extends ServiceImpl<EquipmentManageMappe
map
.
put
(
"pageSize"
,
pageSize
);
map
.
put
(
"bizOrgCode"
,
bizOrgCode
);
map
.
put
(
"formGroupId"
,
formGroupId
);
map
.
put
(
"controBoxBuildId"
,
controBoxBuildId
);
List
<
EquipmentManageVo
>
dataList
=
equipmentManageMapper
.
queryEquipmenInfo
(
map
);
Long
count
=
equipmentManageMapper
.
queryEquipmenCount
(
map
);
map
.
clear
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
bdbd215c
...
...
@@ -147,9 +147,9 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
@Override
public
Map
<
String
,
Object
>
queryEquipmenInfoAndCount
(
String
equimentName
,
String
equimentCode
,
String
construction
,
String
maintenance
,
String
bizOrgCode
,
String
formGroupId
,
int
current
,
int
pageSize
)
{
String
maintenance
,
String
bizOrgCode
,
String
formGroupId
,
int
current
,
int
pageSize
,
String
controBoxBuildId
)
{
Map
<
String
,
Object
>
map
=
equipmentManageService
.
queryEquipmenInfoAndCount
(
equimentName
,
equimentCode
,
construction
,
maintenance
,
bizOrgCode
,
formGroupId
,
current
,
pageSize
);
construction
,
maintenance
,
bizOrgCode
,
formGroupId
,
current
,
pageSize
,
controBoxBuildId
);
List
<
EquipmentManageVo
>
dataList
=
(
List
<
EquipmentManageVo
>)
map
.
get
(
"dataList"
);
StringBuilder
stb
=
new
StringBuilder
();
dataList
.
forEach
(
y
->
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/RiskSourceSceneServiceImpl.java
View file @
bdbd215c
...
...
@@ -643,7 +643,7 @@ public class RiskSourceSceneServiceImpl extends ServiceImpl<RiskSourceSceneMappe
}
@Override
public
IPage
getEquipBySourceId
(
Page
page
,
String
sourceId
,
String
categoryId
,
String
equipCode
,
String
equipName
)
{
public
IPage
getEquipBySourceId
(
Page
page
,
String
sourceId
,
String
categoryId
,
String
equipCode
,
String
equipName
,
String
companyId
)
{
// 获取sourceId下所有子项
Long
root
=
0L
;
if
(!
ValidationUtil
.
isEmpty
(
sourceId
)
&&
!
"null"
.
equals
(
sourceId
))
{
...
...
@@ -661,7 +661,7 @@ public class RiskSourceSceneServiceImpl extends ServiceImpl<RiskSourceSceneMappe
// 获取categoryId下所有子项
Long
categoryRoot
=
null
;
List
<
Long
>
categoryIdList
=
new
ArrayList
<>();
if
(!
ValidationUtil
.
isEmpty
(
categoryId
)
&&
!
"null"
.
equals
(
sourceId
))
{
if
(!
ValidationUtil
.
isEmpty
(
categoryId
)
&&
!
"null"
.
equals
(
categoryId
)
&&
!
"null"
.
equals
(
sourceId
))
{
try
{
categoryRoot
=
Long
.
valueOf
(
categoryId
);
}
catch
(
Exception
e
)
{
...
...
@@ -673,7 +673,7 @@ public class RiskSourceSceneServiceImpl extends ServiceImpl<RiskSourceSceneMappe
categoryIdList
=
categorieChildren
.
stream
().
map
(
category
->
category
.
getId
()).
collect
(
Collectors
.
toList
());
categoryIdList
.
add
(
categoryRoot
);
}
List
<
HashMap
<
String
,
Object
>>
equipmentList
=
equipmentSpecificMapper
.
getEquipBySourceId
(
idsList
,
categoryIdList
,
equipCode
==
null
?
equipCode:
equipCode
.
replace
(
" "
,
""
),
equipName
==
null
?
equipName:
equipName
.
replace
(
" "
,
""
));
List
<
HashMap
<
String
,
Object
>>
equipmentList
=
equipmentSpecificMapper
.
getEquipBySourceId
(
idsList
,
categoryIdList
,
equipCode
==
null
?
equipCode:
equipCode
.
replace
(
" "
,
""
),
equipName
==
null
?
equipName:
equipName
.
replace
(
" "
,
""
)
,
companyId
);
page
.
setTotal
(
equipmentList
.
size
());
page
.
setRecords
(
equipmentList
);
return
page
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/VideoServiceImpl.java
View file @
bdbd215c
...
...
@@ -530,10 +530,28 @@ public class VideoServiceImpl extends ServiceImpl<VideoMapper, Video> implements
}
@Override
public
List
<
VideoListVo
>
pageVideoListByAlert
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
)
{
return
videoMapper
.
pageVideoListByAlert
(
pageNum
,
pageSize
,
par
);
}
@Override
public
int
VideoListByAlertCount
(
RequestData
par
)
{
return
videoMapper
.
VideoListByAlertCount
(
par
);
}
@Override
public
int
pageVideoCount
(
Double
longitude
,
Double
latitude
,
Double
distance
)
{
return
videoMapper
.
pageVideoCount
(
longitude
,
latitude
,
distance
);
}
@Override
public
List
<
VideoListVo
>
listByType
(
String
type
)
{
return
videoMapper
.
listByType
(
type
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/WarehouseStructureServiceImpl.java
View file @
bdbd215c
...
...
@@ -6,7 +6,9 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.Map
;
import
com.google.common.base.Joiner
;
import
com.yeejoin.equipmanage.common.entity.FormInstance
;
import
com.yeejoin.equipmanage.mapper.FormInstanceMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -19,6 +21,7 @@ import com.yeejoin.equipmanage.mapper.WarehouseStructureMapper;
import
com.yeejoin.equipmanage.service.IStockDetailService
;
import
com.yeejoin.equipmanage.service.IWarehouseService
;
import
com.yeejoin.equipmanage.service.IWarehouseStructureService
;
import
org.springframework.util.StringUtils
;
/**
* 货架结构 服务实现类
...
...
@@ -37,6 +40,9 @@ public class WarehouseStructureServiceImpl extends ServiceImpl<WarehouseStructur
IWarehouseService
iWarehouseService
;
@Autowired
FormInstanceMapper
formInstanceMapper
;
@Autowired
private
WarehouseStructureMapper
warehouseStructureMapper
;
@Override
...
...
@@ -65,14 +71,42 @@ public class WarehouseStructureServiceImpl extends ServiceImpl<WarehouseStructur
}
@Override
public
List
<
WarehouseStructure
>
gettree
(
Long
warehouseId
,
String
bizOrgCode
)
{
public
List
<
WarehouseStructure
>
gettree
(
Long
warehouseId
,
String
bizOrgCode
,
String
buildingId
)
{
List
<
WarehouseStructure
>
list
=
new
ArrayList
<>();
if
(!
StringUtils
.
isEmpty
(
buildingId
)){
Map
<
String
,
String
>
map
=
formInstanceMapper
.
getChildListdate
(
Long
.
parseLong
(
buildingId
));
List
<
String
>
strings
=
new
ArrayList
<>();
if
(
map
.
get
(
"ids"
)!=
null
&&
!
map
.
get
(
"ids"
).
equals
(
""
)){
String
ids
=
map
.
get
(
"ids"
);
QueryWrapper
<
WarehouseStructure
>
one
=
new
QueryWrapper
<>();
if
(
ids
.
startsWith
(
","
)){
String
[]
split
=
ids
.
substring
(
1
).
split
(
","
);
one
.
in
(
"id"
,
split
);
}
else
{
if
(
ids
.
contains
(
","
)){
String
[]
split
=
ids
.
split
(
","
);
one
.
in
(
"id"
,
split
);
}
else
{
one
.
eq
(
"id"
,
ids
);
}
}
one
.
eq
(
"warehouse_id"
,
warehouseId
);
list
=
warehouseStructureMapper
.
selectList
(
one
);
QueryWrapper
<
WarehouseStructure
>
one1
=
new
QueryWrapper
<>();
one1
.
eq
(
"warehouse_id"
,
warehouseId
);
one1
.
eq
(
"id"
,
buildingId
);
list
.
addAll
(
warehouseStructureMapper
.
selectList
(
one1
));
}
}
else
{
QueryWrapper
<
WarehouseStructure
>
one
=
new
QueryWrapper
<>();
one
.
eq
(
"warehouse_id"
,
warehouseId
);
one
.
likeRight
(
"biz_org_code"
,
bizOrgCode
);
List
<
WarehouseStructure
>
list
=
warehouseStructureMapper
.
selectList
(
one
);
list
=
buildByRecursive
(
list
,
warehouseId
);
one
.
eq
(
"warehouse_id"
,
warehouseId
);
one
.
likeRight
(
"biz_org_code"
,
bizOrgCode
);
list
=
warehouseStructureMapper
.
selectList
(
one
);
}
list
=
buildByRecursive
(
list
,
warehouseId
);
return
list
;
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/InputItemController.java
View file @
bdbd215c
...
...
@@ -45,6 +45,7 @@ import com.yeejoin.amos.patrol.dao.entity.InputItem;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
/**
...
...
@@ -467,6 +468,11 @@ public class InputItemController extends AbstractBaseController {
@RequestMapping
(
value
=
"/addItemNew"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
addNewItemNew
(
@ApiParam
(
value
=
"检查项信息"
)
@RequestBody
InputItemParam
param
)
{
if
(
param
.
getEquipmentType
()
==
null
&&
param
.
getCustomType
()
==
null
&&
param
.
getFacilitiesType
()
==
null
&&
param
.
getKeyPartsType
()
==
null
){
throw
new
BadRequest
(
"适用类型至少需选择一项"
);
}
AgencyUserModel
user
=
getUserInfo
();
if
(
ObjectUtils
.
isEmpty
(
user
))
{
return
CommonResponseUtil
.
failure
(
"用户session过期"
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/PointController.java
View file @
bdbd215c
...
...
@@ -6,12 +6,14 @@ import javax.servlet.http.HttpServletResponse;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.patrol.business.dao.mapper.PointMapper
;
import
com.yeejoin.amos.patrol.business.dao.repository.IPointClassifyDao
;
import
com.yeejoin.amos.patrol.business.dao.repository.IPointInputItemDao
;
import
com.yeejoin.amos.patrol.business.dao.repository.IRoutePointDao
;
import
com.yeejoin.amos.patrol.business.dao.repository.IRoutePointItemDao
;
import
com.yeejoin.amos.patrol.business.feign.EquipFeign
;
import
com.yeejoin.amos.patrol.business.feign.JcsFeignClient
;
import
com.yeejoin.amos.patrol.business.service.impl.PointServiceImpl
;
import
com.yeejoin.amos.patrol.business.vo.*
;
import
com.yeejoin.amos.patrol.dao.entity.*
;
import
org.slf4j.Logger
;
...
...
@@ -78,6 +80,9 @@ public class PointController extends AbstractBaseController {
private
IPointService
iPointService
;
@Autowired
private
PointMapper
pointMapper
;
@Autowired
private
ICatalogTreeService
catalogTreeService
;
@Autowired
...
...
@@ -432,10 +437,15 @@ public class PointController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取当前登录人,单位下建筑树"
,
notes
=
"获取当前登录人,单位下建筑树"
)
@GetMapping
(
value
=
"/gettreeWarehouse"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
gettreeWarehouse
()
{
public
CommonResponse
gettreeWarehouse
(
@RequestParam
(
value
=
"pointId"
,
required
=
false
)
String
pointId
)
{
try
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(!
StringUtils
.
isEmpty
(
pointId
)){
map
=
pointMapper
.
getPointById
(
Long
.
valueOf
(
pointId
));
}
ReginParams
reginParams
=
getSelectedOrgInfo
();
return
CommonResponseUtil
.
success
(
equipFeign
.
gettreeWarehouse
(
reginParams
.
getPersonIdentity
().
getCompanyBizOrgCode
()));
return
CommonResponseUtil
.
success
(
equipFeign
.
gettreeWarehouse
(
reginParams
.
getPersonIdentity
().
getCompanyBizOrgCode
(),
map
.
get
(
"buildingId"
).
toString
()));
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
return
CommonResponseUtil
.
failure
(
"查询巡检点失败"
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/feign/EquipFeign.java
View file @
bdbd215c
...
...
@@ -41,7 +41,7 @@ public interface EquipFeign {
@RequestMapping
(
value
=
"${equip.fegin.prefix}"
+
"/warehouse-structure/gettree/0"
,
method
=
RequestMethod
.
GET
,
consumes
=
"application/json"
)
LinkedHashMap
<
String
,
Object
>
gettreeWarehouse
(
@RequestParam
(
value
=
"bizOrgCode"
,
required
=
true
)
String
bizOrgCode
);
LinkedHashMap
<
String
,
Object
>
gettreeWarehouse
(
@RequestParam
(
value
=
"bizOrgCode"
,
required
=
true
)
String
bizOrgCode
,
@RequestParam
(
value
=
"buildingId"
,
required
=
false
)
String
buildingId
);
@RequestMapping
(
value
=
"${equip.fegin.prefix}"
+
"/building/getOne"
,
method
=
RequestMethod
.
GET
,
consumes
=
"application/json"
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/PlanTaskServiceImpl.java
View file @
bdbd215c
...
...
@@ -61,6 +61,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.text.DateFormat
;
...
...
@@ -1050,6 +1051,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
@Override
@Transactional
public
void
taskMessage
(
String
runDate
)
{
SimpleDateFormat
df
=
new
SimpleDateFormat
(
"HH:mm:ss"
);
//1.扫描plan表查询,需要生成执行数据的任务信息,无则return
Date
now
=
new
Date
();
//今天
...
...
@@ -1076,6 +1078,11 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
public
void
sendMessage
(
Plan
plan
,
PlanTask
planTask
)
throws
Exception
{
Toke
toke
=
remoteSecurityService
.
getServerToken
();
RequestContext
.
setToken
(
toke
.
getToke
());
RequestContext
.
setProduct
(
toke
.
getProduct
());
RequestContext
.
setAppKey
(
toke
.
getAppKey
());
MsgRo
msgRo
=
new
MsgRo
();
// 标题
msgRo
.
setName
(
plan
.
getName
());
...
...
amos-boot-system-equip/src/main/resources/mapper/EquipmentManageMapper.xml
View file @
bdbd215c
...
...
@@ -28,7 +28,7 @@
from
f_fire_fighting_system as sys
where 1=1
<if
test=
"equimentName !=
'null'
"
>
<if
test=
"equimentName !=
null and equimentName != '' and equimentName != 'null'
"
>
AND NAME like CONCAT('%',#{equimentName},'%')
</if>
<if
test=
"equimentCode != 'null' "
>
...
...
@@ -40,6 +40,9 @@
<if
test=
"maintenance != 'all' "
>
AND MAINTENANCE_UNIT = #{maintenance}
</if>
<if
test=
"controBoxBuildId != null "
>
AND contro_box_build = #{controBoxBuildId}
</if>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND biz_org_code like CONCAT(#{bizOrgCode},'%')
</if>
...
...
@@ -55,7 +58,7 @@
from
f_fire_fighting_system
where 1=1
<if
test=
"equimentName !=
'null'
"
>
<if
test=
"equimentName !=
null and equimentName != '' and equimentName != 'null'
"
>
AND name like CONCAT('%',#{equimentName},'%')
</if>
<if
test=
"equimentCode != 'null' "
>
...
...
@@ -64,6 +67,9 @@
<if
test=
"construction != 'all' "
>
AND construction_unit = #{construction}
</if>
<if
test=
"controBoxBuildId != null "
>
AND contro_box_build = #{controBoxBuildId}
</if>
<if
test=
"maintenance != 'all' "
>
AND maintenance_unit = #{maintenance}
</if>
...
...
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificMapper.xml
View file @
bdbd215c
...
...
@@ -361,6 +361,7 @@
equipment_detail.area AS address,
equipment_detail.equipment_name as eqpDefName,
equipment_detail.equipment_id as eqpDefId,
spec.biz_org_name as bizOrgName,
<!-- CONCAT(area.prevName,'-',structure.NAME) AS acre,-->
spec.position AS acre,
we.inspection_spec as inspectionSpecId,
...
...
@@ -397,6 +398,9 @@
#{id}
</foreach>
</if>
<if
test=
"companyId != null and companyId != ''"
>
and spec.agency_id = #{companyId}
</if>
<if
test=
"equipCode != '' and equipCode != null"
>
and spec.code like concat("%", #{equipCode}, "%")
</if>
<if
test=
"equipName != '' and equipName != null"
>
and spec.name like CONCAT("%", #{equipName},'%')
...
...
amos-boot-system-equip/src/main/resources/mapper/VideoMapper.xml
View file @
bdbd215c
This diff is collapsed.
Click to expand it.
amos-boot-system-jcs/src/main/resources/db/changelog/jcs-1.0.0.0.xml
View file @
bdbd215c
...
...
@@ -3270,7 +3270,17 @@
</sql>
</changeSet>
<changeSet
author=
"cz"
id=
"2022-08-11-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"jc_alert_called"
columnName=
"relation_id"
/>
</not>
</preConditions>
<comment>
增加物联警情关联Id
</comment>
<sql>
ALTER TABLE jc_alert_called add relation_id varchar(255) DEFAULT NULL COMMENT '物联警情关联Id'
</sql>
</changeSet>
</databaseChangeLog>
...
...
amos-boot-system-patrol/src/main/resources/db/mapper/pointMapper.xml
View file @
bdbd215c
...
...
@@ -335,6 +335,7 @@
END) fixed,
p.charge_person_id userName,
p.charge_dept_id depid,
p.risk_source_id buildingId,
p.remark,
p.offline
FROM
...
...
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