Merge branch 'main' of https://git.jsspisoft.com/ry-das
This commit is contained in:
commit
2c3bbe2066
@ -4,6 +4,7 @@ import cn.dev33.satoken.stp.StpUtil;
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.das.common.config.SessionUtil;
|
||||
import com.das.common.exceptions.ServiceException;
|
||||
import com.das.common.utils.BeanCopyUtils;
|
||||
import com.das.common.utils.PageDataInfo;
|
||||
import com.das.common.utils.PageQuery;
|
||||
@ -455,6 +456,7 @@ public class SysNodeServiceImpl implements SysNodeService {
|
||||
terminalMessageEventHandler.sendTerminalMessageWithResult(activeNodeId, configUpdate);
|
||||
} catch (Exception e) {
|
||||
log.error("设备控制失败 ", e);
|
||||
throw new ServiceException("设备控制失败 "+ e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
package com.das.modules.page.domian;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Map;
|
||||
@ -7,10 +9,14 @@ import java.util.Map;
|
||||
@Data
|
||||
public class WindTurbinesPageVo {
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long irn;
|
||||
|
||||
private String name;
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long modelId;
|
||||
|
||||
private String model;
|
||||
|
||||
private String belongLine;
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.das.modules.page.service;
|
||||
|
||||
import com.das.common.exceptions.ServiceException;
|
||||
import com.das.modules.data.domain.SnapshotValueQueryParam;
|
||||
import com.das.modules.data.service.DataService;
|
||||
import com.das.modules.equipment.mapper.SysEquipmentMapper;
|
||||
@ -77,7 +78,13 @@ public class WindTurbinesPageService {
|
||||
|
||||
public void windTurbinesControl(List<DeviceCommandDto> controlList){
|
||||
for (DeviceCommandDto item : controlList){
|
||||
try {
|
||||
sysNodeService.deviceCommand(item);
|
||||
}catch (Exception e){
|
||||
log.error("下控失败",e);
|
||||
throw new ServiceException("下控失败"+e);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -166,7 +166,7 @@
|
||||
select distinct belong_line as name from sys_equipment t where t.object_type = 10002 and belong_line !='';
|
||||
</select>
|
||||
<select id="queryAllWindList" resultType="com.das.modules.page.domian.WindTurbinesPageVo">
|
||||
select se.id as irn,se.name,se.model,se.belong_line as belongLine from sys_equipment se where se.object_type = #{objectType} order by se.name
|
||||
select se.id as irn,se.name,se.model,se.belong_line as belongLine, se.iot_model_id as modelId from sys_equipment se where se.object_type = #{objectType} order by se.name
|
||||
</select>
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user