package cn.wise.sc.energy.power.plant.business.domain;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.google.gson.JsonObject;
import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.time.LocalDateTime;
import java.time.LocalTime;

/**
 * @author neo.shu
 * @since 2020/9/28 14:33
 */
@Data
@Entity
@Table(name = "autoInspection")
public class AutoInspection {


    private String id;
    @Id
    private Integer recordid;

    private LocalDateTime btreetime;

    private Integer grade;

    private String plantid;

    private String deviceid;

    private String typed;

    private String unitname;

    private String btreename;

    private Integer result;

    private String diagnosis;

    public static void main(String[] args) {
        String a = "{\"name\": \"励端\", \"RunoutX\": {\"1X\": 1.47635805606842, \"2X\": 0.04492176324129105, \"3X\": 1.47635805606842}, \"RunoutY\": {\"1X\": 1.47635805606842, \"2X\": 0.04492176324129105, \"3X\": 1.47635805606842}, \"VibrateX\": {\"1X\": 1.47635805606842, \"2X\": 0.04492176324129105, \"3X\": 1.47635805606842}, \"VibrateY\": {\"1X\": 1.47635805606842, \"2X\": 0.04492176324129105, \"3X\": 1.47635805606842}, \"diagnosis\": \"机械不存在故障\"}";
        JSONObject jsonObject = JSON.parseObject(a);
        JsonObject e = (JsonObject) jsonObject.get("RunoutX");
    }

}
