| | |
| | | @PostMapping(value = "/api/t-inspection-report/update") |
| | | public R<Boolean> update(@RequestBody String param) { |
| | | TInspectionReportDTO dto = JSON.parseObject(param,TInspectionReportDTO.class); |
| | | Integer roleType = tokenService.getLoginUser().getUser().getRoleType(); |
| | | TInspectionReport inspectionReport = inspectionReportService.getById(dto.getId()); |
| | | |
| | | if (Objects.equals(roleType, 1) |
| | | && Objects.nonNull(inspectionReport) |
| | | && Objects.equals(inspectionReport.getStatus(), 2)) { |
| | | return R.fail("化验师已提交的检验报告不允许编辑"); |
| | | } |
| | | |
| | | if (SecurityUtils.isAdmin(SecurityUtils.getUserId())) { |
| | | dto.setStatus(null); |