From 6b5c8b69c7fd9a816cefb805d71daaf64b3dabf3 Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期五, 07 三月 2025 17:25:02 +0800 Subject: [PATCH] 权限 --- ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/IndexController.java | 23 ++++++++++++++++------- 1 files changed, 16 insertions(+), 7 deletions(-) diff --git a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/IndexController.java b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/IndexController.java index b6939b8..c205b59 100644 --- a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/IndexController.java +++ b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/IndexController.java @@ -28,6 +28,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -225,9 +226,15 @@ 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() - .stream().map(TContract::getTenantId).distinct().collect(Collectors.toList()).size(); - myToDoVO.setOverdueCount(overdueCount); + if(contractIds.isEmpty()){ + myToDoVO.setOverdueCount(0); + + }else{ + int overdueCount = contractService.lambdaQuery().in(TContract::getId, contractIds).list() + .stream().map(TContract::getTenantId).distinct().collect(Collectors.toList()).size(); + myToDoVO.setOverdueCount(overdueCount); + } + } else { myToDoVO.setExamineCount(0); myToDoVO.setOverdueCount(0); @@ -251,10 +258,11 @@ @GetMapping(value = "/getDetailById") public R<TCheckAcceptRecordVO> getDetailById(@RequestParam String id) { TCheckAcceptRecord checkAcceptRecord = checkAcceptRecordService.getById(id); - checkAcceptRecord.setCleanSituation(DictUtils.getDictLabel(DictConstants.DICT_TYPE_CHECK_SITUATION, checkAcceptRecord.getCleanSituation())); - checkAcceptRecord.setOverallSituation(DictUtils.getDictLabel(DictConstants.DICT_TYPE_CHECK_SITUATION, checkAcceptRecord.getOverallSituation())); - checkAcceptRecord.setDeviceSituation(DictUtils.getDictLabel(DictConstants.DICT_TYPE_CHECK_SITUATION, checkAcceptRecord.getDeviceSituation())); - checkAcceptRecord.setFurnitureSituation(DictUtils.getDictLabel(DictConstants.DICT_TYPE_CHECK_SITUATION, checkAcceptRecord.getFurnitureSituation())); +// checkAcceptRecord.setCleanSituation(checkAcceptRecord.getCleanSituation()); +// checkAcceptRecord.setOverallSituation(StringUtils.hasLength(checkAcceptRecord.getOverallSituation())?(DictUtils.getDictLabel(DictConstants.DICT_TYPE_CHECK_SITUATION,checkAcceptRecord.getOverallSituation())):""); +// checkAcceptRecord.setDeviceSituation(StringUtils.hasLength(checkAcceptRecord.getDeviceSituation())?(DictUtils.getDictLabel(DictConstants.DICT_TYPE_CHECK_SITUATION,checkAcceptRecord.getDeviceSituation())):""); +// checkAcceptRecord.setFurnitureSituation(StringUtils.hasLength(checkAcceptRecord.getDeviceSituation())?(DictUtils.getDictLabel(DictConstants.DICT_TYPE_CHECK_SITUATION,checkAcceptRecord.getFurnitureSituation())):""); + TCheckAcceptRecordVO checkAcceptRecordVO = new TCheckAcceptRecordVO(); BeanUtils.copyProperties(checkAcceptRecord, checkAcceptRecordVO); // 查询合同信息 @@ -276,6 +284,7 @@ dto.setCode(replace.substring(2)+String.format("%03d", size+1)); dto.setStatus(true); // 添加验收记录 + dto.setCheckPerson(tokenService.getLoginUser().getUser().getNickName()); checkAcceptRecordService.updateById(dto); return R.ok(); } -- Gitblit v1.7.1