|
|
|
@ -8,16 +8,21 @@ import com.biutag.supervision.constants.enums.ProblemSourcesEnum; |
|
|
|
import com.biutag.supervision.constants.enums.invest.DeleteStatusEnum; |
|
|
|
import com.biutag.supervision.constants.enums.invest.DeleteStatusEnum; |
|
|
|
import com.biutag.supervision.pojo.Result; |
|
|
|
import com.biutag.supervision.pojo.Result; |
|
|
|
import com.biutag.supervision.pojo.dto.DepartAndSubDepartDto; |
|
|
|
import com.biutag.supervision.pojo.dto.DepartAndSubDepartDto; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.entity.DataPetitionComplaint; |
|
|
|
import com.biutag.supervision.pojo.entity.Negative; |
|
|
|
import com.biutag.supervision.pojo.entity.Negative; |
|
|
|
import com.biutag.supervision.pojo.entity.NegativeBlame; |
|
|
|
import com.biutag.supervision.pojo.entity.NegativeBlame; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.entity.SupExternalDepart; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.entity.mailbox.Mail; |
|
|
|
import com.biutag.supervision.pojo.entity.report.ReportProject; |
|
|
|
import com.biutag.supervision.pojo.entity.report.ReportProject; |
|
|
|
import com.biutag.supervision.pojo.param.NegativeQueryParam; |
|
|
|
import com.biutag.supervision.pojo.param.*; |
|
|
|
import com.biutag.supervision.pojo.param.ReportProjectQueryParam; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.param.SupDepartGroupParam; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.request.datav.DataVRequest; |
|
|
|
import com.biutag.supervision.pojo.request.datav.DataVRequest; |
|
|
|
import com.biutag.supervision.pojo.vo.AuditSuperviseMapIconVo; |
|
|
|
import com.biutag.supervision.pojo.vo.AuditSuperviseMapIconVo; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.vo.GlobalMapIconVo; |
|
|
|
|
|
|
|
import com.biutag.supervision.repository.dataPetitionComplaint.DataPetitionComplaintResourceService; |
|
|
|
|
|
|
|
import com.biutag.supervision.repository.mail.MailResourceService; |
|
|
|
import com.biutag.supervision.repository.negative.NegativeResourceService; |
|
|
|
import com.biutag.supervision.repository.negative.NegativeResourceService; |
|
|
|
import com.biutag.supervision.repository.reportproject.ReportProjectResourceService; |
|
|
|
import com.biutag.supervision.repository.reportproject.ReportProjectResourceService; |
|
|
|
|
|
|
|
import com.biutag.supervision.repository.supExternalDepart.SupExternalDepartResourceService; |
|
|
|
import com.biutag.supervision.repository.supdepart.SupDepartResourceService; |
|
|
|
import com.biutag.supervision.repository.supdepart.SupDepartResourceService; |
|
|
|
import com.biutag.supervision.service.NegativeBlameService; |
|
|
|
import com.biutag.supervision.service.NegativeBlameService; |
|
|
|
import jakarta.annotation.Resource; |
|
|
|
import jakarta.annotation.Resource; |
|
|
|
@ -49,6 +54,15 @@ public class DatavServiceImpl implements DatavService { |
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private NegativeBlameService negativeBlameService; |
|
|
|
private NegativeBlameService negativeBlameService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private DataPetitionComplaintResourceService dataPetitionComplaintResourceService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private MailResourceService mailResourceService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private SupExternalDepartResourceService supExternalDepartResourceService; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public Result<JSONObject> getAuditMap(DataVRequest request) { |
|
|
|
public Result<JSONObject> getAuditMap(DataVRequest request) { |
|
|
|
List<AuditSuperviseMapIconVo> auditSuperviseMapIconVoList = new ArrayList<>(); |
|
|
|
List<AuditSuperviseMapIconVo> auditSuperviseMapIconVoList = new ArrayList<>(); |
|
|
|
@ -104,4 +118,76 @@ public class DatavServiceImpl implements DatavService { |
|
|
|
JSONObject data = new JSONObject().fluentPut("auditSuperviseMapIconVoList", auditSuperviseMapIconVoList); |
|
|
|
JSONObject data = new JSONObject().fluentPut("auditSuperviseMapIconVoList", auditSuperviseMapIconVoList); |
|
|
|
return Result.success(data); |
|
|
|
return Result.success(data); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public Result<JSONObject> getGlobalMap(DataVRequest request) { |
|
|
|
|
|
|
|
List<GlobalMapIconVo> globalMapIconVoList = new ArrayList<>(); |
|
|
|
|
|
|
|
SupDepartGroupParam supDepartGroupParam = new SupDepartGroupParam(); |
|
|
|
|
|
|
|
supDepartGroupParam.setGroupId(DepartGroupEnum.COUNTY_CITY_BUREAUS.getId()); |
|
|
|
|
|
|
|
supDepartGroupParam.setParentLevel(2); |
|
|
|
|
|
|
|
supDepartGroupParam.setChildLevel(3); |
|
|
|
|
|
|
|
Map<String, DepartAndSubDepartDto> departAndSubDepart = supDepartResourceService.getDepartAndSubDepart(supDepartGroupParam); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (Map.Entry<String, DepartAndSubDepartDto> entry : departAndSubDepart.entrySet()) { |
|
|
|
|
|
|
|
String departId = entry.getKey(); |
|
|
|
|
|
|
|
DepartAndSubDepartDto departDto = entry.getValue(); |
|
|
|
|
|
|
|
Set<String> allDepartIds = departDto.getAllDepartIds(); |
|
|
|
|
|
|
|
GlobalMapIconVo globalMapIconVo = GlobalMapIconVo.of(departId, departDto.getParentName()); |
|
|
|
|
|
|
|
List<Date> dates = Arrays.asList(request.getBeginTime(), request.getEndTime()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NegativeQueryParam negativeQueryParam = new NegativeQueryParam(); |
|
|
|
|
|
|
|
negativeQueryParam.setCrtTime(dates); |
|
|
|
|
|
|
|
negativeQueryParam.setInvolveDepartIds(allDepartIds); |
|
|
|
|
|
|
|
List<Negative> negativeList = negativeResourceService.query(negativeQueryParam); |
|
|
|
|
|
|
|
// 现场督查
|
|
|
|
|
|
|
|
long supervisionProCount = negativeList.stream().filter(one -> ProblemSourcesEnum.GROUP_13.contains(one.getProblemSourcesCode())).count(); |
|
|
|
|
|
|
|
// 数字督察
|
|
|
|
|
|
|
|
long numSupervisionProCount = negativeList.stream().filter(one -> ProblemSourcesEnum.GROUP_14_15_16.contains(one.getProblemSourcesCode())).count(); |
|
|
|
|
|
|
|
// 案件核查
|
|
|
|
|
|
|
|
long caseVerificationProCount = negativeList.stream().filter(one -> ProblemSourcesEnum.GROUP_17_18_19_20.contains(one.getProblemSourcesCode())).count(); |
|
|
|
|
|
|
|
// 12337
|
|
|
|
|
|
|
|
long XF12337count = negativeList.stream().filter(one -> ProblemSourcesEnum.XF12337.getValue().equals(one.getProblemSourcesCode())).count(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DataPetitionComplaintQueryParam dataPetitionComplaintQueryParam = new DataPetitionComplaintQueryParam(); |
|
|
|
|
|
|
|
dataPetitionComplaintQueryParam.setCreateTime(dates); |
|
|
|
|
|
|
|
List<DataPetitionComplaint> dataPetitionComplaints = dataPetitionComplaintResourceService.query(dataPetitionComplaintQueryParam); |
|
|
|
|
|
|
|
// 国家信访
|
|
|
|
|
|
|
|
long countryMail = dataPetitionComplaints.stream().filter(one -> "22".equals(one.getProblemSourcesCode())).count(); |
|
|
|
|
|
|
|
// 公安部门信访
|
|
|
|
|
|
|
|
long policeMail = dataPetitionComplaints.stream().filter(one -> "21".equals(one.getProblemSourcesCode())).count(); |
|
|
|
|
|
|
|
// 审计项目数
|
|
|
|
|
|
|
|
ReportProjectQueryParam reportProjectQueryParam = new ReportProjectQueryParam(); |
|
|
|
|
|
|
|
reportProjectQueryParam.setArchivingStart(request.getBeginTime()); |
|
|
|
|
|
|
|
reportProjectQueryParam.setArchivingEnd(request.getEndTime()); |
|
|
|
|
|
|
|
reportProjectQueryParam.setAuditUnitIds(allDepartIds); |
|
|
|
|
|
|
|
reportProjectQueryParam.setDeleteFlag(DeleteStatusEnum.NO.getCode()); |
|
|
|
|
|
|
|
List<ReportProject> reportProjectList = reportProjectResourceService.query(reportProjectQueryParam); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 局长信箱
|
|
|
|
|
|
|
|
SupExternalDepartQueryParam supExternalDepartQueryParam = new SupExternalDepartQueryParam(); |
|
|
|
|
|
|
|
supExternalDepartQueryParam.setInternalIds(Collections.singleton(departDto.getParentId())); |
|
|
|
|
|
|
|
supExternalDepartQueryParam.setSource("局长信箱"); |
|
|
|
|
|
|
|
List<SupExternalDepart> supExternalDepartList = supExternalDepartResourceService.query(supExternalDepartQueryParam); |
|
|
|
|
|
|
|
SupExternalDepart depart = Optional |
|
|
|
|
|
|
|
.ofNullable(supExternalDepartList) |
|
|
|
|
|
|
|
.filter(list -> !list.isEmpty()) |
|
|
|
|
|
|
|
.map(list -> list.get(0)) |
|
|
|
|
|
|
|
.orElseThrow(() -> new RuntimeException("未查询到"+departDto.getParentName()+"的外部部门信息")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MailQueryParam mailQueryParam = new MailQueryParam(); |
|
|
|
|
|
|
|
mailQueryParam.setSecondDeptId(depart.getExternalId()); |
|
|
|
|
|
|
|
List<Mail> mailList = mailResourceService.query(mailQueryParam); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
globalMapIconVo.setSupervisionPro(supervisionProCount); |
|
|
|
|
|
|
|
globalMapIconVo.setNumSupervisionPro(numSupervisionProCount); |
|
|
|
|
|
|
|
globalMapIconVo.setCaseVerificationPro(caseVerificationProCount); |
|
|
|
|
|
|
|
globalMapIconVo.setComplaintPro(XF12337count+countryMail+policeMail); |
|
|
|
|
|
|
|
globalMapIconVo.setAuditPro((long) reportProjectList.size()); |
|
|
|
|
|
|
|
globalMapIconVo.setMailboxNumber((long) mailList.size()); |
|
|
|
|
|
|
|
globalMapIconVo.calcTotal(); |
|
|
|
|
|
|
|
globalMapIconVoList.add(globalMapIconVo); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
JSONObject data = new JSONObject().fluentPut("globalTempMapVoList", globalMapIconVoList); |
|
|
|
|
|
|
|
return Result.success(data); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|