package com.persagy.server.models.mappers

import com.persagy.server.models.labsl.EquipClassCode
import org.apache.ibatis.annotations.Mapper
import org.apache.ibatis.annotations.Param
import org.apache.ibatis.annotations.Select
import org.springframework.stereotype.Repository

/**
 *
 *
 * @author wx  <zhangweixin@sagacloud.com>
 * @date  2020/10/20 22:01
 */
@Mapper
@Repository
interface CustomSqlLabsl {
    /** 统计项目下设备类型 */
    @Select("SELECT class_code AS classCode  FROM equipment WHERE project_id = #{projectId} and CHAR_LENGTH(class_code) = 6 GROUP BY class_code")
    fun equipType(@Param("projectId") projectId: String):ArrayList<EquipClassCode>

    /** 统计项目下空间类型 */
    @Select("SELECT class_code AS classCode   FROM zone_space_base WHERE project_id = #{projectId}  GROUP BY class_code")
    fun spaceType(@Param("projectId") projectId: String):ArrayList<EquipClassCode>




}