Commit 00864ff1d71afacc8969c0f42c80a69222efe68c

Authored by 廖磊
2 parents c2ad30d0 468af9ed

Merge branch 'minhang' of

http://222.66.0.204:8090/panzhaov5/bsth_control into minhang
Showing 85 changed files with 2457 additions and 603 deletions
src/main/java/com/bsth/controller/realcontrol/FrequentPhrasesController.java 0 → 100644
  1 +package com.bsth.controller.realcontrol;
  2 +
  3 +import com.bsth.controller.BaseController;
  4 +import com.bsth.entity.realcontrol.FrequentPhrases;
  5 +import org.springframework.web.bind.annotation.RequestMapping;
  6 +import org.springframework.web.bind.annotation.RestController;
  7 +
  8 +/**
  9 + * Created by panzhao on 2017/9/17.
  10 + */
  11 +@RestController
  12 +@RequestMapping("frequent_phrases")
  13 +public class FrequentPhrasesController extends BaseController<FrequentPhrases, Integer>{
  14 +
  15 +}
src/main/java/com/bsth/controller/realcontrol/LineConfigController.java
@@ -79,6 +79,11 @@ public class LineConfigController extends BaseController&lt;LineConfig, Integer&gt;{ @@ -79,6 +79,11 @@ public class LineConfigController extends BaseController&lt;LineConfig, Integer&gt;{
79 return lineConfigService.getByLineCode(lineCode); 79 return lineConfigService.getByLineCode(lineCode);
80 } 80 }
81 81
  82 + @RequestMapping(value = "/findByIdx")
  83 + public Map<String, Object> findByIdx(@RequestParam String idx){
  84 + return lineConfigService.findByIdx(idx);
  85 + }
  86 +
82 /** 87 /**
83 * 到站缓冲区设置 88 * 到站缓冲区设置
84 * @param lineCode 89 * @param lineCode
src/main/java/com/bsth/controller/traffic/VehicleInoutStopController.java 0 → 100644
  1 +package com.bsth.controller.traffic;
  2 +
  3 +import com.bsth.controller.BaseController;
  4 +import com.bsth.entity.traffic.VehicleInoutStop;
  5 +import org.springframework.web.bind.annotation.RequestMapping;
  6 +import org.springframework.web.bind.annotation.RestController;
  7 +/**
  8 + *
  9 + * @author BSTH
  10 + *
  11 + */
  12 +@RestController
  13 +@RequestMapping("vehicle_stop")
  14 +public class VehicleInoutStopController extends BaseController<VehicleInoutStop,Integer> {
  15 +}
src/main/java/com/bsth/data/schedule/SchAttrCalculator.java
@@ -17,273 +17,291 @@ import java.util.Collections; @@ -17,273 +17,291 @@ import java.util.Collections;
17 import java.util.List; 17 import java.util.List;
18 18
19 /** 19 /**
20 - * 20 + * @author PanZhao
21 * @ClassName: SchAttrCalculator 21 * @ClassName: SchAttrCalculator
22 * @Description: TODO(班次相关属性计算器) 22 * @Description: TODO(班次相关属性计算器)
23 - * @author PanZhao  
24 * @date 2016年8月15日 下午4:40:26 23 * @date 2016年8月15日 下午4:40:26
25 - *  
26 */ 24 */
27 @Component 25 @Component
28 public class SchAttrCalculator { 26 public class SchAttrCalculator {
29 27
30 - @Autowired  
31 - LineConfigData lineConfigData;  
32 -  
33 - private final static long DAY_TIME = 1000 * 60 * 60 * 24L;  
34 -  
35 - Logger logger = LoggerFactory.getLogger(this.getClass());  
36 -  
37 - private static DateTimeFormatter fmtyyyyMMdd = DateTimeFormat.forPattern("yyyy-MM-dd")  
38 - ,fmtHHmm = DateTimeFormat.forPattern("HH:mm")  
39 - ,fmtyyyyMMddHHmm = DateTimeFormat.forPattern("yyyy-MM-ddHH:mm");  
40 -  
41 - /**  
42 - * @Title: calcRealDate  
43 - * @Description: TODO(计算班次的真实执行日期)  
44 - */  
45 - public SchAttrCalculator calcRealDate(ScheduleRealInfo sch) {  
46 - LineConfig conf = lineConfigData.get(sch.getXlBm());  
47 -  
48 - try {  
49 - if (null == sch.getFcsjT())  
50 - calcFcsjTime(sch);  
51 -  
52 - //计发時間  
53 - if(sch.getFcsj().compareTo(conf.getStartOpt()) < 0){  
54 - sch.setFcsjAll(fmtyyyyMMddHHmm.parseMillis(sch.getScheduleDateStr()+sch.getFcsj()) + DAY_TIME);  
55 - }  
56 -  
57 - //待发時間  
58 - if(sch.getDfsj().compareTo(conf.getStartOpt()) < 0){  
59 - sch.setDfsjAll(fmtyyyyMMddHHmm.parseMillis(sch.getScheduleDateStr()+sch.getDfsj()) + DAY_TIME);  
60 - }  
61 - else  
62 - sch.setDfsjAll(fmtyyyyMMddHHmm.parseMillis(sch.getScheduleDateStr()+sch.getDfsj()));  
63 -  
64 - //实发時間  
65 - if(StringUtils.isNotEmpty(sch.getFcsjActual()) &&  
66 - sch.getFcsjActual().compareTo(conf.getStartOpt()) < 0){  
67 - sch.setFcsjActualAll(fmtyyyyMMddHHmm.parseMillis(sch.getScheduleDateStr()+sch.getFcsjActual()) + DAY_TIME);  
68 - }  
69 -  
70 - //实际终点時間  
71 - if(StringUtils.isNotEmpty(sch.getZdsjActual()) &&  
72 - sch.getZdsjActual().compareTo(conf.getStartOpt()) < 0){  
73 - sch.setZdsjActualAll(fmtyyyyMMddHHmm.parseMillis(sch.getScheduleDateStr()+sch.getZdsjActual()) + DAY_TIME);  
74 - }  
75 -  
76 - sch.setRealExecDate(fmtyyyyMMdd.print(sch.getFcsjT()));  
77 - } catch (Exception e) {  
78 - logger.error("", e);  
79 - }  
80 - return this;  
81 - }  
82 -  
83 - /**  
84 - *  
85 - * @Title: calcAllTimeByFcsj  
86 - * @Description: TODO(根据发车时间字符串计算 (计发时间,终点时间,待发时间))  
87 - */  
88 - public SchAttrCalculator calcAllTimeByFcsj(ScheduleRealInfo sch) {  
89 - try {  
90 - // 生成时间戳  
91 - calcTimestamp(sch);  
92 -  
93 - // 计划终点时间  
94 - if (sch.getBcsj() != null) {  
95 - sch.setZdsjT(sch.getDfsjT() + (sch.getBcsj() * 60 * 1000));  
96 - sch.setZdsj(fmtHHmm.print(sch.getZdsjT()));  
97 - }  
98 - } catch (ParseException e) {  
99 - logger.error("", e);  
100 - }  
101 - return this;  
102 - }  
103 -  
104 - /**  
105 - *  
106 - * @Title: calcQdzTimePlan  
107 - * @Description: TODO(计算班次的起点应到时间)  
108 - */  
109 - public void calcQdzTimePlan(List<ScheduleRealInfo> list){  
110 - Collections.sort(list, new ScheduleComparator.FCSJ());  
111 -  
112 - int len = list.size();  
113 - if(len == 0)  
114 - return;  
115 -  
116 - ScheduleRealInfo prve = list.get(0), curr;  
117 - for(int i = 1; i < len; i ++){  
118 - curr = list.get(i);  
119 -  
120 - if(isJoin(prve, curr)){  
121 - curr.setQdzArrDatejh(prve.getZdsj());  
122 - if(StringUtils.isNotEmpty(prve.getZdsjActual()))  
123 - curr.setQdzArrDatesj(prve.getZdsjActual());  
124 - }  
125 - prve = curr;  
126 - }  
127 - }  
128 -  
129 - private boolean isJoin(ScheduleRealInfo prve, ScheduleRealInfo curr) {  
130 - return prve.getZdzName().equals(curr.getQdzName())//名称相等  
131 - || prve.getZdzCode().equals(curr.getQdzCode())//编码相等  
132 - || prve.getZdzName().startsWith(curr.getQdzName())//起始包括  
133 - || curr.getQdzName().startsWith(prve.getZdzName());//起始包括  
134 - }  
135 -  
136 - /**  
137 - *  
138 - * @Title: updateQdzTimePlan  
139 - * @Description: TODO(更新班次的起点应到时间) 并返回被更新的班次  
140 - */  
141 - public List<ScheduleRealInfo> updateQdzTimePlan(List<ScheduleRealInfo> list){  
142 - Collections.sort(list, new ScheduleComparator.FCSJ());  
143 -  
144 - List<ScheduleRealInfo> updateList = new ArrayList<>();  
145 - int len = list.size();  
146 - if(len == 0)  
147 - return updateList;  
148 -  
149 - ScheduleRealInfo prve = list.get(0), curr;  
150 - for(int i = 1; i < len; i ++){  
151 - curr = list.get(i);  
152 -  
153 - if(prve.getZdzName().equals(curr.getQdzName())  
154 - || prve.getZdzCode().equals(curr.getQdzCode())){  
155 -  
156 - if(curr.getQdzArrDatejh() != null && prve.getZdsj().equals(curr.getQdzArrDatejh())){  
157 - prve = curr;  
158 - continue;  
159 - }  
160 -  
161 - curr.setQdzArrDatejh(prve.getZdsj());  
162 - updateList.add(curr);  
163 - }  
164 - else{  
165 - curr.setQdzArrDatejh(null);  
166 - updateList.add(curr);  
167 - }  
168 - prve = curr;  
169 - }  
170 -  
171 - return updateList;  
172 - }  
173 -  
174 - public SchAttrCalculator calcFcsjTime(ScheduleRealInfo sch) throws ParseException {  
175 - sch.setFcsjT(fmtyyyyMMddHHmm.parseMillis(sch.getRealExecDate() + sch.getFcsj()));  
176 - return this;  
177 - }  
178 -  
179 - public void calcTimestamp(ScheduleRealInfo sch) throws ParseException{  
180 - //计发时间  
181 - if(sch.getFcsjT() == null)  
182 - calcFcsjTime(sch);  
183 -  
184 - //待发时间  
185 - if(sch.getDfsj() == null)  
186 - sch.setDfsjAll(sch.getFcsjT());  
187 - if(sch.getDfsjT() == null)  
188 - sch.setDfsjAll(sch.getDfsj());  
189 -  
190 - //实发时间戳  
191 - if(sch.getFcsjActualTime() == null && sch.getFcsjActual() != null)  
192 - sch.setFcsjActualAll(sch.getFcsjActual());  
193 -  
194 - //实达时间戳  
195 - if(sch.getZdsjActualTime() == null && sch.getZdsjActual() != null)  
196 - sch.setZdsjActualAll(sch.getZdsjActual());  
197 - }  
198 -  
199 - /**  
200 - * 计算当前要执行的班次  
201 - * @param list  
202 - * @return  
203 - */  
204 - public ScheduleRealInfo calcCurrentExecSch(List<ScheduleRealInfo> list){  
205 - String lineCode = list.get(0).getXlBm();  
206 - LineConfig conf = lineConfigData.get(lineCode);  
207 - long t = System.currentTimeMillis();  
208 - int outConfig = -1;  
209 - //限定出站既出场的停车场  
210 - String park = null;  
211 - if(conf != null){  
212 - outConfig = conf.getOutConfig();  
213 - park = conf.getTwinsPark();  
214 - }  
215 - boolean limitPark = StringUtils.isNotEmpty(park);  
216 -  
217 - for(ScheduleRealInfo sch : list){  
218 - //如果是出站既出场,忽略出场班次  
219 - if(outConfig == 2 && sch.getBcType().equals("out")  
220 - && (!limitPark || park.equals(sch.getQdzCode())))  
221 - continue;  
222 -  
223 - //忽略烂班  
224 - if(sch.isDestroy())  
225 - continue;  
226 -  
227 - //已执行  
228 - if(StringUtils.isNotEmpty(sch.getZdsjActual()))  
229 - continue;  
230 -  
231 - if(Math.abs((t - sch.getDfsjT())) > 1000 * 60 * 60){  
232 - //差值较大,倒着找看有没有更合适的  
233 - ScheduleRealInfo schReverse = calcCurrentExecSchReverse(list, outConfig, limitPark, park);  
234 - if(null != schReverse && !schReverse.getId().equals(sch.getId())){  
235 - logger.info("calc_current_exec_sch_reverse... -" + schReverse.getId());  
236 - return suitableExecSch(schReverse, sch, t);  
237 - }  
238 - }  
239 - return sch;  
240 - }  
241 - return null;  
242 - }  
243 -  
244 - /**  
245 - * 反转匹配一个班次  
246 - * @param list  
247 - * @param outConfig  
248 - * @param limitPark  
249 - * @param park  
250 - * @return  
251 - */  
252 - private ScheduleRealInfo calcCurrentExecSchReverse(List<ScheduleRealInfo> list, int outConfig, boolean limitPark, String park){  
253 - ScheduleRealInfo near = null;  
254 - for(ScheduleRealInfo sch : list){  
255 - //如果是出站既出场,忽略出场班次  
256 - if(outConfig == 2 && isInout(sch)  
257 - && (!limitPark || park.equals(sch.getQdzCode()) || park.equals(sch.getZdzCode())))  
258 - continue;  
259 -  
260 - //忽略烂班  
261 - if(sch.isDestroy())  
262 - continue;  
263 -  
264 - if(StringUtils.isNotEmpty(sch.getZdsjActual())){  
265 - near = null;  
266 - continue;  
267 - }  
268 -  
269 - if(null == near)  
270 - near = sch;  
271 - }  
272 - return near;  
273 - }  
274 -  
275 - /**  
276 - * 比较2个班次,谁是指定时间更合适执行的  
277 - * @param schReverse  
278 - * @param sch  
279 - * @param t  
280 - * @return  
281 - */  
282 - private ScheduleRealInfo suitableExecSch(ScheduleRealInfo schReverse, ScheduleRealInfo sch, long t){  
283 - return Math.abs(t - schReverse.getDfsjT()) > Math.abs(t - sch.getDfsjT())?sch: schReverse;  
284 - }  
285 -  
286 - private boolean isInout(ScheduleRealInfo sch){  
287 - return sch.getBcType().equals("out") || sch.getBcType().equals("in");  
288 - } 28 + @Autowired
  29 + LineConfigData lineConfigData;
  30 +
  31 + private final static long DAY_TIME = 1000 * 60 * 60 * 24L;
  32 +
  33 + Logger logger = LoggerFactory.getLogger(this.getClass());
  34 +
  35 + private static DateTimeFormatter fmtyyyyMMdd = DateTimeFormat.forPattern("yyyy-MM-dd"), fmtHHmm = DateTimeFormat.forPattern("HH:mm"), fmtyyyyMMddHHmm = DateTimeFormat.forPattern("yyyy-MM-ddHH:mm");
  36 +
  37 + /**
  38 + * @Title: calcRealDate
  39 + * @Description: TODO(计算班次的真实执行日期)
  40 + */
  41 + public SchAttrCalculator calcRealDate(ScheduleRealInfo sch) {
  42 + LineConfig conf = lineConfigData.get(sch.getXlBm());
  43 +
  44 + try {
  45 + if (null == sch.getFcsjT())
  46 + calcFcsjTime(sch);
  47 +
  48 + String rq = sch.getScheduleDateStr();
  49 + //计发時間
  50 + sch.setFcsjAll(getTime(rq, sch.getFcsj(), conf));
  51 +
  52 + //待发時間
  53 + sch.setDfsjAll(getTime(rq, sch.getDfsj(), conf));
  54 + /*if (sch.getDfsj().compareTo(conf.getStartOpt()) < 0) {
  55 + sch.setDfsjAll(fmtyyyyMMddHHmm.parseMillis(sch.getScheduleDateStr() + sch.getDfsj()) + DAY_TIME);
  56 + } else
  57 + sch.setDfsjAll(fmtyyyyMMddHHmm.parseMillis(sch.getScheduleDateStr() + sch.getDfsj()));*/
  58 +
  59 + //实发時間
  60 + sch.setFcsjActualAll(getTime(rq, sch.getFcsjActual(), conf));
  61 + /*if (StringUtils.isNotEmpty(sch.getFcsjActual()) &&
  62 + sch.getFcsjActual().compareTo(conf.getStartOpt()) < 0) {
  63 + sch.setFcsjActualAll(fmtyyyyMMddHHmm.parseMillis(sch.getScheduleDateStr() + sch.getFcsjActual()) + DAY_TIME);
  64 + }*/
  65 +
  66 + //实际终点時間
  67 + sch.setZdsjActualAll(getTime(rq, sch.getZdsjActual(), conf));
  68 + /*if (StringUtils.isNotEmpty(sch.getZdsjActual()) &&
  69 + sch.getZdsjActual().compareTo(conf.getStartOpt()) < 0) {
  70 + sch.setZdsjActualAll(fmtyyyyMMddHHmm.parseMillis(sch.getScheduleDateStr() + sch.getZdsjActual()) + DAY_TIME);
  71 + }*/
  72 +
  73 + sch.setRealExecDate(fmtyyyyMMdd.print(sch.getFcsjT()));
  74 + } catch (Exception e) {
  75 + logger.error("", e);
  76 + }
  77 + return this;
  78 + }
  79 +
  80 + public Long getTime(String rq, String timeStr, LineConfig conf) {
  81 + Long t = null;
  82 + if (StringUtils.isNotEmpty(timeStr)) {
  83 + t = fmtyyyyMMddHHmm.parseMillis(rq + timeStr);
  84 + if(timeStr.compareTo(conf.getStartOpt()) < 0)
  85 + return t + DAY_TIME;
  86 + }
  87 + return t;
  88 + }
  89 +
  90 + /**
  91 + * @Title: calcAllTimeByFcsj
  92 + * @Description: TODO(根据发车时间字符串计算 (计发时间,终点时间,待发时间))
  93 + */
  94 + public SchAttrCalculator calcAllTimeByFcsj(ScheduleRealInfo sch) {
  95 + try {
  96 + // 生成时间戳
  97 + calcTimestamp(sch);
  98 +
  99 + // 计划终点时间
  100 + if (sch.getBcsj() != null) {
  101 + sch.setZdsjT(sch.getDfsjT() + (sch.getBcsj() * 60 * 1000));
  102 + sch.setZdsj(fmtHHmm.print(sch.getZdsjT()));
  103 + }
  104 + } catch (ParseException e) {
  105 + logger.error("", e);
  106 + }
  107 + return this;
  108 + }
  109 +
  110 + /**
  111 + * @Title: calcQdzTimePlan
  112 + * @Description: TODO(计算班次的起点应到时间)
  113 + */
  114 + public void calcQdzTimePlan(List<ScheduleRealInfo> list) {
  115 + Collections.sort(list, new ScheduleComparator.FCSJ());
  116 +
  117 + int len = list.size();
  118 + if (len == 0)
  119 + return;
  120 +
  121 + ScheduleRealInfo prve = list.get(0), curr;
  122 + for (int i = 1; i < len; i++) {
  123 + curr = list.get(i);
  124 +
  125 + if (isJoin(prve, curr)) {
  126 + curr.setQdzArrDatejh(prve.getZdsj());
  127 + if (StringUtils.isNotEmpty(prve.getZdsjActual()))
  128 + curr.setQdzArrDatesj(prve.getZdsjActual());
  129 + }
  130 + prve = curr;
  131 + }
  132 + }
  133 +
  134 + private boolean isJoin(ScheduleRealInfo prve, ScheduleRealInfo curr) {
  135 + return prve.getZdzName().equals(curr.getQdzName())//名称相等
  136 + || prve.getZdzCode().equals(curr.getQdzCode())//编码相等
  137 + || prve.getZdzName().startsWith(curr.getQdzName())//起始包括
  138 + || curr.getQdzName().startsWith(prve.getZdzName());//起始包括
  139 + }
  140 +
  141 + /**
  142 + * @Title: updateQdzTimePlan
  143 + * @Description: TODO(更新班次的起点应到时间) 并返回被更新的班次
  144 + */
  145 + public List<ScheduleRealInfo> updateQdzTimePlan(List<ScheduleRealInfo> list) {
  146 + Collections.sort(list, new ScheduleComparator.FCSJ());
  147 +
  148 + List<ScheduleRealInfo> updateList = new ArrayList<>();
  149 + int len = list.size();
  150 + if (len == 0)
  151 + return updateList;
  152 +
  153 + ScheduleRealInfo prve = list.get(0), curr;
  154 + for (int i = 1; i < len; i++) {
  155 + curr = list.get(i);
  156 +
  157 + if (prve.getZdzName().equals(curr.getQdzName())
  158 + || prve.getZdzCode().equals(curr.getQdzCode())) {
  159 +
  160 + if (curr.getQdzArrDatejh() != null && prve.getZdsj().equals(curr.getQdzArrDatejh())) {
  161 + prve = curr;
  162 + continue;
  163 + }
  164 +
  165 + curr.setQdzArrDatejh(prve.getZdsj());
  166 + updateList.add(curr);
  167 + } else {
  168 + curr.setQdzArrDatejh(null);
  169 + updateList.add(curr);
  170 + }
  171 + prve = curr;
  172 + }
  173 +
  174 + return updateList;
  175 + }
  176 +
  177 + public SchAttrCalculator calcFcsjTime(ScheduleRealInfo sch) throws ParseException {
  178 + sch.setFcsjT(fmtyyyyMMddHHmm.parseMillis(sch.getRealExecDate() + sch.getFcsj()));
  179 + return this;
  180 + }
  181 +
  182 + public void calcTimestamp(ScheduleRealInfo sch) throws ParseException {
  183 + //计发时间
  184 + if (sch.getFcsjT() == null)
  185 + calcFcsjTime(sch);
  186 +
  187 + //待发时间
  188 + if (sch.getDfsj() == null)
  189 + sch.setDfsjAll(sch.getFcsjT());
  190 + if (sch.getDfsjT() == null)
  191 + sch.setDfsjAll(sch.getDfsj());
  192 +
  193 + //实发时间戳
  194 + if (sch.getFcsjActualTime() == null && sch.getFcsjActual() != null)
  195 + sch.setFcsjActualAll(sch.getFcsjActual());
  196 +
  197 + //实达时间戳
  198 + if (sch.getZdsjActualTime() == null && sch.getZdsjActual() != null)
  199 + sch.setZdsjActualAll(sch.getZdsjActual());
  200 + }
  201 +
  202 + /**
  203 + * 计算当前要执行的班次
  204 + *
  205 + * @param list
  206 + * @return
  207 + */
  208 + public ScheduleRealInfo calcCurrentExecSch(List<ScheduleRealInfo> list) {
  209 + String lineCode = list.get(0).getXlBm();
  210 + LineConfig conf = lineConfigData.get(lineCode);
  211 + long t = System.currentTimeMillis();
  212 + int outConfig = -1;
  213 + //限定出站既出场的停车场
  214 + String park = null;
  215 + if (conf != null) {
  216 + outConfig = conf.getOutConfig();
  217 + park = conf.getTwinsPark();
  218 + }
  219 + boolean limitPark = StringUtils.isNotEmpty(park);
  220 +
  221 + for (ScheduleRealInfo sch : list) {
  222 + //如果是出站既出场,忽略出场班次
  223 + if (outConfig == 2 && sch.getBcType().equals("out")
  224 + && (!limitPark || park.equals(sch.getQdzCode())))
  225 + continue;
  226 +
  227 + //忽略烂班
  228 + if (sch.isDestroy())
  229 + continue;
  230 +
  231 + //已执行
  232 + if (StringUtils.isNotEmpty(sch.getZdsjActual()))
  233 + continue;
  234 +
  235 + if (Math.abs((t - sch.getDfsjT())) > 1000 * 60 * 60) {
  236 + //差值较大,倒着找看有没有更合适的
  237 + ScheduleRealInfo schReverse = calcCurrentExecSchReverse(list, outConfig, limitPark, park);
  238 + if (null != schReverse && !schReverse.getId().equals(sch.getId())) {
  239 + logger.info("calc_current_exec_sch_reverse... -" + schReverse.getId());
  240 + return suitableExecSch(schReverse, sch, t);
  241 + }
  242 + }
  243 + return sch;
  244 + }
  245 + return null;
  246 + }
  247 +
  248 + /**
  249 + * 反转匹配一个班次
  250 + *
  251 + * @param list
  252 + * @param outConfig
  253 + * @param limitPark
  254 + * @param park
  255 + * @return
  256 + */
  257 + private ScheduleRealInfo calcCurrentExecSchReverse(List<ScheduleRealInfo> list, int outConfig, boolean limitPark, String park) {
  258 + ScheduleRealInfo near = null;
  259 + for (ScheduleRealInfo sch : list) {
  260 + //如果是出站既出场,忽略出场班次
  261 + if (outConfig == 2 && isInout(sch)
  262 + && (!limitPark || park.equals(sch.getQdzCode()) || park.equals(sch.getZdzCode())))
  263 + continue;
  264 +
  265 + //忽略烂班
  266 + if (sch.isDestroy())
  267 + continue;
  268 +
  269 + if (StringUtils.isNotEmpty(sch.getZdsjActual())) {
  270 + near = null;
  271 + continue;
  272 + }
  273 +
  274 + if (null == near)
  275 + near = sch;
  276 + }
  277 + return near;
  278 + }
  279 +
  280 + /**
  281 + * 比较2个班次,谁是指定时间更合适执行的
  282 + *
  283 + * @param schReverse
  284 + * @param sch
  285 + * @param t
  286 + * @return
  287 + */
  288 + private ScheduleRealInfo suitableExecSch(ScheduleRealInfo schReverse, ScheduleRealInfo sch, long t) {
  289 + return Math.abs(t - schReverse.getDfsjT()) > Math.abs(t - sch.getDfsjT()) ? sch : schReverse;
  290 + }
  291 +
  292 + private boolean isInout(ScheduleRealInfo sch) {
  293 + return sch.getBcType().equals("out") || sch.getBcType().equals("in");
  294 + }
  295 +
  296 + /**
  297 + *
  298 + * @param fcsjT
  299 + * @param zdsjT
  300 + */
  301 + public boolean isValid(Long fcsjT, Long zdsjT) {
  302 + if(null != fcsjT && null != zdsjT)
  303 + return fcsjT < zdsjT;
  304 +
  305 + return true;
  306 + }
289 } 307 }
src/main/java/com/bsth/data/schedule/edit_logs/FormLogger.java
@@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired; @@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
15 import org.springframework.stereotype.Service; 15 import org.springframework.stereotype.Service;
16 16
17 import java.util.Date; 17 import java.util.Date;
  18 +import java.util.LinkedList;
18 19
19 /** 20 /**
20 * 为报表写入相关的班次修改记录 21 * 为报表写入相关的班次修改记录
@@ -27,9 +28,12 @@ public class FormLogger { @@ -27,9 +28,12 @@ public class FormLogger {
27 28
28 Logger log = LoggerFactory.getLogger(this.getClass()); 29 Logger log = LoggerFactory.getLogger(this.getClass());
29 30
  31 + static LinkedList<Changetochange> ccPsts = new LinkedList<>();
  32 +
30 @Autowired 33 @Autowired
31 ChangetochangeRepository changetochangeRepository; 34 ChangetochangeRepository changetochangeRepository;
32 35
  36 +
33 /** 37 /**
34 * 换人换车情况表 38 * 换人换车情况表
35 */ 39 */
@@ -70,7 +74,9 @@ public class FormLogger { @@ -70,7 +74,9 @@ public class FormLogger {
70 if(StringUtils.isNotEmpty(newJsy)) 74 if(StringUtils.isNotEmpty(newJsy))
71 cc.setSjgh(newJsy); 75 cc.setSjgh(newJsy);
72 76
73 - changetochangeRepository.save(cc); 77 + //改异步入库
  78 + ccPsts.add(cc);
  79 + //changetochangeRepository.save(cc);
74 }catch (Exception e){ 80 }catch (Exception e){
75 log.error("纪录换人换车情况表", e); 81 log.error("纪录换人换车情况表", e);
76 } 82 }
@@ -82,4 +88,13 @@ public class FormLogger { @@ -82,4 +88,13 @@ public class FormLogger {
82 cpc.setJsy(jsy); 88 cpc.setJsy(jsy);
83 saveChangetochange(sch, cpc); 89 saveChangetochange(sch, cpc);
84 } 90 }
  91 +
  92 + public void saveDb(){
  93 + Changetochange cc;
  94 + for(int i = 0; i < 1000; i ++){
  95 + cc = ccPsts.poll();
  96 + if(null != cc)
  97 + changetochangeRepository.save(cc);
  98 + }
  99 + }
85 } 100 }
src/main/java/com/bsth/data/schedule/edit_logs/SeiPstThread.java
@@ -23,6 +23,9 @@ public class SeiPstThread extends Thread{ @@ -23,6 +23,9 @@ public class SeiPstThread extends Thread{
23 23
24 Logger log = LoggerFactory.getLogger(this.getClass()); 24 Logger log = LoggerFactory.getLogger(this.getClass());
25 25
  26 + @Autowired
  27 + FormLogger formLogger;
  28 +
26 @Override 29 @Override
27 public void run() { 30 public void run() {
28 try{ 31 try{
@@ -40,6 +43,9 @@ public class SeiPstThread extends Thread{ @@ -40,6 +43,9 @@ public class SeiPstThread extends Thread{
40 } 43 }
41 44
42 repository.save(pstList); 45 repository.save(pstList);
  46 +
  47 + //报表结构化日志入库
  48 + formLogger.saveDb();
43 }catch (Exception e){ 49 }catch (Exception e){
44 log.error("", e); 50 log.error("", e);
45 } 51 }
src/main/java/com/bsth/entity/realcontrol/FrequentPhrases.java 0 → 100644
  1 +package com.bsth.entity.realcontrol;
  2 +
  3 +import javax.persistence.Entity;
  4 +import javax.persistence.GeneratedValue;
  5 +import javax.persistence.Id;
  6 +import javax.persistence.Table;
  7 +
  8 +/**
  9 + * 常用短语
  10 + * Created by panzhao on 2017/9/17.
  11 + */
  12 +@Entity
  13 +@Table(name = "bsth_c_s_frequent_phrases")
  14 +public class FrequentPhrases {
  15 +
  16 + @Id
  17 + @GeneratedValue
  18 + private Integer id;
  19 +
  20 + /**
  21 + * 用户名
  22 + */
  23 + private String userName;
  24 +
  25 + /**
  26 + * 短语
  27 + */
  28 + private String text;
  29 +
  30 + public Integer getId() {
  31 + return id;
  32 + }
  33 +
  34 + public void setId(Integer id) {
  35 + this.id = id;
  36 + }
  37 +
  38 + public String getUserName() {
  39 + return userName;
  40 + }
  41 +
  42 + public void setUserName(String userName) {
  43 + this.userName = userName;
  44 + }
  45 +
  46 + public String getText() {
  47 + return text;
  48 + }
  49 +
  50 + public void setText(String text) {
  51 + this.text = text;
  52 + }
  53 +}
src/main/java/com/bsth/entity/realcontrol/ScheduleRealInfo.java
@@ -718,8 +718,12 @@ public class ScheduleRealInfo { @@ -718,8 +718,12 @@ public class ScheduleRealInfo {
718 * @throws 718 * @throws
719 */ 719 */
720 public void setFcsjActualAll(Long t){ 720 public void setFcsjActualAll(Long t){
  721 +
721 this.fcsjActualTime = t; 722 this.fcsjActualTime = t;
722 - this.fcsjActual = fmtHHmm.print(t); 723 + if(null == t)
  724 + this.fcsjActual = null;
  725 + else
  726 + this.fcsjActual = fmtHHmm.print(t);
723 727
724 //更新班次状态 728 //更新班次状态
725 calcStatus(); 729 calcStatus();
@@ -733,7 +737,11 @@ public class ScheduleRealInfo { @@ -733,7 +737,11 @@ public class ScheduleRealInfo {
733 */ 737 */
734 public void setZdsjActualAll(Long t){ 738 public void setZdsjActualAll(Long t){
735 this.zdsjActualTime = t; 739 this.zdsjActualTime = t;
736 - this.zdsjActual = fmtHHmm.print(t); 740 +
  741 + if(null == t)
  742 + this.zdsjActual = null;
  743 + else
  744 + this.zdsjActual = fmtHHmm.print(t);
737 745
738 //更新班次状态 746 //更新班次状态
739 calcStatus(); 747 calcStatus();
src/main/java/com/bsth/entity/search/PredicatesBuilder.java
@@ -108,7 +108,10 @@ public class PredicatesBuilder { @@ -108,7 +108,10 @@ public class PredicatesBuilder {
108 String.class.isAssignableFrom(rightType)) { // Date >= String 108 String.class.isAssignableFrom(rightType)) { // Date >= String
109 DateTime dateTime = new DateTime(object); 109 DateTime dateTime = new DateTime(object);
110 return cb.greaterThanOrEqualTo((Path<Date>) expression, dateTime.toDate()); 110 return cb.greaterThanOrEqualTo((Path<Date>) expression, dateTime.toDate());
111 - } else { 111 + } else if (long.class.isAssignableFrom(leftType) &&
  112 + String.class.isAssignableFrom(rightType)) { // Long >= String
  113 + return cb.greaterThanOrEqualTo((Path<Long>) expression, Long.valueOf(object+""));
  114 + } else {
112 throw new RuntimeException("ge 不支持类型组合:" + expression.getJavaType() + ">=" + object.getClass()); 115 throw new RuntimeException("ge 不支持类型组合:" + expression.getJavaType() + ">=" + object.getClass());
113 } 116 }
114 } 117 }
@@ -140,7 +143,10 @@ public class PredicatesBuilder { @@ -140,7 +143,10 @@ public class PredicatesBuilder {
140 String.class.isAssignableFrom(rightType)) { // Date <= String 143 String.class.isAssignableFrom(rightType)) { // Date <= String
141 DateTime dateTime = new DateTime(object); 144 DateTime dateTime = new DateTime(object);
142 return cb.lessThanOrEqualTo((Path<Date>) expression, dateTime.toDate()); 145 return cb.lessThanOrEqualTo((Path<Date>) expression, dateTime.toDate());
143 - } else { 146 + }else if (long.class.isAssignableFrom(leftType) &&
  147 + String.class.isAssignableFrom(rightType)) { // Long <= String
  148 + return cb.lessThanOrEqualTo((Path<Long>) expression, Long.valueOf(object + "") );
  149 + } else {
144 throw new RuntimeException("le 不支持类型组合:" + expression.getJavaType() + "<=" + object.getClass()); 150 throw new RuntimeException("le 不支持类型组合:" + expression.getJavaType() + "<=" + object.getClass());
145 } 151 }
146 } 152 }
src/main/java/com/bsth/entity/traffic/VehicleInoutStop.java 0 → 100644
  1 +package com.bsth.entity.traffic;
  2 +
  3 +import com.bsth.entity.Cars;
  4 +import com.bsth.entity.Line;
  5 +
  6 +import javax.persistence.*;
  7 +import java.util.Date;
  8 +
  9 +/**
  10 + *
  11 + * @ClassName: VehicleInoutStop(车载上报停靠站信息)
  12 + *
  13 + * @Description: TODO(线路标准信息)
  14 + *
  15 + * @Author bsth@zq
  16 + *
  17 + * @Date 2017-9-18 9:34:39
  18 + *
  19 + * @Version 公交调度系统BS版 0.1
  20 + *
  21 + */
  22 +@Entity
  23 +@Table(name = "bsth_c_shreal")
  24 +public class VehicleInoutStop {
  25 +
  26 + @Id
  27 + @GeneratedValue(strategy = GenerationType.IDENTITY)
  28 + private Integer id;
  29 +
  30 + @ManyToOne
  31 + private Line line;
  32 +
  33 + @ManyToOne
  34 + private Cars cars;
  35 +
  36 + // 站点序号
  37 + private Integer stop;
  38 +
  39 + // 营运状态
  40 + private Integer serviceState;
  41 +
  42 + // 上下行
  43 + private Integer upDown;
  44 +
  45 + // 进出站/站内外
  46 + private Integer inOutStop;
  47 +
  48 + // 上报时间
  49 + private long reportDate;
  50 +
  51 + public Integer getId() {
  52 + return id;
  53 + }
  54 +
  55 + public void setId(Integer id) {
  56 + this.id = id;
  57 + }
  58 +
  59 + public Line getLine() {
  60 + return line;
  61 + }
  62 +
  63 + public void setLine(Line line) {
  64 + this.line = line;
  65 + }
  66 +
  67 + public Cars getCars() {
  68 + return cars;
  69 + }
  70 +
  71 + public void setCars(Cars cars) {
  72 + this.cars = cars;
  73 + }
  74 +
  75 + public Integer getStop() {
  76 + return stop;
  77 + }
  78 +
  79 + public void setStop(Integer stop) {
  80 + this.stop = stop;
  81 + }
  82 +
  83 + public Integer getServiceState() {
  84 + return serviceState;
  85 + }
  86 +
  87 + public void setServiceState(Integer serviceState) {
  88 + this.serviceState = serviceState;
  89 + }
  90 +
  91 + public Integer getUpDown() {
  92 + return upDown;
  93 + }
  94 +
  95 + public void setUpDown(Integer upDown) {
  96 + this.upDown = upDown;
  97 + }
  98 +
  99 + public Integer getInOutStop() {
  100 + return inOutStop;
  101 + }
  102 +
  103 + public void setInOutStop(Integer inOutStop) {
  104 + this.inOutStop = inOutStop;
  105 + }
  106 +
  107 + public long getReportDate() { return reportDate; }
  108 +
  109 + public void setReportDate(long reportDate) { this.reportDate = reportDate; }
  110 +}
src/main/java/com/bsth/repository/realcontrol/FrequentPhrasesRepository.java 0 → 100644
  1 +package com.bsth.repository.realcontrol;
  2 +
  3 +import com.bsth.entity.realcontrol.FrequentPhrases;
  4 +import com.bsth.repository.BaseRepository;
  5 +import org.springframework.stereotype.Repository;
  6 +
  7 +/**
  8 + * Created by panzhao on 2017/9/17.
  9 + */
  10 +@Repository
  11 +public interface FrequentPhrasesRepository extends BaseRepository<FrequentPhrases, Integer> {
  12 +}
src/main/java/com/bsth/repository/traffic/VehicleInoutStopRepository.java 0 → 100644
  1 +package com.bsth.repository.traffic;
  2 +
  3 +import com.bsth.entity.traffic.VehicleInoutStop;
  4 +import com.bsth.repository.BaseRepository;
  5 +
  6 +public interface VehicleInoutStopRepository extends BaseRepository<VehicleInoutStop, Integer> {
  7 +}
src/main/java/com/bsth/service/gps/GpsServiceImpl.java
@@ -994,7 +994,7 @@ public class GpsServiceImpl implements GpsService { @@ -994,7 +994,7 @@ public class GpsServiceImpl implements GpsService {
994 fv = f.get(obj).toString(); 994 fv = f.get(obj).toString();
995 v = map.get(f.getName()).toString(); 995 v = map.get(f.getName()).toString();
996 996
997 - if(!fv.startsWith(v) && !fv.endsWith(v)) 997 + if(!fv.startsWith(v)/* && !fv.endsWith(v)*/)
998 return false; 998 return false;
999 } 999 }
1000 } catch (Exception e) { 1000 } catch (Exception e) {
src/main/java/com/bsth/service/realcontrol/FrequentPhrasesService.java 0 → 100644
  1 +package com.bsth.service.realcontrol;
  2 +
  3 +import com.bsth.entity.realcontrol.FrequentPhrases;
  4 +import com.bsth.service.BaseService;
  5 +
  6 +/**
  7 + * Created by panzhao on 2017/9/17.
  8 + */
  9 +public interface FrequentPhrasesService extends BaseService<FrequentPhrases, Integer> {
  10 +}
src/main/java/com/bsth/service/realcontrol/LineConfigService.java
@@ -24,4 +24,6 @@ public interface LineConfigService extends BaseService&lt;LineConfig, Integer&gt;{ @@ -24,4 +24,6 @@ public interface LineConfigService extends BaseService&lt;LineConfig, Integer&gt;{
24 Map<String,Object> yjtkSet(Map<String, String> map); 24 Map<String,Object> yjtkSet(Map<String, String> map);
25 25
26 Map<String,Object> parkAndStationSet(Map<String, String> map); 26 Map<String,Object> parkAndStationSet(Map<String, String> map);
  27 +
  28 + Map<String,Object> findByIdx(String idx);
27 } 29 }
src/main/java/com/bsth/service/realcontrol/impl/FrequentPhrasesServiceImpl.java 0 → 100644
  1 +package com.bsth.service.realcontrol.impl;
  2 +
  3 +import com.bsth.entity.realcontrol.FrequentPhrases;
  4 +import com.bsth.security.util.SecurityUtils;
  5 +import com.bsth.service.impl.BaseServiceImpl;
  6 +import com.bsth.service.realcontrol.FrequentPhrasesService;
  7 +import org.springframework.stereotype.Service;
  8 +
  9 +import java.util.Map;
  10 +
  11 +/**
  12 + * Created by panzhao on 2017/9/17.
  13 + */
  14 +@Service
  15 +public class FrequentPhrasesServiceImpl extends BaseServiceImpl<FrequentPhrases, Integer> implements FrequentPhrasesService {
  16 +
  17 + @Override
  18 + public Map<String, Object> save(FrequentPhrases fp) {
  19 + fp.setUserName(SecurityUtils.getCurrentUser().getUserName());
  20 + return super.save(fp);
  21 + }
  22 +
  23 + @Override
  24 + public Iterable<FrequentPhrases> list(Map<String, Object> map) {
  25 + map.put("userName_eq", SecurityUtils.getCurrentUser().getUserName());
  26 + return super.list(map);
  27 + }
  28 +}
src/main/java/com/bsth/service/realcontrol/impl/LineConfigServiceImpl.java
@@ -6,6 +6,7 @@ import com.bsth.entity.realcontrol.LineConfig; @@ -6,6 +6,7 @@ import com.bsth.entity.realcontrol.LineConfig;
6 import com.bsth.repository.realcontrol.LineConfigRepository; 6 import com.bsth.repository.realcontrol.LineConfigRepository;
7 import com.bsth.service.impl.BaseServiceImpl; 7 import com.bsth.service.impl.BaseServiceImpl;
8 import com.bsth.service.realcontrol.LineConfigService; 8 import com.bsth.service.realcontrol.LineConfigService;
  9 +import com.google.common.base.Splitter;
9 import org.slf4j.Logger; 10 import org.slf4j.Logger;
10 import org.slf4j.LoggerFactory; 11 import org.slf4j.LoggerFactory;
11 import org.springframework.beans.factory.annotation.Autowired; 12 import org.springframework.beans.factory.annotation.Autowired;
@@ -203,4 +204,24 @@ public class LineConfigServiceImpl extends BaseServiceImpl&lt;LineConfig, Integer&gt; @@ -203,4 +204,24 @@ public class LineConfigServiceImpl extends BaseServiceImpl&lt;LineConfig, Integer&gt;
203 } 204 }
204 return rs; 205 return rs;
205 } 206 }
  207 +
  208 + @Override
  209 + public Map<String, Object> findByIdx(String idx) {
  210 + Map<String, Object> rs = new HashMap();
  211 + try{
  212 + List<LineConfig> list = new ArrayList<>();
  213 + List<String> ids = Splitter.on(",").splitToList(idx);
  214 +
  215 + for(String id : ids){
  216 + list.add(lineConfigData.get(id));
  217 + }
  218 +
  219 + rs.put("status", ResponseCode.SUCCESS);
  220 + rs.put("list", list);
  221 + }catch (Exception e){
  222 + rs.put("status", ResponseCode.ERROR);
  223 + logger.error("", e);
  224 + }
  225 + return rs;
  226 + }
206 } 227 }
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
@@ -226,6 +226,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -226,6 +226,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
226 226
227 ScheduleRealInfo schedule = dayOfSchedule.get(id); 227 ScheduleRealInfo schedule = dayOfSchedule.get(id);
228 228
  229 + if(schedule.getStatus() > 0){
  230 + map.put("status", ResponseCode.SUCCESS);
  231 + map.put("flag", "4008");
  232 + map.put("t", schedule);
  233 + return map;
  234 + }
  235 +
229 LineConfig config = lineConfigData.get(schedule.getXlBm()); 236 LineConfig config = lineConfigData.get(schedule.getXlBm());
230 //小于线路开始运营时间,则默认跨过24点 237 //小于线路开始运营时间,则默认跨过24点
231 if (dfsj.compareTo(config.getStartOpt()) < 0) { 238 if (dfsj.compareTo(config.getStartOpt()) < 0) {
@@ -252,7 +259,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -252,7 +259,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
252 } 259 }
253 260
254 //调整班次类型 261 //调整班次类型
255 - if (StringUtils.isNotEmpty(bcType)) { 262 + if (StringUtils.isNotEmpty(bcType) && !bcType.equals(schedule.getBcType())) {
  263 + if((schedule.getBcType().equals("major")
  264 + || schedule.getBcType().equals("venting"))
  265 + && bcType.equals("normal")){
  266 + //清空备注
  267 + schedule.setRemarks("");
  268 + }
256 schedule.setBcType(bcType); 269 schedule.setBcType(bcType);
257 } 270 }
258 271
@@ -1264,8 +1277,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1264,8 +1277,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1264 @Override 1277 @Override
1265 public Map<String, Object> spaceAdjust(Long[] ids, Integer space) { 1278 public Map<String, Object> spaceAdjust(Long[] ids, Integer space) {
1266 1279
1267 - List<ScheduleRealInfo> list = new ArrayList<>(), updateList = new ArrayList<>();  
1268 - Map<String, Object> rs = new HashMap<>(); 1280 + List<ScheduleRealInfo> list = new ArrayList<>(), ts = new ArrayList<>(), tempTs = null;
  1281 + Map<String, Object> rs = new HashMap<>(), tempRs = new HashMap<>();
1269 try { 1282 try {
1270 ScheduleRealInfo sch, next; 1283 ScheduleRealInfo sch, next;
1271 for (Long id : ids) { 1284 for (Long id : ids) {
@@ -1290,12 +1303,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1290,12 +1303,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1290 sch = list.get(i); 1303 sch = list.get(i);
1291 1304
1292 //调整待发 1305 //调整待发
1293 - outgoAdjust(sch.getId(), null, fmtHHmm.print(st), null, "3"); 1306 + tempRs = outgoAdjust(sch.getId(), null, fmtHHmm.print(st), null, "3");
  1307 +
  1308 + if(null != tempRs && tempRs.get("ts") != null)
  1309 + tempTs = (List<ScheduleRealInfo>) tempRs.get("ts");
  1310 +
  1311 + ts.addAll(tempTs);
1294 } 1312 }
1295 1313
1296 rs.put("status", ResponseCode.SUCCESS); 1314 rs.put("status", ResponseCode.SUCCESS);
1297 //返回最后一个班次,页面会全量刷新 1315 //返回最后一个班次,页面会全量刷新
1298 - rs.put("t", sch); 1316 + rs.put("ts", ts);
1299 } 1317 }
1300 1318
1301 } catch (Exception e) { 1319 } catch (Exception e) {
@@ -1386,6 +1404,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1386,6 +1404,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1386 sch.setsName(""); 1404 sch.setsName("");
1387 } 1405 }
1388 1406
  1407 + LineConfig config = lineConfigData.get(sch.getXlBm());
1389 /** 1408 /**
1390 * 调整实发 1409 * 调整实发
1391 */ 1410 */
@@ -1393,13 +1412,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1393,13 +1412,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1393 if (StringUtils.isNotBlank(fcsjActual) 1412 if (StringUtils.isNotBlank(fcsjActual)
1394 && !fcsjActual.equals(sch.getFcsjActual())) { 1413 && !fcsjActual.equals(sch.getFcsjActual())) {
1395 1414
1396 - LineConfig config = lineConfigData.get(sch.getXlBm());  
1397 - long t = 0L; 1415 + //long t = 0L;
1398 //小于线路开始运营时间,则默认跨过24点 1416 //小于线路开始运营时间,则默认跨过24点
1399 - if (fcsjActual.compareTo(config.getStartOpt()) < 0) 1417 + long t = schAttrCalculator.getTime(sch.getScheduleDateStr(), fcsjActual, config);
  1418 + /* if (fcsjActual.compareTo(config.getStartOpt()) < 0)
1400 t = fmtyyyyMMddHHmm.parseMillis(fmtyyyyMMdd.print(sch.getScheduleDate().getTime() + DAY_TIME) + fcsjActual); 1419 t = fmtyyyyMMddHHmm.parseMillis(fmtyyyyMMdd.print(sch.getScheduleDate().getTime() + DAY_TIME) + fcsjActual);
1401 else 1420 else
1402 - t = fmtyyyyMMddHHmm.parseMillis(sch.getScheduleDateStr() + fcsjActual); 1421 + t = fmtyyyyMMddHHmm.parseMillis(sch.getScheduleDateStr() + fcsjActual);*/
1403 1422
1404 fLog.log("调整实发时间", sch.getFcsjActual(), fcsjActual); 1423 fLog.log("调整实发时间", sch.getFcsjActual(), fcsjActual);
1405 sch.setFcsjActualAll(t); 1424 sch.setFcsjActualAll(t);
@@ -1423,7 +1442,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1423,7 +1442,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1423 1442
1424 //调整实达 1443 //调整实达
1425 fLog.log("调整实达时间", sch.getZdsjActual(), zdsjActual); 1444 fLog.log("调整实达时间", sch.getZdsjActual(), zdsjActual);
1426 - sch.setZdsjActualAll(zdsjActual); 1445 +
  1446 + long t = schAttrCalculator.getTime(sch.getScheduleDateStr(), zdsjActual, config);
  1447 + sch.setZdsjActualAll(t);
1427 //路牌下一班起点到达时间 1448 //路牌下一班起点到达时间
1428 ScheduleRealInfo next = dayOfSchedule.nextByLp2(sch); 1449 ScheduleRealInfo next = dayOfSchedule.nextByLp2(sch);
1429 if (null != next) { 1450 if (null != next) {
@@ -1432,15 +1453,6 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1432,15 +1453,6 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1432 ts.add(next); 1453 ts.add(next);
1433 } 1454 }
1434 1455
1435 -/* try{  
1436 - //车辆下一个要执行的班次  
1437 - ScheduleRealInfo carNext = dayOfSchedule.next(sch);  
1438 - if(carNext != null && !carNext.getXlBm().equals(sch.getXlBm())){  
1439 - DirectivePushQueue.put64(carNext.getClZbh(), carNext.getXlBm(), "套跑@系统");  
1440 - fLog.log("下发线路切换指令", sch.getXlName(), carNext.getXlName());  
1441 - }  
1442 - }catch (Exception e){logger.error("", e);}*/  
1443 -  
1444 //重新计算车辆执行班次 1456 //重新计算车辆执行班次
1445 dayOfSchedule.reCalcExecPlan(sch.getClZbh()); 1457 dayOfSchedule.reCalcExecPlan(sch.getClZbh());
1446 } else if(StringUtils.isNotEmpty(sch.getZdsjActual()) && StringUtils.isEmpty(zdsjActual)){ 1458 } else if(StringUtils.isNotEmpty(sch.getZdsjActual()) && StringUtils.isEmpty(zdsjActual)){
@@ -3006,9 +3018,11 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -3006,9 +3018,11 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3006 Set<ScheduleRealInfo> set = new HashSet<>(); 3018 Set<ScheduleRealInfo> set = new HashSet<>();
3007 3019
3008 ScheduleRealInfo sch; 3020 ScheduleRealInfo sch;
  3021 + StringBuilder sb = new StringBuilder();
3009 3022
3010 String jGh = null,jName,sGh,sName; 3023 String jGh = null,jName,sGh,sName;
3011 for (ChangePersonCar cpc : cpcs) { 3024 for (ChangePersonCar cpc : cpcs) {
  3025 + sb = new StringBuilder();
3012 3026
3013 sch = dayOfSchedule.get(cpc.getSchId()); 3027 sch = dayOfSchedule.get(cpc.getSchId());
3014 if (sch == null) 3028 if (sch == null)
@@ -3042,7 +3056,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -3042,7 +3056,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3042 //日志记录 3056 //日志记录
3043 ScheduleModifyLogger.tzrc(sch, cpc); 3057 ScheduleModifyLogger.tzrc(sch, cpc);
3044 3058
  3059 + //换驾驶员
3045 if (StringUtils.isNotEmpty(cpc.getJsy())) { 3060 if (StringUtils.isNotEmpty(cpc.getJsy())) {
  3061 + if(!jGh.equals(sch.getjGh()))
  3062 + sb.append(sch.getjGh() + " 换 " + jGh + ";");
3046 //换驾驶员 3063 //换驾驶员
3047 if(persoChange(sch, jGh)) 3064 if(persoChange(sch, jGh))
3048 set.add(sch); 3065 set.add(sch);
@@ -3057,6 +3074,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -3057,6 +3074,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3057 rs.put("status", ResponseCode.ERROR); 3074 rs.put("status", ResponseCode.ERROR);
3058 return rs; 3075 return rs;
3059 } 3076 }
  3077 +
  3078 + if(!sGh.equals(sch.getsGh()))
  3079 + sb.append(sch.getsGh() + " 换 " + sGh + ";");
3060 if(persoChangeSPY(sch, sGh)) 3080 if(persoChangeSPY(sch, sGh))
3061 set.add(sch); 3081 set.add(sch);
3062 } 3082 }
@@ -3067,10 +3087,14 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -3067,10 +3087,14 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3067 3087
3068 //换车 3088 //换车
3069 if (StringUtils.isNotEmpty(cpc.getClZbh()) && !cpc.getClZbh().equals(sch.getClZbh())) { 3089 if (StringUtils.isNotEmpty(cpc.getClZbh()) && !cpc.getClZbh().equals(sch.getClZbh())) {
  3090 + sb.append(sch.getClZbh() + " 换 " + cpc.getClZbh() + ";");
3070 set.add(sch); 3091 set.add(sch);
3071 set.addAll(dayOfSchedule.changeCar(sch, cpc.getClZbh())); 3092 set.addAll(dayOfSchedule.changeCar(sch, cpc.getClZbh()));
3072 } 3093 }
3073 3094
  3095 + if(sb.length() > 0)
  3096 + sch.setRemarks(sb.toString());
  3097 +
3074 dayOfSchedule.save(sch); 3098 dayOfSchedule.save(sch);
3075 set.add(sch); 3099 set.add(sch);
3076 3100
src/main/java/com/bsth/service/schedule/datatools/TTInfoDetailDataToolsImpl.java
@@ -271,7 +271,7 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail @@ -271,7 +271,7 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail
271 for (int r = 1; r < sheet.getRows(); r++) { 271 for (int r = 1; r < sheet.getRows(); r++) {
272 List<FcInfo> fcInfos = new ArrayList<>(); 272 List<FcInfo> fcInfos = new ArrayList<>();
273 // 每行第一列都是路牌 273 // 每行第一列都是路牌
274 - fcInfos.add(new FcInfo(null, null, sheet.getCell(0, r).getContents(), null, null, null, null)); // 用fcsj放置路牌显示 274 + fcInfos.add(new FcInfo(null, null, sheet.getCell(0, r).getContents(), null, null, null, null, null)); // 用fcsj放置路牌显示
275 275
276 int bc_ks = 0; // 空驶班次 276 int bc_ks = 0; // 空驶班次
277 int bc_yy = 0; // 营运班次 277 int bc_yy = 0; // 营运班次
@@ -294,7 +294,9 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail @@ -294,7 +294,9 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail
294 String qdzCode = content == null ? "" : content[7]; // 起点站编码 294 String qdzCode = content == null ? "" : content[7]; // 起点站编码
295 String zdzCode = content == null ? "" : content[8]; // 终点站编码 295 String zdzCode = content == null ? "" : content[8]; // 终点站编码
296 296
297 - FcInfo fcInfo = new FcInfo(ttdid_str, bctype, fcsj, xldir, isfb, qdzCode, zdzCode); 297 + String ists = content == null ? "" : content[9]; // 是否停驶
  298 +
  299 + FcInfo fcInfo = new FcInfo(ttdid_str, bctype, fcsj, xldir, isfb, qdzCode, zdzCode, ists);
298 300
299 if (StringUtils.isNotEmpty(fzdname)) 301 if (StringUtils.isNotEmpty(fzdname))
300 headarrays[c] = fzdname; 302 headarrays[c] = fzdname;
@@ -328,10 +330,10 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail @@ -328,10 +330,10 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail
328 } 330 }
329 331
330 // 添加一列 空驶班次/空驶里程,fcsj放置数据 332 // 添加一列 空驶班次/空驶里程,fcsj放置数据
331 - fcInfos.add(new FcInfo(null, null, String.format("%d/%.3f", bc_ks, lc_ks), null, null, null, null)); 333 + fcInfos.add(new FcInfo(null, null, String.format("%d/%.3f", bc_ks, lc_ks), null, null, null, null, null));
332 334
333 // 添加一列 营运班次/营运里程,fcsj放置数据 335 // 添加一列 营运班次/营运里程,fcsj放置数据
334 - fcInfos.add(new FcInfo(null, null, String.format("%d/%.3f", bc_yy, lc_yy), null, null, null, null)); 336 + fcInfos.add(new FcInfo(null, null, String.format("%d/%.3f", bc_yy, lc_yy), null, null, null, null, null));
335 337
336 editInfo.getContents().add(fcInfos); 338 editInfo.getContents().add(fcInfos);
337 } 339 }
src/main/java/com/bsth/service/schedule/datatools/TTInfoDetailForEdit.java
@@ -29,6 +29,8 @@ public interface TTInfoDetailForEdit { @@ -29,6 +29,8 @@ public interface TTInfoDetailForEdit {
29 private String qdzCode; 29 private String qdzCode;
30 /** 终点站code */ 30 /** 终点站code */
31 private String zdzCode; 31 private String zdzCode;
  32 + /** 是否停驶 */
  33 + private Boolean ists;
32 34
33 public FcInfo() { 35 public FcInfo() {
34 } 36 }
@@ -40,7 +42,8 @@ public interface TTInfoDetailForEdit { @@ -40,7 +42,8 @@ public interface TTInfoDetailForEdit {
40 String xldir, 42 String xldir,
41 String isfb, 43 String isfb,
42 String qdzCode, 44 String qdzCode,
43 - String zdzCode) { 45 + String zdzCode,
  46 + String ists) {
44 this.ttdid = StringUtils.isEmpty(ttdid_str) ? null : Long.valueOf(ttdid_str); 47 this.ttdid = StringUtils.isEmpty(ttdid_str) ? null : Long.valueOf(ttdid_str);
45 this.bc_type = bc_type; 48 this.bc_type = bc_type;
46 this.fcsj = fcsj; 49 this.fcsj = fcsj;
@@ -59,6 +62,13 @@ public interface TTInfoDetailForEdit { @@ -59,6 +62,13 @@ public interface TTInfoDetailForEdit {
59 this.zdzCode = zdzCode; 62 this.zdzCode = zdzCode;
60 } 63 }
61 64
  65 + if ("N".equals(ists))
  66 + this.ists = false;
  67 + else if ("Y".equals(ists) || "true".equals(ists))
  68 + this.ists = true;
  69 + else
  70 + this.ists = false;
  71 +
62 } 72 }
63 73
64 public Long getTtdid() { 74 public Long getTtdid() {
@@ -116,6 +126,14 @@ public interface TTInfoDetailForEdit { @@ -116,6 +126,14 @@ public interface TTInfoDetailForEdit {
116 public void setZdzCode(String zdzCode) { 126 public void setZdzCode(String zdzCode) {
117 this.zdzCode = zdzCode; 127 this.zdzCode = zdzCode;
118 } 128 }
  129 +
  130 + public Boolean getIsts() {
  131 + return ists;
  132 + }
  133 +
  134 + public void setIsts(Boolean ists) {
  135 + this.ists = ists;
  136 + }
119 } 137 }
120 138
121 /** 139 /**
src/main/java/com/bsth/service/traffic/VehicleInoutStopService.java 0 → 100644
  1 +package com.bsth.service.traffic;
  2 +
  3 +import com.bsth.entity.traffic.VehicleInoutStop;
  4 +import com.bsth.service.BaseService;
  5 +
  6 +
  7 +/**
  8 + * 时刻模板上传日志
  9 + */
  10 +public interface VehicleInoutStopService extends BaseService<VehicleInoutStop,Integer> {
  11 +
  12 +}
src/main/java/com/bsth/service/traffic/impl/VehicleInoutStopServiceImpl.java 0 → 100644
  1 +package com.bsth.service.traffic.impl;
  2 +
  3 +import com.bsth.entity.traffic.VehicleInoutStop;
  4 +import com.bsth.service.impl.BaseServiceImpl;
  5 +import com.bsth.service.traffic.VehicleInoutStopService;
  6 +import org.slf4j.Logger;
  7 +import org.slf4j.LoggerFactory;
  8 +import org.springframework.stereotype.Service;
  9 +
  10 +/**
  11 + *
  12 + * @ClassName: TrafficManageServiceImpl(运管处接口service业务层实现类)
  13 + *
  14 + * @Extends : BaseService
  15 + *
  16 + * @Description:
  17 + *
  18 + * @Author bsth@zq
  19 + *
  20 + * @Date 2016年10月28日 上午9:21:17
  21 + *
  22 + * @Version 公交调度系统BS版 0.1
  23 + *
  24 + */
  25 +
  26 +@Service
  27 +public class VehicleInoutStopServiceImpl extends BaseServiceImpl<VehicleInoutStop,Integer> implements VehicleInoutStopService {
  28 +
  29 + Logger logger = LoggerFactory.getLogger(this.getClass());
  30 +
  31 +}
src/main/java/com/bsth/service/traffic/impl/YgcBasicDataServiceImpl.java
@@ -81,6 +81,7 @@ public class YgcBasicDataServiceImpl implements YgcBasicDataService{ @@ -81,6 +81,7 @@ public class YgcBasicDataServiceImpl implements YgcBasicDataService{
81 flag = "success"; 81 flag = "success";
82 }catch (Exception e){ 82 }catch (Exception e){
83 e.printStackTrace(); 83 e.printStackTrace();
  84 + logger.error("updateYgcBasicData:",e);
84 } 85 }
85 finally { 86 finally {
86 // 删除文件 87 // 删除文件
src/main/resources/datatools/ktrs/ttinfodetailoutputforedit.ktr
@@ -3892,7 +3892,7 @@ @@ -3892,7 +3892,7 @@
3892 <optimizationLevel>9</optimizationLevel> 3892 <optimizationLevel>9</optimizationLevel>
3893 <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> 3893 <jsScripts> <jsScript> <jsScript_type>0</jsScript_type>
3894 <jsScript_name>Script 1</jsScript_name> 3894 <jsScript_name>Script 1</jsScript_name>
3895 - <jsScript_script>&#x2f;&#x2f;Script here&#xa;&#xa;&#x2f;&#x2f; &#x987a;&#x5e8f;&#xff0c;id,fcsj,jhlc,zdname,bctype,xldir,isfb&#xa;var all_content_array &#x3d; &#x5b;&#x5d;&#x3b;&#xa;var all_content &#x3d; &#x22;&#x22;&#x3b; &#xa;all_content_array.push&#x28;id&#x29;&#x3b;&#xa;all_content_array.push&#x28;fcsj&#x29;&#x3b;&#xa;all_content_array.push&#x28;jhlc&#x29;&#x3b;&#xa;all_content_array.push&#x28;fczdName&#x29;&#x3b;&#xa;all_content_array.push&#x28;bc_type&#x29;&#x3b;&#xa;all_content_array.push&#x28;xl_dir&#x29;&#x3b;&#xa;all_content_array.push&#x28;isfb&#x29;&#x3b;&#xa;all_content_array.push&#x28;qdz_code &#x7c;&#x7c; &#x27;null&#x27;&#x29;&#x3b;&#xa;all_content_array.push&#x28;zdz_code &#x7c;&#x7c; &#x27;null&#x27;&#x29;&#x3b;&#xa;&#xa;all_content &#x3d; all_content_array.join&#x28;&#x22;,&#x22;&#x29;&#x3b; &#x2f;&#x2f; &#x9017;&#x53f7;&#x5206;&#x9694;</jsScript_script> 3895 + <jsScript_script>&#x2f;&#x2f;Script here&#xa;&#xa;&#x2f;&#x2f; &#x987a;&#x5e8f;&#xff0c;id,fcsj,jhlc,zdname,bctype,xldir,isfb&#xa;var all_content_array &#x3d; &#x5b;&#x5d;&#x3b;&#xa;var all_content &#x3d; &#x22;&#x22;&#x3b; &#xa;all_content_array.push&#x28;id&#x29;&#x3b;&#xa;all_content_array.push&#x28;fcsj&#x29;&#x3b;&#xa;all_content_array.push&#x28;jhlc&#x29;&#x3b;&#xa;all_content_array.push&#x28;fczdName&#x29;&#x3b;&#xa;all_content_array.push&#x28;bc_type&#x29;&#x3b;&#xa;all_content_array.push&#x28;xl_dir&#x29;&#x3b;&#xa;all_content_array.push&#x28;isfb&#x29;&#x3b;&#xa;all_content_array.push&#x28;qdz_code &#x7c;&#x7c; &#x27;null&#x27;&#x29;&#x3b;&#xa;all_content_array.push&#x28;zdz_code &#x7c;&#x7c; &#x27;null&#x27;&#x29;&#x3b;&#xa;all_content_array.push&#x28;ists&#x29;&#x3b;&#xa;&#xa;all_content &#x3d; all_content_array.join&#x28;&#x22;,&#x22;&#x29;&#x3b; &#x2f;&#x2f; &#x9017;&#x53f7;&#x5206;&#x9694;</jsScript_script>
3896 </jsScript> </jsScripts> <fields> <field> <name>all_content</name> 3896 </jsScript> </jsScripts> <fields> <field> <name>all_content</name>
3897 <rename>all_content</rename> 3897 <rename>all_content</rename>
3898 <type>String</type> 3898 <type>String</type>
@@ -3964,7 +3964,7 @@ @@ -3964,7 +3964,7 @@
3964 <schema_name/> 3964 <schema_name/>
3965 </partitioning> 3965 </partitioning>
3966 <connection>bus_control_variable</connection> 3966 <connection>bus_control_variable</connection>
3967 - <sql>select &#xa;t.id as id&#xa;, concat&#x28;g.id, &#x27;_&#x27;, g.lp_name&#x29; as lp&#xa;, g.xl as xl&#xa;, qdz_code&#xa;, qdz_name&#xa;, zdz_code&#xa;, zdz_name&#xa;, fcsj&#xa;, jhlc&#xa;, bc_type &#xa;, bcs&#xa;, fcno&#xa;, xl_dir&#xa;, isfb&#xa;from bsth_c_s_ttinfo_detail t left join &#xa;bsth_c_s_gbi g on t.lp &#x3d; g.id &#xa;where &#xa;g.xl &#x3d; &#x3f; and&#xa;t.ttinfo &#x3d; &#x3f; &#xa;order by g.lp_no asc, t.bcs asc</sql> 3967 + <sql>select &#xa;t.id as id&#xa;, concat&#x28;g.id, &#x27;_&#x27;, g.lp_name&#x29; as lp&#xa;, g.xl as xl&#xa;, qdz_code&#xa;, qdz_name&#xa;, zdz_code&#xa;, zdz_name&#xa;, fcsj&#xa;, jhlc&#xa;, bc_type &#xa;, bcs&#xa;, fcno&#xa;, xl_dir&#xa;, isfb&#xa;, ists&#xa;from bsth_c_s_ttinfo_detail t left join &#xa;bsth_c_s_gbi g on t.lp &#x3d; g.id &#xa;where &#xa;g.xl &#x3d; &#x3f; and&#xa;t.ttinfo &#x3d; &#x3f; &#xa;order by g.lp_no asc, t.bcs asc</sql>
3968 <limit>0</limit> 3968 <limit>0</limit>
3969 <lookup>&#x83b7;&#x53d6;&#x53d8;&#x91cf;</lookup> 3969 <lookup>&#x83b7;&#x53d6;&#x53d8;&#x91cf;</lookup>
3970 <execute_each_row>N</execute_each_row> 3970 <execute_each_row>N</execute_each_row>
src/main/resources/fatso/handle_real_ctl.js
@@ -11,32 +11,35 @@ var fs = require(&#39;fs&#39;) @@ -11,32 +11,35 @@ var fs = require(&#39;fs&#39;)
11 11
12 var platform = process.platform; 12 var platform = process.platform;
13 var iswin = platform=='win32'; 13 var iswin = platform=='win32';
14 -var separator = platform=='win32'?'\\':'/'; 14 +var sp = platform=='win32'?'\\':'/';
15 //不参与的目录 15 //不参与的目录
16 var pName = 'bsth_control' 16 var pName = 'bsth_control'
17 , path = process.cwd() 17 , path = process.cwd()
18 //根目录 18 //根目录
19 - , root = path.substr(0, path.indexOf(separator + 'src'+separator+'main'))  
20 - , workspace = root.substr(0, root.lastIndexOf(separator + pName)) 19 + , root = path.substr(0, path.indexOf(sp + 'src'+sp+'main'))
  20 + , workspace = root.substr(0, root.lastIndexOf(sp + pName))
21 //临时目录 21 //临时目录
22 - , dest = (workspace + separator + pName + '@fatso_copy')//.replace(/\//g, '\\')  
23 - , _static = separator + 'src'+separator+'main'+separator+'resources'+separator+'static'; 22 + , dest = (workspace + sp + pName + '@fatso_copy')//.replace(/\//g, '\\')
  23 + , _static = sp + 'src'+sp+'main'+sp+'resources'+sp+'static';
24 24
25 25
26 -var mainFile = dest + _static + separator + 'real_control_v2'+separator+'main.html';  
27 -var mapFile = dest + _static + separator + 'real_control_v2'+separator+'mapmonitor'+separator+'real.html'; 26 +var mainFile = dest + _static + sp + 'real_control_v2'+sp+'main.html';
  27 +var aloneMapWrapFile = dest + _static + sp + 'real_control_v2'+sp+'alone_page'+sp+'map'+sp+'alone_wrap.html';
  28 +var aloneHomeWrapFile = dest + _static + sp + 'real_control_v2'+sp+'alone_page'+sp+'home'+sp+'home_wrap.html';
  29 +var mapFile = dest + _static + sp + 'real_control_v2'+sp+'mapmonitor'+sp+'real.html';
28 var realCtl = { 30 var realCtl = {
29 /** 31 /**
30 * 处理线调首页 32 * 处理线调首页
31 */ 33 */
32 handleMain: function (cb) { 34 handleMain: function (cb) {
33 - //读取文件  
34 - var data = fs.readFileSync(mainFile, 'utf-8')  
35 - , $ = cheerio.load(data);  
36 - 35 + //处理main.html
  36 + var data = fs.readFileSync(mainFile, 'utf-8'),
  37 + $ = cheerio.load(data);
37 handleCss($, function () { 38 handleCss($, function () {
38 handleJs($, mainFile, cb); 39 handleJs($, mainFile, cb);
39 }); 40 });
  41 +
  42 +
40 }, 43 },
41 /** 44 /**
42 * 处理地图模块 45 * 处理地图模块
@@ -50,7 +53,30 @@ var realCtl = { @@ -50,7 +53,30 @@ var realCtl = {
50 handleCss($, function () { 53 handleCss($, function () {
51 handleJs($, mapFile, cb); 54 handleJs($, mapFile, cb);
52 }); 55 });
  56 + },
  57 + /**
  58 + * 处理单屏地图页面
  59 + * @param cb
  60 + */
  61 + handleAlonePage: function (cb) {
  62 + var data = fs.readFileSync(aloneMapWrapFile, 'utf-8');
  63 + var $ = cheerio.load(data);
  64 + handleCss($, function () {
  65 + handleJs($, aloneMapWrapFile, cb);
  66 + });
  67 + },
  68 + /**
  69 + * 处理单屏主页
  70 + * @param cb
  71 + */
  72 + handleAloneHomePage: function (cb) {
  73 + var data = fs.readFileSync(aloneHomeWrapFile, 'utf-8');
  74 + var $ = cheerio.load(data);
  75 + handleCss($, function () {
  76 + handleJs($, aloneHomeWrapFile, cb);
  77 + });
53 } 78 }
  79 +
54 }; 80 };
55 81
56 /** 82 /**
@@ -84,7 +110,7 @@ var handleCss = function ($, cb) { @@ -84,7 +110,7 @@ var handleCss = function ($, cb) {
84 var data = out.styles; 110 var data = out.styles;
85 var fName = (k + '_' + md5(data)) + '.css'; 111 var fName = (k + '_' + md5(data)) + '.css';
86 //写入 assets css 目录下 112 //写入 assets css 目录下
87 - var descFile = dest + _static + separator + 'real_control_v2'+separator+'assets'+separator+'css' + separator + fName; 113 + var descFile = dest + _static + sp + 'real_control_v2'+sp+'assets'+sp+'css' + sp + fName;
88 fs.open(descFile, 'a', function (err, fd) { 114 fs.open(descFile, 'a', function (err, fd) {
89 115
90 fs.write(fd, data, function () { 116 fs.write(fd, data, function () {
@@ -138,7 +164,7 @@ var handleJs = function ($, file, cb) { @@ -138,7 +164,7 @@ var handleJs = function ($, file, cb) {
138 var data = result.code; 164 var data = result.code;
139 var fName = (k + '_' + md5(data)) + '.js'; 165 var fName = (k + '_' + md5(data)) + '.js';
140 //写入 assets js 目录下 166 //写入 assets js 目录下
141 - var descFile = dest + _static + separator + 'real_control_v2'+separator+'assets'+separator+'js' + separator + fName; 167 + var descFile = dest + _static + sp + 'real_control_v2'+sp+'assets'+sp+'js' + sp + fName;
142 fs.open(descFile, 'a', function (err, fd) { 168 fs.open(descFile, 'a', function (err, fd) {
143 169
144 fs.write(fd, data, function () { 170 fs.write(fd, data, function () {
src/main/resources/fatso/parse.js
@@ -64,7 +64,7 @@ function write(file, text){ @@ -64,7 +64,7 @@ function write(file, text){
64 console.log(err.toString().red); 64 console.log(err.toString().red);
65 process.exit(); 65 process.exit();
66 } 66 }
67 - console.log(file.green); 67 + //console.log(file.green);
68 }); 68 });
69 } 69 }
70 70
src/main/resources/fatso/start.js
@@ -14,19 +14,19 @@ var fs = require(&#39;fs&#39;) @@ -14,19 +14,19 @@ var fs = require(&#39;fs&#39;)
14 14
15 var platform = process.platform; 15 var platform = process.platform;
16 var iswin = platform=='win32'; 16 var iswin = platform=='win32';
17 -var separator = platform=='win32'?'\\':'/'; 17 +var sp = platform=='win32'?'\\':'/';
18 //不参与的目录 18 //不参与的目录
19 -var excludes = ['scheduleApp', 'trafficManage', 'control', 'permission'+separator+'authorize_all', 'summary'] 19 +var excludes = ['scheduleApp', 'trafficManage', 'control', 'permission'+sp+'authorize_all', 'summary', 'report'+sp+'oil']
20 ,ep = new EventProxy() 20 ,ep = new EventProxy()
21 ,pName = 'bsth_control' 21 ,pName = 'bsth_control'
22 ,path = process.cwd() 22 ,path = process.cwd()
23 //根目录 23 //根目录
24 - ,root = path.substr(0, path.indexOf(separator + 'src'+separator+'main'))  
25 - ,workspace = root.substr(0, root.lastIndexOf(separator + pName)) 24 + ,root = path.substr(0, path.indexOf(sp + 'src'+sp+'main'))
  25 + ,workspace = root.substr(0, root.lastIndexOf(sp + pName))
26 //临时目录 26 //临时目录
27 - ,dest = (workspace + separator + pName+'@fatso_copy')  
28 - ,_static = separator + 'src'+separator+'main'+separator+'resources'+separator+'static'  
29 - ,_pages = dest + _static + separator + 'pages'; 27 + ,dest = (workspace + sp + pName+'@fatso_copy')
  28 + ,_static = sp + 'src'+sp+'main'+sp+'resources'+sp+'static'
  29 + ,_pages = dest + _static + sp + 'pages';
30 30
31 31
32 //创建临时目录 32 //创建临时目录
@@ -45,7 +45,7 @@ ep.tail(&#39;mvn-clean&#39;,function(){ @@ -45,7 +45,7 @@ ep.tail(&#39;mvn-clean&#39;,function(){
45 //ep.emit('copy-project'); 45 //ep.emit('copy-project');
46 //清理target 46 //清理target
47 logInfo('mvn clean...'); 47 logInfo('mvn clean...');
48 - cProcess = child_process.exec("mvn clean",{cwd: workspace + separator + pName},function(error){ 48 + cProcess = child_process.exec("mvn clean",{cwd: workspace + sp + pName},function(error){
49 if(error) 49 if(error)
50 logError(error); 50 logError(error);
51 51
@@ -88,7 +88,7 @@ ep.tail(&#39;minifier-js&#39;, function(){ @@ -88,7 +88,7 @@ ep.tail(&#39;minifier-js&#39;, function(){
88 //再处理首页 88 //再处理首页
89 ep.emit('handle-index', function(){ 89 ep.emit('handle-index', function(){
90 //递归处理片段 90 //递归处理片段
91 - walk(dest + _static + separator + 'pages', function(item){ 91 + walk(dest + _static + sp + 'pages', function(item){
92 ep.emit('handle-fragment', item); 92 ep.emit('handle-fragment', item);
93 }, 93 },
94 function(){ 94 function(){
@@ -96,7 +96,13 @@ ep.tail(&#39;minifier-js&#39;, function(){ @@ -96,7 +96,13 @@ ep.tail(&#39;minifier-js&#39;, function(){
96 handle_real_ctl.handleMain(function () { 96 handle_real_ctl.handleMain(function () {
97 //处理线调地图 97 //处理线调地图
98 handle_real_ctl.handleMap(function () { 98 handle_real_ctl.handleMap(function () {
99 - ep.emit('package-jar'); 99 + //处理单屏地图页面
  100 + handle_real_ctl.handleAlonePage(function () {
  101 + //处理单屏主页
  102 + handle_real_ctl.handleAloneHomePage(function () {
  103 + ep.emit('package-jar');
  104 + });
  105 + });
100 }); 106 });
101 }); 107 });
102 }); 108 });
@@ -112,7 +118,7 @@ ep.tail(&#39;package-jar&#39;, function(file){ @@ -112,7 +118,7 @@ ep.tail(&#39;package-jar&#39;, function(file){
112 118
113 logSuccess('mvn package success'); 119 logSuccess('mvn package success');
114 120
115 - console.log(('成功打包在 ' + dest + separator + 'target 目录下').cyan); 121 + console.log(('成功打包在 ' + dest + sp + 'target 目录下').cyan);
116 }); 122 });
117 123
118 output(cProcess); 124 output(cProcess);
@@ -122,7 +128,7 @@ ep.tail(&#39;package-jar&#39;, function(file){ @@ -122,7 +128,7 @@ ep.tail(&#39;package-jar&#39;, function(file){
122 ep.tail('handle-fragment', function(file){ 128 ep.tail('handle-fragment', function(file){
123 //要排除的文件 129 //要排除的文件
124 for(var i = 0, ex; ex = excludes[i++];){ 130 for(var i = 0, ex; ex = excludes[i++];){
125 - if(file.indexOf(_pages + separator + ex) != -1) 131 + if(file.indexOf(_pages + sp + ex) != -1)
126 return false; 132 return false;
127 } 133 }
128 handleJavascript(file, function(mini, $){ 134 handleJavascript(file, function(mini, $){
@@ -139,12 +145,12 @@ ep.tail(&#39;handle-fragment&#39;, function(file){ @@ -139,12 +145,12 @@ ep.tail(&#39;handle-fragment&#39;, function(file){
139 145
140 //处理首页 146 //处理首页
141 ep.tail('handle-index', function(cb){ 147 ep.tail('handle-index', function(cb){
142 - var index = dest + _static + separator + 'index.html'; 148 + var index = dest + _static + sp + 'index.html';
143 handleJavascript(index, function(mini, $){ 149 handleJavascript(index, function(mini, $){
144 var jsMiniText = mini.inside + mini.outside; 150 var jsMiniText = mini.inside + mini.outside;
145 151
146 var code = md5(jsMiniText); 152 var code = md5(jsMiniText);
147 - fs.open( dest + _static + separator + 'assets'+separator+'js' + separator + code + '.js', 'a', function(err, fd){ 153 + fs.open( dest + _static + sp + 'assets'+sp+'js' + sp + code + '.js', 'a', function(err, fd){
148 if(err) 154 if(err)
149 logError(err); 155 logError(err);
150 156
@@ -204,7 +210,7 @@ function write(file, text){ @@ -204,7 +210,7 @@ function write(file, text){
204 console.log(err.toString().red); 210 console.log(err.toString().red);
205 process.exit(); 211 process.exit();
206 } 212 }
207 - console.log(file.green); 213 + //console.log(file.green);
208 }); 214 });
209 } 215 }
210 216
@@ -219,7 +225,7 @@ function walk(path ,handleFile, over) { @@ -219,7 +225,7 @@ function walk(path ,handleFile, over) {
219 console.log('read dir error'.red); 225 console.log('read dir error'.red);
220 } else { 226 } else {
221 files.forEach(function(item) { 227 files.forEach(function(item) {
222 - var tmpPath = path + separator + item; 228 + var tmpPath = path + sp + item;
223 fs.stat(tmpPath, function(err1, stats) { 229 fs.stat(tmpPath, function(err1, stats) {
224 if (err1) { 230 if (err1) {
225 console.log('stat error'); 231 console.log('stat error');
src/main/resources/static/pages/base/timesmodel/js/base-fun.js
@@ -796,8 +796,8 @@ var BaseFun = function() { @@ -796,8 +796,8 @@ var BaseFun = function() {
796 var allLMapBc = baseF.GetByArgusInitAllLpDownedBcCollections(saa , cara , map , seMap , dataMap); 796 var allLMapBc = baseF.GetByArgusInitAllLpDownedBcCollections(saa , cara , map , seMap , dataMap);
797 //return {'json':allLMapBc,'bxrcgs':null}; 797 //return {'json':allLMapBc,'bxrcgs':null};
798 798
799 - // 第二步 纵向调整  
800 - baseF.evenStartDepartSpace(allLMapBc , dataMap); 799 + // 第二步 纵向调整
  800 + baseF.evenStartDepartSpace(allLMapBc , dataMap);
801 //return {'json':allLMapBc,'bxrcgs':null}; 801 //return {'json':allLMapBc,'bxrcgs':null};
802 802
803 // 第三步 剔除首末班车以外的班次,并确认首末班车. 803 // 第三步 剔除首末班车以外的班次,并确认首末班车.
@@ -817,12 +817,12 @@ var BaseFun = function() { @@ -817,12 +817,12 @@ var BaseFun = function() {
817 var list = baseF.getBxRcListCollection(map.bxrc); 817 var list = baseF.getBxRcListCollection(map.bxrc);
818 // 把班型分配到对应的具体路牌上. 818 // 把班型分配到对应的具体路牌上.
819 baseF.bxAlloTotLp(list,cara); 819 baseF.bxAlloTotLp(list,cara);
820 - //return {'json':markArray,'bxrcgs':null};  
821 -  
822 - 820 + ////return {'json':markArray,'bxrcgs':null};
  821 + //
  822 + //
823 // 第六步 抽车来满足工时. 823 // 第六步 抽车来满足工时.
824 var tempA = baseF.abstractCar(list , markArray , cara , saa , dataMap , map); 824 var tempA = baseF.abstractCar(list , markArray , cara , saa , dataMap , map);
825 - // return {'json':tempA,'bxrcgs':null}; 825 + //return {'json':tempA,'bxrcgs':null};
826 // 第七步 确定吃饭时间. 826 // 第七步 确定吃饭时间.
827 if (map.cfdd) { // NEW,没有选择吃饭地点,不设定吃饭班次 827 if (map.cfdd) { // NEW,没有选择吃饭地点,不设定吃饭班次
828 baseF.markeEatTime(list , tempA , cara , saa , dataMap ,map); 828 baseF.markeEatTime(list , tempA , cara , saa , dataMap ,map);
@@ -1323,6 +1323,10 @@ var BaseFun = function() { @@ -1323,6 +1323,10 @@ var BaseFun = function() {
1323 sslpbcA.sort(function(a,b){return a.fcint-b.fcint}); 1323 sslpbcA.sort(function(a,b){return a.fcint-b.fcint});
1324 // 按照规则修改停站时间. 1324 // 按照规则修改停站时间.
1325 for(var r = 0 ; r < sslpbcA.length-1 ; r++) { 1325 for(var r = 0 ; r < sslpbcA.length-1 ; r++) {
  1326 + // test
  1327 + //if(sslpbcA[r].bcType == 'cf') {
  1328 + // alert('cf' + sslpbcA[r-1].fcsj);
  1329 + //}
1326 // 定义上一个班次的发车时间、当前班次的到达时间、发车时间. 1330 // 定义上一个班次的发车时间、当前班次的到达时间、发车时间.
1327 var sgbcfcsj = baseF.getDateTime(sslpbcA[r+1].fcsj), 1331 var sgbcfcsj = baseF.getDateTime(sslpbcA[r+1].fcsj),
1328 dqbcddsj = baseF.getDateTime(sslpbcA[r].ARRIVALTIME), 1332 dqbcddsj = baseF.getDateTime(sslpbcA[r].ARRIVALTIME),
@@ -1332,7 +1336,7 @@ var BaseFun = function() { @@ -1332,7 +1336,7 @@ var BaseFun = function() {
1332 // 定义每每相邻两个班次之间的时间差分钟数(也就是停站时间.) 1336 // 定义每每相邻两个班次之间的时间差分钟数(也就是停站时间.)
1333 var dxmin = parseInt( (sgbcfcsj - dqbcddsj)/60000); 1337 var dxmin = parseInt( (sgbcfcsj - dqbcddsj)/60000);
1334 // 定义是否高峰 1338 // 定义是否高峰
1335 - var flag = baseF.isPeakTimeScope(dqbcfcsj , dataMap); 1339 + var tt_flag = baseF.isPeakTimeScope(dqbcfcsj , dataMap);
1336 // 获取行驶时间. 1340 // 获取行驶时间.
1337 var xxsj = baseF.getByDirTravelTime(dataMap.zgfsjd , dataMap.wgfsjd , dqbcfcsj, 1341 var xxsj = baseF.getByDirTravelTime(dataMap.zgfsjd , dataMap.wgfsjd , dqbcfcsj,
1338 dataMap.pcxssjArr , dataMap.gfxxsjArr , 1342 dataMap.pcxssjArr , dataMap.gfxxsjArr ,
@@ -1340,16 +1344,28 @@ var BaseFun = function() { @@ -1340,16 +1344,28 @@ var BaseFun = function() {
1340 normmintzsj = xxsj*0.1; 1344 normmintzsj = xxsj*0.1;
1341 normmaxtzsj = xxsj*0.15; 1345 normmaxtzsj = xxsj*0.15;
1342 var flag = false; 1346 var flag = false;
  1347 +
1343 // 如果小于零 1348 // 如果小于零
1344 if(dxmin < 0 && sslpbcA[r].isfb ==0) { 1349 if(dxmin < 0 && sslpbcA[r].isfb ==0) {
1345 // 根据不同时段的停站时间.重新赋值停站时间. 1350 // 根据不同时段的停站时间.重新赋值停站时间.
1346 if(sslpbcA[r].bcType=='normal' && sslpbcA[r+1].bcType =='normal') 1351 if(sslpbcA[r].bcType=='normal' && sslpbcA[r+1].bcType =='normal')
1347 - dxmin = flag ? dataMap.gftzsj[cctag] : dataMap.dgtzsj[cctag]; 1352 + //dxmin = tt_flag ? dataMap.gftzsj[cctag] : dataMap.dgtzsj[cctag];
  1353 + dxmin = 1;
1348 else 1354 else
1349 dxmin = 0; 1355 dxmin = 0;
1350 flag = true; 1356 flag = true;
1351 }else if(dxmin==0){ 1357 }else if(dxmin==0){
1352 - dxmin = 0; 1358 + if (sslpbcA[r].bcType == 'cf') { // 如果是吃饭班次,停站为0
  1359 + dxmin = 0;
  1360 + } else {
  1361 + // 这里区分,如果下一个班次是吃饭班次,停站为0
  1362 + if (sslpbcA[r + 1].bcType=='cf') {
  1363 + dxmin = 0;
  1364 + } else { // 否则使用最小停站时间
  1365 + dxmin = normmintzsj;
  1366 + }
  1367 + }
  1368 +
1353 flag = true; 1369 flag = true;
1354 }else { 1370 }else {
1355 // 如果 大于等于低谷最大停站时间 并且 小于等于三小时.则把低谷最大停站时间 作为 停站时间. 1371 // 如果 大于等于低谷最大停站时间 并且 小于等于三小时.则把低谷最大停站时间 作为 停站时间.
src/main/resources/static/pages/control/lineallot/allot.html
1 <style> 1 <style>
2 .line-select { 2 .line-select {
3 border: 1px solid #ddd; 3 border: 1px solid #ddd;
4 - height: 350px; 4 + height: 310px;
5 margin-top: 15px; 5 margin-top: 15px;
6 box-shadow: 0 2px 5px 0 rgba(221, 221, 221, 0.24), 0 2px 10px 0 rgba(221, 221, 221, 0.24); 6 box-shadow: 0 2px 5px 0 rgba(221, 221, 221, 0.24), 0 2px 10px 0 rgba(221, 221, 221, 0.24);
7 } 7 }
@@ -35,7 +35,7 @@ @@ -35,7 +35,7 @@
35 .line-select-cont { 35 .line-select-cont {
36 text-align: left; 36 text-align: left;
37 overflow: auto; 37 overflow: auto;
38 - height: 270px; 38 + height: 230px;
39 padding-right: 0px; 39 padding-right: 0px;
40 } 40 }
41 41
@@ -267,7 +267,7 @@ @@ -267,7 +267,7 @@
267 var htmlStr = template('line_select_cont_temp', {list: newArray}); 267 var htmlStr = template('line_select_cont_temp', {list: newArray});
268 $('.line-select-body').html(htmlStr) 268 $('.line-select-body').html(htmlStr)
269 .slimscroll({//滚动条 269 .slimscroll({//滚动条
270 - height: '270px' 270 + height: '230px'
271 }); 271 });
272 272
273 //映射 273 //映射
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/index.html
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
27 <span class="caption-subject bold uppercase">车辆信息表</span> 27 <span class="caption-subject bold uppercase">车辆信息表</span>
28 </div> 28 </div>
29 <div class="actions"> 29 <div class="actions">
30 - <a href="javascirpt:" class="btn btn-circle blue" ng-click="ctrl.goForm()"> 30 + <a href="javascript:" class="btn btn-circle blue" ng-click="ctrl.goForm()">
31 <i class="fa fa-plus"></i> 31 <i class="fa fa-plus"></i>
32 添加车辆信息 32 添加车辆信息
33 </a> 33 </a>
src/main/resources/static/pages/scheduleApp/module/basicInfo/deviceInfoManage/index.html
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
27 <span class="caption-subject bold uppercase">设备信息表</span> 27 <span class="caption-subject bold uppercase">设备信息表</span>
28 </div> 28 </div>
29 <div class="actions"> 29 <div class="actions">
30 - <a href="javascirpt:" class="btn btn-circle blue" ng-click="ctrl.goForm()"> 30 + <a href="javascript:" class="btn btn-circle blue" ng-click="ctrl.goForm()">
31 <i class="fa fa-plus"></i> 31 <i class="fa fa-plus"></i>
32 添加设备信息 32 添加设备信息
33 </a> 33 </a>
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/index.html
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
27 <span class="caption-subject bold uppercase">人员信息表</span> 27 <span class="caption-subject bold uppercase">人员信息表</span>
28 </div> 28 </div>
29 <div class="actions"> 29 <div class="actions">
30 - <a href="javascirpt:" class="btn btn-circle blue" ng-click="ctrl.goForm()"> 30 + <a href="javascript:" class="btn btn-circle blue" ng-click="ctrl.goForm()">
31 <i class="fa fa-plus"></i> 31 <i class="fa fa-plus"></i>
32 添加人员信息 32 添加人员信息
33 </a> 33 </a>
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/list.html
@@ -55,20 +55,18 @@ @@ -55,20 +55,18 @@
55 </sa-Select5> 55 </sa-Select5>
56 </td> 56 </td>
57 <td> 57 <td>
58 - <div>  
59 - <sa-Select5 name="gz"  
60 - model="ctrl.searchCondition()"  
61 - cmaps="{'posts_eq': 'code'}"  
62 - dcname="posts_eq"  
63 - icname="code"  
64 - dsparams="{{ {type: 'dic', param: 'gzType' } | json }}"  
65 - iterobjname="item"  
66 - iterobjexp="item.name"  
67 - searchph="请输拼音..."  
68 - searchexp="this.name"  
69 - >  
70 - </sa-Select5>  
71 - </div> 58 + <sa-Select5 name="gz"
  59 + model="ctrl.searchCondition()"
  60 + cmaps="{'posts_eq': 'code'}"
  61 + dcname="posts_eq"
  62 + icname="code"
  63 + dsparams="{{ {type: 'dic', param: 'gzType' } | json }}"
  64 + iterobjname="item"
  65 + iterobjexp="item.name"
  66 + searchph="请输拼音..."
  67 + searchexp="this.name"
  68 + >
  69 + </sa-Select5>
72 </td> 70 </td>
73 <td> 71 <td>
74 <div> 72 <div>
src/main/resources/static/pages/scheduleApp/module/common/dts2/ttinfotable/saTimeTable.js
@@ -20,6 +20,7 @@ angular.module(&#39;ScheduleApp&#39;).factory( @@ -20,6 +20,7 @@ angular.module(&#39;ScheduleApp&#39;).factory(
20 this.fcsj = detailInfo && detailInfo.fcsj; // 发车时间 20 this.fcsj = detailInfo && detailInfo.fcsj; // 发车时间
21 this.bc_type = detailInfo && detailInfo.bc_type; // 班次类型 21 this.bc_type = detailInfo && detailInfo.bc_type; // 班次类型
22 this.xldir = detailInfo && detailInfo.xldir; // 线路上下行 22 this.xldir = detailInfo && detailInfo.xldir; // 线路上下行
  23 + this.ists = detailInfo && detailInfo.ists; // 是否停驶
23 this.isfb = detailInfo && detailInfo.isfb; // 是否分班 24 this.isfb = detailInfo && detailInfo.isfb; // 是否分班
24 this.qdzCode = detailInfo && detailInfo.qdzCode; // 起点站Code 25 this.qdzCode = detailInfo && detailInfo.qdzCode; // 起点站Code
25 this.zdzCode = detailInfo && detailInfo.zdzCode; // 终点站Code 26 this.zdzCode = detailInfo && detailInfo.zdzCode; // 终点站Code
src/main/resources/static/pages/scheduleApp/module/common/dts2/ttinfotable/saTimeTableTemplate.html
@@ -220,6 +220,10 @@ @@ -220,6 +220,10 @@
220 background: #e43a45 !important; 220 background: #e43a45 !important;
221 color: white; 221 color: white;
222 } 222 }
  223 + .tt_table dd.ists {
  224 + background: #105383 !important;
  225 + color: white;
  226 + }
223 .tt_table dd.region { 227 .tt_table dd.region {
224 background: #686d7b !important; 228 background: #686d7b !important;
225 color: white; 229 color: white;
@@ -360,6 +364,7 @@ @@ -360,6 +364,7 @@
360 lpName: !cell.ttdid, 364 lpName: !cell.ttdid,
361 error: cell.isValidInfo, 365 error: cell.isValidInfo,
362 active: cell.sel, 366 active: cell.sel,
  367 + ists: cell.ists,
363 region: cell.bc_type == 'region', 368 region: cell.bc_type == 'region',
364 isfb: cell.isfb 369 isfb: cell.isfb
365 }"> 370 }">
src/main/resources/static/pages/scheduleApp/module/common/prj-common-directive.js
@@ -3915,6 +3915,7 @@ angular.module(&#39;ScheduleApp&#39;).factory( @@ -3915,6 +3915,7 @@ angular.module(&#39;ScheduleApp&#39;).factory(
3915 this.fcsj = detailInfo && detailInfo.fcsj; // 发车时间 3915 this.fcsj = detailInfo && detailInfo.fcsj; // 发车时间
3916 this.bc_type = detailInfo && detailInfo.bc_type; // 班次类型 3916 this.bc_type = detailInfo && detailInfo.bc_type; // 班次类型
3917 this.xldir = detailInfo && detailInfo.xldir; // 线路上下行 3917 this.xldir = detailInfo && detailInfo.xldir; // 线路上下行
  3918 + this.ists = detailInfo && detailInfo.ists; // 是否停驶
3918 this.isfb = detailInfo && detailInfo.isfb; // 是否分班 3919 this.isfb = detailInfo && detailInfo.isfb; // 是否分班
3919 this.qdzCode = detailInfo && detailInfo.qdzCode; // 起点站Code 3920 this.qdzCode = detailInfo && detailInfo.qdzCode; // 起点站Code
3920 this.zdzCode = detailInfo && detailInfo.zdzCode; // 终点站Code 3921 this.zdzCode = detailInfo && detailInfo.zdzCode; // 终点站Code
src/main/resources/static/pages/scheduleApp/module/common/prj-common-globalservice.js
@@ -537,7 +537,15 @@ angular.module(&#39;ScheduleApp&#39;).factory(&#39;SchedulePlanInfoManageService_g&#39;, [&#39;$reso @@ -537,7 +537,15 @@ angular.module(&#39;ScheduleApp&#39;).factory(&#39;SchedulePlanInfoManageService_g&#39;, [&#39;$reso
537 } 537 }
538 }, 538 },
539 get: { 539 get: {
540 - method: 'GET' 540 + method: 'GET',
  541 + transformResponse: function(rs) {
  542 + var dst = angular.fromJson(rs);
  543 + if (dst.status == 'SUCCESS') {
  544 + return dst.data;
  545 + } else {
  546 + return dst;
  547 + }
  548 + }
541 }, 549 },
542 save: { 550 save: {
543 method: 'POST' 551 method: 'POST'
src/main/resources/static/pages/scheduleApp/module/common/prj-common-ui-route-state.js
@@ -772,7 +772,7 @@ ScheduleApp.config([ @@ -772,7 +772,7 @@ ScheduleApp.config([
772 $stateProvider 772 $stateProvider
773 // 排班计划明细管理模块 773 // 排班计划明细管理模块
774 .state("schedulePlanInfoManage", { 774 .state("schedulePlanInfoManage", {
775 - url: '/schedulePlanInfoManage/:spid/:xlname/:ttname/:stime/:etime', 775 + url: '/schedulePlanInfoManage/:spid/:xlid/:xlname/:ttname/:stime/:etime',
776 views: { 776 views: {
777 "": { 777 "": {
778 templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/info/index_info.html' 778 templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/info/index_info.html'
@@ -793,6 +793,24 @@ ScheduleApp.config([ @@ -793,6 +793,24 @@ ScheduleApp.config([
793 }); 793 });
794 }] 794 }]
795 } 795 }
  796 + })
  797 +
  798 + .state("schedulePlanInfoManage_edit", { // 时刻表详细信息编辑
  799 + url: '/schedulePlanInfoManage_edit/:spid/:xlid/:xlname/:ttname/:stime/:etime/:spinfoid',
  800 + views: {
  801 + "": {templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/info/edit.html'}
  802 + },
  803 + resolve: {
  804 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  805 + return $ocLazyLoad.load({
  806 + name: 'schedulePlanInfoManage_module',
  807 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  808 + files: [
  809 + "pages/scheduleApp/module/core/schedulePlanManage/info/module.js"
  810 + ]
  811 + });
  812 + }]
  813 + }
796 }); 814 });
797 815
798 } 816 }
src/main/resources/static/pages/scheduleApp/module/core/busConfig/index.html
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
27 <span class="caption-subject bold uppercase">配置表</span> 27 <span class="caption-subject bold uppercase">配置表</span>
28 </div> 28 </div>
29 <div class="actions"> 29 <div class="actions">
30 - <a href="javascirpt:" class="btn btn-circle blue" ng-click="ctrl.goForm()"> 30 + <a href="javascript:" class="btn btn-circle blue" ng-click="ctrl.goForm()">
31 <i class="fa fa-plus"></i> 31 <i class="fa fa-plus"></i>
32 添加配置 32 添加配置
33 </a> 33 </a>
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/index.html
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
27 <span class="caption-subject bold uppercase">配置表</span> 27 <span class="caption-subject bold uppercase">配置表</span>
28 </div> 28 </div>
29 <div class="actions"> 29 <div class="actions">
30 - <a href="javascirpt:" class="btn btn-circle blue" ng-click="ctrl.goForm()"> 30 + <a href="javascript:" class="btn btn-circle blue" ng-click="ctrl.goForm()">
31 <i class="fa fa-plus"></i> 31 <i class="fa fa-plus"></i>
32 添加配置 32 添加配置
33 </a> 33 </a>
src/main/resources/static/pages/scheduleApp/module/core/rerunManage/index.html
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
27 <span class="caption-subject bold uppercase">套跑信息</span> 27 <span class="caption-subject bold uppercase">套跑信息</span>
28 </div> 28 </div>
29 <div class="actions"> 29 <div class="actions">
30 - <a href="javascirpt:" class="btn btn-circle blue" ng-click="ctrl.goForm()"> 30 + <a href="javascript:" class="btn btn-circle blue" ng-click="ctrl.goForm()">
31 <i class="fa fa-plus"></i> 31 <i class="fa fa-plus"></i>
32 添加套跑 32 添加套跑
33 </a> 33 </a>
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/index.html
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
27 <span class="caption-subject bold uppercase">排班计划</span> 27 <span class="caption-subject bold uppercase">排班计划</span>
28 </div> 28 </div>
29 <div class="actions"> 29 <div class="actions">
30 - <a href="javascirpt:" class="btn btn-circle blue" ng-click="ctrl.goForm()"> 30 + <a href="javascript:" class="btn btn-circle blue" ng-click="ctrl.goForm()">
31 <i class="fa fa-plus"></i> 31 <i class="fa fa-plus"></i>
32 生成计划 32 生成计划
33 </a> 33 </a>
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/info/edit.html 0 → 100644
  1 +<div ng-controller="SchedulePlanInfoManageEditCtrl as ctrl">
  2 + <div class="page-head">
  3 + <div class="page-title">
  4 + <h1>排班明细管理</h1>
  5 + </div>
  6 + </div>
  7 +
  8 + <ul class="page-breadcrumb breadcrumb">
  9 + <li>
  10 + <a href="/pages/home.html" data-pjax>首页</a>
  11 + <i class="fa fa-circle"></i>
  12 + </li>
  13 + <li>
  14 + <span class="active">运营计划管理</span>
  15 + <i class="fa fa-circle"></i>
  16 + </li>
  17 + <li>
  18 + <a href="javascript:" ng-click="ctrl.toPlanPage()">排班计划管理</a>
  19 + <i class="fa fa-circle"></i>
  20 + </li>
  21 + <li>
  22 + <a href="javascript:" ng-click="ctrl.toPlanInfoListPage()">排班计划管理</a>
  23 + <i class="fa fa-circle"></i>
  24 + </li>
  25 + <li>
  26 + <span class="active">修改计划班次明细</span>
  27 + </li>
  28 + </ul>
  29 +
  30 + <h1>TODO</h1>
  31 +
  32 +
  33 +
  34 +
  35 +</div>
  36 +
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/info/list_info.html
1 <!-- ui-route busInfoManage.list --> 1 <!-- ui-route busInfoManage.list -->
2 -<div ng-controller="SchedulePlanInfoManageListCtrl as ctrl"> 2 +<div ng-controller="SchedulePlanInfoManageListCtrl as ctrl" >
3 <div style="width: 100%; height: 100%; overflow: auto"> 3 <div style="width: 100%; height: 100%; overflow: auto">
4 <table class="fixTable table table-striped table-bordered table-hover table-checkable order-column"> 4 <table class="fixTable table table-striped table-bordered table-hover table-checkable order-column">
5 <thead> 5 <thead>
6 <tr role="row" class="heading"> 6 <tr role="row" class="heading">
7 <th style="width: 70px;">序号</th> 7 <th style="width: 70px;">序号</th>
8 - <th style="width: 80px;">线路</th> 8 + <th style="width: 80px;">操作</th>
9 <th style="width: 150px;">日期</th> 9 <th style="width: 150px;">日期</th>
10 - <th style="width: 50px;">路牌</th>  
11 - <th style="width: 100px;">车辆</th>  
12 - <th style="width: 120px;">驾驶员(工号)</th> 10 + <th style="width: 100px;">路牌</th>
  11 + <th style="width: 80px;">车辆</th>
  12 + <th style="width: 140px;">行车人员</th>
13 <!--<th style="width: 120px;">售票员(工号)</th>--> 13 <!--<th style="width: 120px;">售票员(工号)</th>-->
14 <th style="width: 80px;">班次类型</th> 14 <th style="width: 80px;">班次类型</th>
15 <th style="width: 80px;">发车时间</th> 15 <th style="width: 80px;">发车时间</th>
16 - <th style="width: 80px;">上下行</th> 16 + <th style="width: 70px;">上下行</th>
17 <th style="width: 80px;">起点站</th> 17 <th style="width: 80px;">起点站</th>
18 <th style="width: 80px;">终点站</th> 18 <th style="width: 80px;">终点站</th>
19 <th style="width: 60px">备注</th> 19 <th style="width: 60px">备注</th>
20 <th style="width: 100%">时刻表</th> 20 <th style="width: 100%">时刻表</th>
21 - <th style="width: 90px;">修改人</th>  
22 - <th style="width: 90px;">修改时间</th> 21 + <th style="width: 80px;">修改人</th>
  22 + <th style="width: 80px;">修改时间</th>
23 23
24 <!-- TODO:还有其他的 --> 24 <!-- TODO:还有其他的 -->
25 25
@@ -32,6 +32,7 @@ @@ -32,6 +32,7 @@
32 <input type="text" class="form-control input-sm" 32 <input type="text" class="form-control input-sm"
33 name="scheduleDate" placeholder="选择日期..." 33 name="scheduleDate" placeholder="选择日期..."
34 uib-datepicker-popup="yyyy-MM-dd" 34 uib-datepicker-popup="yyyy-MM-dd"
  35 + datepicker-append-to-body="true"
35 is-open="ctrl.scheduleDate" 36 is-open="ctrl.scheduleDate"
36 ng-model="ctrl.searchCondition()['scheduleDate_eq']" readonly/> 37 ng-model="ctrl.searchCondition()['scheduleDate_eq']" readonly/>
37 <span class="input-group-btn"> 38 <span class="input-group-btn">
@@ -41,6 +42,22 @@ @@ -41,6 +42,22 @@
41 </span> 42 </span>
42 </div> 43 </div>
43 </td> 44 </td>
  45 + <td>
  46 + <div style="position: absolute;width: 90px">
  47 + <sa-Select5 name="lp"
  48 + model="ctrl.searchCondition()"
  49 + cmaps="{'lp_eq' : 'id'}"
  50 + dcname="lp_eq"
  51 + icname="id"
  52 + dsparams="{{ {type: 'ajax', param:{'xl.id_eq': xlid, 'type': 'all'}, atype:'lpInfo2' } | json }}"
  53 + iterobjname="item"
  54 + iterobjexp="item.lpName"
  55 + searchph="..."
  56 + searchexp="this.lpName"
  57 + >
  58 + </sa-Select5>
  59 + </div>
  60 + </td>
44 <td></td> 61 <td></td>
45 <td></td> 62 <td></td>
46 <td></td> 63 <td></td>
@@ -67,7 +84,9 @@ @@ -67,7 +84,9 @@
67 </td> 84 </td>
68 85
69 <td> 86 <td>
70 - <span ng-bind="info.xlName"></span> 87 + <a href="javascript:" class="btn btn-info btn-sm" ng-click="ctrl.toEditPage(info.id)" >
  88 + 修改
  89 + </a>
71 </td> 90 </td>
72 <td> 91 <td>
73 <span ng-bind="info.scheduleDate | date: 'yyyy-MM-dd'"></span> 92 <span ng-bind="info.scheduleDate | date: 'yyyy-MM-dd'"></span>
@@ -78,10 +97,40 @@ @@ -78,10 +97,40 @@
78 <td> 97 <td>
79 <span ng-bind="info.clZbh"></span> 98 <span ng-bind="info.clZbh"></span>
80 </td> 99 </td>
81 - <td>  
82 - <span>{{info.jName ? info.jName + '(' + info.jGh + ')' : ''}}</span>  
83 100
  101 + <td class="container-fluid">
  102 + <div class="row">
  103 + <div style="padding-right: 1px;" class="col-md-6">
  104 + <div ng-if="info.jName">
  105 + <a href="#">
  106 + <i class="fa fa-bus" aria-hidden="true"></i>
  107 + {{info.jName}}
  108 + </a>
  109 + </div>
  110 + <div ng-if="info.sName">
  111 + <a href="#">
  112 + <i class="fa fa-ticket" aria-hidden="true"></i>
  113 + {{info.sName}}
  114 + </a>
  115 + </div>
  116 + </div>
  117 + <div style="padding-left: 1px;" class="col-md-6">
  118 + <div ng-if="info.jGh">
  119 + <a href="#" style="padding-left: 5px">
  120 + {{info.jGh}}
  121 + </a>
  122 + </div>
  123 + <div ng-if="info.sGh">
  124 + <a href="#" style="padding-left: 5px">
  125 + {{info.sGh}}
  126 + </a>
  127 + </div>
  128 + </div>
  129 + </div>
84 </td> 130 </td>
  131 +
  132 +
  133 +
85 <!--<td>--> 134 <!--<td>-->
86 <!--<span>{{info.sGh ? info.sName + '(' + info.sGh + ')' : ''}}</span>--> 135 <!--<span>{{info.sGh ? info.sName + '(' + info.sGh + ')' : ''}}</span>-->
87 <!--</td>--> 136 <!--</td>-->
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/info/module.js
@@ -70,6 +70,7 @@ angular.module(&#39;ScheduleApp&#39;).controller( @@ -70,6 +70,7 @@ angular.module(&#39;ScheduleApp&#39;).controller(
70 function($state, $stateParams, $scope) { 70 function($state, $stateParams, $scope) {
71 var self = this; 71 var self = this;
72 var spid = $stateParams.spid; // 排班规则id 72 var spid = $stateParams.spid; // 排班规则id
  73 + var xlid = $stateParams.xlid; // 线路id
73 var xlname = $stateParams.xlname; // 线路名字 74 var xlname = $stateParams.xlname; // 线路名字
74 var ttname = $stateParams.ttname; // 时刻表名字 75 var ttname = $stateParams.ttname; // 时刻表名字
75 var stime = $stateParams.stime; // 开始时间 76 var stime = $stateParams.stime; // 开始时间
@@ -77,6 +78,7 @@ angular.module(&#39;ScheduleApp&#39;).controller( @@ -77,6 +78,7 @@ angular.module(&#39;ScheduleApp&#39;).controller(
77 78
78 $scope.spid = spid; 79 $scope.spid = spid;
79 $scope.xlname = xlname; 80 $scope.xlname = xlname;
  81 + $scope.xlid = xlid;
80 $scope.ttname = ttname; 82 $scope.ttname = ttname;
81 $scope.stime = stime; 83 $scope.stime = stime;
82 $scope.etime = etime; 84 $scope.etime = etime;
@@ -96,10 +98,15 @@ angular.module(&#39;ScheduleApp&#39;).controller( @@ -96,10 +98,15 @@ angular.module(&#39;ScheduleApp&#39;).controller(
96 'SchedulePlanInfoManageListCtrl', 98 'SchedulePlanInfoManageListCtrl',
97 [ 99 [
98 'SchedulePlanInfoManageService', 100 'SchedulePlanInfoManageService',
  101 + '$stateParams',
99 '$scope', 102 '$scope',
100 - function(service, $scope) { 103 + '$state',
  104 + function(service, $stateParams, $scope, $state) {
101 var self = this; 105 var self = this;
102 106
  107 + // 线路id
  108 + self.xlid = $stateParams.xlid;
  109 +
103 // 日期 日期控件开关 110 // 日期 日期控件开关
104 self.scheduleDate = false; 111 self.scheduleDate = false;
105 self.scheduleDate_open = function() { 112 self.scheduleDate_open = function() {
@@ -135,9 +142,22 @@ angular.module(&#39;ScheduleApp&#39;).controller( @@ -135,9 +142,22 @@ angular.module(&#39;ScheduleApp&#39;).controller(
135 142
136 self.doPage(); 143 self.doPage();
137 144
  145 + self.toEditPage = function(spinfoid) {
  146 + $state.go("schedulePlanInfoManage_edit", {
  147 + spid : $stateParams.spid,
  148 + xlid : $stateParams.xlid,
  149 + xlname: $stateParams.xlname,
  150 + ttname: $stateParams.ttname,
  151 + stime: $stateParams.stime,
  152 + etime: $stateParams.etime,
  153 + spinfoid: spinfoid
  154 + });
  155 + };
  156 +
138 $scope.$watch( 157 $scope.$watch(
139 function() { 158 function() {
140 - return self.searchCondition()['scheduleDate_eq']; 159 + //return self.searchCondition()['scheduleDate_eq'];
  160 + return self.searchCondition();
141 }, 161 },
142 function(newValue, oldValue) { 162 function(newValue, oldValue) {
143 if (newValue == undefined && oldValue == undefined) { 163 if (newValue == undefined && oldValue == undefined) {
@@ -145,13 +165,61 @@ angular.module(&#39;ScheduleApp&#39;).controller( @@ -145,13 +165,61 @@ angular.module(&#39;ScheduleApp&#39;).controller(
145 } else { 165 } else {
146 self.doPage(); 166 self.doPage();
147 } 167 }
148 - } 168 + },
  169 + true
149 ); 170 );
150 171
151 } 172 }
152 ] 173 ]
153 ); 174 );
154 175
  176 +// edit.html
  177 +angular.module("ScheduleApp").controller(
  178 + 'SchedulePlanInfoManageEditCtrl',
  179 + [
  180 + 'SchedulePlanInfoManageService',
  181 + '$stateParams',
  182 + '$state',
  183 + function(service, $stateParams, $state) {
  184 + var self = this;
  185 + var SchedulePlanInfo = service.getQueryClass();
  186 +
  187 + // 获取id
  188 + var spinfoid = $stateParams.spinfoid;
  189 +
  190 + // 欲保存的busInfo信息,绑定
  191 + self.schedulePlanInfoForSave = new SchedulePlanInfo;
  192 +
  193 + self.toPlanPage = function() {
  194 + $state.go("schedulePlanManage");
  195 + };
  196 + self.toPlanInfoListPage = function() {
  197 + $state.go("schedulePlanInfoManage", $stateParams);
  198 + };
  199 +
  200 + // 获取数据
  201 + SchedulePlanInfo.get({id: spinfoid}, function(value) {
  202 + self.schedulePlanInfoForSave = value;
  203 +
  204 + // TODO
  205 + });
  206 +
  207 + // 提交方法
  208 + self.submit = function() {
  209 + // 保存或者更新
  210 + self.schedulePlanInfoForSave.$save(function() {
  211 + self.toPlanInfoListPage();
  212 + });
  213 + };
  214 + // 取消方法
  215 + self.cancel = function() {
  216 + self.toPlanInfoListPage();
  217 + };
  218 +
  219 +
  220 + }
  221 + ]
  222 +);
155 223
156 224
157 225
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/info/route.js
@@ -11,7 +11,7 @@ ScheduleApp.config([ @@ -11,7 +11,7 @@ ScheduleApp.config([
11 $stateProvider 11 $stateProvider
12 // 排班计划明细管理模块 12 // 排班计划明细管理模块
13 .state("schedulePlanInfoManage", { 13 .state("schedulePlanInfoManage", {
14 - url: '/schedulePlanInfoManage/:spid/:xlname/:ttname/:stime/:etime', 14 + url: '/schedulePlanInfoManage/:spid/:xlid/:xlname/:ttname/:stime/:etime',
15 views: { 15 views: {
16 "": { 16 "": {
17 templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/info/index_info.html' 17 templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/info/index_info.html'
@@ -32,6 +32,24 @@ ScheduleApp.config([ @@ -32,6 +32,24 @@ ScheduleApp.config([
32 }); 32 });
33 }] 33 }]
34 } 34 }
  35 + })
  36 +
  37 + .state("schedulePlanInfoManage_edit", { // 时刻表详细信息编辑
  38 + url: '/schedulePlanInfoManage_edit/:spid/:xlid/:xlname/:ttname/:stime/:etime/:spinfoid',
  39 + views: {
  40 + "": {templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/info/edit.html'}
  41 + },
  42 + resolve: {
  43 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  44 + return $ocLazyLoad.load({
  45 + name: 'schedulePlanInfoManage_module',
  46 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  47 + files: [
  48 + "pages/scheduleApp/module/core/schedulePlanManage/info/module.js"
  49 + ]
  50 + });
  51 + }]
  52 + }
35 }); 53 });
36 54
37 } 55 }
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/list.html
@@ -132,7 +132,7 @@ @@ -132,7 +132,7 @@
132 <td> 132 <td>
133 <!--<a href="details.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 详细 </a>--> 133 <!--<a href="details.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 详细 </a>-->
134 <!--<a href="edit.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 修改 </a>--> 134 <!--<a href="edit.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 修改 </a>-->
135 - <a ui-sref="schedulePlanInfoManage({spid : info.id, xlname : info.xl.name, ttname : info.ttInfoNames, stime : info.scheduleFromTime, etime : info.scheduleToTime})" 135 + <a ui-sref="schedulePlanInfoManage({spid : info.id, xlid: info.xl.id, xlname : info.xl.name, ttname : info.ttInfoNames, stime : info.scheduleFromTime, etime : info.scheduleToTime})"
136 class="btn btn-info btn-sm"> 明细 </a> 136 class="btn btn-info btn-sm"> 明细 </a>
137 <a sweetalert 137 <a sweetalert
138 sweet-options="{title: '是否删除排班计划?',text: '线路:' + info.xl.name + '</br>开始时间:' + ctrl.toDateStr(info.scheduleFromTime) + '</br>结束时间:' + ctrl.toDateStr(info.scheduleToTime) + '</br>请谨慎删除!', html: true,type: 'warning',showCancelButton: true,confirmButtonColor: '#DD6B55',confirmButtonText: '是',cancelButtonText: '取消'}" 138 sweet-options="{title: '是否删除排班计划?',text: '线路:' + info.xl.name + '</br>开始时间:' + ctrl.toDateStr(info.scheduleFromTime) + '</br>结束时间:' + ctrl.toDateStr(info.scheduleToTime) + '</br>请谨慎删除!', html: true,type: 'warning',showCancelButton: true,confirmButtonColor: '#DD6B55',confirmButtonText: '是',cancelButtonText: '取消'}"
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/service.js
@@ -81,7 +81,15 @@ angular.module(&#39;ScheduleApp&#39;).factory(&#39;SchedulePlanInfoManageService_g&#39;, [&#39;$reso @@ -81,7 +81,15 @@ angular.module(&#39;ScheduleApp&#39;).factory(&#39;SchedulePlanInfoManageService_g&#39;, [&#39;$reso
81 } 81 }
82 }, 82 },
83 get: { 83 get: {
84 - method: 'GET' 84 + method: 'GET',
  85 + transformResponse: function(rs) {
  86 + var dst = angular.fromJson(rs);
  87 + if (dst.status == 'SUCCESS') {
  88 + return dst.data;
  89 + } else {
  90 + return dst;
  91 + }
  92 + }
85 }, 93 },
86 save: { 94 save: {
87 method: 'POST' 95 method: 'POST'
src/main/resources/static/pages/scheduleApp/module/core/scheduleRuleManage/index.html
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
27 <span class="caption-subject bold uppercase">排班规则</span> 27 <span class="caption-subject bold uppercase">排班规则</span>
28 </div> 28 </div>
29 <div class="actions"> 29 <div class="actions">
30 - <a href="javascirpt:" class="btn btn-circle blue" ng-click="ctrl.goForm()"> 30 + <a href="javascript:" class="btn btn-circle blue" ng-click="ctrl.goForm()">
31 <i class="fa fa-plus"></i> 31 <i class="fa fa-plus"></i>
32 添加规则 32 添加规则
33 </a> 33 </a>
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/edit3.html
@@ -36,6 +36,7 @@ @@ -36,6 +36,7 @@
36 <!--<i class="fa fa-arrow-down" aria-hidden="true"></i>--> 36 <!--<i class="fa fa-arrow-down" aria-hidden="true"></i>-->
37 <!--<span style="padding-right: 10px;">下行班次</span>--> 37 <!--<span style="padding-right: 10px;">下行班次</span>-->
38 <!--<i class="fa fa-circle-o-notch" aria-hidden="true"></i>--> 38 <!--<i class="fa fa-circle-o-notch" aria-hidden="true"></i>-->
  39 + <span style="padding-right: 10px;background: #105383;color: white;text-align: center;">停驶班次</span>
39 <span style="padding-right: 10px;background: #686d7b;color: white;text-align: center;">区间班次</span> 40 <span style="padding-right: 10px;background: #686d7b;color: white;text-align: center;">区间班次</span>
40 <!--<i class="fa fa-adjust" aria-hidden="true"></i>--> 41 <!--<i class="fa fa-adjust" aria-hidden="true"></i>-->
41 <span style="padding-right: 10px;background: #adff00;color: #501a1a;text-align: center;">分班班次</span> 42 <span style="padding-right: 10px;background: #adff00;color: #501a1a;text-align: center;">分班班次</span>
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/index.html
@@ -31,7 +31,7 @@ @@ -31,7 +31,7 @@
31 <!--<i class="fa fa-plus"></i>--> 31 <!--<i class="fa fa-plus"></i>-->
32 <!--测试--> 32 <!--测试-->
33 <!--</a>--> 33 <!--</a>-->
34 - <a href="javascirpt:" class="btn btn-circle blue" ng-click="ctrl.toTtInfoManageForm()"> 34 + <a href="javascript:" class="btn btn-circle blue" ng-click="ctrl.toTtInfoManageForm()">
35 <i class="fa fa-plus"></i> 35 <i class="fa fa-plus"></i>
36 添加时刻表 36 添加时刻表
37 </a> 37 </a>
src/main/resources/static/pages/trafficManage/css/trafficManage.css
@@ -68,8 +68,7 @@ @@ -68,8 +68,7 @@
68 background-color: #fff; 68 background-color: #fff;
69 } 69 }
70 .dateRange { 70 .dateRange {
71 - width: 30px;  
72 - margin-right: 5px; 71 + width: 40px;
73 text-align: center; 72 text-align: center;
74 } 73 }
75 74
@@ -79,4 +78,8 @@ @@ -79,4 +78,8 @@
79 78
80 .inputCarPlate { 79 .inputCarPlate {
81 width: 100px; 80 width: 100px;
  81 +}
  82 +
  83 +.inLine_block {
  84 + display: inline-block;
82 } 85 }
83 \ No newline at end of file 86 \ No newline at end of file
src/main/resources/static/pages/trafficManage/js/lineStationUploadRecord.js
@@ -13,16 +13,57 @@ @@ -13,16 +13,57 @@
13 */ 13 */
14 14
15 (function(){ 15 (function(){
  16 + var page = 0, initPag;
16 // 关闭左侧栏 17 // 关闭左侧栏
17 if (!$('body').hasClass('page-sidebar-closed')) 18 if (!$('body').hasClass('page-sidebar-closed'))
18 $('.menu-toggler.sidebar-toggler').click(); 19 $('.menu-toggler.sidebar-toggler').click();
19 - // 日期控件  
20 - $('#dateInput').datetimepicker({  
21 - // 日期控件时间格式  
22 - format : 'YYYY-MM-DD',  
23 - // 语言  
24 - locale: 'zh-cn'  
25 - }); 20 +
  21 + $("#dateInput").datetimepicker({
  22 + format : 'YYYY-MM-DD',
  23 + locale : 'zh-cn'
  24 + });
  25 +
  26 + var lines = new Array();
  27 +
  28 + $('#line').select2({
  29 + ajax: {
  30 + url: '/realSchedule/findLine',
  31 + type: 'post',
  32 + dataType: 'json',
  33 + delay: 150,
  34 + data: function(params){
  35 + return{line: params.term};
  36 + },
  37 + processResults: function (data) {
  38 + return {
  39 + results: data
  40 + };
  41 + },
  42 + cache: true
  43 + },
  44 + templateResult: function(repo){
  45 + if (repo.loading) return repo.text;
  46 + var h = '<span>'+repo.text+'</span>';
  47 + return h;
  48 + },
  49 + escapeMarkup: function (markup) { return markup; },
  50 + minimumInputLength: 1,
  51 + templateSelection: function(repo){
  52 + return repo.text;
  53 + },
  54 + language: {
  55 + noResults: function(){
  56 + return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>';
  57 + },
  58 + inputTooShort : function(e) {
  59 + return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>';
  60 + },
  61 + searching : function() {
  62 + return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>';
  63 + }
  64 + }
  65 + });
  66 +
26 // 日期范围输入框限制,绑定按键和粘贴事件 67 // 日期范围输入框限制,绑定按键和粘贴事件
27 $(".dateRange").keyup(function(){ 68 $(".dateRange").keyup(function(){
28 var tmptxt=$(this).val(); 69 var tmptxt=$(this).val();
@@ -48,81 +89,112 @@ @@ -48,81 +89,112 @@
48 if(tmptxt < 0){ 89 if(tmptxt < 0){
49 $(this).val(00); 90 $(this).val(00);
50 } 91 }
51 - }).css("ime-mode", "disabled");  
52 - /**  
53 - * 取得编码-公司map  
54 - * gsmap["5"] = 南汇公司  
55 - * gsmap["5_3"] = 芦潮港分公司  
56 - */  
57 - function getBusMap(){  
58 - // 取得公司信息,替换公司编码  
59 - var gsmap = {};  
60 - $get('/business/all', null, function(array){  
61 - $.each(array, function(i, gs){  
62 - var k = gs.upCode + '_' + gs.businessCode;  
63 - if(gs.upCode === '88'){  
64 - k = gs.businessCode;  
65 - }  
66 - gsmap[k] = gs.businessName;  
67 - });  
68 - });  
69 - return gsmap;  
70 - }  
71 - /**  
72 - * 设置公司自动完成  
73 - */  
74 - var lines = new Array();  
75 - var gsmap = getBusMap();  
76 - // 取得所有线路  
77 - $get('/line/all', null, function(allLine) {  
78 - // 遍历数组  
79 - $.each(allLine, function(i, e) {  
80 - var companyCode = e.company;  
81 - e.company = gsmap[e.company];  
82 - e.brancheCompany = gsmap[companyCode+"_"+e.brancheCompany];  
83 - var line = '{"hex":"' + e.company + '","label":"' + e.name  
84 - + '"}';  
85 - var obj = jQuery.parseJSON(line);  
86 - lines[i] = obj;  
87 - });  
88 - });  
89 - // 给输入框绑定autocomplete事件  
90 - $("input[name='xl.name_eq']").autocompleter({  
91 - highlightMatches : true,  
92 - source : lines,  
93 - template : '{{ label }} <span>({{ hex }})</span>',  
94 - hint : true,  
95 - empty : false,  
96 - limit : 5,  
97 - });  
98 - // 设置autocompleter的宽度和输入框一样  
99 - $(".autocompleter").css("width",  
100 - $("input[name='xl.name_eq']").css("width"));  
101 -  
102 - /**  
103 - * 设置内部编码自动完成  
104 - */  
105 - var cars = new Array();  
106 - // 取得所有车辆  
107 - $get('/cars/all', null, function(allCars) {  
108 - // 遍历数组  
109 - $.each(allCars, function(i, e) {  
110 - var car = '{"hex":"' + e.insideCode + '","label":"' + e.insideCode  
111 - + '"}';  
112 - var obj = jQuery.parseJSON(car);  
113 - cars[i] = obj;  
114 - });  
115 - });  
116 - // 给输入框绑定autocomplete事件  
117 - $("input[name='xl.insideCode_eq']").autocompleter({  
118 - highlightMatches : true,  
119 - source : cars,  
120 - template : '{{ label }}',  
121 - hint : true,  
122 - empty : false,  
123 - limit : 5,  
124 - });  
125 - // 设置autocompleter的宽度和输入框一样  
126 - $(".autocompleter").css("width",  
127 - $("input[name='xl.insideCode_eq']").css("width")); 92 + }).css("ime-mode", "disabled");
  93 +
  94 + // 绑定查询事件
  95 + $("#search").click(searchM);
  96 + // 查询方法
  97 + function searchM(pagination) {
  98 + if($("#dateInput").val() == ""){
  99 + alert("请选择时间");
  100 + return ;
  101 + }
  102 + var params = {};
  103 + // 排序(按方向与序号)
  104 + params['order'] = 'reportDate';
  105 + // 排序方向.
  106 + params['direction'] = 'ASC';
  107 + // 记录当前页数
  108 + params['page'] = page;
  109 + // 弹出正在加载层
  110 + var i = layer.load(2);
  111 + // 取得输入框的值
  112 + var inputs = $(".form-inline input,select");
  113 + // 遍历数组
  114 + $.each(inputs, function(i, element) {
  115 + params[$(element).attr("name")] = $(element).val();
  116 + });
  117 +
  118 + var startDate = params['startDate'];
  119 + var endDate = params['endDate'];
  120 + var reportDate = params['reportDate'];
  121 + if($("#carPlate").val() != ''){
  122 + params['cars.carPlate_eq'] = changeCarPlate($("#carPlate").val());
  123 + }
  124 + if($("#insideCode").val() != ''){
  125 + params['cars.insideCode_eq'] = $("#insideCode").val().toUpperCase();
  126 + }
  127 + // 默认开始时间
  128 + params['reportDate_ge'] = str2datetime(reportDate+" 00:00:00");
  129 + // 默认结束时间
  130 + params['reportDate_le'] = str2datetime(reportDate+" 23:59:59");
  131 +
  132 + // 指定的开始时间
  133 + if(startDate != ''){
  134 + params['reportDate_gt'] = str2datetime(reportDate+" "+ (startDate > 9 ? startDate : "0"+startDate + ":00:00"));
  135 + }
  136 + // 指定的结束时间
  137 + if(endDate != ''){
  138 + params['reportDate_lt'] = str2datetime(reportDate+" "+ (endDate > 9 ? endDate : "0"+endDate + ":59:59"));
  139 + }
  140 + $get('/vehicle_stop', params, function(data) {
  141 + var content = data.content;
  142 + _dateFormat(content);
  143 + var bodyHtm = template('lineStationUploadRecord_list_temp', {
  144 + list : content
  145 + });
  146 + $('#vehicle_stop tbody').html(bodyHtm);
  147 + if(pagination && data.content.length > 0){
  148 + //重新分页
  149 + initPag = true;
  150 + showPagination(data);
  151 + }
  152 + layer.close(i);
  153 + });
  154 + }
  155 +
  156 + /** 分页栏组件 */
  157 + function showPagination(data){
  158 + // 分页组件
  159 + $('#pagination').jqPaginator({
  160 + // 总页数
  161 + totalPages: data.totalPages,
  162 + // 中间显示页数
  163 + visiblePages: 6,
  164 + // 当前页
  165 + currentPage: page + 1,
  166 + first: '<li class="first"><a href="javascript:void(0);">首页<\/a><\/li>',
  167 + prev: '<li class="prev"><a href="javascript:void(0);">上一页<\/a><\/li>',
  168 + next: '<li class="next"><a href="javascript:void(0);">下一页<\/a><\/li>',
  169 + last: '<li class="last"><a href="javascript:void(0);">尾页<\/a><\/li>',
  170 + page: '<li class="page"><a href="javascript:void(0);">{{page}}<\/a><\/li>',
  171 + onPageChange: function (num, type) {
  172 + if(initPag){
  173 + initPag = false;
  174 + return;
  175 + }
  176 + page = num - 1;
  177 + searchM(false);
  178 + }
  179 + });
  180 + }
  181 +
  182 + //转换时间格式
  183 + function _dateFormat(list) {
  184 + var fs = 'YYYY-MM-DD HH:mm:ss';
  185 + $.each(list, function(i, obj) {
  186 + obj.reportDate = moment(obj.reportDate).format(fs);
  187 + });
  188 + }
  189 +
  190 + // 时间字符串转成时间戳
  191 + function str2datetime(stringTime){
  192 + return Date.parse(new Date(stringTime));
  193 + }
  194 +
  195 + // 时间字符串转成时间戳
  196 + function changeCarPlate(carPlate){
  197 + var tmp = "沪" + carPlate.substr(0, 1) + "-" + carPlate.substr(1, carPlate.length);
  198 + return tmp.toUpperCase();;
  199 + }
128 })(); 200 })();
129 \ No newline at end of file 201 \ No newline at end of file
src/main/resources/static/pages/trafficManage/lineStationUploadRecord.html
@@ -8,30 +8,40 @@ @@ -8,30 +8,40 @@
8 </ul> 8 </ul>
9 <div class="tab_line"> 9 <div class="tab_line">
10 <div class="col-md-12"> 10 <div class="col-md-12">
11 - <ul class="breadcrumb">  
12 - <li>筛选数据:</li>  
13 - <li>日期:</li>  
14 - <li><input type="text" class="inputCommon dateTime" name="date" id="dateInput" placeholder="日期"></li>  
15 - <li>时间范围:</li>  
16 - <li><input type="text" class="inputCommon dateRange" name="startDate">至  
17 - <input type="text" class="inputCommon dateRange" name="endDate">时</li>  
18 - <li>线路名称:</li>  
19 - <li><input type="text" class="form-control form-filter input-sm"  
20 - name="xl.name_eq" maxlength="40" /></li>  
21 - <li>内部编码:</li>  
22 - <li><input type="text" class="form-control form-filter input-sm"  
23 - name="xl.insideCode_eq" maxlength="40" /></li>  
24 - <li>车牌号:</li>  
25 - <li><input type="text" class="inputCommon inputCarPlate"  
26 - name="xl.carPlate_eq" maxlength="40" /></li>  
27 - <li><a class="btn btn-circle blue" id="search">筛选</a></li>  
28 - </ul> 11 + <form class="form-inline" action="">
  12 + <div class="inLine_block" class="param">
  13 + <span class="item-label" style="width: 80px;">筛选数据:日期:</span>
  14 + <input class="form-control" name="reportDate" type="text" id="dateInput" style="width: 180px;"/>
  15 + </div>
  16 + <div class="inLine_block" style="display: inline-block;margin-left: 15px;">
  17 + <span class="item-label" style="width: 80px;">时间范围:</span>
  18 + <input type="text" name="startDate" class="inputCommon dateRange">至
  19 + <input type="text" name="endDate" class="inputCommon dateRange">时
  20 + </div>
  21 + <div class="inLine_block" style="display: inline-block;margin-left: 15px;">
  22 + <span class="item-label" style="width: 80px;">线路名称:</span>
  23 + <select class="form-control" name="line.id_eq" id="line" style="width: 150px;"></select>
  24 + </div>
  25 + <div class="inLine_block" style="display: inline-block;margin-left: 15px;">
  26 + <span class="item-label" style="width: 80px;">内部编码:</span>
  27 + <input type="text" name="cars.insideCode_eq" id="insideCode" style="width: 120px;" maxlength="40"/>
  28 + </div>
  29 + <div class="inLine_block" style="display: inline-block;margin-left: 15px;">
  30 + <span class="item-label" style="width: 80px;">车牌号:</span>
  31 + <input type="text" name="cars.carPlate_eq" id="carPlate" style="width: 120px;" maxlength="40"/>
  32 + <span style="color: red;width: 80px;">(沪D-12345 '沪'和'-'去掉)</span>
  33 + </div>
  34 + <div class="form-group" style="display: inline-block;margin-left: 15px;">
  35 + <a class="btn btn-circle blue" id="search">筛选</a>
  36 + </div>
  37 + </form>
29 </div> 38 </div>
30 <div class="col-md-12 panel-wrap"> 39 <div class="col-md-12 panel-wrap">
31 <div class="_panel"> 40 <div class="_panel">
32 <div class="table-container"> 41 <div class="table-container">
33 <table 42 <table
34 - class="table table-striped table-bordered table-advance pb-table head"> 43 + class="table table-striped table-bordered table-advance pb-table head"
  44 + id="vehicle_stop">
35 <thead> 45 <thead>
36 <tr> 46 <tr>
37 <th>序号</th> 47 <th>序号</th>
@@ -59,53 +69,127 @@ @@ -59,53 +69,127 @@
59 </div> 69 </div>
60 </div> 70 </div>
61 </div> 71 </div>
62 -<script id="lineStationRecord_list_temp" type="text/html"> 72 +<script id="lineStationUploadRecord_list_temp" type="text/html">
63 {{each list as obj i}} 73 {{each list as obj i}}
64 <tr> 74 <tr>
65 <td class="seq" style="vertical-align: middle;"> 75 <td class="seq" style="vertical-align: middle;">
66 {{i+1}} 76 {{i+1}}
67 </td> 77 </td>
68 <td> 78 <td>
69 - {{obj.name}} 79 + {{if obj.line.company == '55'}}
  80 + 上南公司
  81 + {{else if obj.line.company == '22'}}
  82 + 金高公司
  83 + {{else if obj.line.company == '05'}}
  84 + 杨高公司
  85 + {{else if obj.line.company == '26'}}
  86 + 南汇公司
  87 + {{else if obj.line.company == '77'}}
  88 + 闵行公司
  89 + {{/if}}
70 </td> 90 </td>
71 - <td class="ttInfoId">  
72 - {{obj.company}} 91 + <td>
  92 + {{if obj.line.company == '55'}}
  93 +
  94 + {{if obj.line.brancheCompany == '1'}}
  95 + 上南二分公司
  96 + {{else if obj.line.brancheCompany == '2'}}
  97 + 上南三分公司
  98 + {{else if obj.line.brancheCompany == '3'}}
  99 + 上南六分公司
  100 + {{else if obj.line.brancheCompany == '4'}}
  101 + 上南一分公司
  102 + {{/if}}
  103 +
  104 + {{else if obj.line.company == '22'}}
  105 +
  106 + {{if obj.line.brancheCompany == '1'}}
  107 + 四分公司
  108 + {{else if obj.line.brancheCompany == '2'}}
  109 + 二分公司
  110 + {{else if obj.line.brancheCompany == '3'}}
  111 + 三分公司
  112 + {{else if obj.line.brancheCompany == '5'}}
  113 + 一分公司
  114 + {{/if}}
  115 +
  116 + {{else if obj.line.company == '05'}}
  117 +
  118 + {{if obj.line.brancheCompany == '1'}}
  119 + 川沙分公司
  120 + {{else if obj.line.brancheCompany == '2'}}
  121 + 金桥分公司
  122 + {{else if obj.line.brancheCompany == '3'}}
  123 + 芦潮港分公司
  124 + {{else if obj.line.brancheCompany == '5'}}
  125 + 杨高分公司
  126 + {{else if obj.line.brancheCompany == '6'}}
  127 + 周浦分公司
  128 + {{/if}}
  129 +
  130 + {{else if obj.line.company == '26'}}
  131 +
  132 + {{if obj.line.brancheCompany == '1'}}
  133 + 南汇一分
  134 + {{else if obj.line.brancheCompany == '2'}}
  135 + 南汇二分
  136 + {{else if obj.line.brancheCompany == '3'}}
  137 + 南汇三分
  138 + {{else if obj.line.brancheCompany == '4'}}
  139 + 南汇维修公司
  140 + {{else if obj.line.brancheCompany == '5'}}
  141 + 南汇公司
  142 + {{/if}}
  143 +
  144 + {{/if}}
73 </td> 145 </td>
74 <td> 146 <td>
75 - 147 + {{obj.line.name}}
76 </td> 148 </td>
77 - <td >  
78 - 149 + <td>
  150 + {{obj.line.shanghaiLinecode}}
79 </td> 151 </td>
80 <td> 152 <td>
81 - {{obj.name}} 153 + {{obj.cars.insideCode}}
82 </td> 154 </td>
83 <td> 155 <td>
84 - {{obj.company}} 156 + {{obj.cars.equipmentCode}}
85 </td> 157 </td>
86 <td> 158 <td>
87 - 159 + {{obj.cars.carPlate}}
88 </td> 160 </td>
89 - <td >  
90 - 161 + <td>
  162 + {{obj.stop}}
91 </td> 163 </td>
92 <td> 164 <td>
93 - {{obj.name}} 165 + {{if obj.serviceState == 0}}
  166 + 营运
  167 + {{else if obj.serviceState == 1}}
  168 + 停运
  169 + {{/if}}
94 </td> 170 </td>
95 <td> 171 <td>
96 - {{obj.company}} 172 + {{if obj.upDown == 0}}
  173 + 上行
  174 + {{else if obj.upDown == 1}}
  175 + 下行
  176 + {{/if}}
97 </td> 177 </td>
98 <td> 178 <td>
99 - 179 + {{if obj.inOutStop == 0}}
  180 + 站内
  181 + {{else if obj.inOutStop == 1}}
  182 + 站外
  183 + {{/if}}
100 </td> 184 </td>
101 - <td >  
102 - 185 + <td>
  186 + {{obj.reportDate}}
103 </td> 187 </td>
104 </tr> 188 </tr>
105 {{/each}} 189 {{/each}}
106 {{if list.length == 0}} 190 {{if list.length == 0}}
107 <tr class="muted"> 191 <tr class="muted">
108 - <td colspan=5 style="text-align: center;"><h6>没有找到相关数据</h6></td> 192 + <td colspan=13 style="text-align: center;"><h6>没有找到相关数据</h6></td>
109 </tr> 193 </tr>
110 {{/if}} 194 {{/if}}
111 </script> 195 </script>
src/main/resources/static/real_control_v2/alone_page/home/alone_data_basic.js 0 → 100644
  1 +/* 基础数据管理模块 */
  2 +
  3 +var gb_data_basic = (function () {
  4 +
  5 + var stationRoutes, lineCode2NameAll, lineInformations, nbbm2deviceMap, device2nbbmMap, allPersonnel, svgAttrs;
  6 + var ep = EventProxy.create("stationRoutes", "lineCode2Name", "lineInformations", "nbbm2deviceId", "all_personnel", "svg_attrs"
  7 + , function (routes, code2Name, informations, nbbm2device, all_personnel, svgAttrMap) {
  8 + stationRoutes = routes;
  9 + lineCode2NameAll = code2Name;
  10 + lineInformations = informations;
  11 + nbbm2deviceMap = nbbm2device;
  12 + device2nbbmMap = gb_common.inverse(nbbm2deviceMap);
  13 + allPersonnel = all_personnel;
  14 + svgAttrs = svgAttrMap;
  15 +
  16 + res_load_ep.emitLater('data-basic');
  17 + });
  18 +
  19 + var storage = window.localStorage;
  20 + //激活的线路
  21 + var activeLines = JSON.parse(storage.getItem('lineControlItems'));
  22 + //lineCode to line object
  23 + var codeToLine = {};
  24 + //lineCode idx string
  25 + var line_idx = (function () {
  26 + var str = '';
  27 + for (var i = 0, item; item = activeLines[i++];) {
  28 + str += (',' + item.lineCode);
  29 + codeToLine[item.lineCode] = item;
  30 + }
  31 + return str.substr(1);
  32 + })();
  33 +
  34 + //站点路由
  35 + gb_common.$get('/stationroute/multiLine', {lineIds: line_idx}, function (rs) {
  36 + var list = rs.list;//JSON.parse(rs.list);
  37 + var routeData = gb_common.groupBy(list, 'lineCode');
  38 + //排序
  39 + for (var lineCode in routeData) {
  40 + routeData[lineCode].sort(stationRouteSort);
  41 + }
  42 + ep.emit('stationRoutes', routeData);
  43 + });
  44 +
  45 + //线路标准信息
  46 + /*gb_common.$get('/lineInformation/line/multi', {lineCodes: line_idx}, function (rs) {
  47 + var informations = {};
  48 + $.each(rs, function () {
  49 + informations[this.line.lineCode] = this;
  50 + delete this['line'];
  51 + });
  52 + ep.emit('lineInformations', informations);
  53 + });*/
  54 + ep.emit('lineInformations', {});
  55 +
  56 + //人员信息
  57 + ep.emit('all_personnel', {});
  58 + /*loadAllPersonnel(function (data) {
  59 + ep.emit('all_personnel', data);
  60 + });
  61 + function loadAllPersonnel(cb) {
  62 + $.get('/personnel/all_py', function (rs) {
  63 + //转换成自动补全组件需要的数据
  64 + var data = [], code;
  65 + for(var i =0, p; p = rs[i++];){
  66 + code = p['workId'].indexOf('-')!=-1?p['workId'].split('-')[1]:p['workId'];
  67 + data.push({
  68 + value: code + '/' + p.name,
  69 + fullChars: p.fullChars.toUpperCase(),
  70 + camelChars: p.camelChars.toUpperCase()
  71 + });
  72 + }
  73 + cb && cb(data);
  74 + });
  75 + }*/
  76 +
  77 + var carparks = {};
  78 + //停车场数据
  79 +/* gb_common.$get('/realMap/carParkSpatialData', {}, function (rs) {
  80 + rs.list.sort(function (a, b) {
  81 + return a.parkName.localeCompare(b.parkName);
  82 + });
  83 + $.each(rs.list, function () {
  84 + carparks[this.parkCode] = this;
  85 + });
  86 + });*/
  87 +
  88 + //车辆数据
  89 + var carsArray;
  90 + /*$.get('/basic/cars?t=' + Math.random(), function (rs) {
  91 + carsArray = rs;
  92 + });*/
  93 +
  94 + var getCarparkByCode = function (code) {
  95 + return carparks[code];
  96 + };
  97 +
  98 + //line code to name
  99 + $.get('/basic/lineCode2Name', function (rs) {
  100 + ep.emit('lineCode2Name', rs);
  101 + });
  102 +
  103 + //nbbm to device id
  104 + $.get('/basic/nbbm2deviceId', function (rs) {
  105 + ep.emit('nbbm2deviceId', rs);
  106 + });
  107 + //nbbm to 车牌号
  108 + var nbbm2PlateMap;
  109 + $.get('/basic/nbbm2PlateNo', function (rs) {
  110 + nbbm2PlateMap = rs;
  111 + });
  112 +
  113 + //模拟图属性数据
  114 + gb_common.$get('/realSchedule/svgAttr', {idx: line_idx}, function (rs) {
  115 + var data = {};
  116 + $.each(rs.list, function () {
  117 + this.hideStations = JSON.parse(this.hideStations);
  118 + this.nicknames = JSON.parse(this.nicknames);
  119 + data[this.lineCode] = this;
  120 + });
  121 + ep.emit('svg_attrs', data);
  122 + });
  123 +
  124 + //站点和停车场历时、公里对照数据
  125 + var stat_park_data;
  126 + /*var load_stat_park_data = function () {
  127 + $.get('/basic/station2ParkData?t='+Math.random(), {idx: line_idx}, function (rs) {
  128 + stat_park_data = rs;
  129 + });
  130 + }
  131 + load_stat_park_data();*/
  132 +
  133 + function findLineByCodes(codeArr) {
  134 + var rs = [];
  135 + $.each(codeArr, function () {
  136 + rs.push(codeToLine[this]);
  137 + });
  138 + return rs;
  139 + }
  140 +
  141 + var findCodeByLinename = function (name) {
  142 + for (var code in lineCode2NameAll) {
  143 + if (name == lineCode2NameAll[code])
  144 + return code;
  145 + }
  146 +
  147 + return null;
  148 + };
  149 +
  150 + var getLineInformation = function (lineCode) {
  151 + return lineInformations[lineCode];
  152 + };
  153 +
  154 + var stationRouteSort = function (a, b) {
  155 + return a.stationRouteCode - b.stationRouteCode;
  156 + };
  157 +
  158 + /**
  159 + * 常用的备注补全列表
  160 + */
  161 + var remarksArray = ['保养', '故障', '肇事', '加油', '维修', '援外', '路阻'
  162 + , '故障(离合器坏)', '故障,(方向盘坏)', '故障(排挡坏)', '故障(门坏)', '故障(雨刮器坏)','故障(刹车坏)', '故障(气打不上)'
  163 + ,'故障(整车无电)', '故障(故障灯常亮)', '故障(警报灯亮)', '故障(玻璃坏)', '故障(反光镜坏)', '故障(发电机坏)', '故障(漏防冻液)'
  164 + , '故障(漏水)','故障(轮胎坏)', '故障(无动力)', '故障(喷机油)', '故障(水温高)', '保养(一级保养)'
  165 + , '保养(二级保养)', '保养(三级保养)', '换车出场', '临加进场', '临加出场'];
  166 + var remarksMapps = [];
  167 + $.each(remarksArray, function (i, t) {
  168 + remarksMapps.push({
  169 + value: t,
  170 + fullChars: pinyin.getFullChars(t).toUpperCase(),
  171 + camelChars: pinyin.getCamelChars(t)
  172 + });
  173 + });
  174 +
  175 + //文件载入完毕
  176 + res_load_ep.emitLater('load_data_basic');
  177 +
  178 + return {
  179 + activeLines: activeLines,
  180 + line_idx: line_idx,
  181 + codeToLine: codeToLine,
  182 + nbbm2deviceMap: function () {
  183 + return nbbm2deviceMap;
  184 + },
  185 + device2nbbmMap: function () {
  186 + return device2nbbmMap;
  187 + },
  188 + getLineInformation: getLineInformation,
  189 + allInformations: function () {
  190 + return lineInformations;
  191 + },
  192 + stationRoutes: function (lineCode) {
  193 + return stationRoutes[lineCode]
  194 + },
  195 + findLineByCodes: findLineByCodes,
  196 + lineCode2NameAll: function () {
  197 + return lineCode2NameAll
  198 + },
  199 + allPersonnel: function () {
  200 + return allPersonnel;
  201 + },
  202 + findCodeByLinename: findCodeByLinename,
  203 + getCarparkByCode: getCarparkByCode,
  204 + getSvgAttr: function (lineCode) {
  205 + return svgAttrs[lineCode];
  206 + },
  207 + setSvgAttr: function (attr) {
  208 + attr.hideStations = JSON.parse(attr.hideStations);
  209 + attr.nicknames = JSON.parse(attr.nicknames);
  210 + svgAttrs[attr.lineCode] = attr;
  211 + },
  212 + //是否是环线
  213 + isLoopLine: function (lineCode) {
  214 + var data = gb_common.groupBy(stationRoutes[lineCode], 'directions');
  215 + //下行只有2个站点
  216 + var len = data[0].length;
  217 + if (len > 0 && data[1].length == 2) {
  218 + var first = data[0][0],
  219 + end = data[0][len - 1];
  220 +
  221 + /*if(first.stationName != end.stationName)
  222 + return false;*/
  223 +
  224 + var fPoint = {latitude: first.station.gLaty, longitude: first.station.gLonx}
  225 + , ePoint = {latitude: end.station.gLaty, longitude: end.station.gLonx};
  226 +
  227 + //并且上行起终点距离200米内
  228 + if (geolib.getDistance(fPoint, ePoint) < 200) {
  229 + return true;
  230 + }
  231 + }
  232 +
  233 + return false;
  234 + },
  235 + //刷新员工信息
  236 + refreshAllPersonnel: function (cb) {
  237 + loadAllPersonnel(function (data) {
  238 + allPersonnel = data;
  239 + cb && cb();
  240 + });
  241 + },
  242 + nbbm2PlateMap: function () {
  243 + return nbbm2PlateMap;
  244 + },
  245 + carsArray: function () {
  246 + return carsArray;
  247 + },
  248 + simpleParksArray: function () {
  249 + var map = {};
  250 + for(var code in carparks)
  251 + map[code] = carparks[code].parkName;
  252 + return map;
  253 + },
  254 + remarksMapps: function () {
  255 + return remarksMapps;
  256 + },
  257 + get_stat_park_data: function () {
  258 + return stat_park_data;
  259 + },
  260 + reload_stat_park_data: function () {
  261 + load_stat_park_data();
  262 + }
  263 + };
  264 +})();
src/main/resources/static/real_control_v2/alone_page/home/alone_data_gps.js 0 → 100644
  1 +/* gps 数据管理模块 */
  2 +
  3 +var gb_data_gps = (function () {
  4 +
  5 + //fixed time refresh delay
  6 + var delay = 1000 * 7;
  7 + //deviceId ——> gps
  8 + var realData = {};
  9 + //refresh after callback
  10 + var refreshEventCallbacks = [];
  11 + //register callback function
  12 + var registerCallback = function (cb) {
  13 + if (cb)
  14 + refreshEventCallbacks.push(cb);
  15 + };
  16 +
  17 + var refresh = function (cb) {
  18 + $.ajax({
  19 + url: '/gps/real/line',
  20 + data: {lineCodes: gb_data_basic.line_idx},
  21 + dataType: 'json',
  22 + success: function (rs) {
  23 + //用定时的gps来检测session断开
  24 + if(rs.status && rs.status==407){
  25 + location.href = '/login.html';
  26 + return;
  27 + }
  28 + refreshData(rs);
  29 + cb();
  30 + },
  31 + error: function (xr, t) {
  32 + notify_err('刷新GPS失败,稍后重试' + t);
  33 + cb();
  34 + }
  35 + });
  36 + };
  37 +
  38 + var refreshData = function (rs) {
  39 + var old, addArr = [],
  40 + upArr = [],
  41 + upDownChange = [];
  42 +
  43 + var schArray;
  44 + $.each(rs, function () {
  45 + old = realData[this.deviceId];
  46 + if (old) {
  47 + if (this.timestamp > old.timestamp) {
  48 + if (old.upDown != this.upDown)
  49 + upDownChange.push(this);
  50 + else
  51 + upArr.push(this);
  52 + }
  53 +
  54 + } else
  55 + addArr.push(this);
  56 +
  57 + //班次信息
  58 + /*if (this.schId) {
  59 + schArray = gb_schedule_table.findScheduleByLine(this.lineId);
  60 + if (schArray)
  61 + this.sch = schArray[this.schId];
  62 + }*/
  63 +
  64 + //时间格式化
  65 + this.dateStr = moment(this.timestamp).format('YYYY-MM-DD HH:mm:ss');
  66 + realData[this.deviceId] = this;
  67 + });
  68 +
  69 + //console.log('add array size: ' + addArr.length, 'up array size: ' + upArr.length);
  70 + //CCCallFuncN
  71 + $.each(refreshEventCallbacks, function (i, cb) {
  72 + cb(addArr, upArr, upDownChange);
  73 + });
  74 +
  75 + };
  76 +
  77 + var startFixedTime;
  78 + var fixedTimeRefresh = function () {
  79 + if (startFixedTime)
  80 + return;
  81 + startFixedTime = true;
  82 +
  83 + (function () {
  84 + var f = arguments.callee;
  85 + refresh(function () {
  86 + setTimeout(f, delay);
  87 + });
  88 + })();
  89 + };
  90 +
  91 + var gpsByLineCode = function (lineCode) {
  92 + var rs = [];
  93 + for (var device in realData) {
  94 + if (realData[device].lineId == lineCode)
  95 + rs.push(realData[device]);
  96 + }
  97 + return rs;
  98 + };
  99 +
  100 + var findOne = function (deviceId) {
  101 + return realData[deviceId];
  102 + };
  103 +
  104 + var findGpsByNbbm = function (nbbm) {
  105 + return realData[gb_data_basic.nbbm2deviceMap()[nbbm]];
  106 + };
  107 +
  108 + /**
  109 + * 设备掉线事件
  110 + */
  111 + var deviceOffline = function (gps) {
  112 + $.each(offlineCallbacks, function (i, cb) {
  113 + cb(gps);
  114 + });
  115 + };
  116 +
  117 + //注册掉线事件回调函数
  118 + var offlineCallbacks = [];
  119 + var registerOfflineCb = function (cb) {
  120 + if (cb)
  121 + offlineCallbacks.push(cb);
  122 + };
  123 +
  124 + return {
  125 + fixedTimeRefresh: fixedTimeRefresh,
  126 + registerCallback: registerCallback,
  127 + allGps: realData,
  128 + gpsByLineCode: gpsByLineCode,
  129 + findOne: findOne,
  130 + findGpsByNbbm: findGpsByNbbm,
  131 + deviceOffline: deviceOffline,
  132 + registerOfflineCb: registerOfflineCb
  133 + };
  134 +})();
src/main/resources/static/real_control_v2/alone_page/home/home_wrap.html 0 → 100644
  1 +<!DOCTYPE html>
  2 +<html lang="zh-cn">
  3 +
  4 +<head>
  5 + <meta charset="UTF-8">
  6 + <title>主页模拟图</title>
  7 + <!-- uikit core style-->
  8 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/css/uikit.gradient.min.css" />
  9 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/notify.gradient.min.css" merge="plugins"/>
  10 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/tooltip.gradient.min.css" merge="plugins"/>
  11 + <link rel="stylesheet"
  12 + href="/real_control_v2/assets/plugins/uikit-2.27.1/components/autocomplete.gradient.min.css" merge="plugins"/>
  13 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/sticky.gradient.min.css" merge="plugins"/>
  14 +
  15 + <!-- main style -->
  16 + <link rel="stylesheet" href="/real_control_v2/css/main.css" />
  17 + <!-- home style -->
  18 + <link rel="stylesheet" href="/real_control_v2/css/home.css" merge="custom_style"/>
  19 +
  20 + <!-- custom table -->
  21 + <link rel="stylesheet" href="/real_control_v2/css/ct_table.css" merge="custom_style"/>
  22 + <!-- jquery contextMenu style -->
  23 + <link rel="stylesheet" href="/real_control_v2/assets/css/jquery.contextMenu.min.css" merge="plugins"/>
  24 + <!-- formvalidation style -->
  25 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/formvalidation/formValidation.min.css" merge="plugins"/>
  26 + <!-- js tree -->
  27 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/jstree/default/style.css" merge="plugins"/>
  28 + <!-- tooltip css-->
  29 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/qtip/jquery.qtip.min.css" merge="plugins"/>
  30 + <link rel="stylesheet" href="/real_control_v2/css/pace.css" merge="plugins"/>
  31 +
  32 + <link rel="stylesheet" href="/real_control_v2/css/modal_extend.css" merge="custom_style"/>
  33 + <!-- perfect-scrollbar style -->
  34 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.css" merge="plugins"/>
  35 + <!-- layer 3.0.3 -->
  36 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/layer3.0.3/skin/default/layer.css" merge="plugins"/>
  37 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/layer3.0.3/skin/moon/style.css" merge="plugins"/>
  38 +
  39 +
  40 + <style>
  41 + .main-container{
  42 + height: 100% !important;
  43 + }
  44 +
  45 + #main-tab-content{
  46 + padding: 0 !important;
  47 + }
  48 +
  49 + .home-panel{
  50 +
  51 + }
  52 +
  53 + #home-main-content{
  54 + padding: 0 !important;
  55 + }
  56 +
  57 + #main-tab-content>.home-panel>#home-main-content{
  58 + overflow: inherit !important;
  59 + }
  60 + </style>
  61 +</head>
  62 +
  63 +<body>
  64 +<!--<div class="main-container" style="height: 100%;">
  65 +</div>-->
  66 +<div class="main-container">
  67 + <ul id="main-tab-content">
  68 + <li class="home-panel"></li>
  69 + </ul>
  70 +</div>
  71 +
  72 +
  73 +<!-- 地图相关 -->
  74 +<script src="http://api.map.baidu.com/api?v=2.0&ak=IGGrr4UjwIYzatoCRFKEL8sT"></script>
  75 +<script src="http://api.map.baidu.com/library/TrafficControl/1.4/src/TrafficControl_min.js"></script>
  76 +<script src="/assets/js/baidu//MarkerClusterer.js" merge="plugins"></script>
  77 +<script src="/assets/js/TransGPS.js" merge="plugins"></script>
  78 +<!-- jquery -->
  79 +<script src="/real_control_v2/assets/js/jquery.min.js"></script>
  80 +<!-- jquery actual -->
  81 +<script src="/real_control_v2/assets/js/jquery.actual.min.js" merge="plugins"></script>
  82 +<!-- jquery.serializejson JSON序列化插件 -->
  83 +<script src="/assets/plugins/jquery.serializejson.js" merge="plugins"></script>
  84 +<!-- moment.js 日期处理类库 -->
  85 +<script src="/real_control_v2/assets/plugins/moment/moment.min.js"></script>
  86 +<script src="/real_control_v2/assets/plugins/moment/zh-cn.js"></script>
  87 +
  88 +<!-- flatpickr -->
  89 +<script src="/real_control_v2/assets/plugins/flatpickr/flatpickr.min.js" merge="plugins"></script>
  90 +<script src="/real_control_v2/assets/plugins/flatpickr/l10n/zh.js" merge="plugins"></script>
  91 +
  92 +<!-- perfect-scrollbar -->
  93 +<script src="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.jquery.js" merge="plugins"></script>
  94 +<!-- common js -->
  95 +<script src="/real_control_v2/js/common.js"></script>
  96 +<!-- art-template 模版引擎 -->
  97 +<script src="/assets/plugins/template.js" merge="plugins"></script>
  98 +<!-- d3 -->
  99 +<script src="/assets/js/d3.min.js"></script>
  100 +<!-- EventProxy -->
  101 +<script src="/assets/js/eventproxy.js"></script>
  102 +
  103 +<script>
  104 +
  105 +
  106 + var res_load_ep = EventProxy.create('load_home_layout', 'load_home_line_panel', 'load_data_basic', 'data-basic', function () {
  107 + //加载主页
  108 + gb_home_layout.layout(function () {
  109 + gb_home_line_panel.init(function () {
  110 + //gps自刷新
  111 + gb_data_gps.fixedTimeRefresh();
  112 +
  113 + $('.uk-icon-send-o.home_alone_page').remove();
  114 + });
  115 + });
  116 + });
  117 +
  118 + function connectArr(arr, separator, transFun) {
  119 + var rs = '';
  120 + $.each(arr, function (i, item) {
  121 + if (transFun)
  122 + item = transFun(item);
  123 + rs += (separator + item);
  124 + });
  125 + return rs.substr(separator.length);
  126 + }
  127 +
  128 + var isArray = function (obj) {
  129 + return Object.prototype.toString.call(obj) === '[object Array]';
  130 + };
  131 +
  132 + var gb_form_validation_opts = {
  133 + framework: 'uikit',
  134 + locale: 'zh_CN',
  135 + icon: {
  136 + valid: 'uk-icon-check',
  137 + invalid: 'uk-icon-times',
  138 + validating: 'uk-icon-refresh'
  139 + }
  140 + };
  141 +
  142 +</script>
  143 +
  144 +<!-- uikit core -->
  145 +<script src="/real_control_v2/assets/plugins/uikit-2.27.1/uikit.min.js" merge="uikit_js"></script>
  146 +<script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/notify.min.js" merge="uikit_js"></script>
  147 +<script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/pagination.min.js" merge="uikit_js"></script>
  148 +<script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/tooltip.min.js" merge="uikit_js"></script>
  149 +<script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/sticky.min.js" merge="uikit_js"></script>
  150 +
  151 +
  152 +<!-- jquery contextMenu -->
  153 +<script src="/real_control_v2/assets/js/jquery.contextMenu.min.js" merge="plugins"></script>
  154 +<script src="/real_control_v2/assets/js/jquery.ui.position.min.js" merge="plugins"></script>
  155 +<!-- formvalidation- -->
  156 +<script src="/real_control_v2/assets/plugins/formvalidation/formValidation.min.js" merge="plugins"></script>
  157 +<script src="/real_control_v2/assets/plugins/formvalidation/zh_CN.js" merge="plugins"></script>
  158 +<script src="/real_control_v2/assets/plugins/formvalidation/uikit.min.js" merge="plugins"></script>
  159 +<!-- js tree -->
  160 +<script src="/real_control_v2/assets/plugins/jstree/jstree.min.js" merge="plugins"></script>
  161 +<!-- simple pinyin -->
  162 +<script src="/assets/plugins/pinyin.js" merge="plugins"></script>
  163 +<!-- qtip -->
  164 +<script src="/real_control_v2/assets/plugins/qtip/jquery.qtip.min.js" merge="plugins"></script>
  165 +<!-- layer 3.0.3 -->
  166 +<script src="/real_control_v2/assets/plugins/layer3.0.3/layer.js" merge="plugins"></script>
  167 +
  168 +<!-- 数据 -->
  169 +<script src="/real_control_v2/alone_page/home/alone_data_basic.js" merge="custom_js"></script>
  170 +<script src="/real_control_v2/alone_page/home/alone_data_gps.js" merge="custom_js"></script>
  171 +<script src="/real_control_v2/js/data/gps_abnormal.js" merge="custom_js"></script>
  172 +<!-- 线路模拟图 -->
  173 +<script src="/real_control_v2/js/utils/svg_chart.js" merge="custom_js"></script>
  174 +<script src="/real_control_v2/js/utils/svg_data_convert.js" merge="custom_js"></script>
  175 +<script src="/real_control_v2/js/utils/svg_chart_tooltip.js" merge="custom_js"></script>
  176 +<script src="/real_control_v2/js/utils/svg_chart_map.js" merge="custom_js"></script>
  177 +
  178 +<!-- custom table js -->
  179 +<script src="/real_control_v2/js/utils/ct_table.js" merge="custom_js"></script>
  180 +<!-- home js -->
  181 +<script src="/real_control_v2/js/home/layout.js" merge="custom_js"></script>
  182 +<script src="/real_control_v2/js/home/line_panel.js" merge="custom_js"></script>
  183 +<script src="/real_control_v2/js/home/context_menu.js" merge="custom_js"></script>
  184 +
  185 +
  186 +<!-- 模态框扩展 -->
  187 +<script src="/real_control_v2/js/modal_extend.js" merge="custom_js"></script>
  188 +
  189 +</body>
  190 +
  191 +</html>
src/main/resources/static/real_control_v2/mapmonitor/alone_page/alone_data_basic.js renamed to src/main/resources/static/real_control_v2/alone_page/map/alone_data_basic.js
@@ -12,7 +12,8 @@ var gb_data_basic = (function () { @@ -12,7 +12,8 @@ var gb_data_basic = (function () {
12 device2nbbmMap = gb_common.inverse(nbbm2deviceMap); 12 device2nbbmMap = gb_common.inverse(nbbm2deviceMap);
13 allPersonnel = all_personnel; 13 allPersonnel = all_personnel;
14 svgAttrs = svgAttrMap; 14 svgAttrs = svgAttrMap;
15 - //gb_main_ep.emitLater('data-basic'); 15 +
  16 + res_load_ep.emitLater('data-basic');
16 }); 17 });
17 18
18 var storage = window.localStorage; 19 var storage = window.localStorage;
src/main/resources/static/real_control_v2/mapmonitor/alone_page/alone_data_gps.js renamed to src/main/resources/static/real_control_v2/alone_page/map/alone_data_gps.js
src/main/resources/static/real_control_v2/mapmonitor/alone_page/alone_wrap.html renamed to src/main/resources/static/real_control_v2/alone_page/map/alone_wrap.html
@@ -5,41 +5,48 @@ @@ -5,41 +5,48 @@
5 <meta charset="UTF-8"> 5 <meta charset="UTF-8">
6 <title>地图监控 v2.0</title> 6 <title>地图监控 v2.0</title>
7 <!-- uikit core style--> 7 <!-- uikit core style-->
8 - <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/css/uikit.gradient.min.css" />  
9 - <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/notify.gradient.min.css" />  
10 - <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/tooltip.gradient.min.css" /> 8 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/css/uikit.gradient.min.css"/>
  9 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/notify.gradient.min.css"
  10 + merge="plugins"/>
  11 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/tooltip.gradient.min.css"
  12 + merge="plugins"/>
11 <link rel="stylesheet" 13 <link rel="stylesheet"
12 - href="/real_control_v2/assets/plugins/uikit-2.27.1/components/autocomplete.gradient.min.css" />  
13 - <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/accordion.gradient.min.css" />  
14 - <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/slidenav.gradient.min.css" />  
15 - <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/sticky.gradient.min.css" /> 14 + href="/real_control_v2/assets/plugins/uikit-2.27.1/components/autocomplete.gradient.min.css" merge="plugins"/>
  15 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/accordion.gradient.min.css"
  16 + merge="plugins"/>
  17 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/slidenav.gradient.min.css"
  18 + merge="plugins"/>
  19 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/sticky.gradient.min.css"
  20 + merge="plugins"/>
16 21
17 <!-- main style --> 22 <!-- main style -->
18 - <link rel="stylesheet" href="/real_control_v2/css/main.css" /> 23 + <link rel="stylesheet" href="/real_control_v2/css/main.css"/>
19 <!-- north style --> 24 <!-- north style -->
20 - <link rel="stylesheet" href="/real_control_v2/css/north.css" /> 25 + <link rel="stylesheet" href="/real_control_v2/css/north.css" merge="custom_style"/>
21 <!-- home style --> 26 <!-- home style -->
22 - <link rel="stylesheet" href="/real_control_v2/css/home.css" /> 27 + <link rel="stylesheet" href="/real_control_v2/css/home.css" merge="custom_style"/>
23 28
24 <!-- js tree --> 29 <!-- js tree -->
25 - <link rel="stylesheet" href="/real_control_v2/assets/plugins/jstree/default/style.css" /> 30 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/jstree/default/style.css" merge="plugins"/>
26 31
27 - <link rel="stylesheet" href="/real_control_v2/css/modal_extend.css" /> 32 + <link rel="stylesheet" href="/real_control_v2/css/modal_extend.css" merge="custom_style"/>
28 <!-- perfect-scrollbar style --> 33 <!-- perfect-scrollbar style -->
29 - <link rel="stylesheet" href="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.css" /> 34 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.css"
  35 + merge="plugins"/>
30 <!-- layer 3.0.3 --> 36 <!-- layer 3.0.3 -->
31 - <link rel="stylesheet" href="/real_control_v2/assets/plugins/layer3.0.3/skin/default/layer.css" />  
32 - <link rel="stylesheet" href="/real_control_v2/assets/plugins/layer3.0.3/skin/moon/style.css" /> 37 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/layer3.0.3/skin/default/layer.css" merge="plugins"/>
  38 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/layer3.0.3/skin/moon/style.css" merge="plugins"/>
33 39
34 <!-- flatpickr --> 40 <!-- flatpickr -->
35 - <link rel="stylesheet" href="/real_control_v2/assets/plugins/flatpickr/flatpickr.min.css" >  
36 - <link rel="stylesheet" href="/real_control_v2/assets/plugins/flatpickr/themes/airbnb.css" > 41 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/flatpickr/flatpickr.min.css" merge="plugins"/>
  42 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/flatpickr/themes/airbnb.css" merge="plugins"/>
37 43
38 - <link rel="stylesheet" href="/real_control_v2/css/ct_table.css" /> 44 + <link rel="stylesheet" href="/real_control_v2/css/ct_table.css" merge="custom_style"/>
39 </head> 45 </head>
40 46
41 <body> 47 <body>
42 <div class="main-container" style="height: 100%;"> 48 <div class="main-container" style="height: 100%;">
  49 + <span style="position: absolute;left: calc(50% - 35px);top: calc(45% - 35px);">加载中...</span>
43 </div> 50 </div>
44 51
45 <!-- 地图相关 --> 52 <!-- 地图相关 -->
@@ -52,55 +59,60 @@ @@ -52,55 +59,60 @@
52 <!-- jquery --> 59 <!-- jquery -->
53 <script src="/real_control_v2/assets/js/jquery.min.js"></script> 60 <script src="/real_control_v2/assets/js/jquery.min.js"></script>
54 <!-- jquery actual --> 61 <!-- jquery actual -->
55 -<script src="/real_control_v2/assets/js/jquery.actual.min.js" ></script> 62 +<script src="/real_control_v2/assets/js/jquery.actual.min.js" merge="plugins"></script>
56 <!-- moment.js 日期处理类库 --> 63 <!-- moment.js 日期处理类库 -->
57 <script src="/real_control_v2/assets/plugins/moment/moment.min.js"></script> 64 <script src="/real_control_v2/assets/plugins/moment/moment.min.js"></script>
58 <script src="/real_control_v2/assets/plugins/moment/zh-cn.js"></script> 65 <script src="/real_control_v2/assets/plugins/moment/zh-cn.js"></script>
59 66
60 <!-- flatpickr --> 67 <!-- flatpickr -->
61 -<script src="/real_control_v2/assets/plugins/flatpickr/flatpickr.min.js"></script>  
62 -<script src="/real_control_v2/assets/plugins/flatpickr/l10n/zh.js"></script> 68 +<script src="/real_control_v2/assets/plugins/flatpickr/flatpickr.min.js" merge="plugins"></script>
  69 +<script src="/real_control_v2/assets/plugins/flatpickr/l10n/zh.js" merge="plugins"></script>
63 70
64 <!-- perfect-scrollbar --> 71 <!-- perfect-scrollbar -->
65 -<script src="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.jquery.js" ></script> 72 +<script src="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.jquery.js" merge="plugins"></script>
66 <!-- common js --> 73 <!-- common js -->
67 <script src="/real_control_v2/js/common.js"></script> 74 <script src="/real_control_v2/js/common.js"></script>
68 <!-- art-template 模版引擎 --> 75 <!-- art-template 模版引擎 -->
69 -<script src="/assets/plugins/template.js" ></script> 76 +<script src="/assets/plugins/template.js" merge="plugins"></script>
70 <!-- d3 --> 77 <!-- d3 -->
71 <script src="/assets/js/d3.min.js"></script> 78 <script src="/assets/js/d3.min.js"></script>
72 <!-- EventProxy --> 79 <!-- EventProxy -->
73 <script src="/assets/js/eventproxy.js"></script> 80 <script src="/assets/js/eventproxy.js"></script>
74 <!-- uikit core --> 81 <!-- uikit core -->
75 -<script src="/real_control_v2/assets/plugins/uikit-2.27.1/uikit.min.js" ></script>  
76 -<script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/notify.min.js" ></script>  
77 -<script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/tooltip.min.js"></script>  
78 -<script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/autocomplete.min.js"></script>  
79 -<script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/accordion.min.js" ></script>  
80 -<script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/sticky.min.js" ></script> 82 +<script src="/real_control_v2/assets/plugins/uikit-2.27.1/uikit.min.js" merge="uikit_js"></script>
  83 +<script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/notify.min.js" merge="uikit_js"></script>
  84 +<script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/tooltip.min.js" merge="uikit_js"></script>
  85 +<script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/autocomplete.min.js" merge="uikit_js"></script>
  86 +<script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/accordion.min.js" merge="uikit_js"></script>
  87 +<script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/sticky.min.js" merge="uikit_js"></script>
81 88
82 <!-- js tree --> 89 <!-- js tree -->
83 -<script src="/real_control_v2/assets/plugins/jstree/jstree.min.js" ></script> 90 +<script src="/real_control_v2/assets/plugins/jstree/jstree.min.js" merge="plugins"></script>
84 <!-- layer 3.0.3 --> 91 <!-- layer 3.0.3 -->
85 -<script src="/real_control_v2/assets/plugins/layer3.0.3/layer.js"></script> 92 +<script src="/real_control_v2/assets/plugins/layer3.0.3/layer.js" merge="plugins"></script>
86 93
87 <!-- 模态框扩展 --> 94 <!-- 模态框扩展 -->
88 -<script src="/real_control_v2/js/modal_extend.js" ></script> 95 +<script src="/real_control_v2/js/modal_extend.js" merge="custom_js"></script>
89 96
90 -<script src="/real_control_v2/mapmonitor/alone_page/alone_data_basic.js" ></script>  
91 -<script src="/real_control_v2/mapmonitor/alone_page/alone_data_gps.js" ></script>  
92 -<script src="/real_control_v2/js/utils/ct_table.js" ></script> 97 +<script src="/real_control_v2/alone_page/map/alone_data_basic.js" merge="custom_js"></script>
  98 +<script src="/real_control_v2/alone_page/map/alone_data_gps.js" merge="custom_js"></script>
  99 +<script src="/real_control_v2/js/utils/ct_table.js" merge="custom_js"></script>
93 <!-- jquery.serializejson JSON序列化插件 --> 100 <!-- jquery.serializejson JSON序列化插件 -->
94 -<script src="/assets/plugins/jquery.serializejson.js" ></script> 101 +<script src="/assets/plugins/jquery.serializejson.js" merge="uikit_js"></script>
  102 +
  103 +</body>
95 <script> 104 <script>
96 - (function () {  
97 - gb_data_gps.fixedTimeRefresh(); 105 + gb_data_gps.fixedTimeRefresh();
  106 + var res_load_ep = EventProxy.create('data-basic', function () {
  107 +
98 //嵌入地图页面 108 //嵌入地图页面
99 $('.main-container').load('/real_control_v2/mapmonitor/real.html', function () { 109 $('.main-container').load('/real_control_v2/mapmonitor/real.html', function () {
100 $('.map-system-msg.flex-left').remove(); 110 $('.map-system-msg.flex-left').remove();
101 }); 111 });
102 - })();  
103 -</script>  
104 -</body> 112 + });
105 113
  114 + var isArray = function (obj) {
  115 + return Object.prototype.toString.call(obj) === '[object Array]';
  116 + };
  117 +</script>
106 </html> 118 </html>
src/main/resources/static/real_control_v2/css/home.css
@@ -309,4 +309,20 @@ span.signal-state-speed-limit{ @@ -309,4 +309,20 @@ span.signal-state-speed-limit{
309 } 309 }
310 .uk-tab>li:nth-child(n+2)>a{ 310 .uk-tab>li:nth-child(n+2)>a{
311 margin-left: 0 !important; 311 margin-left: 0 !important;
  312 +}
  313 +
  314 +.home_alone_page{
  315 + cursor: pointer;
  316 +}
  317 +
  318 +#send-phrase-modal .tools,
  319 +#send-phrase-multi-modal .tools{
  320 + display: inline-block;
  321 + margin-left: 5px;
  322 +}
  323 +
  324 +#send-phrase-modal .tools>span,
  325 +#send-phrase-multi-modal .tools>span{
  326 + cursor: pointer;
  327 + margin-left: 12px;
312 } 328 }
313 \ No newline at end of file 329 \ No newline at end of file
src/main/resources/static/real_control_v2/css/main.css
@@ -1582,8 +1582,16 @@ ul.left_tabs_lg li{ @@ -1582,8 +1582,16 @@ ul.left_tabs_lg li{
1582 color: #929292; 1582 color: #929292;
1583 } 1583 }
1584 1584
1585 -#all-devices-modal .search-form input{  
1586 - width: 160px; 1585 +#all-devices-modal .search-form input[type=text]{
  1586 + width: 100px;
  1587 +}
  1588 +
  1589 +#all-devices-modal .auto-refresh{
  1590 + vertical-align: middle;margin-left: 5px;color: grey;
  1591 +}
  1592 +
  1593 +#all-devices-modal .auto-refresh.active{
  1594 + color: #405dff;
1587 } 1595 }
1588 1596
1589 #all-devices-modal .uk-margin-small-top { 1597 #all-devices-modal .uk-margin-small-top {
@@ -1655,4 +1663,31 @@ ul.left_tabs_lg li{ @@ -1655,4 +1663,31 @@ ul.left_tabs_lg li{
1655 1663
1656 #schedule-tzrc-modal dl.active input[type=checkbox]:before{ 1664 #schedule-tzrc-modal dl.active input[type=checkbox]:before{
1657 color: #ffffff; 1665 color: #ffffff;
  1666 +}
  1667 +
  1668 +.sch-search-autocom input{
  1669 + padding: 0 !important;
  1670 + height: 100% !important;
  1671 +}
  1672 +
  1673 +label.blue_checkbox{
  1674 + margin-left: 12px;
  1675 +}
  1676 +
  1677 +label.blue_checkbox>input{
  1678 + width: 17px !important;
  1679 + height: 17px !important;
  1680 +}
  1681 +
  1682 +label.blue_checkbox>input:checked:before,
  1683 +label.blue_checkbox>input:indeterminate:before{
  1684 + line-height: 15px !important;
  1685 +}
  1686 +
  1687 +dd.disabled{
  1688 + color: #b5b3b3;
  1689 +}
  1690 +
  1691 +dl.active>dd.disabled{
  1692 + color: #ececec;
1658 } 1693 }
1659 \ No newline at end of file 1694 \ No newline at end of file
src/main/resources/static/real_control_v2/css/north.css
@@ -490,4 +490,14 @@ @@ -490,4 +490,14 @@
490 .ct-badge.ct-badge-LSBCTZ:hover{ 490 .ct-badge.ct-badge-LSBCTZ:hover{
491 background: red; 491 background: red;
492 color: #fff; 492 color: #fff;
  493 +}
  494 +
  495 +span.sm-red{
  496 + font-size: 12px;
  497 + color: #ff5454;
  498 +}
  499 +
  500 +span.sm-grey{
  501 + font-size: 12px;
  502 + color: grey;
493 } 503 }
494 \ No newline at end of file 504 \ No newline at end of file
src/main/resources/static/real_control_v2/fragments/home/context_menu.html
@@ -11,11 +11,15 @@ @@ -11,11 +11,15 @@
11 <input type="hidden" value="{{nbbm}}" name="nbbm" /> 11 <input type="hidden" value="{{nbbm}}" name="nbbm" />
12 <div class="uk-form-row"> 12 <div class="uk-form-row">
13 <select style="width: 170px;" class="common_phrase_sel"> 13 <select style="width: 170px;" class="common_phrase_sel">
14 - <option value="">------ 常用短语 -------</option>  
15 - <option value="天气异常,请小心驾驶">天气异常,请小心驾驶</option>  
16 - <option value="请适当减速慢行,保持最佳行车间距">请适当减速慢行,保持最佳行车间距</option>  
17 - <option value="请准点执行班次任务">请准点执行班次任务</option>  
18 </select> 14 </select>
  15 + <div class="tools" >
  16 + <span data-uk-tooltip title="添加到常用短语" class="add_frequent_phrases">
  17 + <i class="uk-icon-plus"></i>
  18 + </span>
  19 + <span data-uk-tooltip title="删除这条常用短语" class="minus_frequent_phrases">
  20 + <i class="uk-icon-minus"></i>
  21 + </span>
  22 + </div>
19 </div> 23 </div>
20 <div class="uk-form-row"> 24 <div class="uk-form-row">
21 <textarea cols="30" rows="5" name="text" data-fv-notempty data-fv-stringlength="true" data-fv-stringlength-max="50" placeholder="输入短语,不要超过50 个字符" style="margin: 0px; width: 100%; height: 110px;"></textarea> 25 <textarea cols="30" rows="5" name="text" data-fv-notempty data-fv-stringlength="true" data-fv-stringlength-max="50" placeholder="输入短语,不要超过50 个字符" style="margin: 0px; width: 100%; height: 110px;"></textarea>
@@ -43,9 +47,16 @@ @@ -43,9 +47,16 @@
43 <div class="uk-width-4-6" style="border-left: 1px solid #dddddd;"> 47 <div class="uk-width-4-6" style="border-left: 1px solid #dddddd;">
44 <form class="uk-form fixed-tool"> 48 <form class="uk-form fixed-tool">
45 <div class="uk-form-row"> 49 <div class="uk-form-row">
46 - <select>  
47 - <option value="">------ 常用短语 -------</option>  
48 - </select> 50 + <select style="width: 170px;" class="common_phrase_sel">
  51 + </select>
  52 + <div class="tools" >
  53 + <span data-uk-tooltip title="添加到常用短语" class="add_frequent_phrases">
  54 + <i class="uk-icon-plus"></i>
  55 + </span>
  56 + <span data-uk-tooltip title="删除这条常用短语" class="minus_frequent_phrases">
  57 + <i class="uk-icon-minus"></i>
  58 + </span>
  59 + </div>
49 </div> 60 </div>
50 <br /> 61 <br />
51 <div class="uk-form-row"> 62 <div class="uk-form-row">
src/main/resources/static/real_control_v2/fragments/home/layout.html
@@ -13,8 +13,12 @@ @@ -13,8 +13,12 @@
13 <li {{if i==0}}class="uk-active"{{/if}}><a> {{t}}</a></li> 13 <li {{if i==0}}class="uk-active"{{/if}}><a> {{t}}</a></li>
14 {{/each}} 14 {{/each}}
15 </ul> 15 </ul>
16 - <div class="home-rb-explain-icon uk-icon-hover">  
17 - <i class="uk-icon-question-circle"></i> 16 + <div class="home-rb-explain-icon ">
  17 + <a href="/real_control_v2/alone_page/home/home_wrap.html" target="_blank">
  18 + <i class="uk-icon-send-o home_alone_page uk-icon-hover" ></i>
  19 + </a>
  20 + &nbsp;&nbsp;
  21 + <i class="uk-icon-question-circle uk-icon-hover"></i>
18 </div> 22 </div>
19 </div> 23 </div>
20 </script> 24 </script>
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/bc_type_major.html
@@ -41,7 +41,7 @@ @@ -41,7 +41,7 @@
41 <div class="uk-form-row"> 41 <div class="uk-form-row">
42 <div class="uk-form-controls" style="margin-left: 0;"> 42 <div class="uk-form-controls" style="margin-left: 0;">
43 <label style="color: #827f7f;font-size: 13px;"> 43 <label style="color: #827f7f;font-size: 13px;">
44 - <input class="i-cbox" type="checkbox" name="sendDirective" checked> 44 + <input class="i-cbox" type="checkbox" name="sendDirective" >
45 下发调度指令 45 下发调度指令
46 </label> 46 </label>
47 </div> 47 </div>
@@ -50,7 +50,7 @@ @@ -50,7 +50,7 @@
50 </div> 50 </div>
51 <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;"> 51 <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;">
52 <button type="button" class="uk-button uk-modal-close">取消</button> 52 <button type="button" class="uk-button uk-modal-close">取消</button>
53 - <button type="submit" class="uk-button uk-button-primary"><i class="uk-icon-send"></i> &nbsp;确认调整并下发指令 53 + <button type="submit" class="uk-button uk-button-primary"><i class="uk-icon-send"></i> &nbsp;确认调整
54 </button> 54 </button>
55 </div> 55 </div>
56 </form> 56 </form>
@@ -59,7 +59,7 @@ @@ -59,7 +59,7 @@
59 <script> 59 <script>
60 (function () { 60 (function () {
61 var modal = '#bctype-major-modal' 61 var modal = '#bctype-major-modal'
62 - , sch, stationRoutes, parentModal; 62 + , sch, stationRoutes, parentModal, _dfsj;
63 63
64 $('[name=sendDirective]', modal).on('click', function () { 64 $('[name=sendDirective]', modal).on('click', function () {
65 if ($(this)[0].checked) 65 if ($(this)[0].checked)
@@ -134,6 +134,8 @@ @@ -134,6 +134,8 @@
134 e.stopPropagation(); 134 e.stopPropagation();
135 sch = data.sch; 135 sch = data.sch;
136 parentModal = data.parentModal; 136 parentModal = data.parentModal;
  137 + if(data._dfsj)
  138 + sch.dfsj = data._dfsj;
137 139
138 //submit 140 //submit
139 var f = $('form', modal).formValidation(gb_form_validation_opts); 141 var f = $('form', modal).formValidation(gb_form_validation_opts);
@@ -181,7 +183,9 @@ @@ -181,7 +183,9 @@
181 UIkit.modal(modal).hide(); 183 UIkit.modal(modal).hide();
182 gb_schedule_table.updateSchedule(rs.t); 184 gb_schedule_table.updateSchedule(rs.t);
183 //触发父容器刷新事件 185 //触发父容器刷新事件
184 - $(parentModal).trigger('init', {sch: rs.t}); 186 + //$(parentModal).trigger('init', {sch: rs.t});
  187 + //关闭
  188 + UIkit.modal(parentModal).hide();
185 notify_succ('调整放站成功'); 189 notify_succ('调整放站成功');
186 }); 190 });
187 } 191 }
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/bc_type_venting.html
@@ -41,7 +41,7 @@ @@ -41,7 +41,7 @@
41 <div class="uk-form-row"> 41 <div class="uk-form-row">
42 <div class="uk-form-controls" style="margin-left: 0;"> 42 <div class="uk-form-controls" style="margin-left: 0;">
43 <label style="color: #827f7f;font-size: 13px;"> 43 <label style="color: #827f7f;font-size: 13px;">
44 - <input class="i-cbox" type="checkbox" name="sendDirective" checked> 44 + <input class="i-cbox" type="checkbox" name="sendDirective" >
45 下发调度指令 45 下发调度指令
46 </label> 46 </label>
47 </div> 47 </div>
@@ -50,7 +50,7 @@ @@ -50,7 +50,7 @@
50 </div> 50 </div>
51 <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;"> 51 <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;">
52 <button type="button" class="uk-button uk-modal-close">取消</button> 52 <button type="button" class="uk-button uk-modal-close">取消</button>
53 - <button type="submit" class="uk-button uk-button-primary"><i class="uk-icon-send"></i> &nbsp;确认调整并下发指令 53 + <button type="submit" class="uk-button uk-button-primary"><i class="uk-icon-send"></i> &nbsp;确认调整
54 </button> 54 </button>
55 </div> 55 </div>
56 </form> 56 </form>
@@ -131,6 +131,8 @@ @@ -131,6 +131,8 @@
131 e.stopPropagation(); 131 e.stopPropagation();
132 sch = data.sch; 132 sch = data.sch;
133 parentModal = data.parentModal; 133 parentModal = data.parentModal;
  134 + if(data._dfsj)
  135 + sch.dfsj = data._dfsj;
134 136
135 //submit 137 //submit
136 var f = $('form', modal).formValidation(gb_form_validation_opts); 138 var f = $('form', modal).formValidation(gb_form_validation_opts);
@@ -178,7 +180,9 @@ @@ -178,7 +180,9 @@
178 UIkit.modal(modal).hide(); 180 UIkit.modal(modal).hide();
179 gb_schedule_table.updateSchedule(rs.t); 181 gb_schedule_table.updateSchedule(rs.t);
180 //触发父容器刷新事件 182 //触发父容器刷新事件
181 - $(parentModal).trigger('init', {sch: rs.t}); 183 + //$(parentModal).trigger('init', {sch: rs.t});
  184 + //关闭
  185 + UIkit.modal(parentModal).hide();
182 notify_succ('调整直发成功'); 186 notify_succ('调整直发成功');
183 }); 187 });
184 } 188 }
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/dftz.html
@@ -185,7 +185,7 @@ @@ -185,7 +185,7 @@
185 $(document.body).append(htmlStr); 185 $(document.body).append(htmlStr);
186 186
187 UIkit.modal(detailModal, {bgclose: true,modal:false}).show(); 187 UIkit.modal(detailModal, {bgclose: true,modal:false}).show();
188 - $(detailModal).trigger('init', {sch: sch, parentModal: modal}); 188 + $(detailModal).trigger('init', {sch: sch, parentModal: modal, _dfsj: $('[name=dfsj]', modal).val()});
189 }) 189 })
190 }); 190 });
191 }); 191 });
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/fcxxwt.html
@@ -191,6 +191,12 @@ @@ -191,6 +191,12 @@
191 e.preventDefault(); 191 e.preventDefault();
192 var data = $(this).serializeJSON(); 192 var data = $(this).serializeJSON();
193 193
  194 + //校验实发实达时间
  195 + if(!validation_s_e_Time(data)){
  196 + notify_err("实发时间不能晚于实达时间!");
  197 + return;
  198 + }
  199 +
194 if(!data.adjustExps && (data.status==-1 200 if(!data.adjustExps && (data.status==-1
195 || (data.jhlc==0 && sch.bcType != 'in' && sch.bcType != 'out'))){ 201 || (data.jhlc==0 && sch.bcType != 'in' && sch.bcType != 'out'))){
196 notify_err("当前操作需要选择调整原因!"); 202 notify_err("当前操作需要选择调整原因!");
@@ -280,6 +286,27 @@ @@ -280,6 +286,27 @@
280 }) 286 })
281 }); 287 });
282 }); 288 });
  289 +
  290 + function validation_s_e_Time(data) {
  291 + var config = gb_data_line_config.get(sch.xlBm);
  292 + var st = get_time(sch.scheduleDateStr, data.fcsjActual, config);
  293 + var et = get_time(sch.scheduleDateStr, data.zdsjActual, config);
  294 + if(st && et && st > et)
  295 + return false;
  296 + return true;
  297 + }
  298 +
  299 + var DAY_TIME = 1000 * 60 * 60 * 24;
  300 + function get_time(rq, timeStr, config) {
  301 + var t = null;
  302 + if(timeStr){
  303 + t = moment(rq + timeStr, 'YYYY-MM-DDHH:mm');
  304 + if(timeStr.localeCompare(config.startOpt) < 0)
  305 + return t + DAY_TIME;
  306 + }
  307 +
  308 + return t;
  309 + }
283 })(); 310 })();
284 </script> 311 </script>
285 </div> 312 </div>
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sub_task_v2/add_in_out.html
@@ -169,7 +169,7 @@ @@ -169,7 +169,7 @@
169 half_form.addClass('repeat_main destroy_form'); 169 half_form.addClass('repeat_main destroy_form');
170 //字典转换 170 //字典转换
171 dictionaryUtils.transformDom($('.nt-dictionary', half_form)); 171 dictionaryUtils.transformDom($('.nt-dictionary', half_form));
172 - sf.after(half_form); 172 + inf.after(half_form);
173 173
174 174
175 //班次类型切换 175 //班次类型切换
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sub_task_v2/add_range_turn.html
@@ -218,8 +218,8 @@ @@ -218,8 +218,8 @@
218 } 218 }
219 if(this.checked){ 219 if(this.checked){
220 //烂班2 烂全程 220 //烂班2 烂全程
221 - $f('startStation', df2).val(sch.zdzCode);  
222 - $f('endStation', df2).val(sch.qdzCode); 221 + $f('startStation', df2).val(nextSch.qdzCode);
  222 + $f('endStation', df2).val(nextSch.zdzCode);
223 $f('mileage', df2).val(nextSch.jhlcOrig); 223 $f('mileage', df2).val(nextSch.jhlcOrig);
224 $f('startDate', df2).val(nextSch.dfsj); 224 $f('startDate', df2).val(nextSch.dfsj);
225 $f('endDate', df2).val(nextSch.zdsj); 225 $f('endDate', df2).val(nextSch.zdsj);
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/tzrc.html
@@ -47,10 +47,13 @@ @@ -47,10 +47,13 @@
47 <div class="uk-width-1-2"> 47 <div class="uk-width-1-2">
48 <div class="uk-form-row"> 48 <div class="uk-form-row">
49 <label class="uk-form-label">车辆</label> 49 <label class="uk-form-label">车辆</label>
50 - <div class="uk-form-controls">  
51 - <div class="uk-autocomplete uk-form car-autocom"> 50 + <div class="uk-form-controls" >
  51 + <div class="uk-autocomplete uk-form car-autocom" style="width: 77%;">
52 <input type="text" value="" name="clZbh" required> 52 <input type="text" value="" name="clZbh" required>
53 </div> 53 </div>
  54 + <label class="blue_checkbox cl_enable_key_label">
  55 + <input type="checkbox" checked>
  56 + </label>
54 </div> 57 </div>
55 </div> 58 </div>
56 </div> 59 </div>
@@ -58,9 +61,12 @@ @@ -58,9 +61,12 @@
58 <div class="uk-form-row"> 61 <div class="uk-form-row">
59 <label class="uk-form-label">驾驶员 </label> 62 <label class="uk-form-label">驾驶员 </label>
60 <div class="uk-form-controls"> 63 <div class="uk-form-controls">
61 - <div class="uk-autocomplete uk-form jsy-autocom"> 64 + <div class="uk-autocomplete uk-form jsy-autocom" style="width: 77%;">
62 <input type="text" value="" name="jsy" required> 65 <input type="text" value="" name="jsy" required>
63 </div> 66 </div>
  67 + <label class="blue_checkbox jsy_enable_key_label">
  68 + <input type="checkbox" checked>
  69 + </label>
64 </div> 70 </div>
65 </div> 71 </div>
66 </div> 72 </div>
@@ -77,7 +83,7 @@ @@ -77,7 +83,7 @@
77 </div> 83 </div>
78 </div> 84 </div>
79 </div> 85 </div>
80 - <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;"> 86 + <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;position: relative;">
81 <button type="button" class="uk-button uk-modal-close">取消</button> 87 <button type="button" class="uk-button uk-modal-close">取消</button>
82 <button type="submit" class="uk-button uk-button-primary" ><i class="uk-icon-check"></i> &nbsp;保存 88 <button type="submit" class="uk-button uk-button-primary" ><i class="uk-icon-check"></i> &nbsp;保存
83 </button> 89 </button>
@@ -107,9 +113,9 @@ @@ -107,9 +113,9 @@
107 <span class="uk-badge uk-badge-notification">{{sch.cTasks.length}}</span> 113 <span class="uk-badge uk-badge-notification">{{sch.cTasks.length}}</span>
108 {{/if}} 114 {{/if}}
109 </dd> 115 </dd>
110 - <dd>{{sch.clZbh}}</dd>  
111 - <dd>{{sch.jGh}}/{{sch.jName}}</dd>  
112 - <dd>{{sch.sGh}}/{{sch.sName}}</dd> 116 + <dd data-old="{{sch.clZbh}}">{{sch.clZbh}}</dd>
  117 + <dd data-old="{{sch.jGh}}/{{sch.jName}}">{{sch.jGh}}/{{sch.jName}}</dd>
  118 + <dd data-old="{{sch.sGh}}/{{sch.sName}}">{{sch.sGh}}/{{sch.sName}}</dd>
113 <dd> 119 <dd>
114 {{if sch.status==2}} 120 {{if sch.status==2}}
115 <span class="ct_zt_yzx">已执行</span> 121 <span class="ct_zt_yzx">已执行</span>
@@ -160,20 +166,26 @@ @@ -160,20 +166,26 @@
160 $('.tzrc-table-wrap', modal).perfectScrollbar('update'); 166 $('.tzrc-table-wrap', modal).perfectScrollbar('update');
161 }); 167 });
162 168
  169 +
  170 + writeSch2Form(sch);
163 $(modal).on('click', '.sch-tzrc-table .ct_table_body dl', function () { 171 $(modal).on('click', '.sch-tzrc-table .ct_table_body dl', function () {
164 var cbox = $('input[type=checkbox]',this)[0]; 172 var cbox = $('input[type=checkbox]',this)[0];
165 //var active = $(); 173 //var active = $();
166 if(!$(this).hasClass('active')){ 174 if(!$(this).hasClass('active')){
167 $(this).addClass('active'); 175 $(this).addClass('active');
168 cbox.checked = true; 176 cbox.checked = true;
169 - var lineCode = $('[name=lineSelect]', modal).val();  
170 - var sch = gb_schedule_table.findScheduleByLine(lineCode)[$(this).data('id')];  
171 -  
172 - writeSch2Form(sch); 177 + renderCell();
173 } 178 }
174 else{ 179 else{
175 $(this).removeClass('active'); 180 $(this).removeClass('active');
176 cbox.checked = false; 181 cbox.checked = false;
  182 + //$(this).find('dd[data-old]').text()
  183 + var $jsyCell = $($($(this).find('dd')[2]));
  184 + var $spyCell = $($($(this).find('dd')[3]));
  185 + var $clCell = $($($(this).find('dd')[1]));
  186 + $jsyCell.text($jsyCell.data('old'));
  187 + $spyCell.text($spyCell.data('old'));
  188 + $clCell.text($clCell.data('old'));
177 } 189 }
178 }); 190 });
179 191
@@ -207,6 +219,7 @@ @@ -207,6 +219,7 @@
207 var f = $('form.tzrc_form', modal); 219 var f = $('form.tzrc_form', modal);
208 f.on('submit', function (e) { 220 f.on('submit', function (e) {
209 e.stopPropagation(); 221 e.stopPropagation();
  222 + $('[type=submit]', f).attr('disabled', 'disabled');
210 223
211 var checkeds = $('.sch-tzrc-table .ct_table_body input[type=checkbox]:checked', modal); 224 var checkeds = $('.sch-tzrc-table .ct_table_body input[type=checkbox]:checked', modal);
212 if (checkeds.length == 0) 225 if (checkeds.length == 0)
@@ -236,8 +249,55 @@ @@ -236,8 +249,55 @@
236 }); 249 });
237 return false; 250 return false;
238 }); 251 });
  252 +
  253 + /**
  254 + * 驾驶员/售票员文本框改变事件
  255 + */
  256 + var renderRunFlag;
  257 + $('input[name=jsy],input[name=spy],input[name=clZbh]', modal).on('input change', function () {
  258 + if(renderRunFlag)
  259 + return;
  260 + renderRunFlag = true;
  261 + setTimeout(function () {
  262 + renderCell();
  263 + renderRunFlag = false;
  264 + }, 200);
  265 + });
  266 +
  267 + $('.jsy_enable_key_label', modal).on('click', function () {
  268 + var checked = $('input[type=checkbox]', this)[0].checked;
  269 + if(checked)
  270 + enableJsy();
  271 + else
  272 + disabledJsy();
  273 + });
  274 +
  275 + $('.cl_enable_key_label', modal).on('click', function () {
  276 + var checked = $('input[type=checkbox]', this)[0].checked;
  277 + if(checked)
  278 + enableCl();
  279 + else
  280 + disabledCl();
  281 + });
239 }); 282 });
240 283
  284 + function renderCell() {
  285 + var jsy = $('input[name=jsy]:enabled', modal).val();
  286 + var spy = $('input[name=spy]', modal).val();
  287 + var nbbm = $('input[name=clZbh]:enabled', modal).val();
  288 + $('.sch-tzrc-table .ct_table_body>dl.active').each(function () {
  289 + var jsyCell = $(this).find('dd')[2];
  290 + var spyCell = $(this).find('dd')[3];
  291 + var clCell = $(this).find('dd')[1];
  292 +
  293 + if(jsy)
  294 + $(jsyCell).text(jsy);
  295 + if(nbbm)
  296 + $(clCell).text(nbbm);
  297 + $(spyCell).text(spy);
  298 + });
  299 + }
  300 +
241 function writeSch2Form(sch) { 301 function writeSch2Form(sch) {
242 var f = $('.tzrc_form', modal); 302 var f = $('.tzrc_form', modal);
243 $('input[name=clZbh]', f).val(sch.clZbh).trigger('input'); 303 $('input[name=clZbh]', f).val(sch.clZbh).trigger('input');
@@ -268,6 +328,43 @@ @@ -268,6 +328,43 @@
268 $('.sch-tzrc-table .ct_table_body>dl', modal).each(function () { 328 $('.sch-tzrc-table .ct_table_body>dl', modal).each(function () {
269 $(this).removeClass('active'); 329 $(this).removeClass('active');
270 $('input[type=checkbox]',this)[0].checked = false; 330 $('input[type=checkbox]',this)[0].checked = false;
  331 +
  332 + $.each($('dd', this), function () {
  333 + if($(this).data('old'))
  334 + $(this).text($(this).data('old'));
  335 + });
  336 + });
  337 + }
  338 +
  339 + function disabledJsy() {
  340 + $('[name=jsy]',modal).attr('disabled', 'disabled');
  341 + $('.sch-tzrc-table .ct_table_body>dl').each(function () {
  342 + var jsyCell = $(this).find('dd')[2];
  343 + $(jsyCell).addClass('disabled').text($(jsyCell).data('old'));
  344 + });
  345 + }
  346 +
  347 + function enableJsy() {
  348 + $('[name=jsy]',modal).removeAttr('disabled');
  349 + $('.sch-tzrc-table .ct_table_body>dl').each(function () {
  350 + var jsyCell = $(this).find('dd')[2];
  351 + $(jsyCell).removeClass('disabled').text($(jsyCell).data('old'));
  352 + });
  353 + }
  354 +
  355 + function disabledCl() {
  356 + $('[name=clZbh]',modal).attr('disabled', 'disabled');
  357 + $('.sch-tzrc-table .ct_table_body>dl').each(function () {
  358 + var clCell = $(this).find('dd')[1];
  359 + $(clCell).addClass('disabled').text($(clCell).data('old'));
  360 + });
  361 + }
  362 +
  363 + function enableCl() {
  364 + $('[name=clZbh]',modal).removeAttr('disabled');
  365 + $('.sch-tzrc-table .ct_table_body>dl').each(function () {
  366 + var clCell = $(this).find('dd')[1];
  367 + $(clCell).removeClass('disabled').text($(clCell).data('old'));
271 }); 368 });
272 } 369 }
273 })(); 370 })();
src/main/resources/static/real_control_v2/fragments/north/nav/all_devices.html
@@ -7,19 +7,13 @@ @@ -7,19 +7,13 @@
7 <div class="uk-panel uk-panel-box uk-panel-box-primary"> 7 <div class="uk-panel uk-panel-box uk-panel-box-primary">
8 <form class="uk-form search-form"> 8 <form class="uk-form search-form">
9 <fieldset data-uk-margin> 9 <fieldset data-uk-margin>
10 - <!--<legend>  
11 - 数据检索  
12 - &lt;!&ndash; <div class="legend-tools">  
13 - <a class="uk-icon-small uk-icon-hover uk-icon-file-excel-o" data-uk-tooltip title="导出excel"></a>  
14 - </div> &ndash;&gt;  
15 - </legend>-->  
16 <span class="horizontal-field">线路</span> 10 <span class="horizontal-field">线路</span>
17 <div class="uk-autocomplete uk-form autocomplete-line" > 11 <div class="uk-autocomplete uk-form autocomplete-line" >
18 <input type="text" name="lineId" placeholder="线路"> 12 <input type="text" name="lineId" placeholder="线路">
19 </div> 13 </div>
20 <span class="horizontal-field">车辆</span> 14 <span class="horizontal-field">车辆</span>
21 <div class="uk-autocomplete uk-form autocomplete-cars" > 15 <div class="uk-autocomplete uk-form autocomplete-cars" >
22 - <input type="text" name="nbbm" placeholder="车辆自编号"> 16 + <input type="text" name="nbbm" placeholder="自编号">
23 </div> 17 </div>
24 <span class="horizontal-field">设备号</span> 18 <span class="horizontal-field">设备号</span>
25 <div class="uk-autocomplete uk-form autocomplete-device" > 19 <div class="uk-autocomplete uk-form autocomplete-device" >
@@ -35,9 +29,23 @@ @@ -35,9 +29,23 @@
35 </div> 29 </div>
36 <span class="horizontal-field">程序版本</span> 30 <span class="horizontal-field">程序版本</span>
37 <div class="uk-autocomplete uk-form " > 31 <div class="uk-autocomplete uk-form " >
38 - <input type="text" name="version" placeholder="程序版本" style="width: 110px;"> 32 + <input type="text" name="version" placeholder="版本号" style="width: 60px;">
39 </div> 33 </div>
40 - <button class="uk-button">检索</button> 34 + <span class="horizontal-field">状态</span>
  35 + <div class="uk-autocomplete uk-form " >
  36 + <select name="abnormalStatus">
  37 + <option value="">全部</option>
  38 + <option value="outBounds">越界</option>
  39 + <option value="overspeed">超速</option>
  40 + <option value="offline">离线</option>
  41 + <option value="gps-offline">gps 0,0</option>
  42 + </select>
  43 + </div>
  44 + <button class="uk-button search-btn" title="只支持后模糊">检索</button>
  45 + <label class="auto-refresh" >
  46 + <input type="checkbox" value="1" name="schCBox" class="i-cbox">
  47 + 自动刷新
  48 + </label>
41 </fieldset> 49 </fieldset>
42 </form> 50 </form>
43 </div> 51 </div>
@@ -49,10 +57,10 @@ @@ -49,10 +57,10 @@
49 <th style="width: 14%;">站点</th> 57 <th style="width: 14%;">站点</th>
50 <th style="width: 11%;">车辆</th> 58 <th style="width: 11%;">车辆</th>
51 <th style="width: 11%;">设备号</th> 59 <th style="width: 11%;">设备号</th>
52 - <th style="width: 9%;">速度</th>  
53 <th style="width: 9%;">走向/营运</th> 60 <th style="width: 9%;">走向/营运</th>
54 - <th style="width: 10%;">程序版本</th> 61 + <th style="width: 9%;">程序版本</th>
55 <th>最后GPS时间</th> 62 <th>最后GPS时间</th>
  63 + <th style="width: 9%;">状态</th>
56 <th style="width: 8%;">来源</th> 64 <th style="width: 8%;">来源</th>
57 </tr> 65 </tr>
58 </thead> 66 </thead>
@@ -72,17 +80,31 @@ @@ -72,17 +80,31 @@
72 <td>{{gps.stationName}}</td> 80 <td>{{gps.stationName}}</td>
73 <td>{{gps.nbbm}}</td> 81 <td>{{gps.nbbm}}</td>
74 <td>{{gps.deviceId}}</td> 82 <td>{{gps.deviceId}}</td>
75 - <td>{{gps.speed}}</td>  
76 <td>{{gps.upDown}}/{{gps.state}}</td> 83 <td>{{gps.upDown}}/{{gps.state}}</td>
77 <td>{{gps.version}}</td> 84 <td>{{gps.version}}</td>
78 <td>{{gps.timeStr}}</td> 85 <td>{{gps.timeStr}}</td>
79 <td> 86 <td>
  87 + {{if gps.valid==1}}
  88 + <span class="sm-red">invalid(-1</span>
  89 + {{else if gps.abnormalStatus=='outBounds'}}
  90 + <span class="sm-red" title="越界距离(米) {{gps.outOfBoundDistance}}">越界</span>
  91 + {{else if gps.abnormalStatus=='overspeed'}}
  92 + <span class="sm-red">超速({{gps.speed}})</span>
  93 + {{else if gps.abnormalStatus=='gps-offline'}}
  94 + <span class="sm-red">GPS (0,0)</span>
  95 + {{else if gps.abnormalStatus=='offline'}}
  96 + <span>离线</span>
  97 + {{else}}
  98 + ...
  99 + {{/if}}
  100 + </td>
  101 + <td>
80 {{if gps.source==1}} 102 {{if gps.source==1}}
81 <span style="color: #1e1ef5;" title="已切换至新网关">网关</span> 103 <span style="color: #1e1ef5;" title="已切换至新网关">网关</span>
82 {{else if gps.source==0}} 104 {{else if gps.source==0}}
83 <span style="color: #8e8e8e;" title="转接的数据,无法下发指令">转发</span> 105 <span style="color: #8e8e8e;" title="转接的数据,无法下发指令">转发</span>
84 {{else}} 106 {{else}}
85 - <span>未知</span> 107 + <span class="sm-grey">未知</span>
86 {{/if}} 108 {{/if}}
87 </td> 109 </td>
88 </tr> 110 </tr>
@@ -148,7 +170,7 @@ @@ -148,7 +170,7 @@
148 query(); 170 query();
149 }); 171 });
150 172
151 - var query = function() { 173 + var query = function(cb) {
152 var data = form.serializeJSON(); 174 var data = form.serializeJSON();
153 data.page = page; 175 data.page = page;
154 data.size = pageSize; 176 data.size = pageSize;
@@ -173,9 +195,75 @@ @@ -173,9 +195,75 @@
173 //pagination 195 //pagination
174 if (resetPagination) 196 if (resetPagination)
175 pagination(rs.totalPages + 1, rs.page); 197 pagination(rs.totalPages + 1, rs.page);
  198 +
  199 + cb && cb();
176 }) 200 })
177 }; 201 };
178 202
  203 + /**
  204 + * 自动刷新
  205 + */
  206 + $('.auto-refresh', modal).on('click', function () {
  207 + var checked = $('input[type=checkbox]',this)[0].checked,
  208 + $sub_btn = $('.search-btn', form);
  209 + if(checked){
  210 + $(this).addClass('active');
  211 + $sub_btn.attr('disabled', 'disabled');
  212 + auto_refresh.start();
  213 + }
  214 + else{
  215 + $(this).removeClass('active');
  216 + $sub_btn.removeAttr('disabled');
  217 + auto_refresh.stop();
  218 + }
  219 + });
  220 +
  221 + var auto_refresh = (function () {
  222 + var timer=null;
  223 + var span = $('.auto-refresh', modal).append('<span class="no"></span>').find('span.no');
  224 + var space = 10;
  225 + var start = function () {
  226 +
  227 + (function () {
  228 + var f = arguments.callee;
  229 + run();
  230 + if(space == 0){
  231 + space = 10;
  232 +
  233 + resetPagination = true;
  234 + page=0;
  235 + query(function () {
  236 + timer = setTimeout(f, 1000);
  237 + });
  238 + }
  239 + else{
  240 + timer = setTimeout(f, 1000);
  241 + }
  242 + })();
  243 + };
  244 +
  245 + var stop = function () {
  246 + clearTimeout(timer);
  247 + timer = null;
  248 + space = 10;
  249 + span.text('');
  250 + };
  251 +
  252 + var run = function () {
  253 + space --;
  254 + span.text(space);
  255 + };
  256 +
  257 +
  258 + return {
  259 + start: start,
  260 + stop: stop
  261 + }
  262 + })();
  263 +
  264 + //注册 destroy
  265 + $(modal).on('ct-destroy', auto_refresh.stop);
  266 +
179 var state_up_0 = function(device) { 267 var state_up_0 = function(device) {
180 var nbbm = gb_data_basic.device2nbbmMap()[device]; 268 var nbbm = gb_data_basic.device2nbbmMap()[device];
181 stateChange(nbbm, 0, 0); 269 stateChange(nbbm, 0, 0);
src/main/resources/static/real_control_v2/js/data/data_line_config.js 0 → 100644
  1 +/**
  2 + * 线路配置信息
  3 + * @type {{}}
  4 + */
  5 +var gb_data_line_config = (function () {
  6 +
  7 + var lineConfigMap;
  8 +
  9 + var storage = window.localStorage;
  10 + var activeLines = JSON.parse(storage.getItem('lineControlItems'));
  11 + var line_idx = (function () {
  12 + var str = '';
  13 + for (var i = 0, item; item = activeLines[i++];) {
  14 + str += (',' + item.lineCode);
  15 + }
  16 + return str.substr(1);
  17 + })();
  18 +
  19 + gb_common.$get('/lineConfig/findByIdx', {idx: line_idx}, function (rs) {
  20 + lineConfigMap = {};
  21 + $.each(rs.list, function () {
  22 + lineConfigMap[this.line.lineCode] = this;
  23 + });
  24 +
  25 + console.log('lineConfigMap', lineConfigMap);
  26 + });
  27 +
  28 + return {
  29 + get: function (lineCode) {
  30 + return lineConfigMap[lineCode];
  31 + }
  32 + };
  33 +})();
0 \ No newline at end of file 34 \ No newline at end of file
src/main/resources/static/real_control_v2/js/home/context_menu.js
@@ -53,6 +53,62 @@ var gb_home_context_menu = (function() { @@ -53,6 +53,62 @@ var gb_home_context_menu = (function() {
53 }); 53 });
54 }; 54 };
55 55
  56 + /**
  57 + * 常用短语
  58 + * @type {{add, minus}}
  59 + */
  60 + var frequent_phrases = function () {
  61 +
  62 + var init = function (wrap) {
  63 + add(wrap);
  64 + minus(wrap);
  65 + //查询常用短语
  66 + $.get('/frequent_phrases/all', function (list) {
  67 + var t = $('textarea[name=text]', wrap).val();
  68 + var opts = '<option value="">------ 常用短语 -------</option>';
  69 + for(var i=0,obj;obj=list[i++];){
  70 + opts += '<option value="'+obj.text+'" data-id="'+obj.id+'" '+(obj.text==t?"selected":"")+'>'+obj.text+'</option>';
  71 + }
  72 + $('.common_phrase_sel', wrap).html(opts);
  73 + });
  74 + };
  75 +
  76 + var add = function (wrap) {
  77 + $('.add_frequent_phrases', wrap).unbind('click').on('click', function () {
  78 + var text = $('textarea[name=text]', wrap).val();
  79 + if(!$.trim(text))
  80 + return notify_err('请在下列文本框内输入文字');
  81 +
  82 + gb_common.$post('/frequent_phrases', {text: text}, function () {
  83 + notify_succ('添加成功!');
  84 + init(wrap);
  85 + });
  86 + });
  87 + };
  88 +
  89 + var minus = function (wrap) {
  90 + $('.minus_frequent_phrases', wrap).unbind('click').on('click', function () {
  91 + var text = $('.common_phrase_sel', wrap).val();
  92 + if(!$.trim(text))
  93 + return notify_err('请选中常用短语后再删除');
  94 +
  95 + var id = $('.common_phrase_sel', wrap).find("option:selected").data('id');
  96 + if(!id)
  97 + return notify_err('无法获取到索引');
  98 +
  99 + gb_common.$del('/frequent_phrases/' + id, function () {
  100 + notify_succ('删除成功!');
  101 + $('textarea[name=text]', wrap).val('');
  102 + init(wrap);
  103 + });
  104 + });
  105 + };
  106 +
  107 + return {
  108 + init: init
  109 + }
  110 + }();
  111 +
56 // send phrase 112 // send phrase
57 var sendPhrase = function() { 113 var sendPhrase = function() {
58 var dom = temps['home-send-phrase-temp']({ 114 var dom = temps['home-send-phrase-temp']({
@@ -62,10 +118,11 @@ var gb_home_context_menu = (function() { @@ -62,10 +118,11 @@ var gb_home_context_menu = (function() {
62 // show modal 118 // show modal
63 var elem = show_modal(modal, dom); 119 var elem = show_modal(modal, dom);
64 120
  121 + frequent_phrases.init(modal);
65 //form submit 122 //form submit
66 var f = $('form', modal).formValidation(gb_form_validation_opts); 123 var f = $('form', modal).formValidation(gb_form_validation_opts);
67 $('.common_phrase_sel', f).on('change', function () { 124 $('.common_phrase_sel', f).on('change', function () {
68 - $('[name=text]', f).text($(this).val()); 125 + $('[name=text]', f).val($(this).val());
69 }); 126 });
70 f.on('success.form.fv', function(e) { 127 f.on('success.form.fv', function(e) {
71 e.preventDefault(); 128 e.preventDefault();
@@ -92,8 +149,13 @@ var gb_home_context_menu = (function() { @@ -92,8 +149,13 @@ var gb_home_context_menu = (function() {
92 }, 149 },
93 'plugins': ['checkbox'] 150 'plugins': ['checkbox']
94 }); 151 });
  152 +
  153 + frequent_phrases.init(modal);
95 //form submit 154 //form submit
96 var f = $('form', modal).formValidation(gb_form_validation_opts); 155 var f = $('form', modal).formValidation(gb_form_validation_opts);
  156 + $('.common_phrase_sel', f).on('change', function () {
  157 + $('[name=text]', f).val($(this).val());
  158 + });
97 f.on('success.form.fv', function(e) { 159 f.on('success.form.fv', function(e) {
98 e.preventDefault(); 160 e.preventDefault();
99 //tree checked node 161 //tree checked node
src/main/resources/static/real_control_v2/js/home/layout.js
@@ -41,7 +41,7 @@ var gb_home_layout = (function () { @@ -41,7 +41,7 @@ var gb_home_layout = (function () {
41 41
42 //右下角说明icon 42 //右下角说明icon
43 function initRbDxplain() { 43 function initRbDxplain() {
44 - $(document).on('mouseenter', '.home-rb-explain-icon', function() { 44 + $(document).on('mouseenter', '.home-rb-explain-icon>.uk-icon-question-circle', function() {
45 $(this).qtip({ 45 $(this).qtip({
46 show: { 46 show: {
47 ready: true, 47 ready: true,
src/main/resources/static/real_control_v2/js/line_schedule/context_menu.js
@@ -40,6 +40,10 @@ var gb_schedule_context_menu = (function () { @@ -40,6 +40,10 @@ var gb_schedule_context_menu = (function () {
40 return add_sch_doms; 40 return add_sch_doms;
41 }, 41 },
42 dftz: function (sch) { 42 dftz: function (sch) {
  43 + if(sch.status > 0){
  44 + notify_err((sch.status==1?'已发出':'已执行') + '的班次不能修改待发');
  45 + return;
  46 + }
43 open_modal(folder + '/dftz.html', { 47 open_modal(folder + '/dftz.html', {
44 sch: sch 48 sch: sch
45 }, modal_opts); 49 }, modal_opts);
@@ -149,10 +153,10 @@ var gb_schedule_context_menu = (function () { @@ -149,10 +153,10 @@ var gb_schedule_context_menu = (function () {
149 if (!isNaN(newValue) && newValue > 0) { 153 if (!isNaN(newValue) && newValue > 0) {
150 gb_common.$post_arr('/realSchedule/spaceAdjust', {ids: idArr, space: newValue}, function (rs) { 154 gb_common.$post_arr('/realSchedule/spaceAdjust', {ids: idArr, space: newValue}, function (rs) {
151 //刷新数据 155 //刷新数据
152 - if(rs.t){  
153 - gb_schedule_table.reLoadAndRefresh(rs.t.xlBm);  
154 - }  
155 - //gb_schedule_table.updateSchedule(rs.ts); 156 + //if(rs.t){
  157 + // gb_schedule_table.reLoadAndRefresh(rs.t.xlBm);
  158 + //}
  159 + gb_schedule_table.updateSchedule(rs.ts);
156 notify_succ('调整间隔成功!'); 160 notify_succ('调整间隔成功!');
157 }); 161 });
158 } else 162 } else
src/main/resources/static/real_control_v2/js/line_schedule/dbclick.js
@@ -21,6 +21,11 @@ var gb_schedule_table_dbclick = (function() { @@ -21,6 +21,11 @@ var gb_schedule_table_dbclick = (function() {
21 remarks: '', 21 remarks: '',
22 opType: '0' 22 opType: '0'
23 }, function(rs) { 23 }, function(rs) {
  24 + if(rs.flag && rs.flag==4008){
  25 + notify_err('已发出的班次不能调整待发');
  26 + gb_schedule_table.updateSchedule(rs.t);
  27 + return;
  28 + }
24 gb_schedule_table.updateSchedule(rs.ts); 29 gb_schedule_table.updateSchedule(rs.ts);
25 notify_succ('待发调整成功!'); 30 notify_succ('待发调整成功!');
26 //重新计算应发未发 31 //重新计算应发未发
src/main/resources/static/real_control_v2/js/main.js
@@ -47,7 +47,7 @@ var gb_main_ep = new EventProxy(), @@ -47,7 +47,7 @@ var gb_main_ep = new EventProxy(),
47 $('li.map-panel', '#main-tab-content').load('/real_control_v2/mapmonitor/real.html'); 47 $('li.map-panel', '#main-tab-content').load('/real_control_v2/mapmonitor/real.html');
48 }, 1000); 48 }, 1000);
49 //弹出更新说明 49 //弹出更新说明
50 - showUpdateDescription(); 50 + //showUpdateDescription();
51 }); 51 });
52 52
53 function g_emit(id) { 53 function g_emit(id) {
src/main/resources/static/real_control_v2/js/modal_extend.js
@@ -4,7 +4,7 @@ $(document).on(&#39;hide.uk.modal&#39;, &#39;.uk-modal&#39;, function () { @@ -4,7 +4,7 @@ $(document).on(&#39;hide.uk.modal&#39;, &#39;.uk-modal&#39;, function () {
4 if($('.uk-modal-dialog', this).hasClass('uk-modal-dialog-lightbox')){ 4 if($('.uk-modal-dialog', this).hasClass('uk-modal-dialog-lightbox')){
5 return; 5 return;
6 } 6 }
7 - $(this).remove(); 7 + $(this).trigger('ct-destroy').remove();
8 }); 8 });
9 9
10 $(document).on('show.uk.modal', '.uk-modal.ct_move_modal', function () { 10 $(document).on('show.uk.modal', '.uk-modal.ct_move_modal', function () {
src/main/resources/static/real_control_v2/js/north/tabs.js
@@ -18,12 +18,12 @@ var gb_tabs = (function() { @@ -18,12 +18,12 @@ var gb_tabs = (function() {
18 $('.main-container').html(tabContentHtmlStr); 18 $('.main-container').html(tabContentHtmlStr);
19 19
20 setTimeout(renderStyle, 4000); 20 setTimeout(renderStyle, 4000);
21 - /*//地图选项卡初始点击 21 + //地图选项卡初始点击
22 $('#north_tabs_map_btn').one('click', function () { 22 $('#north_tabs_map_btn').one('click', function () {
23 if(typeof(gb_map_overlay_mge)!="undefined"){ 23 if(typeof(gb_map_overlay_mge)!="undefined"){
24 gb_map_overlay_mge.centerToRational(); 24 gb_map_overlay_mge.centerToRational();
25 } 25 }
26 - });*/ 26 + });
27 27
28 //班次选项卡第一次点击,更新滚动条高度 28 //班次选项卡第一次点击,更新滚动条高度
29 $('.north-tabs .uk-tab li.tab-line').one('click', function(e){ 29 $('.north-tabs .uk-tab li.tab-line').one('click', function(e){
src/main/resources/static/real_control_v2/js/utils/svg_chart_tooltip.js
@@ -108,7 +108,7 @@ var gb_svg_tooltip = (function () { @@ -108,7 +108,7 @@ var gb_svg_tooltip = (function () {
108 api.set({ 108 api.set({
109 'hide.event': false, 109 'hide.event': false,
110 'content.button': 'Close', 110 'content.button': 'Close',
111 - 'content.title': 'GPS正常', 111 + 'content.title': '...',
112 'position.my': 'top center', 112 'position.my': 'top center',
113 'position.at': 'bottom center' 113 'position.at': 'bottom center'
114 }); 114 });
src/main/resources/static/real_control_v2/main.html
@@ -167,6 +167,7 @@ @@ -167,6 +167,7 @@
167 <script src="/real_control_v2/js/data/data_basic.js" merge="custom_js"></script> 167 <script src="/real_control_v2/js/data/data_basic.js" merge="custom_js"></script>
168 <script src="/real_control_v2/js/data/data_gps.js" merge="custom_js"></script> 168 <script src="/real_control_v2/js/data/data_gps.js" merge="custom_js"></script>
169 <script src="/real_control_v2/js/data/gps_abnormal.js" merge="custom_js"></script> 169 <script src="/real_control_v2/js/data/gps_abnormal.js" merge="custom_js"></script>
  170 +<script src="/real_control_v2/js/data/data_line_config.js" merge="custom_js"></script>
170 <!-- 线路模拟图 --> 171 <!-- 线路模拟图 -->
171 <script src="/real_control_v2/js/utils/svg_chart.js" merge="custom_js"></script> 172 <script src="/real_control_v2/js/utils/svg_chart.js" merge="custom_js"></script>
172 <script src="/real_control_v2/js/utils/svg_data_convert.js" merge="custom_js"></script> 173 <script src="/real_control_v2/js/utils/svg_data_convert.js" merge="custom_js"></script>
src/main/resources/static/real_control_v2/mapmonitor/fragments/map_infowindow.html
@@ -12,7 +12,21 @@ @@ -12,7 +12,21 @@
12 未知站点 12 未知站点
13 {{/if}} 13 {{/if}}
14 </h5> 14 </h5>
15 - <p>设备状态:正常</p> 15 + <p>设备状态:
  16 + {{if valid==1}}
  17 + invalid(-1
  18 + {{else if abnormalStatus=='outBounds'}}
  19 + 越界
  20 + {{else if abnormalStatus=='overspeed'}}
  21 + 超速
  22 + {{else if abnormalStatus=='gps-offline'}}
  23 + GPS掉线
  24 + {{else if abnormalStatus=='offline'}}
  25 + 离线
  26 + {{else}}
  27 + .
  28 + {{/if}}
  29 + </p>
16 <p>设备号:{{deviceId}}</p> 30 <p>设备号:{{deviceId}}</p>
17 <p>速度:{{speed}}</p> 31 <p>速度:{{speed}}</p>
18 <p>角度:{{direction}}</p> 32 <p>角度:{{direction}}</p>
src/main/resources/static/real_control_v2/mapmonitor/real.html
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 7
8 <div class="map-system-msg flex-left"> 8 <div class="map-system-msg flex-left">
9 <a class="z-depth-2 old_map" href="/pages/mapmonitor/alone/wrap.html" target="_blank"></a> 9 <a class="z-depth-2 old_map" href="/pages/mapmonitor/alone/wrap.html" target="_blank"></a>
10 - <a class="z-depth-2 now_map" href="/real_control_v2/mapmonitor/alone_page/alone_wrap.html" target="_blank"> 10 + <a class="z-depth-2 now_map" href="/real_control_v2/alone_page/map/alone_wrap.html" target="_blank">
11 <i class="uk-icon-send-o"></i> 11 <i class="uk-icon-send-o"></i>
12 </a> 12 </a>
13 </div> 13 </div>