Commit 64217be78a55c26f88a0f078ab7512541aea39c9
Merge branch 'pudong' of http://222.66.0.204:8090/panzhaov5/bsth_control
into pudong
Showing
23 changed files
with
229 additions
and
87 deletions
src/main/java/com/bsth/XDApplication.java
| 1 | 1 | package com.bsth; |
| 2 | 2 | |
| 3 | 3 | import com.bsth.data.BasicData; |
| 4 | +import com.bsth.data.LineVersionsData; | |
| 4 | 5 | import com.bsth.data.ThreadMonotor; |
| 5 | 6 | import com.bsth.data.car_out_info.UpdateDBThread; |
| 6 | 7 | import com.bsth.data.directive.DirectivesPstThread; |
| 7 | 8 | import com.bsth.data.forecast.SampleTimeDataLoader; |
| 8 | 9 | import com.bsth.data.gpsdata_v2.thread.GpsDataLoaderThread; |
| 9 | 10 | import com.bsth.data.gpsdata_v2.thread.OfflineMonitorThread; |
| 10 | -import com.bsth.data.line_version.thread.FixedEnableVerionsThread; | |
| 11 | 11 | import com.bsth.data.msg_queue.DirectivePushQueue; |
| 12 | 12 | import com.bsth.data.msg_queue.WebSocketPushQueue; |
| 13 | 13 | import com.bsth.data.safe_driv.SafeDrivDataLoadThread; |
| ... | ... | @@ -73,11 +73,11 @@ public class XDApplication implements CommandLineRunner { |
| 73 | 73 | @Autowired |
| 74 | 74 | OfflineMonitorThread offlineMonitorThread; |
| 75 | 75 | |
| 76 | - //@Autowired | |
| 77 | - //LineVersionsData lineVersionsData; | |
| 78 | - | |
| 79 | 76 | @Autowired |
| 80 | - FixedEnableVerionsThread fixedEnableVerionsThread; | |
| 77 | + LineVersionsData lineVersionsData; | |
| 78 | + | |
| 79 | + /*@Autowired | |
| 80 | + FixedEnableVerionsThread fixedEnableVerionsThread;*/ | |
| 81 | 81 | |
| 82 | 82 | @Autowired |
| 83 | 83 | SafeDrivDataLoadThread safeDrivDataLoadThread; |
| ... | ... | @@ -180,9 +180,9 @@ public class XDApplication implements CommandLineRunner { |
| 180 | 180 | sexec.scheduleAtFixedRate(calcOilThread, timeDiff / 1000, 60 * 60 * 24, TimeUnit.SECONDS); |
| 181 | 181 | |
| 182 | 182 | //线路版本更新 |
| 183 | - //sexec.scheduleWithFixedDelay(lineVersionsData, 60 * 5, 60 * 15, TimeUnit.SECONDS); | |
| 183 | + sexec.scheduleWithFixedDelay(lineVersionsData, 60 * 5, 60 * 15, TimeUnit.SECONDS); | |
| 184 | 184 | |
| 185 | 185 | //线路版本更新 |
| 186 | - sexec.scheduleWithFixedDelay(fixedEnableVerionsThread, 60 * 4, 60 * 2 , TimeUnit.SECONDS); | |
| 186 | + //sexec.scheduleWithFixedDelay(fixedEnableVerionsThread, 60 * 4, 60 * 2 , TimeUnit.SECONDS); | |
| 187 | 187 | } |
| 188 | 188 | } | ... | ... |
src/main/java/com/bsth/controller/LineController.java
| 1 | 1 | package com.bsth.controller; |
| 2 | 2 | |
| 3 | -import java.text.ParseException; | |
| 4 | -import java.text.SimpleDateFormat; | |
| 5 | -import java.util.Date; | |
| 6 | -import java.util.HashMap; | |
| 7 | -import java.util.Map; | |
| 8 | - | |
| 9 | -import org.springframework.beans.factory.annotation.Autowired; | |
| 10 | -import org.springframework.web.bind.annotation.RequestMapping; | |
| 11 | -import org.springframework.web.bind.annotation.RequestMethod; | |
| 12 | -import org.springframework.web.bind.annotation.RequestParam; | |
| 13 | -import org.springframework.web.bind.annotation.RestController; | |
| 14 | - | |
| 15 | 3 | import com.bsth.common.ResponseCode; |
| 16 | 4 | import com.bsth.entity.Line; |
| 17 | 5 | import com.bsth.entity.LineVersions; |
| 18 | 6 | import com.bsth.service.LineService; |
| 19 | 7 | import com.bsth.service.LineVersionsService; |
| 20 | 8 | import com.bsth.util.GetUIDAndCode; |
| 9 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 10 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 11 | +import org.springframework.web.bind.annotation.RequestMethod; | |
| 12 | +import org.springframework.web.bind.annotation.RequestParam; | |
| 13 | +import org.springframework.web.bind.annotation.RestController; | |
| 14 | + | |
| 15 | +import java.text.ParseException; | |
| 16 | +import java.text.SimpleDateFormat; | |
| 17 | +import java.util.Date; | |
| 18 | +import java.util.HashMap; | |
| 19 | +import java.util.Map; | |
| 21 | 20 | |
| 22 | 21 | /** |
| 23 | 22 | * |
| ... | ... | @@ -123,4 +122,14 @@ public class LineController extends BaseController<Line, Integer> { |
| 123 | 122 | Line findByID(@RequestParam(defaultValue = "id") Integer id){ |
| 124 | 123 | return service.findById(id); |
| 125 | 124 | } |
| 125 | + | |
| 126 | + /** | |
| 127 | + * 删除线路 | |
| 128 | + * @param id | |
| 129 | + * @return | |
| 130 | + */ | |
| 131 | + @RequestMapping(value ="/remove" , method = RequestMethod.POST) | |
| 132 | + public Map<String, Object> remove(Integer id){ | |
| 133 | + return service.remove(id); | |
| 134 | + } | |
| 126 | 135 | } | ... | ... |
src/main/java/com/bsth/data/directive/DirectivesPstThread.java
| ... | ... | @@ -7,6 +7,8 @@ import com.bsth.entity.directive.Directive; |
| 7 | 7 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 8 | 8 | import com.bsth.repository.directive.D60Repository; |
| 9 | 9 | import com.bsth.repository.directive.D64Repository; |
| 10 | +import org.joda.time.format.DateTimeFormat; | |
| 11 | +import org.joda.time.format.DateTimeFormatter; | |
| 10 | 12 | import org.slf4j.Logger; |
| 11 | 13 | import org.slf4j.LoggerFactory; |
| 12 | 14 | import org.springframework.beans.factory.annotation.Autowired; |
| ... | ... | @@ -32,6 +34,8 @@ public class DirectivesPstThread extends Thread { |
| 32 | 34 | @Autowired |
| 33 | 35 | DayOfSchedule dayOfSchedule; |
| 34 | 36 | |
| 37 | + private static DateTimeFormatter fmtyyyyMMdd = DateTimeFormat.forPattern("yyyy-MM-dd"); | |
| 38 | + | |
| 35 | 39 | @Override |
| 36 | 40 | public void run() { |
| 37 | 41 | |
| ... | ... | @@ -52,6 +56,8 @@ public class DirectivesPstThread extends Thread { |
| 52 | 56 | continue; |
| 53 | 57 | } |
| 54 | 58 | } |
| 59 | + //日期 | |
| 60 | + d60.setRq(fmtyyyyMMdd.print(d60.getTimestamp())); | |
| 55 | 61 | d60Repository.save(d60); |
| 56 | 62 | } |
| 57 | 63 | ... | ... |
src/main/java/com/bsth/data/gpsdata_v2/cache/GpsCacheData.java
| ... | ... | @@ -9,6 +9,8 @@ import org.slf4j.Logger; |
| 9 | 9 | import org.slf4j.LoggerFactory; |
| 10 | 10 | |
| 11 | 11 | import java.util.*; |
| 12 | +import java.util.concurrent.ConcurrentHashMap; | |
| 13 | +import java.util.concurrent.ConcurrentMap; | |
| 12 | 14 | |
| 13 | 15 | /** |
| 14 | 16 | * gps 数据缓存 |
| ... | ... | @@ -17,10 +19,10 @@ import java.util.*; |
| 17 | 19 | public class GpsCacheData { |
| 18 | 20 | |
| 19 | 21 | /** |
| 20 | - * 每辆车缓存最后300条gps | |
| 22 | + * 每辆车缓存最后200条gps | |
| 21 | 23 | */ |
| 22 | - private static final int CACHE_SIZE = 300; | |
| 23 | - private static Map<String, CircleQueue<GpsEntity>> gpsCacheMap = new HashMap<>(); | |
| 24 | + private static final int CACHE_SIZE = 200; | |
| 25 | + private static ConcurrentMap<String, CircleQueue<GpsEntity>> gpsCacheMap = new ConcurrentHashMap<>(); | |
| 24 | 26 | |
| 25 | 27 | /** |
| 26 | 28 | * 车辆执行班次的详细 进出站数据 | ... | ... |
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
| ... | ... | @@ -104,6 +104,7 @@ public class DayOfSchedule { |
| 104 | 104 | static { |
| 105 | 105 | nbbmScheduleMap = ArrayListMultimap.create(); |
| 106 | 106 | lpScheduleMap = ArrayListMultimap.create(); |
| 107 | + lineNbbmsMap = HashMultimap.create(); | |
| 107 | 108 | |
| 108 | 109 | id2SchedulMap = new ConcurrentHashMap<>(); |
| 109 | 110 | pstBuffer = new ConcurrentLinkedQueue<>(); | ... | ... |
src/main/java/com/bsth/data/summary/entity/TempSchSituation.java
| ... | ... | @@ -31,8 +31,6 @@ public class TempSchSituation { |
| 31 | 31 | |
| 32 | 32 | private String sGh; |
| 33 | 33 | |
| 34 | - private String reason; | |
| 35 | - | |
| 36 | 34 | private int size; |
| 37 | 35 | |
| 38 | 36 | private Double mileage; |
| ... | ... | @@ -99,14 +97,6 @@ public class TempSchSituation { |
| 99 | 97 | this.sGh = sGh; |
| 100 | 98 | } |
| 101 | 99 | |
| 102 | - public String getReason() { | |
| 103 | - return reason; | |
| 104 | - } | |
| 105 | - | |
| 106 | - public void setReason(String reason) { | |
| 107 | - this.reason = reason; | |
| 108 | - } | |
| 109 | - | |
| 110 | 100 | public int getSize() { |
| 111 | 101 | return size; |
| 112 | 102 | } |
| ... | ... | @@ -162,4 +152,4 @@ public class TempSchSituation { |
| 162 | 152 | public void setFgsBm(String fgsBm) { |
| 163 | 153 | this.fgsBm = fgsBm; |
| 164 | 154 | } |
| 165 | -} | |
| 155 | +} | |
| 166 | 156 | \ No newline at end of file | ... | ... |
src/main/java/com/bsth/data/summary/service/impl/TempSchSituationServiceImpl.java
| ... | ... | @@ -37,19 +37,14 @@ public class TempSchSituationServiceImpl extends BaseServiceImpl<TempSchSituatio |
| 37 | 37 | @Override |
| 38 | 38 | public int compare(TempSchSituation o1, TempSchSituation o2) { |
| 39 | 39 | int i = o1.getRq().compareTo(o2.getRq()); |
| 40 | - if(i != 0) | |
| 40 | + if (i != 0) | |
| 41 | 41 | return i; |
| 42 | 42 | |
| 43 | 43 | i = o1.getLineName().compareTo(o2.getLineName()); |
| 44 | - if(i != 0) | |
| 44 | + if (i != 0) | |
| 45 | 45 | return i; |
| 46 | 46 | |
| 47 | 47 | i = (int) (o1.getT() - o2.getT()); |
| 48 | - if(i != 0) | |
| 49 | - return i; | |
| 50 | - | |
| 51 | - i = o1.getReason().compareTo(o2.getReason()); | |
| 52 | - | |
| 53 | 48 | return i; |
| 54 | 49 | } |
| 55 | 50 | }); |
| ... | ... | @@ -64,10 +59,10 @@ public class TempSchSituationServiceImpl extends BaseServiceImpl<TempSchSituatio |
| 64 | 59 | |
| 65 | 60 | List<TempSchSituation> list = (List<TempSchSituation>) super.list(map); |
| 66 | 61 | |
| 67 | - if(list.size() == 0){ | |
| 62 | + if (list.size() == 0) { | |
| 68 | 63 | response.setHeader("Content-type", "text/html;charset=UTF-8"); |
| 69 | 64 | response.getWriter().print("<span style='color:red;font-size:24px;'>根据查询条件没有搜索到数据,别导了!</span>"); |
| 70 | - return ; | |
| 65 | + return; | |
| 71 | 66 | } |
| 72 | 67 | |
| 73 | 68 | //排序 |
| ... | ... | @@ -75,19 +70,14 @@ public class TempSchSituationServiceImpl extends BaseServiceImpl<TempSchSituatio |
| 75 | 70 | @Override |
| 76 | 71 | public int compare(TempSchSituation o1, TempSchSituation o2) { |
| 77 | 72 | int i = o1.getRq().compareTo(o2.getRq()); |
| 78 | - if(i != 0) | |
| 73 | + if (i != 0) | |
| 79 | 74 | return i; |
| 80 | 75 | |
| 81 | 76 | i = o1.getLineName().compareTo(o2.getLineName()); |
| 82 | - if(i != 0) | |
| 77 | + if (i != 0) | |
| 83 | 78 | return i; |
| 84 | 79 | |
| 85 | 80 | i = (int) (o1.getT() - o2.getT()); |
| 86 | - if(i != 0) | |
| 87 | - return i; | |
| 88 | - | |
| 89 | - i = o1.getReason().compareTo(o2.getReason()); | |
| 90 | - | |
| 91 | 81 | return i; |
| 92 | 82 | } |
| 93 | 83 | }); |
| ... | ... | @@ -103,7 +93,7 @@ public class TempSchSituationServiceImpl extends BaseServiceImpl<TempSchSituatio |
| 103 | 93 | Row row; |
| 104 | 94 | TempSchSituation tss; |
| 105 | 95 | SimpleDateFormat sdf = new SimpleDateFormat("HH:mm"); |
| 106 | - for(int i = 0; i < list.size(); i++){ | |
| 96 | + for (int i = 0; i < list.size(); i++) { | |
| 107 | 97 | tss = list.get(i); |
| 108 | 98 | row = sheet.createRow(i + 1); |
| 109 | 99 | row.createCell(0).setCellValue(tss.getRq()); |
| ... | ... | @@ -132,5 +122,4 @@ public class TempSchSituationServiceImpl extends BaseServiceImpl<TempSchSituatio |
| 132 | 122 | logger.error("", e); |
| 133 | 123 | } |
| 134 | 124 | } |
| 135 | - | |
| 136 | 125 | } |
| 137 | 126 | \ No newline at end of file | ... | ... |
src/main/java/com/bsth/entity/Line.java
| ... | ... | @@ -160,6 +160,11 @@ public class Line implements Serializable { |
| 160 | 160 | |
| 161 | 161 | /** 是否在使用 <1:是;0:否> bit length(50) */ |
| 162 | 162 | private Integer inUse; |
| 163 | + | |
| 164 | + /** | |
| 165 | + * 逻辑删除标记 为 1:标识已删除 | |
| 166 | + */ | |
| 167 | + private Integer remove; | |
| 163 | 168 | |
| 164 | 169 | public Integer getSpacGrade() { |
| 165 | 170 | return spacGrade; |
| ... | ... | @@ -492,6 +497,13 @@ public class Line implements Serializable { |
| 492 | 497 | public void setSfyy(Integer sfyy) { |
| 493 | 498 | this.sfyy = sfyy; |
| 494 | 499 | } |
| 495 | - | |
| 496 | - | |
| 500 | + | |
| 501 | + | |
| 502 | + public Integer getRemove() { | |
| 503 | + return remove; | |
| 504 | + } | |
| 505 | + | |
| 506 | + public void setRemove(Integer remove) { | |
| 507 | + this.remove = remove; | |
| 508 | + } | |
| 497 | 509 | } | ... | ... |
src/main/java/com/bsth/entity/directive/Directive.java
| ... | ... | @@ -28,6 +28,8 @@ public class Directive { |
| 28 | 28 | * 时间戳 |
| 29 | 29 | */ |
| 30 | 30 | protected Long timestamp; |
| 31 | + | |
| 32 | + private String rq; | |
| 31 | 33 | |
| 32 | 34 | /** |
| 33 | 35 | * 时间 HH:mm |
| ... | ... | @@ -113,4 +115,12 @@ public class Directive { |
| 113 | 115 | public void setSender(String sender) { |
| 114 | 116 | this.sender = sender; |
| 115 | 117 | } |
| 118 | + | |
| 119 | + public String getRq() { | |
| 120 | + return rq; | |
| 121 | + } | |
| 122 | + | |
| 123 | + public void setRq(String rq) { | |
| 124 | + this.rq = rq; | |
| 125 | + } | |
| 116 | 126 | } | ... | ... |
src/main/java/com/bsth/service/LineService.java
| 1 | 1 | package com.bsth.service; |
| 2 | 2 | |
| 3 | -import java.util.Map; | |
| 4 | - | |
| 5 | -import org.springframework.web.bind.annotation.RequestMapping; | |
| 6 | -import org.springframework.web.bind.annotation.RequestMethod; | |
| 7 | - | |
| 8 | 3 | import com.bsth.entity.Line; |
| 9 | 4 | |
| 5 | +import java.util.Map; | |
| 6 | + | |
| 10 | 7 | /** |
| 11 | 8 | * |
| 12 | 9 | * @Interface: LineService(线路service业务层实现接口) |
| ... | ... | @@ -38,4 +35,6 @@ public interface LineService extends BaseService<Line, Integer> { |
| 38 | 35 | String lineCodeVerification(String lineCode); |
| 39 | 36 | |
| 40 | 37 | Map<String, Object> update(Line l); |
| 38 | + | |
| 39 | + Map<String,Object> remove(Integer id); | |
| 41 | 40 | } | ... | ... |
src/main/java/com/bsth/service/impl/LineServiceImpl.java
| 1 | 1 | package com.bsth.service.impl; |
| 2 | 2 | |
| 3 | -import java.util.HashMap; | |
| 4 | -import java.util.Map; | |
| 5 | - | |
| 6 | -import org.springframework.beans.factory.annotation.Autowired; | |
| 7 | -import org.springframework.stereotype.Service; | |
| 8 | -import org.springframework.transaction.annotation.Transactional; | |
| 9 | - | |
| 10 | 3 | import com.bsth.common.ResponseCode; |
| 11 | 4 | import com.bsth.entity.Line; |
| 12 | 5 | import com.bsth.repository.LineRepository; |
| 13 | 6 | import com.bsth.service.LineService; |
| 7 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 8 | +import org.springframework.jdbc.core.JdbcTemplate; | |
| 9 | +import org.springframework.stereotype.Service; | |
| 10 | +import org.springframework.transaction.annotation.Transactional; | |
| 11 | + | |
| 12 | +import java.util.HashMap; | |
| 13 | +import java.util.Map; | |
| 14 | 14 | |
| 15 | 15 | /** |
| 16 | 16 | * |
| ... | ... | @@ -34,6 +34,9 @@ public class LineServiceImpl extends BaseServiceImpl<Line, Integer> implements L |
| 34 | 34 | @Autowired |
| 35 | 35 | private LineRepository repository; |
| 36 | 36 | |
| 37 | + @Autowired | |
| 38 | + JdbcTemplate jdbcTemplate; | |
| 39 | + | |
| 37 | 40 | /** |
| 38 | 41 | * 获取线路编码 |
| 39 | 42 | * |
| ... | ... | @@ -86,4 +89,32 @@ public class LineServiceImpl extends BaseServiceImpl<Line, Integer> implements L |
| 86 | 89 | return map; |
| 87 | 90 | } |
| 88 | 91 | |
| 92 | + @Override | |
| 93 | + public Map<String, Object> remove(Integer id) { | |
| 94 | + Map<String, Object> map = new HashMap<>(); | |
| 95 | + | |
| 96 | + try{ | |
| 97 | + if(null == id){ | |
| 98 | + map.put("status", ResponseCode.ERROR); | |
| 99 | + map.put("msg", "参数异常"); | |
| 100 | + return map; | |
| 101 | + } | |
| 102 | + | |
| 103 | + int destroy = jdbcTemplate.queryForObject("select destroy from bsth_c_line where id=" + id, Integer.class); | |
| 104 | + | |
| 105 | + if(destroy==0){ | |
| 106 | + map.put("status", ResponseCode.ERROR); | |
| 107 | + map.put("msg", "你只能删除已撤销的线路!"); | |
| 108 | + return map; | |
| 109 | + } | |
| 110 | + | |
| 111 | + jdbcTemplate.update("update bsth_c_line set `remove`=1 where id=?", id); | |
| 112 | + map.put("status", ResponseCode.SUCCESS); | |
| 113 | + }catch (Exception e){ | |
| 114 | + logger.error("", e); | |
| 115 | + map.put("status", ResponseCode.ERROR); | |
| 116 | + map.put("msg", e.getMessage()); | |
| 117 | + } | |
| 118 | + return map; | |
| 119 | + } | |
| 89 | 120 | } | ... | ... |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| ... | ... | @@ -1234,7 +1234,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 1234 | 1234 | ScheduleModifyLogger.sftz(sch, fcsjActual, remarks); |
| 1235 | 1235 | |
| 1236 | 1236 | sch.setFcsjActualAll(fcsjActual); |
| 1237 | - sch.addRemarks(remarks); | |
| 1237 | + sch.setRemark(remarks); | |
| 1238 | 1238 | sch.calcStatus(); |
| 1239 | 1239 | //if(sch.isLate2()){ |
| 1240 | 1240 | //取消应发未到标记 | ... | ... |
src/main/resources/static/pages/base/line/js/line-list-table.js
src/main/resources/static/pages/base/line/list.html
| 1 | 1 | <!-- <link href="/pages/base/line/css/animate.css" rel="stylesheet" type="text/css" /> |
| 2 | 2 | <link href="/pages/base/line/css/tipso.css" rel="stylesheet" type="text/css" /> --> |
| 3 | 3 | <!-- 片段标题 START --> |
| 4 | +<style> | |
| 5 | + a.ct_base_line_delete_link{ | |
| 6 | + font-size: 12px; | |
| 7 | + color: red; | |
| 8 | + vertical-align: bottom; | |
| 9 | + display: inline-block; | |
| 10 | + margin-left: 5px; | |
| 11 | + text-decoration: underline; | |
| 12 | + } | |
| 13 | + | |
| 14 | + a.ct_base_line_delete_link:hover{ | |
| 15 | + color: #d11608; | |
| 16 | + } | |
| 17 | +</style> | |
| 4 | 18 | <div class="page-head"> |
| 5 | 19 | <div class="page-title"> |
| 6 | 20 | <h1>线路信息</h1> |
| ... | ... | @@ -355,6 +369,10 @@ |
| 355 | 369 | <td> |
| 356 | 370 | <a href="details.html?no={{obj.id}}" class="btn default blue-stripe btn-sm" data-pjax> 详细 </a> |
| 357 | 371 | <a href="edit.html?no={{obj.id}}" class="btn default blue-stripe btn-sm" data-pjax> 修改 </a> |
| 372 | + | |
| 373 | + {{if obj.destroy==1}} | |
| 374 | + <a class="ct_base_line_delete_link" data-id="{{obj.id}}" data-name="{{obj.name}}"> 删除 </a> | |
| 375 | + {{/if}} | |
| 358 | 376 | </td> |
| 359 | 377 | </tr> |
| 360 | 378 | {{/each}} |
| ... | ... | @@ -365,4 +383,23 @@ |
| 365 | 383 | {{/if}} |
| 366 | 384 | </script> |
| 367 | 385 | <!-- 线路信息片段JS模块 --> |
| 368 | -<script src="/pages/base/line/js/line-list-table.js"></script> | |
| 369 | 386 | \ No newline at end of file |
| 387 | +<script src="/pages/base/line/js/line-list-table.js"></script> | |
| 388 | +<script> | |
| 389 | + (function () { | |
| 390 | + $(document).on('click', 'a.ct_base_line_delete_link', function () { | |
| 391 | + var id = $(this).data('id'), | |
| 392 | + name = $(this).data('name'); | |
| 393 | + | |
| 394 | + layer.confirm('你确定要删除线路【'+name+'】?', { | |
| 395 | + btn: ['确定删除','取消'] //按钮 | |
| 396 | + }, function(){ | |
| 397 | + layer.msg('操作中...', {icon: 16,shade: 0.01}); | |
| 398 | + $post('/line/remove', {id: id}, function (rs) { | |
| 399 | + layer.msg('删除成功!'); | |
| 400 | + $('.filter-submit.margin-bottom').trigger('click'); | |
| 401 | + }); | |
| 402 | + | |
| 403 | + }); | |
| 404 | + }); | |
| 405 | + })(); | |
| 406 | +</script> | |
| 370 | 407 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/base/timesmodel/js/v2/ParameterObj.js
| ... | ... | @@ -390,9 +390,18 @@ var ParameterObj = function() { |
| 390 | 390 | */ |
| 391 | 391 | getUpLastDtimeObj: function() { |
| 392 | 392 | _validInternal(); // 验证 |
| 393 | - return this.toTimeObj( | |
| 393 | + var oStartTime = this.toTimeObj( | |
| 394 | + _firstLastDepartureTimeStrObj.up.firstVehicleDepartureTimeStr | |
| 395 | + ); | |
| 396 | + var oEndTime = this.toTimeObj( | |
| 394 | 397 | _firstLastDepartureTimeStrObj.up.lastVehicleDepartureTimeStr |
| 395 | 398 | ); |
| 399 | + if (oEndTime.isBefore(oStartTime)) { | |
| 400 | + // 如果末班车时间早于首班车时间,则末班车时间跨天,需要加1天 | |
| 401 | + oEndTime.add(1, "day"); | |
| 402 | + } | |
| 403 | + | |
| 404 | + return oEndTime; | |
| 396 | 405 | }, |
| 397 | 406 | /** |
| 398 | 407 | * 获取下行首班时间对象。 |
| ... | ... | @@ -410,9 +419,18 @@ var ParameterObj = function() { |
| 410 | 419 | */ |
| 411 | 420 | getDownLastDTimeObj: function() { |
| 412 | 421 | _validInternal(); // 验证 |
| 413 | - return this.toTimeObj( | |
| 422 | + var oStartTime = this.toTimeObj( | |
| 423 | + _firstLastDepartureTimeStrObj.down.firstVehicleDepartureTimeStr | |
| 424 | + ); | |
| 425 | + var oEndTime = this.toTimeObj( | |
| 414 | 426 | _firstLastDepartureTimeStrObj.down.lastVehicleDepartureTimeStr |
| 415 | 427 | ); |
| 428 | + if (oEndTime.isBefore(oStartTime)) { | |
| 429 | + // 如果末班车时间早于首班车时间,则末班车时间跨天,需要加1天 | |
| 430 | + oEndTime.add(1, "day"); | |
| 431 | + } | |
| 432 | + | |
| 433 | + return oEndTime; | |
| 416 | 434 | }, |
| 417 | 435 | |
| 418 | 436 | //-------------- 获取吃饭时间 ----------------// | ... | ... |
src/main/resources/static/pages/mforms/singledatas/jquery.table2excel.min.js
| 1 | -/* | |
| 2 | - * jQuery table2excel - v1.1.1 | |
| 3 | - * jQuery plugin to export an .xls file in browser from an HTML table | |
| 4 | - * https://github.com/rainabba/jquery-table2excel | |
| 5 | - * | |
| 6 | - * Made by rainabba | |
| 7 | - * Under MIT License | |
| 8 | - */ | |
| 1 | +/* | |
| 2 | + * jQuery table2excel - v1.1.1 | |
| 3 | + * jQuery plugin to export an .xls file in browser from an HTML table | |
| 4 | + * https://github.com/rainabba/jquery-table2excel | |
| 5 | + * | |
| 6 | + * Made by rainabba | |
| 7 | + * Under MIT License | |
| 8 | + */ | |
| 9 | 9 | !function(a,b,c,d){function e(b,c){this.element=b,this.settings=a.extend({},k,c),this._defaults=k,this._name=j,this.init()}function f(a){return a.filename?a.filename:"table2excel"}function g(a){var b=/(\s+alt\s*=\s*"([^"]*)"|\s+alt\s*=\s*'([^']*)')/i;return a.replace(/<img[^>]*>/gi,function(a){var c=b.exec(a);return null!==c&&c.length>=2?c[2]:""})}function h(a){return a.replace(/<a[^>]*>|<\/a>/gi,"")}function i(a){var b=/(\s+value\s*=\s*"([^"]*)"|\s+value\s*=\s*'([^']*)')/i;return a.replace(/<input[^>]*>|<\/input>/gi,function(a){var c=b.exec(a);return null!==c&&c.length>=2?c[2]:""})}var j="table2excel",k={exclude:".noExl",name:"Table2Excel",filename:"table2excel",fileext:".xls",exclude_img:!0,exclude_links:!0,exclude_inputs:!0};e.prototype={init:function(){var b=this;b.template={head:'<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><meta http-equiv="content-type" content="application/vnd.ms-excel; charset=UTF-8"><head>\x3c!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets>',sheet:{head:"<x:ExcelWorksheet><x:Name>",tail:"</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet>"},mid:"</x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--\x3e</head><body>",table:{head:"<table>",tail:"</table>"},foot:"</body></html>"},b.tableRows=[],a(b.element).each(function(c,d){var e="";a(d).find("tr").not(b.settings.exclude).each(function(c,d){e+="<tr>",a(d).find("td,th").not(b.settings.exclude).each(function(c,d){var f={rows:a(this).attr("rowspan"),cols:a(this).attr("colspan"),flag:a(d).find(b.settings.exclude)};f.flag.length>0?e+="<td> </td>":f.rows&f.cols?e+="<td>"+a(d).html()+"</td>":(e+="<td",f.rows>0&&(e+=" rowspan='"+f.rows+"' "),f.cols>0&&(e+=" colspan='"+f.cols+"' "),e+="/>"+a(d).html()+"</td>")}),e+="</tr>"}),b.settings.exclude_img&&(e=g(e)),b.settings.exclude_links&&(e=h(e)),b.settings.exclude_inputs&&(e=i(e)),b.tableRows.push(e)}),b.tableToExcel(b.tableRows,b.settings.name,b.settings.sheetName)},tableToExcel:function(d,e,g){var h,i,j,k=this,l="";if(k.format=function(a,b){return a.replace(/{(\w+)}/g,function(a,c){return b[c]})},g=void 0===g?"Sheet":g,k.ctx={worksheet:e||"Worksheet",table:d,sheetName:g},l=k.template.head,a.isArray(d))for(h in d)l+=k.template.sheet.head+g+h+k.template.sheet.tail;if(l+=k.template.mid,a.isArray(d))for(h in d)l+=k.template.table.head+"{table"+h+"}"+k.template.table.tail;l+=k.template.foot;for(h in d)k.ctx["table"+h]=d[h];if(delete k.ctx.table,!c.documentMode){var m=new Blob([k.format(l,k.ctx)],{type:"application/vnd.ms-excel"});b.URL=b.URL||b.webkitURL,i=b.URL.createObjectURL(m),j=c.createElement("a"),j.download=f(k.settings),j.href=i,c.body.appendChild(j),j.click(),c.body.removeChild(j)}else if("undefined"!=typeof Blob){l=k.format(l,k.ctx),l=[l];var n=new Blob(l,{type:"text/html"});b.navigator.msSaveBlob(n,f(k.settings))}else txtArea1.document.open("text/html","replace"),txtArea1.document.write(k.format(l,k.ctx)),txtArea1.document.close(),txtArea1.focus(),sa=txtArea1.document.execCommand("SaveAs",!0,f(k.settings));return!0}},a.fn[j]=function(b){var c=this;return c.each(function(){a.data(c,"plugin_"+j)||a.data(c,"plugin_"+j,new e(this,b))}),c}}(jQuery,window,document); |
| 10 | 10 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/summary/temp_sch_detail/list.html
src/main/resources/static/real_control_v2/css/main.css
| ... | ... | @@ -338,6 +338,9 @@ svg.line-chart g.merge-item text { |
| 338 | 338 | .tooltip span.field { |
| 339 | 339 | color: #7d7d7b; |
| 340 | 340 | margin-right: 5px; |
| 341 | + width: 52px; | |
| 342 | + display: inline-block; | |
| 343 | + text-align: right; | |
| 341 | 344 | } |
| 342 | 345 | |
| 343 | 346 | .tooltip .tip_map_wrap { |
| ... | ... | @@ -2026,4 +2029,10 @@ dl.active > dd.disabled { |
| 2026 | 2029 | 100% { |
| 2027 | 2030 | background: rgba(254, 235, 69, 0.38); |
| 2028 | 2031 | } |
| 2032 | +} | |
| 2033 | + | |
| 2034 | +.home_svg_tips>div{ | |
| 2035 | + overflow: hidden; | |
| 2036 | + text-overflow: ellipsis; | |
| 2037 | + white-space: nowrap; | |
| 2029 | 2038 | } |
| 2030 | 2039 | \ No newline at end of file | ... | ... |
src/main/resources/static/real_control_v2/fragments/home/tooltip.html
| ... | ... | @@ -3,7 +3,7 @@ |
| 3 | 3 | <div class="tooltip" data-id="{{deviceId}}"> |
| 4 | 4 | <div class="tooltip-container"> |
| 5 | 5 | |
| 6 | - <div class="cont-text-panel"> | |
| 6 | + <div class="cont-text-panel home_svg_tips"> | |
| 7 | 7 | <div class="title"> |
| 8 | 8 | <a href="javascript:;" data-for="station" class="tip_modal"> |
| 9 | 9 | {{nbbm}} |
| ... | ... | @@ -21,7 +21,7 @@ |
| 21 | 21 | <div> |
| 22 | 22 | <span class="field">车牌号:</span>{{plateNo}} |
| 23 | 23 | </div> |
| 24 | - <div> | |
| 24 | + <div title="{{stationName}}"> | |
| 25 | 25 | <span class="field">站点:</span>{{stationName}} |
| 26 | 26 | </div> |
| 27 | 27 | <!-- <div> |
| ... | ... | @@ -30,9 +30,19 @@ |
| 30 | 30 | <div> |
| 31 | 31 | <span class="field">设备:</span>{{deviceId}} |
| 32 | 32 | </div> |
| 33 | - <div> | |
| 33 | + <!--<div> | |
| 34 | 34 | <span class="field">坐标:</span>{{lon}} {{lat}} |
| 35 | - </div> | |
| 35 | + </div>--> | |
| 36 | + {{if sch!=null}} | |
| 37 | + <div> | |
| 38 | + <span class="field">驾驶员:</span>{{sch.jGh}}/{{sch.jName}} | |
| 39 | + </div> | |
| 40 | + {{if sch.sGh!=null && sch.sGh!=""}} | |
| 41 | + <div> | |
| 42 | + <span class="field">售票员:</span>{{sch.sGh}}/{{sch.sName}} | |
| 43 | + </div> | |
| 44 | + {{/if}} | |
| 45 | + {{/if}} | |
| 36 | 46 | <div> |
| 37 | 47 | <span class="field">速度:</span>{{speed>99?'..':speed}}</div> |
| 38 | 48 | <div> | ... | ... |
src/main/resources/static/real_control_v2/fragments/north/nav/all_devices.html
| ... | ... | @@ -181,7 +181,7 @@ |
| 181 | 181 | if(lineCode) |
| 182 | 182 | data.lineId=lineCode; |
| 183 | 183 | } |
| 184 | - $.get('/gps/real/all', data, function(rs) { | |
| 184 | + $.get('/gps/real/all?t=' + Math.random(), data, function(rs) { | |
| 185 | 185 | //数据转换 |
| 186 | 186 | var code2Name=gb_data_basic.lineCode2NameAll(); |
| 187 | 187 | $.each(rs.list, function(){ | ... | ... |
src/main/resources/static/real_control_v2/fragments/north/nav/history_sch_maintain.html
| ... | ... | @@ -438,9 +438,9 @@ |
| 438 | 438 | }); |
| 439 | 439 | |
| 440 | 440 | //统计路单 -娄高峰 |
| 441 | - /*gb_common.$get('/calcWaybill/generateNew', {date:rq, line: lineCode}, function () { | |
| 441 | + gb_common.$get('/calcWaybill/generateNew', {date:rq, line: lineCode}, function () { | |
| 442 | 442 | reCountEp.emitLater('calcWaybill'); |
| 443 | - });*/ | |
| 443 | + }); | |
| 444 | 444 | |
| 445 | 445 | //统计油 -廖磊 |
| 446 | 446 | gb_common.$post('/ylb/updateHistory', {date:rq, line: lineCode}, function () { | ... | ... |
src/main/resources/static/real_control_v2/js/line_schedule/sch_table.js
src/main/resources/static/real_control_v2/mapmonitor/js/playback.js
| ... | ... | @@ -10,6 +10,18 @@ var gb_map_play_back = (function () { |
| 10 | 10 | dom = rs; |
| 11 | 11 | }); |
| 12 | 12 | |
| 13 | + var setParam = function (sch) { | |
| 14 | + console.log('sch', sch); | |
| 15 | + var f = $('.play-back-form form'), | |
| 16 | + st = (sch['fcsjActualTime']?sch['fcsjActualTime']:sch['dfsjT']) - 1000 * 60 * 5, | |
| 17 | + et = (sch['zdsjActualTime']?sch['zdsjActualTime']:sch['zdsjT']) + 1000 * 60 * 5, | |
| 18 | + fs = 'YYYY-MM-DD HH:mm'; | |
| 19 | + | |
| 20 | + $('[name=nbbm]', f).val(sch.clZbh); | |
| 21 | + $('[name=startTime]', f).val(moment(st).format(fs)); | |
| 22 | + $('[name=endTime]', f).val(moment(et).format(fs)); | |
| 23 | + }; | |
| 24 | + | |
| 13 | 25 | var initParams = function (deviceId, nbbm) { |
| 14 | 26 | //关闭infowindow |
| 15 | 27 | if (deviceId) |
| ... | ... | @@ -96,6 +108,7 @@ var gb_map_play_back = (function () { |
| 96 | 108 | |
| 97 | 109 | return { |
| 98 | 110 | initParams: initParams, |
| 99 | - listToExcel: listToExcel | |
| 111 | + listToExcel: listToExcel, | |
| 112 | + setParam: setParam | |
| 100 | 113 | } |
| 101 | 114 | })(); |
| 102 | 115 | \ No newline at end of file | ... | ... |