zss
2025-01-13 8d85246f061e3da623c7b9eb4e323ee724b4de0b
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
<?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.yuanchu.mom.mapper.DeviceFaultOneMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.DeviceFaultOne">
        <id column="id" property="id" />
        <result column="device_id" property="deviceId" />
        <result column="process_number" property="processNumber" />
        <result column="measure_of_accuracy" property="measureOfAccuracy" />
        <result column="fault_situation" property="faultSituation" />
        <result column="file_name" property="fileName" />
        <result column="system_file_name" property="systemFileName" />
        <result column="submit_next_pesponsible" property="submitNextPesponsible" />
        <result column="submit_operating_personnel" property="submitOperatingPersonnel" />
        <result column="submit_date" property="submitDate" />
        <result column="method_cost" property="methodCost" />
        <result column="admin_audit_option" property="adminAuditOption" />
        <result column="admin_next_pesponsible" property="adminNextPesponsible" />
        <result column="admin_operating_personnel" property="adminOperatingPersonnel" />
        <result column="technical_audit_option" property="technicalAuditOption" />
        <result column="technical_next_pesponsible" property="technicalNextPesponsible" />
        <result column="technical_operating_personnel" property="technicalOperatingPersonnel" />
        <result column="technical_date" property="technicalDate" />
        <result column="maintain_situation" property="maintainSituation" />
        <result column="maintain_next_pesponsible" property="maintainNextPesponsible" />
        <result column="maintain_operating_personnel" property="maintainOperatingPersonnel" />
        <result column="maintain_date" property="maintainDate" />
        <result column="check_cal_situation" property="checkCalSituation" />
        <result column="after_maintenance_operating_personnel" property="afterMaintenanceOperatingPersonnel" />
        <result column="after_maintenance_date" property="afterMaintenanceDate" />
        <result column="current_status" property="currentState" />
        <result column="submit_person" property="submitPerson" />
        <result column="current_responsible" property="currentResponsible" />
        <result column="create_time" property="createTime" />
    </resultMap>
 
    <select id="deviceFaultOnePage" resultType="com.yuanchu.mom.dto.DeviceFaultOneDto">
        select dfo.*,
               d.device_name,
               d.management_number,
               d.specification_model
        from device_fault_one dfo
                 left join device d on d.id = dfo.device_id
        where dfo.device_id = #{deviceId}
        <if test="processNumber != '' and processNumber != null">
            and dfo.process_number like concat('%', #{processNumber}, '%')
        </if>
    </select>
</mapper>