zss
2025-03-06 fd7bc95a3c91fb7d90a921b0ff762fa6095fabd1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?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.ruoyi.inspect.mapper.WarehouseCellMapper">
 
    <resultMap id="BaseResultMap" type="com.ruoyi.inspect.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"/>
    </resultMap>
 
    <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.ruoyi.inspect.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.ruoyi.inspect.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>