Browse Source

20250113

main
wxc 11 months ago
parent
commit
b49e7c8d19
  1. 3
      src/main/java/com/biutag/supervision/config/InterceptorConfig.java
  2. 167
      src/main/java/com/biutag/supervision/controller/CommonController.java
  3. 62
      src/main/java/com/biutag/supervision/controller/api/plugin/CaseVerifController.java
  4. 32
      src/main/java/com/biutag/supervision/controller/books/NegativeBookController.java
  5. 39
      src/main/java/com/biutag/supervision/controller/data/VideoInspectionController.java
  6. 3
      src/main/java/com/biutag/supervision/controller/system/DepartMapingController.java
  7. 15
      src/main/java/com/biutag/supervision/controller/work/NegativeController.java
  8. 4
      src/main/java/com/biutag/supervision/flow/action/FirstDistributeAction.java
  9. 115
      src/main/java/com/biutag/supervision/job/Job.java
  10. 1
      src/main/java/com/biutag/supervision/pojo/dto/flow/FirstDistributeData.java
  11. 8
      src/main/java/com/biutag/supervision/pojo/dto/jwdc/AlarmInfoDto.java
  12. 4
      src/main/java/com/biutag/supervision/pojo/dto/jwdc/AlarmYjzjDto.java
  13. 8
      src/main/java/com/biutag/supervision/pojo/entity/DataAlarmAlarmInfo.java
  14. 6
      src/main/java/com/biutag/supervision/pojo/entity/DataAlarmYjzj.java
  15. 2
      src/main/java/com/biutag/supervision/pojo/entity/DataCaseVerif.java
  16. 4
      src/main/java/com/biutag/supervision/pojo/param/DepartMapingQueryParam.java
  17. 83
      src/main/java/com/biutag/supervision/pojo/vo/DataCaseVerifVo.java
  18. 25
      src/main/java/com/biutag/supervision/pojo/vo/ExportNegativeVo.java
  19. 1
      src/main/java/com/biutag/supervision/pojo/vo/NegativeQueryVo.java
  20. 30
      src/main/java/com/biutag/supervision/pojo/vo/VideoInspectionInfo.java
  21. 2
      src/main/java/com/biutag/supervision/pojo/vo/VideoInspectionVo.java
  22. 19
      src/main/java/com/biutag/supervision/service/DataCaseVerifService.java
  23. 1
      src/main/java/com/biutag/supervision/service/FileService.java
  24. 8
      src/main/java/com/biutag/supervision/service/NegativeService.java
  25. 64
      src/main/java/com/biutag/supervision/service/NegativeTaskService.java
  26. 9
      src/main/resources/application-local.yml
  27. 6
      src/main/resources/application-prod.yml
  28. 4
      src/main/resources/application.yml
  29. 5
      src/main/resources/mapper/DataAlarmDispositionInfoMapper.xml
  30. 22
      src/test/java/com/biutag/supervision/StrUtil.java
  31. 15
      src/test/java/com/biutag/supervision/SupervisionApplicationTests.java
  32. 2
      src/test/java/com/biutag/supervision/tools/GenCodeTests.java

3
src/main/java/com/biutag/supervision/config/InterceptorConfig.java

@ -40,8 +40,9 @@ public class InterceptorConfig implements WebMvcConfigurer {
.excludePathPatterns("/file/stream/**", "/templates/**")
.excludePathPatterns("/datav/risk/**")
.excludePathPatterns("/score/**")
.excludePathPatterns("/common/**")
// excel导出
.excludePathPatterns("/data/petitionComplaint12337/export/result", "/negative/books/export/xf/**")
.excludePathPatterns("/data/petitionComplaint12337/export/result", "/negative/books/export/**")
.excludePathPatterns(List.of("/doc.html", "/webjars/**", "/favicon.ico", "/v3/api-docs/**"));
registry.addInterceptor(new ApiInterceptor())
.addPathPatterns("/api/jwdc/**");

167
src/main/java/com/biutag/supervision/controller/CommonController.java

@ -0,0 +1,167 @@
package com.biutag.supervision.controller;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpResponse;
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.biutag.supervision.constants.enums.BusinessTypeEnum;
import com.biutag.supervision.constants.enums.InspectCaseEnum;
import com.biutag.supervision.constants.enums.ProblemSourcesEnum;
import com.biutag.supervision.constants.enums.ProcessingStatusEnum;
import com.biutag.supervision.mapper.MailMapper;
import com.biutag.supervision.pojo.entity.*;
import com.biutag.supervision.pojo.entity.mailbox.Mail;
import com.biutag.supervision.service.*;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.io.InputStream;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Objects;
/**
* @author wxc
* @date 2025/1/13
*/
@RequestMapping("common")
@Slf4j
@RequiredArgsConstructor
@RestController
public class CommonController {
@Value("${mailbox.url}")
private String mailboxUrl;
private final FileService fileService;
private final NegativeThingFileService thingFileService;
private final NegativeFileService negativeThingFile;
private final SupPoliceService supPoliceService;
private final NegativeBlameService blameService;
private final MailMapper mailMapper;
private final NegativeService negativeService;
@RequestMapping("mailbox")
public void mailbox() {
List<Mail> mailList = mailMapper.selectList(new LambdaUpdateWrapper<Mail>().eq(Mail::getMailState, "completion")
.in(Mail::getVerifyIsTrue, List.of("属实", "基本属实")));
for (Mail item : mailList) {
// 判断是否存在
if (negativeService.exists(new LambdaUpdateWrapper<Negative>().eq(Negative::getOriginId, item.getId()).eq(Negative::getProblemSourcesCode, ProblemSourcesEnum.JZXX.getValue()))) {
log.info("信件 {} 已存在", item.getId());
continue;
}
Negative negative = new Negative();
negative.setId(IdUtil.getSnowflakeNextIdStr());
negative.setOriginId(item.getId());
negative.setDiscoveryTime(item.getCreateTime());
negative.setResponderName(item.getContactName());
negative.setContactPhone(item.getContactPhone());
negative.setThingDesc(item.getContent());
// 问题涉及单位
// negative.setInvolveDepartName();
negative.setProblemSources(ProblemSourcesEnum.JZXX.getLabel());
negative.setProblemSourcesCode(ProblemSourcesEnum.JZXX.getValue());
negative.setBusinessTypeCode(BusinessTypeEnum.QT.getValue());
negative.setBusinessTypeName(BusinessTypeEnum.QT.getLabel());
if ("属实".equals(item.getVerifyIsTrue())) {
negative.setCheckStatus(InspectCaseEnum.TRUE.getValue());
negative.setCheckStatusName(InspectCaseEnum.TRUE.getLabel());
}
if ("基本属实".equals(item.getVerifyIsTrue())) {
negative.setCheckStatus(InspectCaseEnum.PARTIALLY_TRUE.getValue());
negative.setCheckStatusName(InspectCaseEnum.PARTIALLY_TRUE.getLabel());
}
// 核办情况
negative.setCheckStatusDesc(item.getVerifyDetails());
negative.setProcessingStatus(ProcessingStatusEnum.completed.name());
negative.setCrtTime(LocalDateTime.now());
negativeService.save(negative);
// 被举报人
if (StrUtil.isNotBlank(item.getVerifyReportedPolices())) {
JSONArray jsonArray = JSON.parseArray(item.getVerifyReportedPolices());
if (!jsonArray.isEmpty()) {
for (int i = 0; i < jsonArray.size(); i++) {
// [{"deptId":310,"empNo":"A00002","gender":null,"birthday":null,"name":"李四","mobile":null}]
JSONObject jsonObject = jsonArray.getJSONObject(i);
String empNo = jsonObject.getString("empNo");
String name = jsonObject.getString("name");
SupPolice police = supPoliceService.getOne(new LambdaUpdateWrapper<SupPolice>().eq(SupPolice::getEmpNo, empNo).eq(SupPolice::getName, name));
if (Objects.isNull(police)) {
log.error("没有该警员的数据! {}-{}", name, empNo);
continue;
}
NegativeBlame negativeBlame = new NegativeBlame();
negativeBlame
.setBlameId(IdUtil.getSnowflakeNextIdStr())
.setNegativeId(negative.getId())
.setType("personal")
.setBlameEmpNo(empNo)
.setBlameIdCode(police.getIdCode())
.setBlameName(name)
.setUpdTime(LocalDateTime.now())
.setCrtTime(LocalDateTime.now());
blameService.save(negativeBlame);
}
}
}
// [{"filepath":"250102/_B5HQNhI.doc","orgiinFilename":"3、定级报告 .doc","type":"application/msword","size":95744,"docxFilepath":"250102/l-Tl5dux.docx"}]
if (StrUtil.isNotBlank(item.getAttachments())) {
JSONArray jsonArray = JSON.parseArray(item.getAttachments());
if (!jsonArray.isEmpty()) {
for (int i = 0; i < jsonArray.size(); i++) {
JSONObject jsonObject = jsonArray.getJSONObject(i);
HttpResponse httpResponse = HttpUtil.createGet(mailboxUrl + "api/file/steam/" + jsonObject.getString("filepath")).execute();
InputStream is = httpResponse.bodyStream();
String fileName = jsonObject.getString("orgiinFilename");
String filePath = fileService.upload(is, 0L, FileUtil.extName(fileName));
NegativeThingFile negativeThingFile = new NegativeThingFile();
negativeThingFile.setFileName(fileName);
negativeThingFile.setFilePath(filePath);
negativeThingFile.setCreateTime(LocalDateTime.now());
negativeThingFile.setNegativeId(negative.getId());
thingFileService.save(negativeThingFile);
}
}
}
if (StrUtil.isNotBlank(item.getVerifyAttachments())) {
JSONArray jsonArray = JSON.parseArray(item.getVerifyAttachments());
if (!jsonArray.isEmpty()) {
for (int i = 0; i < jsonArray.size(); i++) {
JSONObject jsonObject = jsonArray.getJSONObject(i);
HttpResponse httpResponse = HttpUtil.createGet(mailboxUrl + "api/file/steam/" + jsonObject.getString("filepath")).execute();
InputStream is = httpResponse.bodyStream();
String fileName = jsonObject.getString("orgiinFilename");
String filePath = fileService.upload(is, 0L, FileUtil.extName(fileName));
NegativeFile file = new NegativeFile();
file.setFileName(fileName);
file.setFilePath(filePath);
file.setCrtTime(LocalDateTime.now());
file.setNegtiveId(negative.getId());
negativeThingFile.save(file);
}
}
}
}
}
}

62
src/main/java/com/biutag/supervision/controller/api/plugin/CaseVerifController.java

@ -1,27 +1,28 @@
package com.biutag.supervision.controller.api.plugin;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpResponse;
import cn.hutool.http.HttpUtil;
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.common.UserContextHolder;
import com.biutag.supervision.constants.enums.CaseVerifSource;
import com.biutag.supervision.constants.enums.DistributionStateEnum;
import com.biutag.supervision.constants.enums.InspectCaseEnum;
import com.biutag.supervision.constants.enums.*;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.dto.plugin.*;
import com.biutag.supervision.pojo.entity.DataCaseVerif;
import com.biutag.supervision.pojo.entity.DataCaseVerifExt;
import com.biutag.supervision.pojo.entity.DataCaseVerifExtFile;
import com.biutag.supervision.service.DataCaseVerifExtFileService;
import com.biutag.supervision.service.DataCaseVerifExtService;
import com.biutag.supervision.service.DataCaseVerifService;
import com.biutag.supervision.service.FileService;
import com.biutag.supervision.pojo.entity.Negative;
import com.biutag.supervision.service.*;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -47,6 +48,8 @@ public class CaseVerifController {
private final DataCaseVerifExtFileService dataCaseVerifExtFileService;
private final NegativeService negativeService;
@Operation(summary = "推送案件核查数据")
@PostMapping
public Result<Boolean> add(@RequestBody @Validated CaseVerifPluginDto body) {
@ -82,6 +85,7 @@ public class CaseVerifController {
@Operation(summary = "处置意见上传")
@PostMapping("disposalOpinion")
@Transactional(rollbackFor = Exception.class)
public Result<Boolean> disposalOpinion(@RequestBody CaseVerifDisposalOpinion body) {
DataCaseVerifExt dataCaseVerifExt = new DataCaseVerifExt();
dataCaseVerifExt.setOuterId(body.getOuterId());
@ -100,7 +104,36 @@ public class CaseVerifController {
// 处置意见
dataCaseVerifExt.setCheckStatusDesc(body.getHandlingSuggestions());
dataCaseVerifExt.setCreateTime(LocalDateTime.now());
DataCaseVerifExt obj = dataCaseVerifExtService.getById(body.getOuterId());
if (obj != null) {
BeanUtil.copyProperties(dataCaseVerifExt, obj, CopyOptions.create().setIgnoreNullValue(true));
dataCaseVerifExt = obj;
}
dataCaseVerifExtService.saveOrUpdate(dataCaseVerifExt);
if (InspectCaseEnum.TRUE.getValue().equals(dataCaseVerifExt.getCheckStatus()) || InspectCaseEnum.PARTIALLY_TRUE.getValue().equals(dataCaseVerifExt.getCheckStatus())) {
DataCaseVerif dataCaseVerif = dataCaseVerifService.getOne(new LambdaUpdateWrapper<DataCaseVerif>().eq(DataCaseVerif::getOuterId, body.getOuterId()));
Negative negative = new Negative();
negative.setId(IdUtil.getSnowflakeNextIdStr()) // negative唯一标识 雪花
.setProcessingStatus(ProcessingStatusEnum.processing.name())
.setCrtTime(LocalDateTime.now())
.setUpdTime(LocalDateTime.now())
.setOriginId(dataCaseVerif.getOriginId())
.setCaseNumber(dataCaseVerif.getOriginId())
.setThingDesc(dataCaseVerif.getThingDesc())
.setResponderName(dataCaseVerif.getResponderName())
.setContactPhone(dataCaseVerif.getResponderPhone())
.setDiscoveryTime(dataCaseVerif.getDiscoveryTime())
// 问题来源
.setProblemSourcesCode(ProblemSourcesEnum.A12389.getValue())
.setProblemSources(ProblemSourcesEnum.A12389.getLabel())
// 业务类别 执法办案
.setBusinessTypeCode(BusinessTypeEnum.ZFBA.getValue())
.setBusinessTypeName(BusinessTypeEnum.ZFBA.getLabel())
// 主办层级
.setHostLevel(HostLevelEnums.FIRST.getValue());
negativeService.save(negative);
}
return Result.success();
}
@ -117,6 +150,10 @@ public class CaseVerifController {
@Operation(summary = "附件上传")
@PostMapping("file")
public Result<Boolean> file(@RequestBody CaseVerifFile caseVerifFile) {
//"11.32.30.103" http://wjccfwq.oss-cn-langfang-mps22s-d01-a.yun.ga/
if (StrUtil.isBlank(caseVerifFile.getFileUrl())) {
throw new RuntimeException("数据异常");
}
HttpResponse httpResponse = HttpUtil.createGet(caseVerifFile.getFileUrl()).execute();
InputStream is = httpResponse.bodyStream();
String filePath = fileService.upload(is, 0L, FileUtil.extName(caseVerifFile.getFileName()));
@ -134,6 +171,17 @@ public class CaseVerifController {
@PostMapping("disposalDetails")
public Result<Boolean> disposalDetails(@RequestBody CaseVerifDisposalDetails body) {
DataCaseVerifExt dataCaseVerifExt = new DataCaseVerifExt();
dataCaseVerifExt.setCheckStatusDesc(body.getDisposalSituationDescription());
dataCaseVerifExt.setOuterId(body.getOuterId());
dataCaseVerifExt.setBlameEmpNo(body.getDisposalAlarm());
dataCaseVerifExt.setBlameIdCode(body.getDisposalIdNo());
dataCaseVerifExt.setInvolveDepartName(body.getDisposalDepart());
DataCaseVerifExt obj = dataCaseVerifExtService.getById(body.getOuterId());
if (obj != null) {
BeanUtil.copyProperties(dataCaseVerifExt, obj, CopyOptions.create().setIgnoreNullValue(true));
dataCaseVerifExt = obj;
}
dataCaseVerifExtService.saveOrUpdate(dataCaseVerifExt);
return Result.success();
}

32
src/main/java/com/biutag/supervision/controller/books/NegativeBookController.java

@ -14,10 +14,7 @@ import com.biutag.supervision.pojo.entity.Negative;
import com.biutag.supervision.pojo.entity.NegativeBlame;
import com.biutag.supervision.pojo.param.NegativeQueryParam;
import com.biutag.supervision.pojo.vo.*;
import com.biutag.supervision.service.NegativeBlameService;
import com.biutag.supervision.service.NegativeBookService;
import com.biutag.supervision.service.NegativeService;
import com.biutag.supervision.service.SupDepartService;
import com.biutag.supervision.service.*;
import jakarta.servlet.http.HttpServletResponse;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@ -169,19 +166,12 @@ public class NegativeBookController {
return Result.success(new Page<NegativeHdjq>().setTotal(page.getTotal()).setRecords(list));
}
private final DataCaseVerifService caseVerifService;
// 案件核查
@GetMapping("ajhc")
public Result<Page<Negative>> pageByAjhc(NegativeQueryParam param) {
LambdaQueryWrapper<Negative> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper
.in(Negative::getProblemSourcesCode, List.of(ProblemSourcesEnum.A12389.getValue(), ProblemSourcesEnum.SLDJB.getValue(), ProblemSourcesEnum.ZDDJB.getValue(), ProblemSourcesEnum.SJJB.getValue()))
.in(!param.getProcessingStatus().isEmpty(), Negative::getProcessingStatus, param.getProcessingStatus())
.like(StrUtil.isNotBlank(param.getThingDesc()), Negative::getThingDesc, param.getThingDesc())
.like(StrUtil.isNotBlank(param.getCheckStatusDesc()), Negative::getCheckStatusDesc, param.getCheckStatusDesc())
.eq(Objects.nonNull(param.getCrtDepartLevel()), Negative::getCrtDepartLevel, param.getCrtDepartLevel())
.orderByDesc(Negative::getDiscoveryTime);
Page<Negative> page = negativeService.page(Page.of(param.getCurrent(), param.getSize()), queryWrapper);
return Result.success(page);
return Result.success(caseVerifService.pageByBooks(Page.of(param.getCurrent(), param.getSize()), param));
}
// 信访投诉
@ -217,7 +207,12 @@ public class NegativeBookController {
public void exportByAjhc(NegativeQueryParam param, HttpServletResponse response) throws IOException {
param.setCurrent(1);
param.setSize(100000);
List<DataPetitionComplaintExportGabxfVo> list = new ArrayList<>();
List<DataPetitionComplaintExportGabxfVo> list = caseVerifService.pageByBooks(Page.of(param.getCurrent(), param.getSize()), param).getRecords()
.stream().map(item -> {
DataPetitionComplaintExportGabxfVo vo = new DataPetitionComplaintExportGabxfVo();
BeanUtil.copyProperties(item, vo);
return vo;
}).toList();
String headerValue = "attachment; filename=\"" + URLEncoder.encode("案件核查数据台账.xlsx", "UTF-8") + "\"";
response.setHeader("Content-Disposition", headerValue);
@ -231,7 +226,12 @@ public class NegativeBookController {
public void exportByMail12337(NegativeQueryParam param, HttpServletResponse response) throws IOException {
param.setCurrent(1);
param.setSize(100000);
List<DataPetitionComplaintExportGabxfVo> list = new ArrayList<>();
Page<Negative> negativePage = caseVerifService.pageByBooks(Page.of(param.getCurrent(), param.getSize()), param);
List<DataPetitionComplaintExportGabxfVo> list = negativePage.getRecords().stream().map(item -> {
DataPetitionComplaintExportGabxfVo vo = new DataPetitionComplaintExportGabxfVo();
BeanUtil.copyProperties(item, vo);
return vo;
}).toList();
String headerValue = "attachment; filename=\"" + URLEncoder.encode("12337信访投诉数据台账.xlsx", "UTF-8") + "\"";
response.setHeader("Content-Disposition", headerValue);

39
src/main/java/com/biutag/supervision/controller/data/VideoInspectionController.java

@ -2,19 +2,28 @@ package com.biutag.supervision.controller.data;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.biutag.supervision.mapper.DataAlarmDispositionInfoMapper;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.entity.DataAlarmAlarmInfo;
import com.biutag.supervision.pojo.entity.DataAlarmDispositionInfo;
import com.biutag.supervision.pojo.entity.DataAlarmYjzj;
import com.biutag.supervision.pojo.param.VideoInspectionQueryParam;
import com.biutag.supervision.pojo.vo.VideoInspectionInfo;
import com.biutag.supervision.pojo.vo.VideoInspectionVo;
import com.biutag.supervision.service.DataAlarmAlarmInfoService;
import com.biutag.supervision.service.DataAlarmDispositionInfoService;
import com.biutag.supervision.service.DataAlarmYjzjService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
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;
import java.util.List;
/**
* @author wxc
* @date 2025/1/2
@ -26,6 +35,15 @@ public class VideoInspectionController {
private final DataAlarmDispositionInfoMapper dataAlarmDispositionInfoMapper;
private final DataAlarmAlarmInfoService dataAlarmAlarmInfoService;
private final DataAlarmDispositionInfoService dispositionInfoService;
private final DataAlarmYjzjService dataAlarmYjzjService;
@Value("${videoInspection.url}")
private String videoInspectionUrl;
@GetMapping
public Result<Page<VideoInspectionVo>> list(VideoInspectionQueryParam param) {
QueryWrapper<DataAlarmDispositionInfo> queryWrapper = new QueryWrapper<>();
@ -36,7 +54,24 @@ public class VideoInspectionController {
@GetMapping("{id}")
public Result<VideoInspectionInfo> get(@PathVariable String id) {
return Result.success();
DataAlarmAlarmInfo alarmInfo = dataAlarmAlarmInfoService.getById(id);
DataAlarmDispositionInfo dispositionInfo = dispositionInfoService.getOne(new LambdaUpdateWrapper<DataAlarmDispositionInfo>().eq(DataAlarmDispositionInfo::getAlarmInfoId, id));
List<DataAlarmYjzj> list = dataAlarmYjzjService.list(new LambdaUpdateWrapper<DataAlarmYjzj>().eq(DataAlarmYjzj::getAlarm_info_id, id));
list.forEach(item -> {
item.setDzwjwz(videoInspectionUrl + item.getDzwjwz());
});
VideoInspectionInfo info = new VideoInspectionInfo();
info.setZlList(list);
info.setRqsj(alarmInfo.getRQSJ());
info.setAlarmLevel(dispositionInfo.getAlarmLevel());
info.setRegistrationDepartName(alarmInfo.getXxdjdwGajgmc());
info.setHappenDepartName(alarmInfo.getFsdwGajgmc());
info.setTitle(alarmInfo.getS_Title());
info.setTitle(alarmInfo.getDcyjBt());
info.setContent(alarmInfo.getDcyjJyqk());
info.setSystemKeyName(dispositionInfo.getSystemKeyName());
return Result.success(info);
}
}

3
src/main/java/com/biutag/supervision/controller/system/DepartMapingController.java

@ -34,7 +34,8 @@ public class DepartMapingController {
.eq(SupExternalDepart::getSource, source)
.like(StrUtil.isNotBlank(queryParam.getExternalId()), SupExternalDepart::getExternalId, queryParam.getExternalId())
.like(StrUtil.isNotBlank(queryParam.getExternalName()), SupExternalDepart::getExternalName, queryParam.getExternalName())
.eq(StrUtil.isNotBlank(queryParam.getInternalId()), SupExternalDepart::getInternalId, queryParam.getInternalId());
.eq(StrUtil.isNotBlank(queryParam.getInternalId()), SupExternalDepart::getInternalId, queryParam.getInternalId())
.isNull("noMaping".equals(queryParam.getActiveMaping()), SupExternalDepart::getInternalId);
Page<SupExternalDepart> page = externalDepartService.page(Page.of(queryParam.getCurrent(), queryParam.getSize()), queryWrapper);
return Result.success(page);
}

15
src/main/java/com/biutag/supervision/controller/work/NegativeController.java

@ -3,6 +3,7 @@ package com.biutag.supervision.controller.work;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
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.common.UserContextHolder;
@ -71,9 +72,19 @@ public class NegativeController {
return Result.success(negativeService.get(id, workId));
}
private final DataCaseVerifService dataCaseVerifService;
@GetMapping("outer/{id}")
public Result<NegativeDetail> outerDetail(@PathVariable String id) {
return Result.success(negativeService.get(id, null));
DataCaseVerif dataCaseVerif = dataCaseVerifService.getOne(new LambdaQueryWrapper<DataCaseVerif>().eq(DataCaseVerif::getOuterId, id));
if (dataCaseVerif == null) {
throw new RuntimeException("案件核查数据异常!");
}
Negative negative = negativeService.getOne(new LambdaUpdateWrapper<Negative>().eq(Negative::getOriginId, dataCaseVerif.getOriginId()));
if (negative == null) {
throw new RuntimeException("案件核查处置意见数据异常!");
}
return Result.success(negativeService.get(negative.getId(), null));
}
@PostMapping
@ -191,7 +202,7 @@ public class NegativeController {
queryParam.setCurrent(1);
Page<NegativeQueryVo> page = negativeQueryService.page(queryParam);
NegativeTask negativeTask = negativeTaskService.save(page.getRecords().size());
negativeTaskService.updateExcel(page.getRecords(), negativeTask.getId());
negativeTaskService.exportExcel(page.getRecords(), negativeTask.getId());
return Result.success();
}

4
src/main/java/com/biutag/supervision/flow/action/FirstDistributeAction.java

@ -33,13 +33,11 @@ public class FirstDistributeAction implements Action {
private final SupDepartService departService;
private final Validator validator;
@Override
public void next(ActionDto actionDto) {
FirstDistributeData firstDistributeData = BeanUtil.toBean(actionDto.getData(), FirstDistributeData.class);
validator.validate(firstDistributeData);
SupDepart depart = departService.getById(firstDistributeData.getDepartId());
firstDistributeData.setDepartName(depart.getShortName());
// 三级单位办理
boolean thirdHandling = DepartLevelEnum.THREE.getValue().equals(depart.getLevel());
updateNegative(actionDto.getNegativeId(), actionDto.getNextFlowKey(), firstDistributeData, thirdHandling);

115
src/main/java/com/biutag/supervision/job/Job.java

@ -1,18 +1,28 @@
package com.biutag.supervision.job;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.biutag.supervision.constants.enums.BusinessTypeEnum;
import com.biutag.supervision.constants.enums.InspectCaseEnum;
import com.biutag.supervision.constants.enums.ProblemSourcesEnum;
import com.biutag.supervision.constants.enums.ProcessingStatusEnum;
import com.biutag.supervision.mapper.MailMapper;
import com.biutag.supervision.pojo.entity.Negative;
import com.biutag.supervision.pojo.entity.NegativeBlame;
import com.biutag.supervision.pojo.entity.SupDepart;
import com.biutag.supervision.pojo.entity.SupPolice;
import com.biutag.supervision.pojo.entity.mailbox.Mail;
import com.biutag.supervision.service.*;
import com.biutag.supervision.util.TimeUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@ -21,9 +31,11 @@ import java.time.ZoneId;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import static com.biutag.supervision.util.TimeUtil.SECONDS_OF_A_DAY;
@Slf4j
@RequiredArgsConstructor
@Component
public class Job {
@ -106,6 +118,19 @@ public class Job {
private final MailMapper mailMapper;
@Value("${mailbox.url}")
private String mailboxUrl;
private final FileService fileService;
private final NegativeThingFileService thingFileService;
private final NegativeFileService negativeThingFile;
private final SupPoliceService supPoliceService;
private final NegativeBlameService blameService;
/**
* 凌晨1点执行
*/
@ -113,26 +138,106 @@ public class Job {
public void mailbox() {
List<Mail> mailList = mailMapper.selectList(new LambdaUpdateWrapper<Mail>().eq(Mail::getMailState, "completion")
.in(Mail::getVerifyIsTrue, List.of("属实", "基本属实")));
mailList.stream().map(item -> {
for (Mail item : mailList) {
Negative negative = new Negative();
negative.setId(IdUtil.getSnowflakeNextIdStr());
negative.setOriginId(item.getId());
negative.setDiscoveryTime(item.getCreateTime());
negative.setResponderName(item.getContactName());
negative.setContactPhone(item.getContactPhone());
negative.setThingDesc(item.getContent());
// 问题涉及单位
// negative.setInvolveDepartName();
negative.setProblemSources(ProblemSourcesEnum.JZXX.getLabel());
negative.setProblemSourcesCode(ProblemSourcesEnum.JZXX.getValue());
negative.setBusinessTypeCode(BusinessTypeEnum.QT.getValue());
negative.setBusinessTypeName(BusinessTypeEnum.QT.getLabel());
if ("属实".equals(item.getVerifyIsTrue())) {
negative.setCheckStatus("");
negative.setCheckStatus(InspectCaseEnum.TRUE.getValue());
negative.setCheckStatusName(InspectCaseEnum.TRUE.getLabel());
}
if ("基本属实".equals(item.getVerifyIsTrue())) {
negative.setCheckStatus(InspectCaseEnum.PARTIALLY_TRUE.getValue());
negative.setCheckStatusName(InspectCaseEnum.PARTIALLY_TRUE.getLabel());
}
// 核办情况
negative.setCheckStatusDesc(item.getVerifyDetails());
negative.setProcessingStatus(ProcessingStatusEnum.completed.name());
negative.setCrtTime(LocalDateTime.now());
return negative;
}).toList();
negativeService.save(negative);
// 被举报人
if (StrUtil.isNotBlank(item.getVerifyReportedPolices())) {
JSONArray jsonArray = JSON.parseArray(item.getVerifyReportedPolices());
if (!jsonArray.isEmpty()) {
for (int i = 0; i < jsonArray.size(); i++) {
// [{"deptId":310,"empNo":"A00002","gender":null,"birthday":null,"name":"李四","mobile":null}]
JSONObject jsonObject = jsonArray.getJSONObject(i);
String empNo = jsonObject.getString("empNo");
String name = jsonObject.getString("name");
SupPolice police = supPoliceService.getOne(new LambdaUpdateWrapper<SupPolice>().eq(SupPolice::getEmpNo, empNo).eq(SupPolice::getName, name));
if (Objects.isNull(police)) {
log.error("没有该警员的数据! {}-{}", name, empNo);
continue;
}
NegativeBlame negativeBlame = new NegativeBlame();
negativeBlame
.setBlameId(IdUtil.getSnowflakeNextIdStr())
.setNegativeId(negative.getId())
.setType("personal")
.setBlameEmpNo(empNo)
.setBlameIdCode(police.getIdCode())
.setBlameName(name)
.setUpdTime(LocalDateTime.now())
.setCrtTime(LocalDateTime.now());
blameService.save(negativeBlame);
}
}
}
// [{"filepath":"250102/_B5HQNhI.doc","orgiinFilename":"3、定级报告 .doc","type":"application/msword","size":95744,"docxFilepath":"250102/l-Tl5dux.docx"}]
// if (StrUtil.isNotBlank(item.getAttachments())) {
// JSONArray jsonArray = JSON.parseArray(item.getAttachments());
// if (!jsonArray.isEmpty()) {
// for (int i = 0; i < jsonArray.size(); i++) {
// JSONObject jsonObject = jsonArray.getJSONObject(i);
// HttpResponse httpResponse = HttpUtil.createGet(mailboxUrl + "api/file/steam/" + jsonObject.getString("filepath")).execute();
// InputStream is = httpResponse.bodyStream();
// String fileName = jsonObject.getString("orgiinFilename");
// String filePath = fileService.upload(is, 0L, FileUtil.extName(fileName));
// NegativeThingFile negativeThingFile = new NegativeThingFile();
// negativeThingFile.setFileName(fileName);
// negativeThingFile.setFilePath(filePath);
// negativeThingFile.setCreateTime(LocalDateTime.now());
// negativeThingFile.setNegativeId(negative.getId());
// thingFileService.save(negativeThingFile);
// }
// }
// }
//
// if (StrUtil.isNotBlank(item.getVerifyAttachments())) {
// JSONArray jsonArray = JSON.parseArray(item.getVerifyAttachments());
// if (!jsonArray.isEmpty()) {
// for (int i = 0; i < jsonArray.size(); i++) {
// JSONObject jsonObject = jsonArray.getJSONObject(i);
// HttpResponse httpResponse = HttpUtil.createGet(mailboxUrl + "api/file/steam/" + jsonObject.getString("filepath")).execute();
// InputStream is = httpResponse.bodyStream();
// String fileName = jsonObject.getString("orgiinFilename");
// String filePath = fileService.upload(is, 0L, FileUtil.extName(fileName));
// NegativeFile file = new NegativeFile();
// file.setFileName(fileName);
// file.setFilePath(filePath);
// file.setCrtTime(LocalDateTime.now());
// file.setNegtiveId(negative.getId());
// negativeThingFile.save(file);
// }
// }
// }
}
}
}

1
src/main/java/com/biutag/supervision/pojo/dto/flow/FirstDistributeData.java

@ -22,7 +22,6 @@ public class FirstDistributeData {
@NotBlank
private String departId;
@NotBlank
private String departName;
// 最大签收时长(天)

8
src/main/java/com/biutag/supervision/pojo/dto/jwdc/AlarmInfoDto.java

@ -17,10 +17,10 @@ public class AlarmInfoDto {
private String DCYJ_YWLSH;
@JsonProperty("DCYJ_BT")
private String DCYJ_BT;
private String dcyjBt;
@JsonProperty("DCYJ_JYQK")
private String DCYJ_JYQK;
private String dcyjJyqk;
@JsonProperty("YJSASJBM")
private String YJSASJBM;
@ -38,13 +38,13 @@ public class AlarmInfoDto {
private String FSDW_GAJGJGDM;
@JsonProperty("FSDW_GAJGMC")
private String FSDW_GAJGMC;
private String fsdwGajgmc;
@JsonProperty("XXDJDW_GAJGJGDM")
private String XXDJDW_GAJGJGDM;
@JsonProperty("XXDJDW_GAJGMC")
private String XXDJDW_GAJGMC;
private String xxdjdwGajgmc;
@JsonProperty("JSON")
private String JSON;

4
src/main/java/com/biutag/supervision/pojo/dto/jwdc/AlarmYjzjDto.java

@ -34,7 +34,7 @@ public class AlarmYjzjDto {
private String JSSJ;
@JsonProperty("DZWJMC")
private String DZWJMC;
private String dzwjmc;
@JsonProperty("DZWJGS")
private String DZWJGS;
@ -46,7 +46,7 @@ public class AlarmYjzjDto {
private BigDecimal DZWJDX;
@JsonProperty("DZWJWZ")
private String DZWJWZ;
private String dzwjwz;
@JsonProperty("DMTBZBT")
private String DMTBZBT;

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

@ -26,11 +26,11 @@ public class DataAlarmAlarmInfo {
// 标题生成规则
@TableField("DCYJ_BT")
private String DCYJ_BT;
private String dcyjBt;
// 消息文本内容生成规则
@TableField("DCYJ_JYQK")
private String DCYJ_JYQK;
private String dcyjJyqk;
// 预警涉案事件编号(外部编码)
@TableField("YJSASJBM")
@ -54,7 +54,7 @@ public class DataAlarmAlarmInfo {
// 发生单位名称
@TableField("FSDW_GAJGMC")
private String FSDW_GAJGMC;
private String fsdwGajgmc;
// 登记单位代码
@TableField("XXDJDW_GAJGJGDM")
@ -62,7 +62,7 @@ public class DataAlarmAlarmInfo {
// 登记单位名称
@TableField("XXDJDW_GAJGMC")
private String XXDJDW_GAJGMC;
private String xxdjdwGajgmc;
// Json参数
@TableField("JSON")

6
src/main/java/com/biutag/supervision/pojo/entity/DataAlarmYjzj.java

@ -3,6 +3,7 @@ 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 com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
@ -47,7 +48,7 @@ public class DataAlarmYjzj {
// 电子文件名称
@TableField("DZWJMC")
private String DZWJMC;
private String dzwjmc;
// 电子文件格式
@TableField("DZWJGS")
@ -63,7 +64,7 @@ public class DataAlarmYjzj {
// 电子文件位置
@TableField("DZWJWZ")
private String DZWJWZ;
private String dzwjwz;
// 多媒体标注_标题
@TableField("DMTBZBT")
@ -75,6 +76,7 @@ public class DataAlarmYjzj {
// 多媒体标注_日期时间
@TableField("DMTBZRQSJ")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime DMTBZRQSJ;
// 多媒体标注_登记单位_公安机关机构代码(公安标准)

2
src/main/java/com/biutag/supervision/pojo/entity/DataCaseVerif.java

@ -26,7 +26,7 @@ public class DataCaseVerif {
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm")
private LocalDateTime happenTime;
// 问题来源
// 问题来源(投诉渠道)
@TableField("problem_sources")
private String problemSources;

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

@ -17,4 +17,8 @@ public class DepartMapingQueryParam extends BasePage {
private String externalName;
private String internalId;
// 是否已映射
private String activeMaping;
}

83
src/main/java/com/biutag/supervision/pojo/vo/DataCaseVerifVo.java

@ -0,0 +1,83 @@
package com.biutag.supervision.pojo.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
/**
* @author wxc
* @date 2025/1/10
*/
@Setter
@Getter
public class DataCaseVerifVo {
@ExcelProperty({"基本信息", "序号"})
private Integer index;
// 问题来源(投诉渠道)
@ExcelProperty({"基本信息", "投诉渠道"})
private String problemSources;
// 案件编号
@ExcelProperty({"基本信息", "案件编号"})
private String originId;
// 问题发现时间
@ExcelProperty({"基本信息", "受理时间"})
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm")
private LocalDateTime discoveryTime;
// 投诉人姓名
@ExcelProperty({"基本信息", "投诉人"})
private String responderName;
// 投诉人电话
@ExcelProperty({"基本信息", "投诉人电话"})
private String responderPhone;
// 涉及单位 二级
@ExcelIgnore
private String secondDepartId;
@ExcelProperty({"基本信息", "被投诉机构"})
private String secondDepartName;
// 所队
@ExcelIgnore
private String thirdDepartId;
@ExcelProperty({"基本信息", "被投诉所队"})
private String thirdDepartName;
// 事情简述
@ExcelProperty({"基本信息", "具体内容"})
private String thingDesc;
// 涉及问题
@ExcelProperty({"基本信息", "问题类别"})
private String involveProblem;
// 业务类型
@ExcelProperty({"基本信息", "业务类别"})
private String businessTypeName;
@ExcelProperty({"办理情况", "承办单位"})
private String handleDepartName;
// 核查情况
@ExcelProperty({"办理情况", "审定结果"})
private String checkStatusName;
// 问题核查情况
@ExcelProperty({"办理情况", "情况反馈"})
private String checkStatusDesc;
}

25
src/main/java/com/biutag/supervision/pojo/vo/ExportNegativeVo.java

@ -57,10 +57,6 @@ public class ExportNegativeVo {
@ExcelProperty("涉及单位")
private String involveDepartName;
// 办理状态
@ExcelProperty("办理状态")
private String processingStatus;
// 办理单位 二级
@ExcelProperty("办理单位(二级)")
private String handleSecondDepartName;
@ -70,11 +66,30 @@ public class ExportNegativeVo {
private String handleThreeDepartName;
// 核查情况
@ExcelProperty("核查情况")
@ExcelProperty("核查情况(是否属实)")
private String checkStatusName;
// 核查情况
@ExcelProperty("核查情况说明")
private String checkStatusDesc;
// 是否整改
@ExcelProperty("是否整改")
private String isRectifyName;
// 问题整改情况
@ExcelProperty("整改情况")
private String rectifyDesc;
// 问题类型
@ExcelProperty("问题类型")
private String problemTypeList;
// 办理状态
@ExcelProperty("办理状态")
private String processingStatus;
@ExcelProperty("办理超时情况")
private String handleTime;
}

1
src/main/java/com/biutag/supervision/pojo/vo/NegativeQueryVo.java

@ -189,4 +189,5 @@ public class NegativeQueryVo {
// 通报期数
private String reportNumber;
}

30
src/main/java/com/biutag/supervision/pojo/vo/VideoInspectionInfo.java

@ -1,8 +1,13 @@
package com.biutag.supervision.pojo.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.biutag.supervision.pojo.entity.DataAlarmYjzj;
import lombok.Getter;
import lombok.Setter;
import java.util.ArrayList;
import java.util.List;
/**
* @author wxc
* @date 2025/1/2
@ -10,4 +15,29 @@ import lombok.Setter;
@Setter
@Getter
public class VideoInspectionInfo {
// 预警时间
private String rqsj;
// 预警级别
private Integer alarmLevel;
// 发生单位名称
private String happenDepartName;
private String registrationDepartName;
private String sTitle;
// 标题生成规则
private String title;
// 消息文本内容生成规则
private String content;
private String systemKeyName;
private List<DataAlarmYjzj> zlList = new ArrayList<>();
}

2
src/main/java/com/biutag/supervision/pojo/vo/VideoInspectionVo.java

@ -11,6 +11,8 @@ import lombok.Setter;
@Getter
public class VideoInspectionVo {
private String id;
// 预警级别
private String alarmLevel;

19
src/main/java/com/biutag/supervision/service/DataCaseVerifService.java

@ -11,13 +11,16 @@ import com.biutag.supervision.pojo.dto.DataCaseVerifDistribute;
import com.biutag.supervision.pojo.dto.DataCaseVerifImportDto;
import com.biutag.supervision.pojo.dto.NegativeDto;
import com.biutag.supervision.pojo.entity.DataCaseVerif;
import com.biutag.supervision.pojo.entity.Negative;
import com.biutag.supervision.pojo.param.DataCaseVerifQueryParam;
import com.biutag.supervision.pojo.param.NegativeQueryParam;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Objects;
@RequiredArgsConstructor
@Service
@ -102,11 +105,17 @@ public class DataCaseVerifService extends ServiceImpl<DataCaseVerifMapper, DataC
return true;
}
public Page<Negative> pageByBooks(Page page, NegativeQueryParam param) {
LambdaQueryWrapper<Negative> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper
.in(Negative::getProblemSourcesCode, List.of(ProblemSourcesEnum.A12389.getValue(), ProblemSourcesEnum.SLDJB.getValue(), ProblemSourcesEnum.ZDDJB.getValue(), ProblemSourcesEnum.SJJB.getValue()))
.in(!param.getProcessingStatus().isEmpty(), Negative::getProcessingStatus, param.getProcessingStatus())
.like(StrUtil.isNotBlank(param.getThingDesc()), Negative::getThingDesc, param.getThingDesc())
.like(StrUtil.isNotBlank(param.getCheckStatusDesc()), Negative::getCheckStatusDesc, param.getCheckStatusDesc())
.eq(Objects.nonNull(param.getCrtDepartLevel()), Negative::getCrtDepartLevel, param.getCrtDepartLevel())
.orderByDesc(Negative::getDiscoveryTime);
return negativeService.page(page, queryWrapper);
}

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

@ -27,6 +27,7 @@ public class FileService {
}
public String upload(InputStream is, long size, String fileExtName) {
StorePath storePath = fastFileStorageClient.uploadFile("group1", is, size, fileExtName);
return "/" + storePath.getFullPath();
}

8
src/main/java/com/biutag/supervision/service/NegativeService.java

@ -268,8 +268,6 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
// 下发时间
.setFirstDistributeTime(now)
.setProcessingStatus(ProcessingStatusEnum.signing.name())
// 完成状态 0-待完善 1-已完善
.setCompleteStatus("0")
.setTaskId("api")
.setCrtTime(now)
.setUpdTime(now);
@ -279,7 +277,8 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
if (Objects.nonNull(dept)) {
negative.setInvolveDepartId(dept.getId())
.setInvolveDepartName(dept.getShortName())
.setFlowKey(FlowNodeEnum.THREE_SIGN.getKey());
.setFlowKey(FlowNodeEnum.THREE_SIGN.getKey())
.setCurrentProcessingObject(String.format("%s专班", dept.getShortName()));
if (DepartLevelEnum.THREE.getValue().equals(dept.getLevel())) {
SupDepart parentDepart = departService.getById(dept.getPid());
negative.setHandleThreeDepartId(dept.getId())
@ -288,7 +287,8 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
.setHandleSecondDepartName(parentDepart.getShortName());
}
} else {
negative.setFlowKey(FlowNodeEnum.FIRST_DISTRIBUTE.getKey());
negative.setFlowKey(FlowNodeEnum.FIRST_DISTRIBUTE.getKey())
.setCurrentProcessingObject("市局专班");
}
save(negative);
// 新增work

64
src/main/java/com/biutag/supervision/service/NegativeTaskService.java

@ -9,32 +9,35 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.biutag.supervision.common.UserContextHolder;
import com.biutag.supervision.constants.enums.*;
import com.biutag.supervision.constants.enums.HostLevelEnums;
import com.biutag.supervision.constants.enums.NegativeTaskCategoryEnum;
import com.biutag.supervision.constants.enums.NegativeTaskStatusEnum;
import com.biutag.supervision.constants.enums.ProcessingStatusEnum;
import com.biutag.supervision.mapper.NegativeTaskMapper;
import com.biutag.supervision.pojo.dto.*;
import com.biutag.supervision.pojo.entity.DataPetition12337;
import com.biutag.supervision.pojo.dto.NegativeDto;
import com.biutag.supervision.pojo.dto.NegativeImportDistributeDto;
import com.biutag.supervision.pojo.dto.NegativeImportDto;
import com.biutag.supervision.pojo.entity.NegativeProblemRelation;
import com.biutag.supervision.pojo.entity.NegativeTask;
import com.biutag.supervision.pojo.entity.SupDepart;
import com.biutag.supervision.pojo.entity.SupDictData;
import com.biutag.supervision.pojo.model.ModelClueTaskDepartModel;
import com.biutag.supervision.pojo.model.UserAuth;
import com.biutag.supervision.pojo.param.NegativeTaskQueryParam;
import com.biutag.supervision.pojo.vo.ExportNegativeVo;
import com.biutag.supervision.pojo.vo.NegativeQueryVo;
import com.biutag.supervision.util.JSON;
import com.fasterxml.jackson.databind.JsonNode;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
@ -85,23 +88,38 @@ public class NegativeTaskService extends ServiceImpl<NegativeTaskMapper, Negativ
return task;
}
private final SupDictDataService dictDataService;
private final NegativeProblemRelationService negativeProblemRelationService;
@Async
public void updateExcel(List<NegativeQueryVo> data, String negativeTaskId) {
List<ExportNegativeVo> list = data.stream().map(item -> {
ExportNegativeVo vo = new ExportNegativeVo();
BeanUtils.copyProperties(item, vo);
if (StrUtil.isNotBlank(item.getInvolveProblem())) {
JsonNode jsonNode = JSON.readTree(item.getInvolveProblem());
List<String> arr = new ArrayList<>();
jsonNode.forEach(problem -> {
String dictLabel = problem.get("dictLabel").asText();
arr.add(dictLabel);
});
vo.setInvolveProblem(arr.stream().collect(Collectors.joining("、")));
}
vo.setProcessingStatus(ProcessingStatusEnum.getLabel(item.getProcessingStatus()));
return vo;
}).toList();
public void exportExcel(List<NegativeQueryVo> data, String negativeTaskId) {
List<SupDictData> suspectProblem = dictDataService.listByDictType("suspectProblem");
List<ExportNegativeVo> list = new ArrayList<>();
if (!data.isEmpty()) {
List<NegativeProblemRelation> negativeProblemRelations = negativeProblemRelationService.list(new LambdaQueryWrapper<NegativeProblemRelation>().in(NegativeProblemRelation::getNegativeId, data.stream().map(NegativeQueryVo::getId).toList()));
list = data.stream().map(item -> {
ExportNegativeVo vo = new ExportNegativeVo();
BeanUtils.copyProperties(item, vo);
if (StrUtil.isNotBlank(item.getInvolveProblem())) {
String involveProblem = Arrays.stream(item.getInvolveProblem().split(","))
.map(val -> suspectProblem.stream().filter(problem -> val.equals(problem.getDictValue())).findFirst().map(SupDictData::getDictLabel).orElse(""))
.collect(Collectors.joining("、"));
vo.setInvolveProblem(involveProblem);
}
vo.setProcessingStatus(ProcessingStatusEnum.getLabel(item.getProcessingStatus()));
// 问题类型
String problemTypeList = negativeProblemRelations.stream().filter(problem -> item.getId().equals(problem.getNegativeId())).map(problem -> {
if ("其他".equals(problem.getThreeLevelContent())) {
return String.format("%s / %s / %s(%s)", problem.getOneLevelContent(), problem.getTwoLevelContent(), problem.getTwoLevelContent(), problem.getThreeLevelContentOther());
}
return String.format("%s / %s / %s", problem.getOneLevelContent(), problem.getTwoLevelContent(), problem.getTwoLevelContent());
}).collect(Collectors.joining("、"));
vo.setProblemTypeList(problemTypeList);
return vo;
}).toList();
}
ByteArrayOutputStream os = new ByteArrayOutputStream();
EasyExcel.write(os, ExportNegativeVo.class).inMemory(Boolean.TRUE).sheet("问题台账").doWrite(list);
String filePath = fileService.upload(new ByteArrayInputStream(os.toByteArray()), os.size(), ".xlsx");

9
src/main/resources/application-local.yml

@ -12,6 +12,12 @@ spring:
url: jdbc:mysql://172.31.217.20:31868/open-platform?serverTimezone=GMT%2B8
username: root
password: ip12341234
mailbox:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: org.postgresql.Driver
url: jdbc:postgresql://58.51.152.18:10642/mailbox?currentSchema=mailbox
username: alphay
password: alphay@123
data:
redis:
host: 127.0.0.1
@ -34,3 +40,6 @@ springdoc:
paths-to-match:
- '/api/plugin/**'
- '/login'
videoInspection:
url:

6
src/main/resources/application-prod.yml

@ -67,4 +67,8 @@ fdfs:
preview-url: http://65.47.6.110:81
negative:
v1-user-url: http://65.47.6.108:8765/admin/current/user
v1-user-url: http://65.47.6.108:8765/admin/current/user
videoInspection:
url: http://65.47.26.33:8090/
mailbox:
url: http://65.47.60.145/api/

4
src/main/resources/application.yml

@ -48,4 +48,6 @@ knife4j:
language: zh_cn
token:
timeout: 168 # 7 * 24 小时
timeout: 168 # 7 * 24 小时
mailbox:
url:

5
src/main/resources/mapper/DataAlarmDispositionInfoMapper.xml

@ -4,14 +4,15 @@
<select id="queryPage" resultType="com.biutag.supervision.pojo.vo.VideoInspectionVo">
SELECT
i.id,
d.alarmLevel alarm_Level,
d.systemKeyName system_Key_Name,
d.title,
i.rqsj,
i.FSDW_GAJGMC
FROM
data_alarm_disposition_info d
LEFT JOIN data_alarm_alarm_info i ON d.alarm_info_id = i.id
data_alarm_alarm_info i
LEFT JOIN data_alarm_disposition_info d ON d.alarm_info_id = i.id
${ew.getCustomSqlSegment}
</select>

22
src/test/java/com/biutag/supervision/StrUtil.java

@ -1,23 +1,25 @@
package com.biutag.supervision;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.biutag.supervision.pojo.entity.DataCaseVerifExt;
import org.junit.jupiter.api.Test;
import org.springframework.security.crypto.bcrypt.BCrypt;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import java.io.File;
import java.io.FileNotFoundException;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.List;
public class StrUtil {
@Test
public void testSubstr() throws FileNotFoundException {
LocalDateTime parse = LocalDateTime.parse("2025-01-03", DateTimeFormatter.ofPattern("yyyy-MM-dd"));
System.out.println(parse);
DataCaseVerifExt dataCaseVerifExt = new DataCaseVerifExt();
dataCaseVerifExt.setOuterId("1");
dataCaseVerifExt.setCheckStatusName("123");
DataCaseVerifExt obj = new DataCaseVerifExt();
obj.setBlameEmpNo("ABC");
obj.setCheckStatusName("3");
obj.setOuterId("1");
BeanUtil.copyProperties(dataCaseVerifExt, obj, CopyOptions.create().setIgnoreNullValue(true));
System.out.println(obj);
}
}

15
src/test/java/com/biutag/supervision/SupervisionApplicationTests.java

@ -1,9 +1,12 @@
package com.biutag.supervision;
import cn.hutool.core.io.FileUtil;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.biutag.supervision.constants.AppConstants;
import com.biutag.supervision.job.Job;
import com.biutag.supervision.mapper.SupPoliceMapper;
import com.biutag.supervision.pojo.entity.SupDepart;
import com.biutag.supervision.service.FileService;
import com.biutag.supervision.service.SupDepartService;
import com.github.tobato.fastdfs.service.FastFileStorageClient;
import org.junit.jupiter.api.Test;
@ -12,6 +15,8 @@ import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.scheduling.TaskScheduler;
import org.springframework.scheduling.config.ScheduledTaskRegistrar;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.List;
@ -33,9 +38,15 @@ class SupervisionApplicationTests {
@Autowired
private SupPoliceMapper policeMapper;
@Test
void contextLoads() {
@Autowired
private FileService fileService;
@Autowired
private Job job;
@Test
void contextLoads() throws FileNotFoundException {
job.mailbox();
}
public String getPathTrace(SupDepart depart) {

2
src/test/java/com/biutag/supervision/tools/GenCodeTests.java

@ -25,7 +25,7 @@ public class GenCodeTests {
@Test
public void genEntity() throws TemplateException, IOException {
String tableName = "data_case_verif_ext_file";
String tableName = "data_alarm_yjzj";
String tableSchema = "negative";
boolean genMapper = true;
boolean genService = true;

Loading…
Cancel
Save