Commit 4d06348465827e2aa8c75369dfafd0ac8016d66c
1 parent
e42204fc
线路首末班
Showing
1 changed file
with
92 additions
and
66 deletions
src/main/java/com/bsth/service/schedule/PeopleCarPlanServiceImpl.java
| @@ -1141,6 +1141,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1141,6 +1141,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1141 | for(ScheduleRealInfo schedule : list){ | 1141 | for(ScheduleRealInfo schedule : list){ |
| 1142 | if(schedule.getBcType().equals("in") || schedule.getBcType().equals("out")) | 1142 | if(schedule.getBcType().equals("in") || schedule.getBcType().equals("out")) |
| 1143 | continue; | 1143 | continue; |
| 1144 | + if(schedule.getStatus() == -1){ | ||
| 1145 | + continue; | ||
| 1146 | + } | ||
| 1144 | String key = schedule.getXlName(); | 1147 | String key = schedule.getXlName(); |
| 1145 | if(key == null || key.trim().length() == 0) | 1148 | if(key == null || key.trim().length() == 0) |
| 1146 | continue; | 1149 | continue; |
| @@ -1174,9 +1177,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1174,9 +1177,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1174 | longList1.add(min); | 1177 | longList1.add(min); |
| 1175 | } | 1178 | } |
| 1176 | } | 1179 | } |
| 1177 | - if(longList0.size() == 0 || longList1.size() == 0){ | ||
| 1178 | - continue; | ||
| 1179 | - } | 1180 | + |
| 1180 | if(longList0.size() != 0){ | 1181 | if(longList0.size() != 0){ |
| 1181 | Collections.sort(longList0); | 1182 | Collections.sort(longList0); |
| 1182 | ScheduleRealInfo shouban0 = temp0.get(longList0.get(0)); | 1183 | ScheduleRealInfo shouban0 = temp0.get(longList0.get(0)); |
| @@ -1313,6 +1314,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1313,6 +1314,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1313 | for(ScheduleRealInfo schedule : list){ | 1314 | for(ScheduleRealInfo schedule : list){ |
| 1314 | if(schedule.getBcType().equals("in") || schedule.getBcType().equals("out")) | 1315 | if(schedule.getBcType().equals("in") || schedule.getBcType().equals("out")) |
| 1315 | continue; | 1316 | continue; |
| 1317 | + if(schedule.getStatus() == -1){ | ||
| 1318 | + continue; | ||
| 1319 | + } | ||
| 1316 | String key = schedule.getXlName(); | 1320 | String key = schedule.getXlName(); |
| 1317 | if(key == null || key.trim().length() == 0) | 1321 | if(key == null || key.trim().length() == 0) |
| 1318 | continue; | 1322 | continue; |
| @@ -1346,79 +1350,101 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1346,79 +1350,101 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1346 | longList1.add(min); | 1350 | longList1.add(min); |
| 1347 | } | 1351 | } |
| 1348 | } | 1352 | } |
| 1349 | - if(longList0.size() == 0 || longList1.size() == 0){ | ||
| 1350 | - continue; | ||
| 1351 | - } | ||
| 1352 | - Collections.sort(longList0); | ||
| 1353 | - Collections.sort(longList1); | ||
| 1354 | - ScheduleRealInfo shouban0 = temp0.get(longList0.get(0)); | ||
| 1355 | - ScheduleRealInfo moban0 = temp0.get(longList0.get(longList0.size() - 1)); | ||
| 1356 | - ScheduleRealInfo shouban1 = temp1.get(longList1.get(0)); | ||
| 1357 | - ScheduleRealInfo moban1 = temp1.get(longList1.get(longList1.size() - 1)); | ||
| 1358 | - tempMap.put("date", date); | ||
| 1359 | - tempMap.put("company", companyName); | ||
| 1360 | - tempMap.put("subCompany", subCompanyName); | ||
| 1361 | - tempMap.put("line", key); | ||
| 1362 | - tempMap.put("qdzFirst0", shouban0.getQdzName()); | ||
| 1363 | - tempMap.put("jhfcFirst0", shouban0.getFcsj()); | ||
| 1364 | - tempMap.put("qdzLast0", moban0.getQdzName()); | ||
| 1365 | - tempMap.put("jhfcLast0", moban0.getFcsj()); | ||
| 1366 | - tempMap.put("qdzFirst1", shouban1.getQdzName()); | ||
| 1367 | - tempMap.put("jhfcFirst1", shouban1.getFcsj()); | ||
| 1368 | - tempMap.put("qdzLast1", moban1.getQdzName()); | ||
| 1369 | - tempMap.put("jhfcLast1", moban1.getFcsj()); | ||
| 1370 | - if(shouban0.getFcsjActual() != null){ | ||
| 1371 | - String[] split = shouban0.getFcsjActual().split(":"); | ||
| 1372 | - long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); | ||
| 1373 | - long delay = shouban0.getFcsjT() - min; | ||
| 1374 | - tempMap.put("sjfcFirst0", shouban0.getFcsjActual()); | ||
| 1375 | - if(delay > 0) | ||
| 1376 | - tempMap.put("delayFirst0", "+" + delay); | ||
| 1377 | - else | ||
| 1378 | - tempMap.put("delayFirst0", delay); | ||
| 1379 | - } else { | 1353 | + |
| 1354 | + if(longList0.size() != 0){ | ||
| 1355 | + Collections.sort(longList0); | ||
| 1356 | + ScheduleRealInfo shouban0 = temp0.get(longList0.get(0)); | ||
| 1357 | + ScheduleRealInfo moban0 = temp0.get(longList0.get(longList0.size() - 1)); | ||
| 1358 | + tempMap.put("qdzFirst0", shouban0.getQdzName()); | ||
| 1359 | + tempMap.put("jhfcFirst0", shouban0.getFcsj()); | ||
| 1360 | + tempMap.put("qdzLast0", moban0.getQdzName()); | ||
| 1361 | + tempMap.put("jhfcLast0", moban0.getFcsj()); | ||
| 1362 | + if(shouban0.getFcsjActual() != null){ | ||
| 1363 | + String[] split = shouban0.getFcsjActual().split(":"); | ||
| 1364 | + long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); | ||
| 1365 | + long delay = shouban0.getFcsjT() - min; | ||
| 1366 | + tempMap.put("sjfcFirst0", shouban0.getFcsjActual()); | ||
| 1367 | + if(delay > 0) | ||
| 1368 | + tempMap.put("delayFirst0", "+" + delay); | ||
| 1369 | + else | ||
| 1370 | + tempMap.put("delayFirst0", delay); | ||
| 1371 | + } else { | ||
| 1372 | + tempMap.put("sjfcFirst0", "/"); | ||
| 1373 | + tempMap.put("delayFirst0", "/"); | ||
| 1374 | + } | ||
| 1375 | + if(moban0.getFcsjActual() != null){ | ||
| 1376 | + String[] split = moban0.getFcsjActual().split(":"); | ||
| 1377 | + long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); | ||
| 1378 | + long delay = moban0.getFcsjT() - min; | ||
| 1379 | + tempMap.put("sjfcLast0", moban0.getFcsjActual()); | ||
| 1380 | + if(delay > 0) | ||
| 1381 | + tempMap.put("delayLast0", "+" + delay); | ||
| 1382 | + else | ||
| 1383 | + tempMap.put("delayLast0", delay); | ||
| 1384 | + } else { | ||
| 1385 | + tempMap.put("sjfcLast0", "/"); | ||
| 1386 | + tempMap.put("delayLast0", "/"); | ||
| 1387 | + } | ||
| 1388 | + }else{ | ||
| 1389 | + tempMap.put("qdzFirst0", "--"); | ||
| 1390 | + tempMap.put("jhfcFirst0", "/"); | ||
| 1391 | + tempMap.put("qdzLast0", "--"); | ||
| 1392 | + tempMap.put("jhfcLast0", "/"); | ||
| 1380 | tempMap.put("sjfcFirst0", "/"); | 1393 | tempMap.put("sjfcFirst0", "/"); |
| 1381 | tempMap.put("delayFirst0", "/"); | 1394 | tempMap.put("delayFirst0", "/"); |
| 1382 | - } | ||
| 1383 | - if(moban0.getFcsjActual() != null){ | ||
| 1384 | - String[] split = moban0.getFcsjActual().split(":"); | ||
| 1385 | - long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); | ||
| 1386 | - long delay = moban0.getFcsjT() - min; | ||
| 1387 | - tempMap.put("sjfcLast0", moban0.getFcsjActual()); | ||
| 1388 | - if(delay > 0) | ||
| 1389 | - tempMap.put("delayLast0", "+" + delay); | ||
| 1390 | - else | ||
| 1391 | - tempMap.put("delayLast0", delay); | ||
| 1392 | - } else { | ||
| 1393 | tempMap.put("sjfcLast0", "/"); | 1395 | tempMap.put("sjfcLast0", "/"); |
| 1394 | tempMap.put("delayLast0", "/"); | 1396 | tempMap.put("delayLast0", "/"); |
| 1395 | } | 1397 | } |
| 1396 | - if(shouban1.getFcsjActual() != null){ | ||
| 1397 | - String[] split = shouban1.getFcsjActual().split(":"); | ||
| 1398 | - long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); | ||
| 1399 | - long delay = shouban1.getFcsjT() - min; | ||
| 1400 | - tempMap.put("sjfcFirst1", shouban1.getFcsjActual()); | ||
| 1401 | - if(delay > 0) | ||
| 1402 | - tempMap.put("delayFirst1", "+" + delay); | ||
| 1403 | - else | ||
| 1404 | - tempMap.put("delayFirst1", delay); | ||
| 1405 | - } else { | 1398 | + |
| 1399 | + if(longList1.size() != 0){ | ||
| 1400 | + Collections.sort(longList1); | ||
| 1401 | + ScheduleRealInfo shouban1 = temp1.get(longList1.get(0)); | ||
| 1402 | + ScheduleRealInfo moban1 = temp1.get(longList1.get(longList1.size() - 1)); | ||
| 1403 | + tempMap.put("qdzFirst1", shouban1.getQdzName()); | ||
| 1404 | + tempMap.put("jhfcFirst1", shouban1.getFcsj()); | ||
| 1405 | + tempMap.put("qdzLast1", moban1.getQdzName()); | ||
| 1406 | + tempMap.put("jhfcLast1", moban1.getFcsj()); | ||
| 1407 | + if(shouban1.getFcsjActual() != null){ | ||
| 1408 | + String[] split = shouban1.getFcsjActual().split(":"); | ||
| 1409 | + long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); | ||
| 1410 | + long delay = shouban1.getFcsjT() - min; | ||
| 1411 | + tempMap.put("sjfcFirst1", shouban1.getFcsjActual()); | ||
| 1412 | + if(delay > 0) | ||
| 1413 | + tempMap.put("delayFirst1", "+" + delay); | ||
| 1414 | + else | ||
| 1415 | + tempMap.put("delayFirst1", delay); | ||
| 1416 | + } else { | ||
| 1417 | + tempMap.put("sjfcFirst1", "/"); | ||
| 1418 | + tempMap.put("delayFirst1", "/"); | ||
| 1419 | + } | ||
| 1420 | + if(moban1.getFcsjActual() != null){ | ||
| 1421 | + String[] split = moban1.getFcsjActual().split(":"); | ||
| 1422 | + long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); | ||
| 1423 | + long delay = moban1.getFcsjT() - min; | ||
| 1424 | + tempMap.put("sjfcLast1", moban1.getFcsjActual()); | ||
| 1425 | + if(delay > 0) | ||
| 1426 | + tempMap.put("delayLast1", "+" + delay); | ||
| 1427 | + else | ||
| 1428 | + tempMap.put("delayLast1", delay); | ||
| 1429 | + } else { | ||
| 1430 | + tempMap.put("sjfcLast1", "/"); | ||
| 1431 | + tempMap.put("delayLast1", "/"); | ||
| 1432 | + } | ||
| 1433 | + }else{ | ||
| 1434 | + tempMap.put("qdzFirst1", "--"); | ||
| 1435 | + tempMap.put("jhfcFirst1", "/"); | ||
| 1436 | + tempMap.put("qdzLast1", "--"); | ||
| 1437 | + tempMap.put("jhfcLast1", "/"); | ||
| 1406 | tempMap.put("sjfcFirst1", "/"); | 1438 | tempMap.put("sjfcFirst1", "/"); |
| 1407 | tempMap.put("delayFirst1", "/"); | 1439 | tempMap.put("delayFirst1", "/"); |
| 1408 | - } | ||
| 1409 | - if(moban1.getFcsjActual() != null){ | ||
| 1410 | - String[] split = moban1.getFcsjActual().split(":"); | ||
| 1411 | - long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); | ||
| 1412 | - long delay = moban1.getFcsjT() - min; | ||
| 1413 | - tempMap.put("sjfcLast1", moban1.getFcsjActual()); | ||
| 1414 | - if(delay > 0) | ||
| 1415 | - tempMap.put("delayLast1", "+" + delay); | ||
| 1416 | - else | ||
| 1417 | - tempMap.put("delayLast1", delay); | ||
| 1418 | - } else { | ||
| 1419 | tempMap.put("sjfcLast1", "/"); | 1440 | tempMap.put("sjfcLast1", "/"); |
| 1420 | tempMap.put("delayLast1", "/"); | 1441 | tempMap.put("delayLast1", "/"); |
| 1421 | } | 1442 | } |
| 1443 | + | ||
| 1444 | + tempMap.put("date", date); | ||
| 1445 | + tempMap.put("company", companyName); | ||
| 1446 | + tempMap.put("subCompany", subCompanyName); | ||
| 1447 | + tempMap.put("line", key); | ||
| 1422 | resList.add(tempMap); | 1448 | resList.add(tempMap); |
| 1423 | } | 1449 | } |
| 1424 | 1450 |