|
|
|
@ -15,12 +15,15 @@ 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.ComplaintCollectionPageDTO; |
|
|
|
import com.biutag.supervision.pojo.dto.complaintCollection.ComplaintCollectionPageDTO; |
|
|
|
|
|
|
|
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.supDict.SupDictEnum; |
|
|
|
import com.biutag.supervision.pojo.enums.supDict.SupDictEnum; |
|
|
|
import com.biutag.supervision.pojo.param.ComplaintCollection.ComplaintCollectionExistParam; |
|
|
|
import com.biutag.supervision.pojo.param.ComplaintCollection.ComplaintCollectionExistParam; |
|
|
|
import com.biutag.supervision.pojo.param.ComplaintCollection.ComplaintCollectionQueryParam; |
|
|
|
import com.biutag.supervision.pojo.param.ComplaintCollection.ComplaintCollectionQueryParam; |
|
|
|
import com.biutag.supervision.pojo.param.ComplaintCollection.ComplaintCollectionUpdateParam; |
|
|
|
import com.biutag.supervision.pojo.param.ComplaintCollection.ComplaintCollectionUpdateParam; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.param.DataCaseVerifQueryParam; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.param.DataPetitionComplaintQueryParam; |
|
|
|
import com.biutag.supervision.pojo.param.SupDepartQueryParam; |
|
|
|
import com.biutag.supervision.pojo.param.SupDepartQueryParam; |
|
|
|
import com.biutag.supervision.pojo.param.SupPoliceQueryParam; |
|
|
|
import com.biutag.supervision.pojo.param.SupPoliceQueryParam; |
|
|
|
import com.biutag.supervision.pojo.param.complaintCollectionBlame.ComplaintCollectionBlameQueryParam; |
|
|
|
import com.biutag.supervision.pojo.param.complaintCollectionBlame.ComplaintCollectionBlameQueryParam; |
|
|
|
@ -35,6 +38,8 @@ import com.biutag.supervision.repository.complaintCollection.ComplaintCollection |
|
|
|
import com.biutag.supervision.repository.complaintCollectionBlame.ComplaintCollectionBlameResourceService; |
|
|
|
import com.biutag.supervision.repository.complaintCollectionBlame.ComplaintCollectionBlameResourceService; |
|
|
|
import com.biutag.supervision.repository.complaintCollectionCheckFile.ComplaintCollectionCheckFileResourceService; |
|
|
|
import com.biutag.supervision.repository.complaintCollectionCheckFile.ComplaintCollectionCheckFileResourceService; |
|
|
|
import com.biutag.supervision.repository.complaintCollectionFile.ComplaintCollectionFileResourceService; |
|
|
|
import com.biutag.supervision.repository.complaintCollectionFile.ComplaintCollectionFileResourceService; |
|
|
|
|
|
|
|
import com.biutag.supervision.repository.dataCaseVerif.DataCaseVerifResourceService; |
|
|
|
|
|
|
|
import com.biutag.supervision.repository.dataPetitionComplaint.DataPetitionComplaintResourceService; |
|
|
|
import com.biutag.supervision.repository.supPolice.SupPoliceResourceService; |
|
|
|
import com.biutag.supervision.repository.supPolice.SupPoliceResourceService; |
|
|
|
import com.biutag.supervision.repository.supdepart.SupDepartResourceService; |
|
|
|
import com.biutag.supervision.repository.supdepart.SupDepartResourceService; |
|
|
|
import com.biutag.supervision.service.*; |
|
|
|
import com.biutag.supervision.service.*; |
|
|
|
@ -50,6 +55,7 @@ import java.time.LocalDateTime; |
|
|
|
import java.util.*; |
|
|
|
import java.util.*; |
|
|
|
import java.util.function.Function; |
|
|
|
import java.util.function.Function; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
import java.util.stream.Stream; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @ClassName ComplaintCollectionServiceImpl |
|
|
|
* @ClassName ComplaintCollectionServiceImpl |
|
|
|
@ -75,7 +81,8 @@ public class ComplaintCollectionServiceImpl implements ComplaintCollectionServic |
|
|
|
private final SupPoliceResourceService supPoliceResourceService; |
|
|
|
private final SupPoliceResourceService supPoliceResourceService; |
|
|
|
private final ComplaintCollectionFileResourceService complaintCollectionFileResourceService; |
|
|
|
private final ComplaintCollectionFileResourceService complaintCollectionFileResourceService; |
|
|
|
private final ComplaintCollectionCheckFileResourceService complaintCollectionCheckFileResourceService; |
|
|
|
private final ComplaintCollectionCheckFileResourceService complaintCollectionCheckFileResourceService; |
|
|
|
private final NegativeFileService negativeFileService; |
|
|
|
private final DataPetitionComplaintResourceService dataPetitionComplaintResourceService; |
|
|
|
|
|
|
|
private final DataCaseVerifResourceService dataCaseVerifResourceService; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
@ -115,7 +122,7 @@ public class ComplaintCollectionServiceImpl implements ComplaintCollectionServic |
|
|
|
throw new RuntimeException("目标信息状态不可删除"); |
|
|
|
throw new RuntimeException("目标信息状态不可删除"); |
|
|
|
} |
|
|
|
} |
|
|
|
boolean deleted = complaintCollectionResourceService.deleteById(request.getId()); |
|
|
|
boolean deleted = complaintCollectionResourceService.deleteById(request.getId()); |
|
|
|
if (!deleted){ |
|
|
|
if (!deleted) { |
|
|
|
throw new RuntimeException("删除失败"); |
|
|
|
throw new RuntimeException("删除失败"); |
|
|
|
} |
|
|
|
} |
|
|
|
return Result.success(true); |
|
|
|
return Result.success(true); |
|
|
|
@ -166,7 +173,7 @@ public class ComplaintCollectionServiceImpl implements ComplaintCollectionServic |
|
|
|
Set<String> ids = complaintCollectionPageDTOS.stream().map(ComplaintCollectionPageDTO::getId).collect(Collectors.toSet()); |
|
|
|
Set<String> ids = complaintCollectionPageDTOS.stream().map(ComplaintCollectionPageDTO::getId).collect(Collectors.toSet()); |
|
|
|
ComplaintCollectionFileQueryParam complaintCollectionFileQueryParam = new ComplaintCollectionFileQueryParam(); |
|
|
|
ComplaintCollectionFileQueryParam complaintCollectionFileQueryParam = new ComplaintCollectionFileQueryParam(); |
|
|
|
complaintCollectionFileQueryParam.setComplaintIds(ids); |
|
|
|
complaintCollectionFileQueryParam.setComplaintIds(ids); |
|
|
|
Map<String, List<ComplaintCollectionFile>> complaintCollectionFileMap= complaintCollectionFileResourceService.queryGroupBy(complaintCollectionFileQueryParam, ComplaintCollectionFile::getComplaintId); |
|
|
|
Map<String, List<ComplaintCollectionFile>> complaintCollectionFileMap = complaintCollectionFileResourceService.queryGroupBy(complaintCollectionFileQueryParam, ComplaintCollectionFile::getComplaintId); |
|
|
|
if (CollectionUtil.isNotEmpty(complaintCollectionPageDTOS)) { |
|
|
|
if (CollectionUtil.isNotEmpty(complaintCollectionPageDTOS)) { |
|
|
|
Map<String, String> dictLabelMap = buildDictLabelMap(SupDictEnum.SUSPECT_PROBLEM.getCode()); |
|
|
|
Map<String, String> dictLabelMap = buildDictLabelMap(SupDictEnum.SUSPECT_PROBLEM.getCode()); |
|
|
|
Map<String, String> sfssDictLabelMap = buildDictLabelMap(SupDictEnum.SFSS_SOURCE_TABLE.getCode()); |
|
|
|
Map<String, String> sfssDictLabelMap = buildDictLabelMap(SupDictEnum.SFSS_SOURCE_TABLE.getCode()); |
|
|
|
@ -404,24 +411,25 @@ public class ComplaintCollectionServiceImpl implements ComplaintCollectionServic |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public Result<ComplaintCollectionMailRepeattVo> maileRepeatt(ComplaintCollectionMailRepeattRequest request) { |
|
|
|
public Result<ComplaintCollectionMailRepeattVo> maileRepeatt(ComplaintCollectionMailRepeattRequest request) { |
|
|
|
ComplaintCollectionQueryParam complaintCollectionQueryParam = new ComplaintCollectionQueryParam(); |
|
|
|
List<ComplaintCollectionRepeatDTO> sfssList = buildSfss(request); |
|
|
|
complaintCollectionQueryParam.setResponderIdCode(request.getResponderIdCode()); |
|
|
|
List<ComplaintCollectionRepeatDTO> xfsjList = buildXfsj(request); |
|
|
|
List<ComplaintCollection> complaintCollections = complaintCollectionResourceService.query(complaintCollectionQueryParam); |
|
|
|
List<ComplaintCollectionRepeatDTO> ajhcList = buildAjhc(request); |
|
|
|
List<ComplaintCollectionPageDTO> dtos = ComplaintCollectionTransfer.INSTANCE.entityToPageDTOList(complaintCollections); |
|
|
|
List<ComplaintCollectionRepeatDTO> complaintCollectionRepeatDTOS = Stream.of(sfssList, xfsjList, ajhcList) |
|
|
|
if (CollectionUtil.isNotEmpty(dtos)) { |
|
|
|
.flatMap(Collection::stream) |
|
|
|
Map<String, String> dictLabelMap = buildDictLabelMap(SupDictEnum.SUSPECT_PROBLEM.getCode()); |
|
|
|
.filter(dto -> |
|
|
|
Map<String, String> sfssDictLabelMap = buildDictLabelMap(SupDictEnum.SFSS_SOURCE_TABLE.getCode()); |
|
|
|
StrUtil.isNotBlank(dto.getResponderIdCode()) |
|
|
|
dtos.forEach(one -> { |
|
|
|
&& StrUtil.isNotBlank(dto.getOriginId()) |
|
|
|
// 涉嫌问题拼接
|
|
|
|
) |
|
|
|
one.setInvolveProblemStr(CodeTranslateUtil.translateCodesToLabels(one.getInvolveProblem(), dictLabelMap)); |
|
|
|
.collect(Collectors.toMap( |
|
|
|
// 来源
|
|
|
|
dto -> dto.getResponderIdCode() + "_" + dto.getOriginId(), |
|
|
|
String sourceTable = CodeTranslateUtil.translateCodesToLabels(one.getSourceTable(), sfssDictLabelMap); |
|
|
|
Function.identity(), |
|
|
|
String sourceTableSubOne = CodeTranslateUtil.translateCodesToLabels(one.getSourceTableSubOne(), sfssDictLabelMap); |
|
|
|
(oldVal, newVal) -> oldVal |
|
|
|
one.setSourceTablePath(sourceTable + "/" + sourceTableSubOne); |
|
|
|
)) |
|
|
|
}); |
|
|
|
.values() |
|
|
|
} |
|
|
|
.stream() |
|
|
|
|
|
|
|
.toList(); |
|
|
|
ComplaintCollectionMailRepeattVo complaintCollectionMailRepeattVo = new ComplaintCollectionMailRepeattVo(); |
|
|
|
ComplaintCollectionMailRepeattVo complaintCollectionMailRepeattVo = new ComplaintCollectionMailRepeattVo(); |
|
|
|
complaintCollectionMailRepeattVo.setComplaintCollectionPageDTOS(dtos); |
|
|
|
complaintCollectionMailRepeattVo.setComplaintCollectionRepeatDTOS(complaintCollectionRepeatDTOS); |
|
|
|
return Result.success(complaintCollectionMailRepeattVo); |
|
|
|
return Result.success(complaintCollectionMailRepeattVo); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -553,6 +561,7 @@ public class ComplaintCollectionServiceImpl implements ComplaintCollectionServic |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 保存附件 |
|
|
|
* 保存附件 |
|
|
|
|
|
|
|
* |
|
|
|
* @param complaintId |
|
|
|
* @param complaintId |
|
|
|
* @param thingFiles |
|
|
|
* @param thingFiles |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ -579,4 +588,60 @@ public class ComplaintCollectionServiceImpl implements ComplaintCollectionServic |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private List<ComplaintCollectionRepeatDTO> buildSfss( |
|
|
|
|
|
|
|
ComplaintCollectionMailRepeattRequest request) { |
|
|
|
|
|
|
|
ComplaintCollectionQueryParam param = new ComplaintCollectionQueryParam(); |
|
|
|
|
|
|
|
param.setResponderIdCode(request.getResponderIdCode()); |
|
|
|
|
|
|
|
param.setResponderName(request.getResponderName()); |
|
|
|
|
|
|
|
param.setResponderPhone(request.getResponderPhone()); |
|
|
|
|
|
|
|
Map<String, String> sourceDict = buildDictLabelMap(SupDictEnum.SFSS_SOURCE_TABLE.getCode()); |
|
|
|
|
|
|
|
return complaintCollectionResourceService.query(param) |
|
|
|
|
|
|
|
.stream() |
|
|
|
|
|
|
|
.map(item -> { |
|
|
|
|
|
|
|
ComplaintCollectionRepeatDTO dto = new ComplaintCollectionRepeatDTO(); |
|
|
|
|
|
|
|
BeanUtil.copyProperties(item, dto); |
|
|
|
|
|
|
|
dto.setSourceTable(CodeTranslateUtil.translateCodesToLabels(item.getSourceTable(), sourceDict)); |
|
|
|
|
|
|
|
return dto; |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.toList(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private List<ComplaintCollectionRepeatDTO> buildXfsj( |
|
|
|
|
|
|
|
ComplaintCollectionMailRepeattRequest request) { |
|
|
|
|
|
|
|
DataPetitionComplaintQueryParam param = new DataPetitionComplaintQueryParam(); |
|
|
|
|
|
|
|
param.setResponderIdCode(request.getResponderIdCode()); |
|
|
|
|
|
|
|
param.setResponderName(request.getResponderName()); |
|
|
|
|
|
|
|
param.setResponderPhone(request.getResponderPhone()); |
|
|
|
|
|
|
|
return dataPetitionComplaintResourceService.query(param) |
|
|
|
|
|
|
|
.stream() |
|
|
|
|
|
|
|
.map(item -> { |
|
|
|
|
|
|
|
ComplaintCollectionRepeatDTO dto = new ComplaintCollectionRepeatDTO(); |
|
|
|
|
|
|
|
BeanUtil.copyProperties(item, dto); |
|
|
|
|
|
|
|
String sourceTable = |
|
|
|
|
|
|
|
ProblemSourcesEnum.GJXFPT.getValue() |
|
|
|
|
|
|
|
.equals(item.getProblemSourcesCode()) |
|
|
|
|
|
|
|
? ProblemSourcesEnum.GJXFPT.getLabel() |
|
|
|
|
|
|
|
: ProblemSourcesEnum.GABXF.getLabel(); |
|
|
|
|
|
|
|
dto.setSourceTable(sourceTable); |
|
|
|
|
|
|
|
return dto; |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.toList(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private List<ComplaintCollectionRepeatDTO> buildAjhc( |
|
|
|
|
|
|
|
ComplaintCollectionMailRepeattRequest request) { |
|
|
|
|
|
|
|
DataCaseVerifQueryParam param = new DataCaseVerifQueryParam(); |
|
|
|
|
|
|
|
param.setResponderName(request.getResponderName()); |
|
|
|
|
|
|
|
param.setResponderPhone(request.getResponderPhone()); |
|
|
|
|
|
|
|
return dataCaseVerifResourceService.query(param) |
|
|
|
|
|
|
|
.stream() |
|
|
|
|
|
|
|
.map(item -> { |
|
|
|
|
|
|
|
ComplaintCollectionRepeatDTO dto = new ComplaintCollectionRepeatDTO(); |
|
|
|
|
|
|
|
BeanUtil.copyProperties(item, dto); |
|
|
|
|
|
|
|
dto.setSourceTable(ProblemSourcesEnum.A12389.getLabel()); |
|
|
|
|
|
|
|
return dto; |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.toList(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|