opt:优化数字孪生大屏相关接口。
This commit is contained in:
@@ -7,7 +7,7 @@ spring:
|
||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:stand_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3307}/${DB_NAME:acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
username: ${DB_USER:root}
|
||||
# password: ${DB_PWD:Root.123456}
|
||||
password: ${DB_PWD:123456}
|
||||
@@ -72,8 +72,7 @@ spring:
|
||||
redis:
|
||||
#数据库索引
|
||||
database: ${REDIS_DB:2}
|
||||
host: ${REDIS_HOST:10.44.101.19}
|
||||
# host: ${REDIS_HOST:127.0.0.1}
|
||||
host: ${REDIS_HOST:127.0.0.1}
|
||||
port: ${REDIS_PORT:6379}
|
||||
# password: ${REDIS_PWD:}
|
||||
|
||||
@@ -172,7 +171,7 @@ sa-token:
|
||||
# Redis数据库索引(默认为0)
|
||||
database: 2
|
||||
# Redis服务器地址
|
||||
host: 10.44.101.19
|
||||
host: 127.0.0.1
|
||||
# Redis服务器连接端口
|
||||
port: 6379
|
||||
# Redis服务器连接密码(默认为空)
|
||||
|
||||
@@ -2,7 +2,7 @@ spring:
|
||||
freemarker:
|
||||
check-template-location: false
|
||||
profiles:
|
||||
active: prod
|
||||
active: dev
|
||||
jackson:
|
||||
time-zone: GMT+8
|
||||
data:
|
||||
@@ -90,6 +90,6 @@ mybatis-plus:
|
||||
id-type: INPUT
|
||||
lucene:
|
||||
index:
|
||||
path: D:\lucene\index
|
||||
path: C:\lucene\index
|
||||
tlog:
|
||||
enable-invoke-time-print: true
|
||||
@@ -143,7 +143,7 @@ public class CockpitServiceImpl implements CockpitService {
|
||||
item.put("region_name", "GHS");
|
||||
item.put("total_qty", "0");
|
||||
item.put("date", today.minusDays(i).format(formatter));
|
||||
tb_real_qty.add(item);
|
||||
gh_real_qty.add(item);
|
||||
}
|
||||
}
|
||||
//设备运行状态
|
||||
@@ -394,6 +394,9 @@ public class CockpitServiceImpl implements CockpitService {
|
||||
public JSONObject equipmentInfo(String deviceCode) {
|
||||
JSONObject res = new JSONObject();
|
||||
SchBasePoint point = pointService.getById(deviceCode);
|
||||
if (point == null) {
|
||||
throw new BadRequestException("该设备不存在");
|
||||
}
|
||||
List<SchBasePoint> points;
|
||||
switch (point.getRegion_code()) {
|
||||
case RegionCodeConstant.COATED_PLATE_LINE_AREA:
|
||||
@@ -403,9 +406,11 @@ public class CockpitServiceImpl implements CockpitService {
|
||||
res.put("device_code", deviceCode);
|
||||
res.put("device_name", point.getPoint_name());
|
||||
//当前物料
|
||||
JSONObject getDeviceWorker=cockpitMapper.getDeviceWorker(deviceCode);
|
||||
String material=cockpitMapper.getMaterialName(getDeviceWorker.getString("material_id"));
|
||||
res.put("material", material);
|
||||
JSONObject getDeviceWorker = cockpitMapper.getDeviceWorker(deviceCode);
|
||||
if (getDeviceWorker != null) {
|
||||
String material = cockpitMapper.getMaterialName(getDeviceWorker.getString("material_id"));
|
||||
res.put("material", material);
|
||||
}
|
||||
for (Object object : baoshijian) {
|
||||
JSONObject jsonObject = (JSONObject) object;
|
||||
if (deviceCode.equals(jsonObject.getString("device_code"))) {
|
||||
|
||||
@@ -490,8 +490,17 @@ GROUP BY
|
||||
|
||||
<select id="faultAlarm" resultType="java.util.HashMap">
|
||||
SELECT
|
||||
CASE
|
||||
d.failure_info
|
||||
WHEN '1024' THEN
|
||||
'过载'
|
||||
WHEN '1' THEN
|
||||
'网络超时'
|
||||
WHEN '512' THEN
|
||||
'信号丢失'
|
||||
ELSE ''
|
||||
END AS fault_cause,
|
||||
d.device_code AS device_name,
|
||||
d.failure_info AS fault_cause,
|
||||
d.failure_time AS alarm_time
|
||||
FROM
|
||||
das_device_fault d
|
||||
|
||||
@@ -54,8 +54,8 @@ spring:
|
||||
multi-statement-allow: true
|
||||
redis:
|
||||
#数据库索引
|
||||
database: ${REDIS_DB:5}
|
||||
host: ${REDIS_HOST:10.44.101.19}
|
||||
database: ${REDIS_DB:2}
|
||||
host: ${REDIS_HOST:127.0.0.1}
|
||||
port: ${REDIS_PORT:6379}
|
||||
password: ${REDIS_PWD:}
|
||||
|
||||
@@ -152,9 +152,9 @@ sa-token:
|
||||
token-session-check-login: false
|
||||
alone-redis:
|
||||
# Redis数据库索引(默认为0)
|
||||
database: 5
|
||||
database: 2
|
||||
# Redis服务器地址
|
||||
host: 10.44.101.19
|
||||
host: 127.0.0.1
|
||||
# Redis服务器连接端口
|
||||
port: 6379
|
||||
# Redis服务器连接密码(默认为空)
|
||||
|
||||
@@ -112,6 +112,6 @@ mybatis-plus:
|
||||
id-type: INPUT
|
||||
lucene:
|
||||
index:
|
||||
path: D:\lucene\index
|
||||
path: C:\lucene\index
|
||||
tlog:
|
||||
enable-invoke-time-print: true
|
||||
Reference in New Issue
Block a user