Commit c347cd33 authored by 赵啸非's avatar 赵啸非

添加启动日志

parent 9c008e78
...@@ -355,10 +355,17 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D ...@@ -355,10 +355,17 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
entity.setDeviceMac(StrUtil.replace(entity.getDeviceMac(), ":", "-")); entity.setDeviceMac(StrUtil.replace(entity.getDeviceMac(), ":", "-"));
} }
//产品编码唯一 //设备编码唯一
DeviceEntity deviceEntity = this.selectOne(new DeviceQuery().deviceCode(entity.getDeviceCode())); DeviceEntity deviceEntity = this.selectOne(new DeviceQuery().deviceCode(entity.getDeviceCode()));
if (!ObjectUtils.isEmpty(deviceEntity)) { if (!ObjectUtils.isEmpty(deviceEntity)) {
throw new AppException("设备编码重复!"); //如果原始的域当前的站点不一致,做更新处理,否则提示编码重复
if (!ObjectUtils.isEmpty(entity.getSiteId())&&entity.getSiteId() != deviceEntity.getSiteId()) {
entity.setId(deviceEntity.getId());
entity.setUpdateTime(new Date());
entity.setUpdateUserId(getContextUserId(context));
} else {
throw new AppException("设备编码重复!");
}
} }
if (!ObjectUtils.isEmpty(entity.getProductId())) { if (!ObjectUtils.isEmpty(entity.getProductId())) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment