多语言优化

This commit is contained in:
zhangzhicheng 2024-08-22 16:13:33 +08:00
parent 3f10dbc869
commit 089216bf58
3 changed files with 7 additions and 3 deletions

View File

@ -271,17 +271,17 @@ public class EqEquipmentServiceImpl implements IEqEquipmentService {
//根据设备名称地址查询设备id设备code
DeviceByDeviceName deviceByNameDto = iotService.apiTenantDevicesByName(equipmentCode);//无信息会抛异常 无需判断
if (deviceByNameDto==null) throw new RuntimeException("设备不存在");
if (deviceByNameDto==null) throw new RuntimeException(MessageUtils.message("iot.device.notFound"));
String equipmentName = equipmentCode;//暂时不存设备名称 下面从其他接口获取并存入了
equipmentCode = deviceByNameDto.getId().getId();
LambdaQueryWrapper<EqEquipment> lqw = Wrappers.lambdaQuery();
lqw.eq( EqEquipment::getEquipmentCode,equipmentCode);
EqEquipmentVo eqEquipmentVo = baseMapper.selectVoOne(lqw);
if (eqEquipmentVo!=null) throw new RuntimeException("设备已绑定");
if (eqEquipmentVo!=null) throw new RuntimeException(MessageUtils.message("message.fault.device.isbind"));
DeviceServerMsgDto deviceServerMsgDto = iotService.httpServerGetSend(equipmentCode);
if (!deviceServerMsgDto.getLineStatus()) throw new RuntimeException("设备未连接 无法绑定");
if (!deviceServerMsgDto.getLineStatus()) throw new RuntimeException(MessageUtils.message("message.fault.device.offline"));

View File

@ -259,3 +259,5 @@ runStatus.name14=deviceException
message.fault.device.notfound = Device not found
message.fault.device.isbind = Device is offline
message.fault.device.offline = Device is offline

View File

@ -100,6 +100,8 @@ logStatus.name113=半开门运行提醒
logStatus.name114=门体停止运行提醒
message.fault.device.notfound = 设备不存在
message.fault.device.isbind = 设备已绑定
message.fault.device.offline = 设备未连接 无法绑定
#====== app =========