pbom-正式版查询问题

(cherry picked from commit 2607d23cb8)
This commit is contained in:
luolm 2024-09-23 21:46:55 +08:00
parent cb8abd0349
commit 3d7128d95c
1 changed files with 3 additions and 3 deletions

View File

@ -105,16 +105,16 @@
<select id="releaseListByPage" resultType="com.nflg.product.bomnew.pojo.vo.BomNewPbomParentVO"> <select id="releaseListByPage" resultType="com.nflg.product.bomnew.pojo.vo.BomNewPbomParentVO">
select * , row_id as bomRowId select * , row_id as bomRowId
from t_bom_new_pbom_parent a join from t_bom_new_pbom_parent a join
(select material_no, max(current_version) current_version from t_bom_new_pbom_parent where status &gt;= 4 (select material_no,fac_code, max(current_version) current_version from t_bom_new_pbom_parent where status &gt;= 4
<if test="query.materialNo!= null and query.materialNo!=''"> <if test="query.materialNo!= null and query.materialNo!=''">
and material_no = #{query.materialNo} and material_no = #{query.materialNo}
</if> </if>
<if test="query.drawingNo!= null and query.drawingNo!=''"> <if test="query.drawingNo!= null and query.drawingNo!=''">
and drawing_no = #{query.drawingNo} and drawing_no = #{query.drawingNo}
</if> </if>
group by material_no group by material_no ,fac_code
) b ) b
on a.material_no=b.material_no and a.current_version=b.current_version on a.material_no=b.material_no and a.current_version=b.current_version and a.fac_code=b.fac_code
where status &gt;= 4 where status &gt;= 4
<if test=" (query.materialNo== null || query.materialNo=='' ) and (query.drawingNo== null || query.drawingNo=='')"> <if test=" (query.materialNo== null || query.materialNo=='' ) and (query.drawingNo== null || query.drawingNo=='')">
and root_is=1 and root_is=1