Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hzjtpushwebsocket
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
gszd
hzjtpushwebsocket
Commits
66c1a088
Commit
66c1a088
authored
May 26, 2021
by
wangjinjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加推送每2分钟推送设备功能
parent
0f52ca5c
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
46 additions
and
104 deletions
+46
-104
src/main/java/com/hzjt/config/ScheduleTaskConfig.java
src/main/java/com/hzjt/config/ScheduleTaskConfig.java
+1
-1
src/main/java/com/hzjt/controller/TraffdevicewriteresultController.java
...com/hzjt/controller/TraffdevicewriteresultController.java
+2
-4
src/main/java/com/hzjt/domain/SbtdspsrParams.java
src/main/java/com/hzjt/domain/SbtdspsrParams.java
+0
-26
src/main/java/com/hzjt/service/TraffdevicewriteresultService.java
.../java/com/hzjt/service/TraffdevicewriteresultService.java
+34
-34
src/main/resources/application.properties
src/main/resources/application.properties
+8
-38
src/main/resources/mapper/TraffFlow.xml
src/main/resources/mapper/TraffFlow.xml
+1
-1
No files found.
src/main/java/com/hzjt/config/ScheduleTaskConfig.java
View file @
66c1a088
...
...
@@ -60,7 +60,7 @@ public class ScheduleTaskConfig {
}
//
@Scheduled(cron = "0 */2 * * * ?")//每2分钟执行一次
@Scheduled
(
cron
=
"0 */2 * * * ?"
)
//每2分钟执行一次
private
void
sendToguangda
()
{
//查询所有未推送的数据
List
<
Traffalarmrecord
>
resultlist
=
traffalarmrecordService
.
getTraffalarmrecordBystatus
();
...
...
src/main/java/com/hzjt/controller/TraffdevicewriteresultController.java
View file @
66c1a088
...
...
@@ -6,7 +6,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletResponse
;
import
java.lang.reflect.Array
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
...
...
@@ -18,12 +17,11 @@ public class TraffdevicewriteresultController {
private
TraffdevicewriteresultService
traffdevicewriteresultService
;
/**
*
*
豸Ϣ
/**
*
发送设备指纹指令
* @param xhs
* @return
*/
@PostMapping
(
"/sendDevices"
)
public
List
<
ResultObj
>
sendDevices
(
@RequestParam
(
"xhs"
)
String
xhs
){
...
...
src/main/java/com/hzjt/domain/SbtdspsrParams.java
View file @
66c1a088
...
...
@@ -8,40 +8,14 @@ import java.util.Date;
@Getter
@Setter
public
class
SbtdspsrParams
extends
Sbtdspsr
{
/**
* 创建时间
*/
private
Date
createtime
;
/**
* 推送状态(0成功1失败)
*/
private
Long
pushstatus
;
/**
* 推送描述
*/
private
String
pushdesc
;
/**
* 推送次数
*/
private
Long
pushcount
;
/**
* 行政编号
*/
private
String
xzbh
;
/**
* 备注
*/
private
String
remark
;
/**
* 行政名称
*/
private
String
xztreename
;
private
String
deviceconfig
;
...
...
src/main/java/com/hzjt/service/TraffdevicewriteresultService.java
View file @
66c1a088
This diff is collapsed.
Click to expand it.
src/main/resources/application.properties
View file @
66c1a088
...
...
@@ -15,71 +15,41 @@ mybatis.configuration.default-statement-timeout=3000
#mybatis.mapperLocations = classpath:xxx.xml
#logging.level.com.hzjt=debug
## �������ݿ�-����Դ����
#spring.datasource.url=jdbc:dm://127.0.0.1:12345/auditlocal_cq
#spring.datasource.driver-class-name=dm.jdbc.driver.DmDriver
#spring.datasource.username=SYSDBA
#spring.datasource.password=SYSDBA
##���ӳ�����
#spring.datasource.type=org.apache.commons.dbcp.BasicDataSource
#spring.datasource.dbcp2.max-wait-millis=10000
#spring.datasource.dbcp2.min-idle=5
#spring.datasource.dbcp2.initial-size=5
#spring.datasoe.dbcp2.validation-query=SELECT x
#spring.datasource.dbcp2.connection-properties=characterEncoding=utf8
# Mysql���ݿ�-����Դ����
spring.datasource.username
=
test
spring.datasource.password
=
test
spring.datasource.url
=
jdbc:oracle:thin:@192.168.168.212:1523:helowin
#spring.datasource.username=hzjt
#spring.datasource.password=hzjt
#spring.datasource.url=jdbc:oracle:thin:@33.50.1.22:1521:orcl
#spring.datasource.username=test
#spring.datasource.password=test
#spring.datasource.url=jdbc:oracle:thin:@192.168.168.212:1523:helowin
spring.datasource.username
=
hzjt
spring.datasource.password
=
hzjt
spring.datasource.url
=
jdbc:oracle:thin:@33.50.1.22:1521:orcl
spring.datasource.driverClassName
=
oracle.jdbc.OracleDriver
# druid
spring.datasource.type
=
com.alibaba.druid.pool.DruidDataSource
# ��ʼ����С����С�����
spring.datasource.initialSize
=
5
spring.datasource.minIdle
=
5
spring.datasource.maxActive
=
20
# ���û�ȡ���ӵȴ���ʱ��ʱ��
spring.datasource.maxWait
=
60000
# ���ü����òŽ���һ�μ�⣬�����Ҫ�رյĿ������ӣ���λ�Ǻ���
spring.datasource.timeBetweenEvictionRunsMillis
=
60000
spring.datasource.minEvictableIdleTimeMillis
=
300000
spring.datasource.testWhileIdle
=
true
spring.datasource.testOnBorrow
=
false
spring.datasource.testOnReturn
=
false
# ��PSCache������ָ��ÿ��������PSCache�Ĵ�С
spring.datasource.poolPreparedStatements
=
true
spring.datasource.maxPoolPreparedStatementPerConnectionSize
=
20
# ���ü��ͳ�����ص�filters��ȥ�����ؽ���sql��ͳ�ƣ�'wall'���ڷ���ǽ
spring.datasource.filters
=
stat,wall
# ͨ��connectProperties��������mergeSql���ܣ���SQL��¼
spring.datasource.connectionProperties
=
druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
# �ϲ����DruidDataSource�ļ������
spring.datasource.useGlobalDataSourceStat
=
true
#redis
# Redis��������ַ
spring.redis.host
=
127.0.0.1
# Redis���������Ӷ˿�
spring.redis.port
=
6379
# Redis�������������루Ĭ��Ϊ�գ�
#spring.redis.password=123456
# Redis���ݿ�������Ĭ��Ϊ0��
spring.redis.database
=
0
# ���ӳ������������ʹ�ø�ֵ��ʾû�����ƣ�
spring.redis.pool.max-active
=
8
# ���ӳ���������ȴ�ʱ�䣨ʹ�ø�ֵ��ʾû�����ƣ�
spring.redis.pool.max-wait
=
5000
# ���ӳ��е�����������
spring.redis.pool.max-idle
=
8
# ���ӳ��е���С��������
spring.redis.pool.min-idle
=
0
# ���ӳ�ʱʱ�䣨���룩
spring.redis.timeout
=
2000
#spring-session ʹ��
spring.session.store-type
=
none
ip.host
=
33.57.1.22
port
=
21
...
...
@@ -90,7 +60,7 @@ ftp.host=33.50.1.22:21:reader:reader
alarm.subscribe.data.key
=
gs:traff:alarmlist
#
免审标记 0需审核 1免审
#
\u514D\u5BA1\u6807\u8BB0 0\u9700\u5BA1\u6838 1\u514D\u5BA1
alarmrecord.check.enable
=
1
#spring.profiles.path= D:/imp/config/im/hzjt.properties
...
...
src/main/resources/mapper/TraffFlow.xml
View file @
66c1a088
...
...
@@ -4,7 +4,7 @@
<insert
id=
"insertlist"
parameterType=
"com.hzjt.domain.Vehicle"
>
INSERT INTO
vehicle (video_id, type,
insert into
vehicle (video_id, type,
direction,classification_confidence,ruletag,create_time)
values(
#{video_id,jdbcType=VARCHAR},
...
...
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