add:新增数字孪生大屏相关接口。
This commit is contained in:
@@ -177,13 +177,11 @@ public class DeviceExtraServiceImpl extends CommonServiceImpl<DeviceExtraMapper,
|
||||
public void create(DeviceExtraDto dto) {
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
String now = DateUtil.now();
|
||||
|
||||
dto.setExtra_id(IdUtil.simpleUUID());
|
||||
dto.setCreate_by(currentUsername);
|
||||
dto.setUpdate_by(currentUsername);
|
||||
dto.setUpdate_time(now);
|
||||
dto.setCreate_time(now);
|
||||
|
||||
DeviceExtra entity = ConvertUtil.convert(dto, DeviceExtra.class);
|
||||
deviceExtraMapper.insert(entity);
|
||||
}
|
||||
|
||||
@@ -958,8 +958,8 @@ public class DeviceServiceImpl extends CommonServiceImpl<DeviceMapper, Device> i
|
||||
celldto.setY(formatNum(i));
|
||||
celldto.setZ(formatNum(j));
|
||||
//celldto.setAddress(Integer.parseInt(CodeUtil.getNewCode("NDCADDRESS_NO")));
|
||||
celldto.setCreate_by("init");
|
||||
celldto.setCreate_time(SecurityUtils.getCurrentUsername());
|
||||
celldto.setCreate_by("admin");
|
||||
celldto.setCreate_time(DateUtil.now());
|
||||
// wo.insert((JSONObject) JSONObject.toJSON(celldto));
|
||||
StorageCell entity = ConvertUtil.convert(celldto, StorageCell.class);
|
||||
storageCellMapper.insert(entity);
|
||||
@@ -982,8 +982,8 @@ public class DeviceServiceImpl extends CommonServiceImpl<DeviceMapper, Device> i
|
||||
celldto.setY("0");
|
||||
celldto.setZ("0");
|
||||
celldto.setAddress(Integer.parseInt(CodeUtil.getNewCode("NDCADDRESS_NO")));
|
||||
celldto.setCreate_by("init");
|
||||
celldto.setCreate_time(SecurityUtils.getCurrentUsername());
|
||||
celldto.setCreate_by("admin");
|
||||
celldto.setCreate_time(DateUtil.now());
|
||||
// wo.insert((JSONObject) JSONObject.toJSON(celldto));
|
||||
StorageCell entity = ConvertUtil.convert(celldto, StorageCell.class);
|
||||
storageCellMapper.insert(entity);
|
||||
@@ -1001,8 +1001,8 @@ public class DeviceServiceImpl extends CommonServiceImpl<DeviceMapper, Device> i
|
||||
celldto.setY("0");
|
||||
celldto.setZ("0");
|
||||
celldto.setAddress(Integer.parseInt(CodeUtil.getNewCode("NDCADDRESS_NO")));
|
||||
celldto.setCreate_by("init");
|
||||
celldto.setCreate_time(SecurityUtils.getCurrentUsername());
|
||||
celldto.setCreate_by("admin");
|
||||
celldto.setCreate_time(DateUtil.now());
|
||||
// wo.insert((JSONObject) JSONObject.toJSON(celldto));
|
||||
StorageCell entity = ConvertUtil.convert(celldto, StorageCell.class);
|
||||
storageCellMapper.insert(entity);
|
||||
@@ -1010,9 +1010,7 @@ public class DeviceServiceImpl extends CommonServiceImpl<DeviceMapper, Device> i
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
deviceAppService.removeDevice(device_code);
|
||||
|
||||
deviceAppService.addDevice(device_code);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,17 @@ public class ItemProtocol {
|
||||
public static String item_pallet_type = "pallet_type";
|
||||
public static String item_to_command = "to_command";
|
||||
|
||||
public static String open_time = "open_time";
|
||||
public static String off_time = "off_time";
|
||||
public static String standby_time1 = "standby_time1";
|
||||
public static String production_time1 = "production_time1";
|
||||
public static String error_time1 = "error_time1";
|
||||
public static String standby_time2 = "standby_time2";
|
||||
public static String production_time2 = "production_time2";
|
||||
public static String error_time2 = "error_time2";
|
||||
|
||||
|
||||
|
||||
private SiteDeviceDriver driver;
|
||||
|
||||
public ItemProtocol(SiteDeviceDriver driver) {
|
||||
@@ -75,20 +86,87 @@ public class ItemProtocol {
|
||||
|
||||
public static List<ItemDto> getReadableItemDtos() {
|
||||
ArrayList list = new ArrayList();
|
||||
list.add(new ItemDto(item_heartbeat, "心跳", "DB600.B0"));
|
||||
list.add(new ItemDto(item_mode, "工作状态", "DB600.B2", Boolean.valueOf(true)));
|
||||
list.add(new ItemDto(item_move, "光电信号", "DB600.B3"));
|
||||
list.add(new ItemDto(item_action, "取放信号", "DB600.B3"));
|
||||
list.add(new ItemDto(item_error, "error", "DB600.B4"));
|
||||
list.add(new ItemDto(item_pallet_type, "托盘类型", "DB600.D6"));
|
||||
list.add(new ItemDto(item_heartbeat, "心跳", "DB6.DBB0"));
|
||||
list.add(new ItemDto(item_mode, "工作状态", "DB6.DBB2", Boolean.valueOf(true)));
|
||||
list.add(new ItemDto(item_move, "光电信号", "DB6.DBB3"));
|
||||
list.add(new ItemDto(item_action, "取放信号", "DB6.DBB4"));
|
||||
list.add(new ItemDto(item_error, "error", "DB6.DBB7"));
|
||||
list.add(new ItemDto(item_pallet_type, "托盘类型", "DB6.DBB6"));
|
||||
return list;
|
||||
}
|
||||
|
||||
public static List<ItemDto> getReadableItemDtos1() {
|
||||
ArrayList list = new ArrayList();
|
||||
list.add(new ItemDto(item_heartbeat, "心跳", "DB6.DBB0"));
|
||||
list.add(new ItemDto(item_mode, "工作状态", "DB6.DBB52", Boolean.valueOf(true)));
|
||||
list.add(new ItemDto(item_move, "光电信号", "DB6.DBB53"));
|
||||
list.add(new ItemDto(item_action, "取放信号", "DB6.DBB54"));
|
||||
list.add(new ItemDto(item_error, "error", "DB6.DBB57"));
|
||||
list.add(new ItemDto(item_pallet_type, "托盘类型", "DB6.DBB56"));
|
||||
return list;
|
||||
}
|
||||
|
||||
public static List<ItemDto> getReadableItemDtos2() {
|
||||
ArrayList list = new ArrayList();
|
||||
list.add(new ItemDto(item_heartbeat, "心跳", "DB6.DBB0"));
|
||||
list.add(new ItemDto(item_mode, "工作状态", "DB6.DBB102", Boolean.valueOf(true)));
|
||||
list.add(new ItemDto(item_move, "光电信号", "DB6.DBB103"));
|
||||
list.add(new ItemDto(item_action, "取放信号", "DB6.DBB104"));
|
||||
list.add(new ItemDto(item_error, "error", "DB6.DBB107"));
|
||||
list.add(new ItemDto(item_pallet_type, "托盘类型", "DB6.DBB106"));
|
||||
return list;
|
||||
}
|
||||
|
||||
public static List<ItemDto> getReadableItemDtos3() {
|
||||
ArrayList list = new ArrayList();
|
||||
list.add(new ItemDto(item_heartbeat, "心跳", "DB6.DBB0"));
|
||||
list.add(new ItemDto(item_mode, "工作状态", "DB6.DBB152", Boolean.valueOf(true)));
|
||||
list.add(new ItemDto(item_move, "光电信号", "DB6.DBB153"));
|
||||
list.add(new ItemDto(item_action, "取放信号", "DB6.DBB154"));
|
||||
list.add(new ItemDto(item_error, "error", "DB6.DBB157"));
|
||||
list.add(new ItemDto(item_pallet_type, "托盘类型", "DB6.DBB156"));
|
||||
return list;
|
||||
}
|
||||
|
||||
public static List<ItemDto> getReadableItemDtos4() {
|
||||
ArrayList list = new ArrayList();
|
||||
list.add(new ItemDto(open_time, "开机上报 ", "DB6.DTL770"));
|
||||
list.add(new ItemDto(off_time, "关机上报", "DB6.DTL782"));
|
||||
list.add(new ItemDto(standby_time1, "当前待机时间1", "DB6.DBD794"));
|
||||
list.add(new ItemDto(production_time1, "当前生产时间1", "DB6.DBD798"));
|
||||
list.add(new ItemDto(error_time1, "当前故障时间1", "DB6.DBD802"));
|
||||
list.add(new ItemDto(standby_time2, "当前待机时间2", "DB6.DBD806"));
|
||||
list.add(new ItemDto(production_time2, "当前生产时间2", "DB6.DBD810"));
|
||||
list.add(new ItemDto(error_time2, "当前故障时间2", "DB6.DBD814"));
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public static List<ItemDto> getWriteableItemDtos() {
|
||||
ArrayList list = new ArrayList();
|
||||
list.add(new ItemDto(item_to_command, "作业命令", "DB601.W2", Boolean.valueOf(true)));
|
||||
list.add(new ItemDto(item_to_command, "作业命令", "DB7.DBW2", Boolean.valueOf(true)));
|
||||
return list;
|
||||
}
|
||||
|
||||
public static List<ItemDto> getWriteableItemDtos1() {
|
||||
ArrayList list = new ArrayList();
|
||||
list.add(new ItemDto(item_to_command, "作业命令", "DB7.DBW52", Boolean.valueOf(true)));
|
||||
return list;
|
||||
}
|
||||
|
||||
public static List<ItemDto> getWriteableItemDtos2() {
|
||||
ArrayList list = new ArrayList();
|
||||
list.add(new ItemDto(item_to_command, "作业命令", "DB7.DBW102", Boolean.valueOf(true)));
|
||||
return list;
|
||||
}
|
||||
public static List<ItemDto> getWriteableItemDtos3() {
|
||||
ArrayList list = new ArrayList();
|
||||
list.add(new ItemDto(item_to_command, "作业命令", "DB7.DBW152", Boolean.valueOf(true)));
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -54,9 +54,45 @@ public class SiteDefination implements OpcDeviceDriverDefination {
|
||||
return ItemProtocol.getReadableItemDtos();
|
||||
}
|
||||
|
||||
|
||||
public List<ItemDto> getReadableItemDtos1() {
|
||||
return ItemProtocol.getReadableItemDtos1();
|
||||
}
|
||||
|
||||
public List<ItemDto> getReadableItemDtos2() {
|
||||
return ItemProtocol.getReadableItemDtos2();
|
||||
}
|
||||
|
||||
public List<ItemDto> getReadableItemDtos3() {
|
||||
return ItemProtocol.getReadableItemDtos3();
|
||||
}
|
||||
|
||||
public List<ItemDto> getReadableItemDtos4() {
|
||||
return ItemProtocol.getReadableItemDtos4();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public List<ItemDto> getWriteableItemDtos() {
|
||||
return ItemProtocol.getWriteableItemDtos();
|
||||
}
|
||||
|
||||
|
||||
public List<ItemDto> getWriteableItemDtos1() {
|
||||
return ItemProtocol.getWriteableItemDtos1();
|
||||
}
|
||||
|
||||
|
||||
public List<ItemDto> getWriteableItemDtos2() {
|
||||
return ItemProtocol.getWriteableItemDtos2();
|
||||
}
|
||||
|
||||
|
||||
public List<ItemDto> getWriteableItemDtos3() {
|
||||
return ItemProtocol.getWriteableItemDtos3();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -7,8 +7,8 @@ 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:tn_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
username: ${DB_USER:root}
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:xftn_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
username: ${DB_USER:generallu}
|
||||
# password: ${DB_PWD:Root.123456}
|
||||
password: ${DB_PWD:123456}
|
||||
# 初始连接数
|
||||
|
||||
Reference in New Issue
Block a user