1.解决台账数据缺少变电站个别信息
2.解决技术监督台账管理终端信息 3.增加全景展示稳态9指标数据
This commit is contained in:
@@ -111,7 +111,7 @@
|
|||||||
inner join pq_line dev on voltage.pid = dev.id
|
inner join pq_line dev on voltage.pid = dev.id
|
||||||
inner join pq_device device on dev.id = device.id
|
inner join pq_device device on dev.id = device.id
|
||||||
inner join pq_line substation on dev.pid = substation.id
|
inner join pq_line substation on dev.pid = substation.id
|
||||||
inner join pq_substation sub on sub.id = substation.id
|
left join pq_substation sub on sub.id = substation.id
|
||||||
where device.Dev_Model = 1
|
where device.Dev_Model = 1
|
||||||
and point.state = 1
|
and point.state = 1
|
||||||
and device.Run_Flag = 0
|
and device.Run_Flag = 0
|
||||||
|
|||||||
@@ -308,42 +308,46 @@
|
|||||||
FROM
|
FROM
|
||||||
pq_line t1,
|
pq_line t1,
|
||||||
pq_device t2
|
pq_device t2
|
||||||
WHERE
|
<where>
|
||||||
t1.id = t2.id
|
t1.id = t2.id
|
||||||
<if test="deviceType.devModel!=null and deviceType.devModel.size()!=0">
|
<if test="deviceType.devModel!=null and deviceType.devModel.size()!=0">
|
||||||
AND t2.Dev_Model in
|
AND t2.Dev_Model in
|
||||||
<foreach collection="deviceType.devModel" open="(" close=")" item="item" separator=",">
|
<foreach collection="deviceType.devModel" open="(" close=")" item="item" separator=",">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="deviceType.runFlag!=null and deviceType.runFlag.size()!=0">
|
<if test="deviceType.runFlag!=null and deviceType.runFlag.size()!=0">
|
||||||
AND t2.Run_Flag in
|
AND t2.Run_Flag in
|
||||||
<foreach collection="deviceType.runFlag" open="(" close=")" item="item" separator=",">
|
<foreach collection="deviceType.runFlag" open="(" close=")" item="item" separator=",">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="deviceType.dataType!=null and deviceType.dataType.size()!=0">
|
<if test="deviceType.dataType!=null and deviceType.dataType.size()!=0">
|
||||||
AND t2.Dev_Data_Type in
|
AND t2.Dev_Data_Type in
|
||||||
<foreach collection="deviceType.dataType" open="(" close=")" item="item" separator=",">
|
<foreach collection="deviceType.dataType" open="(" close=")" item="item" separator=",">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="deviceType.comFlag!=null and deviceType.comFlag.size()!=0">
|
<if test="deviceType.comFlag!=null and deviceType.comFlag.size()!=0">
|
||||||
AND t2.Com_Flag in
|
AND t2.Com_Flag in
|
||||||
<foreach collection="deviceType.comFlag" open="(" close=")" item="item" separator=",">
|
<foreach collection="deviceType.comFlag" open="(" close=")" item="item" separator=",">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="manufacturer!=null and manufacturer.size()!=0">
|
<if test="manufacturer!=null and manufacturer.size()!=0">
|
||||||
AND t2.manufacturer in
|
AND t2.manufacturer in
|
||||||
<foreach collection="manufacturer" open="(" close=")" item="item" separator=",">
|
<foreach collection="manufacturer" open="(" close=")" item="item" separator=",">
|
||||||
#{item.id}
|
#{item.id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
AND t1.id IN
|
<if test="devIds!=null and devIds.size()!=0">
|
||||||
<foreach collection="devIds" open="(" close=")" item="item" separator=",">
|
AND t1.id IN
|
||||||
#{item}
|
<foreach collection="devIds" open="(" close=")" item="item" separator=",">
|
||||||
</foreach>
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
@@ -353,19 +357,25 @@
|
|||||||
from
|
from
|
||||||
pq_line t1 ,
|
pq_line t1 ,
|
||||||
pq_voltage t2
|
pq_voltage t2
|
||||||
where
|
<where>
|
||||||
t1.id = t2.id
|
t1.id = t2.id
|
||||||
and
|
<if test="voltageIds!=null and voltageIds.size()!=0">
|
||||||
t1.id in
|
and t1.id in
|
||||||
<foreach collection="voltageIds" separator="," open="(" close=")" item="item">
|
<foreach collection="voltageIds" separator="," open="(" close=")" item="item">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
<if test="scale!=null and scale.size()!=0">
|
</if>
|
||||||
AND t2.scale in
|
<if test="scale!=null and scale.size()!=0">
|
||||||
<foreach collection="scale" open="(" close=")" item="item" separator=",">
|
AND t2.scale in
|
||||||
#{item.id}
|
<foreach collection="scale" open="(" close=")" item="item" separator=",">
|
||||||
</foreach>
|
#{item.id}
|
||||||
</if>
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getVoltageIdByScale" resultType="String">
|
<select id="getVoltageIdByScale" resultType="String">
|
||||||
@@ -1728,21 +1738,22 @@
|
|||||||
select
|
select
|
||||||
t1.*
|
t1.*
|
||||||
from
|
from
|
||||||
pq_line t1 ,
|
pq_line t1
|
||||||
pq_substation t2
|
left join pq_substation t2 on t1.id = t2.id
|
||||||
where
|
<where>
|
||||||
t1.id = t2.id
|
<if test="subIds!=null and subIds.size()!=0">
|
||||||
and
|
AND t1.id in
|
||||||
t1.id in
|
<foreach collection="subIds" separator="," open="(" close=")" item="item">
|
||||||
<foreach collection="subIds" separator="," open="(" close=")" item="item">
|
#{item}
|
||||||
#{item}
|
</foreach>
|
||||||
</foreach>
|
</if>
|
||||||
<if test="scale!=null and scale.size()!=0">
|
<if test="scale!=null and scale.size()!=0">
|
||||||
AND t2.scale in
|
AND t2.scale in
|
||||||
<foreach collection="scale" open="(" close=")" item="item" separator=",">
|
<foreach collection="scale" open="(" close=")" item="item" separator=",">
|
||||||
#{item.id}
|
#{item.id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
</where>
|
||||||
</select>
|
</select>
|
||||||
<select id="selectByName" resultType="com.njcn.device.pq.pojo.po.LineDetail">
|
<select id="selectByName" resultType="com.njcn.device.pq.pojo.po.LineDetail">
|
||||||
select
|
select
|
||||||
|
|||||||
@@ -282,6 +282,9 @@ public class GridDiagramServiceImpl implements GridDiagramService {
|
|||||||
@Override
|
@Override
|
||||||
public Map<String, Long> getGridDiagramDevTendency(GridDiagramParam param, Integer type) {
|
public Map<String, Long> getGridDiagramDevTendency(GridDiagramParam param, Integer type) {
|
||||||
param.getDeviceInfoParam().setLineRunFlag(0);
|
param.getDeviceInfoParam().setLineRunFlag(0);
|
||||||
|
if(type==3){
|
||||||
|
param.getDeviceInfoParam().setPowerFlag(0);
|
||||||
|
}
|
||||||
List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceService.getDeviceInfo(param.getDeviceInfoParam(), Stream.of(0).collect(Collectors.toList()), Stream.of(1).collect(Collectors.toList()));
|
List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceService.getDeviceInfo(param.getDeviceInfoParam(), Stream.of(0).collect(Collectors.toList()), Stream.of(1).collect(Collectors.toList()));
|
||||||
Map<String, Long> map = new LinkedHashMap<>();
|
Map<String, Long> map = new LinkedHashMap<>();
|
||||||
DateField dateField;
|
DateField dateField;
|
||||||
@@ -312,13 +315,29 @@ public class GridDiagramServiceImpl implements GridDiagramService {
|
|||||||
List<Line> list = lineService.list(new LambdaQueryWrapper<Line>().in(CollUtil.isNotEmpty(ids), Line::getId, ids).eq(Line::getState, DataStateEnum.ENABLE.getCode()).eq(Line::getLevel, type));
|
List<Line> list = lineService.list(new LambdaQueryWrapper<Line>().in(CollUtil.isNotEmpty(ids), Line::getId, ids).eq(Line::getState, DataStateEnum.ENABLE.getCode()).eq(Line::getLevel, type));
|
||||||
times = list.stream().map(x -> Date.from(x.getCreateTime().atZone(ZoneId.systemDefault()).toInstant())).collect(Collectors.toList());
|
times = list.stream().map(x -> Date.from(x.getCreateTime().atZone(ZoneId.systemDefault()).toInstant())).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
for (DateTime dateTime : dateTimes) {
|
long num =0;
|
||||||
if (1 == param.getType()) {
|
for (int i = 0; i < dateTimes.size(); i++) {
|
||||||
long count = times.stream().filter(x -> DateUtil.isIn(x, DateUtil.beginOfYear(dateTime), DateUtil.endOfYear(dateTime))).count();
|
if(i==0){
|
||||||
map.put(dateTime.toString().substring(0, 4), count);
|
if (1 == param.getType()) {
|
||||||
} else {
|
long count = times.stream().filter(x -> DateUtil.isIn(x, DateUtil.beginOfYear(DateUtil.parse("1970-01-01 00:00:00")), DateUtil.endOfYear(dateTimes.get(0)))).count();
|
||||||
long count = times.stream().filter(x -> DateUtil.isIn(x, DateUtil.beginOfMonth(dateTime), DateUtil.endOfMonth(dateTime))).count();
|
num=num+count;
|
||||||
map.put(dateTime.toString().substring(0, 7), count);
|
map.put(dateTimes.get(0).toString().substring(0, 4), num);
|
||||||
|
} else {
|
||||||
|
long count = times.stream().filter(x -> DateUtil.isIn(x, DateUtil.beginOfYear(DateUtil.parse("1970-01-01 00:00:00")), DateUtil.endOfMonth(dateTimes.get(0)))).count();
|
||||||
|
num=num+count;
|
||||||
|
map.put(dateTimes.get(0).toString().substring(0, 7), num);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
int finalI = i;
|
||||||
|
if (1 == param.getType()) {
|
||||||
|
long count = times.stream().filter(x -> DateUtil.isIn(x, DateUtil.beginOfYear(dateTimes.get(finalI)), DateUtil.endOfYear(dateTimes.get(finalI)))).count();
|
||||||
|
num=num+count;
|
||||||
|
map.put(dateTimes.get(finalI).toString().substring(0, 4), num);
|
||||||
|
} else {
|
||||||
|
long count = times.stream().filter(x -> DateUtil.isIn(x, DateUtil.beginOfMonth(dateTimes.get(finalI)), DateUtil.endOfMonth(dateTimes.get(finalI)))).count();
|
||||||
|
num=num+count;
|
||||||
|
map.put(dateTimes.get(finalI).toString().substring(0, 7), num);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
|||||||
@@ -118,6 +118,11 @@ public class RunManageServiceImpl implements RunManageService {
|
|||||||
DeviceInfoParam deviceInfoParam = new DeviceInfoParam();
|
DeviceInfoParam deviceInfoParam = new DeviceInfoParam();
|
||||||
BeanUtil.copyProperties(runManageParam, deviceInfoParam);
|
BeanUtil.copyProperties(runManageParam, deviceInfoParam);
|
||||||
deviceInfoParam.setServerName("pqs-common");
|
deviceInfoParam.setServerName("pqs-common");
|
||||||
|
if(CollUtil.isNotEmpty(runManageParam.getRunFlag())){
|
||||||
|
if(runManageParam.getRunFlag().get(0)==0){
|
||||||
|
deviceInfoParam.setLineRunFlag(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceService.getDeviceInfo(deviceInfoParam, runManageParam.getRunFlag(), Stream.of(1).collect(Collectors.toList()));
|
List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceService.getDeviceInfo(deviceInfoParam, runManageParam.getRunFlag(), Stream.of(1).collect(Collectors.toList()));
|
||||||
if (CollectionUtils.isEmpty(generalDeviceDTOList)) {
|
if (CollectionUtils.isEmpty(generalDeviceDTOList)) {
|
||||||
throw new BusinessException("当前部门没有装置台账");
|
throw new BusinessException("当前部门没有装置台账");
|
||||||
|
|||||||
@@ -315,7 +315,73 @@
|
|||||||
SUM(voltage_dev_overtime) as voltageDevOvertime,
|
SUM(voltage_dev_overtime) as voltageDevOvertime,
|
||||||
SUM(flicker_overtime) as flickerOvertime,
|
SUM(flicker_overtime) as flickerOvertime,
|
||||||
SUM(ubalance_overtime) as ubalanceOvertime,
|
SUM(ubalance_overtime) as ubalanceOvertime,
|
||||||
SUM(uaberrance_overtime) as uaberranceOvertime
|
SUM(uaberrance_overtime) as uaberranceOvertime,
|
||||||
|
sum(uharm_2_overtime) uharm2Overtime,
|
||||||
|
sum(uharm_3_overtime) uharm3Overtime,
|
||||||
|
sum(uharm_4_overtime) uharm4Overtime,
|
||||||
|
sum(uharm_5_overtime) uharm5Overtime,
|
||||||
|
sum(uharm_6_overtime) uharm6Overtime,
|
||||||
|
sum(uharm_7_overtime) uharm7Overtime,
|
||||||
|
sum(uharm_8_overtime) uharm8Overtime,
|
||||||
|
sum(uharm_9_overtime) uharm9Overtime,
|
||||||
|
sum(uharm_10_overtime) uharm10Overtime,
|
||||||
|
sum(uharm_11_overtime) uharm11Overtime,
|
||||||
|
sum(uharm_12_overtime) uharm12Overtime,
|
||||||
|
sum(uharm_13_overtime) uharm13Overtime,
|
||||||
|
sum(uharm_14_overtime) uharm14Overtime,
|
||||||
|
sum(uharm_15_overtime) uharm15Overtime,
|
||||||
|
sum(uharm_16_overtime) uharm16Overtime,
|
||||||
|
sum(uharm_17_overtime) uharm17Overtime,
|
||||||
|
sum(uharm_18_overtime) uharm18Overtime,
|
||||||
|
sum(uharm_19_overtime) uharm19Overtime,
|
||||||
|
sum(uharm_20_overtime) uharm20Overtime,
|
||||||
|
sum(uharm_21_overtime) uharm21Overtime,
|
||||||
|
sum(uharm_22_overtime) uharm22Overtime,
|
||||||
|
sum(uharm_23_overtime) uharm23Overtime,
|
||||||
|
sum(uharm_24_overtime) uharm24Overtime,
|
||||||
|
sum(uharm_25_overtime) uharm25Overtime,
|
||||||
|
sum(iharm_2_overtime) iharm2Overtime,
|
||||||
|
sum(iharm_3_overtime) iharm3Overtime,
|
||||||
|
sum(iharm_4_overtime) iharm4Overtime,
|
||||||
|
sum(iharm_5_overtime) iharm5Overtime,
|
||||||
|
sum(iharm_6_overtime) iharm6Overtime,
|
||||||
|
sum(iharm_7_overtime) iharm7Overtime,
|
||||||
|
sum(iharm_8_overtime) iharm8Overtime,
|
||||||
|
sum(iharm_9_overtime) iharm9Overtime,
|
||||||
|
sum(iharm_10_overtime) iharm10Overtime,
|
||||||
|
sum(iharm_11_overtime) iharm11Overtime,
|
||||||
|
sum(iharm_12_overtime) iharm12Overtime,
|
||||||
|
sum(iharm_13_overtime) iharm13Overtime,
|
||||||
|
sum(iharm_14_overtime) iharm14Overtime,
|
||||||
|
sum(iharm_15_overtime) iharm15Overtime,
|
||||||
|
sum(iharm_16_overtime) iharm16Overtime,
|
||||||
|
sum(iharm_17_overtime) iharm17Overtime,
|
||||||
|
sum(iharm_18_overtime) iharm18Overtime,
|
||||||
|
sum(iharm_19_overtime) iharm19Overtime,
|
||||||
|
sum(iharm_20_overtime) iharm20Overtime,
|
||||||
|
sum(iharm_21_overtime) iharm21Overtime,
|
||||||
|
sum(iharm_22_overtime) iharm22Overtime,
|
||||||
|
sum(iharm_23_overtime) iharm23Overtime,
|
||||||
|
sum(iharm_24_overtime) iharm24Overtime,
|
||||||
|
sum(iharm_25_overtime) iharm25Overtime,
|
||||||
|
sum(inuharm_1_overtime) inuharm1Overtime,
|
||||||
|
sum(inuharm_2_overtime) inuharm2Overtime,
|
||||||
|
sum(inuharm_3_overtime) inuharm3Overtime,
|
||||||
|
sum(inuharm_4_overtime) inuharm4Overtime,
|
||||||
|
sum(inuharm_5_overtime) inuharm5Overtime,
|
||||||
|
sum(inuharm_6_overtime) inuharm6Overtime,
|
||||||
|
sum(inuharm_7_overtime) inuharm7Overtime,
|
||||||
|
sum(inuharm_8_overtime) inuharm8Overtime,
|
||||||
|
sum(inuharm_9_overtime) inuharm9Overtime,
|
||||||
|
sum(inuharm_10_overtime) inuharm10Overtime,
|
||||||
|
sum(inuharm_11_overtime) inuharm11Overtime,
|
||||||
|
sum(inuharm_12_overtime) inuharm12Overtime,
|
||||||
|
sum(inuharm_13_overtime) inuharm13Overtime,
|
||||||
|
sum(inuharm_14_overtime) inuharm14Overtime,
|
||||||
|
sum(inuharm_15_overtime) inuharm15Overtime,
|
||||||
|
sum(inuharm_16_overtime) inuharm16Overtime,
|
||||||
|
sum(i_neg_overtime) iNegOvertime
|
||||||
|
|
||||||
from
|
from
|
||||||
r_stat_limit_rate_d
|
r_stat_limit_rate_d
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -458,7 +458,7 @@ public class GridServiceImpl implements IGridService {
|
|||||||
Field field = limitRateDPO.getClass().getDeclaredField(fieldName);
|
Field field = limitRateDPO.getClass().getDeclaredField(fieldName);
|
||||||
//设置对象的访问权限,保证对private的属性的访问
|
//设置对象的访问权限,保证对private的属性的访问
|
||||||
field.setAccessible(true);
|
field.setAccessible(true);
|
||||||
int v = Integer.parseInt(field.get(field).toString());
|
int v = Integer.parseInt(field.get(limitRateDPO).toString());
|
||||||
if(v>0){
|
if(v>0){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -259,7 +259,7 @@ public class RStatLimitServiceImpl implements RStatLimitService {
|
|||||||
List<String> online = onData.stream().flatMap(x -> x.getLineIndexes().stream()).distinct().collect(Collectors.toList());
|
List<String> online = onData.stream().flatMap(x -> x.getLineIndexes().stream()).distinct().collect(Collectors.toList());
|
||||||
|
|
||||||
StatSubstationBizBaseParam baseParam=new StatSubstationBizBaseParam();
|
StatSubstationBizBaseParam baseParam=new StatSubstationBizBaseParam();
|
||||||
baseParam.setIds(line);
|
baseParam.setIds(online);
|
||||||
baseParam.setStartTime(DateUtil.beginOfDay(DateUtil.parse(param.getSearchBeginTime())).toString());
|
baseParam.setStartTime(DateUtil.beginOfDay(DateUtil.parse(param.getSearchBeginTime())).toString());
|
||||||
baseParam.setEndTime(DateUtil.endOfDay(DateUtil.parse(param.getSearchEndTime())).toString());
|
baseParam.setEndTime(DateUtil.endOfDay(DateUtil.parse(param.getSearchEndTime())).toString());
|
||||||
List<String> linesTarget=targetDService.getLinesTarget(baseParam);
|
List<String> linesTarget=targetDService.getLinesTarget(baseParam);
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import com.njcn.supervision.pojo.param.user.UserReportNormalParam;
|
|||||||
import com.njcn.supervision.pojo.vo.user.UserReportVO;
|
import com.njcn.supervision.pojo.vo.user.UserReportVO;
|
||||||
import com.njcn.supervision.service.user.IUserReportNormalService;
|
import com.njcn.supervision.service.user.IUserReportNormalService;
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
@@ -30,7 +31,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("userReportNormal")
|
@RequestMapping("userReportNormal")
|
||||||
@ApiOperation("干扰源常态化管理")
|
@Api("干扰源常态化管理")
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class UserReportNormalController extends BaseController {
|
public class UserReportNormalController extends BaseController {
|
||||||
|
|
||||||
|
|||||||
@@ -269,12 +269,12 @@ public class SupervisionTempLineDebugPOServiceImpl extends ServiceImpl<Supervisi
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SupervisionTempLineDebugVO getDetailTempLineDebug(String id) {
|
public SupervisionTempLineDebugVO getDetailTempLineDebug(String id) {
|
||||||
SupervisionTempLineDebugVO supervisionTempLineDebugVO = new SupervisionTempLineDebugVO();
|
SupervisionTempLineDebugVO supervisionTempLineDebugVO =null;
|
||||||
SupervisionTempLineReport supervisionTempLineReport = supervisionTempLineReportService.getById(id);
|
SupervisionTempLineReport supervisionTempLineReport = supervisionTempLineReportService.getById(id);
|
||||||
SupervisionTempLineDebugPO supervisionTempLineDebugPO = this.getById(id);
|
SupervisionTempLineDebugPO supervisionTempLineDebugPO = this.getById(id);
|
||||||
if(ObjectUtil.isNotNull(supervisionTempLineDebugPO)){
|
if(ObjectUtil.isNotNull(supervisionTempLineDebugPO)){
|
||||||
|
supervisionTempLineDebugVO = new SupervisionTempLineDebugVO();
|
||||||
supervisionTempLineDebugVO.setId(id);
|
supervisionTempLineDebugVO.setId(id);
|
||||||
|
|
||||||
supervisionTempLineDebugVO.setUserName(supervisionTempLineReport.getUserName());
|
supervisionTempLineDebugVO.setUserName(supervisionTempLineReport.getUserName());
|
||||||
supervisionTempLineDebugVO.setConnectedBus(supervisionTempLineReport.getConnectedBus());
|
supervisionTempLineDebugVO.setConnectedBus(supervisionTempLineReport.getConnectedBus());
|
||||||
supervisionTempLineDebugVO.setMonitoringTerminalCode(supervisionTempLineReport.getMonitoringTerminalCode());
|
supervisionTempLineDebugVO.setMonitoringTerminalCode(supervisionTempLineReport.getMonitoringTerminalCode());
|
||||||
@@ -287,8 +287,6 @@ public class SupervisionTempLineDebugPOServiceImpl extends ServiceImpl<Supervisi
|
|||||||
supervisionTempLineDebugVO.setProcessInstanceId(supervisionTempLineDebugPO.getProcessInstanceId());
|
supervisionTempLineDebugVO.setProcessInstanceId(supervisionTempLineDebugPO.getProcessInstanceId());
|
||||||
supervisionTempLineDebugVO.setStatus(supervisionTempLineDebugPO.getStatus());
|
supervisionTempLineDebugVO.setStatus(supervisionTempLineDebugPO.getStatus());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return supervisionTempLineDebugVO;
|
return supervisionTempLineDebugVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -306,12 +304,13 @@ public class SupervisionTempLineDebugPOServiceImpl extends ServiceImpl<Supervisi
|
|||||||
bpmInstanceInfo.setHistoryInstanceId(supervisionTempLineDebugVO.getHistoryInstanceId());
|
bpmInstanceInfo.setHistoryInstanceId(supervisionTempLineDebugVO.getHistoryInstanceId());
|
||||||
String sign = "";
|
String sign = "";
|
||||||
if(StrUtil.isNotBlank(supervisionTempLineDebugVO.getPowerSubstationName())){
|
if(StrUtil.isNotBlank(supervisionTempLineDebugVO.getPowerSubstationName())){
|
||||||
sign = supervisionTempLineDebugVO.getPowerSubstationName()
|
sign=supervisionTempLineDebugVO.getPowerSubstationName()
|
||||||
.concat(StrPool.SLASH)
|
.concat(StrPool.SLASH);
|
||||||
.concat(supervisionTempLineDebugVO.getMonitoringTerminalName())
|
|
||||||
.concat(StrPool.SLASH)
|
|
||||||
.concat(supervisionTempLineDebugVO.getLineName());
|
|
||||||
}
|
}
|
||||||
|
sign = sign
|
||||||
|
.concat(supervisionTempLineDebugVO.getMonitoringTerminalName())
|
||||||
|
.concat(StrPool.SLASH)
|
||||||
|
.concat(supervisionTempLineDebugVO.getLineName());
|
||||||
bpmInstanceInfo.setInstanceSign(sign);
|
bpmInstanceInfo.setInstanceSign(sign);
|
||||||
}
|
}
|
||||||
return bpmInstanceInfo;
|
return bpmInstanceInfo;
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.njcn.supervision.service.device.impl;
|
|||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.text.StrPool;
|
import cn.hutool.core.text.StrPool;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
@@ -46,6 +47,8 @@ import java.util.Map;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import static javafx.beans.binding.Bindings.concat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
@@ -202,15 +205,22 @@ public class SupervisionTempLineReportServiceImpl extends ServiceImpl<Supervisio
|
|||||||
public BpmInstanceInfo getInstanceInfo(String businessId) {
|
public BpmInstanceInfo getInstanceInfo(String businessId) {
|
||||||
BpmInstanceInfo bpmInstanceInfo = new BpmInstanceInfo();
|
BpmInstanceInfo bpmInstanceInfo = new BpmInstanceInfo();
|
||||||
SupervisionTempLineReportVO supervisionTempLineReportVO = this.getDetailTempLine(businessId);
|
SupervisionTempLineReportVO supervisionTempLineReportVO = this.getDetailTempLine(businessId);
|
||||||
bpmInstanceInfo.setHistoryInstanceId(supervisionTempLineReportVO.getHistoryInstanceId());
|
if(ObjectUtil.isNotNull(supervisionTempLineReportVO)){
|
||||||
String sign = supervisionTempLineReportVO.getPowerSubstationName()
|
bpmInstanceInfo.setHistoryInstanceId(supervisionTempLineReportVO.getHistoryInstanceId());
|
||||||
.concat(StrPool.SLASH)
|
String powerSubstationName = supervisionTempLineReportVO.getPowerSubstationName();
|
||||||
.concat(supervisionTempLineReportVO.getMonitoringTerminalName())
|
if(StrUtil.isNotBlank(powerSubstationName)){
|
||||||
.concat(StrPool.SLASH)
|
powerSubstationName.concat(StrPool.SLASH);
|
||||||
.concat(supervisionTempLineReportVO.getConnectedBus())
|
}else{
|
||||||
.concat(StrPool.SLASH)
|
powerSubstationName="";
|
||||||
.concat(supervisionTempLineReportVO.getLineName());
|
}
|
||||||
bpmInstanceInfo.setInstanceSign(sign);
|
String sign = powerSubstationName
|
||||||
|
.concat(supervisionTempLineReportVO.getMonitoringTerminalName())
|
||||||
|
.concat(StrPool.SLASH)
|
||||||
|
.concat(supervisionTempLineReportVO.getConnectedBus())
|
||||||
|
.concat(StrPool.SLASH)
|
||||||
|
.concat(supervisionTempLineReportVO.getLineName());
|
||||||
|
bpmInstanceInfo.setInstanceSign(sign);
|
||||||
|
}
|
||||||
return bpmInstanceInfo;
|
return bpmInstanceInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -228,21 +238,23 @@ public class SupervisionTempLineReportServiceImpl extends ServiceImpl<Supervisio
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SupervisionTempLineReportVO getDetailTempLine(String id) {
|
public SupervisionTempLineReportVO getDetailTempLine(String id) {
|
||||||
SupervisionTempLineReportVO vo =new SupervisionTempLineReportVO();
|
SupervisionTempLineReportVO vo=null;
|
||||||
SupervisionTempLineReport byId = this.getById(id);
|
SupervisionTempLineReport byId = this.getById(id);
|
||||||
BeanUtils.copyProperties(byId,vo);
|
if(ObjectUtil.isNotNull(byId)){
|
||||||
|
vo =new SupervisionTempLineReportVO();
|
||||||
//处理特殊字段,用户名、部门名
|
BeanUtils.copyProperties(byId,vo);
|
||||||
UserVO userVO = userFeignClient.getUserById(vo.getCreateBy()).getData();
|
//处理特殊字段,用户名、部门名
|
||||||
vo.setReporter(userVO.getName());
|
UserVO userVO = userFeignClient.getUserById(vo.getCreateBy()).getData();
|
||||||
if(StringUtils.isNotEmpty(vo.getOrgId())){
|
vo.setReporter(userVO.getName());
|
||||||
vo.setOrgName(deptFeignClient.getDeptById(vo.getOrgId()).getData().getName());
|
if(StringUtils.isNotEmpty(vo.getOrgId())){
|
||||||
}
|
vo.setOrgName(deptFeignClient.getDeptById(vo.getOrgId()).getData().getName());
|
||||||
if(StringUtils.isNotEmpty(vo.getLoadType())){
|
}
|
||||||
vo.setLoadType(dictTreeFeignClient.queryById(vo.getLoadType()).getData().getName());
|
if(StringUtils.isNotEmpty(vo.getLoadType())){
|
||||||
}
|
vo.setLoadType(dictTreeFeignClient.queryById(vo.getLoadType()).getData().getName());
|
||||||
if(StringUtils.isNotEmpty(vo.getBusinessType())){
|
}
|
||||||
vo.setBusinessType(dictTreeFeignClient.queryById(vo.getBusinessType()).getData().getName());
|
if(StringUtils.isNotEmpty(vo.getBusinessType())){
|
||||||
|
vo.setBusinessType(dictTreeFeignClient.queryById(vo.getBusinessType()).getData().getName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return vo;
|
return vo;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ 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;
|
||||||
import cn.hutool.core.text.StrPool;
|
import cn.hutool.core.text.StrPool;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||||
@@ -237,7 +238,7 @@ public class SupervisionTempLineRunTestServiceImpl extends ServiceImpl<Supervisi
|
|||||||
if (CollUtil.isNotEmpty(usePoList)) {
|
if (CollUtil.isNotEmpty(usePoList)) {
|
||||||
List<String> lineRunTestIds = usePoList.stream().map(SupervisionTempLineRunTestPO::getId).collect(Collectors.toList());
|
List<String> lineRunTestIds = usePoList.stream().map(SupervisionTempLineRunTestPO::getId).collect(Collectors.toList());
|
||||||
List<SupervisionTempLineReport> supervisionTempLineReports = supervisionTempLineReportMapper.selectBatchIds(lineRunTestIds);
|
List<SupervisionTempLineReport> supervisionTempLineReports = supervisionTempLineReportMapper.selectBatchIds(lineRunTestIds);
|
||||||
Map<String, String> lineReportMap = supervisionTempLineReports.stream().collect(Collectors.toMap(SupervisionTempLineReport::getId, SupervisionTempLineReport::getMainWiringDiagram));
|
Map<String, String> lineReportMap = supervisionTempLineReports.stream().filter(x -> StrUtil.isNotBlank(x.getMainWiringDiagram())).collect(Collectors.toMap(SupervisionTempLineReport::getId, SupervisionTempLineReport::getMainWiringDiagram));
|
||||||
Map<String, List<SupervisionTempLineRunTestPO>> map = usePoList.stream().collect(Collectors.groupingBy(SupervisionTempLineRunTestPO::getTestRunTime));
|
Map<String, List<SupervisionTempLineRunTestPO>> map = usePoList.stream().collect(Collectors.groupingBy(SupervisionTempLineRunTestPO::getTestRunTime));
|
||||||
map.forEach((key, val) -> {
|
map.forEach((key, val) -> {
|
||||||
String startTime = key.split("--")[0];
|
String startTime = key.split("--")[0];
|
||||||
@@ -271,11 +272,12 @@ public class SupervisionTempLineRunTestServiceImpl extends ServiceImpl<Supervisi
|
|||||||
po.setOnlineRate(dto.getOnlineRate());
|
po.setOnlineRate(dto.getOnlineRate());
|
||||||
po.setIntegrityRate(dto.getIntegrityRate());
|
po.setIntegrityRate(dto.getIntegrityRate());
|
||||||
po.setSuitRate(dto.getSuitRate());
|
po.setSuitRate(dto.getSuitRate());
|
||||||
MockMultipartFile file;
|
MockMultipartFile file= new MockMultipartFile("file", new byte[0]);
|
||||||
if (lineReportMap.containsKey(supervisionTempLineRunTestPO.getId())) {
|
if (lineReportMap.containsKey(supervisionTempLineRunTestPO.getId())) {
|
||||||
String url = lineReportMap.get(supervisionTempLineRunTestPO.getId());
|
String url = lineReportMap.get(supervisionTempLineRunTestPO.getId());
|
||||||
InputStream fileStream = fileStorageUtil.getFileStream(url.substring(url.indexOf("/")));
|
InputStream fileStream = null;
|
||||||
try {
|
try {
|
||||||
|
fileStream = fileStorageUtil.getFileStream(url.substring(url.indexOf("/")));
|
||||||
file = new MockMultipartFile("file", url.substring(url.lastIndexOf("/") + 1), MediaType.IMAGE_PNG_VALUE, fileStream);
|
file = new MockMultipartFile("file", url.substring(url.lastIndexOf("/") + 1), MediaType.IMAGE_PNG_VALUE, fileStream);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
@@ -288,8 +290,6 @@ public class SupervisionTempLineRunTestServiceImpl extends ServiceImpl<Supervisi
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
file = new MockMultipartFile("file", new byte[0]);
|
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
startTime = DateUtil.beginOfDay(DateUtil.parse(startTime)).toString();
|
startTime = DateUtil.beginOfDay(DateUtil.parse(startTime)).toString();
|
||||||
@@ -344,15 +344,17 @@ public class SupervisionTempLineRunTestServiceImpl extends ServiceImpl<Supervisi
|
|||||||
public BpmInstanceInfo getInstanceInfo(String businessId) {
|
public BpmInstanceInfo getInstanceInfo(String businessId) {
|
||||||
BpmInstanceInfo bpmInstanceInfo = new BpmInstanceInfo();
|
BpmInstanceInfo bpmInstanceInfo = new BpmInstanceInfo();
|
||||||
SupervisionTempLineRunTestVO supervisionTempLineRunTestVO = this.getRunTestById(businessId);
|
SupervisionTempLineRunTestVO supervisionTempLineRunTestVO = this.getRunTestById(businessId);
|
||||||
bpmInstanceInfo.setHistoryInstanceId(supervisionTempLineRunTestVO.getHistoryInstanceId());
|
if(ObjectUtil.isNotNull(supervisionTempLineRunTestVO)){
|
||||||
String sign = supervisionTempLineRunTestVO.getPowerSubstationName()
|
bpmInstanceInfo.setHistoryInstanceId(supervisionTempLineRunTestVO.getHistoryInstanceId());
|
||||||
.concat(StrPool.SLASH)
|
String sign = supervisionTempLineRunTestVO.getPowerSubstationName()
|
||||||
.concat(supervisionTempLineRunTestVO.getMonitoringTerminalName())
|
.concat(StrPool.SLASH)
|
||||||
.concat(StrPool.SLASH)
|
.concat(supervisionTempLineRunTestVO.getMonitoringTerminalName())
|
||||||
.concat(supervisionTempLineRunTestVO.getConnectedBus())
|
.concat(StrPool.SLASH)
|
||||||
.concat(StrPool.SLASH)
|
.concat(supervisionTempLineRunTestVO.getConnectedBus())
|
||||||
.concat(supervisionTempLineRunTestVO.getLineName());
|
.concat(StrPool.SLASH)
|
||||||
bpmInstanceInfo.setInstanceSign(sign);
|
.concat(supervisionTempLineRunTestVO.getLineName());
|
||||||
|
bpmInstanceInfo.setInstanceSign(sign);
|
||||||
|
}
|
||||||
return bpmInstanceInfo;
|
return bpmInstanceInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -753,11 +753,11 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
|||||||
userReportSensitivePO.setDeviceName(userExcel.getDeviceName());
|
userReportSensitivePO.setDeviceName(userExcel.getDeviceName());
|
||||||
userReportSensitivePO.setPowerSupplyCount(userExcel.getPowerSupplyCount());
|
userReportSensitivePO.setPowerSupplyCount(userExcel.getPowerSupplyCount());
|
||||||
//处理多指标数据
|
//处理多指标数据
|
||||||
String[] indexArr = userExcel.getEnergyQualityIndex().split(",");
|
// String[] indexArr = userExcel.getEnergyQualityIndex().split(",");
|
||||||
for (String s : indexArr) {
|
// for (String s : indexArr) {
|
||||||
indexList.add(PubUtil.getDicById(s, problemIndicators));
|
// indexList.add(PubUtil.getDicById(s, problemIndicators));
|
||||||
}
|
// }
|
||||||
userReportSensitivePO.setEnergyQualityIndex(indexList.stream().map(String::valueOf).collect(Collectors.joining(",")));
|
userReportSensitivePO.setEnergyQualityIndex(userExcel.getEnergyQualityIndex());
|
||||||
userReportSensitivePO.setEvaluationType(PubUtil.getDicById(userExcel.getEvaluationType(), evaluationType));
|
userReportSensitivePO.setEvaluationType(PubUtil.getDicById(userExcel.getEvaluationType(), evaluationType));
|
||||||
userReportSensitivePO.setAntiInterferenceTest(userExcel.getAntiInterferenceTest() + "");
|
userReportSensitivePO.setAntiInterferenceTest(userExcel.getAntiInterferenceTest() + "");
|
||||||
userReportSensitivePO.setEvaluationChekDept(userExcel.getEvaluationChekDept());
|
userReportSensitivePO.setEvaluationChekDept(userExcel.getEvaluationChekDept());
|
||||||
|
|||||||
Reference in New Issue
Block a user