25 changed files with 1115 additions and 21 deletions
@ -0,0 +1,161 @@ |
|||||||
|
package com.biutag.supervision.controller.books; |
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil; |
||||||
|
import cn.hutool.core.collection.CollectionUtil; |
||||||
|
import cn.hutool.core.util.StrUtil; |
||||||
|
import com.alibaba.excel.EasyExcel; |
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||||
|
import com.biutag.supervision.constants.enums.ProblemSourcesEnum; |
||||||
|
import com.biutag.supervision.mapper.DataThreadMapper; |
||||||
|
import com.biutag.supervision.pojo.Result; |
||||||
|
import com.biutag.supervision.pojo.entity.DataMailbox; |
||||||
|
import com.biutag.supervision.pojo.entity.SupDictData; |
||||||
|
import com.biutag.supervision.pojo.param.DataPetitionComplaintQueryParam; |
||||||
|
import com.biutag.supervision.pojo.param.DataThreadQueryParam; |
||||||
|
import com.biutag.supervision.pojo.vo.DataPetitionComplaintVo; |
||||||
|
import com.biutag.supervision.pojo.vo.DataThreaVo; |
||||||
|
import com.biutag.supervision.pojo.vo.ExcelDataThreaVo; |
||||||
|
import com.biutag.supervision.pojo.vo.ExportGabxfVo; |
||||||
|
import com.biutag.supervision.service.DataMailboxService; |
||||||
|
import com.biutag.supervision.service.DataPetitionComplaintService; |
||||||
|
import com.biutag.supervision.service.DataThreadService; |
||||||
|
import com.biutag.supervision.service.SupDictDataService; |
||||||
|
import com.biutag.supervision.util.CommonUtil; |
||||||
|
import jakarta.servlet.http.HttpServletResponse; |
||||||
|
import lombok.RequiredArgsConstructor; |
||||||
|
import org.springframework.web.bind.annotation.*; |
||||||
|
|
||||||
|
import java.io.IOException; |
||||||
|
import java.net.URLEncoder; |
||||||
|
import java.util.ArrayList; |
||||||
|
import java.util.List; |
||||||
|
import java.util.concurrent.atomic.AtomicInteger; |
||||||
|
|
||||||
|
@RestController |
||||||
|
@RequiredArgsConstructor |
||||||
|
@RequestMapping("/books/dataThread") |
||||||
|
public class DataThreadControllers { |
||||||
|
|
||||||
|
private final DataThreadService dataThreadService; |
||||||
|
|
||||||
|
private final DataThreadMapper dataThreadMapper; |
||||||
|
|
||||||
|
private final DataPetitionComplaintService dataPetitionComplaintService; |
||||||
|
|
||||||
|
private final DataMailboxService dataMailboxService; |
||||||
|
|
||||||
|
private final SupDictDataService dictDataService; |
||||||
|
|
||||||
|
@GetMapping |
||||||
|
public Result<Object> page(DataThreadQueryParam queryParam){ |
||||||
|
return dataThreadService.pageList(queryParam); |
||||||
|
} |
||||||
|
|
||||||
|
//台帐导出
|
||||||
|
@GetMapping("export") |
||||||
|
public void exportByGabXf(DataThreadQueryParam queryParam, HttpServletResponse response) throws IOException { |
||||||
|
queryParam.setCurrent(1); |
||||||
|
queryParam.setSize(100000); |
||||||
|
if(CollectionUtil.isNotEmpty(queryParam.getCreateTime())){ |
||||||
|
// queryWrapper.between(DataThreaVo::getCrtTime,queryParam.getCrtTime().get(0),queryParam.getCrtTime().get(1));
|
||||||
|
queryParam.setStartCrtTime(queryParam.getCreateTime().get(0)); |
||||||
|
queryParam.setEndCrtTime(queryParam.getCreateTime().get(1)); |
||||||
|
} |
||||||
|
//投诉时间
|
||||||
|
if(CollectionUtil.isNotEmpty(queryParam.getDiscoveryTime())){ |
||||||
|
// queryWrapper.between(DataThreaVo::getDiscoveryTime,queryParam.getDiscoveryTime().get(0),queryParam.getDiscoveryTime().get(1));
|
||||||
|
queryParam.setStartDiscoveryTime(queryParam.getDiscoveryTime().get(0)); |
||||||
|
queryParam.setEndDiscoveryTime(queryParam.getDiscoveryTime().get(1)); |
||||||
|
} |
||||||
|
List<DataThreaVo> dataThreaVoList = new ArrayList<>(); |
||||||
|
if(StrUtil.isNotBlank(queryParam.getProblemSourcesCode())){ |
||||||
|
if("21".equals(queryParam.getProblemSourcesCode()) || "22".equals(queryParam.getProblemSourcesCode())){ |
||||||
|
DataPetitionComplaintQueryParam dataPetitionComplaintQueryParam = new DataPetitionComplaintQueryParam(); |
||||||
|
BeanUtil.copyProperties(queryParam,dataPetitionComplaintQueryParam); |
||||||
|
List<DataPetitionComplaintVo> DataPetitionComplaint = dataPetitionComplaintService.page(dataPetitionComplaintQueryParam).getRecords(); |
||||||
|
dataThreaVoList= CommonUtil.copyBeanList(DataPetitionComplaint,DataThreaVo.class); |
||||||
|
} |
||||||
|
else{ |
||||||
|
LambdaQueryWrapper<DataMailbox> wrapper = new LambdaQueryWrapper<DataMailbox>() |
||||||
|
.eq(DataMailbox::getProblemSourcesCode, ProblemSourcesEnum.JZXX.getValue()) |
||||||
|
.like(StrUtil.isNotBlank(queryParam.getOriginId()), DataMailbox::getOriginId, queryParam.getOriginId()) |
||||||
|
.like(StrUtil.isNotBlank(queryParam.getThingDesc()), DataMailbox::getThingDesc, queryParam.getThingDesc()); |
||||||
|
if (queryParam.getDiscoveryTime().size() == 2) { |
||||||
|
wrapper.between(DataMailbox::getDiscoveryTime, queryParam.getDiscoveryTime().get(0), queryParam.getDiscoveryTime().get(1)); |
||||||
|
} |
||||||
|
if (StrUtil.isNotBlank(queryParam.getResponderKey()) && StrUtil.isNotBlank(queryParam.getResponderValue())) { |
||||||
|
switch (queryParam.getResponderKey()) { |
||||||
|
case "name": |
||||||
|
wrapper.like(DataMailbox::getResponderName, queryParam.getResponderValue()); |
||||||
|
break; |
||||||
|
case "phone": |
||||||
|
wrapper.like(DataMailbox::getContactPhone, queryParam.getResponderValue()); |
||||||
|
break; |
||||||
|
} |
||||||
|
} |
||||||
|
List<DataMailbox> dataMailboxes =dataMailboxService.page(Page.of(queryParam.getCurrent(), queryParam.getSize()), wrapper).getRecords(); |
||||||
|
dataThreaVoList=CommonUtil.copyBeanList(dataMailboxes,DataThreaVo.class); |
||||||
|
} |
||||||
|
}else{ |
||||||
|
dataThreaVoList = dataThreadMapper.queryPage(Page.of(queryParam.getCurrent(), queryParam.getSize()),queryParam).getRecords(); |
||||||
|
} |
||||||
|
//初重信访
|
||||||
|
List<SupDictData> initialPetitionDict = dictDataService.listByDictType("initialPetition"); |
||||||
|
//状态
|
||||||
|
List<SupDictData> distributionStateDict = dictDataService.listByDictType("distributionState"); |
||||||
|
|
||||||
|
AtomicInteger i = new AtomicInteger(1); |
||||||
|
List<ExcelDataThreaVo> list = dataThreaVoList.stream().map(item -> { |
||||||
|
ExcelDataThreaVo excelDataThreaVo = new ExcelDataThreaVo(); |
||||||
|
BeanUtil.copyProperties(item, excelDataThreaVo); |
||||||
|
excelDataThreaVo.setDepartName(StrUtil.isNotBlank(item.getSecondDepartName())?item.getSecondDepartName():"" + item.getThirdDepartName()); |
||||||
|
if(StrUtil.isNotBlank(excelDataThreaVo.getChannelForFilingComplaints())){ |
||||||
|
excelDataThreaVo.setChannelForFilingComplaints(("gabxf").equals(item.getTableName())?("21".equals(item.getProblemSourcesCode())?"国家信访":"公安部信访"):"局长信箱"); |
||||||
|
} |
||||||
|
if(StrUtil.isNotBlank(excelDataThreaVo.getProblemSourcesCode())){ |
||||||
|
excelDataThreaVo.setProblemSourcesCode(("gabxf").equals(item.getTableName())?("21".equals(item.getProblemSourcesCode())?"国家信访":"公安部信访"):"局长信箱"); |
||||||
|
} |
||||||
|
//群众集访
|
||||||
|
if(StrUtil.isNotBlank(item.getMassVisits())){ |
||||||
|
excelDataThreaVo.setMassVisits("true".equals(item.getMassVisits())?"是":"否"); |
||||||
|
} |
||||||
|
if(StrUtil.isNotBlank(item.getDistributionState())){ |
||||||
|
excelDataThreaVo.setDistributionState("0".equals(item.getDistributionState())?"未分发":"已分发"); |
||||||
|
} |
||||||
|
if(StrUtil.isNotBlank(item.getInitialPetition())){ |
||||||
|
excelDataThreaVo.setInitialPetition( |
||||||
|
initialPetitionDict.stream().filter(s->s.getDictValue().equals(item.getInitialPetition())) |
||||||
|
.map(SupDictData::getDictLabel).toList().get(0) |
||||||
|
); |
||||||
|
} |
||||||
|
if(StrUtil.isNotBlank(item.getDistributionState())){ |
||||||
|
excelDataThreaVo.setDistributionState( |
||||||
|
distributionStateDict.stream().filter(s->s.getDictValue().equals(item.getDistributionState())) |
||||||
|
.map(SupDictData::getDictLabel).toList().get(0) |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
return excelDataThreaVo; |
||||||
|
}).toList(); |
||||||
|
|
||||||
|
String headerValue = "attachment; filename=\"" + URLEncoder.encode("1.xlsx", "UTF-8") + "\""; |
||||||
|
response.setHeader("Content-Disposition", headerValue); |
||||||
|
response.setContentType("application/octet-stream"); |
||||||
|
EasyExcel.write(response.getOutputStream(), ExcelDataThreaVo.class).inMemory(Boolean.TRUE).sheet(0).doWrite(list); |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
@DeleteMapping("/delDataThread") |
||||||
|
public Result delDataThread(DataThreadQueryParam queryParam){ |
||||||
|
if("gabxf".equals(queryParam.getTableName()) ){ |
||||||
|
dataPetitionComplaintService.removeById(queryParam.getOriginId()); |
||||||
|
}else{ |
||||||
|
dataMailboxService.removeById(queryParam.getOriginId()); |
||||||
|
} |
||||||
|
|
||||||
|
return Result.success(); |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,7 @@ |
|||||||
|
package com.biutag.supervision.mapper; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||||
|
import com.biutag.supervision.pojo.entity.DataMailboxBlame; |
||||||
|
|
||||||
|
public interface DataMailboxBlameMapper extends BaseMapper<DataMailboxBlame> { |
||||||
|
} |
||||||
@ -0,0 +1,7 @@ |
|||||||
|
package com.biutag.supervision.mapper; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||||
|
import com.biutag.supervision.pojo.entity.DataMailboxBlameRelation; |
||||||
|
|
||||||
|
public interface DataMailboxBlameRelationMapper extends BaseMapper<DataMailboxBlameRelation> { |
||||||
|
} |
||||||
@ -0,0 +1,14 @@ |
|||||||
|
package com.biutag.supervision.mapper; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Constants; |
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||||
|
import com.biutag.supervision.pojo.entity.DataMailbox; |
||||||
|
import com.biutag.supervision.pojo.vo.DataThreaVo; |
||||||
|
import org.apache.ibatis.annotations.Param; |
||||||
|
|
||||||
|
public interface DataMailboxMapper extends BaseMapper<DataMailbox> { |
||||||
|
|
||||||
|
Page<DataMailbox> queryPage(@Param("page") Page<DataMailbox> page, @Param(Constants.WRAPPER) LambdaQueryWrapper<DataMailbox> queryWrapper); |
||||||
|
} |
||||||
@ -0,0 +1,19 @@ |
|||||||
|
package com.biutag.supervision.mapper; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Constants; |
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||||
|
import com.biutag.supervision.pojo.entity.Confinement; |
||||||
|
import com.biutag.supervision.pojo.param.DataThreadQueryParam; |
||||||
|
import com.biutag.supervision.pojo.vo.ConfinementVo; |
||||||
|
import com.biutag.supervision.pojo.vo.DataThreaVo; |
||||||
|
import org.apache.ibatis.annotations.Mapper; |
||||||
|
import org.apache.ibatis.annotations.Param; |
||||||
|
|
||||||
|
@Mapper |
||||||
|
public interface DataThreadMapper { |
||||||
|
|
||||||
|
Page<DataThreaVo> queryPage(@Param("page") Page<DataThreaVo> page,@Param("query") DataThreadQueryParam queryParam); |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,76 @@ |
|||||||
|
package com.biutag.supervision.pojo.entity; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField; |
||||||
|
import com.baomidou.mybatisplus.annotation.TableId; |
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||||
|
import lombok.Getter; |
||||||
|
import lombok.Setter; |
||||||
|
|
||||||
|
import java.time.LocalDate; |
||||||
|
import java.time.LocalDateTime; |
||||||
|
|
||||||
|
@Getter |
||||||
|
@Setter |
||||||
|
public class DataMailbox { |
||||||
|
|
||||||
|
@TableId |
||||||
|
@TableField("origin_id") |
||||||
|
private String originId; |
||||||
|
|
||||||
|
//问题发现时间
|
||||||
|
@TableField("discoveryTime") |
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm") |
||||||
|
private LocalDateTime discoveryTime; |
||||||
|
|
||||||
|
//反映人姓名
|
||||||
|
@TableField("responderName") |
||||||
|
private String responderName; |
||||||
|
//联系电话
|
||||||
|
@TableField("contactPhone") |
||||||
|
private String contactPhone; |
||||||
|
//简要描述
|
||||||
|
@TableField("thingDesc") |
||||||
|
private String thingDesc; |
||||||
|
//问题来源
|
||||||
|
@TableField("problemSources") |
||||||
|
private String problemSources; |
||||||
|
//问题来源code
|
||||||
|
@TableField("problemSourcesCode") |
||||||
|
private String problemSourcesCode; |
||||||
|
//业务类型
|
||||||
|
@TableField("businessTypeCode") |
||||||
|
private String businessTypeCode; |
||||||
|
|
||||||
|
//业务类别名称
|
||||||
|
@TableField("businessTypeName") |
||||||
|
private String businessTypeName; |
||||||
|
//核查情况
|
||||||
|
@TableField("checkStatus") |
||||||
|
private String checkStatus; |
||||||
|
//核查情况
|
||||||
|
@TableField("checkStatusName") |
||||||
|
private String checkStatusName; |
||||||
|
//问题核查情况
|
||||||
|
@TableField("checkStatusDesc") |
||||||
|
private String checkStatusDesc; |
||||||
|
//办理状态
|
||||||
|
@TableField("processingStatus") |
||||||
|
private String processingStatus; |
||||||
|
//追责对象
|
||||||
|
@TableField("accountabilityTarget") |
||||||
|
private String accountabilityTarget; |
||||||
|
|
||||||
|
@TableField("crtTime") |
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm") |
||||||
|
private LocalDateTime crtTime; |
||||||
|
|
||||||
|
@TableField("involved_issue") |
||||||
|
private String involvedIssue; |
||||||
|
|
||||||
|
@TableField("handleSecondDepartName") |
||||||
|
private String handleSecondDepartName; |
||||||
|
|
||||||
|
@TableField("handleThreeDepartName") |
||||||
|
private String handleThreeDepartName; |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,57 @@ |
|||||||
|
package com.biutag.supervision.pojo.entity; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.Getter; |
||||||
|
import lombok.Setter; |
||||||
|
import lombok.experimental.Accessors; |
||||||
|
|
||||||
|
import java.time.LocalDateTime; |
||||||
|
|
||||||
|
@Getter |
||||||
|
@Setter |
||||||
|
@Accessors(chain = true) |
||||||
|
public class DataMailboxBlame { |
||||||
|
|
||||||
|
@TableField |
||||||
|
private String id; |
||||||
|
|
||||||
|
@TableField("origin_id") |
||||||
|
private String originId; |
||||||
|
|
||||||
|
//涉及类型
|
||||||
|
@TableField("type") |
||||||
|
private String type; |
||||||
|
|
||||||
|
// 涉及警号
|
||||||
|
@TableField("blameEmpNo") |
||||||
|
private String blameEmpNo; |
||||||
|
|
||||||
|
//身份证
|
||||||
|
@TableField("BlameIdCode") |
||||||
|
private String BlameIdCode; |
||||||
|
//涉及人项目
|
||||||
|
@TableField("BlameName") |
||||||
|
private String BlameName; |
||||||
|
|
||||||
|
//
|
||||||
|
@TableField("crtTime") |
||||||
|
private LocalDateTime crtTime; |
||||||
|
|
||||||
|
//
|
||||||
|
@TableField("updTime") |
||||||
|
private LocalDateTime updTime; |
||||||
|
|
||||||
|
|
||||||
|
// 处理结果
|
||||||
|
@TableField("handleResultCode") |
||||||
|
private String handleResultCode; |
||||||
|
|
||||||
|
// 处理结果
|
||||||
|
@TableField("handleResultName") |
||||||
|
private String handleResultName; |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,50 @@ |
|||||||
|
package com.biutag.supervision.pojo.entity; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField; |
||||||
|
import com.baomidou.mybatisplus.annotation.TableId; |
||||||
|
import lombok.Getter; |
||||||
|
import lombok.Setter; |
||||||
|
|
||||||
|
@Getter |
||||||
|
@Setter |
||||||
|
public class DataMailboxBlameRelation { |
||||||
|
|
||||||
|
//
|
||||||
|
@TableId |
||||||
|
private String id; |
||||||
|
|
||||||
|
// 清单id
|
||||||
|
@TableField("origin_id") |
||||||
|
private String originId; |
||||||
|
|
||||||
|
// 关联涉及人
|
||||||
|
@TableField("blameId") |
||||||
|
private String blameId; |
||||||
|
|
||||||
|
//
|
||||||
|
@TableField("oneLevelCode") |
||||||
|
private String oneLevelCode; |
||||||
|
|
||||||
|
//
|
||||||
|
@TableField("twoLevelCode") |
||||||
|
private String twoLevelCode; |
||||||
|
|
||||||
|
//
|
||||||
|
@TableField("oneLevelContent") |
||||||
|
private String oneLevelContent; |
||||||
|
|
||||||
|
//
|
||||||
|
@TableField("twoLevelContent") |
||||||
|
private String twoLevelContent; |
||||||
|
|
||||||
|
@TableField("threeLevelCode") |
||||||
|
private String threeLevelCode; |
||||||
|
|
||||||
|
@TableField("threeLevelContent") |
||||||
|
private String threeLevelContent; |
||||||
|
|
||||||
|
// 其他内容
|
||||||
|
@TableField("threeLevelContentOther") |
||||||
|
private String threeLevelContentOther; |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,54 @@ |
|||||||
|
package com.biutag.supervision.pojo.param; |
||||||
|
|
||||||
|
import lombok.Getter; |
||||||
|
import lombok.Setter; |
||||||
|
import org.springframework.data.domain.Page; |
||||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||||
|
|
||||||
|
import java.time.LocalDateTime; |
||||||
|
import java.util.ArrayList; |
||||||
|
import java.util.Date; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
@Getter |
||||||
|
@Setter |
||||||
|
public class DataThreadQueryParam extends BasePage { |
||||||
|
//信件编号
|
||||||
|
private String originId; |
||||||
|
// key: 信访人姓名、信访人电话
|
||||||
|
private String responderKey; |
||||||
|
//value
|
||||||
|
private String responderValue; |
||||||
|
//初重访
|
||||||
|
private String initialPetition; |
||||||
|
|
||||||
|
//具体内容
|
||||||
|
private String thingDesc; |
||||||
|
//是否分发
|
||||||
|
private String distributionState; |
||||||
|
//数据来源
|
||||||
|
private String problemSourcesCode; |
||||||
|
|
||||||
|
private String tableName; |
||||||
|
//信访时间
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||||
|
private List<Date> discoveryTime = new ArrayList<>(); |
||||||
|
//录入时间
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||||
|
private List<Date> createTime = new ArrayList<>(); |
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||||
|
private Date startCrtTime; |
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||||
|
private Date endCrtTime; |
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||||
|
private Date startDiscoveryTime; |
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||||
|
private Date endDiscoveryTime; |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,86 @@ |
|||||||
|
package com.biutag.supervision.pojo.vo; |
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||||
|
|
||||||
|
import java.time.LocalDateTime; |
||||||
|
|
||||||
|
public class DataComplaintVo { |
||||||
|
|
||||||
|
// 信件编号
|
||||||
|
private String originId; |
||||||
|
|
||||||
|
// 投诉渠道
|
||||||
|
private String channelForFilingComplaints; |
||||||
|
|
||||||
|
// 受理层级
|
||||||
|
private String acceptanceLevel; |
||||||
|
|
||||||
|
// 登记时间
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm") |
||||||
|
private LocalDateTime discoveryTime; |
||||||
|
|
||||||
|
//接访领导姓名
|
||||||
|
private String receivingLeaderName; |
||||||
|
// 投诉人
|
||||||
|
private String responderName; |
||||||
|
|
||||||
|
// 投诉人电话
|
||||||
|
private String responderPhone; |
||||||
|
|
||||||
|
// 投诉人电话
|
||||||
|
private String responderIdCode; |
||||||
|
|
||||||
|
// 初重信访
|
||||||
|
private String initialPetition; |
||||||
|
|
||||||
|
// 缠访闹访
|
||||||
|
private Boolean entanglementVisits; |
||||||
|
|
||||||
|
// 群众集访
|
||||||
|
private Boolean massVisits; |
||||||
|
|
||||||
|
// 涉嫌问题
|
||||||
|
private String involveProblem; |
||||||
|
|
||||||
|
// 业务类别
|
||||||
|
private String businessTypeName; |
||||||
|
|
||||||
|
// 涉及警种名称
|
||||||
|
private String policeTypeName; |
||||||
|
|
||||||
|
// 具体内容
|
||||||
|
private String thingDesc; |
||||||
|
|
||||||
|
// 涉及单位 二级
|
||||||
|
private String secondDepartId; |
||||||
|
|
||||||
|
//
|
||||||
|
private String secondDepartName; |
||||||
|
|
||||||
|
// 所对
|
||||||
|
private String thirdDepartId; |
||||||
|
|
||||||
|
private String thirdDepartName; |
||||||
|
|
||||||
|
private LocalDateTime createTime; |
||||||
|
|
||||||
|
private LocalDateTime updateTime; |
||||||
|
|
||||||
|
// 来源
|
||||||
|
private String problemSourcesCode; |
||||||
|
|
||||||
|
// 分发状态
|
||||||
|
private String distributionState; |
||||||
|
|
||||||
|
private String negativeId; |
||||||
|
|
||||||
|
// 信访办理情况
|
||||||
|
private String petitionProcessingStatus; |
||||||
|
//涉及问题
|
||||||
|
private String involvedIssue; |
||||||
|
//是否属实
|
||||||
|
private String checkStatusName; |
||||||
|
//追责对象
|
||||||
|
private String accountabilityTarget; |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,54 @@ |
|||||||
|
package com.biutag.supervision.pojo.vo; |
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||||
|
import lombok.Getter; |
||||||
|
import lombok.Setter; |
||||||
|
|
||||||
|
import java.time.LocalDateTime; |
||||||
|
|
||||||
|
@Getter |
||||||
|
@Setter |
||||||
|
public class DataThreaVo { |
||||||
|
//线索id
|
||||||
|
private String originId; |
||||||
|
//涉及问题
|
||||||
|
private String involvedIssue; |
||||||
|
//投诉渠道
|
||||||
|
private String channelForFilingComplaints; |
||||||
|
//登记日期
|
||||||
|
private LocalDateTime discoveryTime; |
||||||
|
//信访人
|
||||||
|
private String responderName; |
||||||
|
//信访人电话号码
|
||||||
|
private String responderPhone; |
||||||
|
//具体内容
|
||||||
|
private String thingDesc; |
||||||
|
//初重信访
|
||||||
|
private String initialPetition; |
||||||
|
//群众集访
|
||||||
|
private String massVisits; |
||||||
|
//办理情况
|
||||||
|
private String petitionProcessingStatus; |
||||||
|
//接访领导
|
||||||
|
private String receivingLeaderName; |
||||||
|
//是否属实
|
||||||
|
private String checkStatusName; |
||||||
|
//信访方式
|
||||||
|
private String petitionType; |
||||||
|
//数据来源表单
|
||||||
|
private String tableName; |
||||||
|
//信访编码
|
||||||
|
private String problemSourcesCode; |
||||||
|
//状态
|
||||||
|
private String distributionState; |
||||||
|
|
||||||
|
private String secondDepartName; |
||||||
|
|
||||||
|
private String thirdDepartName; |
||||||
|
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm") |
||||||
|
private LocalDateTime crtTime; |
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,70 @@ |
|||||||
|
package com.biutag.supervision.pojo.vo; |
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty; |
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||||
|
import lombok.Getter; |
||||||
|
import lombok.Setter; |
||||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||||
|
|
||||||
|
import java.time.LocalDateTime; |
||||||
|
|
||||||
|
@Getter |
||||||
|
@Setter |
||||||
|
public class ExcelDataThreaVo { |
||||||
|
//线索id
|
||||||
|
@ExcelProperty({"信访编号"}) |
||||||
|
private String originId; |
||||||
|
|
||||||
|
@ExcelProperty({"投诉渠道"}) |
||||||
|
private String channelForFilingComplaints; |
||||||
|
//登记日期
|
||||||
|
@ExcelProperty({"登记日期"}) |
||||||
|
private LocalDateTime discoveryTime; |
||||||
|
//信访人
|
||||||
|
@ExcelProperty({"信访人"}) |
||||||
|
private String responderName; |
||||||
|
//信访人电话号码
|
||||||
|
@ExcelProperty({"信访电话号码"}) |
||||||
|
private String responderPhone; |
||||||
|
//具体内容
|
||||||
|
@ExcelProperty({"具体内容"}) |
||||||
|
private String thingDesc; |
||||||
|
//初重信访
|
||||||
|
@ExcelProperty({"初重信访"}) |
||||||
|
private String initialPetition; |
||||||
|
//群众集访
|
||||||
|
@ExcelProperty({"群众集访"}) |
||||||
|
private String massVisits; |
||||||
|
//办理情况
|
||||||
|
@ExcelProperty({"办理情况"}) |
||||||
|
private String petitionProcessingStatus; |
||||||
|
//接访领导
|
||||||
|
@ExcelProperty({"接访领导"}) |
||||||
|
private String receivingLeaderName; |
||||||
|
//是否属实
|
||||||
|
@ExcelProperty({"是否属实"}) |
||||||
|
private String checkStatusName; |
||||||
|
//信访方式
|
||||||
|
@ExcelProperty({"信访方式"}) |
||||||
|
private String petitionType; |
||||||
|
//数据来源表单
|
||||||
|
@ExcelProperty({"信访类型"}) |
||||||
|
private String tableName; |
||||||
|
//信访编码
|
||||||
|
@ExcelProperty({"投诉渠道"}) |
||||||
|
private String problemSourcesCode; |
||||||
|
//状态
|
||||||
|
@ExcelProperty({"状态"}) |
||||||
|
private String distributionState; |
||||||
|
|
||||||
|
@ExcelProperty({"被投诉机构"}) |
||||||
|
private String departName; |
||||||
|
//涉及问题
|
||||||
|
@ExcelProperty({"涉及问题"}) |
||||||
|
private String involvedIssue; |
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm") |
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") |
||||||
|
@ExcelProperty({"录入时间"}) |
||||||
|
private String crtTime; |
||||||
|
} |
||||||
@ -0,0 +1,12 @@ |
|||||||
|
package com.biutag.supervision.service; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||||
|
import com.biutag.supervision.mapper.DataMailboxBlameRelationMapper; |
||||||
|
import com.biutag.supervision.pojo.entity.DataMailboxBlameRelation; |
||||||
|
import lombok.RequiredArgsConstructor; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
@Service |
||||||
|
@RequiredArgsConstructor |
||||||
|
public class DataMailboxBlameRelationService extends ServiceImpl<DataMailboxBlameRelationMapper, DataMailboxBlameRelation> { |
||||||
|
} |
||||||
@ -0,0 +1,14 @@ |
|||||||
|
package com.biutag.supervision.service; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||||
|
import com.biutag.supervision.mapper.DataMailboxBlameMapper; |
||||||
|
import com.biutag.supervision.mapper.DataMailboxMapper; |
||||||
|
import com.biutag.supervision.pojo.entity.DataMailbox; |
||||||
|
import com.biutag.supervision.pojo.entity.DataMailboxBlame; |
||||||
|
import lombok.RequiredArgsConstructor; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
@Service |
||||||
|
@RequiredArgsConstructor |
||||||
|
public class DataMailboxBlameService extends ServiceImpl<DataMailboxBlameMapper, DataMailboxBlame> { |
||||||
|
} |
||||||
@ -0,0 +1,22 @@ |
|||||||
|
package com.biutag.supervision.service; |
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil; |
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||||
|
import com.biutag.supervision.constants.enums.DepartLevelEnum; |
||||||
|
import com.biutag.supervision.mapper.DataMailboxMapper; |
||||||
|
import com.biutag.supervision.pojo.entity.DataMailbox; |
||||||
|
import com.biutag.supervision.pojo.entity.DataPetitionComplaint; |
||||||
|
import com.biutag.supervision.pojo.entity.SupDepart; |
||||||
|
import com.biutag.supervision.pojo.param.DataPetitionComplaintQueryParam; |
||||||
|
import com.biutag.supervision.pojo.vo.DataPetitionComplaintVo; |
||||||
|
import lombok.RequiredArgsConstructor; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
@Service |
||||||
|
@RequiredArgsConstructor |
||||||
|
public class DataMailboxService extends ServiceImpl<DataMailboxMapper, DataMailbox> { |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,100 @@ |
|||||||
|
package com.biutag.supervision.service; |
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil; |
||||||
|
import cn.hutool.core.collection.CollectionUtil; |
||||||
|
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.extension.plugins.pagination.Page; |
||||||
|
import com.biutag.supervision.constants.enums.ProblemSourcesEnum; |
||||||
|
import com.biutag.supervision.mapper.DataThreadMapper; |
||||||
|
import com.biutag.supervision.pojo.Result; |
||||||
|
import com.biutag.supervision.pojo.entity.DataMailbox; |
||||||
|
import com.biutag.supervision.pojo.entity.DataMailboxBlame; |
||||||
|
import com.biutag.supervision.pojo.entity.DataPetitionComplaint; |
||||||
|
import com.biutag.supervision.pojo.entity.SupDictData; |
||||||
|
import com.biutag.supervision.pojo.param.DataPetitionComplaintQueryParam; |
||||||
|
import com.biutag.supervision.pojo.param.DataThreadQueryParam; |
||||||
|
import com.biutag.supervision.pojo.vo.DataPetitionComplaintVo; |
||||||
|
import com.biutag.supervision.pojo.vo.DataThreaVo; |
||||||
|
import com.biutag.supervision.pojo.vo.ExcelDataThreaVo; |
||||||
|
import com.biutag.supervision.pojo.vo.ExportGabxfVo; |
||||||
|
import com.biutag.supervision.util.CommonUtil; |
||||||
|
import dm.jdbc.util.StringUtil; |
||||||
|
import jakarta.servlet.http.HttpServletResponse; |
||||||
|
import lombok.RequiredArgsConstructor; |
||||||
|
|
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||||
|
import org.springframework.web.bind.annotation.PathVariable; |
||||||
|
|
||||||
|
import java.io.IOException; |
||||||
|
import java.net.URLEncoder; |
||||||
|
import java.util.ArrayList; |
||||||
|
import java.util.List; |
||||||
|
import java.util.concurrent.atomic.AtomicInteger; |
||||||
|
|
||||||
|
@RequiredArgsConstructor |
||||||
|
@Service |
||||||
|
public class DataThreadService { |
||||||
|
|
||||||
|
|
||||||
|
private final DataThreadMapper dataThreadMapper; |
||||||
|
|
||||||
|
private final DataPetitionComplaintService dataPetitionComplaintService; |
||||||
|
|
||||||
|
private final DataMailboxService dataMailboxService; |
||||||
|
|
||||||
|
private final SupDictDataService dictDataService; |
||||||
|
public Result<Object> pageList(DataThreadQueryParam queryParam){ |
||||||
|
|
||||||
|
//录入时间
|
||||||
|
if(CollectionUtil.isNotEmpty(queryParam.getCreateTime())){ |
||||||
|
// queryWrapper.between(DataThreaVo::getCrtTime,queryParam.getCrtTime().get(0),queryParam.getCrtTime().get(1));
|
||||||
|
queryParam.setStartCrtTime(queryParam.getCreateTime().get(0)); |
||||||
|
queryParam.setEndCrtTime(queryParam.getCreateTime().get(1)); |
||||||
|
} |
||||||
|
//投诉时间
|
||||||
|
if(CollectionUtil.isNotEmpty(queryParam.getDiscoveryTime())){ |
||||||
|
// queryWrapper.between(DataThreaVo::getDiscoveryTime,queryParam.getDiscoveryTime().get(0),queryParam.getDiscoveryTime().get(1));
|
||||||
|
queryParam.setStartDiscoveryTime(queryParam.getDiscoveryTime().get(0)); |
||||||
|
queryParam.setEndDiscoveryTime(queryParam.getDiscoveryTime().get(1)); |
||||||
|
} |
||||||
|
if(StrUtil.isNotBlank(queryParam.getProblemSourcesCode())){ |
||||||
|
if("21".equals(queryParam.getProblemSourcesCode()) || "22".equals(queryParam.getProblemSourcesCode())){ |
||||||
|
DataPetitionComplaintQueryParam dataPetitionComplaintQueryParam = new DataPetitionComplaintQueryParam(); |
||||||
|
BeanUtil.copyProperties(queryParam,dataPetitionComplaintQueryParam); |
||||||
|
return Result.success(dataPetitionComplaintService.page(dataPetitionComplaintQueryParam)); |
||||||
|
} |
||||||
|
else{ |
||||||
|
LambdaQueryWrapper<DataMailbox> wrapper = new LambdaQueryWrapper<DataMailbox>() |
||||||
|
.eq(DataMailbox::getProblemSourcesCode, ProblemSourcesEnum.JZXX.getValue()) |
||||||
|
.like(StrUtil.isNotBlank(queryParam.getOriginId()), DataMailbox::getOriginId, queryParam.getOriginId()) |
||||||
|
.like(StrUtil.isNotBlank(queryParam.getThingDesc()), DataMailbox::getThingDesc, queryParam.getThingDesc()); |
||||||
|
if (queryParam.getDiscoveryTime().size() == 2) { |
||||||
|
wrapper.between(DataMailbox::getDiscoveryTime, queryParam.getDiscoveryTime().get(0), queryParam.getDiscoveryTime().get(1)); |
||||||
|
} |
||||||
|
if (StrUtil.isNotBlank(queryParam.getResponderKey()) && StrUtil.isNotBlank(queryParam.getResponderValue())) { |
||||||
|
switch (queryParam.getResponderKey()) { |
||||||
|
case "name": |
||||||
|
wrapper.like(DataMailbox::getResponderName, queryParam.getResponderValue()); |
||||||
|
break; |
||||||
|
case "phone": |
||||||
|
wrapper.like(DataMailbox::getContactPhone, queryParam.getResponderValue()); |
||||||
|
break; |
||||||
|
} |
||||||
|
} |
||||||
|
return Result.success(dataMailboxService.page(Page.of(queryParam.getCurrent(), queryParam.getSize()), wrapper)); |
||||||
|
} |
||||||
|
}else{ |
||||||
|
return Result.success(dataThreadMapper.queryPage(Page.of(queryParam.getCurrent(), queryParam.getSize()),queryParam)); |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,12 @@ |
|||||||
|
<?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.DataMailboxMapper"> |
||||||
|
|
||||||
|
<select id="queryPage" resultType="com.biutag.supervision.pojo.entity.DataMailbox"> |
||||||
|
select * from data_mailbox ${ew.getCustomSqlSegment} |
||||||
|
</select> |
||||||
|
|
||||||
|
|
||||||
|
</mapper> |
||||||
@ -0,0 +1,114 @@ |
|||||||
|
<?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.DataThreadMapper"> |
||||||
|
|
||||||
|
<select id="queryPage" resultType="com.biutag.supervision.pojo.vo.DataThreaVo"> |
||||||
|
( |
||||||
|
SELECT |
||||||
|
origin_id as originId, |
||||||
|
involved_issue as involvedIssue, |
||||||
|
channel_for_filing_complaints as channelForFilingComplaints , |
||||||
|
discovery_time as discoveryTime, |
||||||
|
responder_name as responderName, |
||||||
|
responder_phone as responderPhone, |
||||||
|
thing_desc as thingDesc, |
||||||
|
initial_petition as initialPetition, |
||||||
|
mass_visits as massVisits, |
||||||
|
distribution_state as distributionState, |
||||||
|
problem_sources_code as problemSourcesCode, |
||||||
|
receiving_leader_name as receivingLeaderName, |
||||||
|
petition_processing_status as petitionProcessingStatus, |
||||||
|
'' as checkStatus, |
||||||
|
'' as checkStatusName, |
||||||
|
create_time as crtTime, |
||||||
|
petition_type as petitionType, |
||||||
|
second_depart_name as secondDepartName, |
||||||
|
third_depart_name as thirdDepartName, |
||||||
|
'gabxf' as tableName |
||||||
|
from |
||||||
|
data_petition_complaint |
||||||
|
<where> |
||||||
|
1=1 |
||||||
|
<if test = "query.originId != null and query.originId != '' "> |
||||||
|
and origin_id like concat('%',#{query.originId,jdbcType=VARCHAR},'%') |
||||||
|
</if> |
||||||
|
<if test="query.thingDesc != null and query.thingDesc != ''"> |
||||||
|
and thing_desc like concat('%',#{query.thingDesc,jdbcType=VARCHAR},'%') |
||||||
|
</if> |
||||||
|
<if test="query.distributionState != null and query.distributionState != ''"> |
||||||
|
and distribution_state = #{query.distributionState} |
||||||
|
</if> |
||||||
|
<if test="query.initialPetition != null and query.initialPetition != ''"> |
||||||
|
and initial_petition =#{query.initialPetition} |
||||||
|
</if> |
||||||
|
<if test="query.responderKey != null and query.responderKey != ''"> |
||||||
|
<if test="query.responderKey == 'name' and query.responderValue != null and query.responderValue != '' "> |
||||||
|
and responder_name like concat('%',#{query.responderValue,jdbcType=VARCHAR},'%') |
||||||
|
</if> |
||||||
|
<if test="query.responderKey == 'phone' and query.responderValue != null and query.responderValue != '' "> |
||||||
|
and responder_phone like concat('%',#{query.responderValue,jdbcType=VARCHAR},'%') |
||||||
|
</if> |
||||||
|
</if> |
||||||
|
<if test="query.startCrtTime!= null and query.endCrtTime != null "> |
||||||
|
and create_time between #{query.startCrtTime} and #{query.endCrtTime,jdbcType=TIMESTAMP} |
||||||
|
</if> |
||||||
|
<if test="query.startDiscoveryTime != null and query.startDiscoveryTime != null"> |
||||||
|
and discovery_time between #{query.startDiscoveryTime} and #{query.endDiscoveryTime} |
||||||
|
</if> |
||||||
|
</where> |
||||||
|
) |
||||||
|
UNION ALL |
||||||
|
( |
||||||
|
SELECT |
||||||
|
origin_id as originId, |
||||||
|
involved_issue as involvedIssue, |
||||||
|
problemSources as channelForFilingComplaints, |
||||||
|
discoveryTime, |
||||||
|
responderName as responderName, |
||||||
|
contactPhone as responderPhone, |
||||||
|
thingDesc, |
||||||
|
'' as initialPetition, |
||||||
|
'' as massVisits, |
||||||
|
'' as distributionState, |
||||||
|
problemSourcesCode, |
||||||
|
'' as receivingLeaderName, |
||||||
|
processingStatus as petitionProcessingStatus, |
||||||
|
checkStatus, |
||||||
|
checkStatusName, |
||||||
|
crtTime, |
||||||
|
'' as petitionType, |
||||||
|
'' as secondDepartName, |
||||||
|
'' as thirdDepartName, |
||||||
|
'jzxx' as tableName |
||||||
|
from |
||||||
|
data_mailbox |
||||||
|
<where> |
||||||
|
1=1 |
||||||
|
<if test = "query.originId != null and query.originId != '' "> |
||||||
|
and origin_id like concat('%',#{query.originId,jdbcType=VARCHAR},'%') |
||||||
|
</if> |
||||||
|
<if test="query.thingDesc != null and query.thingDesc != ''"> |
||||||
|
and thingDesc like concat('%',#{query.thingDesc,jdbcType=VARCHAR},'%') |
||||||
|
</if> |
||||||
|
<if test="query.responderKey != null and query.responderKey != ''"> |
||||||
|
<if test="query.responderKey == 'name' and query.responderValue != null and query.responderValue != '' "> |
||||||
|
and responderName like concat('%',#{query.responderValue,jdbcType=VARCHAR},'%') |
||||||
|
</if> |
||||||
|
<if test="query.responderKey == 'phone' and query.responderValue != null and query.responderValue != '' "> |
||||||
|
and contactPhone like concat('%',#{query.responderValue,jdbcType=VARCHAR},'%') |
||||||
|
</if> |
||||||
|
</if> |
||||||
|
<if test="query.startCrtTime!= null and query.endCrtTime != null "> |
||||||
|
and crtTime between #{query.startCrtTime} and #{query.endCrtTime,jdbcType=TIMESTAMP} |
||||||
|
</if> |
||||||
|
<if test="query.startDiscoveryTime != null and query.startDiscoveryTime != null"> |
||||||
|
and discoveryTime between #{query.startDiscoveryTime} and #{query.endDiscoveryTime} |
||||||
|
</if> |
||||||
|
</where> |
||||||
|
) |
||||||
|
</select> |
||||||
|
|
||||||
|
|
||||||
|
</mapper> |
||||||
Loading…
Reference in new issue