81041
2018-11-03 f37bef9479de95840dc889e47ed7b4f9339ece72
流量统计修改
1个文件已修改
16 ■■■■ 已修改文件
gx_tieta/src/com/fgkj/dao/impl/StationtrafficImpl.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/dao/impl/StationtrafficImpl.java
@@ -66,11 +66,11 @@
                // 时间段
                String perid_Time = ""; 
                Calendar now = Calendar.getInstance();
                int nowflow=0;
                int dayflow=0;
                try {
                    while(rs.next()){
                        
                        int nowflows=rs.getInt("nowflow");
                        int dayflows=rs.getInt("dayflow");
                        // 年份,季度,月份
                        Date dev_recordtime = rs.getTimestamp("record_time");
                        // 获取具体年份,月份和该月的总天数
@@ -97,16 +97,16 @@
                        }
                        //System.out.println(perid_Times+" "+perid_Time+" "+nowflows);
                        if(perid_Times.equals(perid_Time)){
                            nowflow+=nowflows;
                            dayflow+=dayflows;
                        }else{
                            if(perid_Time.equals("")){
                                 perid_Time=perid_Times;
                                 nowflow+=nowflows;
                                 dayflow+=dayflows;
                                 continue;
                            }
                            Stationtraffic st=new Stationtraffic();
                            st.setDev_id(rs.getInt("dev_id"));
                            st.setNowflow(nowflow);
                            st.setNowflow(dayflow);
                            st.setStationName(rs.getString("stationName"));
                            st.setStationName1(rs.getString("stationName1"));
                            st.setStationName2(rs.getString("stationName2"));
@@ -114,15 +114,15 @@
                            st.setStationName5(rs.getString("stationName5"));
                            st.setNote(perid_Time);
                            list.add(st);
                            nowflow=0;
                            nowflow+=nowflows;
                            dayflow=0;
                            dayflow+=dayflows;
                            perid_Time=perid_Times;
                            
                        }
                    if(rs.isLast()){
                        Stationtraffic st=new Stationtraffic();
                        st.setDev_id(rs.getInt("dev_id"));
                        st.setNowflow(nowflow);
                        st.setNowflow(dayflow);
                        st.setStationName(rs.getString("stationName"));
                        st.setStationName1(rs.getString("stationName1"));
                        st.setStationName2(rs.getString("stationName2"));