diff --git a/sql/20250925.sql b/sql/20250925.sql new file mode 100644 index 0000000..2d5195f --- /dev/null +++ b/sql/20250925.sql @@ -0,0 +1,17 @@ +ALTER TABLE `negative`.`negative` + ADD COLUMN `disciplinary_action_desc` text NULL COMMENT '处分处理情况' AFTER `process_result`; + +ALTER TABLE `negative`.`supervise_report` + ADD COLUMN `type` int NULL DEFAULT 1 COMMENT '通知通报类型 1-通报 2-通知' AFTER `crt_emp_no`, +ADD COLUMN `depart_name` varchar(500) NULL COMMENT '通知单位' AFTER `type`; + + + +CREATE TABLE `supervise_report_depart` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT '主键', + `depart_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '单位ID', + `depart_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '单位名称', + `supervise_id` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '通知通报ID', + `crt_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='通知单位'; \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/constants/enums/SuperviseReportTypeEnum.java b/src/main/java/com/biutag/supervision/constants/enums/SuperviseReportTypeEnum.java new file mode 100644 index 0000000..c797a47 --- /dev/null +++ b/src/main/java/com/biutag/supervision/constants/enums/SuperviseReportTypeEnum.java @@ -0,0 +1,18 @@ +package com.biutag.supervision.constants.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * @author wxc + * @date 2025/9/25 + */ +@AllArgsConstructor +public enum SuperviseReportTypeEnum { + + REPORT(1), + NOTICE(2); + + @Getter + private Integer value; +} diff --git a/src/main/java/com/biutag/supervision/controller/books/NegativeBookController.java b/src/main/java/com/biutag/supervision/controller/books/NegativeBookController.java index 416a6ae..527124a 100644 --- a/src/main/java/com/biutag/supervision/controller/books/NegativeBookController.java +++ b/src/main/java/com/biutag/supervision/controller/books/NegativeBookController.java @@ -268,12 +268,11 @@ public class NegativeBookController { if (!negativeBlames.isEmpty() && NumberUtil.isInteger(negativeBlames.get(0).getBlameEmpNo())) { item.setVerifiedPersonType("在编人员"); } - if (!"免予处分".equals(item.getHandleResult12337()) && !"不予处分".equals(item.getHandleResult12337())) { + if ("具有违纪违法情况".equals(item.getProcessResult1()) && !"免予处分".equals(item.getHandleResult12337()) && !"不予处分".equals(item.getHandleResult12337())) { item.setIsPunish("是"); } else { item.setIsPunish("否"); } - item.setPunishDes(item.getCheckStatusDesc()); }); String headerValue = "attachment; filename=\"" + URLEncoder.encode("12337信访投诉数据台账.xlsx", "UTF-8") + "\""; response.setHeader("Content-Disposition", headerValue); diff --git a/src/main/java/com/biutag/supervision/controller/supervise/SuperviseReportController.java b/src/main/java/com/biutag/supervision/controller/supervise/SuperviseReportController.java index d24c4e6..e7d66c5 100644 --- a/src/main/java/com/biutag/supervision/controller/supervise/SuperviseReportController.java +++ b/src/main/java/com/biutag/supervision/controller/supervise/SuperviseReportController.java @@ -27,8 +27,6 @@ import java.util.List; public class SuperviseReportController { private final SuperviseReportService service; - - private final SuperviseReportFileService fileService; /** * 分页 * */ @@ -48,6 +46,7 @@ public class SuperviseReportController { Result> negativePage(SuperviseReportQueryParam queryParam){ return Result.success(service.negativePage(queryParam)); } + /** * 编辑 * */ @@ -74,6 +73,7 @@ public class SuperviseReportController { return Result.failed("操作失败"); } } + /** * 获取附件清单 * */ @@ -85,7 +85,7 @@ public class SuperviseReportController { @GetMapping("/getReportDetail/{id}") Result getReportDetail(@PathVariable String id){ - SuperviseReport superviseReport =service.getOne(new LambdaQueryWrapper().eq(SuperviseReport::getId,id)); + SuperviseReport superviseReport = service.getOne(new LambdaQueryWrapper().eq(SuperviseReport::getId,id)); return Result.success(superviseReport); } 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 71ab243..b7f3d32 100644 --- a/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java +++ b/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java @@ -44,8 +44,6 @@ public class ApplyCompletionAction implements Action { private final SupDepartService departService; - private final Validator validator; - @Override public void next(ActionDto actionDto) { VerifyData verifyData = BeanUtil.toBean(actionDto.getData(), VerifyData.class); @@ -95,6 +93,11 @@ public class ApplyCompletionAction implements Action { if ("具有违纪违法情况".equals(verifyData.getProcessResult())) { updateWrapper.set(Negative::getHandleResult12337, verifyData.getHandleResult12337()) .set(Negative::getHandleResult12337Group, verifyData.getHandleResult12337Group()); + if (!"免予处分".equals(verifyData.getHandleResult12337()) && !"不予处分".equals(verifyData.getHandleResult12337())) { + updateWrapper.set(Negative::getDisciplinaryActionDesc, verifyData.getDisciplinaryActionDesc()); + } else { + updateWrapper.set(Negative::getDisciplinaryActionDesc, null); + } } else { updateWrapper.set(Negative::getHandleResult12337, null) .set(Negative::getHandleResult12337Group, null); diff --git a/src/main/java/com/biutag/supervision/mapper/SuperviseReportDepartMapper.java b/src/main/java/com/biutag/supervision/mapper/SuperviseReportDepartMapper.java new file mode 100644 index 0000000..6c1a317 --- /dev/null +++ b/src/main/java/com/biutag/supervision/mapper/SuperviseReportDepartMapper.java @@ -0,0 +1,8 @@ +package com.biutag.supervision.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.biutag.supervision.pojo.entity.SuperviseReportDepart; + +public interface SuperviseReportDepartMapper extends BaseMapper { + +} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/pojo/dto/flow/VerifyData.java b/src/main/java/com/biutag/supervision/pojo/dto/flow/VerifyData.java index 9145757..2f1bd24 100644 --- a/src/main/java/com/biutag/supervision/pojo/dto/flow/VerifyData.java +++ b/src/main/java/com/biutag/supervision/pojo/dto/flow/VerifyData.java @@ -86,6 +86,9 @@ public class VerifyData { private String verifiedIsLeader; + // 处分处理情况 + private String disciplinaryActionDesc; + @Setter @Getter public static class Blame { diff --git a/src/main/java/com/biutag/supervision/pojo/entity/Negative.java b/src/main/java/com/biutag/supervision/pojo/entity/Negative.java index 1e07a49..0957198 100644 --- a/src/main/java/com/biutag/supervision/pojo/entity/Negative.java +++ b/src/main/java/com/biutag/supervision/pojo/entity/Negative.java @@ -334,4 +334,7 @@ public class Negative { // 办理结果 private String processResult; + // 处分处理情况 + private String disciplinaryActionDesc; + } diff --git a/src/main/java/com/biutag/supervision/pojo/entity/SuperviseReport.java b/src/main/java/com/biutag/supervision/pojo/entity/SuperviseReport.java index 9285340..b23e2cd 100644 --- a/src/main/java/com/biutag/supervision/pojo/entity/SuperviseReport.java +++ b/src/main/java/com/biutag/supervision/pojo/entity/SuperviseReport.java @@ -34,4 +34,10 @@ public class SuperviseReport { @TableField("crt_emp_no") private String crtEmpNo; + // 通知通报类型 1-通报 2-通知 + private Integer type; + + // 通知单位 + private String departName; + } diff --git a/src/main/java/com/biutag/supervision/pojo/entity/SuperviseReportDepart.java b/src/main/java/com/biutag/supervision/pojo/entity/SuperviseReportDepart.java new file mode 100644 index 0000000..ac71a7d --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/entity/SuperviseReportDepart.java @@ -0,0 +1,35 @@ +package com.biutag.supervision.pojo.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Getter; +import lombok.Setter; + +import java.time.LocalDateTime; + +@Setter +@Getter +public class SuperviseReportDepart { + + // 主键 + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + // 单位ID + @TableField("depart_id") + private String departId; + + // 单位名称 + @TableField("depart_name") + private String departName; + + // 通知通报ID + @TableField("supervise_id") + private String superviseId; + + // 创建时间 + @TableField("crt_time") + private LocalDateTime crtTime; + +} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/pojo/param/SuperviseReportQueryParam.java b/src/main/java/com/biutag/supervision/pojo/param/SuperviseReportQueryParam.java index ba841eb..1647c67 100644 --- a/src/main/java/com/biutag/supervision/pojo/param/SuperviseReportQueryParam.java +++ b/src/main/java/com/biutag/supervision/pojo/param/SuperviseReportQueryParam.java @@ -14,4 +14,6 @@ public class SuperviseReportQueryParam extends BasePage{ private String id; private String deptId; + + private Integer type; } diff --git a/src/main/java/com/biutag/supervision/pojo/vo/DataPetition12337ExportVo.java b/src/main/java/com/biutag/supervision/pojo/vo/DataPetition12337ExportVo.java index 3ce1257..2bb10eb 100644 --- a/src/main/java/com/biutag/supervision/pojo/vo/DataPetition12337ExportVo.java +++ b/src/main/java/com/biutag/supervision/pojo/vo/DataPetition12337ExportVo.java @@ -372,7 +372,7 @@ public class DataPetition12337ExportVo implements Serializable { * 处分处理情况 */ @ExcelProperty("处分处理情况") - private String punishDes; + private String disciplinaryActionDesc; /** * 是否适用自查从宽政策 diff --git a/src/main/java/com/biutag/supervision/pojo/vo/SuperviseReportVo.java b/src/main/java/com/biutag/supervision/pojo/vo/SuperviseReportVo.java index f86f4d8..74b4f51 100644 --- a/src/main/java/com/biutag/supervision/pojo/vo/SuperviseReportVo.java +++ b/src/main/java/com/biutag/supervision/pojo/vo/SuperviseReportVo.java @@ -30,4 +30,11 @@ public class SuperviseReportVo { private int superviseNumber; //附件清单 private List files; + + private Integer type; + + private List departIds; + + private String departName; + } diff --git a/src/main/java/com/biutag/supervision/service/SuperviseReportDepartService.java b/src/main/java/com/biutag/supervision/service/SuperviseReportDepartService.java new file mode 100644 index 0000000..181bb59 --- /dev/null +++ b/src/main/java/com/biutag/supervision/service/SuperviseReportDepartService.java @@ -0,0 +1,11 @@ +package com.biutag.supervision.service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.biutag.supervision.pojo.entity.SuperviseReportDepart; +import com.biutag.supervision.mapper.SuperviseReportDepartMapper; +import org.springframework.stereotype.Service; + +@Service +public class SuperviseReportDepartService extends ServiceImpl { + +} diff --git a/src/main/java/com/biutag/supervision/service/SuperviseReportService.java b/src/main/java/com/biutag/supervision/service/SuperviseReportService.java index ff6513d..1c68220 100644 --- a/src/main/java/com/biutag/supervision/service/SuperviseReportService.java +++ b/src/main/java/com/biutag/supervision/service/SuperviseReportService.java @@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.biutag.supervision.common.UserContextHolder; import com.biutag.supervision.constants.AppConstants; import com.biutag.supervision.constants.enums.RoleCodeEnum; +import com.biutag.supervision.constants.enums.SuperviseReportTypeEnum; import com.biutag.supervision.mapper.SuperviseReportMapper; import com.biutag.supervision.pojo.entity.*; import com.biutag.supervision.pojo.model.UserAuth; @@ -21,11 +22,14 @@ import com.biutag.supervision.pojo.vo.SamplingVo; import com.biutag.supervision.pojo.vo.SuperviseReportVo; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.time.LocalDateTime; import java.util.ArrayList; import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; @RequiredArgsConstructor @Service @@ -36,6 +40,8 @@ public class SuperviseReportService extends ServiceImpl negativePage(SuperviseReportQueryParam param){ LambdaQueryWrapper queryWrapper=new LambdaQueryWrapper<>(); queryWrapper.eq(Negative::getReportId,param.getId()); @@ -81,9 +88,11 @@ public class SuperviseReportService extends ServiceImpl page = negativeService.page(Page.of(param.getCurrent(), param.getSize()), queryWrapper); return page; } + /** * 保存或修改 * */ + @Transactional(rollbackFor = Exception.class) public boolean addOrUpdate(SuperviseReportVo vo){ SuperviseReport report =new SuperviseReport(); BeanUtil.copyProperties(vo,report); @@ -97,14 +106,38 @@ public class SuperviseReportService extends ServiceImpl departs = departService.listByIds(vo.getDepartIds()); + String departNames = departs.stream().map(SupDepart::getShortName).collect(Collectors.joining("、")); + report.setDepartName(departNames); + } + } + if(saveOrUpdate(report) ){ + if (SuperviseReportTypeEnum.NOTICE.getValue().equals(vo.getType())) { + if (StrUtil.isNotBlank(vo.getId())) { + superviseReportDepartService.remove(new LambdaQueryWrapper().eq(SuperviseReportDepart::getSuperviseId, vo.getId())); + } + if (CollectionUtil.isNotEmpty(vo.getDepartIds())) { + List departs = departService.listByIds(vo.getDepartIds()); + List list = departs.stream().map(d -> { + SuperviseReportDepart reportDepart = new SuperviseReportDepart(); + reportDepart.setDepartId(d.getId()); + reportDepart.setDepartName(d.getShortName()); + reportDepart.setSuperviseId(vo.getId()); + return reportDepart; + }).toList(); + superviseReportDepartService.saveBatch(list); + } + } if( CollectionUtil.isNotEmpty(vo.getFiles())){ superviseReportFileService.remove(new LambdaQueryWrapper().eq(SuperviseReportFile::getSuperviseId,report.getId())); vo.getFiles().forEach(s->{ s.setSuperviseId(report.getId()); s.setCrtTime(LocalDateTime.now()); }); - return superviseReportFileService.saveOrUpdateBatch(vo.getFiles()); + return superviseReportFileService.saveOrUpdateBatch(vo.getFiles()); } return true; }else{ diff --git a/src/main/resources/mapper/DataPetition12337Mapper.xml b/src/main/resources/mapper/DataPetition12337Mapper.xml index 3292eb9..0ae3440 100644 --- a/src/main/resources/mapper/DataPetition12337Mapper.xml +++ b/src/main/resources/mapper/DataPetition12337Mapper.xml @@ -168,7 +168,7 @@