|
|
|
|
@ -8,16 +8,15 @@ import com.biutag.supervision.constants.enums.ProblemSourcesEnum;
|
|
|
|
|
import com.biutag.supervision.constants.enums.invest.DeleteStatusEnum; |
|
|
|
|
import com.biutag.supervision.pojo.Result; |
|
|
|
|
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.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.param.*; |
|
|
|
|
import com.biutag.supervision.pojo.request.datav.DataVRequest; |
|
|
|
|
import com.biutag.supervision.pojo.vo.AuditSuperviseMapIconVo; |
|
|
|
|
import com.biutag.supervision.pojo.vo.GlobalMapIconVo; |
|
|
|
|
import com.biutag.supervision.pojo.vo.OrganizeProblemRankVo; |
|
|
|
|
import com.biutag.supervision.repository.dataPetitionComplaint.DataPetitionComplaintResourceService; |
|
|
|
|
import com.biutag.supervision.repository.mail.MailResourceService; |
|
|
|
|
import com.biutag.supervision.repository.negative.NegativeResourceService; |
|
|
|
|
@ -207,4 +206,71 @@ public class DatavServiceImpl implements DatavService {
|
|
|
|
|
JSONObject data = new JSONObject().fluentPut("globalTempMapVoList", globalMapIconVoList); |
|
|
|
|
return Result.success(data); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public Result<JSONObject> getOrganizationRank(DataVRequest request) { |
|
|
|
|
Map<String, DepartAndSubDepartDto> fxsjDepartAndSubDepartData = getDepartAndSubDepartData(DepartGroupEnum.COUNTY_CITY_BUREAUS.getId()); |
|
|
|
|
Map<String, DepartAndSubDepartDto> jsdwDepartAndSubDepartData = getDepartAndSubDepartData(DepartGroupEnum.BUREAU_AFFILIATED.getId()); |
|
|
|
|
List<Date> dates = Arrays.asList(request.getBeginTime(), request.getEndTime()); |
|
|
|
|
List<OrganizeProblemRankVo> fxsjlist = new ArrayList<>(); |
|
|
|
|
List<OrganizeProblemRankVo> jsdwlist = new ArrayList<>(); |
|
|
|
|
for (DepartAndSubDepartDto dto : fxsjDepartAndSubDepartData.values()) { |
|
|
|
|
Set<String> allDepartIds = dto.getAllDepartIds(); |
|
|
|
|
NegativeQueryParam negativeQueryParam = new NegativeQueryParam(); |
|
|
|
|
negativeQueryParam.setCrtTime(dates); |
|
|
|
|
negativeQueryParam.setInvolveDepartIds(allDepartIds); |
|
|
|
|
// 问题数
|
|
|
|
|
long count = negativeResourceService.count(negativeQueryParam); |
|
|
|
|
OrganizeProblemRankVo organizeProblemRankVo = OrganizeProblemRankVo.of(dto.getParentName()); |
|
|
|
|
if (count > 0) { |
|
|
|
|
organizeProblemRankVo.setValue(String.valueOf(count)); |
|
|
|
|
fxsjlist.add(organizeProblemRankVo); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
for (DepartAndSubDepartDto dto : jsdwDepartAndSubDepartData.values()) { |
|
|
|
|
Set<String> allDepartIds = dto.getAllDepartIds(); |
|
|
|
|
NegativeQueryParam negativeQueryParam = new NegativeQueryParam(); |
|
|
|
|
negativeQueryParam.setCrtTime(dates); |
|
|
|
|
negativeQueryParam.setInvolveDepartIds(allDepartIds); |
|
|
|
|
// 问题数
|
|
|
|
|
long count = negativeResourceService.count(negativeQueryParam); |
|
|
|
|
OrganizeProblemRankVo organizeProblemRankVo = OrganizeProblemRankVo.of(dto.getParentName()); |
|
|
|
|
if (count > 0) { |
|
|
|
|
organizeProblemRankVo.setValue(String.valueOf(count)); |
|
|
|
|
jsdwlist.add(organizeProblemRankVo); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
fxsjlist.sort((o1, o2) -> { |
|
|
|
|
int value1 = Integer.parseInt(o1.getValue()); |
|
|
|
|
int value2 = Integer.parseInt(o2.getValue()); |
|
|
|
|
return Integer.compare(value2, value1); |
|
|
|
|
}); |
|
|
|
|
jsdwlist.sort((o1, o2) -> { |
|
|
|
|
int value1 = Integer.parseInt(o1.getValue()); |
|
|
|
|
int value2 = Integer.parseInt(o2.getValue()); |
|
|
|
|
return Integer.compare(value2, value1); |
|
|
|
|
}); |
|
|
|
|
JSONObject res = new JSONObject() |
|
|
|
|
.fluentPut("fxsjlist", fxsjlist) |
|
|
|
|
.fluentPut("jsdwlist", jsdwlist); |
|
|
|
|
|
|
|
|
|
return Result.success(res); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @return 部门和子部门映射数据 |
|
|
|
|
*/ |
|
|
|
|
public Map<String, DepartAndSubDepartDto> getDepartAndSubDepartData(Integer groupId) { |
|
|
|
|
// 创建参数对象
|
|
|
|
|
SupDepartGroupParam supDepartGroupParam = new SupDepartGroupParam(); |
|
|
|
|
supDepartGroupParam.setGroupId(groupId); |
|
|
|
|
supDepartGroupParam.setParentLevel(2); |
|
|
|
|
supDepartGroupParam.setChildLevel(3); |
|
|
|
|
|
|
|
|
|
// 调用服务获取数据
|
|
|
|
|
return supDepartResourceService.getDepartAndSubDepart(supDepartGroupParam); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|