1.概览-区域暂降评估-区域暂降评估->添加等级范围值

2.区域-终端状态统计->增加国网统计
3.台账管理-台账模板->导入信息增加(导入台账的模板:)加终端字段:监测装置安装位置、监测厂家设备编号、SIM卡号;监测点字段:行业类型、监测点性质,电网侧变电站、是否并网点、监测点运行状态。
4.运行管理-监测点台账信息->增加变电站名称+母线+监测点名称
This commit is contained in:
wr
2024-04-02 14:31:00 +08:00
parent fefd704e6e
commit 542cdbc9b3
20 changed files with 346 additions and 55 deletions

View File

@@ -1314,7 +1314,7 @@ public class DeviceController {
line.setSubvIndex(subvIndex);
line.setName(lineName);
temp = manaDevice.saveLineInfo(line, dept, lineNum, null, null, null, 0, null, null);
temp = manaDevice.saveLineInfo(line, dept, lineNum, null, null, null, 0, null, null, null, null, null, null);
if (temp.getMessage().equalsIgnoreCase("添加成功")) {
result.setCode(200);
result.setBody(temp.getIndex());
@@ -2007,6 +2007,9 @@ public class DeviceController {
dev.setPortId(Long.valueOf(list.getPortid()));
dev.setSeries(XssFilterUtil.dealString(list.getSeries()));
dev.setKey(XssFilterUtil.dealString(list.getKey()));
dev.setSim(list.getSim());
dev.setDevLocation(list.getDevLocation());
dev.setDevNo(list.getDevNo());
AddResult device = manaDevice.saveDevInfo(dev);
if (device.getMessage().equals("添加失败b")) {
errmess += "" + linenum + "行终端网络端口已被使用!";
@@ -2042,6 +2045,48 @@ public class DeviceController {
line.setXycMp(list.getXyrl());
int lineNum = list.getLineNum();
int statFlag = 1;
//监测点运行状态
String status = XssFilterUtil.dealString(list.getStatus());
switch (status) {
case "投运":
line.setStatus(0);
break;
case "热备用":
line.setStatus(1);
break;
default:
line.setStatus(2);
break;
}
//行业类型
List<DicData> hy = dicDataMapper.selectdicName(XssFilterUtil.dealString(list.getBusinessType()));
if (sca == null) {
errmess += "" + linenum + "行行业有误!";
break;
}
//监测点性质
String powerName = XssFilterUtil.dealString(list.getPowerId());
Integer powerId;
switch (powerName) {
case "电网侧":
powerId = 0;
break;
case "非电网侧":
powerId = 1;
break;
case "电网侧(新能源)":
powerId = 2;
break;
case "非电网侧(新能源)":
powerId = 3;
break;
case "上送国网":
powerId = 4;
break;
default://PCC
powerId = 5;
break;
}
if (StrUtil.isNotBlank(list.getStatFlag())) {
if (list.getStatFlag().equals("不参与统计")) {
statFlag = 0;
@@ -2049,9 +2094,19 @@ public class DeviceController {
statFlag = 1;
}
}
Integer isGridPoint = null;
if (StrUtil.isNotBlank(list.getIsGridPoint())) {
if (list.getStatFlag().equals("")) {
isGridPoint = 0;
} else {
isGridPoint = 1;
}
}
List<DicData> loadt = dicDataMapper.selectdicName(XssFilterUtil.dealString(list.getLoadType()));
AddResult lin = manaDevice.saveLineInfo(line, depts.getDeptsIndex(),
lineNum, XssFilterUtil.dealString(list.getMonitorid()), XssFilterUtil.dealString(list.getPttype()), loadt.get(0).getDicIndex(), list.getInterval(), list.getObjName(), statFlag);
lineNum, XssFilterUtil.dealString(list.getMonitorid()), XssFilterUtil.dealString(list.getPttype()), loadt.get(0).getDicIndex(), list.getInterval(), list.getObjName(), statFlag,
hy.get(0).getDicIndex(),powerId,list.getPowerSubstationName(), isGridPoint
);
// 根据文件名和监测点id查询offl_log是否已有数据存在
int count;

View File

@@ -39,6 +39,7 @@ public interface ManaDeviceMapper {
List<String> getScale();
List<String> getLoadType();
List<String> getDic(@Param("dicName") String dicName);
TranslateState getBaseInfo(@Param("guid") String guid);

View File

@@ -71,7 +71,12 @@ public interface ManaDeviceService {
public String delSubv(Long subvIndex);
public AddResult saveLineInfo(Line line, String dept, int lineNum, String monitorID,String pttype,String loadType,int interval,String objName,Integer statFlag);
public AddResult saveLineInfo(Line line, String dept, int lineNum, String monitorID,String pttype,String loadType,int interval,String objName,Integer statFlag,
String businessType,
Integer powerId,
String powerSubstationName,
Integer isGridPoint
);
public String delLine(Long lineIndex,String ip);

View File

@@ -539,6 +539,9 @@ public class ManaDeviceServiceImpl implements ManaDeviceService {
DeviceDetailInfo detail = new DeviceDetailInfo();
detail.setDevIndex(devIndex);
detail.setDevNo(dev.getDevNo());
detail.setDevLocation(dev.getDevLocation());
detail.setSim(dev.getSim());
if (dev.getManufacturer() != null) {
detail.setManufacturer(dev.getManufacturer());
@@ -1264,7 +1267,13 @@ public class ManaDeviceServiceImpl implements ManaDeviceService {
// 新增监测点
public AddResult saveLineInfo(Line tmp, String dept, int lineNum,
String monitorID, String pttype, String loadType, int interval, String objName, Integer statFlag) {
String monitorID, String pttype, String loadType, int interval, String objName, Integer statFlag,
String businessType,
Integer powerId,
String powerSubstationName,
Integer isGridPoint
) {
AddResult result = new AddResult();
Long devIndex = tmp.getDevIndex();
Long index = devIndex * 10 + lineNum;
@@ -1362,11 +1371,17 @@ public class ManaDeviceServiceImpl implements ManaDeviceService {
} else {
detailTmp.setLoadType(loadType);
}
List<DicData> businessType = this.getdicdata("行业类型");
detailTmp.setBusinessType(businessType.get(0).getDicIndex());
detailTmp.setPowerId(0);
detailTmp.setRemark("");
if(StrUtil.isNotBlank(businessType)){
detailTmp.setBusinessType(businessType);
detailTmp.setPowerId(powerId);
}else {
List<DicData> businessTypes = this.getdicdata("行业类型");
detailTmp.setBusinessType(businessTypes.get(0).getDicIndex());
detailTmp.setPowerId(0);
detailTmp.setRemark("");
}
detailTmp.setPowerSubstationName(powerSubstationName);
detailTmp.setIsGridPoint(isGridPoint);
if (StringUtils.isEmpty(objName)) {
SubStation subStation = subStationMapper.selectByPrimaryKey(tmp.getSubIndex());
@@ -2071,6 +2086,18 @@ public class ManaDeviceServiceImpl implements ManaDeviceService {
c23.applyFont(0, 1, red);
cell.setCellValue(c23);
cell = row.createCell(cellId++);
XSSFRichTextString d3 = new XSSFRichTextString("SIM卡号");
cell.setCellValue(d3);
cell = row.createCell(cellId++);
XSSFRichTextString d1 = new XSSFRichTextString("监测装置安装位置");
cell.setCellValue(d1);
cell = row.createCell(cellId++);
XSSFRichTextString d2 = new XSSFRichTextString("监测厂家设备编号");
cell.setCellValue(d2);
cell = row.createCell(cellId++);
cell.setCellValue("识别码");
@@ -2142,6 +2169,29 @@ public class ManaDeviceServiceImpl implements ManaDeviceService {
c28.applyFont(0, 1, red);
cell.setCellValue(c28);
cell = row.createCell(cellId++);
XSSFRichTextString d4 = new XSSFRichTextString("行业类型");
cell.setCellValue(d4);
cell = row.createCell(cellId++);
XSSFRichTextString d5 = new XSSFRichTextString("监测点性质");
cell.setCellValue(d5);
cell = row.createCell(cellId++);
XSSFRichTextString d6 = new XSSFRichTextString("电网侧变电站");
cell.setCellValue(d6);
cell = row.createCell(cellId++);
XSSFRichTextString d7 = new XSSFRichTextString("是否并网点");
cell.setCellValue(d7);
cell = row.createCell(cellId++);
XSSFRichTextString d8 = new XSSFRichTextString("监测点运行状态");
cell.setCellValue(d8);
cell = row.createCell(cellId++);
cell.setCellValue("国网ID");
@@ -2187,10 +2237,10 @@ public class ManaDeviceServiceImpl implements ManaDeviceService {
sheet.addValidationData(setDataValidation(sheet, list, 2, 1002, 11, 11));
String[] list6 = {"星型接线", "三角型接线", "V型接线"};
sheet.addValidationData(setDataValidation(sheet, list6, 2, 1002, 27, 27));
sheet.addValidationData(setDataValidation(sheet, list6, 2, 1002, 30, 30));
String[] list7 = {"1", "3", "5", "10"};
sheet.addValidationData(setDataValidation(sheet, list7, 2, 1002, 28, 28));
sheet.addValidationData(setDataValidation(sheet, list7, 2, 1002, 31, 31));
List<String> l3 = manaDeviceMapper.getTypes();
String[] list3 = new String[l3.size()];
@@ -2214,18 +2264,31 @@ public class ManaDeviceServiceImpl implements ManaDeviceService {
l4.toArray(list4);
sheet.addValidationData(setDataValidation(sheet, list4, 2, 1002, 13, 13));
sheet.addValidationData(setDataValidation(sheet, list5, 2, 1002, 19, 19));
sheet.addValidationData(setDataValidation(sheet, list5, 2, 1002, 22, 22));
List<String> l8 = manaDeviceMapper.getLoadType();
;
String[] list8 = new String[l8.size()];
l8.toArray(list8);
sheet.addValidationData(setDataValidation(sheet, list8, 2, 1002, 29, 29));
sheet.addValidationData(setDataValidation(sheet, list8, 2, 1002, 32, 32));
String[] list32 = {"参与统计", "不参与统计"};
sheet.addValidationData(setDataValidation(sheet, list32, 2, 1002, 32, 32));
sheet.addValidationData(setDataValidation(sheet, list32, 2, 1002, 40, 40));
for (int x = 0; x < 21; x++) {
//行业类型
List<String> hyes = manaDeviceMapper.getDic("行业类型");
String[] hy = new String[hyes.size()];
hyes.toArray(hy);
sheet.addValidationData(setDataValidation(sheet, hy, 2, 1002, 33, 33));
//监测点性质
String[] xzs = {"电网侧", "非电网侧", "电网侧(新能源)", "非电网侧(新能源)", "上送国网", "PCC"};
sheet.addValidationData(setDataValidation(sheet, xzs, 2, 1002, 34, 34));
String[] isLine = {"", ""};
sheet.addValidationData(setDataValidation(sheet, isLine, 2, 1002, 36, 36));
String[] isRunLine = {"投运", "热备用","停运"};
sheet.addValidationData(setDataValidation(sheet, isRunLine, 2, 1002, 37, 37));
for (int x = 0; x < 41; x++) {
sheet.setColumnWidth(x, 20 * 256);
}
workbook.write(outputStream);

View File

@@ -92,6 +92,9 @@
select a.dic_name from pqs_dicdata a,pqs_dictype b where b.dictype_name = '干扰源类型' and a.dic_type = b.dictype_index
</select>
<select id="getDic" resultType="java.lang.String">
select a.dic_name from pqs_dicdata a,pqs_dictype b where b.dictype_name = #{dicName} and a.dic_type = b.dictype_index
</select>
<select id="getBaseInfo" resultType="TranslateState">
select start_time startTime,
end_time endTime,