diff --git a/jshERP-boot/src/main/resources/mapper_xml/DepotItemMapperEx.xml b/jshERP-boot/src/main/resources/mapper_xml/DepotItemMapperEx.xml index c67b4470..2ab5fb98 100644 --- a/jshERP-boot/src/main/resources/mapper_xml/DepotItemMapperEx.xml +++ b/jshERP-boot/src/main/resources/mapper_xml/DepotItemMapperEx.xml @@ -237,16 +237,13 @@ select count(1) from (select m.id from jsh_material m - left join jsh_depot_item di on di.material_id=m.id and ifnull(m.delete_Flag,'0') !='1' - left join jsh_material_extend me on me.id=di.material_extend_id and ifnull(me.delete_Flag,'0') !='1' - left join jsh_depot_head dh on di.header_id=dh.id and ifnull(dh.delete_flag,'0') !='1' - where 1=1 + left join jsh_material_extend me on me.material_id=m.id and ifnull(me.delete_Flag,'0') !='1' + left join jsh_depot_item di on di.material_id=m.id and ifnull(di.delete_Flag,'0') !='1' + left join jsh_depot_head dh on di.header_id=dh.id and ifnull(dh.delete_flag,'0') !='1' + where 1=1 and me.default_flag=1 and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey}) @@ -276,7 +273,7 @@ and dh.oper_time <= #{endTime} - and ifnull(di.delete_flag,'0') !='1' + and ifnull(m.delete_flag,'0') !='1' group by m.id) cc