| | |
| | | @ApiOperation(value = "获取erp问题上报分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public R<PageInfo<TErpIssueReportingVO>> pageList(@RequestBody TErpIssueReportingQuery query) { |
| | | Integer roleType = tokenService.getLoginUser().getUser().getRoleType(); |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | if(roleType == 4){ |
| | | query.setReportType(1); |
| | | TCrmSupplier crmSupplier = crmSupplierService.getOne(Wrappers.lambdaQuery(TCrmSupplier.class) |
| | | .eq(TCrmSupplier::getUserId, userId) |
| | | .last("LIMIT 1")); |
| | | query.setReportUserId(crmSupplier.getId()); |
| | | } |
| | | if(roleType == 5){ |
| | | query.setReportType(2); |
| | | TCrmClinic crmClinic = crmClinicService.getOne(Wrappers.lambdaQuery(TCrmClinic.class) |
| | | .eq(TCrmClinic::getUserId, userId) |
| | | .last("LIMIT 1")); |
| | | query.setReportUserId(crmClinic.getId()); |
| | | } |
| | | return R.ok(erpIssueReportingService.pageList(query)); |
| | | } |
| | | |