package com.persagy.server.dao.mappers.wanda

import com.persagy.server.models.wanda.EquipTypeProject
import org.apache.ibatis.annotations.Mapper
import org.apache.ibatis.annotations.Select
import org.springframework.stereotype.Repository

/**
 * 自定义 SQL
 *
 * @author wx  <zhangweixin@sagacloud.com>
 * @date  2021/2/6 11:02
 */
@Mapper
@Repository
interface PersonnalisationSql {


    @Select("SELECT class_code as classCode FROM equipment WHERE project_id = #{projectId} GROUP BY class_code")
    fun equipTypeProject(projectId: String): ArrayList<EquipTypeProject>

    @Select("SELECT class_code as classCode FROM general_system WHERE project_id =  #{projectId} GROUP BY class_code")
    fun systemTypeProject(projectId: String): ArrayList<EquipTypeProject>
}