Commit 71e82ae302aefcb007e6b4359fbcdda80ebdb8eb

Authored by 徐烜
2 parents 8f6640d4 0655f0ae

Merge branch 'minhang' of http://222.66.0.204:8090//panzhaov5/bsth_control into minhang

Showing 22 changed files with 1412 additions and 89 deletions
src/main/java/com/bsth/controller/DownloadController.java
@@ -20,6 +20,7 @@ import org.springframework.http.ResponseEntity; @@ -20,6 +20,7 @@ import org.springframework.http.ResponseEntity;
20 import org.springframework.stereotype.Component; 20 import org.springframework.stereotype.Component;
21 import org.springframework.web.bind.annotation.RequestMapping; 21 import org.springframework.web.bind.annotation.RequestMapping;
22 22
  23 +import com.google.protobuf.UnknownFieldSet.Field;
23 import com.mysql.fabric.Response; 24 import com.mysql.fabric.Response;
24 25
25 /** 26 /**
@@ -74,13 +75,14 @@ public class DownloadController @@ -74,13 +75,14 @@ public class DownloadController
74 os.write(buffer);// 输出文件 75 os.write(buffer);// 输出文件
75 os.flush(); 76 os.flush();
76 os.close(); 77 os.close();
  78 + file.delete();
77 } 79 }
78 80
79 @RequestMapping("downloadList") 81 @RequestMapping("downloadList")
80 public void downloadList(HttpServletResponse response,String fileName) 82 public void downloadList(HttpServletResponse response,String fileName)
81 throws IOException { 83 throws IOException {
82 // String fileNames=URLDecoder.decode(fileName,"UTF-8"); 84 // String fileNames=URLDecoder.decode(fileName,"UTF-8");
83 - fileName =fileName + ".zip"; 85 + fileName = fileName + ".zip";
84 String moudelPath = this.getClass().getResource("/").getPath()+ "static/pages/forms/export/"+fileName; 86 String moudelPath = this.getClass().getResource("/").getPath()+ "static/pages/forms/export/"+fileName;
85 File file = new File(moudelPath);// path是根据日志路径和文件名拼接出来的 87 File file = new File(moudelPath);// path是根据日志路径和文件名拼接出来的
86 // String filename = file.getName();// 获取日志文件名称 88 // String filename = file.getName();// 获取日志文件名称
@@ -96,5 +98,6 @@ public class DownloadController @@ -96,5 +98,6 @@ public class DownloadController
96 os.write(buffer);// 输出文件 98 os.write(buffer);// 输出文件
97 os.flush(); 99 os.flush();
98 os.close(); 100 os.close();
  101 + file.delete();
99 } 102 }
100 } 103 }
src/main/java/com/bsth/controller/oil/DlbController.java 0 → 100644
  1 +package com.bsth.controller.oil;
  2 +
  3 +import org.springframework.web.bind.annotation.RequestMapping;
  4 +import org.springframework.web.bind.annotation.RestController;
  5 +import com.bsth.controller.BaseController;
  6 +import com.bsth.entity.oil.Dlb;
  7 +
  8 +@RestController
  9 +@RequestMapping("dlb")
  10 +public class DlbController extends BaseController<Dlb, Integer>{
  11 +
  12 +}
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
@@ -439,5 +439,14 @@ public class ScheduleRealInfoController extends BaseController&lt;ScheduleRealInfo, @@ -439,5 +439,14 @@ public class ScheduleRealInfoController extends BaseController&lt;ScheduleRealInfo,
439 public Map<String, Object> exportWaybillMore(@RequestParam Map<String, Object> map){ 439 public Map<String, Object> exportWaybillMore(@RequestParam Map<String, Object> map){
440 return scheduleRealInfoService.exportWaybillMore(map); 440 return scheduleRealInfoService.exportWaybillMore(map);
441 } 441 }
  442 +
  443 + /**
  444 + * 获取当日计划排班 , 从计划表抓取数据
  445 + * @return
  446 + */
  447 + @RequestMapping(value = "currentSchedulePlan", method = RequestMethod.GET)
  448 + public Map<String, Object> currentSchedulePlan(@RequestParam String lineCodes){
  449 + return scheduleRealInfoService.currentSchedulePlan(lineCodes);
  450 + }
442 451
443 } 452 }
src/main/java/com/bsth/data/gpsdata/arrival/handlers/InOutStationSignalHandle.java
@@ -195,7 +195,7 @@ public class InOutStationSignalHandle extends SignalHandle{ @@ -195,7 +195,7 @@ public class InOutStationSignalHandle extends SignalHandle{
195 //进站既进场 195 //进站既进场
196 inStationAndInPark(sch, next); 196 inStationAndInPark(sch, next);
197 //将gps转换为下一个班次走向的站内信号 197 //将gps转换为下一个班次走向的站内信号
198 - transformUpdown(gps, sch); 198 + transformUpdown(gps, next);
199 } 199 }
200 } 200 }
201 else if(sch.getFcsjActual() == null){ 201 else if(sch.getFcsjActual() == null){
@@ -217,6 +217,11 @@ public class InOutStationSignalHandle extends SignalHandle{ @@ -217,6 +217,11 @@ public class InOutStationSignalHandle extends SignalHandle{
217 217
218 sendUtils.refreshSch(next); 218 sendUtils.refreshSch(next);
219 dayOfSchedule.save(next); 219 dayOfSchedule.save(next);
  220 +
  221 + //分班的时候,需要再跳过1个班次
  222 + next = dayOfSchedule.next(next);
  223 + if(next != null)
  224 + dayOfSchedule.addExecPlan(next);
220 } 225 }
221 } 226 }
222 227
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
@@ -49,6 +49,9 @@ public class DayOfSchedule implements CommandLineRunner { @@ -49,6 +49,9 @@ public class DayOfSchedule implements CommandLineRunner {
49 49
50 Logger logger = LoggerFactory.getLogger(this.getClass()); 50 Logger logger = LoggerFactory.getLogger(this.getClass());
51 51
  52 + //按线路分组的 “计划” 排班数据
  53 + public static Map<String, List<SchedulePlanInfo>> schedulePlanMap;
  54 +
52 // 按车辆分组的班次数据 55 // 按车辆分组的班次数据
53 private static ArrayListMultimap<String, ScheduleRealInfo> nbbmScheduleMap; 56 private static ArrayListMultimap<String, ScheduleRealInfo> nbbmScheduleMap;
54 57
@@ -101,6 +104,8 @@ public class DayOfSchedule implements CommandLineRunner { @@ -101,6 +104,8 @@ public class DayOfSchedule implements CommandLineRunner {
101 currSchDateMap = new HashMap<>(); 104 currSchDateMap = new HashMap<>();
102 nbbm2SEStationMap = TreeMultimap.create(); 105 nbbm2SEStationMap = TreeMultimap.create();
103 carExecutePlanMap = new HashMap<>(); 106 carExecutePlanMap = new HashMap<>();
  107 +
  108 + schedulePlanMap = new HashMap<>();
104 } 109 }
105 110
106 @Autowired 111 @Autowired
@@ -328,6 +333,8 @@ public class DayOfSchedule implements CommandLineRunner { @@ -328,6 +333,8 @@ public class DayOfSchedule implements CommandLineRunner {
328 333
329 // 查询计划排班 334 // 查询计划排班
330 List<SchedulePlanInfo> planItr = cleanSchPlanItr(schPlanService.list(data).iterator()); 335 List<SchedulePlanInfo> planItr = cleanSchPlanItr(schPlanService.list(data).iterator());
  336 + //保存一份原始计划排班数据
  337 + schedulePlanMap.put(lineCode, planItr);
331 338
332 // 转换为实际排班 339 // 转换为实际排班
333 realList = JSONArray.parseArray(JSON.toJSONString(planItr), ScheduleRealInfo.class); 340 realList = JSONArray.parseArray(JSON.toJSONString(planItr), ScheduleRealInfo.class);
@@ -374,6 +381,7 @@ public class DayOfSchedule implements CommandLineRunner { @@ -374,6 +381,7 @@ public class DayOfSchedule implements CommandLineRunner {
374 } catch (Exception e) { 381 } catch (Exception e) {
375 logger.error("", e); 382 logger.error("", e);
376 } 383 }
  384 +
377 return realList; 385 return realList;
378 } 386 }
379 387
src/main/java/com/bsth/entity/oil/Dlb.java 0 → 100644
  1 +package com.bsth.entity.oil;
  2 +
  3 +import java.text.DecimalFormat;
  4 +import java.util.Date;
  5 +
  6 +import javax.persistence.Entity;
  7 +import javax.persistence.GeneratedValue;
  8 +import javax.persistence.Id;
  9 +import javax.persistence.Table;
  10 +import javax.persistence.Transient;
  11 +
  12 +import org.springframework.format.annotation.DateTimeFormat;
  13 +
  14 +import com.bsth.data.BasicData;
  15 +
  16 +@Entity
  17 +@Table(name = "bsth_c_dlb")
  18 +public class Dlb {
  19 + @Id
  20 + @GeneratedValue
  21 + private Integer id;
  22 + @DateTimeFormat(pattern="yyyy-MM-dd")
  23 + private Date rq;
  24 + private String xlbm;
  25 + private String ssgsdm;
  26 + private String fgsdm;
  27 + private String nbbm;
  28 + private String jsy;
  29 + private Double czlc=0.0;
  30 + private Double jzlc=0.0;
  31 + //出站存电
  32 + private Double czcd=0.0;
  33 + //进站存电
  34 + private Double jzcd=0.0;
  35 + //充电量
  36 + private Double cdl;
  37 + private int sfkt;
  38 + private String jhsj;
  39 + //耗电
  40 + private Double hd=0.0;
  41 + private Double sh=0.0;
  42 + private String shyy;
  43 + private Double zlc=0.0;
  44 + private int yhlx;
  45 +
  46 + private Double ns=0.0;
  47 + private Double fyylc=0.0;
  48 + private Double jhzlc=0.0;
  49 + private Double jhfyylc=0.0;
  50 + private int jhzbc;
  51 + private int jhbc;
  52 + private int sjzbc;
  53 + private int sjbc;
  54 + private String edituser;
  55 + private Date edittime;
  56 + private Date createtime;
  57 + private int nylx;
  58 + //进场顺序(根据最先出场和最后进场来关联车辆的存油量)
  59 + private int jcsx;
  60 +
  61 + @Transient
  62 + private String bglyh;
  63 +
  64 + @Transient
  65 + private String xlname;
  66 +
  67 + @Transient
  68 + private String gsname;
  69 +
  70 +
  71 +
  72 +
  73 + public Integer getId() {
  74 + return id;
  75 + }
  76 +
  77 + public void setId(Integer id) {
  78 + this.id = id;
  79 + }
  80 +
  81 + public Date getRq() {
  82 + return rq;
  83 + }
  84 +
  85 + public void setRq(Date rq) {
  86 + this.rq = rq;
  87 + }
  88 +
  89 + public String getXlbm() {
  90 + return xlbm;
  91 + }
  92 +
  93 + public void setXlbm(String xlbm) {
  94 + this.xlbm = xlbm;
  95 + }
  96 +
  97 + public String getSsgsdm() {
  98 + return ssgsdm;
  99 + }
  100 +
  101 + public void setSsgsdm(String ssgsdm) {
  102 + this.ssgsdm = ssgsdm;
  103 + }
  104 +
  105 + public String getFgsdm() {
  106 + return fgsdm;
  107 + }
  108 +
  109 + public void setFgsdm(String fgsdm) {
  110 + this.fgsdm = fgsdm;
  111 + }
  112 +
  113 + public String getNbbm() {
  114 + return nbbm;
  115 + }
  116 +
  117 + public void setNbbm(String nbbm) {
  118 + this.nbbm = nbbm;
  119 + }
  120 +
  121 + public String getJsy() {
  122 + return jsy;
  123 + }
  124 +
  125 + public void setJsy(String jsy) {
  126 + this.jsy = jsy;
  127 + }
  128 +
  129 + public Double getCzlc() {
  130 + return czlc;
  131 + }
  132 +
  133 + public void setCzlc(Double czlc) {
  134 + this.czlc = czlc;
  135 + }
  136 +
  137 + public Double getJzlc() {
  138 + return jzlc;
  139 + }
  140 +
  141 + public void setJzlc(Double jzlc) {
  142 + this.jzlc = jzlc;
  143 + }
  144 +
  145 + public Double getCzcd() {
  146 + return czcd;
  147 + }
  148 +
  149 + public void setCzcd(Double czcd) {
  150 + this.czcd = czcd;
  151 + }
  152 +
  153 + public Double getJzcd() {
  154 + return jzcd;
  155 + }
  156 +
  157 + public void setJzcd(Double jzcd) {
  158 + this.jzcd = jzcd;
  159 + }
  160 +
  161 + public Double getCdl() {
  162 + return cdl;
  163 + }
  164 +
  165 + public void setCdl(Double cdl) {
  166 + this.cdl = cdl;
  167 + }
  168 +
  169 + public int getSfkt() {
  170 + return sfkt;
  171 + }
  172 +
  173 + public void setSfkt(int sfkt) {
  174 + this.sfkt = sfkt;
  175 + }
  176 +
  177 + public String getJhsj() {
  178 + return jhsj;
  179 + }
  180 +
  181 + public void setJhsj(String jhsj) {
  182 + this.jhsj = jhsj;
  183 + }
  184 +
  185 + public Double getHd() {
  186 + return hd;
  187 + }
  188 +
  189 + public void setHd(Double hd) {
  190 + this.hd = hd;
  191 + }
  192 +
  193 + public Double getSh() {
  194 + return sh;
  195 + }
  196 +
  197 + public void setSh(Double sh) {
  198 + this.sh = sh;
  199 + }
  200 +
  201 + public String getShyy() {
  202 + return shyy;
  203 + }
  204 +
  205 + public void setShyy(String shyy) {
  206 + this.shyy = shyy;
  207 + }
  208 +
  209 + public Double getZlc() {
  210 + return zlc;
  211 + }
  212 +
  213 + public void setZlc(Double zlc) {
  214 + this.zlc = zlc;
  215 + }
  216 +
  217 + public int getYhlx() {
  218 + return yhlx;
  219 + }
  220 +
  221 + public void setYhlx(int yhlx) {
  222 + this.yhlx = yhlx;
  223 + }
  224 +
  225 + public Double getNs() {
  226 + return ns;
  227 + }
  228 +
  229 + public void setNs(Double ns) {
  230 + this.ns = ns;
  231 + }
  232 +
  233 + public Double getFyylc() {
  234 + return fyylc;
  235 + }
  236 +
  237 + public void setFyylc(Double fyylc) {
  238 + this.fyylc = fyylc;
  239 + }
  240 +
  241 + public Double getJhzlc() {
  242 + return jhzlc;
  243 + }
  244 +
  245 + public void setJhzlc(Double jhzlc) {
  246 + this.jhzlc = jhzlc;
  247 + }
  248 +
  249 + public Double getJhfyylc() {
  250 + return jhfyylc;
  251 + }
  252 +
  253 + public void setJhfyylc(Double jhfyylc) {
  254 + this.jhfyylc = jhfyylc;
  255 + }
  256 +
  257 + public int getJhzbc() {
  258 + return jhzbc;
  259 + }
  260 +
  261 + public void setJhzbc(int jhzbc) {
  262 + this.jhzbc = jhzbc;
  263 + }
  264 +
  265 + public int getJhbc() {
  266 + return jhbc;
  267 + }
  268 +
  269 + public void setJhbc(int jhbc) {
  270 + this.jhbc = jhbc;
  271 + }
  272 +
  273 + public int getSjzbc() {
  274 + return sjzbc;
  275 + }
  276 +
  277 + public void setSjzbc(int sjzbc) {
  278 + this.sjzbc = sjzbc;
  279 + }
  280 +
  281 + public int getSjbc() {
  282 + return sjbc;
  283 + }
  284 +
  285 + public void setSjbc(int sjbc) {
  286 + this.sjbc = sjbc;
  287 + }
  288 +
  289 + public String getEdituser() {
  290 + return edituser;
  291 + }
  292 +
  293 + public void setEdituser(String edituser) {
  294 + this.edituser = edituser;
  295 + }
  296 +
  297 + public Date getEdittime() {
  298 + return edittime;
  299 + }
  300 +
  301 + public void setEdittime(Date edittime) {
  302 + this.edittime = edittime;
  303 + }
  304 +
  305 + public Date getCreatetime() {
  306 + return createtime;
  307 + }
  308 +
  309 + public void setCreatetime(Date createtime) {
  310 + this.createtime = createtime;
  311 + }
  312 +
  313 + public int getNylx() {
  314 + return nylx;
  315 + }
  316 +
  317 + public void setNylx(int nylx) {
  318 + this.nylx = nylx;
  319 + }
  320 +
  321 + public int getJcsx() {
  322 + return jcsx;
  323 + }
  324 +
  325 + public void setJcsx(int jcsx) {
  326 + this.jcsx = jcsx;
  327 + }
  328 +
  329 + public String getBglyh() {
  330 + if(this.getZlc()==0){
  331 + return "0.00";
  332 + }else{
  333 + DecimalFormat df = new DecimalFormat("0.00");
  334 + return df.format(this.getHd()/this.getZlc()*100);
  335 + }
  336 + }
  337 +
  338 + public void setBglyh(String bglyh) {
  339 + this.bglyh = bglyh;
  340 + }
  341 +
  342 + public String getXlname() {
  343 + return BasicData.lineCode2NameMap.get(this.xlbm);
  344 + }
  345 +
  346 + public void setXlname(String xlname) {
  347 + this.xlname = xlname;
  348 + }
  349 +
  350 + public String getGsname() {
  351 + return BasicData.businessCodeNameMap.get(this.ssgsdm);
  352 + }
  353 +
  354 + public void setGsname(String gsname) {
  355 + this.gsname = gsname;
  356 + }
  357 +
  358 +
  359 +}
src/main/java/com/bsth/entity/oil/Jdl.java 0 → 100644
  1 +package com.bsth.entity.oil;
  2 +
  3 +import java.util.Date;
  4 +
  5 +import javax.persistence.Entity;
  6 +import javax.persistence.GeneratedValue;
  7 +import javax.persistence.Id;
  8 +import javax.persistence.Table;
  9 +
  10 +import org.springframework.format.annotation.DateTimeFormat;
  11 +
  12 +@Entity
  13 +@Table(name = "bsth_c_jdl")
  14 +public class Jdl {
  15 + @Id
  16 + @GeneratedValue
  17 + private Integer id;
  18 + @DateTimeFormat(pattern="yyyy-MM-dd")
  19 + private Date rq;
  20 + private String gsBm;
  21 + private String gsName;
  22 + private String fgsBm;
  23 + private String fgsName;
  24 + private String clZbh;
  25 + private Double jdl = 0.0;
  26 + private String jdz;
  27 + private String remarks;
  28 +
  29 +
  30 + public Integer getId() {
  31 + return id;
  32 + }
  33 + public void setId(Integer id) {
  34 + this.id = id;
  35 + }
  36 + public Date getRq() {
  37 + return rq;
  38 + }
  39 + public void setRq(Date rq) {
  40 + this.rq = rq;
  41 + }
  42 + public String getGsBm() {
  43 + return gsBm;
  44 + }
  45 + public void setGsBm(String gsBm) {
  46 + this.gsBm = gsBm;
  47 + }
  48 + public String getGsName() {
  49 + return gsName;
  50 + }
  51 + public void setGsName(String gsName) {
  52 + this.gsName = gsName;
  53 + }
  54 + public String getFgsBm() {
  55 + return fgsBm;
  56 + }
  57 + public void setFgsBm(String fgsBm) {
  58 + this.fgsBm = fgsBm;
  59 + }
  60 + public String getFgsName() {
  61 + return fgsName;
  62 + }
  63 + public void setFgsName(String fgsName) {
  64 + this.fgsName = fgsName;
  65 + }
  66 + public String getClZbh() {
  67 + return clZbh;
  68 + }
  69 + public void setClZbh(String clZbh) {
  70 + this.clZbh = clZbh;
  71 + }
  72 + public Double getJdl() {
  73 + return jdl;
  74 + }
  75 + public void setJdl(Double jdl) {
  76 + this.jdl = jdl;
  77 + }
  78 + public String getJdz() {
  79 + return jdz;
  80 + }
  81 + public void setJdz(String jdz) {
  82 + this.jdz = jdz;
  83 + }
  84 + public String getRemarks() {
  85 + return remarks;
  86 + }
  87 + public void setRemarks(String remarks) {
  88 + this.remarks = remarks;
  89 + }
  90 +
  91 +}
src/main/java/com/bsth/entity/realcontrol/ScheduleRealInfo.java
@@ -344,6 +344,8 @@ public class ScheduleRealInfo { @@ -344,6 +344,8 @@ public class ScheduleRealInfo {
344 } 344 }
345 345
346 public String getsGh() { 346 public String getsGh() {
  347 + if(sGh == null)
  348 + return "";
347 return sGh; 349 return sGh;
348 } 350 }
349 351
@@ -352,6 +354,8 @@ public class ScheduleRealInfo { @@ -352,6 +354,8 @@ public class ScheduleRealInfo {
352 } 354 }
353 355
354 public String getsName() { 356 public String getsName() {
  357 + if(sGh == null)
  358 + return "";
355 return sName; 359 return sName;
356 } 360 }
357 361
src/main/java/com/bsth/repository/oil/DlbRepository.java 0 → 100644
  1 +package com.bsth.repository.oil;
  2 +
  3 +import org.springframework.stereotype.Repository;
  4 +import com.bsth.entity.oil.Dlb;
  5 +import com.bsth.repository.BaseRepository;
  6 +
  7 +@Repository
  8 +public interface DlbRepository extends BaseRepository<Dlb, Integer>{
  9 +
  10 +}
src/main/java/com/bsth/service/oil/DlbService.java 0 → 100644
  1 +package com.bsth.service.oil;
  2 +
  3 +import com.bsth.entity.oil.Dlb;
  4 +import com.bsth.service.BaseService;
  5 +
  6 +public interface DlbService extends BaseService<Dlb, Integer>{
  7 +}
src/main/java/com/bsth/service/oil/impl/DlbServiceImpl.java 0 → 100644
  1 +package com.bsth.service.oil.impl;
  2 +
  3 +
  4 +
  5 +import org.springframework.stereotype.Service;
  6 +
  7 +import com.bsth.entity.oil.Dlb;
  8 +import com.bsth.service.impl.BaseServiceImpl;
  9 +import com.bsth.service.oil.DlbService;
  10 +
  11 +@Service
  12 +public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbService{
  13 +
  14 +
  15 +}
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
@@ -148,4 +148,6 @@ public interface ScheduleRealInfoService extends BaseService&lt;ScheduleRealInfo, L @@ -148,4 +148,6 @@ public interface ScheduleRealInfoService extends BaseService&lt;ScheduleRealInfo, L
148 List<Map<String, Object>> scheduleDailyExport(Map<String, Object> map); 148 List<Map<String, Object>> scheduleDailyExport(Map<String, Object> map);
149 149
150 Map<String, Object> exportWaybillMore(Map<String, Object> map); 150 Map<String, Object> exportWaybillMore(Map<String, Object> map);
  151 +
  152 + Map<String,Object> currentSchedulePlan(String lineCodes);
151 } 153 }
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
@@ -34,6 +34,7 @@ import com.bsth.repository.realcontrol.SvgAttributeRepository; @@ -34,6 +34,7 @@ import com.bsth.repository.realcontrol.SvgAttributeRepository;
34 import com.bsth.repository.schedule.CarConfigInfoRepository; 34 import com.bsth.repository.schedule.CarConfigInfoRepository;
35 import com.bsth.repository.schedule.EmployeeConfigInfoRepository; 35 import com.bsth.repository.schedule.EmployeeConfigInfoRepository;
36 import com.bsth.repository.schedule.GuideboardInfoRepository; 36 import com.bsth.repository.schedule.GuideboardInfoRepository;
  37 +import com.bsth.repository.schedule.SchedulePlanRepository;
37 import com.bsth.security.util.SecurityUtils; 38 import com.bsth.security.util.SecurityUtils;
38 import com.bsth.service.SectionRouteService; 39 import com.bsth.service.SectionRouteService;
39 import com.bsth.service.impl.BaseServiceImpl; 40 import com.bsth.service.impl.BaseServiceImpl;
@@ -55,11 +56,7 @@ import org.slf4j.LoggerFactory; @@ -55,11 +56,7 @@ import org.slf4j.LoggerFactory;
55 import org.springframework.beans.factory.annotation.Autowired; 56 import org.springframework.beans.factory.annotation.Autowired;
56 import org.springframework.stereotype.Service; 57 import org.springframework.stereotype.Service;
57 58
58 -import java.io.BufferedInputStream;  
59 -import java.io.BufferedOutputStream;  
60 -import java.io.File;  
61 -import java.io.FileInputStream;  
62 -import java.io.FileOutputStream; 59 +import java.io.*;
63 import java.text.DecimalFormat; 60 import java.text.DecimalFormat;
64 import java.text.ParseException; 61 import java.text.ParseException;
65 import java.text.SimpleDateFormat; 62 import java.text.SimpleDateFormat;
@@ -3228,5 +3225,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -3228,5 +3225,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3228 map.put("fileName", file.getName()); 3225 map.put("fileName", file.getName());
3229 return map; 3226 return map;
3230 } 3227 }
3231 - 3228 +
  3229 +
  3230 + @Autowired
  3231 + SchedulePlanRepository schedulePlanRepository;
  3232 +
  3233 + @Override
  3234 + public Map<String, Object> currentSchedulePlan(String lineCodes) {
  3235 + List<String> codes = Splitter.on(",").splitToList(lineCodes);
  3236 +
  3237 + //List<SchedulePlan> list = schedulePlanRepository.findByMultiLineCode(codes);
  3238 + //System.out.println(list);
  3239 + return null;
  3240 + }
3232 } 3241 }
3233 \ No newline at end of file 3242 \ No newline at end of file
src/main/resources/static/pages/electricity/list/list.html 0 → 100644
  1 +<div class="page-head">
  2 + <div class="page-title">
  3 + <h1>进出场存电量</h1>
  4 + </div>
  5 +</div>
  6 +
  7 +<ul class="page-breadcrumb breadcrumb">
  8 + <li><a href="/pages/home.html" data-pjax>首页</a> <i class="fa fa-circle"></i></li>
  9 + <li><span class="active">用电管理</span> <i class="fa fa-circle"></i></li>
  10 + <li><span class="active">进出场存电量</span></li>
  11 +</ul>
  12 +
  13 +<div class="row" id="ll_oil_list">
  14 + <div class="col-md-12">
  15 + <!-- Begin: life time stats -->
  16 + <div class="portlet light portlet-fit portlet-datatable bordered">
  17 + <div class="portlet-title">
  18 + <div class="caption">
  19 + <i class="fa fa-fire-extinguisher"></i> <span
  20 + class="caption-subject font-dark sbold uppercase">进出场存电量表</span>
  21 + </div>
  22 + <div class="actions">
  23 + <!-- <button type="button" class="btn btn-circle blue" id="removeButton"><i class="fa fa-trash-o"></i> 删除</button> -->
  24 + <button type="button" class="btn btn-circle blue" id="obtain"><i class="fa fa-hourglass-half"></i>
  25 + 获取加/存电信息
  26 + </button>
  27 + <button type="button" class="btn btn-circle blue" id="checkYl"><i class="fa fa-gg-circle"></i>
  28 + 核对加注量(有加电无里程)
  29 + </button>
  30 + <button type="button" class="btn btn-circle blue" id="export"><i class="fa fa-file-excel-o"></i>
  31 + 导出Excel
  32 + </button>
  33 + <!-- <button type="button" class="btn btn-circle red" disabled="disabled" id="removeButton"><i class="fa fa-trash"></i> 删除用户</button> -->
  34 + </div>
  35 + </div>
  36 + <div class="portlet-body">
  37 + <div class="table-container" style="margin-top: 10px">
  38 + <table
  39 + class="table table-striped table-bordered table-hover table-checkable"
  40 + id="datatable_dlb">
  41 + <thead>
  42 + <tr role="row" class="filter">
  43 + <td> 公司:</td>
  44 + <td colspan="2">
  45 +
  46 + <select class="form-control" name="ssgsdm_like" id="ylbListGsdmId" ></select>
  47 +
  48 + </td>
  49 + <td>
  50 + 分公司:
  51 + </td>
  52 + <td colspan="2">
  53 +
  54 + <select class="form-control" name="fgsdm_like" id="ylbListFgsdmId" ></select>
  55 + </td>
  56 +
  57 + <td>
  58 + 日期:
  59 + </td>
  60 + <td>
  61 + <input type="text" style="width: 80px" name="rq" id="rq"/>
  62 + </td>
  63 + <td >
  64 + 线路:
  65 + </td>
  66 + <td colspan="2">
  67 + <select class="form-control" name="xlbm_eq" id="xlbm" style="width: 120px;"></select>
  68 + &nbsp;
  69 + </td>
  70 + <td >
  71 + 内部编码:
  72 + </td>
  73 + <td colspan="2">
  74 + <select class="form-control" name="nbbm_eq" id="nbbm" style="width: 120px;"></select>
  75 + </td>
  76 + <td colspan="4">
  77 + <button class="btn btn-sm green btn-outline filter-submit margin-bottom" style="margin-right:0px">
  78 + <i class="fa fa-search"></i> 搜索
  79 + </button>
  80 +
  81 + <button class="btn btn-sm red btn-outline filter-cancel" style="margin-right:0px">
  82 + <i class="fa fa-times"></i> 重置
  83 + </button>
  84 +
  85 + </td>
  86 + </tr>
  87 + <tr role="row" class="heading">
  88 + <th width="2%">#</th>
  89 + <th width="9%">日期</th>
  90 + <th width="6%">公司</th>
  91 + <th width="9%">线路</th>
  92 + <th width="6%">自编号</th>
  93 + <th width="7%">驾驶员</th>
  94 + <th width="4%">充电量</th>
  95 + <th width="5%">出场公里</th>
  96 + <th width="4%">进场公里</th>
  97 + <th width="4%">出场存电</th>
  98 + <th width="4%">进场存电</th>
  99 + <th width="5%">耗电</th>
  100 + <th width="4%">尿素</th>
  101 + <th width="5%">耗损原因</th>
  102 + <th width="5%">耗损电量</th>
  103 + <th width="5%">当日总里程</th>
  104 + <th width="5%">数据类型</th>
  105 + <th width="5%">百公里电耗</th>
  106 + <!-- <th width="5%">操作</th> -->
  107 + </tr>
  108 + </thead>
  109 + <tbody></tbody>
  110 + </table>
  111 + <div style="text-align: right;">
  112 + <ul id="pagination" class="pagination"></ul>
  113 + </div>
  114 + </div>
  115 + </div>
  116 + </div>
  117 + </div>
  118 +</div>
  119 +
  120 +<script id="ylb_list_temp" type="text/html">
  121 + {{each list as obj i}}
  122 + <tr>
  123 + <td style="vertical-align: middle;">
  124 + <input type="radio" name="id" class="group-checkable icheck" data-id="{{obj.id}}">
  125 + </td>
  126 +
  127 + <td>
  128 + {{obj.rq}}
  129 + </td>
  130 + <td>
  131 + {{obj.gsname}}
  132 + </td>
  133 + <td>
  134 + {{obj.xlname}}
  135 + </td>
  136 + <td>
  137 + {{obj.nbbm}}
  138 + </td>
  139 + <td>
  140 + {{obj.jsy}}
  141 + </td>
  142 + <td>
  143 + {{obj.jzl}}
  144 + </td>
  145 + <td>
  146 + {{obj.czlc}}
  147 + </td>
  148 + <td>
  149 + {{obj.jzlc}}
  150 + </td>
  151 + <td>
  152 + {{obj.czyl}}
  153 + </td>
  154 + <td>
  155 + <a data-id="{{obj.id}}" href="javascript:;" class="in_carpark_jzyl">
  156 + {{obj.jzyl}}
  157 + </a>
  158 + </td>
  159 + <td>
  160 + {{obj.yh}}
  161 + </td>
  162 + <td>
  163 + {{obj.ns}}
  164 + </td>
  165 + <td>
  166 + {{obj.shyy}}
  167 + </td>
  168 + <td>
  169 + {{obj.sh}}
  170 + </td>
  171 + <td>
  172 + {{obj.zlc}}
  173 + </td>
  174 + <td>
  175 + {{obj.yhlx}}
  176 + </td>
  177 + <td>
  178 + {{obj.bglyh}}
  179 + </td>
  180 + <td>
  181 + <!--<a class="btn btn-sm blue btn-outline" href="edit.html?no={{obj.id}}" data-pjax><i class="fa fa-edit"></i> 编辑</a>-->
  182 + </td>
  183 + </tr>
  184 + {{/each}}
  185 + {{if list.length == 0}}
  186 + <tr>
  187 + <td colspan=19><h6 class="muted">没有找到相关数据</h6></td>
  188 + </tr>
  189 + {{/if}}
  190 +</script>
  191 +
  192 +<script>
  193 + $(function () {
  194 + //var id = 15;
  195 + //$('.in_carpark_jzyl[data-id='+id+']', '#ll_oil_list')
  196 +
  197 + $("#checkYl").on('click', function () {
  198 + if ($("#rq").val() != "") {
  199 + var cells = $('tr.filter')[0].cells
  200 + , params = {}
  201 + , name;
  202 + $.each(cells, function (i, cell) {
  203 + var items = $('input,select', cell);
  204 + for (var j = 0, item; item = items[j++];) {
  205 + name = $(item).attr('name');
  206 + if (name) {
  207 + params[name] = $(item).val();
  208 + }
  209 + }
  210 + });
  211 + $get('/ylb/checkYl', params, function () {
  212 + jsDoQuery(null, true);
  213 + });
  214 + } else {
  215 + layer.msg('请选择日期.');
  216 + }
  217 + })
  218 +
  219 +
  220 + //获取加存信息
  221 + $("#obtain").on('click', function () {
  222 + if ($("#rq").val() != "") {
  223 + var cells = $('tr.filter')[0].cells
  224 + , params = {}
  225 + , name;
  226 + $.each(cells, function (i, cell) {
  227 + var items = $('input,select', cell);
  228 + for (var j = 0, item; item = items[j++];) {
  229 + name = $(item).attr('name');
  230 + if (name) {
  231 + params[name] = $(item).val();
  232 + }
  233 + }
  234 + });
  235 + $get('/ylb/obtain', params, function () {
  236 + jsDoQuery(params, true);
  237 + });
  238 + } else {
  239 + layer.msg('请选择日期.');
  240 + }
  241 +
  242 + })
  243 + $("#rq").datetimepicker({
  244 + format: 'YYYY-MM-DD',
  245 + locale: 'zh-cn'
  246 + });
  247 +
  248 + var page = 0, initPagination;
  249 + var icheckOptions = {
  250 + radioClass: 'iradio_square-blue icheck',
  251 + increaseArea: '20%'
  252 + }
  253 +
  254 + //重置
  255 + $('tr.filter .filter-cancel').on('click', function () {
  256 + $('tr.filter input, select').val('').change();
  257 + });
  258 +
  259 + //提交
  260 + $('tr.filter .filter-submit').on('click', function () {
  261 + var ylbGsdm=$("#ylbListGsdmId").val();
  262 + var ylbFgsdm=$("#ylbListFgsdmId").val();
  263 + if ($("#rq").val() == "" || $("#rq").val() ==null){
  264 + layer.msg('请选择日期.');
  265 + }else if(ylbGsdm=="" || ylbGsdm==null || ylbFgsdm=="" ||ylbFgsdm==null){
  266 + layer.msg('请选择公司和分公司.');
  267 + }else {
  268 + var cells = $('tr.filter')[0].cells
  269 + , params = {}
  270 + , name;
  271 + $.each(cells, function (i, cell) {
  272 + var items = $('input,select', cell);
  273 + for (var j = 0, item; item = items[j++];) {
  274 + name = $(item).attr('name');
  275 + if (name) {
  276 + params[name] = $(item).val();
  277 + }
  278 + }
  279 + });
  280 + page = 0;
  281 + jsDoQuery(params, true);
  282 + }
  283 + });
  284 +
  285 +
  286 +// var gsqxdm="";
  287 +
  288 +
  289 + $.get('/user/companyData', function(result){
  290 + obj = result;
  291 + var options="";
  292 +// = '<option value="">请选择</option>';
  293 + for(var i = 0; i < obj.length; i++){
  294 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  295 +// setFgsqx(obj[i].companyCode);
  296 + }
  297 + $('#ylbListGsdmId').html(options);
  298 + updateCompany();
  299 + });
  300 + /* function setFgsqx(gs){
  301 + var company =gs
  302 + var options = '';
  303 + for(var i = 0; i < obj.length; i++){
  304 + if(obj[i].companyCode == company){
  305 + var children = obj[i].children;
  306 + for(var j = 0; j < children.length; j++){
  307 + gsqxdm +=company+""+children[j].code+",";
  308 + }
  309 + }
  310 + }
  311 + } */
  312 + $("#ylbListGsdmId").on("change",updateCompany);
  313 + function updateCompany(){
  314 + var company = $('#ylbListGsdmId').val();
  315 + var options ="";
  316 +// = '<option value="">请选择</option>';
  317 + for(var i = 0; i < obj.length; i++){
  318 + if(obj[i].companyCode == company){
  319 + var children = obj[i].children;
  320 + for(var j = 0; j < children.length; j++){
  321 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  322 + }
  323 + }
  324 + }
  325 + $('#ylbListFgsdmId').html(options);
  326 + }
  327 + /*
  328 + * 获取数据 p: 要提交的参数, pagination: 是否重新分页
  329 + */
  330 + function jsDoQuery(p, pagination) {
  331 + var params = {};
  332 + if (p)
  333 + params = p;
  334 + //更新时间排序
  335 + params['order'] = 'nbbm';
  336 + params['page'] = page;
  337 + params['rq'] = $("#rq").val();
  338 +
  339 + /* var ylbGsdm=$("#ylbListGsdmId").val();
  340 + var ylbFgsdm=$("#ylbListFgsdmId").val();
  341 + if(ylbGsdm==''|| ylbGsdm==null){
  342 + params['concat(ssgsdm,fgsdm)_in']=gsqxdm;
  343 + }else{
  344 + if(ylbFgsdm==''||ylbFgsdm==null){
  345 + var fgsqx1='';
  346 + for(var i = 0; i < obj.length; i++){
  347 + if(obj[i].companyCode == ylbGsdm){
  348 + var children = obj[i].children;
  349 + for(var j = 0; j < children.length; j++){
  350 + fgsqx1 +=children[j].code+",";
  351 + }
  352 + }
  353 + }
  354 + params['fgsdm_in']=fgsqx1;
  355 + }
  356 + } */
  357 + var i = layer.load(2);
  358 + $get('/ylb', params, function (data) {
  359 + $.each(data.content, function (i, obj) {
  360 + obj.rq = moment(obj.rq).format("YYYY-MM-DD");
  361 + });
  362 + var bodyHtm = template('ylb_list_temp', {list: data.content});
  363 +
  364 + $('#datatable_dlb tbody').html(bodyHtm)
  365 + .find('.icheck').iCheck(icheckOptions)
  366 + .on('ifChanged', iCheckChange);
  367 + if (pagination && data.content.length > 0) {
  368 + //重新分页
  369 + initPagination = true;
  370 + showPagination(data);
  371 + }
  372 + layer.close(i);
  373 +
  374 + startOptJzylLink($('#ll_oil_list .in_carpark_jzyl'));
  375 + });
  376 + }
  377 +
  378 + //改变状态
  379 + function startOptJzylLink(es) {
  380 + es.editable({
  381 + type: 'text',
  382 + placement: 'right',
  383 + width: 100,
  384 + display: false,
  385 + validate: function (value) {
  386 + if (!value)
  387 + return '值不能为空!';
  388 + if (isNaN(value))
  389 + return '只能为数字!';
  390 + if (value < 0)
  391 + return '值不能小于0!';
  392 + },
  393 + inputclass: 'form-control input-medium input-edtable-sm'
  394 + })
  395 + .on('save', function (e, params) {
  396 + $(this).text(params.newValue);
  397 + });
  398 + }
  399 +
  400 + function iCheckChange() {
  401 + var tr = $(this).parents('tr');
  402 + if (this.checked)
  403 + tr.addClass('row-active');
  404 + else
  405 + tr.removeClass('row-active');
  406 +
  407 + /* if($('#datatable_resource input.icheck:checked').length == 1)
  408 + $('#removeButton').removeAttr('disabled');
  409 + else
  410 + $('#removeButton').attr('disabled', 'disabled'); */
  411 + }
  412 +
  413 + function showPagination(data) {
  414 + //分页
  415 + $('#pagination').jqPaginator({
  416 + totalPages: data.totalPages,
  417 + visiblePages: 6,
  418 + currentPage: page + 1,
  419 + first: '<li class="first"><a href="javascript:void(0);">首页<\/a><\/li>',
  420 + prev: '<li class="prev"><a href="javascript:void(0);">上一页<\/a><\/li>',
  421 + next: '<li class="next"><a href="javascript:void(0);">下一页<\/a><\/li>',
  422 + last: '<li class="last"><a href="javascript:void(0);">尾页<\/a><\/li>',
  423 + page: '<li class="page"><a href="javascript:void(0);">{{page}}<\/a><\/li>',
  424 + onPageChange: function (num, type) {
  425 + if (initPagination) {
  426 + initPagination = false;
  427 + return;
  428 + }
  429 +
  430 + var cells = $('tr.filter')[0].cells
  431 + , params = {}
  432 + , name;
  433 + $.each(cells, function (i, cell) {
  434 + var items = $('input,select', cell);
  435 + for (var j = 0, item; item = items[j++];) {
  436 + name = $(item).attr('name');
  437 + if (name) {
  438 + params[name] = $(item).val();
  439 + }
  440 + }
  441 + });
  442 + page = num - 1;
  443 + jsDoQuery(params, true);
  444 + }
  445 + });
  446 + }
  447 +
  448 +
  449 + //删除
  450 + $('#removeButton').on('click', function () {
  451 + if ($(this).attr('disabled'))
  452 + return;
  453 +
  454 + var id = $('input.icheck:checked').data('id');
  455 + removeConfirm('确定要删除选中的数据?', '/resource/' + id, function () {
  456 + $('tr.filter .filter-submit').click();
  457 + });
  458 + });
  459 +
  460 + //搜索线路
  461 + $.get('/basic/lineCode2Name',function(result){
  462 + var data=[];
  463 +
  464 + for(var code in result){
  465 + data.push({id: code, text: result[code]});
  466 + }
  467 + initPinYinSelect2('#xlbm',data,'');
  468 +
  469 + })
  470 +
  471 + $('#nbbm').select2({
  472 + placeholder: '搜索车辆...',
  473 + ajax: {
  474 + url: '/realSchedule/sreachVehic',
  475 + dataType: 'json',
  476 + delay: 150,
  477 + data: function (params) {
  478 + return {nbbm: params.term};
  479 + },
  480 + processResults: function (data) {
  481 + return {
  482 + results: data
  483 + };
  484 + },
  485 + cache: true
  486 + },
  487 + templateResult: function (repo) {
  488 + if (repo.loading) return repo.text;
  489 + var h = '<span>' + repo.text + '</span>';
  490 + h += (repo.lineName ? '&nbsp;<span class="select2-desc">' + repo.lineName + '</span>' : '');
  491 + return h;
  492 + },
  493 + escapeMarkup: function (markup) {
  494 + return markup;
  495 + },
  496 + minimumInputLength: 1,
  497 + templateSelection: function (repo) {
  498 + return repo.text;
  499 + },
  500 + language: {
  501 + noResults: function () {
  502 + return '<span style="color:red;font-size: 12px;">没有搜索到车辆!</span>';
  503 + },
  504 + inputTooShort: function (e) {
  505 + return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入自编号搜索车辆</span>';
  506 + },
  507 + searching: function () {
  508 + return '<span style="color:gray;font-size: 12px;"> 正在搜索车辆...</span>';
  509 + }
  510 + }
  511 + })
  512 +
  513 +
  514 +//导出
  515 +
  516 + $("#export").on("click", function () {
  517 + if ($("#rq").val() != "") {
  518 + var cells = $('tr.filter')[0].cells
  519 + , params = {}
  520 + , name;
  521 + $.each(cells, function (i, cell) {
  522 + var items = $('input,select', cell);
  523 + for (var j = 0, item; item = items[j++];) {
  524 + name = $(item).attr('name');
  525 + if (name) {
  526 + params[name] = $(item).val();
  527 + }
  528 + }
  529 + });
  530 + $post('/ylb/listExport', params, function (result) {
  531 + window.open("/downloadFile/download?fileName=进出场存电量" + moment($("#rq").val()).format("YYYYMMDD"));
  532 + });
  533 + } else {
  534 + layer.msg('请选择日期.');
  535 + }
  536 + });
  537 +
  538 + });
  539 +</script>
0 \ No newline at end of file 540 \ No newline at end of file
src/main/resources/static/real_control_v2/electron/lineSelect.html
@@ -403,6 +403,14 @@ @@ -403,6 +403,14 @@
403 }); 403 });
404 })(); 404 })();
405 } 405 }
  406 +
  407 + $('#mnavbarIconBtnMIN').on('click', function () {
  408 + ipcMain.send('webPageSelectWindowMinimize');
  409 + });
  410 +
  411 + $('#mnavbarIconBtnCLOSE').on('click', function () {
  412 + ipcMain.send('webPageSelectWindowClose');
  413 + });
406 }(); 414 }();
407 </script> 415 </script>
408 </body> 416 </body>
src/main/resources/static/real_control_v2/fragments/north/nav/curr_date_schedule.html 0 → 100644
  1 +<div class="uk-modal" id="curr-date-schedule-modal">
  2 + <style>
  3 + .curr-schedule-table {
  4 + width: 1600px;
  5 + }
  6 +
  7 + .curr-schedule-table dl dt:nth-of-type(1), .curr-schedule-table dl dd:nth-of-type(1) {
  8 + width: 6%;
  9 + }
  10 +
  11 + .curr-schedule-table dl dt:nth-of-type(2), .curr-schedule-table dl dd:nth-of-type(2) {
  12 + width: 5%;
  13 + }
  14 +
  15 + .curr-schedule-table dl dt:nth-of-type(3), .curr-schedule-table dl dd:nth-of-type(3) {
  16 + width: 7%;
  17 + }
  18 +
  19 + .curr-schedule-table dl dt:nth-of-type(4), .curr-schedule-table dl dd:nth-of-type(4) {
  20 + width: 7%;
  21 + }
  22 +
  23 + .curr-schedule-table dl dt:nth-of-type(5), .curr-schedule-table dl dd:nth-of-type(5) {
  24 + width: 7%;
  25 + }
  26 +
  27 + .curr-schedule-table dl dt:nth-of-type(6), .curr-schedule-table dl dd:nth-of-type(6) {
  28 + width: 7%;
  29 + }
  30 +
  31 + .curr-schedule-table dl dt:nth-of-type(7), .curr-schedule-table dl dd:nth-of-type(7) {
  32 + width: 5%;
  33 + }
  34 +
  35 + .curr-schedule-table dl dt:nth-of-type(8), .curr-schedule-table dl dd:nth-of-type(8) {
  36 + width: 5%;
  37 + }
  38 +
  39 + .curr-schedule-table dl dt:nth-of-type(9), .curr-schedule-table dl dd:nth-of-type(9) {
  40 + width: 5%;
  41 + }
  42 +
  43 + .curr-schedule-table dl dt:nth-of-type(10), .curr-schedule-table dl dd:nth-of-type(10) {
  44 + width: 5%;
  45 + }
  46 +
  47 + .curr-schedule-table dl dt:nth-of-type(11), .curr-schedule-table dl dd:nth-of-type(11) {
  48 + width: 5%;
  49 + }
  50 +
  51 + .curr-schedule-table dl dt:nth-of-type(12), .curr-schedule-table dl dd:nth-of-type(12) {
  52 + width: 5%;
  53 + }
  54 +
  55 + .curr-schedule-table dl dt:nth-of-type(13), .curr-schedule-table dl dd:nth-of-type(13) {
  56 + width: 5%;
  57 + }
  58 +
  59 + .curr-schedule-table dl dt:nth-of-type(14), .curr-schedule-table dl dd:nth-of-type(14) {
  60 + width: 5%;
  61 + }
  62 +
  63 + .curr-schedule-table dl dt:nth-of-type(15), .curr-schedule-table dl dd:nth-of-type(15) {
  64 + width: 5%;
  65 + }
  66 +
  67 + .curr-schedule-table dl dt:nth-of-type(16), .curr-schedule-table dl dd:nth-of-type(16) {
  68 + width: 5%;
  69 + }
  70 +
  71 + .curr-schedule-table dl dt:nth-of-type(17), .curr-schedule-table dl dd:nth-of-type(17) {
  72 + width: 5%;
  73 + }
  74 +
  75 + .curr-schedule-table dl dt:nth-of-type(18), .curr-schedule-table dl dd:nth-of-type(18) {
  76 + width: 5%;
  77 + }
  78 + </style>
  79 +
  80 + <div class="uk-modal-dialog uk-modal-dialog-large">
  81 + <a href="" class="uk-modal-close uk-close"></a>
  82 + <div class="uk-modal-header">
  83 + <h2>当日计划排班</h2></div>
  84 +
  85 + <div class="uk-grid uk-grid-collapse">
  86 + <div class="uk-width-medium-1-10">
  87 + <ul class="uk-list uk-list-line uk-width-medium-1-1">
  88 + <li>219路</li>
  89 + <li>784路</li>
  90 + <li>166路</li>
  91 + </ul>
  92 + </div>
  93 + <div class="uk-width-medium-9-10">
  94 + <div class="ct_table_wrap">
  95 + <div class="ct_table curr-schedule-table">
  96 + <div class="ct_table_head">
  97 + <dl>
  98 + <dt>日期</dt>
  99 + <dt>线路ID</dt>
  100 + <dt>路牌名</dt>
  101 + <dt>车辆编号</dt>
  102 + <dt>车牌号码</dt>
  103 + <dt>日车辆营运状态</dt>
  104 + <dt>驾工号1</dt>
  105 + <dt>驾驶员1</dt>
  106 + <dt>售工号1</dt>
  107 + <dt>售票员1</dt>
  108 + <dt>驾工号2</dt>
  109 + <dt>驾驶员2</dt>
  110 + <dt>售工号2</dt>
  111 + <dt>售票员2</dt>
  112 + <dt>驾工号3</dt>
  113 + <dt>驾驶员3</dt>
  114 + <dt>售工号3</dt>
  115 + <dt>售票员3</dt>
  116 + </dl>
  117 + </div>
  118 + <div class="ct_table_body">
  119 +
  120 + </div>
  121 + </div>
  122 + </div>
  123 + </div>
  124 + </div>
  125 + </div>
  126 +
  127 +
  128 + <script>
  129 + (function () {
  130 + var modal = '#curr-date-schedule-modal';
  131 +
  132 + $(modal).on('init', function (e, data) {
  133 + e.stopPropagation();
  134 +
  135 +
  136 + });
  137 +
  138 +
  139 + var query = function () {
  140 +
  141 + };
  142 + })();
  143 + </script>
  144 +</div>
src/main/resources/static/real_control_v2/fragments/north/toolbar.html
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 <a>{{obj.text}} <i class="uk-icon-caret-down"></i></a> 11 <a>{{obj.text}} <i class="uk-icon-caret-down"></i></a>
12 {{if obj.children != null}} 12 {{if obj.children != null}}
13 <div class="uk-dropdown uk-dropdown-navbar uk-dropdown-bottom" style="top: 40px; left: 0px;"> 13 <div class="uk-dropdown uk-dropdown-navbar uk-dropdown-bottom" style="top: 40px; left: 0px;">
14 - <ul class="uk-nav uk-nav-navbar"> 14 + <ul class="uk-nav uk-nav-navbar uk-dropdown-close">
15 {{each obj.children as c j}} 15 {{each obj.children as c j}}
16 {{if c.header}} 16 {{if c.header}}
17 <li class="uk-nav-header">{{c.text}}</li> 17 <li class="uk-nav-header">{{c.text}}</li>
@@ -29,7 +29,7 @@ @@ -29,7 +29,7 @@
29 <div class="uk-grid uk-dropdown-grid"> 29 <div class="uk-grid uk-dropdown-grid">
30 {{each obj.grid as cls s}} 30 {{each obj.grid as cls s}}
31 <div class="{{obj.cls_class}}"> 31 <div class="{{obj.cls_class}}">
32 - <ul class="uk-nav uk-nav-dropdown uk-panel"> 32 + <ul class="uk-nav uk-nav-dropdown uk-panel uk-dropdown-close">
33 {{each cls as c z}} 33 {{each cls as c z}}
34 {{if c.header}} 34 {{if c.header}}
35 <li class="uk-nav-header">{{c.text}}</li> 35 <li class="uk-nav-header">{{c.text}}</li>
@@ -76,7 +76,7 @@ @@ -76,7 +76,7 @@
76 <a>{{obj.text}} <i class="uk-icon-caret-down"></i></a> 76 <a>{{obj.text}} <i class="uk-icon-caret-down"></i></a>
77 {{if obj.children != null}} 77 {{if obj.children != null}}
78 <div class="uk-dropdown uk-dropdown-navbar uk-dropdown-bottom" style="top: 40px; left: 0px;"> 78 <div class="uk-dropdown uk-dropdown-navbar uk-dropdown-bottom" style="top: 40px; left: 0px;">
79 - <ul class="uk-nav uk-nav-navbar"> 79 + <ul class="uk-nav uk-nav-navbar uk-dropdown-close">
80 {{each obj.children as c j}} 80 {{each obj.children as c j}}
81 {{if c.header}} 81 {{if c.header}}
82 <li class="uk-nav-header">{{c.text}}</li> 82 <li class="uk-nav-header">{{c.text}}</li>
@@ -94,7 +94,7 @@ @@ -94,7 +94,7 @@
94 <div class="uk-grid uk-dropdown-grid"> 94 <div class="uk-grid uk-dropdown-grid">
95 {{each obj.grid as cls s}} 95 {{each obj.grid as cls s}}
96 <div class="{{obj.cls_class}}"> 96 <div class="{{obj.cls_class}}">
97 - <ul class="uk-nav uk-nav-dropdown uk-panel"> 97 + <ul class="uk-nav uk-nav-dropdown uk-panel uk-dropdown-close">
98 {{each cls as c z}} 98 {{each cls as c z}}
99 {{if c.header}} 99 {{if c.header}}
100 <li class="uk-nav-header">{{c.text}}</li> 100 <li class="uk-nav-header">{{c.text}}</li>
src/main/resources/static/real_control_v2/js/data/json/north_toolbar.json
@@ -13,14 +13,14 @@ @@ -13,14 +13,14 @@
13 "header": 1 13 "header": 1
14 }, 14 },
15 { 15 {
16 - "id": 1.2,  
17 - "text": "历史班次维护",  
18 - "event": "history_sch_maintain"  
19 - },  
20 - {  
21 "id": 1.3, 16 "id": 1.3,
22 "text": "缓存数据管理", 17 "text": "缓存数据管理",
23 "event": "cache_data_manage" 18 "event": "cache_data_manage"
  19 + },
  20 + {
  21 + "id": 1.4,
  22 + "text": "历史班次维护",
  23 + "event": "history_sch_maintain"
24 } 24 }
25 ], 25 ],
26 [ 26 [
@@ -52,10 +52,6 @@ @@ -52,10 +52,6 @@
52 "icon": "uk-icon-pie-chart" 52 "icon": "uk-icon-pie-chart"
53 }, 53 },
54 { 54 {
55 - "id": 2.6,  
56 - "divider": true  
57 - },  
58 - {  
59 "id": 2.7, 55 "id": 2.7,
60 "text": "班次执行率", 56 "text": "班次执行率",
61 "event": "sch_exec_rate", 57 "event": "sch_exec_rate",
src/main/resources/static/real_control_v2/js/north/toolbar.js
@@ -176,6 +176,9 @@ var gb_northToolbar = (function () { @@ -176,6 +176,9 @@ var gb_northToolbar = (function () {
176 }, 176 },
177 form_allline: function () { 177 form_allline: function () {
178 gb_embed_form_hanlde.open_modal_form_fragment('/pages/mforms/alllines/allline.html', '营运线路名称统计表'); 178 gb_embed_form_hanlde.open_modal_form_fragment('/pages/mforms/alllines/allline.html', '营运线路名称统计表');
  179 + },
  180 + curr_date_schedule: function () {
  181 + open_modal('/real_control_v2/fragments/north/nav/curr_date_schedule.html', {}, modal_opts);
179 } 182 }
180 }; 183 };
181 184
src/main/resources/static/real_control_v2/mapmonitor/css/real.css
@@ -454,8 +454,8 @@ input[type=checkbox].disabled{ @@ -454,8 +454,8 @@ input[type=checkbox].disabled{
454 } 454 }
455 455
456 #playback_run_body{ 456 #playback_run_body{
457 - height: 680px;  
458 - max-height: 780px; 457 + height: 690px;
  458 + /*max-height: 780px;*/
459 } 459 }
460 460
461 #playback_run_body .pb_footer_tools{ 461 #playback_run_body .pb_footer_tools{
@@ -470,7 +470,7 @@ input[type=checkbox].disabled{ @@ -470,7 +470,7 @@ input[type=checkbox].disabled{
470 } 470 }
471 471
472 #playback_run_body .pb_footer_tools .uk-progress{ 472 #playback_run_body .pb_footer_tools .uk-progress{
473 - width: 75%; 473 + width: 73%;
474 margin: 25px 15px 0 1%; 474 margin: 25px 15px 0 1%;
475 cursor: pointer; 475 cursor: pointer;
476 } 476 }
@@ -482,7 +482,7 @@ input[type=checkbox].disabled{ @@ -482,7 +482,7 @@ input[type=checkbox].disabled{
482 .pb_tools_icon{ 482 .pb_tools_icon{
483 vertical-align: top; 483 vertical-align: top;
484 font-size: 32px; 484 font-size: 32px;
485 - margin: 15px 5px 0 5px; 485 + margin: 15px 3px 0 3px;
486 } 486 }
487 487
488 .pb_tools_icon i{ 488 .pb_tools_icon i{
@@ -492,12 +492,35 @@ input[type=checkbox].disabled{ @@ -492,12 +492,35 @@ input[type=checkbox].disabled{
492 .pb_log_panel{ 492 .pb_log_panel{
493 animation-delay: .1s; 493 animation-delay: .1s;
494 position: absolute; 494 position: absolute;
495 - width: 300px;  
496 - height: 600px; 495 + width: 315px;
  496 + height: 310px;
497 background: white; 497 background: white;
498 - right: 0;  
499 - bottom: 80px;  
500 - box-shadow: 1px 0px 5px 0 rgba(0,0,0,0.16), -1px 0px 10px 0 rgba(0,0,0,0.12); 498 + left: 10px;
  499 + top: 60px;
  500 + box-shadow: 1px 0px 5px 0 rgba(3, 169, 244, 0.4), -1px 0px 10px 0 rgba(3, 169, 244, 0.4);
  501 + overflow-x: hidden;
  502 + border: 1px solid #03A9F4;
  503 + border-radius: 0 0 5px 5px;
  504 +}
  505 +
  506 +.pb_log_panel .ct_table_body dl:nth-of-type(odd),
  507 +.pb_inout_station_panel .ct_table_body dl:nth-of-type(odd){
  508 + background: #fafafa;
  509 +}
  510 +
  511 +
  512 +.pb_inout_station_panel{
  513 + animation-delay: .1s;
  514 + position: absolute;
  515 + width: 315px;
  516 + height: 310px;
  517 + background: white;
  518 + left: 10px;
  519 + top: 380px;
  520 + box-shadow: 1px 0px 5px 0 rgba(3, 169, 244, 0.4), -1px 0px 10px 0 rgba(3, 169, 244, 0.4);
  521 + overflow-x: hidden;
  522 + border: 1px solid #03A9F4;
  523 + border-radius: 0 0 5px 5px;
501 } 524 }
502 525
503 #playback_run_body .map_wrap{ 526 #playback_run_body .map_wrap{
@@ -514,12 +537,22 @@ input[type=checkbox].disabled{ @@ -514,12 +537,22 @@ input[type=checkbox].disabled{
514 width: 14%; 537 width: 14%;
515 } 538 }
516 .pb_log_panel .ct_table dl dt:nth-of-type(3), .pb_log_panel .ct_table dl dd:nth-of-type(3) { 539 .pb_log_panel .ct_table dl dt:nth-of-type(3), .pb_log_panel .ct_table dl dd:nth-of-type(3) {
517 - width: 44%; 540 + width: 45%;
518 } 541 }
519 .pb_log_panel .ct_table dl dt:nth-of-type(4), .pb_log_panel .ct_table dl dd:nth-of-type(4) { 542 .pb_log_panel .ct_table dl dt:nth-of-type(4), .pb_log_panel .ct_table dl dd:nth-of-type(4) {
520 width: 16%; 543 width: 16%;
521 } 544 }
522 545
  546 +.pb_inout_station_panel .ct_table dl dt:nth-of-type(1), .pb_inout_station_panel .ct_table dl dd:nth-of-type(1) {
  547 + width: 24%;
  548 +}
  549 +.pb_inout_station_panel .ct_table dl dt:nth-of-type(2), .pb_inout_station_panel .ct_table dl dd:nth-of-type(2) {
  550 + width: 60%;
  551 +}
  552 +.pb_inout_station_panel .ct_table dl dt:nth-of-type(3), .pb_inout_station_panel .ct_table dl dd:nth-of-type(3) {
  553 + width: 15%;
  554 +}
  555 +
523 .pb_log_panel .ct_table .ct_table_body dl:last-child dd{ 556 .pb_log_panel .ct_table .ct_table_body dl:last-child dd{
524 border-bottom: 1px solid #dedede; 557 border-bottom: 1px solid #dedede;
525 } 558 }
@@ -597,4 +630,17 @@ input[type=checkbox].disabled{ @@ -597,4 +630,17 @@ input[type=checkbox].disabled{
597 630
598 .uk-nav-autocomplete>li.uk-active>a .desc{ 631 .uk-nav-autocomplete>li.uk-active>a .desc{
599 color: #fff; 632 color: #fff;
  633 +}
  634 +
  635 +.uk-button.play-btn{
  636 + width:70px;
  637 + border: 1px solid #2196F3;
  638 + color: #2196F3;
  639 + background: #fff;
  640 + transition: all .3s ease;
  641 +}
  642 +
  643 +.uk-button.play-btn[data-type=pause]{
  644 + color: #ff3c3c;
  645 + border: 1px solid #ff3c3c;
600 } 646 }
601 \ No newline at end of file 647 \ No newline at end of file
src/main/resources/static/real_control_v2/mapmonitor/fragments/playback/before_form.html
@@ -74,13 +74,6 @@ @@ -74,13 +74,6 @@
74 $('[name=eTime]', this).val(m.format('HH:mm')); 74 $('[name=eTime]', this).val(m.format('HH:mm'));
75 $('[name=sDate]', this).val(m.subtract(2, 'hour').format(rq)); 75 $('[name=sDate]', this).val(m.subtract(2, 'hour').format(rq));
76 $('[name=sTime]', this).val(m.format(sj)); 76 $('[name=sTime]', this).val(m.format(sj));
77 -  
78 -/* //test  
79 - $('[name=nbbm]', this).val('W9H-003');  
80 - $('[name=eDate]', this).val('2016-12-10');  
81 - $('[name=eTime]', this).val('09:00');  
82 - $('[name=sDate]', this).val('2016-12-10');  
83 - $('[name=sTime]', this).val('07:00');*/  
84 }); 77 });
85 78
86 var ONE_DAY = 1000 * 60 * 60 * 24; 79 var ONE_DAY = 1000 * 60 * 60 * 24;
src/main/resources/static/real_control_v2/mapmonitor/fragments/playback/run.html
1 <div id="playback_run_body"> 1 <div id="playback_run_body">
2 <div class="map_wrap"></div> 2 <div class="map_wrap"></div>
3 <!-- 日志输出 --> 3 <!-- 日志输出 -->
4 - <div class="pb_log_panel uk-animation-slide-right" style="overflow: auto;"> 4 + <div class="pb_log_panel uk-animation-slide-left" style="overflow-y: auto;">
5 <div class="ct_table" style="height: calc(100% - 30px);"> 5 <div class="ct_table" style="height: calc(100% - 30px);">
6 <div class="ct_table_head"> 6 <div class="ct_table_head">
7 <dl> 7 <dl>
@@ -15,7 +15,22 @@ @@ -15,7 +15,22 @@
15 </div> 15 </div>
16 </div> 16 </div>
17 </div> 17 </div>
18 - <div class="pb_footer_tools uk-animation-slide-bottom" onselectstart="return false;" style="-moz-user-select:none;"> 18 +
  19 + <!-- 进出站输出 -->
  20 + <div class="pb_inout_station_panel uk-animation-slide-left" style="overflow-y: auto;">
  21 + <div class="ct_table" style="height: calc(100% - 30px);">
  22 + <div class="ct_table_head">
  23 + <dl>
  24 + <dt>时间</dt>
  25 + <dt>站点</dt>
  26 + <dt>动作</dt>
  27 + </dl>
  28 + </div>
  29 + <div class="ct_table_body">
  30 + </div>
  31 + </div>
  32 + </div>
  33 + <div class="pb_footer_tools uk-animation-slide-bottom" onselectstart="return false;" style="-moz-user-select:none;">
19 <span class="ui-slider-tip">08:30.50</span> 34 <span class="ui-slider-tip">08:30.50</span>
20 <div class="uk-progress uk-progress-small uk-progress-success uk-progress-striped"> 35 <div class="uk-progress uk-progress-small uk-progress-success uk-progress-striped">
21 <div class="uk-progress-bar" style="width: 0;"></div> 36 <div class="uk-progress-bar" style="width: 0;"></div>
@@ -23,38 +38,44 @@ @@ -23,38 +38,44 @@
23 38
24 <div class="pb_tools_icon"> 39 <div class="pb_tools_icon">
25 <div class="uk-button-group"> 40 <div class="uk-button-group">
26 - <a class="uk-button" data-uk-tooltip title="快退" data-type="rewind"><i class="uk-icon-fast-backward"></i></a>  
27 - <a class="uk-button" data-uk-tooltip title="停止" data-type="stop"><i class="uk-icon-stop"></i></a>  
28 - <a class="uk-button play-btn" data-type="play"><i class="uk-icon-play"></i></a>  
29 - <a class="uk-button" data-uk-tooltip title="快进" data-type="fast_forward"><i class="uk-icon-fast-forward"></i></a> 41 + <a class="uk-button play-btn" data-type="play"><i class="uk-icon-play"></i> <span class="text">播放</span></a>
30 </div> 42 </div>
31 </div> 43 </div>
32 44
33 <div class="pb_tools_icon"> 45 <div class="pb_tools_icon">
34 <div class="uk-button-dropdown" data-uk-dropdown="{mode:'hover', pos:'top-left'}"> 46 <div class="uk-button-dropdown" data-uk-dropdown="{mode:'hover', pos:'top-left'}">
35 - <button class="uk-button"><i class="uk-icon-cog"> </i> 工具 <i class="uk-icon-caret-down"></i></button>  
36 - <div class="uk-dropdown uk-dropdown-bottom uk-dropdown-small" style="top: 30px; left: 0px;">  
37 - <ul class="uk-nav uk-nav-dropdown pb_dropdown_tool">  
38 - <!--<li><a>显示站点</a></li>  
39 - <li><a>显示电子围栏</a></li>  
40 - <li class="uk-nav-divider"></li>  
41 - <li><a>关闭日志输出</a></li>  
42 - <li class="uk-nav-divider"></li>-->  
43 - <li><a data-name="exportExcel" href="javascript:;" >导出轨迹</a></li> 47 + <button class="uk-button" id="speedIconBtn"><i class="uk-icon-close"> </i> <span class="text">1</span> <i class="uk-icon-caret-down"></i></button>
  48 + <div class="uk-dropdown uk-dropdown-bottom uk-dropdown-small"
  49 + style="top: 30px; left: 0px;min-width: auto;">
  50 + <ul class="uk-nav uk-nav-dropdown pb_dropdown_tool play_speed_list uk-dropdown-close">
  51 + <li><a data-value="30" href="javascript:;">1秒30帧</a></li>
  52 + <li><a data-value="20" href="javascript:;">1秒20帧</a></li>
  53 + <li><a data-value="10" href="javascript:;">1秒10帧</a></li>
  54 + <li><a data-value="7" href="javascript:;">1秒7帧</a></li>
  55 + <li><a data-value="5" href="javascript:;">1秒5帧</a></li>
  56 + <li><a data-value="1" href="javascript:;">1秒1帧</a></li>
44 </ul> 57 </ul>
45 </div> 58 </div>
46 </div> 59 </div>
47 </div> 60 </div>
  61 +
  62 + <div class="pb_tools_icon">
  63 + <button class="uk-button" disabled><i class="uk-icon-map-signs"></i> 电子围栏 <i class="uk-icon-caret-down"></i> </button>
  64 + </div>
  65 +
  66 + <div class="pb_tools_icon">
  67 + <a class="uk-button" id="exportExcelBtn" data-uk-tooltip title="导出轨迹"><i
  68 + class="uk-icon-file-excel-o"></i></a>
  69 + </div>
48 </div> 70 </div>
49 71
50 <script> 72 <script>
51 (function () { 73 (function () {
52 74
53 var logTemp = template.compile('{{each list as gps i}}<dl data-code="{{gps.road.ROAD_CODE}}">' + 75 var logTemp = template.compile('{{each list as gps i}}<dl data-code="{{gps.road.ROAD_CODE}}">' +
54 - '<dd>{{gps.timeStr}}</dd>' +  
55 - '<dd>{{gps.speed}}</dd>' +  
56 - '<dd>{{gps.road.ROAD_NAME}}</dd><dd>正常</dd></dl>{{/each}}');  
57 - 76 + '<dd>{{gps.timeStr}}</dd>' +
  77 + '<dd>{{gps.speed}}</dd>' +
  78 + '<dd>{{gps.road.ROAD_NAME}}</dd><dd>正常</dd></dl>{{/each}}');
58 79
59 80
60 var _body = '#playback_run_body' 81 var _body = '#playback_run_body'
@@ -93,11 +114,11 @@ @@ -93,11 +114,11 @@
93 }, 600); 114 }, 600);
94 115
95 //导出的文件名 116 //导出的文件名
96 - $('a[data-name=exportExcel]').attr('download', data.fileName); 117 + $('#exportExcelBtn').attr('download', data.fileName);
97 }); 118 });
98 119
99 $('.pb_tools_icon a.uk-button', _body).on('click', function () { 120 $('.pb_tools_icon a.uk-button', _body).on('click', function () {
100 - var type = $(this).data('type'); 121 + var type = $(this).attr('data-type');
101 switch (type) { 122 switch (type) {
102 case 'play': 123 case 'play':
103 play(); 124 play();
@@ -105,30 +126,26 @@ @@ -105,30 +126,26 @@
105 case 'pause': 126 case 'pause':
106 pause(); 127 pause();
107 break; 128 break;
108 - case 'fast_forward':  
109 - goto(index + 10);  
110 - break;  
111 - case 'rewind':  
112 - goto(index - 10);  
113 - break;  
114 - case 'stop':  
115 - pause();  
116 - break; 129 + /*case 'fast_forward':
  130 + goto(index + 10);
  131 + break;
  132 + case 'rewind':
  133 + goto(index - 10);
  134 + break;
  135 + case 'stop':
  136 + pause();
  137 + break;*/
117 } 138 }
118 }); 139 });
119 140
120 - $('.pb_dropdown_tool li a', _body).on('click', function () {  
121 - var name = $(this).data('name');  
122 - switch (name) {  
123 - case 'exportExcel':  
124 - var base64Str = gb_map_play_back.listToExcel(gpsArray);  
125 - $(this).attr('href', base64Str);  
126 - break;  
127 - } 141 + //导出excel
  142 + $('#exportExcelBtn', _body).on('click', function () {
  143 + var base64Str = gb_map_play_back.listToExcel(gpsArray);
  144 + $(this).attr('href', base64Str);
128 }); 145 });
129 146
130 function goto(ei) { 147 function goto(ei) {
131 - if(ei < 0 || ei >= len) 148 + if (ei < 0 || ei >= len)
132 return; 149 return;
133 150
134 bar.css('width', ei * step); 151 bar.css('width', ei * step);
@@ -149,12 +166,13 @@ @@ -149,12 +166,13 @@
149 for (var i = 0; i <= ei; i++) { 166 for (var i = 0; i <= ei; i++) {
150 trailArray.push(new BMap.Point(gpsArray[i].bd_lon, gpsArray[i].bd_lat)); 167 trailArray.push(new BMap.Point(gpsArray[i].bd_lon, gpsArray[i].bd_lat));
151 try { 168 try {
152 - if(i > 0 && logs[logs.length - 1].road.ROAD_CODE == gpsArray[i].road.ROAD_CODE) 169 + if (i > 0 && logs[logs.length - 1].road.ROAD_CODE == gpsArray[i].road.ROAD_CODE)
153 logs.pop(); 170 logs.pop();
154 } 171 }
155 - catch (e){} 172 + catch (e) {
  173 + }
156 174
157 - if(gpsArray[i].road) 175 + if (gpsArray[i].road)
158 logs.push(gpsArray[i]); 176 logs.push(gpsArray[i]);
159 } 177 }
160 trailPolyline.setPath(trailArray); 178 trailPolyline.setPath(trailArray);
@@ -164,15 +182,23 @@ @@ -164,15 +182,23 @@
164 //更新日志面板 182 //更新日志面板
165 logPanel.empty().html(logTemp({list: logs})); 183 logPanel.empty().html(logTemp({list: logs}));
166 logWrap.scrollTop(logWrap[0].scrollHeight); 184 logWrap.scrollTop(logWrap[0].scrollHeight);
  185 +
  186 + //重新填充进出站数据
  187 + $('.pb_inout_station_panel .ct_table_body', _body).html('');
  188 + for (var i = 0; i <= ei; i++) {
  189 + inoutStationWrite(gpsArray[i]);
  190 + }
  191 + inoutWrap.scrollTop(inoutWrap[0].scrollHeight);
167 } 192 }
168 193
169 //播放 194 //播放
170 function play() { 195 function play() {
171 $('.play-btn', _body) 196 $('.play-btn', _body)
172 - .data('type', 'pause') 197 + .attr('data-type', 'pause')
173 .find('i') 198 .find('i')
174 .removeClass('uk-icon-play') 199 .removeClass('uk-icon-play')
175 - .addClass('uk-icon-pause'); 200 + .addClass('uk-icon-pause')
  201 + .next().text('暂停');
176 pauseFlag = false; 202 pauseFlag = false;
177 progress.addClass('uk-active'); 203 progress.addClass('uk-active');
178 run(); 204 run();
@@ -186,7 +212,7 @@ @@ -186,7 +212,7 @@
186 function fixedToCenter() { 212 function fixedToCenter() {
187 toCenterTimer = setInterval(function () { 213 toCenterTimer = setInterval(function () {
188 map.panTo(marker.getPosition()); 214 map.panTo(marker.getPosition());
189 - }, 5000); 215 + }, 4000);
190 } 216 }
191 217
192 //暂停 218 //暂停
@@ -194,10 +220,11 @@ @@ -194,10 +220,11 @@
194 220
195 function pause() { 221 function pause() {
196 $('.play-btn', _body) 222 $('.play-btn', _body)
197 - .data('type', 'play') 223 + .attr('data-type', 'play')
198 .find('i') 224 .find('i')
199 .removeClass('uk-icon-pause') 225 .removeClass('uk-icon-pause')
200 - .addClass('uk-icon-play'); 226 + .addClass('uk-icon-play')
  227 + .next().text('播放');
201 pauseFlag = true; 228 pauseFlag = true;
202 progress.removeClass('uk-active'); 229 progress.removeClass('uk-active');
203 clearInterval(toCenterTimer); 230 clearInterval(toCenterTimer);
@@ -205,7 +232,8 @@ @@ -205,7 +232,8 @@
205 232
206 var index = 1; 233 var index = 1;
207 var len; 234 var len;
208 - 235 + var defaultRunSpeed = 1000;
  236 + var runSpeed = defaultRunSpeed;
209 function run() { 237 function run() {
210 //暂停 238 //暂停
211 if (pauseFlag) { 239 if (pauseFlag) {
@@ -214,7 +242,7 @@ @@ -214,7 +242,7 @@
214 } 242 }
215 //结束 243 //结束
216 if (index >= len) { 244 if (index >= len) {
217 - bar.css('width', '100%') 245 + bar.css('width', '100%');
218 pause(); 246 pause();
219 return; 247 return;
220 } 248 }
@@ -239,9 +267,11 @@ @@ -239,9 +267,11 @@
239 267
240 //日志输出 268 //日志输出
241 logWrite(gps, gpsArray[index - 1]); 269 logWrite(gps, gpsArray[index - 1]);
  270 + //到离站输出
  271 + inoutStationWrite(gps);
242 272
243 index++; 273 index++;
244 - setTimeout(run, 1000); 274 + setTimeout(run, runSpeed);
245 } 275 }
246 276
247 //初始化地图 277 //初始化地图
@@ -306,7 +336,7 @@ @@ -306,7 +336,7 @@
306 gb_ct_table.fixedHead(logWrap); 336 gb_ct_table.fixedHead(logWrap);
307 337
308 function logWrite(gps, prve) { 338 function logWrite(gps, prve) {
309 - if(!gps.road || !gps.road.ROAD_CODE) 339 + if (!gps.road || !gps.road.ROAD_CODE)
310 return; 340 return;
311 341
312 var code = gps.road.ROAD_CODE; 342 var code = gps.road.ROAD_CODE;
@@ -321,6 +351,36 @@ @@ -321,6 +351,36 @@
321 351
322 logWrap.scrollTop(logWrap[0].scrollHeight); 352 logWrap.scrollTop(logWrap[0].scrollHeight);
323 } 353 }
  354 +
  355 +
  356 + var inoutWrap = $('.pb_inout_station_panel', _body);
  357 + gb_ct_table.fixedHead(inoutWrap);
  358 + //进出站数据输出
  359 + function inoutStationWrite(gps) {
  360 + if (gps.inout_stop == -1)
  361 + return;
  362 +
  363 + var inoutInfo = gps['inout_stop_info'];
  364 + var htmlStr = '<dl>' +
  365 + '<dd>' + gps.timeStr + '</dd>' +
  366 + '<dd>' + inoutInfo.stopName + '</dd>' +
  367 + '<dd>' + (inoutInfo.inOut == 1 ? '出站' : '进站') + '</dd>' +
  368 + '</dl>';
  369 +
  370 + $('.pb_inout_station_panel .ct_table_body', _body).append(htmlStr);
  371 +
  372 + //滚动条
  373 + inoutWrap.scrollTop(inoutWrap[0].scrollHeight);
  374 + }
  375 +
  376 +
  377 +
  378 + //播放速度
  379 + $('.play_speed_list li a', _body).on('click', function () {
  380 + var speed = $(this).data('value');
  381 + runSpeed = defaultRunSpeed / speed;
  382 + $('#speedIconBtn .text', _body).text(speed);
  383 + });
324 })(); 384 })();
325 </script> 385 </script>
326 </div> 386 </div>
327 \ No newline at end of file 387 \ No newline at end of file