|
|
|
@ -17,18 +17,15 @@ import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.biutag.supervision.common.UserContextHolder; |
|
|
|
import com.biutag.supervision.common.UserContextHolder; |
|
|
|
import com.biutag.supervision.constants.AppConstants; |
|
|
|
import com.biutag.supervision.constants.AppConstants; |
|
|
|
import com.biutag.supervision.constants.enums.BlameType; |
|
|
|
|
|
|
|
import com.biutag.supervision.constants.enums.InspectCaseEnum; |
|
|
|
import com.biutag.supervision.constants.enums.InspectCaseEnum; |
|
|
|
import com.biutag.supervision.constants.enums.ProblemSourcesEnum; |
|
|
|
import com.biutag.supervision.constants.enums.ProblemSourcesEnum; |
|
|
|
|
|
|
|
import com.biutag.supervision.constants.enums.ProcessingStatusEnum; |
|
|
|
import com.biutag.supervision.constants.enums.RoleCodeEnum; |
|
|
|
import com.biutag.supervision.constants.enums.RoleCodeEnum; |
|
|
|
import com.biutag.supervision.mapper.ComplaintCollectionMapper; |
|
|
|
import com.biutag.supervision.mapper.ComplaintCollectionMapper; |
|
|
|
import com.biutag.supervision.pojo.Result; |
|
|
|
import com.biutag.supervision.pojo.Result; |
|
|
|
import com.biutag.supervision.pojo.domain.Blame; |
|
|
|
import com.biutag.supervision.pojo.domain.Blame; |
|
|
|
import com.biutag.supervision.pojo.dto.NegativeDto; |
|
|
|
import com.biutag.supervision.pojo.dto.NegativeDto; |
|
|
|
import com.biutag.supervision.pojo.dto.complaintCollection.ComplaintCollectionExcelDTO; |
|
|
|
import com.biutag.supervision.pojo.dto.complaintCollection.*; |
|
|
|
import com.biutag.supervision.pojo.dto.complaintCollection.ComplaintCollectionPageDTO; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.dto.complaintCollection.ComplaintCollectionPersonExcelDTO; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.dto.complaintCollection.ComplaintCollectionRepeatDTO; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.dto.flow.VerifyData; |
|
|
|
import com.biutag.supervision.pojo.dto.flow.VerifyData; |
|
|
|
import com.biutag.supervision.pojo.entity.*; |
|
|
|
import com.biutag.supervision.pojo.entity.*; |
|
|
|
import com.biutag.supervision.pojo.enums.complaintCollection.*; |
|
|
|
import com.biutag.supervision.pojo.enums.complaintCollection.*; |
|
|
|
@ -49,7 +46,6 @@ import com.biutag.supervision.pojo.request.complaintCollection.*; |
|
|
|
import com.biutag.supervision.pojo.transfer.ComplaintCollectionTransfer; |
|
|
|
import com.biutag.supervision.pojo.transfer.ComplaintCollectionTransfer; |
|
|
|
import com.biutag.supervision.pojo.vo.FileVo; |
|
|
|
import com.biutag.supervision.pojo.vo.FileVo; |
|
|
|
import com.biutag.supervision.pojo.vo.complaintCollection.ComplaintCollectionDetailVo; |
|
|
|
import com.biutag.supervision.pojo.vo.complaintCollection.ComplaintCollectionDetailVo; |
|
|
|
import com.biutag.supervision.pojo.vo.complaintCollection.ComplaintCollectionHandlerDataVo; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.vo.complaintCollection.ComplaintCollectionMailRepeattVo; |
|
|
|
import com.biutag.supervision.pojo.vo.complaintCollection.ComplaintCollectionMailRepeattVo; |
|
|
|
import com.biutag.supervision.pojo.vo.complaintCollection.ComplaintCollectionWatchDetailVO; |
|
|
|
import com.biutag.supervision.pojo.vo.complaintCollection.ComplaintCollectionWatchDetailVO; |
|
|
|
import com.biutag.supervision.repository.complaintCollection.ComplaintCollectionResourceService; |
|
|
|
import com.biutag.supervision.repository.complaintCollection.ComplaintCollectionResourceService; |
|
|
|
@ -134,10 +130,22 @@ public class ComplaintCollectionServiceImpl implements ComplaintCollectionServic |
|
|
|
if (CollectionUtil.isEmpty(supDepartList) || supDepartList.get(0).getLevel()!=2){ |
|
|
|
if (CollectionUtil.isEmpty(supDepartList) || supDepartList.get(0).getLevel()!=2){ |
|
|
|
throw new IllegalStateException("请选择正确的二级机构"); |
|
|
|
throw new IllegalStateException("请选择正确的二级机构"); |
|
|
|
} |
|
|
|
} |
|
|
|
ComplaintCollection complaintCollection = ComplaintCollectionTransfer.INSTANCE.addRequestToEntity(request); |
|
|
|
// 手动创建 ComplaintCollection,只设置特有字段
|
|
|
|
|
|
|
|
ComplaintCollection complaintCollection = new ComplaintCollection(); |
|
|
|
|
|
|
|
complaintCollection.setSourceTable(request.getSourceTable()); |
|
|
|
|
|
|
|
complaintCollection.setSourceTableSubOne(request.getSourceTableSubOne()); |
|
|
|
|
|
|
|
complaintCollection.setResponderIdCode(request.getResponderIdCode()); |
|
|
|
|
|
|
|
complaintCollection.setRepeatt(request.getRepeatt()); |
|
|
|
|
|
|
|
complaintCollection.setLeadApproval(request.getLeadApproval()); |
|
|
|
|
|
|
|
complaintCollection.setTag(request.getTag()); |
|
|
|
|
|
|
|
complaintCollection.setHandleMethod(request.getHandleMethod()); |
|
|
|
|
|
|
|
complaintCollection.setSecondDepartId(request.getSecondDepartId()); |
|
|
|
|
|
|
|
complaintCollection.setSecondDepartName(request.getSecondDepartName()); |
|
|
|
// 生成编号
|
|
|
|
// 生成编号
|
|
|
|
if (StrUtil.isBlank(complaintCollection.getOriginId())) { |
|
|
|
if (StrUtil.isBlank(request.getOriginId())) { |
|
|
|
complaintCollection.setOriginId(SfssUtil.generateIdWithPrefix(request.getSourceTable())); |
|
|
|
complaintCollection.setOriginId(SfssUtil.generateIdWithPrefix(request.getSourceTable())); |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
complaintCollection.setOriginId(request.getOriginId()); |
|
|
|
} |
|
|
|
} |
|
|
|
complaintCollection.setCreateTime(LocalDateTime.now()); |
|
|
|
complaintCollection.setCreateTime(LocalDateTime.now()); |
|
|
|
complaintCollection.setCreateBy(UserContextHolder.getCurrentUser().getUserName()); |
|
|
|
complaintCollection.setCreateBy(UserContextHolder.getCurrentUser().getUserName()); |
|
|
|
@ -150,7 +158,6 @@ public class ComplaintCollectionServiceImpl implements ComplaintCollectionServic |
|
|
|
// 创建主信息
|
|
|
|
// 创建主信息
|
|
|
|
Boolean res = complaintCollectionResourceService.createComplaintCollection(Arrays.asList(complaintCollection)); |
|
|
|
Boolean res = complaintCollectionResourceService.createComplaintCollection(Arrays.asList(complaintCollection)); |
|
|
|
Assert.notNull(complaintCollection.getId(), "主表插入后未获取到ID"); |
|
|
|
Assert.notNull(complaintCollection.getId(), "主表插入后未获取到ID"); |
|
|
|
saveThingFilesOrThrow(complaintCollection.getId(), request.getThingFiles()); |
|
|
|
|
|
|
|
return Result.success(res); |
|
|
|
return Result.success(res); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -165,8 +172,13 @@ public class ComplaintCollectionServiceImpl implements ComplaintCollectionServic |
|
|
|
if (CollectionUtil.isEmpty(query)) { |
|
|
|
if (CollectionUtil.isEmpty(query)) { |
|
|
|
throw new IllegalStateException("未找到可删除信息" + request.getId()); |
|
|
|
throw new IllegalStateException("未找到可删除信息" + request.getId()); |
|
|
|
} |
|
|
|
} |
|
|
|
if (!"0".equals(query.get(0).getStatus())) { |
|
|
|
// 通过 negative 的 processingStatus 判断是否可删除
|
|
|
|
throw new IllegalStateException("目标信息状态不可删除" + request.getId()); |
|
|
|
String negativeId = query.get(0).getNegativeId(); |
|
|
|
|
|
|
|
if (StrUtil.isNotBlank(negativeId)) { |
|
|
|
|
|
|
|
Negative negative = negativeService.getById(negativeId); |
|
|
|
|
|
|
|
if (negative != null && "completed".equals(negative.getProcessingStatus())) { |
|
|
|
|
|
|
|
throw new IllegalStateException("目标办理状态不可删除" + request.getId()); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// 鉴权
|
|
|
|
// 鉴权
|
|
|
|
checkDeletePermission(query.get(0)); |
|
|
|
checkDeletePermission(query.get(0)); |
|
|
|
@ -204,27 +216,27 @@ public class ComplaintCollectionServiceImpl implements ComplaintCollectionServic |
|
|
|
if (CollectionUtil.isEmpty(supDepartList) || supDepartList.get(0).getLevel()!=2){ |
|
|
|
if (CollectionUtil.isEmpty(supDepartList) || supDepartList.get(0).getLevel()!=2){ |
|
|
|
throw new IllegalStateException("请选择正确的二级机构"); |
|
|
|
throw new IllegalStateException("请选择正确的二级机构"); |
|
|
|
} |
|
|
|
} |
|
|
|
ComplaintCollectionUpdateParam updateParam = ComplaintCollectionTransfer.INSTANCE.updateRequestToParam(request); |
|
|
|
// 手动创建 ComplaintCollectionUpdateParam,只设置特有字段
|
|
|
|
// 处理 involve_problem + tag
|
|
|
|
ComplaintCollectionUpdateParam updateParam = new ComplaintCollectionUpdateParam(); |
|
|
|
String involveProblem = CodeTranslateUtil.joinDistinct(request.getInvolveProblemIdList()); |
|
|
|
|
|
|
|
if (StrUtil.isNotBlank(involveProblem)) { |
|
|
|
|
|
|
|
updateParam.setInvolveProblem(involveProblem); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
String tag = CodeTranslateUtil.joinDistinct(request.getTags()); |
|
|
|
|
|
|
|
if (StrUtil.isNotBlank(tag)) { |
|
|
|
|
|
|
|
updateParam.setTag(tag); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// 4) 必填:id + 更新信息
|
|
|
|
|
|
|
|
updateParam.setId(request.getId()); |
|
|
|
updateParam.setId(request.getId()); |
|
|
|
updateParam.setUpdateTime(LocalDateTime.now()); |
|
|
|
updateParam.setUpdateTime(LocalDateTime.now()); |
|
|
|
updateParam.setUpdateBy(UserContextHolder.getCurrentUser().getUserName()); |
|
|
|
updateParam.setUpdateBy(UserContextHolder.getCurrentUser().getUserName()); |
|
|
|
|
|
|
|
// 特有字段
|
|
|
|
|
|
|
|
updateParam.setSourceTable(request.getSourceTable()); |
|
|
|
|
|
|
|
updateParam.setSourceTableSubOne(request.getSourceTableSubOne()); |
|
|
|
|
|
|
|
updateParam.setResponderIdCode(request.getResponderIdCode()); |
|
|
|
|
|
|
|
updateParam.setRepeatt(request.getRepeatt()); |
|
|
|
|
|
|
|
updateParam.setLeadApproval(request.getLeadApproval()); |
|
|
|
|
|
|
|
// tag 处理
|
|
|
|
|
|
|
|
updateParam.setTags(request.getTags()); |
|
|
|
|
|
|
|
updateParam.setHandleMethod(request.getHandleMethod()); |
|
|
|
|
|
|
|
updateParam.setSecondDepartId(request.getSecondDepartId()); |
|
|
|
|
|
|
|
updateParam.setSecondDepartName(request.getSecondDepartName()); |
|
|
|
// 5) 更新(只更新非空字段)
|
|
|
|
// 5) 更新(只更新非空字段)
|
|
|
|
boolean ok = complaintCollectionResourceService.updateSelectiveById(updateParam); |
|
|
|
boolean ok = complaintCollectionResourceService.updateSelectiveById(updateParam); |
|
|
|
if (!ok) { |
|
|
|
if (!ok) { |
|
|
|
throw new RuntimeException("修改失败"); |
|
|
|
throw new RuntimeException("修改失败"); |
|
|
|
} |
|
|
|
} |
|
|
|
// complaintCollectionFileResourceService.delByComplaintCollectionId(id);
|
|
|
|
|
|
|
|
// saveThingFilesOrThrow(id, request.getThingFiles());
|
|
|
|
|
|
|
|
NegativeDto negativeDto = new NegativeDto(); |
|
|
|
NegativeDto negativeDto = new NegativeDto(); |
|
|
|
negativeDto.setId(request.getNegativeId()); |
|
|
|
negativeDto.setId(request.getNegativeId()); |
|
|
|
negativeDto.setBusinessTypeCode(request.getBusinessTypeCode()); |
|
|
|
negativeDto.setBusinessTypeCode(request.getBusinessTypeCode()); |
|
|
|
@ -241,6 +253,9 @@ public class ComplaintCollectionServiceImpl implements ComplaintCollectionServic |
|
|
|
negativeDto.setProblemSourcesCode(request.getSourceTable()); |
|
|
|
negativeDto.setProblemSourcesCode(request.getSourceTable()); |
|
|
|
negativeDto.setProblemSources(sourceDict.get(request.getSourceTable())); |
|
|
|
negativeDto.setProblemSources(sourceDict.get(request.getSourceTable())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 通用字段
|
|
|
|
|
|
|
|
negativeDto.setResponderName(request.getResponderName()); |
|
|
|
|
|
|
|
negativeDto.setContactPhone(request.getResponderPhone()); |
|
|
|
|
|
|
|
|
|
|
|
negativeService.updateNegative(negativeDto); |
|
|
|
negativeService.updateNegative(negativeDto); |
|
|
|
return Result.success(true); |
|
|
|
return Result.success(true); |
|
|
|
@ -432,44 +447,197 @@ public class ComplaintCollectionServiceImpl implements ComplaintCollectionServic |
|
|
|
return Result.success(complaintCollectionMailRepeattVo); |
|
|
|
return Result.success(complaintCollectionMailRepeattVo); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@Override |
|
|
|
* 导出涉访涉诉台账(新版本,3个Sheet:台账 + 个人涉及 + 单位涉及) |
|
|
|
|
|
|
|
*/ |
|
|
|
public void exportData(ComplaintCollectionPageRequest request, HttpServletResponse response) { |
|
|
|
public void exportData(ComplaintCollectionPageRequest request, HttpServletResponse response) { |
|
|
|
request.setSize(10000); |
|
|
|
request.setSize(10000); |
|
|
|
request.setCurrent(1); |
|
|
|
request.setCurrent(1); |
|
|
|
// 涉访涉诉台账
|
|
|
|
|
|
|
|
List<ComplaintCollectionPageDTO> complaintCollectionPageDTOS = getComplaintCollectionPageNew(request).getRecords(); |
|
|
|
// 1. 查分页数据
|
|
|
|
List<ComplaintCollectionExcelDTO> dataList = this.buildComplaintCollectionExcelDTO(complaintCollectionPageDTOS); |
|
|
|
List<ComplaintCollectionPageDTO> pageDTOList = getComplaintCollectionPageNew(request).getRecords(); |
|
|
|
if (dataList.size() > 10000) { |
|
|
|
|
|
|
|
|
|
|
|
// 2. 过滤有 negativeId 的数据
|
|
|
|
|
|
|
|
Map<String, ComplaintCollectionPageDTO> pageDtoMap = pageDTOList.stream() |
|
|
|
|
|
|
|
.filter(dto -> StrUtil.isNotBlank(dto.getNegativeId())) |
|
|
|
|
|
|
|
.collect(Collectors.toMap( |
|
|
|
|
|
|
|
ComplaintCollectionPageDTO::getNegativeId, |
|
|
|
|
|
|
|
Function.identity(), |
|
|
|
|
|
|
|
(a, b) -> a)); |
|
|
|
|
|
|
|
List<String> negativeIds = new ArrayList<>(pageDtoMap.keySet()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 3. 查 negative_blame
|
|
|
|
|
|
|
|
List<NegativeBlame> negativeBlames = negativeBlameService.listByNegativeIds(new HashSet<>(negativeIds)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 4. 查问题关系表
|
|
|
|
|
|
|
|
List<NegativeProblemRelation> negativeProblemRelations = |
|
|
|
|
|
|
|
negativeProblemRelationService.list(new LambdaQueryWrapper<NegativeProblemRelation>() |
|
|
|
|
|
|
|
.in(NegativeProblemRelation::getNegativeId, negativeIds)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 5. negativeBlame 按 negativeId 分组
|
|
|
|
|
|
|
|
Map<String, List<NegativeBlame>> negativeBlameMap = negativeBlames.stream() |
|
|
|
|
|
|
|
.filter(b -> StrUtil.isNotBlank(b.getNegativeId())) |
|
|
|
|
|
|
|
.collect(Collectors.groupingBy(NegativeBlame::getNegativeId, Collectors.toList())); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 6. 构建 Sheet1 数据
|
|
|
|
|
|
|
|
List<ExportComplaintCollectionExcelVo> sheet1List = new ArrayList<>(); |
|
|
|
|
|
|
|
for (ComplaintCollectionPageDTO dto : pageDTOList) { |
|
|
|
|
|
|
|
ExportComplaintCollectionExcelVo vo = new ExportComplaintCollectionExcelVo(); |
|
|
|
|
|
|
|
vo.setNegativeId(dto.getNegativeId()); |
|
|
|
|
|
|
|
vo.setOriginId(dto.getOriginId()); |
|
|
|
|
|
|
|
vo.setSourceTablePath(dto.getSourceTablePath()); |
|
|
|
|
|
|
|
vo.setDiscoveryTime(dto.getDiscoveryTime()); |
|
|
|
|
|
|
|
vo.setBusinessTypeName(dto.getBusinessTypeName()); |
|
|
|
|
|
|
|
vo.setInvolveProblemStr(dto.getInvolveProblemStr()); |
|
|
|
|
|
|
|
vo.setThingDesc(dto.getThingDesc()); |
|
|
|
|
|
|
|
vo.setResponderName(dto.getResponderName()); |
|
|
|
|
|
|
|
vo.setResponderPhone(dto.getResponderPhone()); |
|
|
|
|
|
|
|
vo.setPoliceTypeName(dto.getPoliceTypeName()); |
|
|
|
|
|
|
|
vo.setSecondDepartName(dto.getSecondDepartName()); |
|
|
|
|
|
|
|
vo.setThirdDepartName(dto.getThirdDepartName()); |
|
|
|
|
|
|
|
vo.setInvolveDepartName(dto.getInvolveDepartName()); |
|
|
|
|
|
|
|
vo.setProcessingStatus(ProcessingStatusEnum.getLabel(dto.getProcessingStatus())); |
|
|
|
|
|
|
|
// 枚举值转换
|
|
|
|
|
|
|
|
vo.setCompletionStatus(ComplaintCollectionClosingStatusEnum.getDescByCode(dto.getCompletionStatus())); |
|
|
|
|
|
|
|
vo.setPublicRecognition(ComplaintCollectionPublicApprovalEnum.getDescByCode(dto.getPublicRecognition())); |
|
|
|
|
|
|
|
vo.setHandleMethod(ComplaintCollectionHandleMethodEnum.getDescByCode(dto.getHandleMethod())); |
|
|
|
|
|
|
|
vo.setRepeatt("1".equals(dto.getRepeatt()) ? "是" : "否"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vo.setTag(dto.getTag()); |
|
|
|
|
|
|
|
vo.setCheckStatusName(dto.getCheckStatusName()); |
|
|
|
|
|
|
|
// vo.setAccountabilityTarget(dto.getAccountabilityTarget());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<NegativeBlame> blames = negativeBlameMap.getOrDefault(dto.getNegativeId(), Collections.emptyList()); |
|
|
|
|
|
|
|
// vo.setBlameNumber(blames.size());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 涉及人员汇总
|
|
|
|
|
|
|
|
String blameStr = blames.stream() |
|
|
|
|
|
|
|
.filter(b -> StrUtil.isNotBlank(b.getBlameName())) |
|
|
|
|
|
|
|
.map(b -> String.format("(%s)%s-%s", |
|
|
|
|
|
|
|
"personal".equals(b.getType()) ? "个人" : "单位", |
|
|
|
|
|
|
|
b.getBlameName(), |
|
|
|
|
|
|
|
StrUtil.isNotBlank(b.getBlameEmpNo()) ? b.getBlameEmpNo() : "")) |
|
|
|
|
|
|
|
.collect(Collectors.joining("、")); |
|
|
|
|
|
|
|
vo.setBlameStr(blameStr); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 责任追责汇总
|
|
|
|
|
|
|
|
// vo.setHandleResultName(blames.stream()
|
|
|
|
|
|
|
|
// .map(NegativeBlame::getHandleResultName)
|
|
|
|
|
|
|
|
// .filter(StrUtil::isNotBlank)
|
|
|
|
|
|
|
|
// .collect(Collectors.joining("、")));
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// // 是否追责
|
|
|
|
|
|
|
|
// if (InspectCaseEnum.isItTure(dto.getCheckStatusCode())) {
|
|
|
|
|
|
|
|
// if (blames.stream().allMatch(b -> StrUtil.isBlank(b.getHandleResultName()) || b.getHandleResultName().contains("不予追责"))) {
|
|
|
|
|
|
|
|
// vo.setIsHoldAccountable("否");
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// vo.setIsHoldAccountable("是");
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 问题类型
|
|
|
|
|
|
|
|
// String problemTypeList = blames.stream()
|
|
|
|
|
|
|
|
// .filter(b -> StrUtil.isNotBlank(b.getBlameId()))
|
|
|
|
|
|
|
|
// .flatMap(b -> negativeProblemRelations.stream()
|
|
|
|
|
|
|
|
// .filter(p -> b.getBlameId().equals(p.getBlameId()) && StrUtil.isNotBlank(p.getOneLevelContent()))
|
|
|
|
|
|
|
|
// .map(p -> {
|
|
|
|
|
|
|
|
// if ("其他".equals(p.getThreeLevelContent())) {
|
|
|
|
|
|
|
|
// return String.format("%s / %s / %s(%s)",
|
|
|
|
|
|
|
|
// p.getOneLevelContent(), p.getTwoLevelContent(),
|
|
|
|
|
|
|
|
// p.getThreeLevelContent(), p.getThreeLevelContentOther());
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// return String.format("%s / %s / %s",
|
|
|
|
|
|
|
|
// p.getOneLevelContent(), p.getTwoLevelContent(), p.getThreeLevelContent());
|
|
|
|
|
|
|
|
// }))
|
|
|
|
|
|
|
|
// .collect(Collectors.joining("、"));
|
|
|
|
|
|
|
|
// vo.setProblemTypeList(problemTypeList);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sheet1List.add(vo); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (sheet1List.size() > 10000) { |
|
|
|
throw new RuntimeException("导出数据量过大,请缩小筛选范围"); |
|
|
|
throw new RuntimeException("导出数据量过大,请缩小筛选范围"); |
|
|
|
} |
|
|
|
} |
|
|
|
// 涉访涉诉涉及人数据
|
|
|
|
|
|
|
|
ComplaintCollectionBlameQueryParam complaintCollectionBlameQueryParam = new ComplaintCollectionBlameQueryParam(); |
|
|
|
// 7. 构建 Sheet2/Sheet3 数据(个人涉及 + 单位涉及)
|
|
|
|
Set<String> complaintCollectionIds = complaintCollectionPageDTOS.stream().map(ComplaintCollectionPageDTO::getId).collect(Collectors.toSet()); |
|
|
|
List<ExportComplaintCollectionBlameVo> personalList = new ArrayList<>(); |
|
|
|
complaintCollectionBlameQueryParam.setComplaintIds(complaintCollectionIds); |
|
|
|
List<ExportComplaintCollectionBlameVo> departList = new ArrayList<>(); |
|
|
|
List<ComplaintCollectionBlame> blameList = complaintCollectionBlameResourceService.query(complaintCollectionBlameQueryParam); |
|
|
|
|
|
|
|
List<NegativeBlame> negativeBlames = negativeBlameService.listByNegativeIds(complaintCollectionIds); |
|
|
|
for (Map.Entry<String, List<NegativeBlame>> entry : negativeBlameMap.entrySet()) { |
|
|
|
List<ComplaintCollectionPersonExcelDTO> personList = this.buildComplaintCollectionPersonExcelDTO(blameList, negativeBlames, complaintCollectionPageDTOS); |
|
|
|
String negativeId = entry.getKey(); |
|
|
|
|
|
|
|
ComplaintCollectionPageDTO dto = pageDtoMap.get(negativeId); |
|
|
|
|
|
|
|
if (dto == null) continue; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (NegativeBlame blame : entry.getValue()) { |
|
|
|
|
|
|
|
ExportComplaintCollectionBlameVo vo = new ExportComplaintCollectionBlameVo(); |
|
|
|
|
|
|
|
vo.setNegativeId(negativeId); |
|
|
|
|
|
|
|
vo.setOriginId(dto.getOriginId()); |
|
|
|
|
|
|
|
vo.setDiscoveryTime(dto.getDiscoveryTime()); |
|
|
|
|
|
|
|
vo.setSourceTablePath(dto.getSourceTablePath()); |
|
|
|
|
|
|
|
vo.setBusinessTypeName(dto.getBusinessTypeName()); |
|
|
|
|
|
|
|
vo.setInvolveProblemStr(dto.getInvolveProblemStr()); |
|
|
|
|
|
|
|
vo.setThingDesc(dto.getThingDesc()); |
|
|
|
|
|
|
|
vo.setSecondDepartName(dto.getSecondDepartName()); |
|
|
|
|
|
|
|
vo.setThirdDepartName(dto.getThirdDepartName()); |
|
|
|
|
|
|
|
vo.setCheckStatusName(dto.getCheckStatusName()); |
|
|
|
|
|
|
|
String accountabilityTarget = "personal".equals(blame.getType()) ? "涉及个人" : "涉及单位"; |
|
|
|
|
|
|
|
vo.setAccountabilityTarget(accountabilityTarget); |
|
|
|
|
|
|
|
vo.setBlameName(blame.getBlameName()); |
|
|
|
|
|
|
|
vo.setBlameEmpNo(blame.getBlameEmpNo()); |
|
|
|
|
|
|
|
vo.setBlameIdCode(blame.getBlameIdCode()); |
|
|
|
|
|
|
|
vo.setIvPersonType(blame.getIvPersonType()); |
|
|
|
|
|
|
|
vo.setHandleResultName(blame.getHandleResultName()); |
|
|
|
|
|
|
|
vo.setLeadName(blame.getLeadName()); |
|
|
|
|
|
|
|
vo.setLeadEmpNo(blame.getLeadEmpNo()); |
|
|
|
|
|
|
|
vo.setLeadIdCode(blame.getLeadIdCode()); |
|
|
|
|
|
|
|
vo.setLeadHandleResultName(blame.getLeadHandleResultName()); |
|
|
|
|
|
|
|
vo.setSuperviseMeasuresName(blame.getSuperviseMeasuresName()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 问题类型
|
|
|
|
|
|
|
|
String problemType = negativeProblemRelations.stream() |
|
|
|
|
|
|
|
.filter(p -> blame.getBlameId() != null |
|
|
|
|
|
|
|
&& blame.getBlameId().equals(p.getBlameId()) |
|
|
|
|
|
|
|
&& StrUtil.isNotBlank(p.getOneLevelContent())) |
|
|
|
|
|
|
|
.map(p -> { |
|
|
|
|
|
|
|
if ("其他".equals(p.getThreeLevelContent())) { |
|
|
|
|
|
|
|
return String.format("%s / %s / %s(%s)", |
|
|
|
|
|
|
|
p.getOneLevelContent(), p.getTwoLevelContent(), |
|
|
|
|
|
|
|
p.getThreeLevelContent(), p.getThreeLevelContentOther()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return String.format("%s / %s / %s", |
|
|
|
|
|
|
|
p.getOneLevelContent(), p.getTwoLevelContent(), p.getThreeLevelContent()); |
|
|
|
|
|
|
|
}).collect(Collectors.joining("、")); |
|
|
|
|
|
|
|
vo.setProblemType(problemType); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ("涉及个人".equals(accountabilityTarget)) { |
|
|
|
|
|
|
|
personalList.add(vo); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
departList.add(vo); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 8. 写出 Excel(3个Sheet)
|
|
|
|
try { |
|
|
|
try { |
|
|
|
response.setContentType("application/vnd.ms-excel"); |
|
|
|
response.setContentType("application/vnd.ms-excel"); |
|
|
|
response.setCharacterEncoding("UTF-8"); |
|
|
|
response.setCharacterEncoding("UTF-8"); |
|
|
|
String fileName = URLEncoder.encode("涉访涉诉导出", "UTF-8").replaceAll("\\+", "%20"); |
|
|
|
String fileName = URLEncoder.encode("涉访涉诉导出(新)", "UTF-8").replaceAll("\\+", "%20"); |
|
|
|
response.setHeader( |
|
|
|
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx"); |
|
|
|
"Content-disposition", |
|
|
|
|
|
|
|
"attachment;filename*=utf-8''" + fileName + ".xlsx" |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
try (ServletOutputStream outputStream = response.getOutputStream()) { |
|
|
|
try (ServletOutputStream outputStream = response.getOutputStream()) { |
|
|
|
ExcelWriter excelWriter = EasyExcel.write(outputStream).build(); |
|
|
|
ExcelWriter excelWriter = EasyExcel.write(outputStream).build(); |
|
|
|
// Sheet1: 台账
|
|
|
|
|
|
|
|
WriteSheet sheet1 = EasyExcel.writerSheet(0, "涉访涉诉台账") |
|
|
|
WriteSheet sheet1 = EasyExcel.writerSheet(0, "涉访涉诉台账") |
|
|
|
.head(ComplaintCollectionExcelDTO.class) |
|
|
|
.head(ExportComplaintCollectionExcelVo.class).build(); |
|
|
|
.build(); |
|
|
|
excelWriter.write(sheet1List, sheet1); |
|
|
|
excelWriter.write(dataList, sheet1); |
|
|
|
|
|
|
|
// Sheet2: 涉及人
|
|
|
|
WriteSheet sheet2 = EasyExcel.writerSheet(1, "个人涉及台账") |
|
|
|
WriteSheet sheet2 = EasyExcel.writerSheet(1, "涉访涉诉涉及人数据") |
|
|
|
.head(ExportComplaintCollectionBlameVo.class).build(); |
|
|
|
.head(ComplaintCollectionPersonExcelDTO.class) |
|
|
|
excelWriter.write(personalList, sheet2); |
|
|
|
.build(); |
|
|
|
|
|
|
|
excelWriter.write(personList, sheet2); |
|
|
|
WriteSheet sheet3 = EasyExcel.writerSheet(2, "单位涉及台账") |
|
|
|
|
|
|
|
.head(ExportComplaintCollectionBlameVo.class).build(); |
|
|
|
|
|
|
|
excelWriter.write(departList, sheet3); |
|
|
|
|
|
|
|
|
|
|
|
excelWriter.finish(); |
|
|
|
excelWriter.finish(); |
|
|
|
} |
|
|
|
} |
|
|
|
} catch (UnsupportedEncodingException e) { |
|
|
|
} catch (UnsupportedEncodingException e) { |
|
|
|
@ -485,83 +653,6 @@ public class ComplaintCollectionServiceImpl implements ComplaintCollectionServic |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private List<ComplaintCollectionPersonExcelDTO> buildComplaintCollectionPersonExcelDTO(List<ComplaintCollectionBlame> blameList, List<NegativeBlame> negativeBlames, List<ComplaintCollectionPageDTO> dataList) { |
|
|
|
|
|
|
|
List<ComplaintCollectionPersonExcelDTO> res = new ArrayList<>(); |
|
|
|
|
|
|
|
Map<String, List<ComplaintCollectionBlame>> complaintCollectionBlameMap = blameList.stream() |
|
|
|
|
|
|
|
.filter(blame -> blame.getComplaintId() != null) |
|
|
|
|
|
|
|
.collect(Collectors.groupingBy(ComplaintCollectionBlame::getComplaintId, Collectors.toList())); |
|
|
|
|
|
|
|
Map<String, List<NegativeBlame>> negativeBlameMap = negativeBlames.stream() |
|
|
|
|
|
|
|
.filter(blame -> blame.getNegativeId() != null) |
|
|
|
|
|
|
|
.collect(Collectors.groupingBy(NegativeBlame::getNegativeId, Collectors.toList())); |
|
|
|
|
|
|
|
List<NegativeProblemRelation> negativeProblemRelations = negativeProblemRelationService.list(new LambdaQueryWrapper<NegativeProblemRelation>().in(NegativeProblemRelation::getNegativeId, dataList.stream().map(ComplaintCollectionPageDTO::getId).toList())); |
|
|
|
|
|
|
|
for (ComplaintCollectionPageDTO dto : dataList) { |
|
|
|
|
|
|
|
String checkStatus = dto.getCheckStatus(); |
|
|
|
|
|
|
|
boolean itTure = InspectCaseEnum.isItTure(checkStatus); |
|
|
|
|
|
|
|
if (itTure) { |
|
|
|
|
|
|
|
List<NegativeBlame> nBlame = negativeBlameMap.getOrDefault(dto.getId(), new ArrayList<>()); |
|
|
|
|
|
|
|
nBlame.forEach(item -> { |
|
|
|
|
|
|
|
String problemTypeList = negativeProblemRelations.stream().filter(problem -> item.getBlameId().equals(problem.getBlameId()) && StrUtil.isNotBlank(problem.getOneLevelContent())).map(problem -> { |
|
|
|
|
|
|
|
if ("其他".equals(problem.getThreeLevelContent())) { |
|
|
|
|
|
|
|
return String.format("%s / %s / %s(%s)", problem.getOneLevelContent(), problem.getTwoLevelContent(), problem.getThreeLevelContent(), problem.getThreeLevelContentOther()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return String.format("%s / %s / %s", problem.getOneLevelContent(), problem.getTwoLevelContent(), problem.getThreeLevelContent()); |
|
|
|
|
|
|
|
}).collect(Collectors.joining("、")); |
|
|
|
|
|
|
|
ComplaintCollectionPersonExcelDTO complaintCollectionPersonExcelDTO = new ComplaintCollectionPersonExcelDTO(); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setOriginId(dto.getOriginId()); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setDiscoveryTime(dto.getDiscoveryTime()); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setSourceTablePath(dto.getSourceTablePath()); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setBusinessTypeName(dto.getBusinessTypeName()); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setInvolveProblemStr(dto.getInvolveProblemStr()); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setThingDesc(dto.getThingDesc()); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setSecondDepartName(dto.getSecondDepartName()); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setCheckStatusName(dto.getCheckStatusName()); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setAccountabilityTarget(BlameType.personal.name().equals(item.getType()) ? "涉及个人" : "涉及单位"); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setBlameName(item.getBlameName()); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setBlameEmpNo(item.getBlameEmpNo()); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setBlameIdCode(item.getBlameIdCode()); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setIvPersonType(item.getIvPersonType()); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setLeadName(item.getLeadName()); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setLeadEmpNo(item.getLeadEmpNo()); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setLeadIdCode(item.getLeadIdCode()); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setHandleResultName(item.getHandleResultName()); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setProblemType(problemTypeList); |
|
|
|
|
|
|
|
res.add(complaintCollectionPersonExcelDTO); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
List<ComplaintCollectionBlame> complaintCollectionBlames = complaintCollectionBlameMap.getOrDefault(dto.getId(), new ArrayList<>()); |
|
|
|
|
|
|
|
complaintCollectionBlames.forEach(item -> { |
|
|
|
|
|
|
|
// String problemTypeList = negativeProblemRelations.stream().filter(problem -> item.getBlameId().equals(problem.getBlameId()) && StrUtil.isNotBlank(problem.getOneLevelContent())).map(problem -> {
|
|
|
|
|
|
|
|
// if ("其他".equals(problem.getThreeLevelContent())) {
|
|
|
|
|
|
|
|
// return String.format("%s / %s / %s(%s)", problem.getOneLevelContent(), problem.getTwoLevelContent(), problem.getThreeLevelContent(), problem.getThreeLevelContentOther());
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// return String.format("%s / %s / %s", problem.getOneLevelContent(), problem.getTwoLevelContent(), problem.getThreeLevelContent());
|
|
|
|
|
|
|
|
// }).collect(Collectors.joining("、"));
|
|
|
|
|
|
|
|
ComplaintCollectionPersonExcelDTO complaintCollectionPersonExcelDTO = new ComplaintCollectionPersonExcelDTO(); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setOriginId(dto.getOriginId()); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setDiscoveryTime(dto.getDiscoveryTime()); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setSourceTablePath(dto.getSourceTablePath()); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setBusinessTypeName(dto.getBusinessTypeName()); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setInvolveProblemStr(dto.getInvolveProblemStr()); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setThingDesc(dto.getThingDesc()); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setSecondDepartName(dto.getSecondDepartName()); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setCheckStatusName(dto.getCheckStatusName()); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setAccountabilityTarget(BlameType.personal.name().equals(item.getType()) ? "涉及个人" : "涉及单位"); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setBlameName(item.getBlameName()); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setBlameEmpNo(item.getBlameEmpNo()); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setBlameIdCode(item.getBlameIdCode()); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setIvPersonType(item.getIvPersonTypeName()); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setLeadName(item.getLeadName()); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setLeadEmpNo(item.getLeadEmpNo()); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setLeadIdCode(item.getLeadIdCode()); |
|
|
|
|
|
|
|
complaintCollectionPersonExcelDTO.setHandleResultName(item.getHandleResultName()); |
|
|
|
|
|
|
|
// complaintCollectionPersonExcelDTO.setProblemType(problemTypeList);
|
|
|
|
|
|
|
|
res.add(complaintCollectionPersonExcelDTO); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return res; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public Result<Boolean> saveInvolveJson(ComplaintCollectionInitialReviewSaveRequest request) { |
|
|
|
public Result<Boolean> saveInvolveJson(ComplaintCollectionInitialReviewSaveRequest request) { |
|
|
|
complaintCollectionMapper.update(new LambdaUpdateWrapper<ComplaintCollection>() |
|
|
|
complaintCollectionMapper.update(new LambdaUpdateWrapper<ComplaintCollection>() |
|
|
|
@ -636,9 +727,26 @@ public class ComplaintCollectionServiceImpl implements ComplaintCollectionServic |
|
|
|
// 2. 转换为 VO
|
|
|
|
// 2. 转换为 VO
|
|
|
|
ComplaintCollectionDetailVo vo = new ComplaintCollectionDetailVo(); |
|
|
|
ComplaintCollectionDetailVo vo = new ComplaintCollectionDetailVo(); |
|
|
|
BeanUtil.copyProperties(complaintCollection, vo); |
|
|
|
BeanUtil.copyProperties(complaintCollection, vo); |
|
|
|
// 转换 involveProblem 为列表
|
|
|
|
|
|
|
|
vo.setInvolveProblemIdList(StrUtil.isBlank(complaintCollection.getInvolveProblem()) |
|
|
|
// 3. 从 negative 表补充通用字段
|
|
|
|
? new ArrayList<>() : Arrays.asList(complaintCollection.getInvolveProblem().split("[,,]"))); |
|
|
|
String negativeId = complaintCollection.getNegativeId(); |
|
|
|
|
|
|
|
if (StrUtil.isNotBlank(negativeId)) { |
|
|
|
|
|
|
|
Negative negative = negativeService.getById(negativeId); |
|
|
|
|
|
|
|
if (negative != null) { |
|
|
|
|
|
|
|
vo.setOriginId(negative.getOriginId()); |
|
|
|
|
|
|
|
vo.setDiscoveryTime(negative.getDiscoveryTime()); |
|
|
|
|
|
|
|
vo.setResponderName(negative.getResponderName()); |
|
|
|
|
|
|
|
vo.setResponderPhone(negative.getContactPhone()); |
|
|
|
|
|
|
|
vo.setThingDesc(negative.getThingDesc()); |
|
|
|
|
|
|
|
vo.setInvolveProblem(negative.getInvolveProblem()); |
|
|
|
|
|
|
|
vo.setBusinessTypeCode(negative.getBusinessTypeCode()); |
|
|
|
|
|
|
|
vo.setBusinessTypeName(negative.getBusinessTypeName()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 4. 转换 involveProblem 为列表
|
|
|
|
|
|
|
|
vo.setInvolveProblemIdList(StrUtil.isBlank(vo.getInvolveProblem()) |
|
|
|
|
|
|
|
? new ArrayList<>() : Arrays.asList(vo.getInvolveProblem().split("[,,]"))); |
|
|
|
// 转换 tag 为列表
|
|
|
|
// 转换 tag 为列表
|
|
|
|
vo.setTags(StrUtil.isBlank(complaintCollection.getTag()) |
|
|
|
vo.setTags(StrUtil.isBlank(complaintCollection.getTag()) |
|
|
|
? new ArrayList<>() : Arrays.asList(complaintCollection.getTag().split("[,,]"))); |
|
|
|
? new ArrayList<>() : Arrays.asList(complaintCollection.getTag().split("[,,]"))); |
|
|
|
@ -673,7 +781,7 @@ public class ComplaintCollectionServiceImpl implements ComplaintCollectionServic |
|
|
|
NegativeDto dto = new NegativeDto(); |
|
|
|
NegativeDto dto = new NegativeDto(); |
|
|
|
// originId 会自动生成
|
|
|
|
// originId 会自动生成
|
|
|
|
dto.setOriginId(complaintCollection.getOriginId()); |
|
|
|
dto.setOriginId(complaintCollection.getOriginId()); |
|
|
|
dto.setDiscoveryTime(complaintCollection.getDiscoveryTime()); |
|
|
|
dto.setDiscoveryTime(request.getDiscoveryTime()); |
|
|
|
|
|
|
|
|
|
|
|
// 问题来源
|
|
|
|
// 问题来源
|
|
|
|
if (ComplaintCollectionSourceTableEnum.LEADER_ASSIGN.getCode().equals(request.getSourceTable())) { |
|
|
|
if (ComplaintCollectionSourceTableEnum.LEADER_ASSIGN.getCode().equals(request.getSourceTable())) { |
|
|
|
@ -691,7 +799,7 @@ public class ComplaintCollectionServiceImpl implements ComplaintCollectionServic |
|
|
|
dto.setInvolveDepartName(request.getSecondDepartName()); |
|
|
|
dto.setInvolveDepartName(request.getSecondDepartName()); |
|
|
|
|
|
|
|
|
|
|
|
// 内容描述
|
|
|
|
// 内容描述
|
|
|
|
dto.setThingDesc(complaintCollection.getThingDesc()); |
|
|
|
dto.setThingDesc(request.getThingDesc()); |
|
|
|
|
|
|
|
|
|
|
|
// 主办层级
|
|
|
|
// 主办层级
|
|
|
|
dto.setHostLevel(request.getHostLevel()); |
|
|
|
dto.setHostLevel(request.getHostLevel()); |
|
|
|
@ -719,6 +827,13 @@ public class ComplaintCollectionServiceImpl implements ComplaintCollectionServic |
|
|
|
// 涉嫌问题
|
|
|
|
// 涉嫌问题
|
|
|
|
dto.setInvolveProblem(request.getInvolveProblemIdList()); |
|
|
|
dto.setInvolveProblem(request.getInvolveProblemIdList()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 反映人信息
|
|
|
|
|
|
|
|
dto.setResponderName(request.getResponderName()); |
|
|
|
|
|
|
|
dto.setContactPhone(request.getResponderPhone()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 案件编号
|
|
|
|
|
|
|
|
// dto.setCaseNumber(request.getCaseNumber());
|
|
|
|
|
|
|
|
|
|
|
|
return dto; |
|
|
|
return dto; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -735,35 +850,6 @@ public class ComplaintCollectionServiceImpl implements ComplaintCollectionServic |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 保存附件 |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param complaintId |
|
|
|
|
|
|
|
* @param thingFiles |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private void saveThingFilesOrThrow(String complaintId, List<FileVo> thingFiles) { |
|
|
|
|
|
|
|
if (CollectionUtil.isEmpty(thingFiles)) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
String userName = UserContextHolder.getCurrentUser().getUserName(); |
|
|
|
|
|
|
|
LocalDateTime now = LocalDateTime.now(); |
|
|
|
|
|
|
|
List<ComplaintCollectionFile> files = thingFiles.stream().map(one -> { |
|
|
|
|
|
|
|
ComplaintCollectionFile file = new ComplaintCollectionFile(); |
|
|
|
|
|
|
|
file.setComplaintId(complaintId); |
|
|
|
|
|
|
|
file.setFileName(one.getFileName()); |
|
|
|
|
|
|
|
file.setFilePath(one.getFilePath()); |
|
|
|
|
|
|
|
file.setCreateBy(userName); |
|
|
|
|
|
|
|
file.setCreateTime(now); |
|
|
|
|
|
|
|
return file; |
|
|
|
|
|
|
|
}).toList(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boolean ok = complaintCollectionFileResourceService.createComplaintCollectionFile(files); |
|
|
|
|
|
|
|
if (!ok) { |
|
|
|
|
|
|
|
throw new ValidationException("附件保存失败"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private List<ComplaintCollectionRepeatDTO> buildSfss( |
|
|
|
private List<ComplaintCollectionRepeatDTO> buildSfss( |
|
|
|
ComplaintCollectionMailRepeattRequest request) { |
|
|
|
ComplaintCollectionMailRepeattRequest request) { |
|
|
|
ComplaintCollectionQueryParam param = new ComplaintCollectionQueryParam(); |
|
|
|
ComplaintCollectionQueryParam param = new ComplaintCollectionQueryParam(); |
|
|
|
|