# AutoMonitorJobHistoryMapper.java

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

    import com.mycim.framework.jdbc.mapper.RowMapper;
    import com.mycim.framework.utils.lang.collections.MapUtils;
    import com.mycim.valueobject.automonitor.entity.AutoMonitorUnitInfo;
    import com.mycim.valueobject.consts.DataBaseNames;

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

    /**
     * @author yangkeren
     * @date 2022/3/18
     **/
    public class AutoMonitorJobHistoryMapper implements RowMapper<Map<String,Object>> {

        Map<String,Object> historyInfo;

        @Override
        public Map<String,Object> mapRow(ResultSet rs, int rowNum) throws SQLException {
            historyInfo = MapUtils.newHashMap();

            historyInfo.put("transRrn",rs.getLong("TRANS_RRN"));
            historyInfo.put("transId",rs.getString("TRANS_ID"));
            historyInfo.put("transTime",rs.getTimestamp("TRANS_TIME"));
            historyInfo.put("transUserId",rs.getString("TRANS_USER_ID"));
            historyInfo.put("transComments",rs.getString("TRANS_COMMENTS"));
            historyInfo.put("lotRrn",rs.getLong("LOT_RRN"));
            historyInfo.put("lotId",rs.getString("LOT_ID"));
            historyInfo.put("baseLotRrn",rs.getLong("BASE_LOT_RRN"));
            historyInfo.put("baseLotId",rs.getString("BASE_LOT_ID"));
            historyInfo.put("qty",rs.getInt("QTY1"));
            historyInfo.put("eqptRrn",rs.getLong("EQUIPMENT_RRN"));
            historyInfo.put("eqptId",rs.getString("EQUIPMENT_ID"));
            historyInfo.put("itemType",rs.getString("ITEM_TYPE"));
            historyInfo.put("processRrn",rs.getLong("PROCESS_RRN"));
            historyInfo.put("processId",rs.getString("PROCESS_ID"));
            historyInfo.put("processVersion",rs.getInt("PROCESS_VERSION"));
            historyInfo.put("productRrn",rs.getLong("PRODUCT_RRN"));
            historyInfo.put("productId",rs.getString("PRODUCT_ID"));
            historyInfo.put("jobStatus",rs.getString("JOB_STATUS"));
            historyInfo.put("workflowRrn",rs.getLong("WORKFLOW_RRN"));
            historyInfo.put("workflowVersion",rs.getInt("WORKFLOW_VERSION"));
            historyInfo.put("workflowId",rs.getString("WORKFLOW_ID"));
            historyInfo.put("wflStep",rs.getString("WFL_STEP"));
            historyInfo.put("mergeWflStep",rs.getString("MERGE_WFL_STEP"));
            historyInfo.put("monitorCarrierRrn",rs.getLong("MONITOR_CARRIER_RRN"));
            historyInfo.put("monitorCarrierId",rs.getString("MONITOR_CARRIER_ID"));
            historyInfo.put("carrierRrn",rs.getLong("CARRIER_RRN"));
            historyInfo.put("carrierId",rs.getString("CARRIER_ID"));

            return historyInfo;
        }

    }