<?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.mdc.mapper.MdcComponentInfoMapper">
|
|
<select id="pageList" resultType="org.jeecg.modules.mdc.entity.MdcComponentInfo">
|
SELECT
|
t1.*,
|
t2.production_name productionName
|
FROM
|
mdc_component_info t1
|
LEFT JOIN mdc_production t2 ON t1.production_id = t2.id
|
<where>
|
<if test="mdcComponentInfo.componentName != null and mdcComponentInfo.componentName != ''">
|
AND t1.component_name LIKE '%' + #{mdcComponentInfo.componentName} + '%'
|
</if>
|
</where>
|
</select>
|
|
<select id="findByComponentNo" resultType="org.jeecg.modules.mdc.entity.MdcComponentInfo">
|
SELECT
|
t1.*
|
FROM
|
mdc_component_info t1
|
LEFT JOIN mdc_production_equipment t2 ON t1.beltline_id = t2.production_id
|
LEFT JOIN mdc_equipment t3 ON t3.id = t2.equipment_id
|
WHERE
|
t1.component_no = #{productNo}
|
AND t3.equipment_id = #{equipmentId}
|
</select>
|
</mapper>
|