package iot.lidee.controller.bygz;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import iot.lidee.common.core.domain.AjaxResult;
import iot.lidee.iot.service.IDeviceMaintenanceRepairService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags = "物联组态")
@RestController
@RequestMapping("/iot/configuration")
public class DeviceMaintenanceRepairController {
    @Resource
    private IDeviceMaintenanceRepairService deviceMaintenanceRepairService;


    /**
     * 组态设备保养列表
     */
    @ApiOperation("设备保养")
    @GetMapping("/maintenanceList")
    public AjaxResult maintenanceList(String devtype) {
        return AjaxResult.success(deviceMaintenanceRepairService.maintenanceList(devtype));
    }


    /**
     * 组态设备维修列表
     */
    @ApiOperation("设备维修")
    @GetMapping("/repairList")
    public AjaxResult repairList(String devtype) {
        return AjaxResult.success(deviceMaintenanceRepairService.repairList(devtype));
    }


    /**
     * 组态设备列表
     */
    @ApiOperation("设备列表")
    @GetMapping("/deviceList")
    public AjaxResult deviceList(String devtype) {
        return AjaxResult.success(deviceMaintenanceRepairService.deviceList(devtype));
    }


}
