<?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.SpecialtyInspectionPlanDetailMapper">
|
|
<select id="getSpecialtyInspectionPlanDetailList" parameterType="Map" resultType="Map">
|
SELECT
|
t1.id,
|
t1.specialty_inspection_standard_id as specialtyInspectionStandardId,
|
t2.num,
|
t2.version,
|
t3.id AS equipmentId,
|
t3.num AS equipmentNum,
|
t3.NAME AS equipmentName,
|
t3.model AS equipmentModel
|
FROM
|
mom_eam_specialty_inspection_plan_detail t1
|
LEFT JOIN mom_eam_specialty_inspection_standard t2 ON t1.specialty_inspection_standard_id = t2.id
|
LEFT JOIN mom_eam_equipment t3 ON t1.equipment_id = t3.id
|
WHERE t1.del_flag = 0 AND t2.del_flag = 0 AND t3.del_flag = 0
|
<if test="specialtyInspectionPlanId != null and specialtyInspectionPlanId != ''">
|
and t1.specialty_inspection_plan_id = #{specialtyInspectionPlanId}
|
</if>
|
ORDER BY t1.create_time desc
|
</select>
|
|
<select id="getSpecialtyInspectionPlanDetailById" parameterType="Map" resultType="Map">
|
SELECT
|
t1.id,
|
t1.specialty_inspection_standard_id as specialtyInspectionStandardId,
|
t2.num,
|
t2.version,
|
t3.id AS equipmentId,
|
t3.num AS equipmentNum,
|
t3.NAME AS equipmentName,
|
t3.model AS equipmentModel
|
FROM
|
mom_eam_specialty_inspection_plan_detail t1
|
LEFT JOIN mom_eam_specialty_inspection_standard t2 ON t1.specialty_inspection_standard_id = t2.id
|
LEFT JOIN mom_eam_equipment t3 ON t1.equipment_id = t3.id
|
WHERE t1.del_flag = 0 AND t2.del_flag = 0 AND t3.del_flag = 0
|
<if test="params.specialtyInspectionPlanId != null and params.specialtyInspectionPlanId != ''">
|
and t1.specialty_inspection_plan_id = #{params.specialtyInspectionPlanId}
|
</if>
|
ORDER BY t1.create_time desc
|
</select>
|
</mapper>
|