Browse Source

Merge remote-tracking branch 'origin/master'

main
sjh 1 year ago
parent
commit
f25b3bd141
  1. 2
      src/main/java/com/biutag/supervision/config/GlobalExceptionHandler.java
  2. 23
      src/main/java/com/biutag/supervision/constants/enums/InitialPetition.java
  3. 2
      src/main/java/com/biutag/supervision/controller/data/DataPetitionComplaintController.java
  4. 11
      src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelClueController.java
  5. 1
      src/main/java/com/biutag/supervision/mapper/ModelClueMapper.java
  6. 2
      src/main/java/com/biutag/supervision/pojo/dto/DataPetitionComplaintDto.java
  7. 13
      src/main/java/com/biutag/supervision/pojo/dto/DataPetitionComplaintImportDto.java
  8. 16
      src/main/java/com/biutag/supervision/pojo/dto/ModelClueDepartDto.java
  9. 20
      src/main/java/com/biutag/supervision/pojo/dto/NegativeDto.java
  10. 3
      src/main/java/com/biutag/supervision/pojo/model/ModelClueModel.java
  11. 16
      src/main/resources/mapper/ModelClueMapper.xml
  12. BIN
      src/main/resources/static/templates/信访投诉数据台账(模板).xlsx

2
src/main/java/com/biutag/supervision/config/GlobalExceptionHandler.java

@ -46,7 +46,7 @@ public class GlobalExceptionHandler {
@ExceptionHandler(MethodArgumentNotValidException.class)
@ResponseBody
public Result<Object> 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));
}

23
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;
}

2
src/main/java/com/biutag/supervision/controller/data/DataPetitionComplaintController.java

@ -49,11 +49,11 @@ public class DataPetitionComplaintController {
}
List<DataPetitionComplaintImportDto> list = new ArrayList<>();
ExcelReader excelReader = EasyExcel.read(file.getInputStream(), DataPetitionComplaintImportDto.class, new ReadListener<DataPetitionComplaintImportDto>() {
@Override
public void invoke(DataPetitionComplaintImportDto data, AnalysisContext analysisContext) {
list.add(data);
}
@Override
public void doAfterAllAnalysed(AnalysisContext analysisContext) {

11
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<Boolean> updateDepart(@PathVariable Integer id, @RequestBody ModelClueDepartDto departDto) {
LambdaUpdateWrapper<ModelClue> updateWrapper = new LambdaUpdateWrapper<ModelClue>()
.eq(ModelClue::getId, id)
.set(ModelClue::getInvolveDepartId, departDto.getDepartId());
return Result.success(modelClueService.update(updateWrapper));
}
}

1
src/main/java/com/biutag/supervision/mapper/ModelClueMapper.java

@ -11,7 +11,6 @@ import org.apache.ibatis.annotations.Select;
public interface ModelClueMapper extends BaseMapper<ModelClue> {
@Select("select *, m.model_name from model_clue mc left join model m on mc.model_id = m.id ${ew.getCustomSqlSegment}")
Page<ModelClueModel> queryPage(@Param("page") Page<ModelClue> page, @Param(Constants.WRAPPER) QueryWrapper<ModelClue> queryWrapper);
}

2
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;
}

13
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({"信访基本信息", "具体内容"})

16
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;
}

20
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<FileVo> 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;
// 最大签收时长(天)

3
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;
}

16
src/main/resources/mapper/ModelClueMapper.xml

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.biutag.supervision.mapper.ModelClueMapper">
<select id="queryPage" resultType="com.biutag.supervision.pojo.model.ModelClueModel">
select *, m.model_name, d1.short_name involve_parent_depart_name from model_clue mc
left join model m on mc.model_id = m.id
left join sup_depart d on mc.involve_depart_id = d.id
left join sup_depart d1 on d.pid = d1.id
${ew.getCustomSqlSegment}
</select>
</mapper>

BIN
src/main/resources/static/templates/信访投诉数据台账(模板).xlsx

Binary file not shown.
Loading…
Cancel
Save