Commit d076480bb9e843c4f86f86525e9bd5e9311c702e
1 parent
e3a50445
1.线路自动执行+偏移值逻辑完善
2.GPS里程计算及展示
Showing
20 changed files
with
1203 additions
and
959 deletions
pom.xml
| @@ -67,7 +67,7 @@ | @@ -67,7 +67,7 @@ | ||
| 67 | <dependency> | 67 | <dependency> |
| 68 | <groupId>mysql</groupId> | 68 | <groupId>mysql</groupId> |
| 69 | <artifactId>mysql-connector-java</artifactId> | 69 | <artifactId>mysql-connector-java</artifactId> |
| 70 | - <version>5.1.38</version> | 70 | + <version>8.0.33</version> |
| 71 | </dependency> | 71 | </dependency> |
| 72 | 72 | ||
| 73 | <dependency> | 73 | <dependency> |
src/main/java/com/bsth/controller/realcontrol/AdminUtilsController.java
| @@ -5,6 +5,7 @@ import java.lang.reflect.Modifier; | @@ -5,6 +5,7 @@ import java.lang.reflect.Modifier; | ||
| 5 | import java.util.*; | 5 | import java.util.*; |
| 6 | 6 | ||
| 7 | import com.bsth.data.BasicData; | 7 | import com.bsth.data.BasicData; |
| 8 | +import com.bsth.data.schedule.auto_exec.AfterServiceScheduler; | ||
| 8 | import com.bsth.security.SsoConfig; | 9 | import com.bsth.security.SsoConfig; |
| 9 | import com.bsth.service.SectionService; | 10 | import com.bsth.service.SectionService; |
| 10 | import com.bsth.service.StationService; | 11 | import com.bsth.service.StationService; |
| @@ -100,6 +101,9 @@ public class AdminUtilsController { | @@ -100,6 +101,9 @@ public class AdminUtilsController { | ||
| 100 | @Autowired | 101 | @Autowired |
| 101 | private SsoConfig ssoConfig; | 102 | private SsoConfig ssoConfig; |
| 102 | 103 | ||
| 104 | + @Autowired | ||
| 105 | + private AfterServiceScheduler afterServiceScheduler; | ||
| 106 | + | ||
| 103 | /** | 107 | /** |
| 104 | * 出现重复班次的车辆 | 108 | * 出现重复班次的车辆 |
| 105 | * | 109 | * |
| @@ -401,4 +405,19 @@ public class AdminUtilsController { | @@ -401,4 +405,19 @@ public class AdminUtilsController { | ||
| 401 | 405 | ||
| 402 | return "error"; | 406 | return "error"; |
| 403 | } | 407 | } |
| 408 | + | ||
| 409 | + @RequestMapping("/afterService") | ||
| 410 | + public String afterService(@RequestParam String lineCode, @RequestParam String schDate) { | ||
| 411 | + Map<String, Object> result = new HashMap<>(); | ||
| 412 | + try { | ||
| 413 | + afterServiceScheduler.compute(lineCode, schDate); | ||
| 414 | + return "success"; | ||
| 415 | + } catch (Exception e) { | ||
| 416 | + e.printStackTrace(); | ||
| 417 | + } | ||
| 418 | + | ||
| 419 | + return "error"; | ||
| 420 | + } | ||
| 421 | + | ||
| 422 | + | ||
| 404 | } | 423 | } |
| 405 | \ No newline at end of file | 424 | \ No newline at end of file |
src/main/java/com/bsth/data/schedule/SchAttrCalculator.java
| @@ -63,6 +63,8 @@ public class SchAttrCalculator { | @@ -63,6 +63,8 @@ public class SchAttrCalculator { | ||
| 63 | sch.setFcsjActualAll(fmtyyyyMMddHHmm.parseMillis(sch.getScheduleDateStr() + sch.getFcsjActual()) + DAY_TIME); | 63 | sch.setFcsjActualAll(fmtyyyyMMddHHmm.parseMillis(sch.getScheduleDateStr() + sch.getFcsjActual()) + DAY_TIME); |
| 64 | }*/ | 64 | }*/ |
| 65 | 65 | ||
| 66 | + sch.setZdsjT(getTime(rq, sch.getZdsj(), conf)); | ||
| 67 | + | ||
| 66 | //实际终点時間 | 68 | //实际终点時間 |
| 67 | sch.setZdsjActualAll(getTime(rq, sch.getZdsjActual(), conf)); | 69 | sch.setZdsjActualAll(getTime(rq, sch.getZdsjActual(), conf)); |
| 68 | /*if (StringUtils.isNotEmpty(sch.getZdsjActual()) && | 70 | /*if (StringUtils.isNotEmpty(sch.getZdsjActual()) && |
src/main/java/com/bsth/data/schedule/auto_exec/AfterServiceScheduler.java
| @@ -6,8 +6,13 @@ import com.bsth.data.gpsdata_v2.cache.GeoCacheData; | @@ -6,8 +6,13 @@ import com.bsth.data.gpsdata_v2.cache.GeoCacheData; | ||
| 6 | import com.bsth.data.gpsdata_v2.entity.StationRoute; | 6 | import com.bsth.data.gpsdata_v2.entity.StationRoute; |
| 7 | import com.bsth.data.gpsdata_v2.utils.GeoUtils; | 7 | import com.bsth.data.gpsdata_v2.utils.GeoUtils; |
| 8 | import com.bsth.data.schedule.DayOfSchedule; | 8 | import com.bsth.data.schedule.DayOfSchedule; |
| 9 | +import com.bsth.data.schedule.SchAttrCalculator; | ||
| 10 | +import com.bsth.data.schedule.ScheduleComparator; | ||
| 11 | +import com.bsth.entity.realcontrol.GpsMileage; | ||
| 9 | import com.bsth.entity.realcontrol.LineConfig; | 12 | import com.bsth.entity.realcontrol.LineConfig; |
| 10 | import com.bsth.entity.realcontrol.ScheduleRealInfo; | 13 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 14 | +import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; | ||
| 15 | +import com.bsth.service.realcontrol.GpsMileageService; | ||
| 11 | import com.bsth.util.Geo.Point; | 16 | import com.bsth.util.Geo.Point; |
| 12 | import com.google.common.collect.ArrayListMultimap; | 17 | import com.google.common.collect.ArrayListMultimap; |
| 13 | import com.google.common.collect.BiMap; | 18 | import com.google.common.collect.BiMap; |
| @@ -15,6 +20,7 @@ import com.google.common.collect.Multimap; | @@ -15,6 +20,7 @@ import com.google.common.collect.Multimap; | ||
| 15 | import org.joda.time.DateTime; | 20 | import org.joda.time.DateTime; |
| 16 | import org.joda.time.format.DateTimeFormat; | 21 | import org.joda.time.format.DateTimeFormat; |
| 17 | import org.joda.time.format.DateTimeFormatter; | 22 | import org.joda.time.format.DateTimeFormatter; |
| 23 | +import org.pentaho.di.core.util.Assert; | ||
| 18 | import org.slf4j.Logger; | 24 | import org.slf4j.Logger; |
| 19 | import org.slf4j.LoggerFactory; | 25 | import org.slf4j.LoggerFactory; |
| 20 | import org.springframework.beans.factory.annotation.Autowired; | 26 | import org.springframework.beans.factory.annotation.Autowired; |
| @@ -25,6 +31,7 @@ import org.springframework.scheduling.annotation.EnableScheduling; | @@ -25,6 +31,7 @@ import org.springframework.scheduling.annotation.EnableScheduling; | ||
| 25 | import org.springframework.scheduling.annotation.Scheduled; | 31 | import org.springframework.scheduling.annotation.Scheduled; |
| 26 | import org.springframework.stereotype.Component; | 32 | import org.springframework.stereotype.Component; |
| 27 | 33 | ||
| 34 | +import java.math.BigDecimal; | ||
| 28 | import java.util.*; | 35 | import java.util.*; |
| 29 | 36 | ||
| 30 | @Component | 37 | @Component |
| @@ -43,6 +50,15 @@ public class AfterServiceScheduler { | @@ -43,6 +50,15 @@ public class AfterServiceScheduler { | ||
| 43 | @Qualifier("msJdbcTemplate") | 50 | @Qualifier("msJdbcTemplate") |
| 44 | private JdbcTemplate msJdbcTemplate; | 51 | private JdbcTemplate msJdbcTemplate; |
| 45 | 52 | ||
| 53 | + @Autowired | ||
| 54 | + private GpsMileageService gpsMileageService; | ||
| 55 | + | ||
| 56 | + @Autowired | ||
| 57 | + private ScheduleRealInfoRepository scheduleRealInfoRepository; | ||
| 58 | + | ||
| 59 | + @Autowired | ||
| 60 | + private SchAttrCalculator schAttrCalculator; | ||
| 61 | + | ||
| 46 | private Map<String, String> complete = new HashMap<>(); | 62 | private Map<String, String> complete = new HashMap<>(); |
| 47 | 63 | ||
| 48 | private DateTimeFormatter formatter = DateTimeFormat.forPattern("yyyy-MM-dd"); | 64 | private DateTimeFormatter formatter = DateTimeFormat.forPattern("yyyy-MM-dd"); |
| @@ -79,15 +95,23 @@ public class AfterServiceScheduler { | @@ -79,15 +95,23 @@ public class AfterServiceScheduler { | ||
| 79 | } | 95 | } |
| 80 | // 末班过后一个小时 | 96 | // 末班过后一个小时 |
| 81 | if (lastTime + MAX_DIFF < System.currentTimeMillis()) { | 97 | if (lastTime + MAX_DIFF < System.currentTimeMillis()) { |
| 98 | + log.warn("线路: {}, 末班车时间: {}, 当前时间: {}", lineCode, lastTime, System.currentTimeMillis()); | ||
| 82 | BiMap<String, String> inside2device = BasicData.deviceId2NbbmMap.inverse(); | 99 | BiMap<String, String> inside2device = BasicData.deviceId2NbbmMap.inverse(); |
| 83 | for (String key : multimap.keySet()) { | 100 | for (String key : multimap.keySet()) { |
| 84 | String deviceId = inside2device.get(key); | 101 | String deviceId = inside2device.get(key); |
| 85 | Collection<ScheduleRealInfo> infos = multimap.get(key); | 102 | Collection<ScheduleRealInfo> infos = multimap.get(key); |
| 86 | List<ScheduleRealInfo> list = new ArrayList<>(infos); | 103 | List<ScheduleRealInfo> list = new ArrayList<>(infos); |
| 87 | - List<GpsInfo> gpsInfos = msJdbcTemplate.query("SELECT device_id,line_id,lon,lat,service_state,ts FROM bsth_c_gps_info_" + dateTime.getYear() + " WHERE days_year = ? AND device_id = ? AND service_state & 0x80000000 = 0 ORDER BY ts", new Object[]{dateTime.getDayOfYear(), deviceId}, BeanPropertyRowMapper.newInstance(GpsInfo.class)); | 104 | + List<GpsInfo> gpsInfos = msJdbcTemplate.query("SELECT device_id,line_id,lon,lat,service_state,ts FROM bsth_c_gps_info_" + dateTime.getYear() + " WHERE days_year = ? AND device_id = ? AND line_id = ? AND service_state & 0x80000000 = 0 ORDER BY ts", new Object[]{dateTime.getDayOfYear(), deviceId, lineCode}, BeanPropertyRowMapper.newInstance(GpsInfo.class)); |
| 105 | + GpsMileage gpsMileage = new GpsMileage(); | ||
| 106 | + gpsMileage.setRq(schDate); | ||
| 107 | + gpsMileage.setLineCode(lineCode); | ||
| 108 | + gpsMileage.setClZbh(key); | ||
| 109 | + gpsMileage.setDeviceId(deviceId); | ||
| 110 | + gpsMileage.setMileage(calcMileage(gpsInfos)); | ||
| 111 | + gpsMileageService.save(gpsMileage); | ||
| 88 | for (ScheduleRealInfo schedule : list) { | 112 | for (ScheduleRealInfo schedule : list) { |
| 89 | if (schedule.getFcsjActual() == null || schedule.getZdsjActual() == null) { | 113 | if (schedule.getFcsjActual() == null || schedule.getZdsjActual() == null) { |
| 90 | - matchTime(schedule, gpsInfos); | 114 | + matchTime(schedule, gpsInfos, lineConfig.getAutoExecOffset()); |
| 91 | dayOfSchedule.save(schedule); | 115 | dayOfSchedule.save(schedule); |
| 92 | } | 116 | } |
| 93 | } | 117 | } |
| @@ -99,7 +123,81 @@ public class AfterServiceScheduler { | @@ -99,7 +123,81 @@ public class AfterServiceScheduler { | ||
| 99 | } | 123 | } |
| 100 | } | 124 | } |
| 101 | 125 | ||
| 102 | - private void matchTime(ScheduleRealInfo schedule, List<GpsInfo> gpsInfos) { | 126 | + public void compute(String lineCode, String schDate) { |
| 127 | + log.warn("自动执行线路手动计算开始"); | ||
| 128 | + Collection<LineConfig> lineConfigs = lineConfigData.getAll(); | ||
| 129 | + if (lineConfigs == null || lineConfigs.isEmpty()) { | ||
| 130 | + return; | ||
| 131 | + } | ||
| 132 | + for (LineConfig lineConfig : lineConfigs) { | ||
| 133 | + if (lineCode.equals(lineConfig.getLine().getLineCode()) && lineConfig.isAutoExec() && lineConfig.getAutoExecOffset() > 0) { | ||
| 134 | + DateTime dateTime = formatter.parseDateTime(schDate); | ||
| 135 | + List<ScheduleRealInfo> schedules = scheduleRealInfoRepository.scheduleDaily(lineCode, schDate); | ||
| 136 | + Map<String, List<ScheduleRealInfo>> nbbm2schedules = new HashMap<>(); | ||
| 137 | + for (ScheduleRealInfo schedule : schedules) { | ||
| 138 | + schAttrCalculator.calcRealDate(schedule); | ||
| 139 | + String nbbm = schedule.getClZbh(); | ||
| 140 | + List<ScheduleRealInfo> schedules1 = nbbm2schedules.get(nbbm); | ||
| 141 | + if (schedules1 == null) { | ||
| 142 | + schedules1 = new ArrayList<>(); | ||
| 143 | + nbbm2schedules.put(nbbm, schedules1); | ||
| 144 | + } | ||
| 145 | + schedules1.add(schedule); | ||
| 146 | + } | ||
| 147 | + BiMap<String, String> inside2device = BasicData.deviceId2NbbmMap.inverse(); | ||
| 148 | + for (Map.Entry<String, List<ScheduleRealInfo>> entry : nbbm2schedules.entrySet()) { | ||
| 149 | + String deviceId = inside2device.get(entry.getKey()); | ||
| 150 | + List<ScheduleRealInfo> list = entry.getValue(); | ||
| 151 | + Collections.sort(list, new ScheduleComparator.DFSJ()); | ||
| 152 | + List<GpsInfo> gpsInfos = msJdbcTemplate.query("SELECT device_id,line_id,lon,lat,service_state,ts FROM bsth_c_gps_info_" + dateTime.getYear() + " WHERE days_year = ? AND device_id = ? AND line_id = ? AND service_state & 0x80000000 = 0 ORDER BY ts", new Object[]{dateTime.getDayOfYear(), deviceId, lineCode}, BeanPropertyRowMapper.newInstance(GpsInfo.class)); | ||
| 153 | + GpsMileage gpsMileage = new GpsMileage(); | ||
| 154 | + gpsMileage.setRq(schDate); | ||
| 155 | + gpsMileage.setLineCode(lineCode); | ||
| 156 | + gpsMileage.setClZbh(entry.getKey()); | ||
| 157 | + gpsMileage.setDeviceId(deviceId); | ||
| 158 | + gpsMileage.setMileage(calcMileage(gpsInfos)); | ||
| 159 | + gpsMileageService.save(gpsMileage); | ||
| 160 | + for (ScheduleRealInfo schedule : list) { | ||
| 161 | + if (schedule.getFcsjActual() == null || schedule.getZdsjActual() == null) { | ||
| 162 | + matchTime(schedule, gpsInfos, lineConfig.getAutoExecOffset()); | ||
| 163 | + dayOfSchedule.save(schedule); | ||
| 164 | + } | ||
| 165 | + } | ||
| 166 | + } | ||
| 167 | + break; | ||
| 168 | + } | ||
| 169 | + } | ||
| 170 | + } | ||
| 171 | + | ||
| 172 | + private BigDecimal calcMileage(List<GpsInfo> gpsInfos) { | ||
| 173 | + Assert.assertNotNull(gpsInfos); | ||
| 174 | + BigDecimal mileage = BigDecimal.ZERO; | ||
| 175 | + GpsInfo last = null, current = null; | ||
| 176 | + Iterator<GpsInfo> it = gpsInfos.iterator(); | ||
| 177 | + while (it.hasNext()) { | ||
| 178 | + GpsInfo gpsInfo = it.next(); | ||
| 179 | + if (gpsInfo.getLon() == 0 || gpsInfo.getLat() == 0) continue; | ||
| 180 | + if (last == null) { | ||
| 181 | + if ((gpsInfo.getServiceState() & 0x80000000) == 0) { | ||
| 182 | + last = gpsInfo; | ||
| 183 | + } | ||
| 184 | + } else { | ||
| 185 | + if ((gpsInfo.getServiceState() & 0x80000000) == 0) { | ||
| 186 | + current = gpsInfo; | ||
| 187 | + double distance = GeoUtils.getDistance(new Point(last.getLon(), last.getLat()), new Point(current.getLon(), current.getLat())); | ||
| 188 | + boolean invalid = Double.isNaN(distance) || Double.isInfinite(distance); | ||
| 189 | + if (!invalid) { | ||
| 190 | + mileage = mileage.add(new BigDecimal(distance / 1000)); | ||
| 191 | + } | ||
| 192 | + last = current; | ||
| 193 | + } | ||
| 194 | + } | ||
| 195 | + } | ||
| 196 | + | ||
| 197 | + return mileage.setScale(3, BigDecimal.ROUND_HALF_UP); | ||
| 198 | + } | ||
| 199 | + | ||
| 200 | + private void matchTime(ScheduleRealInfo schedule, List<GpsInfo> gpsInfos, int autoExecOffset) { | ||
| 103 | List<StationRoute> srs = GeoCacheData.getStationRoute(schedule.getXlBm(), Integer.parseInt(schedule.getXlDir())); | 201 | List<StationRoute> srs = GeoCacheData.getStationRoute(schedule.getXlBm(), Integer.parseInt(schedule.getXlDir())); |
| 104 | String qdz = schedule.getQdzCode(), zdz = schedule.getZdzCode(); | 202 | String qdz = schedule.getQdzCode(), zdz = schedule.getZdzCode(); |
| 105 | StationRoute qdzRoute = null, zdzRoute = null; | 203 | StationRoute qdzRoute = null, zdzRoute = null; |
| @@ -145,11 +243,11 @@ public class AfterServiceScheduler { | @@ -145,11 +243,11 @@ public class AfterServiceScheduler { | ||
| 145 | } | 243 | } |
| 146 | } | 244 | } |
| 147 | } | 245 | } |
| 148 | - if (schedule.getFcsjActual() == null) { | 246 | + if (schedule.getFcsjActual() == null || Math.abs(schedule.getFcsjT() - schedule.getFcsjActualTime()) > autoExecOffset * 120000) { |
| 149 | schedule.setFcsjActual(new DateTime(schedule.getFcsjT()).toString("HH:mm")); | 247 | schedule.setFcsjActual(new DateTime(schedule.getFcsjT()).toString("HH:mm")); |
| 150 | schedule.setFcsjActualTime(schedule.getFcsjT()); | 248 | schedule.setFcsjActualTime(schedule.getFcsjT()); |
| 151 | } | 249 | } |
| 152 | - if (schedule.getZdsjActual() == null) { | 250 | + if (schedule.getZdsjActual() == null || Math.abs(schedule.getZdsjT() - schedule.getZdsjActualTime()) > autoExecOffset * 120000) { |
| 153 | schedule.setZdsjActual(new DateTime(schedule.getZdsjT()).toString("HH:mm")); | 251 | schedule.setZdsjActual(new DateTime(schedule.getZdsjT()).toString("HH:mm")); |
| 154 | schedule.setZdsjActualTime(schedule.getZdsjT()); | 252 | schedule.setZdsjActualTime(schedule.getZdsjT()); |
| 155 | } | 253 | } |
src/main/java/com/bsth/entity/realcontrol/GpsMileage.java
0 → 100644
| 1 | +package com.bsth.entity.realcontrol; | ||
| 2 | + | ||
| 3 | +import javax.persistence.*; | ||
| 4 | +import java.math.BigDecimal; | ||
| 5 | + | ||
| 6 | +@Entity | ||
| 7 | +@Table(name = "bsth_c_gps_mileage") | ||
| 8 | +public class GpsMileage { | ||
| 9 | + | ||
| 10 | + @Id | ||
| 11 | + @GeneratedValue(strategy = GenerationType.IDENTITY) | ||
| 12 | + private Long id; | ||
| 13 | + | ||
| 14 | + /** | ||
| 15 | + * 日期 | ||
| 16 | + */ | ||
| 17 | + private String rq; | ||
| 18 | + | ||
| 19 | + /** | ||
| 20 | + * 线路编码 | ||
| 21 | + */ | ||
| 22 | + private String lineCode; | ||
| 23 | + | ||
| 24 | + /** | ||
| 25 | + * 车辆自编码 | ||
| 26 | + */ | ||
| 27 | + private String clZbh; | ||
| 28 | + | ||
| 29 | + /** | ||
| 30 | + * 设备编号 | ||
| 31 | + */ | ||
| 32 | + private String deviceId; | ||
| 33 | + | ||
| 34 | + /** | ||
| 35 | + * 里程 | ||
| 36 | + */ | ||
| 37 | + private BigDecimal mileage; | ||
| 38 | + | ||
| 39 | + public Long getId() { | ||
| 40 | + return id; | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | + public void setId(Long id) { | ||
| 44 | + this.id = id; | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + public String getRq() { | ||
| 48 | + return rq; | ||
| 49 | + } | ||
| 50 | + | ||
| 51 | + public void setRq(String rq) { | ||
| 52 | + this.rq = rq; | ||
| 53 | + } | ||
| 54 | + | ||
| 55 | + public String getLineCode() { | ||
| 56 | + return lineCode; | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + public void setLineCode(String lineCode) { | ||
| 60 | + this.lineCode = lineCode; | ||
| 61 | + } | ||
| 62 | + | ||
| 63 | + public String getClZbh() { | ||
| 64 | + return clZbh; | ||
| 65 | + } | ||
| 66 | + | ||
| 67 | + public void setClZbh(String clZbh) { | ||
| 68 | + this.clZbh = clZbh; | ||
| 69 | + } | ||
| 70 | + | ||
| 71 | + public String getDeviceId() { | ||
| 72 | + return deviceId; | ||
| 73 | + } | ||
| 74 | + | ||
| 75 | + public void setDeviceId(String deviceId) { | ||
| 76 | + this.deviceId = deviceId; | ||
| 77 | + } | ||
| 78 | + | ||
| 79 | + public BigDecimal getMileage() { | ||
| 80 | + return mileage; | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | + public void setMileage(BigDecimal mileage) { | ||
| 84 | + this.mileage = mileage; | ||
| 85 | + } | ||
| 86 | +} |
src/main/java/com/bsth/filter/AuthorityFilter.java
| @@ -6,6 +6,8 @@ import com.bsth.data.SystemParamCache; | @@ -6,6 +6,8 @@ import com.bsth.data.SystemParamCache; | ||
| 6 | import com.fasterxml.jackson.databind.ObjectMapper; | 6 | import com.fasterxml.jackson.databind.ObjectMapper; |
| 7 | import org.slf4j.Logger; | 7 | import org.slf4j.Logger; |
| 8 | import org.slf4j.LoggerFactory; | 8 | import org.slf4j.LoggerFactory; |
| 9 | +import org.springframework.util.AntPathMatcher; | ||
| 10 | +import org.springframework.util.PathMatcher; | ||
| 9 | 11 | ||
| 10 | import javax.servlet.*; | 12 | import javax.servlet.*; |
| 11 | import javax.servlet.http.HttpServletRequest; | 13 | import javax.servlet.http.HttpServletRequest; |
| @@ -29,7 +31,9 @@ public class AuthorityFilter extends BaseFilter { | @@ -29,7 +31,9 @@ public class AuthorityFilter extends BaseFilter { | ||
| 29 | 31 | ||
| 30 | private final String scheduleReferer = "/real_control/v2"; | 32 | private final String scheduleReferer = "/real_control/v2"; |
| 31 | 33 | ||
| 32 | - private String[] pubUrls = new String[]{ "/sockjs/", "/pages/", "/error", "/dictionary/all", "/user/isWeakCipher", "/user/isRealName", "/user/currentUser", "/user/companyData", "/module/findByCurrentUser", "/eci/validate_get_destroy_info", "/business", "/personnel/all_py", "/companyAuthority/all", "/line/all", "/basic/refresh_person_data", "/downloadFile", "/report/lineList" }; | 34 | + private String[] pubUrls = new String[]{ "/sockjs/", "/pages/home.html", "/error", "/dictionary/all", "/user/validPWDExpired", "/user/isWeakCipher", "/user/isRealName", "/user/currentUser", "/user/companyData", "/module/findByCurrentUser", "/business", "/personnel/all_py", "/companyAuthority/all", "/line/all", "/basic/refresh_person_data", "/downloadFile", "/report/lineList", "/adminUtils", "/metronic_v4.5.4", "/assets", "/pages/scheduleApp/module/common" }; |
| 35 | + | ||
| 36 | + private PathMatcher matcher = new AntPathMatcher(); | ||
| 33 | 37 | ||
| 34 | @Override | 38 | @Override |
| 35 | public void doFilter(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException { | 39 | public void doFilter(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException { |
| @@ -47,7 +51,7 @@ public class AuthorityFilter extends BaseFilter { | @@ -47,7 +51,7 @@ public class AuthorityFilter extends BaseFilter { | ||
| 47 | if (links != null) { | 51 | if (links != null) { |
| 48 | boolean matched = false; | 52 | boolean matched = false; |
| 49 | for (String link : links) { | 53 | for (String link : links) { |
| 50 | - if (uri.startsWith(link)) { | 54 | + if (matcher.match(link, uri)) { |
| 51 | matched = true; | 55 | matched = true; |
| 52 | break; | 56 | break; |
| 53 | } | 57 | } |
src/main/java/com/bsth/repository/realcontrol/GpsMileageRepository.java
0 → 100644
| 1 | +package com.bsth.repository.realcontrol; | ||
| 2 | + | ||
| 3 | +import com.bsth.entity.realcontrol.GpsMileage; | ||
| 4 | +import com.bsth.repository.BaseRepository; | ||
| 5 | +import org.springframework.stereotype.Repository; | ||
| 6 | + | ||
| 7 | +@Repository | ||
| 8 | +public interface GpsMileageRepository extends BaseRepository<GpsMileage, Long> { | ||
| 9 | + | ||
| 10 | + | ||
| 11 | +} |
src/main/java/com/bsth/service/gps/entity/GpsOutbound_DTO.java
| 1 | -package com.bsth.service.gps.entity; | ||
| 2 | - | ||
| 3 | -import com.alibaba.fastjson.JSON; | ||
| 4 | -import com.alibaba.fastjson.JSONObject; | ||
| 5 | -import com.bsth.data.BasicData; | ||
| 6 | - | ||
| 7 | -import java.util.*; | ||
| 8 | - | ||
| 9 | -/** | ||
| 10 | - * 越界异常 dto | ||
| 11 | - * Created by panzhao on 2017/4/7. | ||
| 12 | - */ | ||
| 13 | -public class GpsOutbound_DTO { | ||
| 14 | - | ||
| 15 | - public static List<GpsOutbound_DTO> create(List<Map<String, Object>> mapList){ | ||
| 16 | - //默认都是一辆车的数据 | ||
| 17 | - List<GpsOutbound> list = JSONObject.parseArray(JSON.toJSONString(mapList), GpsOutbound.class); | ||
| 18 | - GpsOutbound outbound; | ||
| 19 | - | ||
| 20 | - //排序 | ||
| 21 | - Collections.sort(list, new Comparator<GpsOutbound>() { | ||
| 22 | - @Override | ||
| 23 | - public int compare(GpsOutbound o1, GpsOutbound o2) { | ||
| 24 | - return (int) (o1.getTimestamp() - o2.getTimestamp()); | ||
| 25 | - } | ||
| 26 | - }); | ||
| 27 | - | ||
| 28 | - int space = 1000 * 60; | ||
| 29 | - int size = list.size(); | ||
| 30 | - StringBuffer locations = new StringBuffer(""); | ||
| 31 | - | ||
| 32 | - List<GpsOutbound_DTO> rsList = new ArrayList<>(); | ||
| 33 | - GpsOutbound_DTO dto = null; | ||
| 34 | - | ||
| 35 | - for(int i = 0; i < size; i++){ | ||
| 36 | - outbound = list.get(i); | ||
| 37 | - locations.append(outbound.location() + ";"); | ||
| 38 | - if(dto == null){ | ||
| 39 | - dto = new GpsOutbound_DTO(); | ||
| 40 | - dto.setDeviceId(outbound.getVehicle()); | ||
| 41 | - dto.setNbbm(BasicData.deviceId2NbbmMap.get(outbound.getVehicle())); | ||
| 42 | - dto.setSt(outbound.getTimestamp()); | ||
| 43 | - } | ||
| 44 | - else{ | ||
| 45 | - //越界结束 | ||
| 46 | - if((i < size - 1 && list.get(i + 1).getTimestamp() - outbound.getTimestamp() > space)){ | ||
| 47 | - dto.setEt(outbound.getTimestamp()); | ||
| 48 | - dto.setLocations(locations.toString()); | ||
| 49 | - | ||
| 50 | - rsList.add(dto); | ||
| 51 | - dto = null; | ||
| 52 | - locations = new StringBuffer(""); | ||
| 53 | - continue; | ||
| 54 | - } | ||
| 55 | - | ||
| 56 | - if(i == size - 1) | ||
| 57 | - rsList.add(dto); | ||
| 58 | - } | ||
| 59 | - } | ||
| 60 | - | ||
| 61 | - return rsList; | ||
| 62 | - } | ||
| 63 | - | ||
| 64 | - /** | ||
| 65 | - * 设备号 | ||
| 66 | - */ | ||
| 67 | - private String deviceId; | ||
| 68 | - | ||
| 69 | - /** | ||
| 70 | - * 自编号 | ||
| 71 | - */ | ||
| 72 | - private String nbbm; | ||
| 73 | - | ||
| 74 | - /** | ||
| 75 | - * 越界开始时间 | ||
| 76 | - */ | ||
| 77 | - private long st; | ||
| 78 | - | ||
| 79 | - /** | ||
| 80 | - * 越界结束时间 | ||
| 81 | - */ | ||
| 82 | - private long et; | ||
| 83 | - | ||
| 84 | - /** | ||
| 85 | - * 越界点位集合 | ||
| 86 | - */ | ||
| 87 | - private String locations; | ||
| 88 | - | ||
| 89 | - /** | ||
| 90 | - * 所在路段 | ||
| 91 | - */ | ||
| 92 | - private String sectionName; | ||
| 93 | - | ||
| 94 | - private String abnormalType = "outbound"; | ||
| 95 | - | ||
| 96 | - public String getDeviceId() { | ||
| 97 | - return deviceId; | ||
| 98 | - } | ||
| 99 | - | ||
| 100 | - public void setDeviceId(String deviceId) { | ||
| 101 | - this.deviceId = deviceId; | ||
| 102 | - } | ||
| 103 | - | ||
| 104 | - public String getNbbm() { | ||
| 105 | - return nbbm; | ||
| 106 | - } | ||
| 107 | - | ||
| 108 | - public void setNbbm(String nbbm) { | ||
| 109 | - this.nbbm = nbbm; | ||
| 110 | - } | ||
| 111 | - | ||
| 112 | - public long getSt() { | ||
| 113 | - return st; | ||
| 114 | - } | ||
| 115 | - | ||
| 116 | - public void setSt(long st) { | ||
| 117 | - this.st = st; | ||
| 118 | - } | ||
| 119 | - | ||
| 120 | - public long getEt() { | ||
| 121 | - return et; | ||
| 122 | - } | ||
| 123 | - | ||
| 124 | - public void setEt(long et) { | ||
| 125 | - this.et = et; | ||
| 126 | - } | ||
| 127 | - | ||
| 128 | - public String getLocations() { | ||
| 129 | - return locations; | ||
| 130 | - } | ||
| 131 | - | ||
| 132 | - public void setLocations(String locations) { | ||
| 133 | - this.locations = locations; | ||
| 134 | - } | ||
| 135 | - | ||
| 136 | - public String getAbnormalType() { | ||
| 137 | - return abnormalType; | ||
| 138 | - } | ||
| 139 | - | ||
| 140 | - public void setAbnormalType(String abnormalType) { | ||
| 141 | - this.abnormalType = abnormalType; | ||
| 142 | - } | ||
| 143 | - | ||
| 144 | - public String getSectionName() { | ||
| 145 | - return sectionName; | ||
| 146 | - } | ||
| 147 | - | ||
| 148 | - public void setSectionName(String sectionName) { | ||
| 149 | - this.sectionName = sectionName; | ||
| 150 | - } | ||
| 151 | -} | 1 | +package com.bsth.service.gps.entity; |
| 2 | + | ||
| 3 | +import com.alibaba.fastjson.JSON; | ||
| 4 | +import com.alibaba.fastjson.JSONObject; | ||
| 5 | +import com.bsth.data.BasicData; | ||
| 6 | + | ||
| 7 | +import java.util.*; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * 越界异常 dto | ||
| 11 | + * Created by panzhao on 2017/4/7. | ||
| 12 | + */ | ||
| 13 | +public class GpsOutbound_DTO { | ||
| 14 | + | ||
| 15 | + public static List<GpsOutbound_DTO> create(List<Map<String, Object>> mapList){ | ||
| 16 | + //默认都是一辆车的数据 | ||
| 17 | + List<GpsOutbound> list = JSONObject.parseArray(JSON.toJSONString(mapList), GpsOutbound.class); | ||
| 18 | + GpsOutbound outbound; | ||
| 19 | + | ||
| 20 | + //排序 | ||
| 21 | + Collections.sort(list, new Comparator<GpsOutbound>() { | ||
| 22 | + @Override | ||
| 23 | + public int compare(GpsOutbound o1, GpsOutbound o2) { | ||
| 24 | + return (int) (o1.getTimestamp() - o2.getTimestamp()); | ||
| 25 | + } | ||
| 26 | + }); | ||
| 27 | + | ||
| 28 | + int space = 1000 * 15; | ||
| 29 | + int size = list.size(); | ||
| 30 | + StringBuffer locations = new StringBuffer(""); | ||
| 31 | + | ||
| 32 | + List<GpsOutbound_DTO> rsList = new ArrayList<>(); | ||
| 33 | + GpsOutbound_DTO dto = null; | ||
| 34 | + | ||
| 35 | + for (int i = 0; i < size; i++) { | ||
| 36 | + outbound = list.get(i); | ||
| 37 | + locations.append(outbound.location() + ";"); | ||
| 38 | + if (dto == null) { | ||
| 39 | + dto = new GpsOutbound_DTO(); | ||
| 40 | + dto.setDeviceId(outbound.getVehicle()); | ||
| 41 | + dto.setNbbm(BasicData.deviceId2NbbmMap.get(outbound.getVehicle())); | ||
| 42 | + dto.setSt(outbound.getTimestamp()); | ||
| 43 | + } else { | ||
| 44 | + if (dto.getEt() == 0) { | ||
| 45 | + if (outbound.getTimestamp() - dto.getSt() > space) { | ||
| 46 | + dto = null; | ||
| 47 | + } | ||
| 48 | + } else { | ||
| 49 | + if (outbound.getTimestamp() - dto.getEt() > space) { | ||
| 50 | + if (dto.getSt() != dto.getEt()) { | ||
| 51 | + rsList.add(dto); | ||
| 52 | + } | ||
| 53 | + dto = null; | ||
| 54 | + locations = new StringBuffer(""); | ||
| 55 | + continue; | ||
| 56 | + } else { | ||
| 57 | + dto.setEt(outbound.getTimestamp()); | ||
| 58 | + dto.setLocations(locations.toString()); | ||
| 59 | + } | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + if (i == size - 1 && dto.getEt() > 0 && dto.getSt() != dto.getEt()) | ||
| 63 | + rsList.add(dto); | ||
| 64 | + } | ||
| 65 | + } | ||
| 66 | + | ||
| 67 | + return rsList; | ||
| 68 | + } | ||
| 69 | + | ||
| 70 | + /** | ||
| 71 | + * 设备号 | ||
| 72 | + */ | ||
| 73 | + private String deviceId; | ||
| 74 | + | ||
| 75 | + /** | ||
| 76 | + * 自编号 | ||
| 77 | + */ | ||
| 78 | + private String nbbm; | ||
| 79 | + | ||
| 80 | + /** | ||
| 81 | + * 越界开始时间 | ||
| 82 | + */ | ||
| 83 | + private long st; | ||
| 84 | + | ||
| 85 | + /** | ||
| 86 | + * 越界结束时间 | ||
| 87 | + */ | ||
| 88 | + private long et; | ||
| 89 | + | ||
| 90 | + /** | ||
| 91 | + * 越界点位集合 | ||
| 92 | + */ | ||
| 93 | + private String locations; | ||
| 94 | + | ||
| 95 | + /** | ||
| 96 | + * 所在路段 | ||
| 97 | + */ | ||
| 98 | + private String sectionName; | ||
| 99 | + | ||
| 100 | + private String abnormalType = "outbound"; | ||
| 101 | + | ||
| 102 | + public String getDeviceId() { | ||
| 103 | + return deviceId; | ||
| 104 | + } | ||
| 105 | + | ||
| 106 | + public void setDeviceId(String deviceId) { | ||
| 107 | + this.deviceId = deviceId; | ||
| 108 | + } | ||
| 109 | + | ||
| 110 | + public String getNbbm() { | ||
| 111 | + return nbbm; | ||
| 112 | + } | ||
| 113 | + | ||
| 114 | + public void setNbbm(String nbbm) { | ||
| 115 | + this.nbbm = nbbm; | ||
| 116 | + } | ||
| 117 | + | ||
| 118 | + public long getSt() { | ||
| 119 | + return st; | ||
| 120 | + } | ||
| 121 | + | ||
| 122 | + public void setSt(long st) { | ||
| 123 | + this.st = st; | ||
| 124 | + } | ||
| 125 | + | ||
| 126 | + public long getEt() { | ||
| 127 | + return et; | ||
| 128 | + } | ||
| 129 | + | ||
| 130 | + public void setEt(long et) { | ||
| 131 | + this.et = et; | ||
| 132 | + } | ||
| 133 | + | ||
| 134 | + public String getLocations() { | ||
| 135 | + return locations; | ||
| 136 | + } | ||
| 137 | + | ||
| 138 | + public void setLocations(String locations) { | ||
| 139 | + this.locations = locations; | ||
| 140 | + } | ||
| 141 | + | ||
| 142 | + public String getAbnormalType() { | ||
| 143 | + return abnormalType; | ||
| 144 | + } | ||
| 145 | + | ||
| 146 | + public void setAbnormalType(String abnormalType) { | ||
| 147 | + this.abnormalType = abnormalType; | ||
| 148 | + } | ||
| 149 | + | ||
| 150 | + public String getSectionName() { | ||
| 151 | + return sectionName; | ||
| 152 | + } | ||
| 153 | + | ||
| 154 | + public void setSectionName(String sectionName) { | ||
| 155 | + this.sectionName = sectionName; | ||
| 156 | + } | ||
| 157 | +} |
src/main/java/com/bsth/service/gps/entity/GpsSpeed_DTO.java
| 1 | -package com.bsth.service.gps.entity; | ||
| 2 | - | ||
| 3 | -import com.alibaba.fastjson.JSON; | ||
| 4 | -import com.alibaba.fastjson.JSONObject; | ||
| 5 | -import com.bsth.data.BasicData; | ||
| 6 | - | ||
| 7 | -import java.util.*; | ||
| 8 | - | ||
| 9 | -/** | ||
| 10 | - * 超速异常 dto | ||
| 11 | - * Created by panzhao on 2017/4/7. | ||
| 12 | - */ | ||
| 13 | -public class GpsSpeed_DTO { | ||
| 14 | - | ||
| 15 | - public static List<GpsSpeed_DTO> create(List<Map<String, Object>> mapList){ | ||
| 16 | - //默认都是一辆车的数据 | ||
| 17 | - List<GpsSpeed> list = JSONObject.parseArray(JSON.toJSONString(mapList), GpsSpeed.class); | ||
| 18 | - GpsSpeed gs; | ||
| 19 | - //排序 | ||
| 20 | - Collections.sort(list, new Comparator<GpsSpeed>() { | ||
| 21 | - @Override | ||
| 22 | - public int compare(GpsSpeed o1, GpsSpeed o2) { | ||
| 23 | - return (int) (o1.getTimestamp() - o2.getTimestamp()); | ||
| 24 | - } | ||
| 25 | - }); | ||
| 26 | - | ||
| 27 | - int space = 1000 * 60; | ||
| 28 | - int size = list.size(); | ||
| 29 | - | ||
| 30 | - List<GpsSpeed_DTO> rsList = new ArrayList<>(); | ||
| 31 | - GpsSpeed_DTO dto = null; | ||
| 32 | - | ||
| 33 | - for(int i = 0; i < size; i++){ | ||
| 34 | - gs = list.get(i); | ||
| 35 | - if(dto == null){ | ||
| 36 | - dto = new GpsSpeed_DTO(); | ||
| 37 | - dto.setDeviceId(gs.getVehicle()); | ||
| 38 | - dto.setNbbm(BasicData.deviceId2NbbmMap.get(gs.getVehicle())); | ||
| 39 | - dto.setSt(gs.getTimestamp()); | ||
| 40 | - dto.setSpeed(gs.getSpeed()); | ||
| 41 | - } | ||
| 42 | - else{ | ||
| 43 | - //超速结束 | ||
| 44 | - if((i < size - 1 && list.get(i + 1).getTimestamp() - gs.getTimestamp() > space)){ | ||
| 45 | - dto.setEt(gs.getTimestamp()); | ||
| 46 | - rsList.add(dto); | ||
| 47 | - dto = null; | ||
| 48 | - continue; | ||
| 49 | - } | ||
| 50 | - | ||
| 51 | - //记录最大速度 | ||
| 52 | - if(gs.getSpeed() > dto.getSpeed()) | ||
| 53 | - dto.setSpeed(gs.getSpeed()); | ||
| 54 | - | ||
| 55 | - if(i == size - 1) | ||
| 56 | - rsList.add(dto); | ||
| 57 | - } | ||
| 58 | - } | ||
| 59 | - return rsList; | ||
| 60 | - } | ||
| 61 | - | ||
| 62 | - /** | ||
| 63 | - * 设备号 | ||
| 64 | - */ | ||
| 65 | - private String deviceId; | ||
| 66 | - | ||
| 67 | - /** | ||
| 68 | - * 自编号 | ||
| 69 | - */ | ||
| 70 | - private String nbbm; | ||
| 71 | - | ||
| 72 | - /** | ||
| 73 | - * 超速开始时间 | ||
| 74 | - */ | ||
| 75 | - private long st; | ||
| 76 | - | ||
| 77 | - /** | ||
| 78 | - * 超速结束时间 | ||
| 79 | - */ | ||
| 80 | - private long et; | ||
| 81 | - | ||
| 82 | - /** | ||
| 83 | - * 速度 | ||
| 84 | - */ | ||
| 85 | - private float speed; | ||
| 86 | - | ||
| 87 | - /** | ||
| 88 | - * 所在路段 | ||
| 89 | - */ | ||
| 90 | - private String sectionName; | ||
| 91 | - | ||
| 92 | - private String abnormalType = "speed"; | ||
| 93 | - | ||
| 94 | - public String getDeviceId() { | ||
| 95 | - return deviceId; | ||
| 96 | - } | ||
| 97 | - | ||
| 98 | - public void setDeviceId(String deviceId) { | ||
| 99 | - this.deviceId = deviceId; | ||
| 100 | - } | ||
| 101 | - | ||
| 102 | - public String getNbbm() { | ||
| 103 | - return nbbm; | ||
| 104 | - } | ||
| 105 | - | ||
| 106 | - public void setNbbm(String nbbm) { | ||
| 107 | - this.nbbm = nbbm; | ||
| 108 | - } | ||
| 109 | - | ||
| 110 | - public long getSt() { | ||
| 111 | - return st; | ||
| 112 | - } | ||
| 113 | - | ||
| 114 | - public void setSt(long st) { | ||
| 115 | - this.st = st; | ||
| 116 | - } | ||
| 117 | - | ||
| 118 | - public long getEt() { | ||
| 119 | - return et; | ||
| 120 | - } | ||
| 121 | - | ||
| 122 | - public void setEt(long et) { | ||
| 123 | - this.et = et; | ||
| 124 | - } | ||
| 125 | - | ||
| 126 | - public float getSpeed() { | ||
| 127 | - return speed; | ||
| 128 | - } | ||
| 129 | - | ||
| 130 | - public void setSpeed(float speed) { | ||
| 131 | - this.speed = speed; | ||
| 132 | - } | ||
| 133 | - | ||
| 134 | - public String getAbnormalType() { | ||
| 135 | - return abnormalType; | ||
| 136 | - } | ||
| 137 | - | ||
| 138 | - public void setAbnormalType(String abnormalType) { | ||
| 139 | - this.abnormalType = abnormalType; | ||
| 140 | - } | ||
| 141 | - | ||
| 142 | - public String getSectionName() { | ||
| 143 | - return sectionName; | ||
| 144 | - } | ||
| 145 | - | ||
| 146 | - public void setSectionName(String sectionName) { | ||
| 147 | - this.sectionName = sectionName; | ||
| 148 | - } | ||
| 149 | -} | 1 | +package com.bsth.service.gps.entity; |
| 2 | + | ||
| 3 | +import com.alibaba.fastjson.JSON; | ||
| 4 | +import com.alibaba.fastjson.JSONObject; | ||
| 5 | +import com.bsth.data.BasicData; | ||
| 6 | + | ||
| 7 | +import java.util.*; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * 超速异常 dto | ||
| 11 | + * Created by panzhao on 2017/4/7. | ||
| 12 | + */ | ||
| 13 | +public class GpsSpeed_DTO { | ||
| 14 | + | ||
| 15 | + public static List<GpsSpeed_DTO> create(List<Map<String, Object>> mapList){ | ||
| 16 | + //默认都是一辆车的数据 | ||
| 17 | + List<GpsSpeed> list = JSONObject.parseArray(JSON.toJSONString(mapList), GpsSpeed.class); | ||
| 18 | + GpsSpeed gs; | ||
| 19 | + //排序 | ||
| 20 | + Collections.sort(list, new Comparator<GpsSpeed>() { | ||
| 21 | + @Override | ||
| 22 | + public int compare(GpsSpeed o1, GpsSpeed o2) { | ||
| 23 | + return (int) (o1.getTimestamp() - o2.getTimestamp()); | ||
| 24 | + } | ||
| 25 | + }); | ||
| 26 | + | ||
| 27 | + int space = 1000 * 15; | ||
| 28 | + int size = list.size(); | ||
| 29 | + | ||
| 30 | + List<GpsSpeed_DTO> rsList = new ArrayList<>(); | ||
| 31 | + GpsSpeed_DTO dto = null; | ||
| 32 | + | ||
| 33 | + for (int i = 0; i < size; i++) { | ||
| 34 | + gs = list.get(i); | ||
| 35 | + if (dto == null) { | ||
| 36 | + dto = new GpsSpeed_DTO(); | ||
| 37 | + dto.setDeviceId(gs.getVehicle()); | ||
| 38 | + dto.setNbbm(BasicData.deviceId2NbbmMap.get(gs.getVehicle())); | ||
| 39 | + dto.setSt(gs.getTimestamp()); | ||
| 40 | + dto.setSpeed(gs.getSpeed()); | ||
| 41 | + } else { | ||
| 42 | + if (dto.getEt() == 0) { | ||
| 43 | + if (gs.getTimestamp() - dto.getSt() > space) { | ||
| 44 | + dto = null; | ||
| 45 | + } | ||
| 46 | + } else { | ||
| 47 | + if (gs.getTimestamp() - dto.getEt() > space) { | ||
| 48 | + if (dto.getSt() != dto.getEt()) { | ||
| 49 | + rsList.add(dto); | ||
| 50 | + } | ||
| 51 | + dto = null; | ||
| 52 | + continue; | ||
| 53 | + } else { | ||
| 54 | + dto.setEt(gs.getTimestamp()); | ||
| 55 | + } | ||
| 56 | + } | ||
| 57 | + | ||
| 58 | + //记录最大速度 | ||
| 59 | + if (gs.getSpeed() > dto.getSpeed()) | ||
| 60 | + dto.setSpeed(gs.getSpeed()); | ||
| 61 | + | ||
| 62 | + if (i == size - 1 && dto.getEt() > 0 && dto.getSt() != dto.getEt()) | ||
| 63 | + rsList.add(dto); | ||
| 64 | + } | ||
| 65 | + } | ||
| 66 | + return rsList; | ||
| 67 | + } | ||
| 68 | + | ||
| 69 | + /** | ||
| 70 | + * 设备号 | ||
| 71 | + */ | ||
| 72 | + private String deviceId; | ||
| 73 | + | ||
| 74 | + /** | ||
| 75 | + * 自编号 | ||
| 76 | + */ | ||
| 77 | + private String nbbm; | ||
| 78 | + | ||
| 79 | + /** | ||
| 80 | + * 超速开始时间 | ||
| 81 | + */ | ||
| 82 | + private long st; | ||
| 83 | + | ||
| 84 | + /** | ||
| 85 | + * 超速结束时间 | ||
| 86 | + */ | ||
| 87 | + private long et; | ||
| 88 | + | ||
| 89 | + /** | ||
| 90 | + * 速度 | ||
| 91 | + */ | ||
| 92 | + private float speed; | ||
| 93 | + | ||
| 94 | + /** | ||
| 95 | + * 所在路段 | ||
| 96 | + */ | ||
| 97 | + private String sectionName; | ||
| 98 | + | ||
| 99 | + private String abnormalType = "speed"; | ||
| 100 | + | ||
| 101 | + public String getDeviceId() { | ||
| 102 | + return deviceId; | ||
| 103 | + } | ||
| 104 | + | ||
| 105 | + public void setDeviceId(String deviceId) { | ||
| 106 | + this.deviceId = deviceId; | ||
| 107 | + } | ||
| 108 | + | ||
| 109 | + public String getNbbm() { | ||
| 110 | + return nbbm; | ||
| 111 | + } | ||
| 112 | + | ||
| 113 | + public void setNbbm(String nbbm) { | ||
| 114 | + this.nbbm = nbbm; | ||
| 115 | + } | ||
| 116 | + | ||
| 117 | + public long getSt() { | ||
| 118 | + return st; | ||
| 119 | + } | ||
| 120 | + | ||
| 121 | + public void setSt(long st) { | ||
| 122 | + this.st = st; | ||
| 123 | + } | ||
| 124 | + | ||
| 125 | + public long getEt() { | ||
| 126 | + return et; | ||
| 127 | + } | ||
| 128 | + | ||
| 129 | + public void setEt(long et) { | ||
| 130 | + this.et = et; | ||
| 131 | + } | ||
| 132 | + | ||
| 133 | + public float getSpeed() { | ||
| 134 | + return speed; | ||
| 135 | + } | ||
| 136 | + | ||
| 137 | + public void setSpeed(float speed) { | ||
| 138 | + this.speed = speed; | ||
| 139 | + } | ||
| 140 | + | ||
| 141 | + public String getAbnormalType() { | ||
| 142 | + return abnormalType; | ||
| 143 | + } | ||
| 144 | + | ||
| 145 | + public void setAbnormalType(String abnormalType) { | ||
| 146 | + this.abnormalType = abnormalType; | ||
| 147 | + } | ||
| 148 | + | ||
| 149 | + public String getSectionName() { | ||
| 150 | + return sectionName; | ||
| 151 | + } | ||
| 152 | + | ||
| 153 | + public void setSectionName(String sectionName) { | ||
| 154 | + this.sectionName = sectionName; | ||
| 155 | + } | ||
| 156 | +} |
src/main/java/com/bsth/service/realcontrol/GpsMileageService.java
0 → 100644
src/main/java/com/bsth/service/realcontrol/impl/GpsMileageServiceImpl.java
0 → 100644
| 1 | +package com.bsth.service.realcontrol.impl; | ||
| 2 | + | ||
| 3 | +import com.bsth.entity.realcontrol.GpsMileage; | ||
| 4 | +import com.bsth.service.impl.BaseServiceImpl; | ||
| 5 | +import com.bsth.service.realcontrol.GpsMileageService; | ||
| 6 | +import org.springframework.stereotype.Service; | ||
| 7 | + | ||
| 8 | +@Service | ||
| 9 | +public class GpsMileageServiceImpl extends BaseServiceImpl<GpsMileage, Long> implements GpsMileageService { | ||
| 10 | +} |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| @@ -11,24 +11,14 @@ import java.sql.SQLException; | @@ -11,24 +11,14 @@ import java.sql.SQLException; | ||
| 11 | import java.text.DecimalFormat; | 11 | import java.text.DecimalFormat; |
| 12 | import java.text.ParseException; | 12 | import java.text.ParseException; |
| 13 | import java.text.SimpleDateFormat; | 13 | import java.text.SimpleDateFormat; |
| 14 | -import java.util.ArrayList; | ||
| 15 | -import java.util.Calendar; | ||
| 16 | -import java.util.Collection; | ||
| 17 | -import java.util.Collections; | ||
| 18 | -import java.util.Comparator; | ||
| 19 | -import java.util.Date; | ||
| 20 | -import java.util.GregorianCalendar; | ||
| 21 | -import java.util.HashMap; | ||
| 22 | -import java.util.HashSet; | ||
| 23 | -import java.util.Iterator; | ||
| 24 | -import java.util.List; | ||
| 25 | -import java.util.Map; | ||
| 26 | -import java.util.Queue; | ||
| 27 | -import java.util.Set; | 14 | +import java.util.*; |
| 28 | import java.util.concurrent.*; | 15 | import java.util.concurrent.*; |
| 29 | import java.util.regex.Pattern; | 16 | import java.util.regex.Pattern; |
| 30 | 17 | ||
| 31 | import com.bsth.entity.*; | 18 | import com.bsth.entity.*; |
| 19 | +import com.bsth.entity.realcontrol.*; | ||
| 20 | +import com.bsth.entity.search.CustomerSpecs; | ||
| 21 | +import com.bsth.repository.realcontrol.GpsMileageRepository; | ||
| 32 | import com.bsth.util.*; | 22 | import com.bsth.util.*; |
| 33 | import com.bsth.data.SystemParamCache; | 23 | import com.bsth.data.SystemParamCache; |
| 34 | import org.apache.commons.io.IOUtils; | 24 | import org.apache.commons.io.IOUtils; |
| @@ -75,10 +65,6 @@ import com.bsth.entity.oil.Dlb; | @@ -75,10 +65,6 @@ import com.bsth.entity.oil.Dlb; | ||
| 75 | import com.bsth.entity.oil.Qlb; | 65 | import com.bsth.entity.oil.Qlb; |
| 76 | import com.bsth.entity.oil.Ylb; | 66 | import com.bsth.entity.oil.Ylb; |
| 77 | import com.bsth.entity.oil.Ylxxb; | 67 | import com.bsth.entity.oil.Ylxxb; |
| 78 | -import com.bsth.entity.realcontrol.ChildTaskPlan; | ||
| 79 | -import com.bsth.entity.realcontrol.LineConfig; | ||
| 80 | -import com.bsth.entity.realcontrol.ScheduleRealInfo; | ||
| 81 | -import com.bsth.entity.realcontrol.SvgAttribute; | ||
| 82 | import com.bsth.entity.report.MileageReport; | 68 | import com.bsth.entity.report.MileageReport; |
| 83 | import com.bsth.entity.report.RepairReport; | 69 | import com.bsth.entity.report.RepairReport; |
| 84 | import com.bsth.entity.report.ScheduleCorrectionReport; | 70 | import com.bsth.entity.report.ScheduleCorrectionReport; |
| @@ -224,6 +210,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -224,6 +210,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 224 | @Autowired | 210 | @Autowired |
| 225 | RepairReportRepository repairReportRepository; | 211 | RepairReportRepository repairReportRepository; |
| 226 | 212 | ||
| 213 | + @Autowired | ||
| 214 | + private GpsMileageRepository gpsMileageRepository; | ||
| 215 | + | ||
| 227 | private final static Logger logger = LoggerFactory.getLogger(ScheduleRealInfoServiceImpl.class); | 216 | private final static Logger logger = LoggerFactory.getLogger(ScheduleRealInfoServiceImpl.class); |
| 228 | 217 | ||
| 229 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | 218 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), |
| @@ -2094,6 +2083,16 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2094,6 +2083,16 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2094 | String lpName, String date, String line) { | 2083 | String lpName, String date, String line) { |
| 2095 | Map<String, Object> map = new HashMap<String, Object>(); | 2084 | Map<String, Object> map = new HashMap<String, Object>(); |
| 2096 | List<ScheduleRealInfo> list = scheduleRealInfoRepository.queryListWaybillXcld(jGh, clZbh, lpName, date, line); | 2085 | List<ScheduleRealInfo> list = scheduleRealInfoRepository.queryListWaybillXcld(jGh, clZbh, lpName, date, line); |
| 2086 | + Map<String, Object> params = new LinkedHashMap<>(); | ||
| 2087 | + params.put("rq_eq", date); | ||
| 2088 | + params.put("clZbh_eq", clZbh); | ||
| 2089 | + params.put("lineCode_eq", line); | ||
| 2090 | + GpsMileage gpsMileage = null; | ||
| 2091 | + try { | ||
| 2092 | + gpsMileage = gpsMileageRepository.findOne(new CustomerSpecs<>(params)).get(); | ||
| 2093 | + } catch (Exception e) { | ||
| 2094 | + logger.error("", e); | ||
| 2095 | + } | ||
| 2097 | List<ScheduleRealInfo> lists = new ArrayList<ScheduleRealInfo>(); | 2096 | List<ScheduleRealInfo> lists = new ArrayList<ScheduleRealInfo>(); |
| 2098 | for (int i = 0; i < list.size(); i++) { | 2097 | for (int i = 0; i < list.size(); i++) { |
| 2099 | ScheduleRealInfo s = list.get(i); | 2098 | ScheduleRealInfo s = list.get(i); |
| @@ -2120,6 +2119,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2120,6 +2119,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2120 | map.put("ksgl", ksgl);//空驶公里 | 2119 | map.put("ksgl", ksgl);//空驶公里 |
| 2121 | double sjgl = culateService.culateSjgl(lists);//实际营运公里 | 2120 | double sjgl = culateService.culateSjgl(lists);//实际营运公里 |
| 2122 | map.put("realMileage", Arith.add(Arith.add(ksgl, jccgl), Arith.add(sjgl, ljgl)));//总公里 | 2121 | map.put("realMileage", Arith.add(Arith.add(ksgl, jccgl), Arith.add(sjgl, ljgl)));//总公里 |
| 2122 | + map.put("realGpsMileage", gpsMileage == null ? 0 : gpsMileage.getMileage());//总公里 | ||
| 2123 | map.put("zkslc", Arith.add(ksgl, jccgl)); | 2123 | map.put("zkslc", Arith.add(ksgl, jccgl)); |
| 2124 | map.put("jcclc", jccgl); | 2124 | map.put("jcclc", jccgl); |
| 2125 | map.put("yygl", Arith.add(sjgl, ljgl)); //总营运公里 | 2125 | map.put("yygl", Arith.add(sjgl, ljgl)); //总营运公里 |
src/main/resources/application-cloud.properties
| @@ -13,10 +13,10 @@ spring.jpa.show-sql= false | @@ -13,10 +13,10 @@ spring.jpa.show-sql= false | ||
| 13 | spring.jpa.properties.hibernate.dialect= org.hibernate.spatial.dialect.mysql.MySQL56InnoDBSpatialDialect | 13 | spring.jpa.properties.hibernate.dialect= org.hibernate.spatial.dialect.mysql.MySQL56InnoDBSpatialDialect |
| 14 | 14 | ||
| 15 | #DATABASE control | 15 | #DATABASE control |
| 16 | -spring.datasource.control.driver-class-name= com.mysql.jdbc.Driver | ||
| 17 | -spring.datasource.control.jdbc-url= jdbc:mysql://10.10.2.20/control_dy?useUnicode=true&characterEncoding=utf-8&useSSL=false | ||
| 18 | -spring.datasource.control.username= root | ||
| 19 | -spring.datasource.control.password= root2jsp | 16 | +spring.datasource.control.driver-class-name= com.mysql.cj.jdbc.Driver |
| 17 | +spring.datasource.control.jdbc-url= jdbc:mysql://127.0.0.1/control_dy?useUnicode=true&characterEncoding=utf-8&useSSL=false | ||
| 18 | +spring.datasource.control.username= schedule | ||
| 19 | +spring.datasource.control.password= fsodlgjiuigAQF2$9fs9 | ||
| 20 | spring.datasource.control.type= com.zaxxer.hikari.HikariDataSource | 20 | spring.datasource.control.type= com.zaxxer.hikari.HikariDataSource |
| 21 | #DATASOURCE | 21 | #DATASOURCE |
| 22 | spring.datasource.control.minimum-idle= 8 | 22 | spring.datasource.control.minimum-idle= 8 |
| @@ -26,15 +26,14 @@ spring.datasource.control.idle-timeout= 60000 | @@ -26,15 +26,14 @@ spring.datasource.control.idle-timeout= 60000 | ||
| 26 | #spring.datasource.control.pool-name= HikariPool | 26 | #spring.datasource.control.pool-name= HikariPool |
| 27 | spring.datasource.control.max-lifetime= 1800000 | 27 | spring.datasource.control.max-lifetime= 1800000 |
| 28 | spring.datasource.control.connection-timeout= 3000 | 28 | spring.datasource.control.connection-timeout= 3000 |
| 29 | -spring.datasource.control.connection-test-query= SELECT 1 | ||
| 30 | spring.datasource.control.validation-timeout= 3000 | 29 | spring.datasource.control.validation-timeout= 3000 |
| 31 | spring.datasource.control.register-mbeans=false | 30 | spring.datasource.control.register-mbeans=false |
| 32 | 31 | ||
| 33 | #DATABASE info-publish | 32 | #DATABASE info-publish |
| 34 | -spring.datasource.info-publish.driver-class-name= com.mysql.jdbc.Driver | ||
| 35 | -spring.datasource.info-publish.jdbc-url= jdbc:mysql://10.10.2.20/info_publish?rewriteBatchedStatements=true&useUnicode=true&characterEncoding=utf-8&useSSL=false | ||
| 36 | -spring.datasource.info-publish.username= root | ||
| 37 | -spring.datasource.info-publish.password= root2jsp | 33 | +spring.datasource.info-publish.driver-class-name= com.mysql.cj.jdbc.Driver |
| 34 | +spring.datasource.info-publish.jdbc-url= jdbc:mysql://127.0.0.1/info_publish?rewriteBatchedStatements=true&useUnicode=true&characterEncoding=utf-8&useSSL=false | ||
| 35 | +spring.datasource.info-publish.username= schedule | ||
| 36 | +spring.datasource.info-publish.password= fsodlgjiuigAQF2$9fs9 | ||
| 38 | spring.datasource.info-publish.type= com.zaxxer.hikari.HikariDataSource | 37 | spring.datasource.info-publish.type= com.zaxxer.hikari.HikariDataSource |
| 39 | #DATASOURCE | 38 | #DATASOURCE |
| 40 | spring.datasource.info-publish.minimum-idle= 8 | 39 | spring.datasource.info-publish.minimum-idle= 8 |
| @@ -44,15 +43,14 @@ spring.datasource.info-publish.idle-timeout= 60000 | @@ -44,15 +43,14 @@ spring.datasource.info-publish.idle-timeout= 60000 | ||
| 44 | #spring.datasource.info-publish.pool-name= HikariPool | 43 | #spring.datasource.info-publish.pool-name= HikariPool |
| 45 | spring.datasource.info-publish.max-lifetime= 1800000 | 44 | spring.datasource.info-publish.max-lifetime= 1800000 |
| 46 | spring.datasource.info-publish.connection-timeout= 3000 | 45 | spring.datasource.info-publish.connection-timeout= 3000 |
| 47 | -spring.datasource.info-publish.connection-test-query= SELECT 1 | ||
| 48 | spring.datasource.info-publish.validation-timeout= 3000 | 46 | spring.datasource.info-publish.validation-timeout= 3000 |
| 49 | spring.datasource.info-publish.register-mbeans=false | 47 | spring.datasource.info-publish.register-mbeans=false |
| 50 | 48 | ||
| 51 | #DATABASE ms | 49 | #DATABASE ms |
| 52 | -spring.datasource.ms.driver-class-name= com.mysql.jdbc.Driver | ||
| 53 | -spring.datasource.ms.jdbc-url= jdbc:mysql://10.10.2.20/ms?rewriteBatchedStatements=true&useUnicode=true&characterEncoding=utf-8&useSSL=false | ||
| 54 | -spring.datasource.ms.username= root | ||
| 55 | -spring.datasource.ms.password= root2jsp | 50 | +spring.datasource.ms.driver-class-name= com.mysql.cj.jdbc.Driver |
| 51 | +spring.datasource.ms.jdbc-url= jdbc:mysql://127.0.0.1/ms?rewriteBatchedStatements=true&useUnicode=true&characterEncoding=utf-8&useSSL=false | ||
| 52 | +spring.datasource.ms.username= schedule | ||
| 53 | +spring.datasource.ms.password= fsodlgjiuigAQF2$9fs9 | ||
| 56 | spring.datasource.ms.type= com.zaxxer.hikari.HikariDataSource | 54 | spring.datasource.ms.type= com.zaxxer.hikari.HikariDataSource |
| 57 | #DATASOURCE | 55 | #DATASOURCE |
| 58 | spring.datasource.ms.minimum-idle= 8 | 56 | spring.datasource.ms.minimum-idle= 8 |
| @@ -62,7 +60,6 @@ spring.datasource.ms.idle-timeout= 60000 | @@ -62,7 +60,6 @@ spring.datasource.ms.idle-timeout= 60000 | ||
| 62 | #spring.datasource.ms.pool-name= HikariPool | 60 | #spring.datasource.ms.pool-name= HikariPool |
| 63 | spring.datasource.ms.max-lifetime= 1800000 | 61 | spring.datasource.ms.max-lifetime= 1800000 |
| 64 | spring.datasource.ms.connection-timeout= 3000 | 62 | spring.datasource.ms.connection-timeout= 3000 |
| 65 | -spring.datasource.ms.connection-test-query= SELECT 1 | ||
| 66 | spring.datasource.ms.validation-timeout= 3000 | 63 | spring.datasource.ms.validation-timeout= 3000 |
| 67 | spring.datasource.ms.register-mbeans=false | 64 | spring.datasource.ms.register-mbeans=false |
| 68 | 65 |
src/main/resources/application-dev.properties
| @@ -9,14 +9,14 @@ spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.Im | @@ -9,14 +9,14 @@ spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.Im | ||
| 9 | spring.jpa.hibernate.naming.physical-strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy | 9 | spring.jpa.hibernate.naming.physical-strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy |
| 10 | spring.jpa.database= MYSQL | 10 | spring.jpa.database= MYSQL |
| 11 | spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true | 11 | spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true |
| 12 | -spring.jpa.show-sql= true | 12 | +spring.jpa.show-sql= false |
| 13 | spring.jpa.properties.hibernate.dialect= org.hibernate.spatial.dialect.mysql.MySQL56InnoDBSpatialDialect | 13 | spring.jpa.properties.hibernate.dialect= org.hibernate.spatial.dialect.mysql.MySQL56InnoDBSpatialDialect |
| 14 | 14 | ||
| 15 | #DATABASE control | 15 | #DATABASE control |
| 16 | -spring.datasource.control.driver-class-name= com.mysql.jdbc.Driver | ||
| 17 | -spring.datasource.control.jdbc-url= jdbc:mysql://192.168.168.152/control_dy?useUnicode=true&characterEncoding=utf-8&useSSL=false | ||
| 18 | -spring.datasource.control.username= root | ||
| 19 | -spring.datasource.control.password= root2jsp | 16 | +spring.datasource.control.driver-class-name= com.mysql.cj.jdbc.Driver |
| 17 | +spring.datasource.control.jdbc-url= jdbc:mysql://10.10.2.19/control_dy?useUnicode=true&characterEncoding=utf-8&useSSL=false | ||
| 18 | +spring.datasource.control.username= schedule | ||
| 19 | +spring.datasource.control.password= fsodlgjiuigAQF2$9fs9 | ||
| 20 | spring.datasource.control.type= com.zaxxer.hikari.HikariDataSource | 20 | spring.datasource.control.type= com.zaxxer.hikari.HikariDataSource |
| 21 | #DATASOURCE | 21 | #DATASOURCE |
| 22 | spring.datasource.control.minimum-idle= 8 | 22 | spring.datasource.control.minimum-idle= 8 |
| @@ -26,12 +26,11 @@ spring.datasource.control.idle-timeout= 60000 | @@ -26,12 +26,11 @@ spring.datasource.control.idle-timeout= 60000 | ||
| 26 | #spring.datasource.control.pool-name= HikariPool | 26 | #spring.datasource.control.pool-name= HikariPool |
| 27 | spring.datasource.control.max-lifetime= 1800000 | 27 | spring.datasource.control.max-lifetime= 1800000 |
| 28 | spring.datasource.control.connection-timeout= 3000 | 28 | spring.datasource.control.connection-timeout= 3000 |
| 29 | -spring.datasource.control.connection-test-query= SELECT 1 | ||
| 30 | spring.datasource.control.validation-timeout= 3000 | 29 | spring.datasource.control.validation-timeout= 3000 |
| 31 | spring.datasource.control.register-mbeans=false | 30 | spring.datasource.control.register-mbeans=false |
| 32 | 31 | ||
| 33 | #DATABASE info-publish | 32 | #DATABASE info-publish |
| 34 | -spring.datasource.info-publish.driver-class-name= com.mysql.jdbc.Driver | 33 | +spring.datasource.info-publish.driver-class-name= com.mysql.cj.jdbc.Driver |
| 35 | spring.datasource.info-publish.jdbc-url= jdbc:mysql://10.10.2.20/info_publish?rewriteBatchedStatements=true&useUnicode=true&characterEncoding=utf-8&useSSL=false | 34 | spring.datasource.info-publish.jdbc-url= jdbc:mysql://10.10.2.20/info_publish?rewriteBatchedStatements=true&useUnicode=true&characterEncoding=utf-8&useSSL=false |
| 36 | spring.datasource.info-publish.username= root | 35 | spring.datasource.info-publish.username= root |
| 37 | spring.datasource.info-publish.password= root2jsp | 36 | spring.datasource.info-publish.password= root2jsp |
| @@ -44,13 +43,12 @@ spring.datasource.info-publish.idle-timeout= 60000 | @@ -44,13 +43,12 @@ spring.datasource.info-publish.idle-timeout= 60000 | ||
| 44 | #spring.datasource.info-publish.pool-name= HikariPool | 43 | #spring.datasource.info-publish.pool-name= HikariPool |
| 45 | spring.datasource.info-publish.max-lifetime= 1800000 | 44 | spring.datasource.info-publish.max-lifetime= 1800000 |
| 46 | spring.datasource.info-publish.connection-timeout= 3000 | 45 | spring.datasource.info-publish.connection-timeout= 3000 |
| 47 | -spring.datasource.info-publish.connection-test-query= SELECT 1 | ||
| 48 | spring.datasource.info-publish.validation-timeout= 3000 | 46 | spring.datasource.info-publish.validation-timeout= 3000 |
| 49 | spring.datasource.info-publish.register-mbeans=false | 47 | spring.datasource.info-publish.register-mbeans=false |
| 50 | 48 | ||
| 51 | #DATABASE ms | 49 | #DATABASE ms |
| 52 | -spring.datasource.ms.driver-class-name= com.mysql.jdbc.Driver | ||
| 53 | -spring.datasource.ms.jdbc-url= jdbc:mysql://192.168.168.152/ms?rewriteBatchedStatements=true&useUnicode=true&characterEncoding=utf-8&useSSL=false | 50 | +spring.datasource.ms.driver-class-name= com.mysql.cj.jdbc.Driver |
| 51 | +spring.datasource.ms.jdbc-url= jdbc:mysql://10.10.2.20/ms?rewriteBatchedStatements=true&useUnicode=true&characterEncoding=utf-8&useSSL=false | ||
| 54 | spring.datasource.ms.username= root | 52 | spring.datasource.ms.username= root |
| 55 | spring.datasource.ms.password= root2jsp | 53 | spring.datasource.ms.password= root2jsp |
| 56 | spring.datasource.ms.type= com.zaxxer.hikari.HikariDataSource | 54 | spring.datasource.ms.type= com.zaxxer.hikari.HikariDataSource |
| @@ -61,9 +59,8 @@ spring.datasource.ms.maximum-pool-size= 16 | @@ -61,9 +59,8 @@ spring.datasource.ms.maximum-pool-size= 16 | ||
| 61 | spring.datasource.ms.idle-timeout= 60000 | 59 | spring.datasource.ms.idle-timeout= 60000 |
| 62 | #spring.datasource.ms.pool-name= HikariPool | 60 | #spring.datasource.ms.pool-name= HikariPool |
| 63 | spring.datasource.ms.max-lifetime= 1800000 | 61 | spring.datasource.ms.max-lifetime= 1800000 |
| 64 | -spring.datasource.ms.connection-timeout= 3000 | ||
| 65 | -spring.datasource.ms.connection-test-query= SELECT 1 | ||
| 66 | -spring.datasource.ms.validation-timeout= 3000 | 62 | +spring.datasource.ms.connection-timeout= 30000 |
| 63 | +spring.datasource.ms.validation-timeout= 30000 | ||
| 67 | spring.datasource.ms.register-mbeans=false | 64 | spring.datasource.ms.register-mbeans=false |
| 68 | 65 | ||
| 69 | kafka.use= false | 66 | kafka.use= false |
src/main/resources/application-test.properties
| @@ -13,7 +13,7 @@ spring.jpa.show-sql= false | @@ -13,7 +13,7 @@ spring.jpa.show-sql= false | ||
| 13 | spring.jpa.properties.hibernate.dialect= org.hibernate.spatial.dialect.mysql.MySQL56InnoDBSpatialDialect | 13 | spring.jpa.properties.hibernate.dialect= org.hibernate.spatial.dialect.mysql.MySQL56InnoDBSpatialDialect |
| 14 | 14 | ||
| 15 | #DATABASE control | 15 | #DATABASE control |
| 16 | -spring.datasource.control.driver-class-name= com.mysql.jdbc.Driver | 16 | +spring.datasource.control.driver-class-name= com.mysql.cj.jdbc.Driver |
| 17 | spring.datasource.control.jdbc-url= jdbc:mysql://10.10.2.200/control_dy?useUnicode=true&characterEncoding=utf-8&useSSL=false | 17 | spring.datasource.control.jdbc-url= jdbc:mysql://10.10.2.200/control_dy?useUnicode=true&characterEncoding=utf-8&useSSL=false |
| 18 | spring.datasource.control.username= root | 18 | spring.datasource.control.username= root |
| 19 | spring.datasource.control.password= root2jsp | 19 | spring.datasource.control.password= root2jsp |
| @@ -31,7 +31,7 @@ spring.datasource.control.hikari.validation-timeout= 3000 | @@ -31,7 +31,7 @@ spring.datasource.control.hikari.validation-timeout= 3000 | ||
| 31 | spring.datasource.control.hikari.register-mbeans=false | 31 | spring.datasource.control.hikari.register-mbeans=false |
| 32 | 32 | ||
| 33 | #DATABASE info-publish | 33 | #DATABASE info-publish |
| 34 | -spring.datasource.info-publish.driver-class-name= com.mysql.jdbc.Driver | 34 | +spring.datasource.info-publish.driver-class-name= com.mysql.cj.jdbc.Driver |
| 35 | spring.datasource.info-publish.jdbc-url= jdbc:mysql://10.10.2.200/info_publish?rewriteBatchedStatements=true&useUnicode=true&characterEncoding=utf-8&useSSL=false | 35 | spring.datasource.info-publish.jdbc-url= jdbc:mysql://10.10.2.200/info_publish?rewriteBatchedStatements=true&useUnicode=true&characterEncoding=utf-8&useSSL=false |
| 36 | spring.datasource.info-publish.username= root | 36 | spring.datasource.info-publish.username= root |
| 37 | spring.datasource.info-publish.password= root2jsp | 37 | spring.datasource.info-publish.password= root2jsp |
| @@ -49,7 +49,7 @@ spring.datasource.info-publish.hikari.validation-timeout= 3000 | @@ -49,7 +49,7 @@ spring.datasource.info-publish.hikari.validation-timeout= 3000 | ||
| 49 | spring.datasource.info-publish.hikari.register-mbeans=false | 49 | spring.datasource.info-publish.hikari.register-mbeans=false |
| 50 | 50 | ||
| 51 | #DATABASE ms | 51 | #DATABASE ms |
| 52 | -spring.datasource.ms.driver-class-name= com.mysql.jdbc.Driver | 52 | +spring.datasource.ms.driver-class-name= com.mysql.cj.jdbc.Driver |
| 53 | spring.datasource.ms.jdbc-url= jdbc:mysql://10.10.2.200/ms?rewriteBatchedStatements=true&useUnicode=true&characterEncoding=utf-8&useSSL=false | 53 | spring.datasource.ms.jdbc-url= jdbc:mysql://10.10.2.200/ms?rewriteBatchedStatements=true&useUnicode=true&characterEncoding=utf-8&useSSL=false |
| 54 | spring.datasource.ms.username= root | 54 | spring.datasource.ms.username= root |
| 55 | spring.datasource.ms.password= root2jsp | 55 | spring.datasource.ms.password= root2jsp |
src/main/resources/control-jdbc.properties
| 1 | -station.mysql.driver= com.mysql.jdbc.Driver | ||
| 2 | -station.mysql.url= jdbc:mysql://192.168.168.152/control?useUnicode=true&characterEncoding=utf-8&useSSL=false | 1 | +station.mysql.driver= com.mysql.cj.jdbc.Driver |
| 2 | +station.mysql.url= jdbc:mysql://127.0.0.1/control?useUnicode=true&characterEncoding=utf-8&useSSL=false | ||
| 3 | station.mysql.username= root | 3 | station.mysql.username= root |
| 4 | station.mysql.password= root2jsp | 4 | station.mysql.password= root2jsp |
| 5 | 5 | ||
| 6 | -#station.mysql.driver= com.mysql.jdbc.Driver | 6 | +#station.mysql.driver= com.mysql.cj.jdbc.Driver |
| 7 | #station.mysql.url= jdbc:mysql://10.10.200.121:3306/station?useUnicode=true&characterEncoding=utf-8 | 7 | #station.mysql.url= jdbc:mysql://10.10.200.121:3306/station?useUnicode=true&characterEncoding=utf-8 |
| 8 | #station.mysql.username= station | 8 | #station.mysql.username= station |
| 9 | #station.mysql.password= station@jsp | 9 | #station.mysql.password= station@jsp |
| 10 | 10 | ||
| 11 | -#station.mysql.driver= com.mysql.jdbc.Driver | 11 | +#station.mysql.driver= com.mysql.cj.jdbc.Driver |
| 12 | #station.mysql.url= jdbc:mysql://10.10.200.148:3306/station?useUnicode=true&characterEncoding=utf-8 | 12 | #station.mysql.url= jdbc:mysql://10.10.200.148:3306/station?useUnicode=true&characterEncoding=utf-8 |
| 13 | #station.mysql.username= station | 13 | #station.mysql.username= station |
| 14 | #station.mysql.password= station@jsp | 14 | #station.mysql.password= station@jsp |
src/main/resources/logback.xml
| @@ -179,7 +179,7 @@ | @@ -179,7 +179,7 @@ | ||
| 179 | <!--<appender name="MYDB" class="com.bsth.service.schedule.log.ModuleOperatorDbAppender">--> | 179 | <!--<appender name="MYDB" class="com.bsth.service.schedule.log.ModuleOperatorDbAppender">--> |
| 180 | <!--<connectionSource class="ch.qos.logback.core.db.DataSourceConnectionSource">--> | 180 | <!--<connectionSource class="ch.qos.logback.core.db.DataSourceConnectionSource">--> |
| 181 | <!--<dataSource class="org.apache.commons.dbcp.BasicDataSource">--> | 181 | <!--<dataSource class="org.apache.commons.dbcp.BasicDataSource">--> |
| 182 | - <!--<driverClassName>com.mysql.jdbc.Driver</driverClassName>--> | 182 | + <!--<driverClassName>com.mysql.cj.jdbc.Driver</driverClassName>--> |
| 183 | <!--<url>--> | 183 | <!--<url>--> |
| 184 | <!--<![CDATA[--> | 184 | <!--<![CDATA[--> |
| 185 | <!--jdbc:mysql://127.0.0.1/test_control?useUnicode=true&characterEncoding=utf-8&useSSL=false--> | 185 | <!--jdbc:mysql://127.0.0.1/test_control?useUnicode=true&characterEncoding=utf-8&useSSL=false--> |
| @@ -354,7 +354,7 @@ | @@ -354,7 +354,7 @@ | ||
| 354 | 354 | ||
| 355 | <!-- 日志输出级别 --> | 355 | <!-- 日志输出级别 --> |
| 356 | <root level="info"> | 356 | <root level="info"> |
| 357 | - <appender-ref ref="STDOUT" /> | 357 | +<!-- <appender-ref ref="STDOUT" />--> |
| 358 | <appender-ref ref="FILE" /> | 358 | <appender-ref ref="FILE" /> |
| 359 | </root> | 359 | </root> |
| 360 | </configuration> | 360 | </configuration> |
src/main/resources/ms-jdbc.properties
| 1 | -#ms.mysql.driver= com.mysql.jdbc.Driver | 1 | +#ms.mysql.driver= com.mysql.cj.jdbc.Driver |
| 2 | #ms.mysql.url= jdbc:mysql://192.168.168.201:3306/ms?useUnicode=true&characterEncoding=utf-8&useSSL=false | 2 | #ms.mysql.url= jdbc:mysql://192.168.168.201:3306/ms?useUnicode=true&characterEncoding=utf-8&useSSL=false |
| 3 | #ms.mysql.username= root | 3 | #ms.mysql.username= root |
| 4 | #ms.mysql.password= 123456 | 4 | #ms.mysql.password= 123456 |
| 5 | 5 | ||
| 6 | -ms.mysql.driver= com.mysql.jdbc.Driver | ||
| 7 | -ms.mysql.url= jdbc:mysql://10.10.2.20/ms?useUnicode=true&characterEncoding=utf-8&useSSL=false | ||
| 8 | -ms.mysql.username= root | ||
| 9 | -ms.mysql.password= root2jsp | ||
| 10 | \ No newline at end of file | 6 | \ No newline at end of file |
| 7 | +ms.mysql.driver= com.mysql.cj.jdbc.Driver | ||
| 8 | +ms.mysql.url= jdbc:mysql://127.0.0.1/ms?useUnicode=true&characterEncoding=utf-8&useSSL=false | ||
| 9 | +ms.mysql.username= schedule | ||
| 10 | +ms.mysql.password= fsodlgjiuigAQF2$9fs9 | ||
| 11 | \ No newline at end of file | 11 | \ No newline at end of file |
src/main/resources/static/pages/forms/statement/waybill.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; margin-left: 33px;" id="gsdmDiv_xcld"> | ||
| 31 | - <span class="item-label" style="width: 80px;">公司: </span> | ||
| 32 | - <select class="form-control" name="company" id="gsdmXcld" style="width: 180px;"></select> | ||
| 33 | - </div> | ||
| 34 | - <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_xcld"> | ||
| 35 | - <span class="item-label" style="width: 80px;">分公司: </span> | ||
| 36 | - <select class="form-control" name="subCompany" id="fgsdmXcld" style="width: 180px;"></select> | ||
| 37 | - </div> | ||
| 38 | - <div style="margin-top: 2px"></div> | ||
| 39 | - <div style="display: inline-block; margin-left: 33px;"> | ||
| 40 | - <span class="item-label" style="width: 80px;">线路: </span> | ||
| 41 | - <select class="form-control" name="line" id="line" style="width: 180px;"></select> | ||
| 42 | - </div> | ||
| 43 | - <div style="display: inline-block;margin-left: 24px;"> | ||
| 44 | - <span class="item-label" style="width: 80px;"> 时间: </span> | ||
| 45 | - <input class="form-control" type="text" id="date" style="width: 180px;"/> | ||
| 46 | - </div> | ||
| 47 | - <div class="form-group" style="display: inline-block;margin-left: 15px;"> | ||
| 48 | - <input class="btn btn-default" type="button" id="query" value="查询"/> | ||
| 49 | - <input class="btn btn-default" type="button" id="export" value="导出"/> | ||
| 50 | - <input class="btn btn-default" type="button" id="print" value="打印"/> | ||
| 51 | - <input class="btn btn-default" type="button" id="exportMore" value="批量导出"/> | ||
| 52 | - </div> | ||
| 53 | - </form> | ||
| 54 | - </div> | ||
| 55 | - <div class="portlet-body"> | ||
| 56 | - <div class="row"> | ||
| 57 | - <div class="col-md-3"> | ||
| 58 | - <div class="" id="left_height" style="margin-top: 10px;overflow:auto;"> | ||
| 59 | - <table class="table table-bordered table-hover table-checkable pre-scrollable" id="info"> | ||
| 60 | - <thead> | ||
| 61 | - <tr class="hidden"> | ||
| 62 | - <th class="rypx" style="cursor:pointer ">人员</th> | ||
| 63 | - <th class="zbhpx" style="cursor:pointer ">自编号</th> | ||
| 64 | - <th class="lppx" style="cursor:pointer ">路牌</th> | ||
| 65 | - </tr> | ||
| 66 | - </thead> | ||
| 67 | - <tbody> | ||
| 68 | - | ||
| 69 | - </tbody> | ||
| 70 | - </table> | ||
| 71 | - </div> | ||
| 72 | - </div> | ||
| 73 | - <div class="col-md-9" id="printArea"> | ||
| 74 | - <div class="table-container" id="xcld_height" style="margin-top: 10px;overflow:auto;min-width: 906px;"> | ||
| 75 | - <table class="table table-bordered table-checkable" id="forms"> | ||
| 76 | - <tbody class="ludan_1"> | ||
| 77 | - | ||
| 78 | - </tbody> | ||
| 79 | - <tbody class="ludan_2"> | ||
| 80 | - | ||
| 81 | - </tbody> | ||
| 82 | - <tbody class="ludan_3"> | ||
| 83 | - | ||
| 84 | - </tbody> | ||
| 85 | - <tbody class="ludan_4"> | ||
| 86 | - | ||
| 87 | - </tbody> | ||
| 88 | - </table> | ||
| 89 | - </div> | ||
| 90 | - </div> | ||
| 91 | - </div> | ||
| 92 | - </div> | ||
| 93 | - </div> | ||
| 94 | - </div> | ||
| 95 | -</div> | ||
| 96 | - | ||
| 97 | -<script> | ||
| 98 | - $(function(){ | ||
| 99 | - var fage=false; | ||
| 100 | - // 关闭左侧栏 | ||
| 101 | - if (!$('body').hasClass('page-sidebar-closed')) | ||
| 102 | - $('.menu-toggler.sidebar-toggler').click(); | ||
| 103 | - | ||
| 104 | - $("#date").datetimepicker({ | ||
| 105 | - format : 'YYYY-MM-DD', | ||
| 106 | - locale : 'zh-cn' | ||
| 107 | - }); | ||
| 108 | - | ||
| 109 | - $("#left_height").height($(window).height()-100); | ||
| 110 | - $("#xcld_height").height($(window).height()-100); | ||
| 111 | - | ||
| 112 | - var d = new Date(); | ||
| 113 | - var year = d.getFullYear(); | ||
| 114 | - var month = d.getMonth() + 1; | ||
| 115 | - var day = d.getDate(); | ||
| 116 | - if(month < 10) | ||
| 117 | - month = "0" + month; | ||
| 118 | - if(day < 10) | ||
| 119 | - day = "0" + day; | ||
| 120 | - $("#date").val(year + "-" + month + "-" + day); | ||
| 121 | - | ||
| 122 | - var obj = []; | ||
| 123 | - var xlList; | ||
| 124 | - $.get('/report/lineList',function(result){ | ||
| 125 | - xlList=result; | ||
| 126 | - | ||
| 127 | - $.get('/user/companyData', function(result){ | ||
| 128 | - obj = result; | ||
| 129 | - console.log(obj); | ||
| 130 | - var options = ''; | ||
| 131 | - for(var i = 0; i < obj.length; i++){ | ||
| 132 | - options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | ||
| 133 | - } | ||
| 134 | - | ||
| 135 | - if(obj.length ==0){ | ||
| 136 | - $("#gsdmDiv_xcld").css('display','none'); | ||
| 137 | - }else if(obj.length ==1){ | ||
| 138 | - $("#gsdmDiv_xcld").css('display','none'); | ||
| 139 | - if(obj[0].children.length == 1 || obj[0].children.length ==0) | ||
| 140 | - $('#fgsdmDiv_xcld').css('display','none'); | ||
| 141 | - } | ||
| 142 | - $('#gsdmXcld').html(options); | ||
| 143 | - | ||
| 144 | - updateCompany(); | ||
| 145 | - }); | ||
| 146 | - }); | ||
| 147 | - | ||
| 148 | - $("#gsdmXcld").on("change",updateCompany); | ||
| 149 | - function updateCompany(){ | ||
| 150 | - var company = $('#gsdmXcld').val(); | ||
| 151 | - var options = ''; | ||
| 152 | - for(var i = 0; i < obj.length; i++){ | ||
| 153 | - if(obj[i].companyCode == company){ | ||
| 154 | - var children = obj[i].children; | ||
| 155 | - for(var j = 0; j < children.length; j++){ | ||
| 156 | - options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; | ||
| 157 | - } | ||
| 158 | - } | ||
| 159 | - } | ||
| 160 | - $('#fgsdmXcld').html(options); | ||
| 161 | -// initXl(); | ||
| 162 | - } | ||
| 163 | - | ||
| 164 | - | ||
| 165 | - | ||
| 166 | - | ||
| 167 | -// $("#fgsdmXcld").on("change",initXl); | ||
| 168 | - /* function initXl(){ | ||
| 169 | - var data=[]; | ||
| 170 | - if(fage){ | ||
| 171 | - $("#line").select2("destroy").html(''); | ||
| 172 | - } | ||
| 173 | - var fgs=$('#fgsdmXcld').val(); | ||
| 174 | - var gs=$('#gsdmXcld').val(); | ||
| 175 | - for(var i=0;i<xlList.length;i++){ | ||
| 176 | - if(gs!=""){ | ||
| 177 | - if(fgs!=""){ | ||
| 178 | - if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){ | ||
| 179 | - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]}); | ||
| 180 | - } | ||
| 181 | - }else{ | ||
| 182 | - if(xlList[i]["gsbm"]==gs){ | ||
| 183 | - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]}); | ||
| 184 | - } | ||
| 185 | - } | ||
| 186 | - } | ||
| 187 | - } | ||
| 188 | - initPinYinSelect2('#line',data,''); | ||
| 189 | - fage=true; | ||
| 190 | - } */ | ||
| 191 | - | ||
| 192 | - var tempData = {}; | ||
| 193 | - $.get('/report/lineList',function(xlList){ | ||
| 194 | - var data = []; | ||
| 195 | -// data.push({id: " ", text: "全部线路"}); | ||
| 196 | - $.get('/user/companyData', function(result){ | ||
| 197 | - for(var i = 0; i < result.length; i++){ | ||
| 198 | - var companyCode = result[i].companyCode; | ||
| 199 | - var children = result[i].children; | ||
| 200 | - for(var j = 0; j < children.length; j++){ | ||
| 201 | - var code = children[j].code; | ||
| 202 | - for(var k=0;k < xlList.length;k++ ){ | ||
| 203 | - if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){ | ||
| 204 | - data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]}); | ||
| 205 | - tempData[xlList[k]["xlbm"]] = companyCode+":"+code; | ||
| 206 | - } | ||
| 207 | - } | ||
| 208 | - } | ||
| 209 | - } | ||
| 210 | - initPinYinSelect2('#line',data,''); | ||
| 211 | - | ||
| 212 | - }); | ||
| 213 | - }); | ||
| 214 | - | ||
| 215 | - $("#line").on("change", function(){ | ||
| 216 | - if($("#line").val() == " "){ | ||
| 217 | - $("#gsdmXcld").attr("disabled", false); | ||
| 218 | - $("#fgsdmXcld").attr("disabled", false); | ||
| 219 | - } else { | ||
| 220 | - var temp = (tempData[$("#line").val()] ? tempData[$("#line").val()] : " : ").split(":"); | ||
| 221 | - $("#gsdmXcld").val(temp[0]); | ||
| 222 | - updateCompany(); | ||
| 223 | - $("#fgsdmXcld").val(temp[1]); | ||
| 224 | - $("#gsdmXcld").attr("disabled", true); | ||
| 225 | - $("#fgsdmXcld").attr("disabled", true); | ||
| 226 | - } | ||
| 227 | - }); | ||
| 228 | - var date = ''; | ||
| 229 | - var line = ''; | ||
| 230 | - var lineName; | ||
| 231 | - $("#query").on("click",function(){ | ||
| 232 | - $("#left_height").height($(window).height()-100); | ||
| 233 | - line = $("#line").val(); | ||
| 234 | - date = $("#date").val(); | ||
| 235 | - lineName = $('#line option:selected').text(); | ||
| 236 | - $(".hidden").removeClass("hidden"); | ||
| 237 | - $get('/realSchedule/queryUserInfo',{line:line,date:date,state:2},function(result){ | ||
| 238 | - // 把数据填充到模版中 | ||
| 239 | - var tbodyHtml = template('list_info',{list:result}); | ||
| 240 | - // 把渲染好的模版html文本追加到表格中 | ||
| 241 | - $('#info tbody').html(tbodyHtml); | ||
| 242 | - }); | ||
| 243 | - }); | ||
| 244 | - var type="desc"; | ||
| 245 | - $(".rypx").on("click",function(){ | ||
| 246 | - line = $("#line").val(); | ||
| 247 | - date = $("#date").val(); | ||
| 248 | - $(".hidden").removeClass("hidden"); | ||
| 249 | - $get('/realSchedule/queryUserInfoPx',{line:line,date:date,state:"jGh",type:type},function(result){ | ||
| 250 | - if(type=="desc"){ | ||
| 251 | - type ="asc"; | ||
| 252 | - }else{ | ||
| 253 | - type ="desc"; | ||
| 254 | - } | ||
| 255 | - // 把数据填充到模版中 | ||
| 256 | - var tbodyHtml = template('list_info_px',{list:result}); | ||
| 257 | - // 把渲染好的模版html文本追加到表格中 | ||
| 258 | - $('#info tbody').html(tbodyHtml); | ||
| 259 | - }); | ||
| 260 | - }) | ||
| 261 | - | ||
| 262 | - $(".zbhpx").on("click",function(){ | ||
| 263 | - line = $("#line").val(); | ||
| 264 | - date = $("#date").val(); | ||
| 265 | - $(".hidden").removeClass("hidden"); | ||
| 266 | - $get('/realSchedule/queryUserInfoPx',{line:line,date:date,state:"clZbh",type:type},function(result){ | ||
| 267 | - if(type=="desc"){ | ||
| 268 | - type ="asc"; | ||
| 269 | - }else{ | ||
| 270 | - type ="desc"; | ||
| 271 | - } | ||
| 272 | - // 把数据填充到模版中 | ||
| 273 | - var tbodyHtml = template('list_info_px',{list:result}); | ||
| 274 | - // 把渲染好的模版html文本追加到表格中 | ||
| 275 | - $('#info tbody').html(tbodyHtml); | ||
| 276 | - }); | ||
| 277 | - }) | ||
| 278 | - | ||
| 279 | - $(".lppx").on("click",function(){ | ||
| 280 | - line = $("#line").val(); | ||
| 281 | - date = $("#date").val(); | ||
| 282 | - $(".hidden").removeClass("hidden"); | ||
| 283 | - $get('/realSchedule/queryUserInfoPx',{line:line,date:date,state:"lpName",type:type},function(result){ | ||
| 284 | - if(type=="desc"){ | ||
| 285 | - type ="asc"; | ||
| 286 | - }else{ | ||
| 287 | - type ="desc"; | ||
| 288 | - } | ||
| 289 | - // 把数据填充到模版中 | ||
| 290 | - var tbodyHtml = template('list_info_px',{list:result}); | ||
| 291 | - // 把渲染好的模版html文本追加到表格中 | ||
| 292 | - $('#info tbody').html(tbodyHtml); | ||
| 293 | - }); | ||
| 294 | - }) | ||
| 295 | - | ||
| 296 | - var params = new Array(); | ||
| 297 | - var jName = ''; | ||
| 298 | - var jGh = ''; | ||
| 299 | - $("#info tbody").on("click","tr",function(){ | ||
| 300 | - if($(this).children().size() < 2){ | ||
| 301 | - return; | ||
| 302 | - } | ||
| 303 | - $("#xcld_height").height($(window).height()-100); | ||
| 304 | - $(this).children().each(function(index){ | ||
| 305 | - params[index] = $(this).text(); | ||
| 306 | - }); | ||
| 307 | - jName = params[0].split("\\")[0]; | ||
| 308 | - jGh = params[0].split("\\")[1]; | ||
| 309 | - var id = params[3]; | ||
| 310 | - var obj = $(this); | ||
| 311 | - $get('/realSchedule/MapById',{id:id},function(result){ | ||
| 312 | - result.scheduleDate = moment(result.scheduleDate).format("YYYY/MM/DD"); | ||
| 313 | - var ludan_1 = template('ludan_1',result); | ||
| 314 | - // 把渲染好的模版html文本追加到表格中 | ||
| 315 | - $('#forms .ludan_1').html(ludan_1); | ||
| 316 | - }); | ||
| 317 | - $get('/realSchedule/queryListWaybill',{jGh:jGh,clZbh:params[1],lpName:params[2],date:date,line:line},function(result){ | ||
| 318 | - getTime(result); | ||
| 319 | - /* $get('/realSchedule/MapById',{id:result[0].id},function(result){ | ||
| 320 | - result.scheduleDate = moment(result.scheduleDate).format("YYYY/MM/DD"); | ||
| 321 | - var ludan_1 = template('ludan_1',result); | ||
| 322 | - // 把渲染好的模版html文本追加到表格中 | ||
| 323 | - $('#forms .ludan_1').html(ludan_1); | ||
| 324 | - }); */ | ||
| 325 | - var ludan_2 = template('ludan_2',{list:result}); | ||
| 326 | - // 把渲染好的模版html文本追加到表格中 | ||
| 327 | - $('#forms .ludan_2').html(ludan_2); | ||
| 328 | - }); | ||
| 329 | - $get('/realSchedule/findKMBC',{jGh:jGh,clZbh:params[1],lpName:params[2],date:date,line:line},function(result){ | ||
| 330 | - var ludan_3 = template('ludan_3',result); | ||
| 331 | - $('#forms .ludan_3').html(ludan_3); | ||
| 332 | - $("#info tbody tr").css('background-color', ''); | ||
| 333 | - obj.css('background-color', '#99CCFF'); | ||
| 334 | - }); | ||
| 335 | - | ||
| 336 | - | ||
| 337 | - }); | ||
| 338 | - | ||
| 339 | - $("#export").on("click",function(){ | ||
| 340 | - if(params.length < 1){ | ||
| 341 | - return; | ||
| 342 | - } | ||
| 343 | - var i = layer.load(2); | ||
| 344 | - $get('/realSchedule/exportWaybill',{jName:jName,jGh:jGh,clZbh:params[1],lpName:params[2],date:date,line:line},function(result){ | ||
| 345 | - var fileName=date+"-"+jName+"-"+params[1]+"-"+params[2]+"-行车路单"; | ||
| 346 | - window.open("/downloadFile/download?fileName="+encodeURIComponent(fileName)); | ||
| 347 | - layer.close(i); | ||
| 348 | - }); | ||
| 349 | - }); | ||
| 350 | - | ||
| 351 | - $("#print").click(function(){ | ||
| 352 | - $("#printArea").printArea(); | ||
| 353 | - }); | ||
| 354 | - | ||
| 355 | - $("#exportMore").on("click",function(){ | ||
| 356 | - if($("#info tbody tr td").length <= 1) | ||
| 357 | - return; | ||
| 358 | - var i = layer.load(2); | ||
| 359 | - var param = new Array(); | ||
| 360 | - $("#info tbody tr").each(function(index){ | ||
| 361 | - param[index] = new Array(); | ||
| 362 | - $(this).children().each(function(i){ | ||
| 363 | - if(i<3){ | ||
| 364 | - param[index][i] = $(this).text().split("\\")[0]; | ||
| 365 | - if(i==0){ | ||
| 366 | - param[index][3] = $(this).text().split("\\")[1]; | ||
| 367 | - | ||
| 368 | - } | ||
| 369 | - } | ||
| 370 | - }); | ||
| 371 | - }); | ||
| 372 | -// $get('/realSchedule/exportWaybillMore',{date:date,line:line,strs:JSON.stringify(param)},function(result){ | ||
| 373 | -// window.open("/downloadFile/downloadList?fileName="+result.fileName); //下载压缩包 | ||
| 374 | - $get('/busInterval/exportWaybillMore',{date:date,line:line,lineName:lineName,strs:JSON.stringify(param)},function(result){ | ||
| 375 | - window.open("/downloadFile/download?fileName="+result.fileName); | ||
| 376 | - layer.close(i); | ||
| 377 | - }); | ||
| 378 | - }); | ||
| 379 | - | ||
| 380 | - function getTime(list){ | ||
| 381 | - $.each(list, function(i, obj) { | ||
| 382 | - if(obj.zdsj != null && obj.zdsjActual != null ){ | ||
| 383 | - var zdsjActual = (obj.zdsjActual).split(":"); | ||
| 384 | - var zdsj = (obj.zdsj).split(":"); | ||
| 385 | - if(zdsjActual[0]*60+Number(zdsjActual[1]) > zdsj[0]*60+Number(zdsj[1])){ | ||
| 386 | - if(zdsjActual[0]*60+Number(zdsjActual[1]) - zdsj[0]*60+Number(zdsj[1]) > 1000){ | ||
| 387 | - obj["fast"] = (zdsj[0]*60+Number(zdsj[1])) - (zdsjActual[0]*60+Number(zdsjActual[1])) + 1440; | ||
| 388 | - } else { | ||
| 389 | - obj["slow"] = (zdsjActual[0]*60+Number(zdsjActual[1])) - (zdsj[0]*60+Number(zdsj[1])); | ||
| 390 | - } | ||
| 391 | - } | ||
| 392 | - else if(zdsjActual[0]*60+Number(zdsjActual[1]) < zdsj[0]*60+Number(zdsj[1])){ | ||
| 393 | - if((zdsj[0]*60+Number(zdsj[1])) - (zdsjActual[0]*60+Number(zdsjActual[1])) > 1000){ | ||
| 394 | - obj["slow"] = (zdsjActual[0]*60+Number(zdsjActual[1])) - (zdsj[0]*60+Number(zdsj[1])) + 1440; | ||
| 395 | - } else { | ||
| 396 | - obj["fast"] = (zdsj[0]*60+Number(zdsj[1])) - (zdsjActual[0]*60+Number(zdsjActual[1])); | ||
| 397 | - } | ||
| 398 | - } | ||
| 399 | - } | ||
| 400 | - }); | ||
| 401 | - } | ||
| 402 | - }); | ||
| 403 | -</script> | ||
| 404 | -<script type="text/html" id="list_info"> | ||
| 405 | - {{each list as obj i}} | ||
| 406 | - <tr> | ||
| 407 | - <td width="45%">{{obj.jName}}\{{obj.jGh}}</td> | ||
| 408 | - <td width="32%">{{obj.clZbh}}</td> | ||
| 409 | - <td width="23%">{{obj.lpName}}</td> | ||
| 410 | - <td hidden="true">{{obj.id}}</td> | ||
| 411 | - </tr> | ||
| 412 | - {{/each}} | ||
| 413 | - {{if list.length == 0}} | ||
| 414 | - <tr> | ||
| 415 | - <td colspan="3"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 416 | - </tr> | ||
| 417 | - {{/if}} | ||
| 418 | -</script> | ||
| 419 | -<script type="text/html" id="list_info_px"> | ||
| 420 | - {{each list as obj i}} | ||
| 421 | - <tr> | ||
| 422 | - | ||
| 423 | - <td width="45%">{{obj.jName}}\{{obj.jGh}}</td> | ||
| 424 | - <td width="32%">{{obj.clZbh}}</td> | ||
| 425 | - <td width="23%">{{obj.lpName}}</td> | ||
| 426 | - <td hidden="true">{{obj.id}}</td> | ||
| 427 | - </tr> | ||
| 428 | - {{/each}} | ||
| 429 | - {{if list.length == 0}} | ||
| 430 | - <tr> | ||
| 431 | - <td colspan="3"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 432 | - </tr> | ||
| 433 | - {{/if}} | ||
| 434 | -</script> | ||
| 435 | -<script type="text/html" id="ludan_1"> | ||
| 436 | - <tr> | ||
| 437 | - <td colspan="14">行车路单</td> | ||
| 438 | - </tr> | ||
| 439 | - <tr> | ||
| 440 | - <td colspan="14">路别:{{xlName}} 路牌:{{lpName}} 车号:{{clZbh}}({{plate}}) 出场时间:{{fcsjActual}} 到达站名:{{zdzName}} 当班调派:{{dbdp}} 日期:{{scheduleDate}}</td> | ||
| 441 | - </tr> | ||
| 442 | - <tr> | ||
| 443 | - {{if type==0 && hyd!=1}} | ||
| 444 | - <td colspan="2">出场存油 {{ccyl}}升</td> | ||
| 445 | - <td colspan="2">加注量 {{jzl}}升</td> | ||
| 446 | - <td colspan="2">进场存油 {{jcyl}}升</td> | ||
| 447 | - <td colspan="2">加注机油 升</td> | ||
| 448 | - <td colspan="3">{{rylx}}</td> | ||
| 449 | - <td colspan="3">本日耗油 {{yh}}升</td> | ||
| 450 | - {{/if}} | ||
| 451 | - {{if type==1}} | ||
| 452 | - <td colspan="2">出场存电 {{ccyl}}%</td> | ||
| 453 | - <td colspan="2">充电量 {{jzl}}度</td> | ||
| 454 | - <td colspan="2">进场存电 {{jcyl}}%</td> | ||
| 455 | - <td colspan="4">加注机油 升</td> | ||
| 456 | - <td colspan="4">本日耗电 {{yh}}度</td> | ||
| 457 | - {{/if}} | ||
| 458 | - {{if type==2}} | ||
| 459 | - <td colspan="2">出场存电 {{ccyl}}%</td> | ||
| 460 | - <td colspan="2">充电量 {{jzl}}度</td> | ||
| 461 | - <td colspan="2">进场存电 {{jcyl}}%</td> | ||
| 462 | - <td colspan="4">加注机油 升</td> | ||
| 463 | - <td colspan="4">本日耗电 {{yh}}度</td> | ||
| 464 | - {{/if}} | ||
| 465 | - </tr> | ||
| 466 | - {{if hyd==1}} | ||
| 467 | - <tr> | ||
| 468 | - <td colspan="2">出场存氢 {{czcl}}%</td> | ||
| 469 | - <td colspan="2">充氢量 {{jql}}方</td> | ||
| 470 | - <td colspan="2">进场存氢 {{jzcl}}%</td> | ||
| 471 | - <td colspan="4">加注机油 升</td> | ||
| 472 | - <td colspan="4">本日耗氢 {{hn}}方</td> | ||
| 473 | - </tr> | ||
| 474 | - {{/if}} | ||
| 475 | - <tr> | ||
| 476 | - <td rowspan="2">调度章</td> | ||
| 477 | - <td colspan="1"> </td> | ||
| 478 | - <td rowspan="2">早班</td> | ||
| 479 | - <td colspan="1"> </td> | ||
| 480 | - <td rowspan="2">夜班</td> | ||
| 481 | - <td colspan="1"> </td> | ||
| 482 | - <td rowspan="2" colspan="2">交叉</td> | ||
| 483 | - <td colspan="2"> </td> | ||
| 484 | - <td rowspan="2">其他</td> | ||
| 485 | - <td colspan="1"> </td> | ||
| 486 | - <td colspan="1"> </td> | ||
| 487 | - <td colspan="1"> </td> | ||
| 488 | - </tr> | ||
| 489 | - <tr> | ||
| 490 | - <td colspan="1"> </td> | ||
| 491 | - <td colspan="1"> </td> | ||
| 492 | - <td colspan="1"> </td> | ||
| 493 | - <td colspan="2"> </td> | ||
| 494 | - <td colspan="1"> </td> | ||
| 495 | - <td colspan="1"> </td> | ||
| 496 | - <td colspan="1"> </td> | ||
| 497 | - </tr> | ||
| 498 | - <tr> | ||
| 499 | - <td rowspan="2">车次</td> | ||
| 500 | - <td colspan="2">工号</td> | ||
| 501 | - <td rowspan="2">公里耗油</td> | ||
| 502 | - <td colspan="2">起讫站</td> | ||
| 503 | - <td colspan="4">时间</td> | ||
| 504 | - <td colspan="2">误点</td> | ||
| 505 | - <td rowspan="2" width="66px">里程(公里)计划</td> | ||
| 506 | - <td rowspan="2">备注</td> | ||
| 507 | - </tr> | ||
| 508 | - <tr> | ||
| 509 | - <td colspan="1" width="60px">司 机</td> | ||
| 510 | - <td colspan="1" width="60px">售 票</td> | ||
| 511 | - <td colspan="1">起点</td> | ||
| 512 | - <td colspan="1">终点</td> | ||
| 513 | - <td colspan="1">计发</td> | ||
| 514 | - <td colspan="1">实发</td> | ||
| 515 | - <td colspan="1">应到</td> | ||
| 516 | - <td colspan="1">实到</td> | ||
| 517 | - <td colspan="1">快</td> | ||
| 518 | - <td colspan="1">慢</td> | ||
| 519 | - </tr> | ||
| 520 | -</script> | ||
| 521 | -<script type="text/html" id="ludan_2"> | ||
| 522 | - {{each list as obj i}} | ||
| 523 | - <tr> | ||
| 524 | - <td>{{obj.adjustExps}}</td> | ||
| 525 | - <td>{{obj.jGh}}{{obj.jName}}</td> | ||
| 526 | - <td>{{if obj.sGh !=null}} | ||
| 527 | - {{obj.sGh}}{{obj.sName}} | ||
| 528 | - {{/if}} | ||
| 529 | - </td> | ||
| 530 | - <td> </td> | ||
| 531 | - <td>{{obj.qdzName}}</td> | ||
| 532 | - <td>{{obj.zdzName}}</td> | ||
| 533 | - <td>{{obj.fcsj}}</td> | ||
| 534 | - <td>{{obj.fcsjActual}}</td> | ||
| 535 | - <td>{{obj.zdsj}}</td> | ||
| 536 | - <td>{{obj.zdsjActual}}</td> | ||
| 537 | - <td>{{obj.fast}}</td> | ||
| 538 | - <td>{{obj.slow}}</td> | ||
| 539 | - <td> | ||
| 540 | - {{if obj.zdsjActual!=null}} | ||
| 541 | - {{obj.jhlc}} | ||
| 542 | - {{/if}} | ||
| 543 | - </td> | ||
| 544 | - <td > | ||
| 545 | - {{obj.remarks}} | ||
| 546 | - </td> | ||
| 547 | - </tr> | ||
| 548 | - {{/each}} | ||
| 549 | - {{if list.length == 0}} | ||
| 550 | - <tr> | ||
| 551 | - <td colspan="14"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 552 | - </tr> | ||
| 553 | - {{/if}} | ||
| 554 | -</script> | ||
| 555 | -<script type="text/html" id="ludan_3"> | ||
| 556 | - <tr> | ||
| 557 | - <td colspan="2">计划班次</td> | ||
| 558 | - <td>{{jhbc}}</td> | ||
| 559 | - <td colspan="2">计划公里</td> | ||
| 560 | - <td>{{jhlc}}</td> | ||
| 561 | - <td colspan="2">烂班班次</td> | ||
| 562 | - <td>{{cjbc}}</td> | ||
| 563 | - <td colspan="3"> 烂班公里</td> | ||
| 564 | - <td colspan="2">{{remMileage}}</td> | ||
| 565 | - </tr> | ||
| 566 | - <tr> | ||
| 567 | - <td colspan="2">临加班次</td> | ||
| 568 | - <td>{{ljbc}}</td> | ||
| 569 | - <td colspan="2">临加公里</td> | ||
| 570 | - <td>{{addMileage}}</td> | ||
| 571 | - <td colspan="2">实际班次</td> | ||
| 572 | - <td>{{sjbc}}</td> | ||
| 573 | - <td colspan="3">营运公里</td> | ||
| 574 | - <td colspan="2">{{yygl}}</td> | ||
| 575 | - </tr> | ||
| 576 | - <tr> | ||
| 577 | - <td colspan="2">空驶公里</td> | ||
| 578 | - <td>{{zkslc}}</td> | ||
| 579 | - <td colspan="2">总公里</td> | ||
| 580 | - <td>{{realMileage}}</td> | ||
| 581 | - <td colspan="2"></td> | ||
| 582 | - <td></td> | ||
| 583 | - <td colspan="3"></td> | ||
| 584 | - <td colspan="2"></td> | ||
| 585 | - </tr> | ||
| 586 | -</script> | 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; margin-left: 33px;" id="gsdmDiv_xcld"> | ||
| 31 | + <span class="item-label" style="width: 80px;">公司: </span> | ||
| 32 | + <select class="form-control" name="company" id="gsdmXcld" style="width: 180px;"></select> | ||
| 33 | + </div> | ||
| 34 | + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_xcld"> | ||
| 35 | + <span class="item-label" style="width: 80px;">分公司: </span> | ||
| 36 | + <select class="form-control" name="subCompany" id="fgsdmXcld" style="width: 180px;"></select> | ||
| 37 | + </div> | ||
| 38 | + <div style="margin-top: 2px"></div> | ||
| 39 | + <div style="display: inline-block; margin-left: 33px;"> | ||
| 40 | + <span class="item-label" style="width: 80px;">线路: </span> | ||
| 41 | + <select class="form-control" name="line" id="line" style="width: 180px;"></select> | ||
| 42 | + </div> | ||
| 43 | + <div style="display: inline-block;margin-left: 24px;"> | ||
| 44 | + <span class="item-label" style="width: 80px;"> 时间: </span> | ||
| 45 | + <input class="form-control" type="text" id="date" style="width: 180px;"/> | ||
| 46 | + </div> | ||
| 47 | + <div class="form-group" style="display: inline-block;margin-left: 15px;"> | ||
| 48 | + <input class="btn btn-default" type="button" id="query" value="查询"/> | ||
| 49 | + <input class="btn btn-default" type="button" id="export" value="导出"/> | ||
| 50 | + <input class="btn btn-default" type="button" id="print" value="打印"/> | ||
| 51 | + <input class="btn btn-default" type="button" id="exportMore" value="批量导出"/> | ||
| 52 | + </div> | ||
| 53 | + </form> | ||
| 54 | + </div> | ||
| 55 | + <div class="portlet-body"> | ||
| 56 | + <div class="row"> | ||
| 57 | + <div class="col-md-3"> | ||
| 58 | + <div class="" id="left_height" style="margin-top: 10px;overflow:auto;"> | ||
| 59 | + <table class="table table-bordered table-hover table-checkable pre-scrollable" id="info"> | ||
| 60 | + <thead> | ||
| 61 | + <tr class="hidden"> | ||
| 62 | + <th class="rypx" style="cursor:pointer ">人员</th> | ||
| 63 | + <th class="zbhpx" style="cursor:pointer ">自编号</th> | ||
| 64 | + <th class="lppx" style="cursor:pointer ">路牌</th> | ||
| 65 | + </tr> | ||
| 66 | + </thead> | ||
| 67 | + <tbody> | ||
| 68 | + | ||
| 69 | + </tbody> | ||
| 70 | + </table> | ||
| 71 | + </div> | ||
| 72 | + </div> | ||
| 73 | + <div class="col-md-9" id="printArea"> | ||
| 74 | + <div class="table-container" id="xcld_height" style="margin-top: 10px;overflow:auto;min-width: 906px;"> | ||
| 75 | + <table class="table table-bordered table-checkable" id="forms"> | ||
| 76 | + <tbody class="ludan_1"> | ||
| 77 | + | ||
| 78 | + </tbody> | ||
| 79 | + <tbody class="ludan_2"> | ||
| 80 | + | ||
| 81 | + </tbody> | ||
| 82 | + <tbody class="ludan_3"> | ||
| 83 | + | ||
| 84 | + </tbody> | ||
| 85 | + <tbody class="ludan_4"> | ||
| 86 | + | ||
| 87 | + </tbody> | ||
| 88 | + </table> | ||
| 89 | + </div> | ||
| 90 | + </div> | ||
| 91 | + </div> | ||
| 92 | + </div> | ||
| 93 | + </div> | ||
| 94 | + </div> | ||
| 95 | +</div> | ||
| 96 | + | ||
| 97 | +<script> | ||
| 98 | + $(function(){ | ||
| 99 | + var fage=false; | ||
| 100 | + // 关闭左侧栏 | ||
| 101 | + if (!$('body').hasClass('page-sidebar-closed')) | ||
| 102 | + $('.menu-toggler.sidebar-toggler').click(); | ||
| 103 | + | ||
| 104 | + $("#date").datetimepicker({ | ||
| 105 | + format : 'YYYY-MM-DD', | ||
| 106 | + locale : 'zh-cn' | ||
| 107 | + }); | ||
| 108 | + | ||
| 109 | + $("#left_height").height($(window).height()-100); | ||
| 110 | + $("#xcld_height").height($(window).height()-100); | ||
| 111 | + | ||
| 112 | + var d = new Date(); | ||
| 113 | + var year = d.getFullYear(); | ||
| 114 | + var month = d.getMonth() + 1; | ||
| 115 | + var day = d.getDate(); | ||
| 116 | + if(month < 10) | ||
| 117 | + month = "0" + month; | ||
| 118 | + if(day < 10) | ||
| 119 | + day = "0" + day; | ||
| 120 | + $("#date").val(year + "-" + month + "-" + day); | ||
| 121 | + | ||
| 122 | + var obj = []; | ||
| 123 | + var xlList; | ||
| 124 | + $.get('/report/lineList',function(result){ | ||
| 125 | + xlList=result; | ||
| 126 | + | ||
| 127 | + $.get('/user/companyData', function(result){ | ||
| 128 | + obj = result; | ||
| 129 | + console.log(obj); | ||
| 130 | + var options = ''; | ||
| 131 | + for(var i = 0; i < obj.length; i++){ | ||
| 132 | + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | ||
| 133 | + } | ||
| 134 | + | ||
| 135 | + if(obj.length ==0){ | ||
| 136 | + $("#gsdmDiv_xcld").css('display','none'); | ||
| 137 | + }else if(obj.length ==1){ | ||
| 138 | + $("#gsdmDiv_xcld").css('display','none'); | ||
| 139 | + if(obj[0].children.length == 1 || obj[0].children.length ==0) | ||
| 140 | + $('#fgsdmDiv_xcld').css('display','none'); | ||
| 141 | + } | ||
| 142 | + $('#gsdmXcld').html(options); | ||
| 143 | + | ||
| 144 | + updateCompany(); | ||
| 145 | + }); | ||
| 146 | + }); | ||
| 147 | + | ||
| 148 | + $("#gsdmXcld").on("change",updateCompany); | ||
| 149 | + function updateCompany(){ | ||
| 150 | + var company = $('#gsdmXcld').val(); | ||
| 151 | + var options = ''; | ||
| 152 | + for(var i = 0; i < obj.length; i++){ | ||
| 153 | + if(obj[i].companyCode == company){ | ||
| 154 | + var children = obj[i].children; | ||
| 155 | + for(var j = 0; j < children.length; j++){ | ||
| 156 | + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; | ||
| 157 | + } | ||
| 158 | + } | ||
| 159 | + } | ||
| 160 | + $('#fgsdmXcld').html(options); | ||
| 161 | +// initXl(); | ||
| 162 | + } | ||
| 163 | + | ||
| 164 | + | ||
| 165 | + | ||
| 166 | + | ||
| 167 | +// $("#fgsdmXcld").on("change",initXl); | ||
| 168 | + /* function initXl(){ | ||
| 169 | + var data=[]; | ||
| 170 | + if(fage){ | ||
| 171 | + $("#line").select2("destroy").html(''); | ||
| 172 | + } | ||
| 173 | + var fgs=$('#fgsdmXcld').val(); | ||
| 174 | + var gs=$('#gsdmXcld').val(); | ||
| 175 | + for(var i=0;i<xlList.length;i++){ | ||
| 176 | + if(gs!=""){ | ||
| 177 | + if(fgs!=""){ | ||
| 178 | + if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){ | ||
| 179 | + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]}); | ||
| 180 | + } | ||
| 181 | + }else{ | ||
| 182 | + if(xlList[i]["gsbm"]==gs){ | ||
| 183 | + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]}); | ||
| 184 | + } | ||
| 185 | + } | ||
| 186 | + } | ||
| 187 | + } | ||
| 188 | + initPinYinSelect2('#line',data,''); | ||
| 189 | + fage=true; | ||
| 190 | + } */ | ||
| 191 | + | ||
| 192 | + var tempData = {}; | ||
| 193 | + $.get('/report/lineList',function(xlList){ | ||
| 194 | + var data = []; | ||
| 195 | +// data.push({id: " ", text: "全部线路"}); | ||
| 196 | + $.get('/user/companyData', function(result){ | ||
| 197 | + for(var i = 0; i < result.length; i++){ | ||
| 198 | + var companyCode = result[i].companyCode; | ||
| 199 | + var children = result[i].children; | ||
| 200 | + for(var j = 0; j < children.length; j++){ | ||
| 201 | + var code = children[j].code; | ||
| 202 | + for(var k=0;k < xlList.length;k++ ){ | ||
| 203 | + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){ | ||
| 204 | + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]}); | ||
| 205 | + tempData[xlList[k]["xlbm"]] = companyCode+":"+code; | ||
| 206 | + } | ||
| 207 | + } | ||
| 208 | + } | ||
| 209 | + } | ||
| 210 | + initPinYinSelect2('#line',data,''); | ||
| 211 | + | ||
| 212 | + }); | ||
| 213 | + }); | ||
| 214 | + | ||
| 215 | + $("#line").on("change", function(){ | ||
| 216 | + if($("#line").val() == " "){ | ||
| 217 | + $("#gsdmXcld").attr("disabled", false); | ||
| 218 | + $("#fgsdmXcld").attr("disabled", false); | ||
| 219 | + } else { | ||
| 220 | + var temp = (tempData[$("#line").val()] ? tempData[$("#line").val()] : " : ").split(":"); | ||
| 221 | + $("#gsdmXcld").val(temp[0]); | ||
| 222 | + updateCompany(); | ||
| 223 | + $("#fgsdmXcld").val(temp[1]); | ||
| 224 | + $("#gsdmXcld").attr("disabled", true); | ||
| 225 | + $("#fgsdmXcld").attr("disabled", true); | ||
| 226 | + } | ||
| 227 | + }); | ||
| 228 | + var date = ''; | ||
| 229 | + var line = ''; | ||
| 230 | + var lineName; | ||
| 231 | + $("#query").on("click",function(){ | ||
| 232 | + $("#left_height").height($(window).height()-100); | ||
| 233 | + line = $("#line").val(); | ||
| 234 | + date = $("#date").val(); | ||
| 235 | + lineName = $('#line option:selected').text(); | ||
| 236 | + $(".hidden").removeClass("hidden"); | ||
| 237 | + $get('/realSchedule/queryUserInfo',{line:line,date:date,state:2},function(result){ | ||
| 238 | + // 把数据填充到模版中 | ||
| 239 | + var tbodyHtml = template('list_info',{list:result}); | ||
| 240 | + // 把渲染好的模版html文本追加到表格中 | ||
| 241 | + $('#info tbody').html(tbodyHtml); | ||
| 242 | + }); | ||
| 243 | + }); | ||
| 244 | + var type="desc"; | ||
| 245 | + $(".rypx").on("click",function(){ | ||
| 246 | + line = $("#line").val(); | ||
| 247 | + date = $("#date").val(); | ||
| 248 | + $(".hidden").removeClass("hidden"); | ||
| 249 | + $get('/realSchedule/queryUserInfoPx',{line:line,date:date,state:"jGh",type:type},function(result){ | ||
| 250 | + if(type=="desc"){ | ||
| 251 | + type ="asc"; | ||
| 252 | + }else{ | ||
| 253 | + type ="desc"; | ||
| 254 | + } | ||
| 255 | + // 把数据填充到模版中 | ||
| 256 | + var tbodyHtml = template('list_info_px',{list:result}); | ||
| 257 | + // 把渲染好的模版html文本追加到表格中 | ||
| 258 | + $('#info tbody').html(tbodyHtml); | ||
| 259 | + }); | ||
| 260 | + }) | ||
| 261 | + | ||
| 262 | + $(".zbhpx").on("click",function(){ | ||
| 263 | + line = $("#line").val(); | ||
| 264 | + date = $("#date").val(); | ||
| 265 | + $(".hidden").removeClass("hidden"); | ||
| 266 | + $get('/realSchedule/queryUserInfoPx',{line:line,date:date,state:"clZbh",type:type},function(result){ | ||
| 267 | + if(type=="desc"){ | ||
| 268 | + type ="asc"; | ||
| 269 | + }else{ | ||
| 270 | + type ="desc"; | ||
| 271 | + } | ||
| 272 | + // 把数据填充到模版中 | ||
| 273 | + var tbodyHtml = template('list_info_px',{list:result}); | ||
| 274 | + // 把渲染好的模版html文本追加到表格中 | ||
| 275 | + $('#info tbody').html(tbodyHtml); | ||
| 276 | + }); | ||
| 277 | + }) | ||
| 278 | + | ||
| 279 | + $(".lppx").on("click",function(){ | ||
| 280 | + line = $("#line").val(); | ||
| 281 | + date = $("#date").val(); | ||
| 282 | + $(".hidden").removeClass("hidden"); | ||
| 283 | + $get('/realSchedule/queryUserInfoPx',{line:line,date:date,state:"lpName",type:type},function(result){ | ||
| 284 | + if(type=="desc"){ | ||
| 285 | + type ="asc"; | ||
| 286 | + }else{ | ||
| 287 | + type ="desc"; | ||
| 288 | + } | ||
| 289 | + // 把数据填充到模版中 | ||
| 290 | + var tbodyHtml = template('list_info_px',{list:result}); | ||
| 291 | + // 把渲染好的模版html文本追加到表格中 | ||
| 292 | + $('#info tbody').html(tbodyHtml); | ||
| 293 | + }); | ||
| 294 | + }) | ||
| 295 | + | ||
| 296 | + var params = new Array(); | ||
| 297 | + var jName = ''; | ||
| 298 | + var jGh = ''; | ||
| 299 | + $("#info tbody").on("click","tr",function(){ | ||
| 300 | + if($(this).children().size() < 2){ | ||
| 301 | + return; | ||
| 302 | + } | ||
| 303 | + $("#xcld_height").height($(window).height()-100); | ||
| 304 | + $(this).children().each(function(index){ | ||
| 305 | + params[index] = $(this).text(); | ||
| 306 | + }); | ||
| 307 | + jName = params[0].split("\\")[0]; | ||
| 308 | + jGh = params[0].split("\\")[1]; | ||
| 309 | + var id = params[3]; | ||
| 310 | + var obj = $(this); | ||
| 311 | + $get('/realSchedule/MapById',{id:id},function(result){ | ||
| 312 | + result.scheduleDate = moment(result.scheduleDate).format("YYYY/MM/DD"); | ||
| 313 | + var ludan_1 = template('ludan_1',result); | ||
| 314 | + // 把渲染好的模版html文本追加到表格中 | ||
| 315 | + $('#forms .ludan_1').html(ludan_1); | ||
| 316 | + }); | ||
| 317 | + $get('/realSchedule/queryListWaybill',{jGh:jGh,clZbh:params[1],lpName:params[2],date:date,line:line},function(result){ | ||
| 318 | + getTime(result); | ||
| 319 | + /* $get('/realSchedule/MapById',{id:result[0].id},function(result){ | ||
| 320 | + result.scheduleDate = moment(result.scheduleDate).format("YYYY/MM/DD"); | ||
| 321 | + var ludan_1 = template('ludan_1',result); | ||
| 322 | + // 把渲染好的模版html文本追加到表格中 | ||
| 323 | + $('#forms .ludan_1').html(ludan_1); | ||
| 324 | + }); */ | ||
| 325 | + var ludan_2 = template('ludan_2',{list:result}); | ||
| 326 | + // 把渲染好的模版html文本追加到表格中 | ||
| 327 | + $('#forms .ludan_2').html(ludan_2); | ||
| 328 | + }); | ||
| 329 | + $get('/realSchedule/findKMBC',{jGh:jGh,clZbh:params[1],lpName:params[2],date:date,line:line},function(result){ | ||
| 330 | + var ludan_3 = template('ludan_3',result); | ||
| 331 | + $('#forms .ludan_3').html(ludan_3); | ||
| 332 | + $("#info tbody tr").css('background-color', ''); | ||
| 333 | + obj.css('background-color', '#99CCFF'); | ||
| 334 | + }); | ||
| 335 | + | ||
| 336 | + | ||
| 337 | + }); | ||
| 338 | + | ||
| 339 | + $("#export").on("click",function(){ | ||
| 340 | + if(params.length < 1){ | ||
| 341 | + return; | ||
| 342 | + } | ||
| 343 | + var i = layer.load(2); | ||
| 344 | + $get('/realSchedule/exportWaybill',{jName:jName,jGh:jGh,clZbh:params[1],lpName:params[2],date:date,line:line},function(result){ | ||
| 345 | + var fileName=date+"-"+jName+"-"+params[1]+"-"+params[2]+"-行车路单"; | ||
| 346 | + window.open("/downloadFile/download?fileName="+encodeURIComponent(fileName)); | ||
| 347 | + layer.close(i); | ||
| 348 | + }); | ||
| 349 | + }); | ||
| 350 | + | ||
| 351 | + $("#print").click(function(){ | ||
| 352 | + $("#printArea").printArea(); | ||
| 353 | + }); | ||
| 354 | + | ||
| 355 | + $("#exportMore").on("click",function(){ | ||
| 356 | + if($("#info tbody tr td").length <= 1) | ||
| 357 | + return; | ||
| 358 | + var i = layer.load(2); | ||
| 359 | + var param = new Array(); | ||
| 360 | + $("#info tbody tr").each(function(index){ | ||
| 361 | + param[index] = new Array(); | ||
| 362 | + $(this).children().each(function(i){ | ||
| 363 | + if(i<3){ | ||
| 364 | + param[index][i] = $(this).text().split("\\")[0]; | ||
| 365 | + if(i==0){ | ||
| 366 | + param[index][3] = $(this).text().split("\\")[1]; | ||
| 367 | + | ||
| 368 | + } | ||
| 369 | + } | ||
| 370 | + }); | ||
| 371 | + }); | ||
| 372 | +// $get('/realSchedule/exportWaybillMore',{date:date,line:line,strs:JSON.stringify(param)},function(result){ | ||
| 373 | +// window.open("/downloadFile/downloadList?fileName="+result.fileName); //下载压缩包 | ||
| 374 | + $get('/busInterval/exportWaybillMore',{date:date,line:line,lineName:lineName,strs:JSON.stringify(param)},function(result){ | ||
| 375 | + window.open("/downloadFile/download?fileName="+result.fileName); | ||
| 376 | + layer.close(i); | ||
| 377 | + }); | ||
| 378 | + }); | ||
| 379 | + | ||
| 380 | + function getTime(list){ | ||
| 381 | + $.each(list, function(i, obj) { | ||
| 382 | + if(obj.zdsj != null && obj.zdsjActual != null ){ | ||
| 383 | + var zdsjActual = (obj.zdsjActual).split(":"); | ||
| 384 | + var zdsj = (obj.zdsj).split(":"); | ||
| 385 | + if(zdsjActual[0]*60+Number(zdsjActual[1]) > zdsj[0]*60+Number(zdsj[1])){ | ||
| 386 | + if(zdsjActual[0]*60+Number(zdsjActual[1]) - zdsj[0]*60+Number(zdsj[1]) > 1000){ | ||
| 387 | + obj["fast"] = (zdsj[0]*60+Number(zdsj[1])) - (zdsjActual[0]*60+Number(zdsjActual[1])) + 1440; | ||
| 388 | + } else { | ||
| 389 | + obj["slow"] = (zdsjActual[0]*60+Number(zdsjActual[1])) - (zdsj[0]*60+Number(zdsj[1])); | ||
| 390 | + } | ||
| 391 | + } | ||
| 392 | + else if(zdsjActual[0]*60+Number(zdsjActual[1]) < zdsj[0]*60+Number(zdsj[1])){ | ||
| 393 | + if((zdsj[0]*60+Number(zdsj[1])) - (zdsjActual[0]*60+Number(zdsjActual[1])) > 1000){ | ||
| 394 | + obj["slow"] = (zdsjActual[0]*60+Number(zdsjActual[1])) - (zdsj[0]*60+Number(zdsj[1])) + 1440; | ||
| 395 | + } else { | ||
| 396 | + obj["fast"] = (zdsj[0]*60+Number(zdsj[1])) - (zdsjActual[0]*60+Number(zdsjActual[1])); | ||
| 397 | + } | ||
| 398 | + } | ||
| 399 | + } | ||
| 400 | + }); | ||
| 401 | + } | ||
| 402 | + }); | ||
| 403 | +</script> | ||
| 404 | +<script type="text/html" id="list_info"> | ||
| 405 | + {{each list as obj i}} | ||
| 406 | + <tr> | ||
| 407 | + <td width="45%">{{obj.jName}}\{{obj.jGh}}</td> | ||
| 408 | + <td width="32%">{{obj.clZbh}}</td> | ||
| 409 | + <td width="23%">{{obj.lpName}}</td> | ||
| 410 | + <td hidden="true">{{obj.id}}</td> | ||
| 411 | + </tr> | ||
| 412 | + {{/each}} | ||
| 413 | + {{if list.length == 0}} | ||
| 414 | + <tr> | ||
| 415 | + <td colspan="3"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 416 | + </tr> | ||
| 417 | + {{/if}} | ||
| 418 | +</script> | ||
| 419 | +<script type="text/html" id="list_info_px"> | ||
| 420 | + {{each list as obj i}} | ||
| 421 | + <tr> | ||
| 422 | + | ||
| 423 | + <td width="45%">{{obj.jName}}\{{obj.jGh}}</td> | ||
| 424 | + <td width="32%">{{obj.clZbh}}</td> | ||
| 425 | + <td width="23%">{{obj.lpName}}</td> | ||
| 426 | + <td hidden="true">{{obj.id}}</td> | ||
| 427 | + </tr> | ||
| 428 | + {{/each}} | ||
| 429 | + {{if list.length == 0}} | ||
| 430 | + <tr> | ||
| 431 | + <td colspan="3"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 432 | + </tr> | ||
| 433 | + {{/if}} | ||
| 434 | +</script> | ||
| 435 | +<script type="text/html" id="ludan_1"> | ||
| 436 | + <tr> | ||
| 437 | + <td colspan="14">行车路单</td> | ||
| 438 | + </tr> | ||
| 439 | + <tr> | ||
| 440 | + <td colspan="14">路别:{{xlName}} 路牌:{{lpName}} 车号:{{clZbh}}({{plate}}) 出场时间:{{fcsjActual}} 到达站名:{{zdzName}} 当班调派:{{dbdp}} 日期:{{scheduleDate}}</td> | ||
| 441 | + </tr> | ||
| 442 | + <tr> | ||
| 443 | + {{if type==0 && hyd!=1}} | ||
| 444 | + <td colspan="2">出场存油 {{ccyl}}升</td> | ||
| 445 | + <td colspan="2">加注量 {{jzl}}升</td> | ||
| 446 | + <td colspan="2">进场存油 {{jcyl}}升</td> | ||
| 447 | + <td colspan="2">加注机油 升</td> | ||
| 448 | + <td colspan="3">{{rylx}}</td> | ||
| 449 | + <td colspan="3">本日耗油 {{yh}}升</td> | ||
| 450 | + {{/if}} | ||
| 451 | + {{if type==1}} | ||
| 452 | + <td colspan="2">出场存电 {{ccyl}}%</td> | ||
| 453 | + <td colspan="2">充电量 {{jzl}}度</td> | ||
| 454 | + <td colspan="2">进场存电 {{jcyl}}%</td> | ||
| 455 | + <td colspan="4">加注机油 升</td> | ||
| 456 | + <td colspan="4">本日耗电 {{yh}}度</td> | ||
| 457 | + {{/if}} | ||
| 458 | + {{if type==2}} | ||
| 459 | + <td colspan="2">出场存电 {{ccyl}}%</td> | ||
| 460 | + <td colspan="2">充电量 {{jzl}}度</td> | ||
| 461 | + <td colspan="2">进场存电 {{jcyl}}%</td> | ||
| 462 | + <td colspan="4">加注机油 升</td> | ||
| 463 | + <td colspan="4">本日耗电 {{yh}}度</td> | ||
| 464 | + {{/if}} | ||
| 465 | + </tr> | ||
| 466 | + {{if hyd==1}} | ||
| 467 | + <tr> | ||
| 468 | + <td colspan="2">出场存氢 {{czcl}}%</td> | ||
| 469 | + <td colspan="2">充氢量 {{jql}}方</td> | ||
| 470 | + <td colspan="2">进场存氢 {{jzcl}}%</td> | ||
| 471 | + <td colspan="4">加注机油 升</td> | ||
| 472 | + <td colspan="4">本日耗氢 {{hn}}方</td> | ||
| 473 | + </tr> | ||
| 474 | + {{/if}} | ||
| 475 | + <tr> | ||
| 476 | + <td rowspan="2">调度章</td> | ||
| 477 | + <td colspan="1"> </td> | ||
| 478 | + <td rowspan="2">早班</td> | ||
| 479 | + <td colspan="1"> </td> | ||
| 480 | + <td rowspan="2">夜班</td> | ||
| 481 | + <td colspan="1"> </td> | ||
| 482 | + <td rowspan="2" colspan="2">交叉</td> | ||
| 483 | + <td colspan="2"> </td> | ||
| 484 | + <td rowspan="2">其他</td> | ||
| 485 | + <td colspan="1"> </td> | ||
| 486 | + <td colspan="1"> </td> | ||
| 487 | + <td colspan="1"> </td> | ||
| 488 | + </tr> | ||
| 489 | + <tr> | ||
| 490 | + <td colspan="1"> </td> | ||
| 491 | + <td colspan="1"> </td> | ||
| 492 | + <td colspan="1"> </td> | ||
| 493 | + <td colspan="2"> </td> | ||
| 494 | + <td colspan="1"> </td> | ||
| 495 | + <td colspan="1"> </td> | ||
| 496 | + <td colspan="1"> </td> | ||
| 497 | + </tr> | ||
| 498 | + <tr> | ||
| 499 | + <td rowspan="2">车次</td> | ||
| 500 | + <td colspan="2">工号</td> | ||
| 501 | + <td rowspan="2">公里耗油</td> | ||
| 502 | + <td colspan="2">起讫站</td> | ||
| 503 | + <td colspan="4">时间</td> | ||
| 504 | + <td colspan="2">误点</td> | ||
| 505 | + <td rowspan="2" width="66px">里程(公里)计划</td> | ||
| 506 | + <td rowspan="2">备注</td> | ||
| 507 | + </tr> | ||
| 508 | + <tr> | ||
| 509 | + <td colspan="1" width="60px">司 机</td> | ||
| 510 | + <td colspan="1" width="60px">售 票</td> | ||
| 511 | + <td colspan="1">起点</td> | ||
| 512 | + <td colspan="1">终点</td> | ||
| 513 | + <td colspan="1">计发</td> | ||
| 514 | + <td colspan="1">实发</td> | ||
| 515 | + <td colspan="1">应到</td> | ||
| 516 | + <td colspan="1">实到</td> | ||
| 517 | + <td colspan="1">快</td> | ||
| 518 | + <td colspan="1">慢</td> | ||
| 519 | + </tr> | ||
| 520 | +</script> | ||
| 521 | +<script type="text/html" id="ludan_2"> | ||
| 522 | + {{each list as obj i}} | ||
| 523 | + <tr> | ||
| 524 | + <td>{{obj.adjustExps}}</td> | ||
| 525 | + <td>{{obj.jGh}}{{obj.jName}}</td> | ||
| 526 | + <td>{{if obj.sGh !=null}} | ||
| 527 | + {{obj.sGh}}{{obj.sName}} | ||
| 528 | + {{/if}} | ||
| 529 | + </td> | ||
| 530 | + <td> </td> | ||
| 531 | + <td>{{obj.qdzName}}</td> | ||
| 532 | + <td>{{obj.zdzName}}</td> | ||
| 533 | + <td>{{obj.fcsj}}</td> | ||
| 534 | + <td>{{obj.fcsjActual}}</td> | ||
| 535 | + <td>{{obj.zdsj}}</td> | ||
| 536 | + <td>{{obj.zdsjActual}}</td> | ||
| 537 | + <td>{{obj.fast}}</td> | ||
| 538 | + <td>{{obj.slow}}</td> | ||
| 539 | + <td> | ||
| 540 | + {{if obj.zdsjActual!=null}} | ||
| 541 | + {{obj.jhlc}} | ||
| 542 | + {{/if}} | ||
| 543 | + </td> | ||
| 544 | + <td > | ||
| 545 | + {{obj.remarks}} | ||
| 546 | + </td> | ||
| 547 | + </tr> | ||
| 548 | + {{/each}} | ||
| 549 | + {{if list.length == 0}} | ||
| 550 | + <tr> | ||
| 551 | + <td colspan="14"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 552 | + </tr> | ||
| 553 | + {{/if}} | ||
| 554 | +</script> | ||
| 555 | +<script type="text/html" id="ludan_3"> | ||
| 556 | + <tr> | ||
| 557 | + <td colspan="2">计划班次</td> | ||
| 558 | + <td>{{jhbc}}</td> | ||
| 559 | + <td colspan="2">计划公里</td> | ||
| 560 | + <td>{{jhlc}}</td> | ||
| 561 | + <td colspan="2">烂班班次</td> | ||
| 562 | + <td>{{cjbc}}</td> | ||
| 563 | + <td colspan="3"> 烂班公里</td> | ||
| 564 | + <td colspan="2">{{remMileage}}</td> | ||
| 565 | + </tr> | ||
| 566 | + <tr> | ||
| 567 | + <td colspan="2">临加班次</td> | ||
| 568 | + <td>{{ljbc}}</td> | ||
| 569 | + <td colspan="2">临加公里</td> | ||
| 570 | + <td>{{addMileage}}</td> | ||
| 571 | + <td colspan="2">实际班次</td> | ||
| 572 | + <td>{{sjbc}}</td> | ||
| 573 | + <td colspan="3">营运公里</td> | ||
| 574 | + <td colspan="2">{{yygl}}</td> | ||
| 575 | + </tr> | ||
| 576 | + <tr> | ||
| 577 | + <td colspan="2">空驶公里</td> | ||
| 578 | + <td>{{zkslc}}</td> | ||
| 579 | + <td colspan="2">总公里</td> | ||
| 580 | + <td>{{realMileage}}</td> | ||
| 581 | + <td colspan="2">总公里(GPS)</td> | ||
| 582 | + <td>{{realGpsMileage}}</td> | ||
| 583 | + <td colspan="3"></td> | ||
| 584 | + <td colspan="2"></td> | ||
| 585 | + </tr> | ||
| 586 | +</script> |
src/main/resources/traffic-jdbc.properties
| 1 | -#ms.mysql.driver= com.mysql.jdbc.Driver | 1 | +#ms.mysql.driver= com.mysql.cj.jdbc.Driver |
| 2 | #ms.mysql.url= jdbc:mysql://127.0.0.1/pd_control?useUnicode=true&characterEncoding=utf-8&useSSL=false | 2 | #ms.mysql.url= jdbc:mysql://127.0.0.1/pd_control?useUnicode=true&characterEncoding=utf-8&useSSL=false |
| 3 | #ms.mysql.username= root | 3 | #ms.mysql.username= root |
| 4 | #ms.mysql.password= 123456 | 4 | #ms.mysql.password= 123456 |
| 5 | 5 | ||
| 6 | -ms.mysql.driver= com.mysql.jdbc.Driver | ||
| 7 | -ms.mysql.url= jdbc:mysql://10.10.2.20/ms?useUnicode=true&characterEncoding=utf-8&useSSL=false | ||
| 8 | -ms.mysql.username= root | ||
| 9 | -ms.mysql.password= root2jsp | ||
| 10 | \ No newline at end of file | 6 | \ No newline at end of file |
| 7 | +ms.mysql.driver= com.mysql.cj.jdbc.Driver | ||
| 8 | +ms.mysql.url= jdbc:mysql://127.0.0.1/ms?useUnicode=true&characterEncoding=utf-8&useSSL=false | ||
| 9 | +ms.mysql.username= schedule | ||
| 10 | +ms.mysql.password= fsodlgjiuigAQF2$9fs9 | ||
| 11 | \ No newline at end of file | 11 | \ No newline at end of file |