1.技术监督,终端入网监测,监测点台账录入,监测点联调增加模糊搜索功能
2.电能质量问题,用户投诉新增增加责任部门 3.预告单增加责任部门列
This commit is contained in:
@@ -26,6 +26,9 @@ public class SupervisionUserComplaintParam {
|
|||||||
@ApiModelProperty(value = "用户名称")
|
@ApiModelProperty(value = "用户名称")
|
||||||
private String userName;
|
private String userName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "责任单位id,取ISC平台上的组织id")
|
||||||
|
private String dutyOrgId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "投诉名称")
|
@ApiModelProperty(value = "投诉名称")
|
||||||
private String complaintName;
|
private String complaintName;
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,15 @@ public class SupervisionUserComplaintPO extends BaseEntity {
|
|||||||
@TableField(value = "user_name")
|
@TableField(value = "user_name")
|
||||||
private String userName;
|
private String userName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 责任单位id,取ISC平台上的组织id
|
||||||
|
*/
|
||||||
|
@TableField(value = "duty_Org_Id")
|
||||||
|
private String dutyOrgId;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String dutyOrgName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 投诉名称
|
* 投诉名称
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package com.njcn.supervision.pojo.vo.leaflet;
|
package com.njcn.supervision.pojo.vo.leaflet;
|
||||||
|
|
||||||
import com.njcn.db.bo.BaseEntity;
|
import com.njcn.db.bo.BaseEntity;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
@@ -94,4 +93,12 @@ public class WarningLeafletVO extends BaseEntity implements Serializable{
|
|||||||
|
|
||||||
private String createBy;
|
private String createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 责任单位id,取ISC平台上的组织id
|
||||||
|
*/
|
||||||
|
private String dutyOrgId;
|
||||||
|
/**
|
||||||
|
* 责任单位名称
|
||||||
|
*/
|
||||||
|
private String dutyOrgName;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,13 +4,57 @@
|
|||||||
|
|
||||||
|
|
||||||
<select id="warningPageData" resultType="WarningLeafletVO">
|
<select id="warningPageData" resultType="WarningLeafletVO">
|
||||||
SELECT supervision_warning_leaflet.*
|
SELECT
|
||||||
|
supervision_warning_leaflet.leaflet_name,
|
||||||
|
supervision_warning_leaflet.leaflet_no,
|
||||||
|
supervision_warning_leaflet.problem_type,
|
||||||
|
supervision_warning_leaflet.problem_id,
|
||||||
|
(case problem_type
|
||||||
|
when 1 then null
|
||||||
|
when 2 then null
|
||||||
|
when 3 then (select duty_Org_Id FROM supervision_user_complaint where id=problem_id)
|
||||||
|
when 4 then (select dept_id FROM supervision_survey_test where id=problem_id)
|
||||||
|
else null end ) as duty_Org_Id,
|
||||||
|
supervision_warning_leaflet.leaflet_type,
|
||||||
|
supervision_warning_leaflet.STATUS,
|
||||||
|
supervision_warning_leaflet.process_instance_id,
|
||||||
|
supervision_warning_leaflet.history_instance_id,
|
||||||
|
supervision_warning_leaflet.issue_detail,
|
||||||
|
supervision_warning_leaflet.take_step,
|
||||||
|
supervision_warning_leaflet.report_path,
|
||||||
|
supervision_warning_leaflet.state,
|
||||||
|
supervision_warning_leaflet.create_by,
|
||||||
|
supervision_warning_leaflet.create_time,
|
||||||
|
supervision_warning_leaflet.update_by,
|
||||||
|
supervision_warning_leaflet.update_time
|
||||||
FROM supervision_warning_leaflet supervision_warning_leaflet
|
FROM supervision_warning_leaflet supervision_warning_leaflet
|
||||||
WHERE ${ew.sqlSegment}
|
WHERE ${ew.sqlSegment}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="alarmPageData" resultType="WarningLeafletVO">
|
<select id="alarmPageData" resultType="WarningLeafletVO">
|
||||||
SELECT supervision_warning_leaflet.*
|
SELECT
|
||||||
|
supervision_warning_leaflet.leaflet_name,
|
||||||
|
supervision_warning_leaflet.leaflet_no,
|
||||||
|
supervision_warning_leaflet.problem_type,
|
||||||
|
supervision_warning_leaflet.problem_id,
|
||||||
|
(case problem_type
|
||||||
|
when 1 then null
|
||||||
|
when 2 then null
|
||||||
|
when 3 then (select duty_Org_Id FROM supervision_user_complaint where id=problem_id)
|
||||||
|
when 4 then (select dept_id FROM supervision_survey_test where id=problem_id)
|
||||||
|
else null end ) as duty_Org_Id,
|
||||||
|
supervision_warning_leaflet.leaflet_type,
|
||||||
|
supervision_warning_leaflet.STATUS,
|
||||||
|
supervision_warning_leaflet.process_instance_id,
|
||||||
|
supervision_warning_leaflet.history_instance_id,
|
||||||
|
supervision_warning_leaflet.issue_detail,
|
||||||
|
supervision_warning_leaflet.take_step,
|
||||||
|
supervision_warning_leaflet.report_path,
|
||||||
|
supervision_warning_leaflet.state,
|
||||||
|
supervision_warning_leaflet.create_by,
|
||||||
|
supervision_warning_leaflet.create_time,
|
||||||
|
supervision_warning_leaflet.update_by,
|
||||||
|
supervision_warning_leaflet.update_time
|
||||||
FROM supervision_warning_leaflet supervision_warning_leaflet
|
FROM supervision_warning_leaflet supervision_warning_leaflet
|
||||||
WHERE ${ew.sqlSegment}
|
WHERE ${ew.sqlSegment}
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -143,8 +143,6 @@ public class SupervisionDevMainReportPOServiceImpl extends ServiceImpl<Supervisi
|
|||||||
@Override
|
@Override
|
||||||
public Page<SupervisionDevMainReportVO> getDevReport(SupervisionDevMainReportParam.SupervisionDevMainReportQuery supervisionDevMainReportQuery) {
|
public Page<SupervisionDevMainReportVO> getDevReport(SupervisionDevMainReportParam.SupervisionDevMainReportQuery supervisionDevMainReportQuery) {
|
||||||
QueryWrapper<SupervisionDevMainReportVO> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<SupervisionDevMainReportVO> queryWrapper = new QueryWrapper<>();
|
||||||
String userIndex = RequestUtil.getUserIndex();
|
|
||||||
|
|
||||||
//获取当前用户部门所有同事的id,查看该部门下所有的数据
|
//获取当前用户部门所有同事的id,查看该部门下所有的数据
|
||||||
List<String> colleaguesIds = userFeignClient.getColleaguesIdByUserId(RequestUtil.getUserIndex()).getData();
|
List<String> colleaguesIds = userFeignClient.getColleaguesIdByUserId(RequestUtil.getUserIndex()).getData();
|
||||||
queryWrapper.in("supervision_dev_main_report.create_by", colleaguesIds)
|
queryWrapper.in("supervision_dev_main_report.create_by", colleaguesIds)
|
||||||
@@ -157,6 +155,15 @@ public class SupervisionDevMainReportPOServiceImpl extends ServiceImpl<Supervisi
|
|||||||
if (Objects.nonNull(supervisionDevMainReportQuery.getStatus())) {
|
if (Objects.nonNull(supervisionDevMainReportQuery.getStatus())) {
|
||||||
queryWrapper.eq("supervision_dev_main_report.status", supervisionDevMainReportQuery.getStatus());
|
queryWrapper.eq("supervision_dev_main_report.status", supervisionDevMainReportQuery.getStatus());
|
||||||
}
|
}
|
||||||
|
if (StrUtil.isNotBlank(supervisionDevMainReportQuery.getSearchValue())) {
|
||||||
|
queryWrapper.and(x->x
|
||||||
|
.like("dev.substation_name", supervisionDevMainReportQuery.getSearchValue())
|
||||||
|
.or()
|
||||||
|
.like("dev.monitoring_terminal_code", supervisionDevMainReportQuery.getSearchValue())
|
||||||
|
.or()
|
||||||
|
.like("dev.monitoring_terminal_name", supervisionDevMainReportQuery.getSearchValue())
|
||||||
|
);
|
||||||
|
}
|
||||||
//添加上时间范围
|
//添加上时间范围
|
||||||
queryWrapper.between("supervision_dev_main_report.Create_Time",
|
queryWrapper.between("supervision_dev_main_report.Create_Time",
|
||||||
DateUtil.beginOfDay(DateUtil.parse(supervisionDevMainReportQuery.getSearchBeginTime())),
|
DateUtil.beginOfDay(DateUtil.parse(supervisionDevMainReportQuery.getSearchBeginTime())),
|
||||||
|
|||||||
@@ -158,6 +158,18 @@ public class SupervisionTempLineDebugPOServiceImpl extends ServiceImpl<Supervisi
|
|||||||
queryWrapper.eq("supervision_temp_line_report.status", supervisionTempLineDebugQuery.getStatus());
|
queryWrapper.eq("supervision_temp_line_report.status", supervisionTempLineDebugQuery.getStatus());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (StrUtil.isNotBlank(supervisionTempLineDebugQuery.getSearchValue())) {
|
||||||
|
queryWrapper.and(x->x
|
||||||
|
.like("supervision_temp_line_report.Power_Substation_Name", supervisionTempLineDebugQuery.getSearchValue())
|
||||||
|
.or()
|
||||||
|
.like("supervision_temp_line_report.connected_bus", supervisionTempLineDebugQuery.getSearchValue())
|
||||||
|
.or()
|
||||||
|
.like("supervision_temp_line_report.monitoring_terminal_name", supervisionTempLineDebugQuery.getSearchValue())
|
||||||
|
.or()
|
||||||
|
.like("supervision_temp_line_report.line_name", supervisionTempLineDebugQuery.getSearchValue())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
//添加上时间范围
|
//添加上时间范围
|
||||||
queryWrapper.between("supervision_temp_line_report.Create_Time",
|
queryWrapper.between("supervision_temp_line_report.Create_Time",
|
||||||
DateUtil.beginOfDay(DateUtil.parse(supervisionTempLineDebugQuery.getSearchBeginTime())),
|
DateUtil.beginOfDay(DateUtil.parse(supervisionTempLineDebugQuery.getSearchBeginTime())),
|
||||||
|
|||||||
@@ -136,7 +136,17 @@ public class SupervisionTempLineReportServiceImpl extends ServiceImpl<Supervisio
|
|||||||
if (Objects.nonNull(supervisionTempLineReportQuery.getStatus())) {
|
if (Objects.nonNull(supervisionTempLineReportQuery.getStatus())) {
|
||||||
queryWrapper.eq("supervision_temp_line_report.status", supervisionTempLineReportQuery.getStatus());
|
queryWrapper.eq("supervision_temp_line_report.status", supervisionTempLineReportQuery.getStatus());
|
||||||
}
|
}
|
||||||
|
if (StrUtil.isNotBlank(supervisionTempLineReportQuery.getSearchValue())) {
|
||||||
|
queryWrapper.and(x->x
|
||||||
|
.like("supervision_temp_line_report.Power_Substation_Name", supervisionTempLineReportQuery.getSearchValue())
|
||||||
|
.or()
|
||||||
|
.like("supervision_temp_line_report.connected_bus", supervisionTempLineReportQuery.getSearchValue())
|
||||||
|
.or()
|
||||||
|
.like("supervision_temp_line_report.monitoring_terminal_name", supervisionTempLineReportQuery.getSearchValue())
|
||||||
|
.or()
|
||||||
|
.like("supervision_temp_line_report.line_name", supervisionTempLineReportQuery.getSearchValue())
|
||||||
|
);
|
||||||
|
}
|
||||||
//添加上时间范围
|
//添加上时间范围
|
||||||
queryWrapper.between("supervision_temp_line_report.Create_Time",
|
queryWrapper.between("supervision_temp_line_report.Create_Time",
|
||||||
DateUtil.beginOfDay(DateUtil.parse(supervisionTempLineReportQuery.getSearchBeginTime())),
|
DateUtil.beginOfDay(DateUtil.parse(supervisionTempLineReportQuery.getSearchBeginTime())),
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.njcn.supervision.service.leaflet.impl;
|
package com.njcn.supervision.service.leaflet.impl;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.date.DatePattern;
|
import cn.hutool.core.date.DatePattern;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
@@ -36,7 +37,9 @@ import com.njcn.supervision.utils.InstanceUtil;
|
|||||||
import com.njcn.system.api.DicDataFeignClient;
|
import com.njcn.system.api.DicDataFeignClient;
|
||||||
import com.njcn.system.enums.DicDataTypeEnum;
|
import com.njcn.system.enums.DicDataTypeEnum;
|
||||||
import com.njcn.system.pojo.po.DictData;
|
import com.njcn.system.pojo.po.DictData;
|
||||||
|
import com.njcn.user.api.DeptFeignClient;
|
||||||
import com.njcn.user.api.UserFeignClient;
|
import com.njcn.user.api.UserFeignClient;
|
||||||
|
import com.njcn.user.pojo.po.Dept;
|
||||||
import com.njcn.web.factory.PageFactory;
|
import com.njcn.web.factory.PageFactory;
|
||||||
import com.njcn.web.utils.RequestUtil;
|
import com.njcn.web.utils.RequestUtil;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
@@ -72,6 +75,8 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
|||||||
@Resource
|
@Resource
|
||||||
private ISurveyTestService surveyTestService;
|
private ISurveyTestService surveyTestService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private DeptFeignClient deptFeignClient;
|
||||||
@Lazy
|
@Lazy
|
||||||
@Resource
|
@Resource
|
||||||
private SupervisionGeneralSurveyPlanPOService supervisionGeneralSurveyPlanPOService;
|
private SupervisionGeneralSurveyPlanPOService supervisionGeneralSurveyPlanPOService;
|
||||||
@@ -113,7 +118,25 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
|||||||
.eq("supervision_warning_leaflet.state",DataStateEnum.ENABLE.getCode())
|
.eq("supervision_warning_leaflet.state",DataStateEnum.ENABLE.getCode())
|
||||||
.eq("supervision_warning_leaflet.leaflet_type", LeafletTypeEnum.WARNING.getCode())
|
.eq("supervision_warning_leaflet.leaflet_type", LeafletTypeEnum.WARNING.getCode())
|
||||||
.orderByDesc("supervision_warning_leaflet.Update_Time");
|
.orderByDesc("supervision_warning_leaflet.Update_Time");
|
||||||
return this.baseMapper.warningPageData(new Page<>(PageFactory.getPageNum(warningLeafletQueryParam), PageFactory.getPageSize(warningLeafletQueryParam)), warningLeafletVOQueryWrapper);
|
Page<WarningLeafletVO> warningLeafletVOPage = this.baseMapper.warningPageData(new Page<>(PageFactory.getPageNum(warningLeafletQueryParam), PageFactory.getPageSize(warningLeafletQueryParam)), warningLeafletVOQueryWrapper);
|
||||||
|
extracted(warningLeafletVOPage);
|
||||||
|
return warningLeafletVOPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void extracted(Page<WarningLeafletVO> warningLeafletVOPage) {
|
||||||
|
if(CollUtil.isNotEmpty(warningLeafletVOPage.getRecords())){
|
||||||
|
List<String> deptIds = warningLeafletVOPage.getRecords().stream().distinct().map(WarningLeafletVO::getDutyOrgId).collect(Collectors.toList());
|
||||||
|
if(CollUtil.isNotEmpty(deptIds)){
|
||||||
|
List<Dept> data = deptFeignClient.getDeptInfoListByIds(deptIds).getData();
|
||||||
|
Map<String, String> deptMap = data.stream().collect(Collectors.toMap(Dept::getId, Dept::getName));
|
||||||
|
warningLeafletVOPage.getRecords().stream().peek(x -> {
|
||||||
|
if(deptMap.containsKey(x.getDutyOrgId())){
|
||||||
|
x.setDutyOrgName(deptMap.get(x.getDutyOrgId()));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -206,17 +229,24 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
|||||||
//目前仅知道现场测试超标会有附件
|
//目前仅知道现场测试超标会有附件
|
||||||
List<WarningLeafletVO> records = warningLeafletVOPage.getRecords();
|
List<WarningLeafletVO> records = warningLeafletVOPage.getRecords();
|
||||||
if(CollectionUtil.isNotEmpty(records)){
|
if(CollectionUtil.isNotEmpty(records)){
|
||||||
|
List<String> deptIds = records.stream().distinct().map(WarningLeafletVO::getDutyOrgId).collect(Collectors.toList());
|
||||||
|
Map<String, String> deptMap = new HashMap<>();
|
||||||
|
if(CollUtil.isNotEmpty(deptIds)){
|
||||||
|
List<Dept> data = deptFeignClient.getDeptInfoListByIds(deptIds).getData();
|
||||||
|
deptMap.putAll(data.stream().collect(Collectors.toMap(Dept::getId, Dept::getName)));
|
||||||
|
}
|
||||||
for (WarningLeafletVO record : records) {
|
for (WarningLeafletVO record : records) {
|
||||||
if(record.getProblemType().equals(ProblemTypeEnum.SITE_TEST.getCode()) && StrUtil.isNotBlank(record.getProblemId())){
|
if(record.getProblemType().equals(ProblemTypeEnum.SITE_TEST.getCode()) && StrUtil.isNotBlank(record.getProblemId())){
|
||||||
//查询到现场测试超标附件地址
|
//查询到现场测试超标附件地址
|
||||||
SurveyTest surveyTest = surveyTestService.getById(record.getProblemId());
|
SurveyTest surveyTest = surveyTestService.getById(record.getProblemId());
|
||||||
record.setProblemPath(surveyTest.getTestReport());
|
record.setProblemPath(surveyTest.getTestReport());
|
||||||
}
|
}
|
||||||
|
if(deptMap.containsKey(record.getDutyOrgId())){
|
||||||
|
record.setDutyOrgName(deptMap.get(record.getDutyOrgId()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return warningLeafletVOPage;
|
return warningLeafletVOPage;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user