|
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import org.apache.poi.ss.usermodel.*;
|
|
|
import org.apache.poi.ss.util.CellRangeAddress;
|
|
|
+import org.apache.poi.xssf.streaming.SXSSFWorkbook;
|
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
|
import org.apache.shiro.SecurityUtils;
|
|
|
import org.jeecg.common.system.vo.LoginUser;
|
|
@@ -40,6 +41,7 @@ import java.io.*;
|
|
|
import java.net.URLEncoder;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
+import java.util.concurrent.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
@@ -61,8 +63,6 @@ public class InterlockDetailHistoryServiceImpl extends ServiceImpl<InterlockDeta
|
|
|
@SuppressWarnings("all")
|
|
|
private InterlockBaseMapper interlockBaseMapper;
|
|
|
|
|
|
- @Value("${jeecg.path.upload}")
|
|
|
- private String upLoadPath;
|
|
|
|
|
|
/**
|
|
|
* 联锁历史数据详细信息-分页查询
|
|
@@ -85,88 +85,28 @@ public class InterlockDetailHistoryServiceImpl extends ServiceImpl<InterlockDeta
|
|
|
return interlockDetailHistoryMapper.getForExport(dto);
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 导出excel
|
|
|
- */
|
|
|
- public ModelAndView exportXls1(InterlockHistoryQueryDTO dto, Class<InterlockSummaryHistoryVO> clazz, String title) {
|
|
|
- LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
-
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
- String formattedBeginTime = "";
|
|
|
- String formattedEndTime = "";
|
|
|
- if(dto.getBeginTime()!=null) formattedBeginTime = sdf.format(dto.getBeginTime());
|
|
|
- if(dto.getEndTime()!=null) formattedEndTime = sdf.format(dto.getEndTime());
|
|
|
-
|
|
|
-
|
|
|
- List<Map<String, Object>> list = new ArrayList<>();
|
|
|
- List<InterlockHistoryDistinctZZXTVO> zzxtvoList = summaryHistoryMapper.getDistinctZZXTSummaryList(dto);
|
|
|
-
|
|
|
- if(zzxtvoList!=null){
|
|
|
- for (InterlockHistoryDistinctZZXTVO zzxtvo : zzxtvoList){
|
|
|
- dto.setInterlockSystemId(zzxtvo.getInterlockSystemId());//系统id
|
|
|
- List<InterlockSummaryHistoryVO> exportList = interlockDetailHistoryMapper.getForExport(dto);
|
|
|
-
|
|
|
- String sheetName = zzxtvo.getInterlockApparatusName()+ "-"+zzxtvo.getInterlockSystemName();
|
|
|
-
|
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
- map.put(NormalExcelConstants.CLASS, InterlockSummaryHistoryVO.class);
|
|
|
-
|
|
|
- // 计算投用率
|
|
|
- InterlockHistoryQueryDTO dto1 = InterlockSummaryHistoryConvert.INSTANCE.toInterlockStatus(dto,"1"); // 1投用
|
|
|
- int ty = summaryHistoryMapper.cocuntTYOrHL(dto1);
|
|
|
- dto1.setInterlockStatus("0"); // 0未投用
|
|
|
- int wty = summaryHistoryMapper.cocuntTYOrHL(dto1);
|
|
|
- int total = ty + wty; // 总数量
|
|
|
- double tyl = (double) ty / total * 100;
|
|
|
-
|
|
|
- // 总回路数
|
|
|
- InterlockHistoryQueryDTO dto2 = InterlockSummaryHistoryConvert.INSTANCE.toLoopHealthLevel(dto,"A");
|
|
|
- int loopHealthLevelA = summaryHistoryMapper.cocuntTYOrHL(dto2);
|
|
|
- dto2.setLoopHealthLevel("B");
|
|
|
- int loopHealthLevelB = summaryHistoryMapper.cocuntTYOrHL(dto2);
|
|
|
- dto2.setLoopHealthLevel("C");
|
|
|
- int loopHealthLevelC = summaryHistoryMapper.cocuntTYOrHL(dto2);
|
|
|
- int loopHealthLevel = loopHealthLevelA*3 + loopHealthLevelB*2 + loopHealthLevelC*1;
|
|
|
-
|
|
|
- String secondTitle = " 投用率:" + tyl + "%" + " 总回路数:" + loopHealthLevel + " 导出人:" + sysUser.getRealname();
|
|
|
- if(dto.getBeginTime() !=null && dto.getEndTime() == null){
|
|
|
- secondTitle = "起始时间:" + formattedBeginTime + secondTitle;
|
|
|
- }else if(dto.getBeginTime() ==null && dto.getEndTime() != null){
|
|
|
- secondTitle = "结束时间:" + formattedEndTime + secondTitle;
|
|
|
- }else if(dto.getBeginTime() !=null && dto.getEndTime() != null){
|
|
|
- secondTitle = "起始时间:" + formattedBeginTime + " 结束时间:" + formattedEndTime + secondTitle;
|
|
|
- }
|
|
|
- ExportParams exportParams=new ExportParams(title + "报表", secondTitle, sheetName);
|
|
|
- exportParams.setImageBasePath(upLoadPath);
|
|
|
- map.put(NormalExcelConstants.PARAMS, exportParams);
|
|
|
- map.put(NormalExcelConstants.DATA_LIST, exportList);
|
|
|
- list.add(map);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
|
|
- mv.addObject(NormalExcelConstants.FILE_NAME, title);//此处设置的filename无效 ,前端会重更新设置一下
|
|
|
- mv.addObject(NormalExcelConstants.MAP_LIST, list);
|
|
|
- return mv;
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
/**
|
|
|
- * 导定时任务导出excel
|
|
|
+ * 导出excel
|
|
|
+ * 定时任务导出
|
|
|
+ * 手动导出
|
|
|
*/
|
|
|
- public Workbook exportXlsToFile(InterlockHistoryQueryDTO dto, List<InterlockHistoryDistinctZZXTVO> zzxtvoList, Class<InterlockSummaryHistoryVO> clazz, String title) throws IOException {
|
|
|
+ public Workbook exportXlsToFile(InterlockHistoryQueryDTO dto, List<InterlockHistoryDistinctZZXTVO> zzxtvoList, Class<InterlockSummaryHistoryVO> clazz) throws IOException {
|
|
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
String formattedBeginTime = dto.getBeginTime() != null ? sdf.format(dto.getBeginTime()) : "";
|
|
|
String formattedEndTime = dto.getEndTime() != null ? sdf.format(dto.getEndTime()) : "";
|
|
|
|
|
|
- Workbook workbook = new XSSFWorkbook();
|
|
|
+ Workbook workbook = new SXSSFWorkbook();
|
|
|
|
|
|
// 创建字体对象
|
|
|
Font font = workbook.createFont();
|
|
|
font.setBold(true); // 设置字体加粗
|
|
|
|
|
|
+ // TODO 创建字体对象
|
|
|
+ Font font1 = workbook.createFont();
|
|
|
+ font1.setFontName("SimSun"); // 设置字体为宋体-SimSun
|
|
|
+
|
|
|
// 创建第一行的样式
|
|
|
CellStyle firstStyle = workbook.createCellStyle();
|
|
|
firstStyle.setAlignment(HorizontalAlignment.CENTER);
|
|
@@ -221,15 +161,14 @@ public class InterlockDetailHistoryServiceImpl extends ServiceImpl<InterlockDeta
|
|
|
centerAlignStyle3.setBottomBorderColor(IndexedColors.BLACK.getIndex());
|
|
|
centerAlignStyle3.setLeftBorderColor(IndexedColors.BLACK.getIndex());
|
|
|
centerAlignStyle3.setRightBorderColor(IndexedColors.BLACK.getIndex());
|
|
|
+ centerAlignStyle3.setFont(font1);
|
|
|
|
|
|
if (zzxtvoList != null) {
|
|
|
for (InterlockHistoryDistinctZZXTVO zzxtvo : zzxtvoList) {
|
|
|
dto.setInterlockSystemId(zzxtvo.getInterlockSystemId()); // 系统id
|
|
|
- List<InterlockSummaryHistoryVO> exportList = interlockDetailHistoryMapper.getForExport(dto);
|
|
|
+ List<InterlockSummaryHistoryVO> exportList = this.getForExport(dto);
|
|
|
|
|
|
- if(exportList != null) {
|
|
|
- exportList.stream().map(this::zh).collect(Collectors.toList());
|
|
|
- }
|
|
|
+ System.out.println("系统开始-----------------------------------------------------------------------------------"+zzxtvo.getInterlockSystemName());
|
|
|
|
|
|
String sheetName = zzxtvo.getInterlockApparatusName() + "-" + zzxtvo.getInterlockSystemName();
|
|
|
Sheet sheet = workbook.createSheet(sheetName);
|
|
@@ -247,15 +186,7 @@ public class InterlockDetailHistoryServiceImpl extends ServiceImpl<InterlockDeta
|
|
|
int wty = summaryHistoryMapper.cocuntTYOrHL(dto1);
|
|
|
int total = ty + wty; // 总数量
|
|
|
double tyl = (double) ty / total * 100;
|
|
|
-
|
|
|
- // 总回路数
|
|
|
- InterlockHistoryQueryDTO dto2 = InterlockSummaryHistoryConvert.INSTANCE.toLoopHealthLevel(dto, "A");
|
|
|
- int loopHealthLevelA = summaryHistoryMapper.cocuntTYOrHL(dto2);
|
|
|
- dto2.setLoopHealthLevel("B");
|
|
|
- int loopHealthLevelB = summaryHistoryMapper.cocuntTYOrHL(dto2);
|
|
|
- dto2.setLoopHealthLevel("C");
|
|
|
- int loopHealthLevelC = summaryHistoryMapper.cocuntTYOrHL(dto2);
|
|
|
- int loopHealthLevel = loopHealthLevelA * 3 + loopHealthLevelB * 2 + loopHealthLevelC * 1;
|
|
|
+ String tylPercentage = String.format("%.2f%%", tyl); // 将百分比转换为百分数形式,保留两位小数
|
|
|
|
|
|
|
|
|
//第一行:联锁历史数据报表
|
|
@@ -304,9 +235,9 @@ public class InterlockDetailHistoryServiceImpl extends ServiceImpl<InterlockDeta
|
|
|
sheet.addMergedRegion(new CellRangeAddress(rowNum-1, rowNum-1, 1, 2));
|
|
|
sheet.addMergedRegion(new CellRangeAddress(rowNum-1, rowNum-1, 4, 5));
|
|
|
|
|
|
- //第六行:连锁回路数量、未投用联锁数量、投用率统计
|
|
|
+ //第六行:连锁数量、未投用联锁数量、投用率统计
|
|
|
Row sixTitleRow = sheet.createRow(rowNum++);
|
|
|
- String[] s6 = {"联锁回路数量:", String.valueOf(loopHealthLevel),"未投用联锁数量:", String.valueOf(wty),"投用率统计:", String.valueOf(tyl)};
|
|
|
+ String[] s6 = {"联锁数量:", String.valueOf(total),"未投用联锁数量:", String.valueOf(wty),"投用率统计:", String.valueOf(tylPercentage)};
|
|
|
CellStyle[] style6 = {centerAlignStyle,centerAlignStyle3,centerAlignStyle,centerAlignStyle3,centerAlignStyle,centerAlignStyle3};
|
|
|
createCellOfRowWithValueStyleName(sixTitleRow,s6,style6);
|
|
|
|
|
@@ -321,10 +252,15 @@ public class InterlockDetailHistoryServiceImpl extends ServiceImpl<InterlockDeta
|
|
|
//第9行:列名
|
|
|
Row columnRow= sheet.createRow(rowNum++);
|
|
|
String[] s9 = {"采集时间", "联锁名称", "联锁条件点位", "仪表状态", "控制系统状态", "旁路状态", "联锁状态", "回路健康级别"};
|
|
|
+ // 各列索引
|
|
|
+ int tagTimeCol= 0;
|
|
|
+ int interlockNameCol = 1;
|
|
|
+ int interlockStatusCol = 6;
|
|
|
+ int loopHealthLevelCol = 7;
|
|
|
createCellOfRowWithValueStyle(columnRow,s9,centerAlignStyle);
|
|
|
|
|
|
|
|
|
- // 创建单元格、设置格式、填充数据
|
|
|
+ // 合并单元格的起始行索引
|
|
|
int startTagTimeRow = 0;
|
|
|
int startInterlockNameRow = 0;
|
|
|
int startInterlockStatusRow = 0;
|
|
@@ -333,15 +269,15 @@ public class InterlockDetailHistoryServiceImpl extends ServiceImpl<InterlockDeta
|
|
|
for (int idx = 0; idx < exportList.size(); idx++) {
|
|
|
InterlockSummaryHistoryVO record = exportList.get(idx);
|
|
|
|
|
|
- int i = 0;
|
|
|
+ //创建单元格、设置格式、填充数据
|
|
|
Row row = sheet.createRow(rowNum);
|
|
|
- String[] s = {record.getTagTime(), record.getInterlockname(), record.getInterlockConditionTag(), record.getInstrumentStatus(), record.getControlSystemStatus(), record.getBypass(), record.getInterlockStatus(), record.getLoopHealthLevel()};
|
|
|
+ String[] s = {record.getTagTime(), record.getInterlockname(), record.getInterlockConditionTag(), record.getInstrumentStatusName(), record.getControlSystemStatusName(), record.getBypassName(), record.getInterlockStatusName(), record.getLoopHealthLevel()};
|
|
|
createCellOfRowWithValueStyle(row,s,centerAlignStyle3);
|
|
|
|
|
|
// 合并 "采集时间" 列单元格
|
|
|
if (idx == 0 || !record.getTagTime().equals(exportList.get(idx - 1).getTagTime())) {
|
|
|
if (idx > 0 && (rowNum - startTagTimeRow) > 1) {
|
|
|
- sheet.addMergedRegion(new CellRangeAddress(startTagTimeRow, rowNum - 1, 0, 0));
|
|
|
+ sheet.addMergedRegion(new CellRangeAddress(startTagTimeRow, rowNum - 1, tagTimeCol, tagTimeCol));
|
|
|
}
|
|
|
startTagTimeRow = rowNum;
|
|
|
}
|
|
@@ -349,7 +285,7 @@ public class InterlockDetailHistoryServiceImpl extends ServiceImpl<InterlockDeta
|
|
|
// 合并 "联锁名称" 列单元格
|
|
|
if (idx == 0 || !record.getInterlockname().equals(exportList.get(idx - 1).getInterlockname())) {
|
|
|
if (idx > 0 && (rowNum - startInterlockNameRow) > 1) {
|
|
|
- sheet.addMergedRegion(new CellRangeAddress(startInterlockNameRow, rowNum - 1, 1, 1));
|
|
|
+ sheet.addMergedRegion(new CellRangeAddress(startInterlockNameRow, rowNum - 1, interlockNameCol, interlockNameCol));
|
|
|
}
|
|
|
startInterlockNameRow = rowNum;
|
|
|
}
|
|
@@ -357,7 +293,7 @@ public class InterlockDetailHistoryServiceImpl extends ServiceImpl<InterlockDeta
|
|
|
// 合并 "联锁状态" 列单元格,基于 "采集时间"
|
|
|
if (idx == 0 || !record.getTagTime().equals(exportList.get(idx - 1).getTagTime())) {
|
|
|
if (idx > 0 && (rowNum - startInterlockStatusRow) > 1) {
|
|
|
- sheet.addMergedRegion(new CellRangeAddress(startInterlockStatusRow, rowNum - 1, 6, 6));
|
|
|
+ sheet.addMergedRegion(new CellRangeAddress(startInterlockStatusRow, rowNum - 1, interlockStatusCol, interlockStatusCol));
|
|
|
}
|
|
|
startInterlockStatusRow = rowNum;
|
|
|
}
|
|
@@ -365,7 +301,7 @@ public class InterlockDetailHistoryServiceImpl extends ServiceImpl<InterlockDeta
|
|
|
// 合并 "回路健康状态" 列单元格,基于 "采集时间"
|
|
|
if (idx == 0 || !record.getTagTime().equals(exportList.get(idx - 1).getTagTime())) {
|
|
|
if (idx > 0 && (rowNum - startLoopHealthLevelRow) > 1) {
|
|
|
- sheet.addMergedRegion(new CellRangeAddress(startLoopHealthLevelRow, rowNum - 1, 7, 7));
|
|
|
+ sheet.addMergedRegion(new CellRangeAddress(startLoopHealthLevelRow, rowNum - 1, loopHealthLevelCol, loopHealthLevelCol));
|
|
|
}
|
|
|
startLoopHealthLevelRow = rowNum;
|
|
|
}
|
|
@@ -375,21 +311,21 @@ public class InterlockDetailHistoryServiceImpl extends ServiceImpl<InterlockDeta
|
|
|
|
|
|
// 最后一组合并区域的处理
|
|
|
if ((rowNum - startTagTimeRow) > 1) {
|
|
|
- sheet.addMergedRegion(new CellRangeAddress(startTagTimeRow, rowNum - 1, 0, 0));
|
|
|
+ sheet.addMergedRegion(new CellRangeAddress(startTagTimeRow, rowNum - 1, tagTimeCol, tagTimeCol));
|
|
|
}
|
|
|
if ((rowNum - startInterlockNameRow) > 1) {
|
|
|
- sheet.addMergedRegion(new CellRangeAddress(startInterlockNameRow, rowNum - 1, 1, 1));
|
|
|
+ sheet.addMergedRegion(new CellRangeAddress(startInterlockNameRow, rowNum - 1, interlockNameCol, interlockNameCol));
|
|
|
}
|
|
|
if ((rowNum - startInterlockStatusRow) > 1) {
|
|
|
- sheet.addMergedRegion(new CellRangeAddress(startInterlockStatusRow, rowNum - 1, 4, 4));
|
|
|
+ sheet.addMergedRegion(new CellRangeAddress(startInterlockStatusRow, rowNum - 1, interlockStatusCol, interlockStatusCol));
|
|
|
}
|
|
|
if ((rowNum - startLoopHealthLevelRow) > 1) {
|
|
|
- sheet.addMergedRegion(new CellRangeAddress(startLoopHealthLevelRow, rowNum - 1, 7, 7));
|
|
|
+ sheet.addMergedRegion(new CellRangeAddress(startLoopHealthLevelRow, rowNum - 1, loopHealthLevelCol, loopHealthLevelCol));
|
|
|
}
|
|
|
+ System.out.println("系统结束-----------------------------------------------------------------------------------"+zzxtvo.getInterlockSystemName());
|
|
|
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
return workbook;
|
|
|
}
|
|
|
|
|
@@ -409,6 +345,7 @@ public class InterlockDetailHistoryServiceImpl extends ServiceImpl<InterlockDeta
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
// 创建单元格
|
|
|
private static void createCellWithValueStyle(Row row, int col, Object value, CellStyle style) {
|
|
|
|
|
@@ -428,30 +365,6 @@ public class InterlockDetailHistoryServiceImpl extends ServiceImpl<InterlockDeta
|
|
|
cell.setCellStyle(style); //单元格样式
|
|
|
}
|
|
|
|
|
|
- private InterlockSummaryHistoryVO zh(InterlockSummaryHistoryVO vo){
|
|
|
- //仪表状态 0正常1故障
|
|
|
- if(vo.getInstrumentStatus()!=null){
|
|
|
- if(vo.getInstrumentStatus().equals("0")) vo.setInstrumentStatus("正常");
|
|
|
- else if(vo.getInstrumentStatus().equals("1")) vo.setInstrumentStatus("故障");
|
|
|
- }
|
|
|
- //控制系统状态 0正常1非正常
|
|
|
- if(vo.getControlSystemStatus()!=null){
|
|
|
- if(vo.getControlSystemStatus().equals("0")) vo.setControlSystemStatus("正常");
|
|
|
- else if(vo.getControlSystemStatus().equals("1")) vo.setControlSystemStatus("非正常");
|
|
|
- }
|
|
|
- //联锁状态 0未投用1投用
|
|
|
- if(vo.getInterlockStatus()!=null){
|
|
|
- if(vo.getInterlockStatus().equals("0")) vo.setInterlockStatus("未投用");
|
|
|
- else if(vo.getInterlockStatus().equals("1")) vo.setInterlockStatus("投用");
|
|
|
- }
|
|
|
- //旁路状态 1是0否
|
|
|
- if(vo.getBypass()!=null){
|
|
|
- if(vo.getBypass().equals("0")) vo.setBypass("是");
|
|
|
- else if(vo.getBypass().equals("1")) vo.setBypass("否");
|
|
|
- }
|
|
|
- return vo;
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* author: dzc
|
|
|
* version: 1.0
|
|
@@ -464,58 +377,5 @@ public class InterlockDetailHistoryServiceImpl extends ServiceImpl<InterlockDeta
|
|
|
}
|
|
|
|
|
|
|
|
|
- private IPage<InterlockSummaryHistoryVO> zhSummaryHistoryVOIPage(IPage<InterlockSummaryHistoryVO> voiPage){
|
|
|
- List<InterlockSummaryHistoryVO> list = voiPage.getRecords().stream().map(i->{
|
|
|
- InterlockBase base = interlockBaseMapper.selectById(i.getInterlockSystemId());
|
|
|
- if(base != null){
|
|
|
- //控制系统状态转换
|
|
|
- if(base.getControlSystemStatusNormal().equals(i.getControlSystemStatus())) i.setControlSystemStatusName(base.getControlSystemStatusNormalName());
|
|
|
- else i.setControlSystemStatusName(base.getControlSystemStatusAbnormalName());
|
|
|
- //联锁状态转换
|
|
|
- if(base.getInterlockStatusTy().equals(i.getInterlockStatus())) i.setInterlockStatusName(base.getInterlockStatusTyName());
|
|
|
- else i.setInterlockStatusName(base.getInterlockStatusWtyName());
|
|
|
- //旁路状态转换
|
|
|
- if(base.getBypassYes().equals(i.getBypass())) i.setBypassName(base.getBypassYesName());
|
|
|
- else i.setBypassName(base.getBypassNoName());
|
|
|
- //仪表状态转换
|
|
|
- if(base.getInstrumentStatusNormal().equals(i.getInstrumentStatus())) i.setInstrumentStatusName(base.getInstrumentStatusNormalName());
|
|
|
- else i.setInstrumentStatusName(base.getInstrumentStatusAbnormalName());
|
|
|
- }
|
|
|
- return i;
|
|
|
- }).collect(Collectors.toList());
|
|
|
- voiPage.setRecords(list);
|
|
|
- return voiPage;
|
|
|
- }
|
|
|
-
|
|
|
- private IPage<InterlockDetailHistoryQueryVO> zhDetailHistoryQueryVOIPage(IPage<InterlockDetailHistoryQueryVO> voiPage, String interlockSystemId){
|
|
|
- InterlockBase base = interlockBaseMapper.selectById(interlockSystemId);
|
|
|
- if(base != null){
|
|
|
- List<InterlockDetailHistoryQueryVO> list = voiPage.getRecords().stream().map(i->{
|
|
|
- //旁路状态转换
|
|
|
- if(i.getBypass()!=null && base.getBypassYes()!=null){
|
|
|
- if(i.getBypass().equals(base.getBypassYes())) i.setBypassName(base.getBypassYesName());
|
|
|
- else i.setBypassName(base.getBypassNoName());
|
|
|
- }
|
|
|
- //输入卡件状态转换
|
|
|
- if(i.getInputStatus()!=null && base.getControlSystemStatusNormal()!=null){
|
|
|
- if(i.getInputStatus().equals(base.getControlSystemStatusNormal())) i.setInputStatusName(base.getControlSystemStatusNormalName());
|
|
|
- else i.setInputStatusName(base.getControlSystemStatusAbnormalName());
|
|
|
- }
|
|
|
- //输出卡件状态转换
|
|
|
- if(i.getOutputStatus()!=null && base.getControlSystemStatusNormal()!=null){
|
|
|
- if(i.getOutputStatus().equals(base.getControlSystemStatusNormal())) i.setOutputStatusName(base.getControlSystemStatusNormalName());
|
|
|
- else i.setOutputStatusName(base.getControlSystemStatusAbnormalName());
|
|
|
- }
|
|
|
- //MP状态转换
|
|
|
- if(i.getMpStatus()!=null && base.getControlSystemStatusNormal()!=null){
|
|
|
- if(i.getMpStatus().equals(base.getControlSystemStatusNormal())) i.setMpStatusName(base.getControlSystemStatusNormalName());
|
|
|
- else i.setMpStatusName(base.getControlSystemStatusAbnormalName());
|
|
|
- }
|
|
|
- return i;
|
|
|
- }).collect(Collectors.toList());
|
|
|
- voiPage.setRecords(list);
|
|
|
- }
|
|
|
- return voiPage;
|
|
|
- }
|
|
|
|
|
|
}
|