|
|
|
|
@ -5,17 +5,17 @@ import cn.hutool.core.date.DateUtil;
|
|
|
|
|
import cn.hutool.core.util.NumberUtil; |
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
|
import com.biutag.supervision.constants.enums.*; |
|
|
|
|
import com.biutag.supervision.constants.enums.invest.DeleteStatusEnum; |
|
|
|
|
import com.biutag.supervision.constants.enums.invest.ReportProjectNodeEnum; |
|
|
|
|
import com.biutag.supervision.mapper.DataPetitionComplaintMapper; |
|
|
|
|
import com.biutag.supervision.mapper.RpcApplyMapper; |
|
|
|
|
import com.biutag.supervision.mapper.RpcComfortPacksMapper; |
|
|
|
|
import com.biutag.supervision.mapper.*; |
|
|
|
|
import com.biutag.supervision.pojo.Result; |
|
|
|
|
import com.biutag.supervision.pojo.dto.DepartAndSubDepartDto; |
|
|
|
|
import com.biutag.supervision.pojo.dto.common.BarItem; |
|
|
|
|
import com.biutag.supervision.pojo.dto.common.PieItem; |
|
|
|
|
import com.biutag.supervision.pojo.entity.*; |
|
|
|
|
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.param.dataAudit.DataAuditQueryParam; |
|
|
|
|
@ -42,6 +42,7 @@ import java.time.ZoneId;
|
|
|
|
|
import java.util.*; |
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
import static com.biutag.supervision.constants.enums.DepartGroupEnum.COUNTY_CITY_BUREAUS; |
|
|
|
|
import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.*; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
@ -112,6 +113,21 @@ public class DatavServiceImpl implements DatavService {
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
private DataMailService dataMailService; |
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
private MailMapper mailMapper; |
|
|
|
|
@Resource |
|
|
|
|
private SupExternalDepartMapper supExternalDepartMapper; |
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
private DataPetition12337Service dataPetition12337Service; |
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
private SupDepartMapper supDepartMapper; |
|
|
|
|
|
|
|
|
|
private final String VALID_SIGN = "terminated"; |
|
|
|
|
private final String EX_SOURCE = "局长信箱"; |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public Result<JSONObject> getAuditMap(DataVRequest request) { |
|
|
|
|
List<AuditSuperviseMapIconVo> auditSuperviseMapIconVoList = new ArrayList<>(); |
|
|
|
|
@ -810,4 +826,485 @@ public class DatavServiceImpl implements DatavService {
|
|
|
|
|
.fluentPut("bwzdLeaderReviewMailList", bwzdLeaderReviewMailList); |
|
|
|
|
return Result.success(data); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public Result<JSONObject> getMailMapIcon(DataVRequest request) { |
|
|
|
|
List<MailMapIconVo> res = new ArrayList<>(); |
|
|
|
|
Date beginTime = request.getBeginTime(); |
|
|
|
|
Date endTime = request.getEndTime(); |
|
|
|
|
// 查询所有分县市局
|
|
|
|
|
SupDepartQueryParam supDepartQueryParam = new SupDepartQueryParam(); |
|
|
|
|
supDepartQueryParam.setStatisticsGroupId(3); |
|
|
|
|
List<SupDepart> fxsjDw = supDepartResourceService.query(supDepartQueryParam); |
|
|
|
|
for (SupDepart supDepart : fxsjDw) { |
|
|
|
|
MailMapIconVo mapIconVo = new MailMapIconVo(); |
|
|
|
|
mapIconVo.setName(supDepart.getShortName()); |
|
|
|
|
mapIconVo.setDepartId(supDepart.getId()); |
|
|
|
|
res.add(mapIconVo); |
|
|
|
|
} |
|
|
|
|
for (MailMapIconVo re : res) { |
|
|
|
|
String departId = re.getDepartId(); |
|
|
|
|
// 国家信访
|
|
|
|
|
Long countryTotal = dataPetitionComplaintMapper.selectMailBySourceCode(beginTime, endTime, GJXFPT.getValue(), departId); |
|
|
|
|
// 公安信访
|
|
|
|
|
Long policeTotal = dataPetitionComplaintMapper.selectMailBySourceCode(beginTime, endTime, GABXF.getValue(), departId); |
|
|
|
|
// 12337
|
|
|
|
|
Long numTotal = dataPetition12337Service.count(new LambdaQueryWrapper<DataPetition12337>().between(DataPetition12337::getDiscoverTime, beginTime, endTime).eq(DataPetition12337::getSecondDepartId,departId)); |
|
|
|
|
// 局长信箱
|
|
|
|
|
QueryWrapper<Mail> subOneMailQueryWrapper = new QueryWrapper<>(); |
|
|
|
|
String exDepartId = supExternalDepartMapper.getExIdByInId(departId.toString(), EX_SOURCE); |
|
|
|
|
subOneMailQueryWrapper.ne("mail_state", VALID_SIGN); |
|
|
|
|
subOneMailQueryWrapper.eq("second_dept_id", exDepartId); |
|
|
|
|
subOneMailQueryWrapper.between("create_time", beginTime, endTime); |
|
|
|
|
Long commissionerTotal = mailMapper.selectCount(subOneMailQueryWrapper); |
|
|
|
|
// 总数
|
|
|
|
|
Long total = countryTotal + policeTotal + numTotal; |
|
|
|
|
//国家信访
|
|
|
|
|
re.setCountryTotal(countryTotal.toString()); |
|
|
|
|
//公安部信访
|
|
|
|
|
re.setPoliceTotal(policeTotal.toString()); |
|
|
|
|
//局长信箱
|
|
|
|
|
re.setCommissionerTotal(commissionerTotal.toString()); |
|
|
|
|
//12337信访
|
|
|
|
|
re.setNumTotal(numTotal.toString()); |
|
|
|
|
re.setTotal(total.toString()); |
|
|
|
|
} |
|
|
|
|
JSONObject data = new JSONObject().fluentPut("mailMapIconList", res); |
|
|
|
|
return Result.success(data); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public Result<JSONObject> getSubOneFirstAndRepeatMail(SubDataVRequest request) { |
|
|
|
|
Date beginTime = request.getBeginTime(); |
|
|
|
|
Date endTime = request.getEndTime(); |
|
|
|
|
// 派出所
|
|
|
|
|
List<OrganizeProblemRankVo> fxsjFirstRankList = dataPetitionComplaintMapper.getSubMailRank(beginTime, endTime, 10, RepeatEnum.FIRST_MAIL.getId(), request.getDepartId()); |
|
|
|
|
List<OrganizeProblemRankVo> fxsjRepeatRankList = dataPetitionComplaintMapper.getSubMailRank(beginTime, endTime, 10, RepeatEnum.REPEAT_MAIL.getId(), request.getDepartId()); |
|
|
|
|
// 大队
|
|
|
|
|
List<OrganizeProblemRankVo> bwzdFirstRankList = dataPetitionComplaintMapper.getSubMailRank(beginTime, endTime, null, RepeatEnum.FIRST_MAIL.getId(),request.getDepartId()); |
|
|
|
|
List<OrganizeProblemRankVo> bwzdRepeatRankList = dataPetitionComplaintMapper.getSubMailRank(beginTime, endTime, null, RepeatEnum.REPEAT_MAIL.getId(), request.getDepartId()); |
|
|
|
|
// 汇总(派出所)
|
|
|
|
|
MailFirstAndRepeatOverviewVo fxsjOverview = new MailFirstAndRepeatOverviewVo(); |
|
|
|
|
fxsjOverview.setFirstMail(fxsjFirstRankList.stream().mapToInt(OrganizeProblemRankVo::getValueAsInt).sum()); |
|
|
|
|
fxsjOverview.setRepeatMail(fxsjRepeatRankList.stream().mapToInt(OrganizeProblemRankVo::getValueAsInt).sum()); |
|
|
|
|
fxsjOverview.setLeaderMail(0); |
|
|
|
|
// 汇总(大队)
|
|
|
|
|
MailFirstAndRepeatOverviewVo bwzdOverview = new MailFirstAndRepeatOverviewVo(); |
|
|
|
|
bwzdOverview.setFirstMail(bwzdFirstRankList.stream().mapToInt(OrganizeProblemRankVo::getValueAsInt).sum()); |
|
|
|
|
bwzdOverview.setRepeatMail(bwzdRepeatRankList.stream().mapToInt(OrganizeProblemRankVo::getValueAsInt).sum()); |
|
|
|
|
bwzdOverview.setLeaderMail(0); |
|
|
|
|
JSONObject data = new JSONObject() |
|
|
|
|
.fluentPut("fxsjOverview", fxsjOverview) |
|
|
|
|
.fluentPut("bwzdOverview", bwzdOverview) |
|
|
|
|
.fluentPut("fxsjFirstRankList", fxsjFirstRankList) |
|
|
|
|
.fluentPut("fxsjRepeatRankList", fxsjRepeatRankList) |
|
|
|
|
.fluentPut("bwzdFirstRankList", bwzdFirstRankList) |
|
|
|
|
.fluentPut("bwzdRepeatRankList", bwzdRepeatRankList); |
|
|
|
|
// return getSubOneFirstAndRepeatMail();
|
|
|
|
|
return Result.success(data); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public Result<JSONObject> getSubOneAllMailCount(SubDataVRequest request) { |
|
|
|
|
MailOverviewVo overview = new MailOverviewVo(); |
|
|
|
|
Date beginTime = request.getBeginTime(); |
|
|
|
|
Date endTime = request.getEndTime(); |
|
|
|
|
String departId = request.getDepartId(); |
|
|
|
|
// 国家信访
|
|
|
|
|
Long countryTotal = dataPetitionComplaintMapper.selectMailBySourceCode(beginTime, endTime, GJXFPT.getValue(), departId); |
|
|
|
|
// 公安信访
|
|
|
|
|
Long policeTotal = dataPetitionComplaintMapper.selectMailBySourceCode(beginTime, endTime, GABXF.getValue(), departId); |
|
|
|
|
// 12337
|
|
|
|
|
Long numTotal = dataPetition12337Service.count(new LambdaQueryWrapper<DataPetition12337>().between(DataPetition12337::getDiscoverTime, beginTime, endTime).eq(DataPetition12337::getSecondDepartId,departId)); |
|
|
|
|
// 局长信箱
|
|
|
|
|
QueryWrapper<Mail> subOneMailQueryWrapper = new QueryWrapper<>(); |
|
|
|
|
String exDepartId = supExternalDepartMapper.getExIdByInId(departId.toString(), "局长信箱"); |
|
|
|
|
subOneMailQueryWrapper.ne("mail_state", VALID_SIGN); |
|
|
|
|
subOneMailQueryWrapper.eq("second_dept_id", exDepartId); |
|
|
|
|
subOneMailQueryWrapper.between("create_time", beginTime, endTime); |
|
|
|
|
Long commissionerTotal = mailMapper.selectCount(subOneMailQueryWrapper); |
|
|
|
|
// 总数
|
|
|
|
|
Long total = countryTotal + policeTotal + numTotal; |
|
|
|
|
//国家信访
|
|
|
|
|
overview.setCountryMail(countryTotal); |
|
|
|
|
//公安部信访
|
|
|
|
|
overview.setPoliceMail(policeTotal); |
|
|
|
|
//局长信箱
|
|
|
|
|
overview.setManageMail(commissionerTotal); |
|
|
|
|
//12337信访
|
|
|
|
|
overview.setNumberMail(numTotal); |
|
|
|
|
overview.setTotalMail(total); |
|
|
|
|
// overview.setCountryMail(120L); // 国家信访
|
|
|
|
|
// overview.setPoliceMail(45L); // 公安部信访
|
|
|
|
|
// overview.setNumberMail(30L); // 12337
|
|
|
|
|
// overview.setManageMail(20L); // 局长信箱
|
|
|
|
|
// overview.setTotalMail(120L + 45L + 30L);
|
|
|
|
|
JSONObject data = new JSONObject().fluentPut("overview", overview); |
|
|
|
|
return Result.success(data); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public Result<JSONObject> getSubOneEntanglementAndMassMail(SubDataVRequest request) { |
|
|
|
|
Date beginTime = request.getBeginTime(); |
|
|
|
|
Date endTime = request.getEndTime(); |
|
|
|
|
String departId = request.getDepartId(); |
|
|
|
|
// 分县市局
|
|
|
|
|
List<OrganizeProblemRankVo> fxsjMassMailList = dataPetitionComplaintMapper.getSubOneMassMailRank(beginTime, endTime, 10, departId); |
|
|
|
|
List<OrganizeProblemRankVo> fxsjLeaderReviewMailList = dataPetitionComplaintMapper.getSubOneMailLeaderRank(beginTime, endTime, 10, departId); |
|
|
|
|
// 局属单位
|
|
|
|
|
List<OrganizeProblemRankVo> bwzdMassMailList = dataPetitionComplaintMapper.getSubOneMassMailRank(beginTime, endTime, null, departId); |
|
|
|
|
List<OrganizeProblemRankVo> bwzdLeaderReviewMailList = dataPetitionComplaintMapper.getMailLeaderRank(beginTime, endTime, 4); |
|
|
|
|
// 汇总(分县市局)
|
|
|
|
|
MailEntanglementMassOverviewVo fxsjOverview = new MailEntanglementMassOverviewVo(); |
|
|
|
|
fxsjOverview.setEntanglement(0); |
|
|
|
|
fxsjOverview.setMass(fxsjMassMailList.stream().mapToInt(OrganizeProblemRankVo::getValueAsInt).sum()); |
|
|
|
|
fxsjOverview.setLeaderReview(fxsjLeaderReviewMailList.stream().mapToInt(OrganizeProblemRankVo::getValueAsInt).sum()); |
|
|
|
|
// 汇总(局属单位)
|
|
|
|
|
MailEntanglementMassOverviewVo bwzdOverview = new MailEntanglementMassOverviewVo(); |
|
|
|
|
bwzdOverview.setEntanglement(0); |
|
|
|
|
bwzdOverview.setMass(bwzdMassMailList.stream().mapToInt(OrganizeProblemRankVo::getValueAsInt).sum()); |
|
|
|
|
bwzdOverview.setLeaderReview(bwzdLeaderReviewMailList.stream().mapToInt(OrganizeProblemRankVo::getValueAsInt).sum()); |
|
|
|
|
JSONObject data = new JSONObject() |
|
|
|
|
.fluentPut("fxsjOverview", fxsjOverview) |
|
|
|
|
.fluentPut("bwzdOverview", bwzdOverview) |
|
|
|
|
.fluentPut("fxsjMassMailList", fxsjMassMailList) |
|
|
|
|
.fluentPut("bwzdMassMailList", bwzdMassMailList) |
|
|
|
|
.fluentPut("fxsjLeaderReviewMailList", fxsjLeaderReviewMailList) |
|
|
|
|
.fluentPut("bwzdLeaderReviewMailList", bwzdLeaderReviewMailList); |
|
|
|
|
// return mockSubOneEntanglementAndMassMail();
|
|
|
|
|
return Result.success(data); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public Result<JSONObject> getSubOneMailMapIcon(SubDataVRequest request) { |
|
|
|
|
List<MailMapIconVo> res = new ArrayList<>(); |
|
|
|
|
String departId = request.getDepartId(); |
|
|
|
|
Date beginTime = request.getBeginTime(); |
|
|
|
|
Date endTime = request.getEndTime(); |
|
|
|
|
// 查该区县局下属所有派出所
|
|
|
|
|
List<SupDepart> policeDeparts = supDepartMapper.selectPoliceDeparts(Integer.valueOf(departId)); |
|
|
|
|
for (SupDepart supDepart : policeDeparts) { |
|
|
|
|
MailMapIconVo mapIconVo = new MailMapIconVo(); |
|
|
|
|
mapIconVo.setName(supDepart.getShortName()); |
|
|
|
|
mapIconVo.setDepartId(supDepart.getId()); |
|
|
|
|
res.add(mapIconVo); |
|
|
|
|
} |
|
|
|
|
// 查询国家信访和公安部信访数据
|
|
|
|
|
for (MailMapIconVo re : res) { |
|
|
|
|
String policeDepartId = re.getDepartId(); |
|
|
|
|
// 国家
|
|
|
|
|
Long countryTotal = dataPetitionComplaintMapper.selectPoliceMailBySourceCode(beginTime, endTime, GJXFPT.getValue(), policeDepartId); |
|
|
|
|
// 公安
|
|
|
|
|
Long policeTotal = dataPetitionComplaintMapper.selectPoliceMailBySourceCode(beginTime, endTime, GABXF.getValue(), policeDepartId); |
|
|
|
|
// 12337 数据
|
|
|
|
|
LambdaQueryWrapper<DataPetition12337> dataPetition12337LambdaQueryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
dataPetition12337LambdaQueryWrapper.between(DataPetition12337::getDiscoverTime, beginTime, endTime); |
|
|
|
|
dataPetition12337LambdaQueryWrapper.eq(DataPetition12337::getThirdDepartId, re.getDepartId()); |
|
|
|
|
Long numTotal = dataPetition12337Service.count(dataPetition12337LambdaQueryWrapper); |
|
|
|
|
// 局长信箱
|
|
|
|
|
String exDepartId = supExternalDepartMapper.getExIdByInId(policeDepartId, EX_SOURCE); |
|
|
|
|
Long manageMail = 0L; |
|
|
|
|
if (exDepartId != null) { |
|
|
|
|
QueryWrapper<Mail> qw = new QueryWrapper<>(); |
|
|
|
|
qw.ne("mail_state", VALID_SIGN); |
|
|
|
|
qw.eq("three_dept_id", exDepartId); |
|
|
|
|
qw.between("create_time", beginTime, endTime); |
|
|
|
|
manageMail = mailMapper.selectCount(qw); |
|
|
|
|
} |
|
|
|
|
long country = countryTotal == null ? 0L : countryTotal; |
|
|
|
|
long police = policeTotal == null ? 0L : policeTotal; |
|
|
|
|
long num = numTotal == null ? 0L : numTotal; |
|
|
|
|
long manage = manageMail == null ? 0L : manageMail; |
|
|
|
|
Long total = country + police + num ; |
|
|
|
|
re.setCountryTotal(String.valueOf(country)); |
|
|
|
|
re.setPoliceTotal(String.valueOf(police)); |
|
|
|
|
re.setCommissionerTotal(String.valueOf(manage)); |
|
|
|
|
re.setNumTotal(String.valueOf(num)); |
|
|
|
|
re.setTotal(total.toString()); |
|
|
|
|
} |
|
|
|
|
JSONObject data = new JSONObject().fluentPut("mailMapIconList", res); |
|
|
|
|
// return getSubOneMailMapIcon();
|
|
|
|
|
return Result.success(data); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Result<JSONObject> getSubOneMailMapIcon() { |
|
|
|
|
|
|
|
|
|
// ✅ 注意:这里的 name 必须和地图 geojson 区域名一致(一般是“xx街道/园区”)
|
|
|
|
|
// departId 仍然放派出所 dept_id,用于你点击打开弹窗时传参
|
|
|
|
|
List<MailMapIconVo> list = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
// 东屯渡街道 -> 东屯渡派出所(2990)
|
|
|
|
|
MailMapIconVo a = new MailMapIconVo(); |
|
|
|
|
a.setName("东屯渡街道"); |
|
|
|
|
a.setDepartId("2990"); |
|
|
|
|
a.setCountryTotal("32"); |
|
|
|
|
a.setPoliceTotal("18"); |
|
|
|
|
a.setCommissionerTotal("6"); |
|
|
|
|
a.setNumTotal("9"); |
|
|
|
|
a.setTotal(String.valueOf(32 + 18 + 9)); // total 不含 commissionerTotal
|
|
|
|
|
list.add(a); |
|
|
|
|
|
|
|
|
|
// 定王台街道 -> 定王台派出所(1245)
|
|
|
|
|
MailMapIconVo b = new MailMapIconVo(); |
|
|
|
|
b.setName("定王台街道"); |
|
|
|
|
b.setDepartId("1245"); |
|
|
|
|
b.setCountryTotal("21"); |
|
|
|
|
b.setPoliceTotal("10"); |
|
|
|
|
b.setCommissionerTotal("4"); |
|
|
|
|
b.setNumTotal("7"); |
|
|
|
|
b.setTotal(String.valueOf(21 + 10 + 7)); |
|
|
|
|
list.add(b); |
|
|
|
|
|
|
|
|
|
// 火星街道 -> 火星派出所(2985)
|
|
|
|
|
MailMapIconVo c = new MailMapIconVo(); |
|
|
|
|
c.setName("火星街道"); |
|
|
|
|
c.setDepartId("2985"); |
|
|
|
|
c.setCountryTotal("45"); |
|
|
|
|
c.setPoliceTotal("24"); |
|
|
|
|
c.setCommissionerTotal("9"); |
|
|
|
|
c.setNumTotal("14"); |
|
|
|
|
c.setTotal(String.valueOf(45 + 24 + 14)); |
|
|
|
|
list.add(c); |
|
|
|
|
|
|
|
|
|
// 五里牌街道 -> 五里牌派出所(2971)
|
|
|
|
|
MailMapIconVo d = new MailMapIconVo(); |
|
|
|
|
d.setName("五里牌街道"); |
|
|
|
|
d.setDepartId("2971"); |
|
|
|
|
d.setCountryTotal("16"); |
|
|
|
|
d.setPoliceTotal("9"); |
|
|
|
|
d.setCommissionerTotal("3"); |
|
|
|
|
d.setNumTotal("5"); |
|
|
|
|
d.setTotal(String.valueOf(16 + 9 + 5)); |
|
|
|
|
list.add(d); |
|
|
|
|
|
|
|
|
|
// 荷花园街道 -> 荷花园派出所(1247)
|
|
|
|
|
MailMapIconVo e = new MailMapIconVo(); |
|
|
|
|
e.setName("荷花园街道"); |
|
|
|
|
e.setDepartId("1247"); |
|
|
|
|
e.setCountryTotal("38"); |
|
|
|
|
e.setPoliceTotal("20"); |
|
|
|
|
e.setCommissionerTotal("7"); |
|
|
|
|
e.setNumTotal("11"); |
|
|
|
|
e.setTotal(String.valueOf(38 + 20 + 11)); |
|
|
|
|
list.add(e); |
|
|
|
|
|
|
|
|
|
// 文艺路街道 -> 文艺路派出所(2946)
|
|
|
|
|
MailMapIconVo f = new MailMapIconVo(); |
|
|
|
|
f.setName("文艺路街道"); |
|
|
|
|
f.setDepartId("2946"); |
|
|
|
|
f.setCountryTotal("12"); |
|
|
|
|
f.setPoliceTotal("6"); |
|
|
|
|
f.setCommissionerTotal("2"); |
|
|
|
|
f.setNumTotal("3"); |
|
|
|
|
f.setTotal(String.valueOf(12 + 6 + 3)); |
|
|
|
|
list.add(f); |
|
|
|
|
|
|
|
|
|
// 朝阳街街道 -> 朝阳街派出所(2960) (你表里就是“朝阳街街道”)
|
|
|
|
|
MailMapIconVo g = new MailMapIconVo(); |
|
|
|
|
g.setName("朝阳街街道"); |
|
|
|
|
g.setDepartId("2960"); |
|
|
|
|
g.setCountryTotal("27"); |
|
|
|
|
g.setPoliceTotal("13"); |
|
|
|
|
g.setCommissionerTotal("5"); |
|
|
|
|
g.setNumTotal("8"); |
|
|
|
|
g.setTotal(String.valueOf(27 + 13 + 8)); |
|
|
|
|
list.add(g); |
|
|
|
|
|
|
|
|
|
// 韭菜园街道 -> 韭菜园派出所(2940)
|
|
|
|
|
MailMapIconVo h = new MailMapIconVo(); |
|
|
|
|
h.setName("韭菜园街道"); |
|
|
|
|
h.setDepartId("2940"); |
|
|
|
|
h.setCountryTotal("19"); |
|
|
|
|
h.setPoliceTotal("7"); |
|
|
|
|
h.setCommissionerTotal("3"); |
|
|
|
|
h.setNumTotal("6"); |
|
|
|
|
h.setTotal(String.valueOf(19 + 7 + 6)); |
|
|
|
|
list.add(h); |
|
|
|
|
|
|
|
|
|
// 隆平高科技园 -> (dept_id=2898)
|
|
|
|
|
MailMapIconVo i = new MailMapIconVo(); |
|
|
|
|
i.setName("隆平高科技园"); |
|
|
|
|
i.setDepartId("2898"); |
|
|
|
|
i.setCountryTotal("8"); |
|
|
|
|
i.setPoliceTotal("4"); |
|
|
|
|
i.setCommissionerTotal("1"); |
|
|
|
|
i.setNumTotal("2"); |
|
|
|
|
i.setTotal(String.valueOf(8 + 4 + 2)); |
|
|
|
|
list.add(i); |
|
|
|
|
|
|
|
|
|
// 马王堆街道 -> 马王堆派出所(3003)
|
|
|
|
|
MailMapIconVo j = new MailMapIconVo(); |
|
|
|
|
j.setName("马王堆街道"); |
|
|
|
|
j.setDepartId("3003"); |
|
|
|
|
j.setCountryTotal("33"); |
|
|
|
|
j.setPoliceTotal("15"); |
|
|
|
|
j.setCommissionerTotal("6"); |
|
|
|
|
j.setNumTotal("10"); |
|
|
|
|
j.setTotal(String.valueOf(33 + 15 + 10)); |
|
|
|
|
list.add(j); |
|
|
|
|
|
|
|
|
|
// 马坡岭街道 -> 马坡岭派出所(3019)
|
|
|
|
|
MailMapIconVo k = new MailMapIconVo(); |
|
|
|
|
k.setName("马坡岭街道"); |
|
|
|
|
k.setDepartId("3019"); |
|
|
|
|
k.setCountryTotal("14"); |
|
|
|
|
k.setPoliceTotal("5"); |
|
|
|
|
k.setCommissionerTotal("2"); |
|
|
|
|
k.setNumTotal("4"); |
|
|
|
|
k.setTotal(String.valueOf(14 + 5 + 4)); |
|
|
|
|
list.add(k); |
|
|
|
|
|
|
|
|
|
// 湘湖街道 -> 湘湖派出所(1246)
|
|
|
|
|
MailMapIconVo l = new MailMapIconVo(); |
|
|
|
|
l.setName("湘湖街道"); |
|
|
|
|
l.setDepartId("1246"); |
|
|
|
|
l.setCountryTotal("26"); |
|
|
|
|
l.setPoliceTotal("12"); |
|
|
|
|
l.setCommissionerTotal("4"); |
|
|
|
|
l.setNumTotal("7"); |
|
|
|
|
l.setTotal(String.valueOf(26 + 12 + 7)); |
|
|
|
|
list.add(l); |
|
|
|
|
|
|
|
|
|
// 东岸街道 -> 东岸派出所(1248)
|
|
|
|
|
MailMapIconVo m = new MailMapIconVo(); |
|
|
|
|
m.setName("东岸街道"); |
|
|
|
|
m.setDepartId("1248"); |
|
|
|
|
m.setCountryTotal("11"); |
|
|
|
|
m.setPoliceTotal("4"); |
|
|
|
|
m.setCommissionerTotal("1"); |
|
|
|
|
m.setNumTotal("3"); |
|
|
|
|
m.setTotal(String.valueOf(11 + 4 + 3)); |
|
|
|
|
list.add(m); |
|
|
|
|
|
|
|
|
|
// 东湖街道 -> 东湖派出所(3038)
|
|
|
|
|
MailMapIconVo n = new MailMapIconVo(); |
|
|
|
|
n.setName("东湖街道"); |
|
|
|
|
n.setDepartId("3038"); |
|
|
|
|
n.setCountryTotal("29"); |
|
|
|
|
n.setPoliceTotal("16"); |
|
|
|
|
n.setCommissionerTotal("5"); |
|
|
|
|
n.setNumTotal("9"); |
|
|
|
|
n.setTotal(String.valueOf(29 + 16 + 9)); |
|
|
|
|
list.add(n); |
|
|
|
|
|
|
|
|
|
JSONObject data = new JSONObject().fluentPut("mailMapIconList", list); |
|
|
|
|
return Result.success(data); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Result<JSONObject> mockSubOneEntanglementAndMassMail() { |
|
|
|
|
|
|
|
|
|
// ===== 分县市局 - 群体集访 =====
|
|
|
|
|
List<OrganizeProblemRankVo> fxsjMassMailList = new ArrayList<>(); |
|
|
|
|
OrganizeProblemRankVo v1 = new OrganizeProblemRankVo(); v1.setLabel("浏阳市局"); v1.setValue("126"); fxsjMassMailList.add(v1); |
|
|
|
|
OrganizeProblemRankVo v2 = new OrganizeProblemRankVo(); v2.setLabel("宁乡市局"); v2.setValue("98"); fxsjMassMailList.add(v2); |
|
|
|
|
OrganizeProblemRankVo v3 = new OrganizeProblemRankVo(); v3.setLabel("长沙县局"); v3.setValue("86"); fxsjMassMailList.add(v3); |
|
|
|
|
OrganizeProblemRankVo v4 = new OrganizeProblemRankVo(); v4.setLabel("望城区局"); v4.setValue("74"); fxsjMassMailList.add(v4); |
|
|
|
|
OrganizeProblemRankVo v5 = new OrganizeProblemRankVo(); v5.setLabel("岳麓分局"); v5.setValue("63"); fxsjMassMailList.add(v5); |
|
|
|
|
|
|
|
|
|
// ===== 分县市局 - 领导接访 =====
|
|
|
|
|
List<OrganizeProblemRankVo> fxsjLeaderReviewMailList = new ArrayList<>(); |
|
|
|
|
OrganizeProblemRankVo v6 = new OrganizeProblemRankVo(); v6.setLabel("浏阳市局"); v6.setValue("34"); fxsjLeaderReviewMailList.add(v6); |
|
|
|
|
OrganizeProblemRankVo v7 = new OrganizeProblemRankVo(); v7.setLabel("宁乡市局"); v7.setValue("28"); fxsjLeaderReviewMailList.add(v7); |
|
|
|
|
OrganizeProblemRankVo v8 = new OrganizeProblemRankVo(); v8.setLabel("长沙县局"); v8.setValue("25"); fxsjLeaderReviewMailList.add(v8); |
|
|
|
|
OrganizeProblemRankVo v9 = new OrganizeProblemRankVo(); v9.setLabel("望城区局"); v9.setValue("19"); fxsjLeaderReviewMailList.add(v9); |
|
|
|
|
OrganizeProblemRankVo v10 = new OrganizeProblemRankVo(); v10.setLabel("岳麓分局"); v10.setValue("16"); fxsjLeaderReviewMailList.add(v10); |
|
|
|
|
|
|
|
|
|
// ===== 局属单位 - 群体集访 =====
|
|
|
|
|
List<OrganizeProblemRankVo> bwzdMassMailList = new ArrayList<>(); |
|
|
|
|
OrganizeProblemRankVo b1 = new OrganizeProblemRankVo(); b1.setLabel("治安支队"); b1.setValue("47"); bwzdMassMailList.add(b1); |
|
|
|
|
OrganizeProblemRankVo b2 = new OrganizeProblemRankVo(); b2.setLabel("刑侦支队"); b2.setValue("39"); bwzdMassMailList.add(b2); |
|
|
|
|
OrganizeProblemRankVo b3 = new OrganizeProblemRankVo(); b3.setLabel("交警支队"); b3.setValue("33"); bwzdMassMailList.add(b3); |
|
|
|
|
OrganizeProblemRankVo b4 = new OrganizeProblemRankVo(); b4.setLabel("网安支队"); b4.setValue("28"); bwzdMassMailList.add(b4); |
|
|
|
|
|
|
|
|
|
// ===== 局属单位 - 领导接访 =====
|
|
|
|
|
List<OrganizeProblemRankVo> bwzdLeaderReviewMailList = new ArrayList<>(); |
|
|
|
|
OrganizeProblemRankVo b5 = new OrganizeProblemRankVo(); b5.setLabel("治安支队"); b5.setValue("14"); bwzdLeaderReviewMailList.add(b5); |
|
|
|
|
OrganizeProblemRankVo b6 = new OrganizeProblemRankVo(); b6.setLabel("刑侦支队"); b6.setValue("11"); bwzdLeaderReviewMailList.add(b6); |
|
|
|
|
OrganizeProblemRankVo b7 = new OrganizeProblemRankVo(); b7.setLabel("交警支队"); b7.setValue("9"); bwzdLeaderReviewMailList.add(b7); |
|
|
|
|
OrganizeProblemRankVo b8 = new OrganizeProblemRankVo(); b8.setLabel("网安支队"); b8.setValue("6"); bwzdLeaderReviewMailList.add(b8); |
|
|
|
|
|
|
|
|
|
// ===== 汇总(分县市局)=====
|
|
|
|
|
MailEntanglementMassOverviewVo fxsjOverview = new MailEntanglementMassOverviewVo(); |
|
|
|
|
fxsjOverview.setEntanglement(0); |
|
|
|
|
fxsjOverview.setMass(fxsjMassMailList.stream().mapToInt(OrganizeProblemRankVo::getValueAsInt).sum()); |
|
|
|
|
fxsjOverview.setLeaderReview(fxsjLeaderReviewMailList.stream().mapToInt(OrganizeProblemRankVo::getValueAsInt).sum()); |
|
|
|
|
|
|
|
|
|
// ===== 汇总(局属单位)=====
|
|
|
|
|
MailEntanglementMassOverviewVo bwzdOverview = new MailEntanglementMassOverviewVo(); |
|
|
|
|
bwzdOverview.setEntanglement(0); |
|
|
|
|
bwzdOverview.setMass(bwzdMassMailList.stream().mapToInt(OrganizeProblemRankVo::getValueAsInt).sum()); |
|
|
|
|
bwzdOverview.setLeaderReview(bwzdLeaderReviewMailList.stream().mapToInt(OrganizeProblemRankVo::getValueAsInt).sum()); |
|
|
|
|
|
|
|
|
|
JSONObject data = new JSONObject() |
|
|
|
|
.fluentPut("fxsjOverview", fxsjOverview) |
|
|
|
|
.fluentPut("bwzdOverview", bwzdOverview) |
|
|
|
|
.fluentPut("fxsjMassMailList", fxsjMassMailList) |
|
|
|
|
.fluentPut("bwzdMassMailList", bwzdMassMailList) |
|
|
|
|
.fluentPut("fxsjLeaderReviewMailList", fxsjLeaderReviewMailList) |
|
|
|
|
.fluentPut("bwzdLeaderReviewMailList", bwzdLeaderReviewMailList); |
|
|
|
|
|
|
|
|
|
return Result.success(data); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Result<JSONObject> getSubOneFirstAndRepeatMail() { |
|
|
|
|
|
|
|
|
|
// 派出所 mock
|
|
|
|
|
List<OrganizeProblemRankVo> fxsjFirstRankList = new ArrayList<>(); |
|
|
|
|
List<OrganizeProblemRankVo> fxsjRepeatRankList = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
fxsjFirstRankList.add(new OrganizeProblemRankVo("芙蓉派出所", "15")); |
|
|
|
|
fxsjFirstRankList.add(new OrganizeProblemRankVo("天心派出所", "12")); |
|
|
|
|
fxsjFirstRankList.add(new OrganizeProblemRankVo("雨花派出所", "9")); |
|
|
|
|
fxsjFirstRankList.add(new OrganizeProblemRankVo("开福派出所", "7")); |
|
|
|
|
|
|
|
|
|
fxsjRepeatRankList.add(new OrganizeProblemRankVo("芙蓉派出所", "6")); |
|
|
|
|
fxsjRepeatRankList.add(new OrganizeProblemRankVo("天心派出所", "5")); |
|
|
|
|
fxsjRepeatRankList.add(new OrganizeProblemRankVo("雨花派出所", "3")); |
|
|
|
|
fxsjRepeatRankList.add(new OrganizeProblemRankVo("开福派出所", "2")); |
|
|
|
|
|
|
|
|
|
// 大队 mock
|
|
|
|
|
List<OrganizeProblemRankVo> bwzdFirstRankList = new ArrayList<>(); |
|
|
|
|
List<OrganizeProblemRankVo> bwzdRepeatRankList = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
bwzdFirstRankList.add(new OrganizeProblemRankVo("刑侦大队", "22")); |
|
|
|
|
bwzdFirstRankList.add(new OrganizeProblemRankVo("治安大队", "18")); |
|
|
|
|
bwzdFirstRankList.add(new OrganizeProblemRankVo("交警大队", "13")); |
|
|
|
|
|
|
|
|
|
bwzdRepeatRankList.add(new OrganizeProblemRankVo("刑侦大队", "8")); |
|
|
|
|
bwzdRepeatRankList.add(new OrganizeProblemRankVo("治安大队", "6")); |
|
|
|
|
bwzdRepeatRankList.add(new OrganizeProblemRankVo("交警大队", "4")); |
|
|
|
|
|
|
|
|
|
// 汇总(派出所)
|
|
|
|
|
MailFirstAndRepeatOverviewVo fxsjOverview = new MailFirstAndRepeatOverviewVo(); |
|
|
|
|
fxsjOverview.setFirstMail( |
|
|
|
|
fxsjFirstRankList.stream().mapToInt(OrganizeProblemRankVo::getValueAsInt).sum() |
|
|
|
|
); |
|
|
|
|
fxsjOverview.setRepeatMail( |
|
|
|
|
fxsjRepeatRankList.stream().mapToInt(OrganizeProblemRankVo::getValueAsInt).sum() |
|
|
|
|
); |
|
|
|
|
fxsjOverview.setLeaderMail(0); |
|
|
|
|
|
|
|
|
|
// 汇总(大队)
|
|
|
|
|
MailFirstAndRepeatOverviewVo bwzdOverview = new MailFirstAndRepeatOverviewVo(); |
|
|
|
|
bwzdOverview.setFirstMail( |
|
|
|
|
bwzdFirstRankList.stream().mapToInt(OrganizeProblemRankVo::getValueAsInt).sum() |
|
|
|
|
); |
|
|
|
|
bwzdOverview.setRepeatMail( |
|
|
|
|
bwzdRepeatRankList.stream().mapToInt(OrganizeProblemRankVo::getValueAsInt).sum() |
|
|
|
|
); |
|
|
|
|
bwzdOverview.setLeaderMail(0); |
|
|
|
|
|
|
|
|
|
JSONObject data = new JSONObject() |
|
|
|
|
.fluentPut("fxsjOverview", fxsjOverview) |
|
|
|
|
.fluentPut("bwzdOverview", bwzdOverview) |
|
|
|
|
.fluentPut("fxsjFirstRankList", fxsjFirstRankList) |
|
|
|
|
.fluentPut("fxsjRepeatRankList", fxsjRepeatRankList) |
|
|
|
|
.fluentPut("bwzdFirstRankList", bwzdFirstRankList) |
|
|
|
|
.fluentPut("bwzdRepeatRankList", bwzdRepeatRankList); |
|
|
|
|
|
|
|
|
|
return Result.success(data); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|