# RunCardQueryInfoMapper.java

    package com.mycim.server.wip.dao.mapper;

    import java.sql.Clob;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.util.HashMap;
    import java.util.Map;

    import com.mycim.framework.jdbc.mapper.RowMapper;

    public class RunCardQueryInfoMapper implements RowMapper<Map<String, Object>> {

        private final int countLot;

        public RunCardQueryInfoMapper(int countLot){
            this.countLot = countLot;
        }

        @Override
        public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException {
            Map<String, Object> dataMap = new HashMap<String, Object>();
            dataMap.put("lotCount", countLot);

            dataMap.put("lotRRN", rs.getString("LOT_RRN"));
            dataMap.put("showLotId", rs.getString("SHOW_LOT_ID"));
            dataMap.put("lotID", rs.getString("LOT_ID"));
            dataMap.put("mainLotId", rs.getString("MAIN_LOT_ID"));
            dataMap.put("comments", rs.getString("OPERATOR_COMMENTS"));

            dataMap.put("runcardRrn", rs.getLong("RUNCARD_RRN"));
            dataMap.put("lotStatus", rs.getString("LOT_STATUS"));
            dataMap.put("qty1", rs.getInt("QTY1")); // 数量
            Clob outStr = rs.getClob("RUNCARD_ID_H");
            if (outStr != null) {
                dataMap.put("runcardIdHistory", outStr.getSubString(1L, (int) outStr.length()));
            } else {
                dataMap.put("runcardIdHistory", "");
            }

            outStr = rs.getClob("RUNCARD_RRN_H");
            if (outStr != null) {
                dataMap.put("runcardRrnHistory", outStr.getSubString(1L, (int) outStr.length()));
            } else {
                dataMap.put("runcardRrnHistory", "");
            }
            dataMap.put("recipeID", rs.getString("RECIPE_ID"));
            dataMap.put("carrierId", rs.getString("CARRIER_ID"));
            dataMap.put("eqptId", rs.getString("EQPT_ID"));
            dataMap.put("eqpGroupRrn", rs.getString("EQPT_GROUP_RRN"));
            // dataMap.put("timeLimit", rs.getString("Q_TIME"));

            dataMap.put("workArea", rs.getString("WORK_AREA"));
            dataMap.put("eqptGroupId", rs.getString("EQPT_GROUP_ID"));
            dataMap.put("subStatus", rs.getString("SUB_STATUS"));
            dataMap.put("stageID", rs.getString("STAGE_ID"));

            return dataMap;
        }

    }