Commit 0aec0bd1c05be6e2f649f15b9e7988f3bde36655
1 parent
41b11750
报表
Showing
6 changed files
with
898 additions
and
43 deletions
src/main/java/com/bsth/controller/report/ReportController.java
| @@ -48,5 +48,25 @@ public class ReportController { | @@ -48,5 +48,25 @@ public class ReportController { | ||
| 48 | @RequestParam String code) { | 48 | @RequestParam String code) { |
| 49 | return service.historyMessageCount(line, date, code); | 49 | return service.historyMessageCount(line, date, code); |
| 50 | } | 50 | } |
| 51 | + | ||
| 52 | + @RequestMapping(value = "/tbodyTime1", method = RequestMethod.GET) | ||
| 53 | + public Map<String, Object> tbodyTime1(@RequestParam String line,@RequestParam String date) { | ||
| 54 | + return service.tbodyTime1(line, date); | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + @RequestMapping(value = "/tbodyTime2", method = RequestMethod.GET) | ||
| 58 | + public Map<String, Object> tbodyTime2(@RequestParam String line,@RequestParam String date) { | ||
| 59 | + return service.tbodyTime2(line, date); | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + @RequestMapping(value = "/tbodyTime3", method = RequestMethod.GET) | ||
| 63 | + public List<Map<String, Object>> tbodyTime3(@RequestParam String line,@RequestParam String date) { | ||
| 64 | + return service.tbodyTime3(line, date); | ||
| 65 | + } | ||
| 66 | + | ||
| 67 | + @RequestMapping(value = "/tbodyTime5", method = RequestMethod.GET) | ||
| 68 | + public List<Map<String, Object>> tbodyTime5(@RequestParam String line,@RequestParam String date) { | ||
| 69 | + return service.tbodyTime5(line, date); | ||
| 70 | + } | ||
| 51 | 71 | ||
| 52 | } | 72 | } |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| @@ -1145,7 +1145,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -1145,7 +1145,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 1145 | || scheduleRealInfo.getBcType().equals("venting")){ | 1145 | || scheduleRealInfo.getBcType().equals("venting")){ |
| 1146 | ksgl += tempJhlc; | 1146 | ksgl += tempJhlc; |
| 1147 | }else{ | 1147 | }else{ |
| 1148 | - yygl += tempJhlc; | 1148 | + if(scheduleRealInfo.getStatus() != -1){ |
| 1149 | + yygl += tempJhlc; | ||
| 1150 | + } | ||
| 1149 | } | 1151 | } |
| 1150 | }else{ | 1152 | }else{ |
| 1151 | Iterator<ChildTaskPlan> it = childTaskPlans.iterator(); | 1153 | Iterator<ChildTaskPlan> it = childTaskPlans.iterator(); |
| @@ -1154,7 +1156,12 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -1154,7 +1156,12 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 1154 | if(childTaskPlan.getMileageType().equals("empty")){ | 1156 | if(childTaskPlan.getMileageType().equals("empty")){ |
| 1155 | ksgl += childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage(); | 1157 | ksgl += childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage(); |
| 1156 | }else{ | 1158 | }else{ |
| 1157 | - yygl += childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage(); | 1159 | + if(childTaskPlan.isDestroy()){ |
| 1160 | + remMileage += tempJhlc; | ||
| 1161 | + cjbc++; | ||
| 1162 | + }else{ | ||
| 1163 | + yygl += childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage(); | ||
| 1164 | + } | ||
| 1158 | } | 1165 | } |
| 1159 | } | 1166 | } |
| 1160 | } | 1167 | } |
src/main/java/com/bsth/service/report/ReportService.java
| @@ -18,4 +18,12 @@ public interface ReportService { | @@ -18,4 +18,12 @@ public interface ReportService { | ||
| 18 | List<Map<String, String>> sreachZd(String line,int zdlx,String zd); | 18 | List<Map<String, String>> sreachZd(String line,int zdlx,String zd); |
| 19 | 19 | ||
| 20 | List<Object[]> historyMessageCount(String line, String date, String code); | 20 | List<Object[]> historyMessageCount(String line, String date, String code); |
| 21 | + | ||
| 22 | + Map<String, Object> tbodyTime1(String line ,String date); | ||
| 23 | + | ||
| 24 | + Map<String, Object> tbodyTime2(String line ,String date); | ||
| 25 | + | ||
| 26 | + List<Map<String, Object>> tbodyTime3(String line ,String date); | ||
| 27 | + List<Map<String, Object>> tbodyTime5(String line ,String date); | ||
| 28 | + | ||
| 21 | } | 29 | } |
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
| @@ -3,6 +3,7 @@ import java.sql.Connection; | @@ -3,6 +3,7 @@ import java.sql.Connection; | ||
| 3 | import java.sql.PreparedStatement; | 3 | import java.sql.PreparedStatement; |
| 4 | import java.sql.ResultSet; | 4 | import java.sql.ResultSet; |
| 5 | import java.sql.SQLException; | 5 | import java.sql.SQLException; |
| 6 | +import java.text.DecimalFormat; | ||
| 6 | import java.text.ParseException; | 7 | import java.text.ParseException; |
| 7 | import java.text.SimpleDateFormat; | 8 | import java.text.SimpleDateFormat; |
| 8 | import java.util.ArrayList; | 9 | import java.util.ArrayList; |
| @@ -16,12 +17,15 @@ import org.slf4j.Logger; | @@ -16,12 +17,15 @@ import org.slf4j.Logger; | ||
| 16 | import org.slf4j.LoggerFactory; | 17 | import org.slf4j.LoggerFactory; |
| 17 | import org.springframework.beans.factory.annotation.Autowired; | 18 | import org.springframework.beans.factory.annotation.Autowired; |
| 18 | import org.springframework.jdbc.core.JdbcTemplate; | 19 | import org.springframework.jdbc.core.JdbcTemplate; |
| 20 | +import org.springframework.jdbc.core.RowMapper; | ||
| 19 | import org.springframework.stereotype.Service; | 21 | import org.springframework.stereotype.Service; |
| 20 | 22 | ||
| 21 | import com.bsth.data.BasicData; | 23 | import com.bsth.data.BasicData; |
| 22 | import com.bsth.entity.StationRoute; | 24 | import com.bsth.entity.StationRoute; |
| 23 | import com.bsth.entity.excep.ArrivalInfo; | 25 | import com.bsth.entity.excep.ArrivalInfo; |
| 26 | +import com.bsth.entity.oil.Ylb; | ||
| 24 | import com.bsth.entity.realcontrol.ScheduleRealInfo; | 27 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 28 | +import com.bsth.entity.schedule.SchedulePlanInfo; | ||
| 25 | import com.bsth.repository.StationRouteRepository; | 29 | import com.bsth.repository.StationRouteRepository; |
| 26 | import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; | 30 | import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; |
| 27 | import com.bsth.service.report.ReportService; | 31 | import com.bsth.service.report.ReportService; |
| @@ -252,5 +256,515 @@ public class ReportServiceImpl implements ReportService{ | @@ -252,5 +256,515 @@ public class ReportServiceImpl implements ReportService{ | ||
| 252 | List<Object[]> list = scheduleRealInfoRepository.historyMessageCount(line, date, code); | 256 | List<Object[]> list = scheduleRealInfoRepository.historyMessageCount(line, date, code); |
| 253 | return list; | 257 | return list; |
| 254 | } | 258 | } |
| 259 | + @Override | ||
| 260 | + public Map<String, Object> tbodyTime1(String line, String date) { | ||
| 261 | + DecimalFormat df = new DecimalFormat("#0.00"); | ||
| 262 | + // TODO Auto-generated method stub | ||
| 263 | + //查询配车 | ||
| 264 | + String sqlPc=" SELECT cl_zbh FROM bsth_c_s_sp_info " | ||
| 265 | + +" where DATE_FORMAT(schedule_date,'%Y-%m-%d') ='"+date+"' " | ||
| 266 | + + " and xl_bm='"+line+"' and bc_type='normal' " | ||
| 267 | + + " group by cl_zbh "; | ||
| 268 | + Map<String, Object> map=new HashMap<String,Object>(); | ||
| 269 | + List<Map<String, Object>> listPc= jdbcTemplate.query(sqlPc, | ||
| 270 | + new RowMapper<Map<String, Object>>(){ | ||
| 271 | + @Override | ||
| 272 | + public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 273 | + Map<String, Object> m=new HashMap<String,Object>(); | ||
| 274 | + m.put("zbh", rs.getString("cl_zbh")); | ||
| 275 | + return m; | ||
| 276 | + } | ||
| 277 | + }); | ||
| 278 | + //配车 | ||
| 279 | + int pcs=listPc.size(); | ||
| 280 | + | ||
| 281 | + | ||
| 282 | + String sqlPlan="select jhlc, bc_type ,fcsj from bsth_c_s_sp_info " | ||
| 283 | + + "where DATE_FORMAT(schedule_date,'%Y-%m-%d') ='"+date+"' and xl_bm='"+line+"'"; | ||
| 284 | + | ||
| 285 | + //班次 | ||
| 286 | + int zgf_0 = 6*60+31,zgf_1 = 8*60+30,wgf_0 = 16*60+1,wgf_1 = 18*60; | ||
| 287 | + int qcBc=0,qjBc=0,zqcBc=0,zqjBc=0,wqcBc=0,wqjBc=0; | ||
| 288 | + double zlc = 0 , yylc = 0,kslc=0; | ||
| 289 | + //查询班次 | ||
| 290 | + List<Map<String, Object>> listPlan= jdbcTemplate.query(sqlPlan, | ||
| 291 | + new RowMapper<Map<String, Object>>(){ | ||
| 292 | + @Override | ||
| 293 | + public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 294 | + Map<String, Object> m2=new HashMap<String,Object>(); | ||
| 295 | + m2.put("jhlc", rs.getDouble("jhlc")); | ||
| 296 | + m2.put("bcType", rs.getString("bc_type")); | ||
| 297 | + m2.put("fcsj", rs.getString("fcsj")); | ||
| 298 | + return m2; | ||
| 299 | + } | ||
| 300 | + }); | ||
| 301 | + | ||
| 302 | + for (int i = 0; i < listPlan.size(); i++) { | ||
| 303 | + Map<String, Object> m=listPlan.get(i); | ||
| 304 | + double jhlc=Double.parseDouble(m.get("jhlc").toString()); | ||
| 305 | + String bcType=m.get("bcType").toString(); | ||
| 306 | + String fcsjs[]=m.get("fcsj").toString().split(":"); | ||
| 307 | + | ||
| 308 | + zlc +=jhlc; | ||
| 309 | + if(bcType.equals("normal")){ | ||
| 310 | + qcBc ++; | ||
| 311 | + if((Integer.parseInt(fcsjs[0])*60+Integer.parseInt(fcsjs[1])) > zgf_0 | ||
| 312 | + && (Integer.parseInt(fcsjs[0])*60+Integer.parseInt(fcsjs[1])) < zgf_1){ | ||
| 313 | + zqcBc++; | ||
| 314 | + }else if((Integer.parseInt(fcsjs[0])*60+Integer.parseInt(fcsjs[1])) > wgf_0 | ||
| 315 | + && (Integer.parseInt(fcsjs[0])*60+Integer.parseInt(fcsjs[1])) < wgf_1){ | ||
| 316 | + wqcBc++; | ||
| 317 | + } | ||
| 318 | + yylc +=jhlc; | ||
| 319 | + }else if(bcType.equals("region")){ | ||
| 320 | + qjBc++; | ||
| 321 | + if((Integer.parseInt(fcsjs[0])*60+Integer.parseInt(fcsjs[1])) > zgf_0 | ||
| 322 | + && (Integer.parseInt(fcsjs[0])*60+Integer.parseInt(fcsjs[1])) < zgf_1){ | ||
| 323 | + zqjBc++; | ||
| 324 | + }else if((Integer.parseInt(fcsjs[0])*60+Integer.parseInt(fcsjs[1])) > wgf_0 | ||
| 325 | + && (Integer.parseInt(fcsjs[0])*60+Integer.parseInt(fcsjs[1])) < wgf_1){ | ||
| 326 | + wqjBc++; | ||
| 327 | + } | ||
| 328 | + | ||
| 329 | + yylc+=jhlc; | ||
| 330 | + }else{ | ||
| 331 | + kslc+=jhlc; | ||
| 332 | + } | ||
| 333 | + } | ||
| 334 | + | ||
| 335 | + map.put("pcs", pcs); | ||
| 336 | + map.put("qcbc", qcBc); | ||
| 337 | + map.put("qjbc", qjBc); | ||
| 338 | + map.put("zqcbc", zqcBc); | ||
| 339 | + map.put("zqjbc", zqjBc); | ||
| 340 | + map.put("wqcbc", wqcBc); | ||
| 341 | + map.put("wqjbc", wqjBc); | ||
| 342 | + map.put("zlc", df.format( zlc)); | ||
| 343 | + map.put("yylc", df.format(yylc)); | ||
| 344 | + map.put("kslc",df.format( kslc)); | ||
| 345 | + //查询里程 | ||
| 346 | + return map; | ||
| 347 | + } | ||
| 348 | + @Override | ||
| 349 | + public Map<String, Object> tbodyTime2(String line, String date) { | ||
| 350 | + DecimalFormat df = new DecimalFormat("#0.00"); | ||
| 351 | + // TODO Auto-generated method stub | ||
| 352 | + //查询配车 | ||
| 353 | + String sqlPc=" SELECT sum(bcsj) as yysj ,sum(jhlc) as yygl FROM bsth_c_s_sp_info " | ||
| 354 | + +" where DATE_FORMAT(schedule_date,'%Y-%m-%d') ='"+date+"' " | ||
| 355 | + + " and xl_bm='"+line+"' and bc_type in ('normal' ,'region' )"; | ||
| 356 | + Map<String, Object> map=new HashMap<String,Object>(); | ||
| 357 | + List<Map<String, Object>> list= jdbcTemplate.query(sqlPc, | ||
| 358 | + new RowMapper<Map<String, Object>>(){ | ||
| 359 | + @Override | ||
| 360 | + public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 361 | + Map<String, Object> m=new HashMap<String,Object>(); | ||
| 362 | + m.put("yysj", rs.getInt("yysj")); | ||
| 363 | + m.put("yygl", rs.getString("yygl")==null?"0":rs.getString("yygl")); | ||
| 364 | + return m; | ||
| 365 | + } | ||
| 366 | + }); | ||
| 367 | + int yysj=0 ; | ||
| 368 | + double yycs=0 ,yygl=0; | ||
| 369 | + if(list.size()>0){ | ||
| 370 | + Map<String, Object> m=list.get(0); | ||
| 371 | + yysj=Integer.parseInt((m.get("yysj").toString())); | ||
| 372 | + yygl=Double.parseDouble(m.get("yygl").toString()); | ||
| 373 | + } | ||
| 374 | + if(yysj>0){ | ||
| 375 | + yycs =yygl/(yysj*1.0/60); | ||
| 376 | + } | ||
| 377 | + int hh=yysj/60; | ||
| 378 | + int mm=yysj%60; | ||
| 379 | + | ||
| 380 | + map.put("yysj", hh+":"+mm); | ||
| 381 | + map.put("yycs", df.format(yycs)+"公里/小时"); | ||
| 382 | +// map.put(key, value) | ||
| 383 | + return map; | ||
| 384 | + } | ||
| 255 | 385 | ||
| 386 | + public static void main(String[] args) { | ||
| 387 | + System.out.println(609360/60); | ||
| 388 | + System.out.println(609360%60); | ||
| 389 | + } | ||
| 390 | + @Override | ||
| 391 | + public List<Map<String, Object>> tbodyTime3(String line, String date) { | ||
| 392 | + // TODO Auto-generated method stub | ||
| 393 | + List<Map<String, Object>> list=new ArrayList<Map<String,Object>>(); | ||
| 394 | + String sqlZd=" select qdz_name, count(cl_zbh) as cls , 'zqc' as lx from bsth_c_s_sp_info where " | ||
| 395 | + + " DATE_FORMAT(schedule_date,'%Y-%m-%d') ='"+date+"' and xl_bm='"+line+"' and bc_type='normal' " | ||
| 396 | + + " and fcsj>'06:31' and fcsj<'08:00' group by qdz_name union " | ||
| 397 | + + " select qdz_name, count(cl_zbh) as cls , 'wqc' as lx from bsth_c_s_sp_info " | ||
| 398 | + + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') ='"+date+"' and xl_bm='"+line+"' " | ||
| 399 | + + " and bc_type='normal' and fcsj>'16:01' and fcsj<'18:00' group by qdz_name union " | ||
| 400 | + + " select qdz_name, count(cl_zbh) as cls , 'zqj' as lx from bsth_c_s_sp_info " | ||
| 401 | + + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') ='"+date+"' and xl_bm='"+line+"' " | ||
| 402 | + + " and bc_type='region' and fcsj>'06:31' and fcsj<'08:00' group by qdz_name union " | ||
| 403 | + + " select qdz_name, count(cl_zbh) as cls , 'wqj' as lx from bsth_c_s_sp_info " | ||
| 404 | + + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') ='"+date+"' and xl_bm='"+line+"' " | ||
| 405 | + + " and bc_type='region' and fcsj>'16:01' and fcsj<'18:00'group by qdz_name"; | ||
| 406 | + | ||
| 407 | + List<Map<String, Object>> lists= jdbcTemplate.query(sqlZd, | ||
| 408 | + new RowMapper<Map<String, Object>>(){ | ||
| 409 | + @Override | ||
| 410 | + public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 411 | + Map<String, Object> m=new HashMap<String,Object>(); | ||
| 412 | + m.put("zdm", rs.getString("qdz_name")); | ||
| 413 | + m.put("cls", rs.getString("cls")); | ||
| 414 | + m.put("lx", rs.getString("lx")); | ||
| 415 | + return m; | ||
| 416 | + } | ||
| 417 | + }); | ||
| 418 | + int a=0; | ||
| 419 | + int b=0; | ||
| 420 | + int c=0; | ||
| 421 | + int d=0; | ||
| 422 | + for(int i=0;i<lists.size();i++){ | ||
| 423 | + boolean fage=true; | ||
| 424 | + Map<String, Object> newMap= new HashMap<String, Object>(); | ||
| 425 | + list.add(newMap); | ||
| 426 | + Map<String, Object> maps=lists.get(i); | ||
| 427 | + if(maps.get("lx").equals("zqc")){ | ||
| 428 | + list.get(a).put("zqcZm", maps.get("zdm")); | ||
| 429 | + list.get(a).put("zqcCls", maps.get("cls")); | ||
| 430 | + a++; | ||
| 431 | + fage=false; | ||
| 432 | + }else if(maps.get("lx").equals("wqc")){ | ||
| 433 | + list.get(b).put("wqcZm", maps.get("zdm")); | ||
| 434 | + list.get(b).put("wqcCls", maps.get("cls")); | ||
| 435 | + b++; | ||
| 436 | + fage=false; | ||
| 437 | + }else if(maps.get("lx").equals("zqj")){ | ||
| 438 | + list.get(c).put("zqjZm", maps.get("zdm")); | ||
| 439 | + list.get(c).put("zqjCls", maps.get("cls")); | ||
| 440 | + c++; | ||
| 441 | + fage=false; | ||
| 442 | + }else if(maps.get("lx").equals("wqj")){ | ||
| 443 | + list.get(d).put("wqjZm", maps.get("zdm")); | ||
| 444 | + list.get(d).put("wqjCls", maps.get("cls")); | ||
| 445 | + d++; | ||
| 446 | + fage=false; | ||
| 447 | + } | ||
| 448 | + if(fage){ | ||
| 449 | + break; | ||
| 450 | + } | ||
| 451 | + } | ||
| 452 | + boolean status=true; | ||
| 453 | + while (status) { | ||
| 454 | + for (int i = 0; i < list.size(); i++) { | ||
| 455 | + if(list.get(i).isEmpty()){ | ||
| 456 | + list.remove(i); | ||
| 457 | + status=true; | ||
| 458 | + }else{ | ||
| 459 | + status=false; | ||
| 460 | + } | ||
| 461 | + } | ||
| 462 | + | ||
| 463 | + } | ||
| 464 | + return list; | ||
| 465 | + } | ||
| 466 | + @Override | ||
| 467 | + public List<Map<String, Object>> tbodyTime5(String line, String date) { | ||
| 468 | + // TODO Auto-generated method stub | ||
| 469 | + String sql="select min(fcsj) as fcsj,'lx0' as lx from bsth_c_s_sp_info where " | ||
| 470 | + + " DATE_FORMAT(schedule_date,'%Y-%m-%d') ='"+date+"' and xl_bm='"+line+"'" | ||
| 471 | + + " and bc_type='out' and xl_dir=0 union " | ||
| 472 | + + " select min(fcsj) as fcsj,'lx1' as lx from bsth_c_s_sp_info where " | ||
| 473 | + + " DATE_FORMAT(schedule_date,'%Y-%m-%d') ='"+date+"' and xl_bm='"+line+"'" | ||
| 474 | + + " and bc_type='out' and xl_dir=1"; | ||
| 475 | + List<Map<String, Object>> lists= jdbcTemplate.query(sql, | ||
| 476 | + new RowMapper<Map<String, Object>>(){ | ||
| 477 | + @Override | ||
| 478 | + public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 479 | + Map<String, Object> m=new HashMap<String,Object>(); | ||
| 480 | + m.put("lx", rs.getString("lx")); | ||
| 481 | + m.put("fcsj", rs.getString("fcsj")); | ||
| 482 | + return m; | ||
| 483 | + } | ||
| 484 | + }); | ||
| 485 | + | ||
| 486 | + String sqlList="select * from bsth_c_s_sp_info where " | ||
| 487 | + + "DATE_FORMAT(schedule_date,'%Y-%m-%d') ='"+date+"' and xl_bm='"+line+"'" | ||
| 488 | + + " and bc_type='normal' order by fcsj"; | ||
| 489 | + List<SchedulePlanInfo> list= jdbcTemplate.query(sqlList, | ||
| 490 | + new RowMapper<SchedulePlanInfo>(){ | ||
| 491 | + @Override | ||
| 492 | + public SchedulePlanInfo mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 493 | + SchedulePlanInfo m=new SchedulePlanInfo(); | ||
| 494 | + m.setBcsj(rs.getInt("bcsj")); | ||
| 495 | + m.setXlDir(rs.getString("xl_dir")); | ||
| 496 | + m.setFcsj(rs.getString("fcsj")); | ||
| 497 | + return m; | ||
| 498 | + } | ||
| 499 | + }); | ||
| 500 | + //上下行最早发车时间 (用于与夜班线 跨零点的班次进行比较) | ||
| 501 | + String lx0=""; | ||
| 502 | + String lx1=""; | ||
| 503 | + for (int x = 0; x < lists.size(); x++) { | ||
| 504 | + if(lists.get(x).get("lx").equals("lx0")){ | ||
| 505 | + lx0=lists.get(x).get("fcsj").toString(); | ||
| 506 | + }else{ | ||
| 507 | + lx1=lists.get(x).get("fcsj").toString(); | ||
| 508 | + } | ||
| 509 | + } | ||
| 510 | + | ||
| 511 | + String[] lx0sj = lx0.split(":"); | ||
| 512 | + int sxFc=Integer.parseInt(lx0sj[0])*60+Integer.parseInt(lx0sj[1]); | ||
| 513 | + String[] lx1sj = lx1.split(":"); | ||
| 514 | + int xxFc=Integer.parseInt(lx1sj[0])*60+Integer.parseInt(lx1sj[1]); | ||
| 515 | + //班次 | ||
| 516 | + int sj_0 = 6*60+31,sj_1 = 8*60+30,sj_2 = 16*60+1,sj_3 = 18*60; | ||
| 517 | + | ||
| 518 | + //顺序 出场--早高峰---中午---晚高峰---进场 | ||
| 519 | + //实驶时间时间(分),0为上行,1为下行 | ||
| 520 | + int ccsj0=0,ccsj1=0,zgf0=0,zgf1=0,zw0=0,zw1=0,wgf0=0,wgf1=0,jcsj0=0,jcsj1=0; | ||
| 521 | + | ||
| 522 | + //记录上一个发车时间(方便记录间距) | ||
| 523 | + int cfc0=0,cfc1=0,zfc0=0,zfc1=0,zwfc0=0,zwfc1=0,wfc0=0,wfc1=0,jcfc0Z=0,jcfc1Z=0,jcfc0W=0,jcfc1W=0; | ||
| 524 | + //车距 (发车时间的间距) i--MIN a--MAX | ||
| 525 | + int iC=999,aC=-1,iZg=999,aZg=-1,iZw=999,aZw=-1,iWg=999,aWg=-1,iJcZ=999,aJcZ=-1,iJcW=999,aJcW=-1; | ||
| 526 | + int iC1=999,aC1=-1,iZg1=999,aZg1=-1,iZw1=999,aZw1=-1,iWg1=999,aWg1=-1,iJc1Z=999,aJc1Z=-1,iJc1W=999,aJc1W=-1; | ||
| 527 | +// List<ScheduleRealInfo> list = scheduleRealInfoRepository.scheduleByDateAndLine(line, date); | ||
| 528 | + for(int i=0;i<list.size();i++){ | ||
| 529 | + SchedulePlanInfo t=list.get(i); | ||
| 530 | + String xlDir=t.getXlDir(); | ||
| 531 | + int bcsj=t.getBcsj(); | ||
| 532 | + String fcsj=t.getFcsj(); | ||
| 533 | + String[] fcsjs=fcsj.split(":"); | ||
| 534 | + int fcsjNum=Integer.parseInt(fcsjs[0])*60+Integer.parseInt(fcsjs[1]); | ||
| 535 | + | ||
| 536 | + if(xlDir.equals("0")){ | ||
| 537 | + if(fcsjNum>=sxFc && fcsjNum<sj_0){ | ||
| 538 | + ccsj0 +=bcsj; | ||
| 539 | + if(aC<0){ | ||
| 540 | + cfc0 =fcsjNum; | ||
| 541 | + aC=0; | ||
| 542 | + }else{ | ||
| 543 | + if(fcsjNum-cfc0<iC){ | ||
| 544 | + iC=fcsjNum-cfc0; | ||
| 545 | + } | ||
| 546 | + if(fcsjNum-cfc0>aC){ | ||
| 547 | + aC=fcsjNum-cfc0; | ||
| 548 | + } | ||
| 549 | + | ||
| 550 | + cfc0=fcsjNum; | ||
| 551 | + } | ||
| 552 | + | ||
| 553 | + }else if(fcsjNum>=sj_0 && fcsjNum<=sj_1){ | ||
| 554 | + zgf0 +=bcsj; | ||
| 555 | + if(aZg<0){ | ||
| 556 | + zfc0 =fcsjNum; | ||
| 557 | + aZg=0; | ||
| 558 | + }else{ | ||
| 559 | + if(fcsjNum-zfc0<iZg){ | ||
| 560 | + iZg=fcsjNum-zfc0; | ||
| 561 | + } | ||
| 562 | + | ||
| 563 | + if(fcsjNum-zfc0>aZg){ | ||
| 564 | + aZg=fcsjNum-zfc0; | ||
| 565 | + } | ||
| 566 | + | ||
| 567 | + zfc0=fcsjNum; | ||
| 568 | + } | ||
| 569 | + }else if(fcsjNum>sj_1 && fcsjNum<sj_2){ | ||
| 570 | + zw0 +=bcsj; | ||
| 571 | + if(aZw<0){ | ||
| 572 | + zwfc0 =fcsjNum; | ||
| 573 | + aZw=0; | ||
| 574 | + }else{ | ||
| 575 | + if(fcsjNum-zwfc0<iZw){ | ||
| 576 | + iZw=fcsjNum-zwfc0; | ||
| 577 | + } | ||
| 578 | + if(fcsjNum-zwfc0>aZw){ | ||
| 579 | + aZw=fcsjNum-zwfc0; | ||
| 580 | + } | ||
| 581 | + zwfc0=fcsjNum; | ||
| 582 | + } | ||
| 583 | + | ||
| 584 | + }else if(fcsjNum>=sj_2 && fcsjNum<=sj_3){ | ||
| 585 | + wgf0 +=bcsj; | ||
| 586 | + if(aWg<0){ | ||
| 587 | + wfc0=fcsjNum; | ||
| 588 | + aWg=0; | ||
| 589 | + }else{ | ||
| 590 | + if(fcsjNum-wfc0<iWg){ | ||
| 591 | + iWg=fcsjNum-wfc0; | ||
| 592 | + } | ||
| 593 | + if(fcsjNum-wfc0>aWg){ | ||
| 594 | + aWg=fcsjNum-wfc0; | ||
| 595 | + } | ||
| 596 | + wfc0=fcsjNum; | ||
| 597 | + } | ||
| 598 | + }else if(fcsjNum>sj_3){ | ||
| 599 | + jcsj0 +=bcsj; | ||
| 600 | + if(aJcW<0){ | ||
| 601 | + jcfc0W=fcsjNum; | ||
| 602 | + aJcW=0; | ||
| 603 | + }else{ | ||
| 604 | + if(fcsjNum-jcfc0W<iJcW){ | ||
| 605 | + iJcW=fcsjNum-jcfc0W; | ||
| 606 | + } | ||
| 607 | + if(fcsjNum-jcfc0W>aJcW){ | ||
| 608 | + aJcW=fcsjNum-jcfc0W; | ||
| 609 | + } | ||
| 610 | + jcfc0W=fcsjNum; | ||
| 611 | + } | ||
| 612 | + }else if(fcsjNum<sxFc){ | ||
| 613 | + jcsj0 +=bcsj; | ||
| 614 | + if(aJcZ<0){ | ||
| 615 | + jcfc0Z=fcsjNum; | ||
| 616 | + aJcZ=0; | ||
| 617 | + }else{ | ||
| 618 | + if(fcsjNum-jcfc0Z<iJcZ){ | ||
| 619 | + iJcZ=fcsjNum-jcfc0Z; | ||
| 620 | + } | ||
| 621 | + if(fcsjNum-jcfc0Z>aJcZ){ | ||
| 622 | + aJcZ=fcsjNum-jcfc0Z; | ||
| 623 | + } | ||
| 624 | + jcfc0Z=fcsjNum; | ||
| 625 | + } | ||
| 626 | + } | ||
| 627 | + | ||
| 628 | + | ||
| 629 | + }else{ | ||
| 630 | + if(fcsjNum>=xxFc && fcsjNum<sj_0){ | ||
| 631 | + ccsj1 +=bcsj; | ||
| 632 | + if(aC1<0){ | ||
| 633 | + cfc1=fcsjNum; | ||
| 634 | + aC1=0; | ||
| 635 | + }else{ | ||
| 636 | + if(fcsjNum-cfc1<iC1){ | ||
| 637 | + iC1=fcsjNum-cfc1; | ||
| 638 | + } | ||
| 639 | + if(fcsjNum-cfc1>aC1){ | ||
| 640 | + aC1=fcsjNum-cfc1; | ||
| 641 | + } | ||
| 642 | + cfc1=fcsjNum; | ||
| 643 | + } | ||
| 644 | + }else if(fcsjNum>=sj_0 && fcsjNum<=sj_1){ | ||
| 645 | + zgf1 +=bcsj; | ||
| 646 | + if(aZg1<0){ | ||
| 647 | + zfc1=fcsjNum; | ||
| 648 | + aZg1=0; | ||
| 649 | + }else{ | ||
| 650 | + if(fcsjNum-zfc1<iZg1){ | ||
| 651 | + iZg1=fcsjNum-zfc1; | ||
| 652 | + } | ||
| 653 | + if(fcsjNum-zfc1>aZg1){ | ||
| 654 | + aZg1=fcsjNum-zfc1; | ||
| 655 | + } | ||
| 656 | + | ||
| 657 | + zfc1=fcsjNum; | ||
| 658 | + } | ||
| 659 | + }else if(fcsjNum>sj_1 && fcsjNum<sj_2){ | ||
| 660 | + zw1 +=bcsj; | ||
| 661 | + if(aZw1<0){ | ||
| 662 | + zwfc1=fcsjNum; | ||
| 663 | + aZw1=0; | ||
| 664 | + }else{ | ||
| 665 | + if(fcsjNum-zwfc1<iZw1){ | ||
| 666 | + iZw1=fcsjNum-zwfc1; | ||
| 667 | + } | ||
| 668 | + if(fcsjNum-zwfc1>aZw1){ | ||
| 669 | + aZw1=fcsjNum-zwfc1; | ||
| 670 | + } | ||
| 671 | + zwfc1=fcsjNum; | ||
| 672 | + } | ||
| 673 | + }else if(fcsjNum>=sj_2 && fcsjNum<=sj_3){ | ||
| 674 | + wgf1 +=bcsj; | ||
| 675 | + if(aWg1<0){ | ||
| 676 | + wfc1=fcsjNum; | ||
| 677 | + aWg1=0; | ||
| 678 | + }else{ | ||
| 679 | + if(fcsjNum-wfc1<iWg1){ | ||
| 680 | + iWg1=fcsjNum-wfc1; | ||
| 681 | + } | ||
| 682 | + if(fcsjNum-wfc1<aWg1){ | ||
| 683 | + aWg1=fcsjNum-wfc1; | ||
| 684 | + } | ||
| 685 | + wfc1=fcsjNum; | ||
| 686 | + } | ||
| 687 | + }else if(fcsjNum>sj_3){ | ||
| 688 | + jcsj1 +=bcsj; | ||
| 689 | + if(aJc1W<0){ | ||
| 690 | + jcfc1W=fcsjNum; | ||
| 691 | + aJc1W=0; | ||
| 692 | + }else{ | ||
| 693 | + if(fcsjNum-jcfc1W<iJc1W){ | ||
| 694 | + aJc1W=fcsjNum-jcfc1W; | ||
| 695 | + } | ||
| 696 | + if(fcsjNum-jcfc1W>aJc1W){ | ||
| 697 | + aJc1W=fcsjNum-jcfc1W; | ||
| 698 | + } | ||
| 699 | + | ||
| 700 | + jcfc1W=fcsjNum; | ||
| 701 | + } | ||
| 702 | + }else if(fcsjNum<xxFc){ | ||
| 703 | + jcsj1 +=bcsj; | ||
| 704 | + if(aJc1Z<0){ | ||
| 705 | + jcfc1Z=fcsjNum; | ||
| 706 | + aJc1Z=0; | ||
| 707 | + }else{ | ||
| 708 | + if(fcsjNum-jcfc1Z<iJc1Z){ | ||
| 709 | + aJc1Z=fcsjNum-jcfc1Z; | ||
| 710 | + } | ||
| 711 | + if(fcsjNum-jcfc1Z>aJc1Z){ | ||
| 712 | + aJc1Z=fcsjNum-jcfc1Z; | ||
| 713 | + } | ||
| 714 | + | ||
| 715 | + jcfc1Z=fcsjNum; | ||
| 716 | + } | ||
| 717 | + } | ||
| 718 | + } | ||
| 719 | + | ||
| 720 | + } | ||
| 721 | + | ||
| 722 | + | ||
| 723 | + List<Map<String, Object>> newList=new ArrayList<Map<String,Object>>(); | ||
| 724 | + Map<String, Object> newmap1=new HashMap<String,Object>(); | ||
| 725 | + Map<String, Object> newmap2=new HashMap<String,Object>(); | ||
| 726 | + Map<String, Object> newmap3=new HashMap<String,Object>(); | ||
| 727 | + Map<String, Object> newmap4=new HashMap<String,Object>(); | ||
| 728 | + Map<String, Object> newmap5=new HashMap<String,Object>(); | ||
| 729 | + newmap1.put("sjd", "(首)——6:30"); | ||
| 730 | + newmap1.put("sxsj", ccsj0); | ||
| 731 | + newmap1.put("xxsj", ccsj1); | ||
| 732 | + newmap1.put("fqsj", ccsj0+ccsj1); | ||
| 733 | + newmap1.put("cj", (iC-iC1>0?iC1:iC)+"——"+(aC-aC1>0?aC:aC1)); | ||
| 734 | + | ||
| 735 | + newmap2.put("sjd", "6:31——8:30"); | ||
| 736 | + newmap2.put("sxsj", zgf0); | ||
| 737 | + newmap2.put("xxsj", zgf1); | ||
| 738 | + newmap2.put("fqsj", zgf1+zgf0); | ||
| 739 | + newmap2.put("cj", (iZg-iZg1>0?iZg1:iZg)+"——"+(aZg-aZg1>0?aZg:aZg1)); | ||
| 740 | + | ||
| 741 | + newmap3.put("sjd", "8:30——16:00"); | ||
| 742 | + newmap3.put("sxsj", zw0); | ||
| 743 | + newmap3.put("xxsj", zw1); | ||
| 744 | + newmap3.put("fqsj", zw0+zw1); | ||
| 745 | + newmap3.put("cj", (iZw-iZw1>0?iZw1:iZw)+"——"+(aZw-aZw1>0?aZw:aZw1)); | ||
| 746 | + | ||
| 747 | + newmap4.put("sjd", "16:01——18:00"); | ||
| 748 | + newmap4.put("sxsj", wgf0); | ||
| 749 | + newmap4.put("xxsj", wgf1); | ||
| 750 | + newmap4.put("fqsj", wgf0+wgf1); | ||
| 751 | + newmap4.put("cj", (iWg-iWg1>0?iWg1:iWg)+"——"+(aWg-aWg1>0?aWg:aWg1)); | ||
| 752 | + | ||
| 753 | + newmap5.put("sjd", "18:00——(末)"); | ||
| 754 | + newmap5.put("sxsj", jcsj0); | ||
| 755 | + newmap5.put("xxsj", jcsj1); | ||
| 756 | + newmap5.put("fqsj", jcsj0+jcsj1); | ||
| 757 | + int min0=iJcZ-iJcW>0?iJcW:iJcZ; | ||
| 758 | + int max0=aJcZ-aJcW>0?aJcZ:aJcW; | ||
| 759 | + int min1=iJc1Z-iJc1W>0?iJc1W:iJc1Z; | ||
| 760 | + int max1=aJc1Z-aJc1W>0?aJc1Z:aJc1W; | ||
| 761 | + newmap5.put("cj", (min0-min1>0?min1:min0)+"——"+(max0-max1>0?max0:max1)); | ||
| 762 | + | ||
| 763 | + newList.add(newmap1); | ||
| 764 | + newList.add(newmap2); | ||
| 765 | + newList.add(newmap3); | ||
| 766 | + newList.add(newmap4); | ||
| 767 | + newList.add(newmap5); | ||
| 768 | + return newList; | ||
| 769 | + } | ||
| 256 | } | 770 | } |
src/main/resources/static/pages/forms/statement/changetochange.html
| @@ -28,7 +28,7 @@ | @@ -28,7 +28,7 @@ | ||
| 28 | 28 | ||
| 29 | <div class="page-head"> | 29 | <div class="page-head"> |
| 30 | <div class="page-title"> | 30 | <div class="page-title"> |
| 31 | - <h1>换人换车情况统计表</h1> | 31 | + <h1>鎹汉鎹㈣溅鎯呭喌缁熻琛</h1> |
| 32 | </div> | 32 | </div> |
| 33 | </div> | 33 | </div> |
| 34 | 34 | ||
| @@ -38,28 +38,28 @@ | @@ -38,28 +38,28 @@ | ||
| 38 | <div class="portlet-title"> | 38 | <div class="portlet-title"> |
| 39 | <form class="form-inline" action="" method="post"> | 39 | <form class="form-inline" action="" method="post"> |
| 40 | <div style="display: inline-block;"> | 40 | <div style="display: inline-block;"> |
| 41 | - <span class="item-label" style="width: 80px;">线路: </span> | 41 | + <span class="item-label" style="width: 80px;">绾胯矾: </span> |
| 42 | <select class="form-control" name="line" id="line" style="width: 120px;"></select> | 42 | <select class="form-control" name="line" id="line" style="width: 120px;"></select> |
| 43 | </div> | 43 | </div> |
| 44 | <div style="display: inline-block;margin-left: 15px;"> | 44 | <div style="display: inline-block;margin-left: 15px;"> |
| 45 | - <span class="item-label" style="width: 80px;">开始时间: </span> | 45 | + <span class="item-label" style="width: 80px;">寮濮嬫椂闂: </span> |
| 46 | <input class="form-control" type="text" id="startDate" style="width: 120px;"/> | 46 | <input class="form-control" type="text" id="startDate" style="width: 120px;"/> |
| 47 | </div> | 47 | </div> |
| 48 | <div style="display: inline-block;margin-left: 15px;"> | 48 | <div style="display: inline-block;margin-left: 15px;"> |
| 49 | - <span class="item-label" style="width: 80px;">结束时间: </span> | 49 | + <span class="item-label" style="width: 80px;">缁撴潫鏃堕棿: </span> |
| 50 | <input class="form-control" type="text" id="endDate" style="width: 120px;"/> | 50 | <input class="form-control" type="text" id="endDate" style="width: 120px;"/> |
| 51 | </div> | 51 | </div> |
| 52 | <div style="display: inline-block;"> | 52 | <div style="display: inline-block;"> |
| 53 | - <span class="item-label" style="width: 120px;">类型: </span> | 53 | + <span class="item-label" style="width: 120px;">绫诲瀷: </span> |
| 54 | <select class="form-control" id="sel"> | 54 | <select class="form-control" id="sel"> |
| 55 | - <option value="">请选择</option> | ||
| 56 | - <option value="1">换人</option> | ||
| 57 | - <option value="2">换车</option> | 55 | + <option value="">璇烽夋嫨</option> |
| 56 | + <option value="1">鎹汉</option> | ||
| 57 | + <option value="2">鎹㈣溅</option> | ||
| 58 | </select> | 58 | </select> |
| 59 | </div> | 59 | </div> |
| 60 | <div class="form-group"> | 60 | <div class="form-group"> |
| 61 | - <input class="btn btn-default" type="button" id="query" value="筛选"/> | ||
| 62 | - <input class="btn btn-default" type="button" id="export" value="导出"/> | 61 | + <input class="btn btn-default" type="button" id="query" value="绛涢"/> |
| 62 | + <input class="btn btn-default" type="button" id="export" value="瀵煎嚭"/> | ||
| 63 | </div> | 63 | </div> |
| 64 | </form> | 64 | </form> |
| 65 | </div> | 65 | </div> |
| @@ -68,35 +68,35 @@ | @@ -68,35 +68,35 @@ | ||
| 68 | <table class="table table-bordered table-hover table-checkable" id="forms"> | 68 | <table class="table table-bordered table-hover table-checkable" id="forms"> |
| 69 | <thead> | 69 | <thead> |
| 70 | <tr> | 70 | <tr> |
| 71 | - <th colspan="15">换人换车情况统计表</th> | 71 | + <th colspan="15">鎹汉鎹㈣溅鎯呭喌缁熻琛</th> |
| 72 | </tr> | 72 | </tr> |
| 73 | <tr> | 73 | <tr> |
| 74 | - <td rowspan="3" style=" padding-top: 50px;">日期</td> | ||
| 75 | - <td rowspan="3" style=" padding-top: 50px;">公司</td> | ||
| 76 | - <td rowspan="3" style=" padding-top: 50px;">分公司</td> | ||
| 77 | - <td rowspan="3" style=" padding-top: 50px;">线路</td> | ||
| 78 | - <td rowspan="3" style=" padding-top: 50px;">路牌</td> | ||
| 79 | - <td rowspan="3" style=" padding-top: 50px;">发生时间</td> | ||
| 80 | - <td rowspan="3" style=" padding-top: 50px;">修改时间</td> | ||
| 81 | - <td colspan="2">配车</td> | ||
| 82 | - <td colspan="4">人员</td> | ||
| 83 | - <td rowspan="3" style=" padding-top: 50px;">原因</td> | ||
| 84 | - <td rowspan="3" style=" padding-top: 50px;">修改人</td> | 74 | + <td rowspan="3" style=" padding-top: 50px;">鏃ユ湡</td> |
| 75 | + <td rowspan="3" style=" padding-top: 50px;">鍏徃</td> | ||
| 76 | + <td rowspan="3" style=" padding-top: 50px;">鍒嗗叕鍙</td> | ||
| 77 | + <td rowspan="3" style=" padding-top: 50px;">绾胯矾</td> | ||
| 78 | + <td rowspan="3" style=" padding-top: 50px;">璺墝</td> | ||
| 79 | + <td rowspan="3" style=" padding-top: 50px;">鍙戠敓鏃堕棿</td> | ||
| 80 | + <td rowspan="3" style=" padding-top: 50px;">淇敼鏃堕棿</td> | ||
| 81 | + <td colspan="2">閰嶈溅</td> | ||
| 82 | + <td colspan="4">浜哄憳</td> | ||
| 83 | + <td rowspan="3" style=" padding-top: 50px;">鍘熷洜</td> | ||
| 84 | + <td rowspan="3" style=" padding-top: 50px;">淇敼浜</td> | ||
| 85 | </tr> | 85 | </tr> |
| 86 | <tr> | 86 | <tr> |
| 87 | - <td>计划</td> | ||
| 88 | - <td>实际</td> | ||
| 89 | - <td colspan="2">计划</td> | ||
| 90 | - <td colspan="2">实际</td> | 87 | + <td>璁″垝</td> |
| 88 | + <td>瀹為檯</td> | ||
| 89 | + <td colspan="2">璁″垝</td> | ||
| 90 | + <td colspan="2">瀹為檯</td> | ||
| 91 | 91 | ||
| 92 | </tr> | 92 | </tr> |
| 93 | <tr> | 93 | <tr> |
| 94 | - <td>车号</td> | ||
| 95 | - <td>车号</td> | ||
| 96 | - <td>工号</td> | ||
| 97 | - <td>人员</td> | ||
| 98 | - <td>工号</td> | ||
| 99 | - <td>人员</td> | 94 | + <td>杞﹀彿</td> |
| 95 | + <td>杞﹀彿</td> | ||
| 96 | + <td>宸ュ彿</td> | ||
| 97 | + <td>浜哄憳</td> | ||
| 98 | + <td>宸ュ彿</td> | ||
| 99 | + <td>浜哄憳</td> | ||
| 100 | </tr> | 100 | </tr> |
| 101 | </thead> | 101 | </thead> |
| 102 | <tbody> | 102 | <tbody> |
| @@ -111,7 +111,7 @@ | @@ -111,7 +111,7 @@ | ||
| 111 | 111 | ||
| 112 | <script> | 112 | <script> |
| 113 | $(function(){ | 113 | $(function(){ |
| 114 | - // 关闭左侧栏 | 114 | + // 鍏抽棴宸︿晶鏍 |
| 115 | if (!$('body').hasClass('page-sidebar-closed')) | 115 | if (!$('body').hasClass('page-sidebar-closed')) |
| 116 | $('.menu-toggler.sidebar-toggler').click(); | 116 | $('.menu-toggler.sidebar-toggler').click(); |
| 117 | 117 | ||
| @@ -148,13 +148,13 @@ | @@ -148,13 +148,13 @@ | ||
| 148 | }, | 148 | }, |
| 149 | language: { | 149 | language: { |
| 150 | noResults: function(){ | 150 | noResults: function(){ |
| 151 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | 151 | + return '<span style="color:red;font-size: 12px;">娌℃湁鎼滅储鍒扮嚎璺紒</span>'; |
| 152 | }, | 152 | }, |
| 153 | inputTooShort : function(e) { | 153 | inputTooShort : function(e) { |
| 154 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | 154 | + return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 杈撳叆绾胯矾鎼滅储绾胯矾</span>'; |
| 155 | }, | 155 | }, |
| 156 | searching : function() { | 156 | searching : function() { |
| 157 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | 157 | + return '<span style="color:gray;font-size: 12px;"> 姝e湪鎼滅储绾胯矾...</span>'; |
| 158 | } | 158 | } |
| 159 | } | 159 | } |
| 160 | }); | 160 | }); |
| @@ -182,20 +182,20 @@ | @@ -182,20 +182,20 @@ | ||
| 182 | } | 182 | } |
| 183 | obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss"); | 183 | obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss"); |
| 184 | }); | 184 | }); |
| 185 | - // 把数据填充到模版中 | 185 | + // 鎶婃暟鎹~鍏呭埌妯$増涓 |
| 186 | var tbodyHtml = template('changetochange',{list:result}); | 186 | var tbodyHtml = template('changetochange',{list:result}); |
| 187 | - // 把渲染好的模版html文本追加到表格中 | 187 | + // 鎶婃覆鏌撳ソ鐨勬ā鐗坔tml鏂囨湰杩藉姞鍒拌〃鏍间腑 |
| 188 | $('#forms tbody').html(tbodyHtml); | 188 | $('#forms tbody').html(tbodyHtml); |
| 189 | }) | 189 | }) |
| 190 | 190 | ||
| 191 | }else{ | 191 | }else{ |
| 192 | - alert("请选择时间范围!"); | 192 | + alert("璇烽夋嫨鏃堕棿鑼冨洿!"); |
| 193 | } | 193 | } |
| 194 | }); | 194 | }); |
| 195 | 195 | ||
| 196 | $("#export").on("click",function(){ | 196 | $("#export").on("click",function(){ |
| 197 | $post('/mcy_export/changetochangeExport',{startDate:startDate,endDate:endDate,type:'export'},function(result){ | 197 | $post('/mcy_export/changetochangeExport',{startDate:startDate,endDate:endDate,type:'export'},function(result){ |
| 198 | - window.open("/downloadFile/download?fileName=换人换车情况日统计"+moment(startDate).format("YYYYMMDD")); | 198 | + window.open("/downloadFile/download?fileName=鎹汉鎹㈣溅鎯呭喌鏃ョ粺璁"+moment(startDate).format("YYYYMMDD")); |
| 199 | }); | 199 | }); |
| 200 | }); | 200 | }); |
| 201 | }); | 201 | }); |
| @@ -222,7 +222,7 @@ | @@ -222,7 +222,7 @@ | ||
| 222 | {{/each}} | 222 | {{/each}} |
| 223 | {{if list.length == 0}} | 223 | {{if list.length == 0}} |
| 224 | <tr> | 224 | <tr> |
| 225 | - <td colspan="15"><h6 class="muted">没有找到相关数据</h6></td> | 225 | + <td colspan="15"><h6 class="muted">娌℃湁鎵惧埌鐩稿叧鏁版嵁</h6></td> |
| 226 | </tr> | 226 | </tr> |
| 227 | {{/if}} | 227 | {{/if}} |
| 228 | </script> | 228 | </script> |
src/main/resources/static/pages/report/timetable/timetable.html
0 → 100644
| 1 | +<style type="text/css"> | ||
| 2 | + .table-bordered { | ||
| 3 | + border: 1px solid; } | ||
| 4 | + .table-bordered > thead > tr > th, | ||
| 5 | + .table-bordered > thead > tr > td, | ||
| 6 | + .table-bordered > tbody > tr > th, | ||
| 7 | + .table-bordered > tbody > tr > td, | ||
| 8 | + .table-bordered > tfoot > tr > th, | ||
| 9 | + .table-bordered > tfoot > tr > td { | ||
| 10 | + border: 1px solid; } | ||
| 11 | + .table-bordered > thead > tr > th, | ||
| 12 | + .table-bordered > thead > tr > td { | ||
| 13 | + border-bottom-width: 2px; } | ||
| 14 | + | ||
| 15 | + .table > tbody + tbody { | ||
| 16 | + border-top: 1px solid; } | ||
| 17 | +</style> | ||
| 18 | + | ||
| 19 | +<div class="page-head"> | ||
| 20 | + <div class="page-title"> | ||
| 21 | + <h1>行车时刻表统计表</h1> | ||
| 22 | + </div> | ||
| 23 | +</div> | ||
| 24 | + | ||
| 25 | +<div class="row"> | ||
| 26 | + <div class="col-md-12"> | ||
| 27 | + <div class="portlet light porttlet-fit bordered"> | ||
| 28 | + <div class="portlet-title"> | ||
| 29 | + <form class="form-inline" action=""> | ||
| 30 | + <div style="display: inline-block;"> | ||
| 31 | + <span class="item-label" style="width: 80px;">线路: </span> | ||
| 32 | + <select class="form-control" name="line" id="line" style="width: 180px;"></select> | ||
| 33 | + </div> | ||
| 34 | + <div style="display: inline-block;margin-left: 15px;"> | ||
| 35 | + <span class="item-label" style="width: 80px;">时间: </span> | ||
| 36 | + <input class="form-control" type="text" id="date" style="width: 180px;"/> | ||
| 37 | + </div> | ||
| 38 | + <div class="form-group"> | ||
| 39 | + <input class="btn btn-default" type="button" id="query" value="查询"/> | ||
| 40 | + <input class="btn btn-default" type="button" id="export" value="导出"/> | ||
| 41 | + </div> | ||
| 42 | + </form> | ||
| 43 | + </div> | ||
| 44 | + <div class="portlet-body"> | ||
| 45 | + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> | ||
| 46 | + <label id="xlxq"></label> | ||
| 47 | + <table class="table table-bordered table-hover table-checkable" style="margin-bottom:5p" id="formsTime1"> | ||
| 48 | + <thead> | ||
| 49 | + <tr> | ||
| 50 | + <th colspan="10">行车时刻表统计表</th> | ||
| 51 | + </tr> | ||
| 52 | + <tr> | ||
| 53 | + <td align="center">配车</td> | ||
| 54 | + <td colspan="6" align="center">全日班次</td> | ||
| 55 | + <td colspan="3" align="center">计划里程</td> | ||
| 56 | + </tr> | ||
| 57 | + <tr> | ||
| 58 | + <td rowspan="2" style="text-align:center;vertical-align:middle;">合计</td> | ||
| 59 | + <td rowspan="2" style="text-align:center;vertical-align:middle;">全程 班次</td> | ||
| 60 | + <td rowspan="2" style="text-align:center;vertical-align:middle;">区间 班次</td> | ||
| 61 | + <td colspan="2" align="center">6:31-8:30</td> | ||
| 62 | + <td colspan="2" align="center">16:01-18:00</td> | ||
| 63 | + <td rowspan="2" style="text-align:center;vertical-align:middle;">总里程</td> | ||
| 64 | + <td rowspan="2" style="text-align:center;vertical-align:middle;">营业里程</td> | ||
| 65 | + <td rowspan="2" style="text-align:center;vertical-align:middle;">空驶里程</td> | ||
| 66 | + </tr> | ||
| 67 | + <tr> | ||
| 68 | + <td >全程</td> | ||
| 69 | + <td >区间</td> | ||
| 70 | + <td >全程</td> | ||
| 71 | + <td >区间</td> | ||
| 72 | + </tr> | ||
| 73 | + </thead> | ||
| 74 | + | ||
| 75 | + <tbody class="tbody_time_1"> | ||
| 76 | + | ||
| 77 | + </tbody> | ||
| 78 | + </table> | ||
| 79 | + | ||
| 80 | + <div class="portlet-body"> | ||
| 81 | + <div class="row"> | ||
| 82 | + <div class="col-md-4" id="divTime2"> | ||
| 83 | + <table class="table table-bordered table-hover table-checkable pre-scrollable" id="formsTime2"> | ||
| 84 | + <tr> | ||
| 85 | + <td colspan="2"> 营运车时 (计划班次的营运时间/公里)</td> | ||
| 86 | + </tr> | ||
| 87 | + <tr> | ||
| 88 | + <td colspan="2">营业里程/营运时间(小时)</td> | ||
| 89 | + | ||
| 90 | + </tr> | ||
| 91 | + <tr> | ||
| 92 | + <td align="center" width="50%"> | ||
| 93 | + 营运时间(时:分) | ||
| 94 | + </td> | ||
| 95 | + <td align="center"> | ||
| 96 | + 营运车速 | ||
| 97 | + </td> | ||
| 98 | + </tr> | ||
| 99 | + <tbody class="tbody_time_2"> | ||
| 100 | + | ||
| 101 | + </tbody> | ||
| 102 | + </table> | ||
| 103 | + | ||
| 104 | + </div> | ||
| 105 | + | ||
| 106 | + <div class="col-md-8" id="divTime3" > | ||
| 107 | + <table class="table table-bordered table-checkable" id="formsTime3"> | ||
| 108 | + <tr> | ||
| 109 | + <td colspan="8">站点配车</td> | ||
| 110 | + </tr> | ||
| 111 | + <tr> | ||
| 112 | + <td colspan="4" align="center">6:31—8:30</td> | ||
| 113 | + <td colspan="4" align="center">16:01—18:00</td> | ||
| 114 | + </tr> | ||
| 115 | + <tr> | ||
| 116 | + <td width="18%">全程站名</td> | ||
| 117 | + <td>配车</td> | ||
| 118 | + <td width="18%">区间站名</td> | ||
| 119 | + <td>配车</td> | ||
| 120 | + <td width="18%">全程站名</td> | ||
| 121 | + <td>配车</td> | ||
| 122 | + <td width="18%">区间站名</td> | ||
| 123 | + <td>配车</td> | ||
| 124 | + </tr> | ||
| 125 | + <tbody class="tbody_time_3"> | ||
| 126 | + | ||
| 127 | + </tbody> | ||
| 128 | + </table> | ||
| 129 | + </div> | ||
| 130 | + | ||
| 131 | + </div> | ||
| 132 | + </div> | ||
| 133 | + <div class="portlet-body"> | ||
| 134 | + <div class="row"> | ||
| 135 | + <div class="col-md-6" > | ||
| 136 | + <table class="table table-bordered table-checkable"> | ||
| 137 | + <tr> | ||
| 138 | + <td colspan="6">调度形式</td> | ||
| 139 | + </tr> | ||
| 140 | + <tr> | ||
| 141 | + <td colspan="3" align="center">上行向()站</td> | ||
| 142 | + <td colspan="3" align="center">下行向()站</td> | ||
| 143 | + </tr> | ||
| 144 | + <tr> | ||
| 145 | + <td>起讫站</td> | ||
| 146 | + <td>起讫时间</td> | ||
| 147 | + <td>班次</td> | ||
| 148 | + <td>起讫站</td> | ||
| 149 | + <td>起讫时间</td> | ||
| 150 | + <td>班次</td> | ||
| 151 | + </tr> | ||
| 152 | + <tbody class="tbody_time_4"> | ||
| 153 | + | ||
| 154 | + </tbody> | ||
| 155 | + </table> | ||
| 156 | + </div> | ||
| 157 | + <div class="col-md-6" > | ||
| 158 | + <table class="table table-bordered table-checkable" id="formsTime5"> | ||
| 159 | + <tr> | ||
| 160 | + <td colspan="5">全日分组行驶时间(区间除外)</td> | ||
| 161 | + </tr> | ||
| 162 | + <tr> | ||
| 163 | + <td width="25%" rowspan="2" style="text-align:center;vertical-align:middle;w">分组 时间</td> | ||
| 164 | + <td width="30%" colspan="2" style="text-align:center;vertical-align:middle;">实驶(分)</td> | ||
| 165 | + <td width="20%" rowspan="2" style="text-align:center;vertical-align:middle;">分圈 时间</td> | ||
| 166 | + <td width="25%" rowspan="2" style="text-align:center;vertical-align:middle;">车距</td> | ||
| 167 | + </tr> | ||
| 168 | + <tr> | ||
| 169 | + <td>上行</td> | ||
| 170 | + <td>下行</td> | ||
| 171 | + </tr> | ||
| 172 | + <tbody class="tbody_time_5"> | ||
| 173 | + | ||
| 174 | + </tbody> | ||
| 175 | + </table> | ||
| 176 | + </div> | ||
| 177 | + </div> | ||
| 178 | + </div> | ||
| 179 | + </div> | ||
| 180 | + </div> | ||
| 181 | + </div> | ||
| 182 | + </div> | ||
| 183 | +</div> | ||
| 184 | + | ||
| 185 | +<script> | ||
| 186 | + $(function(){ | ||
| 187 | + // 关闭左侧栏 | ||
| 188 | + if (!$('body').hasClass('page-sidebar-closed')) | ||
| 189 | + $('.menu-toggler.sidebar-toggler').click(); | ||
| 190 | + | ||
| 191 | + $("#date").datetimepicker({ | ||
| 192 | + format : 'YYYY-MM-DD', | ||
| 193 | + locale : 'zh-cn' | ||
| 194 | + }); | ||
| 195 | + | ||
| 196 | + | ||
| 197 | + | ||
| 198 | + $.get('/basic/lineCode2Name',function(result){ | ||
| 199 | + var data=[]; | ||
| 200 | + | ||
| 201 | + for(var code in result){ | ||
| 202 | + data.push({id: code, text: result[code]}); | ||
| 203 | + } | ||
| 204 | + initPinYinSelect2('#line',data,''); | ||
| 205 | + | ||
| 206 | + }) | ||
| 207 | + //查询 | ||
| 208 | + $("#query").on('click',function(){ | ||
| 209 | + var line = $("#line").val(); | ||
| 210 | + var xlName = $("#select2-line-container").html(); | ||
| 211 | + var date = $("#date").val(); | ||
| 212 | + if(date==null|| date==""){ | ||
| 213 | + layer.msg('请选择日期.'); | ||
| 214 | + }else if(line==null || line ==""){ | ||
| 215 | + layer.msg('请选择线路.'); | ||
| 216 | + }else{ | ||
| 217 | + $get('/report/tbodyTime1',{line:line,date:date},function(result){ | ||
| 218 | + var tbodyTime1 = template('tbodyTime1',{result}); | ||
| 219 | + $('#formsTime1 .tbody_time_1').html(tbodyTime1); | ||
| 220 | + }); | ||
| 221 | + $.get('/report/tbodyTime2',{line:line,date:date},function(result){ | ||
| 222 | + var tbodyTime2 = template('tbodyTime2',{result}); | ||
| 223 | + $('#formsTime2 .tbody_time_2').html(tbodyTime2); | ||
| 224 | + }); | ||
| 225 | + $.get('/report/tbodyTime3',{line:line,date:date},function(result){ | ||
| 226 | + | ||
| 227 | + var tbodyTime3 = template('tbodyTime3',{list:result}); | ||
| 228 | + $('#formsTime3 .tbody_time_3').html(tbodyTime3); | ||
| 229 | + var divTime3 = window.document.getElementById('formsTime3'); | ||
| 230 | + var divTime2 = window.document.getElementById('formsTime2'); | ||
| 231 | + console.log(divTime3.offsetHeight); | ||
| 232 | + divTime2.style.height=divTime3.offsetHeight+"px"; | ||
| 233 | + });/* | ||
| 234 | + $.get('/report/tbodyTime4',{line:line,date:date},function(result){ | ||
| 235 | + var scheduleDaily_3 = template('scheduleDaily_3',{list:result}); | ||
| 236 | + $('#forms .scheduleDaily_3').html(scheduleDaily_3); | ||
| 237 | + });*/ | ||
| 238 | + $.get('/report/tbodyTime5',{line:line,date:date},function(result){ | ||
| 239 | + var tbodyTime5 = template('tbodyTime5',{list:result}); | ||
| 240 | + $('#formsTime5 .tbody_time_5').html(tbodyTime5); | ||
| 241 | + }); | ||
| 242 | + } | ||
| 243 | + | ||
| 244 | + | ||
| 245 | + }); | ||
| 246 | + }); | ||
| 247 | +</script> | ||
| 248 | +<script type="text/html" id="tbodyTime1"> | ||
| 249 | + <tr> | ||
| 250 | + <td>{{result.pcs}}</td> | ||
| 251 | + <td>{{result.qcbc}}</td> | ||
| 252 | + <td>{{result.qjbc}}</td> | ||
| 253 | + <td>{{result.zqcbc}}</td> | ||
| 254 | + <td>{{result.zqjbc}}</td> | ||
| 255 | + <td>{{result.wqcbc}}</td> | ||
| 256 | + <td>{{result.wqjbc}}</td> | ||
| 257 | + <td>{{result.zlc}}</td> | ||
| 258 | + <td>{{result.yylc}}</td> | ||
| 259 | + <td>{{result.kslc}}</td> | ||
| 260 | + </tr> | ||
| 261 | +</script> | ||
| 262 | + | ||
| 263 | +<script type="text/html" id="tbodyTime2"> | ||
| 264 | + <tr> | ||
| 265 | + <td align="center">{{result.yysj}}</td> | ||
| 266 | + <td align="center">{{result.yycs}}</td> | ||
| 267 | + </tr> | ||
| 268 | +</script> | ||
| 269 | + | ||
| 270 | +<script type="text/html" id="tbodyTime3"> | ||
| 271 | +{{each list as result i}} | ||
| 272 | + <tr> | ||
| 273 | + <td align="center">{{result.zqcZm}}</td> | ||
| 274 | + <td align="center">{{result.zqcCls}}</td> | ||
| 275 | + <td align="center">{{result.zqjZm}}</td> | ||
| 276 | + <td align="center">{{result.zqjCls}}</td> | ||
| 277 | + <td align="center">{{result.wqcZm}}</td> | ||
| 278 | + <td align="center">{{result.wqcCls}}</td> | ||
| 279 | + <td align="center">{{result.wqjZm}}</td> | ||
| 280 | + <td align="center">{{result.wqjCls}}</td> | ||
| 281 | + </tr> | ||
| 282 | +{{/each}} | ||
| 283 | +{{if list.length == 0}} | ||
| 284 | + <tr> | ||
| 285 | + <td colspan="8"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 286 | + </tr> | ||
| 287 | + {{/if}} | ||
| 288 | +</script> | ||
| 289 | + | ||
| 290 | + | ||
| 291 | +<script type="text/html" id="tbodyTime5"> | ||
| 292 | +{{each list as result i}} | ||
| 293 | + <tr> | ||
| 294 | + <td align="center">{{result.sjd}}</td> | ||
| 295 | + <td align="center">{{result.sxsj}}</td> | ||
| 296 | + <td align="center">{{result.xxsj}}</td> | ||
| 297 | + <td align="center">{{result.fqsj}}</td> | ||
| 298 | + <td align="center">{{result.cj}}</td> | ||
| 299 | + </tr> | ||
| 300 | +{{/each}} | ||
| 301 | +{{if list.length == 0}} | ||
| 302 | + <tr> | ||
| 303 | + <td colspan="5"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 304 | + </tr> | ||
| 305 | + {{/if}} | ||
| 306 | +</script> |