作者 朱兆平

新舱单辅助管理-ffm报文解析其他部分完成

@@ -186,8 +186,9 @@ public class FFMInfo implements Serializable { @@ -186,8 +186,9 @@ public class FFMInfo implements Serializable {
186 for (String lineStr = reader.readLine(); 186 for (String lineStr = reader.readLine();
187 lineStr != null; 187 lineStr != null;
188 lineStr = reader.readLine()) { 188 lineStr = reader.readLine()) {
189 - //log.info("已读取行{}-{}",i,lineStr);  
190 - lineList.add(lineStr); 189 + if (StringUtils.isNotEmpty(lineStr)){
  190 + lineList.add(lineStr);
  191 + }
191 } 192 }
192 return true; 193 return true;
193 } else { 194 } else {
@@ -289,8 +290,7 @@ public class FFMInfo implements Serializable { @@ -289,8 +290,7 @@ public class FFMInfo implements Serializable {
289 yearNow = yearNow-1; 290 yearNow = yearNow-1;
290 } 291 }
291 292
292 - flightDateStr = flightDateStr+yearNow;  
293 - flightdate = DateUtil.dateFormatFlight(flightDateStr); 293 + flightdate = DateUtil.dateFormatFlight(flightDateDay+flightDateMonth+yearNow);
294 294
295 originatingstation = flight[3]; 295 originatingstation = flight[3];
296 log.info("[FLIGHT] 航班起始站为[{}]",originatingstation); 296 log.info("[FLIGHT] 航班起始站为[{}]",originatingstation);
@@ -42,9 +42,13 @@ public class FFMResolveImpl implements FFMResolve { @@ -42,9 +42,13 @@ public class FFMResolveImpl implements FFMResolve {
42 for (FFMInfo ffm : ffmInfoList) { 42 for (FFMInfo ffm : ffmInfoList) {
43 //todo:国际转运判定,需要维护机场代码静态表 43 //todo:国际转运判定,需要维护机场代码静态表
44 List<TBBaseAirportInfo> airportInfoList= airportInfoDao.checkInternal(ffm.getOriginatingstationBill(),ffm.getDestinationstationBill()); 44 List<TBBaseAirportInfo> airportInfoList= airportInfoDao.checkInternal(ffm.getOriginatingstationBill(),ffm.getDestinationstationBill());
45 - if (!airportInfoList.isEmpty() && airportInfoList.get(0).getInternal().equals(airportInfoList.get(1).getInternal()) && "1".equals(airportInfoList.get(1).getInternal())){  
46 - ffm.setCustomsstatus("002");  
47 - log.info("运单{}为国际转运货物",ffm.getWaybillnomaster()); 45 + if (!airportInfoList.isEmpty() && airportInfoList.size()>1){
  46 + if (airportInfoList.get(0).getInternal().equals(airportInfoList.get(1).getInternal()) && "1".equals(airportInfoList.get(1).getInternal())){
  47 + ffm.setCustomsstatus("002");
  48 + log.info("运单{}为国际转运货物",ffm.getWaybillnomaster());
  49 + }
  50 + }else {
  51 + log.error("{}{}机场代码未备案",ffm.getOriginatingstationBill(),ffm.getDestinationstationBill());
48 } 52 }
49 int result = ffmInfoDao.insertSelective(ffm); 53 int result = ffmInfoDao.insertSelective(ffm);
50 if (result <=0){ 54 if (result <=0){