车间能级提升-智能设备管理系统
baoshiwei
2025-06-24 f571cf0182abd65176fb1512c5cb5ddaea49c4a3
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
<?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="org.dromara.eims.mapper.EimsEquStatuMapper">
 
    <resultMap type="org.dromara.eims.domain.vo.EimsEquStatuVo" id="EquStatuVoResult">
    </resultMap>
 
    <select id="selectEquStatuPage" resultMap="EquStatuVoResult">
        SELECT s.*, e.equ_name AS equName, e.asset_no AS assetNo
        FROM eims_equ_statu s
        LEFT JOIN eims_equ e ON s.equ_id = e.equ_id
        <where>
            <if test="bo.equId != null">
                AND s.equ_id = #{bo.equId}
            </if>
            <if test="bo.beforeChange != null and bo.beforeChange != ''">
                AND s.before_change = #{bo.beforeChange}
            </if>
            <if test="bo.afterChange != null and bo.afterChange != ''">
                AND s.after_change = #{bo.afterChange}
            </if>
            <if test="bo.changeUser != null">
                AND s.change_user = #{bo.changeUser}
            </if>
            <if test="bo.orderStatus != null and bo.orderStatus != ''">
                AND s.order_status = #{bo.orderStatus}
            </if>
            <if test="bo.params != null and bo.params.beginTime != null and bo.params.endTime != null">
                AND s.change_date BETWEEN #{bo.params.beginTime} AND #{bo.params.endTime}
            </if>
            <if test="bo.params != null and bo.params.searchValue != null and bo.params.searchValue != ''">
                AND (
                    e.equ_name LIKE CONCAT('%', #{bo.params.searchValue}, '%')
                    OR e.asset_no LIKE CONCAT('%', #{bo.params.searchValue}, '%')
                )
            </if>
        </where>
        ORDER BY s.change_date DESC
    </select>
 
</mapper>