增加swagger配置
This commit is contained in:
@@ -156,7 +156,6 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
||||
private Integer devCD;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 终端新增操作
|
||||
*
|
||||
@@ -898,6 +897,7 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void decoderM3d(Device deviceDetail) {
|
||||
if (StrUtil.isNotBlank(deviceDetail.getDevKey())) {
|
||||
deviceDetail.setDevKey(DeviceUtil.decoderString(devCD, deviceDetail.getDevKey()));
|
||||
@@ -1427,7 +1427,6 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
||||
.collect(Collectors.toList());
|
||||
|
||||
|
||||
|
||||
this.removeByIds(substationIds);
|
||||
substationMapper.deleteBatchIds(substationIds);
|
||||
|
||||
@@ -1828,11 +1827,17 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
||||
Voltage voltage = voltageMapper.selectById(line.getPid());
|
||||
//监测点限值
|
||||
DictData scaleResult = dicDataFeignClient.getDicDataById(voltage.getScale()).getData();
|
||||
System.out.println("======================" + scaleResult);
|
||||
System.out.println("======================" + scaleResult.getValue());
|
||||
if (Objects.isNull(scaleResult)) {
|
||||
throw new BusinessException(CommonResponseEnum.DIC_DATA);
|
||||
}
|
||||
|
||||
|
||||
if (StrUtil.isBlank(voltage.getScale())) {
|
||||
System.out.println(111);
|
||||
}
|
||||
|
||||
float voltageLevel = Float.parseFloat(scaleResult.getValue());
|
||||
Overlimit overlimit = COverlimitUtil.globalAssemble(voltageLevel, lineDetail.getDealCapacity(), lineDetail.getDevCapacity(), lineDetail.getShortCapacity(), 1, 0);
|
||||
overlimit.setId(lineDetail.getId());
|
||||
@@ -2430,16 +2435,16 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
||||
// }
|
||||
// }
|
||||
//更新终端信息
|
||||
List<Device> existIp = deviceMapper.getDeviceBySubId(pids.get(LineBaseEnum.SUB_LEVEL.getCode()), oracleTerminalExcel.getIp(), oracleTerminalExcel.getPort(), null);
|
||||
if (CollectionUtil.isNotEmpty(existIp)) {
|
||||
Device device = existIp.get(0);
|
||||
if (!device.getId().equalsIgnoreCase(temp.getId())) {
|
||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "IP地址:" + oracleTerminalExcel.getIp() + "已存在"));
|
||||
//删除刚刚新增装置信息
|
||||
this.baseMapper.deleteById(temp.getId());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
// List<Device> existIp = deviceMapper.getDeviceBySubId(pids.get(LineBaseEnum.SUB_LEVEL.getCode()), oracleTerminalExcel.getIp(), oracleTerminalExcel.getPort(), null);
|
||||
// if (CollectionUtil.isNotEmpty(existIp)) {
|
||||
// Device device = existIp.get(0);
|
||||
// if (!device.getId().equalsIgnoreCase(temp.getId())) {
|
||||
// oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "IP地址:" + oracleTerminalExcel.getIp() + "已存在"));
|
||||
// //删除刚刚新增装置信息
|
||||
// this.baseMapper.deleteById(temp.getId());
|
||||
// continue;
|
||||
// }
|
||||
// }
|
||||
//处理终端厂家
|
||||
DictData manufacturer = dicDataFeignClient.getDicDataByNameAndTypeName(DicDataTypeEnum.DEV_MANUFACTURER.getName(), oracleTerminalExcel.getManufacturer()).getData();
|
||||
if (Objects.isNull(manufacturer)) {
|
||||
@@ -2548,16 +2553,16 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
||||
BeanUtils.copyProperties(oracleTerminalExcel, lineDetail);
|
||||
lineDetail.setId(temp.getId());
|
||||
//判断监测点号是否已被占用
|
||||
List<LineDetail> lineDetails = lineDetailMapper.getLineDetail(pids.get(LineBaseEnum.DEVICE_LEVEL.getCode()), Stream.of(oracleTerminalExcel.getLineNum()).collect(Collectors.toList()));
|
||||
if (CollectionUtil.isNotEmpty(lineDetails)) {
|
||||
LineDetail lineDetail1 = lineDetails.get(0);
|
||||
if (lineDetail1.getId().equalsIgnoreCase(temp.getId())) {
|
||||
oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "监测点线路号:" + oracleTerminalExcel.getLineNum() + "已存在"));
|
||||
//删除刚刚新增装置信息
|
||||
this.baseMapper.deleteById(temp.getId());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
// List<LineDetail> lineDetails = lineDetailMapper.getLineDetail(pids.get(LineBaseEnum.DEVICE_LEVEL.getCode()), Stream.of(oracleTerminalExcel.getLineNum()).collect(Collectors.toList()));
|
||||
// if (CollectionUtil.isNotEmpty(lineDetails)) {
|
||||
// LineDetail lineDetail1 = lineDetails.get(0);
|
||||
// if (lineDetail1.getId().equalsIgnoreCase(temp.getId())) {
|
||||
// oracleTerminalExcelMsg.add(assembleMsg(oracleTerminalExcel, "监测点线路号:" + oracleTerminalExcel.getLineNum() + "已存在"));
|
||||
// //删除刚刚新增装置信息
|
||||
// this.baseMapper.deleteById(temp.getId());
|
||||
// continue;
|
||||
// }
|
||||
// }
|
||||
//获取该监测点的限值数据
|
||||
// List<OverLimitExcel> overLimitList = overLimitExcels.stream()
|
||||
// .filter(overLimitExcel -> overLimitExcel.getId().equals(oracleTerminalExcel.getId()))
|
||||
@@ -3949,7 +3954,8 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
||||
|
||||
if (!CollectionUtils.isEmpty(pqsTerminalPushLogDTOList1)) {
|
||||
String devNameString = pqsTerminalPushLogDTOList1.stream().map(PqsTerminalPushLogDTO::getDevName).distinct().collect(Collectors.joining(","));
|
||||
List<String> resultDevIds = pqsTerminalPushLogDTOList1.stream().map(PqsTerminalPushLogDTO::getDevId).distinct().collect(Collectors.toList()); PreCommandDTO preCommandDTO = new PreCommandDTO();
|
||||
List<String> resultDevIds = pqsTerminalPushLogDTOList1.stream().map(PqsTerminalPushLogDTO::getDevId).distinct().collect(Collectors.toList());
|
||||
PreCommandDTO preCommandDTO = new PreCommandDTO();
|
||||
String guid = IdUtil.simpleUUID();
|
||||
String command = "新增前置机:" + pqsTerminalPushLogDTO.getNodeName() + "下进程:" + processId + "下终端" + devNameString;
|
||||
preCommandDTO.setGuid(guid);
|
||||
@@ -3971,7 +3977,8 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
||||
|
||||
if (!CollectionUtils.isEmpty(pqsTerminalPushLogDTOList1)) {
|
||||
String devNameString = pqsTerminalPushLogDTOList1.stream().map(PqsTerminalPushLogDTO::getDevName).distinct().collect(Collectors.joining(","));
|
||||
List<String> resultDevIds = pqsTerminalPushLogDTOList1.stream().map(PqsTerminalPushLogDTO::getDevId).distinct().collect(Collectors.toList()); PreCommandDTO preCommandDTO = new PreCommandDTO();
|
||||
List<String> resultDevIds = pqsTerminalPushLogDTOList1.stream().map(PqsTerminalPushLogDTO::getDevId).distinct().collect(Collectors.toList());
|
||||
PreCommandDTO preCommandDTO = new PreCommandDTO();
|
||||
String guid = IdUtil.simpleUUID();
|
||||
String command = "修改前置机:" + pqsTerminalPushLogDTO.getNodeName() + "下进程:" + processId + "下终端" + devNameString;
|
||||
preCommandDTO.setGuid(guid);
|
||||
@@ -4018,122 +4025,6 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
||||
@Override
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public PushResultDTO getPushResult(String guid) {
|
||||
PushResultDTO pushResultDTO = new PushResultDTO();
|
||||
String stringByKey = redisUtil.getStringByKey(RedisKeyPrefix.TOPIC_REPLY.concat(guid));
|
||||
@@ -4220,8 +4111,6 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 终端日志记录(只记录新增删除)
|
||||
*/
|
||||
@@ -4298,6 +4187,7 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
||||
|
||||
/**
|
||||
* 终端日志记录(记录修改)
|
||||
*
|
||||
* @param op
|
||||
* @param updateDeviceParam
|
||||
* @param devicePO
|
||||
@@ -4361,6 +4251,7 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean compareAndAppend(StringBuilder sb, String oldValue, String newValue, String fieldName) {
|
||||
if (oldValue != null && !oldValue.equals(newValue)) {
|
||||
sb.append(String.format("%s由 %s 改为> %s;", fieldName, oldValue, newValue));
|
||||
|
||||
Reference in New Issue
Block a user