wei.zhou

提交代码

1 +D类字段校验
2 +明细:
3 +1.商品明细必须有效,如果只是添加了商品明细,没有填写任何信息,系统会给出提示,不能保存也不能提交【必填项校验】
4 +2.成交数量,成交单位,第一法定数量,原产地,总价,征免,币值,最终目的国,境内货源地必填;成交数量,申报金额,申报重量必须是数值类型。【数据类型校验】
5 +3.品名必填且必须包含中文字符。【正则校验+逻辑校验】
6 + 申报要素中除'GNIT','CAS','其他'项外,其他必填
7 +4.当每行的成交单位,法定计量单位如为千克,克,斤时,成交数量,法定计量数量转换为千克后和申报重量必须相同,否则就给予相关提示【逻辑校验】
8 +5.运单明细法定数量部分,HS CODE自动带出有法定计量单位的部分需要强制填写法定数量,若有必填项未填写,点击“保存”或“提交”按钮时,系统会给出相应提示。
9 + 即如果货物信息带出的第一法定单位有值,则第一法定数量必填,第二法定单位为空,则第二法定数量必不填。带出的第二法定单位有值,则第二法定数量必填。
10 +
11 +
12 +保存按钮:不论什么情况都可保存,必填字段未填会给出边框变红的提示。【必填项校验】
13 +提交按钮:图片必须上传。未上传图片则无法成功提交。若必填字段未填写完整,则按照图像系统提交。
14 +联系人,联系方式:必填,为空时,可保存不可提交【必填项校验】
15 +清关图片上传:上传前必须填写运单号,联系人,联系方式
16 +
17 +
18 +必填字段:
19 +运单号,出境口岸,出境关别代码,生产核销单位海关编码,生产核销单位统一信用代码,生产核销单位,运输方式,监管方式,征免性质,成交方式,包装种类
20 +,境内发货人统一信用代码,境内发货人海关编码,运单件数,毛重(公斤),净重(公斤),抵运国(地区),指运港,贸易国(地区),境外发货人名称(外文)
21 +
22 +
23 +当成交方式为:CFR、CPT时,运费,运费币制必填,
24 +当为CIF、CIP、DDP、DDU、DAP时,运费,运费币制,保费,保费币制必填,
25 +当为C&I等时,保费,保费币制必填。为空时可保存。提交确认则按照图像系统提交
26 +当为FOB、FCA、EXW时,没有运费,保费校验
...\ No newline at end of file ...\ No newline at end of file
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
139 </includes> 139 </includes>
140 </resource> 140 </resource>
141 </resources> 141 </resources>
142 - <finalName>${artifactId}-${version}_${activatedProperties}</finalName> 142 + <finalName>${artifactId}-${version}_${activatedProperties}</finalName>
143 </build> 143 </build>
144 144
145 </project> 145 </project>
......
...@@ -51,6 +51,12 @@ public class ChmConsignment implements Serializable { ...@@ -51,6 +51,12 @@ public class ChmConsignment implements Serializable {
51 @Column(name = "DECLARED_UNIT_NAME") 51 @Column(name = "DECLARED_UNIT_NAME")
52 private String declaredUnitName; 52 private String declaredUnitName;
53 53
54 + /**
55 + * 申报口岸
56 + */
57 + @Column(name = "DECLARED_PORT")
58 + private String declaredPort;
59 +
54 60
55 /** 61 /**
56 * 合同协议号 62 * 合同协议号
...@@ -367,6 +373,18 @@ public class ChmConsignment implements Serializable { ...@@ -367,6 +373,18 @@ public class ChmConsignment implements Serializable {
367 @Column(name = "OWNER_CODE_SCC") 373 @Column(name = "OWNER_CODE_SCC")
368 private String ownerCodeScc; 374 private String ownerCodeScc;
369 375
376 + /**
377 + * 运单类型ID
378 + */
379 + @Column(name = "CONS_TYPE_ID")
380 + private String consTypeId;
381 +
382 + /**
383 + * 运单类型
384 + */
385 + @Column(name = "CONS_TYPE")
386 + private String consType;
387 +
370 388
371 @OneToMany(mappedBy = "chmConsignment", cascade = CascadeType.ALL) 389 @OneToMany(mappedBy = "chmConsignment", cascade = CascadeType.ALL)
372 private List<ChmConsignmentDetail> chmConsignmentDetailList; 390 private List<ChmConsignmentDetail> chmConsignmentDetailList;
......
...@@ -153,7 +153,12 @@ public class ChmConsignmentService { ...@@ -153,7 +153,12 @@ public class ChmConsignmentService {
153 result.setFromCountry(fromCountryDictionaryEntries.getChineseName()); 153 result.setFromCountry(fromCountryDictionaryEntries.getChineseName());
154 } 154 }
155 155
156 - 156 + //运单类型
157 + DictionaryEntries consType = Constant.dictionaryEntriesCache.get(Constant.MSG_TYPE_D);
158 + if(consType != null){
159 + result.setConsTypeId(String.valueOf(consType.getId()));
160 + result.setConsType(consType.getChineseName());
161 + }
157 162
158 //监管方式 163 //监管方式
159 DictionaryEntries tradeModeDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.SUPERVISION_MODE+mawb.getTradeMode()); 164 DictionaryEntries tradeModeDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.SUPERVISION_MODE+mawb.getTradeMode());
...@@ -233,6 +238,11 @@ public class ChmConsignmentService { ...@@ -233,6 +238,11 @@ public class ChmConsignmentService {
233 result.setConsStatus(transferWaybillStatusDictionaryEntries.getChineseName()); 238 result.setConsStatus(transferWaybillStatusDictionaryEntries.getChineseName());
234 } 239 }
235 240
241 + //西门子数据都为TSN口岸,可通过口岸查询查看
242 + if (creator.equals("IDE")){
243 + result.setDeclaredPort("TSN");
244 + }
245 +
236 //推送时间作为创建时间,可以用来校验数据的有序性,如果新的推送时间小于已有的创建时间,就不更新数据 246 //推送时间作为创建时间,可以用来校验数据的有序性,如果新的推送时间小于已有的创建时间,就不更新数据
237 result.setCreateTime(new Date()); 247 result.setCreateTime(new Date());
238 result.setUpdateTime(pushTime); 248 result.setUpdateTime(pushTime);
...@@ -345,6 +355,7 @@ public class ChmConsignmentService { ...@@ -345,6 +355,7 @@ public class ChmConsignmentService {
345 //条件1、状态为 待申报海关 355 //条件1、状态为 待申报海关
346 //条件2、本次推送时间 > 上次推送的时间 356 //条件2、本次推送时间 > 上次推送的时间
347 }else if(!Objects.equals(chmConsignmentDB,null) 357 }else if(!Objects.equals(chmConsignmentDB,null)
358 + //TODO 确定是不是transferWaybillStatus_5
348 && Objects.equals(chmConsignmentDB.getConsStatusDic().getCode(),"transferWaybillStatus_5") 359 && Objects.equals(chmConsignmentDB.getConsStatusDic().getCode(),"transferWaybillStatus_5")
349 //TODO 提交时需要打开 360 //TODO 提交时需要打开
350 && pushTime.getTime()>chmConsignmentDB.getUpdateTime().getTime() 361 && pushTime.getTime()>chmConsignmentDB.getUpdateTime().getTime()
...@@ -362,6 +373,7 @@ public class ChmConsignmentService { ...@@ -362,6 +373,7 @@ public class ChmConsignmentService {
362 // } 373 // }
363 // } 374 // }
364 // } 375 // }
376 + //TODO 因为现在有了DetailId,所以可以根据DetailID进行更新,所以需要改为 update,去的掉detele的动作
365 List<Long> detailIdList = new ArrayList(); 377 List<Long> detailIdList = new ArrayList();
366 chmConsignmentDB.getChmConsignmentDetailList().forEach(detail->{ 378 chmConsignmentDB.getChmConsignmentDetailList().forEach(detail->{
367 detailIdList.add(detail.getId()); 379 detailIdList.add(detail.getId());
...@@ -371,6 +383,10 @@ public class ChmConsignmentService { ...@@ -371,6 +383,10 @@ public class ChmConsignmentService {
371 chmConsignmentDB.setChmConsignmentDetailList(null); 383 chmConsignmentDB.setChmConsignmentDetailList(null);
372 } 384 }
373 385
386 +
387 +
388 +
389 +
374 chmConsignment.setId(chmConsignmentDB.getId()); 390 chmConsignment.setId(chmConsignmentDB.getId());
375 chmConsignment.setCreateTime(chmConsignmentDB.getCreateTime()); 391 chmConsignment.setCreateTime(chmConsignmentDB.getCreateTime());
376 chmConsignment.setUpdateTime(pushTime); 392 chmConsignment.setUpdateTime(pushTime);
......