From 9ebd12a172fb78af0c245c6f95a8ce6bf79a6c62 Mon Sep 17 00:00:00 2001 From: buaixuexideshitongxue <2936013465@qq.com> Date: Tue, 30 Dec 2025 15:46:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=89=E8=AE=BF=E6=B6=89=E8=AF=89--=E5=8A=9E?= =?UTF-8?q?=E7=90=86=E5=88=9D=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/ComplaintCollectionController.java | 23 +- .../flow/action/ApplyCompletionAction.java | 3 +- .../ComplaintCollectionBlameMapper.java | 12 + .../ComplaintCollectionPageDTO.java | 204 +++++++++ .../pojo/entity/ComplaintCollection.java | 38 +- .../pojo/entity/ComplaintCollectionBlame.java | 230 ++++++++++ .../ComplaintCollectionClosingStatusEnum.java | 39 ++ ...ComplaintCollectionPublicApprovalEnum.java | 38 ++ .../ComplaintCollectionUpdateParam.java | 31 ++ .../ComplaintCollectionBlameQueryParam.java | 70 +++ .../ComplaintCollectionAddRequest.java | 19 + ...ComplaintCollectionAndBlameAddRequest.java | 348 +++++++++++++++ .../ComplaintCollectionUpdateRequest.java | 6 + ...ComplaintCollectionWatchDetailRequest.java | 30 ++ .../transfer/ComplaintCollectionTransfer.java | 11 +- .../ComplaintCollectionPageVo.java | 2 +- .../ComplaintCollectionWatchDetailVO.java | 329 ++++++++++++++ .../ComplaintCollectionResourceService.java | 34 +- ...mplaintCollectionBlameResourceService.java | 41 ++ .../ComplaintCollectionService.java | 24 +- .../ComplaintCollectionServiceImpl.java | 406 +++++++++++++----- .../com/biutag/supervision/util/SfssUtil.java | 35 ++ .../mapper/ComplaintCollectionBlameMapper.xml | 106 +++++ 23 files changed, 1960 insertions(+), 119 deletions(-) create mode 100644 src/main/java/com/biutag/supervision/mapper/ComplaintCollectionBlameMapper.java create mode 100644 src/main/java/com/biutag/supervision/pojo/entity/ComplaintCollectionBlame.java create mode 100644 src/main/java/com/biutag/supervision/pojo/enums/complaintCollection/ComplaintCollectionClosingStatusEnum.java create mode 100644 src/main/java/com/biutag/supervision/pojo/enums/complaintCollection/ComplaintCollectionPublicApprovalEnum.java create mode 100644 src/main/java/com/biutag/supervision/pojo/param/complaintCollectionBlame/ComplaintCollectionBlameQueryParam.java create mode 100644 src/main/java/com/biutag/supervision/pojo/request/complaintCollection/ComplaintCollectionAndBlameAddRequest.java create mode 100644 src/main/java/com/biutag/supervision/pojo/request/complaintCollection/ComplaintCollectionWatchDetailRequest.java rename src/main/java/com/biutag/supervision/pojo/vo/{ => complaintCollection}/ComplaintCollectionPageVo.java (93%) create mode 100644 src/main/java/com/biutag/supervision/pojo/vo/complaintCollection/ComplaintCollectionWatchDetailVO.java create mode 100644 src/main/java/com/biutag/supervision/repository/complaintCollectionBlame/ComplaintCollectionBlameResourceService.java create mode 100644 src/main/java/com/biutag/supervision/util/SfssUtil.java create mode 100644 src/main/resources/mapper/ComplaintCollectionBlameMapper.xml diff --git a/src/main/java/com/biutag/supervision/controller/data/ComplaintCollectionController.java b/src/main/java/com/biutag/supervision/controller/data/ComplaintCollectionController.java index 54c6e6c..36d867b 100644 --- a/src/main/java/com/biutag/supervision/controller/data/ComplaintCollectionController.java +++ b/src/main/java/com/biutag/supervision/controller/data/ComplaintCollectionController.java @@ -1,11 +1,9 @@ package com.biutag.supervision.controller.data; import com.biutag.supervision.pojo.Result; -import com.biutag.supervision.pojo.request.complaintCollection.ComplaintCollectionAddRequest; -import com.biutag.supervision.pojo.request.complaintCollection.ComplaintCollectionDelRequest; -import com.biutag.supervision.pojo.request.complaintCollection.ComplaintCollectionPageRequest; -import com.biutag.supervision.pojo.request.complaintCollection.ComplaintCollectionUpdateRequest; -import com.biutag.supervision.pojo.vo.ComplaintCollectionPageVo; +import com.biutag.supervision.pojo.request.complaintCollection.*; +import com.biutag.supervision.pojo.vo.complaintCollection.ComplaintCollectionPageVo; +import com.biutag.supervision.pojo.vo.complaintCollection.ComplaintCollectionWatchDetailVO; import com.biutag.supervision.service.complaintCollection.ComplaintCollectionService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -54,4 +52,19 @@ public class ComplaintCollectionController { public Result getComplaintCollectionPage(@RequestBody ComplaintCollectionPageRequest request){ return complaintCollectionService.getComplaintCollectionPage(request); } + + @Operation(description = "办理") + @PostMapping("/addComplaintCollectionBlame") + public Result addComplaintCollectionBlame(@RequestBody ComplaintCollectionAndBlameAddRequest request){ + return complaintCollectionService.addComplaintCollectionBlame(request); + } + + + @Operation(description = "查看详情") + @PostMapping("/watchDetail") + public Result watchDetail(@RequestBody ComplaintCollectionWatchDetailRequest request){ + return complaintCollectionService.watchDetail(request); + } + + } diff --git a/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java b/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java index e793e8e..33a7e2d 100644 --- a/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java +++ b/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java @@ -143,7 +143,8 @@ public class ApplyCompletionAction implements Action { .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())); } // 涉及单位 diff --git a/src/main/java/com/biutag/supervision/mapper/ComplaintCollectionBlameMapper.java b/src/main/java/com/biutag/supervision/mapper/ComplaintCollectionBlameMapper.java new file mode 100644 index 0000000..5d67272 --- /dev/null +++ b/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 { + + int insertBatch(List list); + +} diff --git a/src/main/java/com/biutag/supervision/pojo/dto/complaintCollection/ComplaintCollectionPageDTO.java b/src/main/java/com/biutag/supervision/pojo/dto/complaintCollection/ComplaintCollectionPageDTO.java index 9816c0e..eff3aa8 100644 --- a/src/main/java/com/biutag/supervision/pojo/dto/complaintCollection/ComplaintCollectionPageDTO.java +++ b/src/main/java/com/biutag/supervision/pojo/dto/complaintCollection/ComplaintCollectionPageDTO.java @@ -84,6 +84,210 @@ public class ComplaintCollectionPageDTO { @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 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; } diff --git a/src/main/java/com/biutag/supervision/pojo/entity/ComplaintCollection.java b/src/main/java/com/biutag/supervision/pojo/entity/ComplaintCollection.java index 56a6e4b..082b2d8 100644 --- a/src/main/java/com/biutag/supervision/pojo/entity/ComplaintCollection.java +++ b/src/main/java/com/biutag/supervision/pojo/entity/ComplaintCollection.java @@ -93,10 +93,12 @@ public class ComplaintCollection { @TableField("distribution_state") private String distributionState; + // 三表统一 @Schema(description = "涉及单位ID(PETITION.second_depart_id;CASE_VERIF.second_depart_id)") @TableField("second_depart_id") private String secondDepartId; + // 三表统一 @Schema(description = "涉及科所队ID(PETITION.third_depart_id;CASE_VERIF.third_depart_id)") @TableField("third_depart_id") private String thirdDepartId; @@ -246,23 +248,28 @@ public class ComplaintCollection { @TableField("business_type_code") private String businessTypeCode; + // 改为3表统一 核查情况 @Schema(description = "核查情况(MAILBOX.checkStatus)") @TableField("check_status") private String checkStatus; + // 改为3表统一 核查情况名称 @Schema(description = "核查情况名称(MAILBOX.checkStatusName)") @TableField("check_status_name") private String checkStatusName; + // 改为3表统一 核查情况内容 @Schema(description = "核查情况内容(MAILBOX.checkStatusDesc)") @TableField("check_status_desc") private String checkStatusDesc; + @Schema(description = "办理状态(MAILBOX.processingStatus)") @TableField("processing_status") private String processingStatus; - @Schema(description = "转责对象(MAILBOX.accountabilityTarget)") + // 改为3表公用 + @Schema(description = "涉及对象(MAILBOX.accountabilityTarget)") @TableField("accountability_target") private String accountabilityTarget; @@ -293,6 +300,10 @@ public class ComplaintCollection { @TableField("tag") private String tag; + @Schema(description = "涉及案件/警情编号") + @TableField("case_number") + private String caseNumber; + /* ========================= * 4) 扩展字段(最后) @@ -395,8 +406,25 @@ public class ComplaintCollection { @TableField("update_time") private LocalDateTime updateTime; -// @Schema(description = "逻辑删除标记(0未删 1已删)") -// @TableField("delete_flag") -// @TableLogic(value = "0", delval = "1") -// private Integer deleteFlag; + + /** + * @see com.biutag.supervision.pojo.enums.complaintCollection.ComplaintCollectionClosingStatusEnum + */ + @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; + + } diff --git a/src/main/java/com/biutag/supervision/pojo/entity/ComplaintCollectionBlame.java b/src/main/java/com/biutag/supervision/pojo/entity/ComplaintCollectionBlame.java new file mode 100644 index 0000000..b9585f6 --- /dev/null +++ b/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; +} + + + + diff --git a/src/main/java/com/biutag/supervision/pojo/enums/complaintCollection/ComplaintCollectionClosingStatusEnum.java b/src/main/java/com/biutag/supervision/pojo/enums/complaintCollection/ComplaintCollectionClosingStatusEnum.java new file mode 100644 index 0000000..cef3001 --- /dev/null +++ b/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; + } +} diff --git a/src/main/java/com/biutag/supervision/pojo/enums/complaintCollection/ComplaintCollectionPublicApprovalEnum.java b/src/main/java/com/biutag/supervision/pojo/enums/complaintCollection/ComplaintCollectionPublicApprovalEnum.java new file mode 100644 index 0000000..ea5872c --- /dev/null +++ b/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; + } +} diff --git a/src/main/java/com/biutag/supervision/pojo/param/ComplaintCollection/ComplaintCollectionUpdateParam.java b/src/main/java/com/biutag/supervision/pojo/param/ComplaintCollection/ComplaintCollectionUpdateParam.java index 52fe0e4..cfe6bfa 100644 --- a/src/main/java/com/biutag/supervision/pojo/param/ComplaintCollection/ComplaintCollectionUpdateParam.java +++ b/src/main/java/com/biutag/supervision/pojo/param/ComplaintCollection/ComplaintCollectionUpdateParam.java @@ -1,5 +1,6 @@ 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.ComplaintCollectionSourceTableEnum; import com.biutag.supervision.pojo.enums.complaintCollection.YesOrNoEnum; @@ -86,4 +87,34 @@ public class ComplaintCollectionUpdateParam { @Schema(description = "更新时间(新表字段)") 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; + } diff --git a/src/main/java/com/biutag/supervision/pojo/param/complaintCollectionBlame/ComplaintCollectionBlameQueryParam.java b/src/main/java/com/biutag/supervision/pojo/param/complaintCollectionBlame/ComplaintCollectionBlameQueryParam.java new file mode 100644 index 0000000..fef8aac --- /dev/null +++ b/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 blameIds; + + @Schema(description = "投诉主键ID") + private String complaintId; + + @Schema(description = "投诉主键ID集合") + private Set complaintIds; + + @Schema(description = "信件编号") + private String originId; + + @Schema(description = "来源表类型") + private String sourceTable; + + @Schema(description = "来源表类型集合") + private Set sourceTables; + + @Schema(description = "反映人姓名") + private String responderName; + + @Schema(description = "受理时间范围") + private List 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 tags; + +} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/pojo/request/complaintCollection/ComplaintCollectionAddRequest.java b/src/main/java/com/biutag/supervision/pojo/request/complaintCollection/ComplaintCollectionAddRequest.java index 9a22183..89ac42d 100644 --- a/src/main/java/com/biutag/supervision/pojo/request/complaintCollection/ComplaintCollectionAddRequest.java +++ b/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.ObjectUtil; import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.annotation.TableField; import com.biutag.supervision.aop.ParamChecked; import com.biutag.supervision.pojo.enums.complaintCollection.ComplaintCollectionHandleMethodEnum; import com.biutag.supervision.pojo.enums.complaintCollection.ComplaintCollectionSourceTableEnum; @@ -94,6 +95,24 @@ public class ComplaintCollectionAddRequest implements ParamChecked { @Schema(description = "办理方式") 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 public void check() { diff --git a/src/main/java/com/biutag/supervision/pojo/request/complaintCollection/ComplaintCollectionAndBlameAddRequest.java b/src/main/java/com/biutag/supervision/pojo/request/complaintCollection/ComplaintCollectionAndBlameAddRequest.java new file mode 100644 index 0000000..f9131cf --- /dev/null +++ b/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 blames = new ArrayList<>(); + + @Schema(description = "涉及责任领导列表") + private List 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 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 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 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 problems; + + + @Schema(description = "责任人类型标识") + private String type; + } + + + @Getter + @Setter + @Schema(description = "责任领导信息") + public static class BlameLeader { + + @Schema(description = "关联责任人身份证集合") + private List 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 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; + } +} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/pojo/request/complaintCollection/ComplaintCollectionUpdateRequest.java b/src/main/java/com/biutag/supervision/pojo/request/complaintCollection/ComplaintCollectionUpdateRequest.java index f5702f1..65e6bc8 100644 --- a/src/main/java/com/biutag/supervision/pojo/request/complaintCollection/ComplaintCollectionUpdateRequest.java +++ b/src/main/java/com/biutag/supervision/pojo/request/complaintCollection/ComplaintCollectionUpdateRequest.java @@ -64,6 +64,12 @@ public class ComplaintCollectionUpdateRequest implements ParamChecked { @Schema(description = "办理方式") private String handleMethod; + @Schema(description = "业务类型code") + private String businessTypeCode; + + @Schema(description = "业务类型name") + private String businessTypeName; + @Override public void check() { if (StrUtil.isBlank(id)) { diff --git a/src/main/java/com/biutag/supervision/pojo/request/complaintCollection/ComplaintCollectionWatchDetailRequest.java b/src/main/java/com/biutag/supervision/pojo/request/complaintCollection/ComplaintCollectionWatchDetailRequest.java new file mode 100644 index 0000000..75220d5 --- /dev/null +++ b/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不能为空!"); + } + } +} diff --git a/src/main/java/com/biutag/supervision/pojo/transfer/ComplaintCollectionTransfer.java b/src/main/java/com/biutag/supervision/pojo/transfer/ComplaintCollectionTransfer.java index 3bd183a..66016a1 100644 --- a/src/main/java/com/biutag/supervision/pojo/transfer/ComplaintCollectionTransfer.java +++ b/src/main/java/com/biutag/supervision/pojo/transfer/ComplaintCollectionTransfer.java @@ -1,14 +1,17 @@ package com.biutag.supervision.pojo.transfer; 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.entity.ComplaintCollection; +import com.biutag.supervision.pojo.entity.ComplaintCollectionBlame; import com.biutag.supervision.pojo.param.ComplaintCollection.ComplaintCollectionQueryParam; import com.biutag.supervision.pojo.param.ComplaintCollection.ComplaintCollectionUpdateParam; import com.biutag.supervision.pojo.request.complaintCollection.ComplaintCollectionAddRequest; import com.biutag.supervision.pojo.request.complaintCollection.ComplaintCollectionPageRequest; 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.Mapping; import org.mapstruct.factory.Mappers; @@ -44,4 +47,10 @@ public interface ComplaintCollectionTransfer { ComplaintCollection addRequestToEntity(ComplaintCollectionAddRequest request); ComplaintCollectionUpdateParam updateRequestToParam(ComplaintCollectionUpdateRequest request); + + ComplaintCollectionWatchDetailVO entityToWatchDetailVO(ComplaintCollection complaintCollection); + + List complaintCollectionBlamesToBlameInfoVO(List pseronalList); + + List blameToBlameInfoVO(List pseronalList); } diff --git a/src/main/java/com/biutag/supervision/pojo/vo/ComplaintCollectionPageVo.java b/src/main/java/com/biutag/supervision/pojo/vo/complaintCollection/ComplaintCollectionPageVo.java similarity index 93% rename from src/main/java/com/biutag/supervision/pojo/vo/ComplaintCollectionPageVo.java rename to src/main/java/com/biutag/supervision/pojo/vo/complaintCollection/ComplaintCollectionPageVo.java index f6261d6..ff85712 100644 --- a/src/main/java/com/biutag/supervision/pojo/vo/ComplaintCollectionPageVo.java +++ b/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 io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/com/biutag/supervision/pojo/vo/complaintCollection/ComplaintCollectionWatchDetailVO.java b/src/main/java/com/biutag/supervision/pojo/vo/complaintCollection/ComplaintCollectionWatchDetailVO.java new file mode 100644 index 0000000..88de097 --- /dev/null +++ b/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 deptBlames; + + @Schema(description = "涉及人员(普通个体)") + private List 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; + } + +} diff --git a/src/main/java/com/biutag/supervision/repository/complaintCollection/ComplaintCollectionResourceService.java b/src/main/java/com/biutag/supervision/repository/complaintCollection/ComplaintCollectionResourceService.java index ed2b684..ea40264 100644 --- a/src/main/java/com/biutag/supervision/repository/complaintCollection/ComplaintCollectionResourceService.java +++ b/src/main/java/com/biutag/supervision/repository/complaintCollection/ComplaintCollectionResourceService.java @@ -124,10 +124,10 @@ public class ComplaintCollectionResourceService extends BaseDAO { LambdaUpdateWrapper uw = new LambdaUpdateWrapper<>(); uw.eq(ComplaintCollection::getId, id); uw.set(StrUtil.isNotBlank(param.getResponderIdCode()), ComplaintCollection::getResponderIdCode, param.getResponderIdCode()); - if (param.getSourceTableSubOne()!=null){ + if (param.getSourceTableSubOne() != null) { uw.set(ComplaintCollection::getSourceTableSubOne, param.getSourceTableSubOne()); } - if (param.getSourceTable()!=null){ + if (param.getSourceTable() != null) { uw.set(ComplaintCollection::getSourceTable, param.getSourceTable()); } if (param.getTag() != null) { @@ -151,6 +151,12 @@ public class ComplaintCollectionResourceService extends BaseDAO { if (param.getSecondDepartName() != null) { 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) { uw.set(ComplaintCollection::getResponderName, param.getResponderName()); } @@ -160,12 +166,36 @@ public class ComplaintCollectionResourceService extends BaseDAO { if (param.getThingDesc() != null) { 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 才更新 if (param.getDiscoveryTime() != null) { 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::getUpdateTime, LocalDateTime.now()); + if (uw.getExpression() == null || uw.getExpression().getSqlSegment().isEmpty()) { + throw new IllegalStateException("更新条件不能为空,防止全表更新"); + } return complaintCollectionMapper.update(null, uw) > 0; } diff --git a/src/main/java/com/biutag/supervision/repository/complaintCollectionBlame/ComplaintCollectionBlameResourceService.java b/src/main/java/com/biutag/supervision/repository/complaintCollectionBlame/ComplaintCollectionBlameResourceService.java new file mode 100644 index 0000000..33f9891 --- /dev/null +++ b/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 query(ComplaintCollectionBlameQueryParam param) { + LambdaQueryWrapper 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 complaintCollectionList) { + innerBatchInsert(complaintCollectionBlameMapper, complaintCollectionList, "添加失败!"); + return Boolean.TRUE; + } +} diff --git a/src/main/java/com/biutag/supervision/service/complaintCollection/ComplaintCollectionService.java b/src/main/java/com/biutag/supervision/service/complaintCollection/ComplaintCollectionService.java index be17752..27170b3 100644 --- a/src/main/java/com/biutag/supervision/service/complaintCollection/ComplaintCollectionService.java +++ b/src/main/java/com/biutag/supervision/service/complaintCollection/ComplaintCollectionService.java @@ -1,12 +1,9 @@ package com.biutag.supervision.service.complaintCollection; import com.biutag.supervision.pojo.Result; -import com.biutag.supervision.pojo.request.complaintCollection.ComplaintCollectionAddRequest; -import com.biutag.supervision.pojo.request.complaintCollection.ComplaintCollectionDelRequest; -import com.biutag.supervision.pojo.request.complaintCollection.ComplaintCollectionPageRequest; -import com.biutag.supervision.pojo.request.complaintCollection.ComplaintCollectionUpdateRequest; -import com.biutag.supervision.pojo.vo.ComplaintCollectionPageVo; - +import com.biutag.supervision.pojo.request.complaintCollection.*; +import com.biutag.supervision.pojo.vo.complaintCollection.ComplaintCollectionPageVo; +import com.biutag.supervision.pojo.vo.complaintCollection.ComplaintCollectionWatchDetailVO; /** @@ -46,4 +43,19 @@ public interface ComplaintCollectionService { * @return */ Result updateComplaintCollection(ComplaintCollectionUpdateRequest request); + + /** + * 添加涉访涉诉责任人 + * @param request + * @return + */ + Result addComplaintCollectionBlame(ComplaintCollectionAndBlameAddRequest request); + + /** + * 查看详情 + * @param request + * @return + */ + Result watchDetail(ComplaintCollectionWatchDetailRequest request); + } diff --git a/src/main/java/com/biutag/supervision/service/complaintCollection/ComplaintCollectionServiceImpl.java b/src/main/java/com/biutag/supervision/service/complaintCollection/ComplaintCollectionServiceImpl.java index c66fc57..74fcf2e 100644 --- a/src/main/java/com/biutag/supervision/service/complaintCollection/ComplaintCollectionServiceImpl.java +++ b/src/main/java/com/biutag/supervision/service/complaintCollection/ComplaintCollectionServiceImpl.java @@ -1,29 +1,41 @@ package com.biutag.supervision.service.complaintCollection; +import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.lang.Opt; import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson2.JSON; import com.baomidou.mybatisplus.core.metadata.IPage; 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.domain.Blame; +import com.biutag.supervision.pojo.dto.NegativeDto; import com.biutag.supervision.pojo.dto.complaintCollection.ComplaintCollectionPageDTO; -import com.biutag.supervision.pojo.entity.ComplaintCollection; -import com.biutag.supervision.pojo.entity.SupDictData; +import com.biutag.supervision.pojo.dto.flow.VerifyData; +import com.biutag.supervision.pojo.entity.*; import com.biutag.supervision.pojo.enums.supDict.SupDictEnum; import com.biutag.supervision.pojo.param.ComplaintCollection.ComplaintCollectionExistParam; import com.biutag.supervision.pojo.param.ComplaintCollection.ComplaintCollectionQueryParam; import com.biutag.supervision.pojo.param.ComplaintCollection.ComplaintCollectionUpdateParam; -import com.biutag.supervision.pojo.request.complaintCollection.ComplaintCollectionAddRequest; -import com.biutag.supervision.pojo.request.complaintCollection.ComplaintCollectionDelRequest; -import com.biutag.supervision.pojo.request.complaintCollection.ComplaintCollectionPageRequest; -import com.biutag.supervision.pojo.request.complaintCollection.ComplaintCollectionUpdateRequest; +import com.biutag.supervision.pojo.param.SupDepartQueryParam; +import com.biutag.supervision.pojo.param.complaintCollectionBlame.ComplaintCollectionBlameQueryParam; +import com.biutag.supervision.pojo.request.complaintCollection.*; 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.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.SfssUtil; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import java.time.LocalDateTime; import java.util.*; @@ -42,16 +54,33 @@ public class ComplaintCollectionServiceImpl implements ComplaintCollectionServic private final ComplaintCollectionResourceService complaintCollectionResourceService; 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 public Result addComplaintCollection(ComplaintCollectionAddRequest request) { - ComplaintCollectionExistParam existParam = new ComplaintCollectionExistParam(); - existParam.setOriginId(request.getOriginId()); - existParam.setSourceTable(request.getSourceTable()); - boolean exists = complaintCollectionResourceService.exists(existParam); - if (exists) { - throw new IllegalStateException("存在相同编号+来源"); + if (StrUtil.isNotBlank(request.getOriginId())) { + ComplaintCollectionExistParam existParam = new ComplaintCollectionExistParam(); + existParam.setOriginId(request.getOriginId()); + existParam.setSourceTable(request.getSourceTable()); + boolean exists = complaintCollectionResourceService.exists(existParam); + if (exists) { + throw new IllegalStateException("存在相同编号+来源"); + } } ComplaintCollection complaintCollection = ComplaintCollectionTransfer.INSTANCE.addRequestToEntity(request); complaintCollection.setCreateTime(LocalDateTime.now()); @@ -63,14 +92,16 @@ public class ComplaintCollectionServiceImpl implements ComplaintCollectionServic @Override public Result delComplaintCollection(ComplaintCollectionDelRequest request) { -// ComplaintCollectionQueryParam param = new ComplaintCollectionQueryParam(); -// param.setId(request.getId()); -// List query = complaintCollectionResourceService.query(param); -// 对query做业务校验 - boolean deleted = complaintCollectionResourceService.deleteById(request.getId()); - if (!deleted) { + ComplaintCollectionQueryParam param = new ComplaintCollectionQueryParam(); + param.setId(request.getId()); + List query = complaintCollectionResourceService.query(param); + if (CollectionUtil.isEmpty(query)) { throw new RuntimeException("未找到可删除信息"); } + if (!"0".equals(query.get(0).getStatus())) { + throw new RuntimeException("目标信息状态不可删除"); + } + boolean deleted = complaintCollectionResourceService.deleteById(request.getId()); return Result.success(true); } @@ -80,17 +111,17 @@ public class ComplaintCollectionServiceImpl implements ComplaintCollectionServic ComplaintCollectionExistParam existParam = new ComplaintCollectionExistParam(); existParam.setId(request.getId()); boolean exists = complaintCollectionResourceService.exists(existParam); - if (!exists){ + if (!exists) { throw new NoSuchElementException("未找到可修改信息"); } - ComplaintCollectionUpdateParam updateParam= ComplaintCollectionTransfer.INSTANCE.updateRequestToParam(request); + ComplaintCollectionUpdateParam updateParam = ComplaintCollectionTransfer.INSTANCE.updateRequestToParam(request); // 处理 involve_problem + tag String involveProblem = CodeTranslateUtil.joinDistinct(request.getInvolveProblemIdList()); - if (StrUtil.isNotBlank(involveProblem)){ + if (StrUtil.isNotBlank(involveProblem)) { updateParam.setInvolveProblem(involveProblem); } String tag = CodeTranslateUtil.joinDistinct(request.getTags()); - if (StrUtil.isNotBlank(tag)){ + if (StrUtil.isNotBlank(tag)) { updateParam.setTag(tag); } // 4) 必填:id + 更新信息 @@ -115,13 +146,13 @@ public class ComplaintCollectionServiceImpl implements ComplaintCollectionServic if (CollectionUtil.isNotEmpty(complaintCollectionPageDTOS)) { Map dictLabelMap = buildDictLabelMap(SupDictEnum.SUSPECT_PROBLEM.getCode()); Map sfssDictLabelMap = buildDictLabelMap(SupDictEnum.SFSS_SOURCE_TABLE.getCode()); - complaintCollectionPageDTOS.forEach(one->{ + complaintCollectionPageDTOS.forEach(one -> { // 涉嫌问题拼接 one.setInvolveProblemStr(CodeTranslateUtil.translateCodesToLabels(one.getInvolveProblem(), dictLabelMap)); // 来源 String sourceTable = CodeTranslateUtil.translateCodesToLabels(one.getSourceTable(), sfssDictLabelMap); String sourceTableSubOne = CodeTranslateUtil.translateCodesToLabels(one.getSourceTableSubOne(), sfssDictLabelMap); - one.setSourceTablePath(sourceTable+"/"+sourceTableSubOne); + one.setSourceTablePath(sourceTable + "/" + sourceTableSubOne); }); } ComplaintCollectionPageVo complaintCollectionPageVo = new ComplaintCollectionPageVo(); @@ -134,7 +165,210 @@ public class ComplaintCollectionServiceImpl implements ComplaintCollectionServic } + @Override + @Transactional(rollbackFor = Exception.class) + public Result 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 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 result = new ArrayList<>(); + List 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 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 watchDetail(ComplaintCollectionWatchDetailRequest request) { + // 基本信息+核查情况 + ComplaintCollectionQueryParam queryParam = new ComplaintCollectionQueryParam(); + queryParam.setId(request.getId()); + List query = complaintCollectionResourceService.query(queryParam); + if (CollectionUtil.isEmpty(query)) { + throw new RuntimeException("未找到详情"); + } + ComplaintCollection complaintCollection = query.get(0); + ComplaintCollectionWatchDetailVO vo = ComplaintCollectionTransfer.INSTANCE.entityToWatchDetailVO(complaintCollection); + Map dictLabelMap = buildDictLabelMap(SupDictEnum.SUSPECT_PROBLEM.getCode()); + Map 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 personalBlames = new ArrayList<>(); + List deptBlames = new ArrayList<>(); + if (itTure) { + // 从negative_blame中读 + List list = negativeBlameService.list(request.getId()); + List pseronalList = list.stream().filter(one -> "personal".equals(one.getType())).collect(Collectors.toList()); + List 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 complaintCollectionBlames = complaintCollectionBlameResourceService.query(complaintCollectionBlameQueryParam); + List pseronalList = complaintCollectionBlames.stream().filter(one -> "personal".equals(one.getType())).collect(Collectors.toList()); + List 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 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 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 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 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 buildDictLabelMap(String dictType) { List list = supDictDataService.listByDictType(dictType); @@ -149,77 +383,53 @@ public class ComplaintCollectionServiceImpl implements ComplaintCollectionServic - private List mockComplaintCollectionPageVoList() { - List list = new ArrayList<>(); - // ====== 第一条 ====== - ComplaintCollection vo1 = new ComplaintCollection(); - vo1.setOriginId("XF20251223001"); - vo1.setSourceTable("petition"); - vo1.setDiscoveryTime(LocalDateTime.now().minusDays(2)); - vo1.setHappenTime(LocalDateTime.now().minusDays(3)); - vo1.setResponderName("张三"); - vo1.setResponderPhone("13800001111"); - vo1.setBusinessTypeName("信访投诉"); - vo1.setInvolveProblem("执法不规范"); - vo1.setThingDesc("群众反映执法过程中存在态度粗暴问题。"); - vo1.setProblemSources("群众来访"); - vo1.setProblemSourcesCode("XF01"); - vo1.setSecondDepartId("DEP001"); - vo1.setSecondDepartName("治安管理支队"); - vo1.setThirdDepartId("DEP00101"); - vo1.setThirdDepartName("一大队"); - vo1.setDistributionState("已下发"); - vo1.setIsReal(1); - vo1.setCreateTime(LocalDateTime.now().minusDays(2)); - vo1.setCompletedTime(LocalDateTime.now().minusDays(1)); - list.add(vo1); - - // ====== 第二条 ====== - ComplaintCollection vo2 = new ComplaintCollection(); - vo2.setSourceTable("AJ20251223002"); - vo2.setDiscoveryTime(LocalDateTime.now().minusDays(5)); - vo2.setHappenTime(LocalDateTime.now().minusDays(6)); - vo2.setResponderName("李四"); - vo2.setResponderPhone("13900002222"); - vo2.setBusinessTypeName("案件核查"); - vo2.setInvolveProblem("执法程序问题"); - vo2.setThingDesc("反映案件办理过程中存在程序瑕疵。"); - vo2.setProblemSources("举报线索"); - vo2.setProblemSourcesCode("AJ02"); - vo2.setSecondDepartId("DEP002"); - vo2.setSecondDepartName("刑侦支队"); - vo2.setThirdDepartId("DEP00202"); - vo2.setThirdDepartName("二大队"); - vo2.setDistributionState("办理中"); - vo2.setIsReal(2); - vo2.setCreateTime(LocalDateTime.now().minusDays(5)); - vo2.setCompletedTime(null); - list.add(vo2); - - // ====== 第三条 ====== - 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; + public Negative saveNegative(NegativeDto negativeDto) { + Negative negative = new Negative(); + BeanUtil.copyProperties(negativeDto, negative); + if (StrUtil.isBlank(negativeDto.getOriginId())) { + String originId = negativeService.generateOriginId(negativeDto.getProblemSourcesCode(), negativeDto.getBusinessTypeCode()); + negative.setOriginId(originId); // 如果是空就生成随机的线索源 + } + if (StrUtil.isNotBlank(negativeDto.getBusinessTypeCode())) { + SupDictData dictData = dictDataService.get("businessType", negativeDto.getBusinessTypeCode()); + // 业务类型 + negative.setBusinessTypeName(Optional.ofNullable(dictData).map(SupDictData::getDictLabel).orElse(null)); + } + // 涉及单位 + SupDepart depart = departService.getById(negative.getInvolveDepartId()); + if (DepartLevelEnum.SECOND.getValue().equals(depart.getLevel())) { + negative.setSecondInvolveDepartId(depart.getId()); + } else if (DepartLevelEnum.THREE.getValue().equals(depart.getLevel())) { + negative.setThreeInvolveDepartId(depart.getId()); + negative.setSecondInvolveDepartId(depart.getPid()); + } else { + throw new RuntimeException("涉及单位请选择二级或三级单位"); + } + LocalDateTime now = LocalDateTime.now(); + negative.setCrtTime(now).setUpdTime(now); + if (CollectionUtil.isNotEmpty(negativeDto.getInvolveProblem())) { + negative.setInvolveProblem(String.join(",", negativeDto.getInvolveProblem())); + } else { + negative.setInvolveProblem(null); + } + if (CollectionUtil.isNotEmpty(negativeDto.getProblems())) { + negative.setProblems(JSON.toJSONString(negativeDto.getProblems())); + } + // 直接插入已办结 + negative.setProcessingStatus(ProcessingStatusEnum.completed.name()); + negativeService.save(negative); // 添加一条 negative 数据 + negativeDto.setId(negative.getId()); + if (CollectionUtil.isNotEmpty(negativeDto.getThingFiles())) { + List files = negativeDto.getThingFiles().stream().map(item -> { + NegativeThingFile negativeThingFile = new NegativeThingFile(); + BeanUtil.copyProperties(item, negativeThingFile); + negativeThingFile.setNegativeId(negative.getId()); + negativeThingFile.setCreateTime(now); + return negativeThingFile; + }).toList(); + thingFileService.saveBatch(files); + } + return negative; } - } diff --git a/src/main/java/com/biutag/supervision/util/SfssUtil.java b/src/main/java/com/biutag/supervision/util/SfssUtil.java new file mode 100644 index 0000000..43ee51c --- /dev/null +++ b/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); + } + + +} diff --git a/src/main/resources/mapper/ComplaintCollectionBlameMapper.xml b/src/main/resources/mapper/ComplaintCollectionBlameMapper.xml new file mode 100644 index 0000000..8a73aad --- /dev/null +++ b/src/main/resources/mapper/ComplaintCollectionBlameMapper.xml @@ -0,0 +1,106 @@ + + + + + + + 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 + + ( + #{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} + ) + + + +