screen-api
增加设备时维护组织型号关系表
| | |
| | | |
| | | // 数据源配置 |
| | | DataSourceConfig dsc = new DataSourceConfig(); |
| | | dsc.setUrl("jdbc:mysql://vp9l57dtd2vng7oxft1t.rwlb.rds.aliyuncs.com:3306/moral?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=UTC"); |
| | | dsc.setUrl("jdbc:mysql://rm-bp1pr3rx9m3fnkwsk8o.mysql.rds.aliyuncs.com:3306/moral?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai"); |
| | | dsc.setDriverName("com.mysql.cj.jdbc.Driver"); |
| | | dsc.setUsername("root"); |
| | | dsc.setPassword("moral_123456"); |
| | |
| | | <version>${spring.kafka.version}</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-websocket</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.apache.kafka</groupId> |
| | | <artifactId>kafka-clients</artifactId> |
| | | <version>${spring.kafka.version}</version> |
| | |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | import java.util.concurrent.CopyOnWriteArraySet; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 因子code |
| | | */ |
| | | private Integer sensorCode; |
| | | private String sensorCode; |
| | | |
| | | /** |
| | | * 因子接收的单位 |
| | |
| | | OrganizationUnitAlarm organizationUnitAlarm = new OrganizationUnitAlarm(); |
| | | organizationUnitAlarm.setOrganizationId(orgId); |
| | | organizationUnitAlarm.setVersionId(device.getDeviceVersionId()); |
| | | |
| | | organizationUnitAlarm.setSensorCode(versionSensorUnit.getSensorCode()); |
| | | organizationUnitAlarm.setUnitKey(versionSensorUnit.getUnitKey()); |
| | | organizationUnitAlarmMapper.insert(organizationUnitAlarm); |
| | | } |
| | | } |
| | | } |