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

@@ -27,6 +27,12 @@ public class DevList implements Serializable {
private String devtype; private String devtype;
private String nodename; private String nodename;
private int portid; private int portid;
private String sim;
private String devLocation;
private String devNo;
private String series; private String series;
private String key; private String key;
private String monitorid; private String monitorid;
@@ -38,6 +44,23 @@ public class DevList implements Serializable {
private String objName; private String objName;
private String statFlag; private String statFlag;
//行业类型
private String businessType;
//监测点性质
private String powerId;
//电网侧变电站
private String powerSubstationName;
//是否并网点
private String isGridPoint;
//监测运行状态
private String status;
public String getFileName() { public String getFileName() {
return fileName; return fileName;
} }
@@ -238,6 +261,30 @@ public class DevList implements Serializable {
this.portid = portid; this.portid = portid;
} }
public String getSim() {
return sim;
}
public void setSim(String sim) {
this.sim = sim;
}
public String getDevLocation() {
return devLocation;
}
public void setDevLocation(String devLocation) {
this.devLocation = devLocation;
}
public String getDevNo() {
return devNo;
}
public void setDevNo(String devNo) {
this.devNo = devNo;
}
public String getSeries() { public String getSeries() {
return series; return series;
} }
@@ -307,4 +354,44 @@ public String getProjectName() {
public void setStatFlag(String statFlag) { public void setStatFlag(String statFlag) {
this.statFlag = statFlag; this.statFlag = statFlag;
} }
public String getBusinessType() {
return businessType;
}
public void setBusinessType(String businessType) {
this.businessType = businessType;
}
public String getPowerId() {
return powerId;
}
public void setPowerId(String powerId) {
this.powerId = powerId;
}
public String getPowerSubstationName() {
return powerSubstationName;
}
public void setPowerSubstationName(String powerSubstationName) {
this.powerSubstationName = powerSubstationName;
}
public String getIsGridPoint() {
return isGridPoint;
}
public void setIsGridPoint(String isGridPoint) {
this.isGridPoint = isGridPoint;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
} }

View File

@@ -11,6 +11,8 @@ public class LineLedger {
private String lineIndex; private String lineIndex;
private String lineName; private String lineName;
private String electricityQualityName;
private Long devIndex; private Long devIndex;
private String objName; private String objName;
@@ -645,4 +647,12 @@ public class LineLedger {
public void setNodeName(String nodeName) { public void setNodeName(String nodeName) {
this.nodeName = nodeName; this.nodeName = nodeName;
} }
public String getElectricityQualityName() {
return electricityQualityName;
}
public void setElectricityQualityName(String electricityQualityName) {
this.electricityQualityName = electricityQualityName;
}
} }

View File

@@ -152,7 +152,7 @@ public interface DeviceService {
List<Tree> getDeviceMainTree(); List<Tree> getDeviceMainTree();
List<DeviceDetail> getDeviceDetails(String status, String devflag, String gdName, String List<DeviceDetail> getDeviceDetails(String status, String devflag, String gdName, String
manufacturer, String area); manufacturer, String area, String type);
List<DeviceDetail> getGdname(); List<DeviceDetail> getGdname();

View File

@@ -3273,10 +3273,13 @@ public class DeviceServiceImpl implements DeviceService {
@Override @Override
public List<DeviceDetail> getDeviceDetails(String status, String devflag, String gdName, String public List<DeviceDetail> getDeviceDetails(String status, String devflag, String gdName, String
manufacturer, String area) { manufacturer, String area, String type) {
List<DeviceDetail> result = new ArrayList<>(); List<DeviceDetail> result = new ArrayList<>();
List<Integer> listline = userUtil.listLineDepts(area); List<Integer> listline = userUtil.listLineDepts(area);
if("1".equals(type)){
listline =getGwLine(listline);
}
if (listline.size() == 0) { if (listline.size() == 0) {
return null; return null;
} else { } else {

View File

@@ -171,44 +171,50 @@ public class ImportExl {
} else if (c == 13) { } else if (c == 13) {
user.setNodename(cell.getStringCellValue());//所属前置机 user.setNodename(cell.getStringCellValue());//所属前置机
} else if (c == 14) { } else if (c == 14) {
user.setPortid((int) cell.getNumericCellValue());//端口 user.setPortid((int) cell.getNumericCellValue());//SIM卡
} else if (c == 15) { } else if (c == 15) {
user.setSim( cell.getStringCellValue());//监测装置安装位置
} else if (c == 16) {
user.setDevLocation( cell.getStringCellValue());//监测厂家设备编号
}else if (c == 17) {
user.setDevNo( cell.getStringCellValue());//监测厂家设备编号
} else if (c == 18) {
if (cell.getCellType() == HSSFCell.CELL_TYPE_NUMERIC) { if (cell.getCellType() == HSSFCell.CELL_TYPE_NUMERIC) {
user.setSeries(String.valueOf((long)cell.getNumericCellValue()));//识别码 user.setSeries(String.valueOf((long)cell.getNumericCellValue()));//识别码
} else { } else {
user.setSeries(cell.getStringCellValue());//识别码 user.setSeries(cell.getStringCellValue());//识别码
} }
} else if (c == 16) { } else if (c == 19) {
if (cell.getCellType() == HSSFCell.CELL_TYPE_NUMERIC) { if (cell.getCellType() == HSSFCell.CELL_TYPE_NUMERIC) {
user.setKey(String.valueOf((long)cell.getNumericCellValue()));//秘钥 user.setKey(String.valueOf((long)cell.getNumericCellValue()));//秘钥
} else { } else {
user.setKey(cell.getStringCellValue());//秘钥 user.setKey(cell.getStringCellValue());//秘钥
} }
} else if (c == 17) { } else if (c == 20) {
if (cell.getCellType() == HSSFCell.CELL_TYPE_NUMERIC) { if (cell.getCellType() == HSSFCell.CELL_TYPE_NUMERIC) {
user.setSubvName(String.valueOf((long) cell.getNumericCellValue()));//母线名称 user.setSubvName(String.valueOf((long) cell.getNumericCellValue()));//母线名称
} else { } else {
user.setSubvName(cell.getStringCellValue()); user.setSubvName(cell.getStringCellValue());
} }
} else if (c == 18) { } else if (c == 21) {
user.setSubvnum((int) cell.getNumericCellValue());//母线号 user.setSubvnum((int) cell.getNumericCellValue());//母线号
} else if (c == 19) { } else if (c == 22) {
user.setScale(cell.getStringCellValue()); user.setScale(cell.getStringCellValue());
} else if (c == 20) { } else if (c == 23) {
if (cell.getCellType() == HSSFCell.CELL_TYPE_NUMERIC) { if (cell.getCellType() == HSSFCell.CELL_TYPE_NUMERIC) {
user.setLineName(String.valueOf((long) cell.getNumericCellValue()));//监测点名称 user.setLineName(String.valueOf((long) cell.getNumericCellValue()));//监测点名称
} else { } else {
user.setLineName(cell.getStringCellValue()); user.setLineName(cell.getStringCellValue());
} }
} else if (c == 21) {
user.setLineNum((int) cell.getNumericCellValue());//监测点号
} else if (c == 22) {
user.setPt(cell.getStringCellValue());//pt
} else if (c == 23) {
user.setCt(cell.getStringCellValue());//ct
} else if (c == 24) { } else if (c == 24) {
user.setLineNum((int) cell.getNumericCellValue());//监测点号
} else if (c == 25) {
user.setPt(cell.getStringCellValue());//pt
} else if (c == 26) {
user.setCt(cell.getStringCellValue());//ct
} else if (c == 27) {
if (cell.getCellType() == HSSFCell.CELL_TYPE_NUMERIC) { if (cell.getCellType() == HSSFCell.CELL_TYPE_NUMERIC) {
Float dlrl = Float.valueOf((float) cell.getNumericCellValue()); Float dlrl = Float.valueOf((float) cell.getNumericCellValue());
user.setDlrl(dlrl);//短路容量 user.setDlrl(dlrl);//短路容量
@@ -216,7 +222,7 @@ public class ImportExl {
} else { } else {
//判断失败 //判断失败
} }
} else if (c == 25) { } else if (c == 28) {
if (cell.getCellType() == HSSFCell.CELL_TYPE_NUMERIC) { if (cell.getCellType() == HSSFCell.CELL_TYPE_NUMERIC) {
Float sbrl = Float.valueOf((float) cell.getNumericCellValue()); Float sbrl = Float.valueOf((float) cell.getNumericCellValue());
user.setSbrl(sbrl);//设备容量 user.setSbrl(sbrl);//设备容量
@@ -224,7 +230,7 @@ public class ImportExl {
} else { } else {
//判断失败 //判断失败
} }
} else if (c == 26) { } else if (c == 29) {
if (cell.getCellType() == HSSFCell.CELL_TYPE_NUMERIC) { if (cell.getCellType() == HSSFCell.CELL_TYPE_NUMERIC) {
Float xyrl = Float.valueOf((float) cell.getNumericCellValue()); Float xyrl = Float.valueOf((float) cell.getNumericCellValue());
user.setXyrl(xyrl);//协议容量 user.setXyrl(xyrl);//协议容量
@@ -232,19 +238,29 @@ public class ImportExl {
} else { } else {
//判断失败 //判断失败
} }
} else if (c == 27) {
user.setPttype(cell.getStringCellValue());//接线方式
} else if (c == 28) {
user.setInterval((int) cell.getNumericCellValue());//间隔时间
} else if (c == 29) {
user.setLoadType(cell.getStringCellValue());//干扰源类型终
} else if (c == 30) { } else if (c == 30) {
user.setMonitorid(cell.getStringCellValue());//国网ID user.setPttype(cell.getStringCellValue());//接线方式
} else if (c == 31) { } else if (c == 31) {
user.setInterval((int) cell.getNumericCellValue());//间隔时间
} else if (c == 32) {
user.setLoadType(cell.getStringCellValue());//干扰源类型
} else if (c == 33) {
user.setBusinessType(cell.getStringCellValue());//行业类型
} else if (c == 34) {
user.setPowerId(cell.getStringCellValue());//监测点性质
} else if (c == 35) {
user.setPowerSubstationName(cell.getStringCellValue());//电网侧变电站
} else if (c == 36) {
user.setIsGridPoint(cell.getStringCellValue());//是否并网点
} else if (c == 37) {
user.setStatus(cell.getStringCellValue());//监测点运行状态
} else if (c == 38) {
user.setMonitorid(cell.getStringCellValue());//国网ID
} else if (c == 39) {
user.setObjName(cell.getStringCellValue()); //监测点对象名称 user.setObjName(cell.getStringCellValue()); //监测点对象名称
}else if (c == 32) { }else if (c == 40) {
user.setStatFlag(cell.getStringCellValue()); //统计类型 user.setStatFlag(cell.getStringCellValue()); //统计类型
}else if (c == 33) { //add by sw }else if (c == 41) { //add by sw
user.setFileName(cell.getStringCellValue()); //文件名 user.setFileName(cell.getStringCellValue()); //文件名
} }
} }

View File

@@ -348,10 +348,11 @@ public class BusinessController {
// 跳转终端运行管理页面 // 跳转终端运行管理页面
@GetMapping(value = "runtime") @GetMapping(value = "runtime")
public ModelAndView runtime(String area) { public ModelAndView runtime(String area,String type) {
ModelAndView modelAndView = new ModelAndView(); ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("business/manage/runtime"); modelAndView.setViewName("business/manage/runtime");
modelAndView.addObject("area", area); modelAndView.addObject("area", area);
modelAndView.addObject("type", type);
return modelAndView; return modelAndView;
} }

View File

@@ -1995,7 +1995,7 @@ public class DeviceController {
@RequestMapping(value = "getDeviceDetail", method = RequestMethod.POST) @RequestMapping(value = "getDeviceDetail", method = RequestMethod.POST)
@ResponseBody @ResponseBody
public String getDeviceDetail(HttpServletRequest request, HttpSession session, String status, String devflag, String gdName, String public String getDeviceDetail(HttpServletRequest request, HttpSession session, String status, String devflag, String gdName, String
manufacturer, String lineIndex, String area) manufacturer, String lineIndex, String area,String type)
throws throws
JsonProcessingException, AccountException { JsonProcessingException, AccountException {
if (session.getAttribute("line_index") != null || session.getAttribute("line_index") != "") { if (session.getAttribute("line_index") != null || session.getAttribute("line_index") != "") {
@@ -2023,7 +2023,7 @@ public class DeviceController {
} }
manufacturer = "%" + manufacturer + "%"; manufacturer = "%" + manufacturer + "%";
if (lineIndex == null || lineIndex.length() == 0) { if (lineIndex == null || lineIndex.length() == 0) {
result = deviceService.getDeviceDetails(status, devflag, gdName, manufacturer, area); result = deviceService.getDeviceDetails(status, devflag, gdName, manufacturer, area,type);
} else { } else {
result = deviceService.queryDeviceDetailById(lineIndex); result = deviceService.queryDeviceDetailById(lineIndex);
} }

View File

@@ -107,7 +107,8 @@
j.dic_name province, j.dic_name province,
a.line_index lineIndex, a.line_index lineIndex,
mod(a.line_index,10) as lineNum, mod(a.line_index,10) as lineNum,
a.name lineName, a.name as lineName,
nvl(b.POWER_SUBSTATION_NAME,e.name)||'_'||sv.NAME||'_'||a.name as electricityQualityName,
a.dev_index devIndex, a.dev_index devIndex,
a.status lineStatus, a.status lineStatus,
b.pttype ptType, b.pttype ptType,
@@ -167,6 +168,7 @@
LEFT JOIN overlimit c ON a.line_index = myindex LEFT JOIN overlimit c ON a.line_index = myindex
LEFT JOIN pq_device d ON a.dev_index = d.dev_index LEFT JOIN pq_device d ON a.dev_index = d.dev_index
LEFT JOIN pq_substation e ON a.sub_index = e.sub_index LEFT JOIN pq_substation e ON a.sub_index = e.sub_index
LEFT JOIN pq_subvoltage sv ON a.SUBV_INDEX = sv.SUBV_INDEX
LEFT JOIN pq_gdinformation f ON a.gd_index = f.gd_index LEFT JOIN pq_gdinformation f ON a.gd_index = f.gd_index
LEFT JOIN pqs_dicdata g ON a.scale = g.dic_index LEFT JOIN pqs_dicdata g ON a.scale = g.dic_index
LEFT JOIN pqs_dicdata h ON b.loadtype = h.dic_index LEFT JOIN pqs_dicdata h ON b.loadtype = h.dic_index

View File

@@ -623,7 +623,8 @@
district.on('click', function (params) { district.on('click', function (params) {
if (getRole("/pqs9000/business/runtime") === 1) { if (getRole("/pqs9000/business/runtime") === 1) {
var city=params.data.areaIndex; var city=params.data.areaIndex;
window.top.addTab('runtime?area='+city, '终端运行情况') var type= tiggleValue=="冀北省"?"0":"1";
window.top.addTab('runtime?area='+city+'&&type='+ type, '终端运行情况')
} }
}); });
} }

View File

@@ -90,6 +90,7 @@
<th>市公司</th> <th>市公司</th>
<th>监测点电压等级</th> <th>监测点电压等级</th>
<th>监测点名称</th> <th>监测点名称</th>
<th>电能质量名称</th>
<th>所属电站</th> <th>所属电站</th>
<th>干扰源类型</th> <th>干扰源类型</th>
<th>监测对象名称</th> <th>监测对象名称</th>

View File

@@ -16,6 +16,7 @@
<link rel="stylesheet" href="${ctx}/css/plugin/datatables/datatables.bootstrap.css"> <link rel="stylesheet" href="${ctx}/css/plugin/datatables/datatables.bootstrap.css">
<link rel="stylesheet" href="${ctx}/css/plugin/datatimepicker/bootstrap-datetimepicker.css"> <link rel="stylesheet" href="${ctx}/css/plugin/datatimepicker/bootstrap-datetimepicker.css">
<link rel="stylesheet" href="${ctx}/css/plugin/basicButton.css"> <link rel="stylesheet" href="${ctx}/css/plugin/basicButton.css">
<link rel="stylesheet" href="${ctx}/css/plugin/bootstrapSwitch/bootstrap-switch.min.css">
<link rel="stylesheet" href="${ctx}/css/basic.css"> <link rel="stylesheet" href="${ctx}/css/basic.css">
<style> <style>
.tr { .tr {
@@ -57,6 +58,10 @@
style="position: absolute;width: 140px;height: 147px;border: 2px solid #C9CBCE;overflow: auto;top: 32px;background: #fff;z-index: 100;border-radius: 2px"> style="position: absolute;width: 140px;height: 147px;border: 2px solid #C9CBCE;overflow: auto;top: 32px;background: #fff;z-index: 100;border-radius: 2px">
</div> </div>
</div> </div>
<div class="form-group has-feedback mr10">
<label>统计类型:</label>
<input type="checkbox" id="checkbox"/>
</div>
<label class="form-group">终端状态:</label> <select <label class="form-group">终端状态:</label> <select
class="form-control" id="devflag"> class="form-control" id="devflag">
<option value="">全部</option> <option value="">全部</option>
@@ -131,9 +136,12 @@
<input type="hidden" id="username" value="${username}"> <input type="hidden" id="username" value="${username}">
<input type="hidden" id="token" value="${token}"> <input type="hidden" id="token" value="${token}">
<input id="_area" value="${area}" hidden> <input id="_area" value="${area}" hidden>
<input id="gwType" value="${type}" hidden>
<script src="${ctx}/js/plugin/jquery/jquery.min.js"></script> <script src="${ctx}/js/plugin/jquery/jquery.min.js"></script>
<script src="${ctx}/js/plugin/bootstrap/bootstrap.min.js"></script>
<script src="${ctx}/js/plugin/jquery/jquery.dataTables.js"></script> <script src="${ctx}/js/plugin/jquery/jquery.dataTables.js"></script>
<script src="${ctx}/js/plugin/bootstrap/bootstrap.min.js"></script>
<script src="${ctx}/js/plugin/datatables/datatables.jquery.js"></script>
<script src="${ctx}/js/plugin/bootstrapSwitch/bootstrap-switch.min.js"></script>
<script src="${ctx}/js/plugin/datatables/datatables.bootstrap.js"></script> <script src="${ctx}/js/plugin/datatables/datatables.bootstrap.js"></script>
<script src="${ctx}/js/plugin/layui/layui.all.js"></script> <script src="${ctx}/js/plugin/layui/layui.all.js"></script>
<script src="${ctx}/js/plugin/bootstrap/bootstrap-datetimepicker.js"></script> <script src="${ctx}/js/plugin/bootstrap/bootstrap-datetimepicker.js"></script>
@@ -157,6 +165,7 @@
toHelper("#jcdyxzt"); toHelper("#jcdyxzt");
}); });
var $area = $("#area"); var $area = $("#area");
var gwType = $("#gwType");
</script> </script>
</body> </body>
</html> </html>

View File

@@ -139,6 +139,7 @@ function initTable(data) {
{width: "3%", data: "scale"}, {width: "3%", data: "scale"},
{width: "4%", data: "lineName"}, {width: "4%", data: "lineName"},
{width: "4%", data: "electricityQualityName"},
{width: "4%", data: "subName"}, {width: "4%", data: "subName"},
{width: "5%", data: "loadType"}, {width: "5%", data: "loadType"},
{ {

View File

@@ -1,3 +1,35 @@
var type;
$(function () {
//初始化页面内容
if (gwType.val() == '1') {
type = '1';
$("#checkbox").prop('checked', false);
} else {
type = '0';
$("#checkbox").prop('checked', true);
}
//获取当前日期
$("#checkbox").bootstrapSwitch({
onText: "冀北省", // 设置ON文本
offText: "国网", // 设置OFF文本
onColor: "primary",// 设置ON文本颜色 (info/success/warning/danger/primary)
offColor: "primary", // 设置OFF文本颜色 (info/success/warning/danger/primary)
size: "small", // 设置控件大小,从小到大 (mini/small/normal/large)
handleWidth: "40",//设置控件宽度
// 当开关状态改变时触发
onSwitchChange: function (event, state) {
if (state == true) {
type = '0';
} else {
type = '1';
}
load();
}
});
});
/** /**
* 终端运行管理 * 终端运行管理
*/ */
@@ -85,7 +117,8 @@ function load() {
status: status, status: status,
devflag: devflag, devflag: devflag,
gdName: gdIndex, gdName: gdIndex,
manufacturer: manufacturer manufacturer: manufacturer,
type: type
}, },
beforeSend: function () { beforeSend: function () {
i = ityzl_SHOW_LOAD_LAYER(); i = ityzl_SHOW_LOAD_LAYER();

View File

@@ -198,7 +198,7 @@ public class DeviceController {
@RequestMapping(value = "getDeviceDetail", method = RequestMethod.POST) @RequestMapping(value = "getDeviceDetail", method = RequestMethod.POST)
@ResponseBody @ResponseBody
public String getDeviceDetail(HttpServletRequest request, HttpSession session, String status, String devflag, String gdName, String public String getDeviceDetail(HttpServletRequest request, HttpSession session, String status, String devflag, String gdName, String
manufacturer, String lineIndex, String area) manufacturer, String lineIndex, String area, String type)
throws throws
JsonProcessingException, AccountException { JsonProcessingException, AccountException {
if (session.getAttribute("line_index") != null || session.getAttribute("line_index") != "") { if (session.getAttribute("line_index") != null || session.getAttribute("line_index") != "") {
@@ -226,7 +226,7 @@ public class DeviceController {
} }
manufacturer = "%" + manufacturer + "%"; manufacturer = "%" + manufacturer + "%";
if (lineIndex == null || lineIndex.length() == 0) { if (lineIndex == null || lineIndex.length() == 0) {
result = deviceService.getDeviceDetails(status, devflag, gdName, manufacturer, area); result = deviceService.getDeviceDetails(status, devflag, gdName, manufacturer, area,type);
} else { } else {
result = deviceService.queryDeviceDetailById(lineIndex); result = deviceService.queryDeviceDetailById(lineIndex);
} }

View File

@@ -457,19 +457,19 @@
type: 'piecewise', type: 'piecewise',
pieces: [{ pieces: [{
gt: 1.2, gt: 1.2,
label: '4级' label: '4级(1.2,+∞]'
}, { }, {
gt: 0.8, gt: 0.8,
lte: 1.2, lte: 1.2,
label: '3级' label: '3级(0.8,1.2]'
}, { }, {
gt: 0.4, gt: 0.4,
lte: 0.8, lte: 0.8,
label: '2级' label: '2级(0.4,0.8]'
}, { }, {
gt: -1, gt: -1,
lte: 0.4, lte: 0.4,
label: '1级' label: '1级[0,0.4]'
}], }],
color: [red, yellow, green], color: [red, yellow, green],
inverse: true inverse: true

View File

@@ -1314,7 +1314,7 @@ public class DeviceController {
line.setSubvIndex(subvIndex); line.setSubvIndex(subvIndex);
line.setName(lineName); 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("添加成功")) { if (temp.getMessage().equalsIgnoreCase("添加成功")) {
result.setCode(200); result.setCode(200);
result.setBody(temp.getIndex()); result.setBody(temp.getIndex());
@@ -2007,6 +2007,9 @@ public class DeviceController {
dev.setPortId(Long.valueOf(list.getPortid())); dev.setPortId(Long.valueOf(list.getPortid()));
dev.setSeries(XssFilterUtil.dealString(list.getSeries())); dev.setSeries(XssFilterUtil.dealString(list.getSeries()));
dev.setKey(XssFilterUtil.dealString(list.getKey())); dev.setKey(XssFilterUtil.dealString(list.getKey()));
dev.setSim(list.getSim());
dev.setDevLocation(list.getDevLocation());
dev.setDevNo(list.getDevNo());
AddResult device = manaDevice.saveDevInfo(dev); AddResult device = manaDevice.saveDevInfo(dev);
if (device.getMessage().equals("添加失败b")) { if (device.getMessage().equals("添加失败b")) {
errmess += "" + linenum + "行终端网络端口已被使用!"; errmess += "" + linenum + "行终端网络端口已被使用!";
@@ -2042,6 +2045,48 @@ public class DeviceController {
line.setXycMp(list.getXyrl()); line.setXycMp(list.getXyrl());
int lineNum = list.getLineNum(); int lineNum = list.getLineNum();
int statFlag = 1; 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 (StrUtil.isNotBlank(list.getStatFlag())) {
if (list.getStatFlag().equals("不参与统计")) { if (list.getStatFlag().equals("不参与统计")) {
statFlag = 0; statFlag = 0;
@@ -2049,9 +2094,19 @@ public class DeviceController {
statFlag = 1; 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())); List<DicData> loadt = dicDataMapper.selectdicName(XssFilterUtil.dealString(list.getLoadType()));
AddResult lin = manaDevice.saveLineInfo(line, depts.getDeptsIndex(), 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是否已有数据存在 // 根据文件名和监测点id查询offl_log是否已有数据存在
int count; int count;

View File

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

View File

@@ -71,7 +71,12 @@ public interface ManaDeviceService {
public String delSubv(Long subvIndex); 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); public String delLine(Long lineIndex,String ip);

View File

@@ -539,6 +539,9 @@ public class ManaDeviceServiceImpl implements ManaDeviceService {
DeviceDetailInfo detail = new DeviceDetailInfo(); DeviceDetailInfo detail = new DeviceDetailInfo();
detail.setDevIndex(devIndex); detail.setDevIndex(devIndex);
detail.setDevNo(dev.getDevNo());
detail.setDevLocation(dev.getDevLocation());
detail.setSim(dev.getSim());
if (dev.getManufacturer() != null) { if (dev.getManufacturer() != null) {
detail.setManufacturer(dev.getManufacturer()); detail.setManufacturer(dev.getManufacturer());
@@ -1264,7 +1267,13 @@ public class ManaDeviceServiceImpl implements ManaDeviceService {
// 新增监测点 // 新增监测点
public AddResult saveLineInfo(Line tmp, String dept, int lineNum, 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(); AddResult result = new AddResult();
Long devIndex = tmp.getDevIndex(); Long devIndex = tmp.getDevIndex();
Long index = devIndex * 10 + lineNum; Long index = devIndex * 10 + lineNum;
@@ -1362,11 +1371,17 @@ public class ManaDeviceServiceImpl implements ManaDeviceService {
} else { } else {
detailTmp.setLoadType(loadType); detailTmp.setLoadType(loadType);
} }
if(StrUtil.isNotBlank(businessType)){
List<DicData> businessType = this.getdicdata("行业类型"); detailTmp.setBusinessType(businessType);
detailTmp.setBusinessType(businessType.get(0).getDicIndex()); detailTmp.setPowerId(powerId);
detailTmp.setPowerId(0); }else {
detailTmp.setRemark(""); 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)) { if (StringUtils.isEmpty(objName)) {
SubStation subStation = subStationMapper.selectByPrimaryKey(tmp.getSubIndex()); SubStation subStation = subStationMapper.selectByPrimaryKey(tmp.getSubIndex());
@@ -2071,6 +2086,18 @@ public class ManaDeviceServiceImpl implements ManaDeviceService {
c23.applyFont(0, 1, red); c23.applyFont(0, 1, red);
cell.setCellValue(c23); 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 = row.createCell(cellId++);
cell.setCellValue("识别码"); cell.setCellValue("识别码");
@@ -2142,6 +2169,29 @@ public class ManaDeviceServiceImpl implements ManaDeviceService {
c28.applyFont(0, 1, red); c28.applyFont(0, 1, red);
cell.setCellValue(c28); 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 = row.createCell(cellId++);
cell.setCellValue("国网ID"); cell.setCellValue("国网ID");
@@ -2187,10 +2237,10 @@ public class ManaDeviceServiceImpl implements ManaDeviceService {
sheet.addValidationData(setDataValidation(sheet, list, 2, 1002, 11, 11)); sheet.addValidationData(setDataValidation(sheet, list, 2, 1002, 11, 11));
String[] list6 = {"星型接线", "三角型接线", "V型接线"}; 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"}; 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(); List<String> l3 = manaDeviceMapper.getTypes();
String[] list3 = new String[l3.size()]; String[] list3 = new String[l3.size()];
@@ -2214,18 +2264,31 @@ public class ManaDeviceServiceImpl implements ManaDeviceService {
l4.toArray(list4); l4.toArray(list4);
sheet.addValidationData(setDataValidation(sheet, list4, 2, 1002, 13, 13)); 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(); List<String> l8 = manaDeviceMapper.getLoadType();
;
String[] list8 = new String[l8.size()]; String[] list8 = new String[l8.size()];
l8.toArray(list8); l8.toArray(list8);
sheet.addValidationData(setDataValidation(sheet, list8, 2, 1002, 29, 29)); sheet.addValidationData(setDataValidation(sheet, list8, 2, 1002, 32, 32));
String[] list32 = {"参与统计", "不参与统计"}; 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); sheet.setColumnWidth(x, 20 * 256);
} }
workbook.write(outputStream); 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 a.dic_name from pqs_dicdata a,pqs_dictype b where b.dictype_name = '干扰源类型' and a.dic_type = b.dictype_index
</select> </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 id="getBaseInfo" resultType="TranslateState">
select start_time startTime, select start_time startTime,
end_time endTime, end_time endTime,