作者 朱兆平

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

... ... @@ -186,9 +186,10 @@ public class FFMInfo implements Serializable {
for (String lineStr = reader.readLine();
lineStr != null;
lineStr = reader.readLine()) {
//log.info("已读取行{}-{}",i,lineStr);
if (StringUtils.isNotEmpty(lineStr)){
lineList.add(lineStr);
}
}
return true;
} else {
throw new FFMResolveException("报文尾部缺少文件结束标识LAST或者CONT");
... ... @@ -289,8 +290,7 @@ public class FFMInfo implements Serializable {
yearNow = yearNow-1;
}
flightDateStr = flightDateStr+yearNow;
flightdate = DateUtil.dateFormatFlight(flightDateStr);
flightdate = DateUtil.dateFormatFlight(flightDateDay+flightDateMonth+yearNow);
originatingstation = flight[3];
log.info("[FLIGHT] 航班起始站为[{}]",originatingstation);
... ...
... ... @@ -42,10 +42,14 @@ public class FFMResolveImpl implements FFMResolve {
for (FFMInfo ffm : ffmInfoList) {
//todo:国际转运判定,需要维护机场代码静态表
List<TBBaseAirportInfo> airportInfoList= airportInfoDao.checkInternal(ffm.getOriginatingstationBill(),ffm.getDestinationstationBill());
if (!airportInfoList.isEmpty() && airportInfoList.get(0).getInternal().equals(airportInfoList.get(1).getInternal()) && "1".equals(airportInfoList.get(1).getInternal())){
if (!airportInfoList.isEmpty() && airportInfoList.size()>1){
if (airportInfoList.get(0).getInternal().equals(airportInfoList.get(1).getInternal()) && "1".equals(airportInfoList.get(1).getInternal())){
ffm.setCustomsstatus("002");
log.info("运单{}为国际转运货物",ffm.getWaybillnomaster());
}
}else {
log.error("{}{}机场代码未备案",ffm.getOriginatingstationBill(),ffm.getDestinationstationBill());
}
int result = ffmInfoDao.insertSelective(ffm);
if (result <=0){
log.error("{}入库失败",ffm.getWaybillnomaster());
... ...