xuhy
2025-04-03 e51eccc4c6d717017f00a3b8c168393062911d61
Merge branch 'dev' of http://120.76.84.145:10101/gitblit/r/java/xizang into dev
2个文件已修改
30 ■■■■■ 已修改文件
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ScreenService.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TTenantServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ScreenService.java
@@ -2,7 +2,6 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.enums.BillTypeEnum;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.system.model.TBill;
@@ -21,7 +20,12 @@
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Objects;
/**
 * @author mitao
@@ -61,13 +65,13 @@
                .filter(item -> !item.getPayFeesStatus().equals("5"))
                .map(TBill::getPayableFeesMoney)
                .reduce(BigDecimal.ZERO, BigDecimal::add)
                .divide(new BigDecimal("10000"),2, RoundingMode.HALF_UP);
                .divide(new BigDecimal("10000"),2, RoundingMode.DOWN);
        vo.setTotalReceivableRent(totalReceivableRent);
        //总计已收租金
        BigDecimal totalReceivedRent = billList.stream()
                .map(TBill::getPayFeesMoney)
                .reduce(BigDecimal.ZERO, BigDecimal::add)
                .divide(new BigDecimal("10000"),2, RoundingMode.HALF_UP);
                .divide(new BigDecimal("10000"),2, RoundingMode.DOWN);
        vo.setTotalReceivedRent(totalReceivedRent);
        //本月新增租户数
        Integer newTenantCount = tContractService.getCurrentMonthRentCount(businessDeptId);
@@ -88,26 +92,26 @@
        BigDecimal totalRentPaid = currentQuarterBillList.stream()
                .map(TBill::getPayFeesMoney)
                .reduce(BigDecimal.ZERO, BigDecimal::add)
                .divide(new BigDecimal("10000"),2, RoundingMode.HALF_UP);
                .divide(new BigDecimal("10000"),2, RoundingMode.DOWN);
        vo.setTotalRentPaid(totalRentPaid);
        //本季度应交租金
        BigDecimal totalRentShould = currentQuarterBillList.stream()
                .filter(item -> !item.getPayFeesStatus().equals("5"))
                .map(TBill::getPayableFeesMoney)
                .reduce(BigDecimal.ZERO, BigDecimal::add)
                .divide(new BigDecimal("10000"),2, RoundingMode.HALF_UP);
                .divide(new BigDecimal("10000"),2, RoundingMode.DOWN);
        vo.setTotalRentShould(totalRentShould);
        //本季度欠费
        BigDecimal totalRentOwe = currentQuarterBillList.stream()
                .map(TBill::getOutstandingMoney)
                .reduce(BigDecimal.ZERO, BigDecimal::add)
                .divide(BigDecimal.valueOf(10000L), 2, RoundingMode.HALF_UP);
                .divide(BigDecimal.valueOf(10000L), 2, RoundingMode.DOWN);
        vo.setTotalRentOwe(totalRentOwe);
        //总计欠费
        BigDecimal totalRentOweAll = billList.stream()
                .map(TBill::getOutstandingMoney)
                .reduce(BigDecimal.ZERO, BigDecimal::add)
                .divide(BigDecimal.valueOf(10000L), 2, RoundingMode.HALF_UP);
                .divide(BigDecimal.valueOf(10000L), 2, RoundingMode.DOWN);
        vo.setTotalRentOweAll(totalRentOweAll);
        return vo;
    }
@@ -150,14 +154,14 @@
                    .map(TBill::getPayFeesMoney)
                    .filter(Objects::nonNull)
                    .reduce(BigDecimal.ZERO, BigDecimal::add)
                    .divide(BigDecimal.valueOf(10000L), 2, RoundingMode.HALF_UP);
                    .divide(BigDecimal.valueOf(10000L), 2, RoundingMode.DOWN);
            // 计算季度欠费总和
            BigDecimal quarterOutstanding = quarterBills.stream()
                    .map(TBill::getOutstandingMoney)
                    .filter(Objects::nonNull)
                    .reduce(BigDecimal.ZERO, BigDecimal::add)
                    .divide(BigDecimal.valueOf(10000L), 2, RoundingMode.HALF_UP);
                    .divide(BigDecimal.valueOf(10000L), 2, RoundingMode.DOWN);
            // 生成季度标签 (格式: YY-MM月)
            Calendar cal = Calendar.getInstance();
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TTenantServiceImpl.java
@@ -6,7 +6,6 @@
import com.ruoyi.common.basic.PageInfo;
import com.ruoyi.common.constant.DictConstants;
import com.ruoyi.common.utils.DictUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.dto.TTenantDTO;
import com.ruoyi.system.mapper.TContractMapper;
@@ -49,14 +48,15 @@
    @Override
    public PageInfo<TenantVO> pageList(TTenantQuery query) {
        PageInfo<TenantVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize());
        String businessDeptId = SecurityUtils.getBusinessDeptId();
 /*       String businessDeptId = SecurityUtils.getBusinessDeptId();
        List<TenantVO> list = null;
        if (StringUtils.isBlank(businessDeptId) || "0".equals(businessDeptId)) {
            list = this.baseMapper.pageList(query, pageInfo);
        } else {
            query.setBusinessDeptId(businessDeptId);
            list = this.baseMapper.pageListByBusinessDeptId(query,pageInfo);
        }
        }*/
        List<TenantVO> list = this.baseMapper.pageList(query, pageInfo);
        for (TenantVO tenantVO : list) {
            tenantVO.setTenantAttributesName(StringUtils.isNotBlank(tenantVO.getTenantAttributes())?DictUtils.getDictLabel(DictConstants.DICT_TYPE_TENANT_ATTRIBUTE,tenantVO.getTenantAttributes()):"");
            tenantVO.setTenantTypeName(StringUtils.isNotBlank(tenantVO.getTenantType())?DictUtils.getDictLabel(DictConstants.DICT_TYPE_TENANT_TYPE,tenantVO.getTenantType()):"");