<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.rongwei.sfcommon.sys.dao.PointCheckDao">

    <select id="getExcelDataByids" resultType="com.rongwe.scentity.vo.PointCheckVo">
        SELECT
        a.*,
        b.CHECKITEMNAME,
        b.CHECKITEMCODE,
        c.NAME AS TEMPLATETYPENAME,
        d.NAME AS SHIFTNAME,
        e.NAME AS CLOSINGDOWNNAME,
        f.NAME AS CHECKRESULTNAME,
        DATE_FORMAT(a.CHECKTIME, '%Y-%m-%d %H:%i:%s') CHECKTIMESTR
        FROM
            asp_point_check a
             LEFT JOIN asp_check_items b ON a.CHECKITEMID = b.id and b.DELETED='0'
             left join sys_dict c on c.DICTTYPE='template-type' and c.VALUE = a.TEMPLATETYPE and c.DELETED='0'
              left join sys_dict d on d.DICTTYPE='check-shift' and d.VALUE = a.SHIFT and d.DELETED='0'
           left join sys_dict e on e.DICTTYPE='YORN' and e.VALUE = a.CLOSINGDOWN and e.DELETED='0'
          left join sys_dict f on f.DICTTYPE='asp_check_result' and f.VALUE = a.CHECKRESULT and f.DELETED='0'
        <where>
            a.DELETED='0'
            AND a.ID in
            <foreach collection="ids" item="id" open="(" close=")" separator=",">
                #{id}
            </foreach>
        </where>




    </select>
</mapper>
