Commit 05a9d2cbdf09533dc18b67fb0788d13c17e2aefb
Merge remote-tracking branch 'origin/minhang' into minhang
Showing
5 changed files
with
204 additions
and
70 deletions
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
| ... | ... | @@ -801,31 +801,39 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 801 | 801 | |
| 802 | 802 | try { |
| 803 | 803 | |
| 804 | - String where = ""; | |
| 804 | + List<Object> objList = new ArrayList<Object>(); | |
| 805 | + String sql = "select id, schedule_date_str, real_exec_date, xl_name, lp_name, bcs, bcsj, jhlc, bc_type, xl_bm, fgs_bm," | |
| 806 | + + " fcsj, fcsj_actual, zdsj, zdsj_actual, qdz_name, zdz_name, xl_dir, status, remarks, gs_name, fgs_name, sp_id" | |
| 807 | + + " ,cc_service from bsth_c_s_sp_info_real where schedule_date_str >= ?" | |
| 808 | + + " and schedule_date_str <= ?"; | |
| 809 | + objList.add(startDate); | |
| 810 | + objList.add(endDate); | |
| 811 | + | |
| 805 | 812 | if(line.length() != 0 && statu.equals("1")){ |
| 806 | - where += " and xl_bm = '"+line+"'"; | |
| 813 | + sql += " and xl_bm = ?"; | |
| 814 | + objList.add(line); | |
| 807 | 815 | } |
| 808 | 816 | if(lp.length() != 0 && statu.equals("1")){ |
| 809 | - where += " and lp_name = '"+lp+"'"; | |
| 817 | + sql += " and lp_name = ?"; | |
| 818 | + objList.add(lp); | |
| 810 | 819 | } |
| 811 | 820 | if(company.length() != 0){ |
| 812 | - where += " and gs_bm = '"+company+"'"; | |
| 821 | + sql += " and gs_bm = ?"; | |
| 822 | + objList.add(company); | |
| 813 | 823 | } |
| 814 | 824 | if(subCompany.length() != 0){ |
| 815 | - where += " and fgs_bm = '"+subCompany+"'"; | |
| 825 | + sql += " and fgs_bm = ?"; | |
| 826 | + objList.add(subCompany); | |
| 816 | 827 | } |
| 817 | 828 | if(sfqr == 1){ |
| 818 | - where += " and zdsj >= '"+times1+"' and fcsj <= '"+times2+"'"; | |
| 829 | + sql += " and zdsj >= ? and fcsj <= ?"; | |
| 830 | + objList.add(times1); | |
| 831 | + objList.add(times2); | |
| 819 | 832 | } |
| 820 | -// where += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; | |
| 821 | - where += " and bc_type != 'ldks'"; | |
| 822 | - | |
| 823 | - String sql = "select id, schedule_date_str, real_exec_date, xl_name, lp_name, bcs, bcsj, jhlc, bc_type, xl_bm, fgs_bm," | |
| 824 | - + " fcsj, fcsj_actual, zdsj, zdsj_actual, qdz_name, zdz_name, xl_dir, status, remarks, gs_name, fgs_name, sp_id" | |
| 825 | - + " ,cc_service from bsth_c_s_sp_info_real where schedule_date_str >= '"+startDate+"'" | |
| 826 | - + " and schedule_date_str <= '"+endDate+"'"+where+""; | |
| 833 | +// sql += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; | |
| 834 | + sql += " and bc_type != 'ldks'"; | |
| 827 | 835 | |
| 828 | - list = jdbcTemplate.query(sql, | |
| 836 | + list = jdbcTemplate.query(sql, objList.toArray(), | |
| 829 | 837 | new RowMapper<ScheduleRealInfo>(){ |
| 830 | 838 | @Override |
| 831 | 839 | public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException { |
| ... | ... | @@ -905,23 +913,30 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 905 | 913 | { |
| 906 | 914 | List<Map<String, String>> temp1 = new ArrayList<Map<String, String>>(); |
| 907 | 915 | List<Map<String, String>> temp2 = new ArrayList<Map<String, String>>(); |
| 916 | + List<Object> tobjList = new ArrayList<Object>(); | |
| 908 | 917 | sql = "select id, lp, fcsj, xl_bm, tt_info from bsth_c_s_sp_info where bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; |
| 909 | 918 | |
| 910 | 919 | if(startDate.equals(endDate)){ |
| 911 | - sql += " and schedule_date = '"+startDate+"'"; | |
| 920 | + sql += " and schedule_date = ?"; | |
| 921 | + tobjList.add(startDate); | |
| 912 | 922 | } else { |
| 913 | - sql += " and schedule_date >= '"+startDate+"' and schedule_date <= '"+endDate+"'"; | |
| 923 | + sql += " and schedule_date >= ? and schedule_date <= ?"; | |
| 924 | + tobjList.add(startDate); | |
| 925 | + tobjList.add(endDate); | |
| 914 | 926 | } |
| 915 | 927 | if(line.length() != 0 && statu.equals("1")){ |
| 916 | - sql += " and xl_bm = '"+line+"'"; | |
| 928 | + sql += " and xl_bm = ?"; | |
| 929 | + tobjList.add(line); | |
| 917 | 930 | } |
| 918 | 931 | if(company.length() != 0){ |
| 919 | - sql += " and gs_bm = '"+company+"'"; | |
| 932 | + sql += " and gs_bm = ?"; | |
| 933 | + tobjList.add(company); | |
| 920 | 934 | } |
| 921 | 935 | if(subCompany.length() != 0){ |
| 922 | - sql += " and fgs_bm = '"+subCompany+"'"; | |
| 936 | + sql += " and fgs_bm = ?"; | |
| 937 | + tobjList.add(subCompany); | |
| 923 | 938 | } |
| 924 | - temp1 = jdbcTemplate.query(sql, | |
| 939 | + temp1 = jdbcTemplate.query(sql, tobjList.toArray(), | |
| 925 | 940 | new RowMapper<Map<String, String>>(){ |
| 926 | 941 | @Override |
| 927 | 942 | public Map<String, String> mapRow(ResultSet rs, int rowNum) throws SQLException { |
| ... | ... | @@ -934,13 +949,16 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 934 | 949 | return m; |
| 935 | 950 | } |
| 936 | 951 | }); |
| 952 | + | |
| 953 | + List<Object> ttobjList = new ArrayList<Object>(); | |
| 937 | 954 | sql = "select * from bsth_c_s_ttinfo_detail where ists = 1" |
| 938 | 955 | + " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; |
| 939 | 956 | |
| 940 | 957 | if(line.length() != 0 && statu.equals("1")){ |
| 941 | - sql += " and xl = '"+line+"'"; | |
| 958 | + sql += " and xl = ?"; | |
| 959 | + ttobjList.add(line); | |
| 942 | 960 | } |
| 943 | - temp2 = jdbcTemplate.query(sql, | |
| 961 | + temp2 = jdbcTemplate.query(sql, ttobjList.toArray(), | |
| 944 | 962 | new RowMapper<Map<String, String>>(){ |
| 945 | 963 | @Override |
| 946 | 964 | public Map<String, String> mapRow(ResultSet rs, int rowNum) throws SQLException { |
| ... | ... | @@ -971,10 +989,13 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 971 | 989 | if(id1 == 0 || id1 > s.getId()) |
| 972 | 990 | id1 = s.getId(); |
| 973 | 991 | } |
| 992 | + List<Object> cobjList = new ArrayList<Object>(); | |
| 974 | 993 | sql = "select destroy, start_date, end_date, mileage, mileage_type, schedule from bsth_c_s_child_task"; |
| 975 | - sql += " where id >= "+id1+" and id <= "+id2+" order by start_date"; | |
| 994 | + sql += " where id >= ? and id <= ? order by start_date"; | |
| 995 | + cobjList.add(id1); | |
| 996 | + cobjList.add(id2); | |
| 976 | 997 | |
| 977 | - cList = jdbcTemplate.query(sql, | |
| 998 | + cList = jdbcTemplate.query(sql, cobjList.toArray(), | |
| 978 | 999 | new RowMapper<ChildTaskPlan>(){ |
| 979 | 1000 | @Override |
| 980 | 1001 | public ChildTaskPlan mapRow(ResultSet rs, int rowNum) throws SQLException { |
| ... | ... | @@ -990,12 +1011,16 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 990 | 1011 | }); |
| 991 | 1012 | |
| 992 | 1013 | if(model.length() != 0){ |
| 1014 | + List<Object> ttobjList = new ArrayList<Object>(); | |
| 993 | 1015 | sql = "select sp.id from " |
| 994 | - + "(select id, tt_info, xl_bm, lp, fcsj from bsth_c_s_sp_info where schedule_date >= '"+startDate+"' and schedule_date <= '"+endDate+"'" | |
| 995 | - + " and tt_info = '" + model + "' and bc_type != 'ldks') sp" | |
| 1016 | + + "(select id, tt_info, xl_bm, lp, fcsj from bsth_c_s_sp_info where schedule_date >= ? and schedule_date <= ?" | |
| 1017 | + + " and tt_info = ? and bc_type != 'ldks') sp" | |
| 996 | 1018 | + " left join bsth_c_s_ttinfo_detail tt on sp.tt_info = tt.ttinfo and sp.xl_bm = tt.xl and sp.lp = tt.lp and sp.fcsj = tt.fcsj"; |
| 1019 | + ttobjList.add(startDate); | |
| 1020 | + ttobjList.add(endDate); | |
| 1021 | + ttobjList.add(model); | |
| 997 | 1022 | |
| 998 | - ttList = jdbcTemplate.query(sql, | |
| 1023 | + ttList = jdbcTemplate.query(sql, ttobjList.toArray(), | |
| 999 | 1024 | new RowMapper<Map<String, Object>>(){ |
| 1000 | 1025 | @Override |
| 1001 | 1026 | public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException { |
| ... | ... | @@ -1428,12 +1453,44 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 1428 | 1453 | sjyscs = sjyscs.add(new BigDecimal(m.get("sjyscs").toString())); |
| 1429 | 1454 | } |
| 1430 | 1455 | BigDecimal size = new BigDecimal(keyMap2.get(key).size()); |
| 1431 | - tempMap.put("jhyysj", jhyysj.equals(0)?0:jhyysj.divide(size, 2, RoundingMode.HALF_UP)); | |
| 1432 | - tempMap.put("jhyssj", jhyssj.equals(0)?0:jhyssj.divide(size, 2, RoundingMode.HALF_UP)); | |
| 1456 | + tempMap.put("jhyysjHH", jhyysj.equals(0)?0:jhyysj.divide(size, 2, RoundingMode.HALF_UP)); | |
| 1457 | + if(!jhyysj.equals(0)){ //单位换算,原以小时为单位,现在以(小时.分钟)为单位 | |
| 1458 | + long minutes = jhyysj.multiply(new BigDecimal(60)).divide(size, 0, RoundingMode.HALF_UP).longValue(); | |
| 1459 | + long hh = minutes / 60; | |
| 1460 | + long mm = minutes % 60; | |
| 1461 | + tempMap.put("jhyysj", hh+"."+(mm<10?"0"+mm:mm)); | |
| 1462 | + } else { | |
| 1463 | + tempMap.put("jhyysj", 0); | |
| 1464 | + } | |
| 1465 | + tempMap.put("jhyssjHH", jhyssj.equals(0)?0:jhyssj.divide(size, 2, RoundingMode.HALF_UP)); | |
| 1466 | + if(!jhyssj.equals(0)){ | |
| 1467 | + long minutes = jhyssj.multiply(new BigDecimal(60)).divide(size, 0, RoundingMode.HALF_UP).longValue(); | |
| 1468 | + long hh = minutes / 60; | |
| 1469 | + long mm = minutes % 60; | |
| 1470 | + tempMap.put("jhyssj", hh+"."+(mm<10?"0"+mm:mm)); | |
| 1471 | + } else { | |
| 1472 | + tempMap.put("jhyssj", 0); | |
| 1473 | + } | |
| 1474 | + tempMap.put("sjyysjHH", sjyysj.equals(0)?0:sjyysj.divide(size, 2, RoundingMode.HALF_UP)); | |
| 1475 | + if(!sjyysj.equals(0)){ | |
| 1476 | + long minutes = sjyysj.multiply(new BigDecimal(60)).divide(size, 0, RoundingMode.HALF_UP).longValue(); | |
| 1477 | + long hh = minutes / 60; | |
| 1478 | + long mm = minutes % 60; | |
| 1479 | + tempMap.put("sjyysj", hh+"."+(mm<10?"0"+mm:mm)); | |
| 1480 | + } else { | |
| 1481 | + tempMap.put("sjyysj", 0); | |
| 1482 | + } | |
| 1483 | + tempMap.put("sjyssjHH", sjyssj.equals(0)?0:sjyssj.divide(size, 2, RoundingMode.HALF_UP)); | |
| 1484 | + if(!sjyssj.equals(0)){ | |
| 1485 | + long minutes = sjyssj.multiply(new BigDecimal(60)).divide(size, 0, RoundingMode.HALF_UP).longValue(); | |
| 1486 | + long hh = minutes / 60; | |
| 1487 | + long mm = minutes % 60; | |
| 1488 | + tempMap.put("sjyssj", hh+"."+(mm<10?"0"+mm:mm)); | |
| 1489 | + } else { | |
| 1490 | + tempMap.put("sjyssj", 0); | |
| 1491 | + } | |
| 1433 | 1492 | tempMap.put("jhyycs", jhyycs.equals(0)?0:jhyycs.divide(size, 2, RoundingMode.HALF_UP)); |
| 1434 | 1493 | tempMap.put("jhyscs", jhyscs.equals(0)?0:jhyscs.divide(size, 2, RoundingMode.HALF_UP)); |
| 1435 | - tempMap.put("sjyysj", sjyysj.equals(0)?0:sjyysj.divide(size, 2, RoundingMode.HALF_UP)); | |
| 1436 | - tempMap.put("sjyssj", sjyssj.equals(0)?0:sjyssj.divide(size, 2, RoundingMode.HALF_UP)); | |
| 1437 | 1494 | tempMap.put("sjyycs", sjyycs.equals(0)?0:sjyycs.divide(size, 2, RoundingMode.HALF_UP)); |
| 1438 | 1495 | tempMap.put("sjyscs", sjyscs.equals(0)?0:sjyscs.divide(size, 2, RoundingMode.HALF_UP)); |
| 1439 | 1496 | String[] split = key.split("/"); |
| ... | ... | @@ -1465,22 +1522,54 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 1465 | 1522 | BigDecimal sjyysj = new BigDecimal(0), sjyssj = new BigDecimal(0); |
| 1466 | 1523 | BigDecimal sjyycs = new BigDecimal(0), sjyscs = new BigDecimal(0); |
| 1467 | 1524 | for(Map<String, Object> m : keyMap4.get(key)){ |
| 1468 | - jhyysj = jhyysj.add(new BigDecimal(m.get("jhyysj").toString())); | |
| 1469 | - jhyssj = jhyssj.add(new BigDecimal(m.get("jhyssj").toString())); | |
| 1525 | + jhyysj = jhyysj.add(new BigDecimal(m.get("jhyysjHH").toString())); | |
| 1526 | + jhyssj = jhyssj.add(new BigDecimal(m.get("jhyssjHH").toString())); | |
| 1470 | 1527 | jhyycs = jhyycs.add(new BigDecimal(m.get("jhyycs").toString())); |
| 1471 | 1528 | jhyscs = jhyscs.add(new BigDecimal(m.get("jhyscs").toString())); |
| 1472 | - sjyysj = sjyysj.add(new BigDecimal(m.get("sjyysj").toString())); | |
| 1473 | - sjyssj = sjyssj.add(new BigDecimal(m.get("sjyssj").toString())); | |
| 1529 | + sjyysj = sjyysj.add(new BigDecimal(m.get("sjyysjHH").toString())); | |
| 1530 | + sjyssj = sjyssj.add(new BigDecimal(m.get("sjyssjHH").toString())); | |
| 1474 | 1531 | sjyycs = sjyycs.add(new BigDecimal(m.get("sjyycs").toString())); |
| 1475 | 1532 | sjyscs = sjyscs.add(new BigDecimal(m.get("sjyscs").toString())); |
| 1476 | 1533 | } |
| 1477 | 1534 | BigDecimal size = new BigDecimal(keyMap4.get(key).size()); |
| 1478 | - tempMap.put("jhyysj", jhyysj.equals(0)?0:jhyysj.divide(size, 2, RoundingMode.HALF_UP)); | |
| 1479 | - tempMap.put("jhyssj", jhyssj.equals(0)?0:jhyssj.divide(size, 2, RoundingMode.HALF_UP)); | |
| 1535 | + tempMap.put("jhyysjHH", jhyysj.equals(0)?0:jhyysj.divide(size, 2, RoundingMode.HALF_UP)); | |
| 1536 | + if(!jhyysj.equals(0)){ //单位换算,原以小时为单位,现在以(小时.分钟)为单位 | |
| 1537 | + long minutes = jhyysj.multiply(new BigDecimal(60)).divide(size, 0, RoundingMode.HALF_UP).longValue(); | |
| 1538 | + long hh = minutes / 60; | |
| 1539 | + long mm = minutes % 60; | |
| 1540 | + tempMap.put("jhyysj", hh+"."+(mm<10?"0"+mm:mm)); | |
| 1541 | + } else { | |
| 1542 | + tempMap.put("jhyysj", 0); | |
| 1543 | + } | |
| 1544 | + tempMap.put("jhyssjHH", jhyssj.equals(0)?0:jhyssj.divide(size, 2, RoundingMode.HALF_UP)); | |
| 1545 | + if(!jhyssj.equals(0)){ | |
| 1546 | + long minutes = jhyssj.multiply(new BigDecimal(60)).divide(size, 0, RoundingMode.HALF_UP).longValue(); | |
| 1547 | + long hh = minutes / 60; | |
| 1548 | + long mm = minutes % 60; | |
| 1549 | + tempMap.put("jhyssj", hh+"."+(mm<10?"0"+mm:mm)); | |
| 1550 | + } else { | |
| 1551 | + tempMap.put("jhyssj", 0); | |
| 1552 | + } | |
| 1553 | + tempMap.put("sjyysjHH", sjyysj.equals(0)?0:sjyysj.divide(size, 2, RoundingMode.HALF_UP)); | |
| 1554 | + if(!sjyysj.equals(0)){ | |
| 1555 | + long minutes = sjyysj.multiply(new BigDecimal(60)).divide(size, 0, RoundingMode.HALF_UP).longValue(); | |
| 1556 | + long hh = minutes / 60; | |
| 1557 | + long mm = minutes % 60; | |
| 1558 | + tempMap.put("sjyysj", hh+"."+(mm<10?"0"+mm:mm)); | |
| 1559 | + } else { | |
| 1560 | + tempMap.put("sjyysj", 0); | |
| 1561 | + } | |
| 1562 | + tempMap.put("sjyssjHH", sjyssj.equals(0)?0:sjyssj.divide(size, 2, RoundingMode.HALF_UP)); | |
| 1563 | + if(!sjyssj.equals(0)){ | |
| 1564 | + long minutes = sjyssj.multiply(new BigDecimal(60)).divide(size, 0, RoundingMode.HALF_UP).longValue(); | |
| 1565 | + long hh = minutes / 60; | |
| 1566 | + long mm = minutes % 60; | |
| 1567 | + tempMap.put("sjyssj", hh+"."+(mm<10?"0"+mm:mm)); | |
| 1568 | + } else { | |
| 1569 | + tempMap.put("sjyssj", 0); | |
| 1570 | + } | |
| 1480 | 1571 | tempMap.put("jhyycs", jhyycs.equals(0)?0:jhyycs.divide(size, 2, RoundingMode.HALF_UP)); |
| 1481 | 1572 | tempMap.put("jhyscs", jhyscs.equals(0)?0:jhyscs.divide(size, 2, RoundingMode.HALF_UP)); |
| 1482 | - tempMap.put("sjyysj", sjyysj.equals(0)?0:sjyysj.divide(size, 2, RoundingMode.HALF_UP)); | |
| 1483 | - tempMap.put("sjyssj", sjyssj.equals(0)?0:sjyssj.divide(size, 2, RoundingMode.HALF_UP)); | |
| 1484 | 1573 | tempMap.put("sjyycs", sjyycs.equals(0)?0:sjyycs.divide(size, 2, RoundingMode.HALF_UP)); |
| 1485 | 1574 | tempMap.put("sjyscs", sjyscs.equals(0)?0:sjyscs.divide(size, 2, RoundingMode.HALF_UP)); |
| 1486 | 1575 | String[] split = key.split("/"); |
| ... | ... | @@ -1505,22 +1594,54 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 1505 | 1594 | BigDecimal sjyysj = new BigDecimal(0), sjyssj = new BigDecimal(0); |
| 1506 | 1595 | BigDecimal sjyycs = new BigDecimal(0), sjyscs = new BigDecimal(0); |
| 1507 | 1596 | for(Map<String, Object> m : dataList){ |
| 1508 | - jhyysj = jhyysj.add(new BigDecimal(m.get("jhyysj").toString())); | |
| 1509 | - jhyssj = jhyssj.add(new BigDecimal(m.get("jhyssj").toString())); | |
| 1597 | + jhyysj = jhyysj.add(new BigDecimal(m.get("jhyysjHH").toString())); | |
| 1598 | + jhyssj = jhyssj.add(new BigDecimal(m.get("jhyssjHH").toString())); | |
| 1510 | 1599 | jhyycs = jhyycs.add(new BigDecimal(m.get("jhyycs").toString())); |
| 1511 | 1600 | jhyscs = jhyscs.add(new BigDecimal(m.get("jhyscs").toString())); |
| 1512 | - sjyysj = sjyysj.add(new BigDecimal(m.get("sjyysj").toString())); | |
| 1513 | - sjyssj = sjyssj.add(new BigDecimal(m.get("sjyssj").toString())); | |
| 1601 | + sjyysj = sjyysj.add(new BigDecimal(m.get("sjyysjHH").toString())); | |
| 1602 | + sjyssj = sjyssj.add(new BigDecimal(m.get("sjyssjHH").toString())); | |
| 1514 | 1603 | sjyycs = sjyycs.add(new BigDecimal(m.get("sjyycs").toString())); |
| 1515 | 1604 | sjyscs = sjyscs.add(new BigDecimal(m.get("sjyscs").toString())); |
| 1516 | 1605 | } |
| 1517 | 1606 | BigDecimal size = new BigDecimal(dataList.size()); |
| 1518 | - modelMap.put("jhyysj", jhyysj.equals(0)?0:jhyysj.divide(size, 2, RoundingMode.HALF_UP)); | |
| 1519 | - modelMap.put("jhyssj", jhyssj.equals(0)?0:jhyssj.divide(size, 2, RoundingMode.HALF_UP)); | |
| 1607 | + modelMap.put("jhyysjHH", jhyysj.equals(0)?0:jhyysj.divide(size, 2, RoundingMode.HALF_UP)); | |
| 1608 | + if(!jhyysj.equals(0)){ //单位换算,原以小时为单位,现在以(小时.分钟)为单位 | |
| 1609 | + long minutes = jhyysj.multiply(new BigDecimal(60)).divide(size, 0, RoundingMode.HALF_UP).longValue(); | |
| 1610 | + long hh = minutes / 60; | |
| 1611 | + long mm = minutes % 60; | |
| 1612 | + modelMap.put("jhyysj", hh+"."+(mm<10?"0"+mm:mm)); | |
| 1613 | + } else { | |
| 1614 | + modelMap.put("jhyysj", 0); | |
| 1615 | + } | |
| 1616 | + modelMap.put("jhyssjHH", jhyssj.equals(0)?0:jhyssj.divide(size, 2, RoundingMode.HALF_UP)); | |
| 1617 | + if(!jhyssj.equals(0)){ | |
| 1618 | + long minutes = jhyssj.multiply(new BigDecimal(60)).divide(size, 0, RoundingMode.HALF_UP).longValue(); | |
| 1619 | + long hh = minutes / 60; | |
| 1620 | + long mm = minutes % 60; | |
| 1621 | + modelMap.put("jhyssj", hh+"."+(mm<10?"0"+mm:mm)); | |
| 1622 | + } else { | |
| 1623 | + modelMap.put("jhyssj", 0); | |
| 1624 | + } | |
| 1625 | + modelMap.put("sjyysjHH", sjyysj.equals(0)?0:sjyysj.divide(size, 2, RoundingMode.HALF_UP)); | |
| 1626 | + if(!sjyysj.equals(0)){ | |
| 1627 | + long minutes = sjyysj.multiply(new BigDecimal(60)).divide(size, 0, RoundingMode.HALF_UP).longValue(); | |
| 1628 | + long hh = minutes / 60; | |
| 1629 | + long mm = minutes % 60; | |
| 1630 | + modelMap.put("sjyysj", hh+"."+(mm<10?"0"+mm:mm)); | |
| 1631 | + } else { | |
| 1632 | + modelMap.put("sjyysj", 0); | |
| 1633 | + } | |
| 1634 | + modelMap.put("sjyssjHH", sjyssj.equals(0)?0:sjyssj.divide(size, 2, RoundingMode.HALF_UP)); | |
| 1635 | + if(!sjyssj.equals(0)){ | |
| 1636 | + long minutes = sjyssj.multiply(new BigDecimal(60)).divide(size, 0, RoundingMode.HALF_UP).longValue(); | |
| 1637 | + long hh = minutes / 60; | |
| 1638 | + long mm = minutes % 60; | |
| 1639 | + modelMap.put("sjyssj", hh+"."+(mm<10?"0"+mm:mm)); | |
| 1640 | + } else { | |
| 1641 | + modelMap.put("sjyssj", 0); | |
| 1642 | + } | |
| 1520 | 1643 | modelMap.put("jhyycs", jhyycs.equals(0)?0:jhyycs.divide(size, 2, RoundingMode.HALF_UP)); |
| 1521 | 1644 | modelMap.put("jhyscs", jhyscs.equals(0)?0:jhyscs.divide(size, 2, RoundingMode.HALF_UP)); |
| 1522 | - modelMap.put("sjyysj", sjyysj.equals(0)?0:sjyysj.divide(size, 2, RoundingMode.HALF_UP)); | |
| 1523 | - modelMap.put("sjyssj", sjyssj.equals(0)?0:sjyssj.divide(size, 2, RoundingMode.HALF_UP)); | |
| 1524 | 1645 | modelMap.put("sjyycs", sjyycs.equals(0)?0:sjyycs.divide(size, 2, RoundingMode.HALF_UP)); |
| 1525 | 1646 | modelMap.put("sjyscs", sjyscs.equals(0)?0:sjyscs.divide(size, 2, RoundingMode.HALF_UP)); |
| 1526 | 1647 | modelMap.put("company", companyName); | ... | ... |
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
| ... | ... | @@ -3719,7 +3719,7 @@ public class ReportServiceImpl implements ReportService{ |
| 3719 | 3719 | String xlBm = map.get("xlBm").toString(); |
| 3720 | 3720 | String gsName = BasicData.businessCodeNameMap.get(gsBm); |
| 3721 | 3721 | String fgsName = BasicData.businessFgsCodeNameMap.get(fgsBm + "_" + gsBm); |
| 3722 | - String xlName = BasicData.lineCode2NameMap.get(xlBm); | |
| 3722 | + String xlName = BasicData.lineCode2NameMap.get(xlBm)!=null?BasicData.lineCode2NameMap.get(xlBm):xlBm; | |
| 3723 | 3723 | map.put("gsName", gsName); |
| 3724 | 3724 | map.put("fgsName", fgsName); |
| 3725 | 3725 | map.put("xlName", xlName); | ... | ... |
src/main/resources/static/pages/forms/statement/timeAndSpeed.html
| 1 | +<link rel="stylesheet" href="/assets/plugins/uk3.0/uikit.min.css"/> | |
| 2 | +<script src="/assets/plugins/uk3.0/uikit.min.js"></script> | |
| 3 | +<script src="/assets/plugins/uk3.0/uikit-icons.min.js"></script> | |
| 1 | 4 | <style type="text/css"> |
| 2 | 5 | .table-bordered { |
| 3 | 6 | border: 1px solid; } |
| ... | ... | @@ -549,14 +552,14 @@ |
| 549 | 552 | <th style='text-align:center;'>线路</th> |
| 550 | 553 | {{if list.statu == 0}}<th style='text-align:center;'>路牌数量</th>{{/if}} |
| 551 | 554 | {{if list.statu == 1}}<th style='text-align:center;'>路牌名</th>{{/if}} |
| 552 | - <th>计划营运时间(小时)</th> | |
| 553 | - <th>计划营运车速(公里/小时)</th> | |
| 554 | - <th>实际营运时间(小时)</th> | |
| 555 | - <th>实际营运车速(公里/小时)</th> | |
| 556 | - <th>计划运送时间(小时)</th> | |
| 557 | - <th>计划运送车速(公里/小时)</th> | |
| 558 | - <th>实际运送时间(小时)</th> | |
| 559 | - <th>实际运送车速(公里/小时)</th> | |
| 555 | + <th>计划营运时间<i title='计划营运时间:从计划班次计算出场至回场间计划营运时长<br/>其中包含 进出场班次时间、营运班次行驶时间、空驶班次行驶时间、和停站时间(起讫站待发的等待时间)。' uk-tooltip style='color:#999;font-style:oblique;'>?</i><br/>(小时.分钟)</th> | |
| 556 | + <th>计划营运车速<br/>(公里/小时)</th> | |
| 557 | + <th>实际营运时间<i title='实际营运时间:从实际路单计算出场至回场间实际营运时长<br/>其中包含 进出场班次时间、营运班次行驶时间、空驶班次行驶时间、和停站时间(起讫站待发的等待时间)。' uk-tooltip style='color:#999;font-style:oblique;'>?</i><br/>(小时.分钟)</th> | |
| 558 | + <th>实际营运车速<br/>(公里/小时)</th> | |
| 559 | + <th>计划运送时间<i title='计划运送时间:从计划班次计算营运班次的计划行驶时长<br/>仅有 营运班次行驶时间。' uk-tooltip style='color:#999;font-style:oblique;'>?</i><br/>(小时.分钟)</th> | |
| 560 | + <th>计划运送车速<br/>(公里/小时)</th> | |
| 561 | + <th>实际运送时间<i title='实际运送时间:从实际路单计算营运班次的实际行驶时长<br/>仅有 营运班次行驶时间。' uk-tooltip style='color:#999;font-style:oblique;'>?</i><br/>(小时.分钟)</th> | |
| 562 | + <th>实际运送车速<br/>(公里/小时)</th> | |
| 560 | 563 | </tr> |
| 561 | 564 | </thead> |
| 562 | 565 | <tbody> |
| ... | ... | @@ -606,14 +609,14 @@ |
| 606 | 609 | <th style='text-align:center;'>分公司</th> |
| 607 | 610 | <th style='text-align:center;'>线路</th> |
| 608 | 611 | <th style='text-align:center;'>路牌名</th> |
| 609 | - <th>计划营运时间(小时)</th> | |
| 610 | - <th>计划营运车速(公里/小时)</th> | |
| 611 | - <th>实际营运时间(小时)</th> | |
| 612 | - <th>实际营运车速(公里/小时)</th> | |
| 613 | - <th>计划运送时间(小时)</th> | |
| 614 | - <th>计划运送车速(公里/小时)</th> | |
| 615 | - <th>实际运送时间(小时)</th> | |
| 616 | - <th>实际运送车速(公里/小时)</th> | |
| 612 | + <th>计划营运时间<i title='计划营运时间:从计划班次计算出场至回场间计划营运时长<br/>其中包含 进出场班次时间、营运班次行驶时间、空驶班次行驶时间、和停站时间(起讫站待发的等待时间)。' uk-tooltip style='color:#999;font-style:oblique;'>?</i><br/>(小时.分钟)</th> | |
| 613 | + <th>计划营运车速<br/>(公里/小时)</th> | |
| 614 | + <th>实际营运时间<i title='实际营运时间:从实际路单计算出场至回场间实际营运时长<br/>其中包含 进出场班次时间、营运班次行驶时间、空驶班次行驶时间、和停站时间(起讫站待发的等待时间)。' uk-tooltip style='color:#999;font-style:oblique;'>?</i><br/>(小时.分钟)</th> | |
| 615 | + <th>实际营运车速<br/>(公里/小时)</th> | |
| 616 | + <th>计划运送时间<i title='计划运送时间:从计划班次计算营运班次的计划行驶时长<br/>仅有 营运班次行驶时间。' uk-tooltip style='color:#999;font-style:oblique;'>?</i><br/>(小时.分钟)</th> | |
| 617 | + <th>计划运送车速<br/>(公里/小时)</th> | |
| 618 | + <th>实际运送时间<i title='实际运送时间:从实际路单计算营运班次的实际行驶时长<br/>仅有 营运班次行驶时间。' uk-tooltip style='color:#999;font-style:oblique;'>?</i><br/>(小时.分钟)</th> | |
| 619 | + <th>实际运送车速<br/>(公里/小时)</th> | |
| 617 | 620 | </tr> |
| 618 | 621 | </thead> |
| 619 | 622 | <tbody> | ... | ... |
src/main/resources/static/pages/forms/statement/workingHours.html
| 1 | +<link rel="stylesheet" href="/assets/plugins/uk3.0/uikit.min.css"/> | |
| 2 | +<script src="/assets/plugins/uk3.0/uikit.min.js"></script> | |
| 3 | +<script src="/assets/plugins/uk3.0/uikit-icons.min.js"></script> | |
| 1 | 4 | <style type="text/css"> |
| 2 | 5 | .table-bordered { |
| 3 | 6 | border: 1px solid; } |
| ... | ... | @@ -81,9 +84,15 @@ |
| 81 | 84 | <td>路牌</td> |
| 82 | 85 | <td>驾驶员</td> |
| 83 | 86 | <td>车辆</td> |
| 84 | - <td>计划工时<font style="font-size: 8px;color: gray;"> /小时.分钟</font></td> | |
| 85 | - <td>实际营运工时<font style="font-size: 8px;color: gray;"> /小时.分钟</font></td> | |
| 86 | - <td>实际空驶工时<font style="font-size: 8px;color: gray;"> /小时.分钟</font></td> | |
| 87 | + <td>计划工时<i title='计划工时:从计划班次计算所有班次历时<br/>其中包含 进出场班次行驶时间、营运班次行驶时间、空驶班次行驶时间。' uk-tooltip style='color:#999;font-style:oblique;'>?</i> | |
| 88 | + <font style="font-size: 8px;color: gray;"> /小时.分钟</font> | |
| 89 | + </td> | |
| 90 | + <td>实际营运工时<i title='实际营运工时:从实际路单计算所有营运班次历时<br/>仅有 营运班次行驶时间。' uk-tooltip style='color:#999;font-style:oblique;'>?</i> | |
| 91 | + <font style="font-size: 8px;color: gray;"> /小时.分钟</font> | |
| 92 | + </td> | |
| 93 | + <td>实际空驶工时<i title='实际空驶工时:从实际路单计算所有空驶班次历时<br/>其中包含 进出场班次行驶时间、空驶班次行驶时间。' uk-tooltip style='color:#999;font-style:oblique;'>?</i> | |
| 94 | + <font style="font-size: 8px;color: gray;"> /小时.分钟</font> | |
| 95 | + </td> | |
| 87 | 96 | </tr> |
| 88 | 97 | </thead> |
| 89 | 98 | <tbody id="tbody"> | ... | ... |
src/main/resources/static/pages/home.html
| ... | ... | @@ -83,10 +83,11 @@ |
| 83 | 83 | </ul> |
| 84 | 84 | --> |
| 85 | 85 | |
| 86 | - <h2 style="text-indent: 35px;margin: 10px 0 5px;">2020-08-24 更新说明 Changelog</h2> | |
| 86 | + <h2 style="text-indent: 35px;margin: 10px 0 5px;">2023-05-31 更新说明 Changelog</h2> | |
| 87 | 87 | <br><br> |
| 88 | 88 | <ul > |
| 89 | - <li class="sub_title"><h6>线调</h6></li> | |
| 90 | - <li><span class="label s_c_change">修改</span>1、线调,时间超出待发时候后,锁定待发,禁止修改待发时间。</li> | |
| 89 | + <li class="sub_title"><h6>统计报表</h6></li> | |
| 90 | + <li><span class="label s_c_change">修改</span>1、行驶时间及车速统计表与工时统计表时间展示格式保持一致(以工时统计表为准)。</li> | |
| 91 | + <li><span class="label s_c_add">新增</span>2、在行驶时间及车速统计表与工时统计表的表头处,展示数据列的计算方式和含义。</li> | |
| 91 | 92 | </ul> |
| 92 | 93 | </div> | ... | ... |