1.
luofl
2025-02-23 e5ca6b1d9e961d51cb607e34ad259f7495d917e0
1.
1 文件已重命名
12个文件已修改
1个文件已删除
25个文件已添加
1060 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/BcRegionController.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/ComActController.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/ComStreetController.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/ComplaintAuditRecordController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/ComplaintController.java 70 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/dao/BcRegionMapper.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/dao/ComActMapper.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/dao/ComStreetMapper.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/enums/ReportTypeEnum.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/dto/ComplaintCompletionDTO.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/dto/ComplaintDelayAuditDTO.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/dto/ComplaintDelayDTO.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/dto/ComplaintDispatch.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/dto/ComplaintReporAuditDTO.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/dto/ComplaintReportDTO.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/entity/BcRegion.java 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/entity/ComAct.java 106 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/entity/ComStreet.java 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/entity/Complaint.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/entity/ComplaintAuditRecord.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/entity/ComplaintFlow.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/vo/DispatchVO.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/vo/WorkOrderVO.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/scheduled/ComplaintTasks.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IBcRegionService.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IComActService.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IComStreetService.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IComplaintAuditRecordService.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IComplaintFlowService.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IComplaintService.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/BcRegionServiceImpl.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComActServiceImpl.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComStreetServiceImpl.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintAuditRecordServiceImpl.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintFlowServiceImpl.java 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java 196 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/BcRegionMapper.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/ComActMapper.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/ComStreetMapper.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/BcRegionController.java
New file
@@ -0,0 +1,20 @@
package com.panzhihua.sangeshenbian.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
 * <p>
 * 行政区划表 前端控制器
 * </p>
 *
 * @author
 * @since 2025-02-23
 */
@RestController
@RequestMapping("/bc-region")
public class BcRegionController {
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/ComActController.java
New file
@@ -0,0 +1,20 @@
package com.panzhihua.sangeshenbian.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
 * <p>
 * 社区表 前端控制器
 * </p>
 *
 * @author
 * @since 2025-02-23
 */
@RestController
@RequestMapping("/com-act")
public class ComActController {
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/ComStreetController.java
New file
@@ -0,0 +1,20 @@
package com.panzhihua.sangeshenbian.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
 * <p>
 * 街道表 前端控制器
 * </p>
 *
 * @author
 * @since 2025-02-23
 */
@RestController
@RequestMapping("/com-street")
public class ComStreetController {
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/ComplaintAuditRecordController.java
@@ -1,6 +1,9 @@
package com.panzhihua.sangeshenbian.controller;
import com.panzhihua.common.model.vos.R;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -14,7 +17,8 @@
 * @since 2025-02-23
 */
@RestController
@RequestMapping("/complaint-audit-record")
@RequestMapping("/applet/complaint-audit-record")
public class ComplaintAuditRecordController {
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/ComplaintController.java
@@ -5,9 +5,7 @@
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.sangeshenbian.annotation.DistributedLock;
import com.panzhihua.sangeshenbian.dto.ComplaintReport;
import com.panzhihua.sangeshenbian.model.dto.ComplaintCompletionDTO;
import com.panzhihua.sangeshenbian.model.dto.ComplaintProcessDTO;
import com.panzhihua.sangeshenbian.model.dto.*;
import com.panzhihua.sangeshenbian.model.entity.Complaint;
import com.panzhihua.sangeshenbian.model.query.ComplaintQuery;
import com.panzhihua.sangeshenbian.model.vo.ComplaintVO;
@@ -15,10 +13,7 @@
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
/**
 * <p>
@@ -44,7 +39,7 @@
    @ApiOperation(value = "录入诉求")
    @DistributedLock(lockName = "complaint_serial_number_lock")
    public void save(Complaint complaint) {
        complaintService.saveComplaint(complaint,getUserId());
        complaintService.saveComplaint(complaint, getUserId());
    }
    @PostMapping("/list")
@@ -52,25 +47,76 @@
    public R<Page<ComplaintVO>> complaintList(@RequestBody ComplaintQuery query) {
        return R.ok(complaintService.complaintList(query));
    }
    @ApiOperation("办理进度录入")
    @PostMapping("/saveProcess")
    public R<?> saveProcess(@RequestBody ComplaintProcessDTO dto){
    public R<?> saveProcess(@RequestBody ComplaintProcessDTO dto) {
        complaintService.saveProcess(dto);
        return R.ok();
    }
    @ApiOperation("办理结果录入")
    @PostMapping("/saveResult")
    public R<?> saveResult(@RequestBody ComplaintCompletionDTO dto){
    public R<?> saveResult(@RequestBody ComplaintCompletionDTO dto) {
        complaintService.saveResult(dto);
        return R.ok();
    }
    /**
     * 问题上报
     */
    @PostMapping("/report")
    @ApiOperation(value = "问题上报")
    public void report(@RequestBody ComplaintReport complaintReport) {
        // TODO
    public R<?> report(@RequestBody ComplaintReportDTO complaintReportDTO) {
        complaintService.saveReport(complaintReportDTO, getLoginUserInfo());
        return R.ok();
    }
    /**
     * 诉求下派
     */
    @PostMapping("/saveDispatch")
    public R<?> saveDispatch(@RequestBody ComplaintDispatch dto){
        complaintService.saveDispatch(dto, getLoginUserInfo());
        return R.ok();
    }
    /**
     * 延期申请
     */
    @PostMapping("/saveDelay")
    public R<?> saveDelay(@RequestBody ComplaintDelayDTO dto){
        complaintService.saveDelay(dto, getLoginUserInfo());
        return R.ok();
    }
    /**
     * 延期审核
     */
    @PostMapping("/delayAudit")
    @ApiOperation(value = "延期审核")
    public R<?> delayAudit(@RequestBody ComplaintDelayAuditDTO dto) {
        complaintService.delayAudit(dto, getLoginUserInfo());
        return R.ok();
    }
    /**
     * 上报审核
     */
    @PostMapping("/reportAudit")
    @ApiOperation(value = "问题上报审核")
    public R<?> reportAudit(@RequestBody ComplaintReporAuditDTO dto) {
        complaintService.reportAudit(dto, getLoginUserInfo());
        return R.ok();
    }
    /**
     * 获取下派单位列表
     */
    @GetMapping("/getDispatchList")
    @ApiOperation(value = "获取下派单位列表")
    public R<?> getDispatchList() {
        return R.ok(complaintService.getDispatchList(getLoginUserInfo()));
    }
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/dao/BcRegionMapper.java
New file
@@ -0,0 +1,16 @@
package com.panzhihua.sangeshenbian.dao;
import com.panzhihua.sangeshenbian.model.entity.BcRegion;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
 * <p>
 * 行政区划表 Mapper 接口
 * </p>
 *
 * @author
 * @since 2025-02-23
 */
public interface BcRegionMapper extends BaseMapper<BcRegion> {
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/dao/ComActMapper.java
New file
@@ -0,0 +1,16 @@
package com.panzhihua.sangeshenbian.dao;
import com.panzhihua.sangeshenbian.model.entity.ComAct;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
 * <p>
 * 社区表 Mapper 接口
 * </p>
 *
 * @author
 * @since 2025-02-23
 */
public interface ComActMapper extends BaseMapper<ComAct> {
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/dao/ComStreetMapper.java
New file
@@ -0,0 +1,16 @@
package com.panzhihua.sangeshenbian.dao;
import com.panzhihua.sangeshenbian.model.entity.ComStreet;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
 * <p>
 * 街道表 Mapper 接口
 * </p>
 *
 * @author
 * @since 2025-02-23
 */
public interface ComStreetMapper extends BaseMapper<ComStreet> {
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/enums/ReportTypeEnum.java
New file
@@ -0,0 +1,33 @@
package com.panzhihua.sangeshenbian.enums;
public enum ReportTypeEnum {
    COMMUNITY(1, "社区"),
    STREET(2, "街道"),
    DISTRICT(3, "区县"),
    CITY(4, "市");
    private final int code;
    private final String description;
    ReportTypeEnum(int code, String description) {
        this.code = code;
        this.description = description;
    }
    public int getCode() {
        return code;
    }
    public String getDescription() {
        return description;
    }
    public static ReportTypeEnum fromCode(int code) {
        for (ReportTypeEnum type : ReportTypeEnum.values()) {
            if (type.getCode() == code) {
                return type;
            }
        }
        throw new IllegalArgumentException("Invalid code: " + code);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/dto/ComplaintCompletionDTO.java
@@ -14,6 +14,11 @@
@Data
@ApiModel("办理结果录入数据传输对象")
public class ComplaintCompletionDTO {
    @ApiModelProperty(value = "诉求id")
    private Long complaintId;
    @ApiModelProperty(value = "办结状态: 3-已办结 4-群众撤销")
    private Integer status;
    @ApiModelProperty(value = "办理结果描述")
    private String completionDescription;
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/dto/ComplaintDelayAuditDTO.java
New file
@@ -0,0 +1,19 @@
package com.panzhihua.sangeshenbian.model.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value = "延期审核")
public class ComplaintDelayAuditDTO {
    @ApiModelProperty(value = "审核记录id")
    private Long id;
    @ApiModelProperty(value = "诉求id")
    private Long complaintId;
    @ApiModelProperty(value = "审核结果: 1-通过 2-驳回")
    private Integer auditResult;
    @ApiModelProperty(value = "驳回原因")
    private String rejectReason;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/dto/ComplaintDelayDTO.java
New file
@@ -0,0 +1,22 @@
package com.panzhihua.sangeshenbian.model.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value = "诉求延期")
public class ComplaintDelayDTO {
    @ApiModelProperty(value = "诉求id")
    private Long complaintId;
    @ApiModelProperty("说明")
    private String comment;
    @ApiModelProperty("图片")
    private String images;
    @ApiModelProperty("视频")
    private String videos;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/dto/ComplaintDispatch.java
New file
@@ -0,0 +1,15 @@
package com.panzhihua.sangeshenbian.model.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value = "诉求下派")
public class ComplaintDispatch {
    @ApiModelProperty(value = "诉求id")
    private Long complaintId;
    @ApiModelProperty(value = "内容")
    private String comment;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/dto/ComplaintReporAuditDTO.java
New file
@@ -0,0 +1,16 @@
package com.panzhihua.sangeshenbian.model.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class ComplaintReporAuditDTO {
    @ApiModelProperty(value = "审核记录id")
    private Long id;
    @ApiModelProperty(value = "审核结果: 1-通过 2-驳回")
    private Integer auditResult;
    @ApiModelProperty(value = "驳回原因")
    private String rejectReason;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/dto/ComplaintReportDTO.java
File was renamed from springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/dto/ComplaintReport.java
@@ -1,4 +1,4 @@
package com.panzhihua.sangeshenbian.dto;
package com.panzhihua.sangeshenbian.model.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -6,11 +6,11 @@
@Data
@ApiModel(value = "诉求上报")
public class ComplaintReport {
public class ComplaintReportDTO {
    @ApiModelProperty(value = "诉求id")
    private Long id;
    private Long complaintId;
    @ApiModelProperty(value = "诉求内容")
    private String descriptionContent;
    private String comment;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/entity/BcRegion.java
New file
@@ -0,0 +1,70 @@
package com.panzhihua.sangeshenbian.model.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
 * <p>
 * 行政区划表
 * </p>
 *
 * @author
 * @since 2025-02-23
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="BcRegion对象", description="行政区划表")
public class BcRegion implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "主键")
    @TableId(value = "region_id", type = IdType.NONE)
    private String regionId;
    @ApiModelProperty(value = "行政区划编码")
    private String regionCode;
    @ApiModelProperty(value = "行政区划名称")
    private String regionName;
    @ApiModelProperty(value = "父id")
    private String parentId;
    @ApiModelProperty(value = "所在层级")
    private Integer hierarchyOrder;
    @ApiModelProperty(value = "同层顺序")
    private Integer levelOrder;
    @ApiModelProperty(value = "层级格式编码(格式 : `**`**` )")
    private String formatCode;
    @ApiModelProperty(value = "创建者")
    private Long createUserId;
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createDatetime;
    @ApiModelProperty(value = "修改者")
    private Long modifyUserId;
    @ApiModelProperty(value = "修改时间")
    private LocalDateTime modifyDatetime;
    @ApiModelProperty(value = "删除标识(0:未删除,1:已删除)")
    private Boolean deleteFlag;
    @ApiModelProperty(value = "子集数量")
    private Integer childrenNum;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/entity/ComAct.java
New file
@@ -0,0 +1,106 @@
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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
 * <p>
 * 社区表
 * </p>
 *
 * @author
 * @since 2025-02-23
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("com_act")
@ApiModel(value="ComAct对象", description="社区表")
public class ComAct implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = ",主键")
    @TableId(value = "community_id", type = IdType.NONE)
    private Long communityId;
    @ApiModelProperty(value = "街道Id")
    private Long streetId;
    @ApiModelProperty(value = "社区名字")
    private String name;
    @ApiModelProperty(value = "社区地址")
    private String address;
    @ApiModelProperty(value = "经度")
    private String lng;
    @ApiModelProperty(value = "维度")
    private String lat;
    @ApiModelProperty(value = "省份地址编码")
    private String provinceCode;
    @ApiModelProperty(value = "市级地址编码")
    private String cityCode;
    @ApiModelProperty(value = "区级地址编码")
    private String areaCode;
    @ApiModelProperty(value = "社区面积")
    private String square;
    @ApiModelProperty(value = "联系人")
    private String contacts;
    @ApiModelProperty(value = "联系人电话")
    private String contactsPhone;
    @ApiModelProperty(value = "社区总人口")
    private Integer totalUser;
    @ApiModelProperty(value = "社区书记-用户ID")
    private Long managerId;
    @ApiModelProperty(value = "社区书记_名称")
    private String managerName;
    @ApiModelProperty(value = "社区介绍")
    private String introduce;
    @ApiModelProperty(value = "层次递归字段(省>市>区县>街道>社区)")
    private String path;
    @ApiModelProperty(value = "超管账号")
    private String account;
    @ApiModelProperty(value = "账号密码")
    private String password;
    @ApiModelProperty(value = "状态 0 启用 1 禁用")
    private Integer state;
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createAt;
    @ApiModelProperty(value = "是否大屏统计(1.是 2.否)")
    private Integer isScreenStatistics;
    @ApiModelProperty(value = "明文密码")
    private String plaintextPassword;
    private String appId;
    private String solvePhone;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/entity/ComStreet.java
New file
@@ -0,0 +1,69 @@
package com.panzhihua.sangeshenbian.model.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
 * <p>
 * 街道表
 * </p>
 *
 * @author
 * @since 2025-02-23
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="ComStreet对象", description="街道表")
public class ComStreet implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = ",主键")
    @TableId(value = "street_id", type = IdType.NONE)
    private String streetId;
    @ApiModelProperty(value = "街道名称")
    private String name;
    @ApiModelProperty(value = "省份地址编码")
    private Integer provinceCode;
    @ApiModelProperty(value = "市级地址编码")
    private Integer cityCode;
    @ApiModelProperty(value = "区级地址编码")
    private Integer areaCode;
    @ApiModelProperty(value = "街道地址")
    private String address;
    @ApiModelProperty(value = "经度")
    private String lng;
    @ApiModelProperty(value = "纬度")
    private String lat;
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createAt;
    @ApiModelProperty(value = "超管账号")
    private String account;
    @ApiModelProperty(value = "账号密码")
    private String password;
    @ApiModelProperty(value = "联系电话")
    private String phone;
    private String appId;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/entity/Complaint.java
@@ -80,15 +80,11 @@
    @TableField("videos")
    private String videos;
    @ApiModelProperty(value = "审核状态:0-待审核 1-审核通过 2-审核驳回")
    @TableField("audit_status")
    private Integer auditStatus;
    @ApiModelProperty(value = "流转状态:0-正在办理 1-延期办理 2-超时办理 3-已办结")
    @ApiModelProperty(value = "流转状态:0-正在办理 1-延期办理 2-超时办理 3-已办结 4-群众撤销")
    @TableField("status")
    private Integer status;
    @ApiModelProperty(value = "上报类型 1-社区 2-街道 3-区县 4-市")
    @ApiModelProperty(value = "上报类型 1=市级账号,2=区县账号,3=街道账号,4=社区账号")
    @TableField("report_type")
    private Integer reportType;
@@ -134,7 +130,7 @@
    @ApiModelProperty(value = "办结人员id")
    @TableField("completion_user_id")
    private Integer completionUserId;
    private Long completionUserId;
    @ApiModelProperty(value = "办结人员")
    @TableField("completion_username")
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/entity/ComplaintAuditRecord.java
@@ -30,7 +30,7 @@
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.NONE)
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    @ApiModelProperty(value = "诉求id")
@@ -43,11 +43,15 @@
    @ApiModelProperty(value = "审核类型(1:延期申请, 2:上报申请)")
    @TableField("audit_type")
    private Boolean auditType;
    private Integer auditType;
    @ApiModelProperty(value = "审核状态 (0:待审核 1:审核通过 2:审核驳回)")
    @TableField("audit_status")
    private Boolean auditStatus;
    private Integer auditStatus;
    @ApiModelProperty(value = "驳回原因")
    @TableField("reject_reason")
    private String rejectReason;
    @ApiModelProperty(value = "上报说明/延期申请说明")
    @TableField("comment")
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/entity/ComplaintFlow.java
@@ -39,7 +39,7 @@
    @TableId(value = "complaint_id")
    private Long complaintId;
    @ApiModelProperty(value = "处理层级: 0-社区 1-街道 2-区/县 3市")
    @ApiModelProperty(value = "处理层级: 1-市级,2-区县,3-街道,4-社区")
    @TableField("level")
    private Integer level;
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/vo/DispatchVO.java
New file
@@ -0,0 +1,14 @@
package com.panzhihua.sangeshenbian.model.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel("下派单位")
public class DispatchVO {
    @ApiModelProperty(value = "下派单位id")
    private Long id;
    @ApiModelProperty(value = "下派单位名称")
    private String name;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/vo/WorkOrderVO.java
File was deleted
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/scheduled/ComplaintTasks.java
New file
@@ -0,0 +1,20 @@
package com.panzhihua.sangeshenbian.scheduled;
import com.panzhihua.sangeshenbian.service.IComplaintService;
import lombok.RequiredArgsConstructor;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@Component
@RequiredArgsConstructor
public class ComplaintTasks {
    private final IComplaintService complaintService;
    /**
     * 诉求超时处理
     */
    @Scheduled(fixedRate = 60000)
    public void complaintTimeout() {
        complaintService.list()
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IBcRegionService.java
New file
@@ -0,0 +1,16 @@
package com.panzhihua.sangeshenbian.service;
import com.panzhihua.sangeshenbian.model.entity.BcRegion;
import com.baomidou.mybatisplus.extension.service.IService;
/**
 * <p>
 * 行政区划表 服务类
 * </p>
 *
 * @author
 * @since 2025-02-23
 */
public interface IBcRegionService extends IService<BcRegion> {
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IComActService.java
New file
@@ -0,0 +1,16 @@
package com.panzhihua.sangeshenbian.service;
import com.panzhihua.sangeshenbian.model.entity.ComAct;
import com.baomidou.mybatisplus.extension.service.IService;
/**
 * <p>
 * 社区表 服务类
 * </p>
 *
 * @author
 * @since 2025-02-23
 */
public interface IComActService extends IService<ComAct> {
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IComStreetService.java
New file
@@ -0,0 +1,16 @@
package com.panzhihua.sangeshenbian.service;
import com.panzhihua.sangeshenbian.model.entity.ComStreet;
import com.baomidou.mybatisplus.extension.service.IService;
/**
 * <p>
 * 街道表 服务类
 * </p>
 *
 * @author
 * @since 2025-02-23
 */
public interface IComStreetService extends IService<ComStreet> {
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IComplaintAuditRecordService.java
@@ -1,5 +1,7 @@
package com.panzhihua.sangeshenbian.service;
import com.panzhihua.common.model.vos.LoginUserInfoVO;
import com.panzhihua.common.utlis.DateUtils;
import com.panzhihua.sangeshenbian.model.entity.ComplaintAuditRecord;
import com.baomidou.mybatisplus.extension.service.IService;
@@ -8,9 +10,14 @@
 * 诉求上报、延期申请审核表 服务类
 * </p>
 *
 * @author
 * @author
 * @since 2025-02-23
 */
public interface IComplaintAuditRecordService extends IService<ComplaintAuditRecord> {
    // 创建审核记录
    void createComplaintAuditRecord(Long complaintId, Integer auditType, String comment, Long userId);
    // 审核
    void audit(Long id, Long userId, Integer auditResult, String rejectReason);
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IComplaintFlowService.java
@@ -1,7 +1,10 @@
package com.panzhihua.sangeshenbian.service;
import com.panzhihua.sangeshenbian.model.entity.Complaint;
import com.panzhihua.sangeshenbian.model.entity.ComplaintFlow;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.Date;
/**
 * <p>
@@ -12,5 +15,5 @@
 * @since 2025-02-22
 */
public interface IComplaintFlowService extends IService<ComplaintFlow> {
    void createFlow(Long complaintId,Integer type, Long userId);
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IComplaintService.java
@@ -1,12 +1,15 @@
package com.panzhihua.sangeshenbian.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.sangeshenbian.model.dto.ComplaintCompletionDTO;
import com.panzhihua.sangeshenbian.model.dto.ComplaintProcessDTO;
import com.panzhihua.common.model.vos.LoginUserInfoVO;
import com.panzhihua.sangeshenbian.model.dto.*;
import com.panzhihua.sangeshenbian.model.entity.Complaint;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.sangeshenbian.model.query.ComplaintQuery;
import com.panzhihua.sangeshenbian.model.vo.ComplaintVO;
import com.panzhihua.sangeshenbian.model.vo.DispatchVO;
import java.util.List;
/**
 * <p>
@@ -37,4 +40,33 @@
     * @param dto
     */
    void saveResult(ComplaintCompletionDTO dto);
    /**
     * 诉求上报
     */
    void saveReport(ComplaintReportDTO dto, LoginUserInfoVO loginUserInfoVO);
    /**
     * 诉求下派
     */
    void saveDispatch(ComplaintDispatch dto, LoginUserInfoVO loginUserInfoVO);
    /**
     * 上报审核
     * @param complaintReporAuditDTO
     * @param loginUserInfoVO
     */
    void reportAudit(ComplaintReporAuditDTO complaintReporAuditDTO, LoginUserInfoVO loginUserInfoVO);
    /**
     * 延期申请
     */
    void saveDelay(ComplaintDelayDTO dto, LoginUserInfoVO loginUserInfoVO);
    /**
     * 延期审核
     */
    void delayAudit(ComplaintDelayAuditDTO complaintDelayAuditDTO, LoginUserInfoVO loginUserInfoVO);
    List<DispatchVO> getDispatchList(LoginUserInfoVO loginUserInfoVO);
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/BcRegionServiceImpl.java
New file
@@ -0,0 +1,20 @@
package com.panzhihua.sangeshenbian.service.impl;
import com.panzhihua.sangeshenbian.model.entity.BcRegion;
import com.panzhihua.sangeshenbian.dao.BcRegionMapper;
import com.panzhihua.sangeshenbian.service.IBcRegionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
 * <p>
 * 行政区划表 服务实现类
 * </p>
 *
 * @author
 * @since 2025-02-23
 */
@Service
public class BcRegionServiceImpl extends ServiceImpl<BcRegionMapper, BcRegion> implements IBcRegionService {
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComActServiceImpl.java
New file
@@ -0,0 +1,20 @@
package com.panzhihua.sangeshenbian.service.impl;
import com.panzhihua.sangeshenbian.model.entity.ComAct;
import com.panzhihua.sangeshenbian.dao.ComActMapper;
import com.panzhihua.sangeshenbian.service.IComActService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
 * <p>
 * 社区表 服务实现类
 * </p>
 *
 * @author
 * @since 2025-02-23
 */
@Service
public class ComActServiceImpl extends ServiceImpl<ComActMapper, ComAct> implements IComActService {
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComStreetServiceImpl.java
New file
@@ -0,0 +1,20 @@
package com.panzhihua.sangeshenbian.service.impl;
import com.panzhihua.sangeshenbian.model.entity.ComStreet;
import com.panzhihua.sangeshenbian.dao.ComStreetMapper;
import com.panzhihua.sangeshenbian.service.IComStreetService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
 * <p>
 * 街道表 服务实现类
 * </p>
 *
 * @author
 * @since 2025-02-23
 */
@Service
public class ComStreetServiceImpl extends ServiceImpl<ComStreetMapper, ComStreet> implements IComStreetService {
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintAuditRecordServiceImpl.java
@@ -1,5 +1,6 @@
package com.panzhihua.sangeshenbian.service.impl;
import com.panzhihua.common.utlis.DateUtils;
import com.panzhihua.sangeshenbian.model.entity.ComplaintAuditRecord;
import com.panzhihua.sangeshenbian.dao.ComplaintAuditRecordMapper;
import com.panzhihua.sangeshenbian.service.IComplaintAuditRecordService;
@@ -11,10 +12,36 @@
 * 诉求上报、延期申请审核表 服务实现类
 * </p>
 *
 * @author
 * @author
 * @since 2025-02-23
 */
@Service
public class ComplaintAuditRecordServiceImpl extends ServiceImpl<ComplaintAuditRecordMapper, ComplaintAuditRecord> implements IComplaintAuditRecordService {
    @Override
    public void createComplaintAuditRecord(Long complaintId, Integer auditType, String comment, Long userId) {
        ComplaintAuditRecord auditRecord = new ComplaintAuditRecord();
        auditRecord.setComplaintId(complaintId);
        auditRecord.setAuditType(1);
        auditRecord.setAuditStatus(0);
        auditRecord.setComment(comment);
        auditRecord.setCreateBy(userId);
        auditRecord.setCreateTime(DateUtils.getCurrentDate());
        auditRecord.setUpdateBy(userId);
        auditRecord.setUpdateTime(DateUtils.getCurrentDate());
        save(auditRecord);
    }
    @Override
    public void audit(Long id, Long userId, Integer auditResult, String rejectReason) {
        ComplaintAuditRecord auditRecord = getById(id);
        if (auditRecord == null) {
            throw new RuntimeException("审核记录不存在");
        }
        auditRecord.setAuditStatus(auditResult);
        auditRecord.setRejectReason(rejectReason);
        auditRecord.setUpdateBy(userId);
        auditRecord.setUpdateTime(DateUtils.getCurrentDate());
        save(auditRecord);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintFlowServiceImpl.java
@@ -1,10 +1,17 @@
package com.panzhihua.sangeshenbian.service.impl;
import com.panzhihua.sangeshenbian.model.entity.ComplaintFlow;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.panzhihua.common.exceptions.ServiceException;
import com.panzhihua.sangeshenbian.enums.ReportTypeEnum;
import com.panzhihua.sangeshenbian.model.entity.*;
import com.panzhihua.sangeshenbian.dao.ComplaintFlowMapper;
import com.panzhihua.sangeshenbian.service.IComplaintFlowService;
import com.panzhihua.sangeshenbian.service.*;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
/**
 * <p>
@@ -15,6 +22,46 @@
 * @since 2025-02-22
 */
@Service
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class ComplaintFlowServiceImpl extends ServiceImpl<ComplaintFlowMapper, ComplaintFlow> implements IComplaintFlowService {
    private final IComplaintService complaintService;
    private final IBcRegionService bcRegionService;
    private final IComStreetService comStreetService;
    private final IComActService comActService;
    @Override
    public void createFlow(Long complaintId , Integer type, Long userId) {
        Complaint complaint = complaintService.getById(complaintId);
        Integer reportType = complaint.getReportType();
        String name = getFlowName(reportType, complaint);
        ComplaintFlow complaintFlow = new ComplaintFlow();
        complaintFlow.setComplaintId(complaintId);
        complaintFlow.setLevel(reportType);
        complaintFlow.setName(name);
        complaintFlow.setCreateTime(new Date(System.currentTimeMillis()));
        complaintFlow.setType(type);
        save(complaintFlow);
    }
    private String getFlowName(Integer reportType, Complaint complaint) {
        String name;
        if (reportType == ReportTypeEnum.COMMUNITY.getCode()) {
            ComAct byId = comActService.getById(complaint.getSuperiorId());
            name = byId.getName();
        }else if (reportType == ReportTypeEnum.STREET.getCode()) {
            ComStreet comStreet = comStreetService.getById(complaint.getSuperiorId());
            name = comStreet.getName();
        }  else if (reportType == ReportTypeEnum.CITY.getCode() || reportType == ReportTypeEnum.DISTRICT.getCode()){
            BcRegion bcRegion = bcRegionService.getOne(new LambdaQueryWrapper<BcRegion>()
                    .eq(BcRegion::getRegionCode, complaint.getSuperiorId()));
            name = bcRegion.getRegionName();
        } else {
            // 处理未预期的账号等级
            throw new ServiceException("未知的账号等级");
        }
        return name;
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java
@@ -2,20 +2,25 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.utlis.DateUtils;
import com.panzhihua.sangeshenbian.model.dto.ComplaintCompletionDTO;
import com.panzhihua.sangeshenbian.model.dto.ComplaintProcessDTO;
import com.panzhihua.sangeshenbian.model.entity.Complaint;
import com.panzhihua.common.exceptions.ServiceException;
import com.panzhihua.common.model.vos.LoginUserInfoVO;
import com.panzhihua.sangeshenbian.enums.ReportTypeEnum;
import com.panzhihua.sangeshenbian.model.dto.*;
import com.panzhihua.sangeshenbian.model.entity.*;
import com.panzhihua.sangeshenbian.enums.ProcessStatusEnum;
import com.panzhihua.sangeshenbian.dao.ComplaintMapper;
import com.panzhihua.sangeshenbian.model.query.ComplaintQuery;
import com.panzhihua.sangeshenbian.service.IComplaintService;
import com.panzhihua.sangeshenbian.model.vo.DispatchVO;
import com.panzhihua.sangeshenbian.service.*;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.sangeshenbian.model.vo.ComplaintVO;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import static cn.hutool.core.util.ObjectUtil.isNull;
@@ -28,10 +33,18 @@
 * @since 2025-02-22
 */
@Service
@RequiredArgsConstructor
public class ComplaintServiceImpl extends ServiceImpl<ComplaintMapper, Complaint> implements IComplaintService {
    private final IComplaintAuditRecordService complaintAuditRecordService;
    private final ISystemUserService systemUserService;
    private final IComplaintFlowService complaintFlowService;
    private final IBcRegionService bcRegionService;
    private final IComStreetService comStreetService;
    private final IComActService comActService;
    @Override
    public void saveComplaint(Complaint complaint,Long userId) {
    public void saveComplaint(Complaint complaint, Long userId) {
        // 获取当前日期(年月日)
        String datePrefix = new SimpleDateFormat("yyyyMMdd").format(new Date());
@@ -57,17 +70,16 @@
        // 设置其他字段
        complaint.setStatus(ProcessStatusEnum.PROCESSING.getCode());
        complaint.setCreateTime(DateUtils.getCurrentDate());
        complaint.setCreateTime(new Date(System.currentTimeMillis()));
        complaint.setCreateBy(userId);
        complaint.setUpdateBy(userId);
        complaint.setUpdateTime(DateUtils.getCurrentDate());
        complaint.setUpdateTime(new Date(System.currentTimeMillis()));
        // 保存诉求记录
        save(complaint);
    }
    /**
     *
     * @param query
     * @return
     */
@@ -79,7 +91,8 @@
    }
    /**
     *办理进度录入
     * 办理进度录入
     *
     * @param dto
     */
    @Override
@@ -89,11 +102,174 @@
    /**
     * 办理结果录入
     *
     * @param dto
     */
    @Override
    public void saveResult(ComplaintCompletionDTO dto) {
    }
    @Override
    public void saveReport(ComplaintReportDTO dto, LoginUserInfoVO loginUserInfoVO) {
        String phone = loginUserInfoVO.getPhone();
        SystemUser adminUser = systemUserService.getOne(new LambdaQueryWrapper<SystemUser>()
                .eq(SystemUser::getPhone, phone)
                .eq(SystemUser::getIsAdmin, 1)
                .eq(SystemUser::getStatus, 3)
                .last("LIMIT 1"));
        Long superiorId;
        int reportType;
        if (adminUser == null) {
            superiorId = loginUserInfoVO.getCommunityId();
            reportType = ReportTypeEnum.COMMUNITY.getCode();
        } else {
            int accountLevel = adminUser.getAccountLevel(); // 改为基本类型
            if (accountLevel == 1) {
                throw new ServiceException("市级账号,无法上报!");
            }
            reportType = accountLevel + 1;
            // 使用基本类型比较并补充默认分支
            if (accountLevel == ReportTypeEnum.COMMUNITY.getCode()) {
                superiorId = Long.parseLong(adminUser.getStreetCode());
            } else if (accountLevel == ReportTypeEnum.STREET.getCode()) {
                superiorId = Long.parseLong(adminUser.getDistrictsCode());
            } else if (accountLevel == ReportTypeEnum.DISTRICT.getCode()) {
                superiorId = 510400L; // 攀枝花市
            } else {
                // 处理未预期的账号等级
                throw new ServiceException("未知的账号等级");
            }
        }
        Complaint complaint = getById(dto.getComplaintId());
        complaint.setReportType(reportType);
        complaint.setSuperiorId(superiorId);
        updateById(complaint);
        // 添加审核记录
        complaintAuditRecordService.createComplaintAuditRecord(dto.getComplaintId(), 2, dto.getComment(), loginUserInfoVO.getUserId());
    }
    @Override
    public void saveDispatch(ComplaintDispatch dto, LoginUserInfoVO loginUserInfoVO) {
        String phone = loginUserInfoVO.getPhone();
        SystemUser adminUser = systemUserService.getOne(new LambdaQueryWrapper<SystemUser>()
                .eq(SystemUser::getPhone, phone)
                .eq(SystemUser::getIsAdmin, 1)
                .eq(SystemUser::getStatus, 3)
                .last("LIMIT 1"));
        if (adminUser == null) {
            throw new ServiceException("无权下派");
        }
        long superiorId;
        int reportType;
        int accountLevel = adminUser.getAccountLevel(); // 改为基本类型
        if (accountLevel == 1) {
            throw new ServiceException("市级账号,无法上报!");
        }
        reportType = accountLevel - 1;
        // 使用基本类型比较并补充默认分支
        if (accountLevel == ReportTypeEnum.STREET.getCode()) {
            superiorId = Long.parseLong(adminUser.getCommunityCode());
        } else if (accountLevel == ReportTypeEnum.DISTRICT.getCode()) {
            superiorId = Long.parseLong(adminUser.getStreetCode());
        } else if (accountLevel == ReportTypeEnum.CITY.getCode()) {
            superiorId = Long.parseLong(adminUser.getDistrictsCode());
        } else {
            // 处理未预期的账号等级
            throw new ServiceException("未知的账号等级");
        }
        Complaint complaint = getById(dto.getComplaintId());
        complaint.setReportType(reportType);
        complaint.setSuperiorId(superiorId);
        updateById(complaint);
        // 添加流转记录
        complaintFlowService.createFlow(dto.getComplaintId(), 1, loginUserInfoVO.getUserId());
    }
    @Override
    public void reportAudit(ComplaintReporAuditDTO complaintReporAuditDTO, LoginUserInfoVO loginUserInfoVO) {
        complaintAuditRecordService.audit(complaintReporAuditDTO.getId(), loginUserInfoVO.getUserId(),
                complaintReporAuditDTO.getAuditResult(), complaintReporAuditDTO.getRejectReason());
        // 添加流转记录
        ComplaintAuditRecord complaintAuditRecord = complaintAuditRecordService.getById(complaintReporAuditDTO.getId());
        complaintFlowService.createFlow(complaintAuditRecord.getComplaintId(), 0, loginUserInfoVO.getUserId());
    }
    @Override
    public void saveDelay(ComplaintDelayDTO dto, LoginUserInfoVO loginUserInfoVO) {
        // 添加审核记录
        complaintAuditRecordService.createComplaintAuditRecord(dto.getComplaintId(), 1, dto.getComment(), loginUserInfoVO.getUserId());
    }
    @Override
    public void delayAudit(ComplaintDelayAuditDTO complaintDelayAuditDTO, LoginUserInfoVO loginUserInfoVO) {
        complaintAuditRecordService.audit(complaintDelayAuditDTO.getId(), loginUserInfoVO.getUserId(),
                complaintDelayAuditDTO.getAuditResult(), complaintDelayAuditDTO.getRejectReason());
    }
    @Override
    public List<DispatchVO> getDispatchList(LoginUserInfoVO loginUserInfoVO) {
        String phone = loginUserInfoVO.getPhone();
        SystemUser adminUser = systemUserService.getOne(new LambdaQueryWrapper<SystemUser>()
                .eq(SystemUser::getPhone, phone)
                .eq(SystemUser::getIsAdmin, 1)
                .eq(SystemUser::getStatus, 3)
                .last("LIMIT 1"));
        if (adminUser == null) {
            throw new ServiceException("无权下派");
        }
        int accountLevel = adminUser.getAccountLevel(); // 改为基本类型
        if (accountLevel == 1) {
            throw new ServiceException("市级账号,无法上报!");
        }
        // 使用基本类型比较并补充默认分支
        List<DispatchVO> dispatchVOList = new ArrayList<>();
        if (accountLevel == ReportTypeEnum.STREET.getCode()) {
            List<ComAct> list = comActService.list();
            for (ComAct comAct : list) {
                DispatchVO dispatchVO = new DispatchVO();
                dispatchVO.setId(comAct.getCommunityId());
                dispatchVO.setName(comAct.getName());
                dispatchVOList.add(dispatchVO);
            }
        } else if (accountLevel == ReportTypeEnum.DISTRICT.getCode()) {
            List<ComStreet> list = comStreetService.list();
            for (ComStreet street : list) {
                DispatchVO dispatchVO = new DispatchVO();
                dispatchVO.setId(Long.valueOf(street.getStreetId()));
                dispatchVO.setName(street.getName());
                dispatchVOList.add(dispatchVO);
            }
        } else if (accountLevel == ReportTypeEnum.CITY.getCode()) {
            List<BcRegion> list = bcRegionService.list(new LambdaQueryWrapper<BcRegion>()
                    .eq(BcRegion::getHierarchyOrder, 3));
            for (BcRegion region : list) {
                DispatchVO dispatchVO = new DispatchVO();
                dispatchVO.setId(Long.valueOf(region.getRegionCode()));
                dispatchVO.setName(region.getRegionName());
                dispatchVOList.add(dispatchVO);
            }
        } else {
            // 处理未预期的账号等级
            throw new ServiceException("未知的账号等级");
        }
        return dispatchVOList;
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/BcRegionMapper.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.panzhihua.sangeshenbian.dao.BcRegionMapper">
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/ComActMapper.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.panzhihua.sangeshenbian.dao.ComActMapper">
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/ComStreetMapper.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.panzhihua.sangeshenbian.dao.ComStreetMapper">
</mapper>