Commit 9494e3d7a7d2508d4afc0729130458176d588245

Authored by 潘钊
2 parents e88899b8 2c2f2fb2

Merge branch 'minhang' into pudong

Showing 37 changed files with 1719 additions and 603 deletions
src/main/java/com/bsth/data/gpsdata/thread/GpsDataLoaderThread.java
@@ -10,6 +10,7 @@ import com.bsth.data.gpsdata.recovery.GpsDataRecovery; @@ -10,6 +10,7 @@ import com.bsth.data.gpsdata.recovery.GpsDataRecovery;
10 import com.bsth.util.ConfigUtil; 10 import com.bsth.util.ConfigUtil;
11 import org.apache.commons.lang3.StringUtils; 11 import org.apache.commons.lang3.StringUtils;
12 import org.apache.http.HttpEntity; 12 import org.apache.http.HttpEntity;
  13 +import org.apache.http.client.config.RequestConfig;
13 import org.apache.http.client.methods.CloseableHttpResponse; 14 import org.apache.http.client.methods.CloseableHttpResponse;
14 import org.apache.http.client.methods.HttpGet; 15 import org.apache.http.client.methods.HttpGet;
15 import org.apache.http.impl.client.CloseableHttpClient; 16 import org.apache.http.impl.client.CloseableHttpClient;
@@ -69,6 +70,11 @@ public class GpsDataLoaderThread extends Thread { @@ -69,6 +70,11 @@ public class GpsDataLoaderThread extends Thread {
69 try { 70 try {
70 httpClient = HttpClients.createDefault(); 71 httpClient = HttpClients.createDefault();
71 HttpGet get = new HttpGet(url); 72 HttpGet get = new HttpGet(url);
  73 + //超时时间
  74 + RequestConfig requestConfig = RequestConfig.custom()
  75 + .setConnectTimeout(2000).setConnectionRequestTimeout(1000)
  76 + .setSocketTimeout(2000).build();
  77 + get.setConfig(requestConfig);
72 78
73 response = httpClient.execute(get); 79 response = httpClient.execute(get);
74 80
@@ -107,6 +113,7 @@ public class GpsDataLoaderThread extends Thread { @@ -107,6 +113,7 @@ public class GpsDataLoaderThread extends Thread {
107 gps.setNbbm(nbbm); 113 gps.setNbbm(nbbm);
108 //有更新的点位 114 //有更新的点位
109 updateList.add(gps); 115 updateList.add(gps);
  116 + logger.info("全量点:"+ list.size() +",更新点" + updateList.size());
110 } 117 }
111 //分析数据 118 //分析数据
112 gpsRealAnalyse.analyse(updateList); 119 gpsRealAnalyse.analyse(updateList);
src/main/java/com/bsth/entity/schedule/SchedulePlanInfo.java
@@ -178,40 +178,77 @@ public class SchedulePlanInfo { @@ -178,40 +178,77 @@ public class SchedulePlanInfo {
178 } 178 }
179 179
180 // 对应路牌套跑 180 // 对应路牌套跑
181 - public void setRerunInfoDylp(CarConfigInfo cc, EmployeeConfigInfo ec) {  
182 - // 关联的车辆信息  
183 - this.cl = cc.getCl().getId(); // 车辆id  
184 - this.clZbh = cc.getCl().getInsideCode(); // 自编号/内部编号  
185 -  
186 - // 关联的驾驶员  
187 - EmployeeConfigInfo employeeConfigInfo = ec; 181 + public void setRerunInfoDylp(CarConfigInfo cc, EmployeeConfigInfo ec, String useType) {
  182 + if ("hr".equals(useType)) {
  183 + // 关联的驾驶员
  184 + EmployeeConfigInfo employeeConfigInfo = ec;
188 185
189 - this.j = employeeConfigInfo.getJsy().getId(); 186 + this.j = employeeConfigInfo.getJsy().getId();
190 // this.jGh = employeeConfigInfo.getJsy().getJobCode(); 187 // this.jGh = employeeConfigInfo.getJsy().getJobCode();
191 - if (StringUtils.isNotEmpty(employeeConfigInfo.getJsy().getJobCode())) {  
192 - String[] jsy_temp = employeeConfigInfo.getJsy().getJobCode().split("-");  
193 - if (jsy_temp.length > 1) {  
194 - this.jGh = jsy_temp[1];  
195 - } else {  
196 - this.jGh = jsy_temp[0]; 188 + if (StringUtils.isNotEmpty(employeeConfigInfo.getJsy().getJobCode())) {
  189 + String[] jsy_temp = employeeConfigInfo.getJsy().getJobCode().split("-");
  190 + if (jsy_temp.length > 1) {
  191 + this.jGh = jsy_temp[1];
  192 + } else {
  193 + this.jGh = jsy_temp[0];
  194 + }
197 } 195 }
198 - }  
199 - this.jName = employeeConfigInfo.getJsy().getPersonnelName();  
200 - // 关联的售票员  
201 - if (employeeConfigInfo.getSpy() != null) {  
202 - this.s = employeeConfigInfo.getSpy().getId(); 196 + this.jName = employeeConfigInfo.getJsy().getPersonnelName();
  197 + // 关联的售票员
  198 + if (employeeConfigInfo.getSpy() != null) {
  199 + this.s = employeeConfigInfo.getSpy().getId();
203 // this.sGh = employeeConfigInfo.getSpy().getJobCode(); 200 // this.sGh = employeeConfigInfo.getSpy().getJobCode();
204 - if (StringUtils.isNotEmpty(employeeConfigInfo.getSpy().getJobCode())) {  
205 - String[] spy_temp = employeeConfigInfo.getSpy().getJobCode().split("-");  
206 - if (spy_temp.length > 1) {  
207 - this.sGh = spy_temp[1]; 201 + if (StringUtils.isNotEmpty(employeeConfigInfo.getSpy().getJobCode())) {
  202 + String[] spy_temp = employeeConfigInfo.getSpy().getJobCode().split("-");
  203 + if (spy_temp.length > 1) {
  204 + this.sGh = spy_temp[1];
  205 + } else {
  206 + this.sGh = spy_temp[0];
  207 + }
  208 + }
  209 +
  210 + this.sName = employeeConfigInfo.getSpy().getPersonnelName();
  211 + }
  212 + } else if ("hc".equals(useType)) {
  213 + // 关联的车辆信息
  214 + this.cl = cc.getCl().getId(); // 车辆id
  215 + this.clZbh = cc.getCl().getInsideCode(); // 自编号/内部编号
  216 + } else { // 所有的
  217 + // 关联的车辆信息
  218 + this.cl = cc.getCl().getId(); // 车辆id
  219 + this.clZbh = cc.getCl().getInsideCode(); // 自编号/内部编号
  220 +
  221 + // 关联的驾驶员
  222 + EmployeeConfigInfo employeeConfigInfo = ec;
  223 +
  224 + this.j = employeeConfigInfo.getJsy().getId();
  225 +// this.jGh = employeeConfigInfo.getJsy().getJobCode();
  226 + if (StringUtils.isNotEmpty(employeeConfigInfo.getJsy().getJobCode())) {
  227 + String[] jsy_temp = employeeConfigInfo.getJsy().getJobCode().split("-");
  228 + if (jsy_temp.length > 1) {
  229 + this.jGh = jsy_temp[1];
208 } else { 230 } else {
209 - this.sGh = spy_temp[0]; 231 + this.jGh = jsy_temp[0];
210 } 232 }
211 } 233 }
  234 + this.jName = employeeConfigInfo.getJsy().getPersonnelName();
  235 + // 关联的售票员
  236 + if (employeeConfigInfo.getSpy() != null) {
  237 + this.s = employeeConfigInfo.getSpy().getId();
  238 +// this.sGh = employeeConfigInfo.getSpy().getJobCode();
  239 + if (StringUtils.isNotEmpty(employeeConfigInfo.getSpy().getJobCode())) {
  240 + String[] spy_temp = employeeConfigInfo.getSpy().getJobCode().split("-");
  241 + if (spy_temp.length > 1) {
  242 + this.sGh = spy_temp[1];
  243 + } else {
  244 + this.sGh = spy_temp[0];
  245 + }
  246 + }
212 247
213 - this.sName = employeeConfigInfo.getSpy().getPersonnelName(); 248 + this.sName = employeeConfigInfo.getSpy().getPersonnelName();
  249 + }
214 } 250 }
  251 +
215 } 252 }
216 253
217 public SchedulePlanInfo( 254 public SchedulePlanInfo(
src/main/java/com/bsth/entity/schedule/rule/RerunRule.java
@@ -68,6 +68,8 @@ public class RerunRule extends BEntity { @@ -68,6 +68,8 @@ public class RerunRule extends BEntity {
68 /** 使用路牌 */ 68 /** 使用路牌 */
69 @ManyToOne(cascade = CascadeType.DETACH, fetch = FetchType.LAZY) 69 @ManyToOne(cascade = CascadeType.DETACH, fetch = FetchType.LAZY)
70 private GuideboardInfo useLp; 70 private GuideboardInfo useLp;
  71 + /** 对应路牌替换类型,hr;换人,hc:换车,all:换人换车 */
  72 + private String useType;
71 73
72 //--------- 对应班车 ----------/ 74 //--------- 对应班车 ----------/
73 /** 车辆配置 */ 75 /** 车辆配置 */
@@ -251,4 +253,12 @@ public class RerunRule extends BEntity { @@ -251,4 +253,12 @@ public class RerunRule extends BEntity {
251 public void setsName(String sName) { 253 public void setsName(String sName) {
252 this.sName = sName; 254 this.sName = sName;
253 } 255 }
  256 +
  257 + public String getUseType() {
  258 + return useType;
  259 + }
  260 +
  261 + public void setUseType(String useType) {
  262 + this.useType = useType;
  263 + }
254 } 264 }
src/main/java/com/bsth/entity/schedule/rule/ScheduleRule1Flat.java
@@ -76,6 +76,10 @@ public class ScheduleRule1Flat extends BEntity { @@ -76,6 +76,10 @@ public class ScheduleRule1Flat extends BEntity {
76 /** 翻班格式(类似格式:1110011)*/ 76 /** 翻班格式(类似格式:1110011)*/
77 private String fbgs; 77 private String fbgs;
78 78
  79 + /** 备注 */
  80 + @Column(length = 1000)
  81 + private String remark;
  82 +
79 public Long getId() { 83 public Long getId() {
80 return id; 84 return id;
81 } 85 }
@@ -164,4 +168,11 @@ public class ScheduleRule1Flat extends BEntity { @@ -164,4 +168,11 @@ public class ScheduleRule1Flat extends BEntity {
164 this.fbgs = fbgs; 168 this.fbgs = fbgs;
165 } 169 }
166 170
  171 + public String getRemark() {
  172 + return remark;
  173 + }
  174 +
  175 + public void setRemark(String remark) {
  176 + this.remark = remark;
  177 + }
167 } 178 }
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
@@ -910,8 +910,9 @@ public class FormsServiceImpl implements FormsService { @@ -910,8 +910,9 @@ public class FormsServiceImpl implements FormsService {
910 + map.get("endDate").toString() + "' and xl_bm='" + map.get 910 + map.get("endDate").toString() + "' and xl_bm='" + map.get
911 ("line").toString() 911 ("line").toString()
912 + "' AND gs_bm is not null AND bc_type NOT IN ('in', 'out')" 912 + "' AND gs_bm is not null AND bc_type NOT IN ('in', 'out')"
913 - + "GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name,bc_type) b ON t.company=b.gs_bm) b on " 913 + + "GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name,bc_type) b ON t.company=b.gs_bm and t.branche_company = b.fgs_bm) b on "
914 + " a.gs_bm=b.gs_bm and a.fgs_bm=b.fgs_bm and a.xl_bm=b.xl_bm "; 914 + " a.gs_bm=b.gs_bm and a.fgs_bm=b.fgs_bm and a.xl_bm=b.xl_bm ";
  915 +
915 List<Allline> list = jdbcTemplate.query(sql, new RowMapper<Allline>() { 916 List<Allline> list = jdbcTemplate.query(sql, new RowMapper<Allline>() {
916 917
917 @Override 918 @Override
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
@@ -73,7 +73,6 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -73,7 +73,6 @@ public class BusIntervalServiceImpl implements BusIntervalService {
73 if(normal){ 73 if(normal){
74 sql += " and bc_type != 'in' and bc_type != 'out'"; 74 sql += " and bc_type != 'in' and bc_type != 'out'";
75 } 75 }
76 - System.out.println(sql);  
77 76
78 list = jdbcTemplate.query(sql, 77 list = jdbcTemplate.query(sql,
79 new RowMapper<ScheduleRealInfo>(){ 78 new RowMapper<ScheduleRealInfo>(){
@@ -238,6 +237,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -238,6 +237,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
238 237
239 String sql = "select start_station_name, end_station_name from bsth_c_line where line_code = '"+line+"'"; 238 String sql = "select start_station_name, end_station_name from bsth_c_line where line_code = '"+line+"'";
240 239
  240 + System.out.println(sql);
241 list = jdbcTemplate.query(sql, 241 list = jdbcTemplate.query(sql,
242 new RowMapper<Map<String, Object>>(){ 242 new RowMapper<Map<String, Object>>(){
243 @Override 243 @Override
@@ -315,8 +315,10 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -315,8 +315,10 @@ public class BusIntervalServiceImpl implements BusIntervalService {
315 String endDate = map.get("endDate").toString(); 315 String endDate = map.get("endDate").toString();
316 String model = map.get("model").toString(); 316 String model = map.get("model").toString();
317 String statu = map.get("statu").toString(); 317 String statu = map.get("statu").toString();
318 -// String times = map.get("times").toString(); 318 + String times1 = map.get("times1").toString();
  319 + String times2 = map.get("times2").toString();
319 String type = map.get("type").toString(); 320 String type = map.get("type").toString();
  321 + int sfqr = Integer.valueOf(map.get("sfqr").toString());
320 322
321 if(startDate.length() == 0){ 323 if(startDate.length() == 0){
322 startDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); 324 startDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
@@ -327,12 +329,18 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -327,12 +329,18 @@ public class BusIntervalServiceImpl implements BusIntervalService {
327 if(statu.equals("0")){ 329 if(statu.equals("0")){
328 line = ""; 330 line = "";
329 } 331 }
330 -// if(times.length() == 0){  
331 -// times = "06:00-07:00";  
332 -// }  
333 332
334 - List<ScheduleRealInfo> list = this.getSchedule(company, subCompany, line, startDate, endDate, model, "", true); 333 + List<ScheduleRealInfo> list = this.getSchedule(company, subCompany, line,
  334 + startDate, endDate, model, sfqr==1?times1+"-"+times2:"", true);
335 335
  336 + long time1 = 0;
  337 + long time2 = 0;
  338 + if(sfqr == 1){
  339 + String[] split1 = times1.split(":");
  340 + String[] split2 = times2.split(":");
  341 + time1 = Long.valueOf(split1[0])*60 + Long.valueOf(split1[1]);
  342 + time2 = Long.valueOf(split2[0])*60 + Long.valueOf(split2[1]);
  343 + }
336 String[] date1 = startDate.split("-"); 344 String[] date1 = startDate.split("-");
337 String[] date2 = endDate.split("-"); 345 String[] date2 = endDate.split("-");
338 // startDate = date1[0] + "年" + date1[1] + "月" + date1[2] + "日"; 346 // startDate = date1[0] + "年" + date1[1] + "月" + date1[2] + "日";
@@ -349,6 +357,15 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -349,6 +357,15 @@ public class BusIntervalServiceImpl implements BusIntervalService {
349 // int endTime = Integer.valueOf(split[1].split(":")[0])*60 + Integer.valueOf(split[1].split(":")[1]); 357 // int endTime = Integer.valueOf(split[1].split(":")[0])*60 + Integer.valueOf(split[1].split(":")[1]);
350 358
351 for(ScheduleRealInfo schedule : list){ 359 for(ScheduleRealInfo schedule : list){
  360 + String[] split1 = schedule.getFcsj().split(":");
  361 + String[] split2 = schedule.getZdsj().split(":");
  362 + long fcsj = Long.valueOf(split1[0])*60 + Long.valueOf(split1[1]);
  363 + long zdsj = Long.valueOf(split2[0])*60 + Long.valueOf(split2[1]);
  364 + if(sfqr == 1 && (zdsj < time1 || fcsj > time2)){
  365 + continue;
  366 + }
  367 + if(schedule.getXlName() == null || schedule.getXlName().trim().length() == 0)
  368 + continue;
352 String key = schedule.getXlBm() + "/" + schedule.getXlName() + "/" + schedule.getQdzName(); 369 String key = schedule.getXlBm() + "/" + schedule.getXlName() + "/" + schedule.getQdzName();
353 if(!keyMap.containsKey(key)) 370 if(!keyMap.containsKey(key))
354 keyMap.put(key, new ArrayList<ScheduleRealInfo>()); 371 keyMap.put(key, new ArrayList<ScheduleRealInfo>());
@@ -566,8 +583,11 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -566,8 +583,11 @@ public class BusIntervalServiceImpl implements BusIntervalService {
566 String statu = map.get("statu").toString(); 583 String statu = map.get("statu").toString();
567 String startDate = map.get("startDate").toString(); 584 String startDate = map.get("startDate").toString();
568 String endDate = map.get("endDate").toString(); 585 String endDate = map.get("endDate").toString();
  586 + String times1 = map.get("times1").toString();
  587 + String times2 = map.get("times2").toString();
569 String model = map.get("model").toString(); 588 String model = map.get("model").toString();
570 String type = map.get("type").toString(); 589 String type = map.get("type").toString();
  590 + int sfqr = Integer.valueOf(map.get("sfqr").toString());
571 591
572 if(startDate.length() == 0){ 592 if(startDate.length() == 0){
573 startDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); 593 startDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
@@ -588,6 +608,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -588,6 +608,9 @@ public class BusIntervalServiceImpl implements BusIntervalService {
588 if(company.length() != 0){ 608 if(company.length() != 0){
589 sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; 609 sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'";
590 } 610 }
  611 + if(sfqr == 1){
  612 + sql += " and zdsj >= '"+times1+"' and fcsj <= '"+times2+"'";
  613 + }
591 sql += " and bc_type != 'in' and bc_type != 'out' order by fcsj"; 614 sql += " and bc_type != 'in' and bc_type != 'out' order by fcsj";
592 615
593 list = jdbcTemplate.query(sql, 616 list = jdbcTemplate.query(sql,
@@ -698,7 +721,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -698,7 +721,9 @@ public class BusIntervalServiceImpl implements BusIntervalService {
698 e.printStackTrace(); 721 e.printStackTrace();
699 } 722 }
700 723
701 - 724 +
  725 + long time1 = 0;
  726 + long time2 = 0;
702 String[] date1 = startDate.split("-"); 727 String[] date1 = startDate.split("-");
703 String[] date2 = endDate.split("-"); 728 String[] date2 = endDate.split("-");
704 String date = ""; 729 String date = "";
@@ -710,6 +735,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -710,6 +735,12 @@ public class BusIntervalServiceImpl implements BusIntervalService {
710 date = date1[0] + "年" + date1[1] + "月" + date1[2] + "日--" + 735 date = date1[0] + "年" + date1[1] + "月" + date1[2] + "日--" +
711 date2[0] + "年" + date2[1] + "月" + date2[2] + "日"; 736 date2[0] + "年" + date2[1] + "月" + date2[2] + "日";
712 } 737 }
  738 + if(sfqr == 1){
  739 + String[] split1 = times1.split(":");
  740 + String[] split2 = times2.split(":");
  741 + time1 = Long.valueOf(split1[0])*60 + Long.valueOf(split1[1]);
  742 + time2 = Long.valueOf(split2[0])*60 + Long.valueOf(split2[1]);
  743 + }
713 744
714 for(ChildTaskPlan cTask : cList){ 745 for(ChildTaskPlan cTask : cList){
715 String key = cTask.getRemarks(); 746 String key = cTask.getRemarks();
@@ -719,6 +750,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -719,6 +750,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
719 } 750 }
720 751
721 for(ScheduleRealInfo schedule : list){ 752 for(ScheduleRealInfo schedule : list){
  753 + if(schedule.getXlName()==null || schedule.getXlName().trim().length()==0)
  754 + continue;
722 if(model.length() != 0){ 755 if(model.length() != 0){
723 for(Long tt : ttList) 756 for(Long tt : ttList)
724 if((long) tt == (long)schedule.getSpId()){ 757 if((long) tt == (long)schedule.getSpId()){
@@ -744,6 +777,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -744,6 +777,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
744 List<ScheduleRealInfo> list2 = keyMap.get(key); 777 List<ScheduleRealInfo> list2 = keyMap.get(key);
745 long jhyysj = 0, sjyysj = 0; 778 long jhyysj = 0, sjyysj = 0;
746 long jhyssj = 0, sjyssj = 0; 779 long jhyssj = 0, sjyssj = 0;
  780 + long jhyysj1 = 0, sjyysj1 = 0;
  781 + long jhyssj1 = 0, sjyssj1 = 0;
747 double jhlc = 0, sjlc = 0; 782 double jhlc = 0, sjlc = 0;
748 for(ScheduleRealInfo schedule : list2){ 783 for(ScheduleRealInfo schedule : list2){
749 if(companyName.length() == 0 && schedule.getGsName() != null){ 784 if(companyName.length() == 0 && schedule.getGsName() != null){
@@ -766,20 +801,40 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -766,20 +801,40 @@ public class BusIntervalServiceImpl implements BusIntervalService {
766 for(int i = 1; i < keyList.size(); i++){ 801 for(int i = 1; i < keyList.size(); i++){
767 ScheduleRealInfo schedule1 = sortMap.get(keyList.get(i - 1)); 802 ScheduleRealInfo schedule1 = sortMap.get(keyList.get(i - 1));
768 ScheduleRealInfo schedule2 = sortMap.get(keyList.get(i)); 803 ScheduleRealInfo schedule2 = sortMap.get(keyList.get(i));
769 - jhyysj += schedule2.getFcsjT() - schedule1.getFcsjT();  
770 - 804 + if(sfqr == 1 && time1 > schedule1.getFcsjT()){
  805 + jhyysj += schedule2.getFcsjT() - time1;
  806 + }else if(sfqr == 1 && time2 < schedule2.getFcsjT()){
  807 + jhyysj += time2 - schedule1.getFcsjT();
  808 + }else{
  809 + jhyysj += schedule2.getFcsjT() - schedule1.getFcsjT();
  810 + }
  811 + jhyysj1 += schedule2.getFcsjT() - schedule1.getFcsjT();
771 long zdsj2 = schedule2.getZdsjT(); 812 long zdsj2 = schedule2.getZdsjT();
772 long fcsj2 = schedule2.getFcsjT(); 813 long fcsj2 = schedule2.getFcsjT();
773 if(fcsj2 > zdsj2) 814 if(fcsj2 > zdsj2)
774 zdsj2 += 1440l; 815 zdsj2 += 1440l;
775 - jhyssj += zdsj2 - fcsj2; 816 + if(sfqr == 1 && time1 > fcsj2){
  817 + jhyssj += zdsj2 - time1;
  818 + }else if(sfqr == 1 && time2 < zdsj2){
  819 + jhyssj += time2 - fcsj2;
  820 + }else{
  821 + jhyssj += zdsj2 - fcsj2;
  822 + }
  823 + jhyssj1 += zdsj2 - fcsj2;
776 jhlc += schedule2.getJhlc()==null?0:schedule2.getJhlc(); 824 jhlc += schedule2.getJhlc()==null?0:schedule2.getJhlc();
777 if(i == 1){ 825 if(i == 1){
778 long zdsj1 = schedule1.getZdsjT(); 826 long zdsj1 = schedule1.getZdsjT();
779 long fcsj1 = schedule1.getFcsjT(); 827 long fcsj1 = schedule1.getFcsjT();
780 if(fcsj1 > zdsj1) 828 if(fcsj1 > zdsj1)
781 zdsj1 += 1440l; 829 zdsj1 += 1440l;
782 - jhyssj += zdsj1 - fcsj1; 830 + if(sfqr == 1 && time1 > fcsj1){
  831 + jhyssj += zdsj1 - time1;
  832 + }else if(sfqr == 1 && time2 < zdsj1){
  833 + jhyssj += time1 - fcsj1;
  834 + }else{
  835 + jhyssj += zdsj1 - fcsj1;
  836 + }
  837 + jhyssj1 += zdsj1 - fcsj1;
783 jhlc += schedule1.getJhlc()==null?0:schedule1.getJhlc(); 838 jhlc += schedule1.getJhlc()==null?0:schedule1.getJhlc();
784 } 839 }
785 } 840 }
@@ -834,22 +889,45 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -834,22 +889,45 @@ public class BusIntervalServiceImpl implements BusIntervalService {
834 Map<String, Object> m1 = mapList.get(i - 1); 889 Map<String, Object> m1 = mapList.get(i - 1);
835 Map<String, Object> m2 = mapList.get(i); 890 Map<String, Object> m2 = mapList.get(i);
836 if(m1.get("fcsj") != null && m2.get("fcsj") != null){ 891 if(m1.get("fcsj") != null && m2.get("fcsj") != null){
837 - sjyysj += Long.valueOf(m2.get("fcsj").toString()) - Long.valueOf(m1.get("fcsj").toString()); 892 + long fcsj2 = Long.valueOf(m2.get("fcsj").toString());
  893 + long fcsj1 = Long.valueOf(m1.get("fcsj").toString());
  894 + if(sfqr == 1 && time1 > fcsj1){
  895 + sjyysj += fcsj2 - time1;
  896 + }else if(sfqr == 1 && time2 < fcsj2){
  897 + sjyysj += time2 - fcsj1;
  898 + }else{
  899 + sjyysj += fcsj2 - fcsj1;
  900 + }
  901 + sjyysj1 += fcsj2 - fcsj1;
838 } 902 }
839 - if(m2.get("fcsj") != null){ 903 + if(m2.get("fcsj") != null && m2.get("zdsj") != null){
840 long zdsj = Long.valueOf(m2.get("zdsj").toString()); 904 long zdsj = Long.valueOf(m2.get("zdsj").toString());
841 long fcsj = Long.valueOf(m2.get("fcsj").toString()); 905 long fcsj = Long.valueOf(m2.get("fcsj").toString());
842 if(fcsj > zdsj) 906 if(fcsj > zdsj)
843 zdsj += 1440l; 907 zdsj += 1440l;
844 - sjyssj += zdsj - fcsj; 908 + if(sfqr == 1 && time1 > fcsj){
  909 + sjyssj += zdsj - time1;
  910 + }else if(sfqr == 1 && time2 < zdsj){
  911 + sjyssj += zdsj - fcsj;
  912 + }else{
  913 + sjyssj += zdsj - fcsj;
  914 + }
  915 + sjyssj1 += zdsj - fcsj;
845 sjlc += Double.valueOf(m2.get("lc").toString()); 916 sjlc += Double.valueOf(m2.get("lc").toString());
846 } 917 }
847 - if(i == 1 && m1.get("fcsj") != null){ 918 + if(i == 1 && m1.get("fcsj") != null && m1.get("zdsj") != null){
848 long zdsj = Long.valueOf(m1.get("zdsj").toString()); 919 long zdsj = Long.valueOf(m1.get("zdsj").toString());
849 long fcsj = Long.valueOf(m1.get("fcsj").toString()); 920 long fcsj = Long.valueOf(m1.get("fcsj").toString());
850 if(fcsj > zdsj) 921 if(fcsj > zdsj)
851 zdsj += 1440l; 922 zdsj += 1440l;
852 - sjyssj += zdsj - fcsj; 923 + if(sfqr == 1 && time1 > fcsj){
  924 + sjyssj += zdsj - time1;
  925 + }else if(sfqr == 1 && time2 < zdsj){
  926 + sjyssj += time2 - fcsj;
  927 + }else{
  928 + sjyssj += zdsj - fcsj;
  929 + }
  930 + sjyssj1 += zdsj - fcsj;
853 sjlc += Double.valueOf(m1.get("lc").toString()); 931 sjlc += Double.valueOf(m1.get("lc").toString());
854 } 932 }
855 } 933 }
@@ -867,7 +945,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -867,7 +945,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
867 tempMap.put("jhyycs", "0"); 945 tempMap.put("jhyycs", "0");
868 } else { 946 } else {
869 tempMap.put("jhyysj", df.format((float)jhyysj / 60)); 947 tempMap.put("jhyysj", df.format((float)jhyysj / 60));
870 - tempMap.put("jhyycs", df.format(jhlc == 0 ? 0 : jhlc / jhyysj * 60)); 948 + tempMap.put("jhyycs", df.format(jhlc == 0 ? 0 : jhlc / jhyysj1 * 60));
871 } 949 }
872 950
873 if(jhyssj == 0){ 951 if(jhyssj == 0){
@@ -875,7 +953,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -875,7 +953,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
875 tempMap.put("jhyscs", "0"); 953 tempMap.put("jhyscs", "0");
876 } else { 954 } else {
877 tempMap.put("jhyssj", df.format((float)jhyssj / 60)); 955 tempMap.put("jhyssj", df.format((float)jhyssj / 60));
878 - tempMap.put("jhyscs", df.format(jhlc == 0 ? 0 : jhlc / jhyssj * 60)); 956 + tempMap.put("jhyscs", df.format(jhlc == 0 ? 0 : jhlc / jhyssj1 * 60));
879 } 957 }
880 958
881 if(sjyysj == 0){ 959 if(sjyysj == 0){
@@ -883,7 +961,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -883,7 +961,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
883 tempMap.put("sjyycs", "0"); 961 tempMap.put("sjyycs", "0");
884 } else { 962 } else {
885 tempMap.put("sjyysj", df.format((float)sjyysj / 60)); 963 tempMap.put("sjyysj", df.format((float)sjyysj / 60));
886 - tempMap.put("sjyycs", df.format(sjlc == 0 ? 0 : sjlc / sjyysj * 60)); 964 + tempMap.put("sjyycs", df.format(sjlc == 0 ? 0 : sjlc / sjyysj1 * 60));
887 } 965 }
888 966
889 if(sjyssj == 0){ 967 if(sjyssj == 0){
@@ -891,8 +969,16 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -891,8 +969,16 @@ public class BusIntervalServiceImpl implements BusIntervalService {
891 tempMap.put("sjyscs", "0"); 969 tempMap.put("sjyscs", "0");
892 } else { 970 } else {
893 tempMap.put("sjyssj", df.format((float)sjyssj / 60)); 971 tempMap.put("sjyssj", df.format((float)sjyssj / 60));
894 - tempMap.put("sjyscs", df.format(sjlc == 0 ? 0 : sjlc / sjyssj * 60)); 972 + tempMap.put("sjyscs", df.format(sjlc == 0 ? 0 : sjlc / sjyssj1 * 60));
895 } 973 }
  974 + if(!tempMap.get("jhyysj").equals("0"))
  975 + if(!tempMap.get("jhyycs").equals("0"))
  976 + if(!tempMap.get("jhyssj").equals("0"))
  977 + if(!tempMap.get("jhyscs").equals("0"))
  978 + if(!tempMap.get("sjyysj").equals("0"))
  979 + if(!tempMap.get("sjyycs").equals("0"))
  980 + if(!tempMap.get("sjyssj").equals("0"))
  981 + if(!tempMap.get("sjyscs").equals("0"))
896 resList.add(tempMap); 982 resList.add(tempMap);
897 } 983 }
898 Map<String, List<Map<String, Object>>> keyMap2 = new HashMap<String, List<Map<String, Object>>>(); 984 Map<String, List<Map<String, Object>>> keyMap2 = new HashMap<String, List<Map<String, Object>>>();
@@ -1124,7 +1210,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1124,7 +1210,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1124 endDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); 1210 endDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
1125 } 1211 }
1126 if(times.length() == 0){ 1212 if(times.length() == 0){
1127 - times = "06:00-07:00"; 1213 + times = "05:00-23:00";
1128 } 1214 }
1129 1215
1130 list = getSchedule(company, subCompany, line, startDate, endDate, model, times, true); 1216 list = getSchedule(company, subCompany, line, startDate, endDate, model, times, true);
@@ -1387,6 +1473,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1387,6 +1473,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1387 String model = map.get("model").toString(); 1473 String model = map.get("model").toString();
1388 String times = map.get("times").toString(); 1474 String times = map.get("times").toString();
1389 String type = map.get("type").toString(); 1475 String type = map.get("type").toString();
  1476 + int sfqr = Integer.valueOf(map.get("sfqr").toString());
1390 1477
1391 if(startDate.length() == 0){ 1478 if(startDate.length() == 0){
1392 startDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); 1479 startDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
@@ -1395,10 +1482,10 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1395,10 +1482,10 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1395 endDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); 1482 endDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
1396 } 1483 }
1397 if(times.length() == 0){ 1484 if(times.length() == 0){
1398 - times = "06:00-07:00"; 1485 + times = "05:00-23:00";
1399 } 1486 }
1400 1487
1401 - list = getSchedule(company, subCompany, line, startDate, endDate, model, times, true); 1488 + list = getSchedule(company, subCompany, line, startDate, endDate, model, sfqr==1?times:"", true);
1402 1489
1403 String[] date1 = startDate.split("-"); 1490 String[] date1 = startDate.split("-");
1404 String[] date2 = endDate.split("-"); 1491 String[] date2 = endDate.split("-");
@@ -1417,7 +1504,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1417,7 +1504,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1417 1504
1418 for(ScheduleRealInfo schedule : list){ 1505 for(ScheduleRealInfo schedule : list){
1419 Long fcsj = schedule.getFcsjT(); 1506 Long fcsj = schedule.getFcsjT();
1420 - if(!(endTime!=0?fcsj>=startTime&&fcsj<endTime:fcsj>=startTime)){ 1507 + if(sfqr == 1 && !(endTime!=0?fcsj>=startTime&&fcsj<endTime:fcsj>=startTime)){
1421 continue; 1508 continue;
1422 } 1509 }
1423 String key = schedule.getXlName(); 1510 String key = schedule.getXlName();
@@ -1571,6 +1658,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1571,6 +1658,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1571 String endDate = map.get("endDate").toString(); 1658 String endDate = map.get("endDate").toString();
1572 String times = map.get("times").toString(); 1659 String times = map.get("times").toString();
1573 String type = map.get("type").toString(); 1660 String type = map.get("type").toString();
  1661 + int sfqr = Integer.valueOf(map.get("sfqr").toString());
1574 1662
1575 if(startDate.length() == 0){ 1663 if(startDate.length() == 0){
1576 startDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); 1664 startDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
@@ -1584,7 +1672,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1584,7 +1672,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1584 if(line.length() != 0){ 1672 if(line.length() != 0){
1585 sql += " and xl_bm = '"+line+"'"; 1673 sql += " and xl_bm = '"+line+"'";
1586 } 1674 }
1587 - if(times.length() != 0){ 1675 + if(sfqr == 1 && times.length() != 0){
1588 String[] split = times.split("-"); 1676 String[] split = times.split("-");
1589 String[] split0 = split[0].split(":"); 1677 String[] split0 = split[0].split(":");
1590 String[] split1 = split[1].split(":"); 1678 String[] split1 = split[1].split(":");
@@ -1651,6 +1739,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1651,6 +1739,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1651 date = startDate + "--" + endDate; 1739 date = startDate + "--" + endDate;
1652 1740
1653 for(ScheduleRealInfo schedule : list){ 1741 for(ScheduleRealInfo schedule : list){
  1742 + if(schedule.getXlName() == null || schedule.getXlName().trim().length() == 0)
  1743 + continue;
1654 String key = schedule.getGsName() + "/" + schedule.getFgsName() + "/" + schedule.getXlName(); 1744 String key = schedule.getGsName() + "/" + schedule.getFgsName() + "/" + schedule.getXlName();
1655 if(!keyMap.containsKey(key)) 1745 if(!keyMap.containsKey(key))
1656 keyMap.put(key, new ArrayList<ScheduleRealInfo>()); 1746 keyMap.put(key, new ArrayList<ScheduleRealInfo>());
src/main/java/com/bsth/service/schedule/PeopleCarPlanServiceImpl.java
@@ -298,6 +298,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -298,6 +298,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
298 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); 298 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>();
299 for(ScheduleRealInfo schedule : list){ 299 for(ScheduleRealInfo schedule : list){
300 String key = schedule.getXlName(); 300 String key = schedule.getXlName();
  301 + if(key == null || key.trim().equals(""))
  302 + continue;
301 if(!keyMap.containsKey(key)){ 303 if(!keyMap.containsKey(key)){
302 keyMap.put(key, new ArrayList<ScheduleRealInfo>()); 304 keyMap.put(key, new ArrayList<ScheduleRealInfo>());
303 } 305 }
@@ -888,6 +890,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -888,6 +890,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
888 if(schedule.getBcType().equals("in") || schedule.getBcType().equals("out")) 890 if(schedule.getBcType().equals("in") || schedule.getBcType().equals("out"))
889 continue; 891 continue;
890 String key = schedule.getXlName(); 892 String key = schedule.getXlName();
  893 + if(key == null || key.trim().length() == 0)
  894 + continue;
891 if(!keyMap.containsKey(key)) 895 if(!keyMap.containsKey(key))
892 keyMap.put(key, new ArrayList<ScheduleRealInfo>()); 896 keyMap.put(key, new ArrayList<ScheduleRealInfo>());
893 keyMap.get(key).add(schedule); 897 keyMap.get(key).add(schedule);
@@ -1092,16 +1096,16 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1092,16 +1096,16 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1092 keyMap.put(key, new ArrayList<Map<String, Object>>()); 1096 keyMap.put(key, new ArrayList<Map<String, Object>>());
1093 keyMap.get(key).add(m); 1097 keyMap.get(key).add(m);
1094 } 1098 }
  1099 + String companyName = "", subCompanyName = "";
1095 for(String key : keyMap.keySet()){ 1100 for(String key : keyMap.keySet()){
1096 Map<String, Object> tempMap = new HashMap<String, Object>(); 1101 Map<String, Object> tempMap = new HashMap<String, Object>();
1097 Set<String> tempSet = new HashSet<String>(); 1102 Set<String> tempSet = new HashSet<String>();
1098 int sjf = 0; 1103 int sjf = 0;
1099 int wqr = 0; 1104 int wqr = 0;
1100 - String companyName = "", subCompanyName = "";  
1101 for(Map<String, Object> m : keyMap.get(key)){ 1105 for(Map<String, Object> m : keyMap.get(key)){
1102 - if(m.containsKey("company") && m.get("company").toString().length()!=0 && companyName.length()==0) 1106 + if(m.containsKey("company") && m.get("company")!=null && m.get("company").toString().length()!=0 && companyName.length()==0)
1103 companyName = m.get("company").toString(); 1107 companyName = m.get("company").toString();
1104 - if(m.containsKey("subCompany") && m.get("subCompany").toString().length()!=0 && subCompanyName.length()==0) 1108 + if(m.containsKey("subCompany") && m.get("subCompany")!=null && m.get("subCompany").toString().length()!=0 && subCompanyName.length()==0)
1105 subCompanyName = m.get("subCompany").toString(); 1109 subCompanyName = m.get("subCompany").toString();
1106 tempSet.add(m.get("id").toString()); 1110 tempSet.add(m.get("id").toString());
1107 if(m.get("timestamp") != null){ 1111 if(m.get("timestamp") != null){
src/main/java/com/bsth/service/schedule/impl/SchedulePlanServiceImpl.java
@@ -254,12 +254,15 @@ public class SchedulePlanServiceImpl extends BServiceImpl&lt;SchedulePlan, Long&gt; im @@ -254,12 +254,15 @@ public class SchedulePlanServiceImpl extends BServiceImpl&lt;SchedulePlan, Long&gt; im
254 List<RerunRule_input> rerunRule_inputs = scheduleRuleService.findRerunrule(Integer.parseInt(planResult.getXlId())); 254 List<RerunRule_input> rerunRule_inputs = scheduleRuleService.findRerunrule(Integer.parseInt(planResult.getXlId()));
255 logger.info("套跑数量 {} 组", rerunRule_inputs.size()); 255 logger.info("套跑数量 {} 组", rerunRule_inputs.size());
256 256
  257 + // 主线路id
  258 + Integer mainXlId = schedulePlan.getXl().getId();
  259 +
257 if (rerunRule_inputs.size() > 0) { 260 if (rerunRule_inputs.size() > 0) {
258 // 找出是对应路牌类型的线路,计算循环规则输出 261 // 找出是对应路牌类型的线路,计算循环规则输出
259 Set<String> xlids = new HashSet<>(); 262 Set<String> xlids = new HashSet<>();
260 for (RerunRule_input rerunRule_input: rerunRule_inputs) { 263 for (RerunRule_input rerunRule_input: rerunRule_inputs) {
261 if ("dylp".equals(rerunRule_input.getType())) { 264 if ("dylp".equals(rerunRule_input.getType())) {
262 - xlids.add(rerunRule_input.getXl()); 265 + xlids.add(rerunRule_input.getS_xl()); // 参与套跑的线路
263 } 266 }
264 } 267 }
265 268
@@ -309,6 +312,8 @@ public class SchedulePlanServiceImpl extends BServiceImpl&lt;SchedulePlan, Long&gt; im @@ -309,6 +312,8 @@ public class SchedulePlanServiceImpl extends BServiceImpl&lt;SchedulePlan, Long&gt; im
309 Date end1 = new Date(); 312 Date end1 = new Date();
310 logger.info("套跑规则计算,耗时 {} ms", end1.getTime() - start1.getTime()); 313 logger.info("套跑规则计算,耗时 {} ms", end1.getTime() - start1.getTime());
311 314
  315 + schedulePlan.getXl().setId(mainXlId);
  316 +
312 } 317 }
313 318
314 } 319 }
src/main/java/com/bsth/service/schedule/impl/TTInfoDetailServiceImpl.java
@@ -349,7 +349,7 @@ public class TTInfoDetailServiceImpl extends BServiceImpl&lt;TTInfoDetail, Long&gt; im @@ -349,7 +349,7 @@ public class TTInfoDetailServiceImpl extends BServiceImpl&lt;TTInfoDetail, Long&gt; im
349 349
350 // 计算班次里程 350 // 计算班次里程
351 if (StringUtils.isNotEmpty(jhlc)) { 351 if (StringUtils.isNotEmpty(jhlc)) {
352 - if ("in".equals(bctype) || "out".equals(bctype)) { 352 + if ("in".equals(bctype) || "out".equals(bctype) || "ldks".equals(bctype)) {
353 bc_ks += 1; 353 bc_ks += 1;
354 lc_ks += Double.valueOf(jhlc); 354 lc_ks += Double.valueOf(jhlc);
355 355
src/main/java/com/bsth/service/schedule/rules/ScheduleRuleServiceImpl.java
@@ -44,6 +44,7 @@ public class ScheduleRuleServiceImpl implements ScheduleRuleService { @@ -44,6 +44,7 @@ public class ScheduleRuleServiceImpl implements ScheduleRuleService {
44 ", rerun_ttinfodetail_fcsjs as m_fcsjs " + 44 ", rerun_ttinfodetail_fcsjs as m_fcsjs " +
45 ", use_xl as s_dylp_xl " + 45 ", use_xl as s_dylp_xl " +
46 ", use_lp as s_dylp_lp " + 46 ", use_lp as s_dylp_lp " +
  47 + ", use_type as s_dylp_type " +
47 ", cl as s_dybc_cl " + 48 ", cl as s_dybc_cl " +
48 ", cl_zbh as s_dybc_clzbh " + 49 ", cl_zbh as s_dybc_clzbh " +
49 ", j as s_dybc_j " + 50 ", j as s_dybc_j " +
@@ -53,7 +54,7 @@ public class ScheduleRuleServiceImpl implements ScheduleRuleService { @@ -53,7 +54,7 @@ public class ScheduleRuleServiceImpl implements ScheduleRuleService {
53 ", s_gh as s_dybc_sgh " + 54 ", s_gh as s_dybc_sgh " +
54 ", s_name as s_dybc_sname " + 55 ", s_name as s_dybc_sname " +
55 "from bsth_c_s_rerun_rule " + 56 "from bsth_c_s_rerun_rule " +
56 - "where rerun_xl = ? "; 57 + "where is_cancel = 0 and rerun_xl = ? ";
57 58
58 final List<RerunRule_input> rerunRule_inputs = new ArrayList<>(); 59 final List<RerunRule_input> rerunRule_inputs = new ArrayList<>();
59 60
@@ -74,6 +75,7 @@ public class ScheduleRuleServiceImpl implements ScheduleRuleService { @@ -74,6 +75,7 @@ public class ScheduleRuleServiceImpl implements ScheduleRuleService {
74 if ("dylp".equals(resultSet.getString("type"))) { 75 if ("dylp".equals(resultSet.getString("type"))) {
75 rerunRule_input.setS_xl(String.valueOf(resultSet.getInt("s_dylp_xl"))); 76 rerunRule_input.setS_xl(String.valueOf(resultSet.getInt("s_dylp_xl")));
76 rerunRule_input.setS_lp(String.valueOf(resultSet.getLong("s_dylp_lp"))); 77 rerunRule_input.setS_lp(String.valueOf(resultSet.getLong("s_dylp_lp")));
  78 + rerunRule_input.setUsetype(resultSet.getString("s_dylp_type"));
77 } else if ("dybc".equals(resultSet.getString("type"))) { 79 } else if ("dybc".equals(resultSet.getString("type"))) {
78 rerunRule_input.setCl(resultSet.getInt("s_dybc_cl")); 80 rerunRule_input.setCl(resultSet.getInt("s_dybc_cl"));
79 rerunRule_input.setZbh(resultSet.getString("s_dybc_clzbh")); 81 rerunRule_input.setZbh(resultSet.getString("s_dybc_clzbh"));
src/main/java/com/bsth/service/schedule/rules/rerun/RerunRule_input.java
@@ -12,6 +12,7 @@ public class RerunRule_input { @@ -12,6 +12,7 @@ public class RerunRule_input {
12 private String type; // 套跑类型(dylp-对应路牌, dybc-对应班车) 12 private String type; // 套跑类型(dylp-对应路牌, dybc-对应班车)
13 private String s_xl; // 对应路牌,线路Id 13 private String s_xl; // 对应路牌,线路Id
14 private String s_lp; // 对应路牌,路牌Id 14 private String s_lp; // 对应路牌,路牌Id
  15 + private String usetype; // 对应路牌替换类型
15 16
16 private Integer cl; // 对应班车,车辆Id 17 private Integer cl; // 对应班车,车辆Id
17 private String zbh; // 对应班车,车辆自编号 18 private String zbh; // 对应班车,车辆自编号
@@ -141,4 +142,12 @@ public class RerunRule_input { @@ -141,4 +142,12 @@ public class RerunRule_input {
141 public void setSname(String sname) { 142 public void setSname(String sname) {
142 this.sname = sname; 143 this.sname = sname;
143 } 144 }
  145 +
  146 + public String getUsetype() {
  147 + return usetype;
  148 + }
  149 +
  150 + public void setUsetype(String usetype) {
  151 + this.usetype = usetype;
  152 + }
144 } 153 }
src/main/resources/logback.xml
@@ -155,6 +155,28 @@ @@ -155,6 +155,28 @@
155 <appender-ref ref="DATATOOLS" /> 155 <appender-ref ref="DATATOOLS" />
156 </logger> 156 </logger>
157 157
  158 +
  159 + <!-- gps -->
  160 + <appender name="GPS_COUNT"
  161 + class="ch.qos.logback.core.rolling.RollingFileAppender">
  162 + <file>${LOG_BASE}/gps/count.log</file>
  163 + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
  164 + <fileNamePattern>${LOG_BASE}/gps_count/gateway-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
  165 + <timeBasedFileNamingAndTriggeringPolicy
  166 + class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
  167 + <maxFileSize>100MB</maxFileSize>
  168 + </timeBasedFileNamingAndTriggeringPolicy>
  169 + </rollingPolicy>
  170 +
  171 + <layout class="ch.qos.logback.classic.PatternLayout">
  172 + <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%file:%line] %-5level -%msg%n
  173 + </pattern>
  174 + </layout>
  175 + </appender>
  176 + <logger name="com.bsth.data.gpsdata.thread.GpsDataLoaderThread"
  177 + level="INFO" additivity="false">
  178 + <appender-ref ref="GPS_COUNT" />
  179 + </logger>
158 <!--<logger name="org.hibernate.SQL" level="TRACE">--> 180 <!--<logger name="org.hibernate.SQL" level="TRACE">-->
159 <!--<appender-ref ref="STDOUT" />--> 181 <!--<appender-ref ref="STDOUT" />-->
160 <!--</logger>--> 182 <!--</logger>-->
src/main/resources/rules/plan.drl
@@ -386,8 +386,14 @@ rule &quot;Calcu_SchedulePlanInfo&quot; @@ -386,8 +386,14 @@ rule &quot;Calcu_SchedulePlanInfo&quot;
386 // 时刻表id 386 // 时刻表id
387 String ttInfoId = ttInfoId_sd($lr.getTtInfoMapLoop(), sd); 387 String ttInfoId = ttInfoId_sd($lr.getTtInfoMapLoop(), sd);
388 TTInfoDetail_Wraps ttInfoDetail_wraps = (TTInfoDetail_Wraps) $tts.getWrapsMap().get(ttInfoId); 388 TTInfoDetail_Wraps ttInfoDetail_wraps = (TTInfoDetail_Wraps) $tts.getWrapsMap().get(ttInfoId);
389 - List detaillist = (List) ttInfoDetail_wraps.getDetailsMap().get(gid); 389 + if (ttInfoDetail_wraps == null) {
  390 + // 时刻表为空,直接跳过
  391 + // 如1118路,周末不开,此是时刻表指定一个空表
  392 + // TODO:这个以后要改的,选时刻表的规则要修正,没有默认的时刻表
  393 + continue;
  394 + }
390 395
  396 + List detaillist = (List) ttInfoDetail_wraps.getDetailsMap().get(gid);
391 if (detaillist == null) { 397 if (detaillist == null) {
392 // 这里翻到的路牌时刻表里可能没有, 398 // 这里翻到的路牌时刻表里可能没有,
393 // 因为没有考虑翻班格式(就是做几休几) 399 // 因为没有考虑翻班格式(就是做几休几)
src/main/resources/rules/rerun.drl
@@ -47,7 +47,7 @@ rule &quot;calcu_Dylp_CarConfig_Wraps&quot; @@ -47,7 +47,7 @@ rule &quot;calcu_Dylp_CarConfig_Wraps&quot;
47 $rp: RerunRule_param($xlId: mxlid) 47 $rp: RerunRule_param($xlId: mxlid)
48 $dylpxlid: String() from $rp.getXlIds_dylp() 48 $dylpxlid: String() from $rp.getXlIds_dylp()
49 then 49 then
50 - List carConfigInfos = carConfigInfoRepository.findByXlId(Integer.parseInt($xlId)); 50 + List carConfigInfos = carConfigInfoRepository.findByXlId(Integer.parseInt($dylpxlid));
51 51
52 Dylp_CarConfig_Wraps carConfig_wraps = new Dylp_CarConfig_Wraps(); 52 Dylp_CarConfig_Wraps carConfig_wraps = new Dylp_CarConfig_Wraps();
53 carConfig_wraps.setXlId($dylpxlid); 53 carConfig_wraps.setXlId($dylpxlid);
@@ -76,10 +76,10 @@ rule &quot;calcu_Dylp_EmployeeConfig_Wraps&quot; @@ -76,10 +76,10 @@ rule &quot;calcu_Dylp_EmployeeConfig_Wraps&quot;
76 $rp: RerunRule_param($xlId: mxlid) 76 $rp: RerunRule_param($xlId: mxlid)
77 $dylpxlid: String() from $rp.getXlIds_dylp() 77 $dylpxlid: String() from $rp.getXlIds_dylp()
78 then 78 then
79 - List employeeConfigInfos = employeeConfigInfoRepository.findByXlId(Integer.parseInt($xlId)); 79 + List employeeConfigInfos = employeeConfigInfoRepository.findByXlId(Integer.parseInt($dylpxlid));
80 80
81 Dylp_EmployeeConfig_Wraps employeeConfig_wraps = new Dylp_EmployeeConfig_Wraps(); 81 Dylp_EmployeeConfig_Wraps employeeConfig_wraps = new Dylp_EmployeeConfig_Wraps();
82 - employeeConfig_wraps.setXlId($xlId); 82 + employeeConfig_wraps.setXlId($dylpxlid);
83 employeeConfig_wraps.setEcMap(new HashMap()); 83 employeeConfig_wraps.setEcMap(new HashMap());
84 84
85 for (int i = 0; i < employeeConfigInfos.size(); i++) { 85 for (int i = 0; i < employeeConfigInfos.size(); i++) {
@@ -118,6 +118,8 @@ rule &quot;calcu_Dylp_ScheduleResult_output_wrap&quot; @@ -118,6 +118,8 @@ rule &quot;calcu_Dylp_ScheduleResult_output_wrap&quot;
118 wrap.setCc((CarConfigInfo) $ccmap.get($sr.getCarConfigId())); 118 wrap.setCc((CarConfigInfo) $ccmap.get($sr.getCarConfigId()));
119 wrap.setEc((EmployeeConfigInfo) $ecmap.get($sr.getEmployeeConfigId())); 119 wrap.setEc((EmployeeConfigInfo) $ecmap.get($sr.getEmployeeConfigId()));
120 120
  121 +// log.info("xlid = {}", $xlId);
  122 +
121 insert(wrap); 123 insert(wrap);
122 end 124 end
123 125
@@ -133,7 +135,7 @@ rule &quot;calcu_Dylp_rerun_update_dylp&quot; @@ -133,7 +135,7 @@ rule &quot;calcu_Dylp_rerun_update_dylp&quot;
133 ttinfo == $ttinfo.toString(), 135 ttinfo == $ttinfo.toString(),
134 lp == $lp.toString(), 136 lp == $lp.toString(),
135 fcsj == $fcsj, 137 fcsj == $fcsj,
136 - $sxl: s_xl, $slp: s_lp 138 + $sxl: s_xl, $slp: s_lp, $type: usetype
137 ) 139 )
138 $dsro: Dylp_ScheduleResult_output_wrap( 140 $dsro: Dylp_ScheduleResult_output_wrap(
139 xlId == $sxl, 141 xlId == $sxl,
@@ -143,7 +145,7 @@ rule &quot;calcu_Dylp_rerun_update_dylp&quot; @@ -143,7 +145,7 @@ rule &quot;calcu_Dylp_rerun_update_dylp&quot;
143 then 145 then
144 // log.info("TODO:测试 {}", $fcsj); 146 // log.info("TODO:测试 {}", $fcsj);
145 147
146 - $spi.setRerunInfoDylp($dsro.getCc(), $dsro.getEc()); 148 + $spi.setRerunInfoDylp($dsro.getCc(), $dsro.getEc(), $type);
147 149
148 end 150 end
149 151
src/main/resources/static/pages/forms/statement/busInterval.html
@@ -38,15 +38,9 @@ @@ -38,15 +38,9 @@
38 <select class="form-control" name="subCompany" id="subCompany" style="width: 140px;"></select> 38 <select class="form-control" name="subCompany" id="subCompany" style="width: 140px;"></select>
39 </div> 39 </div>
40 <div style="display: inline-block; margin-left: 10px;"> 40 <div style="display: inline-block; margin-left: 10px;">
41 - <span class="item-label" style="width: 80px;">线路: </span>  
42 - <select class="form-control" name="statu" id="statu" style="width: 140px;">  
43 - <option value="0">多线</option>  
44 - <option value="1">单线</option>  
45 - </select>  
46 - </div>  
47 - <div style="display: inline-block; margin-left: 0px;" id="line1">  
48 - <span class="item-label" style="width: 80px;"> - </span>  
49 - <select class="form-control" name="line" id="line" style="width: 140px;"/> 41 + <span class="item-label" style="width: 80px;">选择线路: </span>
  42 + <select class="form-control" name="line" id="line" style="width: 165px;"/>
  43 + <input type="hidden" name="statu" id="statu"/>
50 </div> 44 </div>
51 <div style="display: inline-block; margin-left: 10px"> 45 <div style="display: inline-block; margin-left: 10px">
52 <span class="item-label" style="width: 80px;">时刻类型: </span> 46 <span class="item-label" style="width: 80px;">时刻类型: </span>
@@ -63,14 +57,20 @@ @@ -63,14 +57,20 @@
63 <span class="item-label" style="width: 80px;">结束时间: </span> 57 <span class="item-label" style="width: 80px;">结束时间: </span>
64 <input class="form-control" type="text" id="endDate" style="width: 140px;"/> 58 <input class="form-control" type="text" id="endDate" style="width: 140px;"/>
65 </div> 59 </div>
66 -<!-- <div style="display: inline-block;margin-left: 10px;"> -->  
67 -<!-- <span class="item-label" style="width: 80px;">时间段: </span> -->  
68 -<!-- <input class="form-control" type="text" id="times1" style="width: 80px;"/> -->  
69 -<!-- </div> -->  
70 -<!-- <div style="display: inline-block;"> -->  
71 -<!-- <span class="item-label" style="width: 80px;"> - </span> -->  
72 -<!-- <input class="form-control" type="text" id="times2" style="width: 80px;"/> -->  
73 -<!-- </div> --> 60 + <div style="display: inline-block; margin-left: 10px;">
  61 + <select class="form-control" name="sfqr" id="sfqr" style="width: 75px;">
  62 + <option value="0">全日</option>
  63 + <option value="1">时段</option>
  64 + </select>
  65 + </div>
  66 + <div style="display: inline-block;margin-left: 12px;">
  67 + <span class="item-label" style="width: 80px;"> </span>
  68 + <input class="form-control" type="text" id="times1" style="width: 60px;"/>
  69 + </div>
  70 + <div style="display: inline-block;">
  71 + <span class="item-label" style="width: 80px;"> - </span>
  72 + <input class="form-control" type="text" id="times2" style="width: 60px;"/>
  73 + </div>
74 <div class="form-group" style="margin-left: 14px"> 74 <div class="form-group" style="margin-left: 14px">
75 <input class="btn btn-default" type="button" id="query" value="筛选"/> 75 <input class="btn btn-default" type="button" id="query" value="筛选"/>
76 <input class="btn btn-default" type="button" id="export" value="导出"/> 76 <input class="btn btn-default" type="button" id="export" value="导出"/>
@@ -112,14 +112,14 @@ @@ -112,14 +112,14 @@
112 locale : 'zh-cn' 112 locale : 'zh-cn'
113 }); 113 });
114 114
115 -// $("#times1").datetimepicker({  
116 -// format : 'HH:mm',  
117 -// locale : 'zh-cn'  
118 -// });  
119 -// $("#times2").datetimepicker({  
120 -// format : 'HH:mm',  
121 -// locale : 'zh-cn'  
122 -// }); 115 + $("#times1").datetimepicker({
  116 + format : 'HH:mm',
  117 + locale : 'zh-cn'
  118 + });
  119 + $("#times2").datetimepicker({
  120 + format : 'HH:mm',
  121 + locale : 'zh-cn'
  122 + });
123 123
124 var d = new Date(); 124 var d = new Date();
125 var year = d.getFullYear(); 125 var year = d.getFullYear();
@@ -132,24 +132,78 @@ @@ -132,24 +132,78 @@
132 $("#startDate").val(year + "-" + month + "-" + day); 132 $("#startDate").val(year + "-" + month + "-" + day);
133 $("#endDate").val(year + "-" + month + "-" + day); 133 $("#endDate").val(year + "-" + month + "-" + day);
134 134
135 -// $("#times1").val("06:00");  
136 -// $("#times2").val("07:00"); 135 + $("#times1").val("05:00");
  136 + $("#times2").val("23:00");
  137 + $("#times1").attr("disabled", true);
  138 + $("#times2").attr("disabled", true);
137 139
  140 +// var obj = [];
  141 +// $.get('/user/companyData', function(result){
  142 +// obj = result;
  143 +// var options = '';
  144 +// for(var i = 0; i < obj.length; i++){
  145 +// options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  146 +// }
  147 +// if(obj.length == 1){
  148 +// $('#company1').hide();
  149 +// if(obj[0].children.length == 1)
  150 +// $('#subCompany1').hide();
  151 +// }
  152 +// $('#company').html(options);
  153 +// updateCompany();
  154 +// });
  155 +// $("#company").on("change",updateCompany);
  156 +// function updateCompany(){
  157 +// var company = $('#company').val();
  158 +// var options = '';
  159 +// for(var i = 0; i < obj.length; i++){
  160 +// if(obj[i].companyCode == company){
  161 +// var children = obj[i].children;
  162 +// for(var j = 0; j < children.length; j++){
  163 +// options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  164 +// }
  165 +// }
  166 +// }
  167 +// $('#subCompany').html(options);
  168 +// }
  169 +
  170 +// $.get('/basic/lineCode2Name',function(result){
  171 +// var data=[];
  172 +// // data.push({id:" ", text:"全部线路"});
  173 +// for(var code in result){
  174 +// data.push({id: code, text: result[code]});
  175 +// }
  176 +// console.log(data);
  177 +// initPinYinSelect2('#line',data,'');
  178 +
  179 +// // line = "";
  180 +// line = data[0].id;
  181 +// updateModel();
  182 +// })
  183 + var fage=false;
  184 + var xlList;
138 var obj = []; 185 var obj = [];
139 - $.get('/user/companyData', function(result){  
140 - obj = result;  
141 - var options = '';  
142 - for(var i = 0; i < obj.length; i++){  
143 - options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';  
144 - }  
145 - if(obj.length == 1){  
146 - $('#company1').hide();  
147 - if(obj[0].children.length == 1)  
148 - $('#subCompany1').hide();  
149 - }  
150 - $('#company').html(options);  
151 - updateCompany();  
152 - }); 186 +
  187 + $.get('/report/lineList',function(result){
  188 + xlList=result;
  189 + $.get('/user/companyData', function(result){
  190 + obj = result;
  191 + var options = '';
  192 + for(var i = 0; i < obj.length; i++){
  193 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  194 + }
  195 +
  196 + if(obj.length ==0){
  197 + $("#company1").css('display','none');
  198 + }else if(obj.length ==1){
  199 + $("#company1").css('display','none');
  200 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  201 + $('#subCompany1').css('display','none');
  202 + }
  203 + $('#company').html(options);
  204 + updateCompany();
  205 + });
  206 + })
153 $("#company").on("change",updateCompany); 207 $("#company").on("change",updateCompany);
154 function updateCompany(){ 208 function updateCompany(){
155 var company = $('#company').val(); 209 var company = $('#company').val();
@@ -163,86 +217,82 @@ @@ -163,86 +217,82 @@
163 } 217 }
164 } 218 }
165 $('#subCompany').html(options); 219 $('#subCompany').html(options);
  220 + initXl();
166 } 221 }
167 -  
168 - $.get('/basic/lineCode2Name',function(result){ 222 +
  223 + $("#subCompany").on("change",initXl);
  224 + function initXl(){
169 var data=[]; 225 var data=[];
170 -// data.push({id:" ", text:"全部线路"});  
171 - for(var code in result){  
172 - data.push({id: code, text: result[code]}); 226 + data.push({id:" ", text:"全部线路"});
  227 + if(fage){
  228 + $("#line").select2("destroy").html('');
  229 + }
  230 + var fgs=$('#subCompany').val();
  231 + var gs=$('#company').val();
  232 + for(var i=0;i<xlList.length;i++){
  233 + if(gs!=""){
  234 + if(fgs!=""){
  235 + if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
  236 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  237 + }
  238 + }else{
  239 + if(xlList[i]["gsbm"]==gs){
  240 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  241 + }
  242 + }
  243 + }
173 } 244 }
174 - console.log(data);  
175 initPinYinSelect2('#line',data,''); 245 initPinYinSelect2('#line',data,'');
  246 + fage=true;
176 247
177 -// line = ""; 248 + $("#endDate").attr("disabled", true);
  249 + $("#endDate").val($("#startDate").val());
178 line = data[0].id; 250 line = data[0].id;
  251 + statu = 0;
  252 +
179 updateModel(); 253 updateModel();
180 - }) 254 + }
181 255
182 -// $('#line').select2({  
183 -// ajax: {  
184 -// url: '/realSchedule/findLine',  
185 -// type: 'post',  
186 -// dataType: 'json',  
187 -// delay: 150,  
188 -// data: function(params){  
189 -// return{line: params.term};  
190 -// },  
191 -// processResults: function (data) {  
192 -// return {  
193 -// results: data  
194 -// };  
195 -// },  
196 -// cache: true  
197 -// },  
198 -// templateResult: function(repo){  
199 -// if (repo.loading) return repo.text;  
200 -// var h = '<span>'+repo.text+'</span>';  
201 -// return h;  
202 -// },  
203 -// escapeMarkup: function (markup) { return markup; },  
204 -// minimumInputLength: 1,  
205 -// templateSelection: function(repo){  
206 -// return repo.text;  
207 -// },  
208 -// language: {  
209 -// noResults: function(){  
210 -// return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>';  
211 -// },  
212 -// inputTooShort : function(e) {  
213 -// return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>';  
214 -// },  
215 -// searching : function() {  
216 -// return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>';  
217 -// }  
218 -// }  
219 -// });  
220 256
221 $("#query").on("click",jsDoQuery); 257 $("#query").on("click",jsDoQuery);
222 - 258 +
  259 + var sfqr = 0;
  260 + var statu = 0;
223 var line = $("#line").val(); 261 var line = $("#line").val();
224 - var statu = $("#statu").val(); 262 +// var statu = $("#statu").val();
225 var startDate = $("#startDate").val(); 263 var startDate = $("#startDate").val();
226 var endDate = $("#endDate").val(); 264 var endDate = $("#endDate").val();
227 var model = $("#model").val(); 265 var model = $("#model").val();
228 -// var times = $("#times1").val() + "-" + $("#times2").val(); 266 + var times1 = $("#times1").val();
  267 + var times2 = $("#times2").val();
229 var company = $("#company").val(); 268 var company = $("#company").val();
230 var subCompany = $("#subCompany").val(); 269 var subCompany = $("#subCompany").val();
231 function jsDoQuery(pagination){ 270 function jsDoQuery(pagination){
  271 + if($("#startDate").val().trim().length == 0 || $("#endDate").val().trim().length == 0){
  272 + layer.msg("请选择日期");
  273 + return;
  274 + }
  275 + if(sfqr == 1 && ($("#times1").val().trim().length == 0 || $("#times2").val().trim().length == 0)){
  276 + layer.msg("请选择时间");
  277 + return;
  278 + }
232 var params = {}; 279 var params = {};
233 -// line = $("#line").val(); 280 + line = $("#line").val();
234 startDate = $("#startDate").val(); 281 startDate = $("#startDate").val();
235 endDate = $("#endDate").val(); 282 endDate = $("#endDate").val();
236 model = $("#model").val(); 283 model = $("#model").val();
237 -// times = $("#times1").val() + "-" + $("#times2").val(); 284 + times1 = $("#times1").val();
  285 + times2 = $("#times2").val();
238 company = $("#company").val(); 286 company = $("#company").val();
239 subCompany = $("#subCompany").val(); 287 subCompany = $("#subCompany").val();
240 params['line'] = line; 288 params['line'] = line;
  289 + params['sfqr'] = sfqr;
241 params['statu'] = statu; 290 params['statu'] = statu;
242 params['startDate'] = startDate; 291 params['startDate'] = startDate;
243 params['endDate'] = endDate; 292 params['endDate'] = endDate;
244 params['model'] = model; 293 params['model'] = model;
245 -// params['times'] = times; 294 + params['times1'] = times1;
  295 + params['times2'] = times2;
246 params['company'] = company; 296 params['company'] = company;
247 params['subCompany'] = subCompany; 297 params['subCompany'] = subCompany;
248 params['type'] = "query"; 298 params['type'] = "query";
@@ -262,11 +312,22 @@ @@ -262,11 +312,22 @@
262 } 312 }
263 313
264 $("#export").on("click", function(){ 314 $("#export").on("click", function(){
  315 + if($("#startDate").val().trim().length == 0 || $("#endDate").val().trim().length == 0){
  316 + layer.msg("请选择日期");
  317 + return;
  318 + }
  319 + if(sfqr == 1 && ($("#times1").val().trim().length == 0 || $("#times2").val().trim().length == 0)){
  320 + layer.msg("请选择时间");
  321 + return;
  322 + }
265 var params = {}; 323 var params = {};
266 params['line'] = line; 324 params['line'] = line;
  325 + params['sfqr'] = sfqr;
267 params['statu'] = statu; 326 params['statu'] = statu;
268 params['startDate'] = startDate; 327 params['startDate'] = startDate;
269 params['endDate'] = endDate; 328 params['endDate'] = endDate;
  329 + params['times1'] = times1;
  330 + params['times2'] = times2;
270 params['model'] = model; 331 params['model'] = model;
271 params['company'] = company; 332 params['company'] = company;
272 params['subCompany'] = subCompany; 333 params['subCompany'] = subCompany;
@@ -278,30 +339,39 @@ @@ -278,30 +339,39 @@
278 }); 339 });
279 }); 340 });
280 341
  342 +// $("#lp1").hide();
  343 +// $("#line1").hide();
281 344
282 - $("#lp1").hide();  
283 - $("#line1").hide();  
284 - $("#statu").on("change", function(){  
285 - statu = $("#statu").val();  
286 - if(statu == 0){  
287 - $("#line1").hide();  
288 - $("#lp1").hide(); 345 + $("#sfqr").on("change", function(){
  346 + if($("#sfqr").val() == 0){
  347 + $("#times1").attr("disabled", true);
  348 + $("#times2").attr("disabled", true);
  349 + sfqr = 0;
289 }else{ 350 }else{
290 - $("#line1").show();  
291 - $("#lp1").show(); 351 + $("#times1").attr("disabled", false);
  352 + $("#times2").attr("disabled", false);
  353 + sfqr = 1;
292 } 354 }
293 - updateModel();  
294 }); 355 });
295 $("#line").on("change", function(){ 356 $("#line").on("change", function(){
296 line = $("#line").val(); 357 line = $("#line").val();
297 -// if(line == " ")  
298 -// line = ""; 358 + if(line.trim().length == 0){
  359 + statu = 0;
  360 + $("#endDate").attr("disabled", true);
  361 + $("#endDate").val($("#startDate").val());
  362 + }else{
  363 + statu = 1;
  364 + $("#endDate").attr("disabled", false);
  365 + }
299 updateModel(); 366 updateModel();
300 }); 367 });
301 $('#startDate').on("blur", function(){ 368 $('#startDate').on("blur", function(){
302 startDate = $("#startDate").val(); 369 startDate = $("#startDate").val();
303 endDate = $("#endDate").val(); 370 endDate = $("#endDate").val();
304 updateModel(); 371 updateModel();
  372 + if($("#endDate").prop("disabled")){
  373 + $("#endDate").val($("#startDate").val());
  374 + }
305 }); 375 });
306 $('#endDate').on("blur", function(){ 376 $('#endDate').on("blur", function(){
307 startDate = $("#startDate").val(); 377 startDate = $("#startDate").val();
src/main/resources/static/pages/forms/statement/commandState.html
@@ -141,33 +141,72 @@ @@ -141,33 +141,72 @@
141 day = "0" + day; 141 day = "0" + day;
142 $("#date").val(year + "-" + month + "-" + day); 142 $("#date").val(year + "-" + month + "-" + day);
143 143
144 - $.get('/basic/lineCode2Name',function(result){  
145 - var data=[]; 144 +// $.get('/basic/lineCode2Name',function(result){
  145 +// var data=[];
146 146
147 - data.push({id: " ", text: "全部线路"});  
148 - for(var code in result){  
149 - data.push({id: code, text: result[code]});  
150 - } 147 +// data.push({id: " ", text: "全部线路"});
  148 +// for(var code in result){
  149 +// data.push({id: code, text: result[code]});
  150 +// }
151 151
152 - console.log(data);  
153 - initPinYinSelect2('#line',data,'');  
154 - }) 152 +// console.log(data);
  153 +// initPinYinSelect2('#line',data,'');
  154 +// })
155 155
  156 +// var obj = [];
  157 +// $.get('/user/companyData', function(result){
  158 +// obj = result;
  159 +// var options = '';
  160 +// for(var i = 0; i < obj.length; i++){
  161 +// options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  162 +// }
  163 +// if(obj.length == 1){
  164 +// $('#company1').hide();
  165 +// if(obj[0].children.length == 1)
  166 +// $('#subCompany1').hide();
  167 +// }
  168 +// $('#company').html(options);
  169 +// updateCompany();
  170 +// });
  171 +// $("#company").on("change",updateCompany);
  172 +// function updateCompany(){
  173 +// var company = $('#company').val();
  174 +// var options = '';
  175 +// for(var i = 0; i < obj.length; i++){
  176 +// if(obj[i].companyCode == company){
  177 +// var children = obj[i].children;
  178 +// for(var j = 0; j < children.length; j++){
  179 +// options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  180 +// }
  181 +// }
  182 +// }
  183 +// $('#subCompany').html(options);
  184 +// }
  185 + var fage=false;
  186 + var xlList;
156 var obj = []; 187 var obj = [];
157 - $.get('/user/companyData', function(result){  
158 - obj = result;  
159 - var options = '';  
160 - for(var i = 0; i < obj.length; i++){  
161 - options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';  
162 - }  
163 - if(obj.length == 1){  
164 - $('#company1').hide();  
165 - if(obj[0].children.length == 1)  
166 - $('#subCompany1').hide();  
167 - }  
168 - $('#company').html(options);  
169 - updateCompany();  
170 - }); 188 +
  189 +
  190 + $.get('/report/lineList',function(result){
  191 + xlList=result;
  192 + $.get('/user/companyData', function(result){
  193 + obj = result;
  194 + var options = '';
  195 + for(var i = 0; i < obj.length; i++){
  196 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  197 + }
  198 +
  199 + if(obj.length ==0){
  200 + $("#company1").css('display','none');
  201 + }else if(obj.length ==1){
  202 + $("#company1").css('display','none');
  203 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  204 + $('#subCompany1').css('display','none');
  205 + }
  206 + $('#company').html(options);
  207 + updateCompany();
  208 + });
  209 + })
171 $("#company").on("change",updateCompany); 210 $("#company").on("change",updateCompany);
172 function updateCompany(){ 211 function updateCompany(){
173 var company = $('#company').val(); 212 var company = $('#company').val();
@@ -181,6 +220,32 @@ @@ -181,6 +220,32 @@
181 } 220 }
182 } 221 }
183 $('#subCompany').html(options); 222 $('#subCompany').html(options);
  223 + initXl();
  224 + }
  225 +
  226 + $("#subCompany").on("change",initXl);
  227 + function initXl(){
  228 + var data=[];
  229 + if(fage){
  230 + $("#line").select2("destroy").html('');
  231 + }
  232 + var fgs=$('#subCompany').val();
  233 + var gs=$('#company').val();
  234 + for(var i=0;i<xlList.length;i++){
  235 + if(gs!=""){
  236 + if(fgs!=""){
  237 + if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
  238 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  239 + }
  240 + }else{
  241 + if(xlList[i]["gsbm"]==gs){
  242 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  243 + }
  244 + }
  245 + }
  246 + }
  247 + initPinYinSelect2('#line',data,'');
  248 + fage=true;
184 } 249 }
185 250
186 $('#code').select2({ 251 $('#code').select2({
src/main/resources/static/pages/forms/statement/correctStatis.html
@@ -34,9 +34,9 @@ @@ -34,9 +34,9 @@
34 <span class="item-label" style="width: 80px;">分公司: </span> 34 <span class="item-label" style="width: 80px;">分公司: </span>
35 <select class="form-control" name="subCompany" id="subCompany" style="width: 140px;"></select> 35 <select class="form-control" name="subCompany" id="subCompany" style="width: 140px;"></select>
36 </div> 36 </div>
37 - <div style="display: inline-block; margin-left: 24px;">  
38 - <span class="item-label" style="width: 80px;">线路: </span>  
39 - <select class="form-control" name="line" id="line" style="width: 140px;"></select> 37 + <div style="display: inline-block; margin-left: 25px;">
  38 + <span class="item-label" style="width: 80px;">选择线路: </span>
  39 + <select class="form-control" name="line" id="line" style="width: 150px;"></select>
40 </div> 40 </div>
41 <div style="margin-top: 10px"></div> 41 <div style="margin-top: 10px"></div>
42 <div style="display: inline-block;margin-left: 5px;"> 42 <div style="display: inline-block;margin-left: 5px;">
@@ -47,8 +47,14 @@ @@ -47,8 +47,14 @@
47 <span class="item-label" style="width: 80px;">结束时间: </span> 47 <span class="item-label" style="width: 80px;">结束时间: </span>
48 <input class="form-control" type="text" id="endDate" style="width: 140px;"/> 48 <input class="form-control" type="text" id="endDate" style="width: 140px;"/>
49 </div> 49 </div>
50 - <div style="display: inline-block;margin-left: 10px;">  
51 - <span class="item-label" style="width: 80px;">时间段: </span> 50 + <div style="display: inline-block; margin-left: 10px;">
  51 + <select class="form-control" name="sfqr" id="sfqr" style="width: 75px;">
  52 + <option value="0">全日</option>
  53 + <option value="1">时段</option>
  54 + </select>
  55 + </div>
  56 + <div style="display: inline-block;margin-left: 12px;">
  57 + <span class="item-label" style="width: 80px;"> </span>
52 <input class="form-control" type="text" id="times1" style="width: 60px;"/> 58 <input class="form-control" type="text" id="times1" style="width: 60px;"/>
53 </div> 59 </div>
54 <div style="display: inline-block;"> 60 <div style="display: inline-block;">
@@ -62,21 +68,21 @@ @@ -62,21 +68,21 @@
62 </form> 68 </form>
63 </div> 69 </div>
64 <div class="portlet-body"> 70 <div class="portlet-body">
65 - <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px">  
66 - <table class="table table-bordered table-hover table-checkable" id="forms">  
67 - </table>  
68 - <div style="text-align: right;">  
69 - <ul id="pagination" class="pagination"></ul>  
70 - </div>  
71 - </div> 71 +<!-- <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> -->
  72 +<!-- <table class="table table-bordered table-hover table-checkable" id="forms"> -->
  73 +<!-- </table> -->
  74 +<!-- <div style="text-align: right;"> -->
  75 +<!-- <ul id="pagination" class="pagination"></ul> -->
  76 +<!-- </div> -->
  77 +<!-- </div> -->
72 78
73 - <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px">  
74 - <table class="table table-bordered table-hover table-checkable" id="subinfo">  
75 - </table>  
76 - <div style="text-align: right;">  
77 - <ul id="pagination" class="pagination"></ul>  
78 - </div>  
79 - </div> 79 +<!-- <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> -->
  80 +<!-- <table class="table table-bordered table-hover table-checkable" id="subinfo"> -->
  81 +<!-- </table> -->
  82 +<!-- <div style="text-align: right;"> -->
  83 +<!-- <ul id="pagination" class="pagination"></ul> -->
  84 +<!-- </div> -->
  85 +<!-- </div> -->
80 86
81 <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> 87 <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px">
82 <table class="table table-bordered table-hover table-checkable" id="lineinfo"> 88 <table class="table table-bordered table-hover table-checkable" id="lineinfo">
@@ -133,38 +139,78 @@ @@ -133,38 +139,78 @@
133 $("#startDate").val(year + "-" + month + "-" + day); 139 $("#startDate").val(year + "-" + month + "-" + day);
134 $("#endDate").val(year + "-" + month + "-" + day); 140 $("#endDate").val(year + "-" + month + "-" + day);
135 141
136 - $("#times1").val("06:00");  
137 - $("#times2").val("07:00"); 142 + $("#times1").val("05:00");
  143 + $("#times2").val("23:00");
  144 + $("#times1").attr("disabled", true);
  145 + $("#times2").attr("disabled", true);
138 146
139 - $.get('/basic/lineCode2Name', function(result){  
140 - var data=[]; 147 +// $.get('/basic/lineCode2Name', function(result){
  148 +// var data=[];
141 149
142 - data.push({id: " ", text: "全部线路"});  
143 - for(var code in result){  
144 - data.push({id: code, text: result[code]});  
145 - }  
146 - console.log(data);  
147 - initPinYinSelect2('#line',data,''); 150 +// data.push({id: " ", text: "全部线路"});
  151 +// for(var code in result){
  152 +// data.push({id: code, text: result[code]});
  153 +// }
  154 +// console.log(data);
  155 +// initPinYinSelect2('#line',data,'');
148 156
149 - line = "";  
150 -// updateModel();  
151 - }); 157 +// line = "";
  158 +// // updateModel();
  159 +// });
152 160
  161 +// var obj = [];
  162 +// $.get('/user/companyData', function(result){
  163 +// obj = result;
  164 +// var options = '';
  165 +// for(var i = 0; i < obj.length; i++){
  166 +// options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  167 +// }
  168 +// if(obj.length == 1){
  169 +// $('#company1').hide();
  170 +// if(obj[0].children.length == 1)
  171 +// $('#subCompany1').hide();
  172 +// }
  173 +// $('#company').html(options);
  174 +// updateCompany();
  175 +// });
  176 +// $("#company").on("change",updateCompany);
  177 +// function updateCompany(){
  178 +// var company = $('#company').val();
  179 +// var options = '';
  180 +// for(var i = 0; i < obj.length; i++){
  181 +// if(obj[i].companyCode == company){
  182 +// var children = obj[i].children;
  183 +// for(var j = 0; j < children.length; j++){
  184 +// options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  185 +// }
  186 +// }
  187 +// }
  188 +// $('#subCompany').html(options);
  189 +// }
  190 + var fage=false;
  191 + var xlList;
153 var obj = []; 192 var obj = [];
154 - $.get('/user/companyData', function(result){  
155 - obj = result;  
156 - var options = '';  
157 - for(var i = 0; i < obj.length; i++){  
158 - options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';  
159 - }  
160 - if(obj.length == 1){  
161 - $('#company1').hide();  
162 - if(obj[0].children.length == 1)  
163 - $('#subCompany1').hide();  
164 - }  
165 - $('#company').html(options);  
166 - updateCompany();  
167 - }); 193 +
  194 + $.get('/report/lineList',function(result){
  195 + xlList=result;
  196 + $.get('/user/companyData', function(result){
  197 + obj = result;
  198 + var options = '';
  199 + for(var i = 0; i < obj.length; i++){
  200 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  201 + }
  202 +
  203 + if(obj.length ==0){
  204 + $("#company1").css('display','none');
  205 + }else if(obj.length ==1){
  206 + $("#company1").css('display','none');
  207 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  208 + $('#subCompany1').css('display','none');
  209 + }
  210 + $('#company').html(options);
  211 + updateCompany();
  212 + });
  213 + })
168 $("#company").on("change",updateCompany); 214 $("#company").on("change",updateCompany);
169 function updateCompany(){ 215 function updateCompany(){
170 var company = $('#company').val(); 216 var company = $('#company').val();
@@ -178,11 +224,41 @@ @@ -178,11 +224,41 @@
178 } 224 }
179 } 225 }
180 $('#subCompany').html(options); 226 $('#subCompany').html(options);
  227 + initXl();
  228 + }
  229 +
  230 + $("#subCompany").on("change",initXl);
  231 + function initXl(){
  232 + var data=[];
  233 + data.push({id:" ", text:"全部线路"});
  234 + if(fage){
  235 + $("#line").select2("destroy").html('');
  236 + }
  237 + var fgs=$('#subCompany').val();
  238 + var gs=$('#company').val();
  239 + for(var i=0;i<xlList.length;i++){
  240 + if(gs!=""){
  241 + if(fgs!=""){
  242 + if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
  243 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  244 + }
  245 + }else{
  246 + if(xlList[i]["gsbm"]==gs){
  247 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  248 + }
  249 + }
  250 + }
  251 + }
  252 + initPinYinSelect2('#line',data,'');
  253 + fage=true;
  254 +
  255 + line = "";
181 } 256 }
182 257
183 258
184 $("#query").on("click",jsDoQuery); 259 $("#query").on("click",jsDoQuery);
185 260
  261 + var sfqr = 0;
186 var company = $("#company").val(); 262 var company = $("#company").val();
187 var subCompany = $("#subCompany").val(); 263 var subCompany = $("#subCompany").val();
188 var lines; 264 var lines;
@@ -191,6 +267,14 @@ @@ -191,6 +267,14 @@
191 var endDate = $("#endDate").val(); 267 var endDate = $("#endDate").val();
192 var times = $("#times1").val() + "-" + $("#times2").val(); 268 var times = $("#times1").val() + "-" + $("#times2").val();
193 function jsDoQuery(pagination){ 269 function jsDoQuery(pagination){
  270 + if($("#startDate").val().trim().length == 0 || $("#endDate").val().trim().length == 0){
  271 + layer.msg("请选择日期");
  272 + return;
  273 + }
  274 + if(sfqr == 1 && ($("#times1").val().trim().length == 0 || $("#times2").val().trim().length == 0)){
  275 + layer.msg("请选择时间");
  276 + return;
  277 + }
194 var params = {}; 278 var params = {};
195 // line = $("#line").val(); 279 // line = $("#line").val();
196 startDate = $("#startDate").val(); 280 startDate = $("#startDate").val();
@@ -198,6 +282,7 @@ @@ -198,6 +282,7 @@
198 times = $("#times1").val() + "-" + $("#times2").val(); 282 times = $("#times1").val() + "-" + $("#times2").val();
199 company = $("#company").val(); 283 company = $("#company").val();
200 subCompany = $("#subCompany").val(); 284 subCompany = $("#subCompany").val();
  285 + params['sfqr'] = sfqr;
201 params['line'] = line; 286 params['line'] = line;
202 params['startDate'] = startDate; 287 params['startDate'] = startDate;
203 params['endDate'] = endDate; 288 params['endDate'] = endDate;
@@ -208,14 +293,23 @@ @@ -208,14 +293,23 @@
208 // $(".hidden").removeClass("hidden"); 293 // $(".hidden").removeClass("hidden");
209 $get('/busInterval/correctStatis', params, function(result){ 294 $get('/busInterval/correctStatis', params, function(result){
210 // 把数据填充到模版中 295 // 把数据填充到模版中
211 - var tbodyHtml = template('list_company',{list:result, type:1}); 296 +// var tbodyHtml = template('list_company',{list:result, type:1});
  297 + var tbodyHtml = "";
  298 + if(result.length != 0){
  299 + tbodyHtml = template('list_company',{list:result[0].workList[0].workList, type:3});
  300 + }else{
  301 + tbodyHtml = template('list_company',{list:result, type:3});
  302 + }
  303 +
212 // 把渲染好的模版html文本追加到表格中 304 // 把渲染好的模版html文本追加到表格中
213 - $('#forms').html(tbodyHtml); 305 +// $('#forms').html(tbodyHtml);
  306 + $('#forms').html("");
214 $('#subinfo').html(""); 307 $('#subinfo').html("");
215 - $('#lineinfo').html(""); 308 + $('#lineinfo').html(tbodyHtml);
216 $("#lines").html(""); 309 $("#lines").html("");
217 310
218 - company = result; 311 +// company = result;
  312 + lines = result[0].workList[0].workList;
219 }); 313 });
220 } 314 }
221 315
@@ -274,13 +368,24 @@ @@ -274,13 +368,24 @@
274 }); 368 });
275 }); 369 });
276 370
277 - $("#export").on("click", function(){  
278 - $get('/pcpc/workDaily',{line:line,date:date,type:'export'},function(result){  
279 - window.open("/downloadFile/download?fileName=营运服务日报表"+moment(date).format("YYYYMMDD"));  
280 - });  
281 - }); 371 +// $("#export").on("click", function(){
  372 +// $get('/pcpc/workDaily',{line:line,date:date,type:'export'},function(result){
  373 +// window.open("/downloadFile/download?fileName=营运服务日报表"+moment(date).format("YYYYMMDD"));
  374 +// });
  375 +// });
282 376
283 377
  378 + $("#sfqr").on("change", function(){
  379 + if($("#sfqr").val() == 0){
  380 + $("#times1").attr("disabled", true);
  381 + $("#times2").attr("disabled", true);
  382 + sfqr = 0;
  383 + }else{
  384 + $("#times1").attr("disabled", false);
  385 + $("#times2").attr("disabled", false);
  386 + sfqr = 1;
  387 + }
  388 + });
284 $("#line").on("change", function(){ 389 $("#line").on("change", function(){
285 line = $("#line").val(); 390 line = $("#line").val();
286 if(line == " ") 391 if(line == " ")
src/main/resources/static/pages/forms/statement/firstAndLastBus.html
@@ -118,32 +118,71 @@ @@ -118,32 +118,71 @@
118 day = "0" + day; 118 day = "0" + day;
119 $("#date").val(year + "-" + month + "-" + day); 119 $("#date").val(year + "-" + month + "-" + day);
120 120
121 - $.get('/basic/lineCode2Name',function(result){  
122 - var data=[]; 121 +// $.get('/basic/lineCode2Name',function(result){
  122 +// var data=[];
123 123
124 - data.push({id: " ", text: "全部线路"});  
125 - for(var code in result){  
126 - data.push({id: code, text: result[code]});  
127 - }  
128 - console.log(data);  
129 - initPinYinSelect2('#line',data,'');  
130 - }); 124 +// data.push({id: " ", text: "全部线路"});
  125 +// for(var code in result){
  126 +// data.push({id: code, text: result[code]});
  127 +// }
  128 +// console.log(data);
  129 +// initPinYinSelect2('#line',data,'');
  130 +// });
131 131
  132 +// var obj = [];
  133 +// $.get('/user/companyData', function(result){
  134 +// obj = result;
  135 +// var options = '';
  136 +// for(var i = 0; i < obj.length; i++){
  137 +// options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  138 +// }
  139 +// if(obj.length == 1){
  140 +// $('#company1').hide();
  141 +// if(obj[0].children.length == 1)
  142 +// $('#subCompany1').hide();
  143 +// }
  144 +// $('#company').html(options);
  145 +// updateCompany();
  146 +// });
  147 +// $("#company").on("change",updateCompany);
  148 +// function updateCompany(){
  149 +// var company = $('#company').val();
  150 +// var options = '';
  151 +// for(var i = 0; i < obj.length; i++){
  152 +// if(obj[i].companyCode == company){
  153 +// var children = obj[i].children;
  154 +// for(var j = 0; j < children.length; j++){
  155 +// options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  156 +// }
  157 +// }
  158 +// }
  159 +// $('#subCompany').html(options);
  160 +// }
  161 + var fage=false;
  162 + var xlList;
132 var obj = []; 163 var obj = [];
133 - $.get('/user/companyData', function(result){  
134 - obj = result;  
135 - var options = '';  
136 - for(var i = 0; i < obj.length; i++){  
137 - options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';  
138 - }  
139 - if(obj.length == 1){  
140 - $('#company1').hide();  
141 - if(obj[0].children.length == 1)  
142 - $('#subCompany1').hide();  
143 - }  
144 - $('#company').html(options);  
145 - updateCompany();  
146 - }); 164 +
  165 +
  166 + $.get('/report/lineList',function(result){
  167 + xlList=result;
  168 + $.get('/user/companyData', function(result){
  169 + obj = result;
  170 + var options = '';
  171 + for(var i = 0; i < obj.length; i++){
  172 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  173 + }
  174 +
  175 + if(obj.length ==0){
  176 + $("#company1").css('display','none');
  177 + }else if(obj.length ==1){
  178 + $("#company1").css('display','none');
  179 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  180 + $('#subCompany1').css('display','none');
  181 + }
  182 + $('#company').html(options);
  183 + updateCompany();
  184 + });
  185 + })
147 $("#company").on("change",updateCompany); 186 $("#company").on("change",updateCompany);
148 function updateCompany(){ 187 function updateCompany(){
149 var company = $('#company').val(); 188 var company = $('#company').val();
@@ -157,6 +196,33 @@ @@ -157,6 +196,33 @@
157 } 196 }
158 } 197 }
159 $('#subCompany').html(options); 198 $('#subCompany').html(options);
  199 + initXl();
  200 + }
  201 +
  202 + $("#subCompany").on("change",initXl);
  203 + function initXl(){
  204 + var data=[];
  205 + if(fage){
  206 + $("#line").select2("destroy").html('');
  207 + }
  208 + var fgs=$('#subCompany').val();
  209 + var gs=$('#company').val();
  210 + data.push({id: " ", text: "全部线路"});
  211 + for(var i=0;i<xlList.length;i++){
  212 + if(gs!=""){
  213 + if(fgs!=""){
  214 + if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
  215 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  216 + }
  217 + }else{
  218 + if(xlList[i]["gsbm"]==gs){
  219 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  220 + }
  221 + }
  222 + }
  223 + }
  224 + initPinYinSelect2('#line',data,'');
  225 + fage=true;
160 } 226 }
161 227
162 228
src/main/resources/static/pages/forms/statement/lbStatuAnaly.html
@@ -53,9 +53,9 @@ @@ -53,9 +53,9 @@
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: 24px;">  
57 - <span class="item-label" style="width: 80px;">线路: </span>  
58 - <select class="form-control" name="line" id="line" style="width: 140px;"></select> 56 + <div style="display: inline-block; margin-left: 25px;">
  57 + <span class="item-label" style="width: 80px;">选择线路: </span>
  58 + <select class="form-control" name="line" id="line" style="width: 150px;"></select>
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>
@@ -72,8 +72,14 @@ @@ -72,8 +72,14 @@
72 <span class="item-label" style="width: 80px;">结束时间: </span> 72 <span class="item-label" style="width: 80px;">结束时间: </span>
73 <input class="form-control" type="text" id="endDate" style="width: 140px;"/> 73 <input class="form-control" type="text" id="endDate" style="width: 140px;"/>
74 </div> 74 </div>
75 - <div style="display: inline-block;margin-left: 10px;">  
76 - <span class="item-label" style="width: 80px;">时间段: </span> 75 + <div style="display: inline-block; margin-left: 10px;">
  76 + <select class="form-control" name="sfqr" id="sfqr" style="width: 75px;">
  77 + <option value="0">全日</option>
  78 + <option value="1">时段</option>
  79 + </select>
  80 + </div>
  81 + <div style="display: inline-block;margin-left: 12px;">
  82 + <span class="item-label" style="width: 80px;"> </span>
77 <input class="form-control" type="text" id="times1" style="width: 60px;"/> 83 <input class="form-control" type="text" id="times1" style="width: 60px;"/>
78 </div> 84 </div>
79 <div style="display: inline-block;"> 85 <div style="display: inline-block;">
@@ -141,39 +147,79 @@ @@ -141,39 +147,79 @@
141 $("#startDate").val(year + "-" + month + "-" + day); 147 $("#startDate").val(year + "-" + month + "-" + day);
142 $("#endDate").val(year + "-" + month + "-" + day); 148 $("#endDate").val(year + "-" + month + "-" + day);
143 149
144 - $("#times1").val("06:00");  
145 - $("#times2").val("07:00"); 150 + $("#times1").val("05:00");
  151 + $("#times2").val("23:00");
  152 + $("#times1").attr("disabled", true);
  153 + $("#times2").attr("disabled", true);
146 154
147 - $.get('/basic/lineCode2Name', function(result){  
148 - var data=[]; 155 +// $.get('/basic/lineCode2Name', function(result){
  156 +// var data=[];
149 157
150 - data.push({id: " ", text: "全部线路"});  
151 - for(var code in result){  
152 - data.push({id: code, text: result[code]});  
153 - }  
154 - console.log(data);  
155 - initPinYinSelect2('#line',data,''); 158 +// data.push({id: " ", text: "全部线路"});
  159 +// for(var code in result){
  160 +// data.push({id: code, text: result[code]});
  161 +// }
  162 +// console.log(data);
  163 +// initPinYinSelect2('#line',data,'');
156 164
157 - line = "";  
158 - updateModel();  
159 - }) 165 +// line = "";
  166 +// updateModel();
  167 +// })
160 168
161 - var obj = [];  
162 - $.get('/user/companyData', function(result){  
163 - obj = result;  
164 - var options = '';  
165 - for(var i = 0; i < obj.length; i++){  
166 - options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';  
167 - }  
168 - if(obj.length == 1){  
169 - $('#company1').hide();  
170 - if(obj[0].children.length == 1)  
171 - $('#subCompany1').hide();  
172 - }  
173 - $('#company').html(options);  
174 - updateCompany();  
175 - }); 169 +// var obj = [];
  170 +// $.get('/user/companyData', function(result){
  171 +// obj = result;
  172 +// var options = '';
  173 +// for(var i = 0; i < obj.length; i++){
  174 +// options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  175 +// }
  176 +// if(obj.length == 1){
  177 +// $('#company1').hide();
  178 +// if(obj[0].children.length == 1)
  179 +// $('#subCompany1').hide();
  180 +// }
  181 +// $('#company').html(options);
  182 +// updateCompany();
  183 +// });
176 184
  185 +// $("#company").on("change",updateCompany);
  186 +// function updateCompany(){
  187 +// var company = $('#company').val();
  188 +// var options = '';
  189 +// for(var i = 0; i < obj.length; i++){
  190 +// if(obj[i].companyCode == company){
  191 +// var children = obj[i].children;
  192 +// for(var j = 0; j < children.length; j++){
  193 +// options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  194 +// }
  195 +// }
  196 +// }
  197 +// $('#subCompany').html(options);
  198 +// }
  199 + var fage=false;
  200 + var xlList;
  201 + var obj = [];
  202 +
  203 + $.get('/report/lineList',function(result){
  204 + xlList=result;
  205 + $.get('/user/companyData', function(result){
  206 + obj = result;
  207 + var options = '';
  208 + for(var i = 0; i < obj.length; i++){
  209 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  210 + }
  211 +
  212 + if(obj.length ==0){
  213 + $("#company1").css('display','none');
  214 + }else if(obj.length ==1){
  215 + $("#company1").css('display','none');
  216 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  217 + $('#subCompany1').css('display','none');
  218 + }
  219 + $('#company').html(options);
  220 + updateCompany();
  221 + });
  222 + })
177 $("#company").on("change",updateCompany); 223 $("#company").on("change",updateCompany);
178 function updateCompany(){ 224 function updateCompany(){
179 var company = $('#company').val(); 225 var company = $('#company').val();
@@ -187,6 +233,33 @@ @@ -187,6 +233,33 @@
187 } 233 }
188 } 234 }
189 $('#subCompany').html(options); 235 $('#subCompany').html(options);
  236 + initXl();
  237 + }
  238 +
  239 + $("#subCompany").on("change",initXl);
  240 + function initXl(){
  241 + var data=[];
  242 + if(fage){
  243 + $("#line").select2("destroy").html('');
  244 + }
  245 + var fgs=$('#subCompany').val();
  246 + var gs=$('#company').val();
  247 + for(var i=0;i<xlList.length;i++){
  248 + if(gs!=""){
  249 + if(fgs!=""){
  250 + if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
  251 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  252 + }
  253 + }else{
  254 + if(xlList[i]["gsbm"]==gs){
  255 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  256 + }
  257 + }
  258 + }
  259 + }
  260 + initPinYinSelect2('#line',data,'');
  261 + updateModel();
  262 + fage=true;
190 } 263 }
191 264
192 var lb = 0; //标志是否有选择至少一个烂班类型 265 var lb = 0; //标志是否有选择至少一个烂班类型
@@ -217,6 +290,7 @@ @@ -217,6 +290,7 @@
217 290
218 $("#query").on("click",jsDoQuery); 291 $("#query").on("click",jsDoQuery);
219 292
  293 + var sfqr = 0;
220 var line = $("#line").val(); 294 var line = $("#line").val();
221 var startDate = $("#startDate").val(); 295 var startDate = $("#startDate").val();
222 var endDate = $("#endDate").val(); 296 var endDate = $("#endDate").val();
@@ -225,6 +299,14 @@ @@ -225,6 +299,14 @@
225 var company = $("#company").val(); 299 var company = $("#company").val();
226 var subCompany = $("#subCompany").val(); 300 var subCompany = $("#subCompany").val();
227 function jsDoQuery(pagination){ 301 function jsDoQuery(pagination){
  302 + if($("#startDate").val().trim().length == 0 || $("#endDate").val().trim().length == 0){
  303 + layer.msg("请选择日期");
  304 + return;
  305 + }
  306 + if(sfqr == 1 && ($("#times1").val().trim().length == 0 || $("#times2").val().trim().length == 0)){
  307 + layer.msg("请选择时间");
  308 + return;
  309 + }
228 var reason = $("input[name='reason']"); 310 var reason = $("input[name='reason']");
229 var params = {}; 311 var params = {};
230 // line = $("#line").val(); 312 // line = $("#line").val();
@@ -234,6 +316,7 @@ @@ -234,6 +316,7 @@
234 times = $("#times1").val() + "-" + $("#times2").val(); 316 times = $("#times1").val() + "-" + $("#times2").val();
235 company = $("#company").val(); 317 company = $("#company").val();
236 subCompany = $("#subCompany").val(); 318 subCompany = $("#subCompany").val();
  319 + params['sfqr'] = sfqr;
237 params['line'] = line; 320 params['line'] = line;
238 params['startDate'] = startDate; 321 params['startDate'] = startDate;
239 params['endDate'] = endDate; 322 params['endDate'] = endDate;
@@ -263,7 +346,16 @@ @@ -263,7 +346,16 @@
263 } 346 }
264 347
265 $("#export").on("click", function(){ 348 $("#export").on("click", function(){
  349 + if($("#startDate").val().trim().length == 0 || $("#endDate").val().trim().length == 0){
  350 + layer.msg("请选择日期");
  351 + return;
  352 + }
  353 + if(sfqr == 1 && ($("#times1").val().trim().length == 0 || $("#times2").val().trim().length == 0)){
  354 + layer.msg("请选择时间");
  355 + return;
  356 + }
266 var params = {}; 357 var params = {};
  358 + params['sfqr'] = sfqr;
267 params['line'] = line; 359 params['line'] = line;
268 params['startDate'] = startDate; 360 params['startDate'] = startDate;
269 params['endDate'] = endDate; 361 params['endDate'] = endDate;
@@ -280,6 +372,17 @@ @@ -280,6 +372,17 @@
280 }); 372 });
281 373
282 374
  375 + $("#sfqr").on("change", function(){
  376 + if($("#sfqr").val() == 0){
  377 + $("#times1").attr("disabled", true);
  378 + $("#times2").attr("disabled", true);
  379 + sfqr = 0;
  380 + }else{
  381 + $("#times1").attr("disabled", false);
  382 + $("#times2").attr("disabled", false);
  383 + sfqr = 1;
  384 + }
  385 + });
283 $("#line").on("change", function(){ 386 $("#line").on("change", function(){
284 line = $("#line").val(); 387 line = $("#line").val();
285 if(line == " ") 388 if(line == " ")
src/main/resources/static/pages/forms/statement/lineTimeAnaly.html
@@ -197,24 +197,87 @@ @@ -197,24 +197,87 @@
197 $("#startDate").val(year + "-" + month + "-" + day); 197 $("#startDate").val(year + "-" + month + "-" + day);
198 $("#endDate").val(year + "-" + month + "-" + day); 198 $("#endDate").val(year + "-" + month + "-" + day);
199 199
200 - $("#times1").val("06:00");  
201 - $("#times2").val("07:00"); 200 + $("#times1").val("05:00");
  201 + $("#times2").val("23:00");
202 202
  203 +// var obj = [];
  204 +// $.get('/user/companyData', function(result){
  205 +// obj = result;
  206 +// var options = '';
  207 +// for(var i = 0; i < obj.length; i++){
  208 +// options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  209 +// }
  210 +// if(obj.length == 1){
  211 +// $('#company1').hide();
  212 +// if(obj[0].children.length == 1)
  213 +// $('#subCompany1').hide();
  214 +// }
  215 +// $('#company').html(options);
  216 +// updateCompany();
  217 +// });
  218 +// $("#company").on("change",updateCompany);
  219 +// function updateCompany(){
  220 +// var company = $('#company').val();
  221 +// var options = '';
  222 +// for(var i = 0; i < obj.length; i++){
  223 +// if(obj[i].companyCode == company){
  224 +// var children = obj[i].children;
  225 +// for(var j = 0; j < children.length; j++){
  226 +// options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  227 +// }
  228 +// }
  229 +// }
  230 +// $('#subCompany').html(options);
  231 +// }
  232 +
  233 +// $.get('/basic/lineCode2Name',function(result){
  234 +// var data=[];
  235 +
  236 +// data.push({id: " ", text:"全部路线"});
  237 +// for(var code in result){
  238 +// data.push({id: code, text: result[code]});
  239 +// }
  240 +// console.log(data);
  241 +// initPinYinSelect2('#line',data,'');
  242 +
  243 +// line = "";
  244 +// updateModel();
  245 +
  246 +// var params = {};
  247 +// params['line'] = line;
  248 +// $get('/busInterval/getDir', params, function(result){
  249 +// dirData = createTreeData(result);
  250 +// var options = '<option value="">全部方向</option>';
  251 +// $.each(dirData, function(i, g){
  252 +// options += '<option value="'+g.name+'">'+g.name+'</option>';
  253 +// });
  254 +// $('#upDown').html(options);
  255 +// });
  256 +// });
  257 + var fage=false;
  258 + var xlList;
203 var obj = []; 259 var obj = [];
204 - $.get('/user/companyData', function(result){  
205 - obj = result;  
206 - var options = '';  
207 - for(var i = 0; i < obj.length; i++){  
208 - options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';  
209 - }  
210 - if(obj.length == 1){  
211 - $('#company1').hide();  
212 - if(obj[0].children.length == 1)  
213 - $('#subCompany1').hide();  
214 - }  
215 - $('#company').html(options);  
216 - updateCompany();  
217 - }); 260 +
  261 + $.get('/report/lineList',function(result){
  262 + xlList=result;
  263 + $.get('/user/companyData', function(result){
  264 + obj = result;
  265 + var options = '';
  266 + for(var i = 0; i < obj.length; i++){
  267 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  268 + }
  269 +
  270 + if(obj.length ==0){
  271 + $("#company1").css('display','none');
  272 + }else if(obj.length ==1){
  273 + $("#company1").css('display','none');
  274 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  275 + $('#subCompany1').css('display','none');
  276 + }
  277 + $('#company').html(options);
  278 + updateCompany();
  279 + });
  280 + })
218 $("#company").on("change",updateCompany); 281 $("#company").on("change",updateCompany);
219 function updateCompany(){ 282 function updateCompany(){
220 var company = $('#company').val(); 283 var company = $('#company').val();
@@ -228,22 +291,37 @@ @@ -228,22 +291,37 @@
228 } 291 }
229 } 292 }
230 $('#subCompany').html(options); 293 $('#subCompany').html(options);
  294 + initXl();
231 } 295 }
232 296
233 - $.get('/basic/lineCode2Name',function(result){ 297 + $("#subCompany").on("change",initXl);
  298 + function initXl(){
234 var data=[]; 299 var data=[];
235 -  
236 - data.push({id: " ", text:"全部路线"});  
237 - for(var code in result){  
238 - data.push({id: code, text: result[code]}); 300 + if(fage){
  301 + $("#line").select2("destroy").html('');
  302 + }
  303 + var fgs=$('#subCompany').val();
  304 + var gs=$('#company').val();
  305 + for(var i=0;i<xlList.length;i++){
  306 + if(gs!=""){
  307 + if(fgs!=""){
  308 + if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
  309 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  310 + }
  311 + }else{
  312 + if(xlList[i]["gsbm"]==gs){
  313 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  314 + }
  315 + }
  316 + }
239 } 317 }
240 - console.log(data);  
241 initPinYinSelect2('#line',data,''); 318 initPinYinSelect2('#line',data,'');
  319 + fage=true;
242 320
243 - line = "";  
244 updateModel(); 321 updateModel();
245 322
246 var params = {}; 323 var params = {};
  324 + line = data[0].id;
247 params['line'] = line; 325 params['line'] = line;
248 $get('/busInterval/getDir', params, function(result){ 326 $get('/busInterval/getDir', params, function(result){
249 dirData = createTreeData(result); 327 dirData = createTreeData(result);
@@ -253,7 +331,8 @@ @@ -253,7 +331,8 @@
253 }); 331 });
254 $('#upDown').html(options); 332 $('#upDown').html(options);
255 }); 333 });
256 - }); 334 + }
  335 +
257 336
258 $("#query").on("click", function (){ 337 $("#query").on("click", function (){
259 jsDoQuery(); 338 jsDoQuery();
@@ -268,8 +347,16 @@ @@ -268,8 +347,16 @@
268 var company = $("#company").val(); 347 var company = $("#company").val();
269 var subCompany = $("#subCompany").val(); 348 var subCompany = $("#subCompany").val();
270 function jsDoQuery(pagination){ 349 function jsDoQuery(pagination){
  350 + if($("#startDate").val().trim().length == 0 || $("#endDate").val().trim().length == 0){
  351 + layer.msg("请选择日期");
  352 + return;
  353 + }
  354 + if($("#times1").val().trim().length == 0 || $("#times2").val().trim().length == 0){
  355 + layer.msg("请选择时间");
  356 + return;
  357 + }
271 var params = {}; 358 var params = {};
272 -// line = $("#line").val(); 359 + line = $("#line").val();
273 startDate = $("#startDate").val(); 360 startDate = $("#startDate").val();
274 endDate = $("#endDate").val(); 361 endDate = $("#endDate").val();
275 model = $("#model").val(); 362 model = $("#model").val();
@@ -347,6 +434,7 @@ @@ -347,6 +434,7 @@
347 $('#upDown').html(options); 434 $('#upDown').html(options);
348 }); 435 });
349 }); 436 });
  437 +
350 $('#startDate').on("blur", function(){ 438 $('#startDate').on("blur", function(){
351 startDate = $("#startDate").val(); 439 startDate = $("#startDate").val();
352 endDate = $("#endDate").val(); 440 endDate = $("#endDate").val();
src/main/resources/static/pages/forms/statement/peopleCarPlan.html
@@ -142,16 +142,6 @@ @@ -142,16 +142,6 @@
142 initXl(); 142 initXl();
143 } 143 }
144 144
145 - /* $.get('/basic/lineCode2Name',function(result){  
146 - var data=[];  
147 -  
148 - for(var code in result){  
149 - data.push({id: code, text: result[code]});  
150 - }  
151 - initPinYinSelect2('#line',data,'');  
152 -  
153 - }) */  
154 -  
155 $("#subCompany").on("change",initXl); 145 $("#subCompany").on("change",initXl);
156 function initXl(){ 146 function initXl(){
157 var data=[]; 147 var data=[];
@@ -185,6 +175,10 @@ @@ -185,6 +175,10 @@
185 var company = $("#company").val(); 175 var company = $("#company").val();
186 var subCompany = $("#subCompany").val(); 176 var subCompany = $("#subCompany").val();
187 function jsDoQuery(pagination){ 177 function jsDoQuery(pagination){
  178 + if($("#date").val() == null || $("#date").val().trim().length == 0){
  179 + layer.msg("请选择时间");
  180 + return;
  181 + }
188 var params = {}; 182 var params = {};
189 company = $("#company").val(); 183 company = $("#company").val();
190 subCompany = $("#subCompany").val(); 184 subCompany = $("#subCompany").val();
src/main/resources/static/pages/forms/statement/scheduleAnaly.html
@@ -125,34 +125,73 @@ @@ -125,34 +125,73 @@
125 $("#startDate").val(year + "-" + month + "-" + day); 125 $("#startDate").val(year + "-" + month + "-" + day);
126 $("#endDate").val(year + "-" + month + "-" + day); 126 $("#endDate").val(year + "-" + month + "-" + day);
127 127
128 - $.get('/basic/lineCode2Name',function(result){  
129 - var data=[]; 128 +// $.get('/basic/lineCode2Name',function(result){
  129 +// var data=[];
130 130
131 - data.push({id:" ", text: "全部线路"});  
132 - for(var code in result){  
133 - data.push({id: code, text: result[code]});  
134 - }  
135 - initPinYinSelect2('#line',data,''); 131 +// data.push({id:" ", text: "全部线路"});
  132 +// for(var code in result){
  133 +// data.push({id: code, text: result[code]});
  134 +// }
  135 +// initPinYinSelect2('#line',data,'');
136 136
137 - line = "";  
138 - updateModel();  
139 - }); 137 +// line = "";
  138 +// updateModel();
  139 +// });
140 140
  141 +// var obj = [];
  142 +// $.get('/user/companyData', function(result){
  143 +// obj = result;
  144 +// var options = '';
  145 +// for(var i = 0; i < obj.length; i++){
  146 +// options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  147 +// }
  148 +// if(obj.length == 1){
  149 +// $('#company1').hide();
  150 +// if(obj[0].children.length == 1)
  151 +// $('#subCompany1').hide();
  152 +// }
  153 +// $('#company').html(options);
  154 +// updateCompany();
  155 +// });
  156 +// $("#company").on("change",updateCompany);
  157 +// function updateCompany(){
  158 +// var company = $('#company').val();
  159 +// var options = '';
  160 +// for(var i = 0; i < obj.length; i++){
  161 +// if(obj[i].companyCode == company){
  162 +// var children = obj[i].children;
  163 +// for(var j = 0; j < children.length; j++){
  164 +// options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  165 +// }
  166 +// }
  167 +// }
  168 +// $('#subCompany').html(options);
  169 +// }
  170 + var fage=false;
  171 + var xlList;
141 var obj = []; 172 var obj = [];
142 - $.get('/user/companyData', function(result){  
143 - obj = result;  
144 - var options = '';  
145 - for(var i = 0; i < obj.length; i++){  
146 - options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';  
147 - }  
148 - if(obj.length == 1){  
149 - $('#company1').hide();  
150 - if(obj[0].children.length == 1)  
151 - $('#subCompany1').hide();  
152 - }  
153 - $('#company').html(options);  
154 - updateCompany();  
155 - }); 173 +
  174 +
  175 + $.get('/report/lineList',function(result){
  176 + xlList=result;
  177 + $.get('/user/companyData', function(result){
  178 + obj = result;
  179 + var options = '';
  180 + for(var i = 0; i < obj.length; i++){
  181 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  182 + }
  183 +
  184 + if(obj.length ==0){
  185 + $("#company1").css('display','none');
  186 + }else if(obj.length ==1){
  187 + $("#company1").css('display','none');
  188 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  189 + $('#subCompany1').css('display','none');
  190 + }
  191 + $('#company').html(options);
  192 + updateCompany();
  193 + });
  194 + })
156 $("#company").on("change",updateCompany); 195 $("#company").on("change",updateCompany);
157 function updateCompany(){ 196 function updateCompany(){
158 var company = $('#company').val(); 197 var company = $('#company').val();
@@ -166,6 +205,33 @@ @@ -166,6 +205,33 @@
166 } 205 }
167 } 206 }
168 $('#subCompany').html(options); 207 $('#subCompany').html(options);
  208 + initXl();
  209 + }
  210 +
  211 + $("#subCompany").on("change",initXl);
  212 + function initXl(){
  213 + var data=[];
  214 + if(fage){
  215 + $("#line").select2("destroy").html('');
  216 + }
  217 + var fgs=$('#subCompany').val();
  218 + var gs=$('#company').val();
  219 + for(var i=0;i<xlList.length;i++){
  220 + if(gs!=""){
  221 + if(fgs!=""){
  222 + if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
  223 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  224 + }
  225 + }else{
  226 + if(xlList[i]["gsbm"]==gs){
  227 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  228 + }
  229 + }
  230 + }
  231 + }
  232 + initPinYinSelect2('#line',data,'');
  233 + updateModel();
  234 + fage=true;
169 } 235 }
170 236
171 237
src/main/resources/static/pages/forms/statement/timeAndSpeed.html
@@ -45,22 +45,10 @@ @@ -45,22 +45,10 @@
45 <select class="form-control" name="subCompany" id="subCompany" style="width: 140px;"></select> 45 <select class="form-control" name="subCompany" id="subCompany" style="width: 140px;"></select>
46 </div> 46 </div>
47 <div style="display: inline-block; margin-left: 10px;"> 47 <div style="display: inline-block; margin-left: 10px;">
48 - <span class="item-label" style="width: 80px;">线路: </span>  
49 - <select class="form-control" name="statu" id="statu" style="width: 140px;">  
50 - <option value="0">多线</option>  
51 - <option value="1">单线</option>  
52 - </select>  
53 - </div>  
54 - <div style="display: inline-block; margin-left: 0px;" id="line1">  
55 - <span class="item-label" style="width: 80px;"> - </span>  
56 - <select class="form-control" name="line" id="line" style="width: 140px;"/> 48 + <span class="item-label" style="width: 80px;">选择线路: </span>
  49 + <select class="form-control" name="line" id="line" style="width: 165px;"/>
  50 + <input type="hidden" name="statu" id="statu"/>
57 </div> 51 </div>
58 -<!-- <div style="display: inline-block; margin-left: 8px;"> -->  
59 -<!-- <span class="item-label" style="width: 80px;">方向: </span> -->  
60 -<!-- <select class="form-control" name="upDown" id="upDown" style="width: 140px;"> -->  
61 -<!-- <option value="">请先选择线路</option> -->  
62 -<!-- </select> -->  
63 -<!-- </div> -->  
64 <div style="display: inline-block; margin-left: 10px"> 52 <div style="display: inline-block; margin-left: 10px">
65 <span class="item-label" style="width: 80px;">时刻类型: </span> 53 <span class="item-label" style="width: 80px;">时刻类型: </span>
66 <select class="form-control" name="model" id="model" style="width: 165px;"> 54 <select class="form-control" name="model" id="model" style="width: 165px;">
@@ -76,6 +64,20 @@ @@ -76,6 +64,20 @@
76 <span class="item-label" style="width: 80px;">结束时间: </span> 64 <span class="item-label" style="width: 80px;">结束时间: </span>
77 <input class="form-control" type="text" id="endDate" style="width: 140px;"/> 65 <input class="form-control" type="text" id="endDate" style="width: 140px;"/>
78 </div> 66 </div>
  67 + <div style="display: inline-block; margin-left: 10px;">
  68 + <select class="form-control" name="sfqr" id="sfqr" style="width: 75px;">
  69 + <option value="0">全日</option>
  70 + <option value="1">时段</option>
  71 + </select>
  72 + </div>
  73 + <div style="display: inline-block;margin-left: 12px;">
  74 + <span class="item-label" style="width: 80px;"> </span>
  75 + <input class="form-control" type="text" id="times1" style="width: 60px;"/>
  76 + </div>
  77 + <div style="display: inline-block;">
  78 + <span class="item-label" style="width: 80px;"> - </span>
  79 + <input class="form-control" type="text" id="times2" style="width: 60px;"/>
  80 + </div>
79 <div style="display: inline-block; margin-left: 10px" id="lp1"> 81 <div style="display: inline-block; margin-left: 10px" id="lp1">
80 <span class="item-label" style="width: 80px;">路牌: </span> 82 <span class="item-label" style="width: 80px;">路牌: </span>
81 <select class="form-control" name="lp" id="lp" style="width: 140px;"></select> 83 <select class="form-control" name="lp" id="lp" style="width: 140px;"></select>
@@ -126,8 +128,17 @@ @@ -126,8 +128,17 @@
126 $("#endDate").datetimepicker({ 128 $("#endDate").datetimepicker({
127 format : 'YYYY-MM-DD', 129 format : 'YYYY-MM-DD',
128 locale : 'zh-cn' 130 locale : 'zh-cn'
129 - }); 131 + });
130 132
  133 + $("#times1").datetimepicker({
  134 + format : 'HH:mm',
  135 + locale : 'zh-cn'
  136 + });
  137 + $("#times2").datetimepicker({
  138 + format : 'HH:mm',
  139 + locale : 'zh-cn'
  140 + });
  141 +
131 var d = new Date(); 142 var d = new Date();
132 var year = d.getFullYear(); 143 var year = d.getFullYear();
133 var month = d.getMonth() + 1; 144 var month = d.getMonth() + 1;
@@ -138,22 +149,79 @@ @@ -138,22 +149,79 @@
138 day = "0" + day; 149 day = "0" + day;
139 $("#startDate").val(year + "-" + month + "-" + day); 150 $("#startDate").val(year + "-" + month + "-" + day);
140 $("#endDate").val(year + "-" + month + "-" + day); 151 $("#endDate").val(year + "-" + month + "-" + day);
  152 +
  153 + $("#times1").val("05:00");
  154 + $("#times2").val("23:00");
  155 + $("#times1").attr("disabled", true);
  156 + $("#times2").attr("disabled", true);
  157 +
  158 +// var obj = [];
  159 +// $.get('/user/companyData', function(result){
  160 +// obj = result;
  161 +// var options = '';
  162 +// for(var i = 0; i < obj.length; i++){
  163 +// options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  164 +// }
  165 +// if(obj.length == 1){
  166 +// $('#company1').hide();
  167 +// if(obj[0].children.length == 1)
  168 +// $('#subCompany1').hide();
  169 +// }
  170 +// $('#company').html(options);
  171 +// updateCompany();
  172 +// });
  173 +// $("#company").on("change",updateCompany);
  174 +// function updateCompany(){
  175 +// var company = $('#company').val();
  176 +// var options = '';
  177 +// for(var i = 0; i < obj.length; i++){
  178 +// if(obj[i].companyCode == company){
  179 +// var children = obj[i].children;
  180 +// for(var j = 0; j < children.length; j++){
  181 +// options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  182 +// }
  183 +// }
  184 +// }
  185 +// $('#subCompany').html(options);
  186 +// }
  187 +
  188 +// $.get('/basic/lineCode2Name',function(result){
  189 +// var data=[];
  190 +
  191 +// for(var code in result){
  192 +// data.push({id: code, text: result[code]});
  193 +// }
  194 +// initPinYinSelect2('#line',data,'');
141 195
  196 +// line = data[0].id;
  197 +
  198 +// updateModel();
  199 +// updateLp("");
  200 +// })
  201 + var fage=false;
  202 + var xlList;
142 var obj = []; 203 var obj = [];
143 - $.get('/user/companyData', function(result){  
144 - obj = result;  
145 - var options = '';  
146 - for(var i = 0; i < obj.length; i++){  
147 - options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';  
148 - }  
149 - if(obj.length == 1){  
150 - $('#company1').hide();  
151 - if(obj[0].children.length == 1)  
152 - $('#subCompany1').hide();  
153 - }  
154 - $('#company').html(options);  
155 - updateCompany();  
156 - }); 204 +
  205 + $.get('/report/lineList',function(result){
  206 + xlList=result;
  207 + $.get('/user/companyData', function(result){
  208 + obj = result;
  209 + var options = '';
  210 + for(var i = 0; i < obj.length; i++){
  211 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  212 + }
  213 +
  214 + if(obj.length ==0){
  215 + $("#company1").css('display','none');
  216 + }else if(obj.length ==1){
  217 + $("#company1").css('display','none');
  218 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  219 + $('#subCompany1').css('display','none');
  220 + }
  221 + $('#company').html(options);
  222 + updateCompany();
  223 + });
  224 + })
157 $("#company").on("change",updateCompany); 225 $("#company").on("change",updateCompany);
158 function updateCompany(){ 226 function updateCompany(){
159 var company = $('#company').val(); 227 var company = $('#company').val();
@@ -167,49 +235,88 @@ @@ -167,49 +235,88 @@
167 } 235 }
168 } 236 }
169 $('#subCompany').html(options); 237 $('#subCompany').html(options);
  238 + initXl();
170 } 239 }
171 240
172 - $.get('/basic/lineCode2Name',function(result){ 241 + $("#subCompany").on("change",initXl);
  242 + function initXl(){
173 var data=[]; 243 var data=[];
174 -  
175 - for(var code in result){  
176 - data.push({id: code, text: result[code]}); 244 + data.push({id:" ", text:"全部线路"});
  245 + if(fage){
  246 + $("#line").select2("destroy").html('');
  247 + }
  248 + var fgs=$('#subCompany').val();
  249 + var gs=$('#company').val();
  250 + for(var i=0;i<xlList.length;i++){
  251 + if(gs!=""){
  252 + if(fgs!=""){
  253 + if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
  254 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  255 + }
  256 + }else{
  257 + if(xlList[i]["gsbm"]==gs){
  258 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  259 + }
  260 + }
  261 + }
177 } 262 }
178 initPinYinSelect2('#line',data,''); 263 initPinYinSelect2('#line',data,'');
179 - 264 + fage=true;
  265 +
  266 + $("#endDate").attr("disabled", true);
  267 + $("#endDate").val($("#startDate").val());
180 line = data[0].id; 268 line = data[0].id;
  269 + statu = 0;
181 270
182 updateModel(); 271 updateModel();
183 updateLp(""); 272 updateLp("");
184 - }) 273 + }
  274 +
185 275
186 $("#query").on("click", function (){ 276 $("#query").on("click", function (){
187 jsDoQuery(); 277 jsDoQuery();
188 }); 278 });
189 279
190 var list = []; 280 var list = [];
  281 + var sfqr = 0;
  282 + var statu = 0;
191 var line = $("#line").val(); 283 var line = $("#line").val();
192 - var statu = $("#statu").val(); 284 +// var statu = $("#statu").val();
193 var startDate = $("#startDate").val(); 285 var startDate = $("#startDate").val();
194 var endDate = $("#endDate").val(); 286 var endDate = $("#endDate").val();
  287 + var times1 = $("#times1").val();
  288 + var times2 = $("#times2").val();
195 var model = $("#model").val(); 289 var model = $("#model").val();
196 var company = $("#company").val(); 290 var company = $("#company").val();
197 var subCompany = $("#subCompany").val(); 291 var subCompany = $("#subCompany").val();
198 var lp = $("#lp").val(); 292 var lp = $("#lp").val();
199 function jsDoQuery(pagination){ 293 function jsDoQuery(pagination){
  294 + if($("#startDate").val().trim().length == 0 || $("#endDate").val().trim().length == 0){
  295 + layer.msg("请选择日期");
  296 + return;
  297 + }
  298 + if(sfqr == 1 && ($("#times1").val().trim().length == 0 || $("#times2").val().trim().length == 0)){
  299 + layer.msg("请选择时间");
  300 + return;
  301 + }
200 var params = {}; 302 var params = {};
201 line = $("#line").val(); 303 line = $("#line").val();
202 startDate = $("#startDate").val(); 304 startDate = $("#startDate").val();
203 endDate = $("#endDate").val(); 305 endDate = $("#endDate").val();
  306 + times1 = $("#times1").val();
  307 + times2 = $("#times2").val();
204 model = $("#model").val(); 308 model = $("#model").val();
205 company = $("#company").val(); 309 company = $("#company").val();
206 subCompany = $("#subCompany").val(); 310 subCompany = $("#subCompany").val();
207 lp = $("#lp").val(); 311 lp = $("#lp").val();
208 params['lp'] = lp; 312 params['lp'] = lp;
209 params['line'] = line; 313 params['line'] = line;
  314 + params['sfqr'] = sfqr;
210 params['statu'] = statu; 315 params['statu'] = statu;
211 params['startDate'] = startDate; 316 params['startDate'] = startDate;
212 params['endDate'] = endDate; 317 params['endDate'] = endDate;
  318 + params['times1'] = times1;
  319 + params['times2'] = times2;
213 params['model'] = model; 320 params['model'] = model;
214 params['company'] = company; 321 params['company'] = company;
215 params['subCompany'] = subCompany; 322 params['subCompany'] = subCompany;
@@ -252,12 +359,23 @@ @@ -252,12 +359,23 @@
252 } 359 }
253 360
254 $("#export").on("click", function(){ 361 $("#export").on("click", function(){
  362 + if($("#startDate").val().trim().length == 0 || $("#endDate").val().trim().length == 0){
  363 + layer.msg("请选择日期");
  364 + return;
  365 + }
  366 + if(sfqr == 1 && ($("#times1").val().trim().length == 0 || $("#times2").val().trim().length == 0)){
  367 + layer.msg("请选择时间");
  368 + return;
  369 + }
255 var params = {}; 370 var params = {};
256 params['lp'] = lp; 371 params['lp'] = lp;
257 params['line'] = line; 372 params['line'] = line;
  373 + params['sfqr'] = sfqr;
258 params['statu'] = statu; 374 params['statu'] = statu;
259 params['startDate'] = startDate; 375 params['startDate'] = startDate;
260 params['endDate'] = endDate; 376 params['endDate'] = endDate;
  377 + params['times1'] = times1;
  378 + params['times2'] = times2;
261 params['model'] = model; 379 params['model'] = model;
262 params['company'] = company; 380 params['company'] = company;
263 params['subCompany'] = subCompany; 381 params['subCompany'] = subCompany;
@@ -270,22 +388,29 @@ @@ -270,22 +388,29 @@
270 }); 388 });
271 389
272 390
273 - $("#lp1").hide();  
274 - $("#line1").hide();  
275 - $("#statu").on("change", function(){  
276 - statu = $("#statu").val();  
277 - if(statu == 0){  
278 - $("#line1").hide();  
279 - $("#lp1").hide(); 391 +// $("#lp1").hide();
  392 +
  393 + $("#sfqr").on("change", function(){
  394 + if($("#sfqr").val() == 0){
  395 + $("#times1").attr("disabled", true);
  396 + $("#times2").attr("disabled", true);
  397 + sfqr = 0;
280 }else{ 398 }else{
281 - $("#line1").show();  
282 - $("#lp1").show();  
283 - updateLp(""); 399 + $("#times1").attr("disabled", false);
  400 + $("#times2").attr("disabled", false);
  401 + sfqr = 1;
284 } 402 }
285 - updateModel();  
286 }); 403 });
287 $("#line").on("change", function(){ 404 $("#line").on("change", function(){
288 line = $("#line").val(); 405 line = $("#line").val();
  406 + if(line.trim().length == 0){
  407 + statu = 0;
  408 + $("#endDate").attr("disabled", true);
  409 + $("#endDate").val($("#startDate").val());
  410 + }else{
  411 + statu = 1;
  412 + $("#endDate").attr("disabled", false);
  413 + }
289 updateModel(); 414 updateModel();
290 updateLp(""); 415 updateLp("");
291 }); 416 });
@@ -297,6 +422,9 @@ @@ -297,6 +422,9 @@
297 startDate = $("#startDate").val(); 422 startDate = $("#startDate").val();
298 endDate = $("#endDate").val(); 423 endDate = $("#endDate").val();
299 updateModel(); 424 updateModel();
  425 + if($("#endDate").prop("disabled")){
  426 + $("#endDate").val($("#startDate").val());
  427 + }
300 }); 428 });
301 $('#endDate').on("blur", function(){ 429 $('#endDate').on("blur", function(){
302 startDate = $("#startDate").val(); 430 startDate = $("#startDate").val();
src/main/resources/static/pages/forms/statement/workDaily.html
@@ -111,31 +111,69 @@ @@ -111,31 +111,69 @@
111 day = "0" + day; 111 day = "0" + day;
112 $("#date").val(year + "-" + month + "-" + day); 112 $("#date").val(year + "-" + month + "-" + day);
113 113
114 - $.get('/basic/lineCode2Name',function(result){  
115 - var data=[]; 114 +// $.get('/basic/lineCode2Name',function(result){
  115 +// var data=[];
116 116
117 - data.push({id: " ", text: "全部线路"});  
118 - for(var code in result){  
119 - data.push({id: code, text: result[code]});  
120 - }  
121 - initPinYinSelect2('#line',data,'');  
122 - })  
123 - 117 +// data.push({id: " ", text: "全部线路"});
  118 +// for(var code in result){
  119 +// data.push({id: code, text: result[code]});
  120 +// }
  121 +// initPinYinSelect2('#line',data,'');
  122 +// })
  123 +// var obj = [];
  124 +// $.get('/user/companyData', function(result){
  125 +// obj = result;
  126 +// var options = '';
  127 +// for(var i = 0; i < obj.length; i++){
  128 +// options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  129 +// }
  130 +// if(obj.length == 1){
  131 +// $('#company1').hide();
  132 +// if(obj[0].children.length == 1)
  133 +// $('#subCompany1').hide();
  134 +// }
  135 +// $('#company').html(options);
  136 +// updateCompany();
  137 +// });
  138 +// $("#company").on("change",updateCompany);
  139 +// function updateCompany(){
  140 +// var company = $('#company').val();
  141 +// var options = '';
  142 +// for(var i = 0; i < obj.length; i++){
  143 +// if(obj[i].companyCode == company){
  144 +// var children = obj[i].children;
  145 +// for(var j = 0; j < children.length; j++){
  146 +// options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  147 +// }
  148 +// }
  149 +// }
  150 +// $('#subCompany').html(options);
  151 +// }
  152 + var fage=false;
  153 + var xlList;
124 var obj = []; 154 var obj = [];
125 - $.get('/user/companyData', function(result){  
126 - obj = result;  
127 - var options = '';  
128 - for(var i = 0; i < obj.length; i++){  
129 - options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';  
130 - }  
131 - if(obj.length == 1){  
132 - $('#company1').hide();  
133 - if(obj[0].children.length == 1)  
134 - $('#subCompany1').hide();  
135 - }  
136 - $('#company').html(options);  
137 - updateCompany();  
138 - }); 155 +
  156 +
  157 + $.get('/report/lineList',function(result){
  158 + xlList=result;
  159 + $.get('/user/companyData', function(result){
  160 + obj = result;
  161 + var options = '';
  162 + for(var i = 0; i < obj.length; i++){
  163 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  164 + }
  165 +
  166 + if(obj.length ==0){
  167 + $("#company1").css('display','none');
  168 + }else if(obj.length ==1){
  169 + $("#company1").css('display','none');
  170 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  171 + $('#subCompany1').css('display','none');
  172 + }
  173 + $('#company').html(options);
  174 + updateCompany();
  175 + });
  176 + })
139 $("#company").on("change",updateCompany); 177 $("#company").on("change",updateCompany);
140 function updateCompany(){ 178 function updateCompany(){
141 var company = $('#company').val(); 179 var company = $('#company').val();
@@ -149,7 +187,35 @@ @@ -149,7 +187,35 @@
149 } 187 }
150 } 188 }
151 $('#subCompany').html(options); 189 $('#subCompany').html(options);
  190 + initXl();
152 } 191 }
  192 +
  193 + $("#subCompany").on("change",initXl);
  194 + function initXl(){
  195 + var data=[];
  196 + if(fage){
  197 + $("#line").select2("destroy").html('');
  198 + }
  199 + var fgs=$('#subCompany').val();
  200 + var gs=$('#company').val();
  201 + data.push({id: " ", text: "全部线路"});
  202 + for(var i=0;i<xlList.length;i++){
  203 + if(gs!=""){
  204 + if(fgs!=""){
  205 + if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
  206 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  207 + }
  208 + }else{
  209 + if(xlList[i]["gsbm"]==gs){
  210 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  211 + }
  212 + }
  213 + }
  214 + }
  215 + initPinYinSelect2('#line',data,'');
  216 + fage=true;
  217 + }
  218 +
153 219
154 220
155 $("#query").on("click",jsDoQuery); 221 $("#query").on("click",jsDoQuery);
@@ -159,6 +225,10 @@ @@ -159,6 +225,10 @@
159 var company = $("#company").val(); 225 var company = $("#company").val();
160 var subCompany = $("#subCompany").val(); 226 var subCompany = $("#subCompany").val();
161 function jsDoQuery(pagination){ 227 function jsDoQuery(pagination){
  228 + if($("#date").val() == null || $("#date").val().trim().length == 0){
  229 + layer.msg("请选择时间");
  230 + return;
  231 + }
162 var params = {}; 232 var params = {};
163 line = $("#line").val(); 233 line = $("#line").val();
164 date = $("#date").val(); 234 date = $("#date").val();
src/main/resources/static/pages/mforms/alllines/allline.html
@@ -43,19 +43,19 @@ @@ -43,19 +43,19 @@
43 <div class="portlet light porttlet-fit bordered"> 43 <div class="portlet light porttlet-fit bordered">
44 <div class="portlet-title"> 44 <div class="portlet-title">
45 <form class="form-inline" action="" method="post"> 45 <form class="form-inline" action="" method="post">
46 - <div style="display: inline-block; margin-left: 33px;" 46 + <div style="display: inline-block; margin-left: 24px;"
47 id="gsdmDiv_allline"> 47 id="gsdmDiv_allline">
48 <span class="item-label" style="width: 80px;">公司: </span> <select 48 <span class="item-label" style="width: 80px;">公司: </span> <select
49 class="form-control" name="company" id="gsdmAllline" 49 class="form-control" name="company" id="gsdmAllline"
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: 15px;"
53 id="fgsdmDiv_allline"> 53 id="fgsdmDiv_allline">
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="fgsdmAllline" 55 class="form-control" name="subCompany" id="fgsdmAllline"
56 style="width: 140px;"></select> 56 style="width: 140px;"></select>
57 </div> 57 </div>
58 - <div style="display: inline-block;"> 58 + <div style="display: inline-block; margin-left: 15px;">
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: 120px;"></select> 60 class="form-control" name="line" id="line" style="width: 120px;"></select>
61 </div> 61 </div>
@@ -174,18 +174,80 @@ @@ -174,18 +174,80 @@
174 $('#fgsdmAllline').html(options); 174 $('#fgsdmAllline').html(options);
175 } 175 }
176 176
177 - $.get('/basic/lineCode2Name', function(result) {  
178 - var data = [];  
179 -  
180 - for ( var code in result) {  
181 - data.push({  
182 - id : code,  
183 - text : result[code]  
184 - }); 177 + var fage=false;
  178 + var xlList;
  179 + var obj = [];
  180 +
  181 + $.get('/report/lineList',function(result){
  182 + xlList=result;
  183 + $.get('/user/companyData', function(result){
  184 + obj = result;
  185 + var options = '';
  186 + for(var i = 0; i < obj.length; i++){
  187 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  188 + }
  189 +
  190 + if(obj.length ==0){
  191 + $("#gsdmDiv_allline").css('display','none');
  192 + }else if(obj.length ==1){
  193 + $("#gsdmDiv_allline").css('display','none');
  194 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  195 + $('#fgsdmDiv_allline').css('display','none');
  196 + }
  197 + $('#gsdmAllline').html(options);
  198 + updateCompany();
  199 + });
  200 + })
  201 + $("#gsdmAllline").on("change",updateCompany);
  202 + function updateCompany(){
  203 + var company = $('#gsdmAllline').val();
  204 + var options = '';
  205 + for(var i = 0; i < obj.length; i++){
  206 + if(obj[i].companyCode == company){
  207 + var children = obj[i].children;
  208 + for(var j = 0; j < children.length; j++){
  209 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  210 + }
  211 + }
185 } 212 }
186 - initPinYinSelect2('#line', data, ''); 213 + $('#fgsdmAllline').html(options);
  214 + initXl();
  215 + }
187 216
188 - }) 217 + /* $.get('/basic/lineCode2Name',function(result){
  218 + var data=[];
  219 +
  220 + for(var code in result){
  221 + data.push({id: code, text: result[code]});
  222 + }
  223 + initPinYinSelect2('#line',data,'');
  224 +
  225 + }) */
  226 +
  227 + $("#fgsdmAllline").on("change",initXl);
  228 + function initXl(){
  229 + var data=[];
  230 + if(fage){
  231 + $("#line").select2("destroy").html('');
  232 + }
  233 + var fgs=$('#fgsdmAllline').val();
  234 + var gs=$('#gsdmAllline').val();
  235 + for(var i=0;i<xlList.length;i++){
  236 + if(gs!=""){
  237 + if(fgs!=""){
  238 + if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
  239 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  240 + }
  241 + }else{
  242 + if(xlList[i]["gsbm"]==gs){
  243 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  244 + }
  245 + }
  246 + }
  247 + }
  248 + initPinYinSelect2('#line',data,'');
  249 + fage=true;
  250 + }
189 251
190 var line; 252 var line;
191 var startDate; 253 var startDate;
@@ -205,7 +267,8 @@ @@ -205,7 +267,8 @@
205 $post( 267 $post(
206 '/mcy_forms/allline', 268 '/mcy_forms/allline',
207 { 269 {
208 - gsdmAllline:gsdmAllline,fgsdmAllline:fgsdmAllline, 270 + gsdmAllline:gsdmAllline,
  271 + fgsdmAllline:fgsdmAllline,
209 line : line, 272 line : line,
210 startDate : $("#startDate").val(), 273 startDate : $("#startDate").val(),
211 endDate : $("#endDate").val(), 274 endDate : $("#endDate").val(),
@@ -286,7 +349,7 @@ @@ -286,7 +349,7 @@
286 }) 349 })
287 350
288 } else { 351 } else {
289 - alert("请选择时间范围!"); 352 + layer.msg("请选择时间范围!");
290 } 353 }
291 }); 354 });
292 355
src/main/resources/static/pages/mforms/changetochanges/changetochange.html
@@ -144,54 +144,71 @@ @@ -144,54 +144,71 @@
144 locale : 'zh-cn' 144 locale : 'zh-cn'
145 }); 145 });
146 146
  147 + var fage=false;
  148 + var xlList;
147 var obj = []; 149 var obj = [];
148 - $.get('/user/companyData', function(result) {  
149 - obj = result;  
150 - var options = '';  
151 - for (var i = 0; i < obj.length; i++) {  
152 - options += '<option value="'+obj[i].companyCode+'">'  
153 - + obj[i].companyName + '</option>';  
154 - }  
155 - if (obj.length == 0) {  
156 - $("#gsdmDiv_change").css('display', 'none');  
157 - $('#fgsdmDiv_change').css('display', 'none');  
158 - } else if (obj.length == 1) {  
159 - $("#gsdmDiv_change").css('display', 'none');  
160 - if (obj[0].children.length == 1 || obj[0].children.length == 0)  
161 - $('#fgsdmDiv_change').css('display', 'none');  
162 - }  
163 - $('#gsdmChange').html(options);  
164 - updateCompany();  
165 - });  
166 -  
167 - $("#gsdmChange").on("change", updateCompany);  
168 - function updateCompany() { 150 +
  151 +
  152 + $.get('/report/lineList',function(result){
  153 + xlList=result;
  154 + $.get('/user/companyData', function(result){
  155 + obj = result;
  156 + var options = '';
  157 + for(var i = 0; i < obj.length; i++){
  158 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  159 + }
  160 +
  161 + if(obj.length ==0){
  162 + $("#gsdmDiv_change").css('display','none');
  163 + }else if(obj.length ==1){
  164 + $("#gsdmDiv_change").css('display','none');
  165 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  166 + $('#fgsdmDiv_change').css('display','none');
  167 + }
  168 + $('#gsdmChange').html(options);
  169 + updateCompany();
  170 + });
  171 + })
  172 + $("#gsdmChange").on("change",updateCompany);
  173 + function updateCompany(){
169 var company = $('#gsdmChange').val(); 174 var company = $('#gsdmChange').val();
170 var options = ''; 175 var options = '';
171 - for (var i = 0; i < obj.length; i++) {  
172 - if (obj[i].companyCode == company) { 176 + for(var i = 0; i < obj.length; i++){
  177 + if(obj[i].companyCode == company){
173 var children = obj[i].children; 178 var children = obj[i].children;
174 - for (var j = 0; j < children.length; j++) {  
175 - options += '<option value="'+children[j].code+'">'  
176 - + children[j].name + '</option>'; 179 + for(var j = 0; j < children.length; j++){
  180 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
177 } 181 }
178 } 182 }
179 } 183 }
180 $('#fgsdmChange').html(options); 184 $('#fgsdmChange').html(options);
  185 + initXl();
181 } 186 }
182 -  
183 - $.get('/basic/lineCode2Name', function(result) {  
184 - var data = [];  
185 -  
186 - for ( var code in result) {  
187 - data.push({  
188 - id : code,  
189 - text : result[code]  
190 - }); 187 +
  188 + $("#fgsdmChange").on("change",initXl);
  189 + function initXl(){
  190 + var data=[];
  191 + if(fage){
  192 + $("#line").select2("destroy").html('');
191 } 193 }
192 - initPinYinSelect2('#line', data, '');  
193 -  
194 - }) 194 + var fgs=$('#fgsdmChange').val();
  195 + var gs=$('#gsdmChange').val();
  196 + for(var i=0;i<xlList.length;i++){
  197 + if(gs!=""){
  198 + if(fgs!=""){
  199 + if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
  200 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  201 + }
  202 + }else{
  203 + if(xlList[i]["gsbm"]==gs){
  204 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  205 + }
  206 + }
  207 + }
  208 + }
  209 + initPinYinSelect2('#line',data,'');
  210 + fage=true;
  211 + }
195 212
196 var line; 213 var line;
197 var startDate; 214 var startDate;
src/main/resources/static/pages/mforms/linepassengerflows/linepassengerflow.html
@@ -82,26 +82,30 @@ @@ -82,26 +82,30 @@
82 locale : 'zh-cn' 82 locale : 'zh-cn'
83 }); 83 });
84 84
  85 + var fage=false;
  86 + var xlList;
85 var obj = []; 87 var obj = [];
86 - $.get('/user/companyData', function(result){  
87 - obj = result;  
88 - var options = '';  
89 - for(var i = 0; i < obj.length; i++){  
90 - options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';  
91 - }  
92 -  
93 - if(obj.length ==0){  
94 - $("#gsdmDiv_line").css('display','none');  
95 - $('#fgsdmDiv_line').css('display','none');  
96 - }else if(obj.length ==1){  
97 - $("#gsdmDiv_line").css('display','none');  
98 - if(obj[0].children.length == 1 || obj[0].children.length ==0)  
99 - $('#fgsdmDiv_line').css('display','none');  
100 - }  
101 - $('#gsdmLine').html(options);  
102 - updateCompany();  
103 - });  
104 - 88 +
  89 + $.get('/report/lineList',function(result){
  90 + xlList=result;
  91 + $.get('/user/companyData', function(result){
  92 + obj = result;
  93 + var options = '';
  94 + for(var i = 0; i < obj.length; i++){
  95 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  96 + }
  97 +
  98 + if(obj.length ==0){
  99 + $("#gsdmDiv_line").css('display','none');
  100 + }else if(obj.length ==1){
  101 + $("#gsdmDiv_line").css('display','none');
  102 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  103 + $('#fgsdmDiv_line').css('display','none');
  104 + }
  105 + $('#gsdmLine').html(options);
  106 + updateCompany();
  107 + });
  108 + })
105 $("#gsdmLine").on("change",updateCompany); 109 $("#gsdmLine").on("change",updateCompany);
106 function updateCompany(){ 110 function updateCompany(){
107 var company = $('#gsdmLine').val(); 111 var company = $('#gsdmLine').val();
@@ -115,21 +119,33 @@ @@ -115,21 +119,33 @@
115 } 119 }
116 } 120 }
117 $('#fgsdmLine').html(options); 121 $('#fgsdmLine').html(options);
  122 + initXl();
118 } 123 }
119 -  
120 -  
121 124
122 - $.get('/basic/lineCode2Name',function(result){ 125 + $("#fgsdmLine").on("change",initXl);
  126 + function initXl(){
123 var data=[]; 127 var data=[];
124 -  
125 - for(var code in result){  
126 - data.push({id: code, text: result[code]}); 128 + if(fage){
  129 + $("#line").select2("destroy").html('');
  130 + }
  131 + var fgs=$('#fgsdmLine').val();
  132 + var gs=$('#gsdmLine').val();
  133 + for(var i=0;i<xlList.length;i++){
  134 + if(gs!=""){
  135 + if(fgs!=""){
  136 + if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
  137 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  138 + }
  139 + }else{
  140 + if(xlList[i]["gsbm"]==gs){
  141 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  142 + }
  143 + }
  144 + }
127 } 145 }
128 - console.log(data);  
129 initPinYinSelect2('#line',data,''); 146 initPinYinSelect2('#line',data,'');
130 -  
131 - })  
132 - 147 + fage=true;
  148 + }
133 149
134 var line; 150 var line;
135 var date; 151 var date;
src/main/resources/static/pages/mforms/turnoutrates/turnoutrate.html
@@ -124,26 +124,30 @@ @@ -124,26 +124,30 @@
124 locale : 'zh-cn' 124 locale : 'zh-cn'
125 }); 125 });
126 126
  127 + var fage=false;
  128 + var xlList;
127 var obj = []; 129 var obj = [];
128 - $.get('/user/companyData', function(result){  
129 - obj = result;  
130 - var options = '';  
131 - for(var i = 0; i < obj.length; i++){  
132 - options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';  
133 - }  
134 -  
135 - if(obj.length ==0){  
136 - $("#gsdmDiv_turn").css('display','none');  
137 - $('#fgsdmDiv_turn').css('display','none');  
138 - }else if(obj.length ==1){  
139 - $("#gsdmDiv_turn").css('display','none');  
140 - if(obj[0].children.length == 1 || obj[0].children.length ==0)  
141 - $('#fgsdmDiv_turn').css('display','none');  
142 - }  
143 - $('#gsdmTurn').html(options);  
144 - updateCompany();  
145 - });  
146 - 130 +
  131 + $.get('/report/lineList',function(result){
  132 + xlList=result;
  133 + $.get('/user/companyData', function(result){
  134 + obj = result;
  135 + var options = '';
  136 + for(var i = 0; i < obj.length; i++){
  137 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  138 + }
  139 +
  140 + if(obj.length ==0){
  141 + $("#gsdmDiv_turn").css('display','none');
  142 + }else if(obj.length ==1){
  143 + $("#gsdmDiv_turn").css('display','none');
  144 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  145 + $('#fgsdmDiv_turn').css('display','none');
  146 + }
  147 + $('#gsdmTurn').html(options);
  148 + updateCompany();
  149 + });
  150 + })
147 $("#gsdmTurn").on("change",updateCompany); 151 $("#gsdmTurn").on("change",updateCompany);
148 function updateCompany(){ 152 function updateCompany(){
149 var company = $('#gsdmTurn').val(); 153 var company = $('#gsdmTurn').val();
@@ -157,19 +161,34 @@ @@ -157,19 +161,34 @@
157 } 161 }
158 } 162 }
159 $('#fgsdmTurn').html(options); 163 $('#fgsdmTurn').html(options);
  164 + initXl();
160 } 165 }
161 -  
162 166
163 - $.get('/basic/lineCode2Name',function(result){ 167 + $("#fgsdmTurn").on("change",initXl);
  168 + function initXl(){
164 var data=[]; 169 var data=[];
165 -  
166 - for(var code in result){  
167 - data.push({id: code, text: result[code]}); 170 + if(fage){
  171 + $("#line").select2("destroy").html('');
  172 + }
  173 + var fgs=$('#fgsdmTurn').val();
  174 + var gs=$('#gsdmTurn').val();
  175 + for(var i=0;i<xlList.length;i++){
  176 + if(gs!=""){
  177 + if(fgs!=""){
  178 + if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
  179 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  180 + }
  181 + }else{
  182 + if(xlList[i]["gsbm"]==gs){
  183 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  184 + }
  185 + }
  186 + }
168 } 187 }
169 initPinYinSelect2('#line',data,''); 188 initPinYinSelect2('#line',data,'');
170 -  
171 - })  
172 - 189 + fage=true;
  190 + }
  191 +
173 var line; 192 var line;
174 var startDate; 193 var startDate;
175 var endDate; 194 var endDate;
src/main/resources/static/pages/report/timetable/timetable.html
@@ -196,27 +196,30 @@ @@ -196,27 +196,30 @@
196 if (!$('body').hasClass('page-sidebar-closed')) 196 if (!$('body').hasClass('page-sidebar-closed'))
197 $('.menu-toggler.sidebar-toggler').click(); 197 $('.menu-toggler.sidebar-toggler').click();
198 198
199 - 199 + var fage=false;
  200 + var xlList;
200 var obj = []; 201 var obj = [];
201 - $.get('/user/companyData', function(result){  
202 - obj = result;  
203 - var options = '';  
204 - for(var i = 0; i < obj.length; i++){  
205 - options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';  
206 - }  
207 -  
208 - if(obj.length ==0){  
209 - $("#gsdmDiv_time").css('display','none');  
210 - $('#fgsdmDiv_time').css('display','none');  
211 - }else if(obj.length ==1){  
212 - $("#gsdmDiv_time").css('display','none');  
213 - if(obj[0].children.length == 1 || obj[0].children.length ==0)  
214 - $('#fgsdmDiv_time').css('display','none');  
215 - }  
216 - $('#gsdmTime').html(options);  
217 - updateCompany();  
218 - });  
219 - 202 +
  203 + $.get('/report/lineList',function(result){
  204 + xlList=result;
  205 + $.get('/user/companyData', function(result){
  206 + obj = result;
  207 + var options = '';
  208 + for(var i = 0; i < obj.length; i++){
  209 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  210 + }
  211 +
  212 + if(obj.length ==0){
  213 + $("#gsdmDiv_time").css('display','none');
  214 + }else if(obj.length ==1){
  215 + $("#gsdmDiv_time").css('display','none');
  216 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  217 + $('#fgsdmDiv_time').css('display','none');
  218 + }
  219 + $('#gsdmTime').html(options);
  220 + updateCompany();
  221 + });
  222 + })
220 $("#gsdmTime").on("change",updateCompany); 223 $("#gsdmTime").on("change",updateCompany);
221 function updateCompany(){ 224 function updateCompany(){
222 var company = $('#gsdmTime').val(); 225 var company = $('#gsdmTime').val();
@@ -230,17 +233,33 @@ @@ -230,17 +233,33 @@
230 } 233 }
231 } 234 }
232 $('#fgsdmTime').html(options); 235 $('#fgsdmTime').html(options);
  236 + initXl();
233 } 237 }
234 -  
235 - $.get('/basic/lineCode2Name',function(result){ 238 +
  239 + $("#fgsdmTime").on("change",initXl);
  240 + function initXl(){
236 var data=[]; 241 var data=[];
237 - data.push({id: "", text: "请选择"});  
238 - for(var code in result){  
239 - data.push({id: code, text: result[code]}); 242 + if(fage){
  243 + $("#line").select2("destroy").html('');
  244 + }
  245 + var fgs=$('#fgsdmTime').val();
  246 + var gs=$('#gsdmTime').val();
  247 + for(var i=0;i<xlList.length;i++){
  248 + if(gs!=""){
  249 + if(fgs!=""){
  250 + if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
  251 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  252 + }
  253 + }else{
  254 + if(xlList[i]["gsbm"]==gs){
  255 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  256 + }
  257 + }
  258 + }
240 } 259 }
241 initPinYinSelect2('#line',data,''); 260 initPinYinSelect2('#line',data,'');
242 -  
243 - }) 261 + fage=true;
  262 + }
244 263
245 264
246 var flag = 0; 265 var flag = 0;
src/main/resources/static/pages/scheduleApp/module/common/prj-common-globalservice.js
@@ -327,7 +327,7 @@ angular.module(&#39;ScheduleApp&#39;).factory(&#39;GuideboardManageService_g&#39;, [&#39;$resource&#39;, @@ -327,7 +327,7 @@ angular.module(&#39;ScheduleApp&#39;).factory(&#39;GuideboardManageService_g&#39;, [&#39;$resource&#39;,
327 return { 327 return {
328 rest: $resource( 328 rest: $resource(
329 '/gic/:id', 329 '/gic/:id',
330 - {order: 'xl,isCancel', direction: 'DESC,ASC', id: '@id'}, 330 + {order: 'xl,isCancel,lpNo', direction: 'DESC,ASC,ASC', id: '@id'},
331 { 331 {
332 list: { 332 list: {
333 method: 'GET', 333 method: 'GET',
src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/service.js
@@ -3,7 +3,7 @@ angular.module(&#39;ScheduleApp&#39;).factory(&#39;GuideboardManageService_g&#39;, [&#39;$resource&#39;, @@ -3,7 +3,7 @@ angular.module(&#39;ScheduleApp&#39;).factory(&#39;GuideboardManageService_g&#39;, [&#39;$resource&#39;,
3 return { 3 return {
4 rest: $resource( 4 rest: $resource(
5 '/gic/:id', 5 '/gic/:id',
6 - {order: 'xl,isCancel', direction: 'DESC,ASC', id: '@id'}, 6 + {order: 'xl,isCancel,lpNo', direction: 'DESC,ASC,ASC', id: '@id'},
7 { 7 {
8 list: { 8 list: {
9 method: 'GET', 9 method: 'GET',
src/main/resources/static/pages/scheduleApp/module/core/rerunManage/edit.html
@@ -175,6 +175,14 @@ @@ -175,6 +175,14 @@
175 </div> 175 </div>
176 </div> 176 </div>
177 177
  178 + <div class="form-group has-success has-feedback"
  179 + ng-if="ctrl.rerunManageForSave.rerunType == 'dylp'">
  180 + <label class="col-md-2 control-label">替换类型:</label>
  181 + <div class="col-md-3">
  182 + <sa-Radiogroup model="ctrl.rerunManageForSave.useType" dicgroup="dylptype" name="useType"></sa-Radiogroup>
  183 + </div>
  184 + </div>
  185 +
178 186
179 <div class="form-group has-success has-feedback" ng-if="ctrl.rerunManageForSave.rerunType == 'dybc'"> 187 <div class="form-group has-success has-feedback" ng-if="ctrl.rerunManageForSave.rerunType == 'dybc'">
180 <label class="col-md-2 control-label">车辆配置*:</label> 188 <label class="col-md-2 control-label">车辆配置*:</label>
src/main/resources/static/pages/scheduleApp/module/core/rerunManage/form.html
@@ -175,6 +175,14 @@ @@ -175,6 +175,14 @@
175 </div> 175 </div>
176 </div> 176 </div>
177 177
  178 + <div class="form-group has-success has-feedback"
  179 + ng-if="ctrl.rerunManageForSave.rerunType == 'dylp'">
  180 + <label class="col-md-2 control-label">替换类型:</label>
  181 + <div class="col-md-3">
  182 + <sa-Radiogroup model="ctrl.rerunManageForSave.useType" dicgroup="dylptype" name="useType"></sa-Radiogroup>
  183 + </div>
  184 + </div>
  185 +
178 186
179 <div class="form-group has-success has-feedback" ng-if="ctrl.rerunManageForSave.rerunType == 'dybc'"> 187 <div class="form-group has-success has-feedback" ng-if="ctrl.rerunManageForSave.rerunType == 'dybc'">
180 <label class="col-md-2 control-label">车辆配置*:</label> 188 <label class="col-md-2 control-label">车辆配置*:</label>
src/main/resources/static/pages/scheduleApp/module/core/rerunManage/module.js
@@ -169,6 +169,7 @@ angular.module(&#39;ScheduleApp&#39;).controller( @@ -169,6 +169,7 @@ angular.module(&#39;ScheduleApp&#39;).controller(
169 } else { 169 } else {
170 // 初始表单,从查询条件中获取线路id 170 // 初始表单,从查询条件中获取线路id
171 self.rerunManageForSave.rerunXl.id = service.getSearchCondition()['rerunXl.id_eq']; 171 self.rerunManageForSave.rerunXl.id = service.getSearchCondition()['rerunXl.id_eq'];
  172 + self.rerunManageForSave.useType = "all";
172 } 173 }
173 174
174 // 提交方法 175 // 提交方法
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/edit.html
@@ -167,20 +167,20 @@ @@ -167,20 +167,20 @@
167 required > 167 required >
168 </sa-Checkboxgroup> 168 </sa-Checkboxgroup>
169 169
170 - <input type="hidden" name="rule_days_h" ng-model="ctrl.ttInfoManageForForm.rule_days"  
171 - remote-Validation  
172 - remotevtype="tic_n_d"  
173 - remotevparam="{{ {'id_eq': ctrl.ttInfoManageForForm.id, 'xl.id_eq': ctrl.ttInfoManageForForm.xl.id, 'rule_days_eq': ctrl.ttInfoManageForForm.rule_days} | json}}"  
174 - /> 170 + <!--<input type="hidden" name="rule_days_h" ng-model="ctrl.ttInfoManageForForm.rule_days"-->
  171 + <!--remote-Validation-->
  172 + <!--remotevtype="tic_n_d"-->
  173 + <!--remotevparam="{{ {'id_eq': ctrl.ttInfoManageForForm.id, 'xl.id_eq': ctrl.ttInfoManageForForm.xl.id, 'rule_days_eq': ctrl.ttInfoManageForForm.rule_days} | json}}"-->
  174 + <!--/>-->
175 175
176 176
177 </div> 177 </div>
178 <div class="alert alert-danger well-sm" ng-show="myForm.rule_days.$error.required"> 178 <div class="alert alert-danger well-sm" ng-show="myForm.rule_days.$error.required">
179 请操作一下1 179 请操作一下1
180 </div> 180 </div>
181 - <div class="alert alert-danger well-sm" ng-show="myForm.rule_days_h.$error.remote">  
182 - 常规有效日重复  
183 - </div> 181 + <!--<div class="alert alert-danger well-sm" ng-show="myForm.rule_days_h.$error.remote">-->
  182 + <!--常规有效日重复-->
  183 + <!--</div>-->
184 </div> 184 </div>
185 185
186 <div class="form-group"> 186 <div class="form-group">
@@ -193,18 +193,18 @@ @@ -193,18 +193,18 @@
193 > 193 >
194 </sa-Dategroup> 194 </sa-Dategroup>
195 195
196 - <input type="hidden" name="special_days_h" ng-model="ctrl.ttInfoManageForForm.special_days"  
197 - remote-Validation  
198 - remotevtype="tic_s_d"  
199 - remotevparam="{{ {'id_eq': ctrl.ttInfoManageForForm.id, 'xl.id_eq': ctrl.ttInfoManageForForm.xl.id, 'special_days_eq': ctrl.ttInfoManageForForm.special_days} | json}}"  
200 - /> 196 + <!--<input type="hidden" name="special_days_h" ng-model="ctrl.ttInfoManageForForm.special_days"-->
  197 + <!--remote-Validation-->
  198 + <!--remotevtype="tic_s_d"-->
  199 + <!--remotevparam="{{ {'id_eq': ctrl.ttInfoManageForForm.id, 'xl.id_eq': ctrl.ttInfoManageForForm.xl.id, 'special_days_eq': ctrl.ttInfoManageForForm.special_days} | json}}"-->
  200 + <!--/>-->
201 </div> 201 </div>
202 <div class="alert alert-danger well-sm" ng-show="myForm.special_days.$error.required"> 202 <div class="alert alert-danger well-sm" ng-show="myForm.special_days.$error.required">
203 请操作一下2 203 请操作一下2
204 </div> 204 </div>
205 - <div class="alert alert-danger well-sm" ng-show="myForm.special_days_h.$error.remote">  
206 - 特殊有效日重复  
207 - </div> 205 + <!--<div class="alert alert-danger well-sm" ng-show="myForm.special_days_h.$error.remote">-->
  206 + <!--特殊有效日重复-->
  207 + <!--</div>-->
208 </div> 208 </div>
209 209
210 <!--<div class="form-group">--> 210 <!--<div class="form-group">-->
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/form.html
@@ -167,18 +167,18 @@ @@ -167,18 +167,18 @@
167 required > 167 required >
168 </sa-Checkboxgroup> 168 </sa-Checkboxgroup>
169 169
170 - <input type="hidden" name="rule_days_h" ng-model="ctrl.ttInfoManageForForm.rule_days"  
171 - remote-Validation  
172 - remotevtype="tic_n_d"  
173 - remotevparam="{{ {'id_eq': ctrl.ttInfoManageForForm.id, 'xl.id_eq': ctrl.ttInfoManageForForm.xl.id, 'rule_days_eq': ctrl.ttInfoManageForForm.rule_days} | json}}"  
174 - /> 170 + <!--<input type="hidden" name="rule_days_h" ng-model="ctrl.ttInfoManageForForm.rule_days"-->
  171 + <!--remote-Validation-->
  172 + <!--remotevtype="tic_n_d"-->
  173 + <!--remotevparam="{{ {'id_eq': ctrl.ttInfoManageForForm.id, 'xl.id_eq': ctrl.ttInfoManageForForm.xl.id, 'rule_days_eq': ctrl.ttInfoManageForForm.rule_days} | json}}"-->
  174 + <!--/>-->
175 </div> 175 </div>
176 <div class="alert alert-danger well-sm" ng-show="myForm.rule_days.$error.required"> 176 <div class="alert alert-danger well-sm" ng-show="myForm.rule_days.$error.required">
177 请操作一下1 177 请操作一下1
178 </div> 178 </div>
179 - <div class="alert alert-danger well-sm" ng-show="myForm.rule_days_h.$error.remote">  
180 - 常规有效日重复  
181 - </div> 179 + <!--<div class="alert alert-danger well-sm" ng-show="myForm.rule_days_h.$error.remote">-->
  180 + <!--常规有效日重复-->
  181 + <!--</div>-->
182 </div> 182 </div>
183 183
184 <div class="form-group"> 184 <div class="form-group">
@@ -191,19 +191,19 @@ @@ -191,19 +191,19 @@
191 > 191 >
192 </sa-Dategroup> 192 </sa-Dategroup>
193 193
194 - <input type="hidden" name="special_days_h" ng-model="ctrl.ttInfoManageForForm.special_days"  
195 - remote-Validation  
196 - remotevtype="tic_s_d"  
197 - remotevparam="{{ {'id_eq': ctrl.ttInfoManageForForm.id, 'xl.id_eq': ctrl.ttInfoManageForForm.xl.id, 'special_days_eq': ctrl.ttInfoManageForForm.special_days} | json}}"  
198 - /> 194 + <!--<input type="hidden" name="special_days_h" ng-model="ctrl.ttInfoManageForForm.special_days"-->
  195 + <!--remote-Validation-->
  196 + <!--remotevtype="tic_s_d"-->
  197 + <!--remotevparam="{{ {'id_eq': ctrl.ttInfoManageForForm.id, 'xl.id_eq': ctrl.ttInfoManageForForm.xl.id, 'special_days_eq': ctrl.ttInfoManageForForm.special_days} | json}}"-->
  198 + <!--/>-->
199 </div> 199 </div>
200 <div class="alert alert-danger well-sm" ng-show="myForm.special_days.$error.required"> 200 <div class="alert alert-danger well-sm" ng-show="myForm.special_days.$error.required">
201 请操作一下2 201 请操作一下2
202 </div> 202 </div>
203 203
204 - <div class="alert alert-danger well-sm" ng-show="myForm.special_days_h.$error.remote">  
205 - 特殊有效日重复  
206 - </div> 204 + <!--<div class="alert alert-danger well-sm" ng-show="myForm.special_days_h.$error.remote">-->
  205 + <!--特殊有效日重复-->
  206 + <!--</div>-->
207 </div> 207 </div>
208 208
209 <!--<div class="form-group">--> 209 <!--<div class="form-group">-->
src/test/resources/testdata/problem.properties
@@ -9,10 +9,14 @@ @@ -9,10 +9,14 @@
9 9=下拉框貌似中文不能搜索 9 9=下拉框貌似中文不能搜索
10 10=时刻表明细编辑,环线,选上下行,上下的站点在下行站点列表里 10 10=时刻表明细编辑,环线,选上下行,上下的站点在下行站点列表里
11 ##11=人员基础信息导入问题,工号前要加公司代码 11 ##11=人员基础信息导入问题,工号前要加公司代码
12 -12=套跑规则嵌入到主排班规则中 12 +##12=套跑规则嵌入到主排班规则中
13 13=导入数据功能,需要加用户名 13 13=导入数据功能,需要加用户名
14 14=路牌编号自动生成 14 14=路牌编号自动生成
15 15=时刻表导入的时候表头后面不需要加数字 15 15=时刻表导入的时候表头后面不需要加数字
16 16=时间框中文 16 16=时间框中文
17 17=人员工号前公司编码自动加 17 17=人员工号前公司编码自动加
  18 +18=排班计划明细可以修改(修改到每个班次)
  19 +19=线路运营概览
  20 +20=排班规则备注
  21 +21=时刻表,两点间空驶,算空驶
18 22