Houjie
2025-06-10 4371080df058a549cdaf31dddeca6c5fee58e23b
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
<?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.jeecg.modules.eam.mapper.EquipmentMaintenancePlanDetailMapper">
 
    <delete id="deleteByMainId" parameterType="java.lang.String">
        DELETE
        FROM  mom_eam_equipment_maintenance_plan_detail
        WHERE
             plan_id = #{mainId}
    </delete>
 
    <select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.eam.entity.EquipmentMaintenancePlanDetail">
        SELECT *
        FROM  mom_eam_equipment_maintenance_plan_detail
        WHERE
             plan_id = #{mainId}
    </select>
 
    <select id="pageList" resultType="org.jeecg.modules.eam.entity.EquipmentMaintenancePlanDetail">
        select
        t1.id id,
        t1.standard_id standardId,
        t1.plan_id planId,
        t1.plan_start_time planStartTime,
        t1.plan_end_time planEndTime,
        t2.num standardNum,
        t2.equipment_id equipmentId,
        t3.num equipmentNum,
        t3.name equipmentName,
        t3.model model
        from mom_eam_equipment_maintenance_plan_detail t1
        left join (select * from mom_eam_maintenance_standard where del_flag = 0) t2
        on t1.standard_id = t2.id
        left join mom_eam_equipment t3 on t2.equipment_id = t3.id
        where t1.plan_id = #{mainId}
    </select>
</mapper>