39faeb972b20562bf2f0b7b8cc4474ea8a3998e1..918e3f07f06b36746959add0109c60bd4c376a5c
昨天 liujie
修改bug
918e3f 对比 | 目录
昨天 liujie
修改bug
ee6a2a 对比 | 目录
12个文件已修改
101 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/SystemUserController.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/HomeController.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/entity/ComAct.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/entity/SystemUser.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/vo/AppComplaintRejectVO.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/vo/ComplaintRejectVo.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/vo/ComplaintVO.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/StaticsService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/MgtComplaintQuery.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/ComplaintMapper.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/ComplaintRejectMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/SystemUserController.java
@@ -220,7 +220,7 @@
        // 获取最高层级的用于原来的判断
        systemUserLevels.sort(Comparator.comparing(SystemUserLevel::getLevel));
        Integer level = systemUserLevels.get(0).getLevel();
        user.setAccountLevel(level);
        systemUser.setAccountLevel(level);
        if(2 == user.getAccountLevel() && 1 == systemUser.getAccountLevel()){
@@ -284,6 +284,9 @@
            return R.fail("手机号重复。");
        }
        String districtsCode = systemUser.getDistrictsCode();
        if (!StringUtils.isEmpty(districtsCode)){
            BcRegion bcRegion = bcRegionService.getOne(new LambdaQueryWrapper<BcRegion>().eq(BcRegion::getRegionCode, districtsCode));
@@ -304,6 +307,12 @@
        systemUser.setStatus(1);
        systemUser.setCreateTime(LocalDateTime.now());
        // 获取最高层级的用于原来的判断
        systemUserLevels.sort(Comparator.comparing(SystemUserLevel::getLevel));
        Integer level = systemUserLevels.get(0).getLevel();
        systemUser.setAccountLevel(level);
        systemUserService.updateById(systemUser);
        // 移除原来层级 在添加新层级
        systemUserLevelService.remove(new LambdaQueryWrapper<SystemUserLevel>().eq(SystemUserLevel::getSystemUserId, systemUser.getId()));
@@ -311,6 +320,8 @@
            e.setSystemUserId(systemUser.getId());
            e.setStatus(1);
        });
        systemUserLevelService.saveBatch(systemUserLevels);
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/HomeController.java
@@ -13,6 +13,7 @@
import com.panzhihua.sangeshenbian.model.entity.Banner;
import com.panzhihua.sangeshenbian.model.entity.PartyMember;
import com.panzhihua.sangeshenbian.model.entity.SystemUser;
import com.panzhihua.sangeshenbian.model.entity.SystemUserLevel;
import com.panzhihua.sangeshenbian.model.query.BasePage;
import com.panzhihua.sangeshenbian.model.vo.ComplaintTodoVO;
import com.panzhihua.sangeshenbian.model.vo.MessageNotificationVO;
@@ -48,7 +49,7 @@
    private final IPartyMemberService partyMemberService;
    private final RedisUtils redisUtils;
    private final IdentityInformationService identityInformationService;
    private final ISystemUserLevelService systemUserLevelService;
    @ApiOperation("获取banner列表")
    @GetMapping("/banner-list")
    public R<List<Banner>> getBannerList() {
@@ -91,7 +92,29 @@
    @GetMapping("/current-user-info")
    @ApiOperation("获取三个身边当前用户信息 用于判断用户是否是上级")
    public R<SystemUser> getCurrentUserInfo() {
        return R.ok(systemUserService.getSystemUserAdminByPhone(getLoginUserInfo().getPhone()).orElse(null));
        SystemUser systemUser = systemUserService.getSystemUserAdminByPhone(getLoginUserInfo().getPhone()).orElse(null);
        Object o1 = redisUtils.get("identity:" + getLoginUserInfo().getPhone());
        if(o1!=null){
            UserIdentityDTO o2 = (UserIdentityDTO) o1;
            Integer levelId = o2.getLevelId();
            if(levelId!=null) {
                SystemUserLevel systemUserLevel = systemUserLevelService.getById(levelId);
                if (systemUserLevel == null) {
                    List<SystemUserLevel> list = systemUserLevelService.list(new LambdaQueryWrapper<SystemUserLevel>().eq(SystemUserLevel::getSystemUserId, systemUser.getId()).eq(SystemUserLevel::getStatus, 1));
                    if (list.size() > 0) {
                        systemUser.setLevelId(list.get(0).getLevel());
                    }
                } else {
                    systemUser.setLevelId(systemUserLevel.getLevel());
                }
            }else {
                List<SystemUserLevel> list = systemUserLevelService.list(new LambdaQueryWrapper<SystemUserLevel>().eq(SystemUserLevel::getSystemUserId, systemUser.getId()).eq(SystemUserLevel::getStatus, 1));
                if (list.size() > 0) {
                    systemUser.setLevelId(list.get(0).getLevel());
                }
            }
        }
        return R.ok(systemUser);
    }
    /**
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/entity/ComAct.java
@@ -1,15 +1,17 @@
package com.panzhihua.sangeshenbian.model.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
 * <p>
@@ -30,9 +32,11 @@
    @ApiModelProperty(value = ",主键")
    @TableId(value = "community_id", type = IdType.NONE)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long communityId;
    @ApiModelProperty(value = "街道Id")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long streetId;
    @ApiModelProperty(value = "社区名字")
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/entity/SystemUser.java
@@ -146,6 +146,9 @@
    @ApiModelProperty(value = "账号层级 2.0.1新增")
    private List<SystemUserLevel> systemUserLevels;
    @TableField(exist = false)
    private Integer levelId;
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/vo/AppComplaintRejectVO.java
@@ -1,8 +1,8 @@
package com.panzhihua.sangeshenbian.model.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.panzhihua.sangeshenbian.model.entity.Complaint;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -42,4 +42,8 @@
    @ApiModelProperty("驳回类型 1:延期被驳回 2:上报被驳回")
    private Integer auditType;
    @ApiModelProperty("诉求id")
    @JsonSerialize(using = com.fasterxml.jackson.databind.ser.std.ToStringSerializer.class)
    private Long complaintId;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/vo/ComplaintRejectVo.java
@@ -1,5 +1,6 @@
package com.panzhihua.sangeshenbian.model.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -8,6 +9,7 @@
@ApiModel("问题驳回Vo")
public class ComplaintRejectVo {
    @ApiModelProperty(value = "诉求Id")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long complaintId;
    @ApiModelProperty("诉求号")
    private String serialNumber;
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/vo/ComplaintVO.java
@@ -100,4 +100,5 @@
    @ApiModelProperty(value = "已上报次数")
    private Integer reportCount;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java
@@ -265,7 +265,7 @@
            Long reporterId = s.getReporterId();
            Long superiorId = s.getSuperiorId2();
            if (!targetId.equals(reporterId) && !targetId.equals(superiorId) && (s.getStatus() == 5)) {
                s.setStatus(0);
//                s.setStatus(0);
            }
        }
        return page;
@@ -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);
@@ -1097,6 +1101,11 @@
        }
        //审核不通过
        if (complaintAuditRecord.getAuditType().equals(1) && complaintAuditRecord.getAuditStatus().equals(0) && dto.getAuditResult().equals(2)) {
            Complaint complaint = getById(complaintAuditRecord.getComplaintId());
            // 设置为正在办理
            complaint.setStatus(0);
            updateById(complaint);
            complaintAuditRecord.setRejectReason(dto.getRejectReason());
            complaintAuditRecord.setAuditStatus(2);
            complaintAuditRecord.setAuditorId(loginUserInfoVO.getUserId());
@@ -1558,6 +1567,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 +1654,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();
@@ -1693,12 +1703,12 @@
                        targetId = systemUserLevel.getCommunityId();
                        break;
                }
            }else {
            } else {
                targetId = Long.valueOf(query.getAreaId());
                accountLevel = query.getTier();
            }
        }
        return baseMapper.queryCompliantList(targetId, accountLevel, loginUserInfo,query);
        return baseMapper.queryCompliantList(targetId, accountLevel, loginUserInfo, query);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/StaticsService.java
@@ -47,7 +47,7 @@
    public List<RegionVO> queryRegionTree(LoginUserInfoVO loginUserInfo) {
        IdentityInformation currentIdentityInformation = identityInformationService.getCurrentIdentityInformation(loginUserInfo);
        if (!Integer.valueOf(2).equals(currentIdentityInformation.getIdentity())) {
            throw new ServiceException("当前账号无权限");
            return Collections.emptyList();
        }
        SystemUserLevel userLevel = currentIdentityInformation.getSystemUserLevel();
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/MgtComplaintQuery.java
@@ -1,15 +1,10 @@
package com.panzhihua.sangeshenbian.warpper;
import com.baomidou.mybatisplus.annotation.TableField;
import com.panzhihua.sangeshenbian.model.query.BasePage;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
/**
 * @author mitao
@@ -32,11 +27,11 @@
    @ApiModelProperty(value = "发生时间-开始")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;
    private String startTime;
    @ApiModelProperty(value = "发生时间-结束")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;
    private String endTime;
    @ApiModelProperty(value = "问题类型")
    private String problemType;
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/ComplaintMapper.xml
@@ -233,7 +233,8 @@
        ifnull((select a.create_time from sgsb_complaint_audit_record a where a.audit_status != 0 and a.complaint_id = #{id} order by a.sort desc limit 0, 1), "") AS auditTime,
        ifnull((select a.reject_reason from sgsb_complaint_audit_record a where a.audit_status != 0 and a.complaint_id = #{id} order by a.sort desc limit 0, 1), "") as rejectReason,
        su.nick_name,
        su.phone
        su.phone,
        sc.voice_file voiceFile
        FROM sgsb_complaint sc
        LEFT JOIN sys_user su ON su.user_id = sc.create_by
        LEFT JOIN sgsb_complaint_audit_record scar ON scar.complaint_id = sc.id and scar.latest_flag = 1
@@ -603,7 +604,7 @@
    <select id="queryRejectRecordPage" resultType="com.panzhihua.sangeshenbian.model.vo.AppComplaintRejectVO">
        SELECT
        scar.id,
        scar.complaint_id,
        scar.complaint_id complaintId,
        scar.auditor_id,
        scar.audit_type,
        scar.audit_status,
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/ComplaintRejectMapper.xml
@@ -15,6 +15,7 @@
        from sgsb_complaint_audit_record t3
        left join sgsb_complaint t2 on t3.complaint_id = t2.id
        <where>
            t3.audit_status=2
            <if test="query.serialNumber != null and query.serialNumber != ''">
                and t2.serial_number = #{query.serialNumber}
            </if>