feat(wms): 新增资金日记账余额计算功能

- 在 WmsJournalMapper 中添加 getLastBalance 方法,用于获取最新的余额
- 在 WmsJournalServiceImpl 中实现插入资金日记账时自动计算新余额的功能
- 新增 addJournal 方法,直接插入资金日记账记录
This commit is contained in:
JR
2025-08-13 13:46:37 +08:00
parent f3089f9417
commit c12e97bd1f
3 changed files with 31 additions and 4 deletions

View File

@@ -20,6 +20,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateTime" column="update_time"/>
<result property="delFlag" column="del_flag"/>
</resultMap>
<select id="getLastBalance" resultType="java.math.BigDecimal">
SELECT balance_amount
FROM wms_journal
WHERE del_flag = 0
ORDER BY create_time DESC
LIMIT 1
</select>
</mapper>