fix(bms):收款时间查询

This commit is contained in:
zhaoqing
2026-08-12 11:40:13 +08:00
parent a10cfb0f55
commit 5032cf2413
2 changed files with 13 additions and 1 deletions
@@ -262,4 +262,9 @@ public class BillManagePO extends BaseVOEntity{
@ApiModelProperty("收款帐户名称")
private String paymentAccountName;
private List<BillDetail> billDetailList;
@ApiModelProperty("最近收款时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@Excel(name = "最近收款时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date collectionTime;
}
@@ -8,7 +8,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="queryList" parameterType="com.mhd.bms.domain.billManage.repository.todo.BillManageDO" resultType="com.mhd.bms.domain.billManage.repository.po.BillManagePO">
select
a.*,b.SETTLEMENT_ENTITY_ID as settlementEntityId
a.*,
b.SETTLEMENT_ENTITY_ID as settlementEntityId,
(SELECT MAX(c.collection_time)
FROM receipt_detail rd
LEFT JOIN receipt_manage c ON rd.receipt_manage_id = c.receipt_manage_id
WHERE rd.bill_manage_id = a.bill_manage_id
AND rd.del_flag = 1
AND c.del_flag = 1) AS collectionTime
from bill_manage a LEFT JOIN SETTLEMENT_CUSTOMERS b on a.SETTLEMENT_CUSTOMERS_ID = b.SETTLEMENT_CUSTOMERS_ID
where a.del_flag = 1
<include refid="common_where"/>