package org.nl.acs.common;

import com.alibaba.fastjson.JSONObject;
import org.nl.acs.device.domain.Device;
import org.nl.acs.device_driver.basedriver.standard_inspect_site.StandardInspectSiteDeviceDriver;
import org.springframework.stereotype.Service;

/**
 * @author geng by
 * 检测站点
 */
@Service("standard_inspect_site")
public class StandardInspectSiteDevice extends AbstractDriverService {
    @Override
    public JSONObject getDeviceInfo(Device device) {
        StandardInspectSiteDeviceDriver standardInspectSiteDevicedriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver();
        JSONObject jo = super.getCommonDeviceInfo(standardInspectSiteDevicedriver, 0, 0);
        jo.put("error", standardInspectSiteDevicedriver.getError());
        jo.put("isError", standardInspectSiteDevicedriver.getIserror());
        jo.put("container", standardInspectSiteDevicedriver.getContainer());
        jo.put("message", standardInspectSiteDevicedriver.getMessage());
        return jo;
    }
}
