Browse Source

Merge branch 'master' into feature/tsjb-1.0

feature/tsjb-1.0
parent
commit
e010e5e11c
  1. 6
      src/main/java/com/biutag/supervision/controller/datav/DataVMailViewController.java
  2. 11
      src/main/java/com/biutag/supervision/controller/mobileSupervision/TaskProblemController.java
  3. 17
      src/main/java/com/biutag/supervision/mapper/NegativeMapper.java
  4. 6
      src/main/java/com/biutag/supervision/pojo/dto/complaintCollection/ComplaintCollectionExcelDTO.java
  5. 4
      src/main/java/com/biutag/supervision/pojo/entity/SupTaskProblem.java
  6. 6
      src/main/java/com/biutag/supervision/pojo/param/ComplaintCollection/ComplaintCollectionQueryParam.java
  7. 4
      src/main/java/com/biutag/supervision/pojo/param/NegativeQueryParam.java
  8. 3
      src/main/java/com/biutag/supervision/pojo/request/complaintCollection/ComplaintCollectionPageRequest.java
  9. 4
      src/main/java/com/biutag/supervision/pojo/vo/ExportNegativeVo.java
  10. 1
      src/main/java/com/biutag/supervision/repository/complaintCollection/ComplaintCollectionResourceService.java
  11. 4
      src/main/java/com/biutag/supervision/service/BusinessDepartService.java
  12. 13
      src/main/java/com/biutag/supervision/service/DataMailService.java
  13. 14
      src/main/java/com/biutag/supervision/service/DataPetitionComplaintService.java
  14. 44
      src/main/java/com/biutag/supervision/service/NegativeQueryService.java
  15. 9
      src/main/java/com/biutag/supervision/service/NegativeTaskService.java
  16. 58
      src/main/java/com/biutag/supervision/service/datav/DatavServiceImpl.java
  17. 62
      src/main/java/com/biutag/supervision/service/subDatav/SubDatavServiceImpl.java
  18. 31
      src/main/resources/mapper/NegativeMapper.xml

6
src/main/java/com/biutag/supervision/controller/datav/DataVMailViewController.java

@ -66,11 +66,13 @@ public class DataVMailViewController {
List<EchartsVo> countryList = negativeMapper.getMailTrend(year, 21);
List<EchartsVo> policeList = negativeMapper.getMailTrend(year, 22);
List<EchartsVo> commissionerList = dataMailService.getCommissionerTrend(year);
List<EchartsVo> numberList = dataPetition12337Mapper.getMailTrend12337(year);
// 12337 - 已隐藏
// List<EchartsVo> numberList = dataPetition12337Mapper.getMailTrend12337(year);
JSONObject data = new JSONObject().fluentPut("countryList", countryList)
.fluentPut("policeList", policeList)
.fluentPut("commissionerList", commissionerList)
.fluentPut("numberList", numberList);
// .fluentPut("numberList", numberList)
;
return Result.success(data);
}
// endregion

11
src/main/java/com/biutag/supervision/controller/mobileSupervision/TaskProblemController.java

@ -37,6 +37,7 @@ import org.springframework.web.bind.annotation.*;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
@ -78,7 +79,13 @@ public class TaskProblemController {
queryWrapper.eq(SupTaskProblem::getCreateUsername, user.getUserName());
}
if(StrUtil.isNotBlank(queryParam.getActionType())){
queryWrapper.eq(!"0".equals(queryParam.getActionType()),SupTaskProblem::getProblemState,queryParam.getActionType());
if("1".equals(queryParam.getActionType())){
// 待下发:筛选未分发的数据
queryWrapper.eq(SupTaskProblem::getDistributionState, "0");
} else if("2".equals(queryParam.getActionType())){
// 查否:筛选查否状态的数据
queryWrapper.eq(SupTaskProblem::getProblemState, "2");
}
}
queryWrapper.orderByDesc(SupTaskProblem::getCreateTime);
Page<SupTaskProblem> page = taskProblemService.page(Page.of(queryParam.getCurrent(), queryParam.getSize()), queryWrapper);
@ -102,8 +109,10 @@ public class TaskProblemController {
SupTaskProblem supTaskProblem = taskProblemService.getById(id);
if("1".equals(supTaskProblem.getProblemState())){
supTaskProblem.setProblemState("2");
supTaskProblem.setRejectTime(LocalDateTime.now()); // 设置查否时间
}else{
supTaskProblem.setProblemState("1");
// 恢复时不处理 rejectTime,保留最后一次查否时间
}
return Result.success(taskProblemService.updateById(supTaskProblem));
}

17
src/main/java/com/biutag/supervision/mapper/NegativeMapper.java

@ -311,17 +311,12 @@ public interface NegativeMapper extends BaseMapper<Negative> {
@Param("codes") List<String> codes
);
@Select("select ng.* from negative ng " +
"LEFT JOIN sup_depart sd on ng.involveDepartId = sd.id " +
"LEFT JOIN sup_depart sdd on sd.pid = sdd.id " +
"LEFT JOIN sup_depart sddd on sdd.pid = sddd.id " +
"where " +
"ng.special_supervision =#{specialSupervision} " +
"and ng.crtTime >= #{beginTime} " +
"and ng.crtTime <= #{endTime} " +
"AND (sd.id =#{id} OR sdd.id=#{id} or sddd.id=#{id});"
)
List<Negative> getYellowBetNegativeList(String id, Date beginTime, Date endTime, String specialSupervision);
List<Negative> getYellowBetNegativeList(
@Param("id") String id,
@Param("beginTime") Date beginTime,
@Param("endTime") Date endTime,
@Param("specialSupervision") String specialSupervision
);

6
src/main/java/com/biutag/supervision/pojo/dto/complaintCollection/ComplaintCollectionExcelDTO.java

@ -41,10 +41,14 @@ public class ComplaintCollectionExcelDTO {
@ColumnWidth(20)
private String responderPhone;
@ExcelProperty("被投诉机构")
@ExcelProperty("被投诉二级机构")
@ColumnWidth(20)
private String secondDepartName;
@ExcelProperty("被投诉三级机构")
@ColumnWidth(20)
private String thirdDepartName;
@ExcelProperty("来信内容")
@ColumnWidth(20)
private String thingDesc;

4
src/main/java/com/biutag/supervision/pojo/entity/SupTaskProblem.java

@ -83,4 +83,8 @@ public class SupTaskProblem {
@TableField("issue_user_id")
private String issueUserId;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@TableField("reject_time")
private LocalDateTime rejectTime;
}

6
src/main/java/com/biutag/supervision/pojo/param/ComplaintCollection/ComplaintCollectionQueryParam.java

@ -65,6 +65,12 @@ public class ComplaintCollectionQueryParam extends BasePage {
@Schema(description = "被投诉二级机构Ids")
private Set<String> secondDepartIds;
@Schema(description = "被投诉三级机构Id")
private String thirdDepartId;
@Schema(description = "被投诉三级机构Ids")
private Set<String> thirdDepartIds;
@Schema(description = "被投诉二级机构名字")
private String secondDepartName;

4
src/main/java/com/biutag/supervision/pojo/param/NegativeQueryParam.java

@ -74,6 +74,9 @@ public class NegativeQueryParam extends BasePage {
private String specialSupervision;
@Schema(description = "专项督察(多选查询)")
private List<String> specialSupervisions;
private String reportNumber;
private Integer crtDepartLevel;
@ -139,6 +142,7 @@ public class NegativeQueryParam extends BasePage {
target.setProblemSourcesCode(this.problemSourcesCode == null ? null : new ArrayList<>(this.problemSourcesCode));
target.setInvolveDepartIds(this.involveDepartIds == null ? null : Set.copyOf(this.involveDepartIds));
target.setApprovalTimeoutStatus(this.approvalTimeoutStatus == null ? null : new ArrayList<>(this.approvalTimeoutStatus));
target.setSpecialSupervisions(this.specialSupervisions == null ? null : new ArrayList<>(this.specialSupervisions));
return target;
}

3
src/main/java/com/biutag/supervision/pojo/request/complaintCollection/ComplaintCollectionPageRequest.java

@ -49,6 +49,9 @@ public class ComplaintCollectionPageRequest extends BasePage implements ParamChe
@Schema(description = "被投诉二级机构名字")
private String secondDepartName;
@Schema(description = "被投诉三级机构Id")
private String thirdDepartId;
/**
* @see ComplaintCollectionHandleMethodEnum
*/

4
src/main/java/com/biutag/supervision/pojo/vo/ExportNegativeVo.java

@ -34,6 +34,10 @@ public class ExportNegativeVo {
@ExcelProperty(value = {"问题基本信息","问题录入时间"}, format = "yyyy-MM-dd")
private LocalDateTime crtTime;
@ExcelProperty({"问题基本信息","下发单位"})
private String issuingDepartName;
// 问题来源
@ExcelProperty({"问题基本信息","问题来源"})
private String problemSources;

1
src/main/java/com/biutag/supervision/repository/complaintCollection/ComplaintCollectionResourceService.java

@ -63,6 +63,7 @@ public class ComplaintCollectionResourceService extends BaseDAO {
setBatchLikeQuery(param.getOriginId(), param.getOriginIds(), qw, ComplaintCollection::getOriginId);
setBatchLikeQuery(param.getCheckStatus(), param.getCheckStatusList(),qw, ComplaintCollection::getCheckStatus);
setBatchQuery(param.getSecondDepartId(), param.getSecondDepartIds(), qw, ComplaintCollection::getSecondDepartId);
setBatchQuery(param.getThirdDepartId(), param.getThirdDepartIds(), qw, ComplaintCollection::getThirdDepartId);
if (CollectionUtil.size(param.getDiscoveryTimeList()) == 2
&& param.getDiscoveryTimeList().get(0) != null
&& param.getDiscoveryTimeList().get(1) != null) {

4
src/main/java/com/biutag/supervision/service/BusinessDepartService.java

@ -327,8 +327,8 @@ public class BusinessDepartService extends ServiceImpl<BusinessDepartMapper, Bus
public List<GBaseJJD> selectJJDList(List<Date> happenTime) {
QueryWrapper<GBaseJJD> queryWrapper = new QueryWrapper<>();
queryWrapper.between("cjsj", happenTime.get(0), happenTime.get(1));
queryWrapper.notLikeRight("jqxzdm", "11"); // 其他业务
queryWrapper.notLikeRight("jqxzdm", "99"); // 无效、重复报警等
// queryWrapper.notLikeRight("jqxzdm", "11"); // 其他业务
// queryWrapper.notLikeRight("jqxzdm", "99"); // 无效、重复报警等
// queryWrapper.eq("jjlxdm", "01");
queryWrapper.groupBy("DATE(cjsj)", "gxdwdm", "gxdwmc");
return gBaseJJDMapper.selectJJDList(queryWrapper);

13
src/main/java/com/biutag/supervision/service/DataMailService.java

@ -42,7 +42,8 @@ public class DataMailService extends ServiceImpl<DataPetitionComplaintMapper, Da
// 一级信访大屏数据中央统计
public MailOverviewVo allMailCount(Date beginTime, Date endTime) {
MailOverviewVo vo = mailCount(beginTime, endTime);
long totalMail = vo.getCountryMail() + vo.getPoliceMail() + vo.getNumberMail();
// 已隐藏12337: long totalMail = vo.getCountryMail() + vo.getPoliceMail() + vo.getNumberMail();
long totalMail = vo.getCountryMail() + vo.getPoliceMail() + vo.getManageMail();
vo.setTotalMail(totalMail);
return vo;
}
@ -62,10 +63,10 @@ public class DataMailService extends ServiceImpl<DataPetitionComplaintMapper, Da
policeQueryWrapper.between("create_time", beginTime, endTime);
Long policeMail = dataPetitionComplaintMapper.selectCount(policeQueryWrapper);
// 12337
QueryWrapper<DataPetition12337> queryWrapper12337 = new QueryWrapper<>();
queryWrapper12337.between("discover_time", beginTime, endTime);
Long mail12337 = dataPetition12337Mapper.selectCount(queryWrapper12337);
// 12337 - 已隐藏
// QueryWrapper<DataPetition12337> queryWrapper12337 = new QueryWrapper<>();
// queryWrapper12337.between("discover_time", beginTime, endTime);
// Long mail12337 = dataPetition12337Mapper.selectCount(queryWrapper12337);
// 局长信箱
QueryWrapper<Mail> mailQueryWrapper = new QueryWrapper<>();
@ -75,7 +76,7 @@ public class DataMailService extends ServiceImpl<DataPetitionComplaintMapper, Da
temp.setCountryMail(countryMail);
temp.setPoliceMail(policeMail);
temp.setNumberMail(mail12337);
// temp.setNumberMail(mail12337); // 已隐藏
temp.setManageMail(mailCount);
return temp;
}

14
src/main/java/com/biutag/supervision/service/DataPetitionComplaintService.java

@ -199,9 +199,9 @@ public class DataPetitionComplaintService extends ServiceImpl<DataPetitionCompla
policeQueryWrapper.eq("problem_sources_code", 22);
policeQueryWrapper.between("discovery_time", beginTime, endTime);
Long policeMail = dataPetitionComplaintMapper.selectCount(policeQueryWrapper);
// 12337信访
QueryWrapper<DataPetition12337> queryWrapper12337 = new QueryWrapper<>();
Long total12337 = dataPetition12337Mapper.selectCount(queryWrapper12337);
// 12337信访 - 已隐藏
// QueryWrapper<DataPetition12337> queryWrapper12337 = new QueryWrapper<>();
// Long total12337 = dataPetition12337Mapper.selectCount(queryWrapper12337);
// 初访
QueryWrapper<DataPetitionComplaint> firstQueryWrapper = new QueryWrapper<>();
firstQueryWrapper.eq("initial_petition", 1);
@ -232,8 +232,8 @@ public class DataPetitionComplaintService extends ServiceImpl<DataPetitionCompla
massQueryWrapper.eq("mass_visits", 1);
massQueryWrapper.between("discovery_time", beginTime, endTime);
Long massMail = dataPetitionComplaintMapper.selectCount(massQueryWrapper);
// 总数
long totalMail = countryMail+policeMail+total12337;
// 总数 - 已隐藏12337
long totalMail = countryMail + policeMail;
JSONObject overview = new JSONObject()
// 信访总数(起)
@ -244,8 +244,8 @@ public class DataPetitionComplaintService extends ServiceImpl<DataPetitionCompla
.fluentPut("policeMail", policeMail)
// 局长信箱
.fluentPut("commissionerMail", 5534)
// 12337信访
.fluentPut("numMail", total12337)
// 12337信访 - 已隐藏
// .fluentPut("numMail", total12337)
// 初访;
.fluentPut("firstMail", firstMail)
// 重访

44
src/main/java/com/biutag/supervision/service/NegativeQueryService.java

@ -12,6 +12,7 @@ import com.biutag.supervision.constants.enums.ProcessingStatusEnum;
import com.biutag.supervision.constants.enums.RoleCodeEnum;
import com.biutag.supervision.pojo.entity.Negative;
import com.biutag.supervision.pojo.entity.NegativeBlame;
import com.biutag.supervision.pojo.entity.SupDepart;
import com.biutag.supervision.pojo.model.UserAuth;
import com.biutag.supervision.pojo.param.NegativeQueryParam;
import com.biutag.supervision.pojo.vo.DepartTree;
@ -23,6 +24,7 @@ import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
@ -78,7 +80,18 @@ public class NegativeQueryService {
.in(CollectionUtil.isNotEmpty(param.getProblemSourcesCode()), Negative::getProblemSourcesCode, param.getProblemSourcesCode())
// 业务类型
.eq(StrUtil.isNotBlank(param.getBusinessTypeCode()), Negative::getBusinessTypeCode, param.getBusinessTypeCode())
// 专项督察
// 专项督察(支持单选和多选查询)
.and(CollectionUtil.isNotEmpty(param.getSpecialSupervisions()), (qw) -> {
// 多选查询:specialSupervision字段包含任一选中的值(逗号分隔存储)
for (int i = 0; i < param.getSpecialSupervisions().size(); i++) {
final String code = param.getSpecialSupervisions().get(i);
if (i == 0) {
qw.apply("FIND_IN_SET({0}, special_supervision) > 0", code);
} else {
qw.or().apply("FIND_IN_SET({0}, special_supervision) > 0", code);
}
}
})
.eq(StrUtil.isNotBlank(param.getSpecialSupervision()), Negative::getSpecialSupervision, param.getSpecialSupervision())
// 通报期数
.like(StrUtil.isNotBlank(param.getReportNumber()), Negative::getReportNumber, param.getReportNumber())
@ -227,6 +240,10 @@ public class NegativeQueryService {
// 最后更新时间
queryWrapper.orderByDesc(Negative::getUpdTime);
Page<Negative> page = negativeService.page(Page.of(param.getCurrent(), param.getSize()), queryWrapper);
Map<String, SupDepart> allDepartsMap = departService.list(
new LambdaQueryWrapper<SupDepart>()
.in(SupDepart::getLevel, List.of(DepartLevelEnum.SECOND.getValue(), DepartLevelEnum.THREE.getValue()))
).stream().collect(Collectors.toMap(SupDepart::getId, d -> d, (a, b) -> a));
long l = System.currentTimeMillis();
List<NegativeQueryVo> list = page.getRecords().stream().map(item -> {
NegativeQueryVo vo = new NegativeQueryVo();
@ -234,6 +251,7 @@ public class NegativeQueryService {
if (Objects.nonNull(item.getFirstDistributeTime()) && !ProcessingStatusEnum.completed.name().equals(item.getProcessingStatus())) {
vo.setRemainingDuration(TimeUtil.getRemainingDuration(item.getFirstDistributeTime(), item.getMaxSignDuration(), item.getMaxHandleDuration(), item.getExtensionDays(), item.getFlowKey()));
}
vo.setIssuingDepartName(buildIssuingDepartName(item.getIssuingDepartId(), item.getIssuingDepartName(), allDepartsMap));
return vo;
}).toList();
System.out.printf("耗时:%sms", System.currentTimeMillis() - l);
@ -257,4 +275,28 @@ public class NegativeQueryService {
}
}
/**
* 构建下发单位名称
* 3级单位拼接上级2级单位名称2级单位保持原名
* @param issuingDepartId 下发单位ID
* @param originalName 原名称
* @param allDepartsMap 所有单位Map
* @return 拼接后的名称
*/
private String buildIssuingDepartName(String issuingDepartId, String originalName, Map<String, SupDepart> allDepartsMap) {
if (StrUtil.isBlank(issuingDepartId) || StrUtil.isBlank(originalName)) {
return originalName;
}
SupDepart depart = allDepartsMap.get(issuingDepartId);
if (depart == null || !DepartLevelEnum.THREE.getValue().equals(depart.getLevel())) {
// 非3级单位,返回原名
return originalName;
}
SupDepart parent = allDepartsMap.get(depart.getPid());
if (parent != null) {
return parent.getShortName() + "/" + originalName;
}
return originalName;
}
}

9
src/main/java/com/biutag/supervision/service/NegativeTaskService.java

@ -143,9 +143,12 @@ public class NegativeTaskService extends ServiceImpl<NegativeTaskMapper, Negativ
}
vo.setProcessingStatus(ProcessingStatusEnum.getLabel(item.getProcessingStatus()));
//专项督察
if(CollectionUtil.isNotEmpty(specialSupervisionDict)){
String specialSupervision = specialSupervisionDict.stream().filter(dict->dict.getDictValue().equals(vo.getSpecialSupervision())).findFirst().map(SupDictData::getDictLabel).orElse("");
//专项督察(支持多选逗号分隔)
if(StrUtil.isNotBlank(vo.getSpecialSupervision())){
String specialSupervision = Arrays.stream(vo.getSpecialSupervision().split(","))
.map(val -> specialSupervisionDict.stream().filter(dict -> dict.getDictValue().equals(val)).findFirst().map(SupDictData::getDictLabel).orElse(""))
.filter(StrUtil::isNotBlank)
.collect(Collectors.joining("、"));
vo.setSpecialSupervision(specialSupervision);
}

58
src/main/java/com/biutag/supervision/service/datav/DatavServiceImpl.java

@ -200,15 +200,10 @@ public class DatavServiceImpl implements DatavService {
mailQueryWrapper.between("mail_time", request.getBeginTime(), request.getEndTime());
long jzxxCount = mailMapper.selectCount(mailQueryWrapper);
// 12337
// NegativeQueryParam xf12337Param = new NegativeQueryParam();
// xf12337Param.setCrtTime(dates);
// xf12337Param.setProblemSourcesCode(Collections.singletonList(ProblemSourcesEnum.XF12337.getValue()));
// long xf12337Count = negativeResourceService.count(xf12337Param);
QueryWrapper<DataPetition12337> queryWrapper12337 = new QueryWrapper<>();
queryWrapper12337.between("discover_time", request.getBeginTime(), request.getEndTime());
long xf12337Count = dataPetition12337Mapper.selectCount(queryWrapper12337);
// 12337 - 已隐藏
// QueryWrapper<DataPetition12337> queryWrapper12337 = new QueryWrapper<>();
// queryWrapper12337.between("discover_time", request.getBeginTime(), request.getEndTime());
// long xf12337Count = dataPetition12337Mapper.selectCount(queryWrapper12337);
// 国家信访
@ -239,7 +234,7 @@ public class DatavServiceImpl implements DatavService {
overview.setNumSupervisionPro(szdcCount);
overview.setCaseVerificationPro(ajhcCount);
overview.setMailboxNumber(jzxxCount);
overview.setComplaintPro(xf12337Count + gjxfCount + gabxfCount);
overview.setComplaintPro(gjxfCount + gabxfCount); // 隐藏12337: xf12337Count +
overview.setAuditPro(sjxmCount);
overview.calcTotal();
JSONObject data = new JSONObject().fluentPut("overview", overview);
@ -285,14 +280,14 @@ public class DatavServiceImpl implements DatavService {
// 交办案件数
List<Negative> jbNegatvieList = negatives.stream().filter(one -> proCode.contains(one.getProblemSourcesCode())).toList();
long caseVerificationProCount = dataCaseVerifs.size() + jbNegatvieList.size();
// 12337
QueryWrapper<DataPetition12337> queryWrapper12337 = new QueryWrapper<>();
queryWrapper12337.between("discover_time", request.getBeginTime(), request.getEndTime());
queryWrapper12337.and(wrapper -> wrapper
.in("third_depart_id", allDepartIds)
.or()
.in("second_depart_id", allDepartIds));
long xf12337Count = dataPetition12337Mapper.selectCount(queryWrapper12337);
// 12337 - 已隐藏
// QueryWrapper<DataPetition12337> queryWrapper12337 = new QueryWrapper<>();
// queryWrapper12337.between("discover_time", request.getBeginTime(), request.getEndTime());
// queryWrapper12337.and(wrapper -> wrapper
// .in("third_depart_id", allDepartIds)
// .or()
// .in("second_depart_id", allDepartIds));
// long xf12337Count = dataPetition12337Mapper.selectCount(queryWrapper12337);
// 国家信访
DataPetitionComplaintQueryParam countryParam = new DataPetitionComplaintQueryParam();
countryParam.setCreateTime(dates);
@ -338,7 +333,7 @@ public class DatavServiceImpl implements DatavService {
globalMapIconVo.setSupervisionPro(supervisionProCount);
globalMapIconVo.setNumSupervisionPro(numSupervisionProCount);
globalMapIconVo.setCaseVerificationPro(caseVerificationProCount);
globalMapIconVo.setComplaintPro(xf12337Count + countryMail + policeMail);
globalMapIconVo.setComplaintPro(countryMail + policeMail); // 隐藏12337: + xf12337Count
globalMapIconVo.setAuditPro((long) (reportProjects.size()+dataAuditList.size()));
globalMapIconVo.setMailboxNumber(mailCount);
globalMapIconVo.calcTotal();
@ -978,10 +973,10 @@ public class DatavServiceImpl implements DatavService {
policeQueryWrapper.between("create_time", request.getBeginTime(), request.getEndTime());
Long policeMail = dataPetitionComplaintMapper.selectCount(policeQueryWrapper);
// 12337
QueryWrapper<DataPetition12337> queryWrapper12337 = new QueryWrapper<>();
queryWrapper12337.between("discover_time", request.getBeginTime(), request.getEndTime());
Long mail12337 = dataPetition12337Mapper.selectCount(queryWrapper12337);
// 12337 - 已隐藏
// QueryWrapper<DataPetition12337> queryWrapper12337 = new QueryWrapper<>();
// queryWrapper12337.between("discover_time", request.getBeginTime(), request.getEndTime());
// Long mail12337 = dataPetition12337Mapper.selectCount(queryWrapper12337);
// 局长信箱
QueryWrapper<Mail> mailQueryWrapper = new QueryWrapper<>();
@ -993,9 +988,10 @@ public class DatavServiceImpl implements DatavService {
MailOverviewVo overview = new MailOverviewVo();
overview.setCountryMail(countryMail);
overview.setPoliceMail(policeMail);
overview.setNumberMail(mail12337);
// overview.setNumberMail(mail12337); // 已隐藏
overview.setManageMail(mailCount);
overview.setTotalMail(overview.getCountryMail() + overview.getPoliceMail() + overview.getNumberMail());
// 只计算国家信访+公安部信访+局长信箱
overview.setTotalMail(overview.getCountryMail() + overview.getPoliceMail() + overview.getManageMail());
JSONObject data = new JSONObject().fluentPut("overview", overview);
return Result.success(data);
}
@ -1023,8 +1019,8 @@ public class DatavServiceImpl implements DatavService {
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));
// 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);
@ -1032,16 +1028,16 @@ public class DatavServiceImpl implements DatavService {
subOneMailQueryWrapper.eq("second_dept_id", exDepartId);
subOneMailQueryWrapper.between("create_time", beginTime, endTime);
Long commissionerTotal = mailMapper.selectCount(subOneMailQueryWrapper);
// 总数
Long total = countryTotal + policeTotal + numTotal;
// 总数 - 已隐藏12337
Long total = countryTotal + policeTotal + commissionerTotal;
//国家信访
re.setCountryTotal(countryTotal.toString());
//公安部信访
re.setPoliceTotal(policeTotal.toString());
//局长信箱
re.setCommissionerTotal(commissionerTotal.toString());
//12337信访
re.setNumTotal(numTotal.toString());
//12337信访 - 已隐藏
// re.setNumTotal(numTotal.toString());
re.setTotal(total.toString());
}
JSONObject data = new JSONObject().fluentPut("mailMapIconList", res);

62
src/main/java/com/biutag/supervision/service/subDatav/SubDatavServiceImpl.java

@ -233,14 +233,14 @@ public class SubDatavServiceImpl implements SubDatavService {
long mailCount = mailMapper.selectCount(mailQueryWrapper);
// 12337
QueryWrapper<DataPetition12337> queryWrapper12337 = new QueryWrapper<>();
queryWrapper12337.between("discover_time", request.getBeginTime(), request.getEndTime());
queryWrapper12337.and(wrapper -> wrapper
.in("third_depart_id", allDepartIds)
.or()
.in("second_depart_id", allDepartIds));
long xf12337Count = dataPetition12337Mapper.selectCount(queryWrapper12337);
// 12337 - 已隐藏
// QueryWrapper<DataPetition12337> queryWrapper12337 = new QueryWrapper<>();
// queryWrapper12337.between("discover_time", request.getBeginTime(), request.getEndTime());
// queryWrapper12337.and(wrapper -> wrapper
// .in("third_depart_id", allDepartIds)
// .or()
// .in("second_depart_id", allDepartIds));
// long xf12337Count = dataPetition12337Mapper.selectCount(queryWrapper12337);
// 国家信访
@ -275,7 +275,7 @@ public class SubDatavServiceImpl implements SubDatavService {
overview.setNumSupervisionPro(szdcCount);
overview.setCaseVerificationPro(ajhcCount);
overview.setMailboxNumber(mailCount);
overview.setComplaintPro(xf12337Count + gjxfCount + gabxfCount);
overview.setComplaintPro(gjxfCount + gabxfCount); // 隐藏12337: xf12337Count +
overview.setAuditPro(sjxmCount);
overview.calcTotal();
JSONObject data = new JSONObject().fluentPut("overview", overview);
@ -319,12 +319,12 @@ public class SubDatavServiceImpl implements SubDatavService {
List<Negative> jbNegatvieList = negatives.stream().filter(one -> ldjbCode.contains(one.getProblemSourcesCode())).toList();
long caseVerificationProCount = dataCaseVerifs + jbNegatvieList.size();
// 12337
NegativeQueryParam xf12337Param = new NegativeQueryParam();
xf12337Param.setCrtTime(dates);
xf12337Param.setInvolveDepartIds(Set.of(childDepartId));
xf12337Param.setProblemSourcesCode(Collections.singletonList(ProblemSourcesEnum.XF12337.getValue()));
long xf12337Count = negativeResourceService.count(xf12337Param);
// 12337 - 已隐藏
// NegativeQueryParam xf12337Param = new NegativeQueryParam();
// xf12337Param.setCrtTime(dates);
// xf12337Param.setInvolveDepartIds(Set.of(childDepartId));
// xf12337Param.setProblemSourcesCode(Collections.singletonList(ProblemSourcesEnum.XF12337.getValue()));
// long xf12337Count = negativeResourceService.count(xf12337Param);
// 国家信访
DataPetitionComplaintQueryParam countryParam = new DataPetitionComplaintQueryParam();
@ -372,7 +372,8 @@ public class SubDatavServiceImpl implements SubDatavService {
globalMapIconVo.setSupervisionPro(supervisionProCount);
globalMapIconVo.setNumSupervisionPro(numSupervisionProCount);
globalMapIconVo.setCaseVerificationPro(caseVerificationProCount);
globalMapIconVo.setComplaintPro(xf12337Count + countryMail + policeMail);
// 隐藏12337: xf12337Count + countryMail + policeMail
globalMapIconVo.setComplaintPro(countryMail + policeMail);
globalMapIconVo.setAuditPro(sjxmCount);
globalMapIconVo.setMailboxNumber(mailCount);
globalMapIconVo.setTalkPro(0L);
@ -1010,8 +1011,8 @@ public class SubDatavServiceImpl implements SubDatavService {
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));
// 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(), "局长信箱");
@ -1019,16 +1020,16 @@ public class SubDatavServiceImpl implements SubDatavService {
subOneMailQueryWrapper.eq("second_dept_id", exDepartId);
subOneMailQueryWrapper.between("create_time", beginTime, endTime);
Long commissionerTotal = mailMapper.selectCount(subOneMailQueryWrapper);
// 总数
Long total = countryTotal + policeTotal + numTotal;
// 总数 - 已隐藏12337
Long total = countryTotal + policeTotal + commissionerTotal;
//国家信访
overview.setCountryMail(countryTotal);
//公安部信访
overview.setPoliceMail(policeTotal);
//局长信箱
overview.setManageMail(commissionerTotal);
//12337信访
overview.setNumberMail(numTotal);
//12337信访 - 已隐藏
// overview.setNumberMail(numTotal);
overview.setTotalMail(total);
// overview.setCountryMail(120L); // 国家信访
// overview.setPoliceMail(45L); // 公安部信访
@ -1061,11 +1062,11 @@ public class SubDatavServiceImpl implements SubDatavService {
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);
// 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;
@ -1078,13 +1079,14 @@ public class SubDatavServiceImpl implements SubDatavService {
}
long country = countryTotal == null ? 0L : countryTotal;
long police = policeTotal == null ? 0L : policeTotal;
long num = numTotal == null ? 0L : numTotal;
// 12337 - 已隐藏: long num = numTotal == null ? 0L : numTotal;
long manage = manageMail == null ? 0L : manageMail;
Long total = country + police + num;
// 已隐藏12337: Long total = country + police + num;
Long total = country + police + manage;
re.setCountryTotal(String.valueOf(country));
re.setPoliceTotal(String.valueOf(police));
re.setCommissionerTotal(String.valueOf(manage));
re.setNumTotal(String.valueOf(num));
// 已隐藏: re.setNumTotal(String.valueOf(num));
re.setTotal(total.toString());
}
JSONObject data = new JSONObject().fluentPut("mailMapIconList", res);

31
src/main/resources/mapper/NegativeMapper.xml

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.biutag.supervision.mapper.NegativeMapper">
<select id="getYellowBetNegativeList" resultType="com.biutag.supervision.pojo.entity.Negative">
SELECT ng.* FROM negative ng
LEFT JOIN sup_depart sd ON ng.involveDepartId = sd.id
LEFT JOIN sup_depart sdd ON sd.pid = sdd.id
LEFT JOIN sup_depart sddd ON sdd.pid = sddd.id
<where>
<if test="beginTime != null">
AND ng.crtTime &gt;= #{beginTime}
</if>
<if test="endTime != null">
AND ng.crtTime &lt;= #{endTime}
</if>
<if test="id != null and id != ''">
AND (sd.id = #{id} OR sdd.id = #{id} OR sddd.id = #{id})
</if>
<choose>
<when test="specialSupervision != null and specialSupervision != ''">
AND FIND_IN_SET(#{specialSupervision}, ng.special_supervision) &gt; 0
</when>
<otherwise>
</otherwise>
</choose>
</where>
</select>
</mapper>
Loading…
Cancel
Save