Commit ac15eac085e69061e76f8fcb76bc422700ca7741

Authored by 潘钊
2 parents c922dd44 2377da07

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

src/main/java/com/bsth/controller/oil/CwjyController.java
@@ -13,6 +13,8 @@ import org.springframework.web.bind.annotation.RequestParam; @@ -13,6 +13,8 @@ import org.springframework.web.bind.annotation.RequestParam;
13 import org.springframework.web.bind.annotation.RestController; 13 import org.springframework.web.bind.annotation.RestController;
14 14
15 import com.bsth.controller.BaseController; 15 import com.bsth.controller.BaseController;
  16 +import com.bsth.data.BasicData;
  17 +import com.bsth.entity.Line;
16 import com.bsth.entity.oil.Cwjy; 18 import com.bsth.entity.oil.Cwjy;
17 import com.bsth.entity.oil.Ylxxb; 19 import com.bsth.entity.oil.Ylxxb;
18 import com.bsth.entity.sys.SysUser; 20 import com.bsth.entity.sys.SysUser;
@@ -30,12 +32,15 @@ public class CwjyController extends BaseController<Cwjy, Integer>{ @@ -30,12 +32,15 @@ public class CwjyController extends BaseController<Cwjy, Integer>{
30 SysUser sysUser = SecurityUtils.getCurrentUser(); 32 SysUser sysUser = SecurityUtils.getCurrentUser();
31 t.setCreateDate(new Date()); 33 t.setCreateDate(new Date());
32 t.setXgr(sysUser.getUserName()); 34 t.setXgr(sysUser.getUserName());
  35 + t.setNbbm(t.getNbbm().trim().toUpperCase());
  36 + Line line=BasicData.nbbm2LineMap.get(t.getNbbm());
  37 + t.setLine(line == null?"" : line.getLineCode());
33 return service.save(t); 38 return service.save(t);
34 } 39 }
35 40
36 @RequestMapping(value = "/checkNbbm",method = RequestMethod.GET) 41 @RequestMapping(value = "/checkNbbm",method = RequestMethod.GET)
37 public int checkNbbm(Cwjy t){ 42 public int checkNbbm(Cwjy t){
38 - return service.checkNbbm(t.getNbbm().trim()); 43 + return service.checkNbbm(t);
39 } 44 }
40 45
41 @RequestMapping(value = "/queryList",method = RequestMethod.GET) 46 @RequestMapping(value = "/queryList",method = RequestMethod.GET)
src/main/java/com/bsth/entity/oil/Cwjy.java
@@ -26,6 +26,11 @@ public class Cwjy { @@ -26,6 +26,11 @@ public class Cwjy {
26 private String xgr; 26 private String xgr;
27 27
28 private Date createDate; 28 private Date createDate;
  29 +
  30 + private String line;
  31 +
  32 + @Transient
  33 + private String linename;
29 34
30 @Transient 35 @Transient
31 private String gsname; 36 private String gsname;
@@ -95,6 +100,24 @@ public class Cwjy { @@ -95,6 +100,24 @@ public class Cwjy {
95 public void setFgsname(String fgsname) { 100 public void setFgsname(String fgsname) {
96 this.fgsname = fgsname; 101 this.fgsname = fgsname;
97 } 102 }
  103 +
  104 + public String getLine() {
  105 + return line;
  106 + }
  107 +
  108 + public void setLine(String line) {
  109 + this.line = line;
  110 + }
  111 +
  112 + public String getLinename() {
  113 + return BasicData.lineCode2NameMap.get(this.line);
  114 + }
  115 +
  116 + public void setLinename(String linename) {
  117 + this.linename = linename;
  118 + }
  119 +
  120 +
98 121
99 122
100 } 123 }
src/main/java/com/bsth/entity/oil/Ylxxb.java
@@ -44,7 +44,8 @@ public class Ylxxb { @@ -44,7 +44,8 @@ public class Ylxxb {
44 private String gsname; 44 private String gsname;
45 @Transient 45 @Transient
46 private String fgsname; 46 private String fgsname;
47 - 47 + @Transient
  48 + private String linename;
48 @Transient 49 @Transient
49 private Double zjzl; 50 private Double zjzl;
50 51
@@ -193,6 +194,12 @@ public class Ylxxb { @@ -193,6 +194,12 @@ public class Ylxxb {
193 public void setZjzl(Double zjzl) { 194 public void setZjzl(Double zjzl) {
194 this.zjzl = zjzl; 195 this.zjzl = zjzl;
195 } 196 }
  197 + public String getLinename() {
  198 + return linename;
  199 + }
  200 + public void setLinename(String linename) {
  201 + this.linename = linename;
  202 + }
196 203
197 204
198 205
src/main/java/com/bsth/repository/oil/CwjyRepository.java
@@ -30,5 +30,8 @@ public interface CwjyRepository extends BaseRepository<Cwjy, Integer>{ @@ -30,5 +30,8 @@ public interface CwjyRepository extends BaseRepository<Cwjy, Integer>{
30 @Query(value="select * from bsth_c_cwjy where nbbm like %?1% and gsdm like %?2% and fgsdm like %?3%",nativeQuery=true) 30 @Query(value="select * from bsth_c_cwjy where nbbm like %?1% and gsdm like %?2% and fgsdm like %?3%",nativeQuery=true)
31 List<Cwjy> selectAll(String nbbm,String gsdm,String fgsdm); 31 List<Cwjy> selectAll(String nbbm,String gsdm,String fgsdm);
32 32
  33 + @Query(value="select * from bsth_c_cwjy where nbbm like %?1% and gsdm like %?2% and fgsdm like %?3% and line =?4",nativeQuery=true)
  34 + List<Cwjy> selectAll_s(String nbbm,String gsdm,String fgsdm,String line);
  35 +
33 36
34 } 37 }
src/main/java/com/bsth/service/excep/impl/NowOutboundServiceImpl.java
@@ -70,7 +70,7 @@ public class NowOutboundServiceImpl implements NowOutboundService{ @@ -70,7 +70,7 @@ public class NowOutboundServiceImpl implements NowOutboundService{
70 70
71 } 71 }
72 72
73 - sql +=" and endtimestamp - starttimestamp >10000 ";//yue越界超过10秒的才显示,有待探讨。 73 + sql +=" and endtimestamp - starttimestamp >10000 ";//越界超过30秒的才显示,有待探讨。
74 74
75 sql +=" order by starttimestamp limit ?,?"; 75 sql +=" order by starttimestamp limit ?,?";
76 76
src/main/java/com/bsth/service/oil/CwjyService.java
@@ -15,5 +15,5 @@ public interface CwjyService extends BaseService&lt;Cwjy, Integer&gt;{ @@ -15,5 +15,5 @@ public interface CwjyService extends BaseService&lt;Cwjy, Integer&gt;{
15 15
16 Map<String, Object> savejzl(Map<String, Object> map) throws Exception ; 16 Map<String, Object> savejzl(Map<String, Object> map) throws Exception ;
17 17
18 - int checkNbbm(String nbbm); 18 + int checkNbbm(Cwjy t);
19 } 19 }
src/main/java/com/bsth/service/oil/impl/CwjyServiceImpl.java
@@ -24,6 +24,7 @@ import org.springframework.stereotype.Service; @@ -24,6 +24,7 @@ import org.springframework.stereotype.Service;
24 import com.alibaba.fastjson.JSONArray; 24 import com.alibaba.fastjson.JSONArray;
25 import com.alibaba.fastjson.JSONObject; 25 import com.alibaba.fastjson.JSONObject;
26 import com.bsth.common.ResponseCode; 26 import com.bsth.common.ResponseCode;
  27 +import com.bsth.data.BasicData;
27 import com.bsth.entity.oil.Cwjy; 28 import com.bsth.entity.oil.Cwjy;
28 import com.bsth.entity.oil.Cyl; 29 import com.bsth.entity.oil.Cyl;
29 import com.bsth.entity.oil.Ylb; 30 import com.bsth.entity.oil.Ylb;
@@ -281,6 +282,7 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw @@ -281,6 +282,7 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw
281 String gsdm=map.get("gsdm_like").toString(); 282 String gsdm=map.get("gsdm_like").toString();
282 283
283 String fgsdm=map.get("fgsdm_like").toString(); 284 String fgsdm=map.get("fgsdm_like").toString();
  285 + String line =map.get("line_like").toString().trim();
284 /*String sql="SELECT a.gsdm as gsdm,a.fgsdm as fgsdm,a.nbbm as nbbm," 286 /*String sql="SELECT a.gsdm as gsdm,a.fgsdm as fgsdm,a.nbbm as nbbm,"
285 + "b.jyggh as jyggh,b.jzl as jzl ,b.stationid as stationid,b.jsy as jsy," 287 + "b.jyggh as jyggh,b.jzl as jzl ,b.stationid as stationid,b.jsy as jsy,"
286 + "b.nylx as nylx,b.yj as yj,b.bz as bz,b.id as id ,c.jsy as ldgh FROM bsth_c_cwjy a "+ 288 + "b.nylx as nylx,b.yj as yj,b.bz as bz,b.id as id ,c.jsy as ldgh FROM bsth_c_cwjy a "+
@@ -318,7 +320,13 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw @@ -318,7 +320,13 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw
318 return t; 320 return t;
319 } 321 }
320 }); 322 });
321 - List<Cwjy> cwList=repository.selectAll(nbbm, gsdm, fgsdm); 323 + List<Cwjy> cwList=null;
  324 + if(line.equals("")){
  325 + cwList = repository.selectAll(nbbm, gsdm, fgsdm);
  326 + }else{
  327 + cwList = repository.selectAll_s(nbbm, gsdm, fgsdm, line);
  328 + }
  329 +
322 String sql_ylb="SELECT nbbm,group_concat(jsy) AS jsy FROM bsth_c_ylb WHERE " 330 String sql_ylb="SELECT nbbm,group_concat(jsy) AS jsy FROM bsth_c_ylb WHERE "
323 + " to_days(rq) = to_days('"+rq+"') AND ssgsdm = '"+gsdm+"' AND " 331 + " to_days(rq) = to_days('"+rq+"') AND ssgsdm = '"+gsdm+"' AND "
324 + " fgsdm = '"+fgsdm+"' GROUP BY nbbm"; 332 + " fgsdm = '"+fgsdm+"' GROUP BY nbbm";
@@ -338,9 +346,6 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw @@ -338,9 +346,6 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw
338 Ylxxb y=null; 346 Ylxxb y=null;
339 for (int i = 0; i < cwList.size(); i++) { 347 for (int i = 0; i < cwList.size(); i++) {
340 Cwjy cwjy=cwList.get(i); 348 Cwjy cwjy=cwList.get(i);
341 - if(cwjy.getNbbm().equals("W7B-092")){  
342 - System.out.println();  
343 - }  
344 y=new Ylxxb(); 349 y=new Ylxxb();
345 y.setNylx(0); 350 y.setNylx(0);
346 y.setId(0); 351 y.setId(0);
@@ -348,6 +353,7 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw @@ -348,6 +353,7 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw
348 y.setGsdm(cwjy.getGsdm()); 353 y.setGsdm(cwjy.getGsdm());
349 y.setFgsdm(cwjy.getFgsdm()); 354 y.setFgsdm(cwjy.getFgsdm());
350 y.setNbbm(cwjy.getNbbm()); 355 y.setNbbm(cwjy.getNbbm());
  356 + y.setLinename(cwjy.getLinename());
351 for (int j = 0; j < yList.size(); j++) { 357 for (int j = 0; j < yList.size(); j++) {
352 Ylxxb ylxxb=yList.get(j); 358 Ylxxb ylxxb=yList.get(j);
353 if(y.getNbbm().equals(ylxxb.getNbbm())){ 359 if(y.getNbbm().equals(ylxxb.getNbbm())){
@@ -379,9 +385,10 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw @@ -379,9 +385,10 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw
379 } 385 }
380 386
381 @Override 387 @Override
382 - public int checkNbbm(String nbbm) { 388 + public int checkNbbm(Cwjy t) {
383 // TODO Auto-generated method stub 389 // TODO Auto-generated method stub
384 - String sql="select count(*) from bsth_c_cwjy where nbbm ='"+nbbm+"'"; 390 + String sql="select count(*) from bsth_c_cwjy where nbbm ='"+t.getNbbm()+"'"
  391 + + " and gsdm ='"+t.getFgsdm()+"' and fgsdm ='"+t.getFgsdm()+"'";
385 int cs=jdbcTemplate.queryForObject(sql, Integer.class); 392 int cs=jdbcTemplate.queryForObject(sql, Integer.class);
386 393
387 return cs; 394 return cs;
src/main/java/com/bsth/service/oil/impl/YlbServiceImpl.java
@@ -384,6 +384,7 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS @@ -384,6 +384,7 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
384 for (int i = 0; i < ylxxList.size(); i++) { 384 for (int i = 0; i < ylxxList.size(); i++) {
385 Ylxxb ylxxb = ylxxList.get(i); 385 Ylxxb ylxxb = ylxxList.get(i);
386 if (map.get("clZbh").toString().equals(ylxxb.getNbbm()) 386 if (map.get("clZbh").toString().equals(ylxxb.getNbbm())
  387 + && map.get("jGh").toString().equals(ylxxb.getJsy())
387 && ylxxb.getJylx()==1) { 388 && ylxxb.getJylx()==1) {
388 if(ylxxb.getJzl()>0){ 389 if(ylxxb.getJzl()>0){
389 fage2=true; 390 fage2=true;
src/main/java/com/bsth/service/oil/impl/YlxxbServiceImpl.java
@@ -176,6 +176,7 @@ public class YlxxbServiceImpl extends BaseServiceImpl&lt;Ylxxb,Integer&gt; implements @@ -176,6 +176,7 @@ public class YlxxbServiceImpl extends BaseServiceImpl&lt;Ylxxb,Integer&gt; implements
176 String jsy =jsonObject.getString("jsy"); 176 String jsy =jsonObject.getString("jsy");
177 Ylxxb ylxxb=repository.findOne(id); 177 Ylxxb ylxxb=repository.findOne(id);
178 ylxxb.setJsy(jsy); 178 ylxxb.setJsy(jsy);
  179 + ylxxb.setJylx(1);
179 repository.save(ylxxb); 180 repository.save(ylxxb);
180 } 181 }
181 newMap.put("status", ResponseCode.SUCCESS); 182 newMap.put("status", ResponseCode.SUCCESS);
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
@@ -2737,7 +2737,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -2737,7 +2737,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2737 if (a == 2) { 2737 if (a == 2) {
2738 x = b + 1; 2738 x = b + 1;
2739 y = x * 2; 2739 y = x * 2;
2740 - } else if (b == 1) { 2740 + } else if (a == 1) {
2741 x = b + 1; 2741 x = b + 1;
2742 y = x * 2 - 1; 2742 y = x * 2 - 1;
2743 } else { 2743 } else {
@@ -4075,7 +4075,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -4075,7 +4075,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
4075 if((zdsj_-zdsjActual_)>0){ 4075 if((zdsj_-zdsjActual_)>0){
4076 zdsjk =String.valueOf(zdsj_-zdsjActual_); 4076 zdsjk =String.valueOf(zdsj_-zdsjActual_);
4077 }else{ 4077 }else{
4078 - zdsjm =String.valueOf(zdsj_-zdsjActual_); 4078 + zdsjm =String.valueOf(zdsjActual_-zdsj_);
4079 } 4079 }
4080 } 4080 }
4081 tempMap.put("zdsjk" + x, zdsjk); 4081 tempMap.put("zdsjk" + x, zdsjk);
@@ -4102,7 +4102,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -4102,7 +4102,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
4102 if((zdsj_-fcsjActural_)>0){ 4102 if((zdsj_-fcsjActural_)>0){
4103 fcsjk =String.valueOf(zdsj_-fcsjActural_); 4103 fcsjk =String.valueOf(zdsj_-fcsjActural_);
4104 }else{ 4104 }else{
4105 - fcsjm =String.valueOf(zdsj_-fcsjActural_); 4105 + fcsjm =String.valueOf(fcsjActural_-zdsj_);
4106 } 4106 }
4107 } 4107 }
4108 tempMap.put("fcsjk" + x, fcsjk); 4108 tempMap.put("fcsjk" + x, fcsjk);
src/main/resources/static/pages/base/interval/js/interval-add-form.js
@@ -30,21 +30,18 @@ $(function(){ @@ -30,21 +30,18 @@ $(function(){
30 focusInvalid : true, 30 focusInvalid : true,
31 // 需要验证的表单元素 31 // 需要验证的表单元素
32 rules : { 32 rules : {
33 - // 公司名称编码  
34 'level' : { 33 'level' : {
35 // 必填项 34 // 必填项
36 required : true, 35 required : true,
37 // 最大长度 36 // 最大长度
38 maxlength: 10 37 maxlength: 10
39 }, 38 },
40 - // 公司名称  
41 'peak' : { 39 'peak' : {
42 // 必填项 40 // 必填项
43 required : true, 41 required : true,
44 // 最大长度 42 // 最大长度
45 maxlength: 10 43 maxlength: 10
46 }, 44 },
47 - // 公司名称  
48 'trough' : { 45 'trough' : {
49 // 必填项 46 // 必填项
50 required : true, 47 required : true,
src/main/resources/static/pages/base/interval/js/interval-edit-form.js
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 var intervalId = $.url().param('no'); 12 var intervalId = $.url().param('no');
13 // 如果参数ID不为空 13 // 如果参数ID不为空
14 if(intervalId) { 14 if(intervalId) {
15 - // 获取线路Id元素并设值 15 + // 获取间隔信息Id元素并设值
16 $('#intervalId').val(intervalId); 16 $('#intervalId').val(intervalId);
17 /** 根据ID查询详细信息 */ 17 /** 根据ID查询详细信息 */
18 $get('/interval/' + intervalId ,null, function(result){ 18 $get('/interval/' + intervalId ,null, function(result){
@@ -50,21 +50,18 @@ @@ -50,21 +50,18 @@
50 focusInvalid : true, 50 focusInvalid : true,
51 // 需要验证的表单元素 51 // 需要验证的表单元素
52 rules : { 52 rules : {
53 - // 公司名称编码  
54 'level' : { 53 'level' : {
55 // 必填项 54 // 必填项
56 required : true, 55 required : true,
57 // 最大长度 56 // 最大长度
58 maxlength: 10 57 maxlength: 10
59 }, 58 },
60 - // 公司名称  
61 'peak' : { 59 'peak' : {
62 // 必填项 60 // 必填项
63 required : true, 61 required : true,
64 // 最大长度 62 // 最大长度
65 maxlength: 10 63 maxlength: 10
66 }, 64 },
67 - // 公司名称  
68 'trough' : { 65 'trough' : {
69 // 必填项 66 // 必填项
70 required : true, 67 required : true,
src/main/resources/static/pages/excep/outBoundMap.html deleted 100644 → 0
1 -<link href="/pages/base/stationroute/css/bmap_base.css" rel="stylesheet" type="text/css" />  
2 -<div class="portlet-body">  
3 - <!-- 地图 -->  
4 - <div id="bmap_basic" class="bmaps"></div>  
5 -</div>  
6 -<!-- load事件 -->  
7 -<script src="/pages/excep/js/outboundmap-load.js"></script>  
8 -<!-- 线路类 -->  
9 -<script src="/pages/excep/js/outboundline.js"></script>  
10 -<!-- 绘图类 -->  
11 -<script src="/pages/base/stationroute/js/drawingManager.js"></script>  
12 -<!-- 地图类 -->  
13 -<script src="/pages/excep/js/outbound-map.js"></script>  
14 -<!-- 函数与方法 -->  
15 -<script src="/pages/excep/js/outboundmap-function.js"></script>  
16 -<!-- ajax请求类 -->  
17 -<script src="/pages/base/stationroute/js/stationroute-ajax-getdata.js"></script>  
18 -  
src/main/resources/static/pages/excep/outboundMap.html 0 → 100644
  1 +<style>
  2 + .play_back-layer .layui-layer-title{
  3 + height: 36px;
  4 + border-bottom: none;
  5 + }
  6 +</style>
  7 +
  8 +<div id="titleMap">
  9 +<button id="run" style="margin-left:10px" class="btn btn-sm green btn-outline filter-submit margin-bottom">运行</button>
  10 +</div>
  11 +<div id="BasicMap">
  12 +</div>
  13 +<style type="text/css">
  14 +
  15 +#BasicMap{
  16 + width: 100%;
  17 + border: 2px solid #fdfdfd;
  18 + height: calc(100% - 30px);
  19 + overflow: hidden;
  20 +}
  21 +</style>
  22 +<script type="text/javascript" src="/pages/excep/js/map.js"></script>
  23 +<script type="text/javascript" src="/pages/excep/js/line-list-function.js"></script>
  24 +
  25 +<script type="text/javascript">
  26 +$(function(){
  27 + var dataArr = window.localStorage.zbhAndDate.split(",");//获取页面传递过来的车辆自编号以及超速起始时间和超速结束时间
  28 + localStorage.clear();//清楚前端缓存
  29 + var vehicle = dataArr[0];
  30 + var startdate = dataArr[1];
  31 + var enddate = dataArr[2];
  32 + var lon = dataArr[3];//起点经度
  33 + var lat = dataArr[4];//起点纬度
  34 + var endLon = dataArr[5];//终点经度
  35 + var endLat = dataArr[6];//终点纬度
  36 + var lineid = dataArr[7];
  37 + var directionData = dataArr[8];
  38 + var pointObj;//坐标和速度组成的对象
  39 + var Points = [];//坐标和速度对象的集合
  40 + var coordinateArr = [];//坐标点数组
  41 + $.ajax({
  42 + type: "GET",
  43 + async:false,
  44 + url: '/nowbound/findPosition',
  45 + data: {vehicle:vehicle,startdate:startdate,enddate:enddate},
  46 + success: function(data){
  47 + $.each(data,function(i,item){
  48 + if(item.lon>1 && item.lat>1){
  49 + pointObj = new Object();
  50 + pointObj.coordinate = new BMap.Point(item.lon,item.lat);
  51 + pointObj.vehicle = item.vehicle;
  52 + Points.push(pointObj);
  53 + }
  54 + });
  55 + }
  56 + });
  57 + setTimeout(function(){
  58 + var map = BasicMap.init();//创建地图
  59 + $get('/sectionroute/findSection',{'line.id_eq' : lineid , 'directions_eq' :directionData},function(data) {
  60 + // 在地图上画出线路走向
  61 + PublicFunctions.linePanlThree(lineid,data,directionData);
  62 + });
  63 + var myP1 = new BMap.Point(lon,lat); //起点
  64 + var myP2 = new BMap.Point(endLon,endLat); //终点
  65 + for(i in Points){
  66 + coordinateArr.push(Points[i].coordinate);
  67 + }
  68 + var polyline = new BMap.Polyline(coordinateArr, {strokeColor:"red", strokeWeight:5, strokeOpacity:0.5});//创建折线
  69 + var myIcon = new BMap.Icon("/pages/excep/img/bus.png", new BMap.Size(32, 70), {//小车图片
  70 + imageOffset: new BMap.Size(5,20) //图片的偏移量。为了是图片底部中心对准坐标点。
  71 + });
  72 +
  73 + var carMk;
  74 + $(document).on('click', '#run', function() {
  75 + map.centerAndZoom(new BMap.Point(lon,lat),16);//地图中心点坐标 */
  76 + if(typeof(carMk)!="undefined"){
  77 + map.removeOverlay(carMk);//清空上一次的轨迹
  78 + }
  79 + carMk = new BMap.Marker(coordinateArr[0],{icon:myIcon});
  80 + map.addOverlay(polyline);//增加折线
  81 + var paths = coordinateArr.length;//获得有几个点
  82 + map.addOverlay(carMk);
  83 + i=0;
  84 + setTimeout(function(){
  85 + resetMkPoint(0);
  86 + },500);
  87 + function resetMkPoint(i){
  88 + carMk.setPosition(coordinateArr[i]);
  89 + if(i < paths-1){
  90 + setTimeout(function(){
  91 + i++;
  92 + resetMkPoint(i);
  93 + },500);
  94 + }
  95 + };
  96 +
  97 + });
  98 + }, 500);
  99 + });
  100 +</script>
  101 +
  102 +
src/main/resources/static/pages/excep/pdboundList.html
@@ -65,11 +65,9 @@ @@ -65,11 +65,9 @@
65 <tr role="row" class="filter"> 65 <tr role="row" class="filter">
66 <td></td> 66 <td></td>
67 <td> 67 <td>
68 -<!-- <input type="text" class="form-control form-filter input-sm" name="userName_like"> -->  
69 <select class="form-control" name="line" id="line" style="width: 150px;"></select> 68 <select class="form-control" name="line" id="line" style="width: 150px;"></select>
70 </td> 69 </td>
71 <td> 70 <td>
72 -<!-- <input type="text" class="form-control form-filter input-sm" name="nbbm"> -->  
73 <select class="form-control" name="nbbm" id="nbbm" style="width: 150px;"></select> 71 <select class="form-control" name="nbbm" id="nbbm" style="width: 150px;"></select>
74 </td> 72 </td>
75 <td> 73 <td>
@@ -128,7 +126,7 @@ @@ -128,7 +126,7 @@
128 {{/if}} 126 {{/if}}
129 </td> 127 </td>
130 <td> 128 <td>
131 - {{obj.id}} 129 + {{obj.address}}
132 </td> 130 </td>
133 <td> 131 <td>
134 {{obj.timestampDate}} 132 {{obj.timestampDate}}
@@ -137,7 +135,7 @@ @@ -137,7 +135,7 @@
137 <a class="btn default blue-stripe btn-sm lookTrajectory" data-vehicle ="{{obj.vehicle}}" 135 <a class="btn default blue-stripe btn-sm lookTrajectory" data-vehicle ="{{obj.vehicle}}"
138 data-startdate="{{obj.timestampDate}}" data-enddate="{{obj.endtimestampDate}}" 136 data-startdate="{{obj.timestampDate}}" data-enddate="{{obj.endtimestampDate}}"
139 data-lon="{{obj.lon}}" data-lat="{{obj.lat}}" data-endlon="{{obj.endlon}}" 137 data-lon="{{obj.lon}}" data-lat="{{obj.lat}}" data-endlon="{{obj.endlon}}"
140 - data-endlat="{{obj.endlat}}" data-lineid="{{obj.lineId}}" data-updown="{{obj.upDown}}"> 138 + data-endlat="{{obj.endlat}}" data-lineid="{{obj.line}}" data-updown="{{obj.upDown}}">
141 轨迹回放 139 轨迹回放
142 </a> 140 </a>
143 </td> 141 </td>
@@ -243,8 +241,8 @@ $(function(){ @@ -243,8 +241,8 @@ $(function(){
243 content:result,//内容 241 content:result,//内容
244 }); 242 });
245 }); 243 });
246 - })  
247 - return; 244 + })
  245 + return;
248 } 246 }
249 var result = listResult[index]; 247 var result = listResult[index];
250 new BMap.Geocoder().getLocation(new BMap.Point(result.lon,result.lat), function(rs){ 248 new BMap.Geocoder().getLocation(new BMap.Point(result.lon,result.lat), function(rs){
src/main/resources/static/pages/excep/speedingMap.html
@@ -25,6 +25,7 @@ @@ -25,6 +25,7 @@
25 <script type="text/javascript"> 25 <script type="text/javascript">
26 $(function(){ 26 $(function(){
27 var dataArr = window.localStorage.zbhAndDate.split(",");//获取页面传递过来的车辆自编号以及超速起始时间和超速结束时间 27 var dataArr = window.localStorage.zbhAndDate.split(",");//获取页面传递过来的车辆自编号以及超速起始时间和超速结束时间
  28 + localStorage.clear();//清楚前端缓存
28 var vehicle = dataArr[0]; 29 var vehicle = dataArr[0];
29 var startdate = dataArr[1]; 30 var startdate = dataArr[1];
30 var enddate = dataArr[2]; 31 var enddate = dataArr[2];
src/main/resources/static/pages/oil/jyglList.html
@@ -58,15 +58,15 @@ @@ -58,15 +58,15 @@
58 <tr role="row" class="heading"> 58 <tr role="row" class="heading">
59 <th width="2%">#</th> 59 <th width="2%">#</th>
60 <th width="10%">日期</th> 60 <th width="10%">日期</th>
61 - <th width="10%">公司</th>  
62 - <th width="10%">分公司</th> 61 + <th width="8%">公司</th>
  62 + <th width="8%">分公司</th>
  63 + <th width="8%">线路</th>
63 <th width="8%">车辆</th> 64 <th width="8%">车辆</th>
64 <th width="14%">驾驶员</th> 65 <th width="14%">驾驶员</th>
65 <th width="5%">加注量</th> 66 <th width="5%">加注量</th>
66 <th width="4%">加油站</th> 67 <th width="4%">加油站</th>
67 <th width="3%">加油类型</th> 68 <th width="3%">加油类型</th>
68 <th width="5%">加油工工号</th> 69 <th width="5%">加油工工号</th>
69 - <th width="3%">油价</th>  
70 <th width="4%">路单工号</th> 70 <th width="4%">路单工号</th>
71 <th width="4%">备注</th> 71 <th width="4%">备注</th>
72 <th width="10%">操作</th> 72 <th width="10%">操作</th>
@@ -83,6 +83,9 @@ @@ -83,6 +83,9 @@
83 <select class="form-control" name="fgsdm_like" id="jyglListFgsdmId" ></select> 83 <select class="form-control" name="fgsdm_like" id="jyglListFgsdmId" ></select>
84 </td> 84 </td>
85 <td> 85 <td>
  86 + <select class="form-control" name="line_like" id="line" style="width: 120px;"></select>
  87 + </td>
  88 + <td>
86 <input type="text" class="form-control form-filter input-sm" name="nbbh" id="nbbh"> 89 <input type="text" class="form-control form-filter input-sm" name="nbbh" id="nbbh">
87 </td> 90 </td>
88 <td></td> 91 <td></td>
@@ -92,7 +95,6 @@ @@ -92,7 +95,6 @@
92 <td></td> 95 <td></td>
93 <td></td> 96 <td></td>
94 <td></td> 97 <td></td>
95 - <td></td>  
96 <td> 98 <td>
97 <button class="btn btn-sm green btn-outline filter-submit margin-bottom" > 99 <button class="btn btn-sm green btn-outline filter-submit margin-bottom" >
98 <i class="fa fa-search"></i> 搜索</button> 100 <i class="fa fa-search"></i> 搜索</button>
@@ -124,6 +126,7 @@ @@ -124,6 +126,7 @@
124 <td> 126 <td>
125 {{obj.fgsname}} 127 {{obj.fgsname}}
126 </td> 128 </td>
  129 + <td>{{obj.linename}}</td>
127 <td> 130 <td>
128 {{obj.nbbm}} 131 {{obj.nbbm}}
129 </td> 132 </td>
@@ -153,7 +156,7 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep @@ -153,7 +156,7 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep
153 <input data-id="{{obj.nbbm}}" href="javascript:;" class="in_carpark_jyggh" 156 <input data-id="{{obj.nbbm}}" href="javascript:;" class="in_carpark_jyggh"
154 type="text" value="{{obj.jyggh}}" style=" width:45px" /> 157 type="text" value="{{obj.jyggh}}" style=" width:45px" />
155 </td> 158 </td>
156 - <td></td> 159 +
157 <td>{{obj.ldgh}}</td> 160 <td>{{obj.ldgh}}</td>
158 <td> 161 <td>
159 <input data-id="{{obj.nbbm}}" href="javascript:;" class="in_carpark_bz" 162 <input data-id="{{obj.nbbm}}" href="javascript:;" class="in_carpark_bz"
@@ -234,6 +237,27 @@ $(function(){ @@ -234,6 +237,27 @@ $(function(){
234 }); 237 });
235 238
236 239
  240 +
  241 + $.get('/report/lineList',function(xlList){
  242 + var data = [];
  243 + data.push({id: " ", text: "全部线路"});
  244 + $.get('/user/companyData', function(result){
  245 + for(var i = 0; i < result.length; i++){
  246 + var companyCode = result[i].companyCode;
  247 + var children = result[i].children;
  248 + for(var j = 0; j < children.length; j++){
  249 + var code = children[j].code;
  250 + for(var k=0;k < xlList.length;k++ ){
  251 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  252 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  253 + }
  254 + }
  255 + }
  256 + }
  257 + initPinYinSelect2('#line',data,'');
  258 +
  259 + });
  260 + });
237 // var gsqx=""; 261 // var gsqx="";
238 // var fgsqx=""; 262 // var fgsqx="";
239 263
src/main/resources/static/pages/oil/jyszAdd.html
@@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
33 <label class="col-md-3 control-label">内部编码</label> 33 <label class="col-md-3 control-label">内部编码</label>
34 <div class="col-md-9"> 34 <div class="col-md-9">
35 <!-- <select class="form-control input-medium " name="nbbm" id="nbbm" ></select> --> 35 <!-- <select class="form-control input-medium " name="nbbm" id="nbbm" ></select> -->
36 - <input type="text" class="form-control input-medium" name="nbbm" > 36 + <input type="text" class="form-control" name="nbbm" style="width: 180px">
37 </div> 37 </div>
38 </div> 38 </div>
39 </div> 39 </div>
@@ -87,6 +87,8 @@ $(function(){ @@ -87,6 +87,8 @@ $(function(){
87 $('#fgsdm').html(options); 87 $('#fgsdm').html(options);
88 } 88 }
89 89
  90 +
  91 +
90 //提交 92 //提交
91 $('#addJyszModuleButton').on('click', function() { 93 $('#addJyszModuleButton').on('click', function() {
92 form.submit(); 94 form.submit();
@@ -98,7 +100,7 @@ $(function(){ @@ -98,7 +100,7 @@ $(function(){
98 focusInvalid : false, 100 focusInvalid : false,
99 rules : { 101 rules : {
100 nbbm : { 102 nbbm : {
101 - minlength : 2, 103 + minlength : 4,
102 required : true, 104 required : true,
103 maxlength : 10 105 maxlength : 10
104 } 106 }
@@ -125,7 +127,7 @@ $(function(){ @@ -125,7 +127,7 @@ $(function(){
125 error.hide(); 127 error.hide();
126 $get('/cwjy/checkNbbm',params,function(result){ 128 $get('/cwjy/checkNbbm',params,function(result){
127 if(result>0){ 129 if(result>0){
128 - layer.msg('该车辆已经添加.'); 130 + layer.msg('分公司该车辆已经添加.');
129 }else{ 131 }else{
130 $post('/cwjy', params, function(result){ 132 $post('/cwjy', params, function(result){
131 layer.msg('新增加油设置成功.'); 133 layer.msg('新增加油设置成功.');
src/main/resources/static/pages/oil/jyszList.html
@@ -21,8 +21,9 @@ @@ -21,8 +21,9 @@
21 </div> 21 </div>
22 <div class="actions"> 22 <div class="actions">
23 <!-- <a class="btn btn-circle blue" href="jyszAdd.html" data-pjax><i class="fa fa-plus"></i> 添加</a> --> 23 <!-- <a class="btn btn-circle blue" href="jyszAdd.html" data-pjax><i class="fa fa-plus"></i> 添加</a> -->
24 - <button type="button" class="btn btn-circle blue" id="addJysz"><i class="fa fa-trash"></i> 添加</button>  
25 -<!-- <button type="button" class="btn btn-circle blue" onclick="refreshJsTree()"><i class="fa fa-trash"></i>刷新</button> --> 24 + <button type="button" class="btn btn-circle blue" id="addJysz"><i class="fa fa-plus"></i> 添加</button>
  25 +<!--
  26 + <button type="button" class="btn btn-circle blue" onclick="refreshJsTree()"><i class="fa fa-trash"></i>刷新</button> -->
26 27
27 <!-- <div class="btn-group"> 28 <!-- <div class="btn-group">
28 <a class="btn red btn-outline btn-circle" href="javascript:;" 29 <a class="btn red btn-outline btn-circle" href="javascript:;"
@@ -60,8 +61,9 @@ @@ -60,8 +61,9 @@
60 <th width="15%">公司</th> 61 <th width="15%">公司</th>
61 <th width="13%">分公司</th> 62 <th width="13%">分公司</th>
62 <th width="10%">车辆</th> 63 <th width="10%">车辆</th>
  64 + <th width="10%">线路</th>
63 <th width="10%">修改人</th> 65 <th width="10%">修改人</th>
64 - <th width="20%">日期</th> 66 + <th width="10%">日期</th>
65 <th width="19%">操作</th> 67 <th width="19%">操作</th>
66 </tr> 68 </tr>
67 <tr role="row" class="filter"> 69 <tr role="row" class="filter">
@@ -77,6 +79,8 @@ @@ -77,6 +79,8 @@
77 </td> 79 </td>
78 <td> 80 <td>
79 </td> 81 </td>
  82 + <td>
  83 + </td>
80 <td></td> 84 <td></td>
81 <td> 85 <td>
82 <button class="btn btn-sm green btn-outline filter-submit margin-bottom" > 86 <button class="btn btn-sm green btn-outline filter-submit margin-bottom" >
@@ -107,6 +111,7 @@ @@ -107,6 +111,7 @@
107 <td>{{obj.gsname}}</td> 111 <td>{{obj.gsname}}</td>
108 <td>{{obj.fgsname}}</td> 112 <td>{{obj.fgsname}}</td>
109 <td>{{obj.nbbm}}</td> 113 <td>{{obj.nbbm}}</td>
  114 + <td>{{obj.linename}}</td>
110 <td>{{obj.xgr}}</td> 115 <td>{{obj.xgr}}</td>
111 <td>{{obj.createDate}}</td> 116 <td>{{obj.createDate}}</td>
112 <td> 117 <td>
@@ -236,6 +241,7 @@ $(function(){ @@ -236,6 +241,7 @@ $(function(){
236 $.each(data.content, function(i, obj) { 241 $.each(data.content, function(i, obj) {
237 obj.createDate = moment(obj.createDate).format("YYYY-MM-DD"); 242 obj.createDate = moment(obj.createDate).format("YYYY-MM-DD");
238 }); 243 });
  244 + console.log(data.content);
239 var bodyHtm = template('jysz_list_temp', {list: data.content}); 245 var bodyHtm = template('jysz_list_temp', {list: data.content});
240 246
241 $('#datatable_jysz tbody').html(bodyHtm) 247 $('#datatable_jysz tbody').html(bodyHtm)
@@ -288,7 +294,7 @@ $(function(){ @@ -288,7 +294,7 @@ $(function(){
288 for(var j = 0, item; item = items[j++];){ 294 for(var j = 0, item; item = items[j++];){
289 name = $(item).attr('name'); 295 name = $(item).attr('name');
290 if(name){ 296 if(name){
291 - params[name] = $(item).val(); 297 + params[name] = $(item).val().replace(/(^\s*)|(\s*$)/g, "");
292 } 298 }
293 } 299 }
294 }); 300 });
@@ -315,7 +321,6 @@ $(function(){ @@ -315,7 +321,6 @@ $(function(){
315 $.get('jyszAdd.html', function(m){$(pjaxContainer).append(m);}); 321 $.get('jyszAdd.html', function(m){$(pjaxContainer).append(m);});
316 }); 322 });
317 323
318 -  
319 }); 324 });
320 325
321 326