1.技术监督,终端入网监测,监测点台账录入,监测点联调增加模糊搜索功能
2.电能质量问题,用户投诉新增增加责任部门 3.预告单增加责任部门列
This commit is contained in:
@@ -4,13 +4,57 @@
|
||||
|
||||
|
||||
<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
|
||||
WHERE ${ew.sqlSegment}
|
||||
</select>
|
||||
|
||||
<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
|
||||
WHERE ${ew.sqlSegment}
|
||||
</select>
|
||||
|
||||
@@ -143,8 +143,6 @@ public class SupervisionDevMainReportPOServiceImpl extends ServiceImpl<Supervisi
|
||||
@Override
|
||||
public Page<SupervisionDevMainReportVO> getDevReport(SupervisionDevMainReportParam.SupervisionDevMainReportQuery supervisionDevMainReportQuery) {
|
||||
QueryWrapper<SupervisionDevMainReportVO> queryWrapper = new QueryWrapper<>();
|
||||
String userIndex = RequestUtil.getUserIndex();
|
||||
|
||||
//获取当前用户部门所有同事的id,查看该部门下所有的数据
|
||||
List<String> colleaguesIds = userFeignClient.getColleaguesIdByUserId(RequestUtil.getUserIndex()).getData();
|
||||
queryWrapper.in("supervision_dev_main_report.create_by", colleaguesIds)
|
||||
@@ -157,6 +155,15 @@ public class SupervisionDevMainReportPOServiceImpl extends ServiceImpl<Supervisi
|
||||
if (Objects.nonNull(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",
|
||||
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());
|
||||
}
|
||||
|
||||
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",
|
||||
DateUtil.beginOfDay(DateUtil.parse(supervisionTempLineDebugQuery.getSearchBeginTime())),
|
||||
|
||||
@@ -136,7 +136,17 @@ public class SupervisionTempLineReportServiceImpl extends ServiceImpl<Supervisio
|
||||
if (Objects.nonNull(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",
|
||||
DateUtil.beginOfDay(DateUtil.parse(supervisionTempLineReportQuery.getSearchBeginTime())),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.njcn.supervision.service.leaflet.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
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.enums.DicDataTypeEnum;
|
||||
import com.njcn.system.pojo.po.DictData;
|
||||
import com.njcn.user.api.DeptFeignClient;
|
||||
import com.njcn.user.api.UserFeignClient;
|
||||
import com.njcn.user.pojo.po.Dept;
|
||||
import com.njcn.web.factory.PageFactory;
|
||||
import com.njcn.web.utils.RequestUtil;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
@@ -72,6 +75,8 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
||||
@Resource
|
||||
private ISurveyTestService surveyTestService;
|
||||
|
||||
@Resource
|
||||
private DeptFeignClient deptFeignClient;
|
||||
@Lazy
|
||||
@Resource
|
||||
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.leaflet_type", LeafletTypeEnum.WARNING.getCode())
|
||||
.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
|
||||
@@ -206,17 +229,24 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
||||
//目前仅知道现场测试超标会有附件
|
||||
List<WarningLeafletVO> records = warningLeafletVOPage.getRecords();
|
||||
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) {
|
||||
if(record.getProblemType().equals(ProblemTypeEnum.SITE_TEST.getCode()) && StrUtil.isNotBlank(record.getProblemId())){
|
||||
//查询到现场测试超标附件地址
|
||||
SurveyTest surveyTest = surveyTestService.getById(record.getProblemId());
|
||||
record.setProblemPath(surveyTest.getTestReport());
|
||||
}
|
||||
if(deptMap.containsKey(record.getDutyOrgId())){
|
||||
record.setDutyOrgName(deptMap.get(record.getDutyOrgId()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return warningLeafletVOPage;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user