Commit a761a92beee1de8972ffe44367e19baf7686ba32
Merge branch 'master_dev0306' into 'master'
Master dev0306 See merge request yunteng/thingskit!360
Showing
2 changed files
with
3 additions
and
3 deletions
@@ -1102,12 +1102,14 @@ public class DeviceController extends BaseController { | @@ -1102,12 +1102,14 @@ public class DeviceController extends BaseController { | ||
1102 | importedDeviceInfo.getEntity().setAdditionalInfo(objectNode); | 1102 | importedDeviceInfo.getEntity().setAdditionalInfo(objectNode); |
1103 | } | 1103 | } |
1104 | importedDeviceInfo.getEntity().setDeviceProfileId(new DeviceProfileId(UUID.fromString(tbDeviceProfileId))); | 1104 | importedDeviceInfo.getEntity().setDeviceProfileId(new DeviceProfileId(UUID.fromString(tbDeviceProfileId))); |
1105 | + Device device = importedDeviceInfo.getEntity(); | ||
1106 | + deviceService.saveDevice(device,false); | ||
1105 | onDeviceCreatedOrUpdated( | 1107 | onDeviceCreatedOrUpdated( |
1106 | importedDeviceInfo.getEntity(), | 1108 | importedDeviceInfo.getEntity(), |
1107 | importedDeviceInfo.getOldEntity(), | 1109 | importedDeviceInfo.getOldEntity(), |
1108 | importedDeviceInfo.isUpdated(), | 1110 | importedDeviceInfo.isUpdated(), |
1109 | user); | 1111 | user); |
1110 | - Device device = importedDeviceInfo.getEntity(); | 1112 | + |
1111 | String tenantId = user.getCurrentTenantId(); | 1113 | String tenantId = user.getCurrentTenantId(); |
1112 | if (Objects.equals(deviceTypeEnum, DeviceTypeEnum.SENSOR) | 1114 | if (Objects.equals(deviceTypeEnum, DeviceTypeEnum.SENSOR) |
1113 | && StringUtils.isNotEmpty(gateWayTbDeviceId)) { | 1115 | && StringUtils.isNotEmpty(gateWayTbDeviceId)) { |
@@ -131,8 +131,6 @@ | @@ -131,8 +131,6 @@ | ||
131 | AND ( | 131 | AND ( |
132 | ifd.name LIKE concat('%',#{queryMap.name}::TEXT,'%') | 132 | ifd.name LIKE concat('%',#{queryMap.name}::TEXT,'%') |
133 | or | 133 | or |
134 | - ifd.sn LIKE concat('%',#{queryMap.name}::TEXT,'%') | ||
135 | - or | ||
136 | ifd.alias LIKE concat('%',#{queryMap.name}::TEXT,'%') | 134 | ifd.alias LIKE concat('%',#{queryMap.name}::TEXT,'%') |
137 | ) | 135 | ) |
138 | </if> | 136 | </if> |