Browse Source

fix: 完善案件核查线索数据下发

master
wxc 4 months ago
parent
commit
d853dc90b7
  1. 13
      src/main/java/com/biutag/supervision/pojo/dto/DataCaseVerifDistribute.java
  2. 81
      src/main/java/com/biutag/supervision/service/DataCaseVerifService.java

13
src/main/java/com/biutag/supervision/pojo/dto/DataCaseVerifDistribute.java

@ -31,7 +31,20 @@ public class DataCaseVerifDistribute {
// 最大延期时长(天)
private Integer maxExtensionDuration;
private String handleDepartId;
@NotBlank
private String distributionFlow;
// 审批流程
@NotBlank
private String approvalFlow;
private String businessTypeCode;
private String businessTypeName;
private List<String> involveProblem;
private String policeType;
}

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

@ -11,10 +11,9 @@ import com.biutag.supervision.constants.enums.*;
import com.biutag.supervision.mapper.DataCaseVerifMapper;
import com.biutag.supervision.pojo.dto.DataCaseVerifDistribute;
import com.biutag.supervision.pojo.dto.DataCaseVerifImportDto;
import com.biutag.supervision.pojo.dto.DataDataPetitionComplainDistribute;
import com.biutag.supervision.pojo.dto.NegativeDto;
import com.biutag.supervision.pojo.entity.DataCaseVerif;
import com.biutag.supervision.pojo.entity.Negative;
import com.biutag.supervision.pojo.entity.NegativeTask;
import com.biutag.supervision.pojo.entity.*;
import com.biutag.supervision.pojo.model.UserAuth;
import com.biutag.supervision.pojo.param.DataCaseVerifQueryParam;
import com.biutag.supervision.pojo.param.NegativeQueryParam;
@ -35,6 +34,8 @@ public class DataCaseVerifService extends ServiceImpl<DataCaseVerifMapper, DataC
private final NegativeTaskService negativeTaskService;
private final SupDepartService departService;
public Page<DataCaseVerif> page(DataCaseVerifQueryParam queryParam) {
LambdaQueryWrapper<DataCaseVerif> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.like(StrUtil.isNotBlank(queryParam.getOriginId()), DataCaseVerif::getOriginId, queryParam.getOriginId())
@ -87,38 +88,66 @@ public class DataCaseVerifService extends ServiceImpl<DataCaseVerifMapper, DataC
public boolean distribution(DataCaseVerifDistribute dataDistribute) {
dataDistribute.getData().forEach(item -> {
NegativeDto negativeDto = new NegativeDto();
negativeDto.setOriginId(item.getOriginId()); // 设置数据源id
negativeDto.setHappenTime(item.getHappenTime());
negativeDto.setOriginId(item.getOriginId());
negativeDto.setDiscoveryTime(item.getDiscoveryTime());
negativeDto.setProblemSourcesCode(ProblemSourcesEnum.A12389.getValue()); // 来源分类
negativeDto.setProblemSourcesCode(ProblemSourcesEnum.A12389.getValue());
negativeDto.setProblemSources(ProblemSourcesEnum.A12389.getLabel());
// negativeDto.setBusinessTypeCode(BusinessTypeEnum.ABWW);
// negativeDto.setBusinessTypeName();
negativeDto.setBusinessTypeCode(BusinessTypeEnum.getByLabel(item.getBusinessTypeName()).getValue());
negativeDto.setResponderName(item.getResponderName()); // 投诉人
negativeDto.setBusinessTypeCode(dataDistribute.getBusinessTypeCode());
negativeDto.setPoliceType(dataDistribute.getPoliceType());
negativeDto.setInvolveProblem(dataDistribute.getInvolveProblem());
negativeDto.setResponderName(item.getResponderName());
negativeDto.setContactPhone(item.getResponderPhone());
negativeDto.setThingDesc(item.getThingDesc()); // 投诉详情
String departId;
String departName;
if (StrUtil.isBlank(item.getThirdDepartId())) {
departId = item.getSecondDepartId();
departName = item.getSecondDepartName();
negativeDto.setThingDesc(item.getThingDesc());
if (StrUtil.isNotBlank(dataDistribute.getHandleDepartId())) {
SupDepart depart = departService.getById(dataDistribute.getHandleDepartId());
if (DepartLevelEnum.SECOND.getValue().equals(depart.getLevel())) {
negativeDto.setDepartId(dataDistribute.getHandleDepartId());
} else if (DepartLevelEnum.THREE.getValue().equals(depart.getLevel())) {
if (DistributionFlowEnum.SECOND.getValue().equals(dataDistribute.getDistributionFlow())) {
negativeDto.setDepartId(depart.getPid());
} else {
negativeDto.setDepartId(depart.getId());
}
} else {
throw new RuntimeException("指定办理单位 请选择二级或三级单位");
}
if (StrUtil.isBlank(item.getThirdDepartId()) && StrUtil.isBlank(item.getSecondDepartId())) {
negativeDto.setInvolveDepartId(depart.getId());
negativeDto.setInvolveDepartName(depart.getShortName());
}
} else {
departId = item.getThirdDepartId();
departName = item.getThirdDepartName();
if (StrUtil.isBlank(item.getThirdDepartId()) && StrUtil.isBlank(item.getSecondDepartId())) {
throw new RuntimeException("被投诉机构为空 请选择指定办理单位");
}
if (DistributionFlowEnum.SECOND.getValue().equals(dataDistribute.getDistributionFlow())) {
negativeDto.setDepartId(item.getSecondDepartId());
} else {
negativeDto.setDepartId(item.getThirdDepartId());
}
}
if (StrUtil.isNotBlank(item.getThirdDepartId()) || StrUtil.isNotBlank(item.getSecondDepartId())) {
String departId;
String departName;
if (StrUtil.isBlank(item.getThirdDepartId())) {
departId = item.getSecondDepartId();
departName = item.getSecondDepartName();
} else {
departId = item.getThirdDepartId();
departName = item.getThirdDepartName();
}
negativeDto.setInvolveDepartId(departId);
negativeDto.setInvolveDepartName(departName);
}
negativeDto.setInvolveDepartId(departId); // 涉及单位
negativeDto.setInvolveDepartName(departName);
negativeDto.setHostLevel(HostLevelEnums.SECOND.getValue());
negativeDto.setApprovalFlow(dataDistribute.getApprovalFlow()); // 审批流程
negativeDto.setDepartId(departId);
negativeDto.setTimeLimit(dataDistribute.getTimeLimit()); // 办理时限
negativeDto.setApprovalFlow(dataDistribute.getApprovalFlow());
negativeDto.setTimeLimit(dataDistribute.getTimeLimit());
negativeDto.setMaxSignDuration(dataDistribute.getMaxSignDuration());
negativeDto.setMaxHandleDuration(dataDistribute.getMaxHandleDuration());
negativeDto.setMaxExtensionDuration(dataDistribute.getMaxExtensionDuration());
negativeDto.setCaseNumber(item.getOriginId()); //涉及案件/警情编号
negativeService.save(negativeDto);
negativeDto.setCaseNumber(item.getOriginId());
update(new LambdaUpdateWrapper<DataCaseVerif>().eq(DataCaseVerif::getOriginId, item.getOriginId())
.set(DataCaseVerif::getDistributionState, DistributionStateEnum.DISTRIBUTED.getValue()));
});

Loading…
Cancel
Save