| | |
| | | @PostMapping(value = "/getConcatByTenantId") |
| | | public R<List<TContract>> getConcatByTenantId() { |
| | | |
| | | // Long userId = tokenService.getLoginUser().getUserId(); |
| | | String tenantId = "1881967035070177281"; |
| | | String tenantId = tokenService.getLoginUserApplet().getUserId(); |
| | | // 查询合同信息 |
| | | List<TContract> list = contractService.list(Wrappers.lambdaQuery(TContract.class) |
| | | .eq(TContract::getTenantId, tenantId) |
| | |
| | | .in(THouse::getId, houseIds)); |
| | | list.forEach(item -> { |
| | | item.setHouseName(houseList.stream().filter(house -> house.getId().equals(item.getHouseId())).findFirst().orElse(new THouse()).getHouseName()); |
| | | item.setHouseAddress(houseList.stream().filter(house -> house.getId().equals(item.getHouseId())).findFirst().orElse(new THouse()).getHouseAddress()); |
| | | }); |
| | | return R.ok(list); |
| | | } |
| | |
| | | @ApiOperation(value = "添加报修信息") |
| | | @PostMapping(value = "/addFault") |
| | | public R<String> addFault(@RequestBody TFaultRepairMessageDTO dto) { |
| | | dto.setTenantId(tokenService.getLoginUserApplet().getUserId()); |
| | | tFaultRepairMessageService.save(dto); |
| | | return R.ok(); |
| | | } |