luofl
2025-04-14 6718c3b53e6f5d5fae16f9f01af03771405836c5
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java
@@ -252,13 +252,16 @@
        //page = baseMapper.selectComplaintPage(page, query, targetId, isSuperior);
        page = baseMapper.selectComplaintPage1(page, query, accountLevel, targetId);
        page.getRecords().forEach(s -> {
        for (ComplaintVO s : page.getRecords()) {
            buttonPermission(s, systemUserByPhone, loginUserInfoVO);
            Integer auditButtonStatus = s.getAuditButtonStatus();
            if (auditButtonStatus == 1 && s.getStatus() == 5 && !Objects.equals(s.getAuditCreateBy(), loginUserInfoVO.getUserId())){
            Long reporterId = s.getReporterId();
            Long superiorId = s.getSuperiorId2();
            if (!targetId.equals(reporterId) && !targetId.equals(superiorId) && (s.getStatus() == 5)) {
                s.setStatus(0);
            }
        });
        }
        return page;
    }
@@ -505,23 +508,21 @@
        List<ComplaintProgress> list = complaintProgressService.lambdaQuery().eq(ComplaintProgress::getComplaintId, id)
                .orderByAsc(ComplaintProgress::getCreateTime).list();
        detail.setComplaintProgresses(list);
//        detail.setAuditButtonStatus(1);
//        detail.setEvaluateButtonStatus(1);
//        if((detail.getStatus() == 5 || detail.getStatus() == 7) && systemUserByPhone.isPresent()){
//            ComplaintAuditRecord one = complaintAuditRecordService.getOne(new LambdaQueryWrapper<ComplaintAuditRecord>().eq(ComplaintAuditRecord::getComplaintId, detail.getId())
//                    .eq(ComplaintAuditRecord::getLatestFlag, 1));
//            Integer isAdmin = systemUserByPhone.get().getIsAdmin();
//            if(one.getReportType().equals(accountLevel) && one.getSuperiorId().toString().equals(targetId) && 1 == isAdmin){
//                detail.setAuditButtonStatus(0);
//            }
//        }
        buttonPermission(detail, systemUserByPhone, loginUserInfoVO);
        Integer auditButtonStatus = detail.getAuditButtonStatus();
        if (auditButtonStatus == 1 && detail.getStatus() == 5 && !Objects.equals(detail.getAuditCreateBy(), loginUserInfoVO.getUserId())){
        Long reporterId = detail.getReporterId();
        Long superiorId = detail.getSuperiorId2();
        if (!String.valueOf(reporterId).equals(targetId) && !String.valueOf(superiorId).equals(targetId) && detail.getStatus() == 5) {
            detail.setStatus(0);
        }
//        if (auditButtonStatus == 1 && detail.getStatus() == 5 && !Objects.equals(detail.getAuditCreateBy(), loginUserInfoVO.getUserId())){
//            detail.setStatus(0);
//        }
//        //已办结,显示评价按钮
@@ -624,7 +625,6 @@
        return complaintProgressService.lambdaQuery().eq(ComplaintProgress::getComplaintId, complaintId)
                .orderByAsc(ComplaintProgress::getCreateTime).list();
    }
    @Override