| | |
| | | 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; |
| | |
| | | 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 { |