package com.rongwei.savecheck.controller;

import com.rongwei.rwcommon.base.R;
import com.rongwei.sfcommon.sys.service.impl.SpecialInspectionServiceImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * SpecialInspectionController class
 *
 * @author XH
 * @date 2024/08/20
 */
@RestController
@RequestMapping("/special/inspection")
public class SpecialInspectionController {
    private final Logger log = LoggerFactory.getLogger(this.getClass().getName());
    @Autowired
    private SpecialInspectionServiceImpl specialInspectionService;
    /**
     * 生成隐患排查任务
     *
     * @param map
     * @return
     */
    @GetMapping("/create/task/{id}")
    public R createTask(@PathVariable(name = "id") String id) {
        log.info("根据模板: {}生成隐患排查任务", id);
        return specialInspectionService.createHiddenDangerTrack(id);
    }
}
