Browse Source

fit: 核查办理新增信访相关字段。

fit: 测酒任务-发布任务-新增excel导入人员
master
wxc 7 months ago
parent
commit
fc68c2f4f8
  1. 9
      sql/20250513.sql
  2. 6
      src/main/java/com/biutag/supervision/controller/mobileSupervision/TaskProblemController.java
  3. 57
      src/main/java/com/biutag/supervision/controller/mobileSupervision/TestingAlcoholController.java
  4. 6
      src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java
  5. 5
      src/main/java/com/biutag/supervision/flow/action/SaveAction.java
  6. 8
      src/main/java/com/biutag/supervision/pojo/domain/NegativeVo.java
  7. 26
      src/main/java/com/biutag/supervision/pojo/dto/TestingAlcoholPeopleImportDto.java
  8. 14
      src/main/java/com/biutag/supervision/pojo/dto/flow/VerifyData.java
  9. 8
      src/main/java/com/biutag/supervision/pojo/entity/Negative.java
  10. 2
      src/main/java/com/biutag/supervision/pojo/param/TaskQueryParam.java
  11. 4
      src/main/java/com/biutag/supervision/pojo/param/TaskTestingAlcoholPeopleQueryParam.java
  12. 6
      src/main/java/com/biutag/supervision/service/RpcApplyService.java
  13. 6
      src/main/java/com/biutag/supervision/service/SupDepartService.java
  14. 1
      src/main/java/com/biutag/supervision/service/SupTaskService.java
  15. 4
      src/main/java/com/biutag/supervision/service/SupTaskTestingAlcoholPeopleService.java
  16. BIN
      src/main/resources/static/templates/测酒任务被测人员模板.xlsx

9
sql/20250513.sql

@ -0,0 +1,9 @@
ALTER TABLE `negative`.`negative`
ADD COLUMN `resolve_status` varchar(255) NULL COMMENT '当前状态(信访)' AFTER `resolve_situation`,
ADD COLUMN `visiting_leader_name` varchar(255) NULL COMMENT '接访领导姓名' AFTER `resolve_status`,
ADD COLUMN `visiting_leader_emp_no` int NULL COMMENT '接访领导警号' AFTER `visiting_leader_name`;
INSERT INTO `negative`.`sup_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (0, '信访中', '信访中', 'resolveStatus', '', '', '0', '0', '', '2025-05-13 16:22:32', '', '2025-05-13 16:22:32', '');
INSERT INTO `negative`.`sup_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (0, '终结后仍信访', '终结后仍信访', 'resolveStatus', '', '', '0', '0', '', '2025-05-13 16:22:38', '', '2025-05-13 16:22:38', '');
INSERT INTO `negative`.`sup_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (0, '停访息诉仍信访', '停访息诉仍信访', 'resolveStatus', '', '', '0', '0', '', '2025-05-13 16:22:46', '', '2025-05-13 16:22:46', '');
INSERT INTO `negative`.`sup_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (0, '已化解', '已化解', 'resolveStatus', '', '', '0', '0', '', '2025-05-13 16:22:53', '', '2025-05-13 16:22:53', '');

6
src/main/java/com/biutag/supervision/controller/mobileSupervision/TaskProblemController.java

@ -10,6 +10,7 @@ import com.biutag.supervision.pojo.param.TaskProblemQueryParam;
import com.biutag.supervision.service.SupTaskProblemService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@ -37,4 +38,9 @@ public class TaskProblemController {
return Result.success(page);
}
@GetMapping("{id}")
public Result<SupTaskProblem> get(@PathVariable Integer id) {
return Result.success(taskProblemService.getById(id));
}
}

57
src/main/java/com/biutag/supervision/controller/mobileSupervision/TestingAlcoholController.java

@ -1,14 +1,20 @@
package com.biutag.supervision.controller.mobileSupervision;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelReader;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;
import com.alibaba.excel.read.metadata.ReadSheet;
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.constants.enums.TaskStatusEnum;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.dto.TaskTestingAlcoholDto;
import com.biutag.supervision.pojo.dto.TaskTestingAlcoholPeopleDto;
import com.biutag.supervision.pojo.dto.TestingAlcoholFilter;
import com.biutag.supervision.pojo.dto.*;
import com.biutag.supervision.pojo.entity.SupDepart;
import com.biutag.supervision.pojo.entity.SupPolice;
import com.biutag.supervision.pojo.entity.SupTask;
import com.biutag.supervision.pojo.entity.SupTaskTestingAlcoholPeople;
@ -19,14 +25,20 @@ import com.biutag.supervision.pojo.vo.TaskTestingAlcoholPeopleVo;
import com.biutag.supervision.pojo.vo.TaskTestingAlcoholVo;
import com.biutag.supervision.service.*;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/**
* @author wxc
* @date 2025/3/31
*/
@Slf4j
@RequiredArgsConstructor
@RestController
@RequestMapping("task/testingAlcohol")
@ -87,6 +99,45 @@ public class TestingAlcoholController {
return Result.success(taskTestingAlcoholService.save(dto));
}
@PostMapping("importPeople")
public Result<List<SupTaskTestingAlcoholPeople>> importPeople(@RequestPart("file") MultipartFile file) throws IOException {
log.info("文件导入中------------------------------");
String fileNameType = FileUtil.extName(file.getOriginalFilename());
if (!"xls".equals(fileNameType) && !"xlsx".equals(fileNameType)) {
throw new RuntimeException("仅支持 xls/xlsx 格式文件的导入");
}
List<SupTaskTestingAlcoholPeople> list = new ArrayList<>();
ExcelReader excelReader = EasyExcel.read(file.getInputStream(), TestingAlcoholPeopleImportDto.class, new ReadListener<TestingAlcoholPeopleImportDto>() {
@Override
public void invoke(TestingAlcoholPeopleImportDto data, AnalysisContext analysisContext) {
if (StrUtil.isBlank(data.getEmpNo()) && StrUtil.isBlank(data.getIdCode())) {
throw new RuntimeException(String.format("%s 警号和身份证都为空,请确保警号、身份证其中一项不为空", data.getName()));
}
SupPolice police;
if (StrUtil.isNotBlank(data.getIdCode())) {
police = policeService.getByIdCode(data.getIdCode());
} else {
police = policeService.getByEmpNo(data.getEmpNo());
}
if (Objects.isNull(police)) {
throw new RuntimeException(String.format("%s 系统未找到该警员数据,请删除后重试", data.getName()));
}
SupTaskTestingAlcoholPeople people = new SupTaskTestingAlcoholPeople();
people.setName(police.getName());
people.setEmpNo(police.getEmpNo());
people.setIdCode(police.getIdCode());
people.setDepartId(police.getOrgId());
list.add(people);
}
@Override
public void doAfterAllAnalysed(AnalysisContext analysisContext) {
}
}).build();
ReadSheet sheet = EasyExcel.readSheet(0).build();
excelReader.read(sheet);
excelReader.close();
return Result.success(list);
}
}

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

@ -88,7 +88,11 @@ public class ApplyCompletionAction implements Action {
.set(Negative::getRectifyDesc, verifyData.getRectifyDesc())
.set(Negative::getInvolveDepartId, verifyData.getInvolveDepartId())
.set(Negative::getUnrectifyReason, verifyData.getUnrectifyReason())
.set(Negative::getInvolveDepartName, departService.getById(verifyData.getInvolveDepartId()).getShortName());
.set(Negative::getInvolveDepartName, departService.getById(verifyData.getInvolveDepartId()).getShortName())
.set(Negative::getResolveSituation, verifyData.getResolveSituation())
.set(Negative::getResolveStatus, verifyData.getResolveStatus())
.set(Negative::getVisitingLeaderName, verifyData.getVisitingLeaderName())
.set(Negative::getVisitingLeaderEmpNo, verifyData.getVisitingLeaderEmpNo());
// 经办人
if (CollectionUtil.isNotEmpty(verifyData.getHandlePolices().stream().filter(item -> StrUtil.isNotBlank(item.getName())).toList())) {
updateWrapper.set(Negative::getHandlePolices, JSON.toJSONString(verifyData.getHandlePolices()));

5
src/main/java/com/biutag/supervision/flow/action/SaveAction.java

@ -60,7 +60,10 @@ public class SaveAction implements Action {
.set(Negative::getRectifyDesc, verifyData.getRectifyDesc())
.set(Negative::getUnrectifyReason, verifyData.getUnrectifyReason())
.set(Negative::getCheckStatusName, verifyData.getCheckStatusName())
.set(Negative::getResolveSituation, verifyData.getResolveSituation());
.set(Negative::getResolveSituation, verifyData.getResolveSituation())
.set(Negative::getResolveStatus, verifyData.getResolveStatus())
.set(Negative::getVisitingLeaderName, verifyData.getVisitingLeaderName())
.set(Negative::getVisitingLeaderEmpNo, verifyData.getVisitingLeaderEmpNo());
// 经办人
if (CollectionUtil.isNotEmpty(verifyData.getHandlePolices().stream().filter(item -> StrUtil.isNotBlank(item.getName())).toList())) {
updateWrapper.set(Negative::getHandlePolices, JSON.toJSONString(verifyData.getHandlePolices()));

8
src/main/java/com/biutag/supervision/pojo/domain/NegativeVo.java

@ -212,6 +212,14 @@ public class NegativeVo {
// 化解情况
private String resolveSituation;
// 当前状态
private String resolveStatus;
// 接访领导
private String visitingLeaderName;
private String visitingLeaderEmpNo;
// 下发选择的问题类型
private List<VerifyData.Problem> problems = new ArrayList<>();

26
src/main/java/com/biutag/supervision/pojo/dto/TestingAlcoholPeopleImportDto.java

@ -0,0 +1,26 @@
package com.biutag.supervision.pojo.dto;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Getter;
import lombok.Setter;
/**
* @author wxc
* @date 2025/5/14
*/
@Setter
@Getter
public class TestingAlcoholPeopleImportDto {
@ExcelProperty("姓名")
private String name;
// 警号
@ExcelProperty("警号")
private String empNo;
// 身份证
@ExcelProperty("身份证")
private String idCode;
}

14
src/main/java/com/biutag/supervision/pojo/dto/flow/VerifyData.java

@ -54,9 +54,6 @@ public class VerifyData {
// 未整改原因
private String unrectifyReason;
// 化解情况
private String resolveSituation;
// 核查时间
private LocalDateTime verificationTime;
@ -70,6 +67,17 @@ public class VerifyData {
// 经办人
private List<HandlePolice> handlePolices;
// 化解情况
private String resolveSituation;
// 当前状态
private String resolveStatus;
// 接访领导
private String visitingLeaderName;
private String visitingLeaderEmpNo;
@Setter
@Getter
public static class Blame {

8
src/main/java/com/biutag/supervision/pojo/entity/Negative.java

@ -314,4 +314,12 @@ public class Negative {
// 化解情况
private String resolveSituation;
// 当前状态
private String resolveStatus;
// 接访领导
private String visitingLeaderName;
private String visitingLeaderEmpNo;
}

2
src/main/java/com/biutag/supervision/pojo/param/TaskQueryParam.java

@ -15,4 +15,6 @@ public class TaskQueryParam extends BasePage {
private String taskName;
private String taskType;
}

4
src/main/java/com/biutag/supervision/pojo/param/TaskTestingAlcoholPeopleQueryParam.java

@ -23,4 +23,8 @@ public class TaskTestingAlcoholPeopleQueryParam extends BasePage {
// 饮酒结果
private String drinkResult;
private String position;
private String queryTxt;
}

6
src/main/java/com/biutag/supervision/service/RpcApplyService.java

@ -32,6 +32,7 @@ import java.time.ZoneId;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
@RequiredArgsConstructor
@ -48,6 +49,7 @@ public class RpcApplyService extends ServiceImpl<RpcApplyMapper, RpcApply> {
private final SupDepartService departService;
public Page<RpcApplyVo> page(RpcApplyQueryParam queryParam, String type) {
UserAuth user = UserContextHolder.getCurrentUser();
QueryWrapper<RpcApply> queryWrapper = new QueryWrapper<>();
@ -58,7 +60,9 @@ public class RpcApplyService extends ServiceImpl<RpcApplyMapper, RpcApply> {
}
// 是否是市局维权专干
if (rightPeoples.stream().noneMatch(item -> "1".equals(item.getCouncil()))) {
queryWrapper.in("a.handle_depart_id", rightPeoples.stream().map(RpcRightPerson::getDepartId).collect(Collectors.toSet()));
Set<String> departIds = rightPeoples.stream().map(RpcRightPerson::getDepartId).collect(Collectors.toSet());
List<String> childrenIds = departService.getAllNodeIds(departIds);
queryWrapper.in("a.handle_depart_id", childrenIds);
}
}
queryWrapper.like(StrUtil.isNotBlank(queryParam.getApplicantEmpName()), "a.applicant_emp_name", queryParam.getApplicantEmpName())

6
src/main/java/com/biutag/supervision/service/SupDepartService.java

@ -50,18 +50,18 @@ public class SupDepartService extends ServiceImpl<SupDepartMapper, SupDepart> {
return getAllNodeIds(List.of(departId));
}
public List<String> getAllNodeIds(List<String> departIds) {
public List<String> getAllNodeIds(Collection<String> departIds) {
return getAllNode(departIds).stream().map(DepartTree::getId).toList();
}
public List<DepartTree> getAllNode(List<String> departIds) {
public List<DepartTree> getAllNode(Collection<String> departIds) {
List<DepartTree> treeList = buildTreeAll();
List<DepartTree> nodes = new ArrayList<>();
getAllNodeRecursive(departIds, treeList, nodes);
return nodes;
}
public void getAllNodeRecursive(List<String> departIds, List<DepartTree> treeList, List<DepartTree> nodes) {
public void getAllNodeRecursive(Collection<String> departIds, List<DepartTree> treeList, List<DepartTree> nodes) {
treeList.forEach(item -> {
if (departIds.contains(item.getId())) {
getAllNodeRecursive(item, nodes);

1
src/main/java/com/biutag/supervision/service/SupTaskService.java

@ -28,6 +28,7 @@ public class SupTaskService extends ServiceImpl<SupTaskMapper, SupTask> {
})
.eq("t.task_status", queryParam.getTaskStatus())
.like(StrUtil.isNotBlank(queryParam.getTaskName()), "t.task_name", queryParam.getTaskName())
.eq(StrUtil.isNotBlank(queryParam.getTaskType()),"t.task_type", queryParam.getTaskType())
.orderByDesc("t.create_time");
return baseMapper.queryTask(Page.of(queryParam.getCurrent(), queryParam.getSize()), queryWrapper);
}

4
src/main/java/com/biutag/supervision/service/SupTaskTestingAlcoholPeopleService.java

@ -26,6 +26,10 @@ public class SupTaskTestingAlcoholPeopleService extends ServiceImpl<SupTaskTesti
.like(StrUtil.isNotBlank(queryParam.getEmpNo()), "peo.emp_no", queryParam.getEmpNo())
.eq(StrUtil.isNotBlank(queryParam.getTestingResult()), "peo.testing_result", queryParam.getTestingResult())
.eq(StrUtil.isNotBlank(queryParam.getDrinkResult()), "peo.drink_result", queryParam.getDrinkResult())
.eq(StrUtil.isNotBlank(queryParam.getPosition()), "p.position", queryParam.getPosition())
.and(StrUtil.isNotBlank(queryParam.getQueryTxt()), q -> {
q.like("peo.name", queryParam.getQueryTxt()).or().like("peo.emp_no", queryParam.getQueryTxt());
})
.orderByAsc("peo.testing_result");
Page<TaskTestingAlcoholPeopleVo> page = baseMapper.queryPage(Page.of(queryParam.getCurrent(), queryParam.getSize()), queryWrapper);
page.getRecords().forEach(item -> {

BIN
src/main/resources/static/templates/测酒任务被测人员模板.xlsx

Binary file not shown.
Loading…
Cancel
Save