Commit 671c7bd69157b74fc9d26c633f35adcfcf1bf6f8

Authored by 娄高锋
1 parent 30ce1440

线路首末班

src/main/java/com/bsth/service/schedule/PeopleCarPlanServiceImpl.java
@@ -973,17 +973,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -973,17 +973,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
973 if(schedule.getXlDir().equals("0")){ 973 if(schedule.getXlDir().equals("0")){
974 upbc++; 974 upbc++;
975 upys += schedule.getZdsjActualTime() - schedule.getFcsjActualTime(); 975 upys += schedule.getZdsjActualTime() - schedule.getFcsjActualTime();
976 - if(schedule.getFcsjActualTime() > schedule.getZdsjActualTime() || schedule.getZdsjActualTime() - schedule.getFcsjActualTime() > 24*60){  
977 - System.out.println("错误的时间:"+schedule.getFcsjActualTime()  
978 - +"--up--"+schedule.getZdsjActualTime());  
979 - }  
980 }else if(schedule.getXlDir().equals("1")){ 976 }else if(schedule.getXlDir().equals("1")){
981 dnbc++; 977 dnbc++;
982 dnys += schedule.getZdsjActualTime() - schedule.getFcsjActualTime(); 978 dnys += schedule.getZdsjActualTime() - schedule.getFcsjActualTime();
983 - if(schedule.getFcsjActualTime() > schedule.getZdsjActualTime() || schedule.getZdsjActualTime() - schedule.getFcsjActualTime() > 24*60){  
984 - System.out.println("错误的时间:"+schedule.getFcsjActualTime()  
985 - +"--dn--"+schedule.getZdsjActualTime());  
986 - }  
987 } 979 }
988 } 980 }
989 m.put("upbc", upbc); 981 m.put("upbc", upbc);
@@ -1185,77 +1177,100 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1185,77 +1177,100 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1185 if(longList0.size() == 0 || longList1.size() == 0){ 1177 if(longList0.size() == 0 || longList1.size() == 0){
1186 continue; 1178 continue;
1187 } 1179 }
1188 - Collections.sort(longList0);  
1189 - Collections.sort(longList1);  
1190 - System.out.println(longList0.size() + "---" + longList1.size());  
1191 - ScheduleRealInfo shouban0 = temp0.get(longList0.get(0));  
1192 - ScheduleRealInfo moban0 = temp0.get(longList0.get(longList0.size() - 1));  
1193 - ScheduleRealInfo shouban1 = temp1.get(longList1.get(0));  
1194 - ScheduleRealInfo moban1 = temp1.get(longList1.get(longList1.size() - 1));  
1195 - tempMap.put("date", date);  
1196 - tempMap.put("company", companyName);  
1197 - tempMap.put("subCompany", subCompanyName);  
1198 - tempMap.put("line", key);  
1199 - tempMap.put("qdzFirst0", shouban0.getQdzName());  
1200 - tempMap.put("jhfcFirst0", shouban0.getFcsj());  
1201 - tempMap.put("qdzLast0", moban0.getQdzName());  
1202 - tempMap.put("jhfcLast0", moban0.getFcsj());  
1203 - tempMap.put("qdzFirst1", shouban1.getQdzName());  
1204 - tempMap.put("jhfcFirst1", shouban1.getFcsj());  
1205 - tempMap.put("qdzLast1", moban1.getQdzName());  
1206 - tempMap.put("jhfcLast1", moban1.getFcsj());  
1207 - if(shouban0.getFcsjActual() != null){  
1208 - String[] split = shouban0.getFcsjActual().split(":");  
1209 - long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]);  
1210 - long delay = shouban0.getFcsjT() - min;  
1211 - tempMap.put("sjfcFirst0", shouban0.getFcsjActual());  
1212 - if(delay > 0)  
1213 - tempMap.put("delayFirst0", "+" + delay);  
1214 - else  
1215 - tempMap.put("delayFirst0", delay);  
1216 - } else { 1180 + if(longList0.size() != 0){
  1181 + Collections.sort(longList0);
  1182 + ScheduleRealInfo shouban0 = temp0.get(longList0.get(0));
  1183 + ScheduleRealInfo moban0 = temp0.get(longList0.get(longList0.size() - 1));
  1184 + tempMap.put("qdzFirst0", shouban0.getQdzName());
  1185 + tempMap.put("jhfcFirst0", shouban0.getFcsj());
  1186 + tempMap.put("qdzLast0", moban0.getQdzName());
  1187 + tempMap.put("jhfcLast0", moban0.getFcsj());
  1188 + if(shouban0.getFcsjActual() != null){
  1189 + String[] split = shouban0.getFcsjActual().split(":");
  1190 + long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]);
  1191 + long delay = shouban0.getFcsjT() - min;
  1192 + tempMap.put("sjfcFirst0", shouban0.getFcsjActual());
  1193 + if(delay > 0)
  1194 + tempMap.put("delayFirst0", "+" + delay);
  1195 + else
  1196 + tempMap.put("delayFirst0", delay);
  1197 + } else {
  1198 + tempMap.put("sjfcFirst0", "/");
  1199 + tempMap.put("delayFirst0", "/");
  1200 + }
  1201 + if(moban0.getFcsjActual() != null){
  1202 + String[] split = moban0.getFcsjActual().split(":");
  1203 + long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]);
  1204 + long delay = moban0.getFcsjT() - min;
  1205 + tempMap.put("sjfcLast0", moban0.getFcsjActual());
  1206 + if(delay > 0)
  1207 + tempMap.put("delayLast0", "+" + delay);
  1208 + else
  1209 + tempMap.put("delayLast0", delay);
  1210 + } else {
  1211 + tempMap.put("sjfcLast0", "/");
  1212 + tempMap.put("delayLast0", "/");
  1213 + }
  1214 + }else{
  1215 + tempMap.put("qdzFirst0", "--");
  1216 + tempMap.put("jhfcFirst0", "/");
  1217 + tempMap.put("qdzLast0", "--");
  1218 + tempMap.put("jhfcLast0", "/");
1217 tempMap.put("sjfcFirst0", "/"); 1219 tempMap.put("sjfcFirst0", "/");
1218 tempMap.put("delayFirst0", "/"); 1220 tempMap.put("delayFirst0", "/");
1219 - }  
1220 - if(moban0.getFcsjActual() != null){  
1221 - String[] split = moban0.getFcsjActual().split(":");  
1222 - long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]);  
1223 - long delay = moban0.getFcsjT() - min;  
1224 - tempMap.put("sjfcLast0", moban0.getFcsjActual());  
1225 - if(delay > 0)  
1226 - tempMap.put("delayLast0", "+" + delay);  
1227 - else  
1228 - tempMap.put("delayLast0", delay);  
1229 - } else {  
1230 tempMap.put("sjfcLast0", "/"); 1221 tempMap.put("sjfcLast0", "/");
1231 tempMap.put("delayLast0", "/"); 1222 tempMap.put("delayLast0", "/");
1232 } 1223 }
1233 - if(shouban1.getFcsjActual() != null){  
1234 - String[] split = shouban1.getFcsjActual().split(":");  
1235 - long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]);  
1236 - long delay = shouban1.getFcsjT() - min;  
1237 - tempMap.put("sjfcFirst1", shouban1.getFcsjActual());  
1238 - if(delay > 0)  
1239 - tempMap.put("delayFirst1", "+" + delay);  
1240 - else  
1241 - tempMap.put("delayFirst1", delay);  
1242 - } else { 1224 +
  1225 + if(longList1.size() != 0){
  1226 + Collections.sort(longList1);
  1227 + ScheduleRealInfo shouban1 = temp1.get(longList1.get(0));
  1228 + ScheduleRealInfo moban1 = temp1.get(longList1.get(longList1.size() - 1));
  1229 + tempMap.put("qdzFirst1", shouban1.getQdzName());
  1230 + tempMap.put("jhfcFirst1", shouban1.getFcsj());
  1231 + tempMap.put("qdzLast1", moban1.getQdzName());
  1232 + tempMap.put("jhfcLast1", moban1.getFcsj());
  1233 + if(shouban1.getFcsjActual() != null){
  1234 + String[] split = shouban1.getFcsjActual().split(":");
  1235 + long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]);
  1236 + long delay = shouban1.getFcsjT() - min;
  1237 + tempMap.put("sjfcFirst1", shouban1.getFcsjActual());
  1238 + if(delay > 0)
  1239 + tempMap.put("delayFirst1", "+" + delay);
  1240 + else
  1241 + tempMap.put("delayFirst1", delay);
  1242 + } else {
  1243 + tempMap.put("sjfcFirst1", "/");
  1244 + tempMap.put("delayFirst1", "/");
  1245 + }
  1246 + if(moban1.getFcsjActual() != null){
  1247 + String[] split = moban1.getFcsjActual().split(":");
  1248 + long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]);
  1249 + long delay = moban1.getFcsjT() - min;
  1250 + tempMap.put("sjfcLast1", moban1.getFcsjActual());
  1251 + if(delay > 0)
  1252 + tempMap.put("delayLast1", "+" + delay);
  1253 + else
  1254 + tempMap.put("delayLast1", delay);
  1255 + } else {
  1256 + tempMap.put("sjfcLast1", "/");
  1257 + tempMap.put("delayLast1", "/");
  1258 + }
  1259 + }else{
  1260 + tempMap.put("qdzFirst1", "--");
  1261 + tempMap.put("jhfcFirst1", "/");
  1262 + tempMap.put("qdzLast1", "--");
  1263 + tempMap.put("jhfcLast1", "/");
1243 tempMap.put("sjfcFirst1", "/"); 1264 tempMap.put("sjfcFirst1", "/");
1244 tempMap.put("delayFirst1", "/"); 1265 tempMap.put("delayFirst1", "/");
1245 - }  
1246 - if(moban1.getFcsjActual() != null){  
1247 - String[] split = moban1.getFcsjActual().split(":");  
1248 - long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]);  
1249 - long delay = moban1.getFcsjT() - min;  
1250 - tempMap.put("sjfcLast1", moban1.getFcsjActual());  
1251 - if(delay > 0)  
1252 - tempMap.put("delayLast1", "+" + delay);  
1253 - else  
1254 - tempMap.put("delayLast1", delay);  
1255 - } else {  
1256 tempMap.put("sjfcLast1", "/"); 1266 tempMap.put("sjfcLast1", "/");
1257 tempMap.put("delayLast1", "/"); 1267 tempMap.put("delayLast1", "/");
1258 } 1268 }
  1269 +
  1270 + tempMap.put("date", date);
  1271 + tempMap.put("company", companyName);
  1272 + tempMap.put("subCompany", subCompanyName);
  1273 + tempMap.put("line", key);
1259 resList.add(tempMap); 1274 resList.add(tempMap);
1260 } 1275 }
1261 1276
@@ -1336,7 +1351,6 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1336,7 +1351,6 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1336 } 1351 }
1337 Collections.sort(longList0); 1352 Collections.sort(longList0);
1338 Collections.sort(longList1); 1353 Collections.sort(longList1);
1339 - System.out.println(longList0.size() + "---" + longList1.size());  
1340 ScheduleRealInfo shouban0 = temp0.get(longList0.get(0)); 1354 ScheduleRealInfo shouban0 = temp0.get(longList0.get(0));
1341 ScheduleRealInfo moban0 = temp0.get(longList0.get(longList0.size() - 1)); 1355 ScheduleRealInfo moban0 = temp0.get(longList0.get(longList0.size() - 1));
1342 ScheduleRealInfo shouban1 = temp1.get(longList1.get(0)); 1356 ScheduleRealInfo shouban1 = temp1.get(longList1.get(0));