#
lsh
2024-06-07 b8a86cca79e784b97cfab3ec4506b4536497a4fb
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?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.zy.asrs.mapper.WrkMastSplitTwinMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.zy.asrs.entity.WrkMastSplitTwin">
        <id column="id" property="id" />
        <result column="wrk_no" property="wrkNo" />
        <result column="create_time" property="createTime" />
        <result column="update_time" property="updateTime" />
        <result column="type" property="type" />
        <result column="wrk_sts" property="wrkSts" />
        <result column="line_number" property="lineNumber" />
        <result column="wrk_type" property="wrkType" />
        <result column="bign_time" property="bignTime" />
        <result column="crn_no" property="crnNo" />
        <result column="wrk_start" property="wrkStart" />
        <result column="wrk_end" property="wrkEnd" />
        <result column="start_row" property="startRow" />
        <result column="start_bay" property="startBay" />
        <result column="start_lev" property="startLev" />
        <result column="end_row" property="endRow" />
        <result column="end_bay" property="endBay" />
        <result column="end_lev" property="endLev" />
        <result column="io_type" property="ioType" />
 
    </resultMap>
 
    <sql id="batchSeq">
        <if test="type != null">
            and type = #{type}
        </if>
        <if test="ioType != null">
            and io_type = #{ioType}
        </if>
        <if test="wrkType != null">
            and wrk_type = #{wrkType}
        </if>
        <if test="wrkSts != null">
            and wrk_sts = #{wrkSts}
        </if>
        <if test="crnNo != null">
            and crn_no = #{crnNo}
        </if>
<!--        <choose>-->
<!--            <when test="type != null and type != ''">-->
<!--                and type = #{type}-->
<!--            </when>-->
<!--            <otherwise>-->
<!--                and (type IS NULL OR type = '')-->
<!--            </otherwise>-->
<!--        </choose>-->
 
    </sql>
 
    <select id="getWrkMastSplitTwin" resultMap="BaseResultMap">
        select * from asr_wrk_mast_split_twin
        where 1=1
        <include refid="batchSeq"></include>
        order by line_number,id
    </select>
 
</mapper>