From 2d9a64c410f9e452951658f01ffc597d7bc1ea5f Mon Sep 17 00:00:00 2001 From: xuhy <3313886187@qq.com> Date: 星期四, 03 四月 2025 15:20:38 +0800 Subject: [PATCH] Merge branch 'xizang-changyun' of https://gitee.com/xiaochen991015/xizang --- ruoyi-system/src/main/java/com/ruoyi/system/service/TContractService.java | 1 ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TBillController.java | 18 +++++++-- ruoyi-system/src/main/java/com/ruoyi/system/mapper/TContractMapper.java | 5 ++ ruoyi-system/src/main/resources/mapper/system/TContractMapper.xml | 31 +++++++++++++++ ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TContractServiceImpl.java | 7 +++ ruoyi-system/src/main/java/com/ruoyi/system/model/TBill.java | 2 ruoyi-system/src/main/java/com/ruoyi/system/query/TContractQuery.java | 3 + ruoyi-system/src/main/resources/mapper/system/TBillMapper.xml | 16 ++++++-- ruoyi-system/src/main/java/com/ruoyi/system/dto/OfflinePayCheckDto.java | 2 9 files changed, 75 insertions(+), 10 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TBillController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TBillController.java index 81ad5e9..c0b0f63 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TBillController.java +++ b/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("新增账单") diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/dto/OfflinePayCheckDto.java b/ruoyi-system/src/main/java/com/ruoyi/system/dto/OfflinePayCheckDto.java index 51a9e92..74eaa36 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/dto/OfflinePayCheckDto.java +++ b/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; diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TContractMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TContractMapper.java index 89a3c7c..6b77c06 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TContractMapper.java +++ b/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); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/model/TBill.java b/ruoyi-system/src/main/java/com/ruoyi/system/model/TBill.java index 9e5c994..2970b75 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/model/TBill.java +++ b/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; diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/query/TContractQuery.java b/ruoyi-system/src/main/java/com/ruoyi/system/query/TContractQuery.java index 0cb2c3a..bfa74dd 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/query/TContractQuery.java +++ b/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; + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/TContractService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/TContractService.java index 188ac73..d7a62b9 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/TContractService.java +++ b/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); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TContractServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TContractServiceImpl.java index 09ca4dc..f3d7f8b 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TContractServiceImpl.java +++ b/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; + } } diff --git a/ruoyi-system/src/main/resources/mapper/system/TBillMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TBillMapper.xml index 23052ae..5d3627a 100644 --- a/ruoyi-system/src/main/resources/mapper/system/TBillMapper.xml +++ b/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 diff --git a/ruoyi-system/src/main/resources/mapper/system/TContractMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TContractMapper.xml index 05cd43c..ee86ace 100644 --- a/ruoyi-system/src/main/resources/mapper/system/TContractMapper.xml +++ b/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> -- Gitblit v1.7.1