xuhy
2025-02-18 9c439d7751223f9c6d8a9ff74ce38d7ce8bde70e
ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/IndexController.java
@@ -26,6 +26,7 @@
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
@@ -78,6 +79,11 @@
            myToDoVO.setContractCount((int) contractCount);
            List<String> contractIds = contractService.lambdaQuery().eq(TContract::getTenantId, loginUserApplet.getUserId()).list()
                    .stream().map(TContract::getId).collect(Collectors.toList());
            if (CollectionUtils.isEmpty(contractIds)){
                myToDoVO.setBillCount(0);
                myToDoVO.setContractCount(0);
                return R.ok(myToDoVO);
            }
            int billCount = billService.lambdaQuery().in(TBill::getContractId, contractIds).eq(TBill::getPayFeesStatus, 1).list().size();
            myToDoVO.setBillCount(billCount);
        }else {