Преглед на файлове

添加被git屏蔽掉的文件夹

james преди 5 дни
родител
ревизия
8697be4444
променени са 14 файла, в които са добавени 1223 реда и са изтрити 0 реда
  1. 71 0
      service-rule/service-rule-biz/src/main/java/com/usky/rule/vo/log/ActionControlSerialization.java
  2. 78 0
      service-rule/service-rule-biz/src/main/java/com/usky/rule/vo/log/BaseLog.java
  3. 30 0
      service-rule/service-rule-biz/src/main/java/com/usky/rule/vo/log/ConstraintCronSerialization.java
  4. 30 0
      service-rule/service-rule-biz/src/main/java/com/usky/rule/vo/log/ConstraintDeviceSerialization.java
  5. 78 0
      service-rule/service-rule-biz/src/main/java/com/usky/rule/vo/log/Content.java
  6. 141 0
      service-rule/service-rule-biz/src/main/java/com/usky/rule/vo/log/Control.java
  7. 101 0
      service-rule/service-rule-biz/src/main/java/com/usky/rule/vo/log/ControlAction.java
  8. 78 0
      service-rule/service-rule-biz/src/main/java/com/usky/rule/vo/log/CronTriggerLog.java
  9. 220 0
      service-rule/service-rule-biz/src/main/java/com/usky/rule/vo/log/DeviceControlResult.java
  10. 144 0
      service-rule/service-rule-biz/src/main/java/com/usky/rule/vo/log/DeviceTriggerLog.java
  11. 101 0
      service-rule/service-rule-biz/src/main/java/com/usky/rule/vo/log/RuleEngineDetailLog.java
  12. 11 0
      service-rule/service-rule-biz/src/main/java/com/usky/rule/vo/log/RuleEngineLogSerialization.java
  13. 37 0
      service-rule/service-rule-biz/src/main/java/com/usky/rule/vo/log/TriggerCronSerialization.java
  14. 103 0
      service-rule/service-rule-biz/src/main/java/com/usky/rule/vo/log/TriggerDeviceSerialization.java

+ 71 - 0
service-rule/service-rule-biz/src/main/java/com/usky/rule/vo/log/ActionControlSerialization.java

@@ -0,0 +1,71 @@
+package com.usky.rule.vo.log;
+
+import com.usky.rule.util.JsonUtil;
+import com.usky.rule.vo.log.Content;
+import com.usky.rule.vo.log.Control;
+import com.usky.rule.vo.log.ControlAction;
+import com.usky.rule.vo.log.DeviceControlResult;
+import java.util.List;
+import java.util.Map;
+import org.jetbrains.annotations.NotNull;
+
+public class ActionControlSerialization implements RuleEngineLogSerialization<ControlAction> {
+    public ActionControlSerialization() {
+    }
+
+    public ControlAction serialize(String detail) {
+        return null;
+    }
+
+    public Content toContent(Object obj) {
+        if (obj instanceof Map) {
+            ControlAction controlAction = (ControlAction)JsonUtil.toObject((Map)obj, ControlAction.class);
+            return getContent(controlAction);
+        } else if (obj instanceof ControlAction) {
+            return getContent((ControlAction)obj);
+        } else {
+            throw new ClassCastException("ActionControlSerialization不支持该类型的转换");
+        }
+    }
+
+    @NotNull
+    private static Content getContent(ControlAction controlAction) {
+        Content content = new Content();
+        List<DeviceControlResult> devices = controlAction.getDevices();
+        List<Control> controls = controlAction.getControls();
+        StringBuilder builder = new StringBuilder();
+
+        for(int j = 0; j < devices.size(); ++j) {
+            DeviceControlResult deviceControlResult = (DeviceControlResult)devices.get(j);
+            if (j > 0) {
+                builder.append("\n");
+            }
+
+            builder.append(deviceControlResult.getName()).append(":");
+            List<DeviceControlResult.Result> results = deviceControlResult.getResult();
+
+            for(int i = 0; i < results.size(); ++i) {
+                DeviceControlResult.Result result = (DeviceControlResult.Result)results.get(i);
+                String resultDesc = "失败";
+                if (i > 0) {
+                    builder.append(",");
+                }
+
+                if ("200000".equals(result.getCode())) {
+                    resultDesc = "成功";
+                }
+
+                Control control = (Control)controls.get(i);
+                builder.append(control.getName()).append("延时").append(control.getDelaySeconds()).append("秒设置为:").append(control.getValueDesc()).append("(").append(resultDesc).append(")");
+            }
+        }
+
+        content.setContent(builder.toString());
+        content.setTime(controlAction.getTime());
+        return content;
+    }
+
+    public String getType() {
+        return "action:deviceControl";
+    }
+}

+ 78 - 0
service-rule/service-rule-biz/src/main/java/com/usky/rule/vo/log/BaseLog.java

@@ -0,0 +1,78 @@
+package com.usky.rule.vo.log;
+
+public class BaseLog {
+    private String type;
+    private Object detail;
+
+    public BaseLog() {
+    }
+
+    public String getType() {
+        return this.type;
+    }
+
+    public Object getDetail() {
+        return this.detail;
+    }
+
+    public void setType(final String type) {
+        this.type = type;
+    }
+
+    public void setDetail(final Object detail) {
+        this.detail = detail;
+    }
+
+    public boolean equals(final Object o) {
+        if (o == this) {
+            return true;
+        } else if (!(o instanceof BaseLog)) {
+            return false;
+        } else {
+            BaseLog other = (BaseLog)o;
+            if (!other.canEqual(this)) {
+                return false;
+            } else {
+                Object this$type = this.getType();
+                Object other$type = other.getType();
+                if (this$type == null) {
+                    if (other$type != null) {
+                        return false;
+                    }
+                } else if (!this$type.equals(other$type)) {
+                    return false;
+                }
+
+                Object this$detail = this.getDetail();
+                Object other$detail = other.getDetail();
+                if (this$detail == null) {
+                    if (other$detail != null) {
+                        return false;
+                    }
+                } else if (!this$detail.equals(other$detail)) {
+                    return false;
+                }
+
+                return true;
+            }
+        }
+    }
+
+    protected boolean canEqual(final Object other) {
+        return other instanceof BaseLog;
+    }
+
+    public int hashCode() {
+        int PRIME = 59;
+        int result = 1;
+        Object $type = this.getType();
+        result = result * 59 + ($type == null ? 43 : $type.hashCode());
+        Object $detail = this.getDetail();
+        result = result * 59 + ($detail == null ? 43 : $detail.hashCode());
+        return result;
+    }
+
+    public String toString() {
+        return "BaseLog(type=" + this.getType() + ", detail=" + this.getDetail() + ")";
+    }
+}

+ 30 - 0
service-rule/service-rule-biz/src/main/java/com/usky/rule/vo/log/ConstraintCronSerialization.java

@@ -0,0 +1,30 @@
+package com.usky.rule.vo.log;
+
+import com.usky.rule.util.JsonUtil;
+import com.usky.rule.vo.log.Content;
+import com.usky.rule.vo.log.CronTriggerLog;
+import java.util.Map;
+
+public class ConstraintCronSerialization implements RuleEngineLogSerialization<CronTriggerLog> {
+    public ConstraintCronSerialization() {
+    }
+
+    public CronTriggerLog serialize(String detail) {
+        return (CronTriggerLog)JsonUtil.toObject(detail, CronTriggerLog.class);
+    }
+
+    public Content toContent(Object obj) {
+        if (obj instanceof Map) {
+            CronTriggerLog cronTriggerLog = (CronTriggerLog)JsonUtil.toObject((Map)obj, CronTriggerLog.class);
+            return TriggerCronSerialization.getContent(cronTriggerLog);
+        } else if (obj instanceof CronTriggerLog) {
+            return TriggerCronSerialization.getContent((CronTriggerLog)obj);
+        } else {
+            throw new ClassCastException("ConstraintCronSerialization不支持该类型的转换");
+        }
+    }
+
+    public String getType() {
+        return "constraint:cron";
+    }
+}

+ 30 - 0
service-rule/service-rule-biz/src/main/java/com/usky/rule/vo/log/ConstraintDeviceSerialization.java

@@ -0,0 +1,30 @@
+package com.usky.rule.vo.log;
+
+import com.usky.rule.util.JsonUtil;
+import com.usky.rule.vo.log.Content;
+import com.usky.rule.vo.log.DeviceTriggerLog;
+import java.util.Map;
+
+public class ConstraintDeviceSerialization implements RuleEngineLogSerialization<DeviceTriggerLog> {
+    public ConstraintDeviceSerialization() {
+    }
+
+    public DeviceTriggerLog serialize(String detail) {
+        return (DeviceTriggerLog)JsonUtil.toObject(detail, DeviceTriggerLog.class);
+    }
+
+    public Content toContent(Object obj) {
+        if (obj instanceof Map) {
+            DeviceTriggerLog deviceTriggerLog = (DeviceTriggerLog)JsonUtil.toObject((Map)obj, DeviceTriggerLog.class);
+            return TriggerDeviceSerialization.getContent(deviceTriggerLog);
+        } else if (obj instanceof DeviceTriggerLog) {
+            return TriggerDeviceSerialization.getContent((DeviceTriggerLog)obj);
+        } else {
+            throw new ClassCastException("ConstraintDeviceSerialization不支持该类型的转换");
+        }
+    }
+
+    public String getType() {
+        return "constraint:device";
+    }
+}

+ 78 - 0
service-rule/service-rule-biz/src/main/java/com/usky/rule/vo/log/Content.java

@@ -0,0 +1,78 @@
+package com.usky.rule.vo.log;
+
+public class Content {
+    private String content;
+    private String time;
+
+    public Content() {
+    }
+
+    public String getContent() {
+        return this.content;
+    }
+
+    public String getTime() {
+        return this.time;
+    }
+
+    public void setContent(final String content) {
+        this.content = content;
+    }
+
+    public void setTime(final String time) {
+        this.time = time;
+    }
+
+    public boolean equals(final Object o) {
+        if (o == this) {
+            return true;
+        } else if (!(o instanceof Content)) {
+            return false;
+        } else {
+            Content other = (Content)o;
+            if (!other.canEqual(this)) {
+                return false;
+            } else {
+                Object this$content = this.getContent();
+                Object other$content = other.getContent();
+                if (this$content == null) {
+                    if (other$content != null) {
+                        return false;
+                    }
+                } else if (!this$content.equals(other$content)) {
+                    return false;
+                }
+
+                Object this$time = this.getTime();
+                Object other$time = other.getTime();
+                if (this$time == null) {
+                    if (other$time != null) {
+                        return false;
+                    }
+                } else if (!this$time.equals(other$time)) {
+                    return false;
+                }
+
+                return true;
+            }
+        }
+    }
+
+    protected boolean canEqual(final Object other) {
+        return other instanceof Content;
+    }
+
+    public int hashCode() {
+        int PRIME = 59;
+        int result = 1;
+        Object $content = this.getContent();
+        result = result * 59 + ($content == null ? 43 : $content.hashCode());
+        Object $time = this.getTime();
+        result = result * 59 + ($time == null ? 43 : $time.hashCode());
+        return result;
+    }
+
+    public String toString() {
+        return "Content(content=" + this.getContent() + ", time=" + this.getTime() + ")";
+    }
+}

+ 141 - 0
service-rule/service-rule-biz/src/main/java/com/usky/rule/vo/log/Control.java

@@ -0,0 +1,141 @@
+package com.usky.rule.vo.log;
+
+public class Control {
+    private String identifier;
+    private String name;
+    private Integer delaySeconds;
+    private String value;
+    private String valueDesc;
+
+    public Control() {
+    }
+
+    public String getIdentifier() {
+        return this.identifier;
+    }
+
+    public String getName() {
+        return this.name;
+    }
+
+    public Integer getDelaySeconds() {
+        return this.delaySeconds;
+    }
+
+    public String getValue() {
+        return this.value;
+    }
+
+    public String getValueDesc() {
+        return this.valueDesc;
+    }
+
+    public void setIdentifier(final String identifier) {
+        this.identifier = identifier;
+    }
+
+    public void setName(final String name) {
+        this.name = name;
+    }
+
+    public void setDelaySeconds(final Integer delaySeconds) {
+        this.delaySeconds = delaySeconds;
+    }
+
+    public void setValue(final String value) {
+        this.value = value;
+    }
+
+    public void setValueDesc(final String valueDesc) {
+        this.valueDesc = valueDesc;
+    }
+
+    public boolean equals(final Object o) {
+        if (o == this) {
+            return true;
+        } else if (!(o instanceof Control)) {
+            return false;
+        } else {
+            Control other = (Control)o;
+            if (!other.canEqual(this)) {
+                return false;
+            } else {
+                Object this$delaySeconds = this.getDelaySeconds();
+                Object other$delaySeconds = other.getDelaySeconds();
+                if (this$delaySeconds == null) {
+                    if (other$delaySeconds != null) {
+                        return false;
+                    }
+                } else if (!this$delaySeconds.equals(other$delaySeconds)) {
+                    return false;
+                }
+
+                Object this$identifier = this.getIdentifier();
+                Object other$identifier = other.getIdentifier();
+                if (this$identifier == null) {
+                    if (other$identifier != null) {
+                        return false;
+                    }
+                } else if (!this$identifier.equals(other$identifier)) {
+                    return false;
+                }
+
+                Object this$name = this.getName();
+                Object other$name = other.getName();
+                if (this$name == null) {
+                    if (other$name != null) {
+                        return false;
+                    }
+                } else if (!this$name.equals(other$name)) {
+                    return false;
+                }
+
+                Object this$value = this.getValue();
+                Object other$value = other.getValue();
+                if (this$value == null) {
+                    if (other$value != null) {
+                        return false;
+                    }
+                } else if (!this$value.equals(other$value)) {
+                    return false;
+                }
+
+                Object this$valueDesc = this.getValueDesc();
+                Object other$valueDesc = other.getValueDesc();
+                if (this$valueDesc == null) {
+                    if (other$valueDesc != null) {
+                        return false;
+                    }
+                } else if (!this$valueDesc.equals(other$valueDesc)) {
+                    return false;
+                }
+
+                return true;
+            }
+        }
+    }
+
+    protected boolean canEqual(final Object other) {
+        return other instanceof Control;
+    }
+
+    public int hashCode() {
+        int PRIME = 59;
+        int result = 1;
+        Object $delaySeconds = this.getDelaySeconds();
+        result = result * 59 + ($delaySeconds == null ? 43 : $delaySeconds.hashCode());
+        Object $identifier = this.getIdentifier();
+        result = result * 59 + ($identifier == null ? 43 : $identifier.hashCode());
+        Object $name = this.getName();
+        result = result * 59 + ($name == null ? 43 : $name.hashCode());
+        Object $value = this.getValue();
+        result = result * 59 + ($value == null ? 43 : $value.hashCode());
+        Object $valueDesc = this.getValueDesc();
+        result = result * 59 + ($valueDesc == null ? 43 : $valueDesc.hashCode());
+        return result;
+    }
+
+    public String toString() {
+        return "Control(identifier=" + this.getIdentifier() + ", name=" + this.getName() + ", delaySeconds=" + this.getDelaySeconds() + ", value=" + this.getValue() + ", valueDesc=" + this.getValueDesc() + ")";
+    }
+}

+ 101 - 0
service-rule/service-rule-biz/src/main/java/com/usky/rule/vo/log/ControlAction.java

@@ -0,0 +1,101 @@
+package com.usky.rule.vo.log;
+
+import java.util.List;
+
+public class ControlAction {
+    private List<Control> controls;
+    private List<DeviceControlResult> devices;
+    private String time;
+
+    public ControlAction() {
+    }
+
+    public List<Control> getControls() {
+        return this.controls;
+    }
+
+    public List<DeviceControlResult> getDevices() {
+        return this.devices;
+    }
+
+    public String getTime() {
+        return this.time;
+    }
+
+    public void setControls(final List<Control> controls) {
+        this.controls = controls;
+    }
+
+    public void setDevices(final List<DeviceControlResult> devices) {
+        this.devices = devices;
+    }
+
+    public void setTime(final String time) {
+        this.time = time;
+    }
+
+    public boolean equals(final Object o) {
+        if (o == this) {
+            return true;
+        } else if (!(o instanceof ControlAction)) {
+            return false;
+        } else {
+            ControlAction other = (ControlAction)o;
+            if (!other.canEqual(this)) {
+                return false;
+            } else {
+                Object this$controls = this.getControls();
+                Object other$controls = other.getControls();
+                if (this$controls == null) {
+                    if (other$controls != null) {
+                        return false;
+                    }
+                } else if (!this$controls.equals(other$controls)) {
+                    return false;
+                }
+
+                Object this$devices = this.getDevices();
+                Object other$devices = other.getDevices();
+                if (this$devices == null) {
+                    if (other$devices != null) {
+                        return false;
+                    }
+                } else if (!this$devices.equals(other$devices)) {
+                    return false;
+                }
+
+                Object this$time = this.getTime();
+                Object other$time = other.getTime();
+                if (this$time == null) {
+                    if (other$time != null) {
+                        return false;
+                    }
+                } else if (!this$time.equals(other$time)) {
+                    return false;
+                }
+
+                return true;
+            }
+        }
+    }
+
+    protected boolean canEqual(final Object other) {
+        return other instanceof ControlAction;
+    }
+
+    public int hashCode() {
+        int PRIME = 59;
+        int result = 1;
+        Object $controls = this.getControls();
+        result = result * 59 + ($controls == null ? 43 : $controls.hashCode());
+        Object $devices = this.getDevices();
+        result = result * 59 + ($devices == null ? 43 : $devices.hashCode());
+        Object $time = this.getTime();
+        result = result * 59 + ($time == null ? 43 : $time.hashCode());
+        return result;
+    }
+
+    public String toString() {
+        return "ControlAction(controls=" + this.getControls() + ", devices=" + this.getDevices() + ", time=" + this.getTime() + ")";
+    }
+}

+ 78 - 0
service-rule/service-rule-biz/src/main/java/com/usky/rule/vo/log/CronTriggerLog.java

@@ -0,0 +1,78 @@
+package com.usky.rule.vo.log;
+
+public class CronTriggerLog {
+    private String cronExp;
+    private String time;
+
+    public CronTriggerLog() {
+    }
+
+    public String getCronExp() {
+        return this.cronExp;
+    }
+
+    public String getTime() {
+        return this.time;
+    }
+
+    public void setCronExp(final String cronExp) {
+        this.cronExp = cronExp;
+    }
+
+    public void setTime(final String time) {
+        this.time = time;
+    }
+
+    public boolean equals(final Object o) {
+        if (o == this) {
+            return true;
+        } else if (!(o instanceof CronTriggerLog)) {
+            return false;
+        } else {
+            CronTriggerLog other = (CronTriggerLog)o;
+            if (!other.canEqual(this)) {
+                return false;
+            } else {
+                Object this$cronExp = this.getCronExp();
+                Object other$cronExp = other.getCronExp();
+                if (this$cronExp == null) {
+                    if (other$cronExp != null) {
+                        return false;
+                    }
+                } else if (!this$cronExp.equals(other$cronExp)) {
+                    return false;
+                }
+
+                Object this$time = this.getTime();
+                Object other$time = other.getTime();
+                if (this$time == null) {
+                    if (other$time != null) {
+                        return false;
+                    }
+                } else if (!this$time.equals(other$time)) {
+                    return false;
+                }
+
+                return true;
+            }
+        }
+    }
+
+    protected boolean canEqual(final Object other) {
+        return other instanceof CronTriggerLog;
+    }
+
+    public int hashCode() {
+        int PRIME = 59;
+        int result = 1;
+        Object $cronExp = this.getCronExp();
+        result = result * 59 + ($cronExp == null ? 43 : $cronExp.hashCode());
+        Object $time = this.getTime();
+        result = result * 59 + ($time == null ? 43 : $time.hashCode());
+        return result;
+    }
+
+    public String toString() {
+        return "CronTriggerLog(cronExp=" + this.getCronExp() + ", time=" + this.getTime() + ")";
+    }
+}

+ 220 - 0
service-rule/service-rule-biz/src/main/java/com/usky/rule/vo/log/DeviceControlResult.java

@@ -0,0 +1,220 @@
+package com.usky.rule.vo.log;
+
+import java.util.List;
+
+public class DeviceControlResult {
+    private String id;
+    private String name;
+    private List<Result> result;
+
+    public DeviceControlResult() {
+    }
+
+    public String getId() {
+        return this.id;
+    }
+
+    public String getName() {
+        return this.name;
+    }
+
+    public List<Result> getResult() {
+        return this.result;
+    }
+
+    public void setId(final String id) {
+        this.id = id;
+    }
+
+    public void setName(final String name) {
+        this.name = name;
+    }
+
+    public void setResult(final List<Result> result) {
+        this.result = result;
+    }
+
+    public boolean equals(final Object o) {
+        if (o == this) {
+            return true;
+        } else if (!(o instanceof DeviceControlResult)) {
+            return false;
+        } else {
+            DeviceControlResult other = (DeviceControlResult)o;
+            if (!other.canEqual(this)) {
+                return false;
+            } else {
+                Object this$id = this.getId();
+                Object other$id = other.getId();
+                if (this$id == null) {
+                    if (other$id != null) {
+                        return false;
+                    }
+                } else if (!this$id.equals(other$id)) {
+                    return false;
+                }
+
+                Object this$name = this.getName();
+                Object other$name = other.getName();
+                if (this$name == null) {
+                    if (other$name != null) {
+                        return false;
+                    }
+                } else if (!this$name.equals(other$name)) {
+                    return false;
+                }
+
+                Object this$result = this.getResult();
+                Object other$result = other.getResult();
+                if (this$result == null) {
+                    if (other$result != null) {
+                        return false;
+                    }
+                } else if (!this$result.equals(other$result)) {
+                    return false;
+                }
+
+                return true;
+            }
+        }
+    }
+
+    protected boolean canEqual(final Object other) {
+        return other instanceof DeviceControlResult;
+    }
+
+    public int hashCode() {
+        int PRIME = 59;
+        int result = 1;
+        Object $id = this.getId();
+        result = result * 59 + ($id == null ? 43 : $id.hashCode());
+        Object $name = this.getName();
+        result = result * 59 + ($name == null ? 43 : $name.hashCode());
+        Object $result = this.getResult();
+        result = result * 59 + ($result == null ? 43 : $result.hashCode());
+        return result;
+    }
+
+    public String toString() {
+        return "DeviceControlResult(id=" + this.getId() + ", name=" + this.getName() + ", result=" + this.getResult() + ")";
+    }
+
+    public static class Result {
+        private String code;
+        private String message;
+        private String reqTime;
+        private String respTime;
+
+        public Result() {
+        }
+
+        public String getCode() {
+            return this.code;
+        }
+
+        public String getMessage() {
+            return this.message;
+        }
+
+        public String getReqTime() {
+            return this.reqTime;
+        }
+
+        public String getRespTime() {
+            return this.respTime;
+        }
+
+        public void setCode(final String code) {
+            this.code = code;
+        }
+
+        public void setMessage(final String message) {
+            this.message = message;
+        }
+
+        public void setReqTime(final String reqTime) {
+            this.reqTime = reqTime;
+        }
+
+        public void setRespTime(final String respTime) {
+            this.respTime = respTime;
+        }
+
+        public boolean equals(final Object o) {
+            if (o == this) {
+                return true;
+            } else if (!(o instanceof Result)) {
+                return false;
+            } else {
+                Result other = (Result)o;
+                if (!other.canEqual(this)) {
+                    return false;
+                } else {
+                    Object this$code = this.getCode();
+                    Object other$code = other.getCode();
+                    if (this$code == null) {
+                        if (other$code != null) {
+                            return false;
+                        }
+                    } else if (!this$code.equals(other$code)) {
+                        return false;
+                    }
+
+                    Object this$message = this.getMessage();
+                    Object other$message = other.getMessage();
+                    if (this$message == null) {
+                        if (other$message != null) {
+                            return false;
+                        }
+                    } else if (!this$message.equals(other$message)) {
+                        return false;
+                    }
+
+                    Object this$reqTime = this.getReqTime();
+                    Object other$reqTime = other.getReqTime();
+                    if (this$reqTime == null) {
+                        if (other$reqTime != null) {
+                            return false;
+                        }
+                    } else if (!this$reqTime.equals(other$reqTime)) {
+                        return false;
+                    }
+
+                    Object this$respTime = this.getRespTime();
+                    Object other$respTime = other.getRespTime();
+                    if (this$respTime == null) {
+                        if (other$respTime != null) {
+                            return false;
+                        }
+                    } else if (!this$respTime.equals(other$respTime)) {
+                        return false;
+                    }
+
+                    return true;
+                }
+            }
+        }
+
+        protected boolean canEqual(final Object other) {
+            return other instanceof Result;
+        }
+
+        public int hashCode() {
+            int PRIME = 59;
+            int result = 1;
+            Object $code = this.getCode();
+            result = result * 59 + ($code == null ? 43 : $code.hashCode());
+            Object $message = this.getMessage();
+            result = result * 59 + ($message == null ? 43 : $message.hashCode());
+            Object $reqTime = this.getReqTime();
+            result = result * 59 + ($reqTime == null ? 43 : $reqTime.hashCode());
+            Object $respTime = this.getRespTime();
+            result = result * 59 + ($respTime == null ? 43 : $respTime.hashCode());
+            return result;
+        }
+
+        public String toString() {
+            return "DeviceControlResult.Result(code=" + this.getCode() + ", message=" + this.getMessage() + ", reqTime=" + this.getReqTime() + ", respTime=" + this.getRespTime() + ")";
+        }
+    }
+}

+ 144 - 0
service-rule/service-rule-biz/src/main/java/com/usky/rule/vo/log/DeviceTriggerLog.java

@@ -0,0 +1,144 @@
+package com.usky.rule.vo.log;
+
+import com.usky.rule.vo.Condition;
+import java.util.List;
+
+public class DeviceTriggerLog {
+    private String id;
+    private String name;
+    private String method;
+    private List<Condition> conditions;
+    private String time;
+
+    public DeviceTriggerLog() {
+    }
+
+    public String getId() {
+        return this.id;
+    }
+
+    public String getName() {
+        return this.name;
+    }
+
+    public String getMethod() {
+        return this.method;
+    }
+
+    public List<Condition> getConditions() {
+        return this.conditions;
+    }
+
+    public String getTime() {
+        return this.time;
+    }
+
+    public void setId(final String id) {
+        this.id = id;
+    }
+
+    public void setName(final String name) {
+        this.name = name;
+    }
+
+    public void setMethod(final String method) {
+        this.method = method;
+    }
+
+    public void setConditions(final List<Condition> conditions) {
+        this.conditions = conditions;
+    }
+
+    public void setTime(final String time) {
+        this.time = time;
+    }
+
+    public boolean equals(final Object o) {
+        if (o == this) {
+            return true;
+        } else if (!(o instanceof DeviceTriggerLog)) {
+            return false;
+        } else {
+            DeviceTriggerLog other = (DeviceTriggerLog)o;
+            if (!other.canEqual(this)) {
+                return false;
+            } else {
+                Object this$id = this.getId();
+                Object other$id = other.getId();
+                if (this$id == null) {
+                    if (other$id != null) {
+                        return false;
+                    }
+                } else if (!this$id.equals(other$id)) {
+                    return false;
+                }
+
+                Object this$name = this.getName();
+                Object other$name = other.getName();
+                if (this$name == null) {
+                    if (other$name != null) {
+                        return false;
+                    }
+                } else if (!this$name.equals(other$name)) {
+                    return false;
+                }
+
+                Object this$method = this.getMethod();
+                Object other$method = other.getMethod();
+                if (this$method == null) {
+                    if (other$method != null) {
+                        return false;
+                    }
+                } else if (!this$method.equals(other$method)) {
+                    return false;
+                }
+
+                Object this$conditions = this.getConditions();
+                Object other$conditions = other.getConditions();
+                if (this$conditions == null) {
+                    if (other$conditions != null) {
+                        return false;
+                    }
+                } else if (!this$conditions.equals(other$conditions)) {
+                    return false;
+                }
+
+                Object this$time = this.getTime();
+                Object other$time = other.getTime();
+                if (this$time == null) {
+                    if (other$time != null) {
+                        return false;
+                    }
+                } else if (!this$time.equals(other$time)) {
+                    return false;
+                }
+
+                return true;
+            }
+        }
+    }
+
+    protected boolean canEqual(final Object other) {
+        return other instanceof DeviceTriggerLog;
+    }
+
+    public int hashCode() {
+        int PRIME = 59;
+        int result = 1;
+        Object $id = this.getId();
+        result = result * 59 + ($id == null ? 43 : $id.hashCode());
+        Object $name = this.getName();
+        result = result * 59 + ($name == null ? 43 : $name.hashCode());
+        Object $method = this.getMethod();
+        result = result * 59 + ($method == null ? 43 : $method.hashCode());
+        Object $conditions = this.getConditions();
+        result = result * 59 + ($conditions == null ? 43 : $conditions.hashCode());
+        Object $time = this.getTime();
+        result = result * 59 + ($time == null ? 43 : $time.hashCode());
+        return result;
+    }
+
+    public String toString() {
+        return "DeviceTriggerLog(id=" + this.getId() + ", name=" + this.getName() + ", method=" + this.getMethod() + ", conditions=" + this.getConditions() + ", time=" + this.getTime() + ")";
+    }
+}

+ 101 - 0
service-rule/service-rule-biz/src/main/java/com/usky/rule/vo/log/RuleEngineDetailLog.java

@@ -0,0 +1,101 @@
+package com.usky.rule.vo.log;
+
+import java.util.List;
+
+public class RuleEngineDetailLog {
+    private List<BaseLog> triggers;
+    private List<BaseLog> constraints;
+    private List<BaseLog> actions;
+
+    public RuleEngineDetailLog() {
+    }
+
+    public List<BaseLog> getTriggers() {
+        return this.triggers;
+    }
+
+    public List<BaseLog> getConstraints() {
+        return this.constraints;
+    }
+
+    public List<BaseLog> getActions() {
+        return this.actions;
+    }
+
+    public void setTriggers(final List<BaseLog> triggers) {
+        this.triggers = triggers;
+    }
+
+    public void setConstraints(final List<BaseLog> constraints) {
+        this.constraints = constraints;
+    }
+
+    public void setActions(final List<BaseLog> actions) {
+        this.actions = actions;
+    }
+
+    public boolean equals(final Object o) {
+        if (o == this) {
+            return true;
+        } else if (!(o instanceof RuleEngineDetailLog)) {
+            return false;
+        } else {
+            RuleEngineDetailLog other = (RuleEngineDetailLog)o;
+            if (!other.canEqual(this)) {
+                return false;
+            } else {
+                Object this$triggers = this.getTriggers();
+                Object other$triggers = other.getTriggers();
+                if (this$triggers == null) {
+                    if (other$triggers != null) {
+                        return false;
+                    }
+                } else if (!this$triggers.equals(other$triggers)) {
+                    return false;
+                }
+
+                Object this$constraints = this.getConstraints();
+                Object other$constraints = other.getConstraints();
+                if (this$constraints == null) {
+                    if (other$constraints != null) {
+                        return false;
+                    }
+                } else if (!this$constraints.equals(other$constraints)) {
+                    return false;
+                }
+
+                Object this$actions = this.getActions();
+                Object other$actions = other.getActions();
+                if (this$actions == null) {
+                    if (other$actions != null) {
+                        return false;
+                    }
+                } else if (!this$actions.equals(other$actions)) {
+                    return false;
+                }
+
+                return true;
+            }
+        }
+    }
+
+    protected boolean canEqual(final Object other) {
+        return other instanceof RuleEngineDetailLog;
+    }
+
+    public int hashCode() {
+        int PRIME = 59;
+        int result = 1;
+        Object $triggers = this.getTriggers();
+        result = result * 59 + ($triggers == null ? 43 : $triggers.hashCode());
+        Object $constraints = this.getConstraints();
+        result = result * 59 + ($constraints == null ? 43 : $constraints.hashCode());
+        Object $actions = this.getActions();
+        result = result * 59 + ($actions == null ? 43 : $actions.hashCode());
+        return result;
+    }
+
+    public String toString() {
+        return "RuleEngineDetailLog(triggers=" + this.getTriggers() + ", constraints=" + this.getConstraints() + ", actions=" + this.getActions() + ")";
+    }
+}

+ 11 - 0
service-rule/service-rule-biz/src/main/java/com/usky/rule/vo/log/RuleEngineLogSerialization.java

@@ -0,0 +1,11 @@
+package com.usky.rule.vo.log;
+
+import com.usky.rule.vo.log.Content;
+
+public interface RuleEngineLogSerialization<T> {
+    T serialize(String detail);
+
+    Content toContent(Object obj);
+
+    String getType();
+}

+ 37 - 0
service-rule/service-rule-biz/src/main/java/com/usky/rule/vo/log/TriggerCronSerialization.java

@@ -0,0 +1,37 @@
+package com.usky.rule.vo.log;
+
+import com.usky.rule.util.JsonUtil;
+import com.usky.rule.vo.log.Content;
+import com.usky.rule.vo.log.CronTriggerLog;
+import java.util.Map;
+
+public class TriggerCronSerialization implements RuleEngineLogSerialization<CronTriggerLog> {
+    public TriggerCronSerialization() {
+    }
+
+    public CronTriggerLog serialize(String detail) {
+        return (CronTriggerLog)JsonUtil.toObject(detail, CronTriggerLog.class);
+    }
+
+    public Content toContent(Object obj) {
+        if (obj instanceof Map) {
+            CronTriggerLog cronTriggerLog = (CronTriggerLog)JsonUtil.toObject((Map)obj, CronTriggerLog.class);
+            return getContent(cronTriggerLog);
+        } else if (obj instanceof CronTriggerLog) {
+            return getContent((CronTriggerLog)obj);
+        } else {
+            throw new ClassCastException("TriggerCronSerialization不支持的该类型的转换");
+        }
+    }
+
+    static Content getContent(CronTriggerLog cronTriggerLog) {
+        Content content = new Content();
+        content.setTime(cronTriggerLog.getTime());
+        content.setContent(cronTriggerLog.getCronExp());
+        return content;
+    }
+
+    public String getType() {
+        return "trigger:cron";
+    }
+}

+ 103 - 0
service-rule/service-rule-biz/src/main/java/com/usky/rule/vo/log/TriggerDeviceSerialization.java

@@ -0,0 +1,103 @@
+package com.usky.rule.vo.log;
+
+import com.usky.rule.util.JsonUtil;
+import com.usky.rule.vo.Condition;
+import com.usky.rule.vo.Expression;
+import com.usky.rule.vo.TimeRange;
+import com.usky.rule.vo.log.Content;
+import com.usky.rule.vo.log.DeviceTriggerLog;
+import java.util.List;
+import java.util.Map;
+import org.springframework.util.CollectionUtils;
+
+public class TriggerDeviceSerialization implements RuleEngineLogSerialization<DeviceTriggerLog> {
+    public TriggerDeviceSerialization() {
+    }
+
+    public DeviceTriggerLog serialize(String detail) {
+        return (DeviceTriggerLog)JsonUtil.toObject(detail, DeviceTriggerLog.class);
+    }
+
+    public Content toContent(Object obj) {
+        if (obj instanceof Map) {
+            DeviceTriggerLog deviceTriggerLog = (DeviceTriggerLog)JsonUtil.toObject((Map)obj, DeviceTriggerLog.class);
+            return getContent(deviceTriggerLog);
+        } else if (obj instanceof DeviceTriggerLog) {
+            return getContent((DeviceTriggerLog)obj);
+        } else {
+            throw new ClassCastException("TriggerDeviceSerialization不支持的该类型的转换");
+        }
+    }
+
+    static Content getContent(DeviceTriggerLog deviceTriggerLog) {
+        Content content = new Content();
+        StringBuilder stringBuilder = (new StringBuilder(deviceTriggerLog.getName())).append(":");
+        List<Condition> conditions = deviceTriggerLog.getConditions();
+        String time = deviceTriggerLog.getTime();
+        if (!CollectionUtils.isEmpty(conditions)) {
+            for(int i = 0; i < conditions.size(); ++i) {
+                Condition condition = (Condition)conditions.get(i);
+                TimeRange timeRange = condition.getTimeRange();
+                if (timeRange == null) {
+                    String identifierName = condition.getName();
+                    if (i > 0) {
+                        stringBuilder.append(",");
+                    }
+
+                    stringBuilder.append(identifierName).append("值为:");
+                    stringBuilder.append(condition.getValue());
+                    String comparingType = condition.getCondition();
+                    Expression expression = condition.getExpression();
+                    String x = expression.getX();
+                    String y = expression.getY();
+                    String m = expression.getM();
+                    stringBuilder.append("(").append("数值");
+                    switch (comparingType) {
+                        case "above_minute":
+                            stringBuilder.append("大于").append(x).append("超过").append(m).append("分钟");
+                            break;
+                        case "below_minute":
+                            stringBuilder.append("小于").append(x).append("超过").append(m).append("分钟");
+                            break;
+                        case "equal_minute":
+                            stringBuilder.append("等于").append(x).append("超过").append(m).append("分钟");
+                            break;
+                        case "not_equal_minute":
+                            stringBuilder.append("不等于").append(x).append("超过").append(m).append("分钟");
+                            break;
+                        case "between_minute":
+                            stringBuilder.append("大于").append(x).append("且数值小于").append(y).append("超过").append(m).append("分钟");
+                            break;
+                        case "above":
+                            stringBuilder.append("大于").append(x);
+                            break;
+                        case "below":
+                            stringBuilder.append("小于").append(x);
+                            break;
+                        case "equal":
+                            stringBuilder.append("等于").append(x);
+                            break;
+                        case "not_equal":
+                            stringBuilder.append("不等于").append(x);
+                            break;
+                        case "between":
+                            stringBuilder.append("大于").append(x).append("且数值小于").append(y).append(")");
+                    }
+
+                    stringBuilder.append(")");
+                    if (i == conditions.size() - 1) {
+                        stringBuilder.append(";");
+                    }
+                }
+            }
+        }
+
+        content.setContent(stringBuilder.toString());
+        content.setTime(time);
+        return content;
+    }
+
+    public String getType() {
+        return "trigger:device";
+    }
+}