diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..b3295c5 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..b3295c5 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..a55e7a1 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..b3295c5 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..a55e7a1 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..691ca64 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..b3295c5 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..a55e7a1 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..691ca64 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index c828d6c..d07097f 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,35 +1,128 @@ + + + + + - - - - + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pgPipeLineLengthStatic.setLineType(String.valueOf(objectArray[0])) + getDeviceStatisticByDevType + getPersonNumInPgByMonth + getTodayInPgInfo + getConstructionToday + constructionType + getConstructionNum + getPipeGallerys + getInPgNum + @@ -45,70 +138,28 @@ - + + true + DEFINITION_ORDER @@ -158,343 +209,158 @@ - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - + - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -518,90 +384,53 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - @@ -1180,31 +1180,19 @@ - - file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java - 49 + file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java + 47 - - - file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java - 77 - - - - file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java - 48 - - - @@ -1212,391 +1200,399 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - + + - + - + - + - + - - + + - + - - - - - - - - + - + - + - - + + - + - - + + - + - - - - - - - - - + + - + - - - - - - - - + - + - - + + - + - + - - + - + - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + - - - + + + + + + + + + + + + + + + + + + - + - - - + + - + - - - + + + + + - + - - - + + + + + + + + + + - + - - - + + + + + + + + + + @@ -1691,5 +1687,4 @@ - - + \ No newline at end of file diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java index 7389049..46b841f 100644 --- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java +++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java @@ -153,7 +153,7 @@ try { String hql="select count(*), pgConstruction." + str + " from Pg_Construction pgConstruction "+ - "group by pgConstruction." + str; + "where active = 1 group by pgConstruction." + str; List objects=this.getSession().createSQLQuery(hql).list(); for(int i=0;i + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..a55e7a1 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..691ca64 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index c828d6c..d07097f 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,35 +1,128 @@ + + + + + - - - - + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pgPipeLineLengthStatic.setLineType(String.valueOf(objectArray[0])) + getDeviceStatisticByDevType + getPersonNumInPgByMonth + getTodayInPgInfo + getConstructionToday + constructionType + getConstructionNum + getPipeGallerys + getInPgNum + @@ -45,70 +138,28 @@ - + + true + DEFINITION_ORDER @@ -158,343 +209,158 @@ - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - + - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -518,90 +384,53 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - @@ -1180,31 +1180,19 @@ - - file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java - 49 + file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java + 47 - - - file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java - 77 - - - - file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java - 48 - - - @@ -1212,391 +1200,399 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - + + - + - + - + - + - - + + - + - - - - - - - - + - + - + - - + + - + - - + + - + - - - - - - - - - + + - + - - - - - - - - + - + - - + + - + - + - - + - + - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + - - - + + + + + + + + + + + + + + + + + + - + - - - + + - + - - - + + + + + - + - - - + + + + + + + + + + - + - - - + + + + + + + + + + @@ -1691,5 +1687,4 @@ - - + \ No newline at end of file diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java index 7389049..46b841f 100644 --- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java +++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java @@ -153,7 +153,7 @@ try { String hql="select count(*), pgConstruction." + str + " from Pg_Construction pgConstruction "+ - "group by pgConstruction." + str; + "where active = 1 group by pgConstruction." + str; List objects=this.getSession().createSQLQuery(hql).list(); for(int i=0;i pgDeviceList = criteria.list(); - /* - String sql = "select * from PG_DEVICE where active = 1 order by id desc"; - List pgDeviceDtoList = this.getSession().createSQLQuery(sql).list(); - */ + List pgDeviceDtoList = new ArrayList(); for (PgDevice pgDevice : pgDeviceList) { pgDeviceDtoList.add(new PgDeviceDto(pgDevice)); @@ -77,22 +74,22 @@ } //根据设备类型统计设备资产 - public List getDeviceStatisticByDevType(){ + public List getDeviceStatisticByDevType(){ String sql="select device.DEVTYPE,count(*) from PG_DEVICE device group by device.DEVTYPE"; List objectList=this.getSession().createSQLQuery(sql).list(); - List pgPipeLineLengthStaticList = new ArrayList(); + List pgDeviceTypeStatisticDtoList = 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); + PgDeviceTypeStatisticDto pgDeviceTypeStatisticDto=new PgDeviceTypeStatisticDto(); + pgDeviceTypeStatisticDto.setDevType(String.valueOf(objectArray[0])); + pgDeviceTypeStatisticDto.setNum(String.valueOf(objectArray[1])); + pgDeviceTypeStatisticDtoList.add(pgDeviceTypeStatisticDto); } - return pgPipeLineLengthStaticList; + return pgDeviceTypeStatisticDtoList; } //根据分区获取设备列表 diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java index 4b95be8..796de5c 100644 --- a/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java +++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java @@ -15,7 +15,7 @@ private String personType;//人员类别 private String isInPg;//是否在廊内 private String lastInTime;//最后入廊时间 - private String inPgTime;//入廊时间 + private String inTime;//入廊时间 private String outTime;//出廊时间 private String inPgNum;//入廊次数 @@ -67,12 +67,12 @@ this.inPgNum = inPgNum; } - public String getInPgTime() { - return inPgTime; + public String getInTime() { + return inTime; } - public void setInPgTime(String inPgTime) { - this.inPgTime = inPgTime; + public void setInTime(String inTime) { + this.inTime = inTime; } public String getOutTime() { @@ -103,7 +103,7 @@ this.setUserName(pgInPgStatus.getPgInPgPersonId().getUserName()); this.setPhoneNumber(pgInPgStatus.getPgInPgPersonId().getPhoneNumber()); this.setPersonType(pgInPgStatus.getPgInPgPersonId().getPersonType()); - this.setInPgTime(sdf.format(pgInPgStatus.getInTime())); + this.setInTime(sdf.format(pgInPgStatus.getInTime())); if (pgInPgStatus.getOutTime() != null) this.setOutTime(sdf.format(pgInPgStatus.getOutTime())); else diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..b3295c5 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..a55e7a1 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..691ca64 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index c828d6c..d07097f 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,35 +1,128 @@ + + + + + - - - - + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pgPipeLineLengthStatic.setLineType(String.valueOf(objectArray[0])) + getDeviceStatisticByDevType + getPersonNumInPgByMonth + getTodayInPgInfo + getConstructionToday + constructionType + getConstructionNum + getPipeGallerys + getInPgNum + @@ -45,70 +138,28 @@ - + + true + DEFINITION_ORDER @@ -158,343 +209,158 @@ - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - + - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -518,90 +384,53 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - @@ -1180,31 +1180,19 @@ - - file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java - 49 + file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java + 47 - - - file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java - 77 - - - - file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java - 48 - - - @@ -1212,391 +1200,399 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - + + - + - + - + - + - - + + - + - - - - - - - - + - + - + - - + + - + - - + + - + - - - - - - - - - + + - + - - - - - - - - + - + - - + + - + - + - - + - + - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + - - - + + + + + + + + + + + + + + + + + + - + - - - + + - + - - - + + + + + - + - - - + + + + + + + + + + - + - - - + + + + + + + + + + @@ -1691,5 +1687,4 @@ - - + \ No newline at end of file diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java index 7389049..46b841f 100644 --- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java +++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java @@ -153,7 +153,7 @@ try { String hql="select count(*), pgConstruction." + str + " from Pg_Construction pgConstruction "+ - "group by pgConstruction." + str; + "where active = 1 group by pgConstruction." + str; List objects=this.getSession().createSQLQuery(hql).list(); for(int i=0;i pgDeviceList = criteria.list(); - /* - String sql = "select * from PG_DEVICE where active = 1 order by id desc"; - List pgDeviceDtoList = this.getSession().createSQLQuery(sql).list(); - */ + List pgDeviceDtoList = new ArrayList(); for (PgDevice pgDevice : pgDeviceList) { pgDeviceDtoList.add(new PgDeviceDto(pgDevice)); @@ -77,22 +74,22 @@ } //根据设备类型统计设备资产 - public List getDeviceStatisticByDevType(){ + public List getDeviceStatisticByDevType(){ String sql="select device.DEVTYPE,count(*) from PG_DEVICE device group by device.DEVTYPE"; List objectList=this.getSession().createSQLQuery(sql).list(); - List pgPipeLineLengthStaticList = new ArrayList(); + List pgDeviceTypeStatisticDtoList = 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); + PgDeviceTypeStatisticDto pgDeviceTypeStatisticDto=new PgDeviceTypeStatisticDto(); + pgDeviceTypeStatisticDto.setDevType(String.valueOf(objectArray[0])); + pgDeviceTypeStatisticDto.setNum(String.valueOf(objectArray[1])); + pgDeviceTypeStatisticDtoList.add(pgDeviceTypeStatisticDto); } - return pgPipeLineLengthStaticList; + return pgDeviceTypeStatisticDtoList; } //根据分区获取设备列表 diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java index 4b95be8..796de5c 100644 --- a/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java +++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java @@ -15,7 +15,7 @@ private String personType;//人员类别 private String isInPg;//是否在廊内 private String lastInTime;//最后入廊时间 - private String inPgTime;//入廊时间 + private String inTime;//入廊时间 private String outTime;//出廊时间 private String inPgNum;//入廊次数 @@ -67,12 +67,12 @@ this.inPgNum = inPgNum; } - public String getInPgTime() { - return inPgTime; + public String getInTime() { + return inTime; } - public void setInPgTime(String inPgTime) { - this.inPgTime = inPgTime; + public void setInTime(String inTime) { + this.inTime = inTime; } public String getOutTime() { @@ -103,7 +103,7 @@ this.setUserName(pgInPgStatus.getPgInPgPersonId().getUserName()); this.setPhoneNumber(pgInPgStatus.getPgInPgPersonId().getPhoneNumber()); this.setPersonType(pgInPgStatus.getPgInPgPersonId().getPersonType()); - this.setInPgTime(sdf.format(pgInPgStatus.getInTime())); + this.setInTime(sdf.format(pgInPgStatus.getInTime())); if (pgInPgStatus.getOutTime() != null) this.setOutTime(sdf.format(pgInPgStatus.getOutTime())); else diff --git a/src/main/java/com/casic/PgInterface/patroler/manager/PgInPgPersonManager.java b/src/main/java/com/casic/PgInterface/patroler/manager/PgInPgPersonManager.java index 9952085..8485cce 100644 --- a/src/main/java/com/casic/PgInterface/patroler/manager/PgInPgPersonManager.java +++ b/src/main/java/com/casic/PgInterface/patroler/manager/PgInPgPersonManager.java @@ -95,7 +95,7 @@ { PgInPgInfoDto pgInPgInfoDto=new PgInPgInfoDto(); pgInPgInfoDto.setInPgNum(objects.get(i)[0].toString()); - pgInPgInfoDto.setInPgTime(objects.get(i)[1].toString()); + pgInPgInfoDto.setInTime(objects.get(i)[1].toString()); pgInPgInfoDtoList.add(pgInPgInfoDto); } return pgInPgInfoDtoList; diff --git a/src/main/java/com/casic/PgInterface/patroler/manager/PgInPgStatusManager.java b/src/main/java/com/casic/PgInterface/patroler/manager/PgInPgStatusManager.java index 8a4e273..aea24b4 100644 --- a/src/main/java/com/casic/PgInterface/patroler/manager/PgInPgStatusManager.java +++ b/src/main/java/com/casic/PgInterface/patroler/manager/PgInPgStatusManager.java @@ -1,7 +1,6 @@ package com.casic.PgInterface.patroler.manager; import com.casic.PgInterface.core.hibernate.HibernateEntityDao; -import com.casic.PgInterface.core.util.DateUtils; import com.casic.PgInterface.patroler.domain.PgInPgPerson; import com.casic.PgInterface.patroler.domain.PgInPgStatus; import com.casic.PgInterface.patroler.dto.PgInPgInfoDto; @@ -11,7 +10,6 @@ import org.springframework.stereotype.Service; import java.util.ArrayList; -import java.util.Date; import java.util.List; /** @@ -51,19 +49,19 @@ } public int getMonthInPgPersonNum() { - String hql = "select count(*) from PgInPgStatus pgInPgStatus where to_char(pgInPgStatus.inTime, 'yyyy-mm')" + - " = to_char('" + DateUtils.sdf4.format(new Date()) + "','yyyy-mm')"; + String hql = "select count(*) from PG_INPG_STATUS pgInPgStatus where to_char(pgInPgStatus.inTime, 'yyyy-mm')" + + " = to_char(sysdate,'yyyy-mm')"; - Object object = this.getSession().createQuery(hql).uniqueResult(); + Object object = this.getSession().createSQLQuery(hql).uniqueResult(); return Integer.parseInt(String.valueOf(object)); } public int getWeekInPgPersonNum() { - String hql = "select count(*) from PgInPgStatus pgInPgStatus where to_char(pgInPgStatus.inTime, 'iw')" + - " = to_char('" + DateUtils.sdf4.format(new Date()) + "','iw')"; + String hql = "select count(*) from PG_INPG_STATUS pgInPgStatus where to_char(pgInPgStatus.inTime, 'iw')" + + " = to_char(sysdate,'iw')"; - Object object = this.getSession().createQuery(hql).uniqueResult(); + Object object = this.getSession().createSQLQuery(hql).uniqueResult(); return Integer.parseInt(String.valueOf(object)); } @@ -73,7 +71,6 @@ List pgInPgInfoDtoList = new ArrayList(); - String sql = "select count(*), to_char(t.intime, 'yyyy-mm-dd') from pg_inpg_status t group " + "by to_char(t.intime, 'yyyy-mm-dd')"; @@ -81,7 +78,7 @@ for (int i = 0; i < objects.size(); i++) { PgInPgInfoDto pgInPgInfoDto = new PgInPgInfoDto(); pgInPgInfoDto.setInPgNum(objects.get(i)[0].toString()); - pgInPgInfoDto.setInPgTime(objects.get(i)[1].toString()); + pgInPgInfoDto.setInTime(objects.get(i)[1].toString()); pgInPgInfoDtoList.add(pgInPgInfoDto); } return pgInPgInfoDtoList; @@ -90,12 +87,20 @@ public List getTodayInPgInfo() { List pgInPgInfoDtoList=new ArrayList(); - String sql = "select * from PgInPgStatus pgInPgStatus where to_char(pgInPgStatus.inTime, 'yyyy-mm-dd')" + - " = to_char('" + DateUtils.sdf4.format(new Date()) + "','yyyy-mm-dd')"; - List pgInPgStatusList=(List)this.getSession().createSQLQuery(sql).list(); - for(PgInPgStatus pgInPgStatus : pgInPgStatusList) - { - pgInPgInfoDtoList.add(new PgInPgInfoDto(pgInPgStatus)); + String sql="select t.username,t.phonenumber,t.persontype,t.isinpg,n.inTime,n.outTime from PG_INPG_PERSON t,PG_INPG_STATUS n " + + "where t.id=n.pginpgpersonid and to_char(n.inTime, 'yyyy-mm-dd') = to_char(sysdate,'yyyy-mm-dd')"; + + List objects=this.getSession().createSQLQuery(sql).list(); + for(int i=0;i + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..a55e7a1 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..691ca64 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index c828d6c..d07097f 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,35 +1,128 @@ + + + + + - - - - + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pgPipeLineLengthStatic.setLineType(String.valueOf(objectArray[0])) + getDeviceStatisticByDevType + getPersonNumInPgByMonth + getTodayInPgInfo + getConstructionToday + constructionType + getConstructionNum + getPipeGallerys + getInPgNum + @@ -45,70 +138,28 @@ - + + true + DEFINITION_ORDER @@ -158,343 +209,158 @@ - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - + - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -518,90 +384,53 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - @@ -1180,31 +1180,19 @@ - - file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java - 49 + file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java + 47 - - - file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java - 77 - - - - file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java - 48 - - - @@ -1212,391 +1200,399 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - + + - + - + - + - + - - + + - + - - - - - - - - + - + - + - - + + - + - - + + - + - - - - - - - - - + + - + - - - - - - - - + - + - - + + - + - + - - + - + - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + - - - + + + + + + + + + + + + + + + + + + - + - - - + + - + - - - + + + + + - + - - - + + + + + + + + + + - + - - - + + + + + + + + + + @@ -1691,5 +1687,4 @@ - - + \ No newline at end of file diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java index 7389049..46b841f 100644 --- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java +++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java @@ -153,7 +153,7 @@ try { String hql="select count(*), pgConstruction." + str + " from Pg_Construction pgConstruction "+ - "group by pgConstruction." + str; + "where active = 1 group by pgConstruction." + str; List objects=this.getSession().createSQLQuery(hql).list(); for(int i=0;i pgDeviceList = criteria.list(); - /* - String sql = "select * from PG_DEVICE where active = 1 order by id desc"; - List pgDeviceDtoList = this.getSession().createSQLQuery(sql).list(); - */ + List pgDeviceDtoList = new ArrayList(); for (PgDevice pgDevice : pgDeviceList) { pgDeviceDtoList.add(new PgDeviceDto(pgDevice)); @@ -77,22 +74,22 @@ } //根据设备类型统计设备资产 - public List getDeviceStatisticByDevType(){ + public List getDeviceStatisticByDevType(){ String sql="select device.DEVTYPE,count(*) from PG_DEVICE device group by device.DEVTYPE"; List objectList=this.getSession().createSQLQuery(sql).list(); - List pgPipeLineLengthStaticList = new ArrayList(); + List pgDeviceTypeStatisticDtoList = 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); + PgDeviceTypeStatisticDto pgDeviceTypeStatisticDto=new PgDeviceTypeStatisticDto(); + pgDeviceTypeStatisticDto.setDevType(String.valueOf(objectArray[0])); + pgDeviceTypeStatisticDto.setNum(String.valueOf(objectArray[1])); + pgDeviceTypeStatisticDtoList.add(pgDeviceTypeStatisticDto); } - return pgPipeLineLengthStaticList; + return pgDeviceTypeStatisticDtoList; } //根据分区获取设备列表 diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java index 4b95be8..796de5c 100644 --- a/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java +++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java @@ -15,7 +15,7 @@ private String personType;//人员类别 private String isInPg;//是否在廊内 private String lastInTime;//最后入廊时间 - private String inPgTime;//入廊时间 + private String inTime;//入廊时间 private String outTime;//出廊时间 private String inPgNum;//入廊次数 @@ -67,12 +67,12 @@ this.inPgNum = inPgNum; } - public String getInPgTime() { - return inPgTime; + public String getInTime() { + return inTime; } - public void setInPgTime(String inPgTime) { - this.inPgTime = inPgTime; + public void setInTime(String inTime) { + this.inTime = inTime; } public String getOutTime() { @@ -103,7 +103,7 @@ this.setUserName(pgInPgStatus.getPgInPgPersonId().getUserName()); this.setPhoneNumber(pgInPgStatus.getPgInPgPersonId().getPhoneNumber()); this.setPersonType(pgInPgStatus.getPgInPgPersonId().getPersonType()); - this.setInPgTime(sdf.format(pgInPgStatus.getInTime())); + this.setInTime(sdf.format(pgInPgStatus.getInTime())); if (pgInPgStatus.getOutTime() != null) this.setOutTime(sdf.format(pgInPgStatus.getOutTime())); else diff --git a/src/main/java/com/casic/PgInterface/patroler/manager/PgInPgPersonManager.java b/src/main/java/com/casic/PgInterface/patroler/manager/PgInPgPersonManager.java index 9952085..8485cce 100644 --- a/src/main/java/com/casic/PgInterface/patroler/manager/PgInPgPersonManager.java +++ b/src/main/java/com/casic/PgInterface/patroler/manager/PgInPgPersonManager.java @@ -95,7 +95,7 @@ { PgInPgInfoDto pgInPgInfoDto=new PgInPgInfoDto(); pgInPgInfoDto.setInPgNum(objects.get(i)[0].toString()); - pgInPgInfoDto.setInPgTime(objects.get(i)[1].toString()); + pgInPgInfoDto.setInTime(objects.get(i)[1].toString()); pgInPgInfoDtoList.add(pgInPgInfoDto); } return pgInPgInfoDtoList; diff --git a/src/main/java/com/casic/PgInterface/patroler/manager/PgInPgStatusManager.java b/src/main/java/com/casic/PgInterface/patroler/manager/PgInPgStatusManager.java index 8a4e273..aea24b4 100644 --- a/src/main/java/com/casic/PgInterface/patroler/manager/PgInPgStatusManager.java +++ b/src/main/java/com/casic/PgInterface/patroler/manager/PgInPgStatusManager.java @@ -1,7 +1,6 @@ package com.casic.PgInterface.patroler.manager; import com.casic.PgInterface.core.hibernate.HibernateEntityDao; -import com.casic.PgInterface.core.util.DateUtils; import com.casic.PgInterface.patroler.domain.PgInPgPerson; import com.casic.PgInterface.patroler.domain.PgInPgStatus; import com.casic.PgInterface.patroler.dto.PgInPgInfoDto; @@ -11,7 +10,6 @@ import org.springframework.stereotype.Service; import java.util.ArrayList; -import java.util.Date; import java.util.List; /** @@ -51,19 +49,19 @@ } public int getMonthInPgPersonNum() { - String hql = "select count(*) from PgInPgStatus pgInPgStatus where to_char(pgInPgStatus.inTime, 'yyyy-mm')" + - " = to_char('" + DateUtils.sdf4.format(new Date()) + "','yyyy-mm')"; + String hql = "select count(*) from PG_INPG_STATUS pgInPgStatus where to_char(pgInPgStatus.inTime, 'yyyy-mm')" + + " = to_char(sysdate,'yyyy-mm')"; - Object object = this.getSession().createQuery(hql).uniqueResult(); + Object object = this.getSession().createSQLQuery(hql).uniqueResult(); return Integer.parseInt(String.valueOf(object)); } public int getWeekInPgPersonNum() { - String hql = "select count(*) from PgInPgStatus pgInPgStatus where to_char(pgInPgStatus.inTime, 'iw')" + - " = to_char('" + DateUtils.sdf4.format(new Date()) + "','iw')"; + String hql = "select count(*) from PG_INPG_STATUS pgInPgStatus where to_char(pgInPgStatus.inTime, 'iw')" + + " = to_char(sysdate,'iw')"; - Object object = this.getSession().createQuery(hql).uniqueResult(); + Object object = this.getSession().createSQLQuery(hql).uniqueResult(); return Integer.parseInt(String.valueOf(object)); } @@ -73,7 +71,6 @@ List pgInPgInfoDtoList = new ArrayList(); - String sql = "select count(*), to_char(t.intime, 'yyyy-mm-dd') from pg_inpg_status t group " + "by to_char(t.intime, 'yyyy-mm-dd')"; @@ -81,7 +78,7 @@ for (int i = 0; i < objects.size(); i++) { PgInPgInfoDto pgInPgInfoDto = new PgInPgInfoDto(); pgInPgInfoDto.setInPgNum(objects.get(i)[0].toString()); - pgInPgInfoDto.setInPgTime(objects.get(i)[1].toString()); + pgInPgInfoDto.setInTime(objects.get(i)[1].toString()); pgInPgInfoDtoList.add(pgInPgInfoDto); } return pgInPgInfoDtoList; @@ -90,12 +87,20 @@ public List getTodayInPgInfo() { List pgInPgInfoDtoList=new ArrayList(); - String sql = "select * from PgInPgStatus pgInPgStatus where to_char(pgInPgStatus.inTime, 'yyyy-mm-dd')" + - " = to_char('" + DateUtils.sdf4.format(new Date()) + "','yyyy-mm-dd')"; - List pgInPgStatusList=(List)this.getSession().createSQLQuery(sql).list(); - for(PgInPgStatus pgInPgStatus : pgInPgStatusList) - { - pgInPgInfoDtoList.add(new PgInPgInfoDto(pgInPgStatus)); + String sql="select t.username,t.phonenumber,t.persontype,t.isinpg,n.inTime,n.outTime from PG_INPG_PERSON t,PG_INPG_STATUS n " + + "where t.id=n.pginpgpersonid and to_char(n.inTime, 'yyyy-mm-dd') = to_char(sysdate,'yyyy-mm-dd')"; + + List objects=this.getSession().createSQLQuery(sql).list(); + for(int i=0;i pgConstructionDtoList=new ArrayList(); try { pgConstructionDtoList = pgConstructionManager.getConstructionToday(); - if (pgConstructionDtoList == null) + if (pgConstructionDtoList == null&&pgConstructionDtoList.size()==0) msg = "不存在施工信息"; else msg = "施工信息获取成功"; diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..b3295c5 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..a55e7a1 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..691ca64 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index c828d6c..d07097f 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,35 +1,128 @@ + + + + + - - - - + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pgPipeLineLengthStatic.setLineType(String.valueOf(objectArray[0])) + getDeviceStatisticByDevType + getPersonNumInPgByMonth + getTodayInPgInfo + getConstructionToday + constructionType + getConstructionNum + getPipeGallerys + getInPgNum + @@ -45,70 +138,28 @@ - + + true + DEFINITION_ORDER @@ -158,343 +209,158 @@ - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - + - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -518,90 +384,53 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - @@ -1180,31 +1180,19 @@ - - file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java - 49 + file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/devTable/manager/PipeGalleryManager.java + 47 - - - file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java - 77 - - - - file://$PROJECT_DIR$/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java - 48 - - - @@ -1212,391 +1200,399 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - + + - + - + - + - + - - + + - + - - - - - - - - + - + - + - - + + - + - - + + - + - - - - - - - - - + + - + - - - - - - - - + - + - - + + - + - + - - + - + - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + - - - + + + + + + + + + + + + + + + + + + - + - - - + + - + - - - + + + + + - + - - - + + + + + + + + + + - + - - - + + + + + + + + + + @@ -1691,5 +1687,4 @@ - - + \ No newline at end of file diff --git a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java index 7389049..46b841f 100644 --- a/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java +++ b/src/main/java/com/casic/PgInterface/construction/manager/PgConstructionManager.java @@ -153,7 +153,7 @@ try { String hql="select count(*), pgConstruction." + str + " from Pg_Construction pgConstruction "+ - "group by pgConstruction." + str; + "where active = 1 group by pgConstruction." + str; List objects=this.getSession().createSQLQuery(hql).list(); for(int i=0;i pgDeviceList = criteria.list(); - /* - String sql = "select * from PG_DEVICE where active = 1 order by id desc"; - List pgDeviceDtoList = this.getSession().createSQLQuery(sql).list(); - */ + List pgDeviceDtoList = new ArrayList(); for (PgDevice pgDevice : pgDeviceList) { pgDeviceDtoList.add(new PgDeviceDto(pgDevice)); @@ -77,22 +74,22 @@ } //根据设备类型统计设备资产 - public List getDeviceStatisticByDevType(){ + public List getDeviceStatisticByDevType(){ String sql="select device.DEVTYPE,count(*) from PG_DEVICE device group by device.DEVTYPE"; List objectList=this.getSession().createSQLQuery(sql).list(); - List pgPipeLineLengthStaticList = new ArrayList(); + List pgDeviceTypeStatisticDtoList = 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); + PgDeviceTypeStatisticDto pgDeviceTypeStatisticDto=new PgDeviceTypeStatisticDto(); + pgDeviceTypeStatisticDto.setDevType(String.valueOf(objectArray[0])); + pgDeviceTypeStatisticDto.setNum(String.valueOf(objectArray[1])); + pgDeviceTypeStatisticDtoList.add(pgDeviceTypeStatisticDto); } - return pgPipeLineLengthStaticList; + return pgDeviceTypeStatisticDtoList; } //根据分区获取设备列表 diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java index 4b95be8..796de5c 100644 --- a/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java +++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java @@ -15,7 +15,7 @@ private String personType;//人员类别 private String isInPg;//是否在廊内 private String lastInTime;//最后入廊时间 - private String inPgTime;//入廊时间 + private String inTime;//入廊时间 private String outTime;//出廊时间 private String inPgNum;//入廊次数 @@ -67,12 +67,12 @@ this.inPgNum = inPgNum; } - public String getInPgTime() { - return inPgTime; + public String getInTime() { + return inTime; } - public void setInPgTime(String inPgTime) { - this.inPgTime = inPgTime; + public void setInTime(String inTime) { + this.inTime = inTime; } public String getOutTime() { @@ -103,7 +103,7 @@ this.setUserName(pgInPgStatus.getPgInPgPersonId().getUserName()); this.setPhoneNumber(pgInPgStatus.getPgInPgPersonId().getPhoneNumber()); this.setPersonType(pgInPgStatus.getPgInPgPersonId().getPersonType()); - this.setInPgTime(sdf.format(pgInPgStatus.getInTime())); + this.setInTime(sdf.format(pgInPgStatus.getInTime())); if (pgInPgStatus.getOutTime() != null) this.setOutTime(sdf.format(pgInPgStatus.getOutTime())); else diff --git a/src/main/java/com/casic/PgInterface/patroler/manager/PgInPgPersonManager.java b/src/main/java/com/casic/PgInterface/patroler/manager/PgInPgPersonManager.java index 9952085..8485cce 100644 --- a/src/main/java/com/casic/PgInterface/patroler/manager/PgInPgPersonManager.java +++ b/src/main/java/com/casic/PgInterface/patroler/manager/PgInPgPersonManager.java @@ -95,7 +95,7 @@ { PgInPgInfoDto pgInPgInfoDto=new PgInPgInfoDto(); pgInPgInfoDto.setInPgNum(objects.get(i)[0].toString()); - pgInPgInfoDto.setInPgTime(objects.get(i)[1].toString()); + pgInPgInfoDto.setInTime(objects.get(i)[1].toString()); pgInPgInfoDtoList.add(pgInPgInfoDto); } return pgInPgInfoDtoList; diff --git a/src/main/java/com/casic/PgInterface/patroler/manager/PgInPgStatusManager.java b/src/main/java/com/casic/PgInterface/patroler/manager/PgInPgStatusManager.java index 8a4e273..aea24b4 100644 --- a/src/main/java/com/casic/PgInterface/patroler/manager/PgInPgStatusManager.java +++ b/src/main/java/com/casic/PgInterface/patroler/manager/PgInPgStatusManager.java @@ -1,7 +1,6 @@ package com.casic.PgInterface.patroler.manager; import com.casic.PgInterface.core.hibernate.HibernateEntityDao; -import com.casic.PgInterface.core.util.DateUtils; import com.casic.PgInterface.patroler.domain.PgInPgPerson; import com.casic.PgInterface.patroler.domain.PgInPgStatus; import com.casic.PgInterface.patroler.dto.PgInPgInfoDto; @@ -11,7 +10,6 @@ import org.springframework.stereotype.Service; import java.util.ArrayList; -import java.util.Date; import java.util.List; /** @@ -51,19 +49,19 @@ } public int getMonthInPgPersonNum() { - String hql = "select count(*) from PgInPgStatus pgInPgStatus where to_char(pgInPgStatus.inTime, 'yyyy-mm')" + - " = to_char('" + DateUtils.sdf4.format(new Date()) + "','yyyy-mm')"; + String hql = "select count(*) from PG_INPG_STATUS pgInPgStatus where to_char(pgInPgStatus.inTime, 'yyyy-mm')" + + " = to_char(sysdate,'yyyy-mm')"; - Object object = this.getSession().createQuery(hql).uniqueResult(); + Object object = this.getSession().createSQLQuery(hql).uniqueResult(); return Integer.parseInt(String.valueOf(object)); } public int getWeekInPgPersonNum() { - String hql = "select count(*) from PgInPgStatus pgInPgStatus where to_char(pgInPgStatus.inTime, 'iw')" + - " = to_char('" + DateUtils.sdf4.format(new Date()) + "','iw')"; + String hql = "select count(*) from PG_INPG_STATUS pgInPgStatus where to_char(pgInPgStatus.inTime, 'iw')" + + " = to_char(sysdate,'iw')"; - Object object = this.getSession().createQuery(hql).uniqueResult(); + Object object = this.getSession().createSQLQuery(hql).uniqueResult(); return Integer.parseInt(String.valueOf(object)); } @@ -73,7 +71,6 @@ List pgInPgInfoDtoList = new ArrayList(); - String sql = "select count(*), to_char(t.intime, 'yyyy-mm-dd') from pg_inpg_status t group " + "by to_char(t.intime, 'yyyy-mm-dd')"; @@ -81,7 +78,7 @@ for (int i = 0; i < objects.size(); i++) { PgInPgInfoDto pgInPgInfoDto = new PgInPgInfoDto(); pgInPgInfoDto.setInPgNum(objects.get(i)[0].toString()); - pgInPgInfoDto.setInPgTime(objects.get(i)[1].toString()); + pgInPgInfoDto.setInTime(objects.get(i)[1].toString()); pgInPgInfoDtoList.add(pgInPgInfoDto); } return pgInPgInfoDtoList; @@ -90,12 +87,20 @@ public List getTodayInPgInfo() { List pgInPgInfoDtoList=new ArrayList(); - String sql = "select * from PgInPgStatus pgInPgStatus where to_char(pgInPgStatus.inTime, 'yyyy-mm-dd')" + - " = to_char('" + DateUtils.sdf4.format(new Date()) + "','yyyy-mm-dd')"; - List pgInPgStatusList=(List)this.getSession().createSQLQuery(sql).list(); - for(PgInPgStatus pgInPgStatus : pgInPgStatusList) - { - pgInPgInfoDtoList.add(new PgInPgInfoDto(pgInPgStatus)); + String sql="select t.username,t.phonenumber,t.persontype,t.isinpg,n.inTime,n.outTime from PG_INPG_PERSON t,PG_INPG_STATUS n " + + "where t.id=n.pginpgpersonid and to_char(n.inTime, 'yyyy-mm-dd') = to_char(sysdate,'yyyy-mm-dd')"; + + List objects=this.getSession().createSQLQuery(sql).list(); + for(int i=0;i pgConstructionDtoList=new ArrayList(); try { pgConstructionDtoList = pgConstructionManager.getConstructionToday(); - if (pgConstructionDtoList == null) + if (pgConstructionDtoList == null&&pgConstructionDtoList.size()==0) msg = "不存在施工信息"; else msg = "施工信息获取成功"; diff --git a/src/main/java/com/casic/PgInterface/rs/pgStatisticRs.java b/src/main/java/com/casic/PgInterface/rs/pgStatisticRs.java index 967555d..1a23600 100644 --- a/src/main/java/com/casic/PgInterface/rs/pgStatisticRs.java +++ b/src/main/java/com/casic/PgInterface/rs/pgStatisticRs.java @@ -114,4 +114,4 @@ } -} +} \ No newline at end of file diff --git a/~WRL1302.tmp b/~WRL1302.tmp new file mode 100644 index 0000000..88ef0d2 --- /dev/null +++ b/~WRL1302.tmp Binary files differ diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..b3295c5 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..a55e7a1 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..691ca64 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index c828d6c..d07097f 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,35 +1,128 @@ + + + + + - - - - + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pgPipeLineLengthStatic.setLineType(String.valueOf(objectArray[0])) + getDeviceStatisticByDevType + getPersonNumInPgByMonth + getTodayInPgInfo + getConstructionToday + constructionType + getConstructionNum + getPipeGallerys + getInPgNum + @@ -45,70 +138,28 @@ - + + true + DEFINITION_ORDER @@ -158,343 +209,158 @@ - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +