package com.rongwei.sfcommon.sys.dao;

import com.rongwe.scentity.domian.AccidentTrackPlanDo;
import com.rongwe.scentity.vo.AccidentTrackPlanVo;
import com.rongwei.rwcommon.base.BaseDao;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 事故跟踪计划表
 *
 * @author chglee
 * @email 1992lcg@163.com
 * @date 2020-08-04 18:39:10
 */
public interface AccidentTrackPlanDao extends BaseDao<AccidentTrackPlanDo> {
    @Select("SELECT\n" +
            "\ta.*,\n" +
            "\tb.FINISHDATE \n" +
            "FROM\n" +
            "\tasp_accident_track_plan a\n" +
            "\tLEFT JOIN asp_hidden_danger_track b ON a.ID = b.RELATIONID \n" +
            "\tAND b.`STATUS` = '10' \n" +
            "\tAND b.DELETED = '0' \n" +
            "WHERE\n" +
            "\ta.DELETED = '0' \n" +
            "\tAND a.ACCIDENTID = #{id}")
    List<AccidentTrackPlanVo> getByAccidentId(String id);
}
