<?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.pms.mapper.PmsProcessBillMaterialsDetailMapper">
|
<select id="queryByMaterialId" resultType="org.jeecg.modules.pms.entity.PmsProcessBillMaterialsDetail">
|
SELECT TOP 1 * FROM pms_process_bill_materials_detail
|
WHERE material_id = #{materialId}
|
</select>
|
<select id="getpmsProcessBillMaterialsDetailListData" parameterType="Map" resultType="Map">
|
select * from pms_process_bill_materials_detail WHERE 1=1
|
<if test="params.materialNumber != null and params.materialNumber != ''">
|
AND material_number LIKE CONCAT('%', #{params.materialNumber}, '%')
|
</if>
|
<if test="params.materialName != null and params.materialName != ''">
|
AND material_name LIKE CONCAT('%', #{params.materialName}, '%')
|
</if>
|
</select>
|
<select id="queryByMaterialNumber" resultType="org.jeecg.modules.pms.entity.PmsProcessBillMaterialsDetail">
|
select DISTINCT t1.material_number, t1.material_name, t1.production_unit
|
from pms_process_bill_materials_detail t1
|
where EXISTS(select t2.id
|
from pms_process_bill_materials t2
|
where t2.material_number = #{materialNumber}
|
and t1.material_id = t2.id)
|
|
</select>
|
</mapper>
|