xuhy
2025-02-12 8bf338fd11302e2feced08c389e83f2daf1abfd2
修改账单
2个文件已修改
22 ■■■■ 已修改文件
ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/TBillController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TBillMapper.xml 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/TBillController.java
@@ -62,7 +62,7 @@
        return R.ok(pageInfo);
    }
    @ApiOperation(value = "缴费账单查询分页列表")
    @ApiOperation(value = "缴费账单查询列表")
    @PostMapping("/getBillIds")
    public R<List<String>> getBillIds(@RequestBody TBillQuery query){
        if (StringUtils.isEmpty(query.getUserId())){
ruoyi-system/src/main/resources/mapper/system/TBillMapper.xml
@@ -73,9 +73,9 @@
        h.house_name as houseName
        FROM
        t_bill b
        LEFT JOIN t_contract c ON c.contract_number = b.contract_number
        LEFT JOIN t_house h ON h.id = c.house_id
        LEFT JOIN t_tenant t ON t.id = c.tenant_id
        LEFT JOIN t_contract c ON c.contract_number = b.contract_number and c.disabled=0
        LEFT JOIN t_house h ON h.id = c.house_id and h.disabled=0
        LEFT JOIN t_tenant t ON t.id = c.tenant_id and t.disabled=0
        <where>
            <if test="query.payFeesStatus != null">
                and b.pay_fees_status = #{query.payFeesStatus}
@@ -92,7 +92,9 @@
            <if test="query.userId != null and query.userId !=''">
                and t.id = #{query.userId}
            </if>
            and b.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        </where>
        order by b.payable_fees_time
    </select>
    <select id="invoiceList" resultType="com.ruoyi.system.dto.TBillDto">
        SELECT
@@ -103,14 +105,11 @@
        h.house_name as houseName
        FROM
        t_bill b
        LEFT JOIN t_contract c ON c.contract_number = b.contract_number
        LEFT JOIN t_house h ON h.id = c.house_id
        LEFT JOIN t_tenant t ON t.id = c.tenant_id
        LEFT JOIN t_contract c ON c.contract_number = b.contract_number and c.disabled=0
        LEFT JOIN t_house h ON h.id = c.house_id and h.disabled=0
        LEFT JOIN t_tenant t ON t.id = c.tenant_id and t.disabled=0
        LEFT JOIN t_invoice_to_bill tb ON b.id = tb.bill_id
        <where>
            <if test="query.payFeesStatus != null">
                and b.pay_fees_status = #{query.payFeesStatus}
            </if>
            <if test="query.phone != null and query.phone !=''">
                and t.phone = #{query.phone}
            </if>
@@ -123,7 +122,10 @@
            <if test="query.userId != null and query.userId !=''">
                and t.id = #{query.userId}
            </if>
            and b.pay_fees_status = 3
            and tb.invoice_id IS NULL
            and b.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        </where>
        order by b.pay_fees_time
    </select>
</mapper>