给单据增加订金字段和接口逻辑

This commit is contained in:
季圣华
2022-05-29 18:18:00 +08:00
parent 9f2be3b81b
commit 3939106bee
13 changed files with 179 additions and 52 deletions

View File

@@ -680,8 +680,23 @@
)
</if>
and (abs(dh.change_amount)+(select ifnull(sum(abs(ai.each_amount)),0) from jsh_account_item ai where ai.bill_id=dh.id and ifnull(ai.delete_flag,'0') !='1'))
&lt; (dh.discount_last_money + dh.other_money)
&lt; (dh.discount_last_money + dh.other_money - ifnull(dh.deposit,0))
and ifnull(dh.delete_flag,'0') !='1'
order by dh.id desc
</select>
<select id="getFinishDepositByNumber" resultType="java.math.BigDecimal">
select ifnull(sum(dh.deposit),0)
from jsh_depot_head dh
where dh.link_number=#{number}
and ifnull(dh.delete_flag,'0') !='1'
</select>
<select id="getFinishDepositByNumberExceptCurrent" resultType="java.math.BigDecimal">
select ifnull(sum(dh.deposit),0)
from jsh_depot_head dh
where dh.link_number=#{linkNumber}
and dh.number!=#{number}
and ifnull(dh.delete_flag,'0') !='1'
</select>
</mapper>