Commit 4e2bb969b822b5892c19a3b5a0ece8afbb4e5122

Authored by 娄高锋
1 parent e07a7ba9

行车路单批量导出修正油耗电耗统计

src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
@@ -1843,7 +1843,16 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1843,7 +1843,16 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1843 } 1843 }
1844 } 1844 }
1845 1845
1846 - sjlc = new BigDecimal(culateService.culateSjgl(keyMap.get(key)) + culateService.culateLjgl(keyMap.get(key))); 1846 + List<ScheduleRealInfo> tempList = new ArrayList<ScheduleRealInfo>();
  1847 + for(ScheduleRealInfo s : keyMap.get(key)){
  1848 + if(s.getcTasks() != null && s.getcTasks().size() > 0){
  1849 + tempList.add(s);
  1850 + } else if(s.getZdsjActual() != null && s.getFcsjActual() != null){
  1851 + tempList.add(s);
  1852 + }
  1853 + }
  1854 +
  1855 + sjlc = new BigDecimal(culateService.culateSjgl(tempList) + culateService.culateLjgl(tempList));
1847 lzlc = new BigDecimal(culateService.culateCJLC(keyMap.get(key), "路阻")); 1856 lzlc = new BigDecimal(culateService.culateCJLC(keyMap.get(key), "路阻"));
1848 dmlc = new BigDecimal(culateService.culateCJLC(keyMap.get(key), "吊慢")); 1857 dmlc = new BigDecimal(culateService.culateCJLC(keyMap.get(key), "吊慢"));
1849 gzlc = new BigDecimal(culateService.culateCJLC(keyMap.get(key), "故障")); 1858 gzlc = new BigDecimal(culateService.culateCJLC(keyMap.get(key), "故障"));
@@ -2421,13 +2430,13 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -2421,13 +2430,13 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2421 } 2430 }
2422 2431
2423 for(Ylb ylb : queryYlbByRqXlbm){ 2432 for(Ylb ylb : queryYlbByRqXlbm){
2424 - String key = sdfMonth.format(ylb.getRq()) + ylb.getXlbm(); 2433 + String key = ylb.getJsy() + ylb.getNbbm();
2425 if(!ylbMap.containsKey(key)) 2434 if(!ylbMap.containsKey(key))
2426 ylbMap.put(key, new ArrayList<Ylb>()); 2435 ylbMap.put(key, new ArrayList<Ylb>());
2427 ylbMap.get(key).add(ylb); 2436 ylbMap.get(key).add(ylb);
2428 } 2437 }
2429 for(Dlb dlb : queryDlbByRqXlbm){ 2438 for(Dlb dlb : queryDlbByRqXlbm){
2430 - String key = sdfMonth.format(dlb.getRq()) + dlb.getXlbm(); 2439 + String key = dlb.getJsy() + dlb.getNbbm();
2431 if(!dlbMap.containsKey(key)) 2440 if(!dlbMap.containsKey(key))
2432 dlbMap.put(key, new ArrayList<Dlb>()); 2441 dlbMap.put(key, new ArrayList<Dlb>());
2433 dlbMap.get(key).add(dlb); 2442 dlbMap.get(key).add(dlb);
@@ -2480,8 +2489,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -2480,8 +2489,9 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2480 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); 2489 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
2481 // ScheduleRealInfo s = scheduleRealInfoRepository.scheduleById(scheduleRealInfos.get(0).getId()); 2490 // ScheduleRealInfo s = scheduleRealInfoRepository.scheduleById(scheduleRealInfos.get(0).getId());
2482 ScheduleRealInfo s = scheduleRealInfos.get(0); 2491 ScheduleRealInfo s = scheduleRealInfos.get(0);
2483 - String xlbm = s.getXlBm();  
2484 String fcrq = s.getScheduleDateStr(); 2492 String fcrq = s.getScheduleDateStr();
  2493 + String jsy = s.getjGh();
  2494 + String nbbm = s.getClZbh();
2485 2495
2486 int type = 0; 2496 int type = 0;
2487 Double ccyl = 0.0; 2497 Double ccyl = 0.0;
@@ -2491,8 +2501,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -2491,8 +2501,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2491 Double zlc = 0.0; 2501 Double zlc = 0.0;
2492 // List<Ylb> listYlb = ylbRepository.queryListYlb(fcrq, s.getClZbh(), s.getjGh(),xlbm); 2502 // List<Ylb> listYlb = ylbRepository.queryListYlb(fcrq, s.getClZbh(), s.getjGh(),xlbm);
2493 // List<Dlb> listDlb = dlbRepository.queryListDlb(fcrq, s.getClZbh(), s.getjGh(),xlbm); 2503 // List<Dlb> listDlb = dlbRepository.queryListDlb(fcrq, s.getClZbh(), s.getjGh(),xlbm);
2494 - List<Ylb> listYlb = ylbMap.get(fcrq + xlbm);  
2495 - List<Dlb> listDlb = dlbMap.get(fcrq + xlbm); 2504 + List<Ylb> listYlb = ylbMap.get(jsy + nbbm);
  2505 + List<Dlb> listDlb = dlbMap.get(jsy + nbbm);
2496 2506
2497 // List<Cars> listCars = carsRepository.findCarsByCode(s.getClZbh()); 2507 // List<Cars> listCars = carsRepository.findCarsByCode(s.getClZbh());
2498 List<Cars> listCars = carMap.get(s.getClZbh()); 2508 List<Cars> listCars = carMap.get(s.getClZbh());