不一致项 查询 加standType
This commit is contained in:
+46
@@ -29,4 +29,50 @@
|
||||
and a.stand_id = #{standId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getSarStandUnqualifiedPage" resultType="com.adc.da.slrs.sarStandUnqualified.entity.SarStandUnqualified">
|
||||
SELECT
|
||||
sar_stand_unqualified.*, sar_standards_info.STAND_TYPE as standType
|
||||
from
|
||||
sar_stand_unqualified
|
||||
left join sar_standards_info on sar_stand_unqualified.STAND_ID = sar_standards_info.id
|
||||
WHERE
|
||||
close_state = 1
|
||||
<if test="sar.standId != null and sar.standId != '' ">
|
||||
and STAND_ID = #{standId}
|
||||
</if>
|
||||
<if test="sar.productName != null and sar.productName != '' ">
|
||||
and PRODUCT_NAME like concat(concat('%',#{sar.productName}),'%')
|
||||
</if>
|
||||
<if test="sar.responsibleUnit != null and sar.responsibleUnit != '' ">
|
||||
and RESPONSIBLE_UNIT = #{sar.responsibleUnit}
|
||||
</if>
|
||||
<if test="sar.standSerialNumber != null and sar.standSerialNumber != '' ">
|
||||
and STAND_SERIAL_NUMBER like concat(concat('%',#{sar.standSerialNumber}),'%')
|
||||
</if>
|
||||
limit #{start},#{end}
|
||||
</select>
|
||||
|
||||
<select id="getSarStandUnqualifiedCount" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
count(sar_stand_unqualified.ID)
|
||||
from
|
||||
sar_stand_unqualified
|
||||
left join sar_standards_info on sar_stand_unqualified.STAND_ID = sar_standards_info.id
|
||||
WHERE
|
||||
close_state = 1
|
||||
<if test="sar.standId != null and sar.standId != '' ">
|
||||
and STAND_ID = #{standId}
|
||||
</if>
|
||||
<if test="sar.productName != null and sar.productName != '' ">
|
||||
and PRODUCT_NAME like concat(concat('%',#{sar.productName}),'%')
|
||||
</if>
|
||||
<if test="sar.responsibleUnit != null and sar.responsibleUnit != '' ">
|
||||
and RESPONSIBLE_UNIT = #{sar.responsibleUnit}
|
||||
</if>
|
||||
<if test="sar.standSerialNumber != null and sar.standSerialNumber != '' ">
|
||||
and STAND_SERIAL_NUMBER like concat(concat('%',#{sar.standSerialNumber}),'%')
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user