合肥位置汇聚

ds-hefei
luyya 2026-03-03 18:37:46 +08:00
parent d667538721
commit 8b41028448
8 changed files with 36 additions and 57 deletions

View File

@ -68,7 +68,7 @@ public class ElasticsearchConfig {
RestClientBuilder builder = RestClient.builder(httpHost);
// 设置用户名、密码
CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(userName, password));
// credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(userName, password));
// 连接延时配置
builder.setRequestConfigCallback(requestConfigBuilder -> {
requestConfigBuilder.setConnectTimeout(connectTimeOut);

View File

@ -252,7 +252,7 @@ public class LocationController {
if (null != params.get("deviceType")){
device.setDeviceType(params.get("deviceType").toString());
}
if (null != params.get("zzjgdm") && !"341600000000".equals(params.get("zzjgdm").toString())){
if (null != params.get("zzjgdm") && !"340100000000".equals(params.get("zzjgdm").toString())){
String[] zzjgdms = params.get("zzjgdm").toString().split(",");
device.setZzjgdms(zzjgdms);
}

View File

@ -1,49 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="60 seconds" debug="false">
<!-- 日志存放路径 -->
<property name="log.path" value="logs" />
<property name="log.file" value="location" />
<property name="MAX_FILE_SIZE" value="10MB" />
<property name="MAX_HISTORY" value="30" />
<property name="log.path" value="logs/${project.artifactId}" />
<!-- 日志输出格式 -->
<!-- INFO日志Appender -->
<appender name="FILE_INFO" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/info.${log.file}.log</file>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>INFO</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${log.path}/info/info.${log.file}.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
<maxFileSize>${MAX_FILE_SIZE}</maxFileSize>
<maxHistory>${MAX_HISTORY}</maxHistory>
</rollingPolicy>
<property name="console.log.pattern"
value="%red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}%n) - %msg%n"/>
<!-- 控制台输出 -->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
<pattern>${console.log.pattern}</pattern>
<charset>utf-8</charset>
</encoder>
</appender>
<!-- ERROR日志Appender -->
<appender name="FILE_ERROR" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/error.${log.file}.log</file>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>ERROR</level>
</filter>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${log.path}/error/error.${log.file}.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
<maxFileSize>${MAX_FILE_SIZE}</maxFileSize>
<maxHistory>${MAX_HISTORY}</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<include resource="logback-common.xml" />
<!-- 根Logger配置禁用控制台输出 -->
<root level="INFO">
<appender-ref ref="FILE_INFO" />
<appender-ref ref="FILE_ERROR" />
<include resource="logback-logstash.xml" />
<!-- 开启 skywalking 日志收集 -->
<include resource="logback-skylog.xml" />
<!--系统操作日志-->
<root level="info">
<appender-ref ref="console" />
</root>
</configuration>

View File

@ -46,7 +46,7 @@ public class JzDeptSchedule {
}}*/
public void jzDept(){
JSONObject para = new JSONObject();
para.put("orgId","34160000000");
para.put("orgId","34010000000");
para.put("page","1");
para.put("limit","2000");
String result = HttpUtil.post("http://53.1.230.5:8159/api/UUDB/org/list", para.toString());
@ -106,7 +106,7 @@ public class JzDeptSchedule {
@Scheduled(cron = "0 0 0/1 * * ?")
// @Scheduled(cron = "0 0 0/1 * * ?")
public void jzDeptNew(){
Date time = DateUtil.offsetHour(new Date(),-1);
List<SysDeptVo> list = deptService.jzDpet(DateUtil.formatDateTime(time));

View File

@ -370,7 +370,7 @@ public class SysDeptServiceImpl implements ISysDeptService {
@Override
public List<SysDeptVo> deviceStatics(String deviceType,String manageDeptId) {
if(!manageDeptId.equals("341600000000")){
if(!manageDeptId.equals("340100000000")){
String subManageId = manageDeptId.substring(0,findLastNonZeroIndex(manageDeptId) + 1);
return baseMapper.deviceStaticsByDeptId(deviceType,subManageId);

View File

@ -70,7 +70,7 @@
</if>
group by SUBSTRING(zzjgdm,1,8)) a
on SUBSTRING(d.dept_id,1,8) = SUBSTRING(a.zzjgdm,1,8)
where `status` = '0' and del_flag =0 and is_visible = '1' and parent_id = '341600000000' and dept_id like '341600%'
where `status` = '0' and del_flag =0 and is_visible = '1' and parent_id = '340100000000' and dept_id like '340100%'
union
@ -92,7 +92,7 @@
</if>
group by SUBSTRING(zzjgdm,1,6)) a
on SUBSTRING(d.dept_id,1,6) = SUBSTRING(a.zzjgdm,1,6)
where `status` = '0' and del_flag =0 and is_visible = '1' and parent_id = '341600000000' and dept_id not like '341600%'
where `status` = '0' and del_flag =0 and is_visible = '1' and parent_id = '340100000000' and dept_id not like '340100%'
union
<!--派出所等三级四级机构-->
@ -113,7 +113,7 @@
</if>
group by SUBSTRING(zzjgdm,1,8)) a
on SUBSTRING(d.dept_id,1,8) = SUBSTRING(a.zzjgdm,1,8)
where `status` = '0' and del_flag =0 and is_visible = '1' and parent_id != '341600000000' and parent_id != '0' and dept_id like '%0000'
where `status` = '0' and del_flag =0 and is_visible = '1' and parent_id != '340100000000' and parent_id != '0' and dept_id like '%0000'
<!--大队等三级四级机构-->
UNION
select dept_id as deptId,short_name as deptName,parent_id as parentId,IFNULL(onlineCount,0) as onlineCount,IFNULL(allCount,0) as allCount from sys_dept d
@ -133,7 +133,7 @@
</if>
group by SUBSTRING(zzjgdm,1,10)) a
on SUBSTRING(d.dept_id,1,10) = SUBSTRING(a.zzjgdm,1,10)
where `status` = '0' and del_flag =0 and is_visible = '1' and parent_id != '341600000000' and parent_id != '0' and dept_id not like '%0000' and dept_id like '%00'
where `status` = '0' and del_flag =0 and is_visible = '1' and parent_id != '340100000000' and parent_id != '0' and dept_id not like '%0000' and dept_id like '%00'
union
<!--四级机构-->
@ -175,7 +175,7 @@
LEFT JOIN
(select substring(zzjgdm,1,8) as zzjgdm ,count(*) as allCount from t_device where device_type = #{deviceType} and valid =1 group by SUBSTRING(zzjgdm,1,8)) a
on SUBSTRING(d.dept_id,1,8) = SUBSTRING(a.zzjgdm,1,8)
where `status` = '0' and del_flag =0 and is_visible = '1' and parent_id = '341600000000' and dept_id like '341600%'
where `status` = '0' and del_flag =0 and is_visible = '1' and parent_id = '340100000000' and dept_id like '340100%'
union
@ -187,7 +187,7 @@
LEFT JOIN
(select substring(zzjgdm,1,6) as zzjgdm ,count(*) as allCount from t_device where device_type = #{deviceType} and valid =1 group by SUBSTRING(zzjgdm,1,6)) a
on SUBSTRING(d.dept_id,1,6) = SUBSTRING(a.zzjgdm,1,6)
where `status` = '0' and del_flag =0 and is_visible = '1' and parent_id = '341600000000' and dept_id not like '341600%'
where `status` = '0' and del_flag =0 and is_visible = '1' and parent_id = '340100000000' and dept_id not like '340100%'
union
<!--派出所等三级四级机构-->
@ -198,7 +198,7 @@
LEFT JOIN
(select substring(zzjgdm,1,8) as zzjgdm ,count(*) as allCount from t_device where device_type = #{deviceType} and valid = 1 group by SUBSTRING(zzjgdm,1,8)) a
on SUBSTRING(d.dept_id,1,8) = SUBSTRING(a.zzjgdm,1,8)
where `status` = '0' and del_flag =0 and is_visible = '1' and parent_id != '341600000000' and parent_id != '0' and dept_id like '%0000'
where `status` = '0' and del_flag =0 and is_visible = '1' and parent_id != '340100000000' and parent_id != '0' and dept_id like '%0000'
<!--大队等三级四级机构-->
UNION
select dept_id as deptId,short_name as deptName,parent_id as parentId,IFNULL(onlineCount,0) as onlineCount,IFNULL(allCount,0) as allCount from sys_dept d
@ -208,7 +208,7 @@
LEFT JOIN
(select substring(zzjgdm,1,10) as zzjgdm ,count(*) as allCount from t_device where device_type = #{deviceType} and valid = 1 group by SUBSTRING(zzjgdm,1,10)) a
on SUBSTRING(d.dept_id,1,10) = SUBSTRING(a.zzjgdm,1,10)
where `status` = '0' and del_flag =0 and is_visible = '1' and parent_id != '341600000000' and parent_id != '0' and dept_id not like '%0000' and dept_id like '%00'
where `status` = '0' and del_flag =0 and is_visible = '1' and parent_id != '340100000000' and parent_id != '0' and dept_id not like '%0000' and dept_id like '%00'
union
<!--四级机构-->
@ -231,7 +231,7 @@
<select id="jzDept" resultMap="SysDeptResult">
select dept_id,parent_id,ancestors,dept_name,short_name,order_num,status from sys_dept
where ancestors like '%341600000000%'
where ancestors like '%340100000000%'
<if test="updateTime != null and '' != updateTime ">
and update_time >= #{updateTime}
</if>

View File

@ -85,7 +85,7 @@ public class DeviceSchedule {
Timestamp updateTime = originDevice.getUpdateTime();
// DateTime dateTime = DateUtil.offsetHour(updateTime, 13);
newDevice.setUpdateTime(DateUtil.formatDateTime(updateTime) );
newDevice.setZzjgdm("341600000000");
newDevice.setZzjgdm("340100000000");
newDevice.setZzjgmc("亳州市公安局");
// setZzjgdm(newDevice,originDevice);

View File

@ -40,11 +40,11 @@ spring.sql.init.platform=mysql
db.num=1
### Connect URL of DB:
#db.url.0=jdbc:mysql://127.0.0.1:3306/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
db.url.0=jdbc:mysql://53.248.2.141:3306/wzhj-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
db.url.0=jdbc:mysql://127.0.0.1:3306/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
#db.url.0=jdbc:mysql://53.248.2.141:3306/wzhj-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
db.user.0=root
#db.password.0=root
db.password.0=Ycgi!2509
db.password.0=root
#db.password.0=Ycgi!2509
### the maximum retry times for push
nacos.config.push.maxRetryTime=50