Commit f66076b6aa70d164501a0494f8f80b480f9dba48
1 parent
a785dc94
更新智能时刻表导出问题,后台修正
Showing
1 changed file
with
29 additions
and
1 deletions
src/main/java/com/bsth/service/schedule/datatools/TTInfoDetailDataToolsImpl.java
| @@ -454,6 +454,19 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail | @@ -454,6 +454,19 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail | ||
| 454 | 454 | ||
| 455 | StationRoute station1 = stationRouteService.findById(lpObjList.get(0).getStationRouteId1()); | 455 | StationRoute station1 = stationRouteService.findById(lpObjList.get(0).getStationRouteId1()); |
| 456 | StationRoute station2 = stationRouteService.findById(lpObjList.get(1).getStationRouteId2()); | 456 | StationRoute station2 = stationRouteService.findById(lpObjList.get(1).getStationRouteId2()); |
| 457 | + | ||
| 458 | + // TODO | ||
| 459 | + Map<String, Object> param = new HashMap<>(); | ||
| 460 | + param.put("station.id_eq", null); | ||
| 461 | + if (station1 == null) { | ||
| 462 | + param.put("station.id_eq", lpObjList.get(0).getStationRouteId1()); | ||
| 463 | + station1 = ((List<StationRoute>) stationRouteService.list(param)).get(0); | ||
| 464 | + } | ||
| 465 | + if (station2 == null) { | ||
| 466 | + param.put("station.id_eq", lpObjList.get(0).getStationRouteId2()); | ||
| 467 | + station2 = ((List<StationRoute>) stationRouteService.list(param)).get(0); | ||
| 468 | + } | ||
| 469 | + | ||
| 457 | for (int i = 0; i < groupCount; i++) { | 470 | for (int i = 0; i < groupCount; i++) { |
| 458 | excelPoiOperator.createStringCell(wb, lpHeadRow, (short) (i * 2 + 1), station1.getStationName(), new Color(0x96b9d7)); | 471 | excelPoiOperator.createStringCell(wb, lpHeadRow, (short) (i * 2 + 1), station1.getStationName(), new Color(0x96b9d7)); |
| 459 | excelPoiOperator.createStringCell(wb, lpHeadRow, (short) (i * 2 + 2), station2.getStationName(), new Color(0x96b9d7)); | 472 | excelPoiOperator.createStringCell(wb, lpHeadRow, (short) (i * 2 + 2), station2.getStationName(), new Color(0x96b9d7)); |
| @@ -566,6 +579,19 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail | @@ -566,6 +579,19 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail | ||
| 566 | 579 | ||
| 567 | StationRoute station1 = stationRouteService.findById(lpObjList.get(0).getStationRouteId1()); | 580 | StationRoute station1 = stationRouteService.findById(lpObjList.get(0).getStationRouteId1()); |
| 568 | StationRoute station2 = stationRouteService.findById(lpObjList.get(1).getStationRouteId2()); | 581 | StationRoute station2 = stationRouteService.findById(lpObjList.get(1).getStationRouteId2()); |
| 582 | + | ||
| 583 | + // TODO | ||
| 584 | + Map<String, Object> param = new HashMap<>(); | ||
| 585 | + param.put("station.id_eq", null); | ||
| 586 | + if (station1 == null) { | ||
| 587 | + param.put("station.id_eq", lpObjList.get(0).getStationRouteId1()); | ||
| 588 | + station1 = ((List<StationRoute>) stationRouteService.list(param)).get(0); | ||
| 589 | + } | ||
| 590 | + if (station2 == null) { | ||
| 591 | + param.put("station.id_eq", lpObjList.get(0).getStationRouteId2()); | ||
| 592 | + station2 = ((List<StationRoute>) stationRouteService.list(param)).get(0); | ||
| 593 | + } | ||
| 594 | + | ||
| 569 | for (int i = 1; i <= groupCount; i++) { | 595 | for (int i = 1; i <= groupCount; i++) { |
| 570 | excelPoiOperator.createStringCell(wb, lpHeadRow, (short) (i * 2 + 1), station1.getStationName(), new Color(0x96b9d7)); | 596 | excelPoiOperator.createStringCell(wb, lpHeadRow, (short) (i * 2 + 1), station1.getStationName(), new Color(0x96b9d7)); |
| 571 | excelPoiOperator.createStringCell(wb, lpHeadRow, (short) (i * 2 + 2), station2.getStationName(), new Color(0x96b9d7)); | 597 | excelPoiOperator.createStringCell(wb, lpHeadRow, (short) (i * 2 + 2), station2.getStationName(), new Color(0x96b9d7)); |
| @@ -644,7 +670,9 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail | @@ -644,7 +670,9 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail | ||
| 644 | cell.setCellValue(bcObj.getFcsj() + "X"); | 670 | cell.setCellValue(bcObj.getFcsj() + "X"); |
| 645 | } else { // 一个车次链 | 671 | } else { // 一个车次链 |
| 646 | cell = lpRow.getCell((short) (bcObj.getGroupNo() * 2 + bcObj.getGroupBcNo() + 3)); | 672 | cell = lpRow.getCell((short) (bcObj.getGroupNo() * 2 + bcObj.getGroupBcNo() + 3)); |
| 647 | - cell.setCellValue(bcObj.getFcsj() + "X"); | 673 | + if (cell != null) { |
| 674 | + cell.setCellValue(bcObj.getFcsj() + "X"); | ||
| 675 | + } | ||
| 648 | } | 676 | } |
| 649 | break; | 677 | break; |
| 650 | case LC: | 678 | case LC: |