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
0672ce89
Commit
0672ce89
authored
Feb 09, 2022
by
chenhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_ccs' of
http://172.16.10.76/moa/amos-boot-biz
into develop_ccs
parents
ffe51a96
1f4d98e2
Hide whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
496 additions
and
144 deletions
+496
-144
ControllerAop.java
.../java/com/yeejoin/amos/api/openapi/aop/ControllerAop.java
+1
-1
CylinderPageController.java
...n/amos/api/openapi/controller/CylinderPageController.java
+1
-2
CylinderTableModel.java
...ejoin/amos/api/openapi/face/model/CylinderTableModel.java
+1
-1
CylinderDateInfoService.java
...mos/api/openapi/face/service/CylinderDateInfoService.java
+13
-4
application-jd.properties
...data-openapi/src/main/resources/application-jd.properties
+49
-0
logback-jd.xml
.../amos-boot-data-openapi/src/main/resources/logback-jd.xml
+46
-0
FirefightersDto.java
...join/amos/boot/module/common/api/dto/FirefightersDto.java
+3
-0
OrgUsrMapper.java
...join/amos/boot/module/common/api/mapper/OrgUsrMapper.java
+2
-0
FirefightersMapper.xml
...mmon-api/src/main/resources/mapper/FirefightersMapper.xml
+2
-0
OrgUsrMapper.xml
...ule-common-api/src/main/resources/mapper/OrgUsrMapper.xml
+7
-0
EquiplistSpecificBySystemVO.java
...pmanage/common/entity/vo/EquiplistSpecificBySystemVO.java
+9
-0
VideoVO.java
...ava/com/yeejoin/equipmanage/common/entity/vo/VideoVO.java
+4
-0
FireTeamController.java
...boot/module/common/biz/controller/FireTeamController.java
+74
-1
KeySiteController.java
.../boot/module/common/biz/controller/KeySiteController.java
+75
-43
OrgPersonController.java
...oot/module/common/biz/controller/OrgPersonController.java
+20
-1
FireTeamServiceImpl.java
...t/module/common/biz/service/impl/FireTeamServiceImpl.java
+5
-0
BuildingController.java
...om/yeejoin/equipmanage/controller/BuildingController.java
+13
-5
EquipmentManageController.java
...oin/equipmanage/controller/EquipmentManageController.java
+9
-0
FireFightingSystemController.java
.../equipmanage/controller/FireFightingSystemController.java
+3
-0
BuildingMapper.java
...n/java/com/yeejoin/equipmanage/mapper/BuildingMapper.java
+0
-7
EquipmentSpecificMapper.java
...m/yeejoin/equipmanage/mapper/EquipmentSpecificMapper.java
+2
-4
VideoMapper.java
...main/java/com/yeejoin/equipmanage/mapper/VideoMapper.java
+2
-0
EquipmentManageService.java
...m/yeejoin/equipmanage/service/EquipmentManageService.java
+2
-0
IBuilldService.java
.../java/com/yeejoin/equipmanage/service/IBuilldService.java
+6
-8
AreaServiceImpl.java
...com/yeejoin/equipmanage/service/impl/AreaServiceImpl.java
+1
-1
BuildingServiceImpl.java
...yeejoin/equipmanage/service/impl/BuildingServiceImpl.java
+37
-17
ConfirmAlarmServiceImpl.java
...oin/equipmanage/service/impl/ConfirmAlarmServiceImpl.java
+13
-4
EquipmentManageServiceImpl.java
.../equipmanage/service/impl/EquipmentManageServiceImpl.java
+5
-0
EquipmentSpecificAlarmServiceImpl.java
...anage/service/impl/EquipmentSpecificAlarmServiceImpl.java
+11
-1
EquipmentSpecificSerivceImpl.java
...quipmanage/service/impl/EquipmentSpecificSerivceImpl.java
+4
-0
MqttReceiveServiceImpl.java
...join/equipmanage/service/impl/MqttReceiveServiceImpl.java
+6
-1
StockServiceImpl.java
...om/yeejoin/equipmanage/service/impl/StockServiceImpl.java
+1
-3
AlertCalledController.java
...boot/module/tzs/biz/controller/AlertCalledController.java
+13
-2
ESAlertCalledService.java
...oot/module/tzs/biz/service/impl/ESAlertCalledService.java
+2
-2
Building.xml
...-boot-system-equip/src/main/resources/mapper/Building.xml
+0
-32
EquipmentSpecificMapper.xml
...uip/src/main/resources/mapper/EquipmentSpecificMapper.xml
+15
-0
VideoMapper.xml
...ot-system-equip/src/main/resources/mapper/VideoMapper.xml
+12
-2
jcs-1.0.0.0.xml
...ystem-jcs/src/main/resources/db/changelog/jcs-1.0.0.0.xml
+25
-0
application-qa.properties
...t-system-tzs/src/main/resources/application-qa.properties
+1
-1
application.properties
...boot-system-tzs/src/main/resources/application.properties
+1
-1
No files found.
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/aop/ControllerAop.java
View file @
0672ce89
...
...
@@ -52,7 +52,7 @@ public class ControllerAop {
token
=
request
.
getParameterMap
().
get
(
"access_token"
)[
0
];
}
if
(
token
!=
null
)
{
fillRequestContext
(
token
);
fillRequestContext
(
token
);
}
boolean
validToken
=
TokenOperation
.
refresh
(
token
);
if
(!
validToken
)
{
...
...
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/controller/CylinderPageController.java
View file @
0672ce89
...
...
@@ -34,7 +34,6 @@ import java.util.ArrayList;
import
java.util.List
;
@RestController
@TycloudResource
(
module
=
"openapi"
,
value
=
"cylinderPage"
)
@RequestMapping
(
value
=
"/cylinderPage"
)
@Api
(
tags
=
"气瓶首页controller"
)
public
class
CylinderPageController
{
...
...
@@ -87,7 +86,7 @@ public class CylinderPageController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"根据搜索信息获取表格数据"
)
@
Pos
tMapping
(
value
=
"/getTableInfo"
)
@
Ge
tMapping
(
value
=
"/getTableInfo"
)
public
ResponseModel
<
List
<
CylinderTableModel
>>
cylinderTableInfo
(
@RequestParam
(
value
=
"serviceName"
,
required
=
false
)
String
serviceName
,
@RequestParam
(
value
=
"appId"
,
required
=
false
)
String
appId
,
@RequestParam
(
value
=
"startTime"
,
required
=
false
)
String
startTime
,
...
...
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/model/CylinderTableModel.java
View file @
0672ce89
...
...
@@ -11,7 +11,7 @@ import lombok.Data;
public
class
CylinderTableModel
{
/**
*
服务商
名称
*
企业
名称
*/
private
String
unitName
;
...
...
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/service/CylinderDateInfoService.java
View file @
0672ce89
...
...
@@ -82,12 +82,17 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
for
(
OpenapiBizToken
token
:
tokenList
)
{
try
{
Date
today
=
new
Date
();
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
today
);
calendar
.
set
(
Calendar
.
SECOND
,
0
);
calendar
.
set
(
Calendar
.
HOUR_OF_DAY
,
0
);
calendar
.
set
(
Calendar
.
MINUTE
,
0
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
todayStr
=
sdf
.
format
(
today
);
List
<
CylinderDateInfo
>
list
=
this
.
list
(
new
LambdaQueryWrapper
<
CylinderDateInfo
>().
eq
(
CylinderDateInfo:
:
getSyncDate
,
todayStr
+
" 00:00:00"
));
String
todayStr
=
sdf
.
format
(
calendar
.
getTime
()
);
List
<
CylinderDateInfo
>
list
=
this
.
list
(
new
LambdaQueryWrapper
<
CylinderDateInfo
>().
between
(
CylinderDateInfo:
:
getSyncDate
,
todayStr
+
" 00:00:00"
,
todayStr
+
" 23:59:59"
).
eq
(
CylinderDateInfo:
:
getAppId
,
token
.
getAppId
()
));
if
(
list
.
size
()
==
0
)
{
CylinderDateInfoModel
temp
=
new
CylinderDateInfoModel
();
temp
.
setSyncDate
(
today
);
temp
.
setSyncDate
(
calendar
.
getTime
()
);
String
appid
=
token
.
getAppId
();
temp
.
setUnitName
(
token
.
getApiCompanyName
());
temp
.
setAppId
(
appid
);
...
...
@@ -101,6 +106,7 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
Integer
fillingRecord
=
cylinderFillingRecordService
.
count
(
new
LambdaQueryWrapper
<
CylinderFillingRecord
>().
eq
(
CylinderFillingRecord:
:
getAppId
,
appid
).
between
(
CylinderFillingRecord:
:
getSyncDate
,
todayStr
+
" 00:00:00"
,
todayStr
+
" 23:59:59"
));
Integer
fillingCheck
=
cylinderFillingCheckService
.
count
(
new
LambdaQueryWrapper
<
CylinderFillingCheck
>().
eq
(
CylinderFillingCheck:
:
getAppId
,
appid
).
between
(
CylinderFillingCheck:
:
getSyncDate
,
todayStr
+
" 00:00:00"
,
todayStr
+
" 23:59:59"
));
Integer
examine
=
cylinderFillingExamineService
.
count
(
new
LambdaQueryWrapper
<
CylinderFillingExamine
>().
eq
(
CylinderFillingExamine:
:
getAppId
,
appid
).
between
(
CylinderFillingExamine:
:
getSyncDate
,
todayStr
+
" 00:00:00"
,
todayStr
+
" 23:59:59"
));
Integer
total
=
cylinder
+
cylinderUnit
+
tags
+
inspection
+
filling
+
fillingRecord
+
fillingCheck
+
examine
;
temp
.
setCylinderExamineInfo
(
examine
);
temp
.
setCylinderUnit
(
cylinderUnit
);
temp
.
setCylinderFillingCheckInfo
(
fillingCheck
);
...
...
@@ -109,6 +115,7 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
temp
.
setCylinderTagInfo
(
tags
);
temp
.
setCylinderInfo
(
cylinder
);
temp
.
setCylinderFillingRecordInfo
(
fillingRecord
);
temp
.
setCylinderTotal
(
total
);
this
.
createWithModel
(
temp
);
}
else
{
list
.
forEach
(
info
->
{
...
...
@@ -122,6 +129,7 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
Integer
fillingRecord
=
cylinderFillingRecordService
.
count
(
new
LambdaQueryWrapper
<
CylinderFillingRecord
>().
eq
(
CylinderFillingRecord:
:
getAppId
,
appid
).
between
(
CylinderFillingRecord:
:
getSyncDate
,
todayStr
+
" 00:00:00"
,
todayStr
+
" 23:59:59"
));
Integer
fillingCheck
=
cylinderFillingCheckService
.
count
(
new
LambdaQueryWrapper
<
CylinderFillingCheck
>().
eq
(
CylinderFillingCheck:
:
getAppId
,
appid
).
between
(
CylinderFillingCheck:
:
getSyncDate
,
todayStr
+
" 00:00:00"
,
todayStr
+
" 23:59:59"
));
Integer
examine
=
cylinderFillingExamineService
.
count
(
new
LambdaQueryWrapper
<
CylinderFillingExamine
>().
eq
(
CylinderFillingExamine:
:
getAppId
,
appid
).
between
(
CylinderFillingExamine:
:
getSyncDate
,
todayStr
+
" 00:00:00"
,
todayStr
+
" 23:59:59"
));
Integer
total
=
cylinder
+
cylinderUnit
+
tags
+
inspection
+
filling
+
fillingRecord
+
fillingCheck
+
examine
;
info
.
setCylinderExamineInfo
(
examine
);
info
.
setCylinderUnit
(
cylinderUnit
);
info
.
setCylinderFillingCheckInfo
(
fillingCheck
);
...
...
@@ -130,6 +138,7 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
info
.
setCylinderTagInfo
(
tags
);
info
.
setCylinderInfo
(
cylinder
);
info
.
setCylinderFillingRecordInfo
(
fillingRecord
);
info
.
setCylinderTotal
(
total
);
this
.
updateById
(
info
);
});
}
...
...
@@ -399,7 +408,7 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
try
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
todayStr
=
sdf
.
format
(
date
);
List
<
CylinderDateInfo
>
list
=
this
.
list
(
new
LambdaQueryWrapper
<
CylinderDateInfo
>().
eq
(
CylinderDateInfo:
:
getSyncDate
,
todayStr
+
" 00:00:00"
));
List
<
CylinderDateInfo
>
list
=
this
.
list
(
new
LambdaQueryWrapper
<
CylinderDateInfo
>().
between
(
CylinderDateInfo:
:
getSyncDate
,
todayStr
+
" 00:00:00"
,
todayStr
+
" 23:59:59"
).
eq
(
CylinderDateInfo:
:
getAppId
,
token
.
getAppId
()
));
if
(
list
.
size
()
==
0
)
{
CylinderDateInfoModel
temp
=
new
CylinderDateInfoModel
();
temp
.
setSyncDate
(
date
);
...
...
amos-boot-data/amos-boot-data-openapi/src/main/resources/application-jd.properties
0 → 100644
View file @
0672ce89
spring.application.name
=
AMOS-API-OPENAPI
server.servlet.context-path
=
/openapi
server.port
=
11004
# jdbc_config
spring.datasource.url
=
jdbc:mysql://113.134.211.174:3308/amos_openapi_cylinder?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&serverTimezone=GMT%2B8
spring.datasource.username
=
root
spring.datasource.password
=
Yeejoin@2020
spring.datasource.driver-class-name
=
com.mysql.cj.jdbc.Driver
spring.datasource.type
=
com.zaxxer.hikari.HikariDataSource
spring.datasource.hikari.minimum-idle
=
5
spring.datasource.hikari.maximum-pool-size
=
15
spring.datasource.hikari.auto-commit
=
true
spring.datasource.hikari.idle-timeout
=
30000
spring.datasource.hikari.pool-name
=
DatebookHikariCP
spring.datasource.hikari.max-lifetime
=
1800000
spring.datasource.hikari.connection-timeout
=
30000
spring.datasource.hikari.connection-test-query
=
SELECT 1
# REDIS (RedisProperties)
spring.redis.database
=
1
spring.redis.host
=
192.168.1.10
spring.redis.port
=
6379
spring.redis.password
=
yeejoin@2020
spring.redis.lettuce.pool.max-active
=
200
spring.redis.lettuce.pool.max-wait
=
-1
spring.redis.lettuce.pool.max-idle
=
10
spring.redis.lettuce.pool.min-idle
=
0
spring.redis.expire.time
=
300
#注册中心地址
eureka.client.service-url.defaultZone
=
http://192.168.1.10:10001/eureka/
eureka.instance.prefer-ip-address
=
true
management.endpoint.health.show-details
=
always
management.endpoints.web.exposure.include
=
*
eureka.instance.health-check-url
=
http://192.168.1.10:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path
=
${server.servlet.context-path}/actuator
eureka.instance.status-page-url
=
http://192.168.1.10:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs
=
http://192.168.1.10:${server.port}${server.servlet.context-path}/swagger-ui.html
##emqx
## emqx properties:
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}
emqx.broker
=
tcp://192.168.1.10:1883
emqx.user-name
=
admin
emqx.password
=
public
##biz custem properties
biz.lxyd.lift.url
=
http://39.106.181.149:8088/elevatorapi
\ No newline at end of file
amos-boot-data/amos-boot-data-openapi/src/main/resources/logback-jd.xml
0 → 100644
View file @
0672ce89
<?xml version="1.0" encoding="UTF-8"?>
<configuration
debug=
"false"
>
<!-- 控制台输出 -->
<appender
name=
"STDOUT"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
</pattern>
</encoder>
</appender>
<!-- show parameters for hibernate sql 专为 Hibernate 定制
<logger name="org.hibernate.type.descriptor.sql.BasicBinder" level="TRACE" />
<logger name="org.hibernate.type.descriptor.sql.BasicExtractor" level="DEBUG" />
<logger name="org.hibernate.SQL" level="DEBUG" />
<logger name="org.hibernate.engine.QueryParameters" level="DEBUG" />
<logger name="org.hibernate.engine.query.HQLQueryPlan" level="DEBUG" />
-->
<!--myibatis log configure-->
<logger
name=
"com.apache.ibatis"
level=
"DEBUG"
/>
<logger
name=
"java.sql.Connection"
level=
"DEBUG"
/>
<logger
name=
"java.sql.Statement"
level=
"DEBUG"
/>
<logger
name=
"java.sql.PreparedStatement"
level=
"DEBUG"
/>
<logger
name=
"com.baomidou"
level=
"DEBUG"
/>
<logger
name=
"org.springframework"
level=
"DEBUG"
/>
<logger
name=
"org.apache.activemq"
level=
"INFO"
/>
<!-- 日志输出级别 -->
<root
level=
"DEBUG"
>
<appender-ref
ref=
"STDOUT"
/>
</root>
<!--日志异步到数据库 -->
<!--<appender name="DB" class="ch.qos.logback.classic.db.DBAppender">-->
<!--<!–日志异步到数据库 –>-->
<!--<connectionSource class="ch.qos.logback.core.db.DriverManagerConnectionSource">-->
<!--<!–连接池 –>-->
<!--<dataSource class="com.mchange.v2.c3p0.ComboPooledDataSource">-->
<!--<driverClass>com.mysql.jdbc.Driver</driverClass>-->
<!--<url>jdbc:mysql://127.0.0.1:3306/databaseName</url>-->
<!--<user>root</user>-->
<!--<password>root</password>-->
<!--</dataSource>-->
<!--</connectionSource>-->
<!--</appender>-->
</configuration>
\ No newline at end of file
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/FirefightersDto.java
View file @
0672ce89
...
...
@@ -131,4 +131,7 @@ public class FirefightersDto extends BaseDto {
@ApiModelProperty
(
value
=
"机构编码"
)
private
String
bizOrgCode
;
@ApiModelProperty
(
value
=
"现居住地详情地址"
)
private
String
address
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/mapper/OrgUsrMapper.java
View file @
0672ce89
...
...
@@ -112,4 +112,6 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> {
Map
<
String
,
String
>
selectPersonone
(
@Param
(
"name"
)
String
name
,
@Param
(
"id"
)
Long
id
);
List
<
OrgUsr
>
listByOrgTypes
(
@Param
(
"orgTypeList"
)
List
<
String
>
orgTypeList
,
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
String
getParentList
(
@Param
(
"id"
)
String
id
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/FirefightersMapper.xml
View file @
0672ce89
...
...
@@ -25,6 +25,7 @@
<if
test=
'par.postQualification!=null'
>
and b.post_qualification_code = #{par.postQualification}
</if>
<if
test=
'par.areasExpertise!=null'
>
and b.areas_expertise_code= #{par.areasExpertise}
</if>
<if
test=
'par.name!=null'
>
and a.name like concat ('%',#{par.name},'%')
</if>
<if
test=
'par.address!=null'
>
and a.residence_detail_val like concat ('%',#{par.address},'%')
</if>
<if
test=
'par.state!=null'
>
and a.state_code= #{par.state}
</if>
<if
test=
'par.company!=null and par.company!= -1'
>
and a.company= #{par.company}
</if>
<if
test=
'par.fireTeamId!=null'
>
and a.fire_team_id= #{par.fireTeamId}
</if>
...
...
@@ -52,6 +53,7 @@
<if
test=
'par.postQualification!=null'
>
and b.post_qualification_code = #{par.postQualification}
</if>
<if
test=
'par.areasExpertise!=null'
>
and b.areas_expertise_code= #{par.areasExpertise}
</if>
<if
test=
'par.name!=null'
>
and a.name like concat ('%',#{par.name},'%')
</if>
<if
test=
'par.address!=null'
>
and a.residence_detail_val like concat ('%',#{par.address},'%')
</if>
<if
test=
'par.state!=null'
>
and a.state_code= #{par.state}
</if>
<if
test=
'par.fireTeamId!=null'
>
and a.fire_team_id= #{par.fireTeamId}
</if>
<if
test=
'par.company!=null and par.company!= -1'
>
and a.company= #{par.company}
</if>
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/OrgUsrMapper.xml
View file @
0672ce89
...
...
@@ -820,4 +820,11 @@ LEFT JOIN (
where u.biz_org_type='PERSON' and g.field_code='fireManagementPostCode' and g.field_value_label =#{name} and u.parent_id=#{id}
</select>
<select
id=
"getParentList"
resultType=
"java.lang.String"
>
select getParentList(#{id}) as id;
</select>
</mapper>
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/vo/EquiplistSpecificBySystemVO.java
View file @
0672ce89
...
...
@@ -15,10 +15,19 @@ public class EquiplistSpecificBySystemVO {
@ApiModelProperty
(
value
=
"id"
)
private
Long
id
;
@ApiModelProperty
(
value
=
"设备名"
)
private
String
equipmentName
;
@ApiModelProperty
(
value
=
"设备编码"
)
private
String
code
;
@ApiModelProperty
(
value
=
"设备分组名称"
)
private
String
categoryName
;
@ApiModelProperty
(
value
=
"类型"
)
private
String
type
;
@ApiModelProperty
(
value
=
"是否绑定"
)
private
Boolean
isBound
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/vo/VideoVO.java
View file @
0672ce89
package
com
.
yeejoin
.
equipmanage
.
common
.
entity
.
vo
;
import
org.springframework.beans.factory.annotation.Value
;
import
lombok.Data
;
/**
...
...
@@ -23,4 +25,6 @@ public class VideoVO {
private
String
code
;
private
String
presetPosition
;
private
String
vedioFormat
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/FireTeamController.java
View file @
0672ce89
...
...
@@ -16,7 +16,9 @@ import com.yeejoin.amos.boot.module.common.api.dto.FireTeamListDto;
import
com.yeejoin.amos.boot.module.common.api.dto.FirefightersDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgMenuDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.FireTeam
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.common.api.enums.OrgPersonEnum
;
import
com.yeejoin.amos.boot.module.common.api.mapper.OrgUsrMapper
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FireTeamServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
io.swagger.annotations.Api
;
...
...
@@ -32,6 +34,7 @@ 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
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.Arrays
;
import
java.util.HashMap
;
...
...
@@ -54,7 +57,8 @@ public class FireTeamController extends BaseController {
@Autowired
OrgUsrServiceImpl
iOrgUsrService
;
@Autowired
OrgUsrMapper
orgUsrMapper
;
@Value
(
"${auth-key-fire-team:fire_team_info}"
)
private
String
authKey
;
...
...
@@ -170,6 +174,75 @@ public class FireTeamController extends BaseController {
return
ResponseHelper
.
buildResponse
(
menus
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{companyId}/listTreetype"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询所属单位下消防队伍树"
,
notes
=
"查询所属单位下消防队伍树"
)
public
ResponseModel
<
List
<
Menu
>>
getlistTreeByCompanyId
(
@PathVariable
(
value
=
"companyId"
)
String
companyId
)
throws
Exception
{
Map
<
String
,
Object
>
columnMap
=
new
HashMap
<>();
columnMap
.
put
(
"is_delete"
,
0
);
OrgUsr
our
=
iOrgUsrService
.
getById
(
companyId
);
if
(
our
.
getParentId
()!=
null
){
//判断是不是部门
if
(
our
.
getBizOrgType
().
equals
(
"COMPANY"
)){
columnMap
.
put
(
"company"
,
companyId
);
}
else
{
String
id
=
orgUsrMapper
.
getParentList
(
companyId
);
columnMap
.
put
(
"company"
,
id
);
}
}
List
<
Menu
>
menus
=
iFireTeamService
.
getTeamTree
(
columnMap
);
return
ResponseHelper
.
buildResponse
(
menus
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{companyId}/listTreetypeLikeCode"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询所属单位下消防队伍树"
,
notes
=
"查询所属单位下消防队伍树"
)
public
ResponseModel
<
List
<
Menu
>>
getlistTreeByCompanyIdLike
(
@PathVariable
(
value
=
"companyId"
)
String
companyId
)
throws
Exception
{
QueryWrapper
<
FireTeam
>
fireTeamQueryWrapper
=
new
QueryWrapper
<>();
fireTeamQueryWrapper
.
eq
(
"is_delete"
,
0
);
OrgUsr
our
=
iOrgUsrService
.
getById
(
companyId
);
//车辆装备需要判断
if
(
our
.
getParentId
()!=
null
){
//判断是不是部门
if
(
our
.
getBizOrgType
().
equals
(
"COMPANY"
)){
fireTeamQueryWrapper
.
likeRight
(
"biz_org_code"
,
our
.
getBizOrgCode
());
}
else
{
String
id
=
orgUsrMapper
.
getParentList
(
companyId
);
OrgUsr
ourf
=
iOrgUsrService
.
getById
(
id
);
fireTeamQueryWrapper
.
likeRight
(
"biz_org_code"
,
ourf
.
getBizOrgCode
());
}
}
List
<
Menu
>
menus
=
iFireTeamService
.
getTeamTreeLikeCode
(
fireTeamQueryWrapper
);
return
ResponseHelper
.
buildResponse
(
menus
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{companyId}/getBizCode"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取bizcode"
,
notes
=
"获取bizcode"
)
public
ResponseModel
<
String
>
getBizCode
(
@PathVariable
(
value
=
"companyId"
)
String
companyId
)
throws
Exception
{
OrgUsr
our
=
iOrgUsrService
.
getById
(
companyId
);
if
(
our
.
getParentId
()!=
null
){
//判断是不是部门
if
(
our
.
getBizOrgType
().
equals
(
"COMPANY"
)){
return
ResponseHelper
.
buildResponse
(
our
.
getBizOrgCode
());
}
else
{
String
id
=
orgUsrMapper
.
getParentList
(
companyId
);
OrgUsr
ourf
=
iOrgUsrService
.
getById
(
id
);
return
ResponseHelper
.
buildResponse
(
ourf
.
getBizOrgCode
());
}
}
return
ResponseHelper
.
buildResponse
(
our
.
getBizOrgCode
());
}
/**
* 列表分页查询
*
...
...
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 @
0672ce89
...
...
@@ -153,55 +153,27 @@ public class KeySiteController extends BaseController {
/* BUG 2670 end */
return
ResponseHelper
.
buildResponse
(
keySiteService
.
deleteById
(
sequenceNbrList
));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"find/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个重点部位"
,
notes
=
"根据sequenceNbr查询单个重点部位"
)
public
ResponseModel
<
KeySiteDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
List
<
String
>
list
=
new
ArrayList
<
String
>();
Map
<
String
,
List
<
AttachmentDto
>>
files
=
sourceFileService
.
getAttachments
(
sequenceNbr
);
KeySiteDto
dto
=
keySiteService
.
getSequenceNbr
(
sequenceNbr
);
if
(
files
!=
null
&&
dto
!=
null
)
{
dto
.
setAttachments
(
files
);
JSONArray
array
=
JSONArray
.
parseArray
(
JSONArray
.
toJSONString
(
files
.
get
(
"keySitePhoto"
)));
if
(
array
!=
null
&&
array
.
size
()
>
0
)
{
for
(
Object
i
:
array
)
{
JSONObject
object
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
i
));
list
.
add
(
object
.
getString
(
"url"
));
}
}
}
dto
.
setAttachmentsList
(
list
);
return
ResponseHelper
.
buildResponse
(
dto
);
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"重点部位分页查询"
,
notes
=
"重点部位分页查询"
)
public
ResponseModel
<
IPage
<
KeySiteDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@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
)
{
Page
<
KeySiteDto
>
page
=
new
Page
<
KeySiteDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
keySiteServiceImpl
.
getPageList
(
page
,
name
,
buildingId
,
fireEnduranceRate
,
useNature
,
fireFacilitiesInfo
,
bizOrgCode
));
}
//
*/
//
@TycloudOperation(ApiLevel = UserType.AGENCY)
//
@GetMapping(value = "/page")
//
@ApiOperation(httpMethod = "GET", value = "重点部位分页查询", notes = "重点部位分页查询")
//
public ResponseModel<IPage<KeySiteDto>> queryForPage(@RequestParam(value = "current") int current,
//
@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) {
//
Page<KeySiteDto> page = new Page<KeySiteDto>();
//
page.setCurrent(current);
//
page.setSize(size);
//
return ResponseHelper.buildResponse(keySiteServiceImpl.getPageList(page, name, buildingId, fireEnduranceRate,
//
useNature, fireFacilitiesInfo, bizOrgCode));
//
}
@PersonIdentify
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
...
@@ -254,6 +226,66 @@ public class KeySiteController extends BaseController {
return
ResponseHelper
.
buildResponse
(
menus
);
}
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"find/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个重点部位"
,
notes
=
"根据sequenceNbr查询单个重点部位"
)
public
ResponseModel
<
KeySiteDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
List
<
String
>
list
=
new
ArrayList
<
String
>();
Map
<
String
,
List
<
AttachmentDto
>>
files
=
sourceFileService
.
getAttachments
(
sequenceNbr
);
KeySiteDto
dto
=
keySiteService
.
getSequenceNbr
(
sequenceNbr
);
if
(
files
!=
null
&&
dto
!=
null
)
{
dto
.
setAttachments
(
files
);
JSONArray
array
=
JSONArray
.
parseArray
(
JSONArray
.
toJSONString
(
files
.
get
(
"keySitePhoto"
)));
if
(
array
!=
null
&&
array
.
size
()
>
0
)
{
for
(
Object
i
:
array
)
{
JSONObject
object
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
i
));
list
.
add
(
object
.
getString
(
"url"
));
}
}
}
dto
.
setAttachmentsList
(
list
);
return
ResponseHelper
.
buildResponse
(
dto
);
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"重点部位分页查询"
,
notes
=
"重点部位分页查询"
)
public
ResponseModel
<
IPage
<
KeySiteDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@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
)
{
Page
<
KeySiteDto
>
page
=
new
Page
<
KeySiteDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
// 获取登陆人角色
ReginParams
reginParams
=
getSelectedOrgInfo
();
// 权限赋值
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
return
ResponseHelper
.
buildResponse
(
keySiteServiceImpl
.
getPageList
(
page
,
name
,
buildingId
,
fireEnduranceRate
,
useNature
,
fireFacilitiesInfo
,
reginParams
.
getPersonIdentity
().
getBizOrgCode
()));
}
@PersonIdentify
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/OrgPersonController.java
View file @
0672ce89
...
...
@@ -10,8 +10,15 @@ import javax.servlet.http.HttpServletRequest;
import
javax.servlet.http.HttpServletResponse
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.common.api.core.framework.PersonIdentify
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
...
...
@@ -21,6 +28,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
...
...
@@ -50,9 +58,13 @@ import io.swagger.annotations.ApiOperation;
@RestController
@Api
(
tags
=
"人员Api"
)
@RequestMapping
(
value
=
"/org-person"
)
public
class
OrgPersonController
{
public
class
OrgPersonController
{
@Autowired
OrgUsrServiceImpl
iOrgUsrService
;
@Autowired
private
RedisUtils
redisUtils
;
@Value
(
"${auth-key-org-user:org_user_info}"
)
private
String
authKey
;
/**
* 新增人员信息
...
...
@@ -89,6 +101,7 @@ public class OrgPersonController {
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
PUT
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"更新人员数据"
,
notes
=
"更新人员数据"
)
...
...
@@ -165,10 +178,16 @@ public class OrgPersonController {
*
* @return
*/
@PersonIdentify
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表分页查询"
,
notes
=
"列表分页查询"
)
public
ResponseModel
<
Object
>
listPage
(
@RequestParam
Map
<
String
,
Object
>
requestBody
)
{
// 权限处理
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
requestBody
.
put
(
"bizOrgCode"
,
reginParams
.
getPersonIdentity
().
getBizOrgCode
());
return
ResponseHelper
.
buildResponse
(
iOrgUsrService
.
pagePerson
(
requestBody
.
containsKey
(
"pageNum"
)
?
requestBody
.
get
(
"pageNum"
).
toString
()
:
null
,
requestBody
.
containsKey
(
"pageSize"
)
?
requestBody
.
get
(
"pageSize"
).
toString
()
:
null
,
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FireTeamServiceImpl.java
View file @
0672ce89
...
...
@@ -183,6 +183,11 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
null
);
}
public
List
<
Menu
>
getTeamTreeLikeCode
(
QueryWrapper
<
FireTeam
>
columnMap
)
throws
Exception
{
Collection
<
FireTeam
>
list
=
this
.
list
(
columnMap
);
return
TreeParser
.
getTree
(
null
,
list
,
FireTeam
.
class
.
getName
(),
"getSequenceNbr"
,
2
,
"getName"
,
"getParent"
,
null
);
}
/**
* 获取机场单位-队伍树
*
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/BuildingController.java
View file @
0672ce89
...
...
@@ -5,6 +5,7 @@ import java.util.List;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -49,7 +50,8 @@ public class BuildingController extends AbstractBaseController {
@Autowired
IFormInstanceService
formInstanceService
;
@Value
(
"${window.vedioFormat}"
)
String
vedioFormat
;
/**
* @param groupCode
* @Description 根据groupCode查询allowOperation对应的操作菜单
...
...
@@ -130,11 +132,11 @@ public class BuildingController extends AbstractBaseController {
return
buildService
.
getScenesList
(
instanceId
,
groupType
);
}
@GetMapping
(
value
=
"/
equipInSceneId
"
)
@GetMapping
(
value
=
"/
{floorId}/pointInFloor
"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询
建筑画布下装备
"
)
public
List
<
EquiplistSpecificBySystemVO
>
get
EquipBySceneId
(
@RequestParam
Long
scene
Id
)
{
return
buildService
.
get
EquipBySceneId
(
scene
Id
);
@ApiOperation
(
value
=
"查询
指定楼层下装备、摄像头
"
)
public
List
<
EquiplistSpecificBySystemVO
>
get
PointInFloor
(
@PathVariable
Long
floor
Id
)
{
return
buildService
.
get
PointInFloor
(
floor
Id
);
}
@PostMapping
(
value
=
"/commonSave"
)
...
...
@@ -151,7 +153,13 @@ public class BuildingController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"建筑装备树"
,
notes
=
"楼层点位图使用"
)
public
List
<
PointTreeVo
>
getBuildTree
(
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
if
(
vedioFormat
.
equals
(
"hls"
)){
bizOrgCode
=
null
;
}
return
buildService
.
getBuildTree
(
bizOrgCode
);
}
@GetMapping
(
value
=
"/3dPointTree"
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/EquipmentManageController.java
View file @
0672ce89
...
...
@@ -5,6 +5,7 @@ import java.util.Map;
import
javax.servlet.http.HttpServletResponse
;
import
com.yeejoin.equipmanage.mapper.EquipmentManageMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
...
...
@@ -67,6 +68,14 @@ public class EquipmentManageController extends AbstractBaseController{
return
equipmentManageService
.
getUtils
(
orgCode
);
}
@GetMapping
(
value
=
"/getSystemList"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取系统列表"
,
notes
=
"获取系统列表"
)
public
List
<
EquipmentManageVo
>
getSystemList
()
{
return
equipmentManageService
.
getSystemList
();
}
@GetMapping
(
value
=
"/getUsers"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取人员列表"
,
notes
=
"获取人员列表"
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/FireFightingSystemController.java
View file @
0672ce89
...
...
@@ -491,6 +491,9 @@ public class FireFightingSystemController extends AbstractBaseController {
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
pageSize
)
{
if
(
current
>
0
){
current
=
(
current
-
1
)
*
pageSize
;
}
return
fireFightingSystemService
.
queryEquipmenInfoAndCount
(
equipmentName
,
equipmentCode
,
construction
,
maintenance
,
bizOrgCode
,
formGroupId
,
current
,
pageSize
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/BuildingMapper.java
View file @
0672ce89
...
...
@@ -55,13 +55,6 @@ public interface BuildingMapper extends BaseMapper<Building> {
String
getVPointInScene
(
Long
id
);
/**
* 获取建筑画布下装备
* @param ids
* @return
*/
List
<
EquiplistSpecificBySystemVO
>
getEquipBySceneId
(
@Param
(
"ids"
)
String
[]
ids
);
List
<
EquiplistSpecificBySystemVO
>
getVideoBySceneId
(
@Param
(
"ids"
)
String
[]
ids
);
/**
* 根据类型获取名下画布集合
* @param id
* @param groupType
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/EquipmentSpecificMapper.java
View file @
0672ce89
...
...
@@ -8,10 +8,7 @@ import com.yeejoin.equipmanage.common.dto.EquipmentSpecificDto;
import
com.yeejoin.equipmanage.common.dto.UserDto
;
import
com.yeejoin.equipmanage.common.entity.*
;
import
com.yeejoin.equipmanage.common.entity.dto.EquipmentSpecificDTO
;
import
com.yeejoin.equipmanage.common.entity.vo.ComplementCodeVO
;
import
com.yeejoin.equipmanage.common.entity.vo.EquipmentSpecificVo
;
import
com.yeejoin.equipmanage.common.entity.vo.PointTreeVo
;
import
com.yeejoin.equipmanage.common.entity.vo.SourceNameByEquipSpeIdVO
;
import
com.yeejoin.equipmanage.common.entity.vo.*
;
import
com.yeejoin.equipmanage.common.vo.*
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -207,4 +204,5 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
String
getEquipmentBySpecificId
(
@Param
(
"specificId"
)
Long
specificId
);
List
<
EquiplistSpecificBySystemVO
>
getListByWarehouseStructureId
(
Long
floorId
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/VideoMapper.java
View file @
0672ce89
...
...
@@ -85,4 +85,6 @@ public interface VideoMapper extends BaseMapper<Video> {
List
<
VideoListVo
>
listByType
(
@Param
(
"type"
)
String
type
);
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 @
0672ce89
...
...
@@ -40,6 +40,8 @@ public interface EquipmentManageService extends IService<EquipmentManageEntity>
*/
Map
<
String
,
Object
>
getUsers
();
List
<
EquipmentManageVo
>
getSystemList
();
Map
<
String
,
Object
>
deleteById
(
List
<
EquipmentManageVo
>
list
);
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IBuilldService.java
View file @
0672ce89
...
...
@@ -69,14 +69,6 @@ public interface IBuilldService extends IService<Building> {
List
<
SourceScene
>
getScenesList
(
Long
id
,
String
groupType
);
/**
* 查询建筑画布下装备
*
* @param id
* @return
*/
List
<
EquiplistSpecificBySystemVO
>
getEquipBySceneId
(
@RequestParam
Long
id
);
/**
* 消防建筑树查询接口
*
* @return List<BuildingTreeVo>
...
...
@@ -311,4 +303,10 @@ public interface IBuilldService extends IService<Building> {
List
<
BuildingTreeVo
>
getBuildingVideoTreeNew
();
List
<
Map
<
String
,
Object
>>
getBuildingDetaiList
();
/**
* 查询指定楼层下装备、摄像头
* @param floorId 楼层id
* @return List<EquiplistSpecificBySystemVO>
*/
List
<
EquiplistSpecificBySystemVO
>
getPointInFloor
(
Long
floorId
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/AreaServiceImpl.java
View file @
0672ce89
...
...
@@ -240,7 +240,7 @@ public class AreaServiceImpl extends ServiceImpl<AreaMapper, Area> implements IA
@Override
public
List
<
UnitAreaTreeVo
>
getAreaTreeListVo
()
{
// 获取公司
部门
list
// 获取公司list
List
<
OrgUsrDto
>
orgCompanyLists
=
jcsRemoteService
.
getCompanyDeptListWithAuth
(
authKey
,
"COMPANY"
);
Map
<
String
,
Long
>
orgMap
=
orgCompanyLists
.
stream
().
collect
(
Collectors
.
toMap
(
OrgUsrDto:
:
getBizOrgCode
,
OrgUsrDto:
:
getSequenceNbr
));
List
<
UnitAreaTreeVo
>
orgTreeList
=
orgCompanyLists
.
stream
()
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/BuildingServiceImpl.java
View file @
0672ce89
...
...
@@ -124,6 +124,9 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
IWarehouseStructureService
iWarehouseStructureService
;
@Autowired
EquipmentSpecificMapper
equipmentSpecificMapper
;
@Autowired
StockDetailMapper
stockDetailMapper
;
@Autowired
ISourceSceneService
sourceSceneService
;
...
...
@@ -319,23 +322,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
}
return
list
;
}
@Override
public
List
<
EquiplistSpecificBySystemVO
>
getEquipBySceneId
(
Long
id
)
{
String
pointInScene
=
this
.
baseMapper
.
getPointInScene
(
id
);
String
vPointInScene
=
this
.
baseMapper
.
getVPointInScene
(
id
);
if
((
""
.
equals
(
pointInScene
)
||
pointInScene
==
null
)
&&
(
""
.
equals
(
vPointInScene
)
||
vPointInScene
==
null
))
{
return
new
ArrayList
<>();
}
String
[]
ids
=
pointInScene
.
split
(
","
);
String
[]
vids
=
vPointInScene
.
split
(
","
);
List
<
EquiplistSpecificBySystemVO
>
list
=
new
ArrayList
<>();
list
.
addAll
(
this
.
baseMapper
.
getEquipBySceneId
(
ids
));
list
.
addAll
(
this
.
baseMapper
.
getVideoBySceneId
(
vids
));
return
list
;
}
@Override
public
Object
saveForm
(
String
groupCode
,
String
companyCode
,
Map
<
String
,
Object
>
map
)
{
final
String
instanceId
=
"instanceId"
;
...
...
@@ -1173,6 +1160,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
vo
.
setName
(
orgUsrDto
.
getBizOrgName
());
vo
.
setId
(
orgUsrDto
.
getSequenceNbr
());
vo
.
setBizOrgName
(
orgUsrDto
.
getBizOrgName
());
vo
.
setTotal
(
allListVo
.
stream
().
filter
(
b
->
b
.
getBizOrgCode
()
!=
null
&&
b
.
getBizOrgCode
().
contains
(
vo
.
getBizOrgCode
())
&&
"building"
.
equals
(
b
.
getGroupType
())).
count
());
if
(
""
.
equals
(
orgUsrDto
.
getParentId
())
||
"-1"
.
equals
(
orgUsrDto
.
getParentId
())
||
null
==
orgUsrDto
.
getParentId
())
{
flag
.
set
(
true
);
}
...
...
@@ -1227,6 +1215,38 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
.
collect
(
Collectors
.
toList
());
}
@Override
public
List
<
EquiplistSpecificBySystemVO
>
getPointInFloor
(
Long
floorId
)
{
//0.查询画布信息,todo 建筑可标记点类型为装备、摄像头
List
<
SourceScene
>
sourceScenes
=
sourceSceneService
.
findBySourceId
(
floorId
);
SourceScene
sourceScene
=
sourceScenes
.
size
()
>
0
?
sourceScenes
.
get
(
0
)
:
new
SourceScene
();
//0.1已标记装备点
String
equipPointInScene
=
sourceScene
.
getPointInScene
()
!=
null
?
sourceScene
.
getPointInScene
()
:
""
;
//0.2已标记视频点
String
videoPointInScene
=
sourceScene
.
getVideoInScene
()
!=
null
?
sourceScene
.
getVideoInScene
()
:
""
;
//1.查询楼层下的所有装备list
List
<
EquiplistSpecificBySystemVO
>
equipmentSpecifics
=
equipmentSpecificMapper
.
getListByWarehouseStructureId
(
floorId
);
equipmentSpecifics
.
forEach
(
e
->{
e
.
setIsBound
(
equipPointInScene
.
contains
(
e
.
getId
().
toString
()));
e
.
setType
(
"装备点"
);
});
List
<
EquiplistSpecificBySystemVO
>
bySystemVOS
=
new
ArrayList
<>(
equipmentSpecifics
);
//2.查询楼层下的所有视频list
List
<
Video
>
videos
=
videoMapper
.
selectListBySourceId
(
floorId
);
//3.数据加工
videos
.
forEach
(
v
->{
EquiplistSpecificBySystemVO
vo
=
new
EquiplistSpecificBySystemVO
();
vo
.
setId
(
v
.
getId
());
vo
.
setCode
(
v
.
getCode
());
vo
.
setCategoryName
(
v
.
getType
());
vo
.
setEquipmentName
(
v
.
getName
());
vo
.
setType
(
"视频点"
);
vo
.
setIsBound
(
videoPointInScene
.
contains
(
v
.
getId
().
toString
()));
bySystemVOS
.
add
(
vo
);
});
return
bySystemVOS
;
}
// @Override
// public List<BuildingTreeVo> getBuildingVideoTreeNew() {
// List<BuildingTreeVo> list = getCompanyBuildingTree(buildVideoAuthKey);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/ConfirmAlarmServiceImpl.java
View file @
0672ce89
...
...
@@ -31,14 +31,14 @@ import org.springframework.beans.BeanUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.support.TransactionSynchronization
;
import
org.springframework.transaction.support.TransactionSynchronizationManager
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Service
...
...
@@ -132,6 +132,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
confirmAlam
(
EquipmentSpecificAlarmLog
ent
,
String
appKey
,
String
product
,
String
token
,
String
userId
)
{
try
{
AgencyUserModel
userModel
=
remoteSecurityService
.
getAgencyUser
();
...
...
@@ -185,6 +186,14 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
}
//数字换流站使用
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQZXDT
.
getTopic
(),
""
);
TransactionSynchronizationManager
.
registerSynchronization
(
new
TransactionSynchronization
()
{
@Override
public
void
afterCommit
()
{
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"seqNo"
,
UUID
.
randomUUID
().
toString
().
replace
(
"-"
,
""
).
toLowerCase
());
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
ALARM_LOG_INSERT
.
getTopic
(),
jsonObject
.
toString
());
}
});
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
BadRequest
(
"确认失败"
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentManageServiceImpl.java
View file @
0672ce89
...
...
@@ -100,6 +100,11 @@ public class EquipmentManageServiceImpl extends ServiceImpl<EquipmentManageMappe
}
@Override
public
List
<
EquipmentManageVo
>
getSystemList
(){
return
equipmentManageMapper
.
getSystemList
();
}
@Override
public
Map
<
String
,
Object
>
deleteById
(
List
<
EquipmentManageVo
>
list
)
{
Map
<
String
,
Object
>
result
=
new
HashMap
();
String
stringresult
=
""
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificAlarmServiceImpl.java
View file @
0672ce89
...
...
@@ -7,7 +7,10 @@ import java.net.SocketException;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDateTime
;
import
java.time.LocalTime
;
import
java.time.ZoneId
;
import
java.time.format.DateTimeFormatter
;
import
java.time.temporal.TemporalAccessor
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Enumeration
;
...
...
@@ -90,6 +93,9 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
@Autowired
private
IVideoService
videoService
;
@Value
(
"${window.vedioFormat}"
)
String
vedioFormat
;
@Override
public
void
handleExport
(
HttpServletResponse
response
,
List
<
Long
>
ids
,
String
alarmType
)
{
...
...
@@ -194,7 +200,10 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
mybatisResult
.
getRecords
().
forEach
(
x
->
{
AlarmListDataVO
dataVO
=
new
AlarmListDataVO
();
try
{
dataVO
.
setAlarmTime
(
DateUtils
.
dateParse
(
String
.
valueOf
(
x
.
get
(
"createDate"
)),
DateUtils
.
DATE_TIME_T_PATTERN
));
DateTimeFormatter
df
=
DateTimeFormatter
.
ofPattern
(
DateUtils
.
DATE_TIME_PATTERN
);
String
time
=
df
.
format
((
TemporalAccessor
)
x
.
get
(
"createDate"
));
Date
date
=
DateUtils
.
dateParse
(
time
,
DateUtils
.
DATE_TIME_PATTERN
);
dataVO
.
setAlarmTime
(
date
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
...
...
@@ -267,6 +276,7 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
video
.
setName
(
x
.
getName
());
video
.
setTokens
(
x
.
getToken
());
video
.
setUrl
(
x
.
getUrl
());
video
.
setVedioFormat
(
vedioFormat
);
video
.
setUrl
(
videoService
.
getVideoUrl
(
x
.
getName
(),
x
.
getPresetPosition
(),
x
.
getUrl
(),
x
.
getCode
()));
video
.
setIp
(
x
.
getIp
());
video
.
setPort
(
x
.
getPort
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificSerivceImpl.java
View file @
0672ce89
...
...
@@ -141,6 +141,9 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
@Value
(
"${systemctl.sync.switch}"
)
private
Boolean
syncSwitch
;
@Value
(
"${window.vedioFormat}"
)
String
vedioFormat
;
private
final
String
injection
=
"{\n"
+
...
...
@@ -997,6 +1000,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
if
(!
ObjectUtils
.
isEmpty
(
video
))
{
video
.
setUrl
(
videoService
.
getVideoUrl
(
video
.
getName
().
toString
(),
video
.
getPresetPosition
(),
video
.
getUrl
(),
video
.
getCode
()));
video
.
setId
(
id
);
video
.
setVedioFormat
(
vedioFormat
);
}
return
video
;
}
else
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MqttReceiveServiceImpl.java
View file @
0672ce89
...
...
@@ -11,6 +11,7 @@ import java.util.UUID;
import
java.util.stream.Collectors
;
//import net.sf.json.JSONObject;
import
com.sun.org.apache.xpath.internal.operations.Bool
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
@@ -212,6 +213,8 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
private
final
static
Map
staticMap
=
new
HashMap
();
private
static
Boolean
bool
=
Boolean
.
FALSE
;
static
{
staticMap
.
put
(
"FireCar_GDLongitude"
,
"0"
);
staticMap
.
put
(
"FireCar_GDLatitude"
,
"0"
);
...
...
@@ -450,6 +453,8 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQDQR
.
getTopic
(),
JSONArray
.
toJSON
(
action
).
toString
());
}
else
{
upAlarmLogStatus
(
action
.
getIotCode
(),
action
.
getEquipmentSpecificIndexKey
(),
equipmentSpecificAlarmLogService
);
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQYQR
.
getTopic
(),
JSONArray
.
toJSON
(
action
).
toString
());
bool
=
Boolean
.
TRUE
;
}
specificAlarmIds
.
add
(
action
.
getId
());
equipIndexIds
.
add
(
action
.
getEquipmentIndexId
());
...
...
@@ -496,7 +501,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
iEquipmentSpecificSerivce
.
updateEquipmentSpecIndexRealtimeData
(
equipmentSpecificIndexList
);
//数字换流站站使用
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQZXDT
.
getTopic
(),
""
);
if
(!
equipmentAlarmLogs
.
isEmpty
())
{
if
(!
equipmentAlarmLogs
.
isEmpty
()
||
bool
)
{
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"seqNo"
,
UUID
.
randomUUID
().
toString
().
replace
(
"-"
,
""
).
toLowerCase
());
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
ALARM_LOG_INSERT
.
getTopic
(),
jsonObject
.
toString
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/StockServiceImpl.java
View file @
0672ce89
...
...
@@ -334,8 +334,6 @@ public class StockServiceImpl extends ServiceImpl<StockMapper, Stock> implements
}
}
//插入模板信息
EquipmentDetail
equipmentDetail
=
new
EquipmentDetail
();
equipmentDetail
.
setCode
(
equipmentDetailDownloadVOS
.
get
(
i
).
getCode
());
...
...
@@ -349,6 +347,7 @@ public class StockServiceImpl extends ServiceImpl<StockMapper, Stock> implements
equipmentDetail
.
setManufacturerName
(
equipmentDetailDownloadVOS
.
get
(
i
).
getManufacturerName
());
}
equipmentDetail
.
setEquipmentId
(
equipment
.
getId
());
equipmentDetail
.
setEquipmentName
(
equipment
.
getName
());
equipmentDetail
.
setName
(
equipmentDetailDownloadVOS
.
get
(
i
).
getName
());
equipmentDetail
.
setArea
(
equipmentDetailDownloadVOS
.
get
(
i
).
getDescription
());
...
...
@@ -359,7 +358,6 @@ public class StockServiceImpl extends ServiceImpl<StockMapper, Stock> implements
equipmentDetail
.
setCompanyName
(
company
[
0
]);
}
equipmentDetailMapper
.
insert
(
equipmentDetail
);
//生成单件设备信息
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/AlertCalledController.java
View file @
0672ce89
...
...
@@ -135,6 +135,10 @@ public class AlertCalledController extends BaseController {
@Autowired
TzsAuthService
tzsAuthService
;
@Autowired
private
ElevatorServiceImpl
iElevatorService
;
/**
* 新增警情接警填报记录
*
...
...
@@ -144,10 +148,17 @@ public class AlertCalledController extends BaseController {
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增警情接警填报记录"
,
notes
=
"新增警情接警填报记录"
)
public
ResponseModel
<
AlertCalledDto
>
save
(
@RequestBody
AlertCalledObjsDto
alertCalledObjsDto
)
{
if
(
ValidationUtil
.
isEmpty
(
alertCalledObjsDto
)
||
ValidationUtil
.
isEmpty
(
alertCalledObjsDto
.
getAlertCalledDto
()))
{
if
(
ValidationUtil
.
isEmpty
(
alertCalledObjsDto
))
{
throw
new
BadRequest
(
"参数校验失败."
);
}
LambdaQueryWrapper
<
Elevator
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
Elevator:
:
getRescueCode
,
alertCalledObjsDto
.
getAlertCalledDto
().
getDeviceId
());
Elevator
elevator
=
iElevatorService
.
getOne
(
queryWrapper
);
if
(
elevator
==
null
)
{
throw
new
BadRequest
(
"未找到相关电梯."
);
}
ReginParams
reginParams
=
getSelectedOrgInfo
();
alertCalledObjsDto
=
iAlertCalledService
.
createAlertCalled
(
alertCalledObjsDto
,
reginParams
.
getUserModel
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/ESAlertCalledService.java
View file @
0672ce89
...
...
@@ -163,7 +163,7 @@ public class ESAlertCalledService {
AlertStatusEnum
alertStatusEnum
=
AlertStatusEnum
.
getEnum
(
status
);
if
(!
ValidationUtil
.
isEmpty
(
alertStatusEnum
))
{
qbstatus
.
should
(
QueryBuilders
.
termQuery
(
"alertStatusStr
.keyword
"
,
alertStatusEnum
.
getCode
()));
qbstatus
.
should
(
QueryBuilders
.
termQuery
(
"alertStatusStr"
,
alertStatusEnum
.
getCode
()));
}
}
boolMust
.
must
(
qbstatus
);
...
...
@@ -247,7 +247,7 @@ public class ESAlertCalledService {
/**
* 困人救援,故障报修,投诉咨询 条件构造
*/
System
.
out
.
println
(
boolMust
);
// 创建查询构造器
NativeSearchQueryBuilder
queryBuilder
=
new
NativeSearchQueryBuilder
()
// 分页
...
...
amos-boot-system-equip/src/main/resources/mapper/Building.xml
View file @
0672ce89
...
...
@@ -134,38 +134,6 @@
<select
id=
"getVPointInScene"
resultType=
"string"
>
select video_in_scene from wl_source_scene where scene_id =#{id}
</select>
<select
id=
"getEquipBySceneId"
resultMap=
"EquiplistBySystemId"
>
SELECT
spe.id,
det.NAME equipment_name,
spe.CODE,
wlec.NAME AS category_name
FROM
wl_equipment_specific AS spe
LEFT JOIN wl_equipment_detail AS det ON spe.equipment_detail_id = det.id
LEFT JOIN wl_equipment AS wle ON wle.id = det.equipment_id
LEFT JOIN wl_equipment_category AS wlec ON wlec.id = wle.category_id
WHERE
spe.id in
<foreach
item=
"item"
collection=
"ids"
separator=
","
open=
"("
close=
")"
index=
""
>
#{item}
</foreach>
</select>
<select
id=
"getVideoBySceneId"
resultMap=
"EquiplistBySystemId"
>
SELECT
id,
name equipment_name,
code,
name AS category_name
FROM
wl_video
WHERE
id in
<foreach
item=
"item"
collection=
"ids"
separator=
","
open=
"("
close=
")"
index=
""
>
#{item}
</foreach>
</select>
<select
id=
"getScenesList"
resultType=
"com.yeejoin.equipmanage.common.entity.SourceScene"
>
select
ins.instance_id as id,
...
...
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificMapper.xml
View file @
0672ce89
...
...
@@ -1465,4 +1465,18 @@
where
wes.id = #{specificId}
</select>
<select
id=
"getListByWarehouseStructureId"
resultType=
"com.yeejoin.equipmanage.common.entity.vo.EquiplistSpecificBySystemVO"
>
SELECT
spe.id,
spe.name equipment_name,
spe.code,
wlec.name AS category_name
FROM
wl_equipment_specific AS spe
LEFT JOIN wl_equipment AS wle ON spe.equipment_code = wle.code
LEFT JOIN wl_equipment_category AS wlec ON wlec.id = wle.category_id
WHERE
spe.warehouse_structure_id =#{floorId}
</select>
</mapper>
\ No newline at end of file
amos-boot-system-equip/src/main/resources/mapper/VideoMapper.xml
View file @
0672ce89
...
...
@@ -365,6 +365,16 @@
wl_video as wlv
where wlv.code = #{code}
</select>
<select
id=
"selectListBySourceId"
resultType=
"com.yeejoin.equipmanage.common.entity.Video"
>
select
v.id,
v.code,
v.name,
v.type
from
wl_video v,
wl_video_source vs
where vs.source_id = #{floorId}
and vs.video_id = v.id
</select>
</mapper>
amos-boot-system-jcs/src/main/resources/db/changelog/jcs-1.0.0.0.xml
View file @
0672ce89
...
...
@@ -2743,6 +2743,31 @@
<comment>
cb_fire_station add column parent_building_id 所属建筑节点的所有父节点id集合
</comment>
<sql>
ALTER TABLE cb_fire_station ADD parent_building_id varchar(1000) NULL COMMENT '所属建筑节点的所有父节点id集合';
</sql>
</changeSet>
<changeSet
author=
"tw"
id=
"20220207-1"
runAlways=
"true"
>
<comment>
`getParentList`
</comment>
<sql
endDelimiter=
"#"
>
DROP FUNCTION IF EXISTS `getParentList`#
CREATE FUNCTION `getParentList`(rootId varchar(100))
RETURNS varchar(1000)
BEGIN
DECLARE fid varchar(100) default '';
DECLARE type varchar(100) default '';
DECLARE str varchar(1000) default rootId;
WHILE rootId is not null do
SET type =(SELECT biz_org_type FROM cb_org_usr WHERE sequence_nbr = rootId);
SET fid =(SELECT parent_id FROM cb_org_usr WHERE sequence_nbr = rootId);
IF type ='COMPANY' THEN
SET str = (SELECT sequence_nbr FROM cb_org_usr WHERE sequence_nbr = rootId);
SET rootId = null;
ELSE
SET rootId = fid;
END IF;
END WHILE;
return str;
END#
</sql>
</changeSet>
...
...
amos-boot-system-tzs/src/main/resources/application-qa.properties
View file @
0672ce89
...
...
@@ -15,7 +15,7 @@ eureka.instance.status-page-url=http://192.168.0.204:${server.port}${server.serv
eureka.instance.metadata-map.management.api-docs
=
http://192.168.0.204:${server.port}${server.servlet.context-path}/swagger-ui.html
## ES properties:
biz.elasticsearch.address
=
1
92.168.0.20
4
biz.elasticsearch.address
=
1
13.134.211.17
4
spring.data.elasticsearch.cluster-name
=
elasticsearch
spring.data.elasticsearch.cluster-nodes
=
${biz.elasticsearch.address}:9300
spring.elasticsearch.rest.uris
=
http://${biz.elasticsearch.address}:9200
...
...
amos-boot-system-tzs/src/main/resources/application.properties
View file @
0672ce89
spring.application.name
=
TZS
-kfm
spring.application.name
=
TZS
server.servlet.context-path
=
/tzs
server.port
=
11000
spring.profiles.active
=
jd
...
...
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