diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 87198c5..9df45c2 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,58 +2,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -78,18 +30,7 @@ - - - - - - - - - - - - + @@ -107,7 +48,6 @@ @@ -218,9 +159,9 @@ - @@ -305,6 +246,28 @@ - @@ -1133,7 +1069,7 @@ - + @@ -1145,7 +1081,7 @@ - + @@ -1158,7 +1094,7 @@ - + @@ -1187,7 +1123,6 @@ - @@ -1212,11 +1147,20 @@ - - @@ -1224,20 +1168,6 @@ - - - - - - - - - - - - - - @@ -1393,13 +1323,6 @@ - - - - - - - @@ -1472,13 +1395,6 @@ - - - - - - - @@ -1486,49 +1402,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1536,15 +1413,6 @@ - - - - - - - - - @@ -1552,18 +1420,6 @@ - - - - - - - - - - - - @@ -1595,14 +1451,106 @@ + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 87198c5..9df45c2 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,58 +2,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -78,18 +30,7 @@ - - - - - - - - - - - - + @@ -107,7 +48,6 @@ @@ -218,9 +159,9 @@ - @@ -305,6 +246,28 @@ - @@ -1133,7 +1069,7 @@ - + @@ -1145,7 +1081,7 @@ - + @@ -1158,7 +1094,7 @@ - + @@ -1187,7 +1123,6 @@ - @@ -1212,11 +1147,20 @@ - - @@ -1224,20 +1168,6 @@ - - - - - - - - - - - - - - @@ -1393,13 +1323,6 @@ - - - - - - - @@ -1472,13 +1395,6 @@ - - - - - - - @@ -1486,49 +1402,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1536,15 +1413,6 @@ - - - - - - - - - @@ -1552,18 +1420,6 @@ - - - - - - - - - - - - @@ -1595,14 +1451,106 @@ + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java index 7b491d4..5a7aec8 100644 --- a/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java +++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java @@ -148,6 +148,10 @@ public PgDeviceDto(PgDevice pgDevice) { + if (pgDevice == null) + { + return; + } SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); this.setId(String.valueOf(pgDevice.getId())); diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 87198c5..9df45c2 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,58 +2,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -78,18 +30,7 @@ - - - - - - - - - - - - + @@ -107,7 +48,6 @@ @@ -218,9 +159,9 @@ - @@ -305,6 +246,28 @@ - @@ -1133,7 +1069,7 @@ - + @@ -1145,7 +1081,7 @@ - + @@ -1158,7 +1094,7 @@ - + @@ -1187,7 +1123,6 @@ - @@ -1212,11 +1147,20 @@ - - @@ -1224,20 +1168,6 @@ - - - - - - - - - - - - - - @@ -1393,13 +1323,6 @@ - - - - - - - @@ -1472,13 +1395,6 @@ - - - - - - - @@ -1486,49 +1402,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1536,15 +1413,6 @@ - - - - - - - - - @@ -1552,18 +1420,6 @@ - - - - - - - - - - - - @@ -1595,14 +1451,106 @@ + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java index 7b491d4..5a7aec8 100644 --- a/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java +++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java @@ -148,6 +148,10 @@ public PgDeviceDto(PgDevice pgDevice) { + if (pgDevice == null) + { + return; + } SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); this.setId(String.valueOf(pgDevice.getId())); 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 f97c322..5f713f6 100644 --- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java +++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java @@ -99,4 +99,36 @@ return pgDeviceDtoList; } + 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]+"'"; + + List pgDevices=(List)this.getSession().createSQLQuery(hql).list(); + + List pgDeviceDtoList = new ArrayList(); + + for (int i = 0; i - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -78,18 +30,7 @@ - - - - - - - - - - - - + @@ -107,7 +48,6 @@ @@ -218,9 +159,9 @@ - @@ -305,6 +246,28 @@ - @@ -1133,7 +1069,7 @@ - + @@ -1145,7 +1081,7 @@ - + @@ -1158,7 +1094,7 @@ - + @@ -1187,7 +1123,6 @@ - @@ -1212,11 +1147,20 @@ - - @@ -1224,20 +1168,6 @@ - - - - - - - - - - - - - - @@ -1393,13 +1323,6 @@ - - - - - - - @@ -1472,13 +1395,6 @@ - - - - - - - @@ -1486,49 +1402,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1536,15 +1413,6 @@ - - - - - - - - - @@ -1552,18 +1420,6 @@ - - - - - - - - - - - - @@ -1595,14 +1451,106 @@ + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java index 7b491d4..5a7aec8 100644 --- a/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java +++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java @@ -148,6 +148,10 @@ public PgDeviceDto(PgDevice pgDevice) { + if (pgDevice == null) + { + return; + } SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); this.setId(String.valueOf(pgDevice.getId())); 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 f97c322..5f713f6 100644 --- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java +++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java @@ -99,4 +99,36 @@ return pgDeviceDtoList; } + 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]+"'"; + + List pgDevices=(List)this.getSession().createSQLQuery(hql).list(); + + List pgDeviceDtoList = new ArrayList(); + + for (int i = 0; i getDeviceByOldDAssetCodeCode(@FormParam("assetCode") String assetCode) throws Exception{ + Map resultMap = new HashMap(); + String msg=""; + List pgDeviceDtoList=new ArrayList(); + + try{ + pgDeviceDtoList=pgDeviceManager.getDeviceByOldDAssetCodeCode(assetCode); + if(pgDeviceDtoList==null) + msg="设备信息获取失败"; + else + msg="设备信息获取成功"; + } + catch(Exception e) + { + e.printStackTrace(); + msg="设备信息获取失败"; + } + resultMap.put("msg",msg); + resultMap.put("result",pgDeviceDtoList); + + return resultMap; + } + + + } diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 87198c5..9df45c2 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,58 +2,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -78,18 +30,7 @@ - - - - - - - - - - - - + @@ -107,7 +48,6 @@ @@ -218,9 +159,9 @@ - @@ -305,6 +246,28 @@ - @@ -1133,7 +1069,7 @@ - + @@ -1145,7 +1081,7 @@ - + @@ -1158,7 +1094,7 @@ - + @@ -1187,7 +1123,6 @@ - @@ -1212,11 +1147,20 @@ - - @@ -1224,20 +1168,6 @@ - - - - - - - - - - - - - - @@ -1393,13 +1323,6 @@ - - - - - - - @@ -1472,13 +1395,6 @@ - - - - - - - @@ -1486,49 +1402,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1536,15 +1413,6 @@ - - - - - - - - - @@ -1552,18 +1420,6 @@ - - - - - - - - - - - - @@ -1595,14 +1451,106 @@ + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java b/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java index 7b491d4..5a7aec8 100644 --- a/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java +++ b/src/main/java/com/casic/PgInterface/devTable/dto/PgDeviceDto.java @@ -148,6 +148,10 @@ public PgDeviceDto(PgDevice pgDevice) { + if (pgDevice == null) + { + return; + } SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); this.setId(String.valueOf(pgDevice.getId())); 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 f97c322..5f713f6 100644 --- a/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java +++ b/src/main/java/com/casic/PgInterface/devTable/manager/PgDeviceManager.java @@ -99,4 +99,36 @@ return pgDeviceDtoList; } + 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]+"'"; + + List pgDevices=(List)this.getSession().createSQLQuery(hql).list(); + + List pgDeviceDtoList = new ArrayList(); + + for (int i = 0; i getDeviceByOldDAssetCodeCode(@FormParam("assetCode") String assetCode) throws Exception{ + Map resultMap = new HashMap(); + String msg=""; + List pgDeviceDtoList=new ArrayList(); + + try{ + pgDeviceDtoList=pgDeviceManager.getDeviceByOldDAssetCodeCode(assetCode); + if(pgDeviceDtoList==null) + msg="设备信息获取失败"; + else + msg="设备信息获取成功"; + } + catch(Exception e) + { + e.printStackTrace(); + msg="设备信息获取失败"; + } + resultMap.put("msg",msg); + resultMap.put("result",pgDeviceDtoList); + + return resultMap; + } + + + } diff --git "a/\346\216\245\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx" "b/\346\216\245\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx" index d3f41ad..0987d90 100644 --- "a/\346\216\245\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx" +++ "b/\346\216\245\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx" Binary files differ