Commit a2d14a12a3c0507661b375ac989b4d46f80147f2

Authored by 徐烜
2 parents 994786bf aa134516

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

src/main/java/com/bsth/controller/forms/ExportController.java
@@ -303,12 +303,10 @@ public class ExportController { @@ -303,12 +303,10 @@ public class ExportController {
303 m.put("fssj", l.getFssj()); 303 m.put("fssj", l.getFssj());
304 m.put("xgsj", l.getXgsj()); 304 m.put("xgsj", l.getXgsj());
305 m.put("pcch", l.getPcch()); 305 m.put("pcch", l.getPcch());
306 - m.put("pcry", l.getPcry());  
307 - m.put("jhch", l.getJhch());  
308 - m.put("jhgh", l.getJhgh());  
309 m.put("sjch", l.getSjch()); 306 m.put("sjch", l.getSjch());
  307 + m.put("fcgh", l.getPcry());
310 m.put("sjgh", l.getSjgh()); 308 m.put("sjgh", l.getSjgh());
311 - m.put("yy", l.getYy()); 309 + m.put("yy", l.getYy()==null?"":l.getYy());
312 m.put("xgr", l.getXgr()); 310 m.put("xgr", l.getXgr());
313 resList.add(m); 311 resList.add(m);
314 } 312 }
src/main/java/com/bsth/controller/forms/MCY_FormsController.java
@@ -66,7 +66,7 @@ public class MCY_FormsController { @@ -66,7 +66,7 @@ public class MCY_FormsController {
66 } 66 }
67 67
68 // 换人换车情况统计表 68 // 换人换车情况统计表
69 - @RequestMapping(value = "/changetochange", method = RequestMethod.POST) 69 + @RequestMapping(value = "/changetochange", method = RequestMethod.GET)
70 public List<Changetochange> changetochange(@RequestParam Map<String, Object> map) { 70 public List<Changetochange> changetochange(@RequestParam Map<String, Object> map) {
71 71
72 return formsService.changetochange(map); 72 return formsService.changetochange(map);
src/main/java/com/bsth/data/car_out_info/CarOutInfoHandler.java
1 package com.bsth.data.car_out_info; 1 package com.bsth.data.car_out_info;
2 2
3 -import com.bsth.Application;  
4 import com.bsth.data.BasicData; 3 import com.bsth.data.BasicData;
5 import com.bsth.data.schedule.DayOfSchedule; 4 import com.bsth.data.schedule.DayOfSchedule;
6 import com.bsth.data.schedule.ScheduleComparator; 5 import com.bsth.data.schedule.ScheduleComparator;
@@ -24,7 +23,6 @@ import org.springframework.transaction.support.DefaultTransactionDefinition; @@ -24,7 +23,6 @@ import org.springframework.transaction.support.DefaultTransactionDefinition;
24 import java.sql.PreparedStatement; 23 import java.sql.PreparedStatement;
25 import java.sql.SQLException; 24 import java.sql.SQLException;
26 import java.util.*; 25 import java.util.*;
27 -import java.util.concurrent.TimeUnit;  
28 26
29 /** 27 /**
30 * 发车信息表处理程序 28 * 发车信息表处理程序
@@ -208,7 +206,7 @@ public class CarOutInfoHandler implements CommandLineRunner, CarOutInfo { @@ -208,7 +206,7 @@ public class CarOutInfoHandler implements CommandLineRunner, CarOutInfo {
208 bcTypeMap.put("venting", "直放"); 206 bcTypeMap.put("venting", "直放");
209 bcTypeMap.put("major", "放站"); 207 bcTypeMap.put("major", "放站");
210 bcTypeMap.put("ldks", "两点间空驶"); 208 bcTypeMap.put("ldks", "两点间空驶");
211 - Application.mainServices.scheduleWithFixedDelay(updateInfoThread, 60, 40, TimeUnit.SECONDS); 209 + //Application.mainServices.scheduleWithFixedDelay(updateInfoThread, 60, 40, TimeUnit.SECONDS);
212 } 210 }
213 211
214 @Component 212 @Component
src/main/java/com/bsth/data/directive/DirectivesPstThread.java
1 package com.bsth.data.directive; 1 package com.bsth.data.directive;
2 2
  3 +import com.bsth.data.schedule.DayOfSchedule;
3 import com.bsth.entity.directive.D60; 4 import com.bsth.entity.directive.D60;
4 import com.bsth.entity.directive.D64; 5 import com.bsth.entity.directive.D64;
5 import com.bsth.entity.directive.Directive; 6 import com.bsth.entity.directive.Directive;
  7 +import com.bsth.entity.realcontrol.ScheduleRealInfo;
6 import com.bsth.repository.directive.D60Repository; 8 import com.bsth.repository.directive.D60Repository;
7 import com.bsth.repository.directive.D64Repository; 9 import com.bsth.repository.directive.D64Repository;
8 import org.slf4j.Logger; 10 import org.slf4j.Logger;
@@ -27,6 +29,9 @@ public class DirectivesPstThread extends Thread { @@ -27,6 +29,9 @@ public class DirectivesPstThread extends Thread {
27 @Autowired 29 @Autowired
28 D64Repository d64Repository; 30 D64Repository d64Repository;
29 31
  32 + @Autowired
  33 + DayOfSchedule dayOfSchedule;
  34 +
30 @Override 35 @Override
31 public void run() { 36 public void run() {
32 LinkedList<Directive> list = DayOfDirectives.pstDirectives; 37 LinkedList<Directive> list = DayOfDirectives.pstDirectives;
@@ -37,7 +42,14 @@ public class DirectivesPstThread extends Thread { @@ -37,7 +42,14 @@ public class DirectivesPstThread extends Thread {
37 directive = list.poll(); 42 directive = list.poll();
38 43
39 if (directive instanceof D60) { 44 if (directive instanceof D60) {
40 - d60Repository.save((D60) directive); 45 + D60 d60 = (D60) directive;
  46 + if(d60.isDispatch()){
  47 + ScheduleRealInfo sch = d60.getSch();
  48 + //如果关联的班次已经不存在了,放弃入库
  49 + if(dayOfSchedule.get(sch.getId()) == null)
  50 + continue;
  51 + }
  52 + d60Repository.save(d60);
41 } 53 }
42 54
43 if (directive instanceof D64) { 55 if (directive instanceof D64) {
src/main/java/com/bsth/data/gpsdata/thread/ThreadPollMonitor.java
1 -package com.bsth.data.gpsdata.thread;  
2 -  
3 -import com.bsth.data.gpsdata.arrival.GpsRealAnalyse;  
4 -import org.springframework.stereotype.Component;  
5 -  
6 -/**  
7 - * 线程池监听  
8 - * Created by panzhao on 2017/5/10.  
9 - */  
10 -@Component  
11 -public class ThreadPollMonitor extends Thread{  
12 -  
13 - @Override  
14 - public void run() {  
15 - long t = System.currentTimeMillis();  
16 -  
17 - if(t - GpsRealAnalyse.st > 3000 * 10){  
18 - GpsRealAnalyse.shutdown();  
19 - }  
20 - }  
21 -} 1 +package com.bsth.data.gpsdata.thread;
  2 +
  3 +import com.bsth.data.gpsdata.arrival.GpsRealAnalyse;
  4 +import org.springframework.stereotype.Component;
  5 +
  6 +/**
  7 + * 线程池监听
  8 + * Created by panzhao on 2017/5/10.
  9 + */
  10 +@Component
  11 +public class ThreadPollMonitor extends Thread{
  12 +
  13 + @Override
  14 + public void run() {
  15 + long t = System.currentTimeMillis();
  16 +
  17 + if(t - GpsRealAnalyse.st > 3000 * 10){
  18 + GpsRealAnalyse.shutdown();
  19 + }
  20 + }
  21 +}
src/main/java/com/bsth/entity/directive/D60.java
1 package com.bsth.entity.directive; 1 package com.bsth.entity.directive;
2 2
3 -import javax.persistence.Embeddable;  
4 -import javax.persistence.Entity;  
5 -import javax.persistence.FetchType;  
6 -import javax.persistence.GeneratedValue;  
7 -import javax.persistence.Id;  
8 -import javax.persistence.ManyToOne;  
9 -import javax.persistence.NamedAttributeNode;  
10 -import javax.persistence.NamedEntityGraph;  
11 -import javax.persistence.NamedEntityGraphs;  
12 -import javax.persistence.Table;  
13 -import javax.persistence.Transient;  
14 -  
15 import com.bsth.entity.realcontrol.ScheduleRealInfo; 3 import com.bsth.entity.realcontrol.ScheduleRealInfo;
16 import com.fasterxml.jackson.annotation.JsonIgnore; 4 import com.fasterxml.jackson.annotation.JsonIgnore;
17 5
  6 +import javax.persistence.*;
  7 +
18 8
19 /** 9 /**
20 * @author PanZhao 10 * @author PanZhao
@@ -75,7 +65,7 @@ public class D60 extends Directive { @@ -75,7 +65,7 @@ public class D60 extends Directive {
75 * 相关联的班次 65 * 相关联的班次
76 */ 66 */
77 @JsonIgnore 67 @JsonIgnore
78 - @ManyToOne(fetch = FetchType.LAZY) 68 + @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.REFRESH)
79 private ScheduleRealInfo sch; 69 private ScheduleRealInfo sch;
80 70
81 public Long getReply46Time() { 71 public Long getReply46Time() {
src/main/java/com/bsth/service/directive/DirectiveServiceImpl.java
@@ -132,14 +132,14 @@ public class DirectiveServiceImpl extends BaseServiceImpl&lt;D60, Integer&gt; implemen @@ -132,14 +132,14 @@ public class DirectiveServiceImpl extends BaseServiceImpl&lt;D60, Integer&gt; implemen
132 // 发送指令 132 // 发送指令
133 int code = GatewayHttpUtils.postJson(jObj.toJSONString()); 133 int code = GatewayHttpUtils.postJson(jObj.toJSONString());
134 134
135 - // 添加到缓存,等待入库  
136 d60.setDispatch(true); 135 d60.setDispatch(true);
137 d60.setSch(sch); 136 d60.setSch(sch);
138 d60.setHttpCode(code); 137 d60.setHttpCode(code);
139 - dayOfDirectives.put60(d60);  
140 138
141 if (code == 0) { 139 if (code == 0) {
142 sch.setDirectiveState(60); 140 sch.setDirectiveState(60);
  141 + // 添加到缓存,延迟入库
  142 + dayOfDirectives.put60(d60);
143 // 通知页面 143 // 通知页面
144 sendD60ToPage(sch); 144 sendD60ToPage(sch);
145 } 145 }
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
@@ -407,7 +407,19 @@ public class FormsServiceImpl implements FormsService { @@ -407,7 +407,19 @@ public class FormsServiceImpl implements FormsService {
407 407
408 rq = rq2 + "-" + rq3; 408 rq = rq2 + "-" + rq3;
409 409
410 - String sql = " select c.*,l.line_code from bsth_c_chtoch c LEFT JOIN bsth_c_line l on c.xl=l.name WHERE 1=1 "; 410 + String line="";
  411 + if(map.get("line")!=null){
  412 + line=map.get("line").toString().trim();
  413 + }
  414 + String gs="";
  415 + if(map.get("gsdm")!=null){
  416 + gs=map.get("gsdm").toString();
  417 + }
  418 + String fgs="";
  419 + if(map.get("fgsdm")!=null){
  420 + fgs =map.get("fgsdm").toString();
  421 + }
  422 + /*String sql = " select c.*,l.line_code from bsth_c_chtoch c LEFT JOIN bsth_c_line l on c.xl=l.name WHERE 1=1 ";
411 if (!map.get("startDate").toString().equals(" ") && !map.get("endDate").toString().equals(" ")) { 423 if (!map.get("startDate").toString().equals(" ") && !map.get("endDate").toString().equals(" ")) {
412 sql += "and DATE_FORMAT( c.rq,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '" 424 sql += "and DATE_FORMAT( c.rq,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '"
413 + map.get("endDate").toString() + "'"; 425 + map.get("endDate").toString() + "'";
@@ -419,18 +431,28 @@ public class FormsServiceImpl implements FormsService { @@ -419,18 +431,28 @@ public class FormsServiceImpl implements FormsService {
419 sql += " and c.pcch!=c.pcry"; 431 sql += " and c.pcch!=c.pcry";
420 } else if (map.get("sel").equals("1")) { 432 } else if (map.get("sel").equals("1")) {
421 sql += " and c.jhgh!=c.sjgh"; 433 sql += " and c.jhgh!=c.sjgh";
422 - } 434 + }*/
423 435
  436 + String sql="select * from bsth_c_chtoch where rq BETWEEN '"+ map.get("startDate").toString()+"' "
  437 + + " and '"+map.get("endDate").toString() +"'";
  438 +
  439 + if(!line.equals("")){
  440 + sql +=" and xl= '"+line+"'";
  441 + }else{
  442 + sql += " and gs= '"+gs+"' and fgs= '"+fgs+"'";
  443 + }
  444 +
  445 + sql +=" order by rq";
424 List<Changetochange> list = jdbcTemplate.query(sql, new RowMapper<Changetochange>() { 446 List<Changetochange> list = jdbcTemplate.query(sql, new RowMapper<Changetochange>() {
425 447
426 448
427 @Override 449 @Override
428 public Changetochange mapRow(ResultSet arg0, int arg1) throws SQLException { 450 public Changetochange mapRow(ResultSet arg0, int arg1) throws SQLException {
429 Changetochange chan = new Changetochange(); 451 Changetochange chan = new Changetochange();
430 - chan.setRq(rq);  
431 - chan.setGs(arg0.getString("gs"));  
432 - chan.setFgs(arg0.getString("fgs"));  
433 - chan.setXl(arg0.getString("xl")); 452 + chan.setRq(arg0.getString("rq"));
  453 + chan.setGs(BasicData.businessCodeNameMap.get(arg0.getString("gs")));
  454 + chan.setFgs(BasicData.businessFgsCodeNameMap.get(arg0.getString("fgs")+"_"+arg0.getString("gs")));
  455 + chan.setXl(BasicData.lineCode2NameMap.get(arg0.getString("xl")));
434 chan.setLp(arg0.getString("lp")); 456 chan.setLp(arg0.getString("lp"));
435 chan.setFssj(arg0.getString("fssj")); 457 chan.setFssj(arg0.getString("fssj"));
436 chan.setXgsj(arg0.getString("xgsj")); 458 chan.setXgsj(arg0.getString("xgsj"));
src/main/java/com/bsth/service/realcontrol/impl/ChildTaskPlanServiceImpl.java
@@ -51,11 +51,11 @@ public class ChildTaskPlanServiceImpl extends BaseServiceImpl&lt;ChildTaskPlan, Lon @@ -51,11 +51,11 @@ public class ChildTaskPlanServiceImpl extends BaseServiceImpl&lt;ChildTaskPlan, Lon
51 51
52 if(StringUtils.isEmpty(t.getEndStationName())) 52 if(StringUtils.isEmpty(t.getEndStationName()))
53 t.setEndStationName(BasicData.getStationNameByCode(t.getEndStation(), prefix)); 53 t.setEndStationName(BasicData.getStationNameByCode(t.getEndStation(), prefix));
  54 + if(t.getDestroyReason() == null)
  55 + t.setDestroyReason("");
54 //先持久化子任务 56 //先持久化子任务
55 rs = super.save(t); 57 rs = super.save(t);
56 //关联主任务 58 //关联主任务
57 - System.out.println("schschsch: " + sch);  
58 - System.out.println("sch.getcTasks()sch.getcTasks(): " + sch.getcTasks());  
59 sch.getcTasks().add(t); 59 sch.getcTasks().add(t);
60 dayOfSchedule.save(sch); 60 dayOfSchedule.save(sch);
61 //直接持久化 61 //直接持久化
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
@@ -41,6 +41,7 @@ import com.bsth.repository.schedule.EmployeeConfigInfoRepository; @@ -41,6 +41,7 @@ import com.bsth.repository.schedule.EmployeeConfigInfoRepository;
41 import com.bsth.repository.schedule.GuideboardInfoRepository; 41 import com.bsth.repository.schedule.GuideboardInfoRepository;
42 import com.bsth.security.util.SecurityUtils; 42 import com.bsth.security.util.SecurityUtils;
43 import com.bsth.service.SectionRouteService; 43 import com.bsth.service.SectionRouteService;
  44 +import com.bsth.service.directive.DirectiveService;
44 import com.bsth.service.impl.BaseServiceImpl; 45 import com.bsth.service.impl.BaseServiceImpl;
45 import com.bsth.service.realcontrol.ScheduleRealInfoService; 46 import com.bsth.service.realcontrol.ScheduleRealInfoService;
46 import com.bsth.service.report.CulateMileageService; 47 import com.bsth.service.report.CulateMileageService;
@@ -89,7 +90,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -89,7 +90,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
89 90
90 @Autowired 91 @Autowired
91 SectionRouteService sectionRouteService; 92 SectionRouteService sectionRouteService;
92 - 93 +
93 @Autowired 94 @Autowired
94 CulateMileageService culateMieageService; 95 CulateMileageService culateMieageService;
95 96
@@ -125,16 +126,19 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -125,16 +126,19 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
125 126
126 @Autowired 127 @Autowired
127 YlbRepository ylbRepository; 128 YlbRepository ylbRepository;
128 - 129 +
129 @Autowired 130 @Autowired
130 ReportService reposrService; 131 ReportService reposrService;
131 - 132 +
132 @Autowired 133 @Autowired
133 CulateMileageService culateService; 134 CulateMileageService culateService;
134 135
135 @Autowired 136 @Autowired
136 SchModifyLog schModifyLog; 137 SchModifyLog schModifyLog;
137 138
  139 + @Autowired
  140 + DirectiveService directiveService;
  141 +
138 Logger logger = LoggerFactory.getLogger(this.getClass()); 142 Logger logger = LoggerFactory.getLogger(this.getClass());
139 143
140 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), 144 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
@@ -620,6 +624,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -620,6 +624,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
620 //数据库删除 624 //数据库删除
621 rs = super.delete(id); 625 rs = super.delete(id);
622 if(rs.get("status").equals(ResponseCode.SUCCESS)){ 626 if(rs.get("status").equals(ResponseCode.SUCCESS)){
  627 + /*ScheduleRealInfo temp = super.findById(id);
  628 + if(temp != null){
  629 + rs.put("status", ResponseCode.ERROR);
  630 + rs.put("msg", "删除失败,请重试!");
  631 + return rs;
  632 + }*/
  633 +
623 dayOfSchedule.delete(sch); 634 dayOfSchedule.delete(sch);
624 //更新起点应到时间 635 //更新起点应到时间
625 List<ScheduleRealInfo> ts = dayOfSchedule.updateQdzTimePlan(sch); 636 List<ScheduleRealInfo> ts = dayOfSchedule.updateQdzTimePlan(sch);
@@ -729,39 +740,39 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -729,39 +740,39 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
729 List<ScheduleRealInfo> listNew = new ArrayList<ScheduleRealInfo>(); 740 List<ScheduleRealInfo> listNew = new ArrayList<ScheduleRealInfo>();
730 Pattern pattern = Pattern.compile("^[-\\+]?[\\d]*$"); 741 Pattern pattern = Pattern.compile("^[-\\+]?[\\d]*$");
731 // if (px.equals("desc")) { 742 // if (px.equals("desc")) {
732 - int zt = 0;  
733 - for (int l = 0; l < 2; l++) {  
734 - for (int i = 0; i < list.size(); i++) {  
735 - ScheduleRealInfo t = list.get(i);  
736 - if (t.getLpName().indexOf("+") != -1) {  
737 - if (zt == 0) {  
738 - listNew.add(t);  
739 - }  
740 - } else if (pattern.matcher(t.getLpName()).matches()) {  
741 - if (zt == 1) {  
742 - listNew.add(t);  
743 - }  
744 - } else { 743 + int zt = 0;
  744 + for (int l = 0; l < 2; l++) {
  745 + for (int i = 0; i < list.size(); i++) {
  746 + ScheduleRealInfo t = list.get(i);
  747 + if (t.getLpName().indexOf("+") != -1) {
  748 + if (zt == 0) {
  749 + listNew.add(t);
  750 + }
  751 + } else if (pattern.matcher(t.getLpName()).matches()) {
  752 + if (zt == 1) {
  753 + listNew.add(t);
  754 + }
  755 + } else {
745 // if (zt == 2) { 756 // if (zt == 2) {
746 // listNew.add(t); 757 // listNew.add(t);
747 // } 758 // }
748 - continue;  
749 - } 759 + continue;
750 } 760 }
751 - zt++;  
752 } 761 }
753 -  
754 - Collections.sort(list, new ComparableLp());  
755 - for (int i = 0; i < list.size(); i++) {  
756 - ScheduleRealInfo t = list.get(i);  
757 - if (t.getLpName().indexOf("+") != -1) {  
758 - continue;  
759 - } else if (pattern.matcher(t.getLpName()).matches()) {  
760 - continue;  
761 - } else {  
762 - listNew.add(t);  
763 - }  
764 - } 762 + zt++;
  763 + }
  764 +
  765 + Collections.sort(list, new ComparableLp());
  766 + for (int i = 0; i < list.size(); i++) {
  767 + ScheduleRealInfo t = list.get(i);
  768 + if (t.getLpName().indexOf("+") != -1) {
  769 + continue;
  770 + } else if (pattern.matcher(t.getLpName()).matches()) {
  771 + continue;
  772 + } else {
  773 + listNew.add(t);
  774 + }
  775 + }
765 /*} else { 776 /*} else {
766 int zt = 0; 777 int zt = 0;
767 for (int l = 0; l < 3; l++) { 778 for (int l = 0; l < 3; l++) {
@@ -804,17 +815,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -804,17 +815,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
804 List<ScheduleRealInfo> scheduleRealInfos = scheduleRealInfoRepository.queryListWaybill(jName, clZbh, lpName, date, line); 815 List<ScheduleRealInfo> scheduleRealInfos = scheduleRealInfoRepository.queryListWaybill(jName, clZbh, lpName, date, line);
805 List<Map<String, Object>> listMap = new ArrayList<Map<String, Object>>(); 816 List<Map<String, Object>> listMap = new ArrayList<Map<String, Object>>();
806 // List<ScheduleRealInfo> scheduleRealInfos=scheduleRealInfoRepository.queryListWaybillXcld(jName, clZbh, lpName, date, line); 817 // List<ScheduleRealInfo> scheduleRealInfos=scheduleRealInfoRepository.queryListWaybillXcld(jName, clZbh, lpName, date, line);
807 - List<ScheduleRealInfo> lists=new ArrayList<ScheduleRealInfo>();  
808 - for (int i = 0; i < scheduleRealInfos.size(); i++) {  
809 - ScheduleRealInfo s=scheduleRealInfos.get(i);  
810 - if(s.getZdsjActual()!=null){  
811 - lists.add(s);  
812 - }  
813 - } 818 + List<ScheduleRealInfo> lists=new ArrayList<ScheduleRealInfo>();
  819 + for (int i = 0; i < scheduleRealInfos.size(); i++) {
  820 + ScheduleRealInfo s=scheduleRealInfos.get(i);
  821 + if(s.getZdsjActual()!=null){
  822 + lists.add(s);
  823 + }
  824 + }
814 DecimalFormat format = new DecimalFormat("0.00"); 825 DecimalFormat format = new DecimalFormat("0.00");
815 // int cjbc = scheduleRealInfoRepository.findCjbc(jName, clZbh, lpName); 826 // int cjbc = scheduleRealInfoRepository.findCjbc(jName, clZbh, lpName);
816 // int ljbc = scheduleRealInfoRepository.findLjbc(jName, clZbh, lpName); 827 // int ljbc = scheduleRealInfoRepository.findLjbc(jName, clZbh, lpName);
817 - //计算里程和班次数,并放入Map里 828 + //计算里程和班次数,并放入Map里
818 Map<String, Object> map = this.MapById(scheduleRealInfos.get(0).getId()); 829 Map<String, Object> map = this.MapById(scheduleRealInfos.get(0).getId());
819 830
820 map.put("jhlc",Arith.add(culateMieageService.culateJhgl(scheduleRealInfos),culateMieageService.culateJhJccgl(scheduleRealInfos))); 831 map.put("jhlc",Arith.add(culateMieageService.culateJhgl(scheduleRealInfos),culateMieageService.culateJhJccgl(scheduleRealInfos)));
@@ -833,33 +844,33 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -833,33 +844,33 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
833 // map=new HashMap<String,Object>(); 844 // map=new HashMap<String,Object>();
834 Map<String, Object> maps; 845 Map<String, Object> maps;
835 for (ScheduleRealInfo scheduleRealInfo : scheduleRealInfos) { 846 for (ScheduleRealInfo scheduleRealInfo : scheduleRealInfos) {
836 - maps = new HashMap<String, Object>();  
837 - try {  
838 - scheduleRealInfo.setjName(scheduleRealInfo.getjGh() + scheduleRealInfo.getjName());  
839 - scheduleRealInfo.setsName(scheduleRealInfo.getsGh() + scheduleRealInfo.getsName());  
840 - maps = rru.getMapValue(scheduleRealInfo);  
841 - String zdsj = scheduleRealInfo.getZdsj();  
842 - String zdsjActual = scheduleRealInfo.getZdsjActual();  
843 - if (zdsj != null && zdsjActual != null &&  
844 - !zdsj.equals(zdsjActual)) {  
845 - if (zdsj.compareTo(zdsjActual) > 0) {  
846 - maps.put("fast", TimeUtils.getTimeDifference(zdsj, zdsjActual));  
847 - maps.put("slow", "");  
848 - } else {  
849 - maps.put("fast", "");  
850 - maps.put("slow", TimeUtils.getTimeDifference(zdsj, zdsjActual));  
851 - } 847 + maps = new HashMap<String, Object>();
  848 + try {
  849 + scheduleRealInfo.setjName(scheduleRealInfo.getjGh() + scheduleRealInfo.getjName());
  850 + scheduleRealInfo.setsName(scheduleRealInfo.getsGh() + scheduleRealInfo.getsName());
  851 + maps = rru.getMapValue(scheduleRealInfo);
  852 + String zdsj = scheduleRealInfo.getZdsj();
  853 + String zdsjActual = scheduleRealInfo.getZdsjActual();
  854 + if (zdsj != null && zdsjActual != null &&
  855 + !zdsj.equals(zdsjActual)) {
  856 + if (zdsj.compareTo(zdsjActual) > 0) {
  857 + maps.put("fast", TimeUtils.getTimeDifference(zdsj, zdsjActual));
  858 + maps.put("slow", "");
852 } else { 859 } else {
853 - maps.put("fast", "");  
854 - maps.put("slow", ""); 860 + maps.put("fast", "");
  861 + maps.put("slow", TimeUtils.getTimeDifference(zdsj, zdsjActual));
855 } 862 }
856 - listMap.add(maps);  
857 - } catch (Exception e) {  
858 - e.printStackTrace(); 863 + } else {
  864 + maps.put("fast", "");
  865 + maps.put("slow", "");
859 } 866 }
  867 + listMap.add(maps);
  868 + } catch (Exception e) {
  869 + e.printStackTrace();
  870 + }
860 } 871 }
861 872
862 - 873 +
863 874
864 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; 875 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
865 876
@@ -1269,6 +1280,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1269,6 +1280,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1269 ts.add(next); 1280 ts.add(next);
1270 } 1281 }
1271 1282
  1283 + if(!next.getXlBm().equals(sch.getXlBm())){
  1284 + directiveService.lineChange(next.getClZbh(), next.getXlBm(), "套跑@系统");
  1285 + }
  1286 +
1272 //重新计算车辆执行班次 1287 //重新计算车辆执行班次
1273 dayOfSchedule.reCalcExecPlan(sch.getClZbh()); 1288 dayOfSchedule.reCalcExecPlan(sch.getClZbh());
1274 } else if(StringUtils.isNotEmpty(sch.getZdsjActual()) && StringUtils.isEmpty(zdsjActual)){ 1289 } else if(StringUtils.isNotEmpty(sch.getZdsjActual()) && StringUtils.isEmpty(zdsjActual)){
@@ -1638,38 +1653,38 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1638,38 +1653,38 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1638 // map.put("zkslc", format.format(ksgl + jcclc+addMileageJc)); 1653 // map.put("zkslc", format.format(ksgl + jcclc+addMileageJc));
1639 return map; 1654 return map;
1640 }*/ 1655 }*/
1641 - 1656 +
1642 public Map<String, Object> findKMBC(String jGh, String clZbh, 1657 public Map<String, Object> findKMBC(String jGh, String clZbh,
1643 - String lpName, String date, String line) {  
1644 - Map<String, Object> map = new HashMap<String, Object>();  
1645 - List<ScheduleRealInfo> list=scheduleRealInfoRepository.queryListWaybillXcld(jGh, clZbh, lpName, date, line);  
1646 - List<ScheduleRealInfo> lists=new ArrayList<ScheduleRealInfo>();  
1647 - for (int i = 0; i < list.size(); i++) {  
1648 - ScheduleRealInfo s=list.get(i);  
1649 - if(s.getZdsjActual()!=null){  
1650 - lists.add(s);  
1651 - }  
1652 - }  
1653 - double ksgl=culateService.culateKsgl(list);  
1654 - double sjgl=culateService.culateSjgl(lists);  
1655 - double jccgl=culateService.culateJccgl(lists);  
1656 - double ljgl=culateService.culateLjgl(lists);  
1657 -  
1658 - map.put("jhlc", Arith.add(culateService.culateJhgl(list),culateService.culateJhJccgl(list))); //计划里程  
1659 - map.put("remMileage", culateService.culateLbgl(list)); //烂班公里  
1660 - map.put("addMileage", ljgl); //临加公里  
1661 - map.put("yygl",Arith.add(sjgl,ljgl)); //实际公里  
1662 - map.put("ksgl", ksgl);//空驶公里  
1663 - map.put("realMileage",Arith.add(Arith.add(ksgl,jccgl ),Arith.add(sjgl,ljgl))); 1658 + String lpName, String date, String line) {
  1659 + Map<String, Object> map = new HashMap<String, Object>();
  1660 + List<ScheduleRealInfo> list=scheduleRealInfoRepository.queryListWaybillXcld(jGh, clZbh, lpName, date, line);
  1661 + List<ScheduleRealInfo> lists=new ArrayList<ScheduleRealInfo>();
  1662 + for (int i = 0; i < list.size(); i++) {
  1663 + ScheduleRealInfo s=list.get(i);
  1664 + if(s.getZdsjActual()!=null){
  1665 + lists.add(s);
  1666 + }
  1667 + }
  1668 + double ksgl=culateService.culateKsgl(list);
  1669 + double sjgl=culateService.culateSjgl(lists);
  1670 + double jccgl=culateService.culateJccgl(lists);
  1671 + double ljgl=culateService.culateLjgl(lists);
  1672 +
  1673 + map.put("jhlc", Arith.add(culateService.culateJhgl(list),culateService.culateJhJccgl(list))); //计划里程
  1674 + map.put("remMileage", culateService.culateLbgl(list)); //烂班公里
  1675 + map.put("addMileage", ljgl); //临加公里
  1676 + map.put("yygl",Arith.add(sjgl,ljgl)); //实际公里
  1677 + map.put("ksgl", ksgl);//空驶公里
  1678 + map.put("realMileage",Arith.add(Arith.add(ksgl,jccgl ),Arith.add(sjgl,ljgl)));
1664 // map.put("realMileage", format.format(yygl + ksgl + jcclc+addMileage)); 1679 // map.put("realMileage", format.format(yygl + ksgl + jcclc+addMileage));
1665 - map.put("jhbc", culateService.culateJhbc(list,""));  
1666 - map.put("cjbc", culateService.culateLbbc(list));  
1667 - map.put("ljbc", culateService.culateLjbc(lists,""));  
1668 - map.put("sjbc", culateService.culateJhbc(lists,"") - culateService.culateLbbc(lists) + culateService.culateLjbc(lists,""));  
1669 - map.put("jcclc", jccgl);  
1670 - map.put("zkslc", Arith.add(ksgl,jccgl)); 1680 + map.put("jhbc", culateService.culateJhbc(list,""));
  1681 + map.put("cjbc", culateService.culateLbbc(list));
  1682 + map.put("ljbc", culateService.culateLjbc(lists,""));
  1683 + map.put("sjbc", culateService.culateJhbc(lists,"") - culateService.culateLbbc(lists) + culateService.culateLjbc(lists,""));
  1684 + map.put("jcclc", jccgl);
  1685 + map.put("zkslc", Arith.add(ksgl,jccgl));
1671 // map.put("zkslc", format.format(ksgl + jcclc+addMileageJc)); 1686 // map.put("zkslc", format.format(ksgl + jcclc+addMileageJc));
1672 - return map; 1687 + return map;
1673 } 1688 }
1674 1689
1675 1690
@@ -1792,38 +1807,38 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1792,38 +1807,38 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1792 list = scheduleRealInfoRepository.queryListWaybill(jName, clZbh, lpName, date, line); 1807 list = scheduleRealInfoRepository.queryListWaybill(jName, clZbh, lpName, date, line);
1793 SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm"); 1808 SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm");
1794 String sqlMinYysj="select start_opt from bsth_c_line_config where line = '"+BasicData.lineId2CodeMap.inverse().get(line) +"'"; 1809 String sqlMinYysj="select start_opt from bsth_c_line_config where line = '"+BasicData.lineId2CodeMap.inverse().get(line) +"'";
1795 - String minfcsj=jdbcTemplate.queryForObject(sqlMinYysj, String.class);  
1796 - String[] minSjs = minfcsj.split(":");  
1797 - Long minSj=Long.parseLong(minSjs[0])*60+Long.parseLong(minSjs[1]);  
1798 - 1810 + String minfcsj=jdbcTemplate.queryForObject(sqlMinYysj, String.class);
  1811 + String[] minSjs = minfcsj.split(":");
  1812 + Long minSj=Long.parseLong(minSjs[0])*60+Long.parseLong(minSjs[1]);
  1813 +
1799 for (int i = 0; i < list.size(); i++) { 1814 for (int i = 0; i < list.size(); i++) {
1800 - ScheduleRealInfo s=list.get(i);  
1801 - String[] fcsj= s.getFcsj().split(":");  
1802 - Long fcsjL=Long.parseLong(fcsj[0])*60+Long.parseLong(fcsj[1]);  
1803 -  
1804 - Long fscjT=0L;  
1805 - if(fcsjL<minSj){  
1806 - Calendar calendar = new GregorianCalendar();  
1807 - calendar.setTime(s.getScheduleDate());  
1808 - calendar.add(calendar.DATE,1);  
1809 - s.setScheduleDate(calendar.getTime());  
1810 - try {  
1811 - fscjT = sdf.parse(sdf.format(s.getScheduleDate())+" "+s.getFcsj()).getTime();  
1812 - } catch (ParseException e) {  
1813 - // TODO Auto-generated catch block  
1814 - e.printStackTrace();  
1815 - }  
1816 -  
1817 - }else{  
1818 - try {  
1819 - fscjT =sdf.parse(s.getScheduleDateStr()+" "+s.getFcsj()).getTime();  
1820 - } catch (ParseException e) {  
1821 - // TODO Auto-generated catch block  
1822 - e.printStackTrace();  
1823 - };  
1824 - }  
1825 - s.setFcsjT(fscjT);  
1826 - } 1815 + ScheduleRealInfo s=list.get(i);
  1816 + String[] fcsj= s.getFcsj().split(":");
  1817 + Long fcsjL=Long.parseLong(fcsj[0])*60+Long.parseLong(fcsj[1]);
  1818 +
  1819 + Long fscjT=0L;
  1820 + if(fcsjL<minSj){
  1821 + Calendar calendar = new GregorianCalendar();
  1822 + calendar.setTime(s.getScheduleDate());
  1823 + calendar.add(calendar.DATE,1);
  1824 + s.setScheduleDate(calendar.getTime());
  1825 + try {
  1826 + fscjT = sdf.parse(sdf.format(s.getScheduleDate())+" "+s.getFcsj()).getTime();
  1827 + } catch (ParseException e) {
  1828 + // TODO Auto-generated catch block
  1829 + e.printStackTrace();
  1830 + }
  1831 +
  1832 + }else{
  1833 + try {
  1834 + fscjT =sdf.parse(s.getScheduleDateStr()+" "+s.getFcsj()).getTime();
  1835 + } catch (ParseException e) {
  1836 + // TODO Auto-generated catch block
  1837 + e.printStackTrace();
  1838 + };
  1839 + }
  1840 + s.setFcsjT(fscjT);
  1841 + }
1827 Collections.sort(list, new ComparableReal()); 1842 Collections.sort(list, new ComparableReal());
1828 for (int i = 0; i < list.size(); i++) { 1843 for (int i = 0; i < list.size(); i++) {
1829 ScheduleRealInfo s = list.get(i); 1844 ScheduleRealInfo s = list.get(i);
@@ -1847,31 +1862,31 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1847,31 +1862,31 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1847 remarks += "(烂班)"; 1862 remarks += "(烂班)";
1848 s.setRemarks(remarks); 1863 s.setRemarks(remarks);
1849 } 1864 }
1850 - 1865 +
1851 listSchedule.add(s); 1866 listSchedule.add(s);
1852 //计算营运里程,空驶里程 1867 //计算营运里程,空驶里程
1853 if (!childTaskPlans.isEmpty()) { 1868 if (!childTaskPlans.isEmpty()) {
1854 // Iterator<ChildTaskPlan> it = childTaskPlans.iterator(); 1869 // Iterator<ChildTaskPlan> it = childTaskPlans.iterator();
1855 - List<ChildTaskPlan> listit=new ArrayList<ChildTaskPlan>(childTaskPlans);  
1856 - Collections.sort(listit, new ComparableChild());  
1857 - for (int j = 0; j < listit.size(); j++) {  
1858 - ScheduleRealInfo t = new ScheduleRealInfo();  
1859 - ChildTaskPlan childTaskPlan = listit.get(j);  
1860 - if (childTaskPlan.isDestroy()) {  
1861 - t.setFcsjActual("");  
1862 - t.setZdsjActual("");  
1863 - t.setJhlc(0.0);  
1864 - } else {  
1865 - t.setFcsjActual(childTaskPlan.getStartDate());  
1866 - t.setZdsjActual(childTaskPlan.getEndDate());  
1867 - t.setJhlc(Double.parseDouble(String.valueOf(childTaskPlan.getMileage())));  
1868 - }  
1869 - t.setQdzName(childTaskPlan.getStartStationName());  
1870 - t.setZdzName(childTaskPlan.getEndStationName());  
1871 - t.setRemarks(childTaskPlan.getRemarks());  
1872 - t.setAdjustExps("子");  
1873 - listSchedule.add(t);  
1874 - } 1870 + List<ChildTaskPlan> listit=new ArrayList<ChildTaskPlan>(childTaskPlans);
  1871 + Collections.sort(listit, new ComparableChild());
  1872 + for (int j = 0; j < listit.size(); j++) {
  1873 + ScheduleRealInfo t = new ScheduleRealInfo();
  1874 + ChildTaskPlan childTaskPlan = listit.get(j);
  1875 + if (childTaskPlan.isDestroy()) {
  1876 + t.setFcsjActual("");
  1877 + t.setZdsjActual("");
  1878 + t.setJhlc(0.0);
  1879 + } else {
  1880 + t.setFcsjActual(childTaskPlan.getStartDate());
  1881 + t.setZdsjActual(childTaskPlan.getEndDate());
  1882 + t.setJhlc(Double.parseDouble(String.valueOf(childTaskPlan.getMileage())));
  1883 + }
  1884 + t.setQdzName(childTaskPlan.getStartStationName());
  1885 + t.setZdzName(childTaskPlan.getEndStationName());
  1886 + t.setRemarks(childTaskPlan.getRemarks());
  1887 + t.setAdjustExps("子");
  1888 + listSchedule.add(t);
  1889 + }
1875 /* String sqlPc = "select * from bsth_c_s_child_task where schedule=" + s.getId() + " order by start_date "; 1890 /* String sqlPc = "select * from bsth_c_s_child_task where schedule=" + s.getId() + " order by start_date ";
1876 List<ScheduleRealInfo> lists = jdbcTemplate.query(sqlPc, 1891 List<ScheduleRealInfo> lists = jdbcTemplate.query(sqlPc,
1877 new RowMapper<ScheduleRealInfo>() { 1892 new RowMapper<ScheduleRealInfo>() {
@@ -1924,62 +1939,62 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1924,62 +1939,62 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1924 @Override 1939 @Override
1925 public List<Map<String, Object>> statisticsDaily(String line, String date, 1940 public List<Map<String, Object>> statisticsDaily(String line, String date,
1926 String xlName, String type) { 1941 String xlName, String type) {
1927 - List<Map<String, Object>> lMap= new ArrayList<Map<String, Object>>();  
1928 - List<ScheduleRealInfo>list_s=scheduleRealInfoRepository.scheduleByDateAndLine2(line, date);  
1929 - List<ScheduleRealInfo> lists =new ArrayList<ScheduleRealInfo>();  
1930 - for (int i = 0; i < list_s.size(); i++) {  
1931 - ScheduleRealInfo s=list_s.get(i);  
1932 - if(s.getZdsjActual()!=null){  
1933 - lists.add(s);  
1934 - }  
1935 - }  
1936 - Map<String, Object> map = new HashMap<String, Object>();  
1937 - map.put("xlName", xlName);  
1938 - double jhlc=culateService.culateJhgl(list_s);  
1939 - map.put("jhlc",jhlc);  
1940 - map.put("sjgl", Arith.add(culateService.culateSjgl(lists),culateService.culateLjgl(lists)));  
1941 - double lbgl=culateService.culateLbgl(list_s);  
1942 - map.put("ssgl", lbgl);  
1943 - map.put("ssgl_lz", culateService.culateCJLC(list_s, "路阻"));  
1944 - map.put("ssgl_dm", culateService.culateCJLC(list_s, "吊慢"));  
1945 - map.put("ssgl_gz", culateService.culateCJLC(list_s, "故障"));  
1946 - map.put("ssgl_jf", culateService.culateCJLC(list_s, "纠纷"));  
1947 - map.put("ssgl_zs", culateService.culateCJLC(list_s, "肇事"));  
1948 - map.put("ssgl_qr", culateService.culateCJLC(list_s, "缺人"));  
1949 - map.put("ssgl_qc", culateService.culateCJLC(list_s, "缺车"));  
1950 - map.put("ssgl_kx", culateService.culateCJLC(list_s, "客稀"));  
1951 - map.put("ssgl_qh", culateService.culateCJLC(list_s, "气候"));  
1952 - map.put("ssgl_yw", culateService.culateCJLC(list_s, "援外"));  
1953 - double ssgl_pc=culateService.culateCJLC(list_s, "配车");  
1954 - double ssgl_by=culateService.culateCJLC(list_s, "保养");  
1955 - double ssgl_cj=culateService.culateCJLC(list_s, "抽减");  
1956 - double ssgl_qt=culateService.culateCJLC(list_s, "其他");  
1957 - map.put("ssgl_other", Arith.add(Arith.add(ssgl_pc, ssgl_by),Arith.add(ssgl_cj, ssgl_qt)));  
1958 - map.put("ssbc", culateService.culateLbbc(list_s));  
1959 - double ljgl=culateService.culateLjgl(lists);  
1960 - map.put("ljgl", ljgl);  
1961 - map.put("jhbc", culateService.culateJhbc(list_s,""));  
1962 - map.put("jhbc_m", culateService.culateJhbc(list_s, "zgf"));  
1963 - map.put("jhbc_a", culateService.culateJhbc(list_s, "wgf"));  
1964 - map.put("sjbc", culateService.culateSjbc(lists,""));  
1965 - map.put("sjbc_m", culateService.culateSjbc(lists,"zgf"));  
1966 - map.put("sjbc_a", culateService.culateSjbc(lists,"wgf"));  
1967 - map.put("ljbc", culateService.culateLjbc(lists,""));  
1968 - map.put("ljbc_m", culateService.culateLjbc(lists,"zgf"));  
1969 - map.put("ljbc_a", culateService.culateLjbc(lists,"wgf"));  
1970 - map.put("fzbc", culateService.culateFzbc(lists, ""));  
1971 - map.put("fzbc_m", culateService.culateFzbc(lists, "zgf"));  
1972 - map.put("fzbc_a", culateService.culateFzbc(lists, "wgf"));  
1973 - map.put("dtbc", 0);  
1974 - map.put("dtbc_m", 0);  
1975 - map.put("dtbc_a", 0);  
1976 - map.put("djg", 0);  
1977 - map.put("djg_m", 0);  
1978 - map.put("djg_a", 0);  
1979 - map.put("djg_time", 0);  
1980 - map.put("jls", Arith.sub(Arith.add(jhlc, ljgl), lbgl));  
1981 - lMap.add(map);  
1982 - return lMap; 1942 + List<Map<String, Object>> lMap= new ArrayList<Map<String, Object>>();
  1943 + List<ScheduleRealInfo>list_s=scheduleRealInfoRepository.scheduleByDateAndLine2(line, date);
  1944 + List<ScheduleRealInfo> lists =new ArrayList<ScheduleRealInfo>();
  1945 + for (int i = 0; i < list_s.size(); i++) {
  1946 + ScheduleRealInfo s=list_s.get(i);
  1947 + if(s.getZdsjActual()!=null){
  1948 + lists.add(s);
  1949 + }
  1950 + }
  1951 + Map<String, Object> map = new HashMap<String, Object>();
  1952 + map.put("xlName", xlName);
  1953 + double jhlc=culateService.culateJhgl(list_s);
  1954 + map.put("jhlc",jhlc);
  1955 + map.put("sjgl", Arith.add(culateService.culateSjgl(lists),culateService.culateLjgl(lists)));
  1956 + double lbgl=culateService.culateLbgl(list_s);
  1957 + map.put("ssgl", lbgl);
  1958 + map.put("ssgl_lz", culateService.culateCJLC(list_s, "路阻"));
  1959 + map.put("ssgl_dm", culateService.culateCJLC(list_s, "吊慢"));
  1960 + map.put("ssgl_gz", culateService.culateCJLC(list_s, "故障"));
  1961 + map.put("ssgl_jf", culateService.culateCJLC(list_s, "纠纷"));
  1962 + map.put("ssgl_zs", culateService.culateCJLC(list_s, "肇事"));
  1963 + map.put("ssgl_qr", culateService.culateCJLC(list_s, "缺人"));
  1964 + map.put("ssgl_qc", culateService.culateCJLC(list_s, "缺车"));
  1965 + map.put("ssgl_kx", culateService.culateCJLC(list_s, "客稀"));
  1966 + map.put("ssgl_qh", culateService.culateCJLC(list_s, "气候"));
  1967 + map.put("ssgl_yw", culateService.culateCJLC(list_s, "援外"));
  1968 + double ssgl_pc=culateService.culateCJLC(list_s, "配车");
  1969 + double ssgl_by=culateService.culateCJLC(list_s, "保养");
  1970 + double ssgl_cj=culateService.culateCJLC(list_s, "抽减");
  1971 + double ssgl_qt=culateService.culateCJLC(list_s, "其他");
  1972 + map.put("ssgl_other", Arith.add(Arith.add(ssgl_pc, ssgl_by),Arith.add(ssgl_cj, ssgl_qt)));
  1973 + map.put("ssbc", culateService.culateLbbc(list_s));
  1974 + double ljgl=culateService.culateLjgl(lists);
  1975 + map.put("ljgl", ljgl);
  1976 + map.put("jhbc", culateService.culateJhbc(list_s,""));
  1977 + map.put("jhbc_m", culateService.culateJhbc(list_s, "zgf"));
  1978 + map.put("jhbc_a", culateService.culateJhbc(list_s, "wgf"));
  1979 + map.put("sjbc", culateService.culateSjbc(lists,""));
  1980 + map.put("sjbc_m", culateService.culateSjbc(lists,"zgf"));
  1981 + map.put("sjbc_a", culateService.culateSjbc(lists,"wgf"));
  1982 + map.put("ljbc", culateService.culateLjbc(lists,""));
  1983 + map.put("ljbc_m", culateService.culateLjbc(lists,"zgf"));
  1984 + map.put("ljbc_a", culateService.culateLjbc(lists,"wgf"));
  1985 + map.put("fzbc", culateService.culateFzbc(lists, ""));
  1986 + map.put("fzbc_m", culateService.culateFzbc(lists, "zgf"));
  1987 + map.put("fzbc_a", culateService.culateFzbc(lists, "wgf"));
  1988 + map.put("dtbc", 0);
  1989 + map.put("dtbc_m", 0);
  1990 + map.put("dtbc_a", 0);
  1991 + map.put("djg", 0);
  1992 + map.put("djg_m", 0);
  1993 + map.put("djg_a", 0);
  1994 + map.put("djg_time", 0);
  1995 + map.put("jls", Arith.sub(Arith.add(jhlc, ljgl), lbgl));
  1996 + lMap.add(map);
  1997 + return lMap;
1983 } 1998 }
1984 1999
1985 /* @Override 2000 /* @Override
@@ -2527,34 +2542,34 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -2527,34 +2542,34 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2527 2542
2528 return lMap; 2543 return lMap;
2529 }*/ 2544 }*/
2530 - 2545 +
2531 public final Map<String, Object> staticTj(List<ScheduleRealInfo> list){ 2546 public final Map<String, Object> staticTj(List<ScheduleRealInfo> list){
2532 - List<ScheduleRealInfo> lists=new ArrayList<ScheduleRealInfo>();  
2533 - for(int i=0;i<list.size();i++){  
2534 - ScheduleRealInfo s=list.get(i);  
2535 - if(s.getZdsjActual()!=null){  
2536 - lists.add(s);  
2537 - }  
2538 - }  
2539 - Map<String, Object> map = new HashMap<String, Object>();  
2540 - map.put("xlName", lists.get(0).getXlName());  
2541 - double jhyygl=culateService.culateJhgl(list);//计划营运公里  
2542 - double jhjcclc= culateService.culateJhJccgl(list);//计划进出场公里(计划空驶公里)  
2543 - map.put("jhlc", jhyygl);  
2544 - map.put("jcclc", jhjcclc);  
2545 - map.put("jhzlc", Arith.add(jhyygl, jhjcclc));  
2546 -  
2547 - double ljgl= culateService.culateLjgl(lists);  
2548 - double sjyygl= culateService.culateSjgl(lists);  
2549 - double zyygl= Arith.add(sjyygl,ljgl);  
2550 -  
2551 - double sjjccgl=culateService.culateJccgl(lists);  
2552 - double sjksgl=culateService.culateKsgl(lists);  
2553 - double zksgl=Arith.add(sjjccgl, sjksgl);  
2554 - map.put("sjzgl", Arith.add(zyygl, zksgl));  
2555 - map.put("sjgl",zyygl);  
2556 - map.put("sjksgl", zksgl);  
2557 - 2547 + List<ScheduleRealInfo> lists=new ArrayList<ScheduleRealInfo>();
  2548 + for(int i=0;i<list.size();i++){
  2549 + ScheduleRealInfo s=list.get(i);
  2550 + if(s.getZdsjActual()!=null){
  2551 + lists.add(s);
  2552 + }
  2553 + }
  2554 + Map<String, Object> map = new HashMap<String, Object>();
  2555 + map.put("xlName", lists.get(0).getXlName());
  2556 + double jhyygl=culateService.culateJhgl(list);//计划营运公里
  2557 + double jhjcclc= culateService.culateJhJccgl(list);//计划进出场公里(计划空驶公里)
  2558 + map.put("jhlc", jhyygl);
  2559 + map.put("jcclc", jhjcclc);
  2560 + map.put("jhzlc", Arith.add(jhyygl, jhjcclc));
  2561 +
  2562 + double ljgl= culateService.culateLjgl(lists);
  2563 + double sjyygl= culateService.culateSjgl(lists);
  2564 + double zyygl= Arith.add(sjyygl,ljgl);
  2565 +
  2566 + double sjjccgl=culateService.culateJccgl(lists);
  2567 + double sjksgl=culateService.culateKsgl(lists);
  2568 + double zksgl=Arith.add(sjjccgl, sjksgl);
  2569 + map.put("sjzgl", Arith.add(zyygl, zksgl));
  2570 + map.put("sjgl",zyygl);
  2571 + map.put("sjksgl", zksgl);
  2572 +
2558 map.put("ssgl", culateService.culateLbgl(list)); 2573 map.put("ssgl", culateService.culateLbgl(list));
2559 map.put("ssgl_lz", culateService.culateCJLC(list, "路阻")); 2574 map.put("ssgl_lz", culateService.culateCJLC(list, "路阻"));
2560 map.put("ssgl_dm", culateService.culateCJLC(list, "吊慢")); 2575 map.put("ssgl_dm", culateService.culateCJLC(list, "吊慢"));
@@ -2588,66 +2603,66 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -2588,66 +2603,66 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2588 map.put("djg_m", 0); 2603 map.put("djg_m", 0);
2589 map.put("djg_a", 0); 2604 map.put("djg_a", 0);
2590 map.put("djg_time", 0); 2605 map.put("djg_time", 0);
2591 - return map; 2606 + return map;
2592 } 2607 }
2593 - 2608 +
2594 @Override 2609 @Override
2595 public List<Map<String, Object>> statisticsDailyTj(String gsdm,String fgsdm,String line, String date,String date2, 2610 public List<Map<String, Object>> statisticsDailyTj(String gsdm,String fgsdm,String line, String date,String date2,
2596 - String xlName, String type) { 2611 + String xlName, String type) {
2597 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); 2612 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>();
2598 List<ScheduleRealInfo> list_s = new ArrayList<ScheduleRealInfo>(); 2613 List<ScheduleRealInfo> list_s = new ArrayList<ScheduleRealInfo>();
2599 List<ScheduleRealInfo> lists = new ArrayList<ScheduleRealInfo>(); 2614 List<ScheduleRealInfo> lists = new ArrayList<ScheduleRealInfo>();
2600 line =line.trim(); 2615 line =line.trim();
2601 if(line.equals("")){ 2616 if(line.equals("")){
2602 - //查询所有线路  
2603 - list = scheduleRealInfoRepository.scheduleByDateAndLineTj(line, date,date2,gsdm,fgsdm); 2617 + //查询所有线路
  2618 + list = scheduleRealInfoRepository.scheduleByDateAndLineTj(line, date,date2,gsdm,fgsdm);
2604 }else{ 2619 }else{
2605 - //查询单条线路  
2606 - list = scheduleRealInfoRepository.scheduleByDateAndLineTj2(line, date,date2); 2620 + //查询单条线路
  2621 + list = scheduleRealInfoRepository.scheduleByDateAndLineTj2(line, date,date2);
2607 } 2622 }
2608 for (int i = 0; i < list.size(); i++) { 2623 for (int i = 0; i < list.size(); i++) {
2609 - ScheduleRealInfo s=list.get(i);  
2610 - if(s.getZdsjActual()!=null){  
2611 - list_s.add(s);  
2612 - }  
2613 - } 2624 + ScheduleRealInfo s=list.get(i);
  2625 + if(s.getZdsjActual()!=null){
  2626 + list_s.add(s);
  2627 + }
  2628 + }
2614 List<Map<String, Object>> lMap = new ArrayList<Map<String, Object>>(); 2629 List<Map<String, Object>> lMap = new ArrayList<Map<String, Object>>();
2615 for (int i = 0; i < list.size(); i++) { 2630 for (int i = 0; i < list.size(); i++) {
2616 - if(i<list.size()-1){  
2617 - if(list.get(i+1).getXlBm().equals(list.get(i).getXlBm())){  
2618 - lists.add(list.get(i));  
2619 - }else{  
2620 - lists.add(list.get(i));  
2621 - Map<String, Object> map=staticTj(lists);  
2622 - lMap.add(map);  
2623 - lists=new ArrayList<ScheduleRealInfo>();  
2624 - }  
2625 - }else{  
2626 - if(list.get(i).getXlBm().equals(list.get(i-1).getXlBm())){  
2627 - lists.add(list.get(i));  
2628 - Map<String, Object> map=staticTj(lists);  
2629 - lMap.add(map);  
2630 - }else{  
2631 - lists=new ArrayList<ScheduleRealInfo>();  
2632 - lists.add(list.get(i));  
2633 - Map<String, Object> map=staticTj(lists);  
2634 - lMap.add(map);  
2635 - }  
2636 - } 2631 + if(i<list.size()-1){
  2632 + if(list.get(i+1).getXlBm().equals(list.get(i).getXlBm())){
  2633 + lists.add(list.get(i));
  2634 + }else{
  2635 + lists.add(list.get(i));
  2636 + Map<String, Object> map=staticTj(lists);
  2637 + lMap.add(map);
  2638 + lists=new ArrayList<ScheduleRealInfo>();
  2639 + }
  2640 + }else{
  2641 + if(list.get(i).getXlBm().equals(list.get(i-1).getXlBm())){
  2642 + lists.add(list.get(i));
  2643 + Map<String, Object> map=staticTj(lists);
  2644 + lMap.add(map);
  2645 + }else{
  2646 + lists=new ArrayList<ScheduleRealInfo>();
  2647 + lists.add(list.get(i));
  2648 + Map<String, Object> map=staticTj(lists);
  2649 + lMap.add(map);
  2650 + }
  2651 + }
2637 } 2652 }
2638 - 2653 +
2639 Map<String, Object> map = new HashMap<String, Object>(); 2654 Map<String, Object> map = new HashMap<String, Object>();
2640 - map.put("xlName", "合计");  
2641 - double jhyygl=culateService.culateJhgl(list);//计划营运公里  
2642 - double jhjcclc= culateService.culateJhJccgl(list);//计划进出场公里(计划空驶公里) 2655 + map.put("xlName", "合计");
  2656 + double jhyygl=culateService.culateJhgl(list);//计划营运公里
  2657 + double jhjcclc= culateService.culateJhJccgl(list);//计划进出场公里(计划空驶公里)
2643 map.put("jhlc", jhyygl); 2658 map.put("jhlc", jhyygl);
2644 map.put("jcclc", jhjcclc); 2659 map.put("jcclc", jhjcclc);
2645 map.put("jhzlc", Arith.add(jhyygl, jhjcclc)); 2660 map.put("jhzlc", Arith.add(jhyygl, jhjcclc));
2646 - 2661 +
2647 double ljgl= culateService.culateLjgl(list_s); 2662 double ljgl= culateService.culateLjgl(list_s);
2648 double sjyygl= culateService.culateSjgl(list_s); 2663 double sjyygl= culateService.culateSjgl(list_s);
2649 double zyygl= Arith.add(sjyygl,ljgl); 2664 double zyygl= Arith.add(sjyygl,ljgl);
2650 - 2665 +
2651 double sjjccgl=culateService.culateJccgl(list_s); 2666 double sjjccgl=culateService.culateJccgl(list_s);
2652 double sjksgl=culateService.culateKsgl(list_s); 2667 double sjksgl=culateService.culateKsgl(list_s);
2653 double zksgl=Arith.add(sjjccgl, sjksgl); 2668 double zksgl=Arith.add(sjjccgl, sjksgl);
@@ -2965,10 +2980,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -2965,10 +2980,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2965 List<ScheduleRealInfo> lists = scheduleRealInfoRepository.queryListWaybill3(jGh, nbbm, date,gsbm,fgsbm); 2980 List<ScheduleRealInfo> lists = scheduleRealInfoRepository.queryListWaybill3(jGh, nbbm, date,gsbm,fgsbm);
2966 // System.out.println("shijian3:"+new Date()); 2981 // System.out.println("shijian3:"+new Date());
2967 for (int x = 0; x < yesterdayDataList.size(); x++) { 2982 for (int x = 0; x < yesterdayDataList.size(); x++) {
2968 - 2983 +
2969 String jName = yesterdayDataList.get(x).get("jGh").toString(); 2984 String jName = yesterdayDataList.get(x).get("jGh").toString();
2970 String clZbh = yesterdayDataList.get(x).get("clZbh").toString(); 2985 String clZbh = yesterdayDataList.get(x).get("clZbh").toString();
2971 - 2986 +
2972 // double jhlc = 0, yygl = 0, ksgl = 0, tempJhlc = 0, jcclc = 0; 2987 // double jhlc = 0, yygl = 0, ksgl = 0, tempJhlc = 0, jcclc = 0;
2973 double addMileage = 0, remMileage = 0; 2988 double addMileage = 0, remMileage = 0;
2974 Map<String, Object> map = new HashMap<String, Object>(); 2989 Map<String, Object> map = new HashMap<String, Object>();
@@ -2977,14 +2992,14 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -2977,14 +2992,14 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2977 String bCompany=""; 2992 String bCompany="";
2978 List<ScheduleRealInfo> listS=new ArrayList<ScheduleRealInfo>(); 2993 List<ScheduleRealInfo> listS=new ArrayList<ScheduleRealInfo>();
2979 for (ScheduleRealInfo scheduleRealInfo : lists) { 2994 for (ScheduleRealInfo scheduleRealInfo : lists) {
2980 - if(scheduleRealInfo.getjGh().equals(jName) && scheduleRealInfo.getClZbh().equals(clZbh)){  
2981 - if (fage) {  
2982 - //根据线路代码获取公司  
2983 - company=scheduleRealInfo.getGsBm();  
2984 - bCompany=scheduleRealInfo.getFgsBm();  
2985 - fage = false;  
2986 - }  
2987 - listS.add(scheduleRealInfo); 2995 + if(scheduleRealInfo.getjGh().equals(jName) && scheduleRealInfo.getClZbh().equals(clZbh)){
  2996 + if (fage) {
  2997 + //根据线路代码获取公司
  2998 + company=scheduleRealInfo.getGsBm();
  2999 + bCompany=scheduleRealInfo.getFgsBm();
  3000 + fage = false;
  3001 + }
  3002 + listS.add(scheduleRealInfo);
2988 3003
2989 /* if (scheduleRealInfo != null) { 3004 /* if (scheduleRealInfo != null) {
2990 //计划里程(主任务过滤掉临加班次), 3005 //计划里程(主任务过滤掉临加班次),
@@ -3046,9 +3061,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -3046,9 +3061,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3046 } 3061 }
3047 } 3062 }
3048 }*/ 3063 }*/
3049 - } 3064 + }
3050 } 3065 }
3051 - 3066 +
3052 yesterdayDataList.get(x).put("company", company); 3067 yesterdayDataList.get(x).put("company", company);
3053 yesterdayDataList.get(x).put("bCompany", bCompany); 3068 yesterdayDataList.get(x).put("bCompany", bCompany);
3054 // Double zgl=Arith.add(yygl,ksgl); 3069 // Double zgl=Arith.add(yygl,ksgl);
@@ -3800,9 +3815,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -3800,9 +3815,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3800 } 3815 }
3801 3816
3802 if (!c.isDestroy()) { 3817 if (!c.isDestroy()) {
3803 - if(c.getMileageType().equals("service")){  
3804 - sjlc += c.getMileage() == null ? 0 : c.getMileage();  
3805 - } 3818 + if(c.getMileageType().equals("service")){
  3819 + sjlc += c.getMileage() == null ? 0 : c.getMileage();
  3820 + }
3806 } 3821 }
3807 3822
3808 } 3823 }
@@ -3866,14 +3881,14 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -3866,14 +3881,14 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3866 Long fcsj2 = sdf.parse(fcrq + " 11:00").getTime(); 3881 Long fcsj2 = sdf.parse(fcrq + " 11:00").getTime();
3867 Long fcsj3 = sdf.parse(fcrq + " 23:59").getTime(); 3882 Long fcsj3 = sdf.parse(fcrq + " 23:59").getTime();
3868 for (int i = 0; i < list.size(); i++) { 3883 for (int i = 0; i < list.size(); i++) {
3869 - DutyEmployee t = list.get(i);  
3870 - if(!(dbdp.indexOf(",")>0)){  
3871 - if(!(dbdp.length()>0)){  
3872 - dbdp =t.getuName();  
3873 - }else{  
3874 - dbdp +=","+t.getuName();  
3875 - }  
3876 - } 3884 + DutyEmployee t = list.get(i);
  3885 + if(!(dbdp.indexOf(",")>0)){
  3886 + if(!(dbdp.length()>0)){
  3887 + dbdp =t.getuName();
  3888 + }else{
  3889 + dbdp +=","+t.getuName();
  3890 + }
  3891 + }
3877 Long ts = t.getTs(); 3892 Long ts = t.getTs();
3878 if (ts > fcsj1 && ts < fcsj2) { 3893 if (ts > fcsj1 && ts < fcsj2) {
3879 if (zdp.indexOf(t.getuName()) == -1) { 3894 if (zdp.indexOf(t.getuName()) == -1) {
@@ -3958,18 +3973,18 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -3958,18 +3973,18 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3958 if (!scheduleRealInfo.getsGh().equals(sgh)) { 3973 if (!scheduleRealInfo.getsGh().equals(sgh)) {
3959 sgh = scheduleRealInfo.getsGh()==null?"":scheduleRealInfo.getsGh(); 3974 sgh = scheduleRealInfo.getsGh()==null?"":scheduleRealInfo.getsGh();
3960 if(!sgh.equals("")){ 3975 if(!sgh.equals("")){
3961 - if (map.get("sjb1") != null) {  
3962 - if (map.get("sjb2") != null) {  
3963 - map.put("sjb3", scheduleRealInfo.getsGh() + "/" +  
3964 - scheduleRealInfo.getFcsjActual());  
3965 - } else {  
3966 - map.put("sjb2", scheduleRealInfo.getsGh() + "/" +  
3967 - scheduleRealInfo.getFcsjActual());  
3968 - }  
3969 - } else {  
3970 - map.put("sjb1", scheduleRealInfo.getsGh() + "/" +  
3971 - scheduleRealInfo.getFcsjActual());  
3972 - } 3976 + if (map.get("sjb1") != null) {
  3977 + if (map.get("sjb2") != null) {
  3978 + map.put("sjb3", scheduleRealInfo.getsGh() + "/" +
  3979 + scheduleRealInfo.getFcsjActual());
  3980 + } else {
  3981 + map.put("sjb2", scheduleRealInfo.getsGh() + "/" +
  3982 + scheduleRealInfo.getFcsjActual());
  3983 + }
  3984 + } else {
  3985 + map.put("sjb1", scheduleRealInfo.getsGh() + "/" +
  3986 + scheduleRealInfo.getFcsjActual());
  3987 + }
3973 } 3988 }
3974 } 3989 }
3975 } 3990 }
@@ -4059,7 +4074,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -4059,7 +4074,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
4059 String xlName = map.get("xlName").toString(); 4074 String xlName = map.get("xlName").toString();
4060 String state = map.get("state").toString(); 4075 String state = map.get("state").toString();
4061 String type = map.get("type").toString(); 4076 String type = map.get("type").toString();
4062 - 4077 +
4063 List<Map<String, Object>> dataList2 = new ArrayList<Map<String, Object>>(); 4078 List<Map<String, Object>> dataList2 = new ArrayList<Map<String, Object>>();
4064 List<Map<String, Object>> dataList3 = new ArrayList<Map<String, Object>>(); 4079 List<Map<String, Object>> dataList3 = new ArrayList<Map<String, Object>>();
4065 List<Map<String, Object>> list1 = this.statisticsDaily(line, date, xlName, null); 4080 List<Map<String, Object>> list1 = this.statisticsDaily(line, date, xlName, null);
@@ -4136,10 +4151,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -4136,10 +4151,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
4136 String fcsjActural=schedule.getFcsjActual() != null ? schedule.getFcsjActual() : ""; 4151 String fcsjActural=schedule.getFcsjActual() != null ? schedule.getFcsjActual() : "";
4137 String bcType=schedule.getBcType()!=null?schedule.getBcType():""; 4152 String bcType=schedule.getBcType()!=null?schedule.getBcType():"";
4138 if(bcType.equals("in")){ 4153 if(bcType.equals("in")){
4139 - fcsjActural=fcsjActural+"(进)"; 4154 + fcsjActural=fcsjActural+"(进)";
4140 } 4155 }
4141 if(bcType.equals("out")){ 4156 if(bcType.equals("out")){
4142 - fcsjActural=fcsjActural+"(出)"; 4157 + fcsjActural=fcsjActural+"(出)";
4143 } 4158 }
4144 tempMap.put("fcsjActual" + size, fcsjActural); 4159 tempMap.put("fcsjActual" + size, fcsjActural);
4145 tempMap.put("fcsjk" + size, ""); 4160 tempMap.put("fcsjk" + size, "");
@@ -4201,13 +4216,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -4201,13 +4216,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
4201 List<ScheduleRealInfo> scheduleRealInfos = listpl; 4216 List<ScheduleRealInfo> scheduleRealInfos = listpl;
4202 List<Map<String, Object>> listMap = new ArrayList<Map<String, Object>>(); 4217 List<Map<String, Object>> listMap = new ArrayList<Map<String, Object>>();
4203 // List<ScheduleRealInfo> scheduleRealInfos=scheduleRealInfoRepository.queryListWaybillXcld(jName, clZbh, lpName, date, line); 4218 // List<ScheduleRealInfo> scheduleRealInfos=scheduleRealInfoRepository.queryListWaybillXcld(jName, clZbh, lpName, date, line);
4204 - List<ScheduleRealInfo> lists=new ArrayList<ScheduleRealInfo>();  
4205 - for (int i = 0; i < scheduleRealInfos.size(); i++) {  
4206 - ScheduleRealInfo s=scheduleRealInfos.get(i);  
4207 - if(s.getZdsjActual()!=null){  
4208 - lists.add(s);  
4209 - }  
4210 - } 4219 + List<ScheduleRealInfo> lists=new ArrayList<ScheduleRealInfo>();
  4220 + for (int i = 0; i < scheduleRealInfos.size(); i++) {
  4221 + ScheduleRealInfo s=scheduleRealInfos.get(i);
  4222 + if(s.getZdsjActual()!=null){
  4223 + lists.add(s);
  4224 + }
  4225 + }
4211 DecimalFormat format = new DecimalFormat("0.00"); 4226 DecimalFormat format = new DecimalFormat("0.00");
4212 // int cjbc = scheduleRealInfoRepository.findCjbc(jName, clZbh, lpName); 4227 // int cjbc = scheduleRealInfoRepository.findCjbc(jName, clZbh, lpName);
4213 // int ljbc = scheduleRealInfoRepository.findLjbc(jName, clZbh, lpName); 4228 // int ljbc = scheduleRealInfoRepository.findLjbc(jName, clZbh, lpName);
@@ -4229,33 +4244,33 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -4229,33 +4244,33 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
4229 4244
4230 Map<String, Object> maps; 4245 Map<String, Object> maps;
4231 for (ScheduleRealInfo scheduleRealInfo : scheduleRealInfos) { 4246 for (ScheduleRealInfo scheduleRealInfo : scheduleRealInfos) {
4232 - maps = new HashMap<String, Object>();  
4233 - try {  
4234 - scheduleRealInfo.setjName(scheduleRealInfo.getjGh() + scheduleRealInfo.getjName());  
4235 - scheduleRealInfo.setsName(scheduleRealInfo.getsGh() + scheduleRealInfo.getsName());  
4236 - maps = rru.getMapValue(scheduleRealInfo);  
4237 - String zdsj = scheduleRealInfo.getZdsj();  
4238 - String zdsjActual = scheduleRealInfo.getZdsjActual();  
4239 - if (zdsj != null && zdsjActual != null &&  
4240 - !zdsj.equals(zdsjActual)) {  
4241 - if (zdsj.compareTo(zdsjActual) > 0) {  
4242 - maps.put("fast", TimeUtils.getTimeDifference(zdsj, zdsjActual));  
4243 - maps.put("slow", "");  
4244 - } else {  
4245 - maps.put("fast", "");  
4246 - maps.put("slow", TimeUtils.getTimeDifference(zdsj, zdsjActual));  
4247 - } 4247 + maps = new HashMap<String, Object>();
  4248 + try {
  4249 + scheduleRealInfo.setjName(scheduleRealInfo.getjGh() + scheduleRealInfo.getjName());
  4250 + scheduleRealInfo.setsName(scheduleRealInfo.getsGh() + scheduleRealInfo.getsName());
  4251 + maps = rru.getMapValue(scheduleRealInfo);
  4252 + String zdsj = scheduleRealInfo.getZdsj();
  4253 + String zdsjActual = scheduleRealInfo.getZdsjActual();
  4254 + if (zdsj != null && zdsjActual != null &&
  4255 + !zdsj.equals(zdsjActual)) {
  4256 + if (zdsj.compareTo(zdsjActual) > 0) {
  4257 + maps.put("fast", TimeUtils.getTimeDifference(zdsj, zdsjActual));
  4258 + maps.put("slow", "");
4248 } else { 4259 } else {
4249 maps.put("fast", ""); 4260 maps.put("fast", "");
4250 - maps.put("slow", ""); 4261 + maps.put("slow", TimeUtils.getTimeDifference(zdsj, zdsjActual));
4251 } 4262 }
4252 - listMap.add(maps);  
4253 - } catch (Exception e) {  
4254 - e.printStackTrace(); 4263 + } else {
  4264 + maps.put("fast", "");
  4265 + maps.put("slow", "");
4255 } 4266 }
  4267 + listMap.add(maps);
  4268 + } catch (Exception e) {
  4269 + e.printStackTrace();
  4270 + }
4256 } 4271 }
4257 4272
4258 - 4273 +
4259 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; 4274 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
4260 4275
4261 list.add(listMap.iterator()); 4276 list.add(listMap.iterator());
@@ -4263,7 +4278,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -4263,7 +4278,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
4263 path + "export/" + date + "-" + jName + "-" + clZbh + "-" + lpName + "-行车路单.xls"); 4278 path + "export/" + date + "-" + jName + "-" + clZbh + "-" + lpName + "-行车路单.xls");
4264 // return scheduleRealInfos; 4279 // return scheduleRealInfos;
4265 } 4280 }
4266 - 4281 +
4267 @Override 4282 @Override
4268 public Map<String, Object> exportWaybillMore(Map<String, Object> map) { 4283 public Map<String, Object> exportWaybillMore(Map<String, Object> map) {
4269 String date = map.get("date").toString(); 4284 String date = map.get("date").toString();
@@ -4287,17 +4302,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -4287,17 +4302,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
4287 file.mkdirs(); 4302 file.mkdirs();
4288 List<ScheduleRealInfo> lists_line=scheduleRealInfoRepository.scheduleByDateAndLineTjrb(line, date); 4303 List<ScheduleRealInfo> lists_line=scheduleRealInfoRepository.scheduleByDateAndLineTjrb(line, date);
4289 for (List<String> list : lists) { 4304 for (List<String> list : lists) {
4290 - List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>(); 4305 + List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>();
4291 String jName = list.get(0); 4306 String jName = list.get(0);
4292 String clZbh = list.get(1); 4307 String clZbh = list.get(1);
4293 String lpName = list.get(2); 4308 String lpName = list.get(2);
4294 String jGh =list.get(3); 4309 String jGh =list.get(3);
4295 for (int i = 0; i < lists_line.size(); i++) { 4310 for (int i = 0; i < lists_line.size(); i++) {
4296 - ScheduleRealInfo s=lists_line.get(i);  
4297 - if(s.getjGh().equals(jGh) && s.getClZbh().equals(clZbh) && s.getLpName().equals(lpName)){  
4298 - newList.add(s);  
4299 - }  
4300 - } 4311 + ScheduleRealInfo s=lists_line.get(i);
  4312 + if(s.getjGh().equals(jGh) && s.getClZbh().equals(clZbh) && s.getLpName().equals(lpName)){
  4313 + newList.add(s);
  4314 + }
  4315 + }
4301 this.exportWaybill_pl(newList, date, jName, clZbh, lpName); 4316 this.exportWaybill_pl(newList, date, jName, clZbh, lpName);
4302 File temp = new File(path + date + "-" + jName + "-" + clZbh + "-" + lpName + "-行车路单.xls"); 4317 File temp = new File(path + date + "-" + jName + "-" + clZbh + "-" + lpName + "-行车路单.xls");
4303 String fileName = file.getName(); 4318 String fileName = file.getName();
src/main/java/com/bsth/service/report/impl/CulateMileageServiceImpl.java
@@ -558,7 +558,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{ @@ -558,7 +558,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{
558 //有子任务 558 //有子任务
559 if (cts != null && cts.size() > 0) { 559 if (cts != null && cts.size() > 0) {
560 for(ChildTaskPlan c : cts){ 560 for(ChildTaskPlan c : cts){
561 - if(c.isDestroy() && c.getDestroyReason().equals(item)) 561 + if(c.isDestroy() && (c.getDestroyReason()==null?"": c.getDestroyReason()).equals(item))
562 sum = Arith.add(sum, c.getMileage()); 562 sum = Arith.add(sum, c.getMileage());
563 } 563 }
564 } 564 }
src/main/java/com/bsth/websocket/handler/RealControlSocketHandler.java
@@ -6,29 +6,29 @@ import com.bsth.data.BasicData; @@ -6,29 +6,29 @@ import com.bsth.data.BasicData;
6 import com.google.common.base.Splitter; 6 import com.google.common.base.Splitter;
7 import org.slf4j.Logger; 7 import org.slf4j.Logger;
8 import org.slf4j.LoggerFactory; 8 import org.slf4j.LoggerFactory;
9 -import org.springframework.context.annotation.Scope;  
10 import org.springframework.stereotype.Component; 9 import org.springframework.stereotype.Component;
11 import org.springframework.web.socket.*; 10 import org.springframework.web.socket.*;
12 11
13 -import java.util.*; 12 +import java.util.ArrayList;
  13 +import java.util.Collection;
  14 +import java.util.Iterator;
  15 +import java.util.List;
14 import java.util.concurrent.ConcurrentHashMap; 16 import java.util.concurrent.ConcurrentHashMap;
  17 +import java.util.concurrent.CopyOnWriteArrayList;
15 18
16 /** 19 /**
17 * @author PanZhao 20 * @author PanZhao
18 */ 21 */
19 @Component 22 @Component
20 -@Scope("prototype")  
21 public class RealControlSocketHandler implements WebSocketHandler { 23 public class RealControlSocketHandler implements WebSocketHandler {
22 24
23 Logger logger = LoggerFactory.getLogger(this.getClass()); 25 Logger logger = LoggerFactory.getLogger(this.getClass());
24 26
25 private static ArrayList<WebSocketSession> users; 27 private static ArrayList<WebSocketSession> users;
26 - //private static final ArrayListMultimap<String, WebSocketSession> listenMap;  
27 - private static ConcurrentHashMap<String, List<WebSocketSession>> listenMap; 28 + private static ConcurrentHashMap<String, CopyOnWriteArrayList<WebSocketSession>> listenMap;
28 29
29 static { 30 static {
30 users = new ArrayList<WebSocketSession>(); 31 users = new ArrayList<WebSocketSession>();
31 - //listenMap = ArrayListMultimap.create();  
32 listenMap = new ConcurrentHashMap(); 32 listenMap = new ConcurrentHashMap();
33 } 33 }
34 34
@@ -37,30 +37,13 @@ public class RealControlSocketHandler implements WebSocketHandler { @@ -37,30 +37,13 @@ public class RealControlSocketHandler implements WebSocketHandler {
37 throws Exception { 37 throws Exception {
38 users.remove(session); 38 users.remove(session);
39 //清理监听 39 //清理监听
40 - //Set<String> keys = listenMap.keySet();  
41 - //Map<String, WebSocketSession> remMap = new HashMap<>();  
42 -  
43 int vsCount=0; 40 int vsCount=0;
44 - Collection<List<WebSocketSession>> vs = listenMap.values();  
45 - for(List<WebSocketSession> list : vs){ 41 + Collection<CopyOnWriteArrayList<WebSocketSession>> vs = listenMap.values();
  42 + for(CopyOnWriteArrayList<WebSocketSession> list : vs){
46 list.remove(session); 43 list.remove(session);
47 44
48 vsCount += list.size(); 45 vsCount += list.size();
49 } 46 }
50 - /*List<WebSocketSession> vs;  
51 - for(String k : keys){  
52 - //vs = listenMap.get(k);  
53 - //vs.remove(session);  
54 - listenMap.get(k).remove()  
55 - *//*if(listenMap.get(k).contains(session))  
56 - remMap.put(k, session);*//*  
57 - }*/  
58 -  
59 - /*Set<String> remSet = remMap.keySet();  
60 - for(String k : remSet){  
61 - listenMap.remove(k, remMap.get(k));  
62 - logger.info("web socket close, remove listen K: "+ k);  
63 - }*/  
64 logger.info("listen values size: " + vsCount + " -CloseStatus:" + arg1); 47 logger.info("listen values size: " + vsCount + " -CloseStatus:" + arg1);
65 } 48 }
66 49
@@ -81,7 +64,7 @@ public class RealControlSocketHandler implements WebSocketHandler { @@ -81,7 +64,7 @@ public class RealControlSocketHandler implements WebSocketHandler {
81 for(String lineCode : idx){ 64 for(String lineCode : idx){
82 if(BasicData.lineCode2NameMap.containsKey(lineCode)){ 65 if(BasicData.lineCode2NameMap.containsKey(lineCode)){
83 if(!listenMap.containsKey(lineCode)){ 66 if(!listenMap.containsKey(lineCode)){
84 - listenMap.put(lineCode, new ArrayList<WebSocketSession>()); 67 + listenMap.put(lineCode, new CopyOnWriteArrayList<WebSocketSession>());
85 } 68 }
86 listenMap.get(lineCode).add(session); 69 listenMap.get(lineCode).add(session);
87 } 70 }
src/main/resources/application-dev.properties
@@ -10,10 +10,8 @@ spring.jpa.show-sql= true @@ -10,10 +10,8 @@ spring.jpa.show-sql= true
10 spring.datasource.driver-class-name= com.mysql.jdbc.Driver 10 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=  
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 13 +spring.datasource.password= root
  14 +
17 #DATASOURCE 15 #DATASOURCE
18 spring.datasource.max-active=100 16 spring.datasource.max-active=100
19 spring.datasource.max-idle=8 17 spring.datasource.max-idle=8
@@ -29,7 +27,6 @@ spring.datasource.validation-query=select 1 @@ -29,7 +27,6 @@ spring.datasource.validation-query=select 1
29 ## 27 ##
30 #222.66.0.204:5555 28 #222.66.0.204:5555
31 ##\u5B9E\u65F6gps 29 ##\u5B9E\u65F6gps
32 -http.gps.real.url= http://114.80.178.12:18080/transport_server/rtgps/  
33 #http.gps.real.url= http://27.115.69.123:8800/transport_server/rtgps/ 30 #http.gps.real.url= http://27.115.69.123:8800/transport_server/rtgps/
34 ##\u6D88\u606F\u4E0B\u53D1 31 ##\u6D88\u606F\u4E0B\u53D1
35 -http.send.directive = http://192.168.168.201:9090/transport_server/message/  
36 \ No newline at end of file 32 \ No newline at end of file
  33 +http.send.directive = http://192.168.168.201:9090/transport_server/message/
src/main/resources/static/pages/forms/mould/changetochange.xls
No preview for this file type
src/main/resources/static/pages/mforms/changetochanges/changetochange.html
@@ -70,14 +70,14 @@ @@ -70,14 +70,14 @@
70 class="form-control" type="text" id="endDate" 70 class="form-control" type="text" id="endDate"
71 style="width: 140px;" /> 71 style="width: 140px;" />
72 </div> 72 </div>
73 - <div style="display: inline-block; margin-left: 10px;">  
74 - <span class="item-label" style="width: 120px;">类型: </span> <select  
75 - class="form-control" id="sel">  
76 - <option value="">请选择</option>  
77 - <option value="1">换人</option>  
78 - <option value="2">换车</option>  
79 - </select>  
80 - </div> 73 +<!-- <div style="display: inline-block; margin-left: 10px;"> -->
  74 +<!-- <span class="item-label" style="width: 120px;">类型: </span> <select -->
  75 +<!-- class="form-control" id="sel"> -->
  76 +<!-- <option value="">请选择</option> -->
  77 +<!-- <option value="1">换人</option> -->
  78 +<!-- <option value="2">换车</option> -->
  79 +<!-- </select> -->
  80 +<!-- </div> -->
81 <div class="form-group"> 81 <div class="form-group">
82 <input class="btn btn-default" type="button" id="query" value="筛选" /> 82 <input class="btn btn-default" type="button" id="query" value="筛选" />
83 <input class="btn btn-default" type="button" id="export" 83 <input class="btn btn-default" type="button" id="export"
@@ -117,10 +117,8 @@ @@ -117,10 +117,8 @@
117 <tr> 117 <tr>
118 <td>车号</td> 118 <td>车号</td>
119 <td>车号</td> 119 <td>车号</td>
120 - <td>工号</td>  
121 - <td>人员</td>  
122 - <td>工号</td>  
123 - <td>人员</td> 120 + <td colspan="2">工号/人员</td>
  121 + <td colspan="2">工号/人员</td>
124 </tr> 122 </tr>
125 </thead> 123 </thead>
126 <tbody> 124 <tbody>
@@ -188,6 +186,7 @@ @@ -188,6 +186,7 @@
188 $("#fgsdmChange").on("change",initXl); 186 $("#fgsdmChange").on("change",initXl);
189 function initXl(){ 187 function initXl(){
190 var data=[]; 188 var data=[];
  189 + data.push({id: " ", text: "请选择"});
191 if(fage){ 190 if(fage){
192 $("#line").select2("destroy").html(''); 191 $("#line").select2("destroy").html('');
193 } 192 }
@@ -223,29 +222,15 @@ @@ -223,29 +222,15 @@
223 var gsdmChange= $("#gsdmChange").val(); 222 var gsdmChange= $("#gsdmChange").val();
224 var fgsdmChange= $("#fgsdmChange").val(); 223 var fgsdmChange= $("#fgsdmChange").val();
225 if (startDate1 != '' && endDate1 != '') { 224 if (startDate1 != '' && endDate1 != '') {
226 - $post('/mcy_forms/changetochange', { 225 + $get('/mcy_forms/changetochange', {
227 sel : sel, 226 sel : sel,
228 line : line, 227 line : line,
229 startDate : $("#startDate").val(), 228 startDate : $("#startDate").val(),
230 endDate : $("#endDate").val(), 229 endDate : $("#endDate").val(),
  230 + gsdm:gsdmChange,
  231 + fgsdm:fgsdmChange,
231 type : 'query' 232 type : 'query'
232 }, function(result) { 233 }, function(result) {
233 - startDate = $("#startDate").val();  
234 - endDate = $("#endDate").val();  
235 - $("#sDate").text(startDate);  
236 - $("#eDate").text(endDate);  
237 - var temp = {};  
238 - var today_account = 0;  
239 - temp["line"] = $("#line").text();  
240 - $.each(result, function(i, obj) {  
241 - if (moment(obj.schedule_date_str).format(  
242 - "YYYY-MM-DD") == moment(obj.startDate)  
243 - .format("YYYY-MM-DD")) {  
244 - today_account++;  
245 - }  
246 - obj.updateDate = moment(obj.startDate).format(  
247 - "YYYY-MM-DD HH:mm:ss");  
248 - });  
249 // 把数据填充到模版中 234 // 把数据填充到模版中
250 var tbodyHtml = template('changetochange', { 235 var tbodyHtml = template('changetochange', {
251 list : result 236 list : result
@@ -294,11 +279,9 @@ @@ -294,11 +279,9 @@
294 <td>{{obj.fssj}}</td> 279 <td>{{obj.fssj}}</td>
295 <td>{{obj.xgsj}}</td> 280 <td>{{obj.xgsj}}</td>
296 <td>{{obj.pcch}}</td> 281 <td>{{obj.pcch}}</td>
297 - <td>{{obj.pcry}}</td>  
298 - <td>{{obj.jhgh}}</td>  
299 - <td>{{obj.jhch}}</td>  
300 - <td>{{obj.sjgh}}</td>  
301 <td>{{obj.sjch}}</td> 282 <td>{{obj.sjch}}</td>
  283 + <td colspan="2">{{obj.pcry}}</td>
  284 + <td colspan="2">{{obj.sjgh}}</td>
302 <td>{{obj.yy}}</td> 285 <td>{{obj.yy}}</td>
303 <td>{{obj.xgr}}</td> 286 <td>{{obj.xgr}}</td>
304 </tr> 287 </tr>
src/main/resources/static/real_control_v2/fragments/north/nav/directive_history.html
1 -<div class="uk-modal" id="directive-history-modal"> 1 +<div class="uk-modal ct_move_modal" id="directive-history-modal">
2 <div class="uk-modal-dialog" style="width: 1040px;"> 2 <div class="uk-modal-dialog" style="width: 1040px;">
3 <a href="" class="uk-modal-close uk-close"></a> 3 <a href="" class="uk-modal-close uk-close"></a>
4 <div class="uk-modal-header"> 4 <div class="uk-modal-header">
@@ -15,12 +15,12 @@ @@ -15,12 +15,12 @@
15 </legend> 15 </legend>
16 <span class="horizontal-field">指令类型</span> 16 <span class="horizontal-field">指令类型</span>
17 <select name="dType"> 17 <select name="dType">
18 - <option value="-1">全部</option>  
19 - <option value="3">消息短语</option>  
20 - <option value="0">调度指令</option>  
21 - <option value="1">运营指令</option>  
22 - <option value="2">线路切换指令</option>  
23 - </select> 18 + <option value="-1">全部</option>
  19 + <option value="3">消息短语</option>
  20 + <option value="0">调度指令</option>
  21 + <option value="1">运营指令</option>
  22 + <option value="2">线路切换指令</option>
  23 + </select>
24 <span class="horizontal-field">车辆</span> 24 <span class="horizontal-field">车辆</span>
25 <div class="uk-autocomplete uk-form" id="uk-autocomplete-cars"> 25 <div class="uk-autocomplete uk-form" id="uk-autocomplete-cars">
26 <input type="text" name="nbbm" placeholder="车辆自编号"> 26 <input type="text" name="nbbm" placeholder="车辆自编号">
@@ -33,13 +33,13 @@ @@ -33,13 +33,13 @@
33 <div style="height: 495px;margin:5px 0 -18px;"> 33 <div style="height: 495px;margin:5px 0 -18px;">
34 <table class="ct-fixed-table uk-table uk-table-hover"> 34 <table class="ct-fixed-table uk-table uk-table-hover">
35 <thead> 35 <thead>
36 - <tr>  
37 - <th style="width: 6%;">时间</th>  
38 - <th style="width: 8%;">车辆</th>  
39 - <th style="width: 44%;">指令内容</th>  
40 - <th style="width: 7%;">发送人</th>  
41 - <th style="width: 15%;">状态</th>  
42 - </tr> 36 + <tr>
  37 + <th style="width: 6%;">时间</th>
  38 + <th style="width: 8%;">车辆</th>
  39 + <th style="width: 44%;">指令内容</th>
  40 + <th style="width: 7%;">发送人</th>
  41 + <th style="width: 15%;">状态</th>
  42 + </tr>
43 </thead> 43 </thead>
44 <tbody> 44 <tbody>
45 </tbody> 45 </tbody>
@@ -61,14 +61,14 @@ @@ -61,14 +61,14 @@
61 <td> 61 <td>
62 {{if obj.errorText != null}} 62 {{if obj.errorText != null}}
63 <div class="uk-badge uk-badge-danger"> {{obj.errorText}}</div> 63 <div class="uk-badge uk-badge-danger"> {{obj.errorText}}</div>
64 - {{else}}  
65 - {{if obj.reply46 != 0}}  
66 - <div class="uk-badge uk-badge-danger"> 设备未响应</div>  
67 - {{else if obj.reply47 != 0}}  
68 - <div class="uk-badge uk-badge-warning"> 设备已响应</div>  
69 - {{else if obj.reply46 == 0 && obj.reply47 == 0}}  
70 - <div class="uk-badge"> 驾驶员已确认</div>  
71 - {{/if}} 64 + {{else if obj.operCode==96}}
  65 + {{if obj.reply46 != 0}}
  66 + <div class="uk-badge uk-badge-danger"> 设备未响应</div>
  67 + {{else if obj.reply47 != 0}}
  68 + <div class="uk-badge uk-badge-warning"> 设备已响应</div>
  69 + {{else if obj.reply46 == 0 && obj.reply47 == 0}}
  70 + <div class="uk-badge"> 驾驶员已确认</div>
  71 + {{/if}}
72 {{/if}} 72 {{/if}}
73 </td> 73 </td>
74 </tr> 74 </tr>
@@ -87,17 +87,17 @@ @@ -87,17 +87,17 @@
87 var carInput = $('#uk-autocomplete-cars input'); 87 var carInput = $('#uk-autocomplete-cars input');
88 var search_nbbm = function(release) { 88 var search_nbbm = function(release) {
89 var q = carInput.val().toUpperCase(), 89 var q = carInput.val().toUpperCase(),
90 - rs = [],  
91 - max = 12,  
92 - count = 0; 90 + rs = [],
  91 + max = 12,
  92 + count = 0;
93 93
94 $.each(cars, function(i, item) { 94 $.each(cars, function(i, item) {
95 if (item.indexOf(q) != -1){ 95 if (item.indexOf(q) != -1){
96 - rs.push({  
97 - value: item,  
98 - title: item  
99 - });  
100 - count ++; 96 + rs.push({
  97 + value: item,
  98 + title: item
  99 + });
  100 + count ++;
101 } 101 }
102 if (count >= max) 102 if (count >= max)
103 return false; 103 return false;
@@ -156,7 +156,7 @@ @@ -156,7 +156,7 @@
156 var resetPagination = true; 156 var resetPagination = true;
157 var pagination = function(pages, currentPage) { 157 var pagination = function(pages, currentPage) {
158 var wrap = $('.pagination-wrap', modal).empty() 158 var wrap = $('.pagination-wrap', modal).empty()
159 - ,e = $('<ul class="uk-pagination"></ul>').appendTo(wrap); 159 + ,e = $('<ul class="uk-pagination"></ul>').appendTo(wrap);
160 160
161 var pagination = UIkit.pagination(e, { 161 var pagination = UIkit.pagination(e, {
162 pages: pages, 162 pages: pages,
@@ -164,8 +164,8 @@ @@ -164,8 +164,8 @@
164 }); 164 });
165 165
166 e.on('select.uk.pagination', function(e, pageIndex){ 166 e.on('select.uk.pagination', function(e, pageIndex){
167 - page = pageIndex;  
168 - query(); 167 + page = pageIndex;
  168 + query();
169 }); 169 });
170 170
171 resetPagination = false; 171 resetPagination = false;