xuhy
2025-04-03 2d9a64c410f9e452951658f01ffc597d7bc1ea5f
Merge branch 'xizang-changyun' of https://gitee.com/xiaochen991015/xizang

# Conflicts:
# ruoyi-system/src/main/java/com/ruoyi/system/mapper/TContractMapper.java
# ruoyi-system/src/main/java/com/ruoyi/system/service/TContractService.java
9个文件已修改
85 ■■■■ 已修改文件
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TBillController.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/dto/OfflinePayCheckDto.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TContractMapper.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/model/TBill.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/query/TContractQuery.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/TContractService.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TContractServiceImpl.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TBillMapper.xml 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TContractMapper.xml 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TBillController.java
@@ -10,11 +10,10 @@
import com.ruoyi.system.model.TBill;
import com.ruoyi.system.model.TBillConfirm;
import com.ruoyi.system.model.TBillDetail;
import com.ruoyi.system.model.TContract;
import com.ruoyi.system.query.TBillQuery;
import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.system.service.TBillConfirmService;
import com.ruoyi.system.service.TBillDetailService;
import com.ruoyi.system.service.TBillService;
import com.ruoyi.system.query.TContractQuery;
import com.ruoyi.system.service.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
@@ -47,6 +46,9 @@
    @Autowired
    TBillConfirmService tBillConfirmService;
    @Autowired
    TContractService contractService;
    @PreAuthorize("@ss.hasPermi('bill:list')")
    @PostMapping("list")
    @ApiOperation("分页查询账单列表")
@@ -56,6 +58,14 @@
        return R.ok(pageInfo);
    }
    @ApiOperation(value = "获取合同分页列表")
    @PostMapping(value = "/contractList")
    public R<PageInfo<TContract>> contractList(@RequestBody TContractQuery query) {
        query.setBusinessDeptId(SecurityUtils.getBusinessDeptId());
        return R.ok(contractService.queryPage(query));
    }
    @PreAuthorize("@ss.hasPermi('bill:list:addRent')")
    @PostMapping("add")
    @ApiOperation("新增账单")
ruoyi-system/src/main/java/com/ruoyi/system/dto/OfflinePayCheckDto.java
@@ -41,7 +41,7 @@
    private String flowId;
    @ApiModelProperty("支付类型")
    @NotEmpty(message = "支付类型不能为空")
    @NotNull(message = "支付类型不能为空")
    private Integer payType;
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TContractMapper.java
@@ -2,7 +2,10 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.common.basic.PageInfo;
import com.ruoyi.system.dto.TBillDto;
import com.ruoyi.system.model.TBill;
import com.ruoyi.system.model.TContract;
import com.ruoyi.system.query.TBillQuery;
import com.ruoyi.system.query.TContractAppletQuery;
import com.ruoyi.system.query.TContractBillQuery;
import com.ruoyi.system.query.TContractQuery;
@@ -33,4 +36,6 @@
     * @return
     */
    Integer getCurrentMonthRentCount(@Param("businessDeptId") String businessDeptId);
    PageInfo<TContract> page(@Param("pageInfo") PageInfo<TContract> pageInfo,@Param("query") TContractQuery query);
}
ruoyi-system/src/main/java/com/ruoyi/system/model/TBill.java
@@ -102,7 +102,7 @@
    private BigDecimal payFeesMoney;
    @ApiModelProperty(value = "缴费日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("pay_fees_time")
    private LocalDateTime payFeesTime;
ruoyi-system/src/main/java/com/ruoyi/system/query/TContractQuery.java
@@ -27,4 +27,7 @@
    @ApiModelProperty(value = "查询多个状态")
    private List<Integer> statuses;
    @ApiModelProperty(value = "营运部门ID")
    private String businessDeptId;
}
ruoyi-system/src/main/java/com/ruoyi/system/service/TContractService.java
@@ -48,4 +48,5 @@
     * @return
     */
    Integer getCurrentMonthRentCount(String businessDeptId);
    PageInfo<TContract> queryPage(TContractQuery query);
}
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TContractServiceImpl.java
@@ -214,4 +214,11 @@
    public Integer getCurrentMonthRentCount(String businessDeptId) {
        return baseMapper.getCurrentMonthRentCount(businessDeptId);
    }
    @Override
    public PageInfo<TContract> queryPage(TContractQuery query) {
        PageInfo<TContract> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize());
        pageInfo = this.baseMapper.page(pageInfo,query);
        return pageInfo;
    }
}
ruoyi-system/src/main/resources/mapper/system/TBillMapper.xml
@@ -158,22 +158,30 @@
    <select id="statisticsAllRent" resultType="java.math.BigDecimal">
        SELECT ifnull(sum(payable_fees_money),0) as amount FROM t_bill
        where  business_dept_id=#{busDeptId}
        <if test='busDeptId != null and busDeptId != "" and busDeptId!="0"'>
            where business_dept_id = #{busDeptId}
        </if>
    </select>
    <select id="statisticsNoPay" resultType="java.math.BigDecimal">
        SELECT ifnull(sum(outstanding_money),0) as amount FROM t_bill where pay_fees_status!=3
        AND  business_dept_id=#{busDeptId}
        <if test='busDeptId != null and busDeptId != "" and busDeptId!="0"'>
            and business_dept_id = #{busDeptId}
        </if>
    </select>
    <select id="statisticsPayed" resultType="java.math.BigDecimal">
        SELECT ifnull(sum(pay_fees_money),0) as amount FROM t_bill
        where  business_dept_id=#{busDeptId}
        <if test='busDeptId != null and busDeptId != "" and busDeptId!="0"'>
            where business_dept_id = #{busDeptId}
        </if>
    </select>
    <select id="statisticsOverdue" resultType="java.math.BigDecimal">
        SELECT ifnull(sum(outstanding_money),0) as amount FROM t_bill where pay_fees_status=4
        AND  business_dept_id=#{busDeptId}
        <if test='busDeptId != null and busDeptId != "" and busDeptId!="0"'>
            and business_dept_id = #{busDeptId}
        </if>
    </select>
    <select id="batchBillCount" resultType="java.lang.Integer">
        SELECT
ruoyi-system/src/main/resources/mapper/system/TContractMapper.xml
@@ -147,4 +147,35 @@
    </select>
    <select id="page" resultType="com.ruoyi.system.model.TContract">
        select * from t_contract
        <where>
            <if test="query.partyTwoName != null and query.partyTwoName != ''">
                and party_two_name like concat('%',#{query.partyTwoName},'%')
            </if>
            <if test="query.contractNumber != null and query.contractNumber != ''">
                and contract_number like concat('%',#{query.contractNumber},'%')
            </if>
            <if test="query.contractName != null and query.contractName != ''">
                and contract_name like concat('%',#{query.contractName},'%')
            </if>
            <if test="query.status != null">
                and status = #{query.status}
            </if>
            <if test="query.tenantId != null">
                and tenant_id = #{query.tenantId}
            </if>
            <if test="query.statuses != null and query.statuses.size()>0">
                and status in
                <foreach collection="query.statuses" item="item" open="(" separator="," close=")">
                    #{item}
                </foreach>
            </if>
            <if test='query.businessDeptId!=null and query.businessDeptId !="" and query.businessDeptId != "0"'>
                and business_dept_id = #{query.businessDeptId}
            </if>
            AND disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        </where>
        order by create_time desc
    </select>
</mapper>