| | |
| | | updateById(complaint); |
| | | Long superiorOrgId = complaint.getSuperiorId(); |
| | | Integer superiorType = complaint.getSuperiorType(); |
| | | |
| | | //查询当前单位审核记录表数据 |
| | | //查询上报审核记录 |
| | | ComplaintAuditRecord complaintAuditRecord = complaintAuditRecordService.lambdaQuery() |
| | | .eq(ComplaintAuditRecord::getComplaintId, dto.getComplaintId()) |
| | | .eq(ComplaintAuditRecord::getAuditType, 0) |
| | | .eq(ComplaintAuditRecord::getLatestFlag, true) |
| | | .eq(ComplaintAuditRecord::getReportType, adminUser.getAccountLevel()) |
| | | .last("LIMIT 1").one(); |
| | | // 添加流转记录 |
| | | complaintFlowService.createFlow(dto.getComplaintId(), superiorOrgId, superiorType, 1, loginUserInfoVO.getUserId()); |
| | | complaintFlowService.createFlow(complaintAuditRecord, 1,loginUserInfoVO.getUserId()); |
| | | |
| | | // 标记最新 |
| | | complaintAuditRecordService.update(new LambdaUpdateWrapper<ComplaintAuditRecord>() |
| | |
| | | .eq(ComplaintAuditRecord::getReportType, systemUser.getAccountLevel()) |
| | | .eq(ComplaintAuditRecord::getSuperiorId, superiorId) |
| | | .last("LIMIT 1").one(); |
| | | ComplaintAuditRecord lowLevelRecord = complaintAuditRecordService.lambdaQuery() |
| | | .eq(ComplaintAuditRecord::getComplaintId, complaintReporAuditDTO.getId()) |
| | | .eq(ComplaintAuditRecord::getAuditType, 2) |
| | | .eq(ComplaintAuditRecord::getLatestFlag, true) |
| | | .eq(ComplaintAuditRecord::getReportType, systemUser.getAccountLevel()+1) |
| | | .last("LIMIT 1").one(); |
| | | if (Objects.isNull(complaintAuditRecord)) { |
| | | throw new ServiceException("上报申请记录不存在"); |
| | | } |
| | |
| | | record.setSuperiorId(superiorId); |
| | | record.setSort(count + 1); |
| | | complaintAuditRecordService.save(record); |
| | | |
| | | |
| | | if (Objects.nonNull(complaint.getSuperiorId())) { |
| | | complaintFlowService.createFlow(complaintAuditRecord.getComplaintId(), complaint.getSuperiorId(), complaint.getSuperiorType(), 0, loginUserInfoVO.getUserId()); |
| | | } else { |
| | | complaintFlowService.createFlow(complaintAuditRecord.getComplaintId(), complaint.getCreateBy(), complaint.getReportType(), 0, loginUserInfoVO.getUserId()); |
| | | } |
| | | |
| | | //创建流程 |
| | | complaintFlowService.createFlow(lowLevelRecord ,0, loginUserInfoVO.getUserId()); |
| | | } else { |
| | | |
| | | switch (systemUser.getAccountLevel() + 1) { |
| | |
| | | int reportType; |
| | | if (systemUser == null) { |
| | | superiorId = loginUserInfoVO.getCommunityId(); |
| | | currentId = loginUserInfoVO.getCommunityId(); |
| | | currentId = loginUserInfoVO.getUserId(); |
| | | if (Objects.isNull(superiorId)) { |
| | | throw new ServiceException("上报失败,请绑定社区"); |
| | | } |
| | |
| | | } else if (accountLevel == ReportTypeEnum.DISTRICT.getCode()) { |
| | | superiorId = 510400L; // 攀枝花市 |
| | | currentId = Long.parseLong(systemUser.getDistrictsCode()); |
| | | } else if (accountLevel == ReportTypeEnum.PARTY.getCode()) { |
| | | superiorId = systemUser.getCommunityId(); |
| | | currentId = loginUserInfoVO.getUserId(); |
| | | } else { |
| | | // 处理未预期的账号等级 |
| | | throw new ServiceException("未知的账号等级"); |