| | |
| | | <mapper namespace="com.yuanchu.mom.mapper.WarehouseCellMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.WarehouseCell"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="row" column="row" jdbcType="INTEGER"/> |
| | | <result property="col" column="col" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="state" column="state" jdbcType="INTEGER"/> |
| | | <result property="shelfId" column="shelf_id" jdbcType="INTEGER"/> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="row" column="row" jdbcType="INTEGER"/> |
| | | <result property="col" column="col" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="state" column="state" jdbcType="INTEGER"/> |
| | | <result property="shelfId" column="shelf_id" jdbcType="INTEGER"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,row,col, |
| | | create_time,update_time,create_user, |
| | | update_user,state,shelf_id |
| | | </sql> |
| | | <select id="getWarehouse" resultMap="WarehouseCellAndHistoryDto"> |
| | | select wc.id, wc.row, wc.col, i.id sampleId, i.sample, i.model, i.sample_code from warehouse_cell wc |
| | | left join ins_sample i on i.cell_id = wc.id |
| | | where wc.state = 1 |
| | | and wc.shelf_id = #{shelfId} |
| | | order by wc.id |
| | | </select> |
| | | |
| | | <resultMap id="WarehouseCellAndHistoryDto" type="com.yuanchu.mom.dto.WarehouseCellAndSampleDto"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="row" column="row" jdbcType="INTEGER"/> |
| | | <result property="col" column="col" jdbcType="INTEGER"/> |
| | | <collection property="samples" resultMap="InsSample"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="InsSample" type="com.yuanchu.mom.pojo.InsSample"> |
| | | <id property="id" column="sampleId"/> |
| | | <result property="sample" column="sample"/> |
| | | <result property="model" column="model"/> |
| | | <result property="sampleCode" column="sample_code"/> |
| | | </resultMap> |
| | | </mapper> |