package com.ld.igds.inout.dto; import org.springframework.jdbc.core.RowMapper; import com.ld.igds.constant.FoodVariety; import java.sql.ResultSet; import java.sql.SQLException; public class ReportFoodVarietyRowMapper implements RowMapper { @Override public ReportInoutDepotData mapRow(ResultSet rs, int rowNum) throws SQLException { ReportInoutDepotData d = new ReportInoutDepotData(); d.setFoodType(rs.getString("foodType")); d.setFoodVariety(rs.getString("foodVariety")); d.setCqkc(rs.getDouble("cqkc")); d.setInNum(rs.getDouble("inNum")); d.setOverNum(rs.getDouble("overNum")); d.setInSum(rs.getDouble("inSum")); d.setOutNum(rs.getDouble("outNum")); d.setLossNum(rs.getDouble("lossNum")); d.setOutSum(rs.getDouble("outSum")); d.setQmkc(rs.getDouble("qmkc")); d.setFoodVarietyName(FoodVariety.getMsg(rs.getString("foodVariety"))); return d; } }