Browse Source

涉访涉诉--办理初版

master
buaixuexideshitongxue 1 month ago
parent
commit
9ebd12a172
  1. 23
      src/main/java/com/biutag/supervision/controller/data/ComplaintCollectionController.java
  2. 3
      src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java
  3. 12
      src/main/java/com/biutag/supervision/mapper/ComplaintCollectionBlameMapper.java
  4. 204
      src/main/java/com/biutag/supervision/pojo/dto/complaintCollection/ComplaintCollectionPageDTO.java
  5. 38
      src/main/java/com/biutag/supervision/pojo/entity/ComplaintCollection.java
  6. 230
      src/main/java/com/biutag/supervision/pojo/entity/ComplaintCollectionBlame.java
  7. 39
      src/main/java/com/biutag/supervision/pojo/enums/complaintCollection/ComplaintCollectionClosingStatusEnum.java
  8. 38
      src/main/java/com/biutag/supervision/pojo/enums/complaintCollection/ComplaintCollectionPublicApprovalEnum.java
  9. 31
      src/main/java/com/biutag/supervision/pojo/param/ComplaintCollection/ComplaintCollectionUpdateParam.java
  10. 70
      src/main/java/com/biutag/supervision/pojo/param/complaintCollectionBlame/ComplaintCollectionBlameQueryParam.java
  11. 19
      src/main/java/com/biutag/supervision/pojo/request/complaintCollection/ComplaintCollectionAddRequest.java
  12. 348
      src/main/java/com/biutag/supervision/pojo/request/complaintCollection/ComplaintCollectionAndBlameAddRequest.java
  13. 6
      src/main/java/com/biutag/supervision/pojo/request/complaintCollection/ComplaintCollectionUpdateRequest.java
  14. 30
      src/main/java/com/biutag/supervision/pojo/request/complaintCollection/ComplaintCollectionWatchDetailRequest.java
  15. 11
      src/main/java/com/biutag/supervision/pojo/transfer/ComplaintCollectionTransfer.java
  16. 2
      src/main/java/com/biutag/supervision/pojo/vo/complaintCollection/ComplaintCollectionPageVo.java
  17. 329
      src/main/java/com/biutag/supervision/pojo/vo/complaintCollection/ComplaintCollectionWatchDetailVO.java
  18. 30
      src/main/java/com/biutag/supervision/repository/complaintCollection/ComplaintCollectionResourceService.java
  19. 41
      src/main/java/com/biutag/supervision/repository/complaintCollectionBlame/ComplaintCollectionBlameResourceService.java
  20. 24
      src/main/java/com/biutag/supervision/service/complaintCollection/ComplaintCollectionService.java
  21. 382
      src/main/java/com/biutag/supervision/service/complaintCollection/ComplaintCollectionServiceImpl.java
  22. 35
      src/main/java/com/biutag/supervision/util/SfssUtil.java
  23. 106
      src/main/resources/mapper/ComplaintCollectionBlameMapper.xml

23
src/main/java/com/biutag/supervision/controller/data/ComplaintCollectionController.java

@ -1,11 +1,9 @@
package com.biutag.supervision.controller.data; package com.biutag.supervision.controller.data;
import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.request.complaintCollection.ComplaintCollectionAddRequest; import com.biutag.supervision.pojo.request.complaintCollection.*;
import com.biutag.supervision.pojo.request.complaintCollection.ComplaintCollectionDelRequest; import com.biutag.supervision.pojo.vo.complaintCollection.ComplaintCollectionPageVo;
import com.biutag.supervision.pojo.request.complaintCollection.ComplaintCollectionPageRequest; import com.biutag.supervision.pojo.vo.complaintCollection.ComplaintCollectionWatchDetailVO;
import com.biutag.supervision.pojo.request.complaintCollection.ComplaintCollectionUpdateRequest;
import com.biutag.supervision.pojo.vo.ComplaintCollectionPageVo;
import com.biutag.supervision.service.complaintCollection.ComplaintCollectionService; import com.biutag.supervision.service.complaintCollection.ComplaintCollectionService;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
@ -54,4 +52,19 @@ public class ComplaintCollectionController {
public Result<ComplaintCollectionPageVo> getComplaintCollectionPage(@RequestBody ComplaintCollectionPageRequest request){ public Result<ComplaintCollectionPageVo> getComplaintCollectionPage(@RequestBody ComplaintCollectionPageRequest request){
return complaintCollectionService.getComplaintCollectionPage(request); return complaintCollectionService.getComplaintCollectionPage(request);
} }
@Operation(description = "办理")
@PostMapping("/addComplaintCollectionBlame")
public Result<Boolean> addComplaintCollectionBlame(@RequestBody ComplaintCollectionAndBlameAddRequest request){
return complaintCollectionService.addComplaintCollectionBlame(request);
}
@Operation(description = "查看详情")
@PostMapping("/watchDetail")
public Result<ComplaintCollectionWatchDetailVO> watchDetail(@RequestBody ComplaintCollectionWatchDetailRequest request){
return complaintCollectionService.watchDetail(request);
}
} }

3
src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java

@ -143,7 +143,8 @@ public class ApplyCompletionAction implements Action {
.set(Negative::getRectifyRestrictionDays, null); .set(Negative::getRectifyRestrictionDays, null);
} }
// 经办人 // 经办人
if (CollectionUtil.isNotEmpty(verifyData.getHandlePolices().stream().filter(item -> StrUtil.isNotBlank(item.getName())).toList())) { if (CollectionUtil.isNotEmpty(verifyData.getHandlePolices()) &&
CollectionUtil.isNotEmpty(verifyData.getHandlePolices().stream().filter(item -> StrUtil.isNotBlank(item.getName())).toList())){
updateWrapper.set(Negative::getHandlePolices, JSON.toJSONString(verifyData.getHandlePolices())); updateWrapper.set(Negative::getHandlePolices, JSON.toJSONString(verifyData.getHandlePolices()));
} }
// 涉及单位 // 涉及单位

12
src/main/java/com/biutag/supervision/mapper/ComplaintCollectionBlameMapper.java

@ -0,0 +1,12 @@
package com.biutag.supervision.mapper;
import com.biutag.supervision.pojo.entity.ComplaintCollectionBlame;
import com.biutag.supervision.repository.base.HBaseMapper;
import java.util.List;
public interface ComplaintCollectionBlameMapper extends HBaseMapper<ComplaintCollectionBlame> {
int insertBatch(List<ComplaintCollectionBlame> list);
}

204
src/main/java/com/biutag/supervision/pojo/dto/complaintCollection/ComplaintCollectionPageDTO.java

@ -84,6 +84,210 @@ public class ComplaintCollectionPageDTO {
@Schema(description = "办理方式") @Schema(description = "办理方式")
private String handleMethod; private String handleMethod;
@Schema(description = "业务类型code")
private String businessTypeCode;
@Schema(description = "业务类型name")
private String businessTypeName;
/* =========================
* 实体补充字段实体有DTO 原来没有
* ========================= */
// 三表合并/两表合并补充
@Schema(description = "涉企涉冻")
private String involvedIssue;
@Schema(description = "办理三级单位名称")
private String thirdDepartName;
@Schema(description = "分发状态")
private String distributionState;
@Schema(description = "办理三级单位id")
private String thirdDepartId;
@Schema(description = "问题来源code")
private String problemSourcesCode;
@Schema(description = "问题来源名称")
private String problemSources;
@Schema(description = "涉及警种名称")
private String policeTypeName;
/* ---- PETITION 独有 ---- */
@Schema(description = "投诉渠道")
private String channelForFilingComplaints;
@Schema(description = "受理层级")
private String acceptanceLevel;
@Schema(description = "初重信访")
private String initialPetition;
@Schema(description = "缠访闹访")
private String entanglementVisits;
@Schema(description = "群众集访")
private String massVisits;
@Schema(description = "涉及警种")
private String policeType;
@Schema(description = "信访人数")
private Integer peopleNumber;
@Schema(description = "信访诉求")
private String appeal;
@Schema(description = "公安业务分类")
private String businessClass;
@Schema(description = "登记单位")
private String registerDepartName;
@Schema(description = "转往处")
private String transferDepart;
@Schema(description = "具体承办单位")
private String handleDepartName;
@Schema(description = "办结时间")
private LocalDateTime completedTime;
@Schema(description = "责任单位")
private String involveDepartName;
@Schema(description = "接访领导姓名")
private String receivingLeaderName;
@Schema(description = "是否主要责任")
private String isMianResponsib;
@Schema(description = "领导接访单位")
private String receivingDepartName;
@Schema(description = "关联负面清单id")
private String negativeId;
@Schema(description = "信访类型")
private String petitionType;
@Schema(description = "信访办理情况")
private String petitionProcessingStatus;
/* ---- CASE_VERIF 独有 ---- */
@Schema(description = "问题发生时间")
private LocalDateTime happenTime;
@Schema(description = "是否属实(1属实 2部分属实 3不属实)")
private Integer isReal;
@Schema(description = "线索来源")
private String source;
@Schema(description = "创建人(业务字段)")
private String creator;
@Schema(description = "来源涉及单位名称")
private String sourceInvolveDepartName;
@Schema(description = "外部id")
private String outerId;
@Schema(description = "状态(crx_state)")
private String crxState;
/* ---- MAILBOX/三表统一补充 ---- */
@Schema(description = "核查情况")
private String checkStatus;
@Schema(description = "核查情况名称")
private String checkStatusName;
@Schema(description = "核查情况内容")
private String checkStatusDesc;
@Schema(description = "办理状态")
private String processingStatus;
@Schema(description = "转责对象")
private String accountabilityTarget;
@Schema(description = "来源表创建时间(业务字段)")
private LocalDateTime crtTime;
/* ---- 新加字段 ---- */
@Schema(description = "涉及案件/警情编号")
private String caseNumber;
/* ---- 扩展字段 ---- */
@Schema(description = "自定义1")
private String gwf1;
@Schema(description = "自定义2")
private String gwf2;
@Schema(description = "自定义3")
private String gwf3;
@Schema(description = "自定义4")
private String gwf4;
@Schema(description = "自定义5")
private String gwf5;
@Schema(description = "自定义6")
private String gwf6;
@Schema(description = "自定义7")
private String gwf7;
@Schema(description = "自定义8")
private String gwf8;
@Schema(description = "自定义9")
private String gwf9;
@Schema(description = "自定义10")
private String gwf10;
@Schema(description = "自定义11")
private String gwf11;
@Schema(description = "自定义12")
private String gwf12;
@Schema(description = "自定义13")
private String gwf13;
@Schema(description = "自定义14")
private String gwf14;
@Schema(description = "自定义15")
private String gwf15;
@Schema(description = "自定义16")
private String gwf16;
@Schema(description = "自定义17")
private String gwf17;
@Schema(description = "自定义18")
private String gwf18;
@Schema(description = "自定义19")
private String gwf19;
@Schema(description = "自定义20")
private String gwf20;
/* ---- 审计字段 ---- */
@Schema(description = "创建人")
private String createBy;
@Schema(description = "创建时间")
private LocalDateTime createTime;
@Schema(description = "更新人")
private String updateBy;
@Schema(description = "更新时间")
private LocalDateTime updateTime;
/* ---- 业务补充 ---- */
@Schema(description = "办结情况")
private String completionStatus;
@Schema(description = "群众认可")
private String publicRecognition;
@Schema(description = "状态,显示用,暂无实际意义")
private String status;
} }

38
src/main/java/com/biutag/supervision/pojo/entity/ComplaintCollection.java

@ -93,10 +93,12 @@ public class ComplaintCollection {
@TableField("distribution_state") @TableField("distribution_state")
private String distributionState; private String distributionState;
// 三表统一
@Schema(description = "涉及单位ID(PETITION.second_depart_id;CASE_VERIF.second_depart_id)") @Schema(description = "涉及单位ID(PETITION.second_depart_id;CASE_VERIF.second_depart_id)")
@TableField("second_depart_id") @TableField("second_depart_id")
private String secondDepartId; private String secondDepartId;
// 三表统一
@Schema(description = "涉及科所队ID(PETITION.third_depart_id;CASE_VERIF.third_depart_id)") @Schema(description = "涉及科所队ID(PETITION.third_depart_id;CASE_VERIF.third_depart_id)")
@TableField("third_depart_id") @TableField("third_depart_id")
private String thirdDepartId; private String thirdDepartId;
@ -246,23 +248,28 @@ public class ComplaintCollection {
@TableField("business_type_code") @TableField("business_type_code")
private String businessTypeCode; private String businessTypeCode;
// 改为3表统一 核查情况
@Schema(description = "核查情况(MAILBOX.checkStatus)") @Schema(description = "核查情况(MAILBOX.checkStatus)")
@TableField("check_status") @TableField("check_status")
private String checkStatus; private String checkStatus;
// 改为3表统一 核查情况名称
@Schema(description = "核查情况名称(MAILBOX.checkStatusName)") @Schema(description = "核查情况名称(MAILBOX.checkStatusName)")
@TableField("check_status_name") @TableField("check_status_name")
private String checkStatusName; private String checkStatusName;
// 改为3表统一 核查情况内容
@Schema(description = "核查情况内容(MAILBOX.checkStatusDesc)") @Schema(description = "核查情况内容(MAILBOX.checkStatusDesc)")
@TableField("check_status_desc") @TableField("check_status_desc")
private String checkStatusDesc; private String checkStatusDesc;
@Schema(description = "办理状态(MAILBOX.processingStatus)") @Schema(description = "办理状态(MAILBOX.processingStatus)")
@TableField("processing_status") @TableField("processing_status")
private String processingStatus; private String processingStatus;
@Schema(description = "转责对象(MAILBOX.accountabilityTarget)") // 改为3表公用
@Schema(description = "涉及对象(MAILBOX.accountabilityTarget)")
@TableField("accountability_target") @TableField("accountability_target")
private String accountabilityTarget; private String accountabilityTarget;
@ -293,6 +300,10 @@ public class ComplaintCollection {
@TableField("tag") @TableField("tag")
private String tag; private String tag;
@Schema(description = "涉及案件/警情编号")
@TableField("case_number")
private String caseNumber;
/* ========================= /* =========================
* 4) 扩展字段最后 * 4) 扩展字段最后
@ -395,8 +406,25 @@ public class ComplaintCollection {
@TableField("update_time") @TableField("update_time")
private LocalDateTime updateTime; private LocalDateTime updateTime;
// @Schema(description = "逻辑删除标记(0未删 1已删)")
// @TableField("delete_flag") /**
// @TableLogic(value = "0", delval = "1") * @see com.biutag.supervision.pojo.enums.complaintCollection.ComplaintCollectionClosingStatusEnum
// private Integer deleteFlag; */
@Schema(description = "办结情况")
@TableField("completion_status")
private String completionStatus;
/**
* @see com.biutag.supervision.pojo.enums.complaintCollection.ComplaintCollectionPublicApprovalEnum
*/
@Schema(description = "群众认可")
@TableField("public_recognition")
private String publicRecognition;
@Schema(description = "状态,显示用,暂无实际意义 0为初始值")
@TableField("status")
private String status;
} }

230
src/main/java/com/biutag/supervision/pojo/entity/ComplaintCollectionBlame.java

@ -0,0 +1,230 @@
package com.biutag.supervision.pojo.entity;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
/**
* @ClassName ComplaintCollectionBlame
* @Description 投诉归集责任人员表
* @Author shihao
* @Date 2025/12/28 20:33
*/
@Getter
@Setter
@Schema(description = "投诉归集责任人员表")
@TableName("complaint_collection_blame")
public class ComplaintCollectionBlame {
@Schema(description = "责任记录主键")
@TableId(value = "blame_id", type = IdType.AUTO)
private String blameId;
@Schema(description = "关联complaint_collection主键ID")
@TableField("complaint_id")
private String complaintId;
@Schema(description = "涉及类型 PERSONAL:个人/LEADER:领导/DEPARTMENT:单位")
@TableField("type")
private String type;
@Schema(description = "涉及人员姓名")
@TableField("blame_name")
private String blameName;
@Schema(description = "涉及人员身份证号")
@TableField("blame_id_code")
private String blameIdCode;
@Schema(description = "涉及人员警号")
@TableField("blame_emp_no")
private String blameEmpNo;
@Schema(description = "涉及部门ID")
@TableField("blame_depart_id")
private String blameDepartId;
//
@Schema(description = "涉及部门名称")
@TableField("blame_depart_name")
private String blameDepartName;
@Schema(description = "人员属性编码")
@TableField("iv_person_type_code")
private String ivPersonTypeCode;
//
@Schema(description = "人员属性名称")
@TableField("iv_person_type_name")
private String ivPersonTypeName;
@Schema(description = "问题类型描述(JSON)")
@TableField("problems")
private String problems;
@Schema(description = "责任类别编码")
@TableField("responsibility_type_code")
private String responsibilityTypeCode;
@Schema(description = "责任类别名称")
@TableField("responsibility_type_name")
private String responsibilityTypeName;
@Schema(description = "主观方面编码")
@TableField("subjective_aspect_code")
private String subjectiveAspectCode;
@Schema(description = "主观方面名称")
@TableField("subjective_aspect_name")
private String subjectiveAspectName;
@Schema(description = "处理结果编码(多选逗号分隔)")
@TableField("handle_result_code")
private String handleResultCode;
@Schema(description = "处理结果名称")
@TableField("handle_result_name")
private String handleResultName;
@Schema(description = "其他处理结果说明")
@TableField("handle_result_name_other")
private String handleResultNameOther;
@Schema(description = "维权容错编码")
@TableField("protect_rights_code")
private String protectRightsCode;
@Schema(description = "维权容错名称")
@TableField("protect_rights_name")
private String protectRightsName;
@Schema(description = "督察措施编码")
@TableField("supervise_measures_code")
private String superviseMeasuresCode;
@Schema(description = "督察措施名称")
@TableField("supervise_measures_name")
private String superviseMeasuresName;
@Schema(description = "禁闭处罚关联ID")
@TableField("confinement_id")
private String confinementId;
@Schema(description = "责任领导姓名")
@TableField("lead_name")
private String leadName;
@Schema(description = "责任领导身份证")
@TableField("lead_id_code")
private String leadIdCode;
@Schema(description = "责任领导警号")
@TableField("lead_emp_no")
private String leadEmpNo;
@Schema(description = "责任领导部门ID")
@TableField("lead_depart_id")
private String leadDepartId;
@Schema(description = "责任领导部门名称")
@TableField("lead_depart_name")
private String leadDepartName;
@Schema(description = "领导责任类别编码")
@TableField("lead_responsibility_type_code")
private String leadResponsibilityTypeCode;
@Schema(description = "领导责任类别名称")
@TableField("lead_responsibility_type_name")
private String leadResponsibilityTypeName;
@Schema(description = "领导处理结果编码")
@TableField("lead_handle_result_code")
private String leadHandleResultCode;
@Schema(description = "领导处理结果名称")
@TableField("lead_handle_result_name")
private String leadHandleResultName;
@Schema(description = "领导其他处理结果")
@TableField("lead_handle_result_name_other")
private String leadHandleResultNameOther;
@Schema(description = "领导维权容错编码")
@TableField("lead_protect_rights_code")
private String leadProtectRightsCode;
@Schema(description = "领导维权容错名称")
@TableField("lead_protect_rights_name")
private String leadProtectRightsName;
@Schema(description = "领导禁闭处罚ID")
@TableField("lead_confinement_id")
private String leadConfinementId;
@Schema(description = "自定义字段1~20")
@TableField("gwf1")
private String gwf1;
@TableField("gwf2")
private String gwf2;
@TableField("gwf3")
private String gwf3;
@TableField("gwf4")
private String gwf4;
@TableField("gwf5")
private String gwf5;
@TableField("gwf6")
private String gwf6;
@TableField("gwf7")
private String gwf7;
@TableField("gwf8")
private String gwf8;
@TableField("gwf9")
private String gwf9;
@TableField("gwf10")
private String gwf10;
@TableField("gwf11")
private String gwf11;
@TableField("gwf12")
private String gwf12;
@TableField("gwf13")
private String gwf13;
@TableField("gwf14")
private String gwf14;
@TableField("gwf15")
private String gwf15;
@TableField("gwf16")
private String gwf16;
@TableField("gwf17")
private String gwf17;
@TableField("gwf18")
private String gwf18;
@TableField("gwf19")
private String gwf19;
@TableField("gwf20")
private String gwf20;
@Schema(description = "创建人")
@TableField("create_by")
private String createBy;
@Schema(description = "创建时间")
@TableField(value = "create_time", fill = FieldFill.INSERT)
private LocalDateTime createTime;
@Schema(description = "更新人")
@TableField("update_by")
private String updateBy;
@Schema(description = "更新时间")
@TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
private LocalDateTime updateTime;
}

39
src/main/java/com/biutag/supervision/pojo/enums/complaintCollection/ComplaintCollectionClosingStatusEnum.java

@ -0,0 +1,39 @@
package com.biutag.supervision.pojo.enums.complaintCollection;
import com.biutag.supervision.constants.enums.CodeEnum;
import lombok.Getter;
import lombok.Setter;
/**
* @ClassName ComplaintCollectionClosingStatusEnum
* @Description TODO
* @Author shihao
* @Date 2025/12/29 20:39
*/
@Getter
public enum ComplaintCollectionClosingStatusEnum implements CodeEnum {
PROCEDURE_COMPLETED("1", "程序办结"),
REASONABLE_DEMAND_RESOLVED("2", "已解决合理诉求");
;
private final String code;
private final String desc;
ComplaintCollectionClosingStatusEnum(String code, String desc) {
this.code = code;
this.desc = desc;
}
@Override
public String getCode() {
return code;
}
@Override
public String getDesc() {
return desc;
}
}

38
src/main/java/com/biutag/supervision/pojo/enums/complaintCollection/ComplaintCollectionPublicApprovalEnum.java

@ -0,0 +1,38 @@
package com.biutag.supervision.pojo.enums.complaintCollection;
import com.biutag.supervision.constants.enums.CodeEnum;
import lombok.Getter;
/**
* @ClassName ComplaintCollectionClosingStatusEnum
* @Description TODO
* @Author shihao
* @Date 2025/12/29 20:39
*/
@Getter
public enum ComplaintCollectionPublicApprovalEnum implements CodeEnum {
APPROVED("1", "认可"),
NOT_APPROVED("2", "不认可");
;
private final String code;
private final String desc;
ComplaintCollectionPublicApprovalEnum(String code, String desc) {
this.code = code;
this.desc = desc;
}
@Override
public String getCode() {
return code;
}
@Override
public String getDesc() {
return desc;
}
}

31
src/main/java/com/biutag/supervision/pojo/param/ComplaintCollection/ComplaintCollectionUpdateParam.java

@ -1,5 +1,6 @@
package com.biutag.supervision.pojo.param.ComplaintCollection; package com.biutag.supervision.pojo.param.ComplaintCollection;
import com.baomidou.mybatisplus.annotation.TableField;
import com.biutag.supervision.pojo.enums.complaintCollection.ComplaintCollectionHandleMethodEnum; import com.biutag.supervision.pojo.enums.complaintCollection.ComplaintCollectionHandleMethodEnum;
import com.biutag.supervision.pojo.enums.complaintCollection.ComplaintCollectionSourceTableEnum; import com.biutag.supervision.pojo.enums.complaintCollection.ComplaintCollectionSourceTableEnum;
import com.biutag.supervision.pojo.enums.complaintCollection.YesOrNoEnum; import com.biutag.supervision.pojo.enums.complaintCollection.YesOrNoEnum;
@ -86,4 +87,34 @@ public class ComplaintCollectionUpdateParam {
@Schema(description = "更新时间(新表字段)") @Schema(description = "更新时间(新表字段)")
private LocalDateTime updateTime; private LocalDateTime updateTime;
@Schema(description = "办理状态")
private String processingStatus;
@Schema(description = "涉及案件/警情编号")
private String caseNumber;
@Schema(description = "核查情况code")
private String checkStatus;
@Schema(description = "核查情况名称")
private String checkStatusName;
@Schema(description = "核查情况内容")
private String checkStatusDesc;
@Schema(description = "涉及三级单位ID")
private String thirdDepartId;
@Schema(description = "涉及三级单位名称")
private String thirdDepartName;
@Schema(description = "是否整改")
private String isRectifyCode;
@Schema(description = "状态,显示用,暂无实际意义 0为初始值")
private String status;
@Schema(description = "涉及对象")
private String accountabilityTarget;
} }

70
src/main/java/com/biutag/supervision/pojo/param/complaintCollectionBlame/ComplaintCollectionBlameQueryParam.java

@ -0,0 +1,70 @@
package com.biutag.supervision.pojo.param.complaintCollectionBlame;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Set;
/**
* @ClassName ComplaintCollectionBlameQueryParam
* @Description 投诉归集责任人查询参数
* @Author shihao
* @Date 2025/12/28
*/
@Getter
@Setter
@Schema(description = "投诉归集责任人查询参数")
public class ComplaintCollectionBlameQueryParam {
@Schema(description = "责任记录主键")
private String blameId;
@Schema(description = "责任记录主键集合")
private Set<String> blameIds;
@Schema(description = "投诉主键ID")
private String complaintId;
@Schema(description = "投诉主键ID集合")
private Set<String> complaintIds;
@Schema(description = "信件编号")
private String originId;
@Schema(description = "来源表类型")
private String sourceTable;
@Schema(description = "来源表类型集合")
private Set<String> sourceTables;
@Schema(description = "反映人姓名")
private String responderName;
@Schema(description = "受理时间范围")
private List<LocalDateTime> discoveryTimeList;
@Schema(description = "来件人信息")
private String personInfo;
@Schema(description = "二级机构ID")
private String secondDepartId;
@Schema(description = "办理方式")
private String handleMethod;
@Schema(description = "来件内容")
private String thingDesc;
@Schema(description = "是否重复件")
private String repeatt;
@Schema(description = "是否领导批示")
private String leadApproval;
@Schema(description = "标签")
private List<String> tags;
}

19
src/main/java/com/biutag/supervision/pojo/request/complaintCollection/ComplaintCollectionAddRequest.java

@ -5,6 +5,7 @@ import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.IdcardUtil; import cn.hutool.core.util.IdcardUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import com.biutag.supervision.aop.ParamChecked; import com.biutag.supervision.aop.ParamChecked;
import com.biutag.supervision.pojo.enums.complaintCollection.ComplaintCollectionHandleMethodEnum; import com.biutag.supervision.pojo.enums.complaintCollection.ComplaintCollectionHandleMethodEnum;
import com.biutag.supervision.pojo.enums.complaintCollection.ComplaintCollectionSourceTableEnum; import com.biutag.supervision.pojo.enums.complaintCollection.ComplaintCollectionSourceTableEnum;
@ -94,6 +95,24 @@ public class ComplaintCollectionAddRequest implements ParamChecked {
@Schema(description = "办理方式") @Schema(description = "办理方式")
private String handleMethod; private String handleMethod;
@Schema(description = "业务类型code")
private String businessTypeCode;
@Schema(description = "业务类型name")
private String businessTypeName;
/**
* @see com.biutag.supervision.pojo.enums.complaintCollection.ComplaintCollectionClosingStatusEnum
*/
@Schema(description = "办结情况")
private String completionStatus;
/**
* @see com.biutag.supervision.pojo.enums.complaintCollection.ComplaintCollectionPublicApprovalEnum
*/
@Schema(description = "群众认可")
private String publicRecognition;
@Override @Override
public void check() { public void check() {

348
src/main/java/com/biutag/supervision/pojo/request/complaintCollection/ComplaintCollectionAndBlameAddRequest.java

@ -0,0 +1,348 @@
package com.biutag.supervision.pojo.request.complaintCollection;
import com.biutag.supervision.aop.ParamChecked;
import com.biutag.supervision.pojo.enums.complaintCollection.ComplaintCollectionHandleMethodEnum;
import com.biutag.supervision.pojo.enums.complaintCollection.YesOrNoEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
/**
* @ClassName ComplaintCollectionAndBlameAddRequest
* @Description 投诉归集责任添加请求
* @Author shihao
* @Date 2025/12/28
*/
@Getter
@Setter
@Schema(description = "投诉归集责任添加请求")
public class ComplaintCollectionAndBlameAddRequest implements ParamChecked {
@Override
public void check() {
// if (CollectionUtil.isEmpty(blames) && CollectionUtil.isEmpty(blameLeaders)) {
// throw new IllegalArgumentException("责任人或责任领导不能为空");
// }
}
@Schema(description = "涉访涉诉表ID")
private String complaintId;
@Schema(description = "信件编号")
private String originId;
@Schema(description = "涉及案件/警情编号")
private String caseNumber;
@Schema(description = "涉及单位")
private String involveDepartId;
@Schema(description = "涉及单位名称")
private String involveDepartName;
@NotBlank(message = "核查结论不能为空")
@Schema(description = "核查结论code")
private String checkStatusCode;
@Schema(description = "核查结论name")
@NotBlank(message = "核查结论不能为空")
private String checkStatusName;
/**
* @see com.biutag.supervision.constants.enums.AccountabilityTargetEnum
*/
@Schema(description = "涉及对象")
private String accountabilityTarget;
// // 是否整改
// @NotBlank
// @Schema(description = "是否整改")
// private String isRectifyCode;
//
// @Schema(description = "整改限制天数")
// private Integer rectifyRestrictionDays;
//
@NotBlank
@Schema(description = "问题核查情况")
private String checkStatusDesc;
//
// @Schema(description = "问题整改情况")
// private String rectifyDesc;
//
// @Schema(description = "未整改原因")
// private String unrectifyReason;
@Schema(description = "涉及责任人列表")
private List<Blame> blames = new ArrayList<>();
@Schema(description = "涉及责任领导列表")
private List<BlameLeader> blameLeaders = new ArrayList<>();
@Schema(description = "来源表类型")
private String sourceTable;
@Schema(description = "来源类型子一级")
private String sourceTableSubOne;
@Schema(description = "受理时间")
private LocalDateTime discoveryTime;
@Schema(description = "来件人姓名")
private String responderName;
@Schema(description = "身份证号")
private String responderIdCode;
@Schema(description = "联系电话")
private String responderPhone;
@Schema(description = "被投诉二级机构Id")
private String secondDepartId;
@Schema(description = "被投诉二级机构")
private String secondDepartName;
@Schema(description = "来信内容")
private String thingDesc;
@Schema(description = "涉嫌问题")
private List<String> involveProblemIdList;
@Schema(description = "涉嫌问题")
private String involveProblemIdStr;
/**
* @see YesOrNoEnum
*/
@Schema(description = "是否重复件")
private String repeatt;
/**
* @see YesOrNoEnum
*/
@Schema(description = "是否领导审批")
private String leadApproval;
/**
*
*/
@Schema(description = "标签")
private String tag;
@Schema(description = "标签集合")
private List<String> tags;
/**
* @see ComplaintCollectionHandleMethodEnum
*/
@Schema(description = "办理方式")
private String handleMethod;
@Schema(description = "业务类型code")
private String businessTypeCode;
@Schema(description = "业务类型name")
private String businessTypeName;
@Getter
@Setter
@Schema(description = "责任人信息")
public static class Blame {
@Schema(description = "责任人姓名")
@NotBlank
private String blameName;
@Schema(description = "身份证号")
@NotBlank
private String blameIdCode;
@Schema(description = "警号")
@NotBlank
private String blameEmpNo;
@Schema(description = "人员属性编码")
@NotBlank
private String ivPersonTypeCode;
@Schema(description = "人员属性名称")
@NotBlank
private String ivPersonTypeName;
@Schema(description = "人员属性(兼容旧字段)")
@NotBlank
private String ivPersonType;
@Schema(description = "警种编码")
@NotBlank
private String policeTypeCode;
@Schema(description = "警种名称")
@NotBlank
private String policeTypeName;
@Schema(description = "核查情况编码")
@NotBlank
private String inspectCaseCode;
@Schema(description = "核查情况名称")
@NotBlank
private String inspectCaseName;
@Schema(description = "主观方面编码")
@NotBlank
private String subjectiveAspectCode;
@Schema(description = "主观方面名称")
@NotBlank
private String subjectiveAspectName;
@Schema(description = "责任类别编码")
@NotBlank
private String responsibilityTypeCode;
@Schema(description = "责任类别名称")
@NotBlank
private String responsibilityTypeName;
@Schema(description = "处理结果编码集合")
@NotBlank
private List<String> handleResultCode;
@Schema(description = "处理结果名称集合")
@NotBlank
private String handleResultName;
@Schema(description = "其他处理说明")
private String handleResultNameOther;
@Schema(description = "维权容错编码")
@NotBlank
private String protectRightsCode;
@Schema(description = "维权容错名称")
@NotBlank
private String protectRightsName;
@Schema(description = "督察措施编码")
@NotBlank
private String superviseMeasuresCode;
@Schema(description = "督察措施名称")
@NotBlank
private String superviseMeasuresName;
@Schema(description = "禁闭处罚关联ID")
private String confinementId;
@Schema(description = "问题类型明细")
private List<Problem> problems;
@Schema(description = "责任人类型标识")
private String type;
}
@Getter
@Setter
@Schema(description = "责任领导信息")
public static class BlameLeader {
@Schema(description = "关联责任人身份证集合")
private List<String> blameIdCodes = new ArrayList<>();
@Schema(description = "责任领导姓名")
@NotBlank
private String leadName;
@Schema(description = "责任领导警号")
@NotBlank
private String leadEmpNo;
@Schema(description = "责任领导身份证号")
@NotBlank
private String leadIdCode;
@Schema(description = "领导禁闭处罚ID")
private String leadConfinementId;
@Schema(description = "三级机构名称")
@NotBlank
private String leadThreeDepartName;
@Schema(description = "领导督察措施名称")
@NotBlank
private String leadMeasuresName;
@Schema(description = "领导督察措施编码")
@NotBlank
private String leadMeasuresCode;
@Schema(description = "领导责任类别名称")
@NotBlank
private String leadResponsibilityTypeName;
@Schema(description = "领导责任类别编码")
@NotBlank
private String leadResponsibilityTypeCode;
@Schema(description = "领导处理结果编码集合")
@NotBlank
private List<String> leadHandleResultCode;
@Schema(description = "领导处理结果名称")
@NotBlank
private String leadHandleResultName;
@Schema(description = "领导处理结果其他说明")
private String leadHandleResultNameOther;
@Schema(description = "领导维权容错名称")
@NotBlank
private String leadProtectRightsName;
@Schema(description = "领导维权容错编码")
@NotBlank
private String leadProtectRightsCode;
}
@Getter
@Setter
@Schema(description = "问题类型信息")
public static class Problem {
@Schema(description = "一级问题编码")
@NotBlank
private String oneLevelCode;
@Schema(description = "二级问题编码")
@NotBlank
private String twoLevelCode;
@Schema(description = "一级问题内容")
@NotBlank
private String oneLevelContent;
@Schema(description = "二级问题内容")
@NotBlank
private String twoLevelContent;
@Schema(description = "三级问题编码")
@NotBlank
private String threeLevelCode;
@Schema(description = "三级问题内容")
@NotBlank
private String threeLevelContent;
@Schema(description = "三级问题其他描述")
private String threeLevelContentOther;
}
}

6
src/main/java/com/biutag/supervision/pojo/request/complaintCollection/ComplaintCollectionUpdateRequest.java

@ -64,6 +64,12 @@ public class ComplaintCollectionUpdateRequest implements ParamChecked {
@Schema(description = "办理方式") @Schema(description = "办理方式")
private String handleMethod; private String handleMethod;
@Schema(description = "业务类型code")
private String businessTypeCode;
@Schema(description = "业务类型name")
private String businessTypeName;
@Override @Override
public void check() { public void check() {
if (StrUtil.isBlank(id)) { if (StrUtil.isBlank(id)) {

30
src/main/java/com/biutag/supervision/pojo/request/complaintCollection/ComplaintCollectionWatchDetailRequest.java

@ -0,0 +1,30 @@
package com.biutag.supervision.pojo.request.complaintCollection;
import cn.hutool.core.util.StrUtil;
import com.biutag.supervision.aop.ParamChecked;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
/**
* @ClassName ComplaintCollectionWatchDetailRequest
* @Description 查看详情请求
* @Author shihao
* @Date 2025/12/30 10:17
*/
@Getter
@Setter
@Schema(description = "查看详情请求")
public class ComplaintCollectionWatchDetailRequest implements ParamChecked {
@Schema(description = "涉访涉表id")
private String id;
@Override
public void check() {
if (StrUtil.isBlank(id)) {
throw new IllegalArgumentException("id不能为空!");
}
}
}

11
src/main/java/com/biutag/supervision/pojo/transfer/ComplaintCollectionTransfer.java

@ -1,14 +1,17 @@
package com.biutag.supervision.pojo.transfer; package com.biutag.supervision.pojo.transfer;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.biutag.supervision.pojo.domain.Blame;
import com.biutag.supervision.pojo.dto.complaintCollection.ComplaintCollectionPageDTO; import com.biutag.supervision.pojo.dto.complaintCollection.ComplaintCollectionPageDTO;
import com.biutag.supervision.pojo.entity.ComplaintCollection; import com.biutag.supervision.pojo.entity.ComplaintCollection;
import com.biutag.supervision.pojo.entity.ComplaintCollectionBlame;
import com.biutag.supervision.pojo.param.ComplaintCollection.ComplaintCollectionQueryParam; import com.biutag.supervision.pojo.param.ComplaintCollection.ComplaintCollectionQueryParam;
import com.biutag.supervision.pojo.param.ComplaintCollection.ComplaintCollectionUpdateParam; import com.biutag.supervision.pojo.param.ComplaintCollection.ComplaintCollectionUpdateParam;
import com.biutag.supervision.pojo.request.complaintCollection.ComplaintCollectionAddRequest; import com.biutag.supervision.pojo.request.complaintCollection.ComplaintCollectionAddRequest;
import com.biutag.supervision.pojo.request.complaintCollection.ComplaintCollectionPageRequest; import com.biutag.supervision.pojo.request.complaintCollection.ComplaintCollectionPageRequest;
import com.biutag.supervision.pojo.request.complaintCollection.ComplaintCollectionUpdateRequest; import com.biutag.supervision.pojo.request.complaintCollection.ComplaintCollectionUpdateRequest;
import com.biutag.supervision.pojo.vo.ComplaintCollectionPageVo; import com.biutag.supervision.pojo.vo.complaintCollection.ComplaintCollectionPageVo;
import com.biutag.supervision.pojo.vo.complaintCollection.ComplaintCollectionWatchDetailVO;
import org.mapstruct.Mapper; import org.mapstruct.Mapper;
import org.mapstruct.Mapping; import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers; import org.mapstruct.factory.Mappers;
@ -44,4 +47,10 @@ public interface ComplaintCollectionTransfer {
ComplaintCollection addRequestToEntity(ComplaintCollectionAddRequest request); ComplaintCollection addRequestToEntity(ComplaintCollectionAddRequest request);
ComplaintCollectionUpdateParam updateRequestToParam(ComplaintCollectionUpdateRequest request); ComplaintCollectionUpdateParam updateRequestToParam(ComplaintCollectionUpdateRequest request);
ComplaintCollectionWatchDetailVO entityToWatchDetailVO(ComplaintCollection complaintCollection);
List<ComplaintCollectionWatchDetailVO.BlameInfoVO> complaintCollectionBlamesToBlameInfoVO(List<ComplaintCollectionBlame> pseronalList);
List<ComplaintCollectionWatchDetailVO.BlameInfoVO> blameToBlameInfoVO(List<Blame> pseronalList);
} }

2
src/main/java/com/biutag/supervision/pojo/vo/ComplaintCollectionPageVo.java → src/main/java/com/biutag/supervision/pojo/vo/complaintCollection/ComplaintCollectionPageVo.java

@ -1,4 +1,4 @@
package com.biutag.supervision.pojo.vo; package com.biutag.supervision.pojo.vo.complaintCollection;
import com.biutag.supervision.pojo.dto.complaintCollection.ComplaintCollectionPageDTO; import com.biutag.supervision.pojo.dto.complaintCollection.ComplaintCollectionPageDTO;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;

329
src/main/java/com/biutag/supervision/pojo/vo/complaintCollection/ComplaintCollectionWatchDetailVO.java

@ -0,0 +1,329 @@
package com.biutag.supervision.pojo.vo.complaintCollection;
import com.baomidou.mybatisplus.annotation.TableField;
import com.biutag.supervision.pojo.enums.complaintCollection.ComplaintCollectionSourceTableEnum;
import com.biutag.supervision.pojo.enums.complaintCollection.YesOrNoEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import java.util.List;
/**
* @ClassName ComplaintCollectionWatchDetailVO
* @Description 查看详情VO
* @Author shihao
* @Date 2025/12/30 10:24
*/
@Getter
@Setter
@Schema(description = "查看详情VO")
public class ComplaintCollectionWatchDetailVO {
@Schema(description = "id")
private String id;
/**
* @see ComplaintCollectionSourceTableEnum
*/
@Schema(description = "来源表类型")
private String sourceTable;
@Schema(description = "来源子类型一")
private String sourceTableSubOne;
@Schema(description = "来源表类型")
private String sourceTablePath;
@Schema(description = "案件编号")
private String originId;
@Schema(description = "发现时间 / 受理时间")
private LocalDateTime discoveryTime;
@Schema(description = "反映人姓名")
private String responderName;
@Schema(description = "投诉人身份证")
private String responderIdCode;
@Schema(description = "联系电话")
private String responderPhone;
@Schema(description = "办理二级单位名称")
private String secondDepartName;
@Schema(description = "办理二级单位id")
private String secondDepartId;
@Schema(description = "内容/正文")
private String thingDesc;
@Schema(description = "涉嫌问题")
private String involveProblem;
@Schema(description = "涉嫌问题字符串")
private String involveProblemStr;
/**
* @see YesOrNoEnum
*/
@Schema(description = "是否重复件")
private String repeatt;
/**
* @see YesOrNoEnum
*/
@Schema(description = "是否领导审批")
private String leadApproval;
@Schema(description = "标签id")
private String tag;
@Schema(description = "办理方式")
private String handleMethod;
@Schema(description = "业务类型code")
private String businessTypeCode;
@Schema(description = "业务类型name")
private String businessTypeName;
/* =========================
* 实体补充字段实体有DTO 原来没有
* ========================= */
// 三表合并/两表合并补充
@Schema(description = "涉企涉冻")
private String involvedIssue;
@Schema(description = "办理三级单位名称")
private String thirdDepartName;
@Schema(description = "分发状态")
private String distributionState;
@Schema(description = "办理三级单位id")
private String thirdDepartId;
@Schema(description = "问题来源code")
private String problemSourcesCode;
@Schema(description = "问题来源名称")
private String problemSources;
@Schema(description = "涉及警种名称")
private String policeTypeName;
/* ---- PETITION 独有 ---- */
@Schema(description = "投诉渠道")
private String channelForFilingComplaints;
@Schema(description = "受理层级")
private String acceptanceLevel;
@Schema(description = "初重信访")
private String initialPetition;
@Schema(description = "缠访闹访")
private String entanglementVisits;
@Schema(description = "群众集访")
private String massVisits;
@Schema(description = "涉及警种")
private String policeType;
@Schema(description = "信访人数")
private Integer peopleNumber;
@Schema(description = "信访诉求")
private String appeal;
@Schema(description = "公安业务分类")
private String businessClass;
@Schema(description = "登记单位")
private String registerDepartName;
@Schema(description = "转往处")
private String transferDepart;
@Schema(description = "具体承办单位")
private String handleDepartName;
@Schema(description = "办结时间")
private LocalDateTime completedTime;
@Schema(description = "接访领导姓名")
private String receivingLeaderName;
@Schema(description = "是否主要责任")
private String isMianResponsib;
@Schema(description = "领导接访单位")
private String receivingDepartName;
@Schema(description = "关联负面清单id")
private String negativeId;
@Schema(description = "信访类型")
private String petitionType;
@Schema(description = "信访办理情况")
private String petitionProcessingStatus;
/* ---- CASE_VERIF 独有 ---- */
@Schema(description = "问题发生时间")
private LocalDateTime happenTime;
@Schema(description = "是否属实(1属实 2部分属实 3不属实)")
private Integer isReal;
@Schema(description = "线索来源")
private String source;
@Schema(description = "创建人(业务字段)")
private String creator;
@Schema(description = "来源涉及单位名称")
private String sourceInvolveDepartName;
@Schema(description = "外部id")
private String outerId;
@Schema(description = "状态(crx_state)")
private String crxState;
/* ---- MAILBOX/三表统一补充 ---- */
@Schema(description = "核查情况")
private String checkStatus;
@Schema(description = "核查情况名称")
private String checkStatusName;
@Schema(description = "核查情况内容")
private String checkStatusDesc;
@Schema(description = "办理状态")
private String processingStatus;
@Schema(description = "涉及对象")
private String accountabilityTarget;
@Schema(description = "来源表创建时间(业务字段)")
private LocalDateTime crtTime;
/* ---- 新加字段 ---- */
@Schema(description = "涉及案件/警情编号")
private String caseNumber;
/* ---- 扩展字段 ---- */
@Schema(description = "自定义1")
private String gwf1;
@Schema(description = "自定义2")
private String gwf2;
@Schema(description = "自定义3")
private String gwf3;
@Schema(description = "自定义4")
private String gwf4;
@Schema(description = "自定义5")
private String gwf5;
@Schema(description = "自定义6")
private String gwf6;
@Schema(description = "自定义7")
private String gwf7;
@Schema(description = "自定义8")
private String gwf8;
@Schema(description = "自定义9")
private String gwf9;
@Schema(description = "自定义10")
private String gwf10;
@Schema(description = "自定义11")
private String gwf11;
@Schema(description = "自定义12")
private String gwf12;
@Schema(description = "自定义13")
private String gwf13;
@Schema(description = "自定义14")
private String gwf14;
@Schema(description = "自定义15")
private String gwf15;
@Schema(description = "自定义16")
private String gwf16;
@Schema(description = "自定义17")
private String gwf17;
@Schema(description = "自定义18")
private String gwf18;
@Schema(description = "自定义19")
private String gwf19;
@Schema(description = "自定义20")
private String gwf20;
/* ---- 审计字段 ---- */
@Schema(description = "创建人")
private String createBy;
@Schema(description = "创建时间")
private LocalDateTime createTime;
@Schema(description = "更新人")
private String updateBy;
@Schema(description = "更新时间")
private LocalDateTime updateTime;
/* ---- 业务补充 ---- */
@Schema(description = "办结情况")
private String completionStatus;
@Schema(description = "群众认可")
private String publicRecognition;
@Schema(description = "状态,显示用,暂无实际意义")
private String status;
@Schema(description = "涉及单位")
private String involveDepartName;
@Schema(description = "涉及班子成员(领导类)")
private List<BlameInfoVO> deptBlames;
@Schema(description = "涉及人员(普通个体)")
private List<BlameInfoVO> personalBlames;
@Getter
@Setter
@Schema(description = "涉及对象信息")
public static class BlameInfoVO {
@Schema(description = "姓名")
private String blameName;
@Schema(description = "警号")
private String blameEmpNo;
@Schema(description = "身份证号码")
private String blameIdCode;
@Schema(description = "人员属性编码")
private String ivPersonType;
@Schema(description = "人员属性名称")
private String ivPersonTypeName;
/**
* 1 = 人员2 = 部门可参考枚举
*/
@Schema(description = "对象类型(1人员 2单位)")
private String type;
}
}

30
src/main/java/com/biutag/supervision/repository/complaintCollection/ComplaintCollectionResourceService.java

@ -151,6 +151,12 @@ public class ComplaintCollectionResourceService extends BaseDAO {
if (param.getSecondDepartName() != null) { if (param.getSecondDepartName() != null) {
uw.set(ComplaintCollection::getSecondDepartName, param.getSecondDepartName()); uw.set(ComplaintCollection::getSecondDepartName, param.getSecondDepartName());
} }
if (param.getThirdDepartId()!=null){
uw.set(ComplaintCollection::getThirdDepartId, param.getThirdDepartId());
}
if (param.getThirdDepartName()!=null){
uw.set(ComplaintCollection::getThirdDepartName, param.getThirdDepartName());
}
if (param.getResponderName() != null) { if (param.getResponderName() != null) {
uw.set(ComplaintCollection::getResponderName, param.getResponderName()); uw.set(ComplaintCollection::getResponderName, param.getResponderName());
} }
@ -160,12 +166,36 @@ public class ComplaintCollectionResourceService extends BaseDAO {
if (param.getThingDesc() != null) { if (param.getThingDesc() != null) {
uw.set(ComplaintCollection::getThingDesc, param.getThingDesc()); uw.set(ComplaintCollection::getThingDesc, param.getThingDesc());
} }
if (param.getProcessingStatus() != null) {
uw.set(ComplaintCollection::getProcessingStatus, param.getProcessingStatus());
}
if (param.getCaseNumber() != null) {
uw.set(ComplaintCollection::getCaseNumber, param.getCaseNumber());
}
if (param.getCheckStatus() != null) {
uw.set(ComplaintCollection::getCheckStatus, param.getCheckStatus());
}
if (param.getCheckStatusName() != null) {
uw.set(ComplaintCollection::getCheckStatusName, param.getCheckStatusName());
}
if (param.getCheckStatusDesc()!=null){
uw.set(ComplaintCollection::getCheckStatusDesc, param.getCheckStatusDesc());
}
// 3) 非 String 字段:!= null 才更新 // 3) 非 String 字段:!= null 才更新
if (param.getDiscoveryTime() != null) { if (param.getDiscoveryTime() != null) {
uw.set(ComplaintCollection::getDiscoveryTime, param.getDiscoveryTime()); uw.set(ComplaintCollection::getDiscoveryTime, param.getDiscoveryTime());
} }
if (param.getStatus()!=null){
uw.set(ComplaintCollection::getStatus, param.getStatus());
}
if (param.getAccountabilityTarget()!=null){
uw.set(ComplaintCollection::getAccountabilityTarget, param.getAccountabilityTarget());
}
uw.set(ComplaintCollection::getUpdateBy, UserContextHolder.getCurrentUser().getUserName()); uw.set(ComplaintCollection::getUpdateBy, UserContextHolder.getCurrentUser().getUserName());
uw.set(ComplaintCollection::getUpdateTime, LocalDateTime.now()); uw.set(ComplaintCollection::getUpdateTime, LocalDateTime.now());
if (uw.getExpression() == null || uw.getExpression().getSqlSegment().isEmpty()) {
throw new IllegalStateException("更新条件不能为空,防止全表更新");
}
return complaintCollectionMapper.update(null, uw) > 0; return complaintCollectionMapper.update(null, uw) > 0;
} }

41
src/main/java/com/biutag/supervision/repository/complaintCollectionBlame/ComplaintCollectionBlameResourceService.java

@ -0,0 +1,41 @@
package com.biutag.supervision.repository.complaintCollectionBlame;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.biutag.supervision.mapper.ComplaintCollectionBlameMapper;
import com.biutag.supervision.pojo.entity.ComplaintCollectionBlame;
import com.biutag.supervision.pojo.param.complaintCollectionBlame.ComplaintCollectionBlameQueryParam;
import com.biutag.supervision.repository.base.BaseDAO;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import java.util.Collections;
import java.util.List;
/**
* @ClassName ComplaintCollectionBlameResourceService
* @Description ComplaintCollectionBlameResourceService
* @Author shihao
* @Date 2025/12/28 20:42
*/
@Service
public class ComplaintCollectionBlameResourceService extends BaseDAO {
@Resource
private ComplaintCollectionBlameMapper complaintCollectionBlameMapper;
public List<ComplaintCollectionBlame> query(ComplaintCollectionBlameQueryParam param) {
LambdaQueryWrapper<ComplaintCollectionBlame> qw = new LambdaQueryWrapper<>();
setBatchQuery(param.getBlameId(), param.getBlameIds(), qw, ComplaintCollectionBlame::getBlameId);
setBatchQuery(param.getComplaintId(), param.getComplaintIds(), qw, ComplaintCollectionBlame::getComplaintId);
if (qw.getExpression() == null || qw.getExpression().getSqlSegment().isEmpty()) {
return Collections.emptyList();
}
return complaintCollectionBlameMapper.selectList(qw);
}
public Boolean createComplaintCollectionBlame(List<ComplaintCollectionBlame> complaintCollectionList) {
innerBatchInsert(complaintCollectionBlameMapper, complaintCollectionList, "添加失败!");
return Boolean.TRUE;
}
}

24
src/main/java/com/biutag/supervision/service/complaintCollection/ComplaintCollectionService.java

@ -1,12 +1,9 @@
package com.biutag.supervision.service.complaintCollection; package com.biutag.supervision.service.complaintCollection;
import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.request.complaintCollection.ComplaintCollectionAddRequest; import com.biutag.supervision.pojo.request.complaintCollection.*;
import com.biutag.supervision.pojo.request.complaintCollection.ComplaintCollectionDelRequest; import com.biutag.supervision.pojo.vo.complaintCollection.ComplaintCollectionPageVo;
import com.biutag.supervision.pojo.request.complaintCollection.ComplaintCollectionPageRequest; import com.biutag.supervision.pojo.vo.complaintCollection.ComplaintCollectionWatchDetailVO;
import com.biutag.supervision.pojo.request.complaintCollection.ComplaintCollectionUpdateRequest;
import com.biutag.supervision.pojo.vo.ComplaintCollectionPageVo;
/** /**
@ -46,4 +43,19 @@ public interface ComplaintCollectionService {
* @return * @return
*/ */
Result<Boolean> updateComplaintCollection(ComplaintCollectionUpdateRequest request); Result<Boolean> updateComplaintCollection(ComplaintCollectionUpdateRequest request);
/**
* 添加涉访涉诉责任人
* @param request
* @return
*/
Result<Boolean> addComplaintCollectionBlame(ComplaintCollectionAndBlameAddRequest request);
/**
* 查看详情
* @param request
* @return
*/
Result<ComplaintCollectionWatchDetailVO> watchDetail(ComplaintCollectionWatchDetailRequest request);
} }

382
src/main/java/com/biutag/supervision/service/complaintCollection/ComplaintCollectionServiceImpl.java

@ -1,29 +1,41 @@
package com.biutag.supervision.service.complaintCollection; package com.biutag.supervision.service.complaintCollection;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.lang.Opt;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson2.JSON;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.biutag.supervision.common.UserContextHolder; import com.biutag.supervision.common.UserContextHolder;
import com.biutag.supervision.constants.enums.*;
import com.biutag.supervision.flow.FlowService;
import com.biutag.supervision.flow.action.ApplyCompletionAction;
import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.domain.Blame;
import com.biutag.supervision.pojo.dto.NegativeDto;
import com.biutag.supervision.pojo.dto.complaintCollection.ComplaintCollectionPageDTO; import com.biutag.supervision.pojo.dto.complaintCollection.ComplaintCollectionPageDTO;
import com.biutag.supervision.pojo.entity.ComplaintCollection; import com.biutag.supervision.pojo.dto.flow.VerifyData;
import com.biutag.supervision.pojo.entity.SupDictData; import com.biutag.supervision.pojo.entity.*;
import com.biutag.supervision.pojo.enums.supDict.SupDictEnum; import com.biutag.supervision.pojo.enums.supDict.SupDictEnum;
import com.biutag.supervision.pojo.param.ComplaintCollection.ComplaintCollectionExistParam; import com.biutag.supervision.pojo.param.ComplaintCollection.ComplaintCollectionExistParam;
import com.biutag.supervision.pojo.param.ComplaintCollection.ComplaintCollectionQueryParam; import com.biutag.supervision.pojo.param.ComplaintCollection.ComplaintCollectionQueryParam;
import com.biutag.supervision.pojo.param.ComplaintCollection.ComplaintCollectionUpdateParam; import com.biutag.supervision.pojo.param.ComplaintCollection.ComplaintCollectionUpdateParam;
import com.biutag.supervision.pojo.request.complaintCollection.ComplaintCollectionAddRequest; import com.biutag.supervision.pojo.param.SupDepartQueryParam;
import com.biutag.supervision.pojo.request.complaintCollection.ComplaintCollectionDelRequest; import com.biutag.supervision.pojo.param.complaintCollectionBlame.ComplaintCollectionBlameQueryParam;
import com.biutag.supervision.pojo.request.complaintCollection.ComplaintCollectionPageRequest; import com.biutag.supervision.pojo.request.complaintCollection.*;
import com.biutag.supervision.pojo.request.complaintCollection.ComplaintCollectionUpdateRequest;
import com.biutag.supervision.pojo.transfer.ComplaintCollectionTransfer; import com.biutag.supervision.pojo.transfer.ComplaintCollectionTransfer;
import com.biutag.supervision.pojo.vo.ComplaintCollectionPageVo; import com.biutag.supervision.pojo.vo.complaintCollection.ComplaintCollectionPageVo;
import com.biutag.supervision.pojo.vo.complaintCollection.ComplaintCollectionWatchDetailVO;
import com.biutag.supervision.repository.complaintCollection.ComplaintCollectionResourceService; import com.biutag.supervision.repository.complaintCollection.ComplaintCollectionResourceService;
import com.biutag.supervision.service.SupDictDataService; import com.biutag.supervision.repository.complaintCollectionBlame.ComplaintCollectionBlameResourceService;
import com.biutag.supervision.repository.supdepart.SupDepartResourceService;
import com.biutag.supervision.service.*;
import com.biutag.supervision.util.CodeTranslateUtil; import com.biutag.supervision.util.CodeTranslateUtil;
import com.biutag.supervision.util.SfssUtil;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.*; import java.util.*;
@ -42,10 +54,26 @@ public class ComplaintCollectionServiceImpl implements ComplaintCollectionServic
private final ComplaintCollectionResourceService complaintCollectionResourceService; private final ComplaintCollectionResourceService complaintCollectionResourceService;
private final SupDictDataService supDictDataService; private final SupDictDataService supDictDataService;
private final ComplaintCollectionBlameResourceService complaintCollectionBlameResourceService;
private final SupDictDataService dictDataService;
private final NegativeService negativeService;
private final FlowService flowService;
private final NegativeThingFileService thingFileService;
private final NegativeQueryService negativeQueryService;
private final NegativeWorkService workService;
private final NegativeTaskService negativeTaskService;
private final DepartNegativeRateService departNegativeRateService;
private final NegativeWorkService negativeWorkService;
private final NegativeScoreService negativeScoreService;
private final SupDepartService departService;
private final DataCaseVerifService dataCaseVerifService;
private final SupDepartResourceService supDepartResourceService;
private final ApplyCompletionAction applyCompletionAction;
private final NegativeBlameService negativeBlameService;
@Override @Override
public Result<Boolean> addComplaintCollection(ComplaintCollectionAddRequest request) { public Result<Boolean> addComplaintCollection(ComplaintCollectionAddRequest request) {
if (StrUtil.isNotBlank(request.getOriginId())) {
ComplaintCollectionExistParam existParam = new ComplaintCollectionExistParam(); ComplaintCollectionExistParam existParam = new ComplaintCollectionExistParam();
existParam.setOriginId(request.getOriginId()); existParam.setOriginId(request.getOriginId());
existParam.setSourceTable(request.getSourceTable()); existParam.setSourceTable(request.getSourceTable());
@ -53,6 +81,7 @@ public class ComplaintCollectionServiceImpl implements ComplaintCollectionServic
if (exists) { if (exists) {
throw new IllegalStateException("存在相同编号+来源"); throw new IllegalStateException("存在相同编号+来源");
} }
}
ComplaintCollection complaintCollection = ComplaintCollectionTransfer.INSTANCE.addRequestToEntity(request); ComplaintCollection complaintCollection = ComplaintCollectionTransfer.INSTANCE.addRequestToEntity(request);
complaintCollection.setCreateTime(LocalDateTime.now()); complaintCollection.setCreateTime(LocalDateTime.now());
complaintCollection.setCreateBy(UserContextHolder.getCurrentUser().getUserName()); complaintCollection.setCreateBy(UserContextHolder.getCurrentUser().getUserName());
@ -63,14 +92,16 @@ public class ComplaintCollectionServiceImpl implements ComplaintCollectionServic
@Override @Override
public Result<Boolean> delComplaintCollection(ComplaintCollectionDelRequest request) { public Result<Boolean> delComplaintCollection(ComplaintCollectionDelRequest request) {
// ComplaintCollectionQueryParam param = new ComplaintCollectionQueryParam(); ComplaintCollectionQueryParam param = new ComplaintCollectionQueryParam();
// param.setId(request.getId()); param.setId(request.getId());
// List<ComplaintCollection> query = complaintCollectionResourceService.query(param); List<ComplaintCollection> query = complaintCollectionResourceService.query(param);
// 对query做业务校验 if (CollectionUtil.isEmpty(query)) {
boolean deleted = complaintCollectionResourceService.deleteById(request.getId());
if (!deleted) {
throw new RuntimeException("未找到可删除信息"); throw new RuntimeException("未找到可删除信息");
} }
if (!"0".equals(query.get(0).getStatus())) {
throw new RuntimeException("目标信息状态不可删除");
}
boolean deleted = complaintCollectionResourceService.deleteById(request.getId());
return Result.success(true); return Result.success(true);
} }
@ -134,7 +165,210 @@ public class ComplaintCollectionServiceImpl implements ComplaintCollectionServic
} }
@Override
@Transactional(rollbackFor = Exception.class)
public Result<Boolean> addComplaintCollectionBlame(ComplaintCollectionAndBlameAddRequest request) {
String userName = UserContextHolder.getCurrentUser().getUserName();
String checkStatus = SfssUtil.getCheckStatusCategory(request.getCheckStatusCode());
// 更新表头基本信息
ComplaintCollectionUpdateParam collectionUpdateParam = new ComplaintCollectionUpdateParam();
collectionUpdateParam.setId(request.getComplaintId());
collectionUpdateParam.setCaseNumber(request.getCaseNumber());
// 核查情况code
collectionUpdateParam.setCheckStatus(checkStatus);
// 核查情况名称
collectionUpdateParam.setCheckStatusName(request.getCheckStatusName());
// 核查情况内容
collectionUpdateParam.setCheckStatusDesc(request.getCheckStatusDesc());
// 涉及单位
String involveDepartId = request.getInvolveDepartId();
SupDepartQueryParam supDepartQueryParam = new SupDepartQueryParam();
supDepartQueryParam.setId(involveDepartId);
List<SupDepart> list = supDepartResourceService.query(supDepartQueryParam);
if (CollectionUtil.isEmpty(list)) {
throw new RuntimeException("未找到对应的涉及单位");
}
SupDepart supDepart = list.get(0);
if (2 == supDepart.getLevel()) {
collectionUpdateParam.setSecondDepartId(supDepart.getId());
collectionUpdateParam.setSecondDepartName(supDepart.getShortName());
}
if (3 == supDepart.getLevel()) {
SupDepartQueryParam thirdQP = new SupDepartQueryParam();
thirdQP.setId(supDepart.getPid());
SupDepart secondDepart = supDepartResourceService.query(thirdQP).get(0);
collectionUpdateParam.setThirdDepartId(supDepart.getId());
collectionUpdateParam.setThirdDepartName(supDepart.getShortName());
collectionUpdateParam.setSecondDepartId(secondDepart.getId());
collectionUpdateParam.setSecondDepartName(secondDepart.getShortName());
}
collectionUpdateParam.setAccountabilityTarget(request.getAccountabilityTarget());
complaintCollectionResourceService.updateSelectiveById(collectionUpdateParam);
// 是否属实
boolean itTure = InspectCaseEnum.isItTure(checkStatus);
if (!itTure) {
// 不属实直接插入
List<ComplaintCollectionBlame> result = new ArrayList<>();
List<ComplaintCollectionAndBlameAddRequest.Blame> blames = request.getBlames();
if (AccountabilityTargetEnum.PERSONAL.getValue().equals(request.getAccountabilityTarget())) {
blames = request.getBlames().stream().filter(item -> BlameType.personal.name().equals(item.getType())).toList();
} else if (AccountabilityTargetEnum.DEPARTMENT.getValue().equals(request.getAccountabilityTarget())) {
blames = request.getBlames().stream().filter(item -> BlameType.department.name().equals(item.getType())).toList();
}
if (CollectionUtil.isNotEmpty(blames)) {
for (ComplaintCollectionAndBlameAddRequest.Blame blame : blames) {
ComplaintCollectionBlame blameEntity = new ComplaintCollectionBlame();
BeanUtil.copyProperties(blame, blameEntity);
blameEntity.setBlameId(UUID.randomUUID().toString());
blameEntity.setComplaintId(request.getComplaintId());
blameEntity.setBlameDepartId(request.getInvolveDepartId());
blameEntity.setBlameDepartName(request.getInvolveDepartName());
// 领导信息
List<ComplaintCollectionAndBlameAddRequest.BlameLeader> leadList = request.getBlameLeaders().stream()
.filter(leader -> leader.getBlameIdCodes().contains(blame.getBlameIdCode()))
.toList();
if (CollectionUtil.isNotEmpty(leadList)) {
ComplaintCollectionAndBlameAddRequest.BlameLeader blameLeader = leadList.get(0);
blameEntity.setLeadName(blameLeader.getLeadName());
blameEntity.setLeadIdCode(blameLeader.getLeadIdCode());
blameEntity.setLeadEmpNo(blameLeader.getLeadEmpNo());
}
blameEntity.setCreateBy(userName);
blameEntity.setCreateTime(LocalDateTime.now());
result.add(blameEntity);
}
}
complaintCollectionBlameResourceService.createComplaintCollectionBlame(result);
} else {
// 生成问题
NegativeDto dto = buildNegativeDto(request);
Negative negative = saveNegative(dto);
// 更新问题
if (StrUtil.isBlank(negative.getId())) {
// 防御
throw new IllegalArgumentException("问题id不能为空!");
}
VerifyData verifyData = buildVerifyData(request);
applyCompletionAction.updateNegative(negative, verifyData);
}
// 更新归集表状态
ComplaintCollectionUpdateParam updateParam = new ComplaintCollectionUpdateParam();
updateParam.setId(request.getComplaintId());
updateParam.setStatus("1");
complaintCollectionResourceService.updateSelectiveById(updateParam);
return Result.success(true);
}
@Override
public Result<ComplaintCollectionWatchDetailVO> watchDetail(ComplaintCollectionWatchDetailRequest request) {
// 基本信息+核查情况
ComplaintCollectionQueryParam queryParam = new ComplaintCollectionQueryParam();
queryParam.setId(request.getId());
List<ComplaintCollection> query = complaintCollectionResourceService.query(queryParam);
if (CollectionUtil.isEmpty(query)) {
throw new RuntimeException("未找到详情");
}
ComplaintCollection complaintCollection = query.get(0);
ComplaintCollectionWatchDetailVO vo = ComplaintCollectionTransfer.INSTANCE.entityToWatchDetailVO(complaintCollection);
Map<String, String> dictLabelMap = buildDictLabelMap(SupDictEnum.SUSPECT_PROBLEM.getCode());
Map<String, String> sfssDictLabelMap = buildDictLabelMap(SupDictEnum.SFSS_SOURCE_TABLE.getCode());
vo.setInvolveProblemStr(CodeTranslateUtil.translateCodesToLabels(vo.getInvolveProblem(), dictLabelMap));
String sourceTable = CodeTranslateUtil.translateCodesToLabels(vo.getSourceTable(), sfssDictLabelMap);
String sourceTableSubOne = CodeTranslateUtil.translateCodesToLabels(vo.getSourceTableSubOne(), sfssDictLabelMap);
vo.setSourceTablePath(sourceTable + "/" + sourceTableSubOne);
String involveDepartName = Opt.ofNullable(complaintCollection.getSecondDepartName()).orElse("") + "/" + Opt.ofNullable(complaintCollection.getThirdDepartName()).orElse("");
vo.setInvolveDepartName(involveDepartName);
// 涉及信息
String checkStatus = complaintCollection.getCheckStatus();
boolean itTure = InspectCaseEnum.isItTure(checkStatus);
List<ComplaintCollectionWatchDetailVO.BlameInfoVO> personalBlames = new ArrayList<>();
List<ComplaintCollectionWatchDetailVO.BlameInfoVO> deptBlames = new ArrayList<>();
if (itTure) {
// 从negative_blame中读
List<Blame> list = negativeBlameService.list(request.getId());
List<Blame> pseronalList = list.stream().filter(one -> "personal".equals(one.getType())).collect(Collectors.toList());
List<Blame> department = list.stream().filter(one -> "department".equals(one.getType())).collect(Collectors.toList());
personalBlames = ComplaintCollectionTransfer.INSTANCE.blameToBlameInfoVO(pseronalList);
deptBlames = ComplaintCollectionTransfer.INSTANCE.blameToBlameInfoVO(department);
} else {
// 从自己表里读
ComplaintCollectionBlameQueryParam complaintCollectionBlameQueryParam = new ComplaintCollectionBlameQueryParam();
complaintCollectionBlameQueryParam.setComplaintId(request.getId());
List<ComplaintCollectionBlame> complaintCollectionBlames = complaintCollectionBlameResourceService.query(complaintCollectionBlameQueryParam);
List<ComplaintCollectionBlame> pseronalList = complaintCollectionBlames.stream().filter(one -> "personal".equals(one.getType())).collect(Collectors.toList());
List<ComplaintCollectionBlame> department = complaintCollectionBlames.stream().filter(one -> "department".equals(one.getType())).collect(Collectors.toList());
personalBlames = ComplaintCollectionTransfer.INSTANCE.complaintCollectionBlamesToBlameInfoVO(pseronalList);
deptBlames = ComplaintCollectionTransfer.INSTANCE.complaintCollectionBlamesToBlameInfoVO(department);
}
vo.setDeptBlames(deptBlames);
vo.setPersonalBlames(personalBlames);
return Result.success(vo);
}
public VerifyData buildVerifyData(ComplaintCollectionAndBlameAddRequest request) {
VerifyData verifyData = new VerifyData();
BeanUtil.copyProperties(request, verifyData);
// 责任人
List<VerifyData.Blame> blameList = new ArrayList<>();
if (CollectionUtil.isNotEmpty(request.getBlames())) {
for (ComplaintCollectionAndBlameAddRequest.Blame b : request.getBlames()) {
VerifyData.Blame blame = new VerifyData.Blame();
BeanUtil.copyProperties(b, blame);
if (cn.hutool.core.util.StrUtil.isNotBlank(b.getIvPersonTypeName())) {
blame.setIvPersonType(b.getIvPersonTypeName());
} else {
blame.setIvPersonType(b.getIvPersonType());
}
List<VerifyData.Problem> problems = new ArrayList<>();
if (b.getProblems() != null) {
for (ComplaintCollectionAndBlameAddRequest.Problem p : b.getProblems()) {
VerifyData.Problem problem = new VerifyData.Problem();
cn.hutool.core.bean.BeanUtil.copyProperties(p, problem);
problems.add(problem);
}
}
blame.setProblems(problems);
blameList.add(blame);
}
}
verifyData.setBlames(blameList);
// 责任领导
List<VerifyData.BlameLeader> leaderList = new ArrayList<>();
if (CollectionUtil.isNotEmpty(request.getBlameLeaders())) {
for (ComplaintCollectionAndBlameAddRequest.BlameLeader l : request.getBlameLeaders()) {
VerifyData.BlameLeader leader = new VerifyData.BlameLeader();
BeanUtil.copyProperties(l, leader);
leaderList.add(leader);
}
}
verifyData.setBlameLeaders(leaderList);
return verifyData;
}
private NegativeDto buildNegativeDto(ComplaintCollectionAndBlameAddRequest request) {
Map<String, String> stringStringMap = buildDictLabelMap(SupDictEnum.SFSS_SOURCE_TABLE.getCode());
NegativeDto dto = new NegativeDto();
dto.setId(request.getComplaintId());
dto.setOriginId(request.getOriginId());
dto.setDiscoveryTime(request.getDiscoveryTime());
dto.setProblemSourcesCode(request.getSourceTable());
dto.setProblemSources(stringStringMap.get(request.getSourceTable()));
dto.setBusinessTypeCode(request.getBusinessTypeCode());
dto.setPoliceTypeName(null);
dto.setPoliceType(null);
dto.setInvolveProblem(null);
dto.setResponderName(request.getResponderName());
dto.setContactPhone(request.getResponderPhone());
dto.setThingDesc(request.getThingDesc());
dto.setInvolveDepartName(request.getInvolveDepartName());
dto.setInvolveDepartId(request.getInvolveDepartId());
return dto;
}
private Map<String, String> buildDictLabelMap(String dictType) { private Map<String, String> buildDictLabelMap(String dictType) {
List<SupDictData> list = supDictDataService.listByDictType(dictType); List<SupDictData> list = supDictDataService.listByDictType(dictType);
@ -149,77 +383,53 @@ public class ComplaintCollectionServiceImpl implements ComplaintCollectionServic
private List<ComplaintCollection> mockComplaintCollectionPageVoList() { public Negative saveNegative(NegativeDto negativeDto) {
List<ComplaintCollection> list = new ArrayList<>(); Negative negative = new Negative();
// ====== 第一条 ====== BeanUtil.copyProperties(negativeDto, negative);
ComplaintCollection vo1 = new ComplaintCollection(); if (StrUtil.isBlank(negativeDto.getOriginId())) {
vo1.setOriginId("XF20251223001"); String originId = negativeService.generateOriginId(negativeDto.getProblemSourcesCode(), negativeDto.getBusinessTypeCode());
vo1.setSourceTable("petition"); negative.setOriginId(originId); // 如果是空就生成随机的线索源
vo1.setDiscoveryTime(LocalDateTime.now().minusDays(2)); }
vo1.setHappenTime(LocalDateTime.now().minusDays(3)); if (StrUtil.isNotBlank(negativeDto.getBusinessTypeCode())) {
vo1.setResponderName("张三"); SupDictData dictData = dictDataService.get("businessType", negativeDto.getBusinessTypeCode());
vo1.setResponderPhone("13800001111"); // 业务类型
vo1.setBusinessTypeName("信访投诉"); negative.setBusinessTypeName(Optional.ofNullable(dictData).map(SupDictData::getDictLabel).orElse(null));
vo1.setInvolveProblem("执法不规范"); }
vo1.setThingDesc("群众反映执法过程中存在态度粗暴问题。"); // 涉及单位
vo1.setProblemSources("群众来访"); SupDepart depart = departService.getById(negative.getInvolveDepartId());
vo1.setProblemSourcesCode("XF01"); if (DepartLevelEnum.SECOND.getValue().equals(depart.getLevel())) {
vo1.setSecondDepartId("DEP001"); negative.setSecondInvolveDepartId(depart.getId());
vo1.setSecondDepartName("治安管理支队"); } else if (DepartLevelEnum.THREE.getValue().equals(depart.getLevel())) {
vo1.setThirdDepartId("DEP00101"); negative.setThreeInvolveDepartId(depart.getId());
vo1.setThirdDepartName("一大队"); negative.setSecondInvolveDepartId(depart.getPid());
vo1.setDistributionState("已下发"); } else {
vo1.setIsReal(1); throw new RuntimeException("涉及单位请选择二级或三级单位");
vo1.setCreateTime(LocalDateTime.now().minusDays(2)); }
vo1.setCompletedTime(LocalDateTime.now().minusDays(1)); LocalDateTime now = LocalDateTime.now();
list.add(vo1); negative.setCrtTime(now).setUpdTime(now);
if (CollectionUtil.isNotEmpty(negativeDto.getInvolveProblem())) {
// ====== 第二条 ====== negative.setInvolveProblem(String.join(",", negativeDto.getInvolveProblem()));
ComplaintCollection vo2 = new ComplaintCollection(); } else {
vo2.setSourceTable("AJ20251223002"); negative.setInvolveProblem(null);
vo2.setDiscoveryTime(LocalDateTime.now().minusDays(5)); }
vo2.setHappenTime(LocalDateTime.now().minusDays(6)); if (CollectionUtil.isNotEmpty(negativeDto.getProblems())) {
vo2.setResponderName("李四"); negative.setProblems(JSON.toJSONString(negativeDto.getProblems()));
vo2.setResponderPhone("13900002222"); }
vo2.setBusinessTypeName("案件核查"); // 直接插入已办结
vo2.setInvolveProblem("执法程序问题"); negative.setProcessingStatus(ProcessingStatusEnum.completed.name());
vo2.setThingDesc("反映案件办理过程中存在程序瑕疵。"); negativeService.save(negative); // 添加一条 negative 数据
vo2.setProblemSources("举报线索"); negativeDto.setId(negative.getId());
vo2.setProblemSourcesCode("AJ02"); if (CollectionUtil.isNotEmpty(negativeDto.getThingFiles())) {
vo2.setSecondDepartId("DEP002"); List<NegativeThingFile> files = negativeDto.getThingFiles().stream().map(item -> {
vo2.setSecondDepartName("刑侦支队"); NegativeThingFile negativeThingFile = new NegativeThingFile();
vo2.setThirdDepartId("DEP00202"); BeanUtil.copyProperties(item, negativeThingFile);
vo2.setThirdDepartName("二大队"); negativeThingFile.setNegativeId(negative.getId());
vo2.setDistributionState("办理中"); negativeThingFile.setCreateTime(now);
vo2.setIsReal(2); return negativeThingFile;
vo2.setCreateTime(LocalDateTime.now().minusDays(5)); }).toList();
vo2.setCompletedTime(null); thingFileService.saveBatch(files);
list.add(vo2); }
return negative;
// ====== 第三条 ======
ComplaintCollection vo3 = new ComplaintCollection();
vo3.setOriginId("MB20251223003");
vo3.setDiscoveryTime(LocalDateTime.now().minusDays(1));
vo3.setHappenTime(null);
vo3.setResponderName("王五");
vo3.setResponderPhone("13700003333");
vo3.setBusinessTypeName("局长信箱");
vo3.setInvolveProblem("服务态度问题");
vo3.setThingDesc("反映窗口服务人员态度冷漠。");
vo3.setProblemSources("局长信箱");
vo3.setProblemSourcesCode("MB01");
vo3.setSecondDepartId("DEP003");
vo3.setSecondDepartName("政务服务中心");
vo3.setThirdDepartId(null);
vo3.setThirdDepartName(null);
vo3.setDistributionState("待处理");
vo3.setIsReal(null);
vo3.setCreateTime(LocalDateTime.now().minusDays(1));
vo3.setCompletedTime(null);
list.add(vo3);
return list;
} }
} }

35
src/main/java/com/biutag/supervision/util/SfssUtil.java

@ -0,0 +1,35 @@
package com.biutag.supervision.util;
import com.biutag.supervision.constants.enums.CheckStatusEnum;
import com.biutag.supervision.constants.enums.InspectCaseEnum;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* @ClassName SfssUtil
* @Description 涉访涉诉相关工具
* @Author shihao
* @Date 2025/12/30 15:36
*/
@Schema(description = "涉访涉诉相关工具")
public final class SfssUtil {
public static String getCheckStatusCategory(String checkStatusCode) {
String checkStatus = null;
if (CheckStatusEnum.TRUE.getValue().equals(checkStatusCode)) {
checkStatus = "1";
} else if (CheckStatusEnum.PARTIALLY_TRUE.getValue().equals(checkStatusCode) || CheckStatusEnum.QTFT.getValue().equals(checkStatusCode)) {
checkStatus = "2";
} else if (CheckStatusEnum.WFCS.getValue().equals(checkStatusCode) || CheckStatusEnum.FALSE.getValue().equals(checkStatusCode)) {
checkStatus = "3";
}
return checkStatus;
}
public static boolean isTrueInspectCaseByCheckStatus(String checkStatusCode) {
String checkStatusCategory = getCheckStatusCategory(checkStatusCode);
return InspectCaseEnum.isItTure(checkStatusCategory);
}
}

106
src/main/resources/mapper/ComplaintCollectionBlameMapper.xml

@ -0,0 +1,106 @@
<?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.biutag.supervision.mapper.ComplaintCollectionBlameMapper">
<!-- 批量插入 ComplaintCollectionBlame 全字段 -->
<insert id="insertBatch" parameterType="java.util.List">
INSERT INTO complaint_collection_blame (
blame_id,
complaint_id,
type,
blame_name,
blame_id_code,
blame_emp_no,
blame_depart_id,
blame_depart_name,
iv_person_type_code,
iv_person_type_name,
problems,
responsibility_type_code,
responsibility_type_name,
subjective_aspect_code,
subjective_aspect_name,
handle_result_code,
handle_result_name,
handle_result_name_other,
protect_rights_code,
protect_rights_name,
supervise_measures_code,
supervise_measures_name,
confinement_id,
lead_name,
lead_id_code,
lead_emp_no,
lead_depart_id,
lead_depart_name,
lead_responsibility_type_code,
lead_responsibility_type_name,
lead_handle_result_code,
lead_handle_result_name,
lead_handle_result_name_other,
lead_protect_rights_code,
lead_protect_rights_name,
lead_confinement_id,
gwf1, gwf2, gwf3, gwf4, gwf5,
gwf6, gwf7, gwf8, gwf9, gwf10,
gwf11, gwf12, gwf13, gwf14, gwf15,
gwf16, gwf17, gwf18, gwf19, gwf20,
create_by,
create_time,
update_by,
update_time
)
VALUES
<foreach collection="list" item="item" separator=",">
(
#{item.blameId},
#{item.complaintId},
#{item.type},
#{item.blameName},
#{item.blameIdCode},
#{item.blameEmpNo},
#{item.blameDepartId},
#{item.blameDepartName},
#{item.ivPersonTypeCode},
#{item.ivPersonTypeName},
#{item.problems},
#{item.responsibilityTypeCode},
#{item.responsibilityTypeName},
#{item.subjectiveAspectCode},
#{item.subjectiveAspectName},
#{item.handleResultCode},
#{item.handleResultName},
#{item.handleResultNameOther},
#{item.protectRightsCode},
#{item.protectRightsName},
#{item.superviseMeasuresCode},
#{item.superviseMeasuresName},
#{item.confinementId},
#{item.leadName},
#{item.leadIdCode},
#{item.leadEmpNo},
#{item.leadDepartId},
#{item.leadDepartName},
#{item.leadResponsibilityTypeCode},
#{item.leadResponsibilityTypeName},
#{item.leadHandleResultCode},
#{item.leadHandleResultName},
#{item.leadHandleResultNameOther},
#{item.leadProtectRightsCode},
#{item.leadProtectRightsName},
#{item.leadConfinementId},
#{item.gwf1}, #{item.gwf2}, #{item.gwf3}, #{item.gwf4}, #{item.gwf5},
#{item.gwf6}, #{item.gwf7}, #{item.gwf8}, #{item.gwf9}, #{item.gwf10},
#{item.gwf11}, #{item.gwf12}, #{item.gwf13}, #{item.gwf14}, #{item.gwf15},
#{item.gwf16}, #{item.gwf17}, #{item.gwf18}, #{item.gwf19}, #{item.gwf20},
#{item.createBy},
#{item.createTime},
#{item.updateBy},
#{item.updateTime}
)
</foreach>
</insert>
</mapper>
Loading…
Cancel
Save