cpT
2025-07-01 cce8b8793ca1466ca1330f3bd62e11ae6551261e
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
64
65
66
67
68
69
<?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.BasErrLogMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.zy.asrs.entity.BasErrLog">
        <id column="ID" property="id" />
        <result column="UUID" property="uuid" />
        <result column="WRK_NO" property="wrkNo" />
        <result column="START_TIME" property="startTime" />
        <result column="END_TIME" property="endTime" />
        <result column="WRK_STS" property="wrkSts" />
        <result column="IO_TYPE" property="ioType" />
        <result column="CRN_NO" property="crnNo" />
        <result column="PLC_NO" property="plcNo" />
        <result column="LOC_NO" property="locNo" />
        <result column="STA_NO" property="staNo" />
        <result column="SOURCE_STA_NO" property="sourceStaNo" />
        <result column="SOURCE_LOC_NO" property="sourceLocNo" />
        <result column="BARCODE" property="barcode" />
        <result column="ERR_CODE" property="errCode" />
        <result column="ERROR" property="error" />
        <result column="STATUS" property="status" />
        <result column="CREATE_TIME" property="createTime" />
        <result column="CREATE_BY" property="createBy" />
        <result column="UPDATE_TIME" property="updateTime" />
        <result column="UPDATE_BY" property="updateBy" />
        <result column="MEMO" property="memo" />
 
    </resultMap>
 
    <sql id="batchSeq">
        <if test="taskNo != null">
            and WRK_NO = #{taskNo}
        </if>
        <if test="crnNo != null">
            and CRN_NO = #{crnNo}
        </if>
        <if test="plcNo != null">
            and PLC_NO = #{plcNo}
        </if>
        <if test="status != null">
            and STATUS = #{status}
        </if>
        <if test="memo != null">
            and MEMO = #{memo}
        </if>
        <if test="modiTimeStart != null ">
            <if test="modiTimeEnd != null ">
                and START_TIME between #{modiTimeStart} and #{modiTimeEnd}
            </if>
        </if>
    </sql>
 
    <select id="selectBasErrLogList" resultMap="BaseResultMap">
        SELECT * FROM "SOURCE"."asr_bas_err_log"
        WHERE 1=1
        <include refid="batchSeq"></include>
        ORDER BY CREATE_TIME DESC
        LIMIT #{pageSize} OFFSET ((#{pageNumber} - 1) * #{pageSize});
    </select>
 
    <select id="selectBasErrLogListTotal" resultType="Long">
        SELECT count(1) FROM "SOURCE"."asr_bas_err_log"
        WHERE 1=1
        <include refid="batchSeq"></include>
    </select>
 
</mapper>