给采购和销售单据支持分批操作

This commit is contained in:
季圣华
2021-09-25 22:09:36 +08:00
parent 8484742420
commit 1604a3fde5
9 changed files with 101 additions and 22 deletions

View File

@@ -61,8 +61,12 @@
<if test="subType != null">
and dh.sub_type=#{subType}
</if>
<if test="status != null">
and dh.status =#{status}
<if test="statusArray != null and statusArray !=''">
and dh.status in (
<foreach collection="statusArray" item="status" separator=",">
#{status}
</foreach>
)
</if>
<if test="number != null">
<bind name="bindNumber" value="'%'+number+'%'"/>
@@ -121,8 +125,12 @@
<if test="subType != null">
and dh.sub_type=#{subType}
</if>
<if test="status != null">
and dh.status =#{status}
<if test="statusArray != null and statusArray !=''">
and dh.status in (
<foreach collection="statusArray" item="status" separator=",">
#{status}
</foreach>
)
</if>
<if test="number != null">
<bind name="bindNumber" value="'%'+number+'%'"/>

View File

@@ -456,4 +456,21 @@
</if>
group by m.id,m.name, m.model, m.unit, m.color, u.name) tb
</select>
<select id="getFinishNumber" resultType="java.math.BigDecimal">
select ifnull(sum(di.basic_number),0) from jsh_depot_item di
where di.material_id=#{mId}
and ifnull(di.delete_flag,'0') !='1'
and di.header_id
in
(
select dh.id from jsh_depot_head dh
where
dh.link_number=#{linkNumber}
and ifnull(dh.delete_flag,'0') !='1'
<if test="goToType != null">
and dh.sub_type=#{goToType}
</if>
)
</select>
</mapper>