<?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.xisc.pm.infra.mapper.QdToLineupResultSizingMapper">


    <sql id = "BaseSql">
    QTLRS.LRS_ID,
    QTLRS.ORDER_NO,
    QTLRS.WHOLE_BACKLOG_NO,
    QTLRS.WHOLE_BACKLOG_SEQ,
    QTLRS.WHOLE_BACKLOG,
    QTLRS.MSC_LINE_NO,
    QTLRS.MSC,
    QTLRS.WORK_SPECIAL_REQ,
    QTLRS.TAIL_TEST_MARK,
    QTLRS.SAMPLE_MODE_CODE,
    QTLRS.COOL_CODE,
    QTLRS.ULT_DETECT_METHOD_CODE,
    QTLRS.ULT_DETECT_SST,
    QTLRS.STD_TEST_BLOCK,
    QTLRS.COUPLING_MEDIA,
    QTLRS.ULT_DETECTOR_TYPE,
    QTLRS.ULT_DETECT_EQUIP,
    QTLRS.ULT_CODE,
    QTLRS.ULT_POS_CODE,
    QTLRS.ULT_CHECK_CODE,
    QTLRS.ULT_PD_CODE,
    QTLRS.UT_PIC,
    QTLRS.ULT_DETECT_REPORT,
    QTLRS.ULT_DETECT_MANAGE,
    QTLRS.MAG_DETECT_STD_CODE,
    QTLRS.MAG_DETECT_POS_CODE,
    QTLRS.MT_DETECT_STD_CODE,
    QTLRS.MT_DETECT_POS_CODE,
    QTLRS.CUT_MODE_CODE,
    QTLRS.G_FLAG,
    QTLRS.CS_FLAG,
    QTLRS.DSS_FLAG,
    QTLRS.SS_FLAG,
    QTLRS.DS_FLAG,
    QTLRS.WARM_CUT_CODE,
    QTLRS.HEAD_CUT,
    QTLRS.TAIL_CUT,
    QTLRS.SF_REPAIR_FLAG,
    QTLRS.GRINDING_WHEEL,
    QTLRS.SURF_MODE,
    QTLRS.SURF_AREA,
    QTLRS.SURF_DEPTH,
    QTLRS.SURF_NORM_CODE,
    QTLRS.WELD_RP_FLAG,
    QTLRS.CHECK_DIR,
    QTLRS.SURF_CHECK_NORM,
    QTLRS.CUT_CHECK_NORM,
    QTLRS.FLAT_CHECK_NORM,
    QTLRS.LMT_TOL_MAX,
    QTLRS.PLAT_MEASURE_MODE_CODE,
    QTLRS.PLAT_MEASURE_LEN_CODE,
    QTLRS.PLAT_DIRECT_CODE,
    QTLRS.PLAT_INDEX,
    QTLRS.PLAT_MEASURE_MODE_CODE2,
    QTLRS.PLAT_MEASURE_LEN_CODE2,
    QTLRS.PLAT_DIRECT_CODE2,
    QTLRS.PLAT_INDEX2,
    QTLRS.PLATE_CROWN,
    QTLRS.PLUS_FLAG,
    QTLRS.PA_MEASURE_MODE_CODE,
    QTLRS.PA_INDEX,
    QTLRS.DA_MEASURE_MODE_CODE,
    QTLRS.DA_INDEX,
    QTLRS.MAX_LATERAL_BEND,
    QTLRS.MAX_MEASURE_LEN,
    QTLRS.MIN_MEASURE_LEN,
    QTLRS.DIAGONAL_MIN,
    QTLRS.DIAGONAL_MAX,
    QTLRS.UNIT_TOWER_MAX,
    QTLRS.TOTAL_TOWER_MAX,
    QTLRS.LABEL_PLACE_CODE,
    QTLRS.PRINT_MODE,
    QTLRS.P_SIDE_SPRAY_MODE,
    QTLRS.METRIC_OR_ENG_FLAG,
    QTLRS.DOME_EXPT_MARK,
    QTLRS.PRINT_TYPE,
    QTLRS.FACE_PRINT_DETAIL_A,
    QTLRS.FACE_PRINT_DETAIL_B,
    QTLRS.FACE_PRINT_DETAIL_C,
    QTLRS.FACE_PRINT_DETAIL_D,
    QTLRS.FACE_PRINT_DETAIL_E,
    QTLRS.FACE_PRINT_DETAIL_F,
    QTLRS.FACE_PRINT_DETAIL_G,
    QTLRS.FACE_PRINT_DETAIL_H,
    QTLRS.SIDE_PRINT_DETAIL_A,
    QTLRS.SIDE_PRINT_DETAIL_B,
    QTLRS.STAMP_PRINT_DETAIL_A,
    QTLRS.STAMP_PRINT_DETAIL_B,
    QTLRS.STAMP_PRINT_DETAIL_C,
    QTLRS.STAMP_PRINT_DETAIL_D,
    QTLRS.YS_STAND,
    QTLRS.YS_REMARK,
    QTLRS.TS_STAND,
    QTLRS.TS_REMARK,
    QTLRS.TS_MAX,
    QTLRS.TS_MIN,
    QTLRS.HARDNESS_AIM,
    QTLRS.TENANT_ID,
    QTLRS.ATTRIBUTE1,
    QTLRS.ATTRIBUTE2,
    QTLRS.ATTRIBUTE3,
    QTLRS.ATTRIBUTE4,
    QTLRS.ATTRIBUTE5,
    QTLRS.creation_date,    QTLRS.created_by,    QTLRS.last_updated_by,    QTLRS.last_update_date,    QTLRS.object_version_number
    </sql>

    <select id = "selectList" resultType = "com.xisc.pm.domain.vo.QdToLineupResultSizingVO1">
        select
        <include refid = "BaseSql"/>
        from QD_TO_LINEUP_RESULT_SIZING QTLRS
        <where>
            <if test="lrsId !=null">
                and QTLRS.LRS_ID = #{lrsId,jdbcType = INTEGER}
            </if>
            <if test="orderNo !=null">
                and QTLRS.ORDER_NO = #{orderNo,jdbcType = VARCHAR}
            </if>
            <if test="wholeBacklogNo !=null">
                and QTLRS.WHOLE_BACKLOG_NO = #{wholeBacklogNo,jdbcType = INTEGER}
            </if>
            <if test="wholeBacklogSeq !=null">
                and QTLRS.WHOLE_BACKLOG_SEQ = #{wholeBacklogSeq,jdbcType = INTEGER}
            </if>
            <if test="wholeBacklog !=null">
                and QTLRS.WHOLE_BACKLOG = #{wholeBacklog,jdbcType = VARCHAR}
            </if>
            <if test="mscLineNo !=null">
                and QTLRS.MSC_LINE_NO = #{mscLineNo,jdbcType = VARCHAR}
            </if>
            <if test="msc !=null">
                and QTLRS.MSC = #{msc,jdbcType = VARCHAR}
            </if>
            <if test="workSpecialReq !=null">
                and QTLRS.WORK_SPECIAL_REQ = #{workSpecialReq,jdbcType = VARCHAR}
            </if>
            <if test="tailTestMark !=null">
                and QTLRS.TAIL_TEST_MARK = #{tailTestMark,jdbcType = VARCHAR}
            </if>
            <if test="sampleModeCode !=null">
                and QTLRS.SAMPLE_MODE_CODE = #{sampleModeCode,jdbcType = VARCHAR}
            </if>
            <if test="coolCode !=null">
                and QTLRS.COOL_CODE = #{coolCode,jdbcType = VARCHAR}
            </if>
            <if test="ultDetectMethodCode !=null">
                and QTLRS.ULT_DETECT_METHOD_CODE = #{ultDetectMethodCode,jdbcType = VARCHAR}
            </if>
            <if test="ultDetectSst !=null">
                and QTLRS.ULT_DETECT_SST = #{ultDetectSst,jdbcType = VARCHAR}
            </if>
            <if test="stdTestBlock !=null">
                and QTLRS.STD_TEST_BLOCK = #{stdTestBlock,jdbcType = INTEGER}
            </if>
            <if test="couplingMedia !=null">
                and QTLRS.COUPLING_MEDIA = #{couplingMedia,jdbcType = VARCHAR}
            </if>
            <if test="ultDetectorType !=null">
                and QTLRS.ULT_DETECTOR_TYPE = #{ultDetectorType,jdbcType = VARCHAR}
            </if>
            <if test="ultDetectEquip !=null">
                and QTLRS.ULT_DETECT_EQUIP = #{ultDetectEquip,jdbcType = VARCHAR}
            </if>
            <if test="ultCode !=null">
                and QTLRS.ULT_CODE = #{ultCode,jdbcType = VARCHAR}
            </if>
            <if test="ultPosCode !=null">
                and QTLRS.ULT_POS_CODE = #{ultPosCode,jdbcType = VARCHAR}
            </if>
            <if test="ultCheckCode !=null">
                and QTLRS.ULT_CHECK_CODE = #{ultCheckCode,jdbcType = VARCHAR}
            </if>
            <if test="ultPdCode !=null">
                and QTLRS.ULT_PD_CODE = #{ultPdCode,jdbcType = VARCHAR}
            </if>
            <if test="utPic !=null">
                and QTLRS.UT_PIC = #{utPic,jdbcType = VARCHAR}
            </if>
            <if test="ultDetectReport !=null">
                and QTLRS.ULT_DETECT_REPORT = #{ultDetectReport,jdbcType = VARCHAR}
            </if>
            <if test="ultDetectManage !=null">
                and QTLRS.ULT_DETECT_MANAGE = #{ultDetectManage,jdbcType = VARCHAR}
            </if>
            <if test="magDetectStdCode !=null">
                and QTLRS.MAG_DETECT_STD_CODE = #{magDetectStdCode,jdbcType = VARCHAR}
            </if>
            <if test="magDetectPosCode !=null">
                and QTLRS.MAG_DETECT_POS_CODE = #{magDetectPosCode,jdbcType = VARCHAR}
            </if>
            <if test="mtDetectStdCode !=null">
                and QTLRS.MT_DETECT_STD_CODE = #{mtDetectStdCode,jdbcType = VARCHAR}
            </if>
            <if test="mtDetectPosCode !=null">
                and QTLRS.MT_DETECT_POS_CODE = #{mtDetectPosCode,jdbcType = VARCHAR}
            </if>
            <if test="cutModeCode !=null">
                and QTLRS.CUT_MODE_CODE = #{cutModeCode,jdbcType = VARCHAR}
            </if>
            <if test="gFlag !=null">
                and QTLRS.G_FLAG = #{gFlag,jdbcType = VARCHAR}
            </if>
            <if test="csFlag !=null">
                and QTLRS.CS_FLAG = #{csFlag,jdbcType = VARCHAR}
            </if>
            <if test="dssFlag !=null">
                and QTLRS.DSS_FLAG = #{dssFlag,jdbcType = VARCHAR}
            </if>
            <if test="ssFlag !=null">
                and QTLRS.SS_FLAG = #{ssFlag,jdbcType = VARCHAR}
            </if>
            <if test="dsFlag !=null">
                and QTLRS.DS_FLAG = #{dsFlag,jdbcType = VARCHAR}
            </if>
            <if test="warmCutCode !=null">
                and QTLRS.WARM_CUT_CODE = #{warmCutCode,jdbcType = VARCHAR}
            </if>
            <if test="headCut !=null">
                and QTLRS.HEAD_CUT = #{headCut,jdbcType = INTEGER}
            </if>
            <if test="tailCut !=null">
                and QTLRS.TAIL_CUT = #{tailCut,jdbcType = INTEGER}
            </if>
            <if test="sfRepairFlag !=null">
                and QTLRS.SF_REPAIR_FLAG = #{sfRepairFlag,jdbcType = VARCHAR}
            </if>
            <if test="grindingWheel !=null">
                and QTLRS.GRINDING_WHEEL = #{grindingWheel,jdbcType = INTEGER}
            </if>
            <if test="surfMode !=null">
                and QTLRS.SURF_MODE = #{surfMode,jdbcType = VARCHAR}
            </if>
            <if test="surfArea !=null">
                and QTLRS.SURF_AREA = #{surfArea,jdbcType = INTEGER}
            </if>
            <if test="surfDepth !=null">
                and QTLRS.SURF_DEPTH = #{surfDepth,jdbcType = INTEGER}
            </if>
            <if test="surfNormCode !=null">
                and QTLRS.SURF_NORM_CODE = #{surfNormCode,jdbcType = VARCHAR}
            </if>
            <if test="weldRpFlag !=null">
                and QTLRS.WELD_RP_FLAG = #{weldRpFlag,jdbcType = VARCHAR}
            </if>
            <if test="checkDir !=null">
                and QTLRS.CHECK_DIR = #{checkDir,jdbcType = VARCHAR}
            </if>
            <if test="surfCheckNorm !=null">
                and QTLRS.SURF_CHECK_NORM = #{surfCheckNorm,jdbcType = VARCHAR}
            </if>
            <if test="cutCheckNorm !=null">
                and QTLRS.CUT_CHECK_NORM = #{cutCheckNorm,jdbcType = VARCHAR}
            </if>
            <if test="flatCheckNorm !=null">
                and QTLRS.FLAT_CHECK_NORM = #{flatCheckNorm,jdbcType = VARCHAR}
            </if>
            <if test="lmtTolMax !=null">
                and QTLRS.LMT_TOL_MAX = #{lmtTolMax,jdbcType = INTEGER}
            </if>
            <if test="platMeasureModeCode !=null">
                and QTLRS.PLAT_MEASURE_MODE_CODE = #{platMeasureModeCode,jdbcType = VARCHAR}
            </if>
            <if test="platMeasureLenCode !=null">
                and QTLRS.PLAT_MEASURE_LEN_CODE = #{platMeasureLenCode,jdbcType = VARCHAR}
            </if>
            <if test="platDirectCode !=null">
                and QTLRS.PLAT_DIRECT_CODE = #{platDirectCode,jdbcType = VARCHAR}
            </if>
            <if test="platIndex !=null">
                and QTLRS.PLAT_INDEX = #{platIndex,jdbcType = INTEGER}
            </if>
            <if test="platMeasureModeCode2 !=null">
                and QTLRS.PLAT_MEASURE_MODE_CODE2 = #{platMeasureModeCode2,jdbcType = VARCHAR}
            </if>
            <if test="platMeasureLenCode2 !=null">
                and QTLRS.PLAT_MEASURE_LEN_CODE2 = #{platMeasureLenCode2,jdbcType = VARCHAR}
            </if>
            <if test="platDirectCode2 !=null">
                and QTLRS.PLAT_DIRECT_CODE2 = #{platDirectCode2,jdbcType = VARCHAR}
            </if>
            <if test="platIndex2 !=null">
                and QTLRS.PLAT_INDEX2 = #{platIndex2,jdbcType = INTEGER}
            </if>
            <if test="plateCrown !=null">
                and QTLRS.PLATE_CROWN = #{plateCrown,jdbcType = INTEGER}
            </if>
            <if test="plusFlag !=null">
                and QTLRS.PLUS_FLAG = #{plusFlag,jdbcType = VARCHAR}
            </if>
            <if test="paMeasureModeCode !=null">
                and QTLRS.PA_MEASURE_MODE_CODE = #{paMeasureModeCode,jdbcType = VARCHAR}
            </if>
            <if test="paIndex !=null">
                and QTLRS.PA_INDEX = #{paIndex,jdbcType = INTEGER}
            </if>
            <if test="daMeasureModeCode !=null">
                and QTLRS.DA_MEASURE_MODE_CODE = #{daMeasureModeCode,jdbcType = VARCHAR}
            </if>
            <if test="daIndex !=null">
                and QTLRS.DA_INDEX = #{daIndex,jdbcType = INTEGER}
            </if>
            <if test="maxLateralBend !=null">
                and QTLRS.MAX_LATERAL_BEND = #{maxLateralBend,jdbcType = INTEGER}
            </if>
            <if test="maxMeasureLen !=null">
                and QTLRS.MAX_MEASURE_LEN = #{maxMeasureLen,jdbcType = INTEGER}
            </if>
            <if test="minMeasureLen !=null">
                and QTLRS.MIN_MEASURE_LEN = #{minMeasureLen,jdbcType = INTEGER}
            </if>
            <if test="diagonalMin !=null">
                and QTLRS.DIAGONAL_MIN = #{diagonalMin,jdbcType = INTEGER}
            </if>
            <if test="diagonalMax !=null">
                and QTLRS.DIAGONAL_MAX = #{diagonalMax,jdbcType = INTEGER}
            </if>
            <if test="unitTowerMax !=null">
                and QTLRS.UNIT_TOWER_MAX = #{unitTowerMax,jdbcType = INTEGER}
            </if>
            <if test="totalTowerMax !=null">
                and QTLRS.TOTAL_TOWER_MAX = #{totalTowerMax,jdbcType = INTEGER}
            </if>
            <if test="labelPlaceCode !=null">
                and QTLRS.LABEL_PLACE_CODE = #{labelPlaceCode,jdbcType = VARCHAR}
            </if>
            <if test="printMode !=null">
                and QTLRS.PRINT_MODE = #{printMode,jdbcType = VARCHAR}
            </if>
            <if test="pSideSprayMode !=null">
                and QTLRS.P_SIDE_SPRAY_MODE = #{pSideSprayMode,jdbcType = VARCHAR}
            </if>
            <if test="metricOrEngFlag !=null">
                and QTLRS.METRIC_OR_ENG_FLAG = #{metricOrEngFlag,jdbcType = VARCHAR}
            </if>
            <if test="domeExptMark !=null">
                and QTLRS.DOME_EXPT_MARK = #{domeExptMark,jdbcType = VARCHAR}
            </if>
            <if test="printType !=null">
                and QTLRS.PRINT_TYPE = #{printType,jdbcType = INTEGER}
            </if>
            <if test="facePrintDetailA !=null">
                and QTLRS.FACE_PRINT_DETAIL_A = #{facePrintDetailA,jdbcType = VARCHAR}
            </if>
            <if test="facePrintDetailB !=null">
                and QTLRS.FACE_PRINT_DETAIL_B = #{facePrintDetailB,jdbcType = VARCHAR}
            </if>
            <if test="facePrintDetailC !=null">
                and QTLRS.FACE_PRINT_DETAIL_C = #{facePrintDetailC,jdbcType = VARCHAR}
            </if>
            <if test="facePrintDetailD !=null">
                and QTLRS.FACE_PRINT_DETAIL_D = #{facePrintDetailD,jdbcType = VARCHAR}
            </if>
            <if test="facePrintDetailE !=null">
                and QTLRS.FACE_PRINT_DETAIL_E = #{facePrintDetailE,jdbcType = VARCHAR}
            </if>
            <if test="facePrintDetailF !=null">
                and QTLRS.FACE_PRINT_DETAIL_F = #{facePrintDetailF,jdbcType = VARCHAR}
            </if>
            <if test="facePrintDetailG !=null">
                and QTLRS.FACE_PRINT_DETAIL_G = #{facePrintDetailG,jdbcType = VARCHAR}
            </if>
            <if test="facePrintDetailH !=null">
                and QTLRS.FACE_PRINT_DETAIL_H = #{facePrintDetailH,jdbcType = VARCHAR}
            </if>
            <if test="sidePrintDetailA !=null">
                and QTLRS.SIDE_PRINT_DETAIL_A = #{sidePrintDetailA,jdbcType = VARCHAR}
            </if>
            <if test="sidePrintDetailB !=null">
                and QTLRS.SIDE_PRINT_DETAIL_B = #{sidePrintDetailB,jdbcType = VARCHAR}
            </if>
            <if test="stampPrintDetailA !=null">
                and QTLRS.STAMP_PRINT_DETAIL_A = #{stampPrintDetailA,jdbcType = VARCHAR}
            </if>
            <if test="stampPrintDetailB !=null">
                and QTLRS.STAMP_PRINT_DETAIL_B = #{stampPrintDetailB,jdbcType = VARCHAR}
            </if>
            <if test="stampPrintDetailC !=null">
                and QTLRS.STAMP_PRINT_DETAIL_C = #{stampPrintDetailC,jdbcType = VARCHAR}
            </if>
            <if test="stampPrintDetailD !=null">
                and QTLRS.STAMP_PRINT_DETAIL_D = #{stampPrintDetailD,jdbcType = VARCHAR}
            </if>
            <if test="ysStand !=null">
                and QTLRS.YS_STAND = #{ysStand,jdbcType = INTEGER}
            </if>
            <if test="ysRemark !=null">
                and QTLRS.YS_REMARK = #{ysRemark,jdbcType = VARCHAR}
            </if>
            <if test="tsStand !=null">
                and QTLRS.TS_STAND = #{tsStand,jdbcType = INTEGER}
            </if>
            <if test="tsRemark !=null">
                and QTLRS.TS_REMARK = #{tsRemark,jdbcType = VARCHAR}
            </if>
            <if test="tsMax !=null">
                and QTLRS.TS_MAX = #{tsMax,jdbcType = INTEGER}
            </if>
            <if test="tsMin !=null">
                and QTLRS.TS_MIN = #{tsMin,jdbcType = INTEGER}
            </if>
            <if test="hardnessAim !=null">
                and QTLRS.HARDNESS_AIM = #{hardnessAim,jdbcType = INTEGER}
            </if>
            <if test="tenantId !=null">
                and QTLRS.TENANT_ID = #{tenantId,jdbcType = INTEGER}
            </if>
            <if test="attribute1 !=null">
                and QTLRS.ATTRIBUTE1 = #{attribute1,jdbcType = VARCHAR}
            </if>
            <if test="attribute2 !=null">
                and QTLRS.ATTRIBUTE2 = #{attribute2,jdbcType = VARCHAR}
            </if>
            <if test="attribute3 !=null">
                and QTLRS.ATTRIBUTE3 = #{attribute3,jdbcType = VARCHAR}
            </if>
            <if test="attribute4 !=null">
                and QTLRS.ATTRIBUTE4 = #{attribute4,jdbcType = VARCHAR}
            </if>
            <if test="attribute5 !=null">
                and QTLRS.ATTRIBUTE5 = #{attribute5,jdbcType = VARCHAR}
            </if>
        </where>
    </select>
</mapper>
