wei.zhou

提交代码

...@@ -110,8 +110,9 @@ public class CustomsDataInterface { ...@@ -110,8 +110,9 @@ public class CustomsDataInterface {
110 //4、保存运单到iclear中 110 //4、保存运单到iclear中
111 sw.start("processChmConsignment"); 111 sw.start("processChmConsignment");
112 //if(result.getSuccess()){ 112 //if(result.getSuccess()){
113 + //TODO 等待校验逻辑完善后,由result.getSuccess() 判断
113 if(true){ 114 if(true){
114 - chmConsignmentService.processChmConsignment(mawb, timeStamp); 115 + chmConsignmentService.processChmConsignment(mawb, timeStamp,appId);
115 } 116 }
116 sw.stop(); 117 sw.stop();
117 118
......
...@@ -39,7 +39,7 @@ public class ChmConsignmentService { ...@@ -39,7 +39,7 @@ public class ChmConsignmentService {
39 * 转换主单 39 * 转换主单
40 * @return 40 * @return
41 */ 41 */
42 - public ChmConsignment convertToChmConsignment(Mawb mawb,Date pushTime){ 42 + public ChmConsignment convertToChmConsignment(Mawb mawb,Date pushTime,String creator){
43 ChmConsignment result = new ChmConsignment(); 43 ChmConsignment result = new ChmConsignment();
44 try{ 44 try{
45 //进出口标志:固定值 E 45 //进出口标志:固定值 E
...@@ -103,8 +103,8 @@ public class ChmConsignmentService { ...@@ -103,8 +103,8 @@ public class ChmConsignmentService {
103 result.setNetWeight(mawb.getNetWt()); 103 result.setNetWeight(mawb.getNetWt());
104 //杂费币制 104 //杂费币制
105 DictionaryEntries otherDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.CURRENCY_SYSTEM+mawb.getOtherCurr()); 105 DictionaryEntries otherDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.CURRENCY_SYSTEM+mawb.getOtherCurr());
106 - result.setInsuranceCostCurrencyDic(otherDictionaryEntries); 106 + result.setOtherCurrencyDic(otherDictionaryEntries);
107 - result.setInsuranceCostCurrency(otherDictionaryEntries.getChineseName()); 107 + result.setOtherCurrency(otherDictionaryEntries.getChineseName());
108 //杂费/率 108 //杂费/率
109 result.setOtherCost(mawb.getOtherRate()); 109 result.setOtherCost(mawb.getOtherRate());
110 //杂费标志 110 //杂费标志
...@@ -136,7 +136,7 @@ public class ChmConsignmentService { ...@@ -136,7 +136,7 @@ public class ChmConsignmentService {
136 136
137 //境内收发货人名称 137 //境内收发货人名称
138 result.setOperateUnitName(mawb.getTradeName()); 138 result.setOperateUnitName(mawb.getTradeName());
139 - //TODO 成交方式 139 + //成交方式
140 DictionaryEntries dealModeDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.CLINCH_TYPE+mawb.getTransMode()); 140 DictionaryEntries dealModeDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.CLINCH_TYPE+mawb.getTransMode());
141 result.setDealModeDic(dealModeDictionaryEntries); 141 result.setDealModeDic(dealModeDictionaryEntries);
142 result.setDealMode(dealModeDictionaryEntries.getChineseName()); 142 result.setDealMode(dealModeDictionaryEntries.getChineseName());
...@@ -177,7 +177,7 @@ public class ChmConsignmentService { ...@@ -177,7 +177,7 @@ public class ChmConsignmentService {
177 //推送时间作为创建时间,可以用来校验数据的有序性,如果新的推送时间小于已有的创建时间,就不更新数据 177 //推送时间作为创建时间,可以用来校验数据的有序性,如果新的推送时间小于已有的创建时间,就不更新数据
178 result.setCreateTime(new Date()); 178 result.setCreateTime(new Date());
179 result.setUpdateTime(pushTime); 179 result.setUpdateTime(pushTime);
180 - 180 + result.setCreator(creator);
181 181
182 }catch (Exception e){ 182 }catch (Exception e){
183 e.printStackTrace(); 183 e.printStackTrace();
...@@ -244,11 +244,11 @@ public class ChmConsignmentService { ...@@ -244,11 +244,11 @@ public class ChmConsignmentService {
244 * @param mawb 244 * @param mawb
245 * @param timeStamp 245 * @param timeStamp
246 */ 246 */
247 - public void processChmConsignment(Mawb mawb, String timeStamp) { 247 + public void processChmConsignment(Mawb mawb, String timeStamp,String creator) {
248 try { 248 try {
249 Date pushTime = DateUtils.timeStampToDate(Long.valueOf(timeStamp)); 249 Date pushTime = DateUtils.timeStampToDate(Long.valueOf(timeStamp));
250 250
251 - ChmConsignment chmConsignment=this.convertToChmConsignment(mawb,pushTime); 251 + ChmConsignment chmConsignment=this.convertToChmConsignment(mawb,pushTime,creator);
252 List<ChmConsignmentDetail> chmConsignmentDetailList = new ArrayList<>(); 252 List<ChmConsignmentDetail> chmConsignmentDetailList = new ArrayList<>();
253 mawb.getMawbDetailList().forEach(detail ->{ 253 mawb.getMawbDetailList().forEach(detail ->{
254 chmConsignmentDetailList.add(chmConsignmentDetailService.convertToChmConsignmentDetail(detail,chmConsignment)); 254 chmConsignmentDetailList.add(chmConsignmentDetailService.convertToChmConsignmentDetail(detail,chmConsignment));
......
...@@ -23,7 +23,7 @@ public class ChmConsignmentServiceTest extends IClearApiApplicationTests { ...@@ -23,7 +23,7 @@ public class ChmConsignmentServiceTest extends IClearApiApplicationTests {
23 try{ 23 try{
24 Mawb mawb = this.createNewMawb(); 24 Mawb mawb = this.createNewMawb();
25 String timeStamp = String.valueOf(new Date().getTime()); 25 String timeStamp = String.valueOf(new Date().getTime());
26 - chmConsignmentService.processChmConsignment(mawb,timeStamp); 26 + chmConsignmentService.processChmConsignment(mawb,timeStamp,"CTM");
27 27
28 }catch (Exception e){ 28 }catch (Exception e){
29 e.printStackTrace(); 29 e.printStackTrace();
......