diff --git a/jshERP-boot/src/main/java/com/jsh/erp/controller/DepotHeadController.java b/jshERP-boot/src/main/java/com/jsh/erp/controller/DepotHeadController.java index c447d559..fd34e2d4 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/controller/DepotHeadController.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/controller/DepotHeadController.java @@ -175,7 +175,6 @@ public class DepotHeadController { } /** - * 调拨明细接口 TODO:by sdw 20210724 * @param currentPage * @param pageSize * @param oId diff --git a/jshERP-boot/src/main/resources/mapper_xml/DepotHeadMapperEx.xml b/jshERP-boot/src/main/resources/mapper_xml/DepotHeadMapperEx.xml index 68b62146..a37c844c 100644 --- a/jshERP-boot/src/main/resources/mapper_xml/DepotHeadMapperEx.xml +++ b/jshERP-boot/src/main/resources/mapper_xml/DepotHeadMapperEx.xml @@ -204,6 +204,7 @@ and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey}) + and dh.sub_type!='调拨' and ifnull(dh.delete_flag,'0') !='1' ORDER BY oper_time DESC,number desc @@ -233,59 +234,43 @@ and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey}) + and dh.sub_type!='调拨' and ifnull(dh.delete_flag,'0') !='1' ORDER BY oper_time DESC,number desc select count(1) from (select di.material_id, m.mName,m.bar_code,m.Model,m.standard,m.categoryName from jsh_depot_head dh - left JOIN jsh_depot_item di on dh.id=di.header_id and ifnull(di.delete_flag,'0') !='1' - left JOIN (SELECT jsh_material.id,jsh_material.name mName, me.bar_code, Model,standard,jsh_material_category.`Name` categoryName + left join jsh_depot_item di on dh.id=di.header_id and ifnull(di.delete_flag,'0') !='1' + left join (select jsh_material.id,jsh_material.name mName, me.bar_code, Model,standard,jsh_material_category.`Name` categoryName from jsh_material left join jsh_material_extend me on me.material_id=jsh_material.id and ifnull(me.delete_Flag,'0') !='1' - left JOIN jsh_material_category on jsh_material.category_id=jsh_material_category.Id and ifnull(jsh_material_category.delete_flag,'0') !='1' + left join jsh_material_category on jsh_material.category_id=jsh_material_category.Id and ifnull(jsh_material_category.delete_flag,'0') !='1' where me.default_flag=1 and ifnull(jsh_material.delete_Flag,'0') !='1' - ) m on m.Id=di.material_id where dh.type=#{type} and dh.oper_time >=#{beginTime} and dh.oper_time <=#{endTime} + ) m on m.Id=di.material_id where (dh.type=#{type} or dh.sub_type='调拨') and dh.oper_time >=#{beginTime} and dh.oper_time <=#{endTime} and dh.organ_id = #{oId} - and di.depot_id = #{depotId} + + and ((di.depot_id = #{depotId} and dh.sub_type!='调拨') or (di.another_depot_id = #{depotId} and dh.sub_type='调拨')) + + + and di.depot_id = #{depotId} + and (m.bar_code like #{bindKey} or m.mName like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey}) and ifnull(dh.delete_flag,'0') !='1' - GROUP BY di.material_id,m.mName,m.Model,m.standard,m.categoryName) a + group by di.material_id) a