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
36967b25
Commit
36967b25
authored
Feb 08, 2022
by
maoying
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' into temp
parents
ac2cc109
64104c0b
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
167 additions
and
23 deletions
+167
-23
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
VideoVO.java
...ava/com/yeejoin/equipmanage/common/entity/vo/VideoVO.java
+4
-0
ConfirmAlarmServiceImpl.java
...oin/equipmanage/service/impl/ConfirmAlarmServiceImpl.java
+13
-4
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
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 @
36967b25
...
@@ -52,7 +52,7 @@ public class ControllerAop {
...
@@ -52,7 +52,7 @@ public class ControllerAop {
token
=
request
.
getParameterMap
().
get
(
"access_token"
)[
0
];
token
=
request
.
getParameterMap
().
get
(
"access_token"
)[
0
];
}
}
if
(
token
!=
null
)
{
if
(
token
!=
null
)
{
fillRequestContext
(
token
);
fillRequestContext
(
token
);
}
}
boolean
validToken
=
TokenOperation
.
refresh
(
token
);
boolean
validToken
=
TokenOperation
.
refresh
(
token
);
if
(!
validToken
)
{
if
(!
validToken
)
{
...
...
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/controller/CylinderPageController.java
View file @
36967b25
...
@@ -34,7 +34,6 @@ import java.util.ArrayList;
...
@@ -34,7 +34,6 @@ import java.util.ArrayList;
import
java.util.List
;
import
java.util.List
;
@RestController
@RestController
@TycloudResource
(
module
=
"openapi"
,
value
=
"cylinderPage"
)
@RequestMapping
(
value
=
"/cylinderPage"
)
@RequestMapping
(
value
=
"/cylinderPage"
)
@Api
(
tags
=
"气瓶首页controller"
)
@Api
(
tags
=
"气瓶首页controller"
)
public
class
CylinderPageController
{
public
class
CylinderPageController
{
...
@@ -87,7 +86,7 @@ public class CylinderPageController {
...
@@ -87,7 +86,7 @@ public class CylinderPageController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"根据搜索信息获取表格数据"
)
@ApiOperation
(
value
=
"根据搜索信息获取表格数据"
)
@
Pos
tMapping
(
value
=
"/getTableInfo"
)
@
Ge
tMapping
(
value
=
"/getTableInfo"
)
public
ResponseModel
<
List
<
CylinderTableModel
>>
cylinderTableInfo
(
@RequestParam
(
value
=
"serviceName"
,
required
=
false
)
String
serviceName
,
public
ResponseModel
<
List
<
CylinderTableModel
>>
cylinderTableInfo
(
@RequestParam
(
value
=
"serviceName"
,
required
=
false
)
String
serviceName
,
@RequestParam
(
value
=
"appId"
,
required
=
false
)
String
appId
,
@RequestParam
(
value
=
"appId"
,
required
=
false
)
String
appId
,
@RequestParam
(
value
=
"startTime"
,
required
=
false
)
String
startTime
,
@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 @
36967b25
...
@@ -11,7 +11,7 @@ import lombok.Data;
...
@@ -11,7 +11,7 @@ import lombok.Data;
public
class
CylinderTableModel
{
public
class
CylinderTableModel
{
/**
/**
*
服务商
名称
*
企业
名称
*/
*/
private
String
unitName
;
private
String
unitName
;
...
...
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/service/CylinderDateInfoService.java
View file @
36967b25
...
@@ -82,12 +82,17 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
...
@@ -82,12 +82,17 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
for
(
OpenapiBizToken
token
:
tokenList
)
{
for
(
OpenapiBizToken
token
:
tokenList
)
{
try
{
try
{
Date
today
=
new
Date
();
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"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
todayStr
=
sdf
.
format
(
today
);
String
todayStr
=
sdf
.
format
(
calendar
.
getTime
()
);
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
)
{
if
(
list
.
size
()
==
0
)
{
CylinderDateInfoModel
temp
=
new
CylinderDateInfoModel
();
CylinderDateInfoModel
temp
=
new
CylinderDateInfoModel
();
temp
.
setSyncDate
(
today
);
temp
.
setSyncDate
(
calendar
.
getTime
()
);
String
appid
=
token
.
getAppId
();
String
appid
=
token
.
getAppId
();
temp
.
setUnitName
(
token
.
getApiCompanyName
());
temp
.
setUnitName
(
token
.
getApiCompanyName
());
temp
.
setAppId
(
appid
);
temp
.
setAppId
(
appid
);
...
@@ -101,6 +106,7 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
...
@@ -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
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
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
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
.
setCylinderExamineInfo
(
examine
);
temp
.
setCylinderUnit
(
cylinderUnit
);
temp
.
setCylinderUnit
(
cylinderUnit
);
temp
.
setCylinderFillingCheckInfo
(
fillingCheck
);
temp
.
setCylinderFillingCheckInfo
(
fillingCheck
);
...
@@ -109,6 +115,7 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
...
@@ -109,6 +115,7 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
temp
.
setCylinderTagInfo
(
tags
);
temp
.
setCylinderTagInfo
(
tags
);
temp
.
setCylinderInfo
(
cylinder
);
temp
.
setCylinderInfo
(
cylinder
);
temp
.
setCylinderFillingRecordInfo
(
fillingRecord
);
temp
.
setCylinderFillingRecordInfo
(
fillingRecord
);
temp
.
setCylinderTotal
(
total
);
this
.
createWithModel
(
temp
);
this
.
createWithModel
(
temp
);
}
else
{
}
else
{
list
.
forEach
(
info
->
{
list
.
forEach
(
info
->
{
...
@@ -122,6 +129,7 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
...
@@ -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
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
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
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
.
setCylinderExamineInfo
(
examine
);
info
.
setCylinderUnit
(
cylinderUnit
);
info
.
setCylinderUnit
(
cylinderUnit
);
info
.
setCylinderFillingCheckInfo
(
fillingCheck
);
info
.
setCylinderFillingCheckInfo
(
fillingCheck
);
...
@@ -130,6 +138,7 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
...
@@ -130,6 +138,7 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
info
.
setCylinderTagInfo
(
tags
);
info
.
setCylinderTagInfo
(
tags
);
info
.
setCylinderInfo
(
cylinder
);
info
.
setCylinderInfo
(
cylinder
);
info
.
setCylinderFillingRecordInfo
(
fillingRecord
);
info
.
setCylinderFillingRecordInfo
(
fillingRecord
);
info
.
setCylinderTotal
(
total
);
this
.
updateById
(
info
);
this
.
updateById
(
info
);
});
});
}
}
...
@@ -399,7 +408,7 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
...
@@ -399,7 +408,7 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
try
{
try
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
todayStr
=
sdf
.
format
(
date
);
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
)
{
if
(
list
.
size
()
==
0
)
{
CylinderDateInfoModel
temp
=
new
CylinderDateInfoModel
();
CylinderDateInfoModel
temp
=
new
CylinderDateInfoModel
();
temp
.
setSyncDate
(
date
);
temp
.
setSyncDate
(
date
);
...
...
amos-boot-data/amos-boot-data-openapi/src/main/resources/application-jd.properties
0 → 100644
View file @
36967b25
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 @
36967b25
<?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-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/vo/VideoVO.java
View file @
36967b25
package
com
.
yeejoin
.
equipmanage
.
common
.
entity
.
vo
;
package
com
.
yeejoin
.
equipmanage
.
common
.
entity
.
vo
;
import
org.springframework.beans.factory.annotation.Value
;
import
lombok.Data
;
import
lombok.Data
;
/**
/**
...
@@ -23,4 +25,6 @@ public class VideoVO {
...
@@ -23,4 +25,6 @@ public class VideoVO {
private
String
code
;
private
String
code
;
private
String
presetPosition
;
private
String
presetPosition
;
private
String
vedioFormat
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/ConfirmAlarmServiceImpl.java
View file @
36967b25
...
@@ -31,14 +31,14 @@ import org.springframework.beans.BeanUtils;
...
@@ -31,14 +31,14 @@ import org.springframework.beans.BeanUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
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.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.util.Date
;
import
java.util.*
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
@Service
@Service
...
@@ -132,6 +132,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
...
@@ -132,6 +132,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
}
}
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
confirmAlam
(
EquipmentSpecificAlarmLog
ent
,
String
appKey
,
String
product
,
String
token
,
String
userId
)
{
public
void
confirmAlam
(
EquipmentSpecificAlarmLog
ent
,
String
appKey
,
String
product
,
String
token
,
String
userId
)
{
try
{
try
{
AgencyUserModel
userModel
=
remoteSecurityService
.
getAgencyUser
();
AgencyUserModel
userModel
=
remoteSecurityService
.
getAgencyUser
();
...
@@ -185,6 +186,14 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
...
@@ -185,6 +186,14 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
}
}
//数字换流站使用
//数字换流站使用
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQZXDT
.
getTopic
(),
""
);
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
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
new
BadRequest
(
"确认失败"
);
throw
new
BadRequest
(
"确认失败"
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificAlarmServiceImpl.java
View file @
36967b25
...
@@ -7,7 +7,10 @@ import java.net.SocketException;
...
@@ -7,7 +7,10 @@ import java.net.SocketException;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.time.LocalTime
;
import
java.time.ZoneId
;
import
java.time.ZoneId
;
import
java.time.format.DateTimeFormatter
;
import
java.time.temporal.TemporalAccessor
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.Enumeration
;
import
java.util.Enumeration
;
...
@@ -90,6 +93,9 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
...
@@ -90,6 +93,9 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
@Autowired
@Autowired
private
IVideoService
videoService
;
private
IVideoService
videoService
;
@Value
(
"${window.vedioFormat}"
)
String
vedioFormat
;
@Override
@Override
public
void
handleExport
(
HttpServletResponse
response
,
List
<
Long
>
ids
,
String
alarmType
)
{
public
void
handleExport
(
HttpServletResponse
response
,
List
<
Long
>
ids
,
String
alarmType
)
{
...
@@ -194,7 +200,10 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
...
@@ -194,7 +200,10 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
mybatisResult
.
getRecords
().
forEach
(
x
->
{
mybatisResult
.
getRecords
().
forEach
(
x
->
{
AlarmListDataVO
dataVO
=
new
AlarmListDataVO
();
AlarmListDataVO
dataVO
=
new
AlarmListDataVO
();
try
{
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
)
{
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
...
@@ -267,6 +276,7 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
...
@@ -267,6 +276,7 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
video
.
setName
(
x
.
getName
());
video
.
setName
(
x
.
getName
());
video
.
setTokens
(
x
.
getToken
());
video
.
setTokens
(
x
.
getToken
());
video
.
setUrl
(
x
.
getUrl
());
video
.
setUrl
(
x
.
getUrl
());
video
.
setVedioFormat
(
vedioFormat
);
video
.
setUrl
(
videoService
.
getVideoUrl
(
x
.
getName
(),
x
.
getPresetPosition
(),
x
.
getUrl
(),
x
.
getCode
()));
video
.
setUrl
(
videoService
.
getVideoUrl
(
x
.
getName
(),
x
.
getPresetPosition
(),
x
.
getUrl
(),
x
.
getCode
()));
video
.
setIp
(
x
.
getIp
());
video
.
setIp
(
x
.
getIp
());
video
.
setPort
(
x
.
getPort
());
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 @
36967b25
...
@@ -141,6 +141,9 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
...
@@ -141,6 +141,9 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
@Value
(
"${systemctl.sync.switch}"
)
@Value
(
"${systemctl.sync.switch}"
)
private
Boolean
syncSwitch
;
private
Boolean
syncSwitch
;
@Value
(
"${window.vedioFormat}"
)
String
vedioFormat
;
private
final
String
injection
=
"{\n"
+
private
final
String
injection
=
"{\n"
+
...
@@ -997,6 +1000,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
...
@@ -997,6 +1000,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
if
(!
ObjectUtils
.
isEmpty
(
video
))
{
if
(!
ObjectUtils
.
isEmpty
(
video
))
{
video
.
setUrl
(
videoService
.
getVideoUrl
(
video
.
getName
().
toString
(),
video
.
getPresetPosition
(),
video
.
getUrl
(),
video
.
getCode
()));
video
.
setUrl
(
videoService
.
getVideoUrl
(
video
.
getName
().
toString
(),
video
.
getPresetPosition
(),
video
.
getUrl
(),
video
.
getCode
()));
video
.
setId
(
id
);
video
.
setId
(
id
);
video
.
setVedioFormat
(
vedioFormat
);
}
}
return
video
;
return
video
;
}
else
{
}
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 @
36967b25
...
@@ -11,6 +11,7 @@ import java.util.UUID;
...
@@ -11,6 +11,7 @@ import java.util.UUID;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
//import net.sf.json.JSONObject;
//import net.sf.json.JSONObject;
import
com.sun.org.apache.xpath.internal.operations.Bool
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
...
@@ -212,6 +213,8 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -212,6 +213,8 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
private
final
static
Map
staticMap
=
new
HashMap
();
private
final
static
Map
staticMap
=
new
HashMap
();
private
static
Boolean
bool
=
Boolean
.
FALSE
;
static
{
static
{
staticMap
.
put
(
"FireCar_GDLongitude"
,
"0"
);
staticMap
.
put
(
"FireCar_GDLongitude"
,
"0"
);
staticMap
.
put
(
"FireCar_GDLatitude"
,
"0"
);
staticMap
.
put
(
"FireCar_GDLatitude"
,
"0"
);
...
@@ -450,6 +453,8 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -450,6 +453,8 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQDQR
.
getTopic
(),
JSONArray
.
toJSON
(
action
).
toString
());
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQDQR
.
getTopic
(),
JSONArray
.
toJSON
(
action
).
toString
());
}
else
{
}
else
{
upAlarmLogStatus
(
action
.
getIotCode
(),
action
.
getEquipmentSpecificIndexKey
(),
equipmentSpecificAlarmLogService
);
upAlarmLogStatus
(
action
.
getIotCode
(),
action
.
getEquipmentSpecificIndexKey
(),
equipmentSpecificAlarmLogService
);
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQYQR
.
getTopic
(),
JSONArray
.
toJSON
(
action
).
toString
());
bool
=
Boolean
.
TRUE
;
}
}
specificAlarmIds
.
add
(
action
.
getId
());
specificAlarmIds
.
add
(
action
.
getId
());
equipIndexIds
.
add
(
action
.
getEquipmentIndexId
());
equipIndexIds
.
add
(
action
.
getEquipmentIndexId
());
...
@@ -496,7 +501,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -496,7 +501,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
iEquipmentSpecificSerivce
.
updateEquipmentSpecIndexRealtimeData
(
equipmentSpecificIndexList
);
iEquipmentSpecificSerivce
.
updateEquipmentSpecIndexRealtimeData
(
equipmentSpecificIndexList
);
//数字换流站站使用
//数字换流站站使用
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQZXDT
.
getTopic
(),
""
);
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQZXDT
.
getTopic
(),
""
);
if
(!
equipmentAlarmLogs
.
isEmpty
())
{
if
(!
equipmentAlarmLogs
.
isEmpty
()
||
bool
)
{
JSONObject
jsonObject
=
new
JSONObject
();
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"seqNo"
,
UUID
.
randomUUID
().
toString
().
replace
(
"-"
,
""
).
toLowerCase
());
jsonObject
.
put
(
"seqNo"
,
UUID
.
randomUUID
().
toString
().
replace
(
"-"
,
""
).
toLowerCase
());
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
ALARM_LOG_INSERT
.
getTopic
(),
jsonObject
.
toString
());
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 @
36967b25
...
@@ -334,8 +334,6 @@ public class StockServiceImpl extends ServiceImpl<StockMapper, Stock> implements
...
@@ -334,8 +334,6 @@ public class StockServiceImpl extends ServiceImpl<StockMapper, Stock> implements
}
}
}
}
//插入模板信息
//插入模板信息
EquipmentDetail
equipmentDetail
=
new
EquipmentDetail
();
EquipmentDetail
equipmentDetail
=
new
EquipmentDetail
();
equipmentDetail
.
setCode
(
equipmentDetailDownloadVOS
.
get
(
i
).
getCode
());
equipmentDetail
.
setCode
(
equipmentDetailDownloadVOS
.
get
(
i
).
getCode
());
...
@@ -349,6 +347,7 @@ public class StockServiceImpl extends ServiceImpl<StockMapper, Stock> implements
...
@@ -349,6 +347,7 @@ public class StockServiceImpl extends ServiceImpl<StockMapper, Stock> implements
equipmentDetail
.
setManufacturerName
(
equipmentDetailDownloadVOS
.
get
(
i
).
getManufacturerName
());
equipmentDetail
.
setManufacturerName
(
equipmentDetailDownloadVOS
.
get
(
i
).
getManufacturerName
());
}
}
equipmentDetail
.
setEquipmentId
(
equipment
.
getId
());
equipmentDetail
.
setEquipmentId
(
equipment
.
getId
());
equipmentDetail
.
setEquipmentName
(
equipment
.
getName
());
equipmentDetail
.
setName
(
equipmentDetailDownloadVOS
.
get
(
i
).
getName
());
equipmentDetail
.
setName
(
equipmentDetailDownloadVOS
.
get
(
i
).
getName
());
equipmentDetail
.
setArea
(
equipmentDetailDownloadVOS
.
get
(
i
).
getDescription
());
equipmentDetail
.
setArea
(
equipmentDetailDownloadVOS
.
get
(
i
).
getDescription
());
...
@@ -359,7 +358,6 @@ public class StockServiceImpl extends ServiceImpl<StockMapper, Stock> implements
...
@@ -359,7 +358,6 @@ public class StockServiceImpl extends ServiceImpl<StockMapper, Stock> implements
equipmentDetail
.
setCompanyName
(
company
[
0
]);
equipmentDetail
.
setCompanyName
(
company
[
0
]);
}
}
equipmentDetailMapper
.
insert
(
equipmentDetail
);
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 @
36967b25
...
@@ -135,6 +135,10 @@ public class AlertCalledController extends BaseController {
...
@@ -135,6 +135,10 @@ public class AlertCalledController extends BaseController {
@Autowired
@Autowired
TzsAuthService
tzsAuthService
;
TzsAuthService
tzsAuthService
;
@Autowired
private
ElevatorServiceImpl
iElevatorService
;
/**
/**
* 新增警情接警填报记录
* 新增警情接警填报记录
*
*
...
@@ -144,10 +148,17 @@ public class AlertCalledController extends BaseController {
...
@@ -144,10 +148,17 @@ public class AlertCalledController extends BaseController {
@PostMapping
(
value
=
"/save"
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增警情接警填报记录"
,
notes
=
"新增警情接警填报记录"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增警情接警填报记录"
,
notes
=
"新增警情接警填报记录"
)
public
ResponseModel
<
AlertCalledDto
>
save
(
@RequestBody
AlertCalledObjsDto
alertCalledObjsDto
)
{
public
ResponseModel
<
AlertCalledDto
>
save
(
@RequestBody
AlertCalledObjsDto
alertCalledObjsDto
)
{
if
(
ValidationUtil
.
isEmpty
(
alertCalledObjsDto
)
if
(
ValidationUtil
.
isEmpty
(
alertCalledObjsDto
))
{
||
ValidationUtil
.
isEmpty
(
alertCalledObjsDto
.
getAlertCalledDto
()))
{
throw
new
BadRequest
(
"参数校验失败."
);
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
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
alertCalledObjsDto
=
iAlertCalledService
.
createAlertCalled
(
alertCalledObjsDto
,
reginParams
.
getUserModel
());
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 @
36967b25
...
@@ -163,7 +163,7 @@ public class ESAlertCalledService {
...
@@ -163,7 +163,7 @@ public class ESAlertCalledService {
AlertStatusEnum
alertStatusEnum
=
AlertStatusEnum
.
getEnum
(
status
);
AlertStatusEnum
alertStatusEnum
=
AlertStatusEnum
.
getEnum
(
status
);
if
(!
ValidationUtil
.
isEmpty
(
alertStatusEnum
))
if
(!
ValidationUtil
.
isEmpty
(
alertStatusEnum
))
{
{
qbstatus
.
should
(
QueryBuilders
.
termQuery
(
"alertStatusStr
.keyword
"
,
alertStatusEnum
.
getCode
()));
qbstatus
.
should
(
QueryBuilders
.
termQuery
(
"alertStatusStr"
,
alertStatusEnum
.
getCode
()));
}
}
}
}
boolMust
.
must
(
qbstatus
);
boolMust
.
must
(
qbstatus
);
...
@@ -247,7 +247,7 @@ public class ESAlertCalledService {
...
@@ -247,7 +247,7 @@ public class ESAlertCalledService {
/**
/**
* 困人救援,故障报修,投诉咨询 条件构造
* 困人救援,故障报修,投诉咨询 条件构造
*/
*/
System
.
out
.
println
(
boolMust
);
// 创建查询构造器
// 创建查询构造器
NativeSearchQueryBuilder
queryBuilder
=
new
NativeSearchQueryBuilder
()
NativeSearchQueryBuilder
queryBuilder
=
new
NativeSearchQueryBuilder
()
// 分页
// 分页
...
...
amos-boot-system-tzs/src/main/resources/application-qa.properties
View file @
36967b25
...
@@ -15,7 +15,7 @@ eureka.instance.status-page-url=http://192.168.0.204:${server.port}${server.serv
...
@@ -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
eureka.instance.metadata-map.management.api-docs
=
http://192.168.0.204:${server.port}${server.servlet.context-path}/swagger-ui.html
## ES properties:
## 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-name
=
elasticsearch
spring.data.elasticsearch.cluster-nodes
=
${biz.elasticsearch.address}:9300
spring.data.elasticsearch.cluster-nodes
=
${biz.elasticsearch.address}:9300
spring.elasticsearch.rest.uris
=
http://${biz.elasticsearch.address}:9200
spring.elasticsearch.rest.uris
=
http://${biz.elasticsearch.address}:9200
...
...
amos-boot-system-tzs/src/main/resources/application.properties
View file @
36967b25
spring.application.name
=
TZS
-kfm
spring.application.name
=
TZS
server.servlet.context-path
=
/tzs
server.servlet.context-path
=
/tzs
server.port
=
11000
server.port
=
11000
spring.profiles.active
=
jd
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