Browse Source

fix:维权督察、审计监督相关后端问题消费(1、维权督办:筛选案件类型,过滤无需使用的维权案件。

2、维权列表:新增维权导出功能。
                      3、左右拉动的滚动轴加宽;审计监督台账-台账与附件压缩包顺序无法对应。
                      4、移动督察:督察问题编辑:涉及单位、问题来源展示错误,附件无法修改。
                      5、人员抽检-补充抽检人员:补充1位人员后原名单20人员不展示。
                      6、抽检人员:无法导出,提示数据库异常。)
master
pengwei 3 weeks ago
parent
commit
1981a23e68
  1. 2
      src/main/java/com/biutag/supervision/config/InterceptorConfig.java
  2. 35
      src/main/java/com/biutag/supervision/controller/books/NegativeBookController.java
  3. 7
      src/main/java/com/biutag/supervision/controller/rightsComfort/RightPersonController.java
  4. 75
      src/main/java/com/biutag/supervision/controller/rightsComfort/RightsController.java
  5. 39
      src/main/java/com/biutag/supervision/job/Job.java
  6. 3
      src/main/java/com/biutag/supervision/pojo/entity/DwdAsjZfbaWfrwfxx.java
  7. 3
      src/main/java/com/biutag/supervision/pojo/entity/RpcApply.java
  8. 4
      src/main/java/com/biutag/supervision/pojo/param/RpcApplyQueryParam.java
  9. 50
      src/main/java/com/biutag/supervision/pojo/vo/RightsExcelVo.java
  10. 2
      src/main/java/com/biutag/supervision/pojo/vo/RpcApplyVo.java
  11. 2
      src/main/java/com/biutag/supervision/service/NegativeBlameService.java
  12. 2
      src/main/java/com/biutag/supervision/service/RpcApplyService.java
  13. 3
      src/main/resources/mapper/RpcApplyMapper.xml
  14. 3
      src/main/resources/mapper/SamplingMapper.xml
  15. 2
      src/test/java/com/biutag/supervision/SupervisionApplicationTests.java

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

@ -47,7 +47,7 @@ public class InterceptorConfig implements WebMvcConfigurer {
.excludePathPatterns("/common/**")
.excludePathPatterns("/app/**")
// excel导出
.excludePathPatterns("/data/petitionComplaint12337/export/result","/err","/sampling/export/samplingPoling", "/negative/books/export/**","/data/petitionComplaint/export/**","/confinement/export","/books/dataThread/export")
.excludePathPatterns("/rights/export/result","/data/petitionComplaint12337/export/result","/err","/sampling/export/samplingPoling", "/negative/books/export/**","/data/petitionComplaint/export/**","/confinement/export","/books/dataThread/export")
.excludePathPatterns(List.of("/doc.html", "/webjars/**", "/favicon.ico", "/v3/api-docs/**"));
registry.addInterceptor(new ApiInterceptor())
.addPathPatterns("/api/jwdc/**");

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

@ -11,10 +11,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.biutag.supervision.constants.enums.*;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.dto.flow.VerifyData;
import com.biutag.supervision.pojo.entity.Negative;
import com.biutag.supervision.pojo.entity.NegativeBlame;
import com.biutag.supervision.pojo.entity.NegativeFile;
import com.biutag.supervision.pojo.entity.NegativeProblemRelation;
import com.biutag.supervision.pojo.entity.*;
import com.biutag.supervision.pojo.param.NegativeQueryParam;
import com.biutag.supervision.pojo.vo.*;
import com.biutag.supervision.service.*;
@ -313,21 +310,38 @@ public class NegativeBookController {
boolean emptyFlag = negativeIds.isEmpty();
List<NegativeBlame> negativeBlames = emptyFlag ? new ArrayList<>() : blameService.listByNegativeIds(negativeIds);
List<NegativeProblemRelation> problemRelations = emptyFlag ? new ArrayList<>() : negativeProblemRelationService.list(negativeIds);
List<NegativeFile> negativeFiles = emptyFlag ? new ArrayList<>() : negativeFileService.listByNegativeIds(negativeIds);
Map<String,List<NegativeBlame>> map =new HashMap<>();
map = negativeBlames.stream().filter(s->StrUtil.isNotBlank(s.getNegativeId())).collect(
Collectors.groupingBy(NegativeBlame::getNegativeId)
);
AtomicInteger index = new AtomicInteger(1);
Map<String, List<NegativeBlame>> finalMap = map;
List<NegativeAuditExportVo> list = pages.getRecords().stream().map((item) -> {
NegativeAuditExportVo vo = new NegativeAuditExportVo();
BeanUtil.copyProperties(item, vo);
int indexNumber = index.getAndIncrement();
vo.setIndexNumber(indexNumber);
vo.setProblems(problemRelations.stream()
.filter(problem -> StrUtil.isNotBlank(problem.getOneLevelContent()) && StrUtil.isNotBlank(problem.getTwoLevelContent()) && StrUtil.isNotBlank(problem.getThreeLevelContentOther()))
.map(problem -> String.format("%s / %s / %s", problem.getOneLevelContent(), problem.getTwoLevelContent(), problem.getThreeLevelContentOther()))
.collect(Collectors.joining("、")));
vo.setProblems(negativeBlames.stream()
.filter(blame -> StrUtil.isNotBlank(blame.getBlameName()) && StrUtil.isNotBlank(blame.getBlameEmpNo()))
.map(blame -> blame.getBlameName() + "-" + blame.getBlameEmpNo())
.collect(Collectors.joining("、")));
// vo.setProblems(negativeBlames.stream()
// .filter(blame -> StrUtil.isNotBlank(blame.getBlameName()) && StrUtil.isNotBlank(blame.getBlameEmpNo()))
// .map(blame -> blame.getBlameName() + "-" + blame.getBlameEmpNo())
// .collect(Collectors.joining("、")));
if(finalMap.containsKey(item.getId())){
List<NegativeBlame> blames = finalMap.get(item.getId());
String data = blames.stream().filter(s -> StrUtil.isNotBlank(s.getBlameName()) && StrUtil.isNotBlank(s.getBlameEmpNo()))
.map(blame -> blame.getBlameName() + "-" + blame.getBlameEmpNo()).collect(Collectors.joining("、"));
vo.setBlames(data);
}
// AtomicInteger i = new AtomicInteger(0);
// List<ImageData> imageDataList = negativeFiles.stream().filter(file -> item.getId().equals(file.getNegtiveId()))
// // 过滤图片
@ -372,6 +386,8 @@ public class NegativeBookController {
return;
}
Map<String,List<NegativeFile>> maps= negativeFiles.stream().collect(Collectors.groupingBy(NegativeFile::getNegtiveId));
List<String> folderNames = new ArrayList<>();
// 临时保存下载的文件
String tempDir = "downloads";
@ -380,6 +396,7 @@ public class NegativeBookController {
String serialNumber =String.valueOf(negativeIds.indexOf(s) +1);
//问题附件
List<NegativeFile> fileUrls = maps.get(s);
Collections.reverse(fileUrls);
try {
Files.createDirectories(Paths.get(tempDir));

7
src/main/java/com/biutag/supervision/controller/rightsComfort/RightPersonController.java

@ -5,9 +5,11 @@ 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.entity.RpcInfringerResult;
import com.biutag.supervision.pojo.entity.RpcRightPerson;
import com.biutag.supervision.pojo.entity.SupDepart;
import com.biutag.supervision.pojo.param.RpcRightPersonQueryParam;
import com.biutag.supervision.service.RpcInfringerResultService;
import com.biutag.supervision.service.RpcRightPersonService;
import com.biutag.supervision.service.SupDepartService;
import lombok.RequiredArgsConstructor;
@ -31,6 +33,8 @@ public class RightPersonController {
private final SupDepartService departService;
@GetMapping
public Result<Page<RpcRightPerson>> list(RpcRightPersonQueryParam queryParam) {
LambdaQueryWrapper<RpcRightPerson> queryWrapper = new LambdaQueryWrapper<RpcRightPerson>()
@ -74,4 +78,7 @@ public class RightPersonController {
return Result.success();
}
}

75
src/main/java/com/biutag/supervision/controller/rightsComfort/RightsController.java

@ -1,16 +1,39 @@
package com.biutag.supervision.controller.rightsComfort;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.excel.EasyExcel;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
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.constants.enums.RpcApplyTypeEnum;
import com.biutag.supervision.mapper.RpcApplyMapper;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.dto.DataPetition12337ExportDto;
import com.biutag.supervision.pojo.entity.Negative;
import com.biutag.supervision.pojo.entity.RpcApply;
import com.biutag.supervision.pojo.entity.RpcApplyPerson;
import com.biutag.supervision.pojo.entity.RpcInfringerResult;
import com.biutag.supervision.pojo.param.RpcApplyQueryParam;
import com.biutag.supervision.pojo.vo.RightsExcelVo;
import com.biutag.supervision.pojo.vo.RpcApplyVo;
import com.biutag.supervision.service.RpcApplyPersonService;
import com.biutag.supervision.service.RpcApplyService;
import com.biutag.supervision.service.RpcInfringerResultService;
import jakarta.servlet.http.HttpServletResponse;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.*;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* @author wxc
* @date 2025/2/13
@ -22,19 +45,69 @@ public class RightsController {
private final RpcApplyService rpcApplyService;
private final RpcApplyMapper rpcApplyMapper;
private final RpcApplyPersonService rpcApplyPersonService;
private final RpcInfringerResultService infringerResultService;
@GetMapping
public Result<Page<RpcApplyVo>> list(RpcApplyQueryParam queryParam) {
// return Result.success(rpcApplyService.page(queryParam, RpcApplyTypeEnum.RIGHTS_PROTECTION.getValue()));
return Result.success(rpcApplyService.pageData(queryParam,RpcApplyTypeEnum.RIGHTS_PROTECTION.getValue()));
}
@GetMapping("/getInfringerData/{id}")
public Result getInfringerData(@PathVariable String id){
List<RpcInfringerResult> results = infringerResultService.list(
new LambdaQueryWrapper<RpcInfringerResult>()
.eq(RpcInfringerResult::getRpcId,id)
);
return Result.success(results);
}
@DeleteMapping("{id}")
public Result<Void> del(@PathVariable String id) {
rpcApplyPersonService.removeById(id);
return Result.success();
}
@GetMapping("/export/result")
public void exportResult(RpcApplyQueryParam queryParam, HttpServletResponse response) throws IOException {
QueryWrapper<RpcApply> queryWrapper = new QueryWrapper<>();
queryWrapper.like(StrUtil.isNotBlank(queryParam.getApplicantEmpName()), "a.applicant_emp_name", queryParam.getApplicantEmpName())
.eq(StrUtil.isNotBlank(queryParam.getDepartId()), "a.depart_id", queryParam.getDepartId())
.eq("a.type", RpcApplyTypeEnum.RIGHTS_PROTECTION.getValue())
.eq(StrUtil.isNotBlank(queryParam.getCaseType()),"a.case_type",queryParam.getCaseType())
.like(StrUtil.isNotBlank(queryParam.getCaseCategory()),"a.case_category",queryParam.getCaseCategory())
.eq(StrUtil.isNotBlank(queryParam.getRpcStatus()), "a.rpc_status", queryParam.getRpcStatus())
.orderByDesc("a.crt_time");
if (queryParam.getApplyDate() != null && queryParam.getApplyDate().size() == 2) {
queryWrapper.between("a.apply_date", queryParam.getApplyDate().get(0), queryParam.getApplyDate().get(1));
}
if (queryParam.getHappenTime() != null && queryParam.getHappenTime().size() == 2) {
queryWrapper.between("a.happen_time", queryParam.getHappenTime().get(0), queryParam.getHappenTime().get(1));
}
if(StrUtil.isNotBlank(queryParam.getCode())){
queryWrapper.eq("a.verified","2");
}
Page<RpcApplyVo> Records= rpcApplyMapper.queryRightsPage(Page.of(queryParam.getCurrent(), queryParam.getSize()), queryWrapper);
List<RpcApplyVo> applyList = Records.getRecords();
if(CollectionUtil.isNotEmpty(applyList)){
List<RightsExcelVo> excelVos = BeanUtil.copyToList(applyList, RightsExcelVo.class);
excelVos= excelVos.stream().map(s->{
String type = "1".equals(s.getCaseType())?"刑事案件":"民事案件";
s.setCaseType(type);
return s;
}).toList();
String headerValue = "attachment; filename=\"" + URLEncoder.encode(String.format("长沙市公安局维护民警执法权威案件督办表_%s.xlsx", DateUtil.format(new Date(), "yyMMdd")), "UTF-8") + "\"";
response.setHeader("Content-Disposition", headerValue);
response.setContentType("application/octet-stream");
EasyExcel.write(response.getOutputStream(), RightsExcelVo.class).inMemory(Boolean.TRUE).sheet("长沙市公安局维护民警执法权威案件督办").doWrite(excelVos);
}
}
}

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

@ -124,6 +124,7 @@ public class Job {
private final RpcApplySuperviseService rpcApplySuperviseService;
private final TXsshrxxbService tXsshrxxbService;
private final RpcPersonService rpcPersonService;
private final SupDictDataService dictDataService;
// 每天一次 23:30:00
//todo 维权信息
@ -133,13 +134,20 @@ public class Job {
log.info("维权信息抓取中---------------------");
// 维权
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// Date startTime = sdf.parse("2025-01-01 00:00:00");
// Date endTime = sdf.parse("2025-12-30 00:00:00");
Date startTime = sdf.parse("2025-01-01 00:00:00");
Date endTime = sdf.parse("2025-12-30 00:00:00");
Date startTime = Date.from(LocalDateTime.now().minusDays(1).withHour(0).withMinute(0).withSecond(0).withNano(0).atZone(ZoneId.systemDefault()).toInstant());
Date endTime = Date.from(LocalDateTime.now().minusDays(1).withHour(23).withMinute(59).withSecond(59).atZone(ZoneId.systemDefault()).toInstant());
// Date startTime = Date.from(LocalDateTime.now().minusDays(1).withHour(0).withMinute(0).withSecond(0).withNano(0).atZone(ZoneId.systemDefault()).toInstant());
// Date endTime = Date.from(LocalDateTime.now().minusDays(1).withHour(23).withMinute(59).withSecond(59).atZone(ZoneId.systemDefault()).toInstant());
//获取过滤关键字
List<SupDictData> dictData =dictDataService.list(new LambdaQueryWrapper<SupDictData>().eq(SupDictData::getDictType,"protectRightsFile"));
List<String> files = new ArrayList<>();
if(CollectionUtil.isNotEmpty(dictData)){
files=dictData.stream().map(s->s.getDictValue()).toList();
}
List<DwdAsjZfbaShrxx> shrxxList = dwdAsjZfbaShrxxService.list(startTime,endTime);
if(CollectionUtil.isEmpty(shrxxList)){
log.info("时间范围内无受害人信息");
@ -204,12 +212,17 @@ public class Job {
//案件 rpc_apply
for (String ajbh : ajbhList){
try{
//获取案件基本信息
//获取案件基本信息
DwdAsjZfbaAjjbxx ajjbxx = dwdAsjZfbaAjjbxxMapper.selectByAjbh(ajbh);
if(ObjectUtil.isEmpty(ajjbxx)){
log.info("案件[" + ajbh + "]未找到基本信息");
continue;
}
List<String> file = files.stream().filter(s->ajjbxx.getAjlbmc().contains(s)).toList();
if(CollectionUtil.isNotEmpty(file)){
log.info("案件["+ajbh+"]已过滤,案件类型名称为["+ajjbxx.getAjlbmc()+"]");
continue;
}
//获取受害人列表
List<TXsshrxxb> tXsshrxxbList = xsshrxxbMap.get(ajbh);
if(CollectionUtil.isEmpty(tXsshrxxbList)){
@ -301,7 +314,9 @@ public class Job {
}
}
if(StrUtil.isNotBlank(rpcApply.getHandleDepartId())){
rpcApply.setHandleDepartName(ajjbxx.getBadwidmc());
}
}
@ -328,6 +343,14 @@ public class Job {
.map(DwdAsjZfbaWfrwfxx::getClfs)
.collect(Collectors.joining(";"));
rpcApply.setInfringerName(suspectNames);
String jysm = wfrwfxxes.stream()
.filter(obj -> StrUtil.isNotBlank(obj.getJysm()))
.map(DwdAsjZfbaWfrwfxx::getClfs)
.collect(Collectors.joining(";"));
rpcApply.setJysm(jysm);
// 只有当存在实际处理方式时才覆盖默认值
if (StrUtil.isNotBlank(disposeMethods)) {
rpcApply.setInfringerHandle(disposeMethods);
@ -389,10 +412,6 @@ public class Job {
}
}
}

3
src/main/java/com/biutag/supervision/pojo/entity/DwdAsjZfbaWfrwfxx.java

@ -26,6 +26,9 @@ public class DwdAsjZfbaWfrwfxx {
@TableField("xbmc")
private String xbmc;
@TableField("jysm")
private String jysm;
}

3
src/main/java/com/biutag/supervision/pojo/entity/RpcApply.java

@ -124,4 +124,7 @@ public class RpcApply {
@TableField("case_name")
private String caseName;
@TableField("jysm")
private String jysm;
}

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

@ -21,6 +21,10 @@ public class RpcApplyQueryParam extends BasePage {
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private List<Date> happenTime;
private String caseType;
private String caseCategory;
private String applicantEmpName;
private String departId;

50
src/main/java/com/biutag/supervision/pojo/vo/RightsExcelVo.java

@ -0,0 +1,50 @@
package com.biutag.supervision.pojo.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.time.LocalDateTime;
@Data
public class RightsExcelVo {
@ExcelProperty({"长沙市公安局维护民警执法权威案件督办表","案件管辖公安机关"})
private String departName;
@ExcelProperty({"长沙市公安局维护民警执法权威案件督办表","案件名称"})
private String caseName;
@ExcelProperty({"长沙市公安局维护民警执法权威案件督办表","发案时间"})
private LocalDateTime happenTime;
@ExcelProperty({"长沙市公安局维护民警执法权威案件督办表","简要案情"})
private String factReason;
@ExcelProperty({"长沙市公安局维护民警执法权威案件督办表","受(立)案情况"})
private String caseType;
@ExcelProperty({"长沙市公安局维护民警执法权威案件督办表","采取强制措施情况","行政处罚情况"})
private String jysm;
@ExcelProperty({"长沙市公安局维护民警执法权威案件督办表","采取强制措施情况","撤案时间"})
private String withdrawalTime;
@ExcelProperty({"长沙市公安局维护民警执法权威案件督办表","采取强制措施情况","刑拘时间"})
private String detentionTime;
@ExcelProperty({"长沙市公安局维护民警执法权威案件督办表","采取强制措施情况","取保候审时间"})
private String pendingTime;
@ExcelProperty({"长沙市公安局维护民警执法权威案件督办表","采取强制措施情况","监视居住时间"})
private String residential;
@ExcelProperty({"长沙市公安局维护民警执法权威案件督办表","采取强制措施情况","起诉时间"})
private String prosecution;
@ExcelProperty({"长沙市公安局维护民警执法权威案件督办表","抚慰民辅警情况"})
private String officerSituation;
@ExcelProperty({"长沙市公安局维护民警执法权威案件督办表","案件报送情况"})
private String caseSubmission;
@ExcelProperty({"长沙市公安局维护民警执法权威案件督办表","变更强制措施报送情况"})
private String measure;
}

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

@ -123,4 +123,6 @@ public class RpcApplyVo {
private String caseSubmission;
private String changeMandate;
private String jysm;
}

2
src/main/java/com/biutag/supervision/service/NegativeBlameService.java

@ -39,7 +39,7 @@ public class NegativeBlameService extends ServiceImpl<NegativeBlameMapper, Negat
}
public List<NegativeBlame> listByNegativeIds(Collection<String> negativeIds) {
return list(new LambdaQueryWrapper<NegativeBlame>().eq(NegativeBlame::getNegativeId, negativeIds));
return list(new LambdaQueryWrapper<NegativeBlame>().in(NegativeBlame::getNegativeId, negativeIds));
}
public boolean remove(String negativeId) {

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

@ -102,6 +102,8 @@ public class RpcApplyService extends ServiceImpl<RpcApplyMapper, RpcApply> {
queryWrapper.like(StrUtil.isNotBlank(queryParam.getApplicantEmpName()), "a.applicant_emp_name", queryParam.getApplicantEmpName())
.eq(StrUtil.isNotBlank(queryParam.getDepartId()), "a.depart_id", queryParam.getDepartId())
.eq("a.type", type)
.eq(StrUtil.isNotBlank(queryParam.getCaseType()),"a.case_type",queryParam.getCaseType())
.like(StrUtil.isNotBlank(queryParam.getCaseCategory()),"a.case_category",queryParam.getCaseCategory())
.eq(StrUtil.isNotBlank(queryParam.getRpcStatus()), "a.rpc_status", queryParam.getRpcStatus())
.orderByDesc("a.crt_time");
if (queryParam.getApplyDate() != null && queryParam.getApplyDate().size() == 2) {

3
src/main/resources/mapper/RpcApplyMapper.xml

@ -19,6 +19,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
rap.emp_no as applicantEmpNo,
a.happen_time as happentime,
a.depart_name as departName,
a.case_type as caseType,
a.apply_date as applyDate,
a.case_category as caseCategory,
a.case_number as caseNumber,
a.fact_reason as factReason,
rap.id as personId,

3
src/main/resources/mapper/SamplingMapper.xml

@ -168,8 +168,7 @@
LEFT JOIN sup_depart b
on a.org_id = b.id
<where>
sup.position is null
and a.del =0
a.del =0
<if test="policeVos != null ">
and a.id_code in
<foreach collection="policeVos" item="item" open="(" separator="," close=")">

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

@ -61,7 +61,7 @@ class SupervisionApplicationTests {
void testFun() throws ParseException {
job.testFun();
job.rights();
}
public String getPathTrace(SupDepart depart) {

Loading…
Cancel
Save