Commit b22667d304b349f282028f94a2e1cf1922592d05
1 parent
ea43f1bc
0111
Showing
7 changed files
with
651 additions
and
433 deletions
src/main/java/com/bsth/controller/DownloadController.java
| 1 | 1 | package com.bsth.controller; |
| 2 | 2 | |
| 3 | -import java.io.File; | |
| 4 | -import java.io.IOException; | |
| 3 | +import java.io.BufferedInputStream; | |
| 4 | +import java.io.BufferedOutputStream; | |
| 5 | +import java.io.File; | |
| 6 | +import java.io.FileInputStream; | |
| 7 | +import java.io.IOException; | |
| 8 | +import java.io.InputStream; | |
| 9 | +import java.io.OutputStream; | |
| 5 | 10 | import java.net.URLDecoder; |
| 6 | 11 | |
| 12 | +import javax.servlet.http.HttpServletResponse; | |
| 13 | + | |
| 7 | 14 | import org.apache.commons.io.FileUtils; |
| 8 | 15 | import org.springframework.context.annotation.Scope; |
| 9 | 16 | import org.springframework.http.HttpHeaders; |
| ... | ... | @@ -11,7 +18,9 @@ import org.springframework.http.HttpStatus; |
| 11 | 18 | import org.springframework.http.MediaType; |
| 12 | 19 | import org.springframework.http.ResponseEntity; |
| 13 | 20 | import org.springframework.stereotype.Component; |
| 14 | -import org.springframework.web.bind.annotation.RequestMapping; | |
| 21 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 22 | + | |
| 23 | +import com.mysql.fabric.Response; | |
| 15 | 24 | |
| 16 | 25 | /** |
| 17 | 26 | * <一句话功能简述> |
| ... | ... | @@ -28,19 +37,43 @@ import org.springframework.web.bind.annotation.RequestMapping; |
| 28 | 37 | public class DownloadController |
| 29 | 38 | { |
| 30 | 39 | |
| 31 | - @RequestMapping("download") | |
| 32 | - public ResponseEntity<byte[]> download(String fileName) throws IOException { | |
| 33 | - fileName = fileName+".xls"; | |
| 34 | - String moudelPath = this.getClass().getResource("/").getPath()+ "static/pages/forms/export/"+fileName; | |
| 40 | + @RequestMapping("download2") | |
| 41 | + public ResponseEntity<byte[]> download2(String fileName) throws IOException { | |
| 42 | +// fileName = fileName+".xls"; | |
| 43 | + String fileNames=URLDecoder.decode(fileName,"UTF-8"); | |
| 44 | + fileNames =fileNames + ".xls"; | |
| 45 | + String moudelPath = this.getClass().getResource("/").getPath()+ "static/pages/forms/export/"+fileNames; | |
| 35 | 46 | System.out.println(moudelPath); |
| 36 | 47 | // String path="D:\\export\\target\\"+jName+".xls"; |
| 37 | 48 | File file=new File(moudelPath); |
| 38 | 49 | HttpHeaders headers = new HttpHeaders(); |
| 39 | 50 | String realFileName=new String(fileName.getBytes("UTF-8"),"iso-8859-1");//为了解决中文名称乱码问题 |
| 40 | - headers.setContentDispositionFormData("attachment", fileName); | |
| 51 | + headers.setContentDispositionFormData("attachment", fileNames); | |
| 41 | 52 | System.out.println( URLDecoder.decode(realFileName,"utf-8")); |
| 42 | 53 | headers.setContentType(MediaType.APPLICATION_OCTET_STREAM); |
| 43 | 54 | return new ResponseEntity<byte[]>(FileUtils.readFileToByteArray(file), |
| 44 | 55 | headers, HttpStatus.CREATED); |
| 45 | - } | |
| 56 | + } | |
| 57 | + | |
| 58 | + @RequestMapping("download") | |
| 59 | + public void download(HttpServletResponse response,String fileName) | |
| 60 | + throws IOException { | |
| 61 | +// String fileNames=URLDecoder.decode(fileName,"UTF-8"); | |
| 62 | + fileName =fileName + ".xls"; | |
| 63 | + String moudelPath = this.getClass().getResource("/").getPath()+ "static/pages/forms/export/"+fileName; | |
| 64 | + File file = new File(moudelPath);// path是根据日志路径和文件名拼接出来的 | |
| 65 | +// String filename = file.getName();// 获取日志文件名称 | |
| 66 | + InputStream fis = new BufferedInputStream(new FileInputStream(moudelPath)); | |
| 67 | + byte[] buffer = new byte[fis.available()]; | |
| 68 | + fis.read(buffer); | |
| 69 | + fis.close(); | |
| 70 | + response.reset(); | |
| 71 | + response.addHeader("Content-Disposition", "attachment;filename=" + new String(fileName.replaceAll(" ", "").getBytes("utf-8"),"iso8859-1")); | |
| 72 | + response.addHeader("Content-Length", "" + file.length()); | |
| 73 | + OutputStream os = new BufferedOutputStream(response.getOutputStream()); | |
| 74 | + response.setContentType("application/octet-stream"); | |
| 75 | + os.write(buffer);// 输出文件 | |
| 76 | + os.flush(); | |
| 77 | + os.close(); | |
| 78 | + } | |
| 46 | 79 | } | ... | ... |
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
| ... | ... | @@ -110,9 +110,12 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI |
| 110 | 110 | void deleteByLineCodeAndDate(String xlBm, String schDate); |
| 111 | 111 | |
| 112 | 112 | //去掉了 xlBm is not null |
| 113 | - @Query(value="select s from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2") | |
| 113 | + @Query(value="select s from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 order by s.xlBm") | |
| 114 | 114 | List<ScheduleRealInfo> scheduleByDateAndLine(String line,String date); |
| 115 | 115 | |
| 116 | + @Query(value="select s from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 and s.bcType not in ('in','out') order by s.xlBm") | |
| 117 | + List<ScheduleRealInfo> scheduleByDateAndLine2(String line,String date); | |
| 118 | + | |
| 116 | 119 | @Query(value="select new map(s.scheduleDate as scheduleDate,s.xlBm as xlBm,s.clZbh as clZbh,s.jGh as jGh) from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 GROUP BY xlBm,clZbh,jGh,scheduleDate,jGh ORDER BY realExecDate,fcsj,xlBm,clZbh") |
| 117 | 120 | List<Map<String,Object>> yesterdayDataList(String line,String date); |
| 118 | 121 | ... | ... |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| ... | ... | @@ -1379,7 +1379,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 1379 | 1379 | @Override |
| 1380 | 1380 | public List<Map<String, Object>> statisticsDaily(String line, String date, |
| 1381 | 1381 | String xlName, String type) { |
| 1382 | - List<ScheduleRealInfo> list = scheduleRealInfoRepository.scheduleByDateAndLine(line, date); | |
| 1382 | + List<ScheduleRealInfo> list = scheduleRealInfoRepository.scheduleByDateAndLine2(line, date); | |
| 1383 | + | |
| 1383 | 1384 | List<Map<String, Object>> lMap = new ArrayList<Map<String, Object>>(); |
| 1384 | 1385 | DecimalFormat format = new DecimalFormat("0.00"); |
| 1385 | 1386 | double jhlc = 0, tempJhlc = 0, childMileage = 0; |
| ... | ... | @@ -1392,159 +1393,353 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 1392 | 1393 | int fzbc = 0, fzbc_m = 0, fzbc_a = 0; |
| 1393 | 1394 | int dtbc = 0, dtbc_m = 0, dtbc_a = 0; |
| 1394 | 1395 | int djg = 0, djg_m = 0, djg_a = 0, djg_time = 0; |
| 1395 | - Map<String, Object> map = new HashMap<String, Object>(); | |
| 1396 | - for (ScheduleRealInfo scheduleRealInfo : list) { | |
| 1396 | + | |
| 1397 | + double jhlcZ = 0, tempJhlcZ = 0, childMileageZ = 0; | |
| 1398 | + float sjglZ = 0f, ssglZ = 0f, ssgl_lzZ = 0f, ssgl_dmZ = 0f, | |
| 1399 | + ssgl_gzZ = 0f, ssgl_jfZ = 0f, ssgl_zsZ = 0f, ssgl_qrZ = 0f, ssgl_qcZ = 0f, | |
| 1400 | + ssgl_kxZ = 0f, ssgl_qhZ = 0f, ssgl_ywZ = 0f, ssgl_otherZ = 0f, ljglZ = 0f; | |
| 1401 | + //班次 | |
| 1402 | + int jhbcZ = 0, jhbc_mZ = 0, jhbc_aZ = 0; | |
| 1403 | + int sjbcZ = 0, sjbc_mZ = 0, sjbc_aZ = 0; | |
| 1404 | + int ljbcZ = 0, ljbc_mZ = 0, ljbc_aZ = 0; | |
| 1405 | + int fzbcZ = 0, fzbc_mZ = 0, fzbc_aZ = 0; | |
| 1406 | + int dtbcZ = 0, dtbc_mZ = 0, dtbc_aZ = 0; | |
| 1407 | + int djgZ = 0, djg_mZ = 0, djg_aZ = 0, djg_timeZ = 0; | |
| 1408 | + Map<String, Object> map =null; | |
| 1409 | + for (int i=0; i<list.size();i++) { | |
| 1410 | + ScheduleRealInfo scheduleRealInfo=list.get(i); | |
| 1397 | 1411 | if (scheduleRealInfo != null) { |
| 1398 | - | |
| 1399 | - if (!(scheduleRealInfo.getBcType().equals("in") | |
| 1400 | - || scheduleRealInfo.getBcType().equals("out"))) { | |
| 1401 | - Set<ChildTaskPlan> childTaskPlans = scheduleRealInfo.getcTasks(); | |
| 1402 | - //计算实际里程,少驶里程,计划里程=实际里程+少驶里程 | |
| 1403 | - if (childTaskPlans.isEmpty()) { | |
| 1404 | - tempJhlc = scheduleRealInfo.getJhlc() == null ? 0 : scheduleRealInfo.getJhlc(); | |
| 1405 | - //临加公里 | |
| 1406 | - if (scheduleRealInfo.isSflj()) { | |
| 1407 | - ljgl += tempJhlc; | |
| 1412 | + Set<ChildTaskPlan> childTaskPlans = scheduleRealInfo.getcTasks(); | |
| 1413 | + //计算实际里程,少驶里程,计划里程=实际里程+少驶里程 | |
| 1414 | + if (childTaskPlans.isEmpty()) { | |
| 1415 | + tempJhlc = scheduleRealInfo.getJhlc() == null ? 0 : scheduleRealInfo.getJhlc(); | |
| 1416 | + //临加公里 | |
| 1417 | + if (scheduleRealInfo.isSflj()) { | |
| 1418 | + ljgl += tempJhlc; | |
| 1419 | + ljglZ += tempJhlc; | |
| 1420 | + } else { | |
| 1421 | + jhlc += tempJhlc; | |
| 1422 | + jhlcZ += tempJhlc; | |
| 1423 | + } | |
| 1424 | + if (scheduleRealInfo.getStatus() == 2) { | |
| 1425 | + sjgl += tempJhlc; | |
| 1426 | + sjglZ += tempJhlc; | |
| 1427 | + } else if (scheduleRealInfo.getStatus() == -1) { | |
| 1428 | + ssgl += tempJhlc; | |
| 1429 | + ssglZ += tempJhlc; | |
| 1430 | + if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("路阻") != -1) { | |
| 1431 | + ssgl_lz += tempJhlc; | |
| 1432 | + ssgl_lzZ += tempJhlc; | |
| 1433 | + } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("吊慢") != -1) { | |
| 1434 | + ssgl_dm += tempJhlc; | |
| 1435 | + ssgl_dmZ += tempJhlc; | |
| 1436 | + } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("故障") != -1) { | |
| 1437 | + ssgl_gz += tempJhlc; | |
| 1438 | + ssgl_gzZ += tempJhlc; | |
| 1439 | + } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("纠纷") != -1) { | |
| 1440 | + ssgl_jf += tempJhlc; | |
| 1441 | + ssgl_jfZ += tempJhlc; | |
| 1442 | + } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("肇事") != -1) { | |
| 1443 | + ssgl_zs += tempJhlc; | |
| 1444 | + ssgl_zsZ += tempJhlc; | |
| 1445 | + } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("缺人") != -1) { | |
| 1446 | + ssgl_qr += tempJhlc; | |
| 1447 | + ssgl_qrZ += tempJhlc; | |
| 1448 | + } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("缺车") != -1) { | |
| 1449 | + ssgl_qc += tempJhlc; | |
| 1450 | + ssgl_qcZ += tempJhlc; | |
| 1451 | + } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("客稀") != -1) { | |
| 1452 | + ssgl_kx += tempJhlc; | |
| 1453 | + ssgl_kxZ += tempJhlc; | |
| 1454 | + } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("气候") != -1) { | |
| 1455 | + ssgl_qh += tempJhlc; | |
| 1456 | + ssgl_qhZ += tempJhlc; | |
| 1457 | + } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("援外") != -1) { | |
| 1458 | + ssgl_yw += tempJhlc; | |
| 1459 | + ssgl_ywZ += tempJhlc; | |
| 1408 | 1460 | } else { |
| 1409 | - jhlc += tempJhlc; | |
| 1410 | - } | |
| 1411 | - if (scheduleRealInfo.getStatus() == 2) { | |
| 1412 | - sjgl += tempJhlc; | |
| 1413 | - } else if (scheduleRealInfo.getStatus() == -1) { | |
| 1414 | - ssgl += tempJhlc; | |
| 1415 | - if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("路阻") != -1) { | |
| 1416 | - ssgl_lz += tempJhlc; | |
| 1417 | - } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("吊慢") != -1) { | |
| 1418 | - ssgl_dm += tempJhlc; | |
| 1419 | - } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("故障") != -1) { | |
| 1420 | - ssgl_gz += tempJhlc; | |
| 1421 | - } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("纠纷") != -1) { | |
| 1422 | - ssgl_jf += tempJhlc; | |
| 1423 | - } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("肇事") != -1) { | |
| 1424 | - ssgl_zs += tempJhlc; | |
| 1425 | - } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("缺人") != -1) { | |
| 1426 | - ssgl_qr += tempJhlc; | |
| 1427 | - } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("缺车") != -1) { | |
| 1428 | - ssgl_qc += tempJhlc; | |
| 1429 | - } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("客稀") != -1) { | |
| 1430 | - ssgl_kx += tempJhlc; | |
| 1431 | - } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("气候") != -1) { | |
| 1432 | - ssgl_qh += tempJhlc; | |
| 1433 | - } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("援外") != -1) { | |
| 1434 | - ssgl_yw += tempJhlc; | |
| 1435 | - } else { | |
| 1436 | - ssgl_other += tempJhlc; | |
| 1437 | - } | |
| 1461 | + ssgl_other += tempJhlc; | |
| 1462 | + ssgl_otherZ += tempJhlc; | |
| 1438 | 1463 | } |
| 1439 | - } else { | |
| 1440 | - Iterator<ChildTaskPlan> it = childTaskPlans.iterator(); | |
| 1441 | - while (it.hasNext()) { | |
| 1442 | - ChildTaskPlan childTaskPlan = it.next(); | |
| 1443 | - childMileage = childTaskPlan.getMileage() == null ? 0 : childTaskPlan.getMileage(); | |
| 1444 | - jhlc += childMileage; | |
| 1445 | - if (childTaskPlan.isDestroy()) { | |
| 1446 | - ssgl += childMileage; | |
| 1447 | - if (childTaskPlan.getDestroyReason().equals("路阻")) { | |
| 1448 | - ssgl_lz += childTaskPlan.getMileage(); | |
| 1449 | - } else if (childTaskPlan.getDestroyReason().equals("吊慢")) { | |
| 1450 | - ssgl_dm += childTaskPlan.getMileage(); | |
| 1451 | - } else if (childTaskPlan.getDestroyReason().equals("故障")) { | |
| 1452 | - ssgl_gz += childTaskPlan.getMileage(); | |
| 1453 | - } else if (childTaskPlan.getDestroyReason().equals("纠纷")) { | |
| 1454 | - ssgl_jf += childTaskPlan.getMileage(); | |
| 1455 | - } else if (childTaskPlan.getDestroyReason().equals("肇事")) { | |
| 1456 | - ssgl_zs += childTaskPlan.getMileage(); | |
| 1457 | - } else if (childTaskPlan.getDestroyReason().equals("缺人")) { | |
| 1458 | - ssgl_qr += childTaskPlan.getMileage(); | |
| 1459 | - } else if (childTaskPlan.getDestroyReason().equals("缺车")) { | |
| 1460 | - ssgl_qc += childTaskPlan.getMileage(); | |
| 1461 | - } else if (childTaskPlan.getDestroyReason().equals("客稀")) { | |
| 1462 | - ssgl_kx += childTaskPlan.getMileage(); | |
| 1463 | - } else if (childTaskPlan.getDestroyReason().equals("气候")) { | |
| 1464 | - ssgl_qh += childTaskPlan.getMileage(); | |
| 1465 | - } else if (childTaskPlan.getDestroyReason().equals("援外")) { | |
| 1466 | - ssgl_yw += childTaskPlan.getMileage(); | |
| 1467 | - } else { | |
| 1468 | - ssgl_other += childTaskPlan.getMileage(); | |
| 1469 | - } | |
| 1464 | + }else{ | |
| 1465 | + ssgl_other += tempJhlc; | |
| 1466 | + ssgl_otherZ += tempJhlc; | |
| 1467 | + } | |
| 1468 | + } else { | |
| 1469 | + Iterator<ChildTaskPlan> it = childTaskPlans.iterator(); | |
| 1470 | + while (it.hasNext()) { | |
| 1471 | + ChildTaskPlan childTaskPlan = it.next(); | |
| 1472 | + childMileage = childTaskPlan.getMileage() == null ? 0 : childTaskPlan.getMileage(); | |
| 1473 | + jhlc += childMileage; | |
| 1474 | + jhlcZ += childMileage; | |
| 1475 | + if (childTaskPlan.isDestroy()) { | |
| 1476 | + ssgl += childMileage; | |
| 1477 | + ssglZ += childMileage; | |
| 1478 | + if (childTaskPlan.getDestroyReason().equals("路阻")) { | |
| 1479 | + ssgl_lz += childTaskPlan.getMileage(); | |
| 1480 | + ssgl_lzZ += childTaskPlan.getMileage(); | |
| 1481 | + } else if (childTaskPlan.getDestroyReason().equals("吊慢")) { | |
| 1482 | + ssgl_dm += childTaskPlan.getMileage(); | |
| 1483 | + ssgl_dmZ += childTaskPlan.getMileage(); | |
| 1484 | + } else if (childTaskPlan.getDestroyReason().equals("故障")) { | |
| 1485 | + ssgl_gz += childTaskPlan.getMileage(); | |
| 1486 | + ssgl_gzZ += childTaskPlan.getMileage(); | |
| 1487 | + } else if (childTaskPlan.getDestroyReason().equals("纠纷")) { | |
| 1488 | + ssgl_jf += childTaskPlan.getMileage(); | |
| 1489 | + ssgl_jfZ += childTaskPlan.getMileage(); | |
| 1490 | + } else if (childTaskPlan.getDestroyReason().equals("肇事")) { | |
| 1491 | + ssgl_zs += childTaskPlan.getMileage(); | |
| 1492 | + ssgl_zsZ += childTaskPlan.getMileage(); | |
| 1493 | + } else if (childTaskPlan.getDestroyReason().equals("缺人")) { | |
| 1494 | + ssgl_qr += childTaskPlan.getMileage(); | |
| 1495 | + ssgl_qrZ += childTaskPlan.getMileage(); | |
| 1496 | + } else if (childTaskPlan.getDestroyReason().equals("缺车")) { | |
| 1497 | + ssgl_qc += childTaskPlan.getMileage(); | |
| 1498 | + ssgl_qcZ += childTaskPlan.getMileage(); | |
| 1499 | + } else if (childTaskPlan.getDestroyReason().equals("客稀")) { | |
| 1500 | + ssgl_kx += childTaskPlan.getMileage(); | |
| 1501 | + ssgl_kxZ += childTaskPlan.getMileage(); | |
| 1502 | + } else if (childTaskPlan.getDestroyReason().equals("气候")) { | |
| 1503 | + ssgl_qh += childTaskPlan.getMileage(); | |
| 1504 | + ssgl_qhZ += childTaskPlan.getMileage(); | |
| 1505 | + } else if (childTaskPlan.getDestroyReason().equals("援外")) { | |
| 1506 | + ssgl_yw += childTaskPlan.getMileage(); | |
| 1507 | + ssgl_ywZ += childTaskPlan.getMileage(); | |
| 1470 | 1508 | } else { |
| 1471 | - sjgl += childMileage; | |
| 1509 | + ssgl_other += childTaskPlan.getMileage(); | |
| 1510 | + ssgl_otherZ += childTaskPlan.getMileage(); | |
| 1472 | 1511 | } |
| 1512 | + } else { | |
| 1513 | + sjgl += childMileage; | |
| 1514 | + sjglZ += childMileage; | |
| 1473 | 1515 | } |
| 1474 | 1516 | } |
| 1517 | + } | |
| 1475 | 1518 | |
| 1476 | - //班次 | |
| 1477 | - jhbc++; | |
| 1478 | - String[] fcsj = scheduleRealInfo.getFcsj().split(":"); | |
| 1479 | - String[] fcsjActual = (scheduleRealInfo.getFcsjActual() == null ? "0:00" : scheduleRealInfo.getFcsjActual()).split(":"); | |
| 1480 | - if ((Integer.parseInt(fcsj[0]) * 60 + Integer.parseInt(fcsj[1])) > sj_0 && (Integer.parseInt(fcsj[0]) * 60 + Integer.parseInt(fcsj[1])) < sj_1) { | |
| 1481 | - jhbc_m++; | |
| 1482 | - } else if ((Integer.parseInt(fcsj[0]) * 60 + Integer.parseInt(fcsj[1])) > sj_2 && (Integer.parseInt(fcsj[0]) * 60 + Integer.parseInt(fcsj[1])) < sj_3) { | |
| 1483 | - jhbc_a++; | |
| 1484 | - } | |
| 1485 | - if (scheduleRealInfo.getStatus() == 2) { | |
| 1486 | - sjbc++; | |
| 1487 | - if ((Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) > sj_0 && (Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) < sj_1) { | |
| 1488 | - sjbc_m++; | |
| 1489 | - } else if ((Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) > sj_2 && (Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) < sj_3) { | |
| 1490 | - sjbc_a++; | |
| 1491 | - } | |
| 1519 | + //班次 | |
| 1520 | + jhbc++; | |
| 1521 | + String[] fcsj = scheduleRealInfo.getFcsj().split(":"); | |
| 1522 | + String[] fcsjActual = (scheduleRealInfo.getFcsjActual() == null ? "0:00" : scheduleRealInfo.getFcsjActual()).split(":"); | |
| 1523 | + if ((Integer.parseInt(fcsj[0]) * 60 + Integer.parseInt(fcsj[1])) > sj_0 && (Integer.parseInt(fcsj[0]) * 60 + Integer.parseInt(fcsj[1])) < sj_1) { | |
| 1524 | + jhbc_m++; | |
| 1525 | + jhbc_mZ++; | |
| 1526 | + } else if ((Integer.parseInt(fcsj[0]) * 60 + Integer.parseInt(fcsj[1])) > sj_2 && (Integer.parseInt(fcsj[0]) * 60 + Integer.parseInt(fcsj[1])) < sj_3) { | |
| 1527 | + jhbc_a++; | |
| 1528 | + jhbc_aZ++; | |
| 1529 | + } | |
| 1530 | + if (scheduleRealInfo.getStatus() == 2) { | |
| 1531 | + sjbc++; | |
| 1532 | + sjbcZ++; | |
| 1533 | + if ((Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) > sj_0 && (Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) < sj_1) { | |
| 1534 | + sjbc_m++; | |
| 1535 | + sjbc_mZ++; | |
| 1536 | + } else if ((Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) > sj_2 && (Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) < sj_3) { | |
| 1537 | + sjbc_a++; | |
| 1538 | + sjbc_aZ++; | |
| 1492 | 1539 | } |
| 1493 | - if (scheduleRealInfo.isSflj()) { | |
| 1494 | - ljbc++; | |
| 1495 | - if ((Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) > sj_0 && (Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) < sj_1) { | |
| 1496 | - ljbc_m++; | |
| 1497 | - } else if ((Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) > sj_2 && (Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) < sj_3) { | |
| 1498 | - ljbc_a++; | |
| 1499 | - } | |
| 1540 | + } | |
| 1541 | + if (scheduleRealInfo.isSflj()) { | |
| 1542 | + ljbc++; | |
| 1543 | + ljbcZ++; | |
| 1544 | + if ((Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) > sj_0 && (Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) < sj_1) { | |
| 1545 | + ljbc_m++; | |
| 1546 | + ljbc_mZ++; | |
| 1547 | + } else if ((Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) > sj_2 && (Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) < sj_3) { | |
| 1548 | + ljbc_a++; | |
| 1549 | + ljbc_aZ++; | |
| 1500 | 1550 | } |
| 1501 | - if (scheduleRealInfo.getBcType().equals("venting")) { | |
| 1502 | - fzbc++; | |
| 1503 | - if ((Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) > sj_0 && (Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) < sj_1) { | |
| 1504 | - fzbc_m++; | |
| 1505 | - } else if ((Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) > sj_2 && (Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) < sj_3) { | |
| 1506 | - fzbc_a++; | |
| 1507 | - } | |
| 1551 | + } | |
| 1552 | + if (scheduleRealInfo.getBcType().equals("venting")) { | |
| 1553 | + fzbc++; | |
| 1554 | + fzbcZ++; | |
| 1555 | + if ((Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) > sj_0 && (Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) < sj_1) { | |
| 1556 | + fzbc_m++; | |
| 1557 | + fzbc_mZ++; | |
| 1558 | + } else if ((Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) > sj_2 && (Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) < sj_3) { | |
| 1559 | + fzbc_a++; | |
| 1560 | + fzbc_aZ++; | |
| 1508 | 1561 | } |
| 1509 | 1562 | } |
| 1563 | + | |
| 1564 | + if(i<list.size()-1){ | |
| 1565 | + if(!scheduleRealInfo.getXlBm().equals(list.get(i+1).getXlBm())) | |
| 1566 | + { | |
| 1567 | + map= new HashMap<String, Object>(); | |
| 1568 | + map.put("xlName", scheduleRealInfo.getXlName()); | |
| 1569 | + map.put("jhlc", format.format(jhlc)); | |
| 1570 | + map.put("sjgl", format.format(sjgl)); | |
| 1571 | + map.put("ssgl", format.format(ssgl)); | |
| 1572 | + map.put("ssgl_lz", ssgl_lz == 0 ? 0 : format.format(ssgl_lz)); | |
| 1573 | + map.put("ssgl_dm", ssgl_dm == 0 ? 0 : format.format(ssgl_dm)); | |
| 1574 | + map.put("ssgl_gz", ssgl_gz == 0 ? 0 : format.format(ssgl_gz)); | |
| 1575 | + map.put("ssgl_jf", ssgl_jf == 0 ? 0 : format.format(ssgl_jf)); | |
| 1576 | + map.put("ssgl_zs", ssgl_zs == 0 ? 0 : format.format(ssgl_zs)); | |
| 1577 | + map.put("ssgl_qr", ssgl_qr == 0 ? 0 : format.format(ssgl_qr)); | |
| 1578 | + map.put("ssgl_qc", ssgl_qc == 0 ? 0 : format.format(ssgl_qc)); | |
| 1579 | + map.put("ssgl_kx", ssgl_kx == 0 ? 0 : format.format(ssgl_kx)); | |
| 1580 | + map.put("ssgl_qh", ssgl_qh == 0 ? 0 : format.format(ssgl_qh)); | |
| 1581 | + map.put("ssgl_yw", ssgl_yw == 0 ? 0 : format.format(ssgl_yw)); | |
| 1582 | + map.put("ssgl_other", ssgl_other == 0 ? 0 : format.format(ssgl_other)); | |
| 1583 | + map.put("ljgl", ljgl == 0 ? 0 : format.format(ljgl)); | |
| 1584 | + map.put("jhbc", jhbc); | |
| 1585 | + map.put("jhbc_m", jhbc_m); | |
| 1586 | + map.put("jhbc_a", jhbc_a); | |
| 1587 | + map.put("sjbc", sjbc); | |
| 1588 | + map.put("sjbc_m", sjbc_m); | |
| 1589 | + map.put("sjbc_a", sjbc_a); | |
| 1590 | + map.put("ljbc", ljbc); | |
| 1591 | + map.put("ljbc_m", ljbc_m); | |
| 1592 | + map.put("ljbc_a", ljbc_a); | |
| 1593 | + map.put("fzbc", fzbc); | |
| 1594 | + map.put("fzbc_m", fzbc_m); | |
| 1595 | + map.put("fzbc_a", fzbc_a); | |
| 1596 | + map.put("dtbc", dtbc); | |
| 1597 | + map.put("dtbc_m", dtbc_m); | |
| 1598 | + map.put("dtbc_a", dtbc_a); | |
| 1599 | + map.put("djg", djg); | |
| 1600 | + map.put("djg_m", djg_m); | |
| 1601 | + map.put("djg_a", djg_a); | |
| 1602 | + map.put("djg_time", djg_time); | |
| 1603 | + lMap.add(map); | |
| 1604 | + jhlc = 0; tempJhlc = 0; childMileage = 0; | |
| 1605 | + sjgl = 0f; ssgl = 0f; ssgl_lz = 0f; ssgl_dm = 0f; ssgl_gz = 0f; ssgl_jf = 0f; ssgl_zs = 0f; | |
| 1606 | + ssgl_qr = 0f; ssgl_qc = 0f; ssgl_kx = 0f; ssgl_qh = 0f; ssgl_yw = 0f;ssgl_other = 0f; | |
| 1607 | + ljgl = 0f; | |
| 1608 | + //班次 | |
| 1609 | + jhbc = 0; jhbc_m = 0; jhbc_a = 0; | |
| 1610 | + sjbc = 0; sjbc_m = 0; sjbc_a = 0; | |
| 1611 | + ljbc = 0; ljbc_m = 0; ljbc_a = 0; | |
| 1612 | + fzbc = 0; fzbc_m = 0; fzbc_a = 0; | |
| 1613 | + dtbc = 0; dtbc_m = 0; dtbc_a = 0; | |
| 1614 | + djg = 0; djg_m = 0; djg_a = 0; djg_time = 0; | |
| 1615 | + } | |
| 1616 | + }else{ | |
| 1617 | + map= new HashMap<String, Object>(); | |
| 1618 | + map.put("xlName", scheduleRealInfo.getXlName()); | |
| 1619 | + map.put("jhlc", format.format(jhlc)); | |
| 1620 | + map.put("sjgl", format.format(sjgl)); | |
| 1621 | + map.put("ssgl", format.format(ssgl)); | |
| 1622 | + map.put("ssgl_lz", ssgl_lz == 0 ? 0 : format.format(ssgl_lz)); | |
| 1623 | + map.put("ssgl_dm", ssgl_dm == 0 ? 0 : format.format(ssgl_dm)); | |
| 1624 | + map.put("ssgl_gz", ssgl_gz == 0 ? 0 : format.format(ssgl_gz)); | |
| 1625 | + map.put("ssgl_jf", ssgl_jf == 0 ? 0 : format.format(ssgl_jf)); | |
| 1626 | + map.put("ssgl_zs", ssgl_zs == 0 ? 0 : format.format(ssgl_zs)); | |
| 1627 | + map.put("ssgl_qr", ssgl_qr == 0 ? 0 : format.format(ssgl_qr)); | |
| 1628 | + map.put("ssgl_qc", ssgl_qc == 0 ? 0 : format.format(ssgl_qc)); | |
| 1629 | + map.put("ssgl_kx", ssgl_kx == 0 ? 0 : format.format(ssgl_kx)); | |
| 1630 | + map.put("ssgl_qh", ssgl_qh == 0 ? 0 : format.format(ssgl_qh)); | |
| 1631 | + map.put("ssgl_yw", ssgl_yw == 0 ? 0 : format.format(ssgl_yw)); | |
| 1632 | + map.put("ssgl_other", ssgl_other == 0 ? 0 : format.format(ssgl_other)); | |
| 1633 | + map.put("ljgl", ljgl == 0 ? 0 : format.format(ljgl)); | |
| 1634 | + map.put("jhbc", jhbc); | |
| 1635 | + map.put("jhbc_m", jhbc_m); | |
| 1636 | + map.put("jhbc_a", jhbc_a); | |
| 1637 | + map.put("sjbc", sjbc); | |
| 1638 | + map.put("sjbc_m", sjbc_m); | |
| 1639 | + map.put("sjbc_a", sjbc_a); | |
| 1640 | + map.put("ljbc", ljbc); | |
| 1641 | + map.put("ljbc_m", ljbc_m); | |
| 1642 | + map.put("ljbc_a", ljbc_a); | |
| 1643 | + map.put("fzbc", fzbc); | |
| 1644 | + map.put("fzbc_m", fzbc_m); | |
| 1645 | + map.put("fzbc_a", fzbc_a); | |
| 1646 | + map.put("dtbc", dtbc); | |
| 1647 | + map.put("dtbc_m", dtbc_m); | |
| 1648 | + map.put("dtbc_a", dtbc_a); | |
| 1649 | + map.put("djg", djg); | |
| 1650 | + map.put("djg_m", djg_m); | |
| 1651 | + map.put("djg_a", djg_a); | |
| 1652 | + map.put("djg_time", djg_time); | |
| 1653 | + lMap.add(map); | |
| 1654 | + jhlc = 0; tempJhlc = 0; childMileage = 0; | |
| 1655 | + sjgl = 0f; ssgl = 0f; ssgl_lz = 0f; ssgl_dm = 0f; ssgl_gz = 0f; ssgl_jf = 0f; ssgl_zs = 0f; | |
| 1656 | + ssgl_qr = 0f; ssgl_qc = 0f; ssgl_kx = 0f; ssgl_qh = 0f; ssgl_yw = 0f;ssgl_other = 0f; | |
| 1657 | + ljgl = 0f; | |
| 1658 | + //班次 | |
| 1659 | + jhbc = 0; jhbc_m = 0; jhbc_a = 0; | |
| 1660 | + sjbc = 0; sjbc_m = 0; sjbc_a = 0; | |
| 1661 | + ljbc = 0; ljbc_m = 0; ljbc_a = 0; | |
| 1662 | + fzbc = 0; fzbc_m = 0; fzbc_a = 0; | |
| 1663 | + dtbc = 0; dtbc_m = 0; dtbc_a = 0; | |
| 1664 | + djg = 0; djg_m = 0; djg_a = 0; djg_time = 0; | |
| 1665 | + } | |
| 1510 | 1666 | } |
| 1511 | 1667 | } |
| 1512 | - map.put("xlName", xlName); | |
| 1513 | - map.put("jhlc", format.format(jhlc)); | |
| 1514 | - map.put("sjgl", format.format(sjgl)); | |
| 1515 | - map.put("ssgl", format.format(ssgl)); | |
| 1516 | - map.put("ssgl_lz", ssgl_lz == 0 ? 0 : format.format(ssgl_lz)); | |
| 1517 | - map.put("ssgl_dm", ssgl_dm == 0 ? 0 : format.format(ssgl_dm)); | |
| 1518 | - map.put("ssgl_gz", ssgl_gz == 0 ? 0 : format.format(ssgl_gz)); | |
| 1519 | - map.put("ssgl_jf", ssgl_jf == 0 ? 0 : format.format(ssgl_jf)); | |
| 1520 | - map.put("ssgl_zs", ssgl_zs == 0 ? 0 : format.format(ssgl_zs)); | |
| 1521 | - map.put("ssgl_qr", ssgl_qr == 0 ? 0 : format.format(ssgl_qr)); | |
| 1522 | - map.put("ssgl_qc", ssgl_qc == 0 ? 0 : format.format(ssgl_qc)); | |
| 1523 | - map.put("ssgl_kx", ssgl_kx == 0 ? 0 : format.format(ssgl_kx)); | |
| 1524 | - map.put("ssgl_qh", ssgl_qh == 0 ? 0 : format.format(ssgl_qh)); | |
| 1525 | - map.put("ssgl_yw", ssgl_yw == 0 ? 0 : format.format(ssgl_yw)); | |
| 1526 | - map.put("ssgl_other", ssgl_other == 0 ? 0 : format.format(ssgl_other)); | |
| 1527 | - map.put("ljgl", ljgl == 0 ? 0 : format.format(ljgl)); | |
| 1528 | - map.put("jhbc", jhbc); | |
| 1529 | - map.put("jhbc_m", jhbc_m); | |
| 1530 | - map.put("jhbc_a", jhbc_a); | |
| 1531 | - map.put("sjbc", sjbc); | |
| 1532 | - map.put("sjbc_m", sjbc_m); | |
| 1533 | - map.put("sjbc_a", sjbc_a); | |
| 1534 | - map.put("ljbc", ljbc); | |
| 1535 | - map.put("ljbc_m", ljbc_m); | |
| 1536 | - map.put("ljbc_a", ljbc_a); | |
| 1537 | - map.put("fzbc", fzbc); | |
| 1538 | - map.put("fzbc_m", fzbc_m); | |
| 1539 | - map.put("fzbc_a", fzbc_a); | |
| 1540 | - map.put("dtbc", dtbc); | |
| 1541 | - map.put("dtbc_m", dtbc_m); | |
| 1542 | - map.put("dtbc_a", dtbc_a); | |
| 1543 | - map.put("djg", djg); | |
| 1544 | - map.put("djg_m", djg_m); | |
| 1545 | - map.put("djg_a", djg_a); | |
| 1546 | - map.put("djg_time", djg_time); | |
| 1668 | + map= new HashMap<String, Object>(); | |
| 1669 | + map.put("xlName", "合计"); | |
| 1670 | + map.put("jhlc", format.format(jhlcZ)); | |
| 1671 | + map.put("sjgl", format.format(sjglZ)); | |
| 1672 | + map.put("ssgl", format.format(ssglZ)); | |
| 1673 | + map.put("ssgl_lz", ssgl_lzZ == 0 ? 0 : format.format(ssgl_lzZ)); | |
| 1674 | + map.put("ssgl_dm", ssgl_dmZ == 0 ? 0 : format.format(ssgl_dmZ)); | |
| 1675 | + map.put("ssgl_gz", ssgl_gzZ == 0 ? 0 : format.format(ssgl_gzZ)); | |
| 1676 | + map.put("ssgl_jf", ssgl_jfZ == 0 ? 0 : format.format(ssgl_jfZ)); | |
| 1677 | + map.put("ssgl_zs", ssgl_zsZ == 0 ? 0 : format.format(ssgl_zsZ)); | |
| 1678 | + map.put("ssgl_qr", ssgl_qrZ == 0 ? 0 : format.format(ssgl_qrZ)); | |
| 1679 | + map.put("ssgl_qc", ssgl_qcZ == 0 ? 0 : format.format(ssgl_qcZ)); | |
| 1680 | + map.put("ssgl_kx", ssgl_kxZ == 0 ? 0 : format.format(ssgl_kxZ)); | |
| 1681 | + map.put("ssgl_qh", ssgl_qhZ == 0 ? 0 : format.format(ssgl_qhZ)); | |
| 1682 | + map.put("ssgl_yw", ssgl_ywZ == 0 ? 0 : format.format(ssgl_ywZ)); | |
| 1683 | + map.put("ssgl_other", ssgl_otherZ == 0 ? 0 : format.format(ssgl_otherZ)); | |
| 1684 | + map.put("ljgl", ljglZ == 0 ? 0 : format.format(ljglZ)); | |
| 1685 | + map.put("jhbc", jhbcZ); | |
| 1686 | + map.put("jhbc_m", jhbc_mZ); | |
| 1687 | + map.put("jhbc_a", jhbc_aZ); | |
| 1688 | + map.put("sjbc", sjbcZ); | |
| 1689 | + map.put("sjbc_m", sjbc_mZ); | |
| 1690 | + map.put("sjbc_a", sjbc_aZ); | |
| 1691 | + map.put("ljbc", ljbcZ); | |
| 1692 | + map.put("ljbc_m", ljbc_mZ); | |
| 1693 | + map.put("ljbc_a", ljbc_aZ); | |
| 1694 | + map.put("fzbc", fzbcZ); | |
| 1695 | + map.put("fzbc_m", fzbc_mZ); | |
| 1696 | + map.put("fzbc_a", fzbc_aZ); | |
| 1697 | + map.put("dtbc", dtbcZ); | |
| 1698 | + map.put("dtbc_m", dtbc_mZ); | |
| 1699 | + map.put("dtbc_a", dtbc_aZ); | |
| 1700 | + map.put("djg", djgZ); | |
| 1701 | + map.put("djg_m", djg_mZ); | |
| 1702 | + map.put("djg_a", djg_aZ); | |
| 1703 | + map.put("djg_time", djg_timeZ); | |
| 1547 | 1704 | lMap.add(map); |
| 1705 | + /* for (int i = 0; i < lMap.size(); i++) { | |
| 1706 | + Map<String, Object> m=lMap.get(i); | |
| 1707 | +// m.get("")) | |
| 1708 | + jhlc += Double.parseDouble(m.get("jhlc").toString()); | |
| 1709 | + sjgl += Double.parseDouble(m.get("sjgl").toString()); | |
| 1710 | + ssgl += Double.parseDouble( m.get("ssgl").toString()); | |
| 1711 | + ssgl_lz += Double.parseDouble( m.get("ssgl_lz").toString()); | |
| 1712 | + ssgl_dm += Double.parseDouble(m.get("ssgl_dm").toString()); | |
| 1713 | + ssgl_gz += Double.parseDouble( m.get("ssgl_gz").toString()); | |
| 1714 | + ssgl_jf += m.get("ssgl_jf", ssgl_jf == 0 ? 0 : format.format(ssgl_jf)); | |
| 1715 | + m.get("ssgl_zs", ssgl_zs == 0 ? 0 : format.format(ssgl_zs)); | |
| 1716 | + m.get("ssgl_qr", ssgl_qr == 0 ? 0 : format.format(ssgl_qr)); | |
| 1717 | + m.get("ssgl_qc", ssgl_qc == 0 ? 0 : format.format(ssgl_qc)); | |
| 1718 | + m.get("ssgl_kx", ssgl_kx == 0 ? 0 : format.format(ssgl_kx)); | |
| 1719 | + m.get("ssgl_qh", ssgl_qh == 0 ? 0 : format.format(ssgl_qh)); | |
| 1720 | + m.get("ssgl_yw", ssgl_yw == 0 ? 0 : format.format(ssgl_yw)); | |
| 1721 | + m.get("ssgl_other", ssgl_other == 0 ? 0 : format.format(ssgl_other)); | |
| 1722 | + m.get("ljgl", ljgl == 0 ? 0 : format.format(ljgl)); | |
| 1723 | + m.get("jhbc", jhbc); | |
| 1724 | + m.get("jhbc_m", jhbc_m); | |
| 1725 | + m.get("jhbc_a", jhbc_a); | |
| 1726 | + m.get("sjbc", sjbc); | |
| 1727 | + m.get("sjbc_m", sjbc_m); | |
| 1728 | + m.get("sjbc_a", sjbc_a); | |
| 1729 | + m.get("ljbc", ljbc); | |
| 1730 | + m.get("ljbc_m", ljbc_m); | |
| 1731 | + m.get("ljbc_a", ljbc_a); | |
| 1732 | + m.get("fzbc", fzbc); | |
| 1733 | + m.get("fzbc_m", fzbc_m); | |
| 1734 | + m.get("fzbc_a", fzbc_a); | |
| 1735 | + m.get("dtbc", dtbc); | |
| 1736 | + m.get("dtbc_m", dtbc_m); | |
| 1737 | + m.get("dtbc_a", dtbc_a); | |
| 1738 | + m.get("djg", djg); | |
| 1739 | + m.get("djg_m", djg_m); | |
| 1740 | + m.get("djg_a", djg_a); | |
| 1741 | + m.get("djg_time", djg_time); | |
| 1742 | + }*/ | |
| 1548 | 1743 | |
| 1549 | 1744 | if(type != null && type.length() != 0 && type.equals("export")){ |
| 1550 | 1745 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), |
| ... | ... | @@ -2129,7 +2324,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 2129 | 2324 | int jhbc = 0,cjbc = 0,ljbc = 0; |
| 2130 | 2325 | double jhlc = 0, yygl = 0, ksgl = 0,tempJhlc = 0,jcclc=0; |
| 2131 | 2326 | float addMileage = 0l,remMileage = 0l; |
| 2132 | - | |
| 2327 | + int xyz=1; | |
| 2133 | 2328 | Map<String,Object> map; |
| 2134 | 2329 | for(ScheduleRealInfo scheduleRealInfo : scheduleRealInfos){ |
| 2135 | 2330 | if(scheduleRealInfo != null){ |
| ... | ... | @@ -2142,8 +2337,11 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 2142 | 2337 | if(scheduleRealInfo.isSflj()){ |
| 2143 | 2338 | ljbc++; |
| 2144 | 2339 | }else{ |
| 2145 | - jhlc += tempJhlc; | |
| 2146 | - jhbc++; | |
| 2340 | + if( !(scheduleRealInfo.getBcType().equals("in") | |
| 2341 | + ||scheduleRealInfo.getBcType().equals("out")) ){ | |
| 2342 | + jhbc++; | |
| 2343 | + jhlc += tempJhlc; | |
| 2344 | + } | |
| 2147 | 2345 | if(scheduleRealInfo.getStatus() == -1){ |
| 2148 | 2346 | remMileage += tempJhlc; |
| 2149 | 2347 | cjbc++; |
| ... | ... | @@ -2153,25 +2351,44 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 2153 | 2351 | //计算营运里程,空驶里程 |
| 2154 | 2352 | if(childTaskPlans.isEmpty()){ |
| 2155 | 2353 | if(scheduleRealInfo.getBcType().equals("in") || scheduleRealInfo.getBcType().equals("out") |
| 2156 | - || scheduleRealInfo.getBcType().equals("venting")){ | |
| 2157 | - ksgl += tempJhlc; | |
| 2158 | - }else{ | |
| 2159 | - yygl += tempJhlc; | |
| 2354 | + ){ | |
| 2355 | + jcclc +=tempJhlc; | |
| 2356 | + } | |
| 2357 | + //主任务 放空班次属于营运 | |
| 2358 | +// else if(scheduleRealInfo.getBcType().equals("venting")){ | |
| 2359 | +// ksgl += tempJhlc; | |
| 2360 | +// } | |
| 2361 | + else{ | |
| 2362 | + if(scheduleRealInfo.getStatus() != -1){ | |
| 2363 | + if(scheduleRealInfo.isSflj()){ | |
| 2364 | + addMileage += tempJhlc; | |
| 2365 | + } | |
| 2366 | + yygl += tempJhlc; | |
| 2367 | + } | |
| 2160 | 2368 | } |
| 2161 | 2369 | }else{ |
| 2162 | 2370 | Iterator<ChildTaskPlan> it = childTaskPlans.iterator(); |
| 2163 | 2371 | while(it.hasNext()){ |
| 2164 | 2372 | ChildTaskPlan childTaskPlan = it.next(); |
| 2165 | 2373 | if(childTaskPlan.getMileageType().equals("empty")){ |
| 2166 | - if(scheduleRealInfo.isSflj()){ | |
| 2167 | - addMileage += tempJhlc; | |
| 2374 | + if(childTaskPlan.isDestroy()){ | |
| 2375 | + remMileage += childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage(); | |
| 2376 | + }else{ | |
| 2377 | + if(scheduleRealInfo.isSflj()){ | |
| 2378 | + addMileage += tempJhlc; | |
| 2379 | + } | |
| 2380 | + ksgl += childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage(); | |
| 2168 | 2381 | } |
| 2169 | - ksgl += childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage(); | |
| 2170 | 2382 | }else{ |
| 2171 | - if(scheduleRealInfo.isSflj()){ | |
| 2172 | - addMileage += tempJhlc; | |
| 2383 | + if(childTaskPlan.isDestroy()){ | |
| 2384 | + remMileage += childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage(); | |
| 2385 | +// cjbc++; | |
| 2386 | + }else{ | |
| 2387 | + if(scheduleRealInfo.isSflj()){ | |
| 2388 | + addMileage += tempJhlc; | |
| 2389 | + } | |
| 2390 | + yygl += childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage(); | |
| 2173 | 2391 | } |
| 2174 | - yygl += childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage(); | |
| 2175 | 2392 | } |
| 2176 | 2393 | } |
| 2177 | 2394 | } |
| ... | ... | @@ -2179,6 +2396,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 2179 | 2396 | if(!(scheduleRealInfo.getBcType().equals("in")||scheduleRealInfo.getBcType().equals("out"))){ |
| 2180 | 2397 | map = new HashMap<String, Object>(); |
| 2181 | 2398 | try { |
| 2399 | + scheduleRealInfo.setBcs(xyz); | |
| 2400 | + xyz++; | |
| 2182 | 2401 | map = rru.getMapValue(scheduleRealInfo); |
| 2183 | 2402 | String zdsj = scheduleRealInfo.getZdsj(); |
| 2184 | 2403 | String zdsjActual = scheduleRealInfo.getZdsjActual(); |
| ... | ... | @@ -2226,7 +2445,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 2226 | 2445 | Long fcsj1=sdf.parse(date+" 03:00").getTime(); |
| 2227 | 2446 | Long fcsj2=sdf.parse(date+" 11:00").getTime(); |
| 2228 | 2447 | Long fcsj3=sdf.parse(date+" 22:00").getTime(); |
| 2229 | - for(int i=0;i<list.size();i++){ | |
| 2448 | + for(int i=0;i<listDtuy.size();i++){ | |
| 2230 | 2449 | DutyEmployee t=listDtuy.get(i); |
| 2231 | 2450 | Long ts=t.getTs(); |
| 2232 | 2451 | if(ts>fcsj1&&ts<fcsj2){ | ... | ... |
src/main/resources/static/pages/forms/statement/scheduleDaily.html
| ... | ... | @@ -277,7 +277,7 @@ |
| 277 | 277 | var line = $("#line").val(); |
| 278 | 278 | var xlName = $("#select2-line-container").html(); |
| 279 | 279 | var date = $("#date").val(); |
| 280 | - $get('/realSchedule/statisticsDaily',{line:line,date:date,xlName:xlName},function(result){ | |
| 280 | + $get('/realSchedule/statisticsDaily',{line:line,date:date,xlName:xlName,type:"query"},function(result){ | |
| 281 | 281 | var scheduleDaily_1 = template('scheduleDaily_1',{list:result}); |
| 282 | 282 | $('#forms .scheduleDaily_1').html(scheduleDaily_1); |
| 283 | 283 | }); | ... | ... |
src/main/resources/static/pages/forms/statement/scheduleDailyQp.html
| ... | ... | @@ -182,36 +182,36 @@ |
| 182 | 182 | </tr> |
| 183 | 183 | </thead> |
| 184 | 184 | <tbody > |
| 185 | - <tr > | |
| 186 | - <td>1</td> | |
| 185 | + <tr > | |
| 186 | + <td></td> | |
| 187 | 187 | <td> |
| 188 | - YT-CD001 | |
| 188 | + | |
| 189 | 189 | </td> |
| 190 | 190 | <td> |
| 191 | 191 | |
| 192 | 192 | </td> |
| 193 | 193 | <td> |
| 194 | - 1 | |
| 194 | + | |
| 195 | 195 | </td> |
| 196 | 196 | <td> |
| 197 | - 00001 | |
| 197 | + | |
| 198 | 198 | </td> |
| 199 | 199 | <td > |
| 200 | - 04:30 | |
| 200 | + | |
| 201 | 201 | </td> |
| 202 | 202 | <td></td> |
| 203 | 203 | <td></td> |
| 204 | 204 | <td></td> |
| 205 | 205 | <td></td> |
| 206 | - <td>1</td> | |
| 207 | 206 | <td></td> |
| 208 | - <td>06:50</td> | |
| 209 | - <td>1</td> | |
| 210 | - <td>06:00</td> | |
| 211 | 207 | <td></td> |
| 212 | - <td>08:02</td> | |
| 213 | - <td>-2</td> | |
| 214 | - <td>07:10</td> | |
| 208 | + <td></td> | |
| 209 | + <td></td> | |
| 210 | + <td></td> | |
| 211 | + <td></td> | |
| 212 | + <td></td> | |
| 213 | + <td></td> | |
| 214 | + <td></td> | |
| 215 | 215 | <td></td> |
| 216 | 216 | <td></td> |
| 217 | 217 | <td></td> |
| ... | ... | @@ -266,7 +266,7 @@ |
| 266 | 266 | <td></td> |
| 267 | 267 | <td></td> |
| 268 | 268 | </tr> |
| 269 | - | |
| 269 | + | |
| 270 | 270 | </tbody> |
| 271 | 271 | </table> |
| 272 | 272 | <div style="text-align: right;"> | ... | ... |
src/main/resources/static/pages/forms/statement/statisticsDaily .html
| 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>早高峰:6:31~8:30 晚高峰:16:01~18:00</label> | |
| 47 | - <table class="table table-bordered table-hover table-checkable" id="forms"> | |
| 48 | - <thead> | |
| 49 | - <tr> | |
| 50 | - <th colspan="36">线路运营情况统计日报</th> | |
| 51 | - </tr> | |
| 52 | - <tr> | |
| 53 | - <td rowspan="3">路线别</td> | |
| 54 | - <td colspan="15">全日营运里程(公里)</td> | |
| 55 | - <td colspan="15">全日营运班次</td> | |
| 56 | - <td colspan="5">大间隔情况</td> | |
| 57 | - </tr> | |
| 58 | - <tr> | |
| 59 | - <td rowspan="2">计划</td> | |
| 60 | - <td rowspan="2">实驶</td> | |
| 61 | - <td rowspan="2">少驶</td> | |
| 62 | - <td colspan="11">少驶原因(公里)</td> | |
| 63 | - <td rowspan="2">临加公里</td> | |
| 64 | - <td colspan="3">计划班次</td> | |
| 65 | - <td colspan="3">实际班次</td> | |
| 66 | - <td colspan="3">临加班次</td> | |
| 67 | - <td colspan="3">放站班次</td> | |
| 68 | - <td colspan="3">调头班次</td> | |
| 69 | - <td colspan="3">发生次数</td> | |
| 70 | - <td rowspan="2">最大间隔时间(秒)</td> | |
| 71 | - <td rowspan="2">原因</td> | |
| 72 | - </tr> | |
| 73 | - <tr> | |
| 74 | - <td width="31px">路阻</td> | |
| 75 | - <td>吊慢</td> | |
| 76 | - <td>故障</td> | |
| 77 | - <td>纠纷</td> | |
| 78 | - <td>肇事</td> | |
| 79 | - <td>缺人</td> | |
| 80 | - <td>缺车</td> | |
| 81 | - <td>客稀</td> | |
| 82 | - <td>气候</td> | |
| 83 | - <td>援外</td> | |
| 84 | - <td>其他</td> | |
| 85 | - <td>全日</td> | |
| 86 | - <td>早高峰</td> | |
| 87 | - <td>晚高峰</td> | |
| 88 | - <td>全日</td> | |
| 89 | - <td>早高峰</td> | |
| 90 | - <td>晚高峰</td> | |
| 91 | - <td>全日</td> | |
| 92 | - <td>早高峰</td> | |
| 93 | - <td>晚高峰</td> | |
| 94 | - <td>全日</td> | |
| 95 | - <td>早高峰</td> | |
| 96 | - <td>晚高峰</td> | |
| 97 | - <td>全日</td> | |
| 98 | - <td>早高峰</td> | |
| 99 | - <td>晚高峰</td> | |
| 100 | - <td>全日</td> | |
| 101 | - <td>早高峰</td> | |
| 102 | - <td>晚高峰</td> | |
| 103 | - </tr> | |
| 104 | - </thead> | |
| 105 | - <tbody class="statisticsDaily"> | |
| 106 | - | |
| 107 | - </tbody> | |
| 108 | - <tr> | |
| 109 | - <td>合计</td> | |
| 110 | - <td> </td> | |
| 111 | - <td> </td> | |
| 112 | - <td> </td> | |
| 113 | - <td> </td> | |
| 114 | - <td> </td> | |
| 115 | - <td> </td> | |
| 116 | - <td> </td> | |
| 117 | - <td> </td> | |
| 118 | - <td> </td> | |
| 119 | - <td> </td> | |
| 120 | - <td> </td> | |
| 121 | - <td> </td> | |
| 122 | - <td> </td> | |
| 123 | - <td> </td> | |
| 124 | - <td> </td> | |
| 125 | - <td> </td> | |
| 126 | - <td> </td> | |
| 127 | - <td> </td> | |
| 128 | - <td> </td> | |
| 129 | - <td> </td> | |
| 130 | - <td> </td> | |
| 131 | - <td> </td> | |
| 132 | - <td> </td> | |
| 133 | - <td> </td> | |
| 134 | - <td> </td> | |
| 135 | - <td> </td> | |
| 136 | - <td> </td> | |
| 137 | - <td> </td> | |
| 138 | - <td> </td> | |
| 139 | - <td> </td> | |
| 140 | - <td> </td> | |
| 141 | - <td> </td> | |
| 142 | - <td> </td> | |
| 143 | - <td> </td> | |
| 144 | - <td> </td> | |
| 145 | - </tr> | |
| 146 | - <tr> | |
| 147 | - <td>运营情况摘录</td> | |
| 148 | - <td colspan="35"> </td> | |
| 149 | - </tr> | |
| 150 | - </table> | |
| 151 | - </div> | |
| 152 | - </div> | |
| 153 | - </div> | |
| 154 | - </div> | |
| 155 | -</div> | |
| 156 | - | |
| 157 | -<script> | |
| 158 | - $(function(){ | |
| 159 | - $('#export').attr('disabled', "true"); | |
| 160 | - | |
| 161 | - // 关闭左侧栏 | |
| 162 | - if (!$('body').hasClass('page-sidebar-closed')) | |
| 163 | - $('.menu-toggler.sidebar-toggler').click(); | |
| 164 | - | |
| 165 | - $("#date").datetimepicker({ | |
| 166 | - format : 'YYYY-MM-DD', | |
| 167 | - locale : 'zh-cn' | |
| 168 | - }); | |
| 169 | - $.get('/basic/lineCode2Name',function(result){ | |
| 170 | - var data=[]; | |
| 171 | - | |
| 172 | - for(var code in result){ | |
| 173 | - data.push({id: code, text: result[code]}); | |
| 174 | - } | |
| 175 | - console.log(data); | |
| 176 | - initPinYinSelect2('#line',data,''); | |
| 177 | - | |
| 178 | - }) | |
| 179 | - | |
| 180 | - | |
| 181 | - var line = $("#line").val(); | |
| 182 | - var xlName = $("#select2-line-container").html(); | |
| 183 | - var date = $("#date").val(); | |
| 184 | - $("#query").on("click",function(){ | |
| 185 | - line = $("#line").val(); | |
| 186 | - xlName = $("#select2-line-container").html(); | |
| 187 | - date = $("#date").val(); | |
| 188 | - $get('/realSchedule/statisticsDaily',{line:line,date:date,xlName:xlName,type:"query"},function(result){ | |
| 189 | - // 把数据填充到模版中 | |
| 190 | - var tbodyHtml = template('statisticsDaily',{list:result}); | |
| 191 | - // 把渲染好的模版html文本追加到表格中 | |
| 192 | - $('#forms .statisticsDaily').html(tbodyHtml); | |
| 193 | - | |
| 194 | - if(result.length == 0) | |
| 195 | - $("#export").attr('disabled',"true"); | |
| 196 | - else | |
| 197 | - $("#export").removeAttr("disabled"); | |
| 198 | - }); | |
| 199 | - }); | |
| 200 | - | |
| 201 | - $("#export").on("click",function(){ | |
| 202 | - $get('/realSchedule/statisticsDaily',{line:line,date:date,xlName:xlName,type:"export"},function(result){ | |
| 203 | - window.open("/downloadFile/download?fileName=统计日报"+moment(date).format("YYYYMMDD")); | |
| 204 | - }); | |
| 205 | - }); | |
| 206 | - | |
| 207 | - }); | |
| 208 | -</script> | |
| 209 | -<script type="text/html" id="statisticsDaily"> | |
| 210 | - {{each list as obj i}} | |
| 211 | - <tr> | |
| 212 | - <td>{{obj.xlName}}</td> | |
| 213 | - <td>{{obj.jhlc}}</td> | |
| 214 | - <td>{{obj.sjgl}}</td> | |
| 215 | - <td>{{obj.ssgl}}</td> | |
| 216 | - <td>{{obj.ssgl_lz}}</td> | |
| 217 | - <td>{{obj.ssgl_dm}}</td> | |
| 218 | - <td>{{obj.ssgl_gz}}</td> | |
| 219 | - <td>{{obj.ssgl_jf}}</td> | |
| 220 | - <td>{{obj.ssgl_zs}}</td> | |
| 221 | - <td>{{obj.ssgl_qr}}</td> | |
| 222 | - <td>{{obj.ssgl_qc}}</td> | |
| 223 | - <td>{{obj.ssgl_kx}}</td> | |
| 224 | - <td>{{obj.ssgl_qh}}</td> | |
| 225 | - <td>{{obj.ssgl_yw}}</td> | |
| 226 | - <td>{{obj.ssgl_other}}</td> | |
| 227 | - <td>{{obj.ljgl}}</td> | |
| 228 | - <td>{{obj.jhbc}}</td> | |
| 229 | - <td>{{obj.jhbc_m}}</td> | |
| 230 | - <td>{{obj.jhbc_a}}</td> | |
| 231 | - <td>{{obj.sjbc}}</td> | |
| 232 | - <td>{{obj.sjbc_m}}</td> | |
| 233 | - <td>{{obj.sjbc_a}}</td> | |
| 234 | - <td>{{obj.ljbc}}</td> | |
| 235 | - <td>{{obj.ljbc_m}}</td> | |
| 236 | - <td>{{obj.ljbc_a}}</td> | |
| 237 | - <td>{{obj.fzbc}}</td> | |
| 238 | - <td>{{obj.fzbc_m}}</td> | |
| 239 | - <td>{{obj.fzbc_a}}</td> | |
| 240 | - <td>{{obj.dtbc}}</td> | |
| 241 | - <td>{{obj.dtbc_m}}</td> | |
| 242 | - <td>{{obj.dtbc_a}}</td> | |
| 243 | - <td>{{obj.djg}}</td> | |
| 244 | - <td>{{obj.djg_m}}</td> | |
| 245 | - <td>{{obj.djg_a}}</td> | |
| 246 | - <td>{{obj.djg_time}}</td> | |
| 247 | - <td> </td> | |
| 248 | - </tr> | |
| 249 | - {{/each}} | |
| 250 | - {{if list.length == 0}} | |
| 251 | - <tr> | |
| 252 | - <td colspan="36"><h6 class="muted">没有找到相关数据</h6></td> | |
| 253 | - </tr> | |
| 254 | - {{/if}} | |
| 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>早高峰:6:31~8:30 晚高峰:16:01~18:00</label> | |
| 47 | + <table class="table table-bordered table-hover table-checkable" id="forms"> | |
| 48 | + <thead> | |
| 49 | + <tr> | |
| 50 | + <th colspan="36">线路运营情况统计日报</th> | |
| 51 | + </tr> | |
| 52 | + <tr> | |
| 53 | + <td rowspan="3">路线别</td> | |
| 54 | + <td colspan="15">全日营运里程(公里)</td> | |
| 55 | + <td colspan="15">全日营运班次</td> | |
| 56 | + <td colspan="5">大间隔情况</td> | |
| 57 | + </tr> | |
| 58 | + <tr> | |
| 59 | + <td rowspan="2">计划</td> | |
| 60 | + <td rowspan="2">实驶</td> | |
| 61 | + <td rowspan="2">少驶</td> | |
| 62 | + <td colspan="11">少驶原因(公里)</td> | |
| 63 | + <td rowspan="2">临加公里</td> | |
| 64 | + <td colspan="3">计划班次</td> | |
| 65 | + <td colspan="3">实际班次</td> | |
| 66 | + <td colspan="3">临加班次</td> | |
| 67 | + <td colspan="3">放站班次</td> | |
| 68 | + <td colspan="3">调头班次</td> | |
| 69 | + <td colspan="3">发生次数</td> | |
| 70 | + <td rowspan="2">最大间隔时间(秒)</td> | |
| 71 | + <td rowspan="2">原因</td> | |
| 72 | + </tr> | |
| 73 | + <tr> | |
| 74 | + <td width="31px">路阻</td> | |
| 75 | + <td>吊慢</td> | |
| 76 | + <td>故障</td> | |
| 77 | + <td>纠纷</td> | |
| 78 | + <td>肇事</td> | |
| 79 | + <td>缺人</td> | |
| 80 | + <td>缺车</td> | |
| 81 | + <td>客稀</td> | |
| 82 | + <td>气候</td> | |
| 83 | + <td>援外</td> | |
| 84 | + <td>其他</td> | |
| 85 | + <td>全日</td> | |
| 86 | + <td>早高峰</td> | |
| 87 | + <td>晚高峰</td> | |
| 88 | + <td>全日</td> | |
| 89 | + <td>早高峰</td> | |
| 90 | + <td>晚高峰</td> | |
| 91 | + <td>全日</td> | |
| 92 | + <td>早高峰</td> | |
| 93 | + <td>晚高峰</td> | |
| 94 | + <td>全日</td> | |
| 95 | + <td>早高峰</td> | |
| 96 | + <td>晚高峰</td> | |
| 97 | + <td>全日</td> | |
| 98 | + <td>早高峰</td> | |
| 99 | + <td>晚高峰</td> | |
| 100 | + <td>全日</td> | |
| 101 | + <td>早高峰</td> | |
| 102 | + <td>晚高峰</td> | |
| 103 | + </tr> | |
| 104 | + </thead> | |
| 105 | + <tbody class="statisticsDaily"> | |
| 106 | + | |
| 107 | + </tbody> | |
| 108 | + </table> | |
| 109 | + </div> | |
| 110 | + </div> | |
| 111 | + </div> | |
| 112 | + </div> | |
| 113 | +</div> | |
| 114 | + | |
| 115 | +<script> | |
| 116 | + $(function(){ | |
| 117 | + $('#export').attr('disabled', "true"); | |
| 118 | + | |
| 119 | + // 关闭左侧栏 | |
| 120 | + if (!$('body').hasClass('page-sidebar-closed')) | |
| 121 | + $('.menu-toggler.sidebar-toggler').click(); | |
| 122 | + | |
| 123 | + $("#date").datetimepicker({ | |
| 124 | + format : 'YYYY-MM-DD', | |
| 125 | + locale : 'zh-cn' | |
| 126 | + }); | |
| 127 | + $.get('/basic/lineCode2Name',function(result){ | |
| 128 | + var data=[]; | |
| 129 | + | |
| 130 | + data.push({id: "", text:"请选择"}); | |
| 131 | + for(var code in result){ | |
| 132 | + data.push({id: code, text: result[code]}); | |
| 133 | + } | |
| 134 | + initPinYinSelect2('#line',data,''); | |
| 135 | + | |
| 136 | + }) | |
| 137 | + | |
| 138 | + | |
| 139 | + var line =""; | |
| 140 | + var xlName =""; | |
| 141 | + var date = ""; | |
| 142 | + $("#query").on("click",function(){ | |
| 143 | + line = $("#line").val(); | |
| 144 | + xlName = $("#select2-line-container").html(); | |
| 145 | + date = $("#date").val(); | |
| 146 | + if(line=="请选择"){ | |
| 147 | + line=""; | |
| 148 | + } | |
| 149 | + $get('/realSchedule/statisticsDaily',{line:line,date:date,xlName:xlName,type:"query"},function(result){ | |
| 150 | + // 把数据填充到模版中 | |
| 151 | + var tbodyHtml = template('statisticsDaily',{list:result}); | |
| 152 | + // 把渲染好的模版html文本追加到表格中 | |
| 153 | + $('#forms .statisticsDaily').html(tbodyHtml); | |
| 154 | + | |
| 155 | + if(result.length == 0) | |
| 156 | + $("#export").attr('disabled',"true"); | |
| 157 | + else | |
| 158 | + $("#export").removeAttr("disabled"); | |
| 159 | + }); | |
| 160 | + }); | |
| 161 | + | |
| 162 | + $("#export").on("click",function(){ | |
| 163 | + $get('/realSchedule/statisticsDaily',{line:line,date:date,xlName:xlName,type:"export"},function(result){ | |
| 164 | + window.open("/downloadFile/download?fileName=统计日报"+moment(date).format("YYYYMMDD")); | |
| 165 | + }); | |
| 166 | + }); | |
| 167 | + | |
| 168 | + }); | |
| 169 | +</script> | |
| 170 | +<script type="text/html" id="statisticsDaily"> | |
| 171 | + {{each list as obj i}} | |
| 172 | + <tr> | |
| 173 | + <td>{{obj.xlName}}</td> | |
| 174 | + <td>{{obj.jhlc}}</td> | |
| 175 | + <td>{{obj.sjgl}}</td> | |
| 176 | + <td>{{obj.ssgl}}</td> | |
| 177 | + <td>{{obj.ssgl_lz}}</td> | |
| 178 | + <td>{{obj.ssgl_dm}}</td> | |
| 179 | + <td>{{obj.ssgl_gz}}</td> | |
| 180 | + <td>{{obj.ssgl_jf}}</td> | |
| 181 | + <td>{{obj.ssgl_zs}}</td> | |
| 182 | + <td>{{obj.ssgl_qr}}</td> | |
| 183 | + <td>{{obj.ssgl_qc}}</td> | |
| 184 | + <td>{{obj.ssgl_kx}}</td> | |
| 185 | + <td>{{obj.ssgl_qh}}</td> | |
| 186 | + <td>{{obj.ssgl_yw}}</td> | |
| 187 | + <td>{{obj.ssgl_other}}</td> | |
| 188 | + <td>{{obj.ljgl}}</td> | |
| 189 | + <td>{{obj.jhbc}}</td> | |
| 190 | + <td>{{obj.jhbc_m}}</td> | |
| 191 | + <td>{{obj.jhbc_a}}</td> | |
| 192 | + <td>{{obj.sjbc}}</td> | |
| 193 | + <td>{{obj.sjbc_m}}</td> | |
| 194 | + <td>{{obj.sjbc_a}}</td> | |
| 195 | + <td>{{obj.ljbc}}</td> | |
| 196 | + <td>{{obj.ljbc_m}}</td> | |
| 197 | + <td>{{obj.ljbc_a}}</td> | |
| 198 | + <td>{{obj.fzbc}}</td> | |
| 199 | + <td>{{obj.fzbc_m}}</td> | |
| 200 | + <td>{{obj.fzbc_a}}</td> | |
| 201 | + <td>{{obj.dtbc}}</td> | |
| 202 | + <td>{{obj.dtbc_m}}</td> | |
| 203 | + <td>{{obj.dtbc_a}}</td> | |
| 204 | + <td>{{obj.djg}}</td> | |
| 205 | + <td>{{obj.djg_m}}</td> | |
| 206 | + <td>{{obj.djg_a}}</td> | |
| 207 | + <td>{{obj.djg_time}}</td> | |
| 208 | + <td> </td> | |
| 209 | + </tr> | |
| 210 | + {{/each}} | |
| 211 | + {{if list.length == 0}} | |
| 212 | + <tr> | |
| 213 | + <td colspan="36"><h6 class="muted">没有找到相关数据</h6></td> | |
| 214 | + </tr> | |
| 215 | + {{/if}} | |
| 255 | 216 | </script> |
| 256 | 217 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/forms/statement/waybillQp.html
| ... | ... | @@ -198,7 +198,9 @@ |
| 198 | 198 | return; |
| 199 | 199 | } |
| 200 | 200 | $post('/realSchedule/exportWaybillQp',{clZbh:params[0],date:date,line:line},function(result){ |
| 201 | - window.open("/downloadFile/download?fileName="+date+"-"+params[0]+"-行车路单"); | |
| 201 | + var fileName=date+"-"+params[0]+"-行车路单" | |
| 202 | + window.open("/downloadFile/download?fileName="+fileName); | |
| 203 | +// window.open("/downloadFile/download?fileName="+encodeURIComponent(encodeURIComponent(fileName))); | |
| 202 | 204 | }); |
| 203 | 205 | }); |
| 204 | 206 | ... | ... |