liujie
1 天以前 ee6a2aa9e265f498ce7df9c603d3148487c0b1e8
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java
@@ -643,7 +643,12 @@
            PartyMember partyMember = identityInformationVO.getPartyMember();
            name = partyMember.getName();
        }
        Complaint complaint = BeanUtil.copyProperties(dto, Complaint.class);
        Long complaintId = dto.getId();
        Complaint complaint = this.getById(complaintId);
        Date createTime = complaint.getCreateTime();
        complaint = BeanUtil.copyProperties(dto, Complaint.class);
        complaint.setUpdateTime(new Date());
        complaint.setCompletionUserId(loginUserInfoVO.getUserId());
        complaint.setCompletionUsername(name);
@@ -651,7 +656,6 @@
        complaint.setCompletionTime(new Date());
        complaint.setCompletionUserLevel(accountLevel);
        // 计算处理时间
        Date createTime = complaint.getCreateTime();
        long l = Duration.between(createTime.toInstant(), complaint.getCompletionTime().toInstant()).getSeconds() / 3600;
        double handlingDay = new BigDecimal(l).divide(new BigDecimal("24"), 2, RoundingMode.HALF_UP).doubleValue();
        complaint.setHandlingDay(handlingDay);
@@ -1558,6 +1562,7 @@
        String[] split = time.split(" - ");
        System.out.println(split[0]);
    }
    @Override
    public List<AnalyticStatisticsTwoVo> analyticStatisticsTwo(String time, List<Complaint> complaints, SimpleDateFormat simpleDateFormat) {
        ArrayList<AnalyticStatisticsTwoVo> list = new ArrayList<>();
@@ -1644,7 +1649,7 @@
    @Override
    public AnalyticStatisticsFourVo analyticStatisticsFour(List<Complaint> complaints) {
        // 只计算评分了的
        complaints = complaints.stream().filter(e ->e.getCommentRate() != null).collect(Collectors.toList());
        complaints = complaints.stream().filter(e -> e.getCommentRate() != null).collect(Collectors.toList());
        AnalyticStatisticsFourVo vo = new AnalyticStatisticsFourVo();
        // 0:不满意 1:一般 2:满意 3:非常满意
        long count = complaints.stream().filter(e -> e.getCommentRate() != null && e.getCommentRate() == 0).count();
@@ -1673,7 +1678,7 @@
            targetId = partyMember.getId();
        } else if (identity.equals(2)) {
            //上级
            if (Objects.nonNull(query.getTier()) && !query.getTier().equals(-1)) {
            if (Objects.nonNull(query.getTier()) && query.getTier().equals(-1)) {
                accountLevel = systemUserLevel.getLevel();
                switch (systemUserLevel.getLevel()) {
                    case 1:
@@ -1693,12 +1698,12 @@
                        targetId = systemUserLevel.getCommunityId();
                        break;
                }
            }else {
            } else {
                targetId = Long.valueOf(query.getAreaId());
                accountLevel = query.getTier();
            }
        }
        return baseMapper.queryCompliantList(targetId, accountLevel, loginUserInfo);
        return baseMapper.queryCompliantList(targetId, accountLevel, loginUserInfo, query);
    }
}