Commit d088e03a9c1384f42263f4ad3316f82979ed1261

Authored by xp.Huang
1 parent 6ae21e19

feat: 组态增加sourceOption拓展新组件,V1.1.2将重构组态功能,便于组件扩展

@@ -50,7 +50,7 @@ public class TkAlarmInfoController extends BaseController { @@ -50,7 +50,7 @@ public class TkAlarmInfoController extends BaseController {
50 @RequestParam(value = "alarmType", required = false) String alarmType, 50 @RequestParam(value = "alarmType", required = false) String alarmType,
51 @RequestParam(value = "severity", required = false) AlarmSeverity severity, 51 @RequestParam(value = "severity", required = false) AlarmSeverity severity,
52 @RequestParam(value = "organizationId", required = false) String organizationId, 52 @RequestParam(value = "organizationId", required = false) String organizationId,
53 - @RequestParam(value = "deviceId", required = false) String deviceId, 53 + @RequestParam(value = "deviceIds", required = false) List<String> deviceIds,
54 @RequestParam(value = "deviceName", required = false) String deviceName, 54 @RequestParam(value = "deviceName", required = false) String deviceName,
55 @RequestParam(value = "deviceType", required = false) DeviceTypeEnum deviceType, 55 @RequestParam(value = "deviceType", required = false) DeviceTypeEnum deviceType,
56 @RequestParam(value = "startTime", required = false) Long startTime, 56 @RequestParam(value = "startTime", required = false) Long startTime,
@@ -77,7 +77,7 @@ public class TkAlarmInfoController extends BaseController { @@ -77,7 +77,7 @@ public class TkAlarmInfoController extends BaseController {
77 startTime, 77 startTime,
78 endTime, 78 endTime,
79 status, 79 status,
80 - deviceId, 80 + deviceIds,
81 deviceName, 81 deviceName,
82 deviceType, 82 deviceType,
83 EntityType.DEVICE, 83 EntityType.DEVICE,
@@ -51,4 +51,7 @@ public class ConfigurationDatasourceDTO extends ConfigurationDTO { @@ -51,4 +51,7 @@ public class ConfigurationDatasourceDTO extends ConfigurationDTO {
51 51
52 @ApiModelProperty(value = "数据源高级配置说明") 52 @ApiModelProperty(value = "数据源高级配置说明")
53 private JsonNode additional; 53 private JsonNode additional;
  54 +
  55 + @ApiModelProperty(value = "数据源配置选项")
  56 + private JsonNode sourceOption;
54 } 57 }
@@ -27,5 +27,6 @@ public class TkConfigurationDatasourceEntity extends ConfigurationBaseEntity { @@ -27,5 +27,6 @@ public class TkConfigurationDatasourceEntity extends ConfigurationBaseEntity {
27 private String attr; 27 private String attr;
28 @TableField(typeHandler = JacksonTypeHandler.class) 28 @TableField(typeHandler = JacksonTypeHandler.class)
29 private JsonNode additional; 29 private JsonNode additional;
30 - 30 + @TableField(typeHandler = JacksonTypeHandler.class)
  31 + private JsonNode sourceOption;
31 } 32 }
@@ -51,7 +51,7 @@ public class TkAlarmInfoServiceImpl implements TkAlarmInfoService { @@ -51,7 +51,7 @@ public class TkAlarmInfoServiceImpl implements TkAlarmInfoService {
51 Long startTime, 51 Long startTime,
52 Long endTime, 52 Long endTime,
53 List<AlarmStatus> status, 53 List<AlarmStatus> status,
54 - String deviceId, 54 + List<String> deviceIds,
55 String deviceName, 55 String deviceName,
56 DeviceTypeEnum deviceType, 56 DeviceTypeEnum deviceType,
57 EntityType originatorType, 57 EntityType originatorType,
@@ -80,7 +80,7 @@ public class TkAlarmInfoServiceImpl implements TkAlarmInfoService { @@ -80,7 +80,7 @@ public class TkAlarmInfoServiceImpl implements TkAlarmInfoService {
80 startTime, 80 startTime,
81 endTime, 81 endTime,
82 status, 82 status,
83 - deviceId, 83 + deviceIds,
84 deviceName, 84 deviceName,
85 deviceType, 85 deviceType,
86 originatorType, 86 originatorType,
@@ -26,7 +26,7 @@ public interface TkAlarmMapper extends BaseMapper<TkAlarmEntity> { @@ -26,7 +26,7 @@ public interface TkAlarmMapper extends BaseMapper<TkAlarmEntity> {
26 ,@Param("startTime")Long startTime 26 ,@Param("startTime")Long startTime
27 ,@Param("endTime")Long endTime 27 ,@Param("endTime")Long endTime
28 ,@Param("status")List<AlarmStatus> status 28 ,@Param("status")List<AlarmStatus> status
29 - ,@Param("deviceId")String deviceId 29 + ,@Param("deviceIds")List<String> deviceIds
30 ,@Param("deviceName")String deviceName 30 ,@Param("deviceName")String deviceName
31 ,@Param("deviceType") DeviceTypeEnum deviceType 31 ,@Param("deviceType") DeviceTypeEnum deviceType
32 ,@Param("originatorType") EntityType originatorType 32 ,@Param("originatorType") EntityType originatorType
@@ -25,7 +25,7 @@ public interface TkAlarmInfoService { @@ -25,7 +25,7 @@ public interface TkAlarmInfoService {
25 * @param startTime 过滤区间开始时间 25 * @param startTime 过滤区间开始时间
26 * @param endTime 过滤区间结束时间 26 * @param endTime 过滤区间结束时间
27 * @param status 告警状态 27 * @param status 告警状态
28 - * @param deviceId 告警设备ID,设备告警使用 28 + * @param deviceIds 告警设备ID,设备告警使用
29 * @param deviceName 告警设备名称 29 * @param deviceName 告警设备名称
30 * @param originatorType 告警源类型 30 * @param originatorType 告警源类型
31 * @param organizationId 告警所属组织 31 * @param organizationId 告警所属组织
@@ -40,7 +40,7 @@ public interface TkAlarmInfoService { @@ -40,7 +40,7 @@ public interface TkAlarmInfoService {
40 Long startTime, 40 Long startTime,
41 Long endTime, 41 Long endTime,
42 List<AlarmStatus> status, 42 List<AlarmStatus> status,
43 - String deviceId, 43 + List<String> deviceIds,
44 String deviceName, 44 String deviceName,
45 DeviceTypeEnum deviceType, 45 DeviceTypeEnum deviceType,
46 EntityType originatorType, 46 EntityType originatorType,
@@ -64,8 +64,11 @@ @@ -64,8 +64,11 @@
64 #{id} 64 #{id}
65 </foreach> 65 </foreach>
66 </if> 66 </if>
67 - <if test="deviceId!=null">  
68 - AND d.id = #{deviceId} 67 + <if test="deviceIds!=null">
  68 + AND d.id IN
  69 + <foreach collection="deviceIds" item="deviceId" index="index" open="(" close=")" separator=",">
  70 + #{deviceId}
  71 + </foreach>
69 </if> 72 </if>
70 <if test="deviceName!=null"> 73 <if test="deviceName!=null">
71 AND d.name LIKE concat('%',#{deviceName},'%') 74 AND d.name LIKE concat('%',#{deviceName},'%')