Commit c2fb320968d08cdae9e75e14529054fb2fc1fd0a
Merge branch 'minhang' into pudong
Showing
17 changed files
with
476 additions
and
161 deletions
src/main/java/com/bsth/XDApplication.java
| @@ -9,6 +9,7 @@ import com.bsth.data.gpsdata.thread.GpsDataLoaderThread; | @@ -9,6 +9,7 @@ import com.bsth.data.gpsdata.thread.GpsDataLoaderThread; | ||
| 9 | import com.bsth.data.gpsdata.thread.OfflineMonitorThread; | 9 | import com.bsth.data.gpsdata.thread.OfflineMonitorThread; |
| 10 | import com.bsth.data.msg_queue.DirectivePushQueue; | 10 | import com.bsth.data.msg_queue.DirectivePushQueue; |
| 11 | import com.bsth.data.msg_queue.WebSocketPushQueue; | 11 | import com.bsth.data.msg_queue.WebSocketPushQueue; |
| 12 | +import com.bsth.data.schedule.auto_exec.AutoExecScanThread; | ||
| 12 | import com.bsth.data.schedule.edit_logs.SeiPstThread; | 13 | import com.bsth.data.schedule.edit_logs.SeiPstThread; |
| 13 | import com.bsth.data.schedule.late_adjust.ScheduleLateThread; | 14 | import com.bsth.data.schedule.late_adjust.ScheduleLateThread; |
| 14 | import com.bsth.data.schedule.signal.SchSiginUpdateDBThread; | 15 | import com.bsth.data.schedule.signal.SchSiginUpdateDBThread; |
| @@ -64,6 +65,8 @@ public class XDApplication implements CommandLineRunner { | @@ -64,6 +65,8 @@ public class XDApplication implements CommandLineRunner { | ||
| 64 | SampleTimeDataLoader sampleTimeDataLoader; | 65 | SampleTimeDataLoader sampleTimeDataLoader; |
| 65 | @Autowired | 66 | @Autowired |
| 66 | SchSiginUpdateDBThread schSiginUpdateDBThread; | 67 | SchSiginUpdateDBThread schSiginUpdateDBThread; |
| 68 | + @Autowired | ||
| 69 | + AutoExecScanThread autoExecScanThread; | ||
| 67 | 70 | ||
| 68 | private static long timeDiff; | 71 | private static long timeDiff; |
| 69 | private static long timeDiffTraffic; | 72 | private static long timeDiffTraffic; |
| @@ -111,6 +114,8 @@ public class XDApplication implements CommandLineRunner { | @@ -111,6 +114,8 @@ public class XDApplication implements CommandLineRunner { | ||
| 111 | //sexec.scheduleWithFixedDelay(gpsDataLoader, 30, 2, TimeUnit.SECONDS); | 114 | //sexec.scheduleWithFixedDelay(gpsDataLoader, 30, 2, TimeUnit.SECONDS); |
| 112 | //实际排班更新线程 | 115 | //实际排班更新线程 |
| 113 | //sexec.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS); | 116 | //sexec.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS); |
| 117 | + //sexec.scheduleWithFixedDelay(autoExecScanThread, 100, 50, TimeUnit.SECONDS);//班次自动执行 | ||
| 118 | + //WebSocketPushQueue.start();//消息队列 -webSocket ,推送至线调web页面的 | ||
| 114 | //实际排班延迟入库线程 | 119 | //实际排班延迟入库线程 |
| 115 | //sexec.scheduleWithFixedDelay(schedulePstThread, 60, 15, TimeUnit.SECONDS); | 120 | //sexec.scheduleWithFixedDelay(schedulePstThread, 60, 15, TimeUnit.SECONDS); |
| 116 | //班次修正日志延迟入库 | 121 | //班次修正日志延迟入库 |
| @@ -137,6 +142,7 @@ public class XDApplication implements CommandLineRunner { | @@ -137,6 +142,7 @@ public class XDApplication implements CommandLineRunner { | ||
| 137 | sexec.scheduleWithFixedDelay(threadMonotor, 240, 60, TimeUnit.SECONDS);//线程监听(防止重要的线程阻塞、异常结束。以及部分主备切换工作) | 142 | sexec.scheduleWithFixedDelay(threadMonotor, 240, 60, TimeUnit.SECONDS);//线程监听(防止重要的线程阻塞、异常结束。以及部分主备切换工作) |
| 138 | sexec.scheduleWithFixedDelay(sampleTimeDataLoader, 140, 120 * 60, TimeUnit.SECONDS);//到离站预测需要的站点间耗时数据 | 143 | sexec.scheduleWithFixedDelay(sampleTimeDataLoader, 140, 120 * 60, TimeUnit.SECONDS);//到离站预测需要的站点间耗时数据 |
| 139 | sexec.scheduleWithFixedDelay(basicDataLoader, 2, 2, TimeUnit.HOURS);//基础数据更新 | 144 | sexec.scheduleWithFixedDelay(basicDataLoader, 2, 2, TimeUnit.HOURS);//基础数据更新 |
| 145 | + sexec.scheduleWithFixedDelay(autoExecScanThread, 160, 50, TimeUnit.SECONDS);//班次自动执行 | ||
| 140 | DirectivePushQueue.start();//消息队列 -指令,系统下发的 | 146 | DirectivePushQueue.start();//消息队列 -指令,系统下发的 |
| 141 | WebSocketPushQueue.start();//消息队列 -webSocket ,推送至线调web页面的 | 147 | WebSocketPushQueue.start();//消息队列 -webSocket ,推送至线调web页面的 |
| 142 | 148 |
src/main/java/com/bsth/controller/realcontrol/LineConfigController.java
| @@ -116,4 +116,9 @@ public class LineConfigController extends BaseController<LineConfig, Integer>{ | @@ -116,4 +116,9 @@ public class LineConfigController extends BaseController<LineConfig, Integer>{ | ||
| 116 | public Map<String, Object> parkAndStationSet(@RequestParam Map<String, String> map){ | 116 | public Map<String, Object> parkAndStationSet(@RequestParam Map<String, String> map){ |
| 117 | return lineConfigService.parkAndStationSet(map); | 117 | return lineConfigService.parkAndStationSet(map); |
| 118 | } | 118 | } |
| 119 | + | ||
| 120 | + @RequestMapping(value = "/setAutoExec", method = RequestMethod.POST) | ||
| 121 | + public Map<String, Object> setAutoExec(@RequestParam Map<String, String> map){ | ||
| 122 | + return lineConfigService.setAutoExec(map); | ||
| 123 | + } | ||
| 119 | } | 124 | } |
src/main/java/com/bsth/controller/realcontrol/summary/DestroySituationController.java
0 → 100644
| 1 | +package com.bsth.controller.realcontrol.summary; | ||
| 2 | + | ||
| 3 | +import com.bsth.controller.BaseController; | ||
| 4 | +import com.bsth.data.summary.entity.DestroySituation; | ||
| 5 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 6 | +import org.springframework.web.bind.annotation.RestController; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * Created by panzhao on 2017/11/1. | ||
| 10 | + */ | ||
| 11 | +@RestController | ||
| 12 | +@RequestMapping("/summary/destroy_detail") | ||
| 13 | +public class DestroySituationController extends BaseController<DestroySituation, Long> { | ||
| 14 | +} |
src/main/java/com/bsth/data/schedule/auto_exec/AutoExecScanThread.java
0 → 100644
| 1 | +package com.bsth.data.schedule.auto_exec; | ||
| 2 | + | ||
| 3 | +import com.bsth.data.LineConfigData; | ||
| 4 | +import com.bsth.data.schedule.DayOfSchedule; | ||
| 5 | +import com.bsth.entity.realcontrol.LineConfig; | ||
| 6 | +import com.bsth.entity.realcontrol.ScheduleRealInfo; | ||
| 7 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 8 | +import org.springframework.stereotype.Component; | ||
| 9 | + | ||
| 10 | +import java.util.ArrayList; | ||
| 11 | +import java.util.Collection; | ||
| 12 | +import java.util.List; | ||
| 13 | + | ||
| 14 | +/** | ||
| 15 | + * 班次自动执行扫描线程 | ||
| 16 | + * Created by panzhao on 2017/10/31. | ||
| 17 | + */ | ||
| 18 | +@Component | ||
| 19 | +public class AutoExecScanThread extends Thread{ | ||
| 20 | + | ||
| 21 | + | ||
| 22 | + @Autowired | ||
| 23 | + LineConfigData lineConfigData; | ||
| 24 | + | ||
| 25 | + @Autowired | ||
| 26 | + DayOfSchedule dayOfSchedule; | ||
| 27 | + | ||
| 28 | + @Autowired | ||
| 29 | + RealScheduleAutoExecHandler realScheduleAutoExecHandler; | ||
| 30 | + | ||
| 31 | + @Override | ||
| 32 | + public void run() { | ||
| 33 | + //要自动执行的线路 | ||
| 34 | + List<String> autos = new ArrayList<>(); | ||
| 35 | + Collection<LineConfig> lcs = lineConfigData.getAll(); | ||
| 36 | + | ||
| 37 | + for(LineConfig config : lcs){ | ||
| 38 | + if(config.isAutoExec()){ | ||
| 39 | + autos.add(config.getLine().getLineCode()); | ||
| 40 | + } | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | + if(autos.size()==0) | ||
| 44 | + return; | ||
| 45 | + List<ScheduleRealInfo> all = new ArrayList<>(dayOfSchedule.findAll()); | ||
| 46 | + for(ScheduleRealInfo sch : all){ | ||
| 47 | + if(autos.contains(sch.getXlBm())){ | ||
| 48 | + realScheduleAutoExecHandler.exec(sch); | ||
| 49 | + } | ||
| 50 | + } | ||
| 51 | + } | ||
| 52 | +} |
src/main/java/com/bsth/data/schedule/auto_exec/RealScheduleAutoExecHandler.java
0 → 100644
| 1 | +package com.bsth.data.schedule.auto_exec; | ||
| 2 | + | ||
| 3 | +import com.bsth.data.schedule.DayOfSchedule; | ||
| 4 | +import com.bsth.entity.realcontrol.ScheduleRealInfo; | ||
| 5 | +import com.bsth.websocket.handler.SendUtils; | ||
| 6 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 7 | +import org.springframework.stereotype.Component; | ||
| 8 | + | ||
| 9 | +import java.util.ArrayList; | ||
| 10 | +import java.util.List; | ||
| 11 | + | ||
| 12 | +/** | ||
| 13 | + * 实际班次自动执行 | ||
| 14 | + * Created by panzhao on 2017/10/31. | ||
| 15 | + */ | ||
| 16 | +@Component | ||
| 17 | +public class RealScheduleAutoExecHandler { | ||
| 18 | + | ||
| 19 | + @Autowired | ||
| 20 | + SendUtils sendUtils; | ||
| 21 | + @Autowired | ||
| 22 | + DayOfSchedule dayOfSchedule; | ||
| 23 | + | ||
| 24 | + | ||
| 25 | + public void exec(ScheduleRealInfo sch) { | ||
| 26 | + boolean flag = false; | ||
| 27 | + long t = System.currentTimeMillis(); | ||
| 28 | + | ||
| 29 | + if (sch.getDfsjT() < t) { | ||
| 30 | + sch.setFcsjActualAll(sch.getDfsjT()); | ||
| 31 | + flag = true; | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | + if (sch.getZdsjT() < t) { | ||
| 35 | + sch.setZdsjActualAll(sch.getZdsjT()); | ||
| 36 | + ScheduleRealInfo next = dayOfSchedule.nextByLp(sch); | ||
| 37 | + if (null != next) { | ||
| 38 | + next.setQdzArrDatesj(sch.getZdsjActual()); | ||
| 39 | + | ||
| 40 | + List<ScheduleRealInfo> refs = new ArrayList<>(); | ||
| 41 | + refs.add(sch); | ||
| 42 | + refs.add(next); | ||
| 43 | + sendUtils.refreshSch(refs); | ||
| 44 | + return; | ||
| 45 | + } | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + if (flag) { | ||
| 49 | + sendUtils.refreshSch(sch); | ||
| 50 | + } | ||
| 51 | + } | ||
| 52 | +} |
src/main/java/com/bsth/data/summary/entity/DestroySituation.java
0 → 100644
| 1 | +package com.bsth.data.summary.entity; | ||
| 2 | + | ||
| 3 | +import javax.persistence.Entity; | ||
| 4 | +import javax.persistence.Id; | ||
| 5 | +import javax.persistence.Table; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * 烂班情况 | ||
| 9 | + * Created by panzhao on 2017/10/31. | ||
| 10 | + */ | ||
| 11 | +@Entity | ||
| 12 | +@Table(name = "z_calc_destroy_detail") | ||
| 13 | +public class DestroySituation { | ||
| 14 | + | ||
| 15 | + @Id | ||
| 16 | + private Long id; | ||
| 17 | + | ||
| 18 | + private String rq; | ||
| 19 | + | ||
| 20 | + private String gsBm; | ||
| 21 | + | ||
| 22 | + private String fgsBm; | ||
| 23 | + | ||
| 24 | + private String lineCode; | ||
| 25 | + | ||
| 26 | + private String lineName; | ||
| 27 | + | ||
| 28 | + private String nbbm; | ||
| 29 | + | ||
| 30 | + private String jGh; | ||
| 31 | + | ||
| 32 | + private String sGh; | ||
| 33 | + | ||
| 34 | + private String reason; | ||
| 35 | + | ||
| 36 | + private int size; | ||
| 37 | + | ||
| 38 | + private Double mileage; | ||
| 39 | + | ||
| 40 | + private Long t; | ||
| 41 | + | ||
| 42 | + private String remark; | ||
| 43 | + | ||
| 44 | + private String idsStr; | ||
| 45 | + | ||
| 46 | + public Long getId() { | ||
| 47 | + return id; | ||
| 48 | + } | ||
| 49 | + | ||
| 50 | + public void setId(Long id) { | ||
| 51 | + this.id = id; | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + public String getRq() { | ||
| 55 | + return rq; | ||
| 56 | + } | ||
| 57 | + | ||
| 58 | + public void setRq(String rq) { | ||
| 59 | + this.rq = rq; | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + public String getLineCode() { | ||
| 63 | + return lineCode; | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + public void setLineCode(String lineCode) { | ||
| 67 | + this.lineCode = lineCode; | ||
| 68 | + } | ||
| 69 | + | ||
| 70 | + public String getLineName() { | ||
| 71 | + return lineName; | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + public void setLineName(String lineName) { | ||
| 75 | + this.lineName = lineName; | ||
| 76 | + } | ||
| 77 | + | ||
| 78 | + public String getNbbm() { | ||
| 79 | + return nbbm; | ||
| 80 | + } | ||
| 81 | + | ||
| 82 | + public void setNbbm(String nbbm) { | ||
| 83 | + this.nbbm = nbbm; | ||
| 84 | + } | ||
| 85 | + | ||
| 86 | + public String getjGh() { | ||
| 87 | + return jGh; | ||
| 88 | + } | ||
| 89 | + | ||
| 90 | + public void setjGh(String jGh) { | ||
| 91 | + this.jGh = jGh; | ||
| 92 | + } | ||
| 93 | + | ||
| 94 | + public String getsGh() { | ||
| 95 | + return sGh; | ||
| 96 | + } | ||
| 97 | + | ||
| 98 | + public void setsGh(String sGh) { | ||
| 99 | + this.sGh = sGh; | ||
| 100 | + } | ||
| 101 | + | ||
| 102 | + public String getReason() { | ||
| 103 | + return reason; | ||
| 104 | + } | ||
| 105 | + | ||
| 106 | + public void setReason(String reason) { | ||
| 107 | + this.reason = reason; | ||
| 108 | + } | ||
| 109 | + | ||
| 110 | + public int getSize() { | ||
| 111 | + return size; | ||
| 112 | + } | ||
| 113 | + | ||
| 114 | + public void setSize(int size) { | ||
| 115 | + this.size = size; | ||
| 116 | + } | ||
| 117 | + | ||
| 118 | + public Double getMileage() { | ||
| 119 | + return mileage; | ||
| 120 | + } | ||
| 121 | + | ||
| 122 | + public void setMileage(Double mileage) { | ||
| 123 | + this.mileage = mileage; | ||
| 124 | + } | ||
| 125 | + | ||
| 126 | + public Long getT() { | ||
| 127 | + return t; | ||
| 128 | + } | ||
| 129 | + | ||
| 130 | + public void setT(Long t) { | ||
| 131 | + this.t = t; | ||
| 132 | + } | ||
| 133 | + | ||
| 134 | + public String getRemark() { | ||
| 135 | + return remark; | ||
| 136 | + } | ||
| 137 | + | ||
| 138 | + public void setRemark(String remark) { | ||
| 139 | + this.remark = remark; | ||
| 140 | + } | ||
| 141 | + | ||
| 142 | + public String getIdsStr() { | ||
| 143 | + return idsStr; | ||
| 144 | + } | ||
| 145 | + | ||
| 146 | + public void setIdsStr(String idsStr) { | ||
| 147 | + this.idsStr = idsStr; | ||
| 148 | + } | ||
| 149 | + | ||
| 150 | + public String getGsBm() { | ||
| 151 | + return gsBm; | ||
| 152 | + } | ||
| 153 | + | ||
| 154 | + public void setGsBm(String gsBm) { | ||
| 155 | + this.gsBm = gsBm; | ||
| 156 | + } | ||
| 157 | + | ||
| 158 | + public String getFgsBm() { | ||
| 159 | + return fgsBm; | ||
| 160 | + } | ||
| 161 | + | ||
| 162 | + public void setFgsBm(String fgsBm) { | ||
| 163 | + this.fgsBm = fgsBm; | ||
| 164 | + } | ||
| 165 | +} |
src/main/java/com/bsth/data/summary/repository/DestroySituationRepository.java
0 → 100644
| 1 | +package com.bsth.data.summary.repository; | ||
| 2 | + | ||
| 3 | +import com.bsth.data.summary.entity.DestroySituation; | ||
| 4 | +import com.bsth.repository.BaseRepository; | ||
| 5 | +import org.springframework.stereotype.Repository; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * Created by panzhao on 2017/11/1. | ||
| 9 | + */ | ||
| 10 | +@Repository | ||
| 11 | +public interface DestroySituationRepository extends BaseRepository<DestroySituation, Long> { | ||
| 12 | +} |
src/main/java/com/bsth/data/summary/service/DestroySituationService.java
0 → 100644
src/main/java/com/bsth/data/summary/service/impl/DestroySituationServiceImpl.java
0 → 100644
| 1 | +package com.bsth.data.summary.service.impl; | ||
| 2 | + | ||
| 3 | +import com.bsth.data.summary.entity.DestroySituation; | ||
| 4 | +import com.bsth.data.summary.service.DestroySituationService; | ||
| 5 | +import com.bsth.service.impl.BaseServiceImpl; | ||
| 6 | +import org.springframework.stereotype.Service; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * Created by panzhao on 2017/11/1. | ||
| 10 | + */ | ||
| 11 | +@Service | ||
| 12 | +public class DestroySituationServiceImpl extends BaseServiceImpl<DestroySituation, Long> implements DestroySituationService { | ||
| 13 | +} |
src/main/java/com/bsth/entity/realcontrol/LineConfig.java
| @@ -65,6 +65,8 @@ public class LineConfig { | @@ -65,6 +65,8 @@ public class LineConfig { | ||
| 65 | /** 原线路回场 */ | 65 | /** 原线路回场 */ |
| 66 | private boolean inParkForSource; | 66 | private boolean inParkForSource; |
| 67 | 67 | ||
| 68 | + private boolean autoExec; | ||
| 69 | + | ||
| 68 | /** | 70 | /** |
| 69 | * 到离站偏移值 | 71 | * 到离站偏移值 |
| 70 | */ | 72 | */ |
| @@ -294,4 +296,12 @@ public class LineConfig { | @@ -294,4 +296,12 @@ public class LineConfig { | ||
| 294 | public void setLockFirstOutTime(boolean lockFirstOutTime) { | 296 | public void setLockFirstOutTime(boolean lockFirstOutTime) { |
| 295 | this.lockFirstOutTime = lockFirstOutTime; | 297 | this.lockFirstOutTime = lockFirstOutTime; |
| 296 | } | 298 | } |
| 299 | + | ||
| 300 | + public boolean isAutoExec() { | ||
| 301 | + return autoExec; | ||
| 302 | + } | ||
| 303 | + | ||
| 304 | + public void setAutoExec(boolean autoExec) { | ||
| 305 | + this.autoExec = autoExec; | ||
| 306 | + } | ||
| 297 | } | 307 | } |
src/main/java/com/bsth/service/oil/impl/DlbServiceImpl.java
| @@ -2,33 +2,6 @@ package com.bsth.service.oil.impl; | @@ -2,33 +2,6 @@ package com.bsth.service.oil.impl; | ||
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | 4 | ||
| 5 | -import java.sql.ResultSet; | ||
| 6 | -import java.sql.SQLException; | ||
| 7 | -import java.text.DecimalFormat; | ||
| 8 | -import java.text.ParseException; | ||
| 9 | -import java.text.SimpleDateFormat; | ||
| 10 | -import java.util.ArrayList; | ||
| 11 | -import java.util.Calendar; | ||
| 12 | -import java.util.Collections; | ||
| 13 | -import java.util.Comparator; | ||
| 14 | -import java.util.Date; | ||
| 15 | -import java.util.HashMap; | ||
| 16 | -import java.util.Iterator; | ||
| 17 | -import java.util.List; | ||
| 18 | -import java.util.Map; | ||
| 19 | - | ||
| 20 | -import javax.transaction.Transactional; | ||
| 21 | - | ||
| 22 | -import org.apache.commons.lang3.StringEscapeUtils; | ||
| 23 | -import org.slf4j.Logger; | ||
| 24 | -import org.slf4j.LoggerFactory; | ||
| 25 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 26 | -import org.springframework.data.domain.Sort; | ||
| 27 | -import org.springframework.data.domain.Sort.Direction; | ||
| 28 | -import org.springframework.jdbc.core.JdbcTemplate; | ||
| 29 | -import org.springframework.jdbc.core.RowMapper; | ||
| 30 | -import org.springframework.stereotype.Service; | ||
| 31 | - | ||
| 32 | import com.alibaba.fastjson.JSONArray; | 5 | import com.alibaba.fastjson.JSONArray; |
| 33 | import com.alibaba.fastjson.JSONObject; | 6 | import com.alibaba.fastjson.JSONObject; |
| 34 | import com.bsth.common.ResponseCode; | 7 | import com.bsth.common.ResponseCode; |
| @@ -36,24 +9,34 @@ import com.bsth.data.BasicData; | @@ -36,24 +9,34 @@ import com.bsth.data.BasicData; | ||
| 36 | import com.bsth.entity.Cars; | 9 | import com.bsth.entity.Cars; |
| 37 | import com.bsth.entity.Line; | 10 | import com.bsth.entity.Line; |
| 38 | import com.bsth.entity.oil.Cdl; | 11 | import com.bsth.entity.oil.Cdl; |
| 39 | -import com.bsth.entity.oil.Cyl; | ||
| 40 | import com.bsth.entity.oil.Dlb; | 12 | import com.bsth.entity.oil.Dlb; |
| 41 | import com.bsth.entity.oil.Jdl; | 13 | import com.bsth.entity.oil.Jdl; |
| 42 | -import com.bsth.entity.oil.Ylb; | ||
| 43 | import com.bsth.entity.oil.Ylxxb; | 14 | import com.bsth.entity.oil.Ylxxb; |
| 44 | -import com.bsth.entity.search.CustomerSpecs; | ||
| 45 | import com.bsth.repository.CarsRepository; | 15 | import com.bsth.repository.CarsRepository; |
| 46 | import com.bsth.repository.oil.CdlRepository; | 16 | import com.bsth.repository.oil.CdlRepository; |
| 47 | -import com.bsth.repository.oil.CylRepository; | ||
| 48 | import com.bsth.repository.oil.DlbRepository; | 17 | import com.bsth.repository.oil.DlbRepository; |
| 49 | import com.bsth.repository.oil.JdlRepository; | 18 | import com.bsth.repository.oil.JdlRepository; |
| 50 | -import com.bsth.repository.oil.YlbRepository; | ||
| 51 | import com.bsth.repository.oil.YlxxbRepository; | 19 | import com.bsth.repository.oil.YlxxbRepository; |
| 52 | import com.bsth.service.impl.BaseServiceImpl; | 20 | import com.bsth.service.impl.BaseServiceImpl; |
| 53 | import com.bsth.service.oil.DlbService; | 21 | import com.bsth.service.oil.DlbService; |
| 54 | import com.bsth.service.realcontrol.ScheduleRealInfoService; | 22 | import com.bsth.service.realcontrol.ScheduleRealInfoService; |
| 55 | import com.bsth.util.Arith; | 23 | import com.bsth.util.Arith; |
| 56 | import com.bsth.util.BatchSaveUtils; | 24 | import com.bsth.util.BatchSaveUtils; |
| 25 | +import org.apache.commons.lang3.StringEscapeUtils; | ||
| 26 | +import org.slf4j.Logger; | ||
| 27 | +import org.slf4j.LoggerFactory; | ||
| 28 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 29 | +import org.springframework.jdbc.core.JdbcTemplate; | ||
| 30 | +import org.springframework.jdbc.core.RowMapper; | ||
| 31 | +import org.springframework.stereotype.Service; | ||
| 32 | + | ||
| 33 | +import javax.transaction.Transactional; | ||
| 34 | +import java.sql.ResultSet; | ||
| 35 | +import java.sql.SQLException; | ||
| 36 | +import java.text.DecimalFormat; | ||
| 37 | +import java.text.ParseException; | ||
| 38 | +import java.text.SimpleDateFormat; | ||
| 39 | +import java.util.*; | ||
| 57 | 40 | ||
| 58 | @Service | 41 | @Service |
| 59 | public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbService{ | 42 | public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbService{ |
| @@ -601,7 +584,6 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | @@ -601,7 +584,6 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | ||
| 601 | }else{ | 584 | }else{ |
| 602 | t.setUpdatetime(date); | 585 | t.setUpdatetime(date); |
| 603 | updateList.add(t); | 586 | updateList.add(t); |
| 604 | - ins += t.getId().toString()+","; | ||
| 605 | } | 587 | } |
| 606 | } | 588 | } |
| 607 | // repository.save(t); | 589 | // repository.save(t); |
src/main/java/com/bsth/service/realcontrol/LineConfigService.java
| @@ -26,4 +26,6 @@ public interface LineConfigService extends BaseService<LineConfig, Integer>{ | @@ -26,4 +26,6 @@ public interface LineConfigService extends BaseService<LineConfig, Integer>{ | ||
| 26 | Map<String,Object> parkAndStationSet(Map<String, String> map); | 26 | Map<String,Object> parkAndStationSet(Map<String, String> map); |
| 27 | 27 | ||
| 28 | Map<String,Object> findByIdx(String idx); | 28 | Map<String,Object> findByIdx(String idx); |
| 29 | + | ||
| 30 | + Map<String,Object> setAutoExec(Map<String, String> map); | ||
| 29 | } | 31 | } |
src/main/java/com/bsth/service/realcontrol/impl/LineConfigServiceImpl.java
| @@ -224,4 +224,25 @@ public class LineConfigServiceImpl extends BaseServiceImpl<LineConfig, Integer> | @@ -224,4 +224,25 @@ public class LineConfigServiceImpl extends BaseServiceImpl<LineConfig, Integer> | ||
| 224 | } | 224 | } |
| 225 | return rs; | 225 | return rs; |
| 226 | } | 226 | } |
| 227 | + | ||
| 228 | + @Override | ||
| 229 | + public Map<String, Object> setAutoExec(Map<String, String> map) { | ||
| 230 | + String lineCode = map.get("lineCode").toString(); | ||
| 231 | + boolean autoExec = Boolean.parseBoolean(map.get("autoExec").toString()); | ||
| 232 | + | ||
| 233 | + Map<String, Object> rs = new HashMap<>(); | ||
| 234 | + try { | ||
| 235 | + LineConfig conf = lineConfigData.get(lineCode); | ||
| 236 | + conf.setAutoExec(autoExec); | ||
| 237 | + | ||
| 238 | + lineConfigData.set(conf); | ||
| 239 | + rs.put("status", ResponseCode.SUCCESS); | ||
| 240 | + rs.put("conf", conf); | ||
| 241 | + } catch (Exception e) { | ||
| 242 | + rs.put("status", ResponseCode.ERROR); | ||
| 243 | + rs.put("msg", e.getMessage()); | ||
| 244 | + logger.error("", e); | ||
| 245 | + } | ||
| 246 | + return rs; | ||
| 247 | + } | ||
| 227 | } | 248 | } |
src/main/resources/static/pages/summary/destory_sch_detail/list.html
| @@ -42,67 +42,35 @@ | @@ -42,67 +42,35 @@ | ||
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | .ct_destroy_sch_table_width th:nth-of-type(1),.ct_destroy_sch_table_width td:nth-of-type(1){ | 44 | .ct_destroy_sch_table_width th:nth-of-type(1),.ct_destroy_sch_table_width td:nth-of-type(1){ |
| 45 | - width: 10%; | 45 | + width: 9%; |
| 46 | } | 46 | } |
| 47 | .ct_destroy_sch_table_width th:nth-of-type(2),.ct_destroy_sch_table_width td:nth-of-type(2){ | 47 | .ct_destroy_sch_table_width th:nth-of-type(2),.ct_destroy_sch_table_width td:nth-of-type(2){ |
| 48 | - width: 10%; | 48 | + width: 9%; |
| 49 | } | 49 | } |
| 50 | .ct_destroy_sch_table_width th:nth-of-type(3),.ct_destroy_sch_table_width td:nth-of-type(3){ | 50 | .ct_destroy_sch_table_width th:nth-of-type(3),.ct_destroy_sch_table_width td:nth-of-type(3){ |
| 51 | - width: 10%; | 51 | + width: 9%; |
| 52 | } | 52 | } |
| 53 | .ct_destroy_sch_table_width th:nth-of-type(4),.ct_destroy_sch_table_width td:nth-of-type(4){ | 53 | .ct_destroy_sch_table_width th:nth-of-type(4),.ct_destroy_sch_table_width td:nth-of-type(4){ |
| 54 | - width: 10%; | 54 | + width: 9%; |
| 55 | } | 55 | } |
| 56 | .ct_destroy_sch_table_width th:nth-of-type(5),.ct_destroy_sch_table_width td:nth-of-type(5){ | 56 | .ct_destroy_sch_table_width th:nth-of-type(5),.ct_destroy_sch_table_width td:nth-of-type(5){ |
| 57 | - width: 10%; | 57 | + width: 9%; |
| 58 | } | 58 | } |
| 59 | .ct_destroy_sch_table_width th:nth-of-type(6),.ct_destroy_sch_table_width td:nth-of-type(6){ | 59 | .ct_destroy_sch_table_width th:nth-of-type(6),.ct_destroy_sch_table_width td:nth-of-type(6){ |
| 60 | - width: 10%; | 60 | + width: 9%; |
| 61 | } | 61 | } |
| 62 | .ct_destroy_sch_table_width th:nth-of-type(7),.ct_destroy_sch_table_width td:nth-of-type(7){ | 62 | .ct_destroy_sch_table_width th:nth-of-type(7),.ct_destroy_sch_table_width td:nth-of-type(7){ |
| 63 | - width: 10%; | 63 | + width: 8%; |
| 64 | } | 64 | } |
| 65 | .ct_destroy_sch_table_width th:nth-of-type(8),.ct_destroy_sch_table_width td:nth-of-type(8){ | 65 | .ct_destroy_sch_table_width th:nth-of-type(8),.ct_destroy_sch_table_width td:nth-of-type(8){ |
| 66 | - width: 10%; | 66 | + width: 8%; |
| 67 | } | 67 | } |
| 68 | .ct_destroy_sch_table_width th:nth-of-type(9),.ct_destroy_sch_table_width td:nth-of-type(9){ | 68 | .ct_destroy_sch_table_width th:nth-of-type(9),.ct_destroy_sch_table_width td:nth-of-type(9){ |
| 69 | - width: 10%; | 69 | + width: 8%; |
| 70 | } | 70 | } |
| 71 | .ct_destroy_sch_table_width th:nth-of-type(10),.ct_destroy_sch_table_width td:nth-of-type(10){ | 71 | .ct_destroy_sch_table_width th:nth-of-type(10),.ct_destroy_sch_table_width td:nth-of-type(10){ |
| 72 | - width: 10%; | ||
| 73 | } | 72 | } |
| 74 | 73 | ||
| 75 | -/* .ct_table_wrap.day th:nth-of-type(1),.ct_table_wrap.day td:nth-of-type(1){ | ||
| 76 | - width: 10%; | ||
| 77 | - } | ||
| 78 | - .ct_table_wrap.day th:nth-of-type(2),.ct_table_wrap.day td:nth-of-type(2){ | ||
| 79 | - width: 10%; | ||
| 80 | - } | ||
| 81 | - .ct_table_wrap.day th:nth-of-type(3),.ct_table_wrap.day td:nth-of-type(3){ | ||
| 82 | - width: 10%; | ||
| 83 | - } | ||
| 84 | - .ct_table_wrap.day th:nth-of-type(4),.ct_table_wrap.day td:nth-of-type(4){ | ||
| 85 | - width: 10%; | ||
| 86 | - } | ||
| 87 | - .ct_table_wrap.day th:nth-of-type(5),.ct_table_wrap.day td:nth-of-type(5){ | ||
| 88 | - width: 5%; | ||
| 89 | - } | ||
| 90 | - .ct_table_wrap.day th:nth-of-type(6),.ct_table_wrap.day td:nth-of-type(6){ | ||
| 91 | - width: 15%; | ||
| 92 | - } | ||
| 93 | - .ct_table_wrap.day th:nth-of-type(7),.ct_table_wrap.day td:nth-of-type(7){ | ||
| 94 | - width: 10%; | ||
| 95 | - } | ||
| 96 | - .ct_table_wrap.day th:nth-of-type(8),.ct_table_wrap.day td:nth-of-type(8){ | ||
| 97 | - width: 10%; | ||
| 98 | - } | ||
| 99 | - .ct_table_wrap.day th:nth-of-type(9),.ct_table_wrap.day td:nth-of-type(9){ | ||
| 100 | - width: 10%; | ||
| 101 | - } | ||
| 102 | - .ct_table_wrap.day th:nth-of-type(10),.ct_table_wrap.day td:nth-of-type(10){ | ||
| 103 | - width: 10%; | ||
| 104 | - }*/ | ||
| 105 | - | ||
| 106 | .ct_search_form_wrap{ | 74 | .ct_search_form_wrap{ |
| 107 | border-bottom: 1px solid #e5e5e5; | 75 | border-bottom: 1px solid #e5e5e5; |
| 108 | padding: 10px 0 25px 10px; | 76 | padding: 10px 0 25px 10px; |
| @@ -163,7 +131,6 @@ | @@ -163,7 +131,6 @@ | ||
| 163 | <div class="ct_cont" > | 131 | <div class="ct_cont" > |
| 164 | <div class="ct_search_form_wrap"> | 132 | <div class="ct_search_form_wrap"> |
| 165 | <form> | 133 | <form> |
| 166 | - <input type="hidden" name="status_eq" value="-1"> | ||
| 167 | <div class="ct_field"> | 134 | <div class="ct_field"> |
| 168 | <label>公司: | 135 | <label>公司: |
| 169 | <select class="uk-select" name="gsBm_eq"> | 136 | <select class="uk-select" name="gsBm_eq"> |
| @@ -178,7 +145,7 @@ | @@ -178,7 +145,7 @@ | ||
| 178 | </div> | 145 | </div> |
| 179 | <div class="ct_field"> | 146 | <div class="ct_field"> |
| 180 | <label>线路: | 147 | <label>线路: |
| 181 | - <select class="uk-select" name="xlBm_eq"> | 148 | + <select class="uk-select" name="lineCode_eq"> |
| 182 | </select> | 149 | </select> |
| 183 | </label> | 150 | </label> |
| 184 | </div> | 151 | </div> |
| @@ -191,7 +158,7 @@ | @@ -191,7 +158,7 @@ | ||
| 191 | <button class="uk-button uk-button-primary search"><i uk-icon="icon: search"></i>搜索</button> | 158 | <button class="uk-button uk-button-primary search"><i uk-icon="icon: search"></i>搜索</button> |
| 192 | </div> | 159 | </div> |
| 193 | <div class="ct_field ct_field_bottom"> | 160 | <div class="ct_field ct_field_bottom"> |
| 194 | - <span uk-icon="icon: question" title="暂时只支持单线路查询,目前实时汇总。导出功能先等等" uk-tooltip="pos: bottom"></span> | 161 | + <span uk-icon="icon: question" title="导出功能先等等" uk-tooltip="pos: bottom"></span> |
| 195 | </div> | 162 | </div> |
| 196 | </form> | 163 | </form> |
| 197 | </div> | 164 | </div> |
| @@ -225,16 +192,16 @@ | @@ -225,16 +192,16 @@ | ||
| 225 | <script id="destroy_sch_list_temp" type="text/html"> | 192 | <script id="destroy_sch_list_temp" type="text/html"> |
| 226 | {{each list as obj i}} | 193 | {{each list as obj i}} |
| 227 | <tr> | 194 | <tr> |
| 228 | - <td>{{obj.scheduleDateStr}}</td> | ||
| 229 | - <td>{{obj.xlName}}</td> | ||
| 230 | - <td>{{obj.clZbh}}</td> | 195 | + <td>{{obj.rq}}</td> |
| 196 | + <td>{{obj.lineName}}</td> | ||
| 197 | + <td>{{obj.nbbm}}</td> | ||
| 231 | <td>{{obj.jGh}}</td> | 198 | <td>{{obj.jGh}}</td> |
| 232 | <td>{{obj.sGh}}</td> | 199 | <td>{{obj.sGh}}</td> |
| 233 | - <td>{{obj.adjustExps}}</td> | ||
| 234 | - <td><a>{{obj.destroySize}}</a></td> | ||
| 235 | - <td>{{obj.destroyMileageSum}}</td> | ||
| 236 | - <td>{{obj.dfsj}}</td> | ||
| 237 | - <td>{{obj.remarks}}</td> | 200 | + <td>{{obj.reason}}</td> |
| 201 | + <td><a>{{obj.size}}</a></td> | ||
| 202 | + <td>{{obj.mileage}}</td> | ||
| 203 | + <td>{{obj.timeStr}}</td> | ||
| 204 | + <td>{{obj.remark}}</td> | ||
| 238 | </tr> | 205 | </tr> |
| 239 | {{/each}} | 206 | {{/each}} |
| 240 | </script> | 207 | </script> |
| @@ -272,88 +239,28 @@ | @@ -272,88 +239,28 @@ | ||
| 272 | function query() { | 239 | function query() { |
| 273 | $('button.search', f).attr('disabled', 'disabled'); | 240 | $('button.search', f).attr('disabled', 'disabled'); |
| 274 | var data = f.serializeJSON(); | 241 | var data = f.serializeJSON(); |
| 275 | - //data.page = page; | ||
| 276 | - //data.size = pageSize; | ||
| 277 | - | 242 | + $('.ct_destroy_sch_table tbody').html(''); |
| 278 | //开始结束时间 | 243 | //开始结束时间 |
| 279 | - data.scheduleDateStr_ge = data.rq.substr(0, 10); | ||
| 280 | - data.scheduleDateStr_le = data.rq.substr(13); | ||
| 281 | - | 244 | + data.rq_ge = data.rq.substr(0, 10); |
| 245 | + data.rq_le = data.rq.substr(13); | ||
| 246 | + data.order='t'; | ||
| 282 | delete data.rq; | 247 | delete data.rq; |
| 283 | 248 | ||
| 284 | - $.get('/realSchedule/all', data, function (rs) { | ||
| 285 | - console.log('rs', rs); | 249 | + $.get('/summary/destroy_detail/all', data, function (rs) { |
| 286 | $('button.search', f).removeAttr('disabled'); | 250 | $('button.search', f).removeAttr('disabled'); |
| 287 | - | ||
| 288 | - //按线路、车、人、烂班原因分组 | ||
| 289 | - var groupData = {}, key; | 251 | + if(!rs || rs.length==0) |
| 252 | + return UIkit.notification('没有搜索到相关数据!!', 'danger'); | ||
| 290 | $.each(rs, function () { | 253 | $.each(rs, function () { |
| 291 | - key=this.xlBm+'_'+this.clZbh+'_'+this.jGh+'_'+this.adjustExps; | ||
| 292 | - if(!groupData[key]) | ||
| 293 | - groupData[key] = []; | ||
| 294 | - | ||
| 295 | - groupData[key].push(this); | 254 | + this.timeStr=moment(this.t).format('HH:mm') |
| 296 | }); | 255 | }); |
| 297 | 256 | ||
| 298 | - var list = [], sch; | ||
| 299 | - for(var k in groupData){ | ||
| 300 | - //排序 | ||
| 301 | - groupData[k].sort(sch_sort_fun); | ||
| 302 | - sch=groupData[k][0]; | ||
| 303 | - sch.destroySize=groupData[k].length; | ||
| 304 | - sch.destroyMileageSum=countMileage(groupData[k]); | ||
| 305 | - list.push(sch); | ||
| 306 | - } | ||
| 307 | - | ||
| 308 | - var htmlStr = template('destroy_sch_list_temp', {list: list}); | 257 | + var htmlStr = template('destroy_sch_list_temp', {list: rs}); |
| 309 | $('.ct_destroy_sch_table tbody').html(htmlStr); | 258 | $('.ct_destroy_sch_table tbody').html(htmlStr); |
| 310 | $('.t_body_wrap').perfectScrollbar('update'); | 259 | $('.t_body_wrap').perfectScrollbar('update'); |
| 311 | }); | 260 | }); |
| 312 | } | 261 | } |
| 313 | 262 | ||
| 314 | 263 | ||
| 315 | - function sch_sort_fun(a, b) { | ||
| 316 | - return a.dfsjT - b.dfsjT; | ||
| 317 | - } | ||
| 318 | - | ||
| 319 | - function countMileage(array) { | ||
| 320 | - var sum=0; | ||
| 321 | - $.each(array, function () { | ||
| 322 | - sum = accAdd(sum, this.jhlcOrig); | ||
| 323 | - }); | ||
| 324 | - return sum; | ||
| 325 | - } | ||
| 326 | - | ||
| 327 | - var accAdd = function (a, b) { | ||
| 328 | - var c, d, e; | ||
| 329 | - try { | ||
| 330 | - c = a.toString().split(".")[1].length; | ||
| 331 | - } catch (f) { | ||
| 332 | - c = 0; | ||
| 333 | - } | ||
| 334 | - try { | ||
| 335 | - d = b.toString().split(".")[1].length; | ||
| 336 | - } catch (f) { | ||
| 337 | - d = 0; | ||
| 338 | - } | ||
| 339 | - return e = Math.pow(10, Math.max(c, d)), (mul(a, e) + mul(b, e)) / e; | ||
| 340 | - }; | ||
| 341 | - | ||
| 342 | - function mul(a, b) { | ||
| 343 | - var c = 0, | ||
| 344 | - d = a.toString(), | ||
| 345 | - e = b.toString(); | ||
| 346 | - try { | ||
| 347 | - c += d.split(".")[1].length; | ||
| 348 | - } catch (f) { | ||
| 349 | - } | ||
| 350 | - try { | ||
| 351 | - c += e.split(".")[1].length; | ||
| 352 | - } catch (f) { | ||
| 353 | - } | ||
| 354 | - return Number(d.replace(".", "")) * Number(e.replace(".", "")) / Math.pow(10, c); | ||
| 355 | - } | ||
| 356 | - | ||
| 357 | //日期选择框 | 264 | //日期选择框 |
| 358 | var fs='YYYY-MM-DD' | 265 | var fs='YYYY-MM-DD' |
| 359 | , ets=moment().subtract(1, 'days').format(fs) | 266 | , ets=moment().subtract(1, 'days').format(fs) |
| @@ -408,13 +315,13 @@ | @@ -408,13 +315,13 @@ | ||
| 408 | $('[name=fgsBm_eq]', f).on('change', function () { | 315 | $('[name=fgsBm_eq]', f).on('change', function () { |
| 409 | var k = $('[name=gsBm_eq]', f).val() + '_' + $(this).val(); | 316 | var k = $('[name=gsBm_eq]', f).val() + '_' + $(this).val(); |
| 410 | var array = lineMapps[k]; | 317 | var array = lineMapps[k]; |
| 411 | - var opts = ''; | 318 | + var opts = '<option value="">全部</option>'; |
| 412 | if(array){ | 319 | if(array){ |
| 413 | $.each(array, function () { | 320 | $.each(array, function () { |
| 414 | opts += '<option value="'+this.lineCode+'">'+this.name+'</option>'; | 321 | opts += '<option value="'+this.lineCode+'">'+this.name+'</option>'; |
| 415 | }); | 322 | }); |
| 416 | } | 323 | } |
| 417 | - $('[name=xlBm_eq]', f).html(opts); | 324 | + $('[name=lineCode_eq]', f).html(opts); |
| 418 | }); | 325 | }); |
| 419 | 326 | ||
| 420 | // | 327 | // |
| @@ -425,9 +332,6 @@ | @@ -425,9 +332,6 @@ | ||
| 425 | return false; | 332 | return false; |
| 426 | }); | 333 | }); |
| 427 | 334 | ||
| 428 | - $('#add_hours_icon').on('click', function () { | ||
| 429 | - UIkit.notification('暂不开放!', 'danger'); | ||
| 430 | - }); | ||
| 431 | </script> | 335 | </script> |
| 432 | </body> | 336 | </body> |
| 433 | </html> | 337 | </html> |
| 434 | \ No newline at end of file | 338 | \ No newline at end of file |
src/main/resources/static/pages/summary/work_hours/list.html
| @@ -262,8 +262,8 @@ | @@ -262,8 +262,8 @@ | ||
| 262 | } | 262 | } |
| 263 | 263 | ||
| 264 | //日期选择器 | 264 | //日期选择器 |
| 265 | - $('[name=rq_eq]', f).val('2017-10-23'); | ||
| 266 | - flatpickr('.ct_search_form_wrap [name=rq_eq]', {"locale": "zh", maxDate: '2017-10-23', minDate: '2017-07-01'}); | 265 | + $('[name=rq_eq]', f).val(moment().subtract(2,'days').format('YYYY-MM-DD')); |
| 266 | + flatpickr('.ct_search_form_wrap [name=rq_eq]', {"locale": "zh"}); | ||
| 267 | 267 | ||
| 268 | var comps; | 268 | var comps; |
| 269 | //构建公司级联下拉框 | 269 | //构建公司级联下拉框 |
src/main/resources/static/real_control_v2/fragments/north/nav/line_config/line_config.html
| @@ -20,6 +20,7 @@ | @@ -20,6 +20,7 @@ | ||
| 20 | <div class="uk-accordion-content"> | 20 | <div class="uk-accordion-content"> |
| 21 | <ul class="uk-list uk-list-line" id="smooth_scroll_list"> | 21 | <ul class="uk-list uk-list-line" id="smooth_scroll_list"> |
| 22 | <li><a data-href="#schedule_reload_time_panel" >班次更新时间</a></li> | 22 | <li><a data-href="#schedule_reload_time_panel" >班次更新时间</a></li> |
| 23 | + <li><a data-href="#schedule_auto_exec_panel" >班次自动执行</a></li> | ||
| 23 | <li><a data-href="#out_time_type_panel" >出场时间类型</a></li> | 24 | <li><a data-href="#out_time_type_panel" >出场时间类型</a></li> |
| 24 | <li><a data-href="#in_park_source_panel" >原线路回场</a></li> | 25 | <li><a data-href="#in_park_source_panel" >原线路回场</a></li> |
| 25 | <li><a data-href="#buffer_inOut_diff_panel">到站缓冲区设置</a></li> | 26 | <li><a data-href="#buffer_inOut_diff_panel">到站缓冲区设置</a></li> |
src/main/resources/static/real_control_v2/fragments/north/nav/line_config/line_config_entity.html
| @@ -28,6 +28,34 @@ | @@ -28,6 +28,34 @@ | ||
| 28 | <button class="uk-button uk-button-mini" disabled>加载历史GPS恢复到离站</button> | 28 | <button class="uk-button uk-button-mini" disabled>加载历史GPS恢复到离站</button> |
| 29 | </div> | 29 | </div> |
| 30 | </div> | 30 | </div> |
| 31 | + | ||
| 32 | + <div id="schedule_auto_exec_panel"> | ||
| 33 | + <h2 class="btn_title_line"> | ||
| 34 | + <a class="uk-link-reset">班次自动执行</a> | ||
| 35 | + </h2> | ||
| 36 | + <div> | ||
| 37 | + <div> | ||
| 38 | + <label> | ||
| 39 | + <input type="checkbox" id="enableAutoExec"> 启用自动班次执行 | ||
| 40 | + </label> | ||
| 41 | + </div> | ||
| 42 | + <ul class="uk-list"> | ||
| 43 | + <li> | ||
| 44 | + <small style="color: red;font-size: 14px;">1、 你必须只应该对【无固定走向且无人监管的线路】启用此项。</small> | ||
| 45 | + </li> | ||
| 46 | + <li> | ||
| 47 | + <small>2、启用该选项后,系统将不再依赖相关定位信号来执行班次。</small> | ||
| 48 | + </li> | ||
| 49 | + <li> | ||
| 50 | + <small>3、系统将在合适的时候自动填入实发实达时间,以完善报表。</small> | ||
| 51 | + </li> | ||
| 52 | + <li> | ||
| 53 | + <small>4、系统不会下发班次调度指令。</small> | ||
| 54 | + </li> | ||
| 55 | + </ul> | ||
| 56 | + </div> | ||
| 57 | + </div> | ||
| 58 | + | ||
| 31 | <div id="out_time_type_panel"> | 59 | <div id="out_time_type_panel"> |
| 32 | <h2 class="btn_title_line"> | 60 | <h2 class="btn_title_line"> |
| 33 | <a class="uk-link-reset">出场时间类型</a> | 61 | <a class="uk-link-reset">出场时间类型</a> |
| @@ -165,6 +193,7 @@ | @@ -165,6 +193,7 @@ | ||
| 165 | $('#clearRealScheduleBtn', wrap).on('click', clearRealSchedule); | 193 | $('#clearRealScheduleBtn', wrap).on('click', clearRealSchedule); |
| 166 | //重新载入实际排班 | 194 | //重新载入实际排班 |
| 167 | $('#reLoadRealScheduleBtn', wrap).on('click', reLoadRealSchedule); | 195 | $('#reLoadRealScheduleBtn', wrap).on('click', reLoadRealSchedule); |
| 196 | + $('#enableAutoExec', wrap).on('click', autoExecFun); | ||
| 168 | }); | 197 | }); |
| 169 | 198 | ||
| 170 | function changeTwinsParkAndStation() { | 199 | function changeTwinsParkAndStation() { |
| @@ -256,6 +285,43 @@ | @@ -256,6 +285,43 @@ | ||
| 256 | $('select[name=twinsPark]', wrap).on('change', changeTwinsParkAndStation); | 285 | $('select[name=twinsPark]', wrap).on('change', changeTwinsParkAndStation); |
| 257 | $('select[name=twinsStation]', wrap).on('change', changeTwinsParkAndStation); | 286 | $('select[name=twinsStation]', wrap).on('change', changeTwinsParkAndStation); |
| 258 | } | 287 | } |
| 288 | + | ||
| 289 | + /** | ||
| 290 | + * 自动执行 | ||
| 291 | + */ | ||
| 292 | + function autoExecFun(){ | ||
| 293 | + var that = this; | ||
| 294 | + if(that.checked){ | ||
| 295 | + that.checked = false; | ||
| 296 | + alt_confirm('<span style="color: red;font-size: 16px;">启用【' + conf.line.name + '】的自动执行功能?</span>', function () { | ||
| 297 | + var data = { | ||
| 298 | + lineCode: conf.line.lineCode, | ||
| 299 | + autoExec: true | ||
| 300 | + }; | ||
| 301 | + gb_common.$post('/lineConfig/setAutoExec', data, function (rs) { | ||
| 302 | + notify_succ('启用成功!'); | ||
| 303 | + conf = rs.conf; | ||
| 304 | + | ||
| 305 | + that.checked = true; | ||
| 306 | + }); | ||
| 307 | + }, '我确定要将【' + conf.line.name + '】设置为自动执行', true); | ||
| 308 | + } | ||
| 309 | + else{ | ||
| 310 | + that.checked = true; | ||
| 311 | + alt_confirm('<span style="color: red;font-size: 16px;">禁用【' + conf.line.name + '】的自动执行功能?</span>', function () { | ||
| 312 | + var data = { | ||
| 313 | + lineCode: conf.line.lineCode, | ||
| 314 | + autoExec: false | ||
| 315 | + }; | ||
| 316 | + gb_common.$post('/lineConfig/setAutoExec', data, function (rs) { | ||
| 317 | + notify_succ('禁用成功!'); | ||
| 318 | + conf = rs.conf; | ||
| 319 | + | ||
| 320 | + that.checked = false; | ||
| 321 | + }); | ||
| 322 | + }, '我确定要禁用【' + conf.line.name + '】的自动执行', true); | ||
| 323 | + } | ||
| 324 | + } | ||
| 259 | })(); | 325 | })(); |
| 260 | </script> | 326 | </script> |
| 261 | </div> | 327 | </div> |
| 262 | \ No newline at end of file | 328 | \ No newline at end of file |