diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 7a80a23..c828d6c 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,17 +2,9 @@ - - - - - - - - - - - + + + @@ -37,67 +29,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -115,7 +47,6 @@ @@ -259,20 +191,7 @@ - - - - - - - - - - + @@ -309,151 +228,22 @@ + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1028,7 +818,9 @@ - + + + 1510219102698 @@ -1242,11 +1034,15 @@ 1536224373164 1536224373165 - - @@ -1281,7 +1077,7 @@ - + @@ -1294,8 +1090,8 @@ - - + + @@ -1359,7 +1155,6 @@ - @@ -1384,7 +1179,8 @@ - @@ -1408,7 +1204,7 @@ @@ -1416,20 +1212,6 @@ - - - - - - - - - - - - - - @@ -1444,13 +1226,6 @@ - - - - - - - @@ -1490,13 +1265,6 @@ - - - - - - - @@ -1518,13 +1286,6 @@ - - - - - - - @@ -1539,13 +1300,6 @@ - - - - - - - @@ -1616,14 +1370,6 @@ - - - - - - - - @@ -1631,14 +1377,6 @@ - - - - - - - - @@ -1646,13 +1384,6 @@ - - - - - - - @@ -1664,9 +1395,6 @@ - - - @@ -1674,7 +1402,6 @@ - @@ -1682,7 +1409,6 @@ - @@ -1690,7 +1416,6 @@ - @@ -1698,9 +1423,6 @@ - - - @@ -1708,10 +1430,6 @@ - - - - @@ -1719,7 +1437,6 @@ - @@ -1727,7 +1444,6 @@ - @@ -1735,23 +1451,6 @@ - - - - - - - - - - - - - - - - - @@ -1763,26 +1462,10 @@ - - - - - - - - - - - - - - - - @@ -1790,30 +1473,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -1821,23 +1480,126 @@ - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 7a80a23..c828d6c 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,17 +2,9 @@ - - - - - - - - - - - + + + @@ -37,67 +29,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -115,7 +47,6 @@ @@ -259,20 +191,7 @@ - - - - - - - - - - + @@ -309,151 +228,22 @@ + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1028,7 +818,9 @@ - + + + 1510219102698 @@ -1242,11 +1034,15 @@ 1536224373164 1536224373165 - - @@ -1281,7 +1077,7 @@ - + @@ -1294,8 +1090,8 @@ - - + + @@ -1359,7 +1155,6 @@ - @@ -1384,7 +1179,8 @@ - @@ -1408,7 +1204,7 @@ @@ -1416,20 +1212,6 @@ - - - - - - - - - - - - - - @@ -1444,13 +1226,6 @@ - - - - - - - @@ -1490,13 +1265,6 @@ - - - - - - - @@ -1518,13 +1286,6 @@ - - - - - - - @@ -1539,13 +1300,6 @@ - - - - - - - @@ -1616,14 +1370,6 @@ - - - - - - - - @@ -1631,14 +1377,6 @@ - - - - - - - - @@ -1646,13 +1384,6 @@ - - - - - - - @@ -1664,9 +1395,6 @@ - - - @@ -1674,7 +1402,6 @@ - @@ -1682,7 +1409,6 @@ - @@ -1690,7 +1416,6 @@ - @@ -1698,9 +1423,6 @@ - - - @@ -1708,10 +1430,6 @@ - - - - @@ -1719,7 +1437,6 @@ - @@ -1727,7 +1444,6 @@ - @@ -1735,23 +1451,6 @@ - - - - - - - - - - - - - - - - - @@ -1763,26 +1462,10 @@ - - - - - - - - - - - - - - - - @@ -1790,30 +1473,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -1821,23 +1480,126 @@ - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java index 5e4f829..07cc505 100644 --- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java +++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java @@ -114,7 +114,10 @@ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); this.setId(String.valueOf(pgAlarm.getId())); - this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType()); + if(pgAlarm.getAlarmTypeId()==null) + this.setAlarmType(""); + else + this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType()); this.setAlarmValue(pgAlarm.getAlarmValue()); if (pgAlarm.getAlarmDate() != null) this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate())); diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 7a80a23..c828d6c 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,17 +2,9 @@ - - - - - - - - - - - + + + @@ -37,67 +29,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -115,7 +47,6 @@ @@ -259,20 +191,7 @@ - - - - - - - - - - + @@ -309,151 +228,22 @@ + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1028,7 +818,9 @@ - + + + 1510219102698 @@ -1242,11 +1034,15 @@ 1536224373164 1536224373165 - - @@ -1281,7 +1077,7 @@ - + @@ -1294,8 +1090,8 @@ - - + + @@ -1359,7 +1155,6 @@ - @@ -1384,7 +1179,8 @@ - @@ -1408,7 +1204,7 @@ @@ -1416,20 +1212,6 @@ - - - - - - - - - - - - - - @@ -1444,13 +1226,6 @@ - - - - - - - @@ -1490,13 +1265,6 @@ - - - - - - - @@ -1518,13 +1286,6 @@ - - - - - - - @@ -1539,13 +1300,6 @@ - - - - - - - @@ -1616,14 +1370,6 @@ - - - - - - - - @@ -1631,14 +1377,6 @@ - - - - - - - - @@ -1646,13 +1384,6 @@ - - - - - - - @@ -1664,9 +1395,6 @@ - - - @@ -1674,7 +1402,6 @@ - @@ -1682,7 +1409,6 @@ - @@ -1690,7 +1416,6 @@ - @@ -1698,9 +1423,6 @@ - - - @@ -1708,10 +1430,6 @@ - - - - @@ -1719,7 +1437,6 @@ - @@ -1727,7 +1444,6 @@ - @@ -1735,23 +1451,6 @@ - - - - - - - - - - - - - - - - - @@ -1763,26 +1462,10 @@ - - - - - - - - - - - - - - - - @@ -1790,30 +1473,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -1821,23 +1480,126 @@ - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java index 5e4f829..07cc505 100644 --- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java +++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java @@ -114,7 +114,10 @@ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); this.setId(String.valueOf(pgAlarm.getId())); - this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType()); + if(pgAlarm.getAlarmTypeId()==null) + this.setAlarmType(""); + else + this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType()); this.setAlarmValue(pgAlarm.getAlarmValue()); if (pgAlarm.getAlarmDate() != null) this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate())); diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java index 0db81c4..b54d3b4 100644 --- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java +++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java @@ -3,7 +3,7 @@ import com.casic.PgInterface.core.hibernate.HibernateEntityDao; import com.casic.PgInterface.devTable.domain.PgDevice; import com.casic.PgInterface.devTable.dto.PgDeviceDto; -import com.casic.PgInterface.devTable.dto.PgDeviceTypeStatisticDto; +import com.casic.PgInterface.devTable.dto.PgPipeLineLengthStatic; import org.hibernate.Criteria; import org.hibernate.criterion.Order; import org.hibernate.criterion.Restrictions; @@ -77,12 +77,22 @@ } //根据设备类型统计设备资产 - public List getDeviceStatisticByDevType(){ - String hql="select device.DEVTYPE,count(*) from PG_DEVICE device group by device.DEVTYPE"; + public List getDeviceStatisticByDevType(){ + String sql="select device.DEVTYPE,count(*) from PG_DEVICE device group by device.DEVTYPE"; - List pgDeviceTypeStatisticDtoList=this.getSession().createSQLQuery(hql).list(); + List objectList=this.getSession().createSQLQuery(sql).list(); - return pgDeviceTypeStatisticDtoList; + List pgPipeLineLengthStaticList = new ArrayList(); + + for(Object[] objectArray : objectList) + { + PgPipeLineLengthStatic pgPipeLineLengthStatic=new PgPipeLineLengthStatic(); + pgPipeLineLengthStatic.setLineType(String.valueOf(objectArray[0])); + pgPipeLineLengthStatic.setLength(String.valueOf(objectArray[1])); + pgPipeLineLengthStaticList.add(pgPipeLineLengthStatic); + } + + return pgPipeLineLengthStaticList; } //根据分区获取设备列表 @@ -99,8 +109,7 @@ return pgDeviceDtoList; } - public List getDeviceByOldDAssetCodeCode(String assetCode) - { + public List getDeviceByOldDAssetCodeCode(String assetCode) { String[] stringList=assetCode.split("\\."); String hql="select * from PG_DEVICE device where device.assetCode like '%"+stringList[1]+"%' and device.assetCode like '%"+stringList[2]+"'"; diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 7a80a23..c828d6c 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,17 +2,9 @@ - - - - - - - - - - - + + + @@ -37,67 +29,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -115,7 +47,6 @@ @@ -259,20 +191,7 @@ - - - - - - - - - - + @@ -309,151 +228,22 @@ + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1028,7 +818,9 @@ - + + + 1510219102698 @@ -1242,11 +1034,15 @@ 1536224373164 1536224373165 - - @@ -1281,7 +1077,7 @@ - + @@ -1294,8 +1090,8 @@ - - + + @@ -1359,7 +1155,6 @@ - @@ -1384,7 +1179,8 @@ - @@ -1408,7 +1204,7 @@ @@ -1416,20 +1212,6 @@ - - - - - - - - - - - - - - @@ -1444,13 +1226,6 @@ - - - - - - - @@ -1490,13 +1265,6 @@ - - - - - - - @@ -1518,13 +1286,6 @@ - - - - - - - @@ -1539,13 +1300,6 @@ - - - - - - - @@ -1616,14 +1370,6 @@ - - - - - - - - @@ -1631,14 +1377,6 @@ - - - - - - - - @@ -1646,13 +1384,6 @@ - - - - - - - @@ -1664,9 +1395,6 @@ - - - @@ -1674,7 +1402,6 @@ - @@ -1682,7 +1409,6 @@ - @@ -1690,7 +1416,6 @@ - @@ -1698,9 +1423,6 @@ - - - @@ -1708,10 +1430,6 @@ - - - - @@ -1719,7 +1437,6 @@ - @@ -1727,7 +1444,6 @@ - @@ -1735,23 +1451,6 @@ - - - - - - - - - - - - - - - - - @@ -1763,26 +1462,10 @@ - - - - - - - - - - - - - - - - @@ -1790,30 +1473,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -1821,23 +1480,126 @@ - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java index 5e4f829..07cc505 100644 --- a/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java +++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgAlarmDto.java @@ -114,7 +114,10 @@ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); this.setId(String.valueOf(pgAlarm.getId())); - this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType()); + if(pgAlarm.getAlarmTypeId()==null) + this.setAlarmType(""); + else + this.setAlarmType(pgAlarm.getAlarmTypeId().getAlarmType()); this.setAlarmValue(pgAlarm.getAlarmValue()); if (pgAlarm.getAlarmDate() != null) this.setAlarmDate(sdf.format(pgAlarm.getAlarmDate())); diff --git a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java index 0db81c4..b54d3b4 100644 --- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java +++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java @@ -3,7 +3,7 @@ import com.casic.PgInterface.core.hibernate.HibernateEntityDao; import com.casic.PgInterface.devTable.domain.PgDevice; import com.casic.PgInterface.devTable.dto.PgDeviceDto; -import com.casic.PgInterface.devTable.dto.PgDeviceTypeStatisticDto; +import com.casic.PgInterface.devTable.dto.PgPipeLineLengthStatic; import org.hibernate.Criteria; import org.hibernate.criterion.Order; import org.hibernate.criterion.Restrictions; @@ -77,12 +77,22 @@ } //根据设备类型统计设备资产 - public List getDeviceStatisticByDevType(){ - String hql="select device.DEVTYPE,count(*) from PG_DEVICE device group by device.DEVTYPE"; + public List getDeviceStatisticByDevType(){ + String sql="select device.DEVTYPE,count(*) from PG_DEVICE device group by device.DEVTYPE"; - List pgDeviceTypeStatisticDtoList=this.getSession().createSQLQuery(hql).list(); + List objectList=this.getSession().createSQLQuery(sql).list(); - return pgDeviceTypeStatisticDtoList; + List pgPipeLineLengthStaticList = new ArrayList(); + + for(Object[] objectArray : objectList) + { + PgPipeLineLengthStatic pgPipeLineLengthStatic=new PgPipeLineLengthStatic(); + pgPipeLineLengthStatic.setLineType(String.valueOf(objectArray[0])); + pgPipeLineLengthStatic.setLength(String.valueOf(objectArray[1])); + pgPipeLineLengthStaticList.add(pgPipeLineLengthStatic); + } + + return pgPipeLineLengthStaticList; } //根据分区获取设备列表 @@ -99,8 +109,7 @@ return pgDeviceDtoList; } - public List getDeviceByOldDAssetCodeCode(String assetCode) - { + public List getDeviceByOldDAssetCodeCode(String assetCode) { String[] stringList=assetCode.split("\\."); String hql="select * from PG_DEVICE device where device.assetCode like '%"+stringList[1]+"%' and device.assetCode like '%"+stringList[2]+"'"; diff --git "a/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx" "b/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx" deleted file mode 100644 index eb93499..0000000 --- "a/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx" +++ /dev/null Binary files differ