Commit 5309c5c5f0b0a048ce67c1d6b9969366a47d7fa2
Merge branch 'pudong' of http://222.66.0.204:8090/panzhaov5/bsth_control into pudong
Showing
12 changed files
with
117 additions
and
125 deletions
src/main/java/com/bsth/repository/LineRepository.java
| ... | ... | @@ -48,7 +48,7 @@ public interface LineRepository extends BaseRepository<Line, Integer> { |
| 48 | 48 | @Query(value = " SELECT l FROM Line l where l.company like ?1 and l.brancheCompany like ?2 and l.lineCode like ?3") |
| 49 | 49 | public List<Line> findLineBygsBm(String gsBm, String fgsBm, String line); |
| 50 | 50 | |
| 51 | - @Query("SELECT L FROM Line L where L.destroy=0") | |
| 51 | + @Query("SELECT L FROM Line L where L.destroy=0 and L.remove !=1") | |
| 52 | 52 | List<Line> findAllService(); |
| 53 | 53 | |
| 54 | 54 | ... | ... |
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
| ... | ... | @@ -2826,14 +2826,14 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 2826 | 2826 | |
| 2827 | 2827 | String sql = "select id, cl_zbh, fcsj, fcsj_actual, j_gh, j_name, lp_name, qdz_name, " + |
| 2828 | 2828 | "schedule_date_str, xl_name, zdsj, zdsj_actual, fgs_name, gs_name, xl_dir, xl_bm " + |
| 2829 | - "from bsth_c_s_sp_info_real where schedule_date_str >= '"+startDate+"' and schedule_date_str <= '"+endDate+"'"; | |
| 2829 | + "from bsth_c_s_sp_info_real " + | |
| 2830 | + "where schedule_date_str >= '"+startDate+"' and schedule_date_str <= '"+endDate+"' " + | |
| 2831 | + "and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks' and cc_service = 0"; | |
| 2830 | 2832 | |
| 2831 | - if(line.length() != 0) | |
| 2832 | - sql += " and xl_bm = '"+line+"'"; | |
| 2833 | 2833 | if(company.length() != 0) |
| 2834 | 2834 | sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; |
| 2835 | - | |
| 2836 | - sql += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks' and cc_service = 0"; | |
| 2835 | + if(line.length() != 0) | |
| 2836 | + sql += " and xl_bm = '"+line+"'"; | |
| 2837 | 2837 | |
| 2838 | 2838 | System.out.println(sql); |
| 2839 | 2839 | List<ScheduleRealInfo> list = jdbcTemplate.query(sql, | ... | ... |
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
| ... | ... | @@ -96,7 +96,7 @@ public class ReportServiceImpl implements ReportService{ |
| 96 | 96 | Long date1=simpleDateFormat.parse(date+" "+sjfc+":00").getTime(); |
| 97 | 97 | Long date2=simpleDateFormat.parse(date+" "+sjdd+":00").getTime(); |
| 98 | 98 | Date dates=simpleDateFormat.parse(date+" 00:00:00"); |
| 99 | - List<ArrivalInfo> lists=load(line,sbbb,date1,date2,dates); | |
| 99 | + List<ArrivalInfo> lists=load(line,sbbb,date1,date2,dates,date); | |
| 100 | 100 | |
| 101 | 101 | for(int i=0;i<lists.size();i++){ |
| 102 | 102 | ArrivalInfo t1=lists.get(i); |
| ... | ... | @@ -123,7 +123,7 @@ public class ReportServiceImpl implements ReportService{ |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | |
| 126 | - public List<ArrivalInfo> load(String line,String sbbb,Long date1,Long date2,Date dates){ | |
| 126 | + public List<ArrivalInfo> load(String line,String sbbb,Long date1,Long date2,Date dates,String date){ | |
| 127 | 127 | List<ArrivalInfo> list = null; |
| 128 | 128 | Calendar cal = Calendar.getInstance(); |
| 129 | 129 | cal.setTime(dates); |
| ... | ... | @@ -133,8 +133,8 @@ public class ReportServiceImpl implements ReportService{ |
| 133 | 133 | Connection conn = null; |
| 134 | 134 | PreparedStatement ps = null; |
| 135 | 135 | ResultSet rs = null; |
| 136 | - | |
| 137 | - String sql = "select * from bsth_c_arrival_info where device_id=? AND line_id=? AND weeks_year=? AND ts > ? AND ts <=? order by ts"; | |
| 136 | + String year=date.substring(0,4); | |
| 137 | + String sql = "select * from bsth_c_arrival_info_"+year+" where device_id=? AND line_id=? AND weeks_year=? AND ts > ? AND ts <=? order by ts"; | |
| 138 | 138 | try{ |
| 139 | 139 | conn = DBUtils_MS.getConnection(); |
| 140 | 140 | ps = conn.prepareStatement(sql); |
| ... | ... | @@ -194,7 +194,7 @@ public class ReportServiceImpl implements ReportService{ |
| 194 | 194 | Long date2=simpleDateFormat.parse(ddsj+":00").getTime(); |
| 195 | 195 | Date dates1=simpleDateFormat.parse(fcsj+":00"); |
| 196 | 196 | Date dates2=simpleDateFormat.parse(ddsj+":00"); |
| 197 | - List<ArrivalInfo> lists=load2(line,date1,date2,dates1,dates2,zd,zdlx); | |
| 197 | + List<ArrivalInfo> lists=load2(line,date1,date2,dates1,dates2,zd,zdlx,fcsj); | |
| 198 | 198 | |
| 199 | 199 | for(int i=0;i<lists.size();i++){ |
| 200 | 200 | ArrivalInfo t1=lists.get(i); |
| ... | ... | @@ -224,7 +224,7 @@ public class ReportServiceImpl implements ReportService{ |
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | |
| 227 | - public List<ArrivalInfo> load2(String line,Long date1,Long date2,Date dates1,Date dates2,String zd,String zdlx){ | |
| 227 | + public List<ArrivalInfo> load2(String line,Long date1,Long date2,Date dates1,Date dates2,String zd,String zdlx,String fcsj){ | |
| 228 | 228 | List<ArrivalInfo> list = null; |
| 229 | 229 | Calendar cal = Calendar.getInstance(); |
| 230 | 230 | cal.setTime(dates1); |
| ... | ... | @@ -235,8 +235,8 @@ public class ReportServiceImpl implements ReportService{ |
| 235 | 235 | Connection conn = null; |
| 236 | 236 | PreparedStatement ps = null; |
| 237 | 237 | ResultSet rs = null; |
| 238 | - | |
| 239 | - String sql = "select * from bsth_c_arrival_info where line_id=? AND weeks_year>=? " | |
| 238 | + String year=fcsj.substring(0,4); | |
| 239 | + String sql = "select * from bsth_c_arrival_info_"+year+" where line_id=? AND weeks_year>=? " | |
| 240 | 240 | + " AND weeks_year<=? AND ts > ? AND ts <=? AND up_down=? AND stop_no like ? order by ts"; |
| 241 | 241 | try{ |
| 242 | 242 | conn = DBUtils_MS.getConnection(); |
| ... | ... | @@ -2025,7 +2025,7 @@ public class ReportServiceImpl implements ReportService{ |
| 2025 | 2025 | public List<Map<String, Object>> lineList() { |
| 2026 | 2026 | // TODO Auto-generated method stub |
| 2027 | 2027 | List<Map<String, Object>> list=new ArrayList<Map<String,Object>>(); |
| 2028 | - Iterator<Line> iterator = lineRepository.findAll().iterator(); | |
| 2028 | + Iterator<Line> iterator = lineRepository.findAllService().iterator(); | |
| 2029 | 2029 | Line line; |
| 2030 | 2030 | while (iterator.hasNext()) { |
| 2031 | 2031 | line = iterator.next(); |
| ... | ... | @@ -2179,8 +2179,8 @@ public class ReportServiceImpl implements ReportService{ |
| 2179 | 2179 | Connection conn = null; |
| 2180 | 2180 | PreparedStatement ps = null; |
| 2181 | 2181 | ResultSet rs = null; |
| 2182 | - | |
| 2183 | - String sql = "select * from bsth_c_arrival_info where line_id=? AND weeks_year=? " | |
| 2182 | + String year=date.substring(0,4); | |
| 2183 | + String sql = "select * from bsth_c_arrival_info_"+year+" where line_id=? AND weeks_year=? " | |
| 2184 | 2184 | + " AND ts >= ? AND ts <=? AND up_down=? order by device_id,ts"; |
| 2185 | 2185 | try{ |
| 2186 | 2186 | conn = DBUtils_MS.getConnection(); |
| ... | ... | @@ -2229,8 +2229,8 @@ public class ReportServiceImpl implements ReportService{ |
| 2229 | 2229 | Connection conn = null; |
| 2230 | 2230 | PreparedStatement ps = null; |
| 2231 | 2231 | ResultSet rs = null; |
| 2232 | - | |
| 2233 | - String sql = "select * from bsth_c_arrival_info where line_id=? AND weeks_year=? " | |
| 2232 | + String year=date.substring(0,4); | |
| 2233 | + String sql = "select * from bsth_c_arrival_info_"+year+" where line_id=? AND weeks_year=? " | |
| 2234 | 2234 | + " AND ts >= ? AND ts <=? AND up_down=? order by device_id,ts"; |
| 2235 | 2235 | try{ |
| 2236 | 2236 | conn = DBUtils_MS.getConnection(); |
| ... | ... | @@ -3529,7 +3529,7 @@ public class ReportServiceImpl implements ReportService{ |
| 3529 | 3529 | Long date1 = simpleDateFormat.parse(date+" 00:00:01").getTime(); |
| 3530 | 3530 | Long date2=simpleDateFormat.parse(date+" 23:59:59").getTime(); |
| 3531 | 3531 | Date dates=simpleDateFormat.parse(date+" 00:00:00"); |
| 3532 | - List<ArrivalInfo> lists=load_online(line,date1,date2,dates); | |
| 3532 | + List<ArrivalInfo> lists=load_online(line,date1,date2,dates,date); | |
| 3533 | 3533 | for (int i = 0; i < list.size(); i++) { |
| 3534 | 3534 | String nbbm=list.get(i); |
| 3535 | 3535 | String sbbb=BasicData.deviceId2NbbmMap.inverse().get(nbbm); |
| ... | ... | @@ -3582,7 +3582,7 @@ public class ReportServiceImpl implements ReportService{ |
| 3582 | 3582 | return map; |
| 3583 | 3583 | } |
| 3584 | 3584 | |
| 3585 | - public List<ArrivalInfo> load_online(String line,Long date1,Long date2,Date dates){ | |
| 3585 | + public List<ArrivalInfo> load_online(String line,Long date1,Long date2,Date dates,String date){ | |
| 3586 | 3586 | List<ArrivalInfo> list = null; |
| 3587 | 3587 | Calendar cal = Calendar.getInstance(); |
| 3588 | 3588 | cal.setTime(dates); |
| ... | ... | @@ -3592,8 +3592,8 @@ public class ReportServiceImpl implements ReportService{ |
| 3592 | 3592 | Connection conn = null; |
| 3593 | 3593 | PreparedStatement ps = null; |
| 3594 | 3594 | ResultSet rs = null; |
| 3595 | - | |
| 3596 | - String sql = "select * from bsth_c_arrival_info where line_id=? AND weeks_year=? AND ts > ? AND ts <=? order by ts"; | |
| 3595 | + String year=date.substring(0,4); | |
| 3596 | + String sql = "select * from bsth_c_arrival_info_"+year+" where line_id=? AND weeks_year=? AND ts > ? AND ts <=? order by ts"; | |
| 3597 | 3597 | try{ |
| 3598 | 3598 | conn = DBUtils_MS.getConnection(); |
| 3599 | 3599 | ps = conn.prepareStatement(sql); | ... | ... |
src/main/resources/static/pages/base/line/js/line-list-table.js
| ... | ... | @@ -101,7 +101,7 @@ |
| 101 | 101 | var len_ = array.length,paramsD = new Array(); |
| 102 | 102 | if(len_>0) { |
| 103 | 103 | $.each(array, function(i, g){ |
| 104 | - if(g.name!='' || g.name != null) { | |
| 104 | + if(g.remove != 1 && (g.name!='' || g.name != null)) { | |
| 105 | 105 | paramsD.push({'id':g.name + '_' + g.id + '_' + g.lineCode ,'text':g.name + gsdmTogsName(compD,g.company)}); |
| 106 | 106 | } |
| 107 | 107 | }); | ... | ... |
src/main/resources/static/pages/base/section/js/section-list-table.js
| ... | ... | @@ -147,7 +147,7 @@ |
| 147 | 147 | var len_ = array.length,paramsD = new Array(); |
| 148 | 148 | if(len_>0) { |
| 149 | 149 | $.each(array, function(i, g){ |
| 150 | - if(g.name!='' || g.name != null) { | |
| 150 | + if(g.remove != 1 && (g.name!='' || g.name != null)) { | |
| 151 | 151 | paramsD.push({'id':g.name + '_' + g.id + '_' + g.lineCode ,'text':g.name + gsdmTogsName(compD,g.company)}); |
| 152 | 152 | } |
| 153 | 153 | }); | ... | ... |
src/main/resources/static/pages/base/station/js/station-list-table.js
| ... | ... | @@ -173,7 +173,7 @@ |
| 173 | 173 | var len_ = array.length,paramsD = new Array(); |
| 174 | 174 | if(len_>0) { |
| 175 | 175 | $.each(array, function(i, g){ |
| 176 | - if(g.name!='' || g.name != null) { | |
| 176 | + if(g.remove != 1 && (g.name!='' || g.name != null)) { | |
| 177 | 177 | paramsD.push({'id':g.name + '_' + g.id + '_' + g.lineCode ,'text':g.name + gsdmTogsName(compD,g.company)}); |
| 178 | 178 | } |
| 179 | 179 | }); | ... | ... |
src/main/resources/static/pages/punctual/onTime.html
| ... | ... | @@ -152,7 +152,7 @@ |
| 152 | 152 | $('.menu-toggler.sidebar-toggler').click(); |
| 153 | 153 | |
| 154 | 154 | var d = new Date(); |
| 155 | - d.setTime(d.getTime() - 1*1000*60*60*24); | |
| 155 | + d.setTime(d.getTime() - 3*1000*60*60*24); | |
| 156 | 156 | var year = d.getFullYear(); |
| 157 | 157 | var month = d.getMonth() + 1; |
| 158 | 158 | var day = d.getDate(); | ... | ... |
src/main/resources/static/pages/trafficManage/js/lineStationUpload.js
| ... | ... | @@ -13,45 +13,49 @@ |
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | 15 | (function(){ |
| 16 | + function getComp(cb) { | |
| 17 | + $.get('/user/companyData',null,function(rs) { | |
| 18 | + return cb && cb(rs); | |
| 19 | + }); | |
| 20 | + } | |
| 21 | + | |
| 22 | + initLineSelect2(); | |
| 16 | 23 | |
| 17 | - $('#line').select2({ | |
| 18 | - ajax: { | |
| 19 | - url: '/realSchedule/findLine', | |
| 20 | - type: 'post', | |
| 21 | - dataType: 'json', | |
| 22 | - delay: 150, | |
| 23 | - data: function(params){ | |
| 24 | - return{line: params.term}; | |
| 25 | - }, | |
| 26 | - processResults: function (data) { | |
| 27 | - return { | |
| 28 | - results: data | |
| 29 | - }; | |
| 30 | - }, | |
| 31 | - cache: true | |
| 32 | - }, | |
| 33 | - templateResult: function(repo){ | |
| 34 | - if (repo.loading) return repo.text; | |
| 35 | - var h = '<span>'+repo.text+'</span>'; | |
| 36 | - return h; | |
| 37 | - }, | |
| 38 | - escapeMarkup: function (markup) { return markup; }, | |
| 39 | - minimumInputLength: 1, | |
| 40 | - templateSelection: function(repo){ | |
| 41 | - return repo.text; | |
| 42 | - }, | |
| 43 | - language: { | |
| 44 | - noResults: function(){ | |
| 45 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 46 | - }, | |
| 47 | - inputTooShort : function(e) { | |
| 48 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 49 | - }, | |
| 50 | - searching : function() { | |
| 51 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 24 | + function initLineSelect2(compD) { | |
| 25 | + getComp(function(rs) { | |
| 26 | + var params = {}; | |
| 27 | + if(rs.length>0) { | |
| 28 | + var compA = new Array(); | |
| 29 | + for(var c = 0 ; c<rs.length;c++) { | |
| 30 | + var comC = rs[c].companyCode; | |
| 31 | + var child = rs[c].children; | |
| 32 | + if(child.length>0) { | |
| 33 | + for(var d = 0 ;d< child.length;d++) { | |
| 34 | + compA.push(comC + '_' + child[d].code); | |
| 35 | + } | |
| 36 | + }else { | |
| 37 | + compA.push(comC); | |
| 38 | + } | |
| 39 | + } | |
| 40 | + params.cgsbm_in = compA.toString(); | |
| 52 | 41 | } |
| 53 | - } | |
| 54 | - }); | |
| 42 | + params["remove_ne"] = 1; | |
| 43 | + // 填充线路拉框选择值 | |
| 44 | + $get('/line/all', params, function(array){ | |
| 45 | + var len_ = array.length,paramsD = new Array(); | |
| 46 | + if(len_>0) { | |
| 47 | + $.each(array, function(i, g){ | |
| 48 | + if(g.name!='' || g.name != null) { | |
| 49 | + paramsD.push({'id':g.id ,'text':g.name}); | |
| 50 | + } | |
| 51 | + }); | |
| 52 | + initPinYinSelect2($('#line'),paramsD,function(selector) { | |
| 53 | + selector.select2("val", storage.xlName_AgursData); | |
| 54 | + }); | |
| 55 | + } | |
| 56 | + }); | |
| 57 | + }); | |
| 58 | + } | |
| 55 | 59 | |
| 56 | 60 | // 绑定查询事件 |
| 57 | 61 | $("#search").click(searchM); | ... | ... |
src/main/resources/static/pages/trafficManage/js/lineStationUploadRecord.js
src/main/resources/static/pages/trafficManage/js/shLineCodeList.js
| ... | ... | @@ -34,8 +34,9 @@ |
| 34 | 34 | } |
| 35 | 35 | var lines = new Array(); |
| 36 | 36 | var gsmap = getBusMap(); |
| 37 | + var pars = {"remove_ne":1}; | |
| 37 | 38 | // 取得所有线路 |
| 38 | - $get('/line/all', null, function(allLine) { | |
| 39 | + $get('/line/all', pars, function(allLine) { | |
| 39 | 40 | // 遍历数组 |
| 40 | 41 | $.each(allLine, function(i, e) { |
| 41 | 42 | var companyCode = e.company; | ... | ... |
src/main/resources/static/pages/trafficManage/js/timeTempletUpload.js
| ... | ... | @@ -13,66 +13,51 @@ |
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | 15 | (function(){ |
| 16 | - /** | |
| 17 | - * 取得编码-公司map | |
| 18 | - * gsmap["5"] = 南汇公司 | |
| 19 | - * gsmap["5_3"] = 芦潮港分公司 | |
| 20 | - */ | |
| 21 | - function getBusMap(){ | |
| 22 | - // 取得公司信息,替换公司编码 | |
| 23 | - var gsmap = {}; | |
| 24 | - $get('/business/all', null, function(array){ | |
| 25 | - $.each(array, function(i, gs){ | |
| 26 | - var k = gs.upCode + '_' + gs.businessCode; | |
| 27 | - if(gs.upCode === '88'){ | |
| 28 | - k = gs.businessCode; | |
| 29 | - } | |
| 30 | - gsmap[k] = gs.businessName; | |
| 31 | - }); | |
| 32 | - }); | |
| 33 | - return gsmap; | |
| 34 | - } | |
| 35 | - var lines = new Array(); | |
| 36 | - var gsmap = getBusMap(); | |
| 37 | - | |
| 38 | - $('#line').select2({ | |
| 39 | - ajax: { | |
| 40 | - url: '/realSchedule/findLine', | |
| 41 | - type: 'post', | |
| 42 | - dataType: 'json', | |
| 43 | - delay: 150, | |
| 44 | - data: function(params){ | |
| 45 | - return{line: params.term}; | |
| 46 | - }, | |
| 47 | - processResults: function (data) { | |
| 48 | - return { | |
| 49 | - results: data | |
| 50 | - }; | |
| 51 | - }, | |
| 52 | - cache: true | |
| 53 | - }, | |
| 54 | - templateResult: function(repo){ | |
| 55 | - if (repo.loading) return repo.text; | |
| 56 | - var h = '<span>'+repo.text+'</span>'; | |
| 57 | - return h; | |
| 58 | - }, | |
| 59 | - escapeMarkup: function (markup) { return markup; }, | |
| 60 | - minimumInputLength: 1, | |
| 61 | - templateSelection: function(repo){ | |
| 62 | - return repo.text; | |
| 63 | - }, | |
| 64 | - language: { | |
| 65 | - noResults: function(){ | |
| 66 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 67 | - }, | |
| 68 | - inputTooShort : function(e) { | |
| 69 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 70 | - }, | |
| 71 | - searching : function() { | |
| 72 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 73 | - } | |
| 74 | - } | |
| 75 | - }); | |
| 16 | + | |
| 17 | + function getComp(cb) { | |
| 18 | + $.get('/user/companyData',null,function(rs) { | |
| 19 | + return cb && cb(rs); | |
| 20 | + }); | |
| 21 | + } | |
| 22 | + | |
| 23 | + initLineSelect2(); | |
| 24 | + | |
| 25 | + function initLineSelect2(compD) { | |
| 26 | + getComp(function(rs) { | |
| 27 | + var params = {}; | |
| 28 | + if(rs.length>0) { | |
| 29 | + var compA = new Array(); | |
| 30 | + for(var c = 0 ; c<rs.length;c++) { | |
| 31 | + var comC = rs[c].companyCode; | |
| 32 | + var child = rs[c].children; | |
| 33 | + if(child.length>0) { | |
| 34 | + for(var d = 0 ;d< child.length;d++) { | |
| 35 | + compA.push(comC + '_' + child[d].code); | |
| 36 | + } | |
| 37 | + }else { | |
| 38 | + compA.push(comC); | |
| 39 | + } | |
| 40 | + } | |
| 41 | + params.cgsbm_in = compA.toString(); | |
| 42 | + } | |
| 43 | + params["remove_ne"] = 1; | |
| 44 | + // 填充线路拉框选择值 | |
| 45 | + $get('/line/all', params, function(array){ | |
| 46 | + var len_ = array.length,paramsD = new Array(); | |
| 47 | + if(len_>0) { | |
| 48 | + $.each(array, function(i, g){ | |
| 49 | + if(g.name!='' || g.name != null) { | |
| 50 | + paramsD.push({'id':g.id ,'text':g.name}); | |
| 51 | + } | |
| 52 | + }); | |
| 53 | + initPinYinSelect2($('#line'),paramsD,function(selector) { | |
| 54 | + selector.select2("val", storage.xlName_AgursData); | |
| 55 | + }); | |
| 56 | + } | |
| 57 | + }); | |
| 58 | + }); | |
| 59 | + } | |
| 60 | + | |
| 76 | 61 | |
| 77 | 62 | // 绑定查询事件 |
| 78 | 63 | $("#search").click(searchM); | ... | ... |
src/main/resources/static/pages/trafficManage/js/timeTempletUploadRecord.js