mitao
2025-03-18 729f3af10a01c2179d08d7f15b0015a0b86a6a08
bug修改
4个文件已修改
47 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/enums/ReportTypeEnum.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/entity/Complaint.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/template/协调通知单.docx 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/enums/ReportTypeEnum.java
@@ -31,4 +31,12 @@
        }
        throw new IllegalArgumentException("Invalid code: " + code);
    }
    public static String getDescriptionByCode(Integer code) {
        for (ReportTypeEnum type : ReportTypeEnum.values()) {
            if (type.getCode() == code) {
                return type.getDescription();
            }
        }
        return "";
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/entity/Complaint.java
@@ -178,6 +178,10 @@
    @TableField("completion_user_phone")
    private String completionUserPhone;
    @ApiModelProperty(value = "办结人层级 1=市级账号,2=区县账号,3=街道账号,4=社区账号,5=党员账号")
    @TableField("completion_user_level")
    private Integer completionUserLevel;
    @ApiModelProperty(value = "截止日期")
    @TableField("closing_time")
    private Date closingTime;
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java
@@ -13,6 +13,7 @@
import com.panzhihua.common.model.vos.LoginUserInfoVO;
import com.panzhihua.common.model.vos.sangeshenbian.SystemUserVo;
import com.panzhihua.sangeshenbian.dao.ComplaintMapper;
import com.panzhihua.sangeshenbian.enums.AuditStatusEnum;
import com.panzhihua.sangeshenbian.enums.ProcessStatusEnum;
import com.panzhihua.sangeshenbian.enums.RateEnum;
import com.panzhihua.sangeshenbian.enums.ReportTypeEnum;
@@ -537,12 +538,29 @@
     */
    @Override
    public void saveResult(ComplaintCompletionDTO dto, LoginUserInfoVO loginUserInfoVO) {
        //获取当前身份
        IdentityInformation identityInformationVO = identityInformationService.getIdentityInformation(loginUserInfoVO);
        List<PermissionsVO> permissions = identityInformationVO.getPermissions();
        if (permissions.isEmpty()) {
            throw new ServiceException("请先完善个人信息");
        }
        Integer accountLevel = null;
        //上级
        if (identityInformationVO.getIdentity() == 2) {
            //1=党员,2=管理员
            SystemUser systemUser = identityInformationVO.getSystemUser();
            accountLevel = systemUser.getAccountLevel();
        }else if (identityInformationVO.getIdentity() == 1){
            accountLevel = 5;
        }
        Complaint complaint = BeanUtil.copyProperties(dto, Complaint.class);
        complaint.setUpdateTime(new Date());
        complaint.setCompletionUserId(loginUserInfoVO.getUserId());
        complaint.setCompletionUsername(loginUserInfoVO.getNickName());
        complaint.setCompletionUserPhone(loginUserInfoVO.getPhone());
        complaint.setCompletionTime(new Date());
        complaint.setCompletionUserLevel(accountLevel);
        this.updateById(complaint);
    }
@@ -1045,12 +1063,13 @@
        Complaint complaint = getById(id);
        ComplaintVO complaintVO = BeanUtil.copyProperties(complaint, ComplaintVO.class);
        //查询办理进度
        List<ComplaintProgress> complaintProgresses = complaintProgressService.lambdaQuery().eq(ComplaintProgress::getComplaintId, id).orderByAsc(ComplaintProgress::getCreateTime).list();
        List<ComplaintProgress> complaintProgresses = complaintProgressService.lambdaQuery()
                .eq(ComplaintProgress::getComplaintId, id).orderByDesc(ComplaintProgress::getCreateTime).list();
        complaintVO.setComplaintProgresses(complaintProgresses);
        //查询诉求流转记录
        List<ComplaintFlow> complaintFlows = complaintFlowService.lambdaQuery()
                .eq(ComplaintFlow::getComplaintId, id)
                .orderByDesc(ComplaintFlow::getCreateTime)
                .orderByAsc(ComplaintFlow::getCreateTime)
                .list();
        complaintVO.setComplaintFlows(complaintFlows);
        //查询评价
@@ -1136,8 +1155,18 @@
                if (Objects.nonNull(partyMember)) {
                    community = community + "-" + partyMember.getServiceTarget();
                }
                reportType = complaint.getCompletionUserLevel();
                break;
            case 3:
                //如果上报或下派了,取当前操作人的层级
                ComplaintAuditRecord record = complaintAuditRecordService.lambdaQuery().eq(ComplaintAuditRecord::getComplaintId, complaint.getId())
                        .in(ComplaintAuditRecord::getAuditType, 2, 3)
                        .eq(ComplaintAuditRecord::getAuditStatus, AuditStatusEnum.APPROVED.getCode())
                        .eq(ComplaintAuditRecord::getLatestFlag, true)
                        .last("LIMIT 1").one();
                if (Objects.nonNull(record)) {
                    reportType = record.getReportType();
                }
                fileName = "协调通知单";
                break;
        }
@@ -1145,7 +1174,7 @@
        map.put("community", community);
        map.put("problemType", complaint.getProblemType());
        map.put("descriptionContent", complaint.getDescriptionContent());
        map.put("reportType", ReportTypeEnum.fromCode(reportType).getDescription());
        map.put("reportType", ReportTypeEnum.getDescriptionByCode(reportType));
        map.put("partyOrganization", Objects.nonNull(partyMember) ? partyMember.getPartyOrganization() : "");
        map.put("name", complaint.getName());
        map.put("contactNumber", complaint.getContactNumber());
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/template/协调通知单.docx
Binary files differ