Commit 3756d5fe4b47b4a2b8c92b0a1c60a09448fce9d8

Authored by 廖磊
1 parent b650a337

班次到离站的站点搜索,油耗计算带上线路条件,添加场外加油设置时候验证车辆重复,路单

数据查询所有时候公里计算
src/main/java/com/bsth/controller/oil/CwjyController.java
@@ -33,6 +33,11 @@ public class CwjyController extends BaseController<Cwjy, Integer>{ @@ -33,6 +33,11 @@ public class CwjyController extends BaseController<Cwjy, Integer>{
33 return service.save(t); 33 return service.save(t);
34 } 34 }
35 35
  36 + @RequestMapping(value = "/checkNbbm",method = RequestMethod.GET)
  37 + public int checkNbbm(Cwjy t){
  38 + return service.checkNbbm(t.getNbbm().trim());
  39 + }
  40 +
36 @RequestMapping(value = "/queryList",method = RequestMethod.GET) 41 @RequestMapping(value = "/queryList",method = RequestMethod.GET)
37 public List<Ylxxb> queryList(@RequestParam Map<String, Object> map){ 42 public List<Ylxxb> queryList(@RequestParam Map<String, Object> map){
38 List<Ylxxb> pagequery=null; 43 List<Ylxxb> pagequery=null;
src/main/java/com/bsth/controller/report/ReportController.java
@@ -185,8 +185,8 @@ public class ReportController { @@ -185,8 +185,8 @@ public class ReportController {
185 return new ArrayList<Map<String, Object>>(); 185 return new ArrayList<Map<String, Object>>();
186 } 186 }
187 @RequestMapping(value = "/sreachZd", method = RequestMethod.GET) 187 @RequestMapping(value = "/sreachZd", method = RequestMethod.GET)
188 - public List<Map<String, String>> sreachPersonnel(@RequestParam String line,@RequestParam int zdlx,@RequestParam String zd) {  
189 - return service.sreachZd(line,zdlx, zd); 188 + public List<Map<String, String>> sreachPersonnel(@RequestParam String line,@RequestParam int zdlx) {
  189 + return service.sreachZd(line,zdlx);
190 } 190 }
191 191
192 192
src/main/java/com/bsth/repository/oil/YlbRepository.java
@@ -56,6 +56,11 @@ public interface YlbRepository extends BaseRepository&lt;Ylb, Integer&gt;{ @@ -56,6 +56,11 @@ public interface YlbRepository extends BaseRepository&lt;Ylb, Integer&gt;{
56 + " and xlbm like %?4% and nbbm like %?5% order by ?6 asc ",nativeQuery=true) 56 + " and xlbm like %?4% and nbbm like %?5% order by ?6 asc ",nativeQuery=true)
57 List<Ylb> obtainYl(String rq,String gsdm,String fgsdm,String xlbm,String nbbm,String px); 57 List<Ylb> obtainYl(String rq,String gsdm,String fgsdm,String xlbm,String nbbm,String px);
58 58
  59 + @Query(value="SELECT * FROM bsth_c_ylb where to_days(?1)=to_days(rq) and ssgsdm like %?2% "
  60 + + " and fgsdm like %?3%"
  61 + + " and xlbm = ?4 and nbbm like %?5% order by ?6 asc ",nativeQuery=true)
  62 + List<Ylb> obtainYl_eq(String rq,String gsdm,String fgsdm,String xlbm,String nbbm,String px);
  63 +
59 64
60 @Query(value="SELECT * FROM bsth_c_ylb where to_days(?1)=to_days(rq) and nbbm =?2 and jsy=?3 ",nativeQuery=true) 65 @Query(value="SELECT * FROM bsth_c_ylb where to_days(?1)=to_days(rq) and nbbm =?2 and jsy=?3 ",nativeQuery=true)
61 List<Ylb> queryListYlb(String rq,String nbbm,String jgh); 66 List<Ylb> queryListYlb(String rq,String nbbm,String jgh);
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
@@ -170,9 +170,12 @@ public interface ScheduleRealInfoRepository extends BaseRepository&lt;ScheduleRealI @@ -170,9 +170,12 @@ public interface ScheduleRealInfoRepository extends BaseRepository&lt;ScheduleRealI
170 List<ScheduleRealInfo> scheduleByDateAndLineYbb(String line,String date,String date2); 170 List<ScheduleRealInfo> scheduleByDateAndLineYbb(String line,String date,String date2);
171 171
172 172
173 - @Query(value="select new map(s.scheduleDate as scheduleDate,s.xlBm as xlBm,s.clZbh as clZbh,s.jGh as jGh,min(s.fcsj) as fcsj ) from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 and s.gsBm like %?3% and s.fgsBm like %?4% and s.clZbh like %?5% GROUP BY xlBm,clZbh,jGh,scheduleDate,jGh ORDER BY clZbh,fcsj") 173 + @Query(value="select new map(s.scheduleDate as scheduleDate,s.xlBm as xlBm,s.clZbh as clZbh,s.jGh as jGh,min(s.fcsj) as fcsj ) from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 and s.gsBm like %?3% and s.fgsBm like %?4% and s.clZbh like %?5% GROUP BY xlBm,clZbh,jGh,scheduleDate ORDER BY clZbh,fcsj")
174 List<Map<String,Object>> yesterdayDataList(String line,String date,String gsbm,String fgsbm,String nbbm); 174 List<Map<String,Object>> yesterdayDataList(String line,String date,String gsbm,String fgsbm,String nbbm);
175 175
  176 + @Query(value="select new map(s.scheduleDate as scheduleDate,s.xlBm as xlBm,s.clZbh as clZbh,s.jGh as jGh,min(s.fcsj) as fcsj ) from ScheduleRealInfo s where s.xlBm =?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 and s.gsBm like %?3% and s.fgsBm like %?4% and s.clZbh like %?5% GROUP BY xlBm,clZbh,jGh,scheduleDate ORDER BY clZbh,fcsj")
  177 + List<Map<String,Object>> yesterdayDataList_eq(String line,String date,String gsbm,String fgsbm,String nbbm);
  178 +
176 @Query(value="select s from ScheduleRealInfo s where DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?1 ORDER BY xlBm,lpName,clZbh,xlDir") 179 @Query(value="select s from ScheduleRealInfo s where DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?1 ORDER BY xlBm,lpName,clZbh,xlDir")
177 List<ScheduleRealInfo> setLD(String date); 180 List<ScheduleRealInfo> setLD(String date);
178 181
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
@@ -547,16 +547,18 @@ public class FormsServiceImpl implements FormsService { @@ -547,16 +547,18 @@ public class FormsServiceImpl implements FormsService {
547 }); 547 });
548 548
549 List<Ylb> listYlb= ylbRepository.obtainYl(startDate, gsdm, fgsdm, xlbm, "", "xlbm"); 549 List<Ylb> listYlb= ylbRepository.obtainYl(startDate, gsdm, fgsdm, xlbm, "", "xlbm");
550 - List<ScheduleRealInfo> listReal=scheduleRealInfoRepository.scheduleByDateAndLineTjrb(xlbm, startDate); 550 + List<ScheduleRealInfo> listReal=scheduleRealInfoRepository.scheduleByDateAndLine(xlbm, startDate);
551 for (int i = 0; i < list.size(); i++) { 551 for (int i = 0; i < list.size(); i++) {
552 List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>(); 552 List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>();
553 Singledata sin=list.get(i); 553 Singledata sin=list.get(i);
554 - sin.setxL(BasicData.lineCode2NameMap.get(sin.getxL())); 554 +
555 String jsy=sin.getJsy(); 555 String jsy=sin.getJsy();
556 String clzbh=sin.getClzbh(); 556 String clzbh=sin.getClzbh();
  557 + String xl=sin.getxL();
  558 + sin.setxL(BasicData.lineCode2NameMap.get(xl));
557 for (int j = 0; j < listReal.size(); j++) { 559 for (int j = 0; j < listReal.size(); j++) {
558 ScheduleRealInfo s=listReal.get(j); 560 ScheduleRealInfo s=listReal.get(j);
559 - if(s.getjGh().equals(jsy) && s.getClZbh().equals(clzbh)){ 561 + if(s.getjGh().equals(jsy) && s.getClZbh().equals(clzbh)&&s.getXlBm().equals(xl)){
560 newList.add(s); 562 newList.add(s);
561 } 563 }
562 } 564 }
src/main/java/com/bsth/service/oil/CwjyService.java
@@ -14,4 +14,6 @@ public interface CwjyService extends BaseService&lt;Cwjy, Integer&gt;{ @@ -14,4 +14,6 @@ public interface CwjyService extends BaseService&lt;Cwjy, Integer&gt;{
14 Ylxxb bynbbm(Map<String, Object> map); 14 Ylxxb bynbbm(Map<String, Object> map);
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 +
  18 + int checkNbbm(String nbbm);
17 } 19 }
src/main/java/com/bsth/service/oil/impl/CwjyServiceImpl.java
@@ -317,4 +317,13 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw @@ -317,4 +317,13 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw
317 return yList; 317 return yList;
318 } 318 }
319 319
  320 + @Override
  321 + public int checkNbbm(String nbbm) {
  322 + // TODO Auto-generated method stub
  323 + String sql="select count(*) from bsth_c_cwjy where nbbm ='"+nbbm+"'";
  324 + int cs=jdbcTemplate.queryForObject(sql, Integer.class);
  325 +
  326 + return cs;
  327 + }
  328 +
320 } 329 }
src/main/java/com/bsth/service/oil/impl/YlbServiceImpl.java
@@ -270,6 +270,7 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS @@ -270,6 +270,7 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
270 List<Ylb> addList = new ArrayList<Ylb>(); 270 List<Ylb> addList = new ArrayList<Ylb>();
271 List<Ylb> updateList = new ArrayList<Ylb>(); 271 List<Ylb> updateList = new ArrayList<Ylb>();
272 String ins=""; 272 String ins="";
  273 + Map<String, Object> ylMap=new HashMap<String, Object>();
273 for (int x = 0; x < listpb.size(); x++) { 274 for (int x = 0; x < listpb.size(); x++) {
274 String type = "add"; 275 String type = "add";
275 boolean sfdc = true; 276 boolean sfdc = true;
@@ -332,17 +333,23 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS @@ -332,17 +333,23 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
332 t.setCzyl(0.0); 333 t.setCzyl(0.0);
333 } 334 }
334 } 335 }
335 - 336 +
336 Double jzl = 0.0; 337 Double jzl = 0.0;
337 - // 把当天的YLXXB的加注量设置为当天YLB的加注量(根据车号,驾驶员判断)  
338 - for (int j = 0; j < ylxxList.size(); j++) {  
339 - Ylxxb ylxxb = ylxxList.get(j);  
340 - if (map.get("clZbh").toString().equals(ylxxb.getNbbm())  
341 - && map.get("jGh").toString().equals(ylxxb.getJsy())) {  
342 -// jzl += ylxxb.getJzl();  
343 - jzl =Arith.add(jzl, ylxxb.getJzl()); 338 + //一人一车加注量只匹配一次
  339 + if(ylMap.get(map.get("clZbh").toString()+"_"+ map.get("jGh").toString())!=null){
  340 +
  341 + }else{
  342 + // 把当天的YLXXB的加注量设置为当天YLB的加注量(根据车号,驾驶员判断)
  343 + for (int j = 0; j < ylxxList.size(); j++) {
  344 + Ylxxb ylxxb = ylxxList.get(j);
  345 + if (map.get("clZbh").toString().equals(ylxxb.getNbbm())
  346 + && map.get("jGh").toString().equals(ylxxb.getJsy())) {
  347 + jzl =Arith.add(jzl, ylxxb.getJzl());
  348 + }
344 } 349 }
  350 + ylMap.put(map.get("clZbh").toString()+"_"+ map.get("jGh").toString(),map.get("xlBm") == null ? "" : map.get("xlBm").toString());
345 } 351 }
  352 +
346 353
347 t.setJzl(jzl); 354 t.setJzl(jzl);
348 t.setNbbm(map.get("clZbh").toString()); 355 t.setNbbm(map.get("clZbh").toString());
@@ -435,8 +442,16 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS @@ -435,8 +442,16 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
435 // 获取车辆存油信息 442 // 获取车辆存油信息
436 List<Cyl> cylList = cylRepository.obtainCyl(nbbm,gsbm); 443 List<Cyl> cylList = cylRepository.obtainCyl(nbbm,gsbm);
437 // 指定日期YLB信息 444 // 指定日期YLB信息
438 - List<Ylb> ylbList =repository.obtainYl(rq,gsbm,fgsbm,"",nbbm,"nbbm,jcsx");  
439 - List<Ylb> iterator2=repository.obtainYl(rq,gsbm,fgsbm,"",nbbm,"jcsx"); 445 + List<Ylb> ylbList =new ArrayList<Ylb>();
  446 + List<Ylb> iterator2=new ArrayList<Ylb>();
  447 + if(xlbm.equals("")){
  448 + ylbList=repository.obtainYl(rq,gsbm,fgsbm,xlbm,nbbm,"jcsx");
  449 + iterator2=repository.obtainYl(rq,gsbm,fgsbm,xlbm,nbbm,"nbbm,jcsx");
  450 + }else{
  451 + ylbList=repository.obtainYl_eq(rq,gsbm,fgsbm,xlbm,nbbm,"jcsx");
  452 + iterator2=repository.obtainYl_eq(rq,gsbm,fgsbm,xlbm,nbbm,"nbbm,jcsx");
  453 + }
  454 +
440 for (int i=0;i<ylbList.size();i++) { 455 for (int i=0;i<ylbList.size();i++) {
441 Ylb ylb = ylbList.get(i); 456 Ylb ylb = ylbList.get(i);
442 // 判断是否已经计算过 457 // 判断是否已经计算过
@@ -499,9 +514,6 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS @@ -499,9 +514,6 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
499 t.setYh(yh); 514 t.setYh(yh);
500 t.setJzyl(nextJzyl); 515 t.setJzyl(nextJzyl);
501 } 516 }
502 -  
503 -  
504 -  
505 } else { 517 } else {
506 t.setCzyl(nextJzyl); 518 t.setCzyl(nextJzyl);
507 Double yh=0.0; 519 Double yh=0.0;
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
@@ -2983,16 +2983,22 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -2983,16 +2983,22 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2983 // String date = sdfMonth.format(org.apache.commons.lang.time.DateUtils.addDays(new Date(), -1)); 2983 // String date = sdfMonth.format(org.apache.commons.lang.time.DateUtils.addDays(new Date(), -1));
2984 // String date = "2016-09-20"; 2984 // String date = "2016-09-20";
2985 // System.out.println("shijian1:"+new Date()); 2985 // System.out.println("shijian1:"+new Date());
2986 - List<Map<String, Object>> yesterdayDataList = scheduleRealInfoRepository.yesterdayDataList(line, date,gsbm,fgsbm,nbbm); 2986 +
  2987 + List<Map<String, Object>> yesterdayDataList = new ArrayList<Map<String, Object>>();
  2988 + if(line.equals("")){
  2989 + yesterdayDataList=scheduleRealInfoRepository.yesterdayDataList(line, date,gsbm,fgsbm,nbbm);
  2990 + }else{
  2991 + yesterdayDataList=scheduleRealInfoRepository.yesterdayDataList_eq(line, date,gsbm,fgsbm,nbbm);
  2992 + }
  2993 +
2987 // System.out.println("shijian2:"+new Date()); 2994 // System.out.println("shijian2:"+new Date());
2988 // List<ScheduleRealInfo> list = scheduleRealInfoRepository.scheduleByDateAndLine(line, date); 2995 // List<ScheduleRealInfo> list = scheduleRealInfoRepository.scheduleByDateAndLine(line, date);
2989 List<ScheduleRealInfo> lists = scheduleRealInfoRepository.queryListWaybill3(jGh, nbbm, date,gsbm,fgsbm); 2996 List<ScheduleRealInfo> lists = scheduleRealInfoRepository.queryListWaybill3(jGh, nbbm, date,gsbm,fgsbm);
2990 // System.out.println("shijian3:"+new Date()); 2997 // System.out.println("shijian3:"+new Date());
2991 for (int x = 0; x < yesterdayDataList.size(); x++) { 2998 for (int x = 0; x < yesterdayDataList.size(); x++) {
2992 -  
2993 String jName = yesterdayDataList.get(x).get("jGh").toString(); 2999 String jName = yesterdayDataList.get(x).get("jGh").toString();
2994 String clZbh = yesterdayDataList.get(x).get("clZbh").toString(); 3000 String clZbh = yesterdayDataList.get(x).get("clZbh").toString();
2995 - 3001 + String xlbm = yesterdayDataList.get(x).get("xlBm").toString();
2996 // double jhlc = 0, yygl = 0, ksgl = 0, tempJhlc = 0, jcclc = 0; 3002 // double jhlc = 0, yygl = 0, ksgl = 0, tempJhlc = 0, jcclc = 0;
2997 double addMileage = 0, remMileage = 0; 3003 double addMileage = 0, remMileage = 0;
2998 Map<String, Object> map = new HashMap<String, Object>(); 3004 Map<String, Object> map = new HashMap<String, Object>();
@@ -3001,7 +3007,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -3001,7 +3007,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3001 String bCompany=""; 3007 String bCompany="";
3002 List<ScheduleRealInfo> listS=new ArrayList<ScheduleRealInfo>(); 3008 List<ScheduleRealInfo> listS=new ArrayList<ScheduleRealInfo>();
3003 for (ScheduleRealInfo scheduleRealInfo : lists) { 3009 for (ScheduleRealInfo scheduleRealInfo : lists) {
3004 - if(scheduleRealInfo.getjGh().equals(jName) && scheduleRealInfo.getClZbh().equals(clZbh)){ 3010 + if(scheduleRealInfo.getjGh().equals(jName) && scheduleRealInfo.getClZbh().equals(clZbh)
  3011 + && scheduleRealInfo.getXlBm().equals(xlbm)){
3005 if (fage) { 3012 if (fage) {
3006 //根据线路代码获取公司 3013 //根据线路代码获取公司
3007 company=scheduleRealInfo.getGsBm(); 3014 company=scheduleRealInfo.getGsBm();
src/main/java/com/bsth/service/report/ReportService.java
@@ -17,7 +17,7 @@ public interface ReportService { @@ -17,7 +17,7 @@ public interface ReportService {
17 List<ArrivalInfo> queryListClzd(String line,String zd,String zdlx,String fcsj,String ddsj); 17 List<ArrivalInfo> queryListClzd(String line,String zd,String zdlx,String fcsj,String ddsj);
18 List<StationRoute> queryStrinon(String line,int zd); 18 List<StationRoute> queryStrinon(String line,int zd);
19 List<Map<String, Object>> queryInOutStrtion(String line,String date,int zd,String lzsj); 19 List<Map<String, Object>> queryInOutStrtion(String line,String date,int zd,String lzsj);
20 - List<Map<String, String>> sreachZd(String line,int zdlx,String zd); 20 + List<Map<String, String>> sreachZd(String line,int zdlx);
21 21
22 List<Object[]> historyMessageCount(String line, String date, String code); 22 List<Object[]> historyMessageCount(String line, String date, String code);
23 23
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
@@ -252,18 +252,16 @@ public class ReportServiceImpl implements ReportService{ @@ -252,18 +252,16 @@ public class ReportServiceImpl implements ReportService{
252 return list; 252 return list;
253 } 253 }
254 @Override 254 @Override
255 - public List<Map<String, String>> sreachZd(String line, int zdlx,String zd) { 255 + public List<Map<String, String>> sreachZd(String line, int zdlx) {
256 List<Map<String, String>> list = new ArrayList<>(); 256 List<Map<String, String>> list = new ArrayList<>();
257 // TODO Auto-generated method stub 257 // TODO Auto-generated method stub
258 List<StationRoute> listSr=stationRoutRepository.findByLine(line,zdlx); 258 List<StationRoute> listSr=stationRoutRepository.findByLine(line,zdlx);
259 for (int i = 0; i < listSr.size(); i++) { 259 for (int i = 0; i < listSr.size(); i++) {
260 StationRoute t=listSr.get(i); 260 StationRoute t=listSr.get(i);
261 - if(t.getStationName().indexOf(zd)!=-1){  
262 - Map<String, String> newMap=new HashMap<String,String>();  
263 - newMap.put("id",t.getStationCode());  
264 - newMap.put("text", t.getStationName());  
265 - list.add(newMap);  
266 - } 261 + Map<String, String> newMap=new HashMap<String,String>();
  262 + newMap.put("id",t.getStationCode());
  263 + newMap.put("text", t.getStationName());
  264 + list.add(newMap);
267 } 265 }
268 return list; 266 return list;
269 } 267 }
src/main/resources/application-dev.properties
@@ -11,7 +11,9 @@ spring.datasource.driver-class-name= com.mysql.jdbc.Driver @@ -11,7 +11,9 @@ spring.datasource.driver-class-name= com.mysql.jdbc.Driver
11 spring.datasource.url= jdbc:mysql://127.0.0.1/control?useUnicode=true&characterEncoding=utf-8&useSSL=false 11 spring.datasource.url= jdbc:mysql://127.0.0.1/control?useUnicode=true&characterEncoding=utf-8&useSSL=false
12 spring.datasource.username= root 12 spring.datasource.username= root
13 spring.datasource.password= 13 spring.datasource.password=
14 - 14 +#spring.datasource.url= jdbc:mysql://192.168.168.117/pd_control?useUnicode=true&characterEncoding=utf-8&useSSL=false
  15 +#spring.datasource.username= root
  16 +#spring.datasource.password= root
15 #DATASOURCE 17 #DATASOURCE
16 spring.datasource.max-active=100 18 spring.datasource.max-active=100
17 spring.datasource.max-idle=8 19 spring.datasource.max-idle=8
@@ -27,6 +29,7 @@ spring.datasource.validation-query=select 1 @@ -27,6 +29,7 @@ spring.datasource.validation-query=select 1
27 ## 29 ##
28 #222.66.0.204:5555 30 #222.66.0.204:5555
29 ##\u5B9E\u65F6gps 31 ##\u5B9E\u65F6gps
  32 +http.gps.real.url= http://114.80.178.12:18080/transport_server/rtgps/
30 #http.gps.real.url= http://27.115.69.123:8800/transport_server/rtgps/ 33 #http.gps.real.url= http://27.115.69.123:8800/transport_server/rtgps/
31 ##\u6D88\u606F\u4E0B\u53D1 34 ##\u6D88\u606F\u4E0B\u53D1
32 -http.send.directive = http://192.168.168.201:9090/transport_server/message/ 35 +http.send.directive = http://192.168.168.201:9090/transport_server/message/
33 \ No newline at end of file 36 \ No newline at end of file
src/main/resources/static/pages/oil/jyszAdd.html
@@ -123,11 +123,18 @@ $(function(){ @@ -123,11 +123,18 @@ $(function(){
123 submitHandler : function(f) { 123 submitHandler : function(f) {
124 var params = form.serializeJSON(); 124 var params = form.serializeJSON();
125 error.hide(); 125 error.hide();
126 - $post('/cwjy', params, function(res){  
127 - layer.msg('新增加油设置成功.');  
128 - $('#add_jysz').modal('hide');  
129 - refreshJsTree();  
130 - }); 126 + $get('/cwjy/checkNbbm',params,function(result){
  127 + if(result>0){
  128 + layer.msg('该车辆已经添加.');
  129 + }else{
  130 + $post('/cwjy', params, function(result){
  131 + layer.msg('新增加油设置成功.');
  132 + $('#add_jysz').modal('hide');
  133 + refreshJsTree();
  134 + });
  135 + }
  136 + })
  137 +
131 } 138 }
132 }); 139 });
133 140
src/main/resources/static/pages/report/inoutstation.html
@@ -66,7 +66,7 @@ @@ -66,7 +66,7 @@
66 <span class="item-label" style="width: 60px;margin-left: 19px;">至: </span> 66 <span class="item-label" style="width: 60px;margin-left: 19px;">至: </span>
67 <input class="form-control" type="text" id="date2" style="width: 180px;"/> 67 <input class="form-control" type="text" id="date2" style="width: 180px;"/>
68 <span class="item-label" style="width: 80px;">站点: </span> 68 <span class="item-label" style="width: 80px;">站点: </span>
69 - <select class="form-control" id="zdlx" class="sreach-zd" > 69 + <select class="form-control sreach-zd" id="zdlx" >
70 <option value="">请选择</option> 70 <option value="">请选择</option>
71 <option value="0">上行</option> 71 <option value="0">上行</option>
72 <option value="1">下行</option> 72 <option value="1">下行</option>
@@ -426,55 +426,31 @@ @@ -426,55 +426,31 @@
426 }); 426 });
427 } 427 }
428 }) 428 })
  429 + $(".sreach-zd").on("change",initZd);
  430 + var status=false;
429 431
430 - $(".sreach-zd").click(function(){ 432 + function initZd(){
431 var line = $("#line").val(); 433 var line = $("#line").val();
432 var zdlx = $("#zdlx").val(); 434 var zdlx = $("#zdlx").val();
  435 + console.log(line+"===="+zdlx);
433 if(line==null|| line =="" || zdlx ==null || zdlx==""){ 436 if(line==null|| line =="" || zdlx ==null || zdlx==""){
434 -  
435 }else{ 437 }else{
436 - $('#zd').select2({  
437 - placeholder: '搜索站点...',  
438 - ajax: {  
439 - url: '/report/sreachZd',  
440 - dataType: 'json',  
441 - delay: 150,  
442 - data: function(params){  
443 - return{line: line,zdlx:zdlx,zd:params.term};  
444 - },  
445 - processResults: function (data) {  
446 - return {  
447 - results: data  
448 - };  
449 - },  
450 - cache: true  
451 - },  
452 - templateResult: function(repo){  
453 - if (repo.loading) return repo.text;  
454 - var h = '<span>'+repo.text+'</span>';  
455 - return h;  
456 - },  
457 - escapeMarkup: function (markup) { return markup; },  
458 - minimumInputLength: 1,  
459 - templateSelection: function(repo){  
460 - return repo.text;  
461 - },  
462 - language: {  
463 - noResults: function(){  
464 - return '<span style="color:red;font-size: 12px;">没有搜索到站点!</span>';  
465 - },  
466 - inputTooShort : function(e) {  
467 - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入站点名称</span>';  
468 - },  
469 - searching : function() {  
470 - return '<span style="color:gray;font-size: 12px;"> 正在搜索站点...</span>';  
471 - } 438 + $.get('/report/sreachZd',{line: line,zdlx:zdlx},function(result){
  439 + var zdList=result;
  440 + if(status){
  441 + $("#zd").select2("destroy").html('');
472 } 442 }
473 - }); 443 + console.log(zdList[0]["id"]);
  444 + var datas=[];
  445 + datas.push({id:" ",text:"全部"});
  446 + for(var i=0;i<zdList.length;i++){
  447 + datas.push({id: zdList[i]["id"], text: zdList[i]["text"]});
  448 + }
  449 + initPinYinSelect2('#zd',datas,'');
  450 + status=true;
  451 + })
474 } 452 }
475 - })  
476 -  
477 - 453 + }
478 454
479 $("#export").on("click",function(){ 455 $("#export").on("click",function(){
480 var rq=$("#date").val(); 456 var rq=$("#date").val();