Commit 1c7cc4f79f58ab56ddfddebd09055de0b9337660

Authored by 娄高锋
1 parent 1ccd70db

添加 是否营运 和 全部分公司 的筛选条件

Showing 26 changed files with 1228 additions and 466 deletions
src/main/java/com/bsth/controller/forms/ExportController.java
@@ -469,12 +469,13 @@ public class ExportController { @@ -469,12 +469,13 @@ public class ExportController {
469 for (Operationservice l : operationservice) { 469 for (Operationservice l : operationservice) {
470 Map<String, Object> m = new HashMap<String, Object>(); 470 Map<String, Object> m = new HashMap<String, Object>();
471 m.put("i", i); 471 m.put("i", i);
472 - m.put("xlName", l.getXlName());  
473 - m.put("jzl", l.getJzl());  
474 - m.put("xhl", l.getXhl());  
475 - m.put("xsgl", l.getXsgl());  
476 - m.put("emptMileage", l.getEmptMileage());  
477 - m.put("sjbc", l.getSjbc()); 472 + m.put("fgs", l.getFgs()!=null?l.getFgs():"");
  473 + m.put("xlName", l.getXlName()!=null?l.getXlName():"");
  474 + m.put("jzl", l.getJzl()!=null?l.getJzl():"");
  475 + m.put("xhl", l.getXhl()!=null?l.getXhl():"");
  476 + m.put("xsgl", l.getXsgl()!=null?l.getXsgl():"");
  477 + m.put("emptMileage", l.getEmptMileage()!=null?l.getEmptMileage():"");
  478 + m.put("sjbc", l.getSjbc()!=null?l.getSjbc():"");
478 resList.add(m); 479 resList.add(m);
479 i++; 480 i++;
480 } 481 }
src/main/java/com/bsth/entity/calc/CalcStatistics.java
@@ -67,6 +67,8 @@ public class CalcStatistics { @@ -67,6 +67,8 @@ public class CalcStatistics {
67 private Double qtlc; 67 private Double qtlc;
68 /* 临加公里*/ 68 /* 临加公里*/
69 private Double ljlc; 69 private Double ljlc;
  70 + /* 临加空驶公里*/
  71 + private Double ljkslc;
70 /* 计划班次*/ 72 /* 计划班次*/
71 private int jhbcq; 73 private int jhbcq;
72 /* 计划班次(早高峰)*/ 74 /* 计划班次(早高峰)*/
@@ -272,6 +274,12 @@ public class CalcStatistics { @@ -272,6 +274,12 @@ public class CalcStatistics {
272 public void setLjlc(Double ljlc) { 274 public void setLjlc(Double ljlc) {
273 this.ljlc = ljlc; 275 this.ljlc = ljlc;
274 } 276 }
  277 + public Double getLjkslc() {
  278 + return ljkslc;
  279 + }
  280 + public void setLjkslc(Double ljkslc) {
  281 + this.ljkslc = ljkslc;
  282 + }
275 public int getJhbcq() { 283 public int getJhbcq() {
276 return jhbcq; 284 return jhbcq;
277 } 285 }
src/main/java/com/bsth/entity/mcy_forms/Operationservice.java
@@ -17,6 +17,10 @@ public class Operationservice { @@ -17,6 +17,10 @@ public class Operationservice {
17 private String jname; 17 private String jname;
18 18
19 private String clzbh; 19 private String clzbh;
  20 +
  21 + private String gs;
  22 +
  23 + private String fgs;
20 24
21 public String getJname() { 25 public String getJname() {
22 return jname; 26 return jname;
@@ -89,6 +93,22 @@ public class Operationservice { @@ -89,6 +93,22 @@ public class Operationservice {
89 public void setXlBm(String xlBm) { 93 public void setXlBm(String xlBm) {
90 this.xlBm = xlBm; 94 this.xlBm = xlBm;
91 } 95 }
  96 +
  97 + public String getGs() {
  98 + return gs;
  99 + }
  100 +
  101 + public void setGs(String gs) {
  102 + this.gs = gs;
  103 + }
  104 +
  105 + public String getFgs() {
  106 + return fgs;
  107 + }
  108 +
  109 + public void setFgs(String fgs) {
  110 + this.fgs = fgs;
  111 + }
92 112
93 113
94 } 114 }
src/main/java/com/bsth/repository/calc/CalcStatisticsRepository.java
@@ -6,8 +6,10 @@ import javax.transaction.Transactional; @@ -6,8 +6,10 @@ import javax.transaction.Transactional;
6 6
7 import com.bsth.entity.calc.CalcStatistics; 7 import com.bsth.entity.calc.CalcStatistics;
8 import com.bsth.entity.calc.CalcWaybill; 8 import com.bsth.entity.calc.CalcWaybill;
  9 +import com.bsth.entity.realcontrol.ScheduleRealInfo;
9 import com.bsth.repository.BaseRepository; 10 import com.bsth.repository.BaseRepository;
10 11
  12 +import org.springframework.data.jpa.repository.EntityGraph;
11 import org.springframework.data.jpa.repository.Modifying; 13 import org.springframework.data.jpa.repository.Modifying;
12 import org.springframework.data.jpa.repository.Query; 14 import org.springframework.data.jpa.repository.Query;
13 import org.springframework.stereotype.Repository; 15 import org.springframework.stereotype.Repository;
@@ -38,4 +40,8 @@ public interface CalcStatisticsRepository extends BaseRepository&lt;CalcStatistics, @@ -38,4 +40,8 @@ public interface CalcStatisticsRepository extends BaseRepository&lt;CalcStatistics,
38 @Query(value = "delete CalcStatistics c where c.dateStr=?1") 40 @Query(value = "delete CalcStatistics c where c.dateStr=?1")
39 void deleteByDate(String date); 41 void deleteByDate(String date);
40 42
  43 + //按照时间段查询实际排班(分公司条件不可为空)
  44 + @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
  45 + @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm like %?1% and s.scheduleDateStr between ?2 and ?3 and gsBm = ?4 and fgsBm = ?5 order by s.fgsBm, s.xlBm")
  46 + List<ScheduleRealInfo> scheduleByDateAndLine(String line,String date,String date2,String gsdm,String fgsdm);
41 } 47 }
src/main/java/com/bsth/service/calc/impl/CalcWaybillServiceImpl.java
@@ -553,7 +553,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer @@ -553,7 +553,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
553 553
554 //查询所有线路 554 //查询所有线路
555 for(Map<String, String> m : gsList){ 555 for(Map<String, String> m : gsList){
556 - list.addAll(scheduleRealInfoRepository.scheduleByDateAndLineTj(line, rq, rq, m.get("gsdm"), m.get("fgsdm"))); 556 + list.addAll(calcStatisticsRepository.scheduleByDateAndLine(line, rq, rq, m.get("gsdm"), m.get("fgsdm")));
557 } 557 }
558 558
559 for (int i = 0; i < list.size(); i++) { 559 for (int i = 0; i < list.size(); i++) {
@@ -644,6 +644,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer @@ -644,6 +644,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
644 double sjyygl= culateService.culateSjgl(lists); 644 double sjyygl= culateService.culateSjgl(lists);
645 double zyygl= Arith.add(sjyygl,ljgl); 645 double zyygl= Arith.add(sjyygl,ljgl);
646 646
  647 + double ljksgl= culateService.culateLjksgl(lists);
647 double sjjccgl=culateService.culateJccgl(lists); 648 double sjjccgl=culateService.culateJccgl(lists);
648 double sjksgl=culateService.culateKsgl(lists); 649 double sjksgl=culateService.culateKsgl(lists);
649 double zksgl=Arith.add(sjjccgl, sjksgl); 650 double zksgl=Arith.add(sjjccgl, sjksgl);
@@ -651,6 +652,8 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer @@ -651,6 +652,8 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
651 s.setSjkslc(zksgl); 652 s.setSjkslc(zksgl);
652 s.setSjzlc(Arith.add(zyygl, zksgl)); 653 s.setSjzlc(Arith.add(zyygl, zksgl));
653 654
  655 + s.setLjkslc(ljksgl);
  656 +
654 s.setSslc(culateService.culateLbgl(list)); 657 s.setSslc(culateService.culateLbgl(list));
655 s.setSsbc(culateService.culateLbbc(list)); 658 s.setSsbc(culateService.culateLbbc(list));
656 659
@@ -841,6 +844,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer @@ -841,6 +844,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
841 m.put("ssgl_yw", c.getYwlc()); 844 m.put("ssgl_yw", c.getYwlc());
842 m.put("ssgl_other", c.getQtlc()); 845 m.put("ssgl_other", c.getQtlc());
843 m.put("ljgl", c.getLjlc()); 846 m.put("ljgl", c.getLjlc());
  847 + m.put("ljks", c.getLjkslc());
844 m.put("jhbc", c.getJhbcq()); 848 m.put("jhbc", c.getJhbcq());
845 m.put("jhbc_m", c.getJhbcz()); 849 m.put("jhbc_m", c.getJhbcz());
846 m.put("jhbc_a", c.getJhbcw()); 850 m.put("jhbc_a", c.getJhbcw());
@@ -942,16 +946,17 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer @@ -942,16 +946,17 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
942 } 946 }
943 Map<String, Boolean> lineMap=lineService.lineNature(); 947 Map<String, Boolean> lineMap=lineService.lineNature();
944 List<CalcStatistics> list=new ArrayList<CalcStatistics>(); 948 List<CalcStatistics> list=new ArrayList<CalcStatistics>();
  949 +
945 for (int i = 0; i < listAll.size(); i++) { 950 for (int i = 0; i < listAll.size(); i++) {
946 CalcStatistics s=listAll.get(i); 951 CalcStatistics s=listAll.get(i);
947 if(nature.equals("0")){ 952 if(nature.equals("0")){
948 list.add(s); 953 list.add(s);
949 }else if(nature.equals("1")){ 954 }else if(nature.equals("1")){
950 - if(lineMap.get(s.getXl())){ 955 + if(lineMap.containsKey(s.getXl()) && lineMap.get(s.getXl())){
951 list.add(s); 956 list.add(s);
952 } 957 }
953 }else{ 958 }else{
954 - if(!lineMap.get(s.getXl())){ 959 + if(lineMap.containsKey(s.getXl()) && !lineMap.get(s.getXl())){
955 list.add(s); 960 list.add(s);
956 } 961 }
957 } 962 }
@@ -1035,6 +1040,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer @@ -1035,6 +1040,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
1035 m.put("ssgl_yw", c.getYwlc()); 1040 m.put("ssgl_yw", c.getYwlc());
1036 m.put("ssgl_other", c.getQtlc()); 1041 m.put("ssgl_other", c.getQtlc());
1037 m.put("ljgl", c.getLjlc()); 1042 m.put("ljgl", c.getLjlc());
  1043 + m.put("ljks", c.getLjkslc());
1038 m.put("jhbc", c.getJhbcq()); 1044 m.put("jhbc", c.getJhbcq());
1039 m.put("jhbc_m", c.getJhbcz()); 1045 m.put("jhbc_m", c.getJhbcz());
1040 m.put("jhbc_a", c.getJhbcw()); 1046 m.put("jhbc_a", c.getJhbcw());
@@ -1131,6 +1137,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer @@ -1131,6 +1137,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
1131 hjMap.put("ssgl_yw", Arith.add(lsMap.get("ssgl_yw"), hjMap.get("ssgl_yw")==null?"0":hjMap.get("ssgl_yw"))); 1137 hjMap.put("ssgl_yw", Arith.add(lsMap.get("ssgl_yw"), hjMap.get("ssgl_yw")==null?"0":hjMap.get("ssgl_yw")));
1132 hjMap.put("ssgl_other", Arith.add(lsMap.get("ssgl_other"), hjMap.get("ssgl_other")==null?"0":hjMap.get("ssgl_other"))); 1138 hjMap.put("ssgl_other", Arith.add(lsMap.get("ssgl_other"), hjMap.get("ssgl_other")==null?"0":hjMap.get("ssgl_other")));
1133 hjMap.put("ljgl", Arith.add(lsMap.get("ljgl"), hjMap.get("ljgl")==null?"0":hjMap.get("ljgl"))); 1139 hjMap.put("ljgl", Arith.add(lsMap.get("ljgl"), hjMap.get("ljgl")==null?"0":hjMap.get("ljgl")));
  1140 + hjMap.put("ljks", Arith.add(lsMap.get("ljks"), hjMap.get("ljks")==null?"0":hjMap.get("ljks")));
1134 hjMap.put("jhbc", Integer.parseInt(lsMap.get("jhbc").toString())+ Integer.parseInt(hjMap.get("jhbc")==null?"0":hjMap.get("jhbc").toString())); 1141 hjMap.put("jhbc", Integer.parseInt(lsMap.get("jhbc").toString())+ Integer.parseInt(hjMap.get("jhbc")==null?"0":hjMap.get("jhbc").toString()));
1135 hjMap.put("jhbc_m", Integer.parseInt(lsMap.get("jhbc_m").toString())+Integer.parseInt(hjMap.get("jhbc_m")==null?"0":hjMap.get("jhbc_m").toString())); 1142 hjMap.put("jhbc_m", Integer.parseInt(lsMap.get("jhbc_m").toString())+Integer.parseInt(hjMap.get("jhbc_m")==null?"0":hjMap.get("jhbc_m").toString()));
1136 hjMap.put("jhbc_a", Integer.parseInt(lsMap.get("jhbc_a").toString())+ Integer.parseInt(hjMap.get("jhbc_a")==null?"0":hjMap.get("jhbc_a").toString())); 1143 hjMap.put("jhbc_a", Integer.parseInt(lsMap.get("jhbc_a").toString())+ Integer.parseInt(hjMap.get("jhbc_a")==null?"0":hjMap.get("jhbc_a").toString()));
@@ -1230,6 +1237,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer @@ -1230,6 +1237,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
1230 s.setYwlc(Arith.add(s.getYwlc()!=null?s.getYwlc():0, s_.getYwlc())); 1237 s.setYwlc(Arith.add(s.getYwlc()!=null?s.getYwlc():0, s_.getYwlc()));
1231 s.setQtlc(Arith.add(s.getQtlc()!=null?s.getQtlc():0, s_.getQtlc())); 1238 s.setQtlc(Arith.add(s.getQtlc()!=null?s.getQtlc():0, s_.getQtlc()));
1232 s.setLjlc(Arith.add(s.getLjlc()!=null?s.getLjlc():0, s_.getLjlc())); 1239 s.setLjlc(Arith.add(s.getLjlc()!=null?s.getLjlc():0, s_.getLjlc()));
  1240 + s.setLjkslc(Arith.add(s.getLjkslc()!=null?s.getLjkslc():0, s_.getLjkslc()));
1233 s.setJhbcq(s.getJhbcq() + s_.getJhbcq()); 1241 s.setJhbcq(s.getJhbcq() + s_.getJhbcq());
1234 s.setJhbcz(s.getJhbcz() + s_.getJhbcz()); 1242 s.setJhbcz(s.getJhbcz() + s_.getJhbcz());
1235 s.setJhbcw(s.getJhbcw() + s_.getJhbcw()); 1243 s.setJhbcw(s.getJhbcw() + s_.getJhbcw());
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
@@ -28,7 +28,6 @@ import com.bsth.entity.mcy_forms.Operationservice; @@ -28,7 +28,6 @@ import com.bsth.entity.mcy_forms.Operationservice;
28 import com.bsth.entity.mcy_forms.Shifday; 28 import com.bsth.entity.mcy_forms.Shifday;
29 import com.bsth.entity.mcy_forms.Shiftuehiclemanth; 29 import com.bsth.entity.mcy_forms.Shiftuehiclemanth;
30 import com.bsth.entity.mcy_forms.Singledata; 30 import com.bsth.entity.mcy_forms.Singledata;
31 -import com.bsth.entity.mcy_forms.Turnoutrate;  
32 import com.bsth.entity.mcy_forms.Vehicleloading; 31 import com.bsth.entity.mcy_forms.Vehicleloading;
33 import com.bsth.entity.mcy_forms.Waybillday; 32 import com.bsth.entity.mcy_forms.Waybillday;
34 import com.bsth.entity.oil.Dlb; 33 import com.bsth.entity.oil.Dlb;
@@ -45,6 +44,7 @@ import com.bsth.entity.mcy_forms.Allline; @@ -45,6 +44,7 @@ import com.bsth.entity.mcy_forms.Allline;
45 import com.bsth.entity.mcy_forms.Changetochange; 44 import com.bsth.entity.mcy_forms.Changetochange;
46 import com.bsth.entity.mcy_forms.Daily; 45 import com.bsth.entity.mcy_forms.Daily;
47 import com.bsth.entity.mcy_forms.Executionrate; 46 import com.bsth.entity.mcy_forms.Executionrate;
  47 +import com.bsth.service.LineService;
48 import com.bsth.service.forms.CommonService; 48 import com.bsth.service.forms.CommonService;
49 import com.bsth.service.forms.FormsService; 49 import com.bsth.service.forms.FormsService;
50 import com.bsth.service.realcontrol.ScheduleRealInfoService; 50 import com.bsth.service.realcontrol.ScheduleRealInfoService;
@@ -61,6 +61,9 @@ public class FormsServiceImpl implements FormsService { @@ -61,6 +61,9 @@ public class FormsServiceImpl implements FormsService {
61 ScheduleRealInfoService scheduleRealInfoService; 61 ScheduleRealInfoService scheduleRealInfoService;
62 62
63 @Autowired 63 @Autowired
  64 + LineService lineService;
  65 +
  66 + @Autowired
64 CommonService commonService; 67 CommonService commonService;
65 68
66 @Autowired 69 @Autowired
@@ -214,11 +217,11 @@ public class FormsServiceImpl implements FormsService { @@ -214,11 +217,11 @@ public class FormsServiceImpl implements FormsService {
214 sql+=" and l.line_code=" + map.get("line").toString(); 217 sql+=" and l.line_code=" + map.get("line").toString();
215 } 218 }
216 sql+= " AND r.gs_bm is not null"; 219 sql+= " AND r.gs_bm is not null";
217 - if(map.get("gsdmLine").toString()!=""){ 220 + if(map.get("gsdmLine") != null && map.get("gsdmLine").toString()!=""){
218 sql+=" and r.gs_bm='"+map.get("gsdmLine").toString()+"' "; 221 sql+=" and r.gs_bm='"+map.get("gsdmLine").toString()+"' ";
219 } 222 }
220 - if(map.get("fgsdmLine").toString()!=""){  
221 - sql+=" and r.fgs_bm='"+map.get("fgsdmLine").toString()+"'"; 223 + if(map.get("fgsdmLine") != null && map.get("fgsdmLine").toString()!=""){
  224 + sql+=" and r.fgs_bm='"+map.get("fgsdmLine").toString()+"' ";
222 } 225 }
223 sql += " GROUP BY s.station_name,l.name,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name "; 226 sql += " GROUP BY s.station_name,l.name,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name ";
224 List<Linepasswengerflow> list = jdbcTemplate.query(sql, new RowMapper<Linepasswengerflow>() { 227 List<Linepasswengerflow> list = jdbcTemplate.query(sql, new RowMapper<Linepasswengerflow>() {
@@ -244,10 +247,10 @@ public class FormsServiceImpl implements FormsService { @@ -244,10 +247,10 @@ public class FormsServiceImpl implements FormsService {
244 final String empnames=map.get("empnames").toString(); 247 final String empnames=map.get("empnames").toString();
245 String gsdmManth=""; 248 String gsdmManth="";
246 String fgsdmManth=""; 249 String fgsdmManth="";
247 - if(map.containsKey("gsdmManth")){ 250 + if(map.get("gsdmManth") != null){
248 gsdmManth=map.get("gsdmManth").toString(); 251 gsdmManth=map.get("gsdmManth").toString();
249 } 252 }
250 - if(map.containsKey("fgsdmManth")){ 253 + if(map.get("fgsdmManth") != null){
251 fgsdmManth=map.get("fgsdmManth").toString(); 254 fgsdmManth=map.get("fgsdmManth").toString();
252 } 255 }
253 String sql ="select "; 256 String sql ="select ";
@@ -410,10 +413,10 @@ public class FormsServiceImpl implements FormsService { @@ -410,10 +413,10 @@ public class FormsServiceImpl implements FormsService {
410 final String empnames=map.get("empnames").toString(); 413 final String empnames=map.get("empnames").toString();
411 String gsdmManth=""; 414 String gsdmManth="";
412 String fgsdmManth=""; 415 String fgsdmManth="";
413 - if(map.containsKey("gsdmManth")){ 416 + if(map.get("gsdmManth")!=null){
414 gsdmManth=map.get("gsdmManth").toString(); 417 gsdmManth=map.get("gsdmManth").toString();
415 } 418 }
416 - if(map.containsKey("fgsdmManth")){ 419 + if(map.get("fgsdmManth")!=null){
417 fgsdmManth=map.get("fgsdmManth").toString(); 420 fgsdmManth=map.get("fgsdmManth").toString();
418 } 421 }
419 String sql ="select "; 422 String sql ="select ";
@@ -766,6 +769,10 @@ public class FormsServiceImpl implements FormsService { @@ -766,6 +769,10 @@ public class FormsServiceImpl implements FormsService {
766 769
767 rq = rq2 + "-" + rq3; 770 rq = rq2 + "-" + rq3;
768 771
  772 + String sfyy="";
  773 + if(map.get("sfyy")!=null){
  774 + sfyy=map.get("sfyy").toString();
  775 + }
769 String line=""; 776 String line="";
770 if(map.get("line")!=null){ 777 if(map.get("line")!=null){
771 line=map.get("line").toString().trim(); 778 line=map.get("line").toString().trim();
@@ -784,21 +791,23 @@ public class FormsServiceImpl implements FormsService { @@ -784,21 +791,23 @@ public class FormsServiceImpl implements FormsService {
784 791
785 if(!line.equals("")){ 792 if(!line.equals("")){
786 sql +=" and xl= '"+line+"'"; 793 sql +=" and xl= '"+line+"'";
787 - }else{  
788 - sql += " and gs= '"+gs+"' and fgs= '"+fgs+"'"; 794 + }
  795 + if(!gs.equals("")){
  796 + sql += " and gs= '"+gs+"'";
  797 + }
  798 + if(!fgs.equals("")){
  799 + sql += " and fgs= '"+fgs+"'";
789 } 800 }
790 801
791 sql +=" order by rq"; 802 sql +=" order by rq";
792 List<Changetochange> list = jdbcTemplate.query(sql, new RowMapper<Changetochange>() { 803 List<Changetochange> list = jdbcTemplate.query(sql, new RowMapper<Changetochange>() {
793 -  
794 -  
795 @Override 804 @Override
796 public Changetochange mapRow(ResultSet arg0, int arg1) throws SQLException { 805 public Changetochange mapRow(ResultSet arg0, int arg1) throws SQLException {
797 Changetochange chan = new Changetochange(); 806 Changetochange chan = new Changetochange();
798 chan.setRq(arg0.getString("rq")); 807 chan.setRq(arg0.getString("rq"));
799 chan.setGs(BasicData.businessCodeNameMap.get(arg0.getString("gs"))); 808 chan.setGs(BasicData.businessCodeNameMap.get(arg0.getString("gs")));
800 chan.setFgs(BasicData.businessFgsCodeNameMap.get(arg0.getString("fgs")+"_"+arg0.getString("gs"))); 809 chan.setFgs(BasicData.businessFgsCodeNameMap.get(arg0.getString("fgs")+"_"+arg0.getString("gs")));
801 - chan.setXl(BasicData.lineCode2NameMap.get(arg0.getString("xl"))); 810 + chan.setXl(arg0.getString("xl"));
802 chan.setLp(arg0.getString("lp")); 811 chan.setLp(arg0.getString("lp"));
803 chan.setFssj(arg0.getString("fssj")); 812 chan.setFssj(arg0.getString("fssj"));
804 chan.setXgsj(arg0.getString("xgsj")); 813 chan.setXgsj(arg0.getString("xgsj"));
@@ -813,13 +822,42 @@ public class FormsServiceImpl implements FormsService { @@ -813,13 +822,42 @@ public class FormsServiceImpl implements FormsService {
813 return chan; 822 return chan;
814 } 823 }
815 }); 824 });
816 - return list; 825 +
  826 + Map<String, Boolean> lineNature = lineService.lineNature();
  827 + List<Changetochange> resList = new ArrayList<Changetochange>();
  828 +
  829 + for(Changetochange c : list){
  830 + String xl = c.getXl();
  831 + if(sfyy.length() != 0){
  832 + if(sfyy.equals("0")){
  833 + resList.add(c);
  834 + } else if(sfyy.equals("1")){
  835 + if(lineNature.containsKey(xl) && lineNature.get(xl)){
  836 + resList.add(c);
  837 + }
  838 + } else {
  839 + if(lineNature.containsKey(xl) && !lineNature.get(xl)){
  840 + resList.add(c);
  841 + }
  842 + }
  843 + } else {
  844 + resList.add(c);
  845 + }
  846 +
  847 + c.setXl(BasicData.lineCode2NameMap.get(xl));
  848 + }
  849 +
  850 + return resList;
817 } 851 }
818 852
819 853
820 // 路单数据 854 // 路单数据
821 @Override 855 @Override
822 public List<Singledata> singledatatj(Map<String, Object> map) { 856 public List<Singledata> singledatatj(Map<String, Object> map) {
  857 + String sfyy="";
  858 + if(map.get("sfyy")!=null){
  859 + sfyy=map.get("sfyy").toString();
  860 + }
823 String gsdm=""; 861 String gsdm="";
824 if(map.get("gsdmSing")!=null){ 862 if(map.get("gsdmSing")!=null){
825 gsdm=map.get("gsdmSing").toString(); 863 gsdm=map.get("gsdmSing").toString();
@@ -843,16 +881,20 @@ public class FormsServiceImpl implements FormsService { @@ -843,16 +881,20 @@ public class FormsServiceImpl implements FormsService {
843 List<Singledata> list_=new ArrayList<Singledata>(); 881 List<Singledata> list_=new ArrayList<Singledata>();
844 if(tjtype.equals("jsy")){ 882 if(tjtype.equals("jsy")){
845 //油统计 883 //油统计
846 - String sql="select r.j_gh, r.xl_bm,r.cl_zbh,r.j_name" 884 + String sql="select r.j_gh, r.xl_bm,r.cl_zbh,r.j_name,r.fgs_bm"
847 + " from bsth_c_s_sp_info_real r where " 885 + " from bsth_c_s_sp_info_real r where "
848 + " r.schedule_date_str = '"+startDate+"'"; 886 + " r.schedule_date_str = '"+startDate+"'";
849 - if(xlbm.equals("")){  
850 - sql +="and r.gs_bm='"+gsdm+"' "  
851 - + " and r.fgs_bm='"+fgsdm+"'";  
852 - }else{ 887 + if(xlbm.length() != 0){
853 sql += " and r.xl_bm = '"+xlbm+"'"; 888 sql += " and r.xl_bm = '"+xlbm+"'";
854 } 889 }
855 - sql += " group by r.j_gh,r.xl_bm,r.cl_zbh,r.j_name order by r.xl_bm,r.cl_zbh"; 890 + if(gsdm.length() != 0){
  891 + sql += " and r.gs_bm ='"+gsdm+"'";
  892 + }
  893 + if(fgsdm.length() != 0){
  894 + sql += " and r.fgs_bm ='"+fgsdm+"'";
  895 + }
  896 + sql += " group by r.j_gh,r.xl_bm,r.cl_zbh,r.j_name order by r.xl_bm,r.cl_zbh";
  897 +
856 list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { 898 list = jdbcTemplate.query(sql, new RowMapper<Singledata>() {
857 @Override 899 @Override
858 public Singledata mapRow(ResultSet arg0, int arg1) throws SQLException { 900 public Singledata mapRow(ResultSet arg0, int arg1) throws SQLException {
@@ -861,20 +903,30 @@ public class FormsServiceImpl implements FormsService { @@ -861,20 +903,30 @@ public class FormsServiceImpl implements FormsService {
861 sin.setJsy(arg0.getString("j_gh")); 903 sin.setJsy(arg0.getString("j_gh"));
862 sin.setjName(arg0.getString("j_name")); 904 sin.setjName(arg0.getString("j_name"));
863 sin.setClzbh(arg0.getString("cl_zbh")); 905 sin.setClzbh(arg0.getString("cl_zbh"));
  906 + sin.setgS(arg0.getString("fgs_bm"));
864 return sin; 907 return sin;
865 } 908 }
866 }); 909 });
  910 +
  911 + Collections.sort(list,new SingledataByXlbm());
  912 +
867 String linesql=""; 913 String linesql="";
868 if(!xlbm.equals("")){ 914 if(!xlbm.equals("")){
869 linesql +=" and xlbm ='"+xlbm+"' "; 915 linesql +=" and xlbm ='"+xlbm+"' ";
870 } 916 }
871 - String nysql="SELECT id,xlbm,nbbm, jsy,jzl as jzl,yh as yh,sh as sh FROM bsth_c_ylb " 917 + if(!gsdm.equals("")){
  918 + linesql +=" and ssgsdm ='"+gsdm+"' ";
  919 + }
  920 + if(!fgsdm.equals("")){
  921 + linesql +=" and fgsdm ='"+fgsdm+"' ";
  922 + }
  923 + String nysql="SELECT id,xlbm,nbbm,jsy,jzl as jzl,yh as yh,sh as sh,fgsdm FROM bsth_c_ylb"
872 + " WHERE rq = '"+startDate+"'" 924 + " WHERE rq = '"+startDate+"'"
873 - + " AND ssgsdm = '"+gsdm+"' AND fgsdm = '"+fgsdm+"'" +linesql 925 + + linesql
874 + " union" 926 + " union"
875 - + " SELECT id,xlbm,nbbm,jsy,cdl as jzl,hd as yh,sh as sh FROM bsth_c_dlb" 927 + + " SELECT id,xlbm,nbbm,jsy,cdl as jzl,hd as yh,sh as sh,fgsdm FROM bsth_c_dlb"
876 + " WHERE rq = '"+startDate+"'" 928 + " WHERE rq = '"+startDate+"'"
877 - + " AND ssgsdm = '"+gsdm+"' AND fgsdm = '"+fgsdm+"'"+linesql; 929 + + linesql;
878 List<Singledata> listNy = jdbcTemplate.query(nysql, new RowMapper<Singledata>() { 930 List<Singledata> listNy = jdbcTemplate.query(nysql, new RowMapper<Singledata>() {
879 @Override 931 @Override
880 public Singledata mapRow(ResultSet arg0, int arg1) throws SQLException { 932 public Singledata mapRow(ResultSet arg0, int arg1) throws SQLException {
@@ -885,6 +937,7 @@ public class FormsServiceImpl implements FormsService { @@ -885,6 +937,7 @@ public class FormsServiceImpl implements FormsService {
885 sin.setJzl(arg0.getString("jzl")); 937 sin.setJzl(arg0.getString("jzl"));
886 sin.setHyl(arg0.getString("yh")); 938 sin.setHyl(arg0.getString("yh"));
887 sin.setUnyyyl(arg0.getString("sh")); 939 sin.setUnyyyl(arg0.getString("sh"));
  940 + sin.setgS(arg0.getString("fgsdm"));
888 return sin; 941 return sin;
889 } 942 }
890 }); 943 });
@@ -913,7 +966,7 @@ public class FormsServiceImpl implements FormsService { @@ -913,7 +966,7 @@ public class FormsServiceImpl implements FormsService {
913 s.setClzbh(clzbh); 966 s.setClzbh(clzbh);
914 s.setSgh(""); 967 s.setSgh("");
915 s.setsName(""); 968 s.setsName("");
916 - s.setgS(BasicData.businessFgsCodeNameMap.get(fgsdm+"_"+gsdm)); 969 + s.setgS(BasicData.businessFgsCodeNameMap.get(sin_.getgS()+"_"+gsdm));
917 s.setxL(line); 970 s.setxL(line);
918 s.setXlmc(BasicData.lineCode2NameMap.get(line)); 971 s.setXlmc(BasicData.lineCode2NameMap.get(line));
919 s.setJzl(sin_.getJzl()); 972 s.setJzl(sin_.getJzl());
@@ -983,27 +1036,29 @@ public class FormsServiceImpl implements FormsService { @@ -983,27 +1036,29 @@ public class FormsServiceImpl implements FormsService {
983 // sin.setjName(BasicData.allPerson.get(gsdm+"-"+jsy)); 1036 // sin.setjName(BasicData.allPerson.get(gsdm+"-"+jsy));
984 sin.setSgh(""); 1037 sin.setSgh("");
985 sin.setsName(""); 1038 sin.setsName("");
986 - sin.setgS(BasicData.businessFgsCodeNameMap.get(fgsdm+"_"+gsdm)); 1039 + sin.setgS(BasicData.businessFgsCodeNameMap.get(sin.getgS()+"_"+gsdm));
987 list_.add(sin); 1040 list_.add(sin);
988 1041
989 } 1042 }
990 - Collections.sort(list_,new SingledataByXlbm());  
991 }else{ 1043 }else{
992 String sql="select r.s_gh,r.s_name, " 1044 String sql="select r.s_gh,r.s_name, "
993 + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm" 1045 + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm"
994 + " from bsth_c_s_sp_info_real r where " 1046 + " from bsth_c_s_sp_info_real r where "
995 + " r.schedule_date_str = '"+startDate+"'" 1047 + " r.schedule_date_str = '"+startDate+"'"
996 + " and r.s_gh !='' and r.s_gh is not null "; 1048 + " and r.s_gh !='' and r.s_gh is not null ";
997 - if(xlbm.equals("")){  
998 - sql +="and r.gs_bm='"+gsdm+"' "  
999 - + " and r.fgs_bm='"+fgsdm+"'";  
1000 - }else{ 1049 + if(!xlbm.equals("")){
1001 sql += " and r.xl_bm = '"+xlbm+"'"; 1050 sql += " and r.xl_bm = '"+xlbm+"'";
1002 } 1051 }
1003 - sql += " group by r.s_gh,r.s_name," 1052 + if(!gsdm.equals("")){
  1053 + sql += " and r.gs_bm = '"+gsdm+"'";
  1054 + }
  1055 + if(!fgsdm.equals("")){
  1056 + sql += " and r.fgs_bm = '"+fgsdm+"'";
  1057 + }
  1058 + sql += " group by r.s_gh,r.s_name,"
1004 + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh"; 1059 + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh";
1005 1060
1006 - list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { 1061 + list = jdbcTemplate.query(sql, new RowMapper<Singledata>() {
1007 //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); 1062 //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
1008 @Override 1063 @Override
1009 public Singledata mapRow(ResultSet arg0, int arg1) throws SQLException { 1064 public Singledata mapRow(ResultSet arg0, int arg1) throws SQLException {
@@ -1013,10 +1068,13 @@ public class FormsServiceImpl implements FormsService { @@ -1013,10 +1068,13 @@ public class FormsServiceImpl implements FormsService {
1013 sin.setClzbh(arg0.getString("cl_zbh")); 1068 sin.setClzbh(arg0.getString("cl_zbh"));
1014 sin.setSgh(arg0.getString("s_gh")); 1069 sin.setSgh(arg0.getString("s_gh"));
1015 sin.setsName(arg0.getString("s_name")); 1070 sin.setsName(arg0.getString("s_name"));
  1071 + sin.setgS(arg0.getString("fgs_bm"));
1016 return sin; 1072 return sin;
1017 } 1073 }
1018 }); 1074 });
1019 1075
  1076 + Collections.sort(list,new SingledataByXlbm());
  1077 +
1020 for (int i = 0; i < list.size(); i++) { 1078 for (int i = 0; i < list.size(); i++) {
1021 Singledata sin=list.get(i); 1079 Singledata sin=list.get(i);
1022 String jsy=sin.getSgh(); 1080 String jsy=sin.getSgh();
@@ -1058,15 +1116,36 @@ public class FormsServiceImpl implements FormsService { @@ -1058,15 +1116,36 @@ public class FormsServiceImpl implements FormsService {
1058 sin.setClzbh(clzbh); 1116 sin.setClzbh(clzbh);
1059 sin.setJsy(""); 1117 sin.setJsy("");
1060 sin.setjName(""); 1118 sin.setjName("");
1061 - sin.setgS(BasicData.businessFgsCodeNameMap.get(fgsdm+"_"+gsdm)); 1119 + sin.setgS(BasicData.businessFgsCodeNameMap.get(sin.getgS()+"_"+gsdm));
1062 sin.setHyl(""); 1120 sin.setHyl("");
1063 sin.setJzl(""); 1121 sin.setJzl("");
1064 sin.setUnyyyl(""); 1122 sin.setUnyyyl("");
1065 list_.add(sin); 1123 list_.add(sin);
1066 } 1124 }
1067 - Collections.sort(list_,new SingledataByXlbm());  
1068 } 1125 }
1069 - return list_; 1126 +
  1127 + Map<String, Boolean> lineNature = lineService.lineNature();
  1128 + List<Singledata> resList = new ArrayList<Singledata>();
  1129 + for(Singledata s : list_){
  1130 + String xlBm = s.getxL();
  1131 + if(sfyy.length() != 0){
  1132 + if(sfyy.equals("0")){
  1133 + resList.add(s);
  1134 + } else if(sfyy.equals("1")){
  1135 + if(lineNature.containsKey(xlBm) && lineNature.get(xlBm)){
  1136 + resList.add(s);
  1137 + }
  1138 + } else {
  1139 + if(lineNature.containsKey(xlBm) && !lineNature.get(xlBm)){
  1140 + resList.add(s);
  1141 + }
  1142 + }
  1143 + } else {
  1144 + resList.add(s);
  1145 + }
  1146 + }
  1147 +
  1148 + return resList;
1070 } 1149 }
1071 1150
1072 1151
@@ -1098,12 +1177,15 @@ public class FormsServiceImpl implements FormsService { @@ -1098,12 +1177,15 @@ public class FormsServiceImpl implements FormsService {
1098 String sql="select r.j_gh, r.xl_bm,r.cl_zbh,r.j_name" 1177 String sql="select r.j_gh, r.xl_bm,r.cl_zbh,r.j_name"
1099 + " from bsth_c_s_sp_info_real r where " 1178 + " from bsth_c_s_sp_info_real r where "
1100 + " r.schedule_date_str = '"+startDate+"'"; 1179 + " r.schedule_date_str = '"+startDate+"'";
1101 - if(xlbm.equals("")){  
1102 - sql +="and r.gs_bm='"+gsdm+"' "  
1103 - + " and r.fgs_bm='"+fgsdm+"'";  
1104 - }else{ 1180 + if(!xlbm.equals("")){
1105 sql += " and r.xl_bm = '"+xlbm+"'"; 1181 sql += " and r.xl_bm = '"+xlbm+"'";
1106 } 1182 }
  1183 + if(!gsdm.equals("")){
  1184 + sql += " and r.gs_bm='"+gsdm+"'";
  1185 + }
  1186 + if(!fgsdm.equals("")){
  1187 + sql += " and r.fgs_bm='"+fgsdm+"'";
  1188 + }
1107 sql += " group by r.j_gh,r.xl_bm,r.cl_zbh,r.j_name order by r.xl_bm,r.cl_zbh"; 1189 sql += " group by r.j_gh,r.xl_bm,r.cl_zbh,r.j_name order by r.xl_bm,r.cl_zbh";
1108 list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { 1190 list = jdbcTemplate.query(sql, new RowMapper<Singledata>() {
1109 @Override 1191 @Override
@@ -1118,15 +1200,21 @@ public class FormsServiceImpl implements FormsService { @@ -1118,15 +1200,21 @@ public class FormsServiceImpl implements FormsService {
1118 }); 1200 });
1119 String linesql=""; 1201 String linesql="";
1120 if(!xlbm.equals("")){ 1202 if(!xlbm.equals("")){
1121 - linesql +=" and xlbm ='"+xlbm+"' "; 1203 + linesql += " and xlbm ='"+xlbm+"' ";
1122 } 1204 }
  1205 + if(!gsdm.equals("")){
  1206 + linesql += " and ssgsdm ='"+gsdm+"'";
  1207 + }
  1208 + if(!fgsdm.equals("")){
  1209 + linesql += " and fgsdm ='"+fgsdm+"'";
  1210 + }
1123 String nysql="SELECT id,xlbm,nbbm, jsy,jzl as jzl,yh as yh,sh as sh FROM bsth_c_ylb " 1211 String nysql="SELECT id,xlbm,nbbm, jsy,jzl as jzl,yh as yh,sh as sh FROM bsth_c_ylb "
1124 + " WHERE rq = '"+startDate+"'" 1212 + " WHERE rq = '"+startDate+"'"
1125 - + " AND ssgsdm = '"+gsdm+"' AND fgsdm = '"+fgsdm+"'" +linesql 1213 + + linesql
1126 + " union" 1214 + " union"
1127 + " SELECT id,xlbm,nbbm,jsy,cdl as jzl,hd as yh,sh as sh FROM bsth_c_dlb" 1215 + " SELECT id,xlbm,nbbm,jsy,cdl as jzl,hd as yh,sh as sh FROM bsth_c_dlb"
1128 + " WHERE rq = '"+startDate+"'" 1216 + " WHERE rq = '"+startDate+"'"
1129 - + " AND ssgsdm = '"+gsdm+"' AND fgsdm = '"+fgsdm+"'"+linesql; 1217 + + linesql;
1130 List<Singledata> listNy = jdbcTemplate.query(nysql, new RowMapper<Singledata>() { 1218 List<Singledata> listNy = jdbcTemplate.query(nysql, new RowMapper<Singledata>() {
1131 @Override 1219 @Override
1132 public Singledata mapRow(ResultSet arg0, int arg1) throws SQLException { 1220 public Singledata mapRow(ResultSet arg0, int arg1) throws SQLException {
@@ -1246,14 +1334,17 @@ public class FormsServiceImpl implements FormsService { @@ -1246,14 +1334,17 @@ public class FormsServiceImpl implements FormsService {
1246 + " from bsth_c_s_sp_info_real r where " 1334 + " from bsth_c_s_sp_info_real r where "
1247 + " r.schedule_date_str = '"+startDate+"'" 1335 + " r.schedule_date_str = '"+startDate+"'"
1248 + " and r.s_gh !='' and r.s_gh is not null "; 1336 + " and r.s_gh !='' and r.s_gh is not null ";
1249 - if(xlbm.equals("")){  
1250 - sql +="and r.gs_bm='"+gsdm+"' "  
1251 - + " and r.fgs_bm='"+fgsdm+"'";  
1252 - }else{ 1337 + if(!xlbm.equals("")){
1253 sql += " and r.xl_bm = '"+xlbm+"'"; 1338 sql += " and r.xl_bm = '"+xlbm+"'";
1254 } 1339 }
1255 - sql += " group by r.s_gh,r.s_name,"  
1256 - + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh"; 1340 + if(!gsdm.equals("")){
  1341 + sql += " and r.gs_bm='"+gsdm+"'";
  1342 + }
  1343 + if(!fgsdm.equals("")){
  1344 + sql += " and r.fgs_bm='"+fgsdm+"'";
  1345 + }
  1346 + sql += " group by r.s_gh,r.s_name,"
  1347 + + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh";
1257 1348
1258 list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { 1349 list = jdbcTemplate.query(sql, new RowMapper<Singledata>() {
1259 //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); 1350 //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
@@ -1635,14 +1726,17 @@ public class FormsServiceImpl implements FormsService { @@ -1635,14 +1726,17 @@ public class FormsServiceImpl implements FormsService {
1635 String sql="select r.s_gh,r.s_name, " 1726 String sql="select r.s_gh,r.s_name, "
1636 + " r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm" 1727 + " r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm"
1637 + " from bsth_c_s_sp_info_real r where r.schedule_date_str = '"+startDate+"'"; 1728 + " from bsth_c_s_sp_info_real r where r.schedule_date_str = '"+startDate+"'";
1638 - if(xlbm.equals("")){  
1639 - sql +="and r.gs_bm='"+gsdm+"' "  
1640 - + " and r.fgs_bm='"+fgsdm+"'";  
1641 - }else{ 1729 + if(!xlbm.equals("")){
1642 sql += " and r.xl_bm = '"+xlbm+"'"; 1730 sql += " and r.xl_bm = '"+xlbm+"'";
1643 } 1731 }
1644 - sql += " group by r.s_gh,r.s_name,"  
1645 - + " r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh"; 1732 + if(!gsdm.equals("")){
  1733 + sql += " and r.gs_bm='"+gsdm+"'";
  1734 + }
  1735 + if(!fgsdm.equals("")){
  1736 + sql += " and r.fgs_bm='"+fgsdm+"'";
  1737 + }
  1738 + sql += " group by r.s_gh,r.s_name,"
  1739 + + " r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh";
1646 1740
1647 List<Singledata> list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { 1741 List<Singledata> list = jdbcTemplate.query(sql, new RowMapper<Singledata>() {
1648 //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); 1742 //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
@@ -1929,14 +2023,17 @@ public class FormsServiceImpl implements FormsService { @@ -1929,14 +2023,17 @@ public class FormsServiceImpl implements FormsService {
1929 + " from bsth_c_s_sp_info_real r where " 2023 + " from bsth_c_s_sp_info_real r where "
1930 + " r.schedule_date_str = '"+startDate+"'" 2024 + " r.schedule_date_str = '"+startDate+"'"
1931 + " and r.s_gh !='' and r.s_gh is not null "; 2025 + " and r.s_gh !='' and r.s_gh is not null ";
1932 - if(xlbm.equals("")){  
1933 - sql +="and r.gs_bm='"+gsdm+"' "  
1934 - + " and r.fgs_bm='"+fgsdm+"'";  
1935 - }else{ 2026 + if(!xlbm.equals("")){
1936 sql += " and r.xl_bm = '"+xlbm+"'"; 2027 sql += " and r.xl_bm = '"+xlbm+"'";
1937 } 2028 }
1938 - sql += " group by r.s_gh,r.s_name,"  
1939 - + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh"; 2029 + if(!gsdm.equals("")){
  2030 + sql += " and r.gs_bm='"+gsdm+"'";
  2031 + }
  2032 + if(!fgsdm.equals("")){
  2033 + sql += " and r.fgs_bm='"+fgsdm+"'";
  2034 + }
  2035 + sql += " group by r.s_gh,r.s_name,"
  2036 + + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh";
1940 2037
1941 list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { 2038 list = jdbcTemplate.query(sql, new RowMapper<Singledata>() {
1942 //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); 2039 //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
@@ -2205,13 +2302,16 @@ public class FormsServiceImpl implements FormsService { @@ -2205,13 +2302,16 @@ public class FormsServiceImpl implements FormsService {
2205 + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm" 2302 + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm"
2206 + " from bsth_c_s_sp_info_real r where " 2303 + " from bsth_c_s_sp_info_real r where "
2207 + " r.schedule_date_str = '"+startDate+"'" 2304 + " r.schedule_date_str = '"+startDate+"'"
2208 - + " and r.s_gh !='' and r.s_gh is not null ";  
2209 - if(xlbm.equals("")){  
2210 - sql +="and r.gs_bm='"+gsdm+"' "  
2211 - + " and r.fgs_bm='"+fgsdm+"'";  
2212 - }else{ 2305 + + " and r.s_gh !='' and r.s_gh is not null ";
  2306 + if(!xlbm.equals("")){
2213 sql += " and r.xl_bm = '"+xlbm+"'"; 2307 sql += " and r.xl_bm = '"+xlbm+"'";
2214 } 2308 }
  2309 + if(!gsdm.equals("")){
  2310 + sql += " and r.gs_bm='"+gsdm+"'";
  2311 + }
  2312 + if(!fgsdm.equals("")){
  2313 + sql += " and r.fgs_bm='"+fgsdm+"'";
  2314 + }
2215 sql += " group by r.s_gh,r.s_name," 2315 sql += " group by r.s_gh,r.s_name,"
2216 + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh"; 2316 + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh";
2217 2317
@@ -2285,7 +2385,10 @@ public class FormsServiceImpl implements FormsService { @@ -2285,7 +2385,10 @@ public class FormsServiceImpl implements FormsService {
2285 @Override 2385 @Override
2286 public List<Operationservice> operationservice(Map<String, Object> map) { 2386 public List<Operationservice> operationservice(Map<String, Object> map) {
2287 2387
2288 - String xlbm=map.get("line").toString().trim(); 2388 + String sfyy="";
  2389 + if(map.get("sfyy")!=null){
  2390 + sfyy=map.get("sfyy").toString();
  2391 + }
2289 String gsdm=""; 2392 String gsdm="";
2290 if(map.get("gsdmOperat")!=null){ 2393 if(map.get("gsdmOperat")!=null){
2291 gsdm=map.get("gsdmOperat").toString(); 2394 gsdm=map.get("gsdmOperat").toString();
@@ -2294,37 +2397,72 @@ public class FormsServiceImpl implements FormsService { @@ -2294,37 +2397,72 @@ public class FormsServiceImpl implements FormsService {
2294 if(map.get("fgsdmOperat")!=null){ 2397 if(map.get("fgsdmOperat")!=null){
2295 fgsdm=map.get("fgsdmOperat").toString(); 2398 fgsdm=map.get("fgsdmOperat").toString();
2296 } 2399 }
2297 - startDate=map.get("startDate").toString();  
2298 - endDate =map.get("endDate").toString();  
2299 - String sql="select r.xl_bm" 2400 + String xlbm=map.get("line").toString().trim();
  2401 + String startDate=map.get("startDate").toString();
  2402 + String endDate =map.get("endDate").toString();
  2403 +
  2404 + String sql="select r.xl_bm, r.gs_bm, r.fgs_bm"
2300 + " from bsth_c_s_sp_info_real r where" 2405 + " from bsth_c_s_sp_info_real r where"
2301 + " r.schedule_date_str BETWEEN '"+startDate+"' and '"+endDate+"'"; 2406 + " r.schedule_date_str BETWEEN '"+startDate+"' and '"+endDate+"'";
2302 - if(xlbm.equals("")){  
2303 - sql +="and r.gs_bm='"+gsdm+"' "  
2304 - + " and r.fgs_bm='"+fgsdm+"'";  
2305 - }else{ 2407 + if(xlbm.length() != 0){
2306 sql += " and r.xl_bm = '"+xlbm+"'"; 2408 sql += " and r.xl_bm = '"+xlbm+"'";
2307 } 2409 }
2308 - sql += " group by r.xl_bm";  
2309 - 2410 + if(gsdm.length() != 0){
  2411 + sql += " and r.gs_bm='"+gsdm+"'";
  2412 + }
  2413 + if(fgsdm.length() != 0){
  2414 + sql += " and r.fgs_bm='"+fgsdm+"'";
  2415 + }
  2416 + sql += " group by r.gs_bm, r.fgs_bm, r.xl_bm " +
  2417 + "order by r.gs_bm, r.fgs_bm, r.xl_bm";
  2418 +
  2419 + System.out.println(sql);
2310 2420
2311 - List<Operationservice> list= jdbcTemplate.query(sql, new RowMapper<Operationservice>() {  
2312 - @Override  
2313 - public Operationservice mapRow(ResultSet arg0, int arg1) throws SQLException {  
2314 - Operationservice ve = new Operationservice();  
2315 - ve.setXlBm(arg0.getString("xl_bm"));  
2316 - return ve; 2421 + List<Operationservice> query = jdbcTemplate.query(sql, new RowMapper<Operationservice>() {
  2422 + @Override
  2423 + public Operationservice mapRow(ResultSet arg0, int arg1) throws SQLException {
  2424 + Operationservice ve = new Operationservice();
  2425 + ve.setXlBm(arg0.getString("xl_bm"));
  2426 + ve.setGs(arg0.getString("gs_bm"));
  2427 + ve.setFgs(arg0.getString("fgs_bm"));
  2428 + return ve;
  2429 + }
  2430 + });
  2431 +
  2432 + List<Operationservice> list = new ArrayList<Operationservice>();
  2433 + Map<String, Boolean> lineNature = lineService.lineNature();
  2434 + for(Operationservice o : query){
  2435 + o.setFgs(BasicData.businessFgsCodeNameMap.get(o.getFgs()+"_"+o.getGs()));
  2436 +
  2437 + String xl = o.getXlBm();
  2438 + if(sfyy.length() != 0){
  2439 + if(sfyy.equals("0")){
  2440 + list.add(o);
  2441 + } else if(sfyy.equals("1")){
  2442 + if(lineNature.containsKey(xl) && lineNature.get(xl)){
  2443 + list.add(o);
  2444 + }
  2445 + } else {
  2446 + if(lineNature.containsKey(xl) && !lineNature.get(xl)){
  2447 + list.add(o);
  2448 + }
2317 } 2449 }
2318 - });  
2319 -  
2320 - String ylbSql=" select * from bsth_c_ylb where rq BETWEEN '"+startDate+"' and '"+endDate+"'";  
2321 - if(xlbm.equals("")){  
2322 - ylbSql +="and ssgsdm='"+gsdm+"' "  
2323 - + " and fgsdm='"+fgsdm+"'";  
2324 - }else{ 2450 + } else {
  2451 + list.add(o);
  2452 + }
  2453 + }
  2454 +
  2455 + String ylbSql=" select * from bsth_c_ylb where rq BETWEEN '"+startDate+"' and '"+endDate+"'";
  2456 + if(!xlbm.equals("")){
2325 ylbSql += " and xlbm = '"+xlbm+"'"; 2457 ylbSql += " and xlbm = '"+xlbm+"'";
2326 } 2458 }
2327 - List<Ylb> ylbList= jdbcTemplate.query(ylbSql, new RowMapper<Ylb>() { 2459 + if(!gsdm.equals("")){
  2460 + ylbSql += " and ssgsdm='"+gsdm+"'";
  2461 + }
  2462 + if(!fgsdm.equals("")){
  2463 + ylbSql += " and fgsdm='"+fgsdm+"'";
  2464 + }
  2465 + List<Ylb> ylbList= jdbcTemplate.query(ylbSql, new RowMapper<Ylb>() {
2328 @Override 2466 @Override
2329 public Ylb mapRow(ResultSet arg0, int arg1) throws SQLException { 2467 public Ylb mapRow(ResultSet arg0, int arg1) throws SQLException {
2330 Ylb y = new Ylb(); 2468 Ylb y = new Ylb();
@@ -2333,16 +2471,19 @@ public class FormsServiceImpl implements FormsService { @@ -2333,16 +2471,19 @@ public class FormsServiceImpl implements FormsService {
2333 y.setYh(arg0.getDouble("yh")); 2471 y.setYh(arg0.getDouble("yh"));
2334 return y; 2472 return y;
2335 } 2473 }
2336 - }); 2474 + });
2337 2475
2338 - String dlbSql=" select * from bsth_c_dlb where rq BETWEEN '"+startDate+"' and '"+endDate+"'";  
2339 - if(xlbm.equals("")){  
2340 - ylbSql +="and ssgsdm='"+gsdm+"' "  
2341 - + " and fgsdm='"+fgsdm+"'";  
2342 - }else{ 2476 + String dlbSql=" select * from bsth_c_dlb where rq BETWEEN '"+startDate+"' and '"+endDate+"'";
  2477 + if(!xlbm.equals("")){
2343 ylbSql += " and xlbm = '"+xlbm+"'"; 2478 ylbSql += " and xlbm = '"+xlbm+"'";
2344 } 2479 }
2345 - List<Dlb> dlbList= jdbcTemplate.query(dlbSql, new RowMapper<Dlb>() { 2480 + if(!gsdm.equals("")){
  2481 + ylbSql += " and ssgsdm='"+gsdm+"'";
  2482 + }
  2483 + if(!fgsdm.equals("")){
  2484 + ylbSql += " and fgsdm='"+fgsdm+"'";
  2485 + }
  2486 + List<Dlb> dlbList= jdbcTemplate.query(dlbSql, new RowMapper<Dlb>() {
2346 @Override 2487 @Override
2347 public Dlb mapRow(ResultSet arg0, int arg1) throws SQLException { 2488 public Dlb mapRow(ResultSet arg0, int arg1) throws SQLException {
2348 Dlb d = new Dlb(); 2489 Dlb d = new Dlb();
@@ -2544,8 +2685,13 @@ public class FormsServiceImpl implements FormsService { @@ -2544,8 +2685,13 @@ public class FormsServiceImpl implements FormsService {
2544 } 2685 }
2545 String rq2 = sdf1.format(d); 2686 String rq2 = sdf1.format(d);
2546 String rq3 = sdf1.format(d1); 2687 String rq3 = sdf1.format(d1);
2547 - String company = map.get("gsdmTurn").toString();  
2548 - String subCompany = map.get("fgsdmTurn").toString(); 2688 + String company = "", subCompany = "";
  2689 + if(map.get("gsdmTurn") != null){
  2690 + company = map.get("gsdmTurn").toString();
  2691 + }
  2692 + if(map.get("fgsdmTurn") != null){
  2693 + subCompany = map.get("fgsdmTurn").toString();
  2694 + }
2549 String line = map.get("line").toString(); 2695 String line = map.get("line").toString();
2550 String startDate = map.get("startDate").toString(); 2696 String startDate = map.get("startDate").toString();
2551 String endDate = map.get("endDate").toString(); 2697 String endDate = map.get("endDate").toString();
@@ -2559,12 +2705,17 @@ public class FormsServiceImpl implements FormsService { @@ -2559,12 +2705,17 @@ public class FormsServiceImpl implements FormsService {
2559 List<Line> lineList = lineRepository.findLineBygsBm(company, subCompany, line.length()==0?"%"+line+"%":line); 2705 List<Line> lineList = lineRepository.findLineBygsBm(company, subCompany, line.length()==0?"%"+line+"%":line);
2560 2706
2561 String sql = "select gs_name, fgs_name, cl_zbh, fcsj, bc_type, xl_bm, xl_name, schedule_date" 2707 String sql = "select gs_name, fgs_name, cl_zbh, fcsj, bc_type, xl_bm, xl_name, schedule_date"
2562 - + " from bsth_c_s_sp_info where gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"' "  
2563 - + "and schedule_date >= '"+startDate+"' "  
2564 - + "and schedule_date <= '"+endDate+"' "; 2708 + + " from bsth_c_s_sp_info where "
  2709 + + "schedule_date >= '"+startDate+"' and schedule_date <= '"+endDate+"' ";
2565 if(line.trim().length() != 0){ 2710 if(line.trim().length() != 0){
2566 sql += "and xl_bm = '"+line+"' "; 2711 sql += "and xl_bm = '"+line+"' ";
2567 } 2712 }
  2713 + if(company.trim().length() != 0){
  2714 + sql += "and gs_bm = '"+company+"' ";
  2715 + }
  2716 + if(subCompany.trim().length() != 0){
  2717 + sql += "and fgs_bm = '"+subCompany+"' ";
  2718 + }
2568 List<SchedulePlanInfo> planList = jdbcTemplate.query(sql, new RowMapper<SchedulePlanInfo>() { 2719 List<SchedulePlanInfo> planList = jdbcTemplate.query(sql, new RowMapper<SchedulePlanInfo>() {
2569 2720
2570 @Override 2721 @Override
@@ -2711,18 +2862,34 @@ public class FormsServiceImpl implements FormsService { @@ -2711,18 +2862,34 @@ public class FormsServiceImpl implements FormsService {
2711 2862
2712 e.printStackTrace(); 2863 e.printStackTrace();
2713 } 2864 }
  2865 +
  2866 + String gsbm = "", fgsbm = "";
  2867 + if(map.get("gsdmEcecut")!=null){
  2868 + gsbm = map.get("gsdmEcecut").toString();
  2869 + }
  2870 + if(map.get("fgsdmEcecut")!=null){
  2871 + fgsbm = map.get("fgsdmEcecut").toString();
  2872 + }
  2873 +
2714 String rq2 = sdf1.format(d); 2874 String rq2 = sdf1.format(d);
2715 String rq3 = sdf1.format(d1); 2875 String rq3 = sdf1.format(d1);
2716 2876
2717 rq = rq2 + "-" + rq3; 2877 rq = rq2 + "-" + rq3;
2718 2878
  2879 + String where = "";
  2880 + if(gsbm.trim().length() != 0){
  2881 + where += " and gs_bm = '" + gsbm + "'";
  2882 + }
  2883 + if(fgsbm.trim().length() != 0){
  2884 + where += " and fgs_bm = '" + fgsbm + "'";
  2885 + }
  2886 +
2719 String sql = " select b.xlgs, a.gs_bm,a.gs_name, a.fgs_bm,a.fgs_name , a.xl_bm,b.xl_name,b.sbc,b.sxl,b.scl,a.jbc ,a.jxl ,a.jcl,a.gslsbm,a.fgsbm,a.bc_type from " 2887 String sql = " select b.xlgs, a.gs_bm,a.gs_name, a.fgs_bm,a.fgs_name , a.xl_bm,b.xl_name,b.sbc,b.sxl,b.scl,a.jbc ,a.jxl ,a.jcl,a.gslsbm,a.fgsbm,a.bc_type from "
2720 + " (select count(DISTINCT gs_bm) gslsbm, gs_bm, count(DISTINCT fgs_bm) fgsbm,fgs_bm,gs_name,fgs_name ,xl_bm, count(*) as jbc,COUNT(DISTINCT xl_bm) as jxl ,COUNT(DISTINCT cl_zbh) as jcl,bc_type" 2888 + " (select count(DISTINCT gs_bm) gslsbm, gs_bm, count(DISTINCT fgs_bm) fgsbm,fgs_bm,gs_name,fgs_name ,xl_bm, count(*) as jbc,COUNT(DISTINCT xl_bm) as jxl ,COUNT(DISTINCT cl_zbh) as jcl,bc_type"
2721 + " from bsth_c_s_sp_info" + " where schedule_date >= '" 2889 + " from bsth_c_s_sp_info" + " where schedule_date >= '"
2722 + map.get("startDate").toString() + "' and schedule_date <= '" + map.get("endDate").toString() + "' and xl_bm='" 2890 + map.get("startDate").toString() + "' and schedule_date <= '" + map.get("endDate").toString() + "' and xl_bm='"
2723 + map.get("line").toString() + "' AND gs_bm is not null AND bc_type NOT IN ('in', 'out')" 2891 + map.get("line").toString() + "' AND gs_bm is not null AND bc_type NOT IN ('in', 'out')"
2724 - + " and gs_bm='"+ map.get("gsdmEcecut").toString() + "'"  
2725 - + " and fgs_bm='"+ map.get("fgsdmEcecut").toString() + "'" 2892 + + where
2726 // + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name,bc_type " 2893 // + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name,bc_type "
2727 + " ) a left JOIN (" 2894 + " ) a left JOIN ("
2728 + "SELECT COUNT(*) as xlgs,b.gs_bm,b.fgs_bm,b.xl_bm,b.xl_name,b.gs_name,b.fgs_name, b.sbc,b.sxl ,b.scl " 2895 + "SELECT COUNT(*) as xlgs,b.gs_bm,b.fgs_bm,b.xl_bm,b.xl_name,b.gs_name,b.fgs_name, b.sbc,b.sxl ,b.scl "
@@ -2899,14 +3066,17 @@ public class FormsServiceImpl implements FormsService { @@ -2899,14 +3066,17 @@ public class FormsServiceImpl implements FormsService {
2899 + " r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm" 3066 + " r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm"
2900 + " from bsth_c_s_sp_info_real r where " 3067 + " from bsth_c_s_sp_info_real r where "
2901 + "r.schedule_date_str = '"+map.get("date").toString()+"'"; 3068 + "r.schedule_date_str = '"+map.get("date").toString()+"'";
2902 - if(xlbm.equals("")){  
2903 - sql +="and r.gs_bm='"+gsbm+"' "  
2904 - + " and r.fgs_bm='"+fgsbm+"'";  
2905 - }else{ 3069 + if(!xlbm.equals("")){
2906 sql += " and r.xl_bm = '"+xlbm+"'"; 3070 sql += " and r.xl_bm = '"+xlbm+"'";
2907 } 3071 }
2908 - sql += " group by r.schedule_date_str,"  
2909 - + " r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh"; 3072 + if(!gsbm.equals("")){
  3073 + sql += " and r.gs_bm='"+gsbm+"'";
  3074 + }
  3075 + if(!fgsbm.equals("")){
  3076 + sql += " and r.fgs_bm='"+fgsbm+"'";
  3077 + }
  3078 + sql += " group by r.schedule_date_str,"
  3079 + + " r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh";
2910 3080
2911 List<Daily> list = jdbcTemplate.query(sql, new RowMapper<Daily>() { 3081 List<Daily> list = jdbcTemplate.query(sql, new RowMapper<Daily>() {
2912 @Override 3082 @Override
@@ -2972,10 +3142,10 @@ public class FormsServiceImpl implements FormsService { @@ -2972,10 +3142,10 @@ public class FormsServiceImpl implements FormsService {
2972 } 3142 }
2973 3143
2974 class SingledataByXlbm implements Comparator<Singledata>{ 3144 class SingledataByXlbm implements Comparator<Singledata>{
2975 - @Override  
2976 - public int compare(Singledata o1, Singledata o2) {  
2977 - // TODO Auto-generated method stub  
2978 - return (o2.getxL()+o2.getClzbh()).compareTo((o1.getxL()+o1.getClzbh()));  
2979 - } 3145 + @Override
  3146 + public int compare(Singledata o1, Singledata o2) {
  3147 + // TODO Auto-generated method stub
  3148 + return (o1.getgS()+o1.getxL()+o1.getClzbh()).compareTo((o2.getgS()+o2.getxL()+o2.getClzbh()));
  3149 + }
2980 } 3150 }
2981 } 3151 }
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
@@ -44,6 +44,7 @@ import com.bsth.repository.oil.DlbRepository; @@ -44,6 +44,7 @@ import com.bsth.repository.oil.DlbRepository;
44 import com.bsth.repository.oil.YlbRepository; 44 import com.bsth.repository.oil.YlbRepository;
45 import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; 45 import com.bsth.repository.realcontrol.ScheduleRealInfoRepository;
46 import com.bsth.service.BusIntervalService; 46 import com.bsth.service.BusIntervalService;
  47 +import com.bsth.service.LineService;
47 import com.bsth.service.report.CulateMileageService; 48 import com.bsth.service.report.CulateMileageService;
48 import com.bsth.service.schedule.PeopleCarPlanService; 49 import com.bsth.service.schedule.PeopleCarPlanService;
49 import com.bsth.service.sys.DutyEmployeeService; 50 import com.bsth.service.sys.DutyEmployeeService;
@@ -60,8 +61,11 @@ import com.google.gson.Gson; @@ -60,8 +61,11 @@ import com.google.gson.Gson;
60 public class BusIntervalServiceImpl implements BusIntervalService { 61 public class BusIntervalServiceImpl implements BusIntervalService {
61 62
62 @Autowired 63 @Autowired
63 - CulateMileageService culateService; 64 + LineService lineService;
64 65
  66 + @Autowired
  67 + CulateMileageService culateService;
  68 +
65 @Autowired 69 @Autowired
66 private PeopleCarPlanService peopleCarPlanService; 70 private PeopleCarPlanService peopleCarPlanService;
67 71
@@ -113,7 +117,10 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -113,7 +117,10 @@ public class BusIntervalServiceImpl implements BusIntervalService {
113 } 117 }
114 } 118 }
115 if(company.length() != 0){ 119 if(company.length() != 0){
116 - sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; 120 + sql += " and gs_bm = '"+company+"'";
  121 + }
  122 + if(subCompany.length() != 0){
  123 + sql += " and fgs_bm = '"+subCompany+"'";
117 } 124 }
118 if(normal){ 125 if(normal){
119 sql += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; 126 sql += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'";
@@ -147,6 +154,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -147,6 +154,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
147 schedule.setAdjustExps(rs.getString("adjust_exps")); 154 schedule.setAdjustExps(rs.getString("adjust_exps"));
148 schedule.setJhlcOrig(rs.getDouble("jhlc_orig")); 155 schedule.setJhlcOrig(rs.getDouble("jhlc_orig"));
149 schedule.setRemarks(rs.getString("remarks")); 156 schedule.setRemarks(rs.getString("remarks"));
  157 + schedule.setFgsBm(rs.getString("fgs_bm"));
150 schedule.setGsName(rs.getString("gs_name")); 158 schedule.setGsName(rs.getString("gs_name"));
151 schedule.setFgsName(rs.getString("fgs_name")); 159 schedule.setFgsName(rs.getString("fgs_name"));
152 schedule.setDfAuto(rs.getBoolean("df_auto")); 160 schedule.setDfAuto(rs.getBoolean("df_auto"));
@@ -419,8 +427,11 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -419,8 +427,11 @@ public class BusIntervalServiceImpl implements BusIntervalService {
419 List<Map<String, Object>> tempList = new ArrayList<Map<String, Object>>(); 427 List<Map<String, Object>> tempList = new ArrayList<Map<String, Object>>();
420 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); 428 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>();
421 429
422 - String company = map.get("company").toString();  
423 - String subCompany = map.get("subCompany").toString(); 430 + String company = "", subCompany = "";
  431 + if(map.get("company")!=null)
  432 + company = map.get("company").toString();
  433 + if(map.get("subCompany")!=null)
  434 + subCompany = map.get("subCompany").toString();
424 String line = map.get("line").toString(); 435 String line = map.get("line").toString();
425 String startDate = map.get("startDate").toString(); 436 String startDate = map.get("startDate").toString();
426 String endDate = map.get("endDate").toString(); 437 String endDate = map.get("endDate").toString();
@@ -429,6 +440,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -429,6 +440,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
429 String times1 = map.get("times1").toString(); 440 String times1 = map.get("times1").toString();
430 String times2 = map.get("times2").toString(); 441 String times2 = map.get("times2").toString();
431 String type = map.get("type").toString(); 442 String type = map.get("type").toString();
  443 + String sfyy = map.get("sfyy").toString();
432 int sfqr = Integer.valueOf(map.get("sfqr").toString()); 444 int sfqr = Integer.valueOf(map.get("sfqr").toString());
433 445
434 if(startDate.length() == 0){ 446 if(startDate.length() == 0){
@@ -467,6 +479,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -467,6 +479,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
467 // int startTime = Integer.valueOf(split[0].split(":")[0])*60 + Integer.valueOf(split[0].split(":")[1]); 479 // int startTime = Integer.valueOf(split[0].split(":")[0])*60 + Integer.valueOf(split[0].split(":")[1]);
468 // int endTime = Integer.valueOf(split[1].split(":")[0])*60 + Integer.valueOf(split[1].split(":")[1]); 480 // int endTime = Integer.valueOf(split[1].split(":")[0])*60 + Integer.valueOf(split[1].split(":")[1]);
469 481
  482 + Map<String, Boolean> lineNature = lineService.lineNature();
  483 +
470 for(ScheduleRealInfo schedule : list){ 484 for(ScheduleRealInfo schedule : list){
471 if(schedule.isCcService()) 485 if(schedule.isCcService())
472 continue; 486 continue;
@@ -479,7 +493,19 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -479,7 +493,19 @@ public class BusIntervalServiceImpl implements BusIntervalService {
479 } 493 }
480 if(schedule.getXlName() == null || schedule.getXlName().trim().length() == 0) 494 if(schedule.getXlName() == null || schedule.getXlName().trim().length() == 0)
481 continue; 495 continue;
482 - String key = schedule.getXlBm() + "/" + schedule.getXlName() + "/" + schedule.getQdzName(); 496 +
  497 + if(lineNature.containsKey(schedule.getXlBm()) && lineNature.get(schedule.getXlBm()) != null){
  498 + if(sfyy.equals("1") && !lineNature.get(schedule.getXlBm())){
  499 + continue;
  500 + } else if(sfyy.equals("2") && lineNature.get(schedule.getXlBm())){
  501 + continue;
  502 + }
  503 + } else if(sfyy.equals("2")){
  504 + continue;
  505 + }
  506 +
  507 + String key = schedule.getXlBm() + "/" + schedule.getXlName() + "/" + schedule.getQdzName()
  508 + + "/" + schedule.getFgsName() + "/" + schedule.getFgsBm();
483 if(!keyMap.containsKey(key)) 509 if(!keyMap.containsKey(key))
484 keyMap.put(key, new ArrayList<ScheduleRealInfo>()); 510 keyMap.put(key, new ArrayList<ScheduleRealInfo>());
485 keyMap.get(key).add(schedule); 511 keyMap.get(key).add(schedule);
@@ -592,7 +618,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -592,7 +618,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
592 tempMap.put("line", split[1]); 618 tempMap.put("line", split[1]);
593 tempMap.put("qdz", split[2]); 619 tempMap.put("qdz", split[2]);
594 tempMap.put("company", companyName); 620 tempMap.put("company", companyName);
595 - tempMap.put("subCompany", subCompanyName); 621 + tempMap.put("subCompany", split[3]);
  622 + tempMap.put("fgsbm", split[4]);
596 long jhInterval = 0l; 623 long jhInterval = 0l;
597 long sjInterval = 0l; 624 long sjInterval = 0l;
598 for(Long i : fcsjs) 625 for(Long i : fcsjs)
@@ -622,7 +649,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -622,7 +649,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
622 Map<Long, List<Map<String, Object>>> sortMap = new HashMap<Long, List<Map<String, Object>>>(); 649 Map<Long, List<Map<String, Object>>> sortMap = new HashMap<Long, List<Map<String, Object>>>();
623 for(Map<String, Object> m : tempList){ 650 for(Map<String, Object> m : tempList){
624 String times = m.get("times").toString(); 651 String times = m.get("times").toString();
625 - Long sort = Long.valueOf(times.substring(0, 2)); 652 + Long sort = Long.valueOf(times.substring(0, 2)) * 1000l
  653 + + Long.valueOf(m.get("fgsbm").toString());
626 if(!sortMap.containsKey(sort)){ 654 if(!sortMap.containsKey(sort)){
627 sortMap.put(sort, new ArrayList<Map<String, Object>>()); 655 sortMap.put(sort, new ArrayList<Map<String, Object>>());
628 sortList.add(sort); 656 sortList.add(sort);
@@ -649,7 +677,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -649,7 +677,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
649 }else if(statu.equals("0")){ 677 }else if(statu.equals("0")){
650 List<Long> longList = new ArrayList<Long>(); 678 List<Long> longList = new ArrayList<Long>();
651 for(String key : keyList){ 679 for(String key : keyList){
652 - long xlBm = Long.valueOf(key.split("/")[0]); 680 + long xlBm = Long.valueOf(key.split("/")[4]) * 1000000l + Long.valueOf(key.split("/")[0]);
653 if(!longList.contains(xlBm)) 681 if(!longList.contains(xlBm))
654 longList.add(xlBm); 682 longList.add(xlBm);
655 Collections.sort(longList); 683 Collections.sort(longList);
@@ -657,7 +685,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -657,7 +685,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
657 for(long xlBm : longList){ 685 for(long xlBm : longList){
658 for(String key : keyList){ 686 for(String key : keyList){
659 String[] split = key.split("/"); 687 String[] split = key.split("/");
660 - if((long)Long.valueOf(split[0]) == xlBm){ 688 + long kl = Long.valueOf(split[4]) * 1000000l + Long.valueOf(split[0]);
  689 + if(kl == xlBm){
661 Map<String, Object> tempMap = new HashMap<String, Object>(); 690 Map<String, Object> tempMap = new HashMap<String, Object>();
662 List<Long> fcsjs = new ArrayList<Long>(); 691 List<Long> fcsjs = new ArrayList<Long>();
663 List<Long> fcsjAs = new ArrayList<Long>(); 692 List<Long> fcsjAs = new ArrayList<Long>();
@@ -683,7 +712,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -683,7 +712,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
683 tempMap.put("line", split[1]); 712 tempMap.put("line", split[1]);
684 tempMap.put("qdz", split[2]); 713 tempMap.put("qdz", split[2]);
685 tempMap.put("company", companyName); 714 tempMap.put("company", companyName);
686 - tempMap.put("subCompany", subCompanyName); 715 + tempMap.put("subCompany", split[3]);
  716 + tempMap.put("fgsbm", split[4]);
687 tempMap.put("jhInterval", fcsjs.size()>0?df.format((double)fcsj/fcsjs.size()):"/"); 717 tempMap.put("jhInterval", fcsjs.size()>0?df.format((double)fcsj/fcsjs.size()):"/");
688 tempMap.put("sjInterval", fcsjAs.size()>0?df.format((double)fcsjA/fcsjAs.size()):"/"); 718 tempMap.put("sjInterval", fcsjAs.size()>0?df.format((double)fcsjA/fcsjAs.size()):"/");
689 tempMap.put("MaxInterval", fcsjAs.size()>0?fcsjAs.get(fcsjAs.size() - 1):"/"); 719 tempMap.put("MaxInterval", fcsjAs.size()>0?fcsjAs.get(fcsjAs.size() - 1):"/");
@@ -745,9 +775,13 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -745,9 +775,13 @@ public class BusIntervalServiceImpl implements BusIntervalService {
745 Set<Long> tsSet = new HashSet<Long>(); 775 Set<Long> tsSet = new HashSet<Long>();
746 Set<Long> ttSet = new HashSet<Long>(); 776 Set<Long> ttSet = new HashSet<Long>();
747 777
748 - String company = map.get("company").toString();  
749 - String subCompany = map.get("subCompany").toString(); 778 + String company = "", subCompany = "";
  779 + if(map.get("company")!=null)
  780 + company = map.get("company").toString();
  781 + if(map.get("subCompany")!=null)
  782 + subCompany = map.get("subCompany").toString();
750 String lp = map.get("lp").toString(); 783 String lp = map.get("lp").toString();
  784 + String sfyy = map.get("sfyy").toString();
751 String line = map.get("line").toString(); 785 String line = map.get("line").toString();
752 String statu = map.get("statu").toString(); 786 String statu = map.get("statu").toString();
753 String startDate = map.get("startDate").toString(); 787 String startDate = map.get("startDate").toString();
@@ -775,7 +809,10 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -775,7 +809,10 @@ public class BusIntervalServiceImpl implements BusIntervalService {
775 where += " and lp_name = '"+lp+"'"; 809 where += " and lp_name = '"+lp+"'";
776 } 810 }
777 if(company.length() != 0){ 811 if(company.length() != 0){
778 - where += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; 812 + where += " and gs_bm = '"+company+"'";
  813 + }
  814 + if(subCompany.length() != 0){
  815 + where += " and fgs_bm = '"+subCompany+"'";
779 } 816 }
780 if(sfqr == 1){ 817 if(sfqr == 1){
781 where += " and zdsj >= '"+times1+"' and fcsj <= '"+times2+"'"; 818 where += " and zdsj >= '"+times1+"' and fcsj <= '"+times2+"'";
@@ -783,7 +820,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -783,7 +820,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
783 // where += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; 820 // where += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'";
784 where += " and bc_type != 'ldks'"; 821 where += " and bc_type != 'ldks'";
785 822
786 - String sql = "select id, schedule_date_str, real_exec_date, xl_name, lp_name, bcs, bcsj, jhlc, bc_type," 823 + String sql = "select id, schedule_date_str, real_exec_date, xl_name, lp_name, bcs, bcsj, jhlc, bc_type, xl_bm, fgs_bm,"
787 + " fcsj, fcsj_actual, zdsj, zdsj_actual, qdz_name, zdz_name, xl_dir, status, remarks, gs_name, fgs_name, sp_id" 824 + " fcsj, fcsj_actual, zdsj, zdsj_actual, qdz_name, zdz_name, xl_dir, status, remarks, gs_name, fgs_name, sp_id"
788 + " ,cc_service from bsth_c_s_sp_info_real where schedule_date_str >= '"+startDate+"'" 825 + " ,cc_service from bsth_c_s_sp_info_real where schedule_date_str >= '"+startDate+"'"
789 + " and schedule_date_str <= '"+endDate+"'"+where+""; 826 + " and schedule_date_str <= '"+endDate+"'"+where+"";
@@ -796,6 +833,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -796,6 +833,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
796 schedule.setId(rs.getLong("id")); 833 schedule.setId(rs.getLong("id"));
797 schedule.setScheduleDateStr(rs.getString("schedule_date_str")); 834 schedule.setScheduleDateStr(rs.getString("schedule_date_str"));
798 schedule.setRealExecDate(rs.getString("real_exec_date")); 835 schedule.setRealExecDate(rs.getString("real_exec_date"));
  836 + schedule.setXlBm(rs.getString("xl_bm"));
799 schedule.setXlName(rs.getString("xl_name")); 837 schedule.setXlName(rs.getString("xl_name"));
800 schedule.setLpName(rs.getString("lp_name")); 838 schedule.setLpName(rs.getString("lp_name"));
801 schedule.setBcs(rs.getInt("bcs")); 839 schedule.setBcs(rs.getInt("bcs"));
@@ -813,6 +851,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -813,6 +851,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
813 schedule.setRemarks(rs.getString("remarks")); 851 schedule.setRemarks(rs.getString("remarks"));
814 schedule.setGsName(rs.getString("gs_name")); 852 schedule.setGsName(rs.getString("gs_name"));
815 schedule.setFgsName(rs.getString("fgs_name")); 853 schedule.setFgsName(rs.getString("fgs_name"));
  854 + schedule.setFgsBm(rs.getString("fgs_bm"));
816 schedule.setSpId(rs.getLong("sp_id")); 855 schedule.setSpId(rs.getLong("sp_id"));
817 schedule.setCcService(rs.getBoolean("cc_service")); 856 schedule.setCcService(rs.getBoolean("cc_service"));
818 857
@@ -877,7 +916,10 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -877,7 +916,10 @@ public class BusIntervalServiceImpl implements BusIntervalService {
877 sql += " and xl_bm = '"+line+"'"; 916 sql += " and xl_bm = '"+line+"'";
878 } 917 }
879 if(company.length() != 0){ 918 if(company.length() != 0){
880 - sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; 919 + sql += " and gs_bm = '"+company+"'";
  920 + }
  921 + if(subCompany.length() != 0){
  922 + sql += " and fgs_bm = '"+subCompany+"'";
881 } 923 }
882 temp1 = jdbcTemplate.query(sql, 924 temp1 = jdbcTemplate.query(sql,
883 new RowMapper<Map<String, String>>(){ 925 new RowMapper<Map<String, String>>(){
@@ -1002,13 +1044,26 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1002,13 +1044,26 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1002 cMap.get(key).add(cTask); 1044 cMap.get(key).add(cTask);
1003 } 1045 }
1004 1046
  1047 + Map<String, Boolean> lineNature = lineService.lineNature();
  1048 +
1005 for(ScheduleRealInfo schedule : list){ 1049 for(ScheduleRealInfo schedule : list){
1006 if(schedule.getXlName()==null || schedule.getXlName().trim().length()==0 1050 if(schedule.getXlName()==null || schedule.getXlName().trim().length()==0
1007 || schedule.isCcService()) 1051 || schedule.isCcService())
1008 continue; 1052 continue;
  1053 + String xlBm = schedule.getXlBm();
  1054 + if(lineNature.containsKey(xlBm) && lineNature.get(xlBm) != null){
  1055 + if(sfyy.equals("1") && !lineNature.get(xlBm)){
  1056 + continue;
  1057 + } else if(sfyy.equals("2") && lineNature.get(xlBm)){
  1058 + continue;
  1059 + }
  1060 + } else if(sfyy.equals("2")){
  1061 + continue;
  1062 + }
  1063 + String key = schedule.getScheduleDateStr() + "/" + schedule.getXlName() + "/"
  1064 + + schedule.getLpName() + "/" + schedule.getFgsName();
1009 if(model.length() != 0){ 1065 if(model.length() != 0){
1010 if(ttSet.contains(schedule.getSpId())){ 1066 if(ttSet.contains(schedule.getSpId())){
1011 - String key = schedule.getScheduleDateStr() + "/" + schedule.getXlName() + "/" + schedule.getLpName();  
1012 if(!keyMap.containsKey(key)) 1067 if(!keyMap.containsKey(key))
1013 keyMap.put(key, new ArrayList<ScheduleRealInfo>()); 1068 keyMap.put(key, new ArrayList<ScheduleRealInfo>());
1014 keyMap.get(key).add(schedule); 1069 keyMap.get(key).add(schedule);
@@ -1023,7 +1078,6 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1023,7 +1078,6 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1023 // } 1078 // }
1024 // } 1079 // }
1025 }else{ 1080 }else{
1026 - String key = schedule.getScheduleDateStr() + "/" + schedule.getXlName() + "/" + schedule.getLpName();  
1027 if(!keyMap.containsKey(key)) 1081 if(!keyMap.containsKey(key))
1028 keyMap.put(key, new ArrayList<ScheduleRealInfo>()); 1082 keyMap.put(key, new ArrayList<ScheduleRealInfo>());
1029 keyMap.get(key).add(schedule); 1083 keyMap.get(key).add(schedule);
@@ -1081,9 +1135,6 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1081,9 +1135,6 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1081 }else{ 1135 }else{
1082 jhyysj += fcsj2 - fcsj1; 1136 jhyysj += fcsj2 - fcsj1;
1083 } 1137 }
1084 - if(jhyysj < 0){  
1085 - System.out.println(fcsj2 + " - " + fcsj1 + " = " + (fcsj2 - fcsj1));  
1086 - }  
1087 jhyysj1 += fcsj2 - fcsj1; 1138 jhyysj1 += fcsj2 - fcsj1;
1088 } 1139 }
1089 if(i == 1 && schedule1.getBcType().toString().equals("normal")){ 1140 if(i == 1 && schedule1.getBcType().toString().equals("normal")){
@@ -1220,9 +1271,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1220,9 +1271,9 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1220 sjlc += Double.valueOf(m.get("lc").toString()); 1271 sjlc += Double.valueOf(m.get("lc").toString());
1221 } 1272 }
1222 } 1273 }
1223 - tempMap.put("company", companyName);  
1224 - tempMap.put("subCompany", subCompanyName);  
1225 String[] split = key.split("/"); 1274 String[] split = key.split("/");
  1275 + tempMap.put("company", companyName);
  1276 + tempMap.put("subCompany", split[3]);
1226 tempMap.put("date", split[0]); 1277 tempMap.put("date", split[0]);
1227 tempMap.put("line", split[1]); 1278 tempMap.put("line", split[1]);
1228 tempMap.put("lp", split[2]); 1279 tempMap.put("lp", split[2]);
@@ -1272,7 +1323,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1272,7 +1323,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1272 } 1323 }
1273 Map<String, List<Map<String, Object>>> keyMap2 = new HashMap<String, List<Map<String, Object>>>(); 1324 Map<String, List<Map<String, Object>>> keyMap2 = new HashMap<String, List<Map<String, Object>>>();
1274 for(Map<String, Object> m : resList){ 1325 for(Map<String, Object> m : resList){
1275 - String key = m.get("line").toString() + "/" + m.get("lp").toString(); 1326 + String key = m.get("line").toString() + "/" + m.get("lp").toString()
  1327 + + "/" + m.get("subCompany").toString();
1276 if(!keyMap2.containsKey(key)) 1328 if(!keyMap2.containsKey(key))
1277 keyMap2.put(key, new ArrayList<Map<String, Object>>()); 1329 keyMap2.put(key, new ArrayList<Map<String, Object>>());
1278 keyMap2.get(key).add(m); 1330 keyMap2.get(key).add(m);
@@ -1333,6 +1385,32 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1333,6 +1385,32 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1333 return a.compareTo(b); 1385 return a.compareTo(b);
1334 } 1386 }
1335 }); 1387 });
  1388 + Collections.sort(list3, new Comparator<String>() {
  1389 +
  1390 + public int compare(String o1, String o2) {
  1391 +
  1392 + Long a = 0l;
  1393 + Long b = 0l;
  1394 + String[] split1 = o1.split("/");
  1395 + String[] split2 = o2.split("/");
  1396 + char[] charArray1 = split1[2].toCharArray();
  1397 + char[] charArray2 = split2[2].toCharArray();
  1398 + for(int i = 0; i < charArray1.length; i++){
  1399 + long temp = 1l;
  1400 + for(int j = 0; j < i; j++)
  1401 + temp *= 10;
  1402 + a += (long)charArray1[charArray1.length - 1 - i] * temp;
  1403 + }
  1404 + for(int i = 0; i < charArray2.length; i++){
  1405 + long temp = 1l;
  1406 + for(int j = 0; j < i; j++)
  1407 + temp *= 10;
  1408 + b += (long)charArray2[charArray2.length - 1 - i] * temp;
  1409 + }
  1410 +
  1411 + return a.compareTo(b);
  1412 + }
  1413 + });
1336 for(String key : list3){ 1414 for(String key : list3){
1337 Map<String, Object> tempMap = new HashMap<String, Object>(); 1415 Map<String, Object> tempMap = new HashMap<String, Object>();
1338 BigDecimal jhyysj = new BigDecimal(0), jhyssj = new BigDecimal(0); 1416 BigDecimal jhyysj = new BigDecimal(0), jhyssj = new BigDecimal(0);
@@ -1362,7 +1440,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1362,7 +1440,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1362 tempMap.put("line", split[0]); 1440 tempMap.put("line", split[0]);
1363 tempMap.put("lp", split[1]); 1441 tempMap.put("lp", split[1]);
1364 tempMap.put("company", companyName); 1442 tempMap.put("company", companyName);
1365 - tempMap.put("subCompany", subCompanyName); 1443 + tempMap.put("subCompany", split[2]);
1366 tempMap.put("date", date); 1444 tempMap.put("date", date);
1367 list4.add(tempMap); 1445 list4.add(tempMap);
1368 } 1446 }
@@ -1373,7 +1451,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1373,7 +1451,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1373 List<Map<String, Object>> list5 = new ArrayList<Map<String, Object>>(); 1451 List<Map<String, Object>> list5 = new ArrayList<Map<String, Object>>();
1374 List<String> keyList = new ArrayList<String>(); 1452 List<String> keyList = new ArrayList<String>();
1375 for(Map<String, Object> m : list4){ 1453 for(Map<String, Object> m : list4){
1376 - String key = m.get("line").toString(); 1454 + String key = m.get("line").toString() + "/" + m.get("subCompany").toString();
1377 if(!keyMap4.containsKey(key)){ 1455 if(!keyMap4.containsKey(key)){
1378 keyList.add(key); 1456 keyList.add(key);
1379 keyMap4.put(key, new ArrayList<Map<String, Object>>()); 1457 keyMap4.put(key, new ArrayList<Map<String, Object>>());
@@ -1405,10 +1483,11 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1405,10 +1483,11 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1405 tempMap.put("sjyssj", sjyssj.equals(0)?0:sjyssj.divide(size, 2, RoundingMode.HALF_UP)); 1483 tempMap.put("sjyssj", sjyssj.equals(0)?0:sjyssj.divide(size, 2, RoundingMode.HALF_UP));
1406 tempMap.put("sjyycs", sjyycs.equals(0)?0:sjyycs.divide(size, 2, RoundingMode.HALF_UP)); 1484 tempMap.put("sjyycs", sjyycs.equals(0)?0:sjyycs.divide(size, 2, RoundingMode.HALF_UP));
1407 tempMap.put("sjyscs", sjyscs.equals(0)?0:sjyscs.divide(size, 2, RoundingMode.HALF_UP)); 1485 tempMap.put("sjyscs", sjyscs.equals(0)?0:sjyscs.divide(size, 2, RoundingMode.HALF_UP));
1408 - tempMap.put("line", key); 1486 + String[] split = key.split("/");
  1487 + tempMap.put("line", split[0]);
1409 tempMap.put("lp", keyMap4.get(key).size()); 1488 tempMap.put("lp", keyMap4.get(key).size());
1410 tempMap.put("company", companyName); 1489 tempMap.put("company", companyName);
1411 - tempMap.put("subCompany", subCompanyName); 1490 + tempMap.put("subCompany", split[1]);
1412 tempMap.put("date", date); 1491 tempMap.put("date", date);
1413 tempMap.put("work", keyMap4.get(key)); 1492 tempMap.put("work", keyMap4.get(key));
1414 list5.add(tempMap); 1493 list5.add(tempMap);
@@ -1491,8 +1570,13 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1491,8 +1570,13 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1491 Map<String, List<Map<String, Object>>> keyMap0 = new HashMap<String, List<Map<String, Object>>>(); 1570 Map<String, List<Map<String, Object>>> keyMap0 = new HashMap<String, List<Map<String, Object>>>();
1492 Map<String, List<Map<String, Object>>> keyMap1 = new HashMap<String, List<Map<String, Object>>>(); 1571 Map<String, List<Map<String, Object>>> keyMap1 = new HashMap<String, List<Map<String, Object>>>();
1493 1572
1494 - String company = map.get("company").toString();  
1495 - String subCompany = map.get("subCompany").toString(); 1573 + String sfqr = "", company = "", subCompany = "";
  1574 + if(map.get("sfqr")!=null)
  1575 + sfqr = map.get("sfqr").toString();
  1576 + if(map.get("company")!=null)
  1577 + company = map.get("company").toString();
  1578 + if(map.get("subCompany")!=null)
  1579 + subCompany = map.get("subCompany").toString();
1496 String line = map.get("line").toString(); 1580 String line = map.get("line").toString();
1497 String startDate = map.get("startDate").toString(); 1581 String startDate = map.get("startDate").toString();
1498 String endDate = map.get("endDate").toString(); 1582 String endDate = map.get("endDate").toString();
@@ -1510,6 +1594,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1510,6 +1594,9 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1510 if(times.length() == 0){ 1594 if(times.length() == 0){
1511 times = "05:00-23:00"; 1595 times = "05:00-23:00";
1512 } 1596 }
  1597 + if(sfqr.equals("0")){
  1598 + times = "";
  1599 + }
1513 1600
1514 list = getSchedule(company, subCompany, line, startDate, endDate, model, times, false); 1601 list = getSchedule(company, subCompany, line, startDate, endDate, model, times, false);
1515 1602
@@ -1522,9 +1609,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1522,9 +1609,9 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1522 date = startDate; 1609 date = startDate;
1523 } 1610 }
1524 1611
1525 - String[] split = times.split("-");  
1526 - int startTime = Integer.valueOf(split[0].split(":")[0])*60 + Integer.valueOf(split[0].split(":")[1]);  
1527 - int endTime = Integer.valueOf(split[1].split(":")[0])*60 + Integer.valueOf(split[1].split(":")[1]); 1612 +// String[] split = times.split("-");
  1613 +// int startTime = Integer.valueOf(split[0].split(":")[0])*60 + Integer.valueOf(split[0].split(":")[1]);
  1614 +// int endTime = Integer.valueOf(split[1].split(":")[0])*60 + Integer.valueOf(split[1].split(":")[1]);
1528 1615
1529 for(ScheduleRealInfo s : list){ 1616 for(ScheduleRealInfo s : list){
1530 if(s.isCcService()){ 1617 if(s.isCcService()){
@@ -1708,7 +1795,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1708,7 +1795,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1708 1795
1709 Map<String, Object> m = mapList.get(0); 1796 Map<String, Object> m = mapList.get(0);
1710 tempMap.put("dates", date); 1797 tempMap.put("dates", date);
1711 - tempMap.put("times", times); 1798 + tempMap.put("times", times.length()==0?"全日":times);
1712 tempMap.put("line", m.get("line")); 1799 tempMap.put("line", m.get("line"));
1713 tempMap.put("lp", m.get("lp")); 1800 tempMap.put("lp", m.get("lp"));
1714 tempMap.put("station", m.get("station")); 1801 tempMap.put("station", m.get("station"));
@@ -1730,10 +1817,14 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1730,10 +1817,14 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1730 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 1817 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
1731 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); 1818 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>();
1732 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); 1819 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>();
1733 -  
1734 - String company = map.get("company").toString();  
1735 - String subCompany = map.get("subCompany").toString(); 1820 +
  1821 + String company = "", subCompany = "";
  1822 + String sfyy = map.get("sfyy").toString();
1736 String line = map.get("line").toString(); 1823 String line = map.get("line").toString();
  1824 + if(map.get("company")!=null)
  1825 + company = map.get("company").toString();
  1826 + if(map.get("subCompany")!=null)
  1827 + subCompany = map.get("subCompany").toString();
1737 String startDate = map.get("startDate").toString(); 1828 String startDate = map.get("startDate").toString();
1738 String endDate = map.get("endDate").toString(); 1829 String endDate = map.get("endDate").toString();
1739 String model = map.get("model").toString(); 1830 String model = map.get("model").toString();
@@ -1777,17 +1868,86 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1777,17 +1868,86 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1777 int startTime = Integer.valueOf(split[0].split(":")[0])*60 + Integer.valueOf(split[0].split(":")[1]); 1868 int startTime = Integer.valueOf(split[0].split(":")[0])*60 + Integer.valueOf(split[0].split(":")[1]);
1778 int endTime = Integer.valueOf(split[1].split(":")[0])*60 + Integer.valueOf(split[1].split(":")[1]); 1869 int endTime = Integer.valueOf(split[1].split(":")[0])*60 + Integer.valueOf(split[1].split(":")[1]);
1779 1870
  1871 + Map<String, Boolean> lineNature = lineService.lineNature();
  1872 +
1780 for(ScheduleRealInfo schedule : list){ 1873 for(ScheduleRealInfo schedule : list){
1781 Long fcsj = schedule.getFcsjT(); 1874 Long fcsj = schedule.getFcsjT();
1782 if(sfqr == 1 && !(endTime!=0?fcsj>=startTime&&fcsj<endTime:fcsj>=startTime)){ 1875 if(sfqr == 1 && !(endTime!=0?fcsj>=startTime&&fcsj<endTime:fcsj>=startTime)){
1783 continue; 1876 continue;
1784 } 1877 }
1785 - String key = schedule.getXlName(); 1878 +
  1879 + String xlBm = schedule.getXlBm();
  1880 + if(lineNature.containsKey(xlBm) && lineNature.get(xlBm) != null){
  1881 + if(sfyy.equals("1") && !lineNature.get(xlBm)){
  1882 + continue;
  1883 + } else if(sfyy.equals("2") && lineNature.get(xlBm)){
  1884 + continue;
  1885 + }
  1886 + } else if(sfyy.equals("2")){
  1887 + continue;
  1888 + }
  1889 +
  1890 + String key = schedule.getXlName() + "/" + schedule.getFgsName();
1786 if(!keyMap.containsKey(key)) 1891 if(!keyMap.containsKey(key))
1787 keyMap.put(key, new ArrayList<ScheduleRealInfo>()); 1892 keyMap.put(key, new ArrayList<ScheduleRealInfo>());
1788 keyMap.get(key).add(schedule); 1893 keyMap.get(key).add(schedule);
1789 } 1894 }
1790 1895
  1896 + List<String> keyList = new ArrayList<String>();
  1897 + keyList.addAll(keyMap.keySet());
  1898 + Collections.sort(keyList, new Comparator<String>() {
  1899 +
  1900 + public int compare(String o1, String o2) {
  1901 +
  1902 + Long a = 0l;
  1903 + Long b = 0l;
  1904 + String[] split1 = o1.split("/");
  1905 + String[] split2 = o2.split("/");
  1906 + char[] charArray1 = split1[0].toCharArray();
  1907 + char[] charArray2 = split2[0].toCharArray();
  1908 + for(int i = 0; i < charArray1.length; i++){
  1909 + long temp = 1l;
  1910 + for(int j = 0; j < i; j++)
  1911 + temp *= 10;
  1912 + a += (long)charArray1[charArray1.length - 1 - i] * temp;
  1913 + }
  1914 + for(int i = 0; i < charArray2.length; i++){
  1915 + long temp = 1l;
  1916 + for(int j = 0; j < i; j++)
  1917 + temp *= 10;
  1918 + b += (long)charArray2[charArray2.length - 1 - i] * temp;
  1919 + }
  1920 +
  1921 + return a.compareTo(b);
  1922 + }
  1923 + });
  1924 + Collections.sort(keyList, new Comparator<String>() {
  1925 +
  1926 + public int compare(String o1, String o2) {
  1927 +
  1928 + Long a = 0l;
  1929 + Long b = 0l;
  1930 + String[] split1 = o1.split("/");
  1931 + String[] split2 = o2.split("/");
  1932 + char[] charArray1 = split1[1].toCharArray();
  1933 + char[] charArray2 = split2[1].toCharArray();
  1934 + for(int i = 0; i < charArray1.length; i++){
  1935 + long temp = 1l;
  1936 + for(int j = 0; j < i; j++)
  1937 + temp *= 10;
  1938 + a += (long)charArray1[charArray1.length - 1 - i] * temp;
  1939 + }
  1940 + for(int i = 0; i < charArray2.length; i++){
  1941 + long temp = 1l;
  1942 + for(int j = 0; j < i; j++)
  1943 + temp *= 10;
  1944 + b += (long)charArray2[charArray2.length - 1 - i] * temp;
  1945 + }
  1946 +
  1947 + return a.compareTo(b);
  1948 + }
  1949 + });
  1950 +
1791 Map<String, Object> temp = new HashMap<String, Object>(); 1951 Map<String, Object> temp = new HashMap<String, Object>();
1792 int jhbc_ = 0, sjbc_ = 0, 1952 int jhbc_ = 0, sjbc_ = 0,
1793 lzbc_ = 0, dmbc_ = 0, 1953 lzbc_ = 0, dmbc_ = 0,
@@ -1801,7 +1961,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1801,7 +1961,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1801 qclc_ = new BigDecimal("0"), kxlc_ = new BigDecimal("0"), 1961 qclc_ = new BigDecimal("0"), kxlc_ = new BigDecimal("0"),
1802 qhlc_ = new BigDecimal("0"), wylc_ = new BigDecimal("0"), 1962 qhlc_ = new BigDecimal("0"), wylc_ = new BigDecimal("0"),
1803 qtlc_ = new BigDecimal("0"); 1963 qtlc_ = new BigDecimal("0");
1804 - for(String key : keyMap.keySet()){ 1964 +// for(String key : keyMap.keySet()){
  1965 + for(String key : keyList){
1805 Map<String, Object> tempMap = new HashMap<String, Object>(); 1966 Map<String, Object> tempMap = new HashMap<String, Object>();
1806 int jhbc = 0, sjbc = 0, 1967 int jhbc = 0, sjbc = 0,
1807 lzbc = 0, dmbc = 0, 1968 lzbc = 0, dmbc = 0,
@@ -1907,11 +2068,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1907,11 +2068,12 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1907 if(jhlc.doubleValue() == 0d){ 2068 if(jhlc.doubleValue() == 0d){
1908 flag = false; 2069 flag = false;
1909 } 2070 }
  2071 + String[] keys = key.split("/");
1910 tempMap.put("date", Date); 2072 tempMap.put("date", Date);
1911 tempMap.put("company", companyName); 2073 tempMap.put("company", companyName);
1912 - tempMap.put("subCompany", subCompanyName); 2074 + tempMap.put("subCompany", keys[1]);
1913 tempMap.put("times", sfqr == 1 ? times : "全日"); 2075 tempMap.put("times", sfqr == 1 ? times : "全日");
1914 - tempMap.put("line", key); 2076 + tempMap.put("line", keys[0]);
1915 tempMap.put("jhbc", jhbc); 2077 tempMap.put("jhbc", jhbc);
1916 tempMap.put("sjbc", sjbc); 2078 tempMap.put("sjbc", sjbc);
1917 tempMap.put("bcbfb", df.format(jhbc>0?(double)sjbc/jhbc*100:0)+"%"); 2079 tempMap.put("bcbfb", df.format(jhbc>0?(double)sjbc/jhbc*100:0)+"%");
@@ -2055,10 +2217,14 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -2055,10 +2217,14 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2055 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); 2217 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>();
2056 Map<String, List<Map<String, Object>>> keyMap0 = new HashMap<String, List<Map<String, Object>>>(); 2218 Map<String, List<Map<String, Object>>> keyMap0 = new HashMap<String, List<Map<String, Object>>>();
2057 Map<String, List<Map<String, Object>>> keyMap1 = new HashMap<String, List<Map<String, Object>>>(); 2219 Map<String, List<Map<String, Object>>> keyMap1 = new HashMap<String, List<Map<String, Object>>>();
2058 -  
2059 - String company = map.get("company").toString();  
2060 - String subCompany = map.get("subCompany").toString(); 2220 +
  2221 + String company = "", subCompany = "";
  2222 + String sfyy = map.get("sfyy").toString();
2061 String line = map.get("line").toString(); 2223 String line = map.get("line").toString();
  2224 + if(map.get("company")!=null)
  2225 + company = map.get("company").toString();
  2226 + if(map.get("subCompany")!=null)
  2227 + subCompany = map.get("subCompany").toString();
2062 String startDate = map.get("startDate").toString(); 2228 String startDate = map.get("startDate").toString();
2063 String endDate = map.get("endDate").toString(); 2229 String endDate = map.get("endDate").toString();
2064 String times = map.get("times").toString(); 2230 String times = map.get("times").toString();
@@ -2091,7 +2257,10 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -2091,7 +2257,10 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2091 } 2257 }
2092 } 2258 }
2093 if(company.length() != 0){ 2259 if(company.length() != 0){
2094 - sql += " and (gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"')"; 2260 + sql += " and gs_bm = '"+company+"'";
  2261 + }
  2262 + if(subCompany.length() != 0){
  2263 + sql += " and fgs_bm = '"+subCompany+"'";
2095 } 2264 }
2096 sql += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; 2265 sql += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'";
2097 2266
@@ -2152,10 +2321,23 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -2152,10 +2321,23 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2152 date = startDate; 2321 date = startDate;
2153 else 2322 else
2154 date = startDate + "--" + endDate; 2323 date = startDate + "--" + endDate;
  2324 +
  2325 + Map<String, Boolean> lineNature = lineService.lineNature();
2155 2326
2156 for(ScheduleRealInfo schedule : list){ 2327 for(ScheduleRealInfo schedule : list){
2157 if(schedule.getXlName() == null || schedule.getXlName().trim().length() == 0) 2328 if(schedule.getXlName() == null || schedule.getXlName().trim().length() == 0)
2158 continue; 2329 continue;
  2330 + String xlBm = schedule.getXlBm();
  2331 + if(lineNature.containsKey(xlBm) && lineNature.get(xlBm) != null){
  2332 + if(sfyy.equals("1") && !lineNature.get(xlBm)){
  2333 + continue;
  2334 + } else if(sfyy.equals("2") && lineNature.get(xlBm)){
  2335 + continue;
  2336 + }
  2337 + } else if(sfyy.equals("2")){
  2338 + continue;
  2339 + }
  2340 +
2159 String key = schedule.getGsName() + "/" + schedule.getFgsName() + "/" + schedule.getXlBm(); 2341 String key = schedule.getGsName() + "/" + schedule.getFgsName() + "/" + schedule.getXlBm();
2160 if(!keyMap.containsKey(key)) 2342 if(!keyMap.containsKey(key))
2161 keyMap.put(key, new ArrayList<ScheduleRealInfo>()); 2343 keyMap.put(key, new ArrayList<ScheduleRealInfo>());
@@ -2339,13 +2521,14 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -2339,13 +2521,14 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2339 // tempMap.put("correctbl", df.format((double)(sddf + zddf + dxtz + lbtz)/sjbc*100) + "%"); 2521 // tempMap.put("correctbl", df.format((double)(sddf + zddf + dxtz + lbtz)/sjbc*100) + "%");
2340 resList.add(tempMap); 2522 resList.add(tempMap);
2341 } 2523 }
  2524 +
2342 //计算掉线调整 2525 //计算掉线调整
2343 String sqldot = "select * from " 2526 String sqldot = "select * from "
2344 - + "logger_sch_modify where gsbm =? and fgsbm=? and rq BETWEEN ? and ? order by line_code,sch_id";  
2345 -  
2346 - ; 2527 + + "logger_sch_modify where gsbm = ? and fgsbm like ? and rq BETWEEN ? and ? order by line_code,sch_id";
  2528 +
  2529 +
2347 List<SchEditInfoDto> listDot = jdbcTemplate.query(sqldot, 2530 List<SchEditInfoDto> listDot = jdbcTemplate.query(sqldot,
2348 - new BeanPropertyRowMapper(SchEditInfoDto.class),company,subCompany,map.get("startDate").toString(),map.get("endDate").toString()); 2531 + new BeanPropertyRowMapper(SchEditInfoDto.class),company,"%"+subCompany+"%",map.get("startDate").toString(),map.get("endDate").toString());
2349 int dxtzz=0; 2532 int dxtzz=0;
2350 Map<String, Object> mapSchId=new HashMap<String,Object>(); 2533 Map<String, Object> mapSchId=new HashMap<String,Object>();
2351 for (int i = 0; i < resList.size(); i++) { 2534 for (int i = 0; i < resList.size(); i++) {
@@ -2860,21 +3043,28 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -2860,21 +3043,28 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2860 String startDate = map.get("startDate").toString().trim(); 3043 String startDate = map.get("startDate").toString().trim();
2861 String endDate = map.get("endDate").toString().trim(); 3044 String endDate = map.get("endDate").toString().trim();
2862 String line = map.get("line").toString().trim(); 3045 String line = map.get("line").toString().trim();
2863 - String company = map.get("gs").toString().trim();  
2864 - String subCompany = map.get("fgs").toString().trim(); 3046 + String company = "", subCompany = "";
  3047 + if(map.get("gs")!=null)
  3048 + company = map.get("gs").toString().trim();
  3049 + if(map.get("fgs")!=null)
  3050 + subCompany = map.get("fgs").toString().trim();
  3051 + String sfyy = "";
  3052 + if(map.get("sfyy")!=null)
  3053 + sfyy = map.get("sfyy").toString().trim();
2865 3054
2866 String sql = "select id, cl_zbh, fcsj, fcsj_actual, j_gh, j_name, lp_name, qdz_name, " + 3055 String sql = "select id, cl_zbh, fcsj, fcsj_actual, j_gh, j_name, lp_name, qdz_name, " +
2867 - "schedule_date_str, xl_name, zdsj, zdsj_actual, fgs_name, gs_name, xl_dir, xl_bm " + 3056 + "schedule_date_str, xl_name, zdsj, zdsj_actual, fgs_bm, fgs_name, gs_name, xl_dir, xl_bm " +
2868 "from bsth_c_s_sp_info_real " + 3057 "from bsth_c_s_sp_info_real " +
2869 "where schedule_date_str >= '"+startDate+"' and schedule_date_str <= '"+endDate+"' " + 3058 "where schedule_date_str >= '"+startDate+"' and schedule_date_str <= '"+endDate+"' " +
2870 "and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks' and cc_service = 0"; 3059 "and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks' and cc_service = 0";
2871 3060
2872 if(company.length() != 0) 3061 if(company.length() != 0)
2873 - sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; 3062 + sql += " and gs_bm = '"+company+"'";
  3063 + if(subCompany.length() != 0)
  3064 + sql += " and fgs_bm = '"+subCompany+"'";
2874 if(line.length() != 0) 3065 if(line.length() != 0)
2875 sql += " and xl_bm = '"+line+"'"; 3066 sql += " and xl_bm = '"+line+"'";
2876 3067
2877 - System.out.println(sql);  
2878 List<ScheduleRealInfo> list = jdbcTemplate.query(sql, 3068 List<ScheduleRealInfo> list = jdbcTemplate.query(sql,
2879 new RowMapper<ScheduleRealInfo>(){ 3069 new RowMapper<ScheduleRealInfo>(){
2880 @Override 3070 @Override
@@ -2893,6 +3083,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -2893,6 +3083,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2893 schedule.setQdzName(rs.getString("qdz_name")); 3083 schedule.setQdzName(rs.getString("qdz_name"));
2894 schedule.setGsName(rs.getString("gs_name")); 3084 schedule.setGsName(rs.getString("gs_name"));
2895 schedule.setFgsName(rs.getString("fgs_name")); 3085 schedule.setFgsName(rs.getString("fgs_name"));
  3086 + schedule.setFgsBm(rs.getString("fgs_bm"));
2896 schedule.setClZbh(rs.getString("cl_zbh")); 3087 schedule.setClZbh(rs.getString("cl_zbh"));
2897 schedule.setjGh(rs.getString("j_gh")); 3088 schedule.setjGh(rs.getString("j_gh"));
2898 schedule.setjName(rs.getString("j_name")); 3089 schedule.setjName(rs.getString("j_name"));
@@ -2903,8 +3094,21 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -2903,8 +3094,21 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2903 Map<String, Map<String, List<ScheduleRealInfo>>> sches = new HashMap<String, Map<String, List<ScheduleRealInfo>>>(); 3094 Map<String, Map<String, List<ScheduleRealInfo>>> sches = new HashMap<String, Map<String, List<ScheduleRealInfo>>>();
2904 Map<String, List<List<Map<String, Object>>>> keyMap = new HashMap<String, List<List<Map<String, Object>>>>(); 3095 Map<String, List<List<Map<String, Object>>>> keyMap = new HashMap<String, List<List<Map<String, Object>>>>();
2905 3096
  3097 + Map<String, Boolean> lineNature = lineService.lineNature();
  3098 +
2906 for(ScheduleRealInfo s : list){ 3099 for(ScheduleRealInfo s : list){
2907 - String xl = s.getXlName(); 3100 + String xlBm = s.getXlBm();
  3101 + if(lineNature.containsKey(xlBm) && lineNature.get(xlBm) != null){
  3102 + if(sfyy.equals("1") && !lineNature.get(xlBm)){
  3103 + continue;
  3104 + } else if(sfyy.equals("2") && lineNature.get(xlBm)){
  3105 + continue;
  3106 + }
  3107 + } else if(sfyy.equals("2")){
  3108 + continue;
  3109 + }
  3110 +
  3111 + String xl = s.getXlName() + "/" + s.getFgsName();
2908 String dateStr = s.getScheduleDateStr(); 3112 String dateStr = s.getScheduleDateStr();
2909 if(!sches.containsKey(xl)){ 3113 if(!sches.containsKey(xl)){
2910 sches.put(xl, new HashMap<String, List<ScheduleRealInfo>>()); 3114 sches.put(xl, new HashMap<String, List<ScheduleRealInfo>>());
@@ -2956,6 +3160,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -2956,6 +3160,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2956 Map<String, Object> temp = new HashMap<String, Object>(); 3160 Map<String, Object> temp = new HashMap<String, Object>();
2957 temp.put("gs", s.getGsName()); 3161 temp.put("gs", s.getGsName());
2958 temp.put("fgs", s.getFgsName()); 3162 temp.put("fgs", s.getFgsName());
  3163 + temp.put("fgsBm", s.getFgsBm());
2959 temp.put("date", date); 3164 temp.put("date", date);
2960 temp.put("xlbm", s.getXlBm()); 3165 temp.put("xlbm", s.getXlBm());
2961 temp.put("line", s.getXlName()); 3166 temp.put("line", s.getXlName());
@@ -3020,6 +3225,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -3020,6 +3225,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
3020 } 3225 }
3021 tempMap.put("gs", list1.get(0).get(0).get("gs")); 3226 tempMap.put("gs", list1.get(0).get(0).get("gs"));
3022 tempMap.put("fgs", list1.get(0).get(0).get("fgs")); 3227 tempMap.put("fgs", list1.get(0).get(0).get("fgs"));
  3228 + tempMap.put("fgsBm", list1.get(0).get(0).get("fgsBm"));
3023 tempMap.put("line", list1.get(0).get(0).get("line")); 3229 tempMap.put("line", list1.get(0).get(0).get("line"));
3024 tempMap.put("date", list1.get(0).get(0).get("date")); 3230 tempMap.put("date", list1.get(0).get(0).get("date"));
3025 tempMap.put("xlbm", list1.get(0).get(0).get("xlbm")); 3231 tempMap.put("xlbm", list1.get(0).get(0).get("xlbm"));
@@ -3077,6 +3283,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -3077,6 +3283,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
3077 } 3283 }
3078 tempMap.put("gs", list2.get(0).get("gs")); 3284 tempMap.put("gs", list2.get(0).get("gs"));
3079 tempMap.put("fgs", list2.get(0).get("fgs")); 3285 tempMap.put("fgs", list2.get(0).get("fgs"));
  3286 + tempMap.put("fgsBm", list2.get(0).get("fgsBm"));
3080 tempMap.put("line", list2.get(0).get("line")); 3287 tempMap.put("line", list2.get(0).get("line"));
3081 tempMap.put("date", list2.get(0).get("date")); 3288 tempMap.put("date", list2.get(0).get("date"));
3082 tempMap.put("xl_date", list2.get(0).get("date") + "_" + list2.get(0).get("xlbm") + "_" + list2.get(0).get("line")); 3289 tempMap.put("xl_date", list2.get(0).get("date") + "_" + list2.get(0).get("xlbm") + "_" + list2.get(0).get("line"));
src/main/java/com/bsth/service/schedule/impl/PeopleCarPlanServiceImpl.java
@@ -26,6 +26,7 @@ import com.bsth.data.BasicData; @@ -26,6 +26,7 @@ import com.bsth.data.BasicData;
26 import com.bsth.entity.realcontrol.ScheduleRealInfo; 26 import com.bsth.entity.realcontrol.ScheduleRealInfo;
27 import com.bsth.entity.schedule.SchedulePlanInfo; 27 import com.bsth.entity.schedule.SchedulePlanInfo;
28 import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; 28 import com.bsth.repository.realcontrol.ScheduleRealInfoRepository;
  29 +import com.bsth.service.LineService;
29 import com.bsth.service.schedule.PeopleCarPlanService; 30 import com.bsth.service.schedule.PeopleCarPlanService;
30 import com.bsth.util.ReportUtils; 31 import com.bsth.util.ReportUtils;
31 32
@@ -36,6 +37,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -36,6 +37,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
36 private ScheduleRealInfoRepository scheduleRealInfoRepository; 37 private ScheduleRealInfoRepository scheduleRealInfoRepository;
37 38
38 @Autowired 39 @Autowired
  40 + private LineService lineService;
  41 +
  42 + @Autowired
39 private JdbcTemplate jdbcTemplate; 43 private JdbcTemplate jdbcTemplate;
40 44
41 public List<ScheduleRealInfo> getSchedule(String company, String subCompany, String line, String date){ 45 public List<ScheduleRealInfo> getSchedule(String company, String subCompany, String line, String date){
@@ -47,7 +51,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -47,7 +51,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
47 if(line.length() != 0) 51 if(line.length() != 0)
48 sql += " and xl_bm = '"+line+"'"; 52 sql += " and xl_bm = '"+line+"'";
49 if(company.length() != 0) 53 if(company.length() != 0)
50 - sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; 54 + sql += " and gs_bm = '"+company+"'";
  55 + if(subCompany.length() != 0)
  56 + sql += " and fgs_bm = '"+subCompany+"'";
51 57
52 list = jdbcTemplate.query(sql, 58 list = jdbcTemplate.query(sql,
53 new RowMapper<ScheduleRealInfo>(){ 59 new RowMapper<ScheduleRealInfo>(){
@@ -170,15 +176,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -170,15 +176,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
170 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 176 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
171 List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>(); 177 List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>();
172 178
173 - String company = "";  
174 - String subCompany ="";  
175 - if(map.get("company")!=null){  
176 - company = map.get("company").toString();  
177 - }  
178 -  
179 - if(map.get("subCompany")!=null){ 179 + String company = "", subCompany ="";
  180 + if(map.get("company")!=null)
  181 + company = map.get("company").toString();
  182 + if(map.get("subCompany")!=null)
180 subCompany = map.get("subCompany").toString(); 183 subCompany = map.get("subCompany").toString();
181 - }  
182 String line = map.get("line").toString(); 184 String line = map.get("line").toString();
183 String date = map.get("date").toString(); 185 String date = map.get("date").toString();
184 String type = map.get("type").toString(); 186 String type = map.get("type").toString();
@@ -193,9 +195,10 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -193,9 +195,10 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
193 if(line.length() != 0){ 195 if(line.length() != 0){
194 sql += " and xl_bm = '"+line+"'"; 196 sql += " and xl_bm = '"+line+"'";
195 } 197 }
196 - if(company.length() != 0){  
197 - sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'";  
198 - } 198 + if(company.length() != 0)
  199 + sql += " and gs_bm = '"+company+"'";
  200 + if(subCompany.length() != 0)
  201 + sql += " and fgs_bm = '"+subCompany+"'";
199 202
200 list = jdbcTemplate.query(sql, 203 list = jdbcTemplate.query(sql,
201 new RowMapper<SchedulePlanInfo>(){ 204 new RowMapper<SchedulePlanInfo>(){
@@ -322,8 +325,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -322,8 +325,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
322 Set<String> lineSet = getNotOperation(); 325 Set<String> lineSet = getNotOperation();
323 DecimalFormat df = new DecimalFormat("###0.##"); 326 DecimalFormat df = new DecimalFormat("###0.##");
324 327
325 - String company = map.get("company").toString();  
326 - String subCompany = map.get("subCompany").toString(); 328 + String company = "", subCompany = "";
  329 + if(map.get("company")!=null)
  330 + company = map.get("company").toString();
  331 + if(map.get("subCompany")!=null)
  332 + subCompany = map.get("subCompany").toString();
327 String line = map.get("line").toString(); 333 String line = map.get("line").toString();
328 String date = map.get("date").toString(); 334 String date = map.get("date").toString();
329 String type = map.get("type").toString(); 335 String type = map.get("type").toString();
@@ -573,16 +579,19 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -573,16 +579,19 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
573 } 579 }
574 try { 580 try {
575 581
576 - String sql = "select schedule_date_str,xl_name,bc_type,gs_name,fgs_name,bcs,fcno,"  
577 - +"fcsj,fcsj_actual,zdsj,zdsj_actual,bcsj,qdz_name,sp_id,cc_service" 582 + String sql = "select schedule_date_str,xl_name,bc_type,gs_name,fgs_name,fgs_bm,bcs,"
  583 + +"fcno,fcsj,fcsj_actual,zdsj,zdsj_actual,bcsj,qdz_name,sp_id,cc_service"
578 +" from bsth_c_s_sp_info_real where schedule_date_str >= '"+startDate 584 +" from bsth_c_s_sp_info_real where schedule_date_str >= '"+startDate
579 +"' and schedule_date_str <= '"+endDate+"'"; 585 +"' and schedule_date_str <= '"+endDate+"'";
580 if(line.length() != 0){ 586 if(line.length() != 0){
581 sql += " and xl_bm = '"+line+"'"; 587 sql += " and xl_bm = '"+line+"'";
582 } 588 }
583 -// if(company.length() != 0){  
584 - sql += " and gs_bm like '%"+company+"%' and fgs_bm like '%"+subCompany+"%'";  
585 -// } 589 + if(company.length() != 0){
  590 + sql += " and gs_bm = '"+company+"'";
  591 + }
  592 + if(subCompany.length() != 0){
  593 + sql += " and fgs_bm = '"+subCompany+"'";
  594 + }
586 sql += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; 595 sql += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'";
587 if(Integer.valueOf(bcType) == 1){ 596 if(Integer.valueOf(bcType) == 1){
588 sql += " and bc_type != 'region'"; 597 sql += " and bc_type != 'region'";
@@ -599,6 +608,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -599,6 +608,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
599 schedule.setBcType(rs.getString("bc_type")); 608 schedule.setBcType(rs.getString("bc_type"));
600 schedule.setGsName(rs.getString("gs_name")); 609 schedule.setGsName(rs.getString("gs_name"));
601 schedule.setFgsName(rs.getString("fgs_name")); 610 schedule.setFgsName(rs.getString("fgs_name"));
  611 + schedule.setFgsBm(rs.getString("fgs_bm"));
602 schedule.setBcs(rs.getInt("bcs")); 612 schedule.setBcs(rs.getInt("bcs"));
603 schedule.setFcno(rs.getInt("fcno")); 613 schedule.setFcno(rs.getInt("fcno"));
604 schedule.setFcsj(rs.getString("fcsj")); 614 schedule.setFcsj(rs.getString("fcsj"));
@@ -676,22 +686,23 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -676,22 +686,23 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
676 if(schedule.isCcService()){ 686 if(schedule.isCcService()){
677 continue; 687 continue;
678 } 688 }
  689 +
  690 + String key = schedule.getXlName()+"/"+schedule.getQdzName()+"/"+schedule.getFcsj()+"/"+schedule.getFgsBm();
679 if(model.length() != 0){ 691 if(model.length() != 0){
680 if(ttSet.contains(schedule.getSpId())){ 692 if(ttSet.contains(schedule.getSpId())){
681 - String key = schedule.getXlName()+"/"+schedule.getQdzName()+"/"+schedule.getFcsj();  
682 if(!keyMap.containsKey(key)) 693 if(!keyMap.containsKey(key))
683 keyMap.put(key, new ArrayList<ScheduleRealInfo>()); 694 keyMap.put(key, new ArrayList<ScheduleRealInfo>());
684 keyMap.get(key).add(schedule); 695 keyMap.get(key).add(schedule);
685 } 696 }
686 } else { 697 } else {
687 - String key = schedule.getXlName()+"/"+schedule.getQdzName()+"/"+schedule.getFcsj();  
688 - if(!keyMap.containsKey(key)) 698 + if(!keyMap.containsKey(key)){
689 keyMap.put(key, new ArrayList<ScheduleRealInfo>()); 699 keyMap.put(key, new ArrayList<ScheduleRealInfo>());
  700 + }
690 keyMap.get(key).add(schedule); 701 keyMap.get(key).add(schedule);
691 } 702 }
692 } 703 }
693 - String companyName = "", subCompanyName = "";  
694 for(String key : keyMap.keySet()){ 704 for(String key : keyMap.keySet()){
  705 + String companyName = "", subCompanyName = "";
695 Map<String, Object> tempMap = new HashMap<String, Object>(); 706 Map<String, Object> tempMap = new HashMap<String, Object>();
696 List<Integer> fcsj = new ArrayList<Integer>(); 707 List<Integer> fcsj = new ArrayList<Integer>();
697 List<Integer> yssj = new ArrayList<Integer>(); 708 List<Integer> yssj = new ArrayList<Integer>();
@@ -777,7 +788,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -777,7 +788,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
777 Map<String, List<Map<String, Object>>> listMap = new HashMap<String, List<Map<String, Object>>>(); 788 Map<String, List<Map<String, Object>>> listMap = new HashMap<String, List<Map<String, Object>>>();
778 Map<String, List<Map<String, Object>>> listMap2 = new HashMap<String, List<Map<String, Object>>>(); 789 Map<String, List<Map<String, Object>>> listMap2 = new HashMap<String, List<Map<String, Object>>>();
779 for(Map<String, Object> m : tempList){ 790 for(Map<String, Object> m : tempList){
780 - String key = m.get("line").toString() + m.get("qdz"); 791 + String key = m.get("line").toString() + m.get("qdz") + m.get("subCompany");
781 if(!listMap.containsKey(key)) 792 if(!listMap.containsKey(key))
782 listMap.put(key, new ArrayList<Map<String, Object>>()); 793 listMap.put(key, new ArrayList<Map<String, Object>>());
783 listMap.get(key).add(m); 794 listMap.get(key).add(m);
@@ -889,9 +900,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -889,9 +900,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
889 if(nbbm.length() != 0){ 900 if(nbbm.length() != 0){
890 sql += " and cl_zbh like '%"+nbbm+"%'"; 901 sql += " and cl_zbh like '%"+nbbm+"%'";
891 } 902 }
892 -// if(company.length() != 0){  
893 - sql += " and gs_bm like '%"+company+"%' and fgs_bm like '%"+subCompany+"%'";  
894 -// } 903 + if(company.length() != 0){
  904 + sql += " and gs_bm like '"+company+"'";
  905 + }
  906 + if(subCompany.length() != 0){
  907 + sql += " and fgs_bm like '"+subCompany+"'";
  908 + }
895 sql += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; 909 sql += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'";
896 if(bcType.trim().equals("1")){ 910 if(bcType.trim().equals("1")){
897 sql += " and bc_type != 'region'"; 911 sql += " and bc_type != 'region'";
@@ -1209,10 +1223,13 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1209,10 +1223,13 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1209 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); 1223 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>();
1210 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 1224 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
1211 1225
1212 - Set<String> lineSet = getNotOperation();  
1213 -  
1214 - String company = map.get("company").toString();  
1215 - String subCompany = map.get("subCompany").toString(); 1226 + String sfyy = "", company = "", subCompany = "";
  1227 + if(map.get("sfyy")!=null)
  1228 + sfyy = map.get("sfyy").toString();
  1229 + if(map.get("company")!=null)
  1230 + company = map.get("company").toString();
  1231 + if(map.get("subCompany")!=null)
  1232 + subCompany = map.get("subCompany").toString();
1216 String line = map.get("line").toString(); 1233 String line = map.get("line").toString();
1217 String date = map.get("date").toString(); 1234 String date = map.get("date").toString();
1218 String type = map.get("type").toString(); 1235 String type = map.get("type").toString();
@@ -1222,13 +1239,15 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1222,13 +1239,15 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1222 1239
1223 try { 1240 try {
1224 String sql = "select a.schedule_date_str, a.real_exec_date, a.xl_name, a.fcsj, a.fcsj_actual, a.zdsj, a.zdsj_actual, a.qdz_name, a.zdz_name, a.xl_dir, a.status, a.gs_name, a.fgs_name," 1241 String sql = "select a.schedule_date_str, a.real_exec_date, a.xl_name, a.fcsj, a.fcsj_actual, a.zdsj, a.zdsj_actual, a.qdz_name, a.zdz_name, a.xl_dir, a.status, a.gs_name, a.fgs_name,"
1225 - + " a.cc_service, b.start_opt from bsth_c_s_sp_info_real a left join (select line, start_opt from bsth_c_line_config order by id desc) b on a.xl_bm = b.line" 1242 + + " a.xl_bm, a.fgs_bm, a.cc_service, b.start_opt from bsth_c_s_sp_info_real a left join (select line, start_opt from bsth_c_line_config order by id desc) b on a.xl_bm = b.line"
1226 + " where schedule_date_str = '"+date+"'" 1243 + " where schedule_date_str = '"+date+"'"
1227 + " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks' and bc_type != 'region'"; 1244 + " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks' and bc_type != 'region'";
1228 if(line.trim().length() != 0) 1245 if(line.trim().length() != 0)
1229 sql += " and xl_bm = '"+line+"'"; 1246 sql += " and xl_bm = '"+line+"'";
1230 - else if(company.length() != 0)  
1231 - sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; 1247 + if(company.length() != 0)
  1248 + sql += " and gs_bm = '"+company+"'";
  1249 + if(subCompany.length() != 0)
  1250 + sql += " and fgs_bm = '"+subCompany+"'";
1232 1251
1233 list = jdbcTemplate.query(sql, 1252 list = jdbcTemplate.query(sql,
1234 new RowMapper<ScheduleRealInfo>(){ 1253 new RowMapper<ScheduleRealInfo>(){
@@ -1238,6 +1257,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1238,6 +1257,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1238 schedule.setScheduleDateStr(rs.getString("schedule_date_str")); 1257 schedule.setScheduleDateStr(rs.getString("schedule_date_str"));
1239 schedule.setRealExecDate(rs.getString("real_exec_date")); 1258 schedule.setRealExecDate(rs.getString("real_exec_date"));
1240 schedule.setXlName(rs.getString("xl_name")); 1259 schedule.setXlName(rs.getString("xl_name"));
  1260 + schedule.setXlBm(rs.getString("xl_Bm"));
1241 schedule.setFcsj(rs.getString("fcsj")); 1261 schedule.setFcsj(rs.getString("fcsj"));
1242 schedule.setFcsjActual(rs.getString("fcsj_actual")); 1262 schedule.setFcsjActual(rs.getString("fcsj_actual"));
1243 schedule.setZdsj(rs.getString("zdsj")); 1263 schedule.setZdsj(rs.getString("zdsj"));
@@ -1248,6 +1268,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1248,6 +1268,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1248 schedule.setStatus(rs.getInt("status")); 1268 schedule.setStatus(rs.getInt("status"));
1249 schedule.setGsName(rs.getString("gs_name")); 1269 schedule.setGsName(rs.getString("gs_name"));
1250 schedule.setFgsName(rs.getString("fgs_name")); 1270 schedule.setFgsName(rs.getString("fgs_name"));
  1271 + schedule.setFgsBm(rs.getString("fgs_bm"));
1251 schedule.setCcService(rs.getBoolean("cc_service")); 1272 schedule.setCcService(rs.getBoolean("cc_service"));
1252 1273
1253 int startOpt = 0; 1274 int startOpt = 0;
@@ -1287,26 +1308,58 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1287,26 +1308,58 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1287 } 1308 }
1288 1309
1289 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); 1310 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>();
1290 - String companyName = "", subCompanyName = ""; 1311 + Map<String, Boolean> lineNature = lineService.lineNature();
1291 1312
1292 for(ScheduleRealInfo s : list){ 1313 for(ScheduleRealInfo s : list){
1293 - if(lineSet.contains(s.getXlName()) || s.isCcService()){ 1314 + if(s.isCcService()){
1294 continue; 1315 continue;
1295 } 1316 }
1296 - String xlName = s.getXlName();  
1297 - if(!keyMap.containsKey(xlName))  
1298 - keyMap.put(xlName, new ArrayList<ScheduleRealInfo>());  
1299 - keyMap.get(xlName).add(s);  
1300 - if(companyName.length()==0&&s.getGsName()!=null&&s.getGsName().trim().length()!=0)  
1301 - companyName = s.getGsName();  
1302 - if(subCompanyName.length()==0&&s.getFgsName()!=null&&s.getFgsName().trim().length()!=0)  
1303 - subCompanyName = s.getFgsName(); 1317 +
  1318 + String xlbm = s.getXlBm();
  1319 + boolean flag = false;
  1320 + if(sfyy.length() != 0){
  1321 + if(sfyy.equals("0")){
  1322 + flag = true;
  1323 + } else if(sfyy.equals("1")){
  1324 + if(lineNature.containsKey(xlbm) && lineNature.get(xlbm)){
  1325 + flag = true;
  1326 + }
  1327 + } else {
  1328 + if(lineNature.containsKey(xlbm) && !lineNature.get(xlbm)){
  1329 + flag = true;
  1330 + }
  1331 + }
  1332 + } else {
  1333 + flag = true;
  1334 + }
  1335 + if(!flag){
  1336 + continue;
  1337 + }
  1338 +
  1339 + String key = s.getXlName() + "/" + s.getXlBm() + "/" + s.getFgsBm();
  1340 + if(!keyMap.containsKey(key)){
  1341 + keyMap.put(key, new ArrayList<ScheduleRealInfo>());
  1342 + }
  1343 + keyMap.get(key).add(s);
  1344 + }
  1345 +
  1346 + //给key排序
  1347 + List<Long> longList = new ArrayList<Long>();
  1348 + Map<Long, String> longMap = new HashMap<Long, String>();
  1349 + for(String key : keyMap.keySet()){
  1350 + String[] keys = key.split("/");
  1351 + Long l = Long.valueOf(keys[2]) * 10000000000l + Long.valueOf(keys[1]);
  1352 + longMap.put(l, key);
  1353 + longList.add(l);
1304 } 1354 }
  1355 + Collections.sort(longList);
1305 1356
1306 - for(String xlName : keyMap.keySet()){ 1357 + for(Long l : longList){
  1358 + String key = longMap.get(l);
1307 Map<String, Object> tempMap = new HashMap<String, Object>(); 1359 Map<String, Object> tempMap = new HashMap<String, Object>();
  1360 + String[] keys = key.split("/");
1308 tempMap.put("date", date.substring(5)); 1361 tempMap.put("date", date.substring(5));
1309 - tempMap.put("line", xlName); 1362 + tempMap.put("line", keys[0]);
1310 List<Long> up1 = new ArrayList<Long>(); 1363 List<Long> up1 = new ArrayList<Long>();
1311 List<Long> up2 = new ArrayList<Long>(); 1364 List<Long> up2 = new ArrayList<Long>();
1312 List<Long> dn1 = new ArrayList<Long>(); 1365 List<Long> dn1 = new ArrayList<Long>();
@@ -1315,7 +1368,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1315,7 +1368,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1315 Map<Long, ScheduleRealInfo> up2Map = new HashMap<Long, ScheduleRealInfo>(); 1368 Map<Long, ScheduleRealInfo> up2Map = new HashMap<Long, ScheduleRealInfo>();
1316 Map<Long, ScheduleRealInfo> dn1Map = new HashMap<Long, ScheduleRealInfo>(); 1369 Map<Long, ScheduleRealInfo> dn1Map = new HashMap<Long, ScheduleRealInfo>();
1317 Map<Long, ScheduleRealInfo> dn2Map = new HashMap<Long, ScheduleRealInfo>(); 1370 Map<Long, ScheduleRealInfo> dn2Map = new HashMap<Long, ScheduleRealInfo>();
1318 - for(ScheduleRealInfo s : keyMap.get(xlName)){ 1371 + String companyName = "", subCompanyName = "";
  1372 + for(ScheduleRealInfo s : keyMap.get(key)){
  1373 + if(companyName.length()==0&&s.getGsName()!=null&&s.getGsName().trim().length()!=0)
  1374 + companyName = s.getGsName();
  1375 + if(subCompanyName.length()==0&&s.getFgsName()!=null&&s.getFgsName().trim().length()!=0)
  1376 + subCompanyName = s.getFgsName();
1319 if(s.getXlDir().equals("0")){ 1377 if(s.getXlDir().equals("0")){
1320 up1.add(s.getFcsjT()); 1378 up1.add(s.getFcsjT());
1321 up1Map.put(s.getFcsjT(), s); 1379 up1Map.put(s.getFcsjT(), s);
@@ -1389,7 +1447,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1389,7 +1447,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1389 tempMap.put("company", companyName); 1447 tempMap.put("company", companyName);
1390 tempMap.put("subCompany", subCompanyName); 1448 tempMap.put("subCompany", subCompanyName);
1391 tempMap.put("date", date); 1449 tempMap.put("date", date);
1392 - tempMap.put("line", xlName); 1450 + tempMap.put("line", keys[0]);
1393 resList.add(tempMap); 1451 resList.add(tempMap);
1394 } 1452 }
1395 1453
@@ -1425,10 +1483,13 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1425,10 +1483,13 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1425 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); 1483 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>();
1426 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 1484 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
1427 1485
1428 - Set<String> lineSet = getNotOperation();  
1429 -  
1430 - String company = map.get("company").toString();  
1431 - String subCompany = map.get("subCompany").toString(); 1486 + String sfyy = "", company = "", subCompany = "";
  1487 + if(map.get("sfyy")!=null)
  1488 + sfyy = map.get("sfyy").toString();
  1489 + if(map.get("company")!=null)
  1490 + company = map.get("company").toString();
  1491 + if(map.get("subCompany")!=null)
  1492 + subCompany = map.get("subCompany").toString();
1432 String line = map.get("line").toString(); 1493 String line = map.get("line").toString();
1433 // String date = map.get("date").toString(); 1494 // String date = map.get("date").toString();
1434 String startDate = map.get("startDate").toString(); 1495 String startDate = map.get("startDate").toString();
@@ -1453,13 +1514,16 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1453,13 +1514,16 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1453 1514
1454 try { 1515 try {
1455 String sql = "select a.schedule_date_str, a.real_exec_date, a.xl_bm, a.xl_name, a.fcsj, a.fcsj_actual, a.zdsj, a.zdsj_actual, a.qdz_name, a.zdz_name, a.xl_dir, a.status, a.gs_name, a.fgs_name," 1516 String sql = "select a.schedule_date_str, a.real_exec_date, a.xl_bm, a.xl_name, a.fcsj, a.fcsj_actual, a.zdsj, a.zdsj_actual, a.qdz_name, a.zdz_name, a.xl_dir, a.status, a.gs_name, a.fgs_name,"
1456 - + " a.cc_service, a.remarks, a.adjust_exps, b.start_opt from bsth_c_s_sp_info_real a left join (select line, start_opt from bsth_c_line_config order by id desc) b on a.xl_bm = b.line" 1517 + + " a.fgs_bm, a.cc_service, a.remarks, a.adjust_exps, b.start_opt from bsth_c_s_sp_info_real a left join (select line, start_opt from bsth_c_line_config order by id desc) b "
  1518 + + " on a.xl_bm = b.line"
1457 + " where schedule_date_str >= '"+startDate+"' and schedule_date_str <= '"+endDate+"'" 1519 + " where schedule_date_str >= '"+startDate+"' and schedule_date_str <= '"+endDate+"'"
1458 + " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks' and bc_type != 'region'"; 1520 + " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks' and bc_type != 'region'";
1459 if(line.length() != 0) 1521 if(line.length() != 0)
1460 sql += " and xl_bm = '"+line+"'"; 1522 sql += " and xl_bm = '"+line+"'";
1461 if(company.length() != 0) 1523 if(company.length() != 0)
1462 - sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; 1524 + sql += " and gs_bm = '"+company+"'";
  1525 + if(subCompany.length() != 0)
  1526 + sql += " and fgs_bm = '"+subCompany+"'";
1463 1527
1464 list = jdbcTemplate.query(sql, 1528 list = jdbcTemplate.query(sql,
1465 new RowMapper<ScheduleRealInfo>(){ 1529 new RowMapper<ScheduleRealInfo>(){
@@ -1480,6 +1544,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1480,6 +1544,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1480 schedule.setStatus(rs.getInt("status")); 1544 schedule.setStatus(rs.getInt("status"));
1481 schedule.setGsName(rs.getString("gs_name")); 1545 schedule.setGsName(rs.getString("gs_name"));
1482 schedule.setFgsName(rs.getString("fgs_name")); 1546 schedule.setFgsName(rs.getString("fgs_name"));
  1547 + schedule.setFgsBm(rs.getString("fgs_bm"));
1483 schedule.setCcService(rs.getBoolean("cc_service")); 1548 schedule.setCcService(rs.getBoolean("cc_service"));
1484 schedule.setRemarks(rs.getString("remarks")!=null?rs.getString("remarks"):""); 1549 schedule.setRemarks(rs.getString("remarks")!=null?rs.getString("remarks"):"");
1485 schedule.setAdjustExps(rs.getString("adjust_exps")!=null?rs.getString("adjust_exps"):""); 1550 schedule.setAdjustExps(rs.getString("adjust_exps")!=null?rs.getString("adjust_exps"):"");
@@ -1520,36 +1585,71 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1520,36 +1585,71 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1520 e.printStackTrace(); 1585 e.printStackTrace();
1521 } 1586 }
1522 1587
  1588 + Map<String, Boolean> lineNature = lineService.lineNature();
1523 Map<String, Map<String, List<ScheduleRealInfo>>> keyMap = new HashMap<String, Map<String,List<ScheduleRealInfo>>>(); 1589 Map<String, Map<String, List<ScheduleRealInfo>>> keyMap = new HashMap<String, Map<String,List<ScheduleRealInfo>>>();
1524 Map<String, String> xlMap = new HashMap<String, String>(); 1590 Map<String, String> xlMap = new HashMap<String, String>();
1525 - String companyName = "", subCompanyName = "";  
1526 1591
1527 for(ScheduleRealInfo s : list){ 1592 for(ScheduleRealInfo s : list){
1528 - if(lineSet.contains(s.getXlName()) || s.isCcService()){ 1593 + if(s.isCcService()){
1529 continue; 1594 continue;
1530 } 1595 }
1531 - String xlName = s.getXlName(); 1596 +
  1597 + boolean flag = false;
  1598 + String xlbm = s.getXlBm();
  1599 + if(sfyy.length() != 0){
  1600 + if(sfyy.equals("0")){
  1601 + flag = true;
  1602 + } else if(sfyy.equals("1")){
  1603 + if(lineNature.containsKey(xlbm) && lineNature.get(xlbm)){
  1604 + flag = true;
  1605 + }
  1606 + } else {
  1607 + if(lineNature.containsKey(xlbm) && !lineNature.get(xlbm)){
  1608 + flag = true;
  1609 + }
  1610 + }
  1611 + } else {
  1612 + flag = true;
  1613 + }
  1614 + if(!flag){
  1615 + continue;
  1616 + }
  1617 +
  1618 + String key = s.getXlName() + "/" + s.getXlBm() + "/" + s.getFgsBm();
1532 String date = s.getScheduleDateStr(); 1619 String date = s.getScheduleDateStr();
1533 - if(!keyMap.containsKey(xlName))  
1534 - keyMap.put(xlName, new HashMap<String, List<ScheduleRealInfo>>());  
1535 - if(!keyMap.get(xlName).containsKey(date))  
1536 - keyMap.get(xlName).put(date, new ArrayList<ScheduleRealInfo>());  
1537 - keyMap.get(xlName).get(date).add(s);  
1538 - if(companyName.length()==0&&s.getGsName()!=null&&s.getGsName().trim().length()!=0)  
1539 - companyName = s.getGsName();  
1540 - if(subCompanyName.length()==0&&s.getFgsName()!=null&&s.getFgsName().trim().length()!=0)  
1541 - subCompanyName = s.getFgsName();  
1542 - xlMap.put(xlName, s.getXlBm()); 1620 + if(!keyMap.containsKey(key)){
  1621 + keyMap.put(key, new HashMap<String, List<ScheduleRealInfo>>());
  1622 + }
  1623 + if(!keyMap.get(key).containsKey(date)){
  1624 + keyMap.get(key).put(date, new ArrayList<ScheduleRealInfo>());
  1625 + }
  1626 + keyMap.get(key).get(date).add(s);
  1627 +
  1628 + xlMap.put(key, s.getXlBm());
1543 } 1629 }
1544 1630
  1631 + //给key排序
  1632 + List<Long> longList = new ArrayList<Long>();
  1633 + Map<Long, String> longMap = new HashMap<Long, String>();
  1634 + for(String key : keyMap.keySet()){
  1635 + String[] keys = key.split("/");
  1636 + Long l = Long.valueOf(keys[2]) * 10000000000l + Long.valueOf(keys[1]);
  1637 + longMap.put(l, key);
  1638 + longList.add(l);
  1639 + }
  1640 + Collections.sort(longList);
  1641 +
  1642 +
1545 List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>(); 1643 List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>();
1546 - for(String xlName : keyMap.keySet()){ 1644 + for(Long tempLong : longList){
  1645 + String key = longMap.get(tempLong);
  1646 + String companyName = "", subCompanyName = "";
1547 List<Map<String, Object>> tempList = new ArrayList<Map<String,Object>>(); 1647 List<Map<String, Object>> tempList = new ArrayList<Map<String,Object>>();
1548 Map<String, Object> tempMap = new HashMap<String, Object>(); 1648 Map<String, Object> tempMap = new HashMap<String, Object>();
1549 Map<Long, String> dateMap = new HashMap<Long, String>(); 1649 Map<Long, String> dateMap = new HashMap<Long, String>();
1550 List<Long> Longs = new ArrayList<Long>(); 1650 List<Long> Longs = new ArrayList<Long>();
1551 int jhbc = 0, sjbc = 0; 1651 int jhbc = 0, sjbc = 0;
1552 - for(String date : keyMap.get(xlName).keySet()){ 1652 + for(String date : keyMap.get(key).keySet()){
1553 String[] split = date.split("-"); 1653 String[] split = date.split("-");
1554 long l = Long.valueOf(split[0])*10000 + Long.valueOf(split[1])*100 + Long.valueOf(split[2]); 1654 long l = Long.valueOf(split[0])*10000 + Long.valueOf(split[1])*100 + Long.valueOf(split[2]);
1555 dateMap.put(l, date); 1655 dateMap.put(l, date);
@@ -1559,10 +1659,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1559,10 +1659,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1559 for(long l : Longs){ 1659 for(long l : Longs){
1560 String date = dateMap.get(l); 1660 String date = dateMap.get(l);
1561 Map<String, Object> temp = new HashMap<String, Object>(); 1661 Map<String, Object> temp = new HashMap<String, Object>();
  1662 + String[] keys = key.split("/");
1562 temp.put("date", date.substring(5)); 1663 temp.put("date", date.substring(5));
1563 temp.put("dates", date); 1664 temp.put("dates", date);
1564 - temp.put("line", xlName);  
1565 - temp.put("xlbm", xlMap.get(xlName)); 1665 + temp.put("line", keys[0]);
  1666 + temp.put("xlbm", xlMap.get(key));
1566 List<Long> up1 = new ArrayList<Long>(); 1667 List<Long> up1 = new ArrayList<Long>();
1567 List<Long> up2 = new ArrayList<Long>(); 1668 List<Long> up2 = new ArrayList<Long>();
1568 List<Long> dn1 = new ArrayList<Long>(); 1669 List<Long> dn1 = new ArrayList<Long>();
@@ -1571,7 +1672,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1571,7 +1672,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1571 Map<Long, ScheduleRealInfo> up2Map = new HashMap<Long, ScheduleRealInfo>(); 1672 Map<Long, ScheduleRealInfo> up2Map = new HashMap<Long, ScheduleRealInfo>();
1572 Map<Long, ScheduleRealInfo> dn1Map = new HashMap<Long, ScheduleRealInfo>(); 1673 Map<Long, ScheduleRealInfo> dn1Map = new HashMap<Long, ScheduleRealInfo>();
1573 Map<Long, ScheduleRealInfo> dn2Map = new HashMap<Long, ScheduleRealInfo>(); 1674 Map<Long, ScheduleRealInfo> dn2Map = new HashMap<Long, ScheduleRealInfo>();
1574 - for(ScheduleRealInfo s : keyMap.get(xlName).get(date)){ 1675 + for(ScheduleRealInfo s : keyMap.get(key).get(date)){
  1676 + if(companyName.length()==0&&s.getGsName()!=null&&s.getGsName().trim().length()!=0)
  1677 + companyName = s.getGsName();
  1678 + if(subCompanyName.length()==0&&s.getFgsName()!=null&&s.getFgsName().trim().length()!=0)
  1679 + subCompanyName = s.getFgsName();
  1680 +
1575 if(s.getXlDir().equals("0")){ 1681 if(s.getXlDir().equals("0")){
1576 up1.add(s.getFcsjT()); 1682 up1.add(s.getFcsjT());
1577 up1Map.put(s.getFcsjT(), s); 1683 up1Map.put(s.getFcsjT(), s);
@@ -1612,7 +1718,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1612,7 +1718,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1612 Map<String, Object> m = new HashMap<String, Object>(); 1718 Map<String, Object> m = new HashMap<String, Object>();
1613 m.put("date", date.substring(5)); 1719 m.put("date", date.substring(5));
1614 m.put("dates", date); 1720 m.put("dates", date);
1615 - m.put("line", xlName); 1721 + m.put("line", keys[0]);
  1722 + m.put("company", companyName);
  1723 + m.put("subCompany", subCompanyName);
1616 m.put("firstOrLast", "上行首发"); 1724 m.put("firstOrLast", "上行首发");
1617 m.put("qdz", s1.getQdzName()); 1725 m.put("qdz", s1.getQdzName());
1618 m.put("jhfc", s1.getFcsj()); 1726 m.put("jhfc", s1.getFcsj());
@@ -1629,7 +1737,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1629,7 +1737,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1629 Map<String, Object> m = new HashMap<String, Object>(); 1737 Map<String, Object> m = new HashMap<String, Object>();
1630 m.put("date", date.substring(5)); 1738 m.put("date", date.substring(5));
1631 m.put("dates", date); 1739 m.put("dates", date);
1632 - m.put("line", xlName); 1740 + m.put("line", keys[0]);
  1741 + m.put("company", companyName);
  1742 + m.put("subCompany", subCompanyName);
1633 m.put("firstOrLast", "上行末发"); 1743 m.put("firstOrLast", "上行末发");
1634 m.put("qdz", s3.getQdzName()); 1744 m.put("qdz", s3.getQdzName());
1635 m.put("jhfc", s3.getFcsj()); 1745 m.put("jhfc", s3.getFcsj());
@@ -1674,7 +1784,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1674,7 +1784,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1674 Map<String, Object> m = new HashMap<String, Object>(); 1784 Map<String, Object> m = new HashMap<String, Object>();
1675 m.put("date", date.substring(5)); 1785 m.put("date", date.substring(5));
1676 m.put("dates", date); 1786 m.put("dates", date);
1677 - m.put("line", xlName); 1787 + m.put("line", keys[0]);
  1788 + m.put("company", companyName);
  1789 + m.put("subCompany", subCompanyName);
1678 m.put("firstOrLast", "下行首发"); 1790 m.put("firstOrLast", "下行首发");
1679 m.put("qdz", s1.getQdzName()); 1791 m.put("qdz", s1.getQdzName());
1680 m.put("jhfc", s1.getFcsj()); 1792 m.put("jhfc", s1.getFcsj());
@@ -1692,7 +1804,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1692,7 +1804,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1692 Map<String, Object> m = new HashMap<String, Object>(); 1804 Map<String, Object> m = new HashMap<String, Object>();
1693 m.put("date", date.substring(5)); 1805 m.put("date", date.substring(5));
1694 m.put("dates", date); 1806 m.put("dates", date);
1695 - m.put("line", xlName); 1807 + m.put("line", keys[0]);
  1808 + m.put("company", companyName);
  1809 + m.put("subCompany", subCompanyName);
1696 m.put("firstOrLast", "下行末发"); 1810 m.put("firstOrLast", "下行末发");
1697 m.put("qdz", s3.getQdzName()); 1811 m.put("qdz", s3.getQdzName());
1698 m.put("jhfc", s3.getFcsj()); 1812 m.put("jhfc", s3.getFcsj());
@@ -1718,11 +1832,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1718,11 +1832,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1718 continue; 1832 continue;
1719 tempList.add(temp); 1833 tempList.add(temp);
1720 } 1834 }
  1835 + String[] keys = key.split("/");
1721 tempMap.put("map", tempList); 1836 tempMap.put("map", tempList);
1722 tempMap.put("company", companyName); 1837 tempMap.put("company", companyName);
1723 tempMap.put("subCompany", subCompanyName); 1838 tempMap.put("subCompany", subCompanyName);
1724 - tempMap.put("xlbm", xlMap.get(xlName));  
1725 - tempMap.put("line", xlName); 1839 + tempMap.put("xlbm", xlMap.get(key));
  1840 + tempMap.put("line", keys[0]);
1726 tempMap.put("date", dates); 1841 tempMap.put("date", dates);
1727 tempMap.put("jhbc", jhbc); 1842 tempMap.put("jhbc", jhbc);
1728 tempMap.put("sjbc", sjbc); 1843 tempMap.put("sjbc", sjbc);
@@ -1744,8 +1859,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1744,8 +1859,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1744 tempMap.put("zdl", (jhbc<1?"0":nf.format((float) sjbc / jhbc * 100)) + "%"); 1859 tempMap.put("zdl", (jhbc<1?"0":nf.format((float) sjbc / jhbc * 100)) + "%");
1745 for(Map<String, Object> m : mapList){ 1860 for(Map<String, Object> m : mapList){
1746 m.put("no", ++i); 1861 m.put("no", ++i);
1747 - m.put("company", companyName);  
1748 - m.put("subCompany", subCompanyName); 1862 +// m.put("company", companyName);
  1863 +// m.put("subCompany", subCompanyName);
1749 } 1864 }
1750 tempMap.put("map", mapList); 1865 tempMap.put("map", mapList);
1751 if(!type.equals("export")) 1866 if(!type.equals("export"))
@@ -1844,7 +1959,10 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1844,7 +1959,10 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1844 sql += " and cl_zbh = '"+code+"'"; 1959 sql += " and cl_zbh = '"+code+"'";
1845 } 1960 }
1846 if(company.length() != 0){ 1961 if(company.length() != 0){
1847 - sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; 1962 + sql += " and gs_bm = '"+company+"'";
  1963 + }
  1964 + if(subCompany.length() != 0){
  1965 + sql += " and fgs_bm = '"+subCompany+"'";
1848 } 1966 }
1849 sql += " union " + 1967 sql += " union " +
1850 "select r.id, r.schedule_date_str, r.xl_name, r.cl_zbh, r.j_gh, r.j_name, r.fcsj, d.timestamp, d.reply46, d.reply47, d.reply46time, d.reply47time, r.gs_name, r.fgs_name " + 1968 "select r.id, r.schedule_date_str, r.xl_name, r.cl_zbh, r.j_gh, r.j_name, r.fcsj, d.timestamp, d.reply46, d.reply47, d.reply46time, d.reply47time, r.gs_name, r.fgs_name " +
@@ -1856,7 +1974,10 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1856,7 +1974,10 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1856 sql += " and cl_zbh = '"+code+"'"; 1974 sql += " and cl_zbh = '"+code+"'";
1857 } 1975 }
1858 if(company.length() != 0){ 1976 if(company.length() != 0){
1859 - sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; 1977 + sql += " and gs_bm = '"+company+"'";
  1978 + }
  1979 + if(subCompany.length() != 0){
  1980 + sql += " and fgs_bm = '"+subCompany+"'";
1860 } 1981 }
1861 sql += " order by xl_name, fcsj"; 1982 sql += " order by xl_name, fcsj";
1862 1983
@@ -1998,11 +2119,17 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1998,11 +2119,17 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1998 return resList; 2119 return resList;
1999 } 2120 }
2000 */ 2121 */
  2122 +
2001 @Override 2123 @Override
2002 public List<Map<String, Object>> commandState(Map<String, Object> map) { 2124 public List<Map<String, Object>> commandState(Map<String, Object> map) {
2003 // TODO Auto-generated method stub 2125 // TODO Auto-generated method stub
2004 - String company = map.get("company").toString();  
2005 - String subCompany = map.get("subCompany").toString(); 2126 + String sfyy = "", company = "", subCompany = "";
  2127 + if(map.get("sfyy")!=null)
  2128 + sfyy=map.get("sfyy").toString();
  2129 + if(map.get("company")!=null)
  2130 + company=map.get("company").toString();
  2131 + if(map.get("subCompany")!=null)
  2132 + subCompany=map.get("subCompany").toString();
2006 String line = map.get("line").toString().trim(); 2133 String line = map.get("line").toString().trim();
2007 String date = map.get("date").toString(); 2134 String date = map.get("date").toString();
2008 // String code = map.get("code").toString(); 2135 // String code = map.get("code").toString();
@@ -2011,7 +2138,10 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -2011,7 +2138,10 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
2011 String sql_="select * from bsth_c_s_sp_info_real " 2138 String sql_="select * from bsth_c_s_sp_info_real "
2012 + " WHERE schedule_date_str = '"+date+"' "; 2139 + " WHERE schedule_date_str = '"+date+"' ";
2013 if(line.equals("")){ 2140 if(line.equals("")){
2014 - sql_ += "and gs_bm='"+company+"'and fgs_bm='"+subCompany+"'"; 2141 + if(company.length() != 0)
  2142 + sql_ += " and gs_bm='"+company+"'";
  2143 + if(subCompany.length() != 0)
  2144 + sql_ += " and fgs_bm='"+subCompany+"'";
2015 }else{ 2145 }else{
2016 sql_ += " and xl_bm = '"+line+"'"; 2146 sql_ += " and xl_bm = '"+line+"'";
2017 } 2147 }
@@ -2021,7 +2151,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -2021,7 +2151,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
2021 + " r.gs_name,r.fgs_name,CONCAT(r.xl_bm,'_',r.id) as line_sch FROM ("+sql_+") AS r" 2151 + " r.gs_name,r.fgs_name,CONCAT(r.xl_bm,'_',r.id) as line_sch FROM ("+sql_+") AS r"
2022 + " order by r.xl_name,r.id "; 2152 + " order by r.xl_name,r.id ";
2023 2153
2024 - List<Map<String, Object>> list = jdbcTemplate.query(sql, 2154 + List<Map<String, Object>> tempList = jdbcTemplate.query(sql,
2025 new RowMapper<Map<String, Object>>(){ 2155 new RowMapper<Map<String, Object>>(){
2026 @Override 2156 @Override
2027 public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException { 2157 public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException {
@@ -2050,6 +2180,27 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -2050,6 +2180,27 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
2050 e.printStackTrace(); 2180 e.printStackTrace();
2051 } 2181 }
2052 2182
  2183 + Map<String, Boolean> lineNature = lineService.lineNature();
  2184 + List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
  2185 + for(Map<String, Object> m : tempList){
  2186 + String xlbm = m.get("xlbm").toString();
  2187 + if(sfyy.length() != 0){
  2188 + if(sfyy.equals("0")){
  2189 + list.add(m);
  2190 + } else if(sfyy.equals("1")){
  2191 + if(lineNature.containsKey(xlbm) && lineNature.get(xlbm)){
  2192 + list.add(m);
  2193 + }
  2194 + } else {
  2195 + if(lineNature.containsKey(xlbm) && !lineNature.get(xlbm)){
  2196 + list.add(m);
  2197 + }
  2198 + }
  2199 + } else {
  2200 + list.add(m);
  2201 + }
  2202 + }
  2203 +
2053 long min = 0, max = 0; 2204 long min = 0, max = 0;
2054 for(Map<String, Object> m : list){ 2205 for(Map<String, Object> m : list){
2055 long l = Long.valueOf(m.get("id").toString()); 2206 long l = Long.valueOf(m.get("id").toString());
@@ -2411,7 +2562,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -2411,7 +2562,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
2411 String jgh = map.get("jgh").toString(); 2562 String jgh = map.get("jgh").toString();
2412 // String code = map.get("code").toString(); 2563 // String code = map.get("code").toString();
2413 String type = ""; 2564 String type = "";
2414 - if(map.containsKey("type")) 2565 + if(map.get("type")!=null)
2415 type = map.get("type").toString().trim(); 2566 type = map.get("type").toString().trim();
2416 2567
2417 String sql_="select * from bsth_c_s_sp_info_real " 2568 String sql_="select * from bsth_c_s_sp_info_real "
@@ -2420,7 +2571,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -2420,7 +2571,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
2420 if(!line.equals("")){ 2571 if(!line.equals("")){
2421 sql_ +=" and xl_bm = '"+line+"'"; 2572 sql_ +=" and xl_bm = '"+line+"'";
2422 } 2573 }
2423 - 2574 +
2424 2575
2425 String sql="SELECT r.id,r.schedule_date_str,r.fcsj,r.xl_name,r.xl_bm,r.cl_zbh,r.j_gh,r.j_name," 2576 String sql="SELECT r.id,r.schedule_date_str,r.fcsj,r.xl_name,r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,"
2426 + " r.fcsj,d. TIMESTAMP,d.reply46,d.reply47,d.reply46time,d.reply47time," 2577 + " r.fcsj,d. TIMESTAMP,d.reply46,d.reply47,d.reply46time,d.reply47time,"
src/main/resources/static/pages/forms/mould/operationservice.xls
No preview for this file type
src/main/resources/static/pages/forms/statement/busInterval.html
@@ -49,7 +49,15 @@ @@ -49,7 +49,15 @@
49 </select> 49 </select>
50 </div> 50 </div>
51 <div style="margin-top: 10px"></div> 51 <div style="margin-top: 10px"></div>
52 - <div style="display: inline-block;margin-left: 5px;"> 52 + <div style="display: inline-block; margin-left: 5px">
  53 + <span class="item-label" style="width: 80px;">是否营运: </span>
  54 + <select class="form-control" name="sfyy" id="sfyy" style="width: 140px;">
  55 + <option value="0">全部线路</option>
  56 + <option value="1" selected="selected">营运线路</option>
  57 + <option value="2">非营运线路</option>
  58 + </select>
  59 + </div>
  60 + <div style="display: inline-block;margin-left: 10px;">
53 <span class="item-label" style="width: 80px;">开始时间: </span> 61 <span class="item-label" style="width: 80px;">开始时间: </span>
54 <input class="form-control" type="text" id="startDate" style="width: 140px;"/> 62 <input class="form-control" type="text" id="startDate" style="width: 140px;"/>
55 </div> 63 </div>
@@ -81,7 +89,7 @@ @@ -81,7 +89,7 @@
81 <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> 89 <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px">
82 <table class="table table-bordered table-hover table-checkable" id="forms"> 90 <table class="table table-bordered table-hover table-checkable" id="forms">
83 <thead> 91 <thead>
84 - 92 +
85 </thead> 93 </thead>
86 <tbody> 94 <tbody>
87 95
@@ -164,7 +172,7 @@ @@ -164,7 +172,7 @@
164 $("#company").on("change",updateCompany); 172 $("#company").on("change",updateCompany);
165 function updateCompany(){ 173 function updateCompany(){
166 var company = $('#company').val(); 174 var company = $('#company').val();
167 - var options = ''; 175 + var options = '<option value="">全部分公司</option>';
168 for(var i = 0; i < obj.length; i++){ 176 for(var i = 0; i < obj.length; i++){
169 if(obj[i].companyCode == company){ 177 if(obj[i].companyCode == company){
170 var children = obj[i].children; 178 var children = obj[i].children;
@@ -214,14 +222,16 @@ @@ -214,14 +222,16 @@
214 var temp = tempData[$("#line").val()].split(":"); 222 var temp = tempData[$("#line").val()].split(":");
215 $("#company").val(temp[0]); 223 $("#company").val(temp[0]);
216 updateCompany(); 224 updateCompany();
217 - $("#subCompany").val(temp[1]); 225 +// $("#subCompany").val(temp[1]);
  226 + $("#subCompany").val("");
218 $("#company").attr("disabled", true); 227 $("#company").attr("disabled", true);
219 - $("#subCompany").attr("disabled", true); 228 +// $("#subCompany").attr("disabled", true);
220 } 229 }
221 }); 230 });
222 231
223 $("#query").on("click",jsDoQuery); 232 $("#query").on("click",jsDoQuery);
224 - 233 +
  234 + var sfyy = 1;
225 var sfqr = 0; 235 var sfqr = 0;
226 var statu = 0; 236 var statu = 0;
227 var line = $("#line").val(); 237 var line = $("#line").val();
@@ -244,6 +254,7 @@ @@ -244,6 +254,7 @@
244 return; 254 return;
245 } 255 }
246 var params = {}; 256 var params = {};
  257 + sfyy = $("#sfyy").val();
247 line = $("#line").val(); 258 line = $("#line").val();
248 startDate = $("#startDate").val(); 259 startDate = $("#startDate").val();
249 endDate = $("#endDate").val(); 260 endDate = $("#endDate").val();
@@ -255,6 +266,7 @@ @@ -255,6 +266,7 @@
255 lineName = $('#line option:selected').text(); 266 lineName = $('#line option:selected').text();
256 if(lineName == "全部线路") 267 if(lineName == "全部线路")
257 lineName = $('#subCompany option:selected').text(); 268 lineName = $('#subCompany option:selected').text();
  269 + params['sfyy'] = sfyy;
258 params['line'] = line; 270 params['line'] = line;
259 params['sfqr'] = sfqr; 271 params['sfqr'] = sfqr;
260 params['statu'] = statu; 272 params['statu'] = statu;
@@ -293,6 +305,7 @@ @@ -293,6 +305,7 @@
293 return; 305 return;
294 } 306 }
295 var params = {}; 307 var params = {};
  308 + params['sfyy'] = sfyy;
296 params['line'] = line; 309 params['line'] = line;
297 params['sfqr'] = sfqr; 310 params['sfqr'] = sfqr;
298 params['statu'] = statu; 311 params['statu'] = statu;
src/main/resources/static/pages/forms/statement/commandState.html
@@ -27,29 +27,36 @@ @@ -27,29 +27,36 @@
27 <div class="portlet light porttlet-fit bordered"> 27 <div class="portlet light porttlet-fit bordered">
28 <div class="portlet-title"> 28 <div class="portlet-title">
29 <form id="history" class="form-inline" action=""> 29 <form id="history" class="form-inline" action="">
30 - <div style="display: inline-block; margin-left: 15px;" id="company1"> 30 + <div style="display: inline-block; margin-left: 33px;" id="company1">
31 <span class="item-label" style="width: 80px;">公司: </span> 31 <span class="item-label" style="width: 80px;">公司: </span>
32 - <select class="form-control" name="company" id="company" style="width: 180px;"></select> 32 + <select class="form-control" name="company" id="company" style="width: 150px;"></select>
33 </div> 33 </div>
34 - <div style="display: inline-block; margin-left: 22px;" id="subCompany1"> 34 + <div style="display: inline-block; margin-left: 6px;" id="subCompany1">
35 <span class="item-label" style="width: 80px;">分公司: </span> 35 <span class="item-label" style="width: 80px;">分公司: </span>
36 - <select class="form-control" name="subCompany" id="subCompany" style="width: 180px;"></select> 36 + <select class="form-control" name="subCompany" id="subCompany" style="width: 150px;"></select>
37 </div> 37 </div>
38 - <div style="margin-top: 10px" ></div>  
39 <div style="display: inline-block; margin-left: 15px;"> 38 <div style="display: inline-block; margin-left: 15px;">
40 <span class="item-label" style="width: 80px;">线路: </span> 39 <span class="item-label" style="width: 80px;">线路: </span>
41 - <select class="form-control" name="line" id="line" style="width: 180px;"></select> 40 + <select class="form-control" name="line" id="line" style="width: 160px;"></select>
  41 + </div>
  42 + <div style="margin-top: 10px" ></div>
  43 + <div style="display: inline-block; margin-left: 5px">
  44 + <span class="item-label" style="width: 80px;">是否营运: </span>
  45 + <select class="form-control" name="sfyy" id="sfyy" style="width: 150px;">
  46 + <option value="0">全部线路</option>
  47 + <option value="1" selected="selected">营运线路</option>
  48 + <option value="2">非营运线路</option>
  49 + </select>
42 </div> 50 </div>
43 -  
44 - <div style="display: inline-block;margin-left: 36px;"> 51 + <div style="display: inline-block;margin-left: 20px;">
45 <span class="item-label" style="width: 80px;">时间: </span> 52 <span class="item-label" style="width: 80px;">时间: </span>
46 - <input class="form-control" type="text" id="date" style="width: 180px;"/> 53 + <input class="form-control" type="text" id="date" style="width: 150px;"/>
47 </div> 54 </div>
48 <div style="display:none;margin-left: 8px"> 55 <div style="display:none;margin-left: 8px">
49 <span class="item-label" style="width: 140px;">内部编码: </span> 56 <span class="item-label" style="width: 140px;">内部编码: </span>
50 - <select class="form-control" name="code" id="code" style="width: 180px;"></select> 57 + <select class="form-control" name="code" id="code" style="width: 150px;"></select>
51 </div> 58 </div>
52 - <div class="form-group" style="margin-left: 9px"> 59 + <div class="form-group" style="margin-left: 15px">
53 <input class="btn btn-default" type="button" id="query" value="筛选"/> 60 <input class="btn btn-default" type="button" id="query" value="筛选"/>
54 <input class="btn btn-default" type="button" id="export" value="导出"/> 61 <input class="btn btn-default" type="button" id="export" value="导出"/>
55 </div> 62 </div>
@@ -214,7 +221,7 @@ @@ -214,7 +221,7 @@
214 updateCompany(); 221 updateCompany();
215 $("#subCompany").val(temp[1]); 222 $("#subCompany").val(temp[1]);
216 $("#company").attr("disabled", true); 223 $("#company").attr("disabled", true);
217 - $("#subCompany").attr("disabled", true); 224 +// $("#subCompany").attr("disabled", true);
218 } 225 }
219 }); 226 });
220 227
@@ -260,7 +267,8 @@ @@ -260,7 +267,8 @@
260 267
261 268
262 $("#query").on("click",jsDoQuery); 269 $("#query").on("click",jsDoQuery);
263 - 270 +
  271 + var sfyy = 1;
264 var line = ""; 272 var line = "";
265 var date = $("#date").val(); 273 var date = $("#date").val();
266 var code = $("#code").val(); 274 var code = $("#code").val();
@@ -277,6 +285,7 @@ @@ -277,6 +285,7 @@
277 line = $("#line").val(); 285 line = $("#line").val();
278 if(line == " ") 286 if(line == " ")
279 line = ""; 287 line = "";
  288 + sfyy = $("#sfyy").val();
280 date = $("#date").val(); 289 date = $("#date").val();
281 code = $("#code").val(); 290 code = $("#code").val();
282 company = $("#company").val(); 291 company = $("#company").val();
@@ -284,6 +293,7 @@ @@ -284,6 +293,7 @@
284 lineName = $('#line option:selected').text(); 293 lineName = $('#line option:selected').text();
285 if(lineName == "全部线路") 294 if(lineName == "全部线路")
286 lineName = $('#subCompany option:selected').text(); 295 lineName = $('#subCompany option:selected').text();
  296 + params['sfyy'] = sfyy;
287 params['line'] = line; 297 params['line'] = line;
288 params['date'] = date; 298 params['date'] = date;
289 params['code'] = code; 299 params['code'] = code;
@@ -318,7 +328,7 @@ @@ -318,7 +328,7 @@
318 $("#works_hidden").removeClass("hidden"); 328 $("#works_hidden").removeClass("hidden");
319 var i = layer.load(2); 329 var i = layer.load(2);
320 $get('/pcpc/commandByLineList',params,function(result){ 330 $get('/pcpc/commandByLineList',params,function(result){
321 - var commandByLine = template('list_workList',{list:result}); 331 + var commandByLine = template('list_commandState_1',{list:result});
322 $('#works tbody').html(commandByLine); 332 $('#works tbody').html(commandByLine);
323 layer.close(i); 333 layer.close(i);
324 334
@@ -354,6 +364,7 @@ @@ -354,6 +364,7 @@
354 364
355 $("#export").on("click",function(){ 365 $("#export").on("click",function(){
356 var params = {}; 366 var params = {};
  367 + params['sfyy'] = sfyy;
357 params['line'] = line; 368 params['line'] = line;
358 params['date'] = date; 369 params['date'] = date;
359 params['type'] = "export"; 370 params['type'] = "export";
@@ -410,7 +421,7 @@ @@ -410,7 +421,7 @@
410 {{/if}} 421 {{/if}}
411 </script> 422 </script>
412 423
413 -<script type="text/html" id="list_workList"> 424 +<script type="text/html" id="list_commandState_1">
414 {{each list as obj i}} 425 {{each list as obj i}}
415 <tr> 426 <tr>
416 <td>{{obj.company}}</td> 427 <td>{{obj.company}}</td>
src/main/resources/static/pages/forms/statement/correctStatis.html
@@ -35,16 +35,24 @@ @@ -35,16 +35,24 @@
35 <span class="item-label" style="width: 80px;">分公司: </span> 35 <span class="item-label" style="width: 80px;">分公司: </span>
36 <select class="form-control" name="subCompany" id="subCompany" style="width: 140px;"></select> 36 <select class="form-control" name="subCompany" id="subCompany" style="width: 140px;"></select>
37 </div> 37 </div>
38 - <div style="display: inline-block; margin-left: 25px;"> 38 + <div style="display: inline-block; margin-left: 20px;">
39 <span class="item-label" style="width: 80px;">选择线路: </span> 39 <span class="item-label" style="width: 80px;">选择线路: </span>
40 <select class="form-control" name="line" id="line" style="width: 150px;"></select> 40 <select class="form-control" name="line" id="line" style="width: 150px;"></select>
41 </div> 41 </div>
42 <div style="margin-top: 10px"></div> 42 <div style="margin-top: 10px"></div>
43 - <div style="display: inline-block;margin-left: 5px;"> 43 + <div style="display: inline-block; margin-left: 5px">
  44 + <span class="item-label" style="width: 80px;">是否营运: </span>
  45 + <select class="form-control" name="sfyy" id="sfyy" style="width: 140px;">
  46 + <option value="0">全部线路</option>
  47 + <option value="1" selected="selected">营运线路</option>
  48 + <option value="2">非营运线路</option>
  49 + </select>
  50 + </div>
  51 + <div style="display: inline-block;margin-left: 10px;">
44 <span class="item-label" style="width: 80px;">开始时间: </span> 52 <span class="item-label" style="width: 80px;">开始时间: </span>
45 <input class="form-control" type="text" id="startDate" style="width: 140px;"/> 53 <input class="form-control" type="text" id="startDate" style="width: 140px;"/>
46 </div> 54 </div>
47 - <div style="display: inline-block;margin-left: 10px;"> 55 + <div style="display: inline-block;margin-left: 20px;">
48 <span class="item-label" style="width: 80px;">结束时间: </span> 56 <span class="item-label" style="width: 80px;">结束时间: </span>
49 <input class="form-control" type="text" id="endDate" style="width: 140px;"/> 57 <input class="form-control" type="text" id="endDate" style="width: 140px;"/>
50 </div> 58 </div>
@@ -62,7 +70,7 @@ @@ -62,7 +70,7 @@
62 <span class="item-label" style="width: 80px;"> - </span> 70 <span class="item-label" style="width: 80px;"> - </span>
63 <input class="form-control" type="text" id="times2" style="width: 60px;"/> 71 <input class="form-control" type="text" id="times2" style="width: 60px;"/>
64 </div> 72 </div>
65 - <div class="form-group"> 73 + <div class="form-group" style="margin-left: 5px;">
66 <input class="btn btn-default" type="button" id="query" value="筛选"/> 74 <input class="btn btn-default" type="button" id="query" value="筛选"/>
67 <!-- <input class="btn btn-default" type="button" id="export" value="导出"/> --> 75 <!-- <input class="btn btn-default" type="button" id="export" value="导出"/> -->
68 </div> 76 </div>
@@ -112,14 +120,6 @@ @@ -112,14 +120,6 @@
112 if (!$('body').hasClass('page-sidebar-closed')) 120 if (!$('body').hasClass('page-sidebar-closed'))
113 $('.menu-toggler.sidebar-toggler').click(); 121 $('.menu-toggler.sidebar-toggler').click();
114 122
115 - $("#startDate").datetimepicker({  
116 - format : 'YYYY-MM-DD',  
117 - locale : 'zh-cn'  
118 - });  
119 - $("#endDate").datetimepicker({  
120 - format : 'YYYY-MM-DD',  
121 - locale : 'zh-cn'  
122 - });  
123 $("#times1").datetimepicker({ 123 $("#times1").datetimepicker({
124 format : 'HH:mm', 124 format : 'HH:mm',
125 locale : 'zh-cn' 125 locale : 'zh-cn'
@@ -130,6 +130,7 @@ @@ -130,6 +130,7 @@
130 }); 130 });
131 131
132 var d = new Date(); 132 var d = new Date();
  133 +// d.setTime(d.getTime() - 1*1000*60*60*24); //当前日期减一天
133 var year = d.getFullYear(); 134 var year = d.getFullYear();
134 var month = d.getMonth() + 1; 135 var month = d.getMonth() + 1;
135 var day = d.getDate(); 136 var day = d.getDate();
@@ -137,8 +138,19 @@ @@ -137,8 +138,19 @@
137 month = "0" + month; 138 month = "0" + month;
138 if(day < 10) 139 if(day < 10)
139 day = "0" + day; 140 day = "0" + day;
140 - $("#startDate").val(year + "-" + month + "-" + day);  
141 - $("#endDate").val(year + "-" + month + "-" + day); 141 + var dateTime = year + "-" + month + "-" + day;
  142 + $("#startDate").datetimepicker({
  143 + format : 'YYYY-MM-DD',
  144 + locale : 'zh-cn',
  145 +// maxDate : dateTime //设置最大日期
  146 + });
  147 + $("#endDate").datetimepicker({
  148 + format : 'YYYY-MM-DD',
  149 + locale : 'zh-cn',
  150 +// maxDate : dateTime //设置最大日期
  151 + });
  152 + $("#startDate").val(dateTime);
  153 + $("#endDate").val(dateTime);
142 154
143 $("#times1").val("05:00"); 155 $("#times1").val("05:00");
144 $("#times2").val("23:00"); 156 $("#times2").val("23:00");
@@ -174,7 +186,7 @@ @@ -174,7 +186,7 @@
174 $("#company").on("change",updateCompany); 186 $("#company").on("change",updateCompany);
175 function updateCompany(){ 187 function updateCompany(){
176 var company = $('#company').val(); 188 var company = $('#company').val();
177 - var options = ''; 189 + var options = '<option value="">全部分公司</option>';
178 for(var i = 0; i < obj.length; i++){ 190 for(var i = 0; i < obj.length; i++){
179 if(obj[i].companyCode == company){ 191 if(obj[i].companyCode == company){
180 var children = obj[i].children; 192 var children = obj[i].children;
@@ -217,16 +229,18 @@ @@ -217,16 +229,18 @@
217 var temp = tempData[$("#line").val()].split(":"); 229 var temp = tempData[$("#line").val()].split(":");
218 $("#company").val(temp[0]); 230 $("#company").val(temp[0]);
219 updateCompany(); 231 updateCompany();
220 - $("#subCompany").val(temp[1]); 232 +// $("#subCompany").val(temp[1]);
  233 + $("#subCompany").val("");
221 $("#company").attr("disabled", true); 234 $("#company").attr("disabled", true);
222 - $("#subCompany").attr("disabled", true); 235 +// $("#subCompany").attr("disabled", true);
223 } 236 }
224 }); 237 });
225 238
226 239
227 $("#query").on("click",jsDoQuery); 240 $("#query").on("click",jsDoQuery);
228 - 241 +
229 var sfqr = 0; 242 var sfqr = 0;
  243 + var sfyy = 1;
230 var company = $("#company").val(); 244 var company = $("#company").val();
231 var subCompany = $("#subCompany").val(); 245 var subCompany = $("#subCompany").val();
232 var lines; 246 var lines;
@@ -245,6 +259,7 @@ @@ -245,6 +259,7 @@
245 } 259 }
246 var params = {}; 260 var params = {};
247 // line = $("#line").val(); 261 // line = $("#line").val();
  262 + sfyy = $("#sfyy").val();
248 startDate = $("#startDate").val(); 263 startDate = $("#startDate").val();
249 endDate = $("#endDate").val(); 264 endDate = $("#endDate").val();
250 times = $("#times1").val() + "-" + $("#times2").val(); 265 times = $("#times1").val() + "-" + $("#times2").val();
@@ -252,6 +267,7 @@ @@ -252,6 +267,7 @@
252 subCompany = $("#subCompany").val(); 267 subCompany = $("#subCompany").val();
253 params['sfqr'] = sfqr; 268 params['sfqr'] = sfqr;
254 params['line'] = line; 269 params['line'] = line;
  270 + params['sfyy'] = sfyy;
255 params['startDate'] = startDate; 271 params['startDate'] = startDate;
256 params['endDate'] = endDate; 272 params['endDate'] = endDate;
257 params['times'] = times; 273 params['times'] = times;
@@ -259,9 +275,12 @@ @@ -259,9 +275,12 @@
259 params['subCompany'] = subCompany; 275 params['subCompany'] = subCompany;
260 params['type'] = "query"; 276 params['type'] = "query";
261 // $(".hidden").removeClass("hidden"); 277 // $(".hidden").removeClass("hidden");
  278 + var i = layer.load(2);
262 $get('/busInterval/correctStatis', params, function(result){ 279 $get('/busInterval/correctStatis', params, function(result){
263 // 把数据填充到模版中 280 // 把数据填充到模版中
264 - var tbodyHtml = template('list_company',{list:result});; 281 + var tbodyHtml = template('list_company',{list:result});
  282 + layer.close(i);
  283 +
265 /* if(result.length != 0){ 284 /* if(result.length != 0){
266 tbodyHtml = template('list_company',{list:result[0].workList[0].workList, type:3}); 285 tbodyHtml = template('list_company',{list:result[0].workList[0].workList, type:3});
267 }else{ 286 }else{
@@ -276,7 +295,7 @@ @@ -276,7 +295,7 @@
276 $("#lines").html(""); 295 $("#lines").html("");
277 296
278 // company = result; 297 // company = result;
279 - lines = result[0].workList[0].workList; 298 +// lines = result[0].workList[0].workList;
280 }); 299 });
281 } 300 }
282 301
@@ -329,7 +348,7 @@ @@ -329,7 +348,7 @@
329 }); 348 });
330 $.each(lines, function(i, g){ 349 $.each(lines, function(i, g){
331 if(g.company == params[1] && g.subCompany == params[2] && g.line == params[3]){ 350 if(g.company == params[1] && g.subCompany == params[2] && g.line == params[3]){
332 - var tbodyHtml = template('list_workList',{list:g.workList}); 351 + var tbodyHtml = template('list_company_1',{list:g.workList});
333 $("#lines").html(tbodyHtml); 352 $("#lines").html(tbodyHtml);
334 } 353 }
335 }); 354 });
@@ -432,7 +451,7 @@ @@ -432,7 +451,7 @@
432 {{/if}} 451 {{/if}}
433 </tbody> 452 </tbody>
434 </script> 453 </script>
435 -<script type="text/html" id="list_workList"> 454 +<script type="text/html" id="list_company_1">
436 <thead> 455 <thead>
437 <tr> 456 <tr>
438 <th colspan="9">修正报表</th> 457 <th colspan="9">修正报表</th>
src/main/resources/static/pages/forms/statement/firstAndLastBus.html
@@ -28,23 +28,32 @@ @@ -28,23 +28,32 @@
28 <div class="portlet light porttlet-fit bordered"> 28 <div class="portlet light porttlet-fit bordered">
29 <div class="portlet-title"> 29 <div class="portlet-title">
30 <form id="history" class="form-inline" action=""> 30 <form id="history" class="form-inline" action="">
31 - <div style="display: inline-block;margin-left: 10px;" id="company1"> 31 + <div style="display: inline-block;margin-left: 33px;" id="company1">
32 <span class="item-label" style="width: 80px;">公司: </span> 32 <span class="item-label" style="width: 80px;">公司: </span>
33 - <select class="form-control" name="company" id="company" style="width: 160px;"></select> 33 + <select class="form-control" name="company" id="company" style="width: 150px;"></select>
34 </div> 34 </div>
35 <div style="display: inline-block;margin-left: 10px;" id="subCompany1"> 35 <div style="display: inline-block;margin-left: 10px;" id="subCompany1">
36 <span class="item-label" style="width: 80px;">分公司: </span> 36 <span class="item-label" style="width: 80px;">分公司: </span>
37 - <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select> 37 + <select class="form-control" name="subCompany" id="subCompany" style="width: 150px;"></select>
38 </div> 38 </div>
39 <div style="display: inline-block;margin-left: 10px;"> 39 <div style="display: inline-block;margin-left: 10px;">
40 <span class="item-label" style="width: 80px;">线路: </span> 40 <span class="item-label" style="width: 80px;">线路: </span>
41 <select class="form-control" name="line" id="line" style="width: 160px;"></select> 41 <select class="form-control" name="line" id="line" style="width: 160px;"></select>
42 </div> 42 </div>
43 - <div style="display: inline-block;margin-left: 10px;"> 43 + <div style="margin-top: 10px"></div>
  44 + <div style="display: inline-block; margin-left: 5px">
  45 + <span class="item-label" style="width: 80px;">是否营运: </span>
  46 + <select class="form-control" name="sfyy" id="sfyy" style="width: 150px;">
  47 + <option value="0">全部线路</option>
  48 + <option value="1" selected="selected">营运线路</option>
  49 + <option value="2">非营运线路</option>
  50 + </select>
  51 + </div>
  52 + <div style="display: inline-block;margin-left: 24px;">
44 <span class="item-label" style="width: 80px;">时间: </span> 53 <span class="item-label" style="width: 80px;">时间: </span>
45 - <input class="form-control" type="text" id="date" style="width: 160px;"/> 54 + <input class="form-control" type="text" id="date" style="width: 150px;"/>
46 </div> 55 </div>
47 - <div class="form-group"> 56 + <div class="form-group" style="margin-left: 10px;">
48 <input class="btn btn-default" type="button" id="query" value="筛选"/> 57 <input class="btn btn-default" type="button" id="query" value="筛选"/>
49 <input class="btn btn-default" type="button" id="export" value="导出"/> 58 <input class="btn btn-default" type="button" id="export" value="导出"/>
50 </div> 59 </div>
@@ -147,7 +156,7 @@ @@ -147,7 +156,7 @@
147 $("#company").on("change",updateCompany); 156 $("#company").on("change",updateCompany);
148 function updateCompany(){ 157 function updateCompany(){
149 var company = $('#company').val(); 158 var company = $('#company').val();
150 - var options = ''; 159 + var options = '<option value="">全部分公司</option>';
151 for(var i = 0; i < obj.length; i++){ 160 for(var i = 0; i < obj.length; i++){
152 if(obj[i].companyCode == company){ 161 if(obj[i].companyCode == company){
153 var children = obj[i].children; 162 var children = obj[i].children;
@@ -217,18 +226,20 @@ @@ -217,18 +226,20 @@
217 var temp = tempData[$("#line").val()].split(":"); 226 var temp = tempData[$("#line").val()].split(":");
218 $("#company").val(temp[0]); 227 $("#company").val(temp[0]);
219 updateCompany(); 228 updateCompany();
220 - $("#subCompany").val(temp[1]); 229 +// $("#subCompany").val(temp[1]);
  230 + $("#subCompany").val("");
221 $("#company").attr("disabled", true); 231 $("#company").attr("disabled", true);
222 - $("#subCompany").attr("disabled", true); 232 +// $("#subCompany").attr("disabled", true);
223 } 233 }
224 }); 234 });
225 235
226 $("#query").on("click",jsDoQuery); 236 $("#query").on("click",jsDoQuery);
227 237
228 - var company = $("#company").val();  
229 - var subCompany = $("#subCompany").val(); 238 + var sfyy = $("#sfyy").val();
230 var line = $("#line").val(); 239 var line = $("#line").val();
231 var date = $("#date").val(); 240 var date = $("#date").val();
  241 + var company = $("#company").val();
  242 + var subCompany = $("#subCompany").val();
232 var lineName = $('#line option:selected').text(); 243 var lineName = $('#line option:selected').text();
233 function jsDoQuery(pagination){ 244 function jsDoQuery(pagination){
234 if($("#date").val() == null || $("#date").val().trim().length == 0){ 245 if($("#date").val() == null || $("#date").val().trim().length == 0){
@@ -236,20 +247,22 @@ @@ -236,20 +247,22 @@
236 return; 247 return;
237 } 248 }
238 var params = {}; 249 var params = {};
239 - company = $("#company").val();  
240 - subCompany = $("#subCompany").val(); 250 + sfyy = $("#sfyy").val();
241 line = $("#line").val(); 251 line = $("#line").val();
242 date = $("#date").val(); 252 date = $("#date").val();
  253 + company = $("#company").val();
  254 + subCompany = $("#subCompany").val();
243 lineName = $('#line option:selected').text(); 255 lineName = $('#line option:selected').text();
244 if(lineName == "全部线路") 256 if(lineName == "全部线路")
245 lineName = $('#subCompany option:selected').text(); 257 lineName = $('#subCompany option:selected').text();
246 if(line == " ") 258 if(line == " ")
247 line = ""; 259 line = "";
248 - params['company'] = company;  
249 - params['subCompany'] = subCompany; 260 + params['sfyy'] = sfyy;
250 params['line'] = line; 261 params['line'] = line;
251 params['date'] = date; 262 params['date'] = date;
252 params['type'] = "query"; 263 params['type'] = "query";
  264 + params['company'] = company;
  265 + params['subCompany'] = subCompany;
253 $(".hidden").removeClass("hidden"); 266 $(".hidden").removeClass("hidden");
254 var i = layer.load(2); 267 var i = layer.load(2);
255 $get('/pcpc/firstAndLastBus', params, function(result){ 268 $get('/pcpc/firstAndLastBus', params, function(result){
@@ -272,11 +285,12 @@ @@ -272,11 +285,12 @@
272 return; 285 return;
273 } 286 }
274 var params = {}; 287 var params = {};
275 - params['company'] = company;  
276 - params['subCompany'] = subCompany; 288 + params['sfyy'] = sfyy;
277 params['line'] = line; 289 params['line'] = line;
278 params['date'] = date; 290 params['date'] = date;
279 params['type'] = "export"; 291 params['type'] = "export";
  292 + params['company'] = company;
  293 + params['subCompany'] = subCompany;
280 params['lineName'] = lineName; 294 params['lineName'] = lineName;
281 var i = layer.load(2); 295 var i = layer.load(2);
282 $get('/pcpc/firstAndLastBus', params, function(result){ 296 $get('/pcpc/firstAndLastBus', params, function(result){
src/main/resources/static/pages/forms/statement/firstAndLastBus_delay.html
@@ -32,24 +32,32 @@ @@ -32,24 +32,32 @@
32 <span class="item-label" style="width: 80px;">公司: </span> 32 <span class="item-label" style="width: 80px;">公司: </span>
33 <select class="form-control" name="company" id="company" style="width: 160px;"></select> 33 <select class="form-control" name="company" id="company" style="width: 160px;"></select>
34 </div> 34 </div>
35 - <div style="display: inline-block;margin-left: 24px;" id="subCompany1"> 35 + <div style="display: inline-block;margin-left: 19px;" id="subCompany1">
36 <span class="item-label" style="width: 80px;">分公司: </span> 36 <span class="item-label" style="width: 80px;">分公司: </span>
37 <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select> 37 <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select>
38 </div> 38 </div>
39 - <div style="display: inline-block;margin-left: 10px;"> 39 + <div style="display: inline-block;margin-left: 33px;">
40 <span class="item-label" style="width: 80px;">线路: </span> 40 <span class="item-label" style="width: 80px;">线路: </span>
41 <select class="form-control" name="line" id="line" style="width: 160px;"></select> 41 <select class="form-control" name="line" id="line" style="width: 160px;"></select>
42 </div> 42 </div>
43 <div style="margin-top: 10px"></div> 43 <div style="margin-top: 10px"></div>
44 - <div style="display: inline-block;margin-left: 0px;"> 44 + <div style="display: inline-block; margin-left: 0px">
  45 + <span class="item-label" style="width: 80px;">是否营运: </span>
  46 + <select class="form-control" name="sfyy" id="sfyy" style="width: 160px;">
  47 + <option value="0">全部线路</option>
  48 + <option value="1" selected="selected">营运线路</option>
  49 + <option value="2">非营运线路</option>
  50 + </select>
  51 + </div>
  52 + <div style="display: inline-block;margin-left: 5px;">
45 <span class="item-label" style="width: 80px;">开始时间: </span> 53 <span class="item-label" style="width: 80px;">开始时间: </span>
46 <input class="form-control" type="text" id="startDate" style="width: 160px;"/> 54 <input class="form-control" type="text" id="startDate" style="width: 160px;"/>
47 </div> 55 </div>
48 - <div style="display: inline-block;margin-left: 10px;"> 56 + <div style="display: inline-block;margin-left: 5px;">
49 <span class="item-label" style="width: 80px;">结束时间: </span> 57 <span class="item-label" style="width: 80px;">结束时间: </span>
50 <input class="form-control" type="text" id="endDate" style="width: 160px;"/> 58 <input class="form-control" type="text" id="endDate" style="width: 160px;"/>
51 </div> 59 </div>
52 - <div class="form-group" style="margin-left: 10px;"> 60 + <div class="form-group" style="margin-left: 5px;">
53 <input class="btn btn-default" type="button" id="query" value="筛选"/> 61 <input class="btn btn-default" type="button" id="query" value="筛选"/>
54 <input class="btn btn-default" type="button" id="export" value="导出"/> 62 <input class="btn btn-default" type="button" id="export" value="导出"/>
55 </div> 63 </div>
@@ -135,7 +143,7 @@ @@ -135,7 +143,7 @@
135 $("#company").on("change",updateCompany); 143 $("#company").on("change",updateCompany);
136 function updateCompany(){ 144 function updateCompany(){
137 var company = $('#company').val(); 145 var company = $('#company').val();
138 - var options = ''; 146 + var options = '<option value="">全部分公司</option>';
139 for(var i = 0; i < obj.length; i++){ 147 for(var i = 0; i < obj.length; i++){
140 if(obj[i].companyCode == company){ 148 if(obj[i].companyCode == company){
141 var children = obj[i].children; 149 var children = obj[i].children;
@@ -186,9 +194,10 @@ @@ -186,9 +194,10 @@
186 194
187 $("#query").on("click",jsDoQuery); 195 $("#query").on("click",jsDoQuery);
188 196
  197 + var sfyy = 1;
  198 + var line = $("#line").val();
189 var company = $("#company").val(); 199 var company = $("#company").val();
190 var subCompany = $("#subCompany").val(); 200 var subCompany = $("#subCompany").val();
191 - var line = $("#line").val();  
192 var startDate = $("#startDate").val(); 201 var startDate = $("#startDate").val();
193 var endDate = $("#endDate").val(); 202 var endDate = $("#endDate").val();
194 var lineName = $('#line option:selected').text(); 203 var lineName = $('#line option:selected').text();
@@ -203,9 +212,10 @@ @@ -203,9 +212,10 @@
203 } 212 }
204 var i = layer.load(2); 213 var i = layer.load(2);
205 var params = {}; 214 var params = {};
  215 + sfyy = $("#sfyy").val();
  216 + line = $("#line").val();
206 company = $("#company").val(); 217 company = $("#company").val();
207 subCompany = $("#subCompany").val(); 218 subCompany = $("#subCompany").val();
208 - line = $("#line").val();  
209 startDate = $("#startDate").val(); 219 startDate = $("#startDate").val();
210 endDate = $("#endDate").val(); 220 endDate = $("#endDate").val();
211 lineName = $('#line option:selected').text(); 221 lineName = $('#line option:selected').text();
@@ -213,9 +223,10 @@ @@ -213,9 +223,10 @@
213 lineName = $('#subCompany option:selected').text(); 223 lineName = $('#subCompany option:selected').text();
214 if(line == " ") 224 if(line == " ")
215 line = ""; 225 line = "";
  226 + params['sfyy'] = sfyy;
  227 + params['line'] = line;
216 params['company'] = company; 228 params['company'] = company;
217 params['subCompany'] = subCompany; 229 params['subCompany'] = subCompany;
218 - params['line'] = line;  
219 params['startDate'] = startDate; 230 params['startDate'] = startDate;
220 params['endDate'] = endDate; 231 params['endDate'] = endDate;
221 params['type'] = "query"; 232 params['type'] = "query";
@@ -253,9 +264,10 @@ @@ -253,9 +264,10 @@
253 endDate = $("#endDate").val(); 264 endDate = $("#endDate").val();
254 if(line == " ") 265 if(line == " ")
255 line = ""; 266 line = "";
  267 + params['sfyy'] = sfyy;
  268 + params['line'] = line;
256 params['company'] = company; 269 params['company'] = company;
257 params['subCompany'] = subCompany; 270 params['subCompany'] = subCompany;
258 - params['line'] = line;  
259 params['startDate'] = startDate; 271 params['startDate'] = startDate;
260 params['endDate'] = endDate; 272 params['endDate'] = endDate;
261 params['type'] = "delay_export"; 273 params['type'] = "delay_export";
src/main/resources/static/pages/forms/statement/firstAndLastBus_sum.html
@@ -28,24 +28,32 @@ @@ -28,24 +28,32 @@
28 <div class="portlet light porttlet-fit bordered"> 28 <div class="portlet light porttlet-fit bordered">
29 <div class="portlet-title"> 29 <div class="portlet-title">
30 <form id="history" class="form-inline" action=""> 30 <form id="history" class="form-inline" action="">
31 - <div style="display: inline-block;margin-left: 28px;" id="company1"> 31 + <div style="display: inline-block;margin-left: 33px;" id="company1">
32 <span class="item-label" style="width: 80px;">公司: </span> 32 <span class="item-label" style="width: 80px;">公司: </span>
33 <select class="form-control" name="company" id="company" style="width: 160px;"></select> 33 <select class="form-control" name="company" id="company" style="width: 160px;"></select>
34 </div> 34 </div>
35 - <div style="display: inline-block;margin-left: 24px;" id="subCompany1"> 35 + <div style="display: inline-block;margin-left: 19px;" id="subCompany1">
36 <span class="item-label" style="width: 80px;">分公司: </span> 36 <span class="item-label" style="width: 80px;">分公司: </span>
37 <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select> 37 <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select>
38 </div> 38 </div>
39 - <div style="display: inline-block;margin-left: 10px;"> 39 + <div style="display: inline-block;margin-left: 33px;">
40 <span class="item-label" style="width: 80px;">线路: </span> 40 <span class="item-label" style="width: 80px;">线路: </span>
41 <select class="form-control" name="line" id="line" style="width: 160px;"></select> 41 <select class="form-control" name="line" id="line" style="width: 160px;"></select>
42 </div> 42 </div>
43 <div style="margin-top: 10px"></div> 43 <div style="margin-top: 10px"></div>
44 - <div style="display: inline-block;margin-left: 0px;"> 44 + <div style="display: inline-block; margin-left: 5px">
  45 + <span class="item-label" style="width: 80px;">是否营运: </span>
  46 + <select class="form-control" name="sfyy" id="sfyy" style="width: 160px;">
  47 + <option value="0">全部线路</option>
  48 + <option value="1" selected="selected">营运线路</option>
  49 + <option value="2">非营运线路</option>
  50 + </select>
  51 + </div>
  52 + <div style="display: inline-block;margin-left: 5px;">
45 <span class="item-label" style="width: 80px;">开始时间: </span> 53 <span class="item-label" style="width: 80px;">开始时间: </span>
46 <input class="form-control" type="text" id="startDate" style="width: 160px;"/> 54 <input class="form-control" type="text" id="startDate" style="width: 160px;"/>
47 </div> 55 </div>
48 - <div style="display: inline-block;margin-left: 10px;"> 56 + <div style="display: inline-block;margin-left: 5px;">
49 <span class="item-label" style="width: 80px;">结束时间: </span> 57 <span class="item-label" style="width: 80px;">结束时间: </span>
50 <input class="form-control" type="text" id="endDate" style="width: 160px;"/> 58 <input class="form-control" type="text" id="endDate" style="width: 160px;"/>
51 </div> 59 </div>
@@ -189,7 +197,7 @@ @@ -189,7 +197,7 @@
189 $("#company").on("change",updateCompany); 197 $("#company").on("change",updateCompany);
190 function updateCompany(){ 198 function updateCompany(){
191 var company = $('#company').val(); 199 var company = $('#company').val();
192 - var options = ''; 200 + var options = '<option value="">全部分公司</option>';
193 for(var i = 0; i < obj.length; i++){ 201 for(var i = 0; i < obj.length; i++){
194 if(obj[i].companyCode == company){ 202 if(obj[i].companyCode == company){
195 var children = obj[i].children; 203 var children = obj[i].children;
@@ -232,9 +240,10 @@ @@ -232,9 +240,10 @@
232 var temp = tempData[$("#line").val()].split(":"); 240 var temp = tempData[$("#line").val()].split(":");
233 $("#company").val(temp[0]); 241 $("#company").val(temp[0]);
234 updateCompany(); 242 updateCompany();
235 - $("#subCompany").val(temp[1]); 243 +// $("#subCompany").val(temp[1]);
  244 + $("#subCompany").val("");
236 $("#company").attr("disabled", true); 245 $("#company").attr("disabled", true);
237 - $("#subCompany").attr("disabled", true); 246 +// $("#subCompany").attr("disabled", true);
238 } 247 }
239 }); 248 });
240 249
@@ -276,9 +285,10 @@ @@ -276,9 +285,10 @@
276 285
277 $("#query").on("click",jsDoQuery); 286 $("#query").on("click",jsDoQuery);
278 287
  288 + var sfyy = 1;
  289 + var line = $("#line").val();
279 var company = $("#company").val(); 290 var company = $("#company").val();
280 var subCompany = $("#subCompany").val(); 291 var subCompany = $("#subCompany").val();
281 - var line = $("#line").val();  
282 var startDate = $("#startDate").val(); 292 var startDate = $("#startDate").val();
283 var endDate = $("#endDate").val(); 293 var endDate = $("#endDate").val();
284 var lineName = $('#line option:selected').text(); 294 var lineName = $('#line option:selected').text();
@@ -292,9 +302,10 @@ @@ -292,9 +302,10 @@
292 return; 302 return;
293 } 303 }
294 var params = {}; 304 var params = {};
  305 + sfyy = $("#sfyy").val();
  306 + line = $("#line").val();
295 company = $("#company").val(); 307 company = $("#company").val();
296 subCompany = $("#subCompany").val(); 308 subCompany = $("#subCompany").val();
297 - line = $("#line").val();  
298 startDate = $("#startDate").val(); 309 startDate = $("#startDate").val();
299 endDate = $("#endDate").val(); 310 endDate = $("#endDate").val();
300 lineName = $('#line option:selected').text(); 311 lineName = $('#line option:selected').text();
@@ -302,9 +313,10 @@ @@ -302,9 +313,10 @@
302 lineName = $('#subCompany option:selected').text(); 313 lineName = $('#subCompany option:selected').text();
303 if(line == " ") 314 if(line == " ")
304 line = ""; 315 line = "";
  316 + params['sfyy'] = sfyy;
  317 + params['line'] = line;
305 params['company'] = company; 318 params['company'] = company;
306 params['subCompany'] = subCompany; 319 params['subCompany'] = subCompany;
307 - params['line'] = line;  
308 params['startDate'] = startDate; 320 params['startDate'] = startDate;
309 params['endDate'] = endDate; 321 params['endDate'] = endDate;
310 params['type'] = "query"; 322 params['type'] = "query";
@@ -332,9 +344,10 @@ @@ -332,9 +344,10 @@
332 344
333 $("#export").on("click",function(){ 345 $("#export").on("click",function(){
334 var params = {}; 346 var params = {};
  347 + params['sfyy'] = sfyy;
  348 + params['line'] = line;
335 params['company'] = company; 349 params['company'] = company;
336 params['subCompany'] = subCompany; 350 params['subCompany'] = subCompany;
337 - params['line'] = line;  
338 params['startDate'] = startDate; 351 params['startDate'] = startDate;
339 params['endDate'] = endDate; 352 params['endDate'] = endDate;
340 params['type'] = "export"; 353 params['type'] = "export";
@@ -357,9 +370,10 @@ @@ -357,9 +370,10 @@
357 $("#exportMap").on("click",function(){ 370 $("#exportMap").on("click",function(){
358 var i = layer.load(2); 371 var i = layer.load(2);
359 var params = {}; 372 var params = {};
  373 + params['sfyy'] = sfyy;
  374 + params['line'] = tempLine;
360 params['company'] = company; 375 params['company'] = company;
361 params['subCompany'] = subCompany; 376 params['subCompany'] = subCompany;
362 - params['line'] = tempLine;  
363 params['startDate'] = startDate; 377 params['startDate'] = startDate;
364 params['endDate'] = endDate; 378 params['endDate'] = endDate;
365 params['type'] = "exportMap"; 379 params['type'] = "exportMap";
@@ -381,9 +395,10 @@ @@ -381,9 +395,10 @@
381 $("#exportSumMap").on("click",function(){ 395 $("#exportSumMap").on("click",function(){
382 var i = layer.load(2); 396 var i = layer.load(2);
383 var params = {}; 397 var params = {};
  398 + params['sfyy'] = sfyy;
  399 + params['line'] = line;
384 params['company'] = company; 400 params['company'] = company;
385 params['subCompany'] = subCompany; 401 params['subCompany'] = subCompany;
386 - params['line'] = line;  
387 params['startDate'] = startDate; 402 params['startDate'] = startDate;
388 params['endDate'] = endDate; 403 params['endDate'] = endDate;
389 params['type'] = "delay_export"; 404 params['type'] = "delay_export";
src/main/resources/static/pages/forms/statement/lbStatuAnaly.html
@@ -53,7 +53,7 @@ @@ -53,7 +53,7 @@
53 <span class="item-label" style="width: 80px;">分公司: </span> 53 <span class="item-label" style="width: 80px;">分公司: </span>
54 <select class="form-control" name="subCompany" id="subCompany" style="width: 140px;"></select> 54 <select class="form-control" name="subCompany" id="subCompany" style="width: 140px;"></select>
55 </div> 55 </div>
56 - <div style="display: inline-block; margin-left: 25px;"> 56 + <div style="display: inline-block; margin-left: 10px;">
57 <span class="item-label" style="width: 80px;">选择线路: </span> 57 <span class="item-label" style="width: 80px;">选择线路: </span>
58 <select class="form-control" name="line" id="line" style="width: 150px;"></select> 58 <select class="form-control" name="line" id="line" style="width: 150px;"></select>
59 </div> 59 </div>
@@ -64,7 +64,15 @@ @@ -64,7 +64,15 @@
64 </select> 64 </select>
65 </div> 65 </div>
66 <div style="margin-top: 10px"></div> 66 <div style="margin-top: 10px"></div>
67 - <div style="display: inline-block;margin-left: 5px;"> 67 + <div style="display: inline-block; margin-left: 5px">
  68 + <span class="item-label" style="width: 80px;">是否营运: </span>
  69 + <select class="form-control" name="sfyy" id="sfyy" style="width: 140px;">
  70 + <option value="0">全部线路</option>
  71 + <option value="1" selected="selected">营运线路</option>
  72 + <option value="2">非营运线路</option>
  73 + </select>
  74 + </div>
  75 + <div style="display: inline-block;margin-left: 10px;">
68 <span class="item-label" style="width: 80px;">开始时间: </span> 76 <span class="item-label" style="width: 80px;">开始时间: </span>
69 <input class="form-control" type="text" id="startDate" style="width: 140px;"/> 77 <input class="form-control" type="text" id="startDate" style="width: 140px;"/>
70 </div> 78 </div>
@@ -227,7 +235,7 @@ @@ -227,7 +235,7 @@
227 $("#company").on("change",updateCompany); 235 $("#company").on("change",updateCompany);
228 function updateCompany(){ 236 function updateCompany(){
229 var company = $('#company').val(); 237 var company = $('#company').val();
230 - var options = ''; 238 + var options = '<option value="">全部分公司</option>';
231 for(var i = 0; i < obj.length; i++){ 239 for(var i = 0; i < obj.length; i++){
232 if(obj[i].companyCode == company){ 240 if(obj[i].companyCode == company){
233 var children = obj[i].children; 241 var children = obj[i].children;
@@ -270,9 +278,10 @@ @@ -270,9 +278,10 @@
270 var temp = tempData[$("#line").val()].split(":"); 278 var temp = tempData[$("#line").val()].split(":");
271 $("#company").val(temp[0]); 279 $("#company").val(temp[0]);
272 updateCompany(); 280 updateCompany();
273 - $("#subCompany").val(temp[1]); 281 +// $("#subCompany").val(temp[1]);
  282 + $("#subCompany").val("");
274 $("#company").attr("disabled", true); 283 $("#company").attr("disabled", true);
275 - $("#subCompany").attr("disabled", true); 284 +// $("#subCompany").attr("disabled", true);
276 } 285 }
277 }); 286 });
278 287
@@ -305,6 +314,7 @@ @@ -305,6 +314,7 @@
305 $("#query").on("click",jsDoQuery); 314 $("#query").on("click",jsDoQuery);
306 315
307 var sfqr = 0; 316 var sfqr = 0;
  317 + var sfyy = 1;
308 var line = $("#line").val(); 318 var line = $("#line").val();
309 var startDate = $("#startDate").val(); 319 var startDate = $("#startDate").val();
310 var endDate = $("#endDate").val(); 320 var endDate = $("#endDate").val();
@@ -327,6 +337,7 @@ @@ -327,6 +337,7 @@
327 if(line == " ") 337 if(line == " ")
328 line = ""; 338 line = "";
329 // line = $("#line").val(); 339 // line = $("#line").val();
  340 + sfyy = $("#sfyy").val();
330 startDate = $("#startDate").val(); 341 startDate = $("#startDate").val();
331 endDate = $("#endDate").val(); 342 endDate = $("#endDate").val();
332 model = $("#model").val(); 343 model = $("#model").val();
@@ -335,6 +346,7 @@ @@ -335,6 +346,7 @@
335 subCompany = $("#subCompany").val(); 346 subCompany = $("#subCompany").val();
336 params['sfqr'] = sfqr; 347 params['sfqr'] = sfqr;
337 params['line'] = line; 348 params['line'] = line;
  349 + params['sfyy'] = sfyy;
338 params['startDate'] = startDate; 350 params['startDate'] = startDate;
339 params['endDate'] = endDate; 351 params['endDate'] = endDate;
340 params['model'] = model; 352 params['model'] = model;
@@ -385,6 +397,7 @@ @@ -385,6 +397,7 @@
385 var params = {}; 397 var params = {};
386 params['sfqr'] = sfqr; 398 params['sfqr'] = sfqr;
387 params['line'] = line; 399 params['line'] = line;
  400 + params['sfyy'] = sfyy;
388 params['startDate'] = startDate; 401 params['startDate'] = startDate;
389 params['endDate'] = endDate; 402 params['endDate'] = endDate;
390 params['model'] = model; 403 params['model'] = model;
src/main/resources/static/pages/forms/statement/lineTimeAnaly.html
@@ -33,15 +33,15 @@ @@ -33,15 +33,15 @@
33 <div class="portlet light porttlet-fit bordered"> 33 <div class="portlet light porttlet-fit bordered">
34 <div class="portlet-title"> 34 <div class="portlet-title">
35 <form id="history" class="form-inline" action=""> 35 <form id="history" class="form-inline" action="">
36 - <div style="display: inline-block; margin-left: 33px;" id="company1"> 36 + <div style="display: inline-block; margin-left: 28px;" id="company1">
37 <span class="item-label" style="width: 80px;">公司: </span> 37 <span class="item-label" style="width: 80px;">公司: </span>
38 <select class="form-control" name="company" id="company" style="width: 140px;"></select> 38 <select class="form-control" name="company" id="company" style="width: 140px;"></select>
39 </div> 39 </div>
40 - <div style="display: inline-block; margin-left: 24px;" id="subCompany1"> 40 + <div style="display: inline-block; margin-left: 19px;" id="subCompany1">
41 <span class="item-label" style="width: 80px;">分公司: </span> 41 <span class="item-label" style="width: 80px;">分公司: </span>
42 <select class="form-control" name="subCompany" id="subCompany" style="width: 140px;"></select> 42 <select class="form-control" name="subCompany" id="subCompany" style="width: 140px;"></select>
43 </div> 43 </div>
44 - <div style="display: inline-block; margin-left: 24px;"> 44 + <div style="display: inline-block; margin-left: 15px;">
45 <span class="item-label" style="width: 80px;">线路: </span> 45 <span class="item-label" style="width: 80px;">线路: </span>
46 <select class="form-control" name="line" id="line" style="width: 140px;"></select> 46 <select class="form-control" name="line" id="line" style="width: 140px;"></select>
47 </div> 47 </div>
@@ -58,16 +58,22 @@ @@ -58,16 +58,22 @@
58 </select> 58 </select>
59 </div> 59 </div>
60 <div style="margin-top: 10px"></div> 60 <div style="margin-top: 10px"></div>
61 - <div style="display: inline-block;margin-left: 5px;"> 61 + <div style="display: inline-block;margin-left: 0px;">
62 <span class="item-label" style="width: 80px;">开始时间: </span> 62 <span class="item-label" style="width: 80px;">开始时间: </span>
63 <input class="form-control" type="text" id="startDate" style="width: 140px;"/> 63 <input class="form-control" type="text" id="startDate" style="width: 140px;"/>
64 </div> 64 </div>
65 - <div style="display: inline-block;margin-left: 10px;"> 65 + <div style="display: inline-block;margin-left: 5px;">
66 <span class="item-label" style="width: 80px;">结束时间: </span> 66 <span class="item-label" style="width: 80px;">结束时间: </span>
67 <input class="form-control" type="text" id="endDate" style="width: 140px;"/> 67 <input class="form-control" type="text" id="endDate" style="width: 140px;"/>
68 </div> 68 </div>
  69 + <div style="display: inline-block; margin-left: 10px;">
  70 + <select class="form-control" name="sfqr" id="sfqr" style="width: 75px;">
  71 + <option value="0">全日</option>
  72 + <option value="1">时段</option>
  73 + </select>
  74 + </div>
69 <div style="display: inline-block;margin-left: 10px;"> 75 <div style="display: inline-block;margin-left: 10px;">
70 - <span class="item-label" style="width: 80px;">时间段: </span> 76 +<!-- <span class="item-label" style="width: 80px;">时间段: </span> -->
71 <input class="form-control" type="text" id="times1" style="width: 60px;"/> 77 <input class="form-control" type="text" id="times1" style="width: 60px;"/>
72 </div> 78 </div>
73 <div style="display: inline-block;"> 79 <div style="display: inline-block;">
@@ -164,7 +170,7 @@ @@ -164,7 +170,7 @@
164 170
165 <script> 171 <script>
166 $(function(){ 172 $(function(){
167 - var list; 173 + var workLists;
168 174
169 // 关闭左侧栏 175 // 关闭左侧栏
170 if (!$('body').hasClass('page-sidebar-closed')) 176 if (!$('body').hasClass('page-sidebar-closed'))
@@ -205,6 +211,8 @@ @@ -205,6 +211,8 @@
205 211
206 $("#times1").val("05:00"); 212 $("#times1").val("05:00");
207 $("#times2").val("23:00"); 213 $("#times2").val("23:00");
  214 + $("#times1").attr("disabled", true);
  215 + $("#times2").attr("disabled", true);
208 216
209 var fage=false; 217 var fage=false;
210 var xlList; 218 var xlList;
@@ -291,14 +299,27 @@ @@ -291,14 +299,27 @@
291 updateCompany(); 299 updateCompany();
292 $("#subCompany").val(temp[1]); 300 $("#subCompany").val(temp[1]);
293 $("#company").attr("disabled", true); 301 $("#company").attr("disabled", true);
294 - $("#subCompany").attr("disabled", true); 302 +// $("#subCompany").attr("disabled", true);
  303 + }
  304 + });
  305 +
  306 + $("#sfqr").on("change", function(){
  307 + if($("#sfqr").val() == 0){
  308 + $("#times1").attr("disabled", true);
  309 + $("#times2").attr("disabled", true);
  310 + sfqr = 0;
  311 + }else{
  312 + $("#times1").attr("disabled", false);
  313 + $("#times2").attr("disabled", false);
  314 + sfqr = 1;
295 } 315 }
296 }); 316 });
297 317
298 $("#query").on("click", function (){ 318 $("#query").on("click", function (){
299 jsDoQuery(); 319 jsDoQuery();
300 }); 320 });
301 - 321 +
  322 + var sfqr = 0;
302 var line = $("#line").val(); 323 var line = $("#line").val();
303 var startDate = $("#startDate").val(); 324 var startDate = $("#startDate").val();
304 var endDate = $("#endDate").val(); 325 var endDate = $("#endDate").val();
@@ -312,7 +333,7 @@ @@ -312,7 +333,7 @@
312 layer.msg("请选择日期"); 333 layer.msg("请选择日期");
313 return; 334 return;
314 } 335 }
315 - if($("#times1").val().trim().length == 0 || $("#times2").val().trim().length == 0){ 336 + if(sfqr == 1 && $("#times1").val().trim().length == 0 || $("#times2").val().trim().length == 0){
316 layer.msg("请选择时间"); 337 layer.msg("请选择时间");
317 return; 338 return;
318 } 339 }
@@ -326,6 +347,7 @@ @@ -326,6 +347,7 @@
326 company = $("#company").val(); 347 company = $("#company").val();
327 subCompany = $("#subCompany").val(); 348 subCompany = $("#subCompany").val();
328 params['line'] = line; 349 params['line'] = line;
  350 + params['sfqr'] = sfqr;
329 params['startDate'] = startDate; 351 params['startDate'] = startDate;
330 params['endDate'] = endDate; 352 params['endDate'] = endDate;
331 params['model'] = model; 353 params['model'] = model;
@@ -337,7 +359,6 @@ @@ -337,7 +359,6 @@
337 var i = layer.load(2); 359 var i = layer.load(2);
338 $("#forms .hidden").removeClass("hidden"); 360 $("#forms .hidden").removeClass("hidden");
339 $get('/busInterval/lineTimeAnaliy', params, function(result){ 361 $get('/busInterval/lineTimeAnaliy', params, function(result){
340 - console.log(result);  
341 // 把数据填充到模版中 362 // 把数据填充到模版中
342 var tbodyHtml = template('list_lineTimeAnaly',{list:result}); 363 var tbodyHtml = template('list_lineTimeAnaly',{list:result});
343 layer.close(i); 364 layer.close(i);
@@ -346,13 +367,13 @@ @@ -346,13 +367,13 @@
346 $('#forms tbody').html(tbodyHtml); 367 $('#forms tbody').html(tbodyHtml);
347 $("#works_hidden").addClass("hidden"); 368 $("#works_hidden").addClass("hidden");
348 $("#printArea").addClass("hidden"); 369 $("#printArea").addClass("hidden");
349 - list = result; 370 + workLists = result;
350 }); 371 });
351 372
352 } 373 }
353 374
354 $("#forms tbody").on("click","tr",function(){ 375 $("#forms tbody").on("click","tr",function(){
355 - if($(this).children().size() < 2){ 376 + if(!$(this).children() || $(this).children().size() < 2){
356 return; 377 return;
357 } 378 }
358 var params = {}; 379 var params = {};
@@ -361,9 +382,9 @@ @@ -361,9 +382,9 @@
361 params[index] = $(this).text(); 382 params[index] = $(this).text();
362 } 383 }
363 }); 384 });
364 - $.each(list, function(i, g){ 385 + $.each(workLists, function(i, g){
365 if(g.line == params[2] && g.lp == params[3] &&g.station == params[4]){ 386 if(g.line == params[2] && g.lp == params[3] &&g.station == params[4]){
366 - var tbodyHtml = template('list_workList',{list:g}); 387 + var tbodyHtml = template('list_lineTimeAnaly_1',{list:g});
367 $('#works tbody').html(tbodyHtml); 388 $('#works tbody').html(tbodyHtml);
368 $("#works_hidden").removeClass("hidden"); 389 $("#works_hidden").removeClass("hidden");
369 $("#works .hidden").removeClass("hidden"); 390 $("#works .hidden").removeClass("hidden");
@@ -491,7 +512,7 @@ @@ -491,7 +512,7 @@
491 </tr> 512 </tr>
492 {{/if}} 513 {{/if}}
493 </script> 514 </script>
494 -<script type="text/html" id="list_workList"> 515 +<script type="text/html" id="list_lineTimeAnaly_1">
495 {{each list.workList as obj i}} 516 {{each list.workList as obj i}}
496 <tr> 517 <tr>
497 <td>{{obj.date}}</td> 518 <td>{{obj.date}}</td>
src/main/resources/static/pages/forms/statement/scheduleAnaly.html
@@ -28,38 +28,38 @@ @@ -28,38 +28,38 @@
28 <div class="portlet light porttlet-fit bordered"> 28 <div class="portlet light porttlet-fit bordered">
29 <div class="portlet-title"> 29 <div class="portlet-title">
30 <form id="history" class="form-inline" action=""> 30 <form id="history" class="form-inline" action="">
31 - <div style="display: inline-block;margin-left: 38px;" id="company1"> 31 + <div style="display: inline-block;margin-left: 33px;" id="company1">
32 <span class="item-label" style="width: 80px;">公司: </span> 32 <span class="item-label" style="width: 80px;">公司: </span>
33 - <select class="form-control" name="company" id="company" style="width: 160px;"></select> 33 + <select class="form-control" name="company" id="company" style="width: 150px;"></select>
34 </div> 34 </div>
35 <div style="display: inline-block;margin-left: 24px;" id="subCompany1"> 35 <div style="display: inline-block;margin-left: 24px;" id="subCompany1">
36 <span class="item-label" style="width: 80px;">分公司: </span> 36 <span class="item-label" style="width: 80px;">分公司: </span>
37 - <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select> 37 + <select class="form-control" name="subCompany" id="subCompany" style="width: 150px;"></select>
38 </div> 38 </div>
39 <div style="display: inline-block;margin-left: 38px;"> 39 <div style="display: inline-block;margin-left: 38px;">
40 <span class="item-label" style="width: 80px;">线路: </span> 40 <span class="item-label" style="width: 80px;">线路: </span>
41 - <select class="form-control" name="line" id="line" style="width: 160px;"></select> 41 + <select class="form-control" name="line" id="line" style="width: 150px;"></select>
42 </div> 42 </div>
43 <div style="display: inline-block;margin-left: 10px;"> 43 <div style="display: inline-block;margin-left: 10px;">
44 <span class="item-label" style="width: 80px;">班次类型: </span> 44 <span class="item-label" style="width: 80px;">班次类型: </span>
45 - <select class="form-control" name="line" id="bcType" style="width: 160px;"> 45 + <select class="form-control" name="line" id="bcType" style="width: 150px;">
46 <option value="0">全部班次</option> 46 <option value="0">全部班次</option>
47 <option value="1">全程</option> 47 <option value="1">全程</option>
48 <option value="2">区间</option> 48 <option value="2">区间</option>
49 </select> 49 </select>
50 </div> 50 </div>
51 <div style="margin-top: 10px"></div> 51 <div style="margin-top: 10px"></div>
52 - <div style="display: inline-block;margin-left: 10px;"> 52 + <div style="display: inline-block;margin-left: 5px;">
53 <span class="item-label" style="width: 80px;">开始时间: </span> 53 <span class="item-label" style="width: 80px;">开始时间: </span>
54 - <input class="form-control" type="text" id="startDate" style="width: 160px;"/> 54 + <input class="form-control" type="text" id="startDate" style="width: 150px;"/>
55 </div> 55 </div>
56 <div style="display: inline-block;margin-left: 10px;"> 56 <div style="display: inline-block;margin-left: 10px;">
57 <span class="item-label" style="width: 80px;">结束时间: </span> 57 <span class="item-label" style="width: 80px;">结束时间: </span>
58 - <input class="form-control" type="text" id="endDate" style="width: 160px;"/> 58 + <input class="form-control" type="text" id="endDate" style="width: 150px;"/>
59 </div> 59 </div>
60 <div style="display: inline-block;margin-left: 10px;"> 60 <div style="display: inline-block;margin-left: 10px;">
61 <span class="item-label" style="width: 80px;">模板类型: </span> 61 <span class="item-label" style="width: 80px;">模板类型: </span>
62 - <select class="form-control" name="model" id="model" style="width: 160px;"> 62 + <select class="form-control" name="model" id="model" style="width: 150px;">
63 <option value="">请选择...</option> 63 <option value="">请选择...</option>
64 </select> 64 </select>
65 </div> 65 </div>
@@ -162,6 +162,7 @@ @@ -162,6 +162,7 @@
162 function updateCompany(){ 162 function updateCompany(){
163 var company = $('#company').val(); 163 var company = $('#company').val();
164 var options = ''; 164 var options = '';
  165 +// var options = '<option value="">全部分公司</option>';
165 for(var i = 0; i < obj.length; i++){ 166 for(var i = 0; i < obj.length; i++){
166 if(obj[i].companyCode == company){ 167 if(obj[i].companyCode == company){
167 var children = obj[i].children; 168 var children = obj[i].children;
@@ -208,11 +209,11 @@ @@ -208,11 +209,11 @@
208 updateCompany(); 209 updateCompany();
209 $("#subCompany").val(temp[1]); 210 $("#subCompany").val(temp[1]);
210 $("#company").attr("disabled", true); 211 $("#company").attr("disabled", true);
211 - $("#subCompany").attr("disabled", true); 212 +// $("#subCompany").attr("disabled", true);
212 } 213 }
213 }); 214 });
214 215
215 - 216 +
216 $("#query").on("click", function(){ 217 $("#query").on("click", function(){
217 page = 0; 218 page = 0;
218 jsDoQuery(true); 219 jsDoQuery(true);
src/main/resources/static/pages/forms/statement/statisticsDailyCalc2.html
@@ -85,7 +85,7 @@ @@ -85,7 +85,7 @@
85 <tr> 85 <tr>
86 <td rowspan="3"><span >分公司</span></td> 86 <td rowspan="3"><span >分公司</span></td>
87 <td rowspan="3"><span >路线名</span></td> 87 <td rowspan="3"><span >路线名</span></td>
88 - <td colspan="20">全日营运里程(公里)(注:实际营运里程、实际空驶里程、实际总里程均已包含临加里程)</td> 88 + <td colspan="21">全日营运里程(公里)(注:实际营运里程、实际空驶里程、实际总里程均已包含临加里程)</td>
89 <td colspan="15">全日营运班次</td> 89 <td colspan="15">全日营运班次</td>
90 <td colspan="9">大间隔情况</td> 90 <td colspan="9">大间隔情况</td>
91 </tr> 91 </tr>
@@ -100,7 +100,7 @@ @@ -100,7 +100,7 @@
100 <td rowspan="2"><span>少驶公里</span></td> 100 <td rowspan="2"><span>少驶公里</span></td>
101 <td rowspan="2"><span>少驶班次</span></td> 101 <td rowspan="2"><span>少驶班次</span></td>
102 <td colspan="11">少驶原因(公里)</td> 102 <td colspan="11">少驶原因(公里)</td>
103 - <td rowspan="2"><span >临加公里</span></td> 103 + <td colspan="2">临加公里</td>
104 <td colspan="3">计划班次</td> 104 <td colspan="3">计划班次</td>
105 <td colspan="3">实际班次</td> 105 <td colspan="3">实际班次</td>
106 <td colspan="3">临加班次</td> 106 <td colspan="3">临加班次</td>
@@ -122,6 +122,8 @@ @@ -122,6 +122,8 @@
122 <td><span>气候</span></td> 122 <td><span>气候</span></td>
123 <td><span>援外</span></td> 123 <td><span>援外</span></td>
124 <td><span>其他</span></td> 124 <td><span>其他</span></td>
  125 + <td><span>营运</span></td>
  126 + <td><span>空驶</span></td>
125 <td><span>全日</span></td> 127 <td><span>全日</span></td>
126 <td><span>早高峰</span></td> 128 <td><span>早高峰</span></td>
127 <td><span>晚高峰</span></td> 129 <td><span>晚高峰</span></td>
@@ -379,6 +381,7 @@ @@ -379,6 +381,7 @@
379 <td>{{obj.ssgl_yw}}</td> 381 <td>{{obj.ssgl_yw}}</td>
380 <td>{{obj.ssgl_other}}</td> 382 <td>{{obj.ssgl_other}}</td>
381 <td>{{obj.ljgl}}</td> 383 <td>{{obj.ljgl}}</td>
  384 + <td>{{obj.ljks}}</td>
382 <td>{{obj.jhbc}}</td> 385 <td>{{obj.jhbc}}</td>
383 <td>{{obj.jhbc_m}}</td> 386 <td>{{obj.jhbc_m}}</td>
384 <td>{{obj.jhbc_a}}</td> 387 <td>{{obj.jhbc_a}}</td>
src/main/resources/static/pages/forms/statement/timeAndSpeed.html
@@ -55,8 +55,20 @@ @@ -55,8 +55,20 @@
55 <option value="">请选择...</option> 55 <option value="">请选择...</option>
56 </select> 56 </select>
57 </div> 57 </div>
  58 + <div style="display: inline-block; margin-left: 10px" id="lp1">
  59 + <span class="item-label" style="width: 80px;">路牌: </span>
  60 + <select class="form-control" name="lp" id="lp" style="width: 140px;"></select>
  61 + </div>
58 <div style="margin-top: 10px"></div> 62 <div style="margin-top: 10px"></div>
59 - <div style="display: inline-block; margin-left: 5px;"> 63 + <div style="display: inline-block; margin-left: 5px">
  64 + <span class="item-label" style="width: 80px;">是否营运: </span>
  65 + <select class="form-control" name="sfyy" id="sfyy" style="width: 140px;">
  66 + <option value="0">全部线路</option>
  67 + <option value="1" selected="selected">营运线路</option>
  68 + <option value="2">非营运线路</option>
  69 + </select>
  70 + </div>
  71 + <div style="display: inline-block; margin-left: 10px;">
60 <span class="item-label" style="width: 80px;">开始时间: </span> 72 <span class="item-label" style="width: 80px;">开始时间: </span>
61 <input class="form-control" type="text" id="startDate" style="width: 140px;"/> 73 <input class="form-control" type="text" id="startDate" style="width: 140px;"/>
62 </div> 74 </div>
@@ -78,10 +90,6 @@ @@ -78,10 +90,6 @@
78 <span class="item-label" style="width: 80px;"> - </span> 90 <span class="item-label" style="width: 80px;"> - </span>
79 <input class="form-control" type="text" id="times2" style="width: 60px;"/> 91 <input class="form-control" type="text" id="times2" style="width: 60px;"/>
80 </div> 92 </div>
81 - <div style="display: inline-block; margin-left: 10px" id="lp1">  
82 - <span class="item-label" style="width: 80px;">路牌: </span>  
83 - <select class="form-control" name="lp" id="lp" style="width: 140px;"></select>  
84 - </div>  
85 <div class="form-group" style="margin-left: 14px"> 93 <div class="form-group" style="margin-left: 14px">
86 <input class="btn btn-default" type="button" id="query" value="筛选"/> 94 <input class="btn btn-default" type="button" id="query" value="筛选"/>
87 <input class="btn btn-default" type="button" id="export" value="导出"/> 95 <input class="btn btn-default" type="button" id="export" value="导出"/>
@@ -186,7 +194,7 @@ @@ -186,7 +194,7 @@
186 $("#company").on("change",updateCompany); 194 $("#company").on("change",updateCompany);
187 function updateCompany(){ 195 function updateCompany(){
188 var company = $('#company').val(); 196 var company = $('#company').val();
189 - var options = ''; 197 + var options = '<option value="">全部分公司</option>';
190 for(var i = 0; i < obj.length; i++){ 198 for(var i = 0; i < obj.length; i++){
191 if(obj[i].companyCode == company){ 199 if(obj[i].companyCode == company){
192 var children = obj[i].children; 200 var children = obj[i].children;
@@ -196,7 +204,7 @@ @@ -196,7 +204,7 @@
196 } 204 }
197 } 205 }
198 $('#subCompany').html(options); 206 $('#subCompany').html(options);
199 - } 207 + }
200 208
201 var tempData = {}; 209 var tempData = {};
202 $.get('/report/lineList',function(xlList){ 210 $.get('/report/lineList',function(xlList){
@@ -235,9 +243,10 @@ @@ -235,9 +243,10 @@
235 var temp = tempData[$("#line").val()].split(":"); 243 var temp = tempData[$("#line").val()].split(":");
236 $("#company").val(temp[0]); 244 $("#company").val(temp[0]);
237 updateCompany(); 245 updateCompany();
238 - $("#subCompany").val(temp[1]); 246 +// $("#subCompany").val(temp[1]);
  247 + $("#subCompany").val("");
239 $("#company").attr("disabled", true); 248 $("#company").attr("disabled", true);
240 - $("#subCompany").attr("disabled", true); 249 +// $("#subCompany").attr("disabled", true);
241 } 250 }
242 }); 251 });
243 252
@@ -246,6 +255,7 @@ @@ -246,6 +255,7 @@
246 }); 255 });
247 256
248 var list = []; 257 var list = [];
  258 + var sfyy = 1;
249 var sfqr = 0; 259 var sfqr = 0;
250 var statu = 0; 260 var statu = 0;
251 var line = $("#line").val(); 261 var line = $("#line").val();
@@ -269,6 +279,7 @@ @@ -269,6 +279,7 @@
269 return; 279 return;
270 } 280 }
271 var params = {}; 281 var params = {};
  282 + sfyy = $("#sfyy").val();
272 line = $("#line").val(); 283 line = $("#line").val();
273 startDate = $("#startDate").val(); 284 startDate = $("#startDate").val();
274 endDate = $("#endDate").val(); 285 endDate = $("#endDate").val();
@@ -282,6 +293,7 @@ @@ -282,6 +293,7 @@
282 if(lineName == "全部线路") 293 if(lineName == "全部线路")
283 lineName = $('#subCompany option:selected').text(); 294 lineName = $('#subCompany option:selected').text();
284 params['lp'] = lp; 295 params['lp'] = lp;
  296 + params['sfyy'] = sfyy;
285 params['line'] = line; 297 params['line'] = line;
286 params['sfqr'] = sfqr; 298 params['sfqr'] = sfqr;
287 params['statu'] = statu; 299 params['statu'] = statu;
@@ -314,7 +326,7 @@ @@ -314,7 +326,7 @@
314 var key = $(this).parent().prev().html(); 326 var key = $(this).parent().prev().html();
315 $.each(list.dataList, function(i, g){ 327 $.each(list.dataList, function(i, g){
316 if(g.line == key){ 328 if(g.line == key){
317 - var tbodyHtml = template('list_workList',{list:g}); 329 + var tbodyHtml = template('list_timeAndSpeed_1',{list:g});
318 $("#works_hidden").removeClass("hidden"); 330 $("#works_hidden").removeClass("hidden");
319 $("#date0").html(g.date); 331 $("#date0").html(g.date);
320 $("#line0").html(g.line); 332 $("#line0").html(g.line);
@@ -344,6 +356,7 @@ @@ -344,6 +356,7 @@
344 } 356 }
345 var params = {}; 357 var params = {};
346 params['lp'] = lp; 358 params['lp'] = lp;
  359 + params['sfyy'] = sfyy;
347 params['line'] = line; 360 params['line'] = line;
348 params['sfqr'] = sfqr; 361 params['sfqr'] = sfqr;
349 params['statu'] = statu; 362 params['statu'] = statu;
@@ -585,7 +598,7 @@ @@ -585,7 +598,7 @@
585 {{/if}} 598 {{/if}}
586 </tbody> 599 </tbody>
587 </script> 600 </script>
588 -<script type="text/html" id="list_workList"> 601 +<script type="text/html" id="list_timeAndSpeed_1">
589 <thead> 602 <thead>
590 <tr> 603 <tr>
591 <th width='80px'>日期</th> 604 <th width='80px'>日期</th>
src/main/resources/static/pages/mforms/changetochanges/changetochange.html
@@ -49,23 +49,31 @@ @@ -49,23 +49,31 @@
49 class="form-control" name="company" id="gsdmChange" 49 class="form-control" name="company" id="gsdmChange"
50 style="width: 140px;"></select> 50 style="width: 140px;"></select>
51 </div> 51 </div>
52 - <div style="display: inline-block; margin-left: 24px;" 52 + <div style="display: inline-block; margin-left: 19px;"
53 id="fgsdmDiv_change"> 53 id="fgsdmDiv_change">
54 <span class="item-label" style="width: 80px;">分公司: </span> <select 54 <span class="item-label" style="width: 80px;">分公司: </span> <select
55 class="form-control" name="subCompany" id="fgsdmChange" 55 class="form-control" name="subCompany" id="fgsdmChange"
56 style="width: 140px;"></select> 56 style="width: 140px;"></select>
57 </div> 57 </div>
58 - <div style="display: inline-block; margin-left: 10px;"> 58 + <div style="display: inline-block; margin-left: 33px;">
59 <span class="item-label" style="width: 80px;">线路: </span> <select 59 <span class="item-label" style="width: 80px;">线路: </span> <select
60 class="form-control" name="line" id="line" style="width: 180px;"></select> 60 class="form-control" name="line" id="line" style="width: 180px;"></select>
61 </div> 61 </div>
62 <div style="margin-top: 10px"></div> 62 <div style="margin-top: 10px"></div>
  63 + <div style="display: inline-block; margin-left: 5px">
  64 + <span class="item-label" style="width: 80px;">是否营运: </span>
  65 + <select class="form-control" name="sfyy" id="sfyy" style="width: 140px;">
  66 + <option value="0">全部线路</option>
  67 + <option value="1" selected="selected">营运线路</option>
  68 + <option value="2">非营运线路</option>
  69 + </select>
  70 + </div>
63 <div style="display: inline-block; margin-left: 5px;"> 71 <div style="display: inline-block; margin-left: 5px;">
64 <span class="item-label" style="width: 80px;">开始时间: </span> <input 72 <span class="item-label" style="width: 80px;">开始时间: </span> <input
65 class="form-control" type="text" id="startDate" 73 class="form-control" type="text" id="startDate"
66 style="width: 140px;" /> 74 style="width: 140px;" />
67 </div> 75 </div>
68 - <div style="display: inline-block; margin-left: 10px;"> 76 + <div style="display: inline-block; margin-left: 5px;">
69 <span class="item-label" style="width: 80px;">结束时间: </span> <input 77 <span class="item-label" style="width: 80px;">结束时间: </span> <input
70 class="form-control" type="text" id="endDate" 78 class="form-control" type="text" id="endDate"
71 style="width: 140px;" /> 79 style="width: 140px;" />
@@ -182,7 +190,7 @@ @@ -182,7 +190,7 @@
182 $("#gsdmChange").on("change",updateCompany); 190 $("#gsdmChange").on("change",updateCompany);
183 function updateCompany(){ 191 function updateCompany(){
184 var company = $('#gsdmChange').val(); 192 var company = $('#gsdmChange').val();
185 - var options = ''; 193 + var options = '<option value="">全部分公司</option>';
186 for(var i = 0; i < obj.length; i++){ 194 for(var i = 0; i < obj.length; i++){
187 if(obj[i].companyCode == company){ 195 if(obj[i].companyCode == company){
188 var children = obj[i].children; 196 var children = obj[i].children;
@@ -194,7 +202,7 @@ @@ -194,7 +202,7 @@
194 $('#fgsdmChange').html(options); 202 $('#fgsdmChange').html(options);
195 } 203 }
196 204
197 - 205 +
198 var tempData = {}; 206 var tempData = {};
199 $.get('/report/lineList',function(xlList){ 207 $.get('/report/lineList',function(xlList){
200 var data = []; 208 var data = [];
@@ -226,18 +234,21 @@ @@ -226,18 +234,21 @@
226 var temp = tempData[$("#line").val()].split(":"); 234 var temp = tempData[$("#line").val()].split(":");
227 $("#gsdmChange").val(temp[0]); 235 $("#gsdmChange").val(temp[0]);
228 updateCompany(); 236 updateCompany();
229 - $("#fgsdmChange").val(temp[1]); 237 +// $("#fgsdmChange").val(temp[1]);
  238 + $("#fgsdmChange").val("");
230 $("#gsdmChange").attr("disabled", true); 239 $("#gsdmChange").attr("disabled", true);
231 - $("#fgsdmChange").attr("disabled", true); 240 +// $("#fgsdmChange").attr("disabled", true);
232 } 241 }
233 }); 242 });
234 243
235 var line; 244 var line;
236 var startDate; 245 var startDate;
237 var endDate; 246 var endDate;
  247 + var sfyy = 0;
238 $("#query").on( 248 $("#query").on(
239 "click", 249 "click",
240 function() { 250 function() {
  251 + sfyy = $("#sfyy").val();
241 line = $("#line").val(); 252 line = $("#line").val();
242 sel = $("#sel").val(); 253 sel = $("#sel").val();
243 var startDate1 = $("#startDate").val(); 254 var startDate1 = $("#startDate").val();
@@ -249,6 +260,7 @@ @@ -249,6 +260,7 @@
249 $get('/mcy_forms/changetochange', { 260 $get('/mcy_forms/changetochange', {
250 sel : sel, 261 sel : sel,
251 line : line, 262 line : line,
  263 + sfyy : sfyy,
252 startDate : $("#startDate").val(), 264 startDate : $("#startDate").val(),
253 endDate : $("#endDate").val(), 265 endDate : $("#endDate").val(),
254 gsdm:gsdmChange, 266 gsdm:gsdmChange,
@@ -272,13 +284,14 @@ @@ -272,13 +284,14 @@
272 $("#export").on( 284 $("#export").on(
273 "click", 285 "click",
274 function() { 286 function() {
  287 + sfyy = $("#sfyy").val();
275 line = $("#line").val(); 288 line = $("#line").val();
276 var sel = $("#sel").val(); 289 var sel = $("#sel").val();
277 - var startDate = $("#startDate").val();  
278 - var endDate = $("#endDate").val();  
279 - var lpName = $("#lpName").val();  
280 - var gsdmChange= $("#gsdmChange").val();  
281 - var fgsdmChange= $("#fgsdmChange").val(); 290 + var startDate = $("#startDate").val();
  291 + var endDate = $("#endDate").val();
  292 + var lpName = $("#lpName").val();
  293 + var gsdmChange= $("#gsdmChange").val();
  294 + var fgsdmChange= $("#fgsdmChange").val();
282 var lineName = $('#line option:selected').text(); 295 var lineName = $('#line option:selected').text();
283 if(lineName == "全部线路") 296 if(lineName == "全部线路")
284 lineName = $('#fgsdmChange option:selected').text(); 297 lineName = $('#fgsdmChange option:selected').text();
@@ -286,6 +299,7 @@ @@ -286,6 +299,7 @@
286 $post('/mcy_export/changetochangeExport', { 299 $post('/mcy_export/changetochangeExport', {
287 sel:sel, 300 sel:sel,
288 line:line, 301 line:line,
  302 + sfyy:sfyy,
289 gsdm:gsdmChange, 303 gsdm:gsdmChange,
290 fgsdm:fgsdmChange, 304 fgsdm:fgsdmChange,
291 startDate : startDate, 305 startDate : startDate,
src/main/resources/static/pages/mforms/operationservices/operationservice.html
@@ -34,31 +34,39 @@ @@ -34,31 +34,39 @@
34 id="gsdmDiv_operat"> 34 id="gsdmDiv_operat">
35 <span class="item-label" style="width: 80px;">公司: </span> <select 35 <span class="item-label" style="width: 80px;">公司: </span> <select
36 class="form-control" name="company" id="gsdmOperat" 36 class="form-control" name="company" id="gsdmOperat"
37 - style="width: 140px;"></select> 37 + style="width: 150px;"></select>
38 </div> 38 </div>
39 - <div style="display: inline-block; margin-left: 25px;" 39 + <div style="display: inline-block; margin-left: 19px;"
40 id="fgsdmDiv_operat"> 40 id="fgsdmDiv_operat">
41 <span class="item-label" style="width: 80px;">分公司: </span> <select 41 <span class="item-label" style="width: 80px;">分公司: </span> <select
42 class="form-control" name="subCompany" id="fgsdmOperat" 42 class="form-control" name="subCompany" id="fgsdmOperat"
43 - style="width: 140px;"></select> 43 + style="width: 150px;"></select>
44 </div> 44 </div>
45 - <div style="margin-top: 2px"></div>  
46 <div style="display: inline-block;margin-left: 33px;"> 45 <div style="display: inline-block;margin-left: 33px;">
47 <span class="item-label" style="width: 80px;">线路: </span> <select 46 <span class="item-label" style="width: 80px;">线路: </span> <select
48 - class="form-control" name="line" id="line" style="width: 140px;"></select> 47 + class="form-control" name="line" id="line" style="width: 150px;"></select>
49 </div> 48 </div>
50 - <div style="display: inline-block; margin-left: 11px;"> 49 + <div style="margin-top: 10px"></div>
  50 + <div style="display: inline-block; margin-left: 5px">
  51 + <span class="item-label" style="width: 80px;">是否营运: </span>
  52 + <select class="form-control" name="sfyy" id="sfyy" style="width: 150px;">
  53 + <option value="0">全部线路</option>
  54 + <option value="1" selected="selected">营运线路</option>
  55 + <option value="2">非营运线路</option>
  56 + </select>
  57 + </div>
  58 + <div style="display: inline-block; margin-left: 5px;">
51 <span class="item-label" style="width: 80px;">开始时间: </span> <input 59 <span class="item-label" style="width: 80px;">开始时间: </span> <input
52 class="form-control" type="text" id="startDate" 60 class="form-control" type="text" id="startDate"
53 - style="width: 140px;" /> 61 + style="width: 150px;" />
54 </div> 62 </div>
55 - <div style="display: inline-block; margin-left: 15px;"> 63 + <div style="display: inline-block; margin-left: 5px;">
56 <span class="item-label" style="width: 80px;">结束时间: </span> <input 64 <span class="item-label" style="width: 80px;">结束时间: </span> <input
57 class="form-control" type="text" id="endDate" 65 class="form-control" type="text" id="endDate"
58 - style="width: 140px;" /> 66 + style="width: 150px;" />
59 </div> 67 </div>
60 - <div style="display: inline-block; margin-left: 15px">  
61 - <span class="item-label" style="width: 150px;">统计: </span> 68 + <div style="display: inline-block; margin-left: 10px">
  69 + <span class="item-label" style="width: 150px;">统计: </span>
62 </div> 70 </div>
63 <div class="form-group"> 71 <div class="form-group">
64 <input class="btn btn-default" type="button" id="query" value="筛选" /> 72 <input class="btn btn-default" type="button" id="query" value="筛选" />
@@ -75,6 +83,7 @@ @@ -75,6 +83,7 @@
75 <thead> 83 <thead>
76 <tr> 84 <tr>
77 <th>序号</th> 85 <th>序号</th>
  86 + <th>公司</th>
78 <th>线路名称</th> 87 <th>线路名称</th>
79 <th>加注量</th> 88 <th>加注量</th>
80 <th>消耗量</th> 89 <th>消耗量</th>
@@ -143,7 +152,7 @@ @@ -143,7 +152,7 @@
143 $("#gsdmOperat").on("change",updateCompany); 152 $("#gsdmOperat").on("change",updateCompany);
144 function updateCompany(){ 153 function updateCompany(){
145 var company = $('#gsdmOperat').val(); 154 var company = $('#gsdmOperat').val();
146 - var options = ''; 155 + var options = '<option value="">全部分公司</option>';
147 for(var i = 0; i < obj.length; i++){ 156 for(var i = 0; i < obj.length; i++){
148 if(obj[i].companyCode == company){ 157 if(obj[i].companyCode == company){
149 var children = obj[i].children; 158 var children = obj[i].children;
@@ -186,9 +195,10 @@ @@ -186,9 +195,10 @@
186 var temp = tempData[$("#line").val()].split(":"); 195 var temp = tempData[$("#line").val()].split(":");
187 $("#gsdmOperat").val(temp[0]); 196 $("#gsdmOperat").val(temp[0]);
188 updateCompany(); 197 updateCompany();
189 - $("#fgsdmOperat").val(temp[1]); 198 +// $("#fgsdmOperat").val(temp[1]);
  199 + $("#fgsdmOperat").val("");
190 $("#gsdmOperat").attr("disabled", true); 200 $("#gsdmOperat").attr("disabled", true);
191 - $("#fgsdmOperat").attr("disabled", true); 201 +// $("#fgsdmOperat").attr("disabled", true);
192 } 202 }
193 }); 203 });
194 204
@@ -196,6 +206,7 @@ @@ -196,6 +206,7 @@
196 $("#query").on( 206 $("#query").on(
197 "click", 207 "click",
198 function() { 208 function() {
  209 + var sfyy = $("#sfyy").val();
199 var line = $("#line").val(); 210 var line = $("#line").val();
200 var startDate = $("#startDate").val(); 211 var startDate = $("#startDate").val();
201 var endDate = $("#endDate").val(); 212 var endDate = $("#endDate").val();
@@ -204,9 +215,10 @@ @@ -204,9 +215,10 @@
204 var fgsdmOperat = $("#fgsdmOperat").val(); 215 var fgsdmOperat = $("#fgsdmOperat").val();
205 var i = layer.load(2); 216 var i = layer.load(2);
206 $get("/mcy_forms/operationservice", { 217 $get("/mcy_forms/operationservice", {
  218 + sfyy : sfyy,
  219 + line : line,
207 gsdmOperat : gsdmOperat, 220 gsdmOperat : gsdmOperat,
208 fgsdmOperat : fgsdmOperat, 221 fgsdmOperat : fgsdmOperat,
209 - line : line,  
210 startDate : startDate, 222 startDate : startDate,
211 endDate : endDate, 223 endDate : endDate,
212 lpName : lpName, 224 lpName : lpName,
@@ -236,6 +248,7 @@ @@ -236,6 +248,7 @@
236 }); 248 });
237 }); 249 });
238 $("#export").on("click",function(){ 250 $("#export").on("click",function(){
  251 + sfyy = $("#sfyy").val();
239 line = $("#line").val(); 252 line = $("#line").val();
240 startDate=$("#startDate").val(); 253 startDate=$("#startDate").val();
241 endDate=$("#endDate").val(); 254 endDate=$("#endDate").val();
@@ -245,7 +258,7 @@ @@ -245,7 +258,7 @@
245 if(lineName == "全部线路") 258 if(lineName == "全部线路")
246 lineName = $('#fgsdmOperat option:selected').text(); 259 lineName = $('#fgsdmOperat option:selected').text();
247 var i = layer.load(2); 260 var i = layer.load(2);
248 - $get('/mcy_export/operationserviceExport',{gsdmOperat:gsdmOperat,fgsdmOperat:fgsdmOperat,line:line,startDate:startDate,endDate:endDate,type:'export',lineName:lineName},function(result){ 261 + $get('/mcy_export/operationserviceExport',{sfyy:sfyy,line:line,gsdmOperat:gsdmOperat,fgsdmOperat:fgsdmOperat,startDate:startDate,endDate:endDate,type:'export',lineName:lineName},function(result){
249 var dateTime = ""; 262 var dateTime = "";
250 if(startDate == endDate){ 263 if(startDate == endDate){
251 dateTime = moment(startDate).format("YYYYMMDD"); 264 dateTime = moment(startDate).format("YYYYMMDD");
@@ -266,6 +279,7 @@ @@ -266,6 +279,7 @@
266 {{each list as obj i}} 279 {{each list as obj i}}
267 <tr> 280 <tr>
268 <td>{{i+1}}</td> 281 <td>{{i+1}}</td>
  282 + <td>{{obj.fgs}}</td>
269 <td>{{obj.xlName}}</td> 283 <td>{{obj.xlName}}</td>
270 <td>{{obj.jzl}}</td> 284 <td>{{obj.jzl}}</td>
271 <td>{{obj.xhl}}</td> 285 <td>{{obj.xhl}}</td>
@@ -276,7 +290,7 @@ @@ -276,7 +290,7 @@
276 {{/each}} 290 {{/each}}
277 {{if list.length == 0}} 291 {{if list.length == 0}}
278 <tr> 292 <tr>
279 - <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td> 293 + <td colspan="8"><h6 class="muted">没有找到相关数据</h6></td>
280 </tr> 294 </tr>
281 {{/if}} 295 {{/if}}
282 </script> 296 </script>
src/main/resources/static/pages/mforms/shiftuehiclemanths/shiftuehiclemanth.html
@@ -188,7 +188,7 @@ @@ -188,7 +188,7 @@
188 updateCompany(); 188 updateCompany();
189 $("#fgsdmManth").val(temp[1]); 189 $("#fgsdmManth").val(temp[1]);
190 $("#gsdmManth").attr("disabled", true); 190 $("#gsdmManth").attr("disabled", true);
191 - $("#fgsdmManth").attr("disabled", true); 191 +// $("#fgsdmManth").attr("disabled", true);
192 } 192 }
193 }); 193 });
194 194
src/main/resources/static/pages/mforms/singledatas/singledata.html
@@ -32,21 +32,30 @@ @@ -32,21 +32,30 @@
32 <span class="item-label" style="width: 80px;">公司: </span> 32 <span class="item-label" style="width: 80px;">公司: </span>
33 <select class="form-control" name="company" id="gsdmSing" style="width: 140px;"></select> 33 <select class="form-control" name="company" id="gsdmSing" style="width: 140px;"></select>
34 </div> 34 </div>
35 - <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_sing"> 35 + <div style="display: inline-block; margin-left: 10px;" id="fgsdmDiv_sing">
36 <span class="item-label" style="width: 80px;">分公司: </span> 36 <span class="item-label" style="width: 80px;">分公司: </span>
37 <select class="form-control" name="subCompany" id="fgsdmSing" style="width: 140px;"></select> 37 <select class="form-control" name="subCompany" id="fgsdmSing" style="width: 140px;"></select>
38 </div> 38 </div>
39 - <div style="display: inline-block;">  
40 - <span class="item-label" style="width: 80px;">&nbsp;线路: </span> 39 + <div style="display: inline-block; margin-left: 15px;">
  40 + <span class="item-label" style="width: 80px;">线路: </span>
41 <select class="form-control" name="line" id="line" style="width: 140px;"></select> 41 <select class="form-control" name="line" id="line" style="width: 140px;"></select>
42 </div> 42 </div>
43 - <div style="display: inline-block;margin-left: 15px;"> 43 + <div style="margin-top: 10px"></div>
  44 + <div style="display: inline-block; margin-left: 5px">
  45 + <span class="item-label" style="width: 80px;">是否营运: </span>
  46 + <select class="form-control" name="sfyy" id="sfyy" style="width: 140px;">
  47 + <option value="0">全部线路</option>
  48 + <option value="1" selected="selected">营运线路</option>
  49 + <option value="2">非营运线路</option>
  50 + </select>
  51 + </div>
  52 + <div style="display: inline-block;margin-left: 24px;">
44 <span class="item-label" style="width: 140px;">时间: </span> 53 <span class="item-label" style="width: 140px;">时间: </span>
45 <input class="form-control" type="text" id="startDate" style="width: 140px;"/> 54 <input class="form-control" type="text" id="startDate" style="width: 140px;"/>
46 </div> 55 </div>
47 56
48 <div style="display: inline-block;margin-left: 15px"> 57 <div style="display: inline-block;margin-left: 15px">
49 - <span class="item-label" style="width: 150px;">统计 </span> 58 + <span class="item-label" style="width: 150px;">统计: </span>
50 <select class="form-control" name="tjtype" id="tjtype" style="width: 140px;"> 59 <select class="form-control" name="tjtype" id="tjtype" style="width: 140px;">
51 <option value="jsy">驾驶员</option> 60 <option value="jsy">驾驶员</option>
52 <option value="spy">售票员</option> 61 <option value="spy">售票员</option>
@@ -129,7 +138,7 @@ @@ -129,7 +138,7 @@
129 $("#gsdmSing").on("change",updateCompany); 138 $("#gsdmSing").on("change",updateCompany);
130 function updateCompany(){ 139 function updateCompany(){
131 var company = $('#gsdmSing').val(); 140 var company = $('#gsdmSing').val();
132 - var options = ''; 141 + var options = '<option value="">全部分公司</option>';
133 for(var i = 0; i < obj.length; i++){ 142 for(var i = 0; i < obj.length; i++){
134 if(obj[i].companyCode == company){ 143 if(obj[i].companyCode == company){
135 var children = obj[i].children; 144 var children = obj[i].children;
@@ -172,9 +181,10 @@ @@ -172,9 +181,10 @@
172 var temp = tempData[$("#line").val()].split(":"); 181 var temp = tempData[$("#line").val()].split(":");
173 $("#gsdmSing").val(temp[0]); 182 $("#gsdmSing").val(temp[0]);
174 updateCompany(); 183 updateCompany();
175 - $("#fgsdmSing").val(temp[1]); 184 +// $("#fgsdmSing").val(temp[1]);
  185 + $("#fgsdmSing").val("");
176 $("#gsdmSing").attr("disabled", true); 186 $("#gsdmSing").attr("disabled", true);
177 - $("#fgsdmSing").attr("disabled", true); 187 +// $("#fgsdmSing").attr("disabled", true);
178 } 188 }
179 }); 189 });
180 190
@@ -184,6 +194,7 @@ @@ -184,6 +194,7 @@
184 layer.msg("请选择时间!"); 194 layer.msg("请选择时间!");
185 return; 195 return;
186 } 196 }
  197 + var sfyy = $("#sfyy").val();
187 var line = $("#line").val(); 198 var line = $("#line").val();
188 var startDate = $("#startDate").val(); 199 var startDate = $("#startDate").val();
189 var lpName = $("#lpName").val(); 200 var lpName = $("#lpName").val();
@@ -193,7 +204,7 @@ @@ -193,7 +204,7 @@
193 var params = {}; 204 var params = {};
194 var i = layer.load(2); 205 var i = layer.load(2);
195 // if(tjtype=='jsy'){ 206 // if(tjtype=='jsy'){
196 - $get("/mcy_forms/singledatatj",{ gsdmSing:gsdmSing,fgsdmSing:fgsdmSing, line:line,startDate:startDate,lpName:lpName,tjtype:tjtype},function(result){ 207 + $get("/mcy_forms/singledatatj",{sfyy:sfyy,gsdmSing:gsdmSing,fgsdmSing:fgsdmSing,line:line,startDate:startDate,lpName:lpName,tjtype:tjtype},function(result){
197 layer.close(i); 208 layer.close(i);
198 var singledata = template('singledata',{list:result}); 209 var singledata = template('singledata',{list:result});
199 // 把渲染好的模版html文本追加到表格中 210 // 把渲染好的模版html文本追加到表格中
@@ -219,6 +230,7 @@ @@ -219,6 +230,7 @@
219 }); 230 });
220 231
221 $("#export").on("click",function(){ 232 $("#export").on("click",function(){
  233 + var sfyy = $("#sfyy").val();
222 var line = $("#line").val(); 234 var line = $("#line").val();
223 var startDate = $("#startDate").val(); 235 var startDate = $("#startDate").val();
224 var endDate = $("#endDate").val(); 236 var endDate = $("#endDate").val();
@@ -231,7 +243,7 @@ @@ -231,7 +243,7 @@
231 lineName = $('#fgsdmSing option:selected').text(); 243 lineName = $('#fgsdmSing option:selected').text();
232 var i = layer.load(2); 244 var i = layer.load(2);
233 // if(tjtype=='jsy'){ 245 // if(tjtype=='jsy'){
234 - $get('/mcy_export/singledataExportTj',{gsdmSing:gsdmSing,fgsdmSing:fgsdmSing,line:line,startDate:startDate,endDate:endDate,tjtype:tjtype,type:'export',lineName:lineName},function(result){ 246 + $get('/mcy_export/singledataExportTj',{sfyy:sfyy,gsdmSing:gsdmSing,fgsdmSing:fgsdmSing,line:line,startDate:startDate,endDate:endDate,tjtype:tjtype,type:'export',lineName:lineName},function(result){
235 window.open("/downloadFile/download?fileName=" 247 window.open("/downloadFile/download?fileName="
236 +moment(startDate).format("YYYYMMDD") 248 +moment(startDate).format("YYYYMMDD")
237 +"-"+lineName+"-路单数据"); 249 +"-"+lineName+"-路单数据");
src/main/resources/static/pages/punctual/list.html
@@ -67,7 +67,8 @@ @@ -67,7 +67,8 @@
67 var date = id.split("_")[0]; 67 var date = id.split("_")[0];
68 var endDate = date; 68 var endDate = date;
69 var line = id.split("_")[1]; 69 var line = id.split("_")[1];
70 - var fgs=$('#fgsdm').val(); 70 + var fgs = id.split("_")[3];
  71 +// var fgs=$('#fgsdm').val();
71 var gs=$('#gsdm').val(); 72 var gs=$('#gsdm').val();
72 $get('/busInterval/onTime',{line:line,startDate:date,endDate:endDate,gs:gs,fgs:fgs,flag:2},function(result){ 73 $get('/busInterval/onTime',{line:line,startDate:date,endDate:endDate,gs:gs,fgs:fgs,flag:2},function(result){
73 var onTime_2 = template('onTime_2',{list:result}); 74 var onTime_2 = template('onTime_2',{list:result});
@@ -78,7 +79,8 @@ @@ -78,7 +79,8 @@
78 var date = no.split("_")[0]; 79 var date = no.split("_")[0];
79 var endDate = date; 80 var endDate = date;
80 var line = no.split("_")[1]; 81 var line = no.split("_")[1];
81 - var fgs=$('#fgsdm').val(); 82 + var fgs = no.split("_")[3];
  83 +// var fgs=$('#fgsdm').val();
82 var gs=$('#gsdm').val(); 84 var gs=$('#gsdm').val();
83 $get('/busInterval/onTime',{line:line,startDate:date,endDate:endDate,gs:gs,fgs:fgs,flag:2,type:"export",lineName:no.split("_")[2]},function(result){ 85 $get('/busInterval/onTime',{line:line,startDate:date,endDate:endDate,gs:gs,fgs:fgs,flag:2,type:"export",lineName:no.split("_")[2]},function(result){
84 window.open("/downloadFile/download?fileName=" 86 window.open("/downloadFile/download?fileName="
src/main/resources/static/pages/punctual/onTime.html
@@ -27,27 +27,34 @@ @@ -27,27 +27,34 @@
27 <div class="portlet light porttlet-fit bordered"> 27 <div class="portlet light porttlet-fit bordered">
28 <div class="portlet-title"> 28 <div class="portlet-title">
29 <form class="form-inline" action=""> 29 <form class="form-inline" action="">
30 - <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv">  
31 - <span class="item-label" style="width: 80px;">公司: </span>  
32 - <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select>  
33 - </div>  
34 - <div style="display: inline-block; margin-left: 38px;" id="fgsdmDiv">  
35 - <span class="item-label" style="width: 80px;">分公司: </span>  
36 - <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;"></select>  
37 - </div>  
38 - <div style="margin-top: 10px">  
39 - </div>  
40 - <div style="display: inline-block;margin-left: 33px;"> 30 + <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv">
  31 + <span class="item-label" style="width: 80px;">公司: </span>
  32 + <select class="form-control" name="company" id="gsdm" style="width: 150px;"></select>
  33 + </div>
  34 + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv">
  35 + <span class="item-label" style="width: 80px;">分公司: </span>
  36 + <select class="form-control" name="subCompany" id="fgsdm" style="width: 150px;"></select>
  37 + </div>
  38 + <div style="display: inline-block;margin-left: 38px;">
41 <span class="item-label" style="width: 80px;">线路: </span> 39 <span class="item-label" style="width: 80px;">线路: </span>
42 - <select class="form-control" name="line" id="line" style="width: 180px;"></select> 40 + <select class="form-control" name="line" id="line" style="width: 150px;"></select>
43 </div> 41 </div>
  42 + <div style="margin-top: 10px"/>
  43 + <div style="display: inline-block; margin-left: 5px">
  44 + <span class="item-label" style="width: 80px;">是否营运: </span>
  45 + <select class="form-control" name="sfyy" id="sfyy" style="width: 150px;">
  46 + <option value="0">全部线路</option>
  47 + <option value="1" selected="selected">营运线路</option>
  48 + <option value="2">非营运线路</option>
  49 + </select>
  50 + </div>
44 <div style="display: inline-block;"> 51 <div style="display: inline-block;">
45 - <span class="item-label" style="width: 80px;margin-left: 24px;">开始时间: </span>  
46 - <input class="form-control" type="text" id="date" style="width: 180px;"/> 52 + <span class="item-label" style="width: 80px;margin-left: 10px;">开始时间: </span>
  53 + <input class="form-control" type="text" id="date" style="width: 150px;"/>
47 </div> 54 </div>
48 <div style="display: inline-block;"> 55 <div style="display: inline-block;">
49 - <span class="item-label" style="width: 80px;margin-left: 24px;">结束时间: </span>  
50 - <input class="form-control" type="text" id="endDate" style="width: 180px;"/> 56 + <span class="item-label" style="width: 80px;margin-left: 10px;">结束时间: </span>
  57 + <input class="form-control" type="text" id="endDate" style="width: 150px;"/>
51 </div> 58 </div>
52 59
53 <div class="form-group"> 60 <div class="form-group">
@@ -204,7 +211,7 @@ @@ -204,7 +211,7 @@
204 $("#gsdm").on("change",updateCompany); 211 $("#gsdm").on("change",updateCompany);
205 function updateCompany(){ 212 function updateCompany(){
206 var company = $('#gsdm').val(); 213 var company = $('#gsdm').val();
207 - var options = ''; 214 + var options = '<option value="">全部分公司</option>';
208 for(var i = 0; i < obj.length; i++){ 215 for(var i = 0; i < obj.length; i++){
209 if(obj[i].companyCode == company){ 216 if(obj[i].companyCode == company){
210 var children = obj[i].children; 217 var children = obj[i].children;
@@ -248,15 +255,17 @@ @@ -248,15 +255,17 @@
248 var temp = tempData[$("#line").val()].split(":"); 255 var temp = tempData[$("#line").val()].split(":");
249 $("#gsdm").val(temp[0]); 256 $("#gsdm").val(temp[0]);
250 updateCompany(); 257 updateCompany();
251 - $("#fgsdm").val(temp[1]); 258 +// $("#fgsdm").val(temp[1]);
  259 + $("#fgsdm").val("");
252 $("#gsdm").attr("disabled", true); 260 $("#gsdm").attr("disabled", true);
253 - $("#fgsdm").attr("disabled", true); 261 +// $("#fgsdm").attr("disabled", true);
254 } 262 }
255 }); 263 });
256 264
257 - 265 +
258 //查询 266 //查询
259 $("#query").on('click',function(){ 267 $("#query").on('click',function(){
  268 + var sfyy = $("#sfyy").val();
260 var line = $("#line").val(); 269 var line = $("#line").val();
261 var date = $("#date").val(); 270 var date = $("#date").val();
262 var endDate = $("#endDate").val(); 271 var endDate = $("#endDate").val();
@@ -266,7 +275,7 @@ @@ -266,7 +275,7 @@
266 if(lineName == "全部线路") 275 if(lineName == "全部线路")
267 lineName = $('#subCompany option:selected').text(); 276 lineName = $('#subCompany option:selected').text();
268 var i = layer.load(2); 277 var i = layer.load(2);
269 - $get('/busInterval/onTime',{line:line,startDate:date,endDate:endDate,gs:gs,fgs:fgs},function(result){ 278 + $get('/busInterval/onTime',{sfyy:sfyy,line:line,startDate:date,endDate:endDate,gs:gs,fgs:fgs},function(result){
270 var onTime = template('onTime',{list:result}); 279 var onTime = template('onTime',{list:result});
271 $('#forms tbody').html(onTime); 280 $('#forms tbody').html(onTime);
272 $('#forms_h tbody').html(template('onTime_h',{list:result})); 281 $('#forms_h tbody').html(template('onTime_h',{list:result}));
@@ -281,6 +290,7 @@ @@ -281,6 +290,7 @@
281 }); 290 });
282 }); 291 });
283 292
  293 + var fgs1;
284 var line1; 294 var line1;
285 var lineName1; 295 var lineName1;
286 function showSheetList(){ 296 function showSheetList(){
@@ -288,7 +298,9 @@ @@ -288,7 +298,9 @@
288 lineName1 = $(this).parent().parent().children()[2].innerHTML; 298 lineName1 = $(this).parent().parent().children()[2].innerHTML;
289 var date = $("#date").val(); 299 var date = $("#date").val();
290 var endDate = $("#endDate").val(); 300 var endDate = $("#endDate").val();
291 - var fgs=$('#fgsdm').val(); 301 +// var fgs=$('#fgsdm').val();
  302 + var fgs=$(this).data('fgs');
  303 + fgs1 = fgs;
292 var gs=$('#gsdm').val(); 304 var gs=$('#gsdm').val();
293 var i = layer.load(2); 305 var i = layer.load(2);
294 $get('/busInterval/onTime',{line:line1,startDate:date,endDate:endDate,gs:gs,fgs:fgs,flag:1},function(result){ 306 $get('/busInterval/onTime',{line:line1,startDate:date,endDate:endDate,gs:gs,fgs:fgs,flag:1},function(result){
@@ -304,12 +316,12 @@ @@ -304,12 +316,12 @@
304 }); 316 });
305 } 317 }
306 function openSheetList(){ 318 function openSheetList(){
307 - var id = $(this).data('id'); 319 + var id = $(this).data('id') + "_" + $(this).data('fgs');
308 var date = id.split("_")[0]; 320 var date = id.split("_")[0];
309 var endDate = date; 321 var endDate = date;
310 var line = id.split("_")[1]; 322 var line = id.split("_")[1];
311 - var fgs=$('#fgsdm').val();  
312 - var gs=$('#gsdm').val(); 323 +// var fgs=$('#fgsdm').val();
  324 +// var gs=$('#gsdm').val();
313 $.get('/pages/punctual/list.html', function (content) { 325 $.get('/pages/punctual/list.html', function (content) {
314 layer.open({ 326 layer.open({
315 type: 1, 327 type: 1,
@@ -326,6 +338,7 @@ @@ -326,6 +338,7 @@
326 }); 338 });
327 } 339 }
328 $("#export").on("click",function(){ 340 $("#export").on("click",function(){
  341 + var sfyy = $("#sfyy").val();
329 var line = $("#line").val(); 342 var line = $("#line").val();
330 var date = $("#date").val(); 343 var date = $("#date").val();
331 var endDate = $("#endDate").val(); 344 var endDate = $("#endDate").val();
@@ -335,7 +348,7 @@ @@ -335,7 +348,7 @@
335 if(lineName == "全部线路") 348 if(lineName == "全部线路")
336 lineName = $('#fgsdm option:selected').text(); 349 lineName = $('#fgsdm option:selected').text();
337 var i = layer.load(2); 350 var i = layer.load(2);
338 - $get('/busInterval/onTime',{line:line,startDate:date,endDate:endDate,gs:gs,fgs:fgs,type:"export",lineName:lineName},function(result){ 351 + $get('/busInterval/onTime',{sfyy:sfyy,line:line,startDate:date,endDate:endDate,gs:gs,fgs:fgs,type:"export",lineName:lineName},function(result){
339 var dateTime = ""; 352 var dateTime = "";
340 if(date == endDate){ 353 if(date == endDate){
341 dateTime = moment(date).format("YYYYMMDD"); 354 dateTime = moment(date).format("YYYYMMDD");
@@ -352,7 +365,8 @@ @@ -352,7 +365,8 @@
352 $("#export_1").on("click",function(){ 365 $("#export_1").on("click",function(){
353 var date = $("#date").val(); 366 var date = $("#date").val();
354 var endDate = $("#endDate").val(); 367 var endDate = $("#endDate").val();
355 - var fgs=$('#fgsdm').val(); 368 +// var fgs=$('#fgsdm').val();
  369 + var fgs = fgs1;
356 var gs=$('#gsdm').val(); 370 var gs=$('#gsdm').val();
357 var i = layer.load(2); 371 var i = layer.load(2);
358 $get('/busInterval/onTime',{line:line1,startDate:date,endDate:endDate,gs:gs,fgs:fgs,flag:1,type:"export",lineName:lineName1},function(result){ 372 $get('/busInterval/onTime',{line:line1,startDate:date,endDate:endDate,gs:gs,fgs:fgs,flag:1,type:"export",lineName:lineName1},function(result){
@@ -384,7 +398,7 @@ @@ -384,7 +398,7 @@
384 <td>{{obj.zdzdl}}</td> 398 <td>{{obj.zdzdl}}</td>
385 <td> 399 <td>
386 <button type="button" class="btn btn-sm blue btn-onTime" 400 <button type="button" class="btn btn-sm blue btn-onTime"
387 - data-id="{{obj.xlbm}}">查看</button> 401 + data-id="{{obj.xlbm}}" data-fgs="{{obj.fgsBm}}">查看</button>
388 </td> 402 </td>
389 </tr> 403 </tr>
390 {{/each}} 404 {{/each}}
@@ -429,7 +443,7 @@ @@ -429,7 +443,7 @@
429 <td>{{obj.zdzdl}}</td> 443 <td>{{obj.zdzdl}}</td>
430 <td> 444 <td>
431 <button type="button" class="btn btn-sm blue btn-onTime_1" 445 <button type="button" class="btn btn-sm blue btn-onTime_1"
432 - data-id="{{obj.xl_date}}">详细</button> 446 + data-id="{{obj.xl_date}}" data-fgs="{{obj.fgsBm}}">详细</button>
433 </td> 447 </td>
434 </tr> 448 </tr>
435 {{/each}} 449 {{/each}}