mitao
2025-03-01 ba7ec450a7538f69f31fbc09a978a6d476d2a939
bug修改
3个文件已修改
44 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IComplaintFlowService.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintFlowServiceImpl.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IComplaintFlowService.java
@@ -1,6 +1,7 @@
package com.panzhihua.sangeshenbian.service;
import com.panzhihua.sangeshenbian.model.entity.Complaint;
import com.panzhihua.sangeshenbian.model.entity.ComplaintAuditRecord;
import com.panzhihua.sangeshenbian.model.entity.ComplaintFlow;
import com.baomidou.mybatisplus.extension.service.IService;
@@ -18,10 +19,9 @@
    /**
     * 创建流程
     * @param complaintId
     * @param reportType
     * @param record
     * @param type 流转类型 0-上报 1-下派
     * @param userId
     */
    void createFlow(Long complaintId , Long superiorId, Integer reportType, Integer type, Long userId);
    void createFlow(ComplaintAuditRecord record, Integer type, Long userId);
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintFlowServiceImpl.java
@@ -37,14 +37,13 @@
    private final UserService userService;
    @Override
    public void createFlow(Long complaintId , Long superiorId, Integer reportType, Integer type, Long userId) {
        String name = getFlowName(reportType, superiorId);
    public void createFlow(ComplaintAuditRecord record, Integer type,Long userId) {
        //获取流程部门名称
        String name = getFlowName(record.getReportType(), record.getSuperiorId());
        ComplaintFlow complaintFlow = new ComplaintFlow();
        complaintFlow.setComplaintId(complaintId);
        complaintFlow.setLevel(reportType);
        complaintFlow.setComplaintId(record.getComplaintId());
        complaintFlow.setLevel(record.getReportType());
        complaintFlow.setName(name);
        complaintFlow.setCreateTime(new Date(System.currentTimeMillis()));
        complaintFlow.setType(type);
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java
@@ -441,9 +441,16 @@
        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>()
@@ -499,6 +506,12 @@
                .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("上报申请记录不存在");
        }
@@ -531,14 +544,8 @@
            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) {