wei.zhou

提交代码

......@@ -66,27 +66,39 @@ public class ChmConsignmentService {
result.setCustomsNo(mawb.getCustomMaster());
//征免性质
DictionaryEntries levyTypeDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.NATURE_EXEMPTION+mawb.getCutMode());
result.setTaxNatureDic(levyTypeDictionaryEntries);
result.setTaxNature(levyTypeDictionaryEntries.getChineseName());
if(!Objects.equals(levyTypeDictionaryEntries,null)){
result.setTaxNatureDic(levyTypeDictionaryEntries);
result.setTaxNature(levyTypeDictionaryEntries.getChineseName());
}
//报关/转关关系标志:固定值0 ,但数据字典里没有0
//经停港/指运港
ChmCarryPort chmCarryPort =Constant.chmCarryPortCache.get(mawb.getDistinatePort());
result.setThroughStopPortDic(chmCarryPort);
result.setThroughStopPort(chmCarryPort.getPortNo());
if(!Objects.equals(chmCarryPort,null)){
result.setThroughStopPortDic(chmCarryPort);
result.setThroughStopPort(chmCarryPort.getPortNo());
}
//TODO 报关标志【待确认】
DictionaryEntries declaredDocTypeDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.DECLARED_DOC_TYPE + mawb.getEdiId());
result.setDeclaredDocTypeDic(declaredDocTypeDictionaryEntries);
result.setDeclaredDocType(declaredDocTypeDictionaryEntries.getChineseName());
if(!Objects.equals(declaredDocTypeDictionaryEntries,null)){
result.setDeclaredDocTypeDic(declaredDocTypeDictionaryEntries);
result.setDeclaredDocType(declaredDocTypeDictionaryEntries.getChineseName());
}
//海关编号
result.setCustomsNo(mawb.getEntryId());
//运费币制
DictionaryEntries currencyDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.CURRENCY_SYSTEM+mawb.getFeeCurr());
result.setTransCurrencyDic(currencyDictionaryEntries);
result.setTransCurrency(currencyDictionaryEntries.getChineseName());
if(!Objects.equals(currencyDictionaryEntries,null)){
result.setTransCurrencyDic(currencyDictionaryEntries);
result.setTransCurrency(currencyDictionaryEntries.getChineseName());
}
//TODO 运费标记:固定值 3 【iclear中, 和成交方式相关,只有成交方式 1、2 时,才能传 3 】
......@@ -100,8 +112,11 @@ public class ChmConsignmentService {
//保险费币制
DictionaryEntries insuranceDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.CURRENCY_SYSTEM+mawb.getInsurCurr());
result.setInsuranceCostCurrencyDic(insuranceDictionaryEntries);
result.setInsuranceCostCurrency(insuranceDictionaryEntries.getChineseName());
if(!Objects.equals(insuranceDictionaryEntries,null)){
result.setInsuranceCostCurrencyDic(insuranceDictionaryEntries);
result.setInsuranceCostCurrency(insuranceDictionaryEntries.getChineseName());
}
//保险费标记 ,根据transMode决定
......@@ -113,8 +128,11 @@ public class ChmConsignmentService {
result.setNetWeight(mawb.getNetWt());
//杂费币制
DictionaryEntries otherDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.CURRENCY_SYSTEM+mawb.getOtherCurr());
result.setOtherCurrencyDic(otherDictionaryEntries);
result.setOtherCurrency(otherDictionaryEntries.getChineseName());
if(!Objects.equals(otherDictionaryEntries,null)){
result.setOtherCurrencyDic(otherDictionaryEntries);
result.setOtherCurrency(otherDictionaryEntries.getChineseName());
}
//杂费/率
result.setOtherCost(mawb.getOtherRate());
//杂费标志
......@@ -130,34 +148,49 @@ public class ChmConsignmentService {
result.setEnteringNo(mawb.getPreEntryId());
//启运国/运抵国
DictionaryEntries fromCountryDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.COUNTRY+mawb.getTradeCountry());
result.setFromCountryDic(fromCountryDictionaryEntries);
result.setFromCountry(fromCountryDictionaryEntries.getChineseName());
if(!Objects.equals(fromCountryDictionaryEntries,null)){
result.setFromCountryDic(fromCountryDictionaryEntries);
result.setFromCountry(fromCountryDictionaryEntries.getChineseName());
}
//监管方式
DictionaryEntries tradeModeDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.SUPERVISION_MODE+mawb.getTradeMode());
result.setTradeModeDic(tradeModeDictionaryEntries);
result.setTradeMode(tradeModeDictionaryEntries.getChineseName());
if(!Objects.equals(tradeModeDictionaryEntries,null)){
result.setTradeModeDic(tradeModeDictionaryEntries);
result.setTradeMode(tradeModeDictionaryEntries.getChineseName());
}
//境内收发货人编号
result.setTradeCoSCC(mawb.getTradeCode());
//运输方式代码
DictionaryEntries vehicleWayDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.VEHICLE_WAY_CODE+mawb.getTrafMode());
result.setVehicleWay(vehicleWayDictionaryEntries);
result.setVehicleWayCode(vehicleWayDictionaryEntries.getCode());
if(!Objects.equals(vehicleWayDictionaryEntries,null)){
result.setVehicleWay(vehicleWayDictionaryEntries);
result.setVehicleWayCode(vehicleWayDictionaryEntries.getCode());
}
//境内收发货人名称
result.setOperateUnitName(mawb.getTradeName());
//成交方式
DictionaryEntries dealModeDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.CLINCH_TYPE+mawb.getTransMode());
result.setDealModeDic(dealModeDictionaryEntries);
result.setDealMode(dealModeDictionaryEntries.getChineseName());
if(!Objects.equals(dealModeDictionaryEntries,null)){
result.setDealModeDic(dealModeDictionaryEntries);
result.setDealMode(dealModeDictionaryEntries.getChineseName());
}
//包装种类
DictionaryEntries packageTypeDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.NEW_PACKAGE_TYPE+mawb.getWrapType());
result.setPackageTypeDic(packageTypeDictionaryEntries);
result.setPackageType(packageTypeDictionaryEntries.getChineseName());
if(!Objects.equals(packageTypeDictionaryEntries,null)){
result.setPackageTypeDic(packageTypeDictionaryEntries);
result.setPackageType(packageTypeDictionaryEntries.getChineseName());
}
//TODO 生产核销单位统一信用代码---报关形式类型
......@@ -170,8 +203,11 @@ public class ChmConsignmentService {
//贸易国别
DictionaryEntries tradeAreaCodeDictionaryEntries=Constant.dictionaryEntriesCache.get(Constant.COUNTRY+mawb.getTradeAreaCode());
result.setTradeAreaCodeDic(tradeAreaCodeDictionaryEntries);
result.setTradeAreaCode(tradeAreaCodeDictionaryEntries.getChineseName());
if(!Objects.equals(tradeAreaCodeDictionaryEntries,null)){
result.setTradeAreaCodeDic(tradeAreaCodeDictionaryEntries);
result.setTradeAreaCode(tradeAreaCodeDictionaryEntries.getChineseName());
}
//标记及号码
result.setDeclaredRemark(mawb.getMarkNo());
......@@ -192,8 +228,11 @@ public class ChmConsignmentService {
//运单状态: 待申报海关
DictionaryEntries transferWaybillStatusDictionaryEntries=Constant.dictionaryEntriesCache.get(Constant.TRANSFER_WAY_BILL_STATUS+"5");
result.setConsStatusDic(transferWaybillStatusDictionaryEntries);
result.setConsStatus(transferWaybillStatusDictionaryEntries.getChineseName());
if(!Objects.equals(transferWaybillStatusDictionaryEntries,null)){
result.setConsStatusDic(transferWaybillStatusDictionaryEntries);
result.setConsStatus(transferWaybillStatusDictionaryEntries.getChineseName());
}
//推送时间作为创建时间,可以用来校验数据的有序性,如果新的推送时间小于已有的创建时间,就不更新数据
result.setCreateTime(new Date());
result.setUpdateTime(pushTime);
......