xuhy
2025-03-07 1ab895aa436ebb14d8a2bfb5365689e4b6c4894e
ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/IndexController.java
@@ -14,6 +14,7 @@
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.DictUtils;
import com.ruoyi.framework.web.service.TokenService;
import com.ruoyi.system.bo.ProcessTaskListBO;
import com.ruoyi.system.dto.TBillDto;
import com.ruoyi.system.dto.TInvoiceDTO;
import com.ruoyi.system.model.*;
@@ -72,6 +73,8 @@
    private ISysUserService sysUserService;
    @Autowired
    private TContractRentTypeService contractRentTypeService;
    @Autowired
    private StateProcessTemplateService processTemplateService;
    /**
     * 获取轮播图管理列表
     */
@@ -109,6 +112,8 @@
        return R.ok(myToDoVO);
    }
    @ApiOperation(value = "租户-当前在租房源")
    @PostMapping(value = "/tenant/myHouse")
    public R<List<MyHouseVO>> myHouse() {
@@ -132,7 +137,7 @@
                    myToDoVO.setHouseAddress(tHouse.getHouseAddress());
                    myToDoVO.setMonthRent(contract.getMonthRent());
                    myToDoVO.setPayType(DictUtils.getDictLabel(DictConstants.DICT_TYPE_CONTRACT_PAY_TYPE, contract.getPayType()));
                    myToDoVO.setMonth(bill.getPayFeesTime() == null ? bill.getPayableFeesTime().getMonth() + "月" : bill.getPayFeesTime().getMonth() + "月");
                    myToDoVO.setMonth(bill.getPayFeesTime() == null ? bill.getPayableFeesTime().getMonth().getValue() + "月" : bill.getPayFeesTime().getMonth().getValue() + "月");
                    myToDoVO.setHouseArea(tHouse.getHouseArea());
                    myToDoVO.setHouseType(tHouse.getHouseType());
                    myToDoVO.setEndTime(DateUtils.localDateTimeToStringYear(contract.getEndTime()));
@@ -180,7 +185,7 @@
                myToDoVO.setHouseAddress(tHouse.getHouseAddress());
                myToDoVO.setMonthRent(contract.getMonthRent());
                myToDoVO.setPayType(DictUtils.getDictLabel(DictConstants.DICT_TYPE_CONTRACT_PAY_TYPE, contract.getPayType()));
                myToDoVO.setMonth(bill.getPayFeesTime() == null ? bill.getPayableFeesTime().getMonth() + "月" : bill.getPayFeesTime().getMonth() + "月");
                myToDoVO.setMonth(bill.getPayFeesTime() == null ? bill.getPayableFeesTime().getMonth().getValue() + "月" : bill.getPayFeesTime().getMonth().getValue() + "月");
                myToDoVO.setHouseArea(tHouse.getHouseArea());
                myToDoVO.setHouseType(tHouse.getHouseType());
                myToDoVO.setEndTime(DateUtils.localDateTimeToStringYear(contract.getEndTime()));
@@ -211,11 +216,13 @@
    @PostMapping(value = "/admin/myToDo")
    public R<MyToDoVO> adminMyToDo() {
        MyToDoVO myToDoVO = new MyToDoVO();
        LoginUserApplet loginUserApplet = tokenService.getLoginUserApplet();
        if (loginUserApplet != null) {
            long examineCount = contractService.count(new LambdaQueryWrapper<TContract>()
                    .eq(TContract::getStatus, 2));
            myToDoVO.setExamineCount((int) examineCount);
        LoginUser loginUser = tokenService.getLoginUser();
        if (loginUser != null) {
//            long examineCount = contractService.count(new LambdaQueryWrapper<TContract>()
//                    .eq(TContract::getStatus, 2));
            ProcessTaskListBO processTaskListBO = new ProcessTaskListBO();
            PageInfo<ProcessTaskListVO> processTaskListVOPageInfo = processTemplateService.waitTaskPage(processTaskListBO);
            myToDoVO.setExamineCount((int) processTaskListVOPageInfo.getTotal());
            List<String> contractIds = billService.lambdaQuery().eq(TBill::getPayFeesStatus, 4).list()
                    .stream().map(TBill::getContractId).collect(Collectors.toList());
            int overdueCount = contractService.lambdaQuery().in(TContract::getId, contractIds).list()
@@ -350,6 +357,12 @@
        TContract contract = contractService.getById(bill.getContractId());
        THouse tHouse = houseService.getById(contract.getHouseId());
        res.setHouse(tHouse);
        res.setConcatStartTime(contract.getStartTime());
        res.setConcatEndTime(contract.getEndTime());
        res.setPartyOnePhone(contract.getPartyOnePhone());
        res.setPartyOnePerson(contract.getPartyTwoPerson());
        res.setMonthRent(bill.getPayableFeesMoney());
        res.setPayType(contract.getPayType());
        return R.ok(res);
    }
    @ApiOperation(value = "管理员-我的审批分页列表")