diff --git a/src/main/java/com/biutag/supervision/config/GlobalExceptionHandler.java b/src/main/java/com/biutag/supervision/config/GlobalExceptionHandler.java index 80a63e5..d83bb84 100644 --- a/src/main/java/com/biutag/supervision/config/GlobalExceptionHandler.java +++ b/src/main/java/com/biutag/supervision/config/GlobalExceptionHandler.java @@ -46,7 +46,7 @@ public class GlobalExceptionHandler { @ExceptionHandler(MethodArgumentNotValidException.class) @ResponseBody public Result handleMethodArgumentNotValidException(MethodArgumentNotValidException e) { - String message = e.getBindingResult().getFieldErrors().stream().map(item -> item.getField() + " : " + item.getDefaultMessage()).collect(Collectors.joining("; ")); + String message = e.getBindingResult().getFieldErrors().stream().map(item -> "不能为空".equals(item.getDefaultMessage()) ? item.getField() + "-" + item.getDefaultMessage() : item.getDefaultMessage()).collect(Collectors.joining("; ")); log.error("参数错误: {}", message, e); return Result.failed(HttpStatus.BAD_REQUEST.value(), String.format("参数错误:%s", message)); } diff --git a/src/main/java/com/biutag/supervision/constants/enums/InitialPetition.java b/src/main/java/com/biutag/supervision/constants/enums/InitialPetition.java new file mode 100644 index 0000000..e958976 --- /dev/null +++ b/src/main/java/com/biutag/supervision/constants/enums/InitialPetition.java @@ -0,0 +1,23 @@ +package com.biutag.supervision.constants.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * + * @author wxc + * @date 2024/10/22 + */ +@Getter +@AllArgsConstructor +public enum InitialPetition { + + THE_FIRST("1", "初访"), + + REPEAT("2", "重访"); + + private String value; + + public String label; + +} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/controller/data/DataPetitionComplaintController.java b/src/main/java/com/biutag/supervision/controller/data/DataPetitionComplaintController.java index db27e95..10e1848 100644 --- a/src/main/java/com/biutag/supervision/controller/data/DataPetitionComplaintController.java +++ b/src/main/java/com/biutag/supervision/controller/data/DataPetitionComplaintController.java @@ -49,11 +49,11 @@ public class DataPetitionComplaintController { } List list = new ArrayList<>(); ExcelReader excelReader = EasyExcel.read(file.getInputStream(), DataPetitionComplaintImportDto.class, new ReadListener() { + @Override public void invoke(DataPetitionComplaintImportDto data, AnalysisContext analysisContext) { list.add(data); } - @Override public void doAfterAllAnalysed(AnalysisContext analysisContext) { diff --git a/src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelClueController.java b/src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelClueController.java index 642e378..70c2e13 100644 --- a/src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelClueController.java +++ b/src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelClueController.java @@ -1,7 +1,10 @@ package com.biutag.supervision.controller.sensitivePerception; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.biutag.supervision.pojo.Result; +import com.biutag.supervision.pojo.dto.ModelClueDepartDto; import com.biutag.supervision.pojo.dto.ModelClueTaskDistribute; import com.biutag.supervision.pojo.entity.ModelClue; import com.biutag.supervision.pojo.model.ModelClueModel; @@ -45,4 +48,12 @@ public class ModelClueController { return Result.success(modelClueService.distribution(taskDistribute)); } + @PostMapping("{id}/updateDepart") + public Result updateDepart(@PathVariable Integer id, @RequestBody ModelClueDepartDto departDto) { + LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper() + .eq(ModelClue::getId, id) + .set(ModelClue::getInvolveDepartId, departDto.getDepartId()); + return Result.success(modelClueService.update(updateWrapper)); + } + } diff --git a/src/main/java/com/biutag/supervision/mapper/ModelClueMapper.java b/src/main/java/com/biutag/supervision/mapper/ModelClueMapper.java index 8d21267..1572155 100644 --- a/src/main/java/com/biutag/supervision/mapper/ModelClueMapper.java +++ b/src/main/java/com/biutag/supervision/mapper/ModelClueMapper.java @@ -11,7 +11,6 @@ import org.apache.ibatis.annotations.Select; public interface ModelClueMapper extends BaseMapper { - @Select("select *, m.model_name from model_clue mc left join model m on mc.model_id = m.id ${ew.getCustomSqlSegment}") Page queryPage(@Param("page") Page page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper); } \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/pojo/dto/DataPetitionComplaintDto.java b/src/main/java/com/biutag/supervision/pojo/dto/DataPetitionComplaintDto.java index cf532a7..00f23e6 100644 --- a/src/main/java/com/biutag/supervision/pojo/dto/DataPetitionComplaintDto.java +++ b/src/main/java/com/biutag/supervision/pojo/dto/DataPetitionComplaintDto.java @@ -45,7 +45,6 @@ public class DataPetitionComplaintDto { private String responderPhone; // 初重信访 - @Schema(description = "初重信访") @NotBlank private String initialPetition; @@ -91,4 +90,5 @@ public class DataPetitionComplaintDto { @Schema(description = "办结状态") private String completedState; + } \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/pojo/dto/DataPetitionComplaintImportDto.java b/src/main/java/com/biutag/supervision/pojo/dto/DataPetitionComplaintImportDto.java index dae55ff..e2aaf2b 100644 --- a/src/main/java/com/biutag/supervision/pojo/dto/DataPetitionComplaintImportDto.java +++ b/src/main/java/com/biutag/supervision/pojo/dto/DataPetitionComplaintImportDto.java @@ -13,14 +13,14 @@ import java.time.LocalDateTime; @Getter public class DataPetitionComplaintImportDto { - // 信件编号 - @ExcelProperty({"信访基本信息", "信件编号"}) - private String originId; - // 投诉渠道 @ExcelProperty({"信访基本信息", "投诉渠道"}) private String channelForFilingComplaints; + // 信件编号 + @ExcelProperty({"信访基本信息", "信件编号"}) + private String originId; + // 受理层级 @ExcelProperty({"信访基本信息", "受理层级"}) private String acceptanceLevel; @@ -52,7 +52,10 @@ public class DataPetitionComplaintImportDto { // 被投诉机构 @ExcelProperty({"信访基本信息", "被投诉机构"}) - private String complainedDepartName; + private String complainedSecondDepartName; + + @ExcelProperty({"信访基本信息", "被投诉机构"}) + private String complainedThirdDepartName; // 具体内容 @ExcelProperty({"信访基本信息", "具体内容"}) diff --git a/src/main/java/com/biutag/supervision/pojo/dto/ModelClueDepartDto.java b/src/main/java/com/biutag/supervision/pojo/dto/ModelClueDepartDto.java new file mode 100644 index 0000000..774541b --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/dto/ModelClueDepartDto.java @@ -0,0 +1,16 @@ +package com.biutag.supervision.pojo.dto; + +import lombok.Getter; +import lombok.Setter; + +/** + * @author wxc + * @date 2024/10/22 + */ +@Setter +@Getter +public class ModelClueDepartDto { + + private String departId; + +} diff --git a/src/main/java/com/biutag/supervision/pojo/dto/NegativeDto.java b/src/main/java/com/biutag/supervision/pojo/dto/NegativeDto.java index 0a46704..a79f4a7 100644 --- a/src/main/java/com/biutag/supervision/pojo/dto/NegativeDto.java +++ b/src/main/java/com/biutag/supervision/pojo/dto/NegativeDto.java @@ -27,19 +27,19 @@ public class NegativeDto { private LocalDateTime discoveryTime; // 问题来源 - @NotBlank + @NotBlank(message = "问题来源不能为空") private String problemSourcesCode; // 问题来源 - @NotBlank + @NotBlank(message = "问题来源不能为空") private String problemSources; // 业务类别 - @NotBlank + @NotBlank(message = "业务类别不能为空") private String businessTypeCode; // 业务类别名称 - @NotBlank + @NotBlank(message = "业务类别不能为空") private String businessTypeName; private String policeTypeName; @@ -57,7 +57,7 @@ public class NegativeDto { private String contactPhone; // 简要描述 - @NotBlank + @NotBlank(message = "简要描述不能为空") private String thingDesc; private List thingFiles = new ArrayList<>(); @@ -67,21 +67,21 @@ public class NegativeDto { // 涉及单位 private String involveDepartId; - @NotBlank + @NotBlank(message = "主办层级不能为空") private String hostLevel; // 办理时限 - @NotBlank + @NotBlank(message = "办理时限不能为空") private String timeLimit; // 审批流程 - @NotBlank + @NotBlank(message = "审批流程不能为空") private String approvalFlow; - @NotBlank + @NotBlank(message = "指定具体办理单位不能为空") private String departId; - @NotBlank + @NotBlank(message = "指定具体办理单位不能为空") private String departName; // 最大签收时长(天) diff --git a/src/main/java/com/biutag/supervision/pojo/model/ModelClueModel.java b/src/main/java/com/biutag/supervision/pojo/model/ModelClueModel.java index a5fcbc0..4877610 100644 --- a/src/main/java/com/biutag/supervision/pojo/model/ModelClueModel.java +++ b/src/main/java/com/biutag/supervision/pojo/model/ModelClueModel.java @@ -25,6 +25,8 @@ public class ModelClueModel { // 涉及单位 private String involveDepartName; + private String involveParentDepartName; + // 涉及人员 private String involvePoliceName; @@ -43,5 +45,4 @@ public class ModelClueModel { private String data; - } diff --git a/src/main/resources/mapper/ModelClueMapper.xml b/src/main/resources/mapper/ModelClueMapper.xml new file mode 100644 index 0000000..b1fa0fd --- /dev/null +++ b/src/main/resources/mapper/ModelClueMapper.xml @@ -0,0 +1,16 @@ + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/static/templates/信访投诉数据台账(模板).xlsx b/src/main/resources/static/templates/信访投诉数据台账(模板).xlsx index 56261ee..a92c687 100644 Binary files a/src/main/resources/static/templates/信访投诉数据台账(模板).xlsx and b/src/main/resources/static/templates/信访投诉数据台账(模板).xlsx differ