Commit d088e03a9c1384f42263f4ad3316f82979ed1261

Authored by xp.Huang
1 parent 6ae21e19

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

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